/** * A tool call's arguments, read the way models actually send them. * * The schema says an object, and most calls are one. But a model that has just been shown a list * will sometimes wrap it: `[{"question": "..."}]` instead of `{"question": "..."}`. Reported from a * real run — an ask_user call that spent eighteen minutes getting nowhere and came back with * `ask_user needs a "question" string`, when the question was right there, one bracket out. * * Rejecting it is defensible and useless. The intent of a single-element array holding one object * is not ambiguous, and the alternative is a wasted round trip that teaches the model nothing — * it re-sends the same shape, because from where it sits the shape looked fine. So a lone wrapped * object is unwrapped, and anything genuinely unreadable still comes back empty for the caller to * complain about properly. * * Deliberately narrow: only a one-element array, and only when that element is a plain object. An * array of two things is not a mis-wrapped argument, it is a different mistake, and guessing which * element was meant would be inventing an answer. */ export declare function parseToolArguments(raw: string): Record; /** The same unwrapping, for a value that has already been parsed. */ export declare function unwrapArguments(parsed: unknown): Record; //# sourceMappingURL=tool-args.d.ts.map