import type { ServerDefinition } from "./types.js";
import type { McpServerManager } from "./server-manager.js";
export type ReconnectCallback = (serverName: string) => void;
export declare class McpLifecycleManager {
    private manager;
    private keepAliveServers;
    private allServers;
    private serverSettings;
    private globalIdleTimeout;
    private healthCheckInterval?;
    private onReconnect?;
    private onIdleShutdown?;
    constructor(manager: McpServerManager);
    /**
     * Set callback to be invoked after a successful auto-reconnect.
     * Use this to update tool metadata when a server reconnects.
     */
    setReconnectCallback(callback: ReconnectCallback): void;
    markKeepAlive(name: string, definition: ServerDefinition): void;
    registerServer(name: string, definition: ServerDefinition, settings?: {
        idleTimeout?: number;
    }): void;
    setGlobalIdleTimeout(minutes: number): void;
    setIdleShutdownCallback(callback: (serverName: string) => void): void;
    startHealthChecks(intervalMs?: number): void;
    private checkConnections;
    private getIdleTimeout;
    gracefulShutdown(): Promise<void>;
}
//# sourceMappingURL=lifecycle.d.ts.map