/** * Battery-scoped exception constructors for the Anthropic Messages adapter. * * @module @nhtio/adk/batteries/llm/anthropic_messages/exceptions * * @remarks * Battery-scoped exception classes for the Anthropic Messages adapter. These exceptions are owned * by the battery, not the ADK core, and are minted via `createException` from * `@nhtio/adk/factories`. The status codes and fatal split mirror the pure HTTP Ollama battery. * * Important provenance rule: ADK convention uses status 529 on fatal option and context-overflow * exceptions raised by the adapter itself. Anthropic also returns a real upstream HTTP 529 * `overloaded_error`, which is transient and retriable. An upstream 529 must be classified by * provenance as `E_ANTHROPIC_MESSAGES_HTTP_ERROR`, with retry eligibility decided by the retry * config. Never route a provider 529 into the fatal same-numbered ADK-side exceptions. */ /** * Thrown when resolved Anthropic Messages adapter options fail validation. */ export declare const E_INVALID_ANTHROPIC_MESSAGES_OPTIONS: import("../../../factories").CreatedException<[ string ]>; /** * Thrown when the total token weight of the resolved request exceeds `contextWindow`. */ export declare const E_ANTHROPIC_MESSAGES_CONTEXT_OVERFLOW: import("../../../factories").CreatedException<[ number, number, string, string ]>; /** * Thrown when the upstream Messages endpoint returns an API error. */ export declare const E_ANTHROPIC_MESSAGES_HTTP_ERROR: import("../../../factories").CreatedException<[ number, string ]>; /** * Thrown when a streaming Messages request emits a provider or transport failure mid-stream. */ export declare const E_ANTHROPIC_MESSAGES_STREAM_ERROR: import("../../../factories").CreatedException<[ string ]>; /** * Thrown when the Messages stream goes silent for longer than `streamIdleTimeoutMs`. */ export declare const E_ANTHROPIC_MESSAGES_STREAM_STALLED: import("../../../factories").CreatedException<[ number ]>; /** * Thrown when the request does not complete before `requestTimeoutMs`. */ export declare const E_ANTHROPIC_MESSAGES_REQUEST_TIMEOUT: import("../../../factories").CreatedException<[ number ]>; /** * Instantiated for invalid model-emitted tool arguments and persisted as an error `ToolCall`. * * @remarks * The adapter must not throw this exception. It creates the exception, copies the message into a * tool-result payload, and persists a failed `ToolCall` so the model can self-correct on the next * iteration. */ export declare const E_ANTHROPIC_MESSAGES_INVALID_TOOL_CALL_ARGS: import("../../../factories").CreatedException<[ string, string ]>; /** * Raised when an ADK media instance cannot be represented by the Anthropic Messages wire. */ export declare const E_ANTHROPIC_MESSAGES_UNSUPPORTED_MEDIA_MODALITY: import("../../../factories").CreatedException<[ string, string, string ]>;