import type { DAGGraph } from '../types/dag.js';
import type { NodeResult } from '../store/types.js';
export interface ExecutorCallbacks {
    onNodeStart: (nodeId: string) => void;
    onNodeComplete: (nodeId: string, result: NodeResult) => void;
    onNodeSkip: (nodeId: string, reason: string) => void;
    onNodeFail: (nodeId: string, error: string, retryCount?: number) => void;
    onNodeReset?: (nodeId: string) => void;
}
export interface ExecutorOptions {
    delayFn?: (ms: number) => Promise<void>;
}
export interface ResolvedNode {
    nodeId: string;
    description?: string;
    prompt: string;
    skill?: string;
    model?: string;
}
export interface CompletedResult {
    nodeId: string;
    output: string;
    structuredOutput?: Record<string, unknown>;
}
export interface StepResult {
    type: 'needs_ai' | 'done' | 'failed';
    nodes?: ResolvedNode[];
    results?: Record<string, NodeResult>;
    error?: string;
}
export interface StepInput {
    args?: string;
    artifactsDir?: string;
    completedResults?: CompletedResult[];
}
export declare class DAGExecutor {
    private readonly workspaceCwd;
    private readonly projectPath;
    private readonly graph;
    private readonly callbacks;
    private pending;
    private completed;
    private failed;
    private skipped;
    private inFlight;
    private nodeResults;
    private runner;
    private args;
    private artifactsDir;
    private initialized;
    private inputsValidated;
    private retryCounts;
    private ancestorCache;
    private readonly delayFn;
    private outputsMapCache;
    private outputsMapDirty;
    private yieldTimestamps;
    constructor(workspaceCwd: string, projectPath: string, graph: DAGGraph, callbacks: ExecutorCallbacks, options?: ExecutorOptions);
    static fromRecoveredState(workspaceCwd: string, projectPath: string, graph: DAGGraph, callbacks: ExecutorCallbacks, state: {
        pending: Set<string>;
        completed: Set<string>;
        failed: Set<string>;
        skipped: Set<string>;
        nodeResults: Record<string, NodeResult>;
        retryCounts: Map<string, number>;
        args: string;
        artifactsPath: string;
    }, options?: ExecutorOptions): DAGExecutor;
    step(input?: StepInput): Promise<StepResult>;
    private findReadyNodes;
    private resetNode;
    private markOutputsDirty;
    private buildOutputsMap;
    private getAncestors;
    clearResults(): void;
    getNodeSummaries(): Record<string, {
        status: string;
        durationMs?: number;
        startedAt?: string;
        completedAt?: string;
        outputPreview?: string;
    }>;
    private buildScopedOutputsMap;
    private buildContext;
}
//# sourceMappingURL=dag-executor.d.ts.map