/** * MCP Protocol Handler */ import { JsonRpcRequest, JsonRpcResponse } from '@latestgraviton/protocol'; import { EventEmitter } from 'events'; /** * MCP method handler type */ type MethodHandler = (params: any) => Promise; /** * MCP Protocol Handler class */ export declare class MCPProtocolHandler extends EventEmitter { private logger; private methodHandlers; private activeRequests; constructor(); /** * Register default MCP method handlers */ private registerDefaultHandlers; /** * Register a method handler */ registerMethod(method: string, handler: MethodHandler): void; /** * Unregister a method handler */ unregisterMethod(method: string): void; /** * Process incoming JSON-RPC request */ processRequest(request: JsonRpcRequest): Promise; /** * Process batch requests */ processBatchRequest(requests: JsonRpcRequest[]): Promise; /** * Create success response */ private createSuccessResponse; /** * Create error response */ private createErrorResponse; /** * Handle notification (request without id) */ handleNotification(method: string, params?: any): Promise; /** * Get active request count */ getActiveRequestCount(): number; /** * Cancel active request */ cancelRequest(id: string | number): boolean; /** * Clear all active requests */ clearActiveRequests(): void; } export {}; //# sourceMappingURL=handler.d.ts.map