import type { ConversationAuthContext, ConversationAuthHandler } from '../auth/conversation-auth-handler.js'; import { CircuitBreaker } from '../utils/circuit-breaker.js'; export interface ConversationMCPClientLogger { debug(message: string, meta?: Record): void; info(message: string, meta?: Record): void; warn(message: string, meta?: Record): void; error(message: string, meta?: Record): void; } export interface MCPClientLike { connect(transport: TransportLike): Promise; callTool(params: { name: string; arguments?: any; }, resultSchema?: unknown, options?: { headers?: Record; timeout?: number; }): Promise; close(): Promise; } export interface TransportLike { close(): Promise; } export interface ConversationMCPClientRetryOptions { maxAttempts: number; delayMs: number; } interface TransportFactoryOptions { fetchImpl?: typeof fetch; headers?: Record; } export interface ConversationMCPClientOptions { serverUrl: string; authHandler?: ConversationAuthHandler; circuitBreaker?: CircuitBreaker; clientFactory?: () => MCPClientLike; transportFactory?: (url: URL, options: TransportFactoryOptions) => TransportLike; retry?: ConversationMCPClientRetryOptions; logger?: ConversationMCPClientLogger; fetchImpl?: typeof fetch; requestTimeoutMs?: number; } export declare class ConversationMCPClient { private client; private transport; private connected; private readonly connectMutex; private readonly circuitBreaker; private readonly retry; private readonly logger; private readonly clientFactory; private readonly transportFactory; private readonly serverUrl; private readonly fetchImpl?; private readonly authHandler?; private readonly requestTimeoutMs?; private transportHeaders; constructor(options: ConversationMCPClientOptions); callTool(toolName: string, params: any, authContext?: ConversationAuthContext): Promise; disconnect(): Promise; private ensureConnected; private resetConnection; private isTransientError; private shouldResetConnection; private delay; private headersEqual; } export {};