/** * Cole-pattern orchestrator stub (plan + handoff). * Not a live runner. Live implementer work goes through `devin`. * Planning card writes stay on the planning adapter (storage stub unless github is wired). */ import type { AgentRunner, AgentStartResult, AgentStatusResult, AgentTask, } from './types.ts' const runs = new Map() export const coleOrchestrator: AgentRunner = { id: 'cole-orchestrator', displayName: 'Cole orchestrator stub (plan only, non-live)', capabilities: ['plan', 'review'], onComplete: { mode: 'poll', pollIntervalMs: 60_000 }, async start(task: AgentTask): Promise { const runId = `cole_stub_${crypto.randomUUID().replace(/-/g, '').slice(0, 12)}` const at = new Date().toISOString() runs.set(runId, { task, state: 'succeeded', at, }) return { runId } }, async status(runId: string): Promise { const row = runs.get(runId) if (!row) return { state: 'unknown', summary: 'cole stub run not found' } return { state: row.state, updatedAt: row.at, summary: `stub plan workItem=${row.task.workItemId} project=${row.task.projectId}`, } }, async cancel(runId: string): Promise { const row = runs.get(runId) if (row) { row.state = 'cancelled' row.at = new Date().toISOString() } }, }