/** * Orchestration persistence models — Agent Run kernel. */ export type OrchestrationAgentRole = 'subtask' | 'worker' | 'researcher' | 'evaluator' | 'executor' | 'reviewer' | 'planner'; export type OrchestrationTaskPhase = string; export type OrchestrationRunStatus = 'open' | 'running' | 'waiting' | 'completed' | 'failed' | 'cancelled'; export type OrchestrationTaskStatus = 'pending' | 'assigned' | 'running' | 'waiting_result' | 'completed' | 'failed' | 'cancelled'; export type OrchestrationExecutorKind = 'local' | 'internal_room' | 'im_projection' | 'remote_mesh'; export type OrchestrationSceneKind = 'private' | 'group' | 'channel'; export interface OrchestrationSceneRef { platform: string; endpointId: string; sceneId: string; kind: OrchestrationSceneKind; senderId?: string; parent?: { kind: Extract; sceneId: string; }; } export type OrchestrationRunSource = { kind: 'im_scene'; scene: OrchestrationSceneRef; collaborationSceneId?: string; } | { kind: 'manual'; label?: string; }; export type OrchestrationRunEventType = 'run.started' | 'run.status_changed' | 'task.created' | 'task.assigned' | 'task.started' | 'task.thinking' | 'task.progress' | 'task.completed' | 'task.failed' | 'result.returned'; export declare const ORCHESTRATION_RUN_MODEL: { id: { type: "text"; nullable: boolean; }; session_key: { type: "text"; nullable: boolean; }; status: { type: "text"; default: string; }; title: { type: "text"; default: string; }; template: { type: "text"; default: string; }; source_json: { type: "text"; default: string; }; state_json: { type: "text"; default: string; }; state_version: { type: "integer"; default: number; }; created_at: { type: "integer"; default: number; }; updated_at: { type: "integer"; default: number; }; }; export declare const ORCHESTRATION_TASK_MODEL: { id: { type: "text"; nullable: boolean; }; run_id: { type: "text"; nullable: boolean; }; name: { type: "text"; nullable: boolean; }; description: { type: "text"; default: string; }; role: { type: "text"; default: string; }; goal: { type: "text"; default: string; }; status: { type: "text"; default: string; }; depends_on: { type: "text"; default: string; }; executor_kind: { type: "text"; default: string; }; assigned_to: { type: "text"; default: string; }; remote_agent_id: { type: "text"; default: string; }; remote_task_id: { type: "text"; default: string; }; priority: { type: "text"; default: string; }; context_json: { type: "text"; default: string; }; is_writer: { type: "integer"; default: number; }; phase: { type: "text"; default: string; }; result_summary: { type: "text"; default: string; }; error: { type: "text"; default: string; }; created_at: { type: "integer"; default: number; }; updated_at: { type: "integer"; default: number; }; started_at: { type: "integer"; nullable: boolean; }; finished_at: { type: "integer"; nullable: boolean; }; }; export declare const ORCHESTRATION_EVENT_MODEL: { id: { type: "text"; nullable: boolean; }; run_id: { type: "text"; nullable: boolean; }; task_id: { type: "text"; default: string; }; type: { type: "text"; nullable: boolean; }; seq: { type: "integer"; default: number; }; payload_json: { type: "text"; default: string; }; created_at: { type: "integer"; default: number; }; }; export interface OrchestrationRunRecord { id: string; session_key: string; status: OrchestrationRunStatus; title: string; template: string; source_json: string; state_json: string; state_version: number; created_at: number; updated_at: number; } export interface OrchestrationTaskRecord { id: string; run_id: string; name: string; description: string; role: OrchestrationAgentRole; goal: string; status: OrchestrationTaskStatus; depends_on: string; executor_kind: OrchestrationExecutorKind; assigned_to: string; remote_agent_id: string; remote_task_id: string; priority: string; context_json: string; is_writer: number; phase: OrchestrationTaskPhase; result_summary: string; error: string; created_at: number; updated_at: number; started_at: number | null; finished_at: number | null; } export interface OrchestrationEventRecord { id: string; run_id: string; task_id: string; type: OrchestrationRunEventType; seq: number; payload_json: string; created_at: number; } export interface CreateOrchestrationRunInput { session_key: string; title?: string; template?: string; source?: OrchestrationRunSource; state?: Record; } export interface CreateOrchestrationTaskInput { run_id: string; name: string; description?: string; role?: OrchestrationAgentRole; goal?: string; depends_on?: string[]; executor_kind?: OrchestrationExecutorKind; assigned_to?: string; remote_agent_id?: string; priority?: 'low' | 'medium' | 'high' | 'critical'; context?: Record; is_writer?: boolean; phase?: OrchestrationTaskPhase; } export interface CreateOrchestrationEventInput { run_id: string; task_id?: string; type: OrchestrationRunEventType; payload?: Record; } export declare function parseDependsOn(json: string): string[]; export declare function serializeDependsOn(ids: string[]): string; //# sourceMappingURL=orchestration-db-models.d.ts.map