/** * CodexProcessRunner — owns the lifecycle of one codex child process. * * Responsibilities: * - Spawn the codex process * - Line-buffer stdout for JSONL parsing * - Filter stderr noise * - Emit normalized events via callbacks * - Deterministic cleanup: SIGTERM → grace → SIGKILL → remove listeners * * Single-use: one runner per task, created once, not reused. */ import { type ProcessState, type SpawnOptions, type ProcessCallbacks, type ProcessExitInfo, type ProcessHandle } from './types.js'; export declare class CodexProcessRunner { private child; private _state; private stdoutBuffer; private readonly killGraceMs; private readonly callbacks; private exitPromise; private exitResolve; private wasKilledByUs; constructor(callbacks: ProcessCallbacks, killGraceMs?: number); get state(): ProcessState; /** * Spawn the codex process. Returns a ProcessHandle for PID access * and kill control. */ spawn(options: SpawnOptions): ProcessHandle; /** * Kill the process deterministically. * SIGTERM → wait grace period → SIGKILL → wait for exit. */ kill(): Promise; /** * Wait for the process to exit naturally. */ waitForExit(): Promise; private onStdout; private onStderr; private onClose; private onError; /** * Remove all listeners from the child process. */ private removeListeners; } //# sourceMappingURL=runner.d.ts.map