export type LTTaskStatus = 'pending' | 'in_progress' | 'completed' | 'needs_intervention' | 'cancelled'; export type LTTaskPriority = 1 | 2 | 3 | 4; export interface LTTaskRecord { id: string; workflow_id: string; workflow_type: string; lt_type: string; task_queue: string | null; status: LTTaskStatus; priority: LTTaskPriority; signal_id: string; parent_workflow_id: string; origin_id: string | null; parent_id: string | null; started_at: Date; completed_at: Date | null; envelope: string; metadata: Record | null; error: string | null; milestones: LTMilestone[]; data: string | null; trace_id: string | null; span_id: string | null; /** User or bot that initiated this task. */ initiated_by: string | null; /** Principal type: 'user' or 'bot'. */ principal_type: string | null; /** Executing principal (bot external_id) when proxy invocation is used. */ executing_as: string | null; created_at: Date; updated_at: Date; } export interface LTMilestone { name: string; value: string | number | boolean | Record; created_at?: string; updated_at?: string; [key: string]: any; }