/** * Stage Router — core routing logic for stage advancement. * Evaluates the stage graph DAG and determines next stage based on gate verdict. * (arc42 §5.1, spec §FR-01) */ import type { GateVerdict, StageId } from '../types/index.js'; import { StageGraph } from './stage-graph.js'; /** Router that advances stages based on gate verdicts and a flow graph. */ export declare class StageRouter { private graph; constructor(graph?: StageGraph); /** * Determine the next stage given current stage and gate verdict. * * - If verdict.conclusion !== 'passed', returns null (stay at current stage). * - Otherwise, evaluates outgoing edges. First matching conditional edge wins. * If no conditional edge matches, the first unconditional edge is used. * - Returns null if no valid transition exists (terminal stage). */ advance(currentStage: StageId, verdict: GateVerdict): StageId | null; /** Replace the current graph (for custom flow registration). */ setGraph(graph: StageGraph): void; /** Get the current graph. */ getGraph(): StageGraph; } //# sourceMappingURL=stage-router.d.ts.map