/** Longest serialized `details` an agent sees with a failed action. */ export declare const MAX_AGENT_ERROR_DETAILS_CHARS = 2000; export interface AgentErrorDetails { /** The `details` a `fail()` attached, as the browser receives them, redacted and bounded. */ details: Record; /** * Top-level keys left out to stay within the bound, or because they don't * serialize: up to ten names, each clipped, with the full count beside them. */ omittedKeys?: string[]; omittedKeyCount?: number; /** The line a text-only tool result carries, so text clients see the same data. */ line: string; } /** * The structured `details` of a failed action, in the form an agent reads. * * Only a contract error (`fail()`) carries details meant for the caller; the * HTTP action route already returns them to the browser, so an agent acting * for the same user gets the same object. Values go through a JSON round trip * first, so a `Date` reads as the browser would see it rather than as `{}`. * When the whole object is too long, small top-level entries are kept in * order and the rest are named in `omittedKeys`: a retry id must survive next * to a large payload, and a cut must never read as a complete object. */ export declare function agentErrorDetails(error: unknown): AgentErrorDetails | undefined;