/** * Task graph operations - dependency waves, ordering, and critical path. * Ported from lib/tasks/graph-ops.sh * * @epic T4454 * @task T4529 */ import type { Task } from '@cleocode/contracts'; /** A wave of parallelizable tasks. */ export interface DependencyWave { wave: number; taskIds: string[]; } /** * Compute dependency waves for parallel execution. * Tasks in the same wave can run in parallel; waves must be sequential. */ export declare function computeDependencyWaves(tasks: Task[]): DependencyWave[]; /** * Get the next task to work on: an active task first, else the best-ranked * ready task under THE comparator (D11161, T12692). * * @param tasks - The task population. * @returns The next task, or null. */ export declare function getNextTask(tasks: Task[]): Task | null; /** * Calculate the critical path (longest dependency chain). * Returns task IDs along the critical path. */ export declare function getCriticalPath(tasks: Task[]): string[]; /** * Get task ordering: topological, or THE comparator's order on a cycle. * * @param tasks - Tasks to order. * @returns Task ids in order. */ export declare function getTaskOrder(tasks: Task[]): string[]; /** * Get parallelizable tasks (tasks with no unmet dependencies). */ export declare function getParallelTasks(tasks: Task[]): string[]; //# sourceMappingURL=graph-ops.d.ts.map