export type SwarmTaskStatus = 'todo' | 'in_progress' | 'done' | 'blocked' | 'archived'; export interface SwarmTaskEvidence { commits?: string[]; tests?: string[]; prs?: string[]; } export interface SwarmTask { id: string; title: string; status: SwarmTaskStatus; depends_on: string[]; created_at: string; updated_at: string; created_by?: string; claimed_by?: string; claimed_at?: string; claim_reason?: string; completed_by?: string; completed_at?: string; summary?: string; evidence?: SwarmTaskEvidence; blocked_reason?: string; blocked_by?: string; attempt_count: number; channel?: string; archived_at?: string; progress_log?: Array<{ timestamp: string; agent: string; message: string }>; } export interface SwarmTaskCreateInput { title: string; content?: string; dependsOn?: string[]; createdBy?: string; channel?: string; } export interface SwarmSummary { total: number; todo: number; in_progress: number; done: number; blocked: number; } export type WorkerPhase = | 'starting' | 'reading_rules' | 'coordinating' | 'claiming' | 'implementing' | 'testing' | 'reviewing' | 'committing' | 'finishing' | 'blocked' | 'idle'; export interface SpawnRequest { role?: string; persona?: string; objective?: string; message?: string; // Alias for objective context?: string; model?: string; // 'inherit' or 'provider/model' — validated through Pi name?: string; agentFile?: string; // Path to markdown file (with YAML frontmatter) to use as system prompt } export interface SpawnedAgent { id: string; cwd: string; name: string; role: string; model?: string; actualModel?: string; persona?: string; objective: string; context?: string; systemPrompt?: string; status: 'running' | 'completed' | 'failed' | 'stopped'; poolId?: string; phase?: WorkerPhase; currentBeadId?: string; statusMessage?: string; agentMailName?: string; lastProgressAt?: string; startedAt: string; endedAt?: string; exitCode?: number; error?: string; sessionId?: string; pid?: number; }