import type { TToolScope } from './tool.js'; export type TAutomationTriggerKind = 'time' | 'device' | 'presence' | 'calendar' | 'manual' | 'system'; export interface IAutomationTrigger { id: string; kind: TAutomationTriggerKind; expression: string; } export interface IAutomationDefinition { id: string; name: string; sourcePath: string; enabled: boolean; triggers: IAutomationTrigger[]; requiredScopes: TToolScope[]; } export interface IAutomationRun { id: string; automationId: string; triggerId: string; status: 'running' | 'completed' | 'failed'; startedAt: string; finishedAt?: string; errorMessage?: string; }