import { type McpTransport } from "./transport.js"; import type { McpAuthProvider } from "./auth/types.js"; import { type JsonRpcNotification, type JsonRpcRequest, type JsonRpcResponse, type McpHttpConfig, type McpRequestOptions } from "./types.js"; export interface HttpTransportOptions { readonly requestTimeoutMs?: number | undefined; readonly maxResponseBytes?: number | undefined; readonly fetchImpl?: typeof fetch | undefined; readonly authProvider?: McpAuthProvider | undefined; } export declare class StreamableHttpTransport implements McpTransport { private readonly config; private readonly options; readonly kind: "http"; private session; private protocolVersion; private nextId; private closed; constructor(config: McpHttpConfig, options?: HttpTransportOptions); private get fetchImpl(); private get maxBytes(); sessionId(): string | undefined; setProtocolVersion(version: string): void; start(): Promise; private resolveHeaders; private sendOnce; private retryOnUnauthorized; private failForStatus; request(message: JsonRpcRequest, options?: McpRequestOptions): Promise; notify(message: JsonRpcNotification, options?: McpRequestOptions): Promise; private captureSession; close(): Promise; } export declare class LegacySseTransport implements McpTransport { private readonly config; private readonly options; readonly kind: "sse"; private protocolVersion; private nextId; private closed; private endpointUrl; private readonly streamController; private readonly pending; private readyPromise; private pumpError; constructor(config: McpHttpConfig, options?: HttpTransportOptions); private get fetchImpl(); private get maxBytes(); sessionId(): string | undefined; setProtocolVersion(version: string): void; start(): Promise; private streamHeaders; private openStream; private openAuthorizedStream; private pump; private handleEvent; private failAll; private postHeaders; private sendPost; private retryPostUnauthorized; private postMessage; request(message: JsonRpcRequest, options?: McpRequestOptions): Promise; notify(message: JsonRpcNotification, options?: McpRequestOptions): Promise; close(): Promise; }