/**
 * CANT workflow executor — orchestrates workflow statement execution.
 *
 * Walks the statement list of a `WorkflowDef` AST node, dispatching to
 * appropriate handlers for each statement type: sessions, pipelines,
 * parallel blocks, conditionals, loops, try/catch, approval gates,
 * bindings, directives, and output statements.
 *
 * Pipelines are delegated to the Rust executor via napi-rs bridge.
 * Sessions invoke the CLEO session machinery. Discretion conditions
 * are evaluated by a pluggable evaluator.
 *
 * @see docs/specs/CANT-DSL-SPEC.md Section 7.2 (Workflow Execution)
 */
import { ApprovalManager } from './approval.js';
import type { DiscretionEvaluator } from './discretion.js';
import type { ExecutionResult } from './types.js';
/** Configuration options for the workflow executor. */
export interface WorkflowExecutorConfig {
    /** Maximum number of discretion evaluations per workflow run (default: 100). */
    maxDiscretionEvaluations?: number;
    /** The session ID for this execution. */
    sessionId?: string;
    /** The agent ID performing the execution. */
    agentId?: string;
}
/** Loose AST statement shape — mirrors cant-core Statement variants. */
interface AstStatement {
    type?: string;
    [key: string]: unknown;
}
/** A workflow definition with a name, params, and body statements. */
interface WorkflowDef {
    name: {
        value: string;
    };
    params: Array<{
        name: {
            value: string;
        };
    }>;
    body: AstStatement[];
}
/**
 * Executes CANT workflow definitions.
 *
 * The executor processes each statement in the workflow body sequentially,
 * maintaining an execution scope for variable bindings and dispatching to
 * the appropriate handler based on statement type.
 */
export declare class WorkflowExecutor {
    private readonly discretionEvaluator;
    private readonly approvalManager;
    private readonly config;
    /**
     * Creates a new workflow executor.
     *
     * @param discretionEvaluator - Custom discretion evaluator (default: stub that returns true).
     * @param approvalManager - Approval token manager (default: new instance).
     * @param config - Executor configuration.
     */
    constructor(discretionEvaluator?: DiscretionEvaluator, approvalManager?: ApprovalManager, config?: WorkflowExecutorConfig);
    /**
     * Executes a workflow definition with the given parameter values.
     *
     * @param workflow - The parsed workflow AST node.
     * @param context - Parameter values and initial context.
     * @returns Execution result with outputs and step results.
     */
    execute(workflow: WorkflowDef, context?: Record<string, unknown>): Promise<ExecutionResult>;
    /**
     * Dispatches a single statement to the appropriate handler.
     */
    private executeStatement;
    /** Execute a let binding statement. */
    private executeBinding;
    /** Execute an output binding statement. */
    private executeOutput;
    /** Execute an if/elif/else conditional. */
    private executeConditional;
    /** Execute a parallel block with arms. */
    private executeParallelBlock;
    /** Execute a session invocation (stub — real session dispatch is a separate integration). */
    private executeSession;
    /** Execute a pipeline definition (stub — real pipeline calls Rust via napi-rs). */
    private executePipeline;
    /** Execute an approval gate. */
    private executeApprovalGate;
    /** Execute a repeat N loop. */
    private executeRepeat;
    /** Execute a for-in loop. */
    private executeForLoop;
    /** Execute a loop-until block. */
    private executeLoopUntil;
    /** Execute a try/catch/finally block. */
    private executeTryCatch;
    /** Execute a CANT directive statement. */
    private executeDirective;
    /**
     * Evaluate a condition (regular expression or discretion).
     */
    private evaluateCondition;
}
export {};
//# sourceMappingURL=workflow-executor.d.ts.map