import type { ActiveRunSnapshot, CommandInvocation, CommandRunner, CoordinatorResult, LifecycleEvent, LocalCoordinatorApi, LocalCoordinatorFactoryOptions, LocalCoordinatorOptions, RunLaunchHandle, RunRequest } from './types.js';
export declare class ProcessCommandRunner implements CommandRunner {
    run(command: string, args: string[], options: {
        cwd: string;
        env?: Record<string, string>;
    }): CommandInvocation;
}
export declare function createLocalCoordinator(options?: LocalCoordinatorFactoryOptions): LocalCoordinator;
export declare class LocalCoordinator implements LocalCoordinatorApi {
    private readonly runner;
    private readonly emitter;
    private readonly activeRuns;
    private readonly completedRuns;
    private readonly runResultWaiters;
    private readonly completedRunLimit;
    constructor(runner: CommandRunner, options?: LocalCoordinatorOptions);
    start(request: RunRequest): RunLaunchHandle;
    launch(request: RunRequest): Promise<CoordinatorResult>;
    on(event: 'lifecycle', cb: (event: LifecycleEvent) => void): void;
    off(event: 'lifecycle', cb: (event: LifecycleEvent) => void): void;
    monitor(runId?: string): AsyncIterable<LifecycleEvent>;
    cancel(runId: string): void;
    getActiveRun(runId: string): ActiveRunSnapshot | undefined;
    listActiveRuns(): ActiveRunSnapshot[];
    getRunResult(runId: string): CoordinatorResult | undefined;
    listRunResults(): CoordinatorResult[];
    waitForRunResult(runId: string): Promise<CoordinatorResult | undefined>;
    private recordCompletedRun;
    private resolveRunResultWaiters;
}
