export declare function spawnWithStdin(cmd: string, args: string[], prompt: string, opts: { timeout: number; cwd?: string; env?: NodeJS.ProcessEnv; }): Promise; export type SpawnStreamingOpts = { cmd: string; args: string[]; cwd: string; env: NodeJS.ProcessEnv; /** Written to stdin then closed. */ stdin: string; /** Wall-clock kill budget. Child receives SIGKILL on expiry. */ timeoutMs: number; /** AbortSignal — child receives SIGKILL when aborted (Node native, no grace). */ signal?: AbortSignal; /** Forward each stdout chunk verbatim — used by `EvalRunOpts.onStdout`. */ onStdoutChunk?: (chunk: Buffer) => void; /** Forward each stderr chunk verbatim. If unset, stderr is piped to `process.stderr`. */ onStderrChunk?: (chunk: Buffer) => void; /** Called once per complete stdout line, in order. Trailing line without `\n` is flushed on close. */ onStdoutLine: (line: string) => void; }; /** * Long-running spawn with line-streamed stdout — for agent CLIs that * emit JSONL transcripts (claude `--output-format=stream-json`, codex * `--json`, opencode `--format json`). The caller hands a parser * callback; we feed it each complete line as the child emits it, * holding only one partial line in memory at any moment. * * Resolves on close regardless of exit code or timeout — agents * frequently exit non-zero (transient API errors, killed by abort * signal) yet leave a usable partial transcript. The caller decides * what to do based on parser state plus the abort signal it owns. * * Multi-byte UTF-8 sequences split across stdout chunks are handled * via `StringDecoder` so the line-splitter never sees half a codepoint. */ export declare function spawnStreaming(opts: SpawnStreamingOpts): Promise; //# sourceMappingURL=process.d.ts.map