(id: string, deps: string[] = [], targetFiles: string[] = [`${id}.ts`])
| 5 | import type { TaskGraph, TaskNode, WorkerResult, QaVerdict } from '../src/orchestration/protocol.js'; |
| 6 | |
| 7 | function node(id: string, deps: string[] = [], targetFiles: string[] = [`${id}.ts`]): TaskNode { |
| 8 | return { |
| 9 | id, kind: 'generic', title: id, instruction: `build ${id}`, |
| 10 | targetFiles, contextFiles: [], dependsOn: deps, |
| 11 | status: 'pending', attempts: 0, |
| 12 | }; |
| 13 | } |
| 14 | |
| 15 | function graphOf(...nodes: TaskNode[]): TaskGraph { |
| 16 | const map = new Map(nodes.map(n => [n.id, n])); |