export interface GraphNode { id: string; dependencies: string[]; } /** * Dependency-first order that preserves input order whenever multiple nodes * are ready. Dependencies that do not exist in the graph are ignored here; * validation reports them separately as blockers. */ export declare function stableTopologicalOrder(nodes: T[]): T[]; /** * The same dependency-first ordering as {@link stableTopologicalOrder}, but * grouped into levels: every node in a level has all of its known * dependencies satisfied by an earlier level, so a whole level can be * processed concurrently. * * Authoring uses this instead of the flat order because a flat fan-out * authors dependent workstreams in isolation from each other, and two * specs written that way disagree about the interface between them. Walking * levels lets each author read the finished specs of what it depends on, * while independent workstreams still run at the same time — only genuine * dependency chains serialize. * * Input order is preserved within each level, matching the stable ordering's * behavior. Dependencies outside the graph are ignored here; validation * reports them separately as blockers. */ export declare function topologicalLevels(nodes: T[]): T[][]; export declare function findCycles(nodes: GraphNode[]): string[][]; //# sourceMappingURL=graph.d.ts.map