/** * Zoe Core — Error class hierarchy * * Proper class hierarchy for all Zoe errors. * Each error class carries a `code`, `retryable` flag, and domain-specific * metadata (e.g. `provider`, `tool`, `steps`). */ /** * Base class for all Zoe errors. * * Carries a machine-readable `code` and a `retryable` flag so callers can * decide whether to retry automatically. */ export declare class ZoeError extends Error { /** Machine-readable error code, e.g. "PROVIDER_ERROR", "TOOL_FAILED". */ code: string; /** Whether the operation that caused this error can be retried. */ retryable: boolean; constructor(message: string, code: string, retryable?: boolean); } /** * Error originating from a provider (LLM API call failure, auth, rate-limit, etc.). */ export declare class ProviderError extends ZoeError { /** The provider name that produced the error, if known. */ provider?: string; constructor(message: string, provider?: string); } /** * Error from tool execution. */ export declare class ToolError extends ZoeError { /** The tool name that produced the error, if known. */ tool?: string; constructor(message: string, tool?: string); } /** * Thrown when the agent loop exceeds the configured maximum number of steps. */ export declare class MaxStepsError extends ZoeError { /** The number of steps that were executed. */ steps: number; constructor(steps: number, maxSteps: number); } /** * Thrown when an operation is aborted (e.g. via AbortSignal). */ export declare class AbortedError extends ZoeError { constructor(message?: string); } /** * Error from gateway operations (MCP client, REST proxy, target management). */ export declare class GatewayError extends ZoeError { /** The target name that produced the error, if known. */ target?: string; constructor(message: string, target?: string, retryable?: boolean); }