/** * spawn-runner — connects RunHandleImpl to a real Node.js subprocess. * * Responsibilities: * - spawn the agent process via node:child_process * - register with ProcessTracker for zombie prevention * - pipe stdout/stderr through StreamAssembler + adapter.parseEvent * - wire stdin for InteractionChannel responses * - enforce timeout / inactivityTimeout * - translate child exit into RunHandleImpl.complete() * - support retry policy for transient failure codes */ import type { AgentAdapter } from './adapter.js'; import type { RunOptions } from './run-options.js'; import { RunHandleImpl } from './run-handle-impl.js'; export { buildInvocationCommand, type InvocationCommand, type InvocationCommandWithCleanup, type K8sCleanup } from './spawn-invocation.js'; /** * Start the spawn loop for the given handle. Returns immediately; all work * happens asynchronously. Errors bubble up through handle events + complete(). */ export declare function startSpawnLoop(handle: RunHandleImpl, adapter: AgentAdapter, options: RunOptions): void;