import { Client } from '@modelcontextprotocol/sdk/client/index.js'; import type { LTMcpServerRecord } from '../../../types'; /** Read-only access to the clients map for sibling modules. */ export declare function getClients(): Map; /** Read-only access to the builtin factories map for sibling modules. */ export declare function getBuiltinFactories(): Map Promise>; /** Read-only access to the builtin servers map for sibling modules. */ export declare function getBuiltinServers(): Map; /** * Register a built-in server factory so it can be auto-connected * when callServerTool is invoked with its name. */ export declare function registerBuiltinServer(name: string, factory: () => Promise): void; /** * Connect to a registered MCP server. * Creates the appropriate transport based on transport_type, * connects, and caches tool manifest in DB. */ export declare function connectToServer(server: LTMcpServerRecord): Promise; /** * Disconnect from a specific server. */ export declare function disconnectFromServer(serverId: string): Promise; /** * Resolve a server by ID or name, auto-connecting built-in servers if needed. * Returns the client or null if not found. * * Built-in servers are connected once under their canonical factory name. * Alias lookups (e.g. 'translation' matching 'long-tail-translation') reuse * the same client instance to avoid double-connecting the singleton server. */ export declare function resolveClient(serverId: string): Promise; /** * Connect to all auto-connect servers. */ export declare function connectAutoServers(): Promise; /** * Disconnect all clients. */ export declare function disconnectAll(): Promise; /** * Check if a server is connected. */ export declare function isConnected(serverId: string): boolean; /** * Clear all state. Used in tests. */ export declare function clear(): void;