/** * Base class for all structured exceptions in the ADK. * * @remarks * Subclasses should declare static `code`, `status`, `fatal`, and optionally `help` to avoid * repeating those values on every instance. Instance-level options always take precedence over * static defaults, so a single exception class can still be thrown with per-site overrides when * needed. * * The runtime cross-realm guard is inlined here rather than imported from `../utils/guards` * to break a circular-import chain: `guards` depends on `validation`, which extends * `BaseException`. Importing the shared `isInstanceOf` helper into this file would create a * load-order cycle that leaves `BaseException` undefined when `ValidationException extends * BaseException` evaluates. */ export declare class BaseException extends Error { /** * Returns `true` if `value` is a {@link BaseException} instance. * * @remarks * Performs cross-realm-safe detection: tries `instanceof`, then `Symbol.hasInstance`, then * constructor-name comparison. The ADK does not export the `BaseException` class itself * as a constructable value — use this guard plus the {@link BaseException} type for runtime * detection and TypeScript narrowing. * * @param value - The value to test. * @returns `true` when `value` is a {@link BaseException} instance. */ static isBaseException(value: unknown): value is BaseException; /** * Default help text inherited by all instances unless overridden at the throw site. */ static help?: string; /** * Default machine-readable error code inherited by all instances. */ static code?: string; /** * Default HTTP status code inherited by all instances. */ static status?: number; /** * Whether exceptions of this class are fatal by default. */ static fatal?: boolean; /** * Default message used when no message is supplied to the constructor. */ static message?: string; /** * Name of the class that raised the exception. */ name: string; /** * Human-readable guidance for resolving or reporting this error. */ help?: string; /** * Machine-readable error code for narrowing exception-handling logic. */ code?: string; /** * HTTP status code associated with this error. */ status?: number; /** * When `true`, the ADK treats this error as unrecoverable and should halt the agent loop. */ fatal?: boolean; /** * @param message - Human-readable error message. Falls back to the static `message` on the * subclass if omitted. * @param options - Standard `ErrorOptions` extended with `code`, `status`, and `fatal` * overrides. Static defaults on the subclass are used when these are absent. */ constructor(message?: string, options?: ErrorOptions & { code?: string; status?: number; fatal?: boolean; }); /** Tag used by `Object.prototype.toString` — reports the concrete exception class name. */ get [Symbol.toStringTag](): string; toString(): string; }