/** * `faultToJsonRpcError` — pure mapper from a transport-neutral * `OperationFault` into the JSON-RPC 2.0 error object the dispatchers send. * * Wire shape: `{ code, message, data }`. The numeric `code` follows the * JSON-RPC spec for reserved errors (`InvalidParams: -32602`, * `MethodNotFound: -32601`) and the Weft domain band -32010..-32099 for * everything else. This stable error-code allocation ensures cross-transport * parity. * * Every `data` object carries `{ weftCode, httpStatus }` plus the typed * fault-specific payload. The pair is a uniform machine-readable handle: * clients can route on `weftCode` (string) when they want symbolic names, * or on `httpStatus` (number) when they want HTTP-equivalent semantics. * * Pure: no engine, no I/O. The fault decides the wire shape. */ import { type OperationFault } from './operation-fault.ts'; export type JsonRpcError = { code: number; message: string; data: Record; }; export declare function faultToJsonRpcError(fault: OperationFault): JsonRpcError;