/**
 * Directed Acyclic Graph (DAG) utilities
 * Used to analyze and order workflow steps based on dependencies
 */
import { Step } from '../types/workflow';
export interface DAGNode {
    id: string;
    step: Step;
    dependencies: string[];
    dependents: string[];
}
export declare class DAG {
    private nodes;
    constructor();
    /**
     * Add a step to the DAG
     */
    addStep(step: Step): void;
    /**
     * Build the complete DAG from steps
     */
    build(steps: Step[]): void;
    /**
     * Detect circular dependencies using DFS
     */
    private detectCycles;
    /**
     * Get topologically sorted steps (dependencies first)
     */
    topologicalSort(): Step[];
    /**
     * Get steps that have no dependencies (entry points)
     */
    getEntryPoints(): Step[];
    /**
     * Get steps that have no dependents (exit points)
     */
    getExitPoints(): Step[];
    /**
     * Get all steps that depend on a given step
     */
    getDependents(stepId: string): Step[];
    /**
     * Get all steps that a given step depends on
     */
    getDependencies(stepId: string): Step[];
    /**
     * Get execution levels (steps that can run in parallel)
     */
    getExecutionLevels(): Step[][];
    /**
     * Get the node for a step
     */
    getNode(stepId: string): DAGNode | undefined;
    /**
     * Get all nodes
     */
    getAllNodes(): DAGNode[];
}
//# sourceMappingURL=dag.d.ts.map