/** * Canonical JavaScript error codes for the product-facing host bridge. * * Public callers should prefer matching on `error.code` when present and * continue treating `error.message` as the backward-compatible fallback. */ import type { BridgeErrorCode } from "./bridge/contract.js"; export type HostErrorCode = BridgeErrorCode; export declare class HostError extends Error { readonly code: HostErrorCode; constructor(code: HostErrorCode, message: string); } export declare function isHostError(error: unknown): error is HostError; export declare function bridgeDestroyedError(): HostError; export declare function rateLimitError(operation: string, maxCalls: number, windowMs: number): HostError; export declare function unsupportedCapabilityError(capability: string): HostError; export declare function hostRuntimeUnavailableError(subject: string): HostError; export declare function binaryBridgeUnavailableError(): HostError; export declare function invalidArgumentError(message: string): HostError; export declare function timeoutError(message: string): HostError; export declare function hostRejectedError(message: string): HostError; //# sourceMappingURL=errors.d.ts.map