import { j as JSONRPCResponse, aw as JSONRPCError } from './extensions-DvruCIzw.js'; import { A as A2ARequestHandler, S as ServerCallContext } from './a2a_request_handler-BuP9LgXH.js'; /** * Handles JSON-RPC transport layer, routing requests to A2ARequestHandler. */ declare class JsonRpcTransportHandler { private requestHandler; constructor(requestHandler: A2ARequestHandler); /** * Handles an incoming JSON-RPC request. * For streaming methods, it returns an AsyncGenerator of JSONRPCResult. * For non-streaming methods, it returns a Promise of a single JSONRPCMessage (Result or ErrorResponse). */ handle(requestBody: any, context?: ServerCallContext): Promise>; private isRequestValid; private paramsAreValid; } /** * Custom error class for A2A server operations, incorporating JSON-RPC error codes. */ declare class A2AError extends Error { code: number; data?: Record; taskId?: string; constructor(code: number, message: string, data?: Record, taskId?: string); /** * Formats the error into a standard JSON-RPC error object structure. */ toJSONRPCError(): JSONRPCError; static parseError(message: string, data?: Record): A2AError; static invalidRequest(message: string, data?: Record): A2AError; static methodNotFound(method: string): A2AError; static invalidParams(message: string, data?: Record): A2AError; static internalError(message: string, data?: Record): A2AError; static taskNotFound(taskId: string): A2AError; static taskNotCancelable(taskId: string): A2AError; static pushNotificationNotSupported(): A2AError; static unsupportedOperation(operation: string): A2AError; static authenticatedExtendedCardNotConfigured(): A2AError; } export { A2AError as A, JsonRpcTransportHandler as J };