import { type Dag, type DagNode } from "./dag.js";
export declare class TaskDagGraph {
    private readonly nodeById;
    private readonly predecessorIds;
    private readonly successorIds;
    private readonly order;
    private readonly criticalPathDepthCache;
    private readonly downstreamCountCache;
    private topologicalIds?;
    constructor(nodes: DagNode[]);
    getNode(id: string): DagNode | undefined;
    predecessors(id: string): DagNode[];
    successors(id: string): DagNode[];
    topologicalOrder(): DagNode[];
    runnableNodes(): DagNode[];
    private isRequiredReadinessDependency;
    private computeTopologicalIds;
    private _findCycleRaw;
    findCycle(): string[];
    findAllCycles(limit?: number): string[][];
    getCriticalPathDepth(id: string): number;
    private compareOrder;
    private compareRunnable;
    private runnableScore;
    private criticalPathDepth;
    private downstreamCount;
}
export declare function getTaskDagGraph(dag: Dag): TaskDagGraph;
export declare function invalidateTaskDagGraph(dag: Dag): void;
