import { type LaneSubmissionShortfall } from "./laneSubmissions.js"; /** * Always-materialized fan-out lanes (design resolution 2, 2026-08-05). * * A fan-out step never inlines lane work into its step prompt and never * branches on host capability: every lane's prompt is a FILE on disk and every * lane's submission is a FILE on disk, identical across IDEs/providers, so a run * is resumable and parallelizable regardless of who executes the lanes. Lane * prompt files are ADVANCE-FREE — the continue-command lives in the step * prompt, never inside a lane file, so no lane executor can become a second * orchestrator driver (the same property `prepareContractDispatch` pins for * design review). * * This is also the MINTING CHOKEPOINT: a lane declares an id and a prompt, and * the tool derives where the answer goes. A lane spec cannot name its own * result file, so a host-typed filename is not expressible here or in any * caller. * * K-of-N resume: a lane whose submission already exists at its bound path is * complete — its prompt is not rewritten and it is excluded from the pending * set, so a re-emitted step instructs only the missing lanes and never * regenerates or overwrites completed lane results. */ export interface FanoutLaneSpec { /** * Stable lane id — the `artifact_paths` key prefix AND the identity the * lane's submission path is derived from, so it must be unique across the * whole audit and stable across re-emissions of the same lane. */ id: string; /** Human label rendered into the step's lane list. */ label: string; /** Lane prompt filename under the tool-owned lane-asset dir. */ promptFilename: string; /** Advance-free lane prompt body (no continue-command). */ promptText: string; /** * False for a lane whose submission the TOOL never reads — a host-side * intermediate another lane consumes (the conceptual perspectives, which * only the judge reads). Its bound path is still minted, declared, and * rendered so the worker has a tool-named place to write; but nothing is * ever owed to the tool, so it is not an expected submission, appears in no * expected set, and produces no ledger expectation the run can never * satisfy. Defaults to true — a lane owes the tool a submission unless it * says otherwise. */ expected?: boolean; } export interface MaterializedFanoutLane { id: string; label: string; promptPath: string; /** Tool-computed bound path this lane's submission must land at. */ resultPath: string; /** True when the lane's submission already exists (K-of-N resume). */ resultExists: boolean; } export interface MaterializedFanout { lanes: MaterializedFanoutLane[]; /** Lanes still owed a submission — the only lanes the step instructs. */ pendingLanes: MaterializedFanoutLane[]; /** `_prompt` / `_results` entries for the step contract. */ artifactPaths: Record; /** Pending lanes' prompt paths (step `access.read_paths`). */ readPaths: string[]; /** Pending lanes' bound submission paths (step `access.write_paths`). */ writePaths: string[]; /** * What a PREVIOUS emission of these lanes is still owed — empty on a first * emission. Rendered into the re-emitted step prompt and persisted on the * step contract so a dropped lane is reported by name instead of showing up * as the same step arriving twice. */ shortfall: LaneSubmissionShortfall; } /** Heading of the one results-path section any lane prompt carries. */ export declare const LANE_RESULTS_HEADING = "## Results path"; /** * The alternative that makes the write imperative SATISFIABLE by any executor. * * The write instruction itself is not negotiable — the bound path is what the * tool's submission reader consumes, so a lane that quietly answers somewhere * else has not answered. But a lane may be executed by a worker with no file * write at all, and ordering it to write a file it cannot write leaves it no * sanctioned way to deliver its answer: it improvises, and the run reports a * lane that "submitted nothing". Stating the fallback keeps the bound path the * destination while making the delivery reachable from every lane class. */ export declare const LANE_RESULT_FALLBACK_SENTENCE: string; /** * The results-path section every materialized lane prompt ends with. * * Minted HERE, at the same chokepoint that derives the bound path, for the same * reason the path is: a per-emitter copy is a second place the path, the write * instruction, and the fallback can drift apart — and the conceptual lanes had * already drifted, telling their worker the path was "provided below" when * nothing was appended below at all. */ export declare function renderLaneResultsFooter(resultPath: string): string; /** * Write the pending lanes' prompt files, record what the emission owes, and * describe the whole fan-out. */ export declare function materializeFanoutLanes(params: { artifactsDir: string; /** * The scope the lane submissions belong to. Audit gate emitters pass * `AUDIT_GATE_SUBMISSION_SCOPE` — see `laneSubmissions.ts` for why the gates * have no run id of their own. */ runId: string; lanes: FanoutLaneSpec[]; }): Promise; //# sourceMappingURL=fanoutLanes.d.ts.map