import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { HttpServer } from "../../mcp/transports/server.js"; import { Transport } from "../../mcp/transports/types.js"; export declare class SseTransport implements Transport { private serverFactory; private httpServer; private sseMcpEndpointPath; private sseMcpMessageEndpointPath; private sessions; constructor(serverFactory: () => McpServer, httpServer: HttpServer, sseMcpEndpointPath?: string, sseMcpMessageEndpointPath?: string); connect(): Promise; disconnect(): Promise; /** * Mints a per-session {@link McpServer} + {@link SSEServerTransport} pair, wires * lifecycle callbacks, registers the session, then binds the server. Streamable HTTP gets * the sessionId asynchronously via the SDK's {@linkcode onsessioninitialized} callback (which * fires inside {@linkcode StreamableHTTPServerTransport.handleRequest}), so it can register * lazily and a failed bind leaves no entry. SSE has no such callback — sessionId is known at * construction — so we register first and roll back on bind rejection. Without the rollback * a fast client could see {@linkcode SSEServerTransport.start}'s endpoint event, POST to * {@linkcode sseMcpMessageEndpointPath} and race the {@linkcode sessions.set} call. */ private createSession; } //# sourceMappingURL=sse.d.ts.map