Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
/**
|
|
* Transport layer instrumentation for MCP server
|
|
*
|
|
* Handles message interception and response correlation.
|
|
* @see https://modelcontextprotocol.io/specification/2025-06-18/basic/transports
|
|
*/
|
|
import { MCPTransport, ResolvedMcpOptions } from './types';
|
|
/**
|
|
* Wraps transport.onmessage to create spans for incoming messages.
|
|
* For "initialize" requests, extracts and stores client info and protocol version
|
|
* in the session data for the transport.
|
|
* @param transport - MCP transport instance to wrap
|
|
* @param options - Resolved MCP options
|
|
*/
|
|
export declare function wrapTransportOnMessage(transport: MCPTransport, options: ResolvedMcpOptions): void;
|
|
/**
|
|
* Wraps transport.send to handle outgoing messages and response correlation.
|
|
* For "initialize" responses, extracts and stores protocol version and server info
|
|
* in the session data for the transport.
|
|
* @param transport - MCP transport instance to wrap
|
|
* @param options - Resolved MCP options
|
|
*/
|
|
export declare function wrapTransportSend(transport: MCPTransport, options: ResolvedMcpOptions): void;
|
|
/**
|
|
* Wraps transport.onclose to clean up pending spans for this transport only
|
|
* @param transport - MCP transport instance to wrap
|
|
*/
|
|
export declare function wrapTransportOnClose(transport: MCPTransport): void;
|
|
/**
|
|
* Wraps transport error handlers to capture connection errors
|
|
* @param transport - MCP transport instance to wrap
|
|
*/
|
|
export declare function wrapTransportError(transport: MCPTransport): void;
|
|
//# sourceMappingURL=transport.d.ts.map
|