import type { Draft } from '@manehorizons/cadence-types'; import type { ProgressJson } from '../gates/types.js'; export interface Wave { wave: number; taskIds: string[]; } /** * Computes wave-based dispatch groups from a DRAFT's task list. * * A single unified topological leveling pass over a combined prerequisite * graph: real `depends:` edges (a dependency already terminal is treated * as satisfied — dropped, not blocking) PLUS a synthetic prerequisite edge * from every earlier-declared remaining task to every later-declared one * that shares a `files:` entry (an implicit "must come after" edge, same * direction as declaration order). Levels are computed once, over BOTH * edge kinds together — NOT depends: leveling followed by a separate * files: veto pass. A two-pass design (level by depends:, then bump * files:-colliding tasks into whatever bucket happens to already exist at * the next index) can silently place a task in the same wave as — or even * ahead of — another task that depends on it, once a files: bump lands it * in a bucket some *unrelated* task already populated for a different * reason. Unifying both constraints into one leveling pass makes that * failure mode structurally impossible: a task's level is always strictly * greater than every one of its real-or-synthetic prerequisites', full * stop. Pure, synchronous, no I/O. */ export declare function computeWaves(draft: Draft, progress: ProgressJson): Wave[]; //# sourceMappingURL=wave-planner.d.ts.map