import { LspClient } from './client.js'; /** * LSP Manager — manages LSP client instances per workspace and language. * * Features: * - Client pooling: one client per workspace::language combination * - Idle reaper: kills clients idle for more than 5 minutes * - Graceful shutdown: closes all clients on shutdown */ export declare class LspManager { private clients; /** * Get or create an LSP client for the given workspace and server. */ getClient(workspaceRoot: string, serverId: string): Promise; /** * Release a client (does not close it, just removes from pool). */ releaseClient(key: string): void; /** * Kill clients that have been idle for more than 5 minutes. */ reapIdleClients(): void; /** * Get the number of active clients. */ getActiveClients(): number; /** * Shut down all clients gracefully. */ shutdownAll(): Promise; /** * Generate a unique key for a workspace::server combination. */ static getClientKey(workspaceRoot: string, serverId: string): string; } /** * Get LSP client for a file path (convenience wrapper). */ export declare function getLspClientForFile(filePath: string, workspaceRoot: string, manager: LspManager): Promise<{ client: LspClient; language: string; } | null>; export declare const lspClientManager: LspManager;