/** * Base transport interface for MCP */ import { MCPRequest, MCPResponse, MCPNotification } from "../../utils/types.ts"; export type RequestHandler = (request: MCPRequest) => Promise; export type NotificationHandler = (notification: MCPNotification) => Promise; export interface ITransport { start(): Promise; stop(): Promise; connect(): Promise; disconnect(): Promise; onRequest(handler: RequestHandler): void; onNotification?(handler: NotificationHandler): void; sendRequest(request: MCPRequest): Promise; sendNotification?(notification: MCPNotification): Promise; getHealthStatus(): Promise<{ healthy: boolean; error?: string; metrics?: Record; }>; }