import type { SubAgentDispatcher, SubAgentToolCall } from '../../services/dispatch/sub-agent-dispatcher.js'; import type { SliceDag } from '../../services/dispatch/slice-dag.js'; import type { DispatchSpec, SliceOutcome } from '../../services/code/dag-orchestrator.js'; import type { SliceContract, WriteContractInput } from '../../services/dispatch/contract-store.js'; /** What the CLI runner collected while `runLayeredDag` walked the levels. */ export type DagEmissions = { readonly toolCalls: SubAgentToolCall[]; readonly sliceIds: string[]; }; /** The resolved IDE + sub-agent dispatcher the `--from-dag` path runs on. */ export type DagDispatcher = { readonly ide: string; readonly dispatcher: SubAgentDispatcher; }; /** Detect the IDE and resolve its sub-agent dispatcher. */ export declare function resolveDagDispatcher(projectRoot: string): DagDispatcher; /** * When every first-level node declares `files`, refine the level into * file-overlap waves so the LLM fans out without serializing on a shared * file. Emitted additively; nodes without `files` yield `null` (legacy * envelope). */ export declare function planFirstLevelWaves(dag: SliceDag, levelArr: readonly (readonly string[])[]): readonly import("../../services/dispatch/file-overlap-wave-planner.js").FileOverlapWave[] | null; /** * The CLI runner: emit the per-slice `buildToolCall` descriptor for the first * topological level, then return `done`. * * Returning `done` (not `cancelled`) exercises `runLayeredDag`'s join barrier * and cancel-on-fail path end to end; the placeholder `publicSurface` is * intentionally empty because the real surface arrives later via * `peaks contract write`. */ export declare function makeCliRunner(args: { firstLevelIds: ReadonlySet; dispatcher: SubAgentDispatcher; ids: { readonly rid: string; readonly sid: string; readonly projectRoot: string; }; emissions: DagEmissions; }): (spec: DispatchSpec) => Promise; /** * Placeholder contract writer. The CLI writes nothing to disk here — the * LLM-side runner does that via `peaks contract write` — but the returned * placeholder must stay shape-valid: `contractHash` has to be a real SHA-256 * hex string computed from the slice identity (`sliceId|sessionId`). */ export declare function makeNoopWriter(hashContract: (partial: WriteContractInput) => string, sid: string): (sliceId: string) => SliceContract;