import type { ChildProcess } from 'child_process';
/** Minimal signal-source surface: the global `process` in production, a fake in tests. */
type SignalSource = Pick<NodeJS.EventEmitter, 'on' | 'removeListener'> & {
    listeners?: (eventName: string | symbol) => Function[];
};
export interface SuperviseChildOptions {
    /** Delay before escalating an unresponsive child from its first signal to SIGKILL. */
    forceKillMs?: number;
    /** Signal source to listen on. Defaults to the global `process`; injectable for tests. */
    signals?: SignalSource;
}
/**
 * Forward SIGINT/SIGTERM from this process to `child`, escalating to SIGKILL on a
 * repeat signal or after a timeout, and resolve with the child's mapped exit code.
 *
 * Without this, killing the parent `adk run` process by PID (e.g. a headless harness
 * or `pkill -f "adk run"`, which matches the parent argv but not the child's
 * `bun … script-runner.ts`) leaves the spawned child orphaned (reparented to PID 1)
 * and still running. While supervising, this temporarily owns SIGINT/SIGTERM so
 * global cleanup handlers cannot convert an interrupted run into exit code 0.
 */
export declare function superviseChild(child: ChildProcess, options?: SuperviseChildOptions): Promise<number>;
export {};
//# sourceMappingURL=supervise-child.d.ts.map