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<string, Client>;
/** Read-only access to the builtin factories map for sibling modules. */
export declare function getBuiltinFactories(): Map<string, () => Promise<any>>;
/** Read-only access to the builtin servers map for sibling modules. */
export declare function getBuiltinServers(): Map<string, any>;
/**
 * 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<any>): 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<Client>;
/**
 * Disconnect from a specific server.
 */
export declare function disconnectFromServer(serverId: string): Promise<void>;
/**
 * 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<Client | null>;
/**
 * Connect to all auto-connect servers.
 */
export declare function connectAutoServers(): Promise<void>;
/**
 * Disconnect all clients.
 */
export declare function disconnectAll(): Promise<void>;
/**
 * Check if a server is connected.
 */
export declare function isConnected(serverId: string): boolean;
/**
 * Clear all state. Used in tests.
 */
export declare function clear(): void;
