import type { ToolCall } from "../types.js"; /** Final arguments must not reuse the streaming parser's auto-closed preview. */ export declare function parseToolCallArguments(json: string | undefined): ToolCall["arguments"]; /** * Native Responses `function_call.arguments` to persist for replay. * * {@link parseToolCallArguments} repairs some invalid JSON (e.g. `"name": ,`) and the tool runs with the * repaired value; replay drops a call whose stored arguments do not parse, orphaning its output (#14155). * Returns `raw` when it already parses or the arguments were unrepairable, else the executed arguments. */ export declare function replayableToolCallArguments(raw: string, executed: ToolCall["arguments"]): string; /** Longest raw argument text kept in the parse-error diagnostic. */ export declare const INVALID_ARGUMENTS_RAW_LIMIT = 512; /** Bound raw argument text for a diagnostic. Text this function already bounded is returned unchanged. */ export declare function boundRawToolArguments(raw: string): string; /** Preserve a bounded diagnostic, never any partially recovered executable keys. */ export declare function invalidToolCallArguments(raw: string, error: unknown): ToolCall["arguments"];