/** * Shared MCP server — one HTTP process serving multiple threads. * * Exposes POST /rpc/:threadName which accepts JSON-RPC messages * (the same protocol Claude CLI speaks over stdio). * Caches HistoryStore/ContentStore per thread so the embeddings * model loads once, not once per agent. */ import { ToolContext } from './tool-handler.js'; export interface SharedMcpServerOptions { /** Base directory containing thread data (e.g. ~/.cumulus) */ basePath: string; /** Port to listen on. 0 = random available port. */ port?: number; } export interface SharedMcpServerHandle { port: number; url: string; close: () => Promise; } export declare class StorePool { private stores; private basePath; private sweepTimer; private readonly ttlMs; constructor(basePath: string, options?: { ttlMs?: number; sweepMs?: number; }); /** Number of currently-resident thread contexts (observability/testing). */ get size(): number; /** Run the idle sweep immediately (used by the interval and by tests). */ reapNow(): void; /** Evict entries idle longer than the TTL. */ private reap; getContext(threadName: string): Promise; closeAll(): Promise; } export declare function startSharedMcpServer(options: SharedMcpServerOptions): Promise; //# sourceMappingURL=shared-server.d.ts.map