/**
 * JSON-RPC message builders, type guards, and converters.
 *
 * Used by the SAES runtime (ActionEvent, ActionPeer, transports) and
 * the RPC endpoint dispatcher. Complements `http/jsonrpc.ts` (schemas) and
 * `http/jsonrpc_errors.ts` (error infrastructure).
 *
 * @module
 */
import { type JsonrpcErrorResponse, type JsonrpcMethod, type JsonrpcNotification, type JsonrpcNotificationParams, type JsonrpcRequest, type JsonrpcRequestId, type JsonrpcRequestParams, type JsonrpcResponse, type JsonrpcResult, type JsonrpcMessage, JSONRPC_VERSION } from './jsonrpc.js';
/** Creates a JSON-RPC request message. */
export declare const create_jsonrpc_request: (method: JsonrpcMethod, params: JsonrpcRequestParams | undefined, id: JsonrpcRequestId) => JsonrpcRequest;
/** Creates a JSON-RPC success response message. */
export declare const create_jsonrpc_response: (id: JsonrpcRequestId, result: JsonrpcResult) => JsonrpcResponse;
/** Creates a JSON-RPC notification message (no id, no response expected). */
export declare const create_jsonrpc_notification: (method: JsonrpcMethod, params: JsonrpcNotificationParams | undefined) => JsonrpcNotification;
/** Creates a JSON-RPC error response message. */
export declare const create_jsonrpc_error_response: (id: JsonrpcErrorResponse["id"], error: JsonrpcErrorResponse["error"]) => JsonrpcErrorResponse;
/**
 * Creates a JSON-RPC error response from any error.
 * Handles `ThrownJsonrpcError` (preserves code/message/data) and
 * regular `Error` objects (maps to internal_error, includes stack in DEV).
 */
export declare const create_jsonrpc_error_response_from_thrown: (id: JsonrpcRequestId | null, error: unknown) => JsonrpcErrorResponse;
/** Checks if a value is a valid JSON-RPC request id (string or finite number). */
export declare const is_jsonrpc_request_id: (id: unknown) => id is JsonrpcRequestId;
/** Checks if a value is a JSON-RPC object (has `jsonrpc: '2.0'`). */
export declare const is_jsonrpc_object: (message: unknown) => message is {
    jsonrpc: typeof JSONRPC_VERSION;
};
/** Checks if a value is any valid JSON-RPC message or batch array. */
export declare const is_jsonrpc_message: (message: unknown) => message is JsonrpcMessage | Array<JsonrpcMessage>;
/** Checks if a value is a JSON-RPC request (has method + id). */
export declare const is_jsonrpc_request: (message: unknown) => message is JsonrpcRequest;
/** Checks if a value is a JSON-RPC notification (has method, no id). */
export declare const is_jsonrpc_notification: (message: unknown) => message is JsonrpcNotification;
/** Checks if a value is a JSON-RPC success response (has result + id). */
export declare const is_jsonrpc_response: (message: unknown) => message is JsonrpcResponse;
/** Checks if a value is a JSON-RPC error response (has error + id). */
export declare const is_jsonrpc_error_response: (message: unknown) => message is JsonrpcErrorResponse;
/**
 * Extracts a JSON-RPC request id from a message or raw value.
 * Returns `null` if no valid id can be extracted.
 */
export declare const to_jsonrpc_message_id: (message_or_id: unknown) => JsonrpcRequestId | null;
/**
 * Normalizes input to JSON-RPC params format.
 * Returns `undefined` for null/undefined, wraps primitives in `{value}`.
 */
export declare const to_jsonrpc_params: (input: unknown) => Record<string, any> | undefined;
/**
 * Normalizes output to JSON-RPC result format.
 * Returns empty object for null/undefined, wraps primitives in `{value}`.
 */
export declare const to_jsonrpc_result: (output: unknown) => Record<string, any>;
//# sourceMappingURL=jsonrpc_helpers.d.ts.map