/** * Parse codex's `--json` JSONL output into a NormalizedTranscript. * * Schema (one JSON object per line): * {type:'thread.started', thread_id} * {type:'turn.started'} * {type:'item.completed', item:{id, type:'agent_message', text}} * {type:'item.completed', item:{id, type:'agent_reasoning', text}} * {type:'item.completed', item:{type:'function_call', ...}} * {type:'turn.completed', usage:{...}} * {type:'error', message} * * The final answer is the last `agent_message` item's text. `thread_id` * from the first `thread.started` event populates `sessionId`. Feed * each JSONL line to `feed()` as it arrives, then `finalize()` to read * out `{answer, sessionId}`. */ import type { NormalizedTranscript } from '../../core/types.js'; export type StreamingCodexParser = { feed(line: string): void; finalize(): NormalizedTranscript; }; export declare function createStreamingCodexParser(): StreamingCodexParser; //# sourceMappingURL=parse-transcript.d.ts.map