/** * Shared lifecycle owner for one serialized, persistent child process. * * Wire protocols, state projection, and respawn policy stay with their concrete shell adapters. * This boundary owns only the invariant OS mechanics: one active task, one current child, every * outstanding child terminal, stale event rejection, exit/close arbitration, whole-tree kill, * loop references, and parent exit. */ import type { ChildProcess } from "node:child_process"; export interface PersistentChildHandlers { onStdout(data: Buffer): void; onStderr(data: Buffer): void; onError(error: Error): void; onClose(code: number | null): void; } export declare class PersistentProcessCoordinator { private currentChild; private readonly pendingChildTerminals; private queue; private disposed; constructor(); get child(): ChildProcess | null; get terminalPromise(): Promise; runSerialized(task: () => Promise): Promise; attach(child: ChildProcess, handlers: PersistentChildHandlers): void; kill(): void; private terminateChild; dispose(): void; /** Synchronous best-effort tree kill for the process exit hook. */ killForProcessExit(): void; /** Idle coordinators must not keep one-shot Node modes alive; active commands must. */ setLoopRef(active: boolean): void; private waitForTerminalRelease; private trackTerminal; private clear; } //# sourceMappingURL=persistent-process-coordinator.d.ts.map