/** * Server setup and initialization */ import { Server } from "@modelcontextprotocol/sdk/server/index.js"; import { ToolRegistry } from '../handlers/ToolRegistry.js'; import { LRUCache } from '../cache/LRUCache.js'; import type { Tool } from "@modelcontextprotocol/sdk/types.js"; import type { ContextTracker } from '../security/encryption/ContextTracker.js'; import type { ElementCRUDHandler } from '../handlers/ElementCRUDHandler.js'; export declare class ServerSetup { private static readonly TOOL_CACHE_KEY; /** Issue #706: Max ms to wait for deferred setup before proceeding anyway. */ private static readonly DEFERRED_SETUP_TIMEOUT_MS; private toolCache; private contextTracker; private elementCrudHandler; /** Issue #706 Phase 4: Promise that resolves when deferred setup completes. */ private deferredSetupPromise; constructor(contextTracker: ContextTracker); /** * Issue #706 Phase 4: Set the deferred setup promise for request buffering. * First request after connect holds briefly until deferred setup completes * (or the timeout fires). Subsequent requests proceed immediately. */ setDeferredSetupPromise(promise: Promise): void; /** * Issue #706 Phase 4: Wait for deferred setup with a hard timeout. * No-op if already resolved or never set. */ private awaitDeferredSetup; /** * Initialize the server with all tools and handlers */ setupServer(server: Server, toolRegistry: ToolRegistry, elementCrudHandler?: ElementCRUDHandler): void; /** * Setup the ListToolsRequest handler with caching */ private setupListToolsHandler; /** * Setup the CallToolRequest handler */ private setupCallToolHandler; /** * Recursively normalize Unicode in all string values within arguments */ private normalizeArgumentsUnicode; /** * Get the tool discovery cache */ getToolCache(): LRUCache; /** * Invalidate the tool discovery cache (useful for external tool changes) */ invalidateToolCache(): void; /** * Log current cache performance metrics */ logCachePerformance(): void; /** * Get cache statistics for monitoring */ getCacheStatistics(): { toolCache: import("../cache/LRUCache.js").CacheStats; }; } //# sourceMappingURL=ServerSetup.d.ts.map