/** * MCP Server factory — creates a fresh Server per transport connection. * * This is required because a single Server instance can only connect to one * transport. In HTTP mode, each VS Code client gets its own Server instance. * All instances share the same tool handler logic and in-process state. */ import type { Database } from "better-sqlite3"; import type { TelegramClient } from "../services/telegram.js"; import type { ThreadLifecycleService } from "../services/thread-lifecycle.service.js"; import type { CreateMcpServerFn } from "../lib/types.js"; /** * Builds a `CreateMcpServerFn` that closes over the shared runtime singletons * (Telegram client, memory database accessor). The returned function is the * factory that `startHttpServer` / `startStdioServer` call per-connection. */ export declare function buildMcpServerFactory(telegram: TelegramClient, telegramChatId: string, getMemoryDb: () => Database, threadLifecycle: ThreadLifecycleService): CreateMcpServerFn; //# sourceMappingURL=factory.d.ts.map