/** * The `--from-dag` path of `peaks sub-agent dispatch`. * * Pulled out of `dispatch-commands.ts` to honor the file-size cap (Karpathy #2 * Simplicity First). The single-dispatch action stays in `dispatch-commands.ts`; * the DAG-dispatch path lives here because the two share no logic — the * warm-path single dispatch does NOT load slice-dag / dag-orchestrator / * contract-store (slice 9 perf), while the `--from-dag` codepath loads all * three on first call. * * 2.7.0 slice-dag-dispatcher MVP: read a SliceDag from a file and run it * through `runLayeredDag`. The orchestrator's `runSlice` is a thin wrapper * that emits the per-IDE `buildToolCall` envelope for each topological level. * * 1.2 MVP scope: this dispatches the FIRST topological level synchronously * (returns the dispatch specs); subsequent levels are not surfaced in the CLI * envelope because the LLM-side runner must actually execute each * `buildToolCall` and write the resulting contract before level 2+ can be * safely auto-advanced. The LLM re-invokes `peaks sub-agent dispatch --from-dag * --batch-id ` after writing level-1 contracts, which causes * `runLayeredDag` to plan level 2+ with the level-1 ancestor contracts spliced * into their dispatch prompts. * * Internally, `runLayeredDag` DOES iterate all levels so its join-barrier + * cancel-on-fail path is exercised end-to-end during the MVP emit; only the * CLI envelope is filtered to level-1 toolCalls (see `firstLevelIds`). */ import { type ProgramIO } from '../cli-helpers.js'; import { type DispatchOptions } from './sub-agent-shared.js'; export declare function runDispatchFromDag(role: string, options: DispatchOptions, asJson: boolean, io: ProgramIO): Promise;