/** * Topological sort utility using Kahn's algorithm. * Supports cycle detection and priority-based tiebreaking. */ export interface ToposortInput { id: string; dependsOn?: string[]; priority?: "critical" | "high" | "medium" | "low"; } /** * Returns task IDs in valid topological order. * Uses priority as tiebreaker when multiple tasks have zero in-degree. * Throws if a cycle is detected. */ export declare function toposort(tasks: ToposortInput[]): string[]; /** * Returns the cycle path (array of IDs) if a cycle exists, or null if acyclic. * Uses DFS with coloring to find the actual cycle. */ export declare function detectCycle(tasks: ToposortInput[]): string[] | null; //# sourceMappingURL=toposort.d.ts.map