import { type ExtractionHarness } from "./harness.js"; interface ExecResult { stdout: string; stderr: string; code: number; } type Exec = (args: string[], options: { cwd: string; env: NodeJS.ProcessEnv; }) => Promise; /** Pure mapping from a completed `codex exec` subprocess (exit code/stderr) * plus the outcome of reading its `--output-last-message` file into the * harness's ExecResult. Pulled out of execCodex's callback and exported so * the missing-file fallback — codex exited 0 but somehow wrote nothing — * has direct unit coverage instead of living only behind the exec seam. */ export declare function resolveCodexExecResult(code: number, processStdout: string, stderr: string, finalMessage: string | undefined): ExecResult; /** Insert `--output-last-message ` immediately before the free-text * instructions positional (always the last element of a codex exec argv) * rather than appending after it — a flag placed after a long, arbitrary * free-text argument is fragile (positional/option disambiguation, and any * prompt that happens to start with `-`). Exported and pure so the ordering * is unit-tested without spawning a real process. */ export declare function insertOutputLastMessageFlag(args: string[], outputFile: string): string[]; export interface CodexCliHarnessOptions { /** Test seams. */ probeBinary?: () => Promise; probeLogin?: (env: Record) => Promise; exec?: Exec; } export declare function codexCliHarness(options?: CodexCliHarnessOptions): ExtractionHarness; export {};