/** * Pure JSONL event log parser. Reads the raw content of * .diablo//events.jsonl and returns typed events plus a count of * malformed lines. Tolerant by design: a bad line is skipped, never thrown. * * Pure (no I/O) so it is unit-tested directly with string fixtures. */ import type { ProgressEvent } from "../ports/progress.ts"; /** A parsed event with its ISO timestamp, issue id, and run id. */ export interface LoggedEvent { ts: string; issue: string; runId: string; event: ProgressEvent; } /** The result of parsing an entire JSONL file. */ export interface ParsedEventLog { events: LoggedEvent[]; malformedCount: number; } /** * Parse a raw JSONL string into structured events. Each non-empty line is * expected to be `{ts, issue, ...progressEventFields}`. Malformed lines * (invalid JSON, missing required fields, unknown kind) are skipped and * counted. */ export declare function parseEventLog(raw: string): ParsedEventLog;