/** * Battery-scoped exception constructors for the Claude Code CLI adapter. * * @module @nhtio/adk/batteries/llm/claude_code_cli/exceptions * * @remarks * Battery-scoped exception classes minted via `createException` from `@nhtio/adk/factories`. * Malformed NDJSON frames (either the wrapper's own inbound-command reader, or its translation of * Claude's stream-json) are explicitly NOT a distinct exception — they are swallowed and surfaced * via `helpers.log.trace`, matching the Ollama battery's malformed-line policy. */ /** * Thrown when the resolved adapter options (constructor, executor overrides, or per-dispatch * `stash.claudeCodeCli`) fail validation — including `extraArgs` security-flag rejection, the * `apiKey`/`authToken` XOR violation, and the POSIX-only platform guard. */ export declare const E_INVALID_CLAUDE_CODE_CLI_OPTIONS: import("../../../factories").CreatedException<[ string ]>; /** Thrown when the `claude` binary cannot be located/spawned. */ export declare const E_CLAUDE_CODE_CLI_BINARY_NOT_FOUND: import("../../../factories").CreatedException<[ string ]>; /** Thrown when the wrapper process itself fails to spawn. */ export declare const E_CLAUDE_CODE_CLI_WRAPPER_SPAWN_ERROR: import("../../../factories").CreatedException<[ string ]>; /** Thrown when the wrapper process crashes or exits abnormally mid-dispatch. */ export declare const E_CLAUDE_CODE_CLI_WRAPPER_CRASHED: import("../../../factories").CreatedException<[ string ]>; /** Thrown when the wrapper process exits with no terminal `result`/`error` event observed. */ export declare const E_CLAUDE_CODE_CLI_PROCESS_EXITED_NONZERO: import("../../../factories").CreatedException<[ number, string ]>; /** Thrown on a transport-level stream failure between the adapter and the wrapper. */ export declare const E_CLAUDE_CODE_CLI_STREAM_ERROR: import("../../../factories").CreatedException<[ string ]>; /** Thrown when the wrapper's stdout goes idle for longer than `streamIdleTimeoutMs`. */ export declare const E_CLAUDE_CODE_CLI_STREAM_STALLED: import("../../../factories").CreatedException<[ number ]>; /** Thrown when the wrapper does not signal `ready` and Claude's `system/init` within `startupTimeoutMs`. */ export declare const E_CLAUDE_CODE_CLI_STARTUP_TIMEOUT: import("../../../factories").CreatedException<[ number ]>; /** * Thrown when the wrapper's own MCP bridge server fails to start, OR Claude's `system/init` * reports an `mcp_server_errors` entry naming the bridge, OR the `@modelcontextprotocol/sdk` * optional peer is missing at wrapper startup. */ export declare const E_CLAUDE_CODE_CLI_MCP_BRIDGE_STARTUP_FAILED: import("../../../factories").CreatedException<[ string ]>; /** * Thrown when the assembled request exceeds the configured `contextWindow` during the pre-flight * context-window guard. Only raised when `tokenEncoding` is non-null. Carries `{ total, * contextWindow, tokenEncoding, perBucket }` in the message so middleware can target shedding. * * @remarks * This is the ADK-side token-budget guard and refuses the request before the Claude Code CLI * wrapper is spawned. The rendered prompt and append-system prompt are measured exactly; it is * an honest floor only because Claude Code injects additional vendor-owned content (the Agent SDK * preamble, CWD/Date, billing header, built-in tool schemas, and MCP declaration envelope). */ export declare const E_CLAUDE_CODE_CLI_CONTEXT_OVERFLOW: import("../../../factories").CreatedException<[ number, number, string, string ]>; /** * Thrown when Claude's terminal `result` reports `isError: true` for a terminal error subtype * other than `error_max_turns`, notably CLI-native budget exhaustion from `--max-budget-usd`. * The `error_max_turns` subtype is the normal successful completion signal for this adapter's * fixed single-turn dispatch contract. */ export declare const E_CLAUDE_CODE_CLI_TURN_FAILED: import("../../../factories").CreatedException<[ string, string ]>; /** * Thrown when a {@link @nhtio/adk!Media} whose modality cannot be represented reaches either * direction of this battery under the corresponding `unsupportedMediaPolicy`/ * `unsupportedResultMediaPolicy: 'throw'` — bidirectional: inbound prompt media (a `-p` string has * no native image channel) and outbound tool-result media (only text/image MCP content blocks are * supported). */ export declare const E_CLAUDE_CODE_CLI_UNSUPPORTED_MEDIA_MODALITY: import("../../../factories").CreatedException<[ string, string, string ]>;