import type { AgentMessage, AgentRunArgs, AgentRunner } from './agent-runner.js'; /** * One parsed codex event, normalized for incremental streaming. * - 'assistant': rawText is one whole agent_message (fences intact) for * end-of-turn tool-call parsing; text is the fence-stripped prose, * present only when non-empty. * - 'tool': codex's own tool activity (a command_execution item's * start, or the spawn-time liveness yield) — forwarded by run() as a * `tool_use` liveness AgentMessage (see header). * - 'meta': any other event that only carries a thread id. */ export interface CodexStreamEvent { kind: 'assistant' | 'tool' | 'meta'; text?: string; rawText?: string; toolName?: string; threadId?: string; } export declare class CodexAgentRunner implements AgentRunner { private codexBin?; constructor(codexBin?: string | undefined); run(args: AgentRunArgs): AsyncIterable; /** * Run one `codex exec` invocation and stream its JSONL output * INCREMENTALLY: each parsed event is yielded as soon as its line arrives * on stdout (see the header's "Streaming / liveness" note for why * buffering until process exit was a bug, #204). End-of-turn facts (exit * code, stderr tail, thread id, usage, error, timeout flag) are written * into `outcome`, which the caller reads after this generator completes. */ private streamTurn; } //# sourceMappingURL=codex-runner.d.ts.map