import { EventEmitter } from 'node:events';
export interface BashExecutionState {
    executionId: string;
    command: string;
    outputPreview: string;
    fullOutput: string;
    stderr: string;
    isComplete: boolean;
    exitCode: number | null;
    error: string | null;
}
export declare class BashExecutor extends EventEmitter {
    private executions;
    execute(command: string, options?: {
        timeoutMs?: number;
        signal?: AbortSignal;
    }): {
        executionId: string;
        promise: Promise<BashExecutionState>;
    };
    cancel(executionId: string, reason?: string): boolean;
    /**
     * Terminate a spawned command and its descendants.
     *
     * On Unix the child is spawned `detached`, so it leads its own process
     * group; signalling the negative PID reaches the whole group (the command
     * plus anything it spawned). Windows has no process groups here, so we fall
     * back to killing the single process.
     */
    private killProcessTree;
    getState(executionId: string): BashExecutionState | undefined;
    hasActiveExecutions(): boolean;
    getActiveExecutionIds(): string[];
}
export declare const bashExecutor: BashExecutor;
//# sourceMappingURL=bash-executor.d.ts.map