/** * DAG validation and scheduling for intra-group agent dependencies. * * Pure functions — no singletons, no I/O, no Phase 1 dependencies. * Uses Kahn's algorithm for topological sort and cycle detection. */ import type { AgentSpec, DagNode, DagValidationResult } from './types.js'; /** * Validate the intra-group DAG: unique aliases, valid references, no cycles. * Returns topological order on success. */ export declare function validateDag(agents: AgentSpec[]): DagValidationResult; /** * Topological sort via Kahn's algorithm. * Returns sorted aliases (dependency order) or null if a cycle exists. */ export declare function topologicalSort(edges: Map): string[] | null; /** * Compute the set of agent aliases that are ready to transition * from 'pending' to 'queued'. * * Ready = agent is 'pending' AND all its dependencies are 'done_success'. */ export declare function computeReadySet(nodes: DagNode[]): string[]; /** * Compute the set of agent aliases that should be blocked. * * Blocked = agent is 'pending' AND any dependency is in a terminal * failure state (done_failed, blocked, timed_out). */ export declare function computeBlockedSet(nodes: DagNode[]): string[]; //# sourceMappingURL=dag.d.ts.map