import { type TeamWorkerCli } from './tmux-session.js'; import { type TeamConfig, type WorkerHeartbeat, type WorkerStatus, type TeamTask } from './team-ops.js'; import { type TeamPhase, type TerminalPhase } from './orchestrator.js'; import { TEAM_LOW_COMPLEXITY_DEFAULT_MODEL, type TeamReasoningEffort } from './model-contract.js'; import { resolveCanonicalTeamStateRoot } from './state-root.js'; import { type WorktreeMode } from './worktree.js'; /** Snapshot of the team state at a point in time */ export interface TeamSnapshot { teamName: string; phase: TeamPhase | TerminalPhase; workers: Array<{ name: string; alive: boolean; status: WorkerStatus; heartbeat: WorkerHeartbeat | null; assignedTasks: string[]; turnsWithoutProgress: number; }>; tasks: { total: number; pending: number; blocked: number; in_progress: number; completed: number; failed: number; items: TeamTask[]; }; allTasksTerminal: boolean; deadWorkers: string[]; nonReportingWorkers: string[]; recommendations: string[]; performance?: { list_tasks_ms: number; worker_scan_ms: number; mailbox_delivery_ms: number; total_ms: number; updated_at: string; }; } /** Runtime handle returned by startTeam */ export interface TeamRuntime { teamName: string; sanitizedName: string; sessionName: string; config: TeamConfig; cwd: string; } interface ShutdownOptions { force?: boolean; } export interface TeamStartOptions { worktreeMode?: WorktreeMode; } type WorkerStartupEvidence = 'task_claim' | 'worker_progress' | 'leader_ack' | 'none'; export declare function waitForWorkerStartupEvidence(params: { teamName: string; workerName: string; workerCli: TeamWorkerCli; cwd: string; timeoutMs?: number; pollMs?: number; }): Promise; export declare function waitForClaudeStartupEvidence(params: { teamName: string; workerName: string; cwd: string; timeoutMs?: number; pollMs?: number; }): Promise; export { TEAM_LOW_COMPLEXITY_DEFAULT_MODEL }; export { resolveCanonicalTeamStateRoot }; export declare function resolveWorkerLaunchArgsFromEnv(env: NodeJS.ProcessEnv, agentType: string, inheritedLeaderModel?: string, preferredReasoning?: TeamReasoningEffort, workerCliOverride?: TeamWorkerCli): string[]; /** * Start a new team: init state, create tmux session, bootstrap workers. */ export declare function startTeam(teamName: string, task: string, agentType: string, workerCount: number, tasks: Array<{ subject: string; description: string; owner?: string; blocked_by?: string[]; role?: string; }>, cwd: string, options?: TeamStartOptions): Promise; /** * Monitor team state by polling files. Returns a snapshot. */ export declare function monitorTeam(teamName: string, cwd: string): Promise; /** * Assign a task to a worker by writing inbox and sending trigger. */ export declare function assignTask(teamName: string, workerName: string, taskId: string, cwd: string): Promise; /** * Reassign a task from one worker to another. */ export declare function reassignTask(teamName: string, taskId: string, _fromWorker: string, toWorker: string, cwd: string): Promise; /** * Graceful shutdown: send shutdown inbox to all workers, wait, force kill, cleanup. */ export declare function shutdownTeam(teamName: string, cwd: string, options?: ShutdownOptions): Promise; /** * Resume monitoring an existing team. */ export declare function resumeTeam(teamName: string, cwd: string): Promise; export declare function sendWorkerMessage(teamName: string, fromWorker: string, toWorker: string, body: string, cwd: string): Promise; export declare function broadcastWorkerMessage(teamName: string, fromWorker: string, body: string, cwd: string): Promise; //# sourceMappingURL=runtime.d.ts.map