import type { JsonValue } from './types.js'; /** Deep structural clone via JSON round-trip. Used to snapshot streamed messages. */ export declare function clone(value: TValue): TValue; /** * Parse JSON that may be truncated mid-stream. Returns `{}` for empty/garbage * input. Attempts a strict parse first, then closes any open strings/brackets * and retries — so partial tool-call arguments deserialize as they arrive. */ export declare function parsePartialJson(raw: string): Record; /** Close any open strings, objects, and arrays so a truncated fragment parses. */ export declare function completePartialJson(input: string): string | undefined;