UNPKG

capacitor-cors-bypass-enhanced

Version:

Enhanced Capacitor plugin for CORS bypass with HTTP/2, HTTP/3, gRPC, GraphQL, file operations, and advanced networking features. Modular TypeScript definitions for better maintainability.

59 lines 1.68 kB
/** * MCP Client Manager (Web Implementation) * Manages MCP connections with StreamableHTTP transport */ import type { MCPClientOptions, MCPClient } from '../types/mcp'; export declare class MCPClientManager { private connections; private connectionCounter; /** * Create a new MCP client connection */ createClient(options: MCPClientOptions): Promise<MCPClient>; /** * Create a StreamableHTTP MCP client */ private createStreamableHTTPClient; /** * Send a message to an MCP server */ sendMessage(connectionId: string, message: any, expectStream?: boolean): Promise<void>; /** * Open a listen stream for server-initiated messages */ openListenStream(connectionId: string): Promise<void>; /** * Close an MCP client connection */ closeClient(connectionId: string): void; /** * Get session information for a connection */ getSessionInfo(connectionId: string): { sessionId: string | null; lastSequence: number; resumable: boolean; } | null; /** * Get client info */ getClientInfo(connectionId: string): MCPClient | null; /** * Add event listener */ addEventListener(connectionId: string, event: string, callback: Function): void; /** * Remove event listener */ removeEventListener(connectionId: string, event: string, callback: Function): void; /** * Notify listeners */ private notifyListeners; /** * Close all connections */ closeAll(): void; } export declare const mcpClientManager: MCPClientManager; //# sourceMappingURL=mcp-client.d.ts.map