import type { ApprovalPolicy, RunResult, RunState, TaskRunner, TaskResult } from "../contracts/orchestration.js";
import type { EnvMergeTraceEntry, EnvMergeTraceSource } from "../contracts/worker-context.js";
import type { Dag, DagNode } from "../orchestration/dag.js";
import type { EnsemblePolicy } from "../orchestration/ensemble.js";
import { type StatePersister } from "../orchestration/state-persister.js";
export interface ExecuteHarnessRunInput {
    root: string;
    runId: string;
    dag: Dag;
    runner: TaskRunner;
    env?: Record<string, string>;
    workers: number;
    approvalPolicy: ApprovalPolicy;
    timeoutPreset?: string;
    nodeTimeoutMs?: number;
    runTimeoutMs?: number;
    heartbeatIntervalMs?: number;
    signal?: AbortSignal;
    persister?: StatePersister;
    eventRunDir?: string;
    ensemble?: false | EnsemblePolicy;
    resumeFromState?: RunState;
    onStateChange?: (state: RunState) => void;
    onNodeStart?: (node: DagNode) => void;
    onNodeComplete?: (node: DagNode, result: TaskResult) => void;
}
export declare function mergeEnvWithTrace(sources: Array<{
    source: EnvMergeTraceSource;
    env: Record<string, string>;
}>): {
    env: Record<string, string>;
    trace: EnvMergeTraceEntry[];
};
export declare function executeHarnessRun(input: ExecuteHarnessRunInput): Promise<RunResult>;
