/** * JSONL event parser for codex --json output. * * Extracted from tools/handlers.ts to be reusable across * single-agent runner and future wave orchestration. * * Design: * - Skips streaming intermediates (item.started, thread.started, turn.started) * - Extracts completed items as clean JSONL * - Preserves turn.completed for usage stats * - Preserves turn.failed and item.failed for error visibility * - Normalises legacy event shapes to the modern item schema * * Ref: https://developers.openai.com/codex/noninteractive/ */ import type { ParsedProcessEvent } from './types.js'; /** * Test whether a stderr chunk is noise (should be dropped). */ export declare function isStderrNoise(chunk: string): boolean; /** * Parse a single JSONL line from codex --json output. * * Returns a normalized JSON string, or null if the line should be skipped * (intermediates, empty lines, malformed JSON). */ export declare function parseCodexEvent(line: string): string | null; /** * Parse a JSON string into a typed event object. * Returns null if parsing fails. */ export declare function parseEventString(jsonStr: string): ParsedProcessEvent | null; /** * Create a stderr event JSON string from a raw chunk. */ export declare function createStderrEvent(chunk: string): string; //# sourceMappingURL=event-parser.d.ts.map