/** * Parses model JSON with explicit JSON5 tolerance for quoted keys, trailing commas, and code * fences. */ /** * Extract and parse JSON from text using JSON5 for LLM output tolerance. * Throws on parse failure for invalid JSON. * * @param text - The input text containing JSON * @returns Parsed object/array * @throws {Error} If the JSON is invalid or parsing fails */ export declare function extractAndParseJSONObjectFromText(text: string): Record | unknown[]; /** * Parses a JSON object from raw text or a code block. JSON5 accepts common * model-output variations such as trailing commas, unquoted keys, and single * quotes. Invalid or non-object input returns null. * * @param text - The input text from which to extract and parse the JSON object. * @returns An object parsed from the JSON string if successful; otherwise null. */ export declare function parseJSONObjectFromText(text: string): Record | null;