/** * Tolerant JSON parse for model-emitted Meissa blocks. * * Weak/cheap LLMs hand-write the schema JSON and routinely make *syntactic* * slips — most commonly a missing or mismatched closing bracket in deeply * nested UI, but also unterminated strings and trailing commas. A single such * slip makes `JSON.parse` throw, and the host would otherwise discard an * otherwise-perfect block. `parseLenient()` repairs these common mistakes with * one stack-based rewrite pass, then parses. It only ever *adds* the missing * structure implied by the text (or drops a stray closer / trailing comma); it * never invents content. The parsed value still goes through `sanitize()` for * semantic repair — this stage only gets the bytes to parse. */ export interface LenientParse { /** The parsed value, or null when even repair could not make it valid. */ value: unknown; /** True when a value was parsed (with or without repairs). */ ok: boolean; /** Human-readable log of the syntactic fixes applied. */ repairs: string[]; } /** Parse `text` as JSON, repairing the syntax errors weak models commonly emit. */ export declare function parseLenient(text: string): LenientParse;