/** * Parse OpenCode's `--format json` JSONL output into a NormalizedTranscript. * * Schema (one JSON object per line): * {type:'step_start', sessionID, part:{messageID, ...}} * {type:'text', sessionID, part:{text, ...}} * {type:'tool', sessionID, part:{...}} — tool calls; we ignore for answer * {type:'step_finish', sessionID, part:{reason, tokens, ...}} * * Different opencode versions have emitted slightly different envelopes; * we accept any line with a `text` field nested under `part` and * concatenate them in source order. `sessionID` from any line populates * the session id. 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 StreamingOpencodeParser = { feed(line: string): void; finalize(): NormalizedTranscript; }; export declare function createStreamingOpencodeParser(): StreamingOpencodeParser; //# sourceMappingURL=parse-transcript.d.ts.map