/** * Era-aware JSON-RPC error mapping. * * The 2026-07-28 revision changed the error for a missing resource * (SEP-2164): `resources/read` on an unknown URI now returns `-32602` * (Invalid Params) instead of the 2025-era `-32002` (Resource Not Found). * NitroStack keeps the 2025 mapping on the legacy path; the modern adapter * uses `mapToJsonRpcError` so its handlers throw the right code. * * @module */ /** Standard JSON-RPC / MCP error codes. */ export declare const JSON_RPC: { readonly PARSE_ERROR: -32700; readonly INVALID_REQUEST: -32600; readonly METHOD_NOT_FOUND: -32601; readonly INVALID_PARAMS: -32602; readonly INTERNAL_ERROR: -32603; /** SEP-2243: request header/body mismatch. */ readonly HEADER_BODY_MISMATCH: -32020; }; /** A JSON-RPC error object. */ export interface JsonRpcError { code: number; message: string; data?: unknown; } /** * Map a thrown error to a JSON-RPC error for the modern (2026-07-28) path. * * Key difference vs legacy: `ResourceNotFoundError` → `-32602` (SEP-2164). */ export declare function mapToJsonRpcError(error: unknown): JsonRpcError; //# sourceMappingURL=errors.d.ts.map