import type { Transport } from '@modelcontextprotocol/sdk/shared/transport.ts'; import { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js'; /** * Server transport for SSE: this will send messages over an SSE connection and receive messages from HTTP POST requests. * * This transport is only available in Node.js environments. */ export declare class SSEServerTransportSpiceflow implements Transport { private _sessionId; private _endpoint; private _writableStream?; response?: Response; onclose?: () => void; onerror?: (error: Error) => void; onmessage?: (message: JSONRPCMessage) => void; /** * Creates a new SSE server transport, which will direct the client to POST messages to the relative or absolute URL identified by `_endpoint`. */ constructor(endpoint: string); /** * Handles the initial SSE connection request. * * This should be called when a GET request is made to establish the SSE stream. */ start(): Promise; /** * Handles incoming POST messages. * * This should be called when a POST request is made to send a message to the server. */ handlePostMessage(req: Request): Promise; /** * Handle a client message, regardless of how it arrived. This can be used to inform the server of messages that arrive via a means different than HTTP POST. */ handleMessage(message: unknown): Promise; close(): Promise; send(message: JSONRPCMessage): Promise; /** * Returns the session ID for this transport. * * This can be used to route incoming POST requests. */ get sessionId(): string; } //# sourceMappingURL=mcp-transport.d.ts.map