import type { MCPServerRegistry } from './registry'; /** * Health check and auto-restart manager for MCP servers. * * Provides: * - Periodic health checks at configurable intervals * - Auto-restart with exponential backoff on connection loss * - Tool re-discovery after successful reconnection */ export declare class MCPHealthManager { private timers; private retryState; private reconnectInFlight; /** * Start periodic health check for a server. * * Checks client.isConnected() at specified interval and triggers * reconnect if disconnected. * * @param registry - MCP server registry * @param serverId - Server identifier * @param intervalMs - Health check interval in milliseconds */ startHealthCheck(registry: MCPServerRegistry, serverId: string, intervalMs: number): void; /** * Stop health check for a specific server. * * @param serverId - Server identifier */ stopHealthCheck(serverId: string): void; /** * Stop all health checks. */ stopAll(): void; /** * Attempt to reconnect a server with exponential backoff. * * Backoff schedule: 1s, 2s, 4s (configurable max retries) * * On success: Updates status to 'connected', re-discovers tools * On failure: Updates status to 'error', stops health check * * @param registry - MCP server registry * @param serverId - Server identifier * @param maxRetries - Maximum reconnection attempts (default: 3) * @returns Promise resolving to true if reconnect succeeded, false otherwise */ reconnectServer(registry: MCPServerRegistry, serverId: string, maxRetries?: number): Promise; private reconnectServerInternal; private reconnectServerEffect; } //# sourceMappingURL=health.d.ts.map