import type { Transport as SDKTransport, TransportSendOptions } from '@modelcontextprotocol/sdk/shared/transport.js'; import type { JSONRPCMessage, MessageExtraInfo } from '@modelcontextprotocol/sdk/types.js'; import { Transport } from './transport.js'; /** * Adapter that bridges our Transport implementation with the SDK's Transport interface * This allows our HTTP, WebSocket, and TCP transports to work with the MCP SDK Client */ export declare class SDKTransportAdapter implements SDKTransport { private transport; private receiveTask?; private shouldStop; private messageBuffer; onclose?: () => void; onerror?: (error: Error) => void; onmessage?: (message: JSONRPCMessage, extra?: MessageExtraInfo) => void; sessionId?: string; setProtocolVersion?: (version: string) => void; constructor(transport: Transport); /** * Start the transport and begin processing messages * Maps to our connect() method and starts the receive loop */ start(): Promise; /** * Send a JSON-RPC message with optional settings * Maps to our send() method */ send(message: JSONRPCMessage, options?: TransportSendOptions): Promise; /** * Close the transport connection * Maps to our disconnect() method */ close(): Promise; /** * Background loop that receives messages from the transport * and delivers them via the onmessage callback */ private receiveLoop; /** * Create a timeout promise for polling */ private createTimeout; /** * Check if the underlying transport is connected */ isConnected(): boolean; /** * Get the underlying transport for debugging */ getUnderlyingTransport(): Transport; } /** * Factory function to create an SDK-compatible transport from our transport */ export declare function createSDKTransport(transport: Transport): SDKTransport; //# sourceMappingURL=sdk-transport-adapter.d.ts.map