@1mcp/agent 0.32.1 → 0.33.0-beta1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/auth/oauthAuthorizationFlow.d.ts +145 -0
- package/build/auth/oauthAuthorizationFlow.d.ts.map +1 -0
- package/build/auth/oauthAuthorizationFlow.js +257 -0
- package/build/auth/oauthAuthorizationFlow.js.map +1 -0
- package/build/auth/sdkOAuthServerProvider.d.ts +4 -0
- package/build/auth/sdkOAuthServerProvider.d.ts.map +1 -1
- package/build/auth/sdkOAuthServerProvider.js +4 -0
- package/build/auth/sdkOAuthServerProvider.js.map +1 -1
- package/build/auth/storage/fileStorageService.d.ts.map +1 -1
- package/build/auth/storage/fileStorageService.js +9 -5
- package/build/auth/storage/fileStorageService.js.map +1 -1
- package/build/commands/cliSetup/setupFiles.d.ts +2 -4
- package/build/commands/cliSetup/setupFiles.d.ts.map +1 -1
- package/build/commands/cliSetup/setupFiles.js +8 -46
- package/build/commands/cliSetup/setupFiles.js.map +1 -1
- package/build/commands/inspect/inspect.d.ts +3 -0
- package/build/commands/inspect/inspect.d.ts.map +1 -1
- package/build/commands/inspect/inspect.js +90 -83
- package/build/commands/inspect/inspect.js.map +1 -1
- package/build/commands/instructions/instructions.d.ts.map +1 -1
- package/build/commands/instructions/instructions.js +11 -68
- package/build/commands/instructions/instructions.js.map +1 -1
- package/build/commands/mcp/install.d.ts.map +1 -1
- package/build/commands/mcp/install.js +62 -145
- package/build/commands/mcp/install.js.map +1 -1
- package/build/commands/mcp/installSource.d.ts +13 -0
- package/build/commands/mcp/installSource.d.ts.map +1 -0
- package/build/commands/mcp/installSource.js +69 -0
- package/build/commands/mcp/installSource.js.map +1 -0
- package/build/commands/mcp/uninstall.d.ts.map +1 -1
- package/build/commands/mcp/uninstall.js +20 -15
- package/build/commands/mcp/uninstall.js.map +1 -1
- package/build/commands/preset/edit.d.ts.map +1 -1
- package/build/commands/preset/edit.js +2 -0
- package/build/commands/preset/edit.js.map +1 -1
- package/build/commands/preset/interactive.d.ts.map +1 -1
- package/build/commands/preset/interactive.js +2 -0
- package/build/commands/preset/interactive.js.map +1 -1
- package/build/commands/preset/show.d.ts.map +1 -1
- package/build/commands/preset/show.js +2 -0
- package/build/commands/preset/show.js.map +1 -1
- package/build/commands/preset/test.d.ts.map +1 -1
- package/build/commands/preset/test.js +2 -0
- package/build/commands/preset/test.js.map +1 -1
- package/build/commands/proxy/proxy.d.ts.map +1 -1
- package/build/commands/proxy/proxy.js +11 -22
- package/build/commands/proxy/proxy.js.map +1 -1
- package/build/commands/registry/options.d.ts +14 -7
- package/build/commands/registry/options.d.ts.map +1 -1
- package/build/commands/registry/options.js +14 -7
- package/build/commands/registry/options.js.map +1 -1
- package/build/commands/run/run.d.ts +1 -0
- package/build/commands/run/run.d.ts.map +1 -1
- package/build/commands/run/run.js +124 -156
- package/build/commands/run/run.js.map +1 -1
- package/build/commands/serve/index.d.ts +5 -0
- package/build/commands/serve/index.d.ts.map +1 -1
- package/build/commands/serve/index.js +6 -1
- package/build/commands/serve/index.js.map +1 -1
- package/build/commands/serve/serve.d.ts +1 -0
- package/build/commands/serve/serve.d.ts.map +1 -1
- package/build/commands/serve/serve.js +5 -103
- package/build/commands/serve/serve.js.map +1 -1
- package/build/commands/serve/serveOptions.d.ts +6 -0
- package/build/commands/serve/serveOptions.d.ts.map +1 -0
- package/build/commands/serve/serveOptions.js +90 -0
- package/build/commands/serve/serveOptions.js.map +1 -0
- package/build/commands/shared/baseConfigUtils.d.ts +1 -25
- package/build/commands/shared/baseConfigUtils.d.ts.map +1 -1
- package/build/commands/shared/baseConfigUtils.js +3 -193
- package/build/commands/shared/baseConfigUtils.js.map +1 -1
- package/build/commands/shared/clientSurfaceAttachment.d.ts +131 -0
- package/build/commands/shared/clientSurfaceAttachment.d.ts.map +1 -0
- package/build/commands/shared/clientSurfaceAttachment.js +205 -0
- package/build/commands/shared/clientSurfaceAttachment.js.map +1 -0
- package/build/commands/shared/configParsingUtils.d.ts +9 -0
- package/build/commands/shared/configParsingUtils.d.ts.map +1 -0
- package/build/commands/shared/configParsingUtils.js +179 -0
- package/build/commands/shared/configParsingUtils.js.map +1 -0
- package/build/commands/shared/serveClient.d.ts.map +1 -1
- package/build/commands/shared/serveClient.js +35 -12
- package/build/commands/shared/serveClient.js.map +1 -1
- package/build/commands/shared/serveTargetResolver.d.ts.map +1 -1
- package/build/commands/shared/serveTargetResolver.js +42 -3
- package/build/commands/shared/serveTargetResolver.js.map +1 -1
- package/build/config/configLoader.d.ts +0 -1
- package/build/config/configLoader.d.ts.map +1 -1
- package/build/config/configLoader.js +12 -7
- package/build/config/configLoader.js.map +1 -1
- package/build/config/envProcessor.d.ts +3 -8
- package/build/config/envProcessor.d.ts.map +1 -1
- package/build/config/envProcessor.js +17 -34
- package/build/config/envProcessor.js.map +1 -1
- package/build/config/mcpConfigMerge.d.ts.map +1 -1
- package/build/config/mcpConfigMerge.js +15 -8
- package/build/config/mcpConfigMerge.js.map +1 -1
- package/build/constants/mcp.d.ts +1 -1
- package/build/constants/mcp.d.ts.map +1 -1
- package/build/constants/mcp.js +1 -1
- package/build/constants/mcp.js.map +1 -1
- package/build/core/capabilities/asyncLoadingOrchestrator.d.ts +2 -1
- package/build/core/capabilities/asyncLoadingOrchestrator.d.ts.map +1 -1
- package/build/core/capabilities/asyncLoadingOrchestrator.js +4 -1
- package/build/core/capabilities/asyncLoadingOrchestrator.js.map +1 -1
- package/build/core/capabilities/capabilityCatalog.d.ts +88 -0
- package/build/core/capabilities/capabilityCatalog.d.ts.map +1 -0
- package/build/core/capabilities/capabilityCatalog.js +235 -0
- package/build/core/capabilities/capabilityCatalog.js.map +1 -0
- package/build/core/capabilities/capabilityNotificationFacts.d.ts +9 -0
- package/build/core/capabilities/capabilityNotificationFacts.d.ts.map +1 -0
- package/build/core/capabilities/capabilityNotificationFacts.js +11 -0
- package/build/core/capabilities/capabilityNotificationFacts.js.map +1 -0
- package/build/core/capabilities/metaToolProvider.d.ts +2 -0
- package/build/core/capabilities/metaToolProvider.d.ts.map +1 -1
- package/build/core/capabilities/metaToolProvider.js +37 -77
- package/build/core/capabilities/metaToolProvider.js.map +1 -1
- package/build/core/capabilities/toolRegistry.d.ts +2 -1
- package/build/core/capabilities/toolRegistry.d.ts.map +1 -1
- package/build/core/capabilities/toolRegistry.js +2 -0
- package/build/core/capabilities/toolRegistry.js.map +1 -1
- package/build/core/configChangeHandler.d.ts +7 -2
- package/build/core/configChangeHandler.d.ts.map +1 -1
- package/build/core/configChangeHandler.js +47 -23
- package/build/core/configChangeHandler.js.map +1 -1
- package/build/core/filtering/filterSelection.d.ts +72 -0
- package/build/core/filtering/filterSelection.d.ts.map +1 -0
- package/build/core/filtering/filterSelection.js +262 -0
- package/build/core/filtering/filterSelection.js.map +1 -0
- package/build/core/instructions/instructionsDistribution.d.ts +52 -0
- package/build/core/instructions/instructionsDistribution.d.ts.map +1 -0
- package/build/core/instructions/instructionsDistribution.js +124 -0
- package/build/core/instructions/instructionsDistribution.js.map +1 -0
- package/build/core/loading/loadingStateTracker.d.ts +19 -0
- package/build/core/loading/loadingStateTracker.d.ts.map +1 -1
- package/build/core/loading/loadingStateTracker.js +37 -0
- package/build/core/loading/loadingStateTracker.js.map +1 -1
- package/build/core/loading/mcpLoadingManager.d.ts +103 -8
- package/build/core/loading/mcpLoadingManager.d.ts.map +1 -1
- package/build/core/loading/mcpLoadingManager.js +301 -31
- package/build/core/loading/mcpLoadingManager.js.map +1 -1
- package/build/core/protocol/notificationHandlers.js +2 -2
- package/build/core/protocol/notificationHandlers.js.map +1 -1
- package/build/core/protocol/promptRequestHandlers.d.ts +4 -0
- package/build/core/protocol/promptRequestHandlers.d.ts.map +1 -0
- package/build/core/protocol/promptRequestHandlers.js +64 -0
- package/build/core/protocol/promptRequestHandlers.js.map +1 -0
- package/build/core/protocol/requestHandlerUtils.d.ts +8 -0
- package/build/core/protocol/requestHandlerUtils.d.ts.map +1 -0
- package/build/core/protocol/requestHandlerUtils.js +48 -0
- package/build/core/protocol/requestHandlerUtils.js.map +1 -0
- package/build/core/protocol/requestHandlers.d.ts +2 -0
- package/build/core/protocol/requestHandlers.d.ts.map +1 -1
- package/build/core/protocol/requestHandlers.js +7 -391
- package/build/core/protocol/requestHandlers.js.map +1 -1
- package/build/core/protocol/resourceRequestHandlers.d.ts +3 -0
- package/build/core/protocol/resourceRequestHandlers.d.ts.map +1 -0
- package/build/core/protocol/resourceRequestHandlers.js +76 -0
- package/build/core/protocol/resourceRequestHandlers.js.map +1 -0
- package/build/core/protocol/toolRequestHandlers.d.ts +4 -0
- package/build/core/protocol/toolRequestHandlers.d.ts.map +1 -0
- package/build/core/protocol/toolRequestHandlers.js +132 -0
- package/build/core/protocol/toolRequestHandlers.js.map +1 -0
- package/build/core/server/adapters/TemplateServerAdapter.d.ts +0 -5
- package/build/core/server/adapters/TemplateServerAdapter.d.ts.map +1 -1
- package/build/core/server/adapters/TemplateServerAdapter.js +7 -30
- package/build/core/server/adapters/TemplateServerAdapter.js.map +1 -1
- package/build/core/server/clientInstanceFactory.d.ts +13 -0
- package/build/core/server/clientInstanceFactory.d.ts.map +1 -0
- package/build/core/server/clientInstanceFactory.js +32 -0
- package/build/core/server/clientInstanceFactory.js.map +1 -0
- package/build/core/server/clientInstancePool.d.ts +8 -49
- package/build/core/server/clientInstancePool.d.ts.map +1 -1
- package/build/core/server/clientInstancePool.js +61 -72
- package/build/core/server/clientInstancePool.js.map +1 -1
- package/build/core/server/clientInstancePoolTypes.d.ts +52 -0
- package/build/core/server/clientInstancePoolTypes.d.ts.map +1 -0
- package/build/core/server/clientInstancePoolTypes.js +10 -0
- package/build/core/server/clientInstancePoolTypes.js.map +1 -0
- package/build/core/server/connectionResolver.d.ts.map +1 -1
- package/build/core/server/connectionResolver.js +34 -31
- package/build/core/server/connectionResolver.js.map +1 -1
- package/build/core/server/mcpServerLifecycleManager.d.ts +9 -1
- package/build/core/server/mcpServerLifecycleManager.d.ts.map +1 -1
- package/build/core/server/mcpServerLifecycleManager.js +22 -0
- package/build/core/server/mcpServerLifecycleManager.js.map +1 -1
- package/build/core/server/requestContextPreparation.d.ts +38 -0
- package/build/core/server/requestContextPreparation.d.ts.map +1 -0
- package/build/core/server/requestContextPreparation.js +49 -0
- package/build/core/server/requestContextPreparation.js.map +1 -0
- package/build/core/server/serverManager.d.ts +8 -0
- package/build/core/server/serverManager.d.ts.map +1 -1
- package/build/core/server/serverManager.js +84 -2
- package/build/core/server/serverManager.js.map +1 -1
- package/build/core/server/templateIdentity.d.ts +44 -0
- package/build/core/server/templateIdentity.d.ts.map +1 -0
- package/build/core/server/templateIdentity.js +95 -0
- package/build/core/server/templateIdentity.js.map +1 -0
- package/build/core/server/templateServerCleanup.d.ts +23 -0
- package/build/core/server/templateServerCleanup.d.ts.map +1 -0
- package/build/core/server/templateServerCleanup.js +155 -0
- package/build/core/server/templateServerCleanup.js.map +1 -0
- package/build/core/server/templateServerManager.d.ts +12 -3
- package/build/core/server/templateServerManager.d.ts.map +1 -1
- package/build/core/server/templateServerManager.js +82 -127
- package/build/core/server/templateServerManager.js.map +1 -1
- package/build/core/tools/internal/adapters/installation/types.d.ts +16 -11
- package/build/core/tools/internal/adapters/installation/types.d.ts.map +1 -1
- package/build/core/tools/internal/adapters/installationAdapter.d.ts +3 -13
- package/build/core/tools/internal/adapters/installationAdapter.d.ts.map +1 -1
- package/build/core/tools/internal/adapters/installationAdapter.js +85 -69
- package/build/core/tools/internal/adapters/installationAdapter.js.map +1 -1
- package/build/core/tools/internal/installationHandlers.d.ts.map +1 -1
- package/build/core/tools/internal/installationHandlers.js +10 -4
- package/build/core/tools/internal/installationHandlers.js.map +1 -1
- package/build/core/tools/internal/integration.domainMocks.testSetup.d.ts +2 -0
- package/build/core/tools/internal/integration.domainMocks.testSetup.d.ts.map +1 -0
- package/build/core/tools/internal/integration.domainMocks.testSetup.js +66 -0
- package/build/core/tools/internal/integration.domainMocks.testSetup.js.map +1 -0
- package/build/core/tools/internal/integration.testSetup.d.ts +2 -0
- package/build/core/tools/internal/integration.testSetup.d.ts.map +1 -0
- package/build/core/tools/internal/integration.testSetup.js +469 -0
- package/build/core/tools/internal/integration.testSetup.js.map +1 -0
- package/build/core/tools/internal/schemas/index.d.ts +6 -0
- package/build/core/tools/internal/schemas/index.d.ts.map +1 -1
- package/build/core/tools/internal/schemas/installation.d.ts +6 -0
- package/build/core/tools/internal/schemas/installation.d.ts.map +1 -1
- package/build/core/tools/internal/schemas/installation.js +13 -1
- package/build/core/tools/internal/schemas/installation.js.map +1 -1
- package/build/domains/config-change/backupRetention.d.ts +14 -0
- package/build/domains/config-change/backupRetention.d.ts.map +1 -0
- package/build/domains/config-change/backupRetention.js +36 -0
- package/build/domains/config-change/backupRetention.js.map +1 -0
- package/build/domains/config-change/configChange.d.ts +4 -0
- package/build/domains/config-change/configChange.d.ts.map +1 -0
- package/build/domains/config-change/configChange.js +346 -0
- package/build/domains/config-change/configChange.js.map +1 -0
- package/build/domains/config-change/configLock.d.ts +6 -0
- package/build/domains/config-change/configLock.d.ts.map +1 -0
- package/build/domains/config-change/configLock.js +62 -0
- package/build/domains/config-change/configLock.js.map +1 -0
- package/build/domains/config-change/types.d.ts +64 -0
- package/build/domains/config-change/types.d.ts.map +1 -0
- package/build/domains/config-change/types.js +2 -0
- package/build/domains/config-change/types.js.map +1 -0
- package/build/domains/installation/index.d.ts +4 -3
- package/build/domains/installation/index.d.ts.map +1 -1
- package/build/domains/installation/index.js +5 -3
- package/build/domains/installation/index.js.map +1 -1
- package/build/domains/installation/serverInstallationSourceResolution.d.ts +6 -0
- package/build/domains/installation/serverInstallationSourceResolution.d.ts.map +1 -0
- package/build/domains/installation/serverInstallationSourceResolution.js +210 -0
- package/build/domains/installation/serverInstallationSourceResolution.js.map +1 -0
- package/build/domains/installation/serverInstallationTypes.d.ts +105 -0
- package/build/domains/installation/serverInstallationTypes.d.ts.map +1 -0
- package/build/domains/installation/serverInstallationTypes.js +2 -0
- package/build/domains/installation/serverInstallationTypes.js.map +1 -0
- package/build/domains/installation/serverInstallationWorkflow.d.ts +4 -0
- package/build/domains/installation/serverInstallationWorkflow.d.ts.map +1 -0
- package/build/domains/installation/serverInstallationWorkflow.js +148 -0
- package/build/domains/installation/serverInstallationWorkflow.js.map +1 -0
- package/build/domains/preset/manager/presetManager.d.ts +0 -4
- package/build/domains/preset/manager/presetManager.d.ts.map +1 -1
- package/build/domains/preset/manager/presetManager.js +19 -153
- package/build/domains/preset/manager/presetManager.js.map +1 -1
- package/build/domains/preset/manager/presetManagerCleanup.d.ts +15 -0
- package/build/domains/preset/manager/presetManagerCleanup.d.ts.map +1 -0
- package/build/domains/preset/manager/presetManagerCleanup.js +34 -0
- package/build/domains/preset/manager/presetManagerCleanup.js.map +1 -0
- package/build/domains/preset/manager/presetStorage.d.ts +4 -0
- package/build/domains/preset/manager/presetStorage.d.ts.map +1 -0
- package/build/domains/preset/manager/presetStorage.js +27 -0
- package/build/domains/preset/manager/presetStorage.js.map +1 -0
- package/build/domains/preset/manager/presetTesting.d.ts +8 -0
- package/build/domains/preset/manager/presetTesting.d.ts.map +1 -0
- package/build/domains/preset/manager/presetTesting.js +38 -0
- package/build/domains/preset/manager/presetTesting.js.map +1 -0
- package/build/domains/preset/manager/presetValidation.d.ts +3 -0
- package/build/domains/preset/manager/presetValidation.d.ts.map +1 -0
- package/build/domains/preset/manager/presetValidation.js +41 -0
- package/build/domains/preset/manager/presetValidation.js.map +1 -0
- package/build/domains/registry/cacheManager.d.ts.map +1 -1
- package/build/domains/registry/cacheManager.js +1 -0
- package/build/domains/registry/cacheManager.js.map +1 -1
- package/build/domains/registry/mcpRegistryClient.d.ts.map +1 -1
- package/build/domains/registry/mcpRegistryClient.js +2 -1
- package/build/domains/registry/mcpRegistryClient.js.map +1 -1
- package/build/server.d.ts.map +1 -1
- package/build/server.js +1 -0
- package/build/server.js.map +1 -1
- package/build/transport/http/middlewares/scopeAuthMiddleware.d.ts +3 -0
- package/build/transport/http/middlewares/scopeAuthMiddleware.d.ts.map +1 -1
- package/build/transport/http/middlewares/scopeAuthMiddleware.js +18 -28
- package/build/transport/http/middlewares/scopeAuthMiddleware.js.map +1 -1
- package/build/transport/http/middlewares/tagsExtractor.d.ts.map +1 -1
- package/build/transport/http/middlewares/tagsExtractor.js +46 -255
- package/build/transport/http/middlewares/tagsExtractor.js.map +1 -1
- package/build/transport/http/routes/cliTokenRoute.d.ts.map +1 -1
- package/build/transport/http/routes/cliTokenRoute.js +20 -14
- package/build/transport/http/routes/cliTokenRoute.js.map +1 -1
- package/build/transport/http/routes/inspectRequestContext.d.ts +5 -0
- package/build/transport/http/routes/inspectRequestContext.d.ts.map +1 -0
- package/build/transport/http/routes/inspectRequestContext.js +59 -0
- package/build/transport/http/routes/inspectRequestContext.js.map +1 -0
- package/build/transport/http/routes/inspectRoutes.d.ts +3 -3
- package/build/transport/http/routes/inspectRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/inspectRoutes.js +60 -83
- package/build/transport/http/routes/inspectRoutes.js.map +1 -1
- package/build/transport/http/routes/oauthRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/oauthRoutes.js +99 -223
- package/build/transport/http/routes/oauthRoutes.js.map +1 -1
- package/build/transport/http/routes/streamableHttpRoutes.d.ts +2 -2
- package/build/transport/http/routes/streamableHttpRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/streamableHttpRoutes.js +39 -84
- package/build/transport/http/routes/streamableHttpRoutes.js.map +1 -1
- package/build/transport/http/routes/toolRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/toolRoutes.js +138 -39
- package/build/transport/http/routes/toolRoutes.js.map +1 -1
- package/build/transport/http/server.d.ts.map +1 -1
- package/build/transport/http/server.js +93 -0
- package/build/transport/http/server.js.map +1 -1
- package/build/transport/http/streamableSessionLifecycle.d.ts +90 -0
- package/build/transport/http/streamableSessionLifecycle.d.ts.map +1 -0
- package/build/transport/http/streamableSessionLifecycle.js +348 -0
- package/build/transport/http/streamableSessionLifecycle.js.map +1 -0
- package/build/transport/http/utils/contextExtractor.d.ts +1 -1
- package/build/transport/http/utils/contextExtractor.d.ts.map +1 -1
- package/build/transport/http/utils/contextExtractor.js +1 -33
- package/build/transport/http/utils/contextExtractor.js.map +1 -1
- package/build/transport/stdioProxyTransport.d.ts +1 -0
- package/build/transport/stdioProxyTransport.d.ts.map +1 -1
- package/build/transport/stdioProxyTransport.js +3 -0
- package/build/transport/stdioProxyTransport.js.map +1 -1
- package/build/transport/transportFactory.d.ts +1 -2
- package/build/transport/transportFactory.d.ts.map +1 -1
- package/build/transport/transportFactory.js +54 -4
- package/build/transport/transportFactory.js.map +1 -1
- package/build/transport/transportFactory.testSetup.d.ts +2 -0
- package/build/transport/transportFactory.testSetup.d.ts.map +1 -0
- package/build/transport/transportFactory.testSetup.js +83 -0
- package/build/transport/transportFactory.testSetup.js.map +1 -0
- package/build/utils/context/sessionIdentity.d.ts +9 -0
- package/build/utils/context/sessionIdentity.d.ts.map +1 -0
- package/build/utils/context/sessionIdentity.js +39 -0
- package/build/utils/context/sessionIdentity.js.map +1 -0
- package/build/utils/ui/interactiveSelector.d.ts +0 -25
- package/build/utils/ui/interactiveSelector.d.ts.map +1 -1
- package/build/utils/ui/interactiveSelector.js +12 -329
- package/build/utils/ui/interactiveSelector.js.map +1 -1
- package/build/utils/ui/interactiveSelectorPrompts.d.ts +7 -0
- package/build/utils/ui/interactiveSelectorPrompts.d.ts.map +1 -0
- package/build/utils/ui/interactiveSelectorPrompts.js +60 -0
- package/build/utils/ui/interactiveSelectorPrompts.js.map +1 -0
- package/build/utils/ui/interactiveSelectorQuery.d.ts +5 -0
- package/build/utils/ui/interactiveSelectorQuery.d.ts.map +1 -0
- package/build/utils/ui/interactiveSelectorQuery.js +67 -0
- package/build/utils/ui/interactiveSelectorQuery.js.map +1 -0
- package/build/utils/ui/interactiveSelectorTagUi.d.ts +7 -0
- package/build/utils/ui/interactiveSelectorTagUi.d.ts.map +1 -0
- package/build/utils/ui/interactiveSelectorTagUi.js +129 -0
- package/build/utils/ui/interactiveSelectorTagUi.js.map +1 -0
- package/package.json +2 -2
- package/build/transport/http/utils/sessionService.d.ts +0 -106
- package/build/transport/http/utils/sessionService.d.ts.map +0 -1
- package/build/transport/http/utils/sessionService.js +0 -342
- package/build/transport/http/utils/sessionService.js.map +0 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { CompleteRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import { MCP_URI_SEPARATOR } from '../../constants.js';
|
|
3
|
+
import { byCapabilities } from '../../core/filtering/clientFiltering.js';
|
|
4
|
+
import { FilteringService } from '../../core/filtering/filteringService.js';
|
|
5
|
+
import { withErrorHandling } from '../../utils/core/errorHandling.js';
|
|
6
|
+
import { buildUri, parseUri } from '../../utils/core/parsing.js';
|
|
7
|
+
import { getRequestTimeout } from '../../utils/core/timeoutUtils.js';
|
|
8
|
+
import { handlePagination } from '../../utils/ui/pagination.js';
|
|
9
|
+
import { filterConnectionsForSession, getRequestSession, resolveOutboundConnection } from './requestHandlerUtils.js';
|
|
10
|
+
export function registerPromptHandlers(outboundConns, inboundConn) {
|
|
11
|
+
const sessionId = getRequestSession(inboundConn);
|
|
12
|
+
inboundConn.server.setRequestHandler(ListPromptsRequestSchema, withErrorHandling(async (request) => {
|
|
13
|
+
const sessionFilteredConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
14
|
+
const capabilityFilteredClients = byCapabilities({ prompts: {} })(sessionFilteredConns);
|
|
15
|
+
const filteredClients = FilteringService.getFilteredConnections(capabilityFilteredClients, inboundConn);
|
|
16
|
+
const result = await handlePagination(filteredClients, request.params || {}, (client, params, opts) => client.listPrompts(params, opts), (outboundConn, result) => result.prompts?.map((prompt) => ({
|
|
17
|
+
...prompt,
|
|
18
|
+
name: buildUri(outboundConn.name, prompt.name, MCP_URI_SEPARATOR),
|
|
19
|
+
})) ?? [], inboundConn.enablePagination ?? false);
|
|
20
|
+
return {
|
|
21
|
+
prompts: result.items,
|
|
22
|
+
nextCursor: result.nextCursor,
|
|
23
|
+
};
|
|
24
|
+
}, 'Error listing prompts'));
|
|
25
|
+
inboundConn.server.setRequestHandler(GetPromptRequestSchema, withErrorHandling(async (request) => {
|
|
26
|
+
const { clientName, resourceName: promptName } = parseUri(request.params.name, MCP_URI_SEPARATOR);
|
|
27
|
+
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns, inboundConn);
|
|
28
|
+
if (!outboundConn) {
|
|
29
|
+
throw new Error(`Unknown client: ${clientName}`);
|
|
30
|
+
}
|
|
31
|
+
return outboundConn.client.getPrompt({ ...request.params, name: promptName }, {
|
|
32
|
+
timeout: getRequestTimeout(outboundConn.transport),
|
|
33
|
+
});
|
|
34
|
+
}, 'Error getting prompt'));
|
|
35
|
+
}
|
|
36
|
+
export function registerCompletionHandlers(outboundConns, inboundConn) {
|
|
37
|
+
const sessionId = getRequestSession(inboundConn);
|
|
38
|
+
inboundConn.server.setRequestHandler(CompleteRequestSchema, withErrorHandling(async (request) => {
|
|
39
|
+
const { ref } = request.params;
|
|
40
|
+
let clientName;
|
|
41
|
+
let updatedRef;
|
|
42
|
+
if (ref.type === 'ref/prompt') {
|
|
43
|
+
const { clientName: cn, resourceName } = parseUri(ref.name, MCP_URI_SEPARATOR);
|
|
44
|
+
clientName = cn;
|
|
45
|
+
updatedRef = { ...ref, name: resourceName };
|
|
46
|
+
}
|
|
47
|
+
else if (ref.type === 'ref/resource') {
|
|
48
|
+
const { clientName: cn, resourceName } = parseUri(ref.uri, MCP_URI_SEPARATOR);
|
|
49
|
+
clientName = cn;
|
|
50
|
+
updatedRef = { ...ref, uri: resourceName };
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
throw new Error(`Unsupported completion reference type: ${ref.type}`);
|
|
54
|
+
}
|
|
55
|
+
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns, inboundConn);
|
|
56
|
+
if (!outboundConn) {
|
|
57
|
+
throw new Error(`Unknown client: ${clientName}`);
|
|
58
|
+
}
|
|
59
|
+
return outboundConn.client.complete({ ...request.params, ref: updatedRef }, {
|
|
60
|
+
timeout: getRequestTimeout(outboundConn.transport),
|
|
61
|
+
});
|
|
62
|
+
}, 'Error handling completion'));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=promptRequestHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptRequestHandlers.js","sourceRoot":"","sources":["../../../src/core/protocol/promptRequestHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,qBAAqB,EACrB,sBAAsB,EAEtB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAErH,MAAM,UAAU,sBAAsB,CAAC,aAAkC,EAAE,WAA8B;IACvG,MAAM,SAAS,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEjD,WAAW,CAAC,MAAM,CAAC,iBAAiB,CAClC,wBAAwB,EACxB,iBAAiB,CAAC,KAAK,EAAE,OAA2B,EAAE,EAAE;QACtD,MAAM,oBAAoB,GAAG,2BAA2B,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;QACnF,MAAM,yBAAyB,GAAG,cAAc,CAAC,EAAE,OAAO,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F,CAAC;QAED,MAAM,YAAY,GAAG,yBAAyB,CAAC,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;QAClG,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,YAAY,CAAC,MAAM,CAAC,QAAQ,CACjC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,EACtC;YACE,OAAO,EAAE,iBAAiB,CAAC,YAAY,CAAC,SAAS,CAAC;SACnD,CACF,CAAC;IACJ,CAAC,EAAE,2BAA2B,CAAC,CAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CapabilityCatalog } from '../../core/capabilities/capabilityCatalog.js';
|
|
2
|
+
import { InboundConnection, OutboundConnection, OutboundConnections } from '../../core/types/index.js';
|
|
3
|
+
import type { MCPServerParams } from '../../core/types/transport.js';
|
|
4
|
+
export declare function getRequestSession(inboundConn: InboundConnection): string | undefined;
|
|
5
|
+
export declare function createCapabilityCatalogFromConnections(connections: OutboundConnections, getServerConfigs?: () => Record<string, MCPServerParams>): Promise<CapabilityCatalog>;
|
|
6
|
+
export declare function resolveOutboundConnection(clientName: string, sessionId: string | undefined, outboundConns: OutboundConnections, inboundConn?: InboundConnection): OutboundConnection | undefined;
|
|
7
|
+
export declare function filterConnectionsForSession(outboundConns: OutboundConnections, sessionId: string | undefined): OutboundConnections;
|
|
8
|
+
//# sourceMappingURL=requestHandlerUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHandlerUtils.d.ts","sourceRoot":"","sources":["../../../src/core/protocol/requestHandlerUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAMhF,OAAO,EAAgB,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAGpE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,iBAAiB,GAAG,MAAM,GAAG,SAAS,CAEpF;AAED,wBAAsB,sCAAsC,CAC1D,WAAW,EAAE,mBAAmB,EAChC,gBAAgB,GAAE,MAAM,MAAM,CAAC,MAAM,EAAE,eAAe,CAA6D,GAClH,OAAO,CAAC,iBAAiB,CAAC,CA8B5B;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,aAAa,EAAE,mBAAmB,EAClC,WAAW,CAAC,EAAE,iBAAiB,GAC9B,kBAAkB,GAAG,SAAS,CAMhC;AAED,wBAAgB,2BAA2B,CACzC,aAAa,EAAE,mBAAmB,EAClC,SAAS,EAAE,MAAM,GAAG,SAAS,GAC5B,mBAAmB,CAIrB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { McpConfigManager } from '../../config/mcpConfigManager.js';
|
|
2
|
+
import { CapabilityCatalog } from '../../core/capabilities/capabilityCatalog.js';
|
|
3
|
+
import { SchemaCache } from '../../core/capabilities/schemaCache.js';
|
|
4
|
+
import { ToolRegistry } from '../../core/capabilities/toolRegistry.js';
|
|
5
|
+
import { FilteringService } from '../../core/filtering/filteringService.js';
|
|
6
|
+
import { createConnectionResolver } from '../../core/server/connectionResolver.js';
|
|
7
|
+
import { ServerManager } from '../../core/server/serverManager.js';
|
|
8
|
+
import { ClientStatus } from '../../core/types/index.js';
|
|
9
|
+
import { getRequestTimeout } from '../../utils/core/timeoutUtils.js';
|
|
10
|
+
export function getRequestSession(inboundConn) {
|
|
11
|
+
return inboundConn.context?.sessionId;
|
|
12
|
+
}
|
|
13
|
+
export async function createCapabilityCatalogFromConnections(connections, getServerConfigs = () => McpConfigManager.getInstance().getTransportConfig()) {
|
|
14
|
+
const toolsByServer = new Map();
|
|
15
|
+
const tagsByServer = new Map();
|
|
16
|
+
await Promise.all(Array.from(connections.entries()).map(async ([connectionKey, connection]) => {
|
|
17
|
+
if (connection.status !== ClientStatus.Connected)
|
|
18
|
+
return;
|
|
19
|
+
const serverName = connection.name || (connectionKey.includes(':') ? connectionKey.split(':')[0] : connectionKey);
|
|
20
|
+
const result = await connection.client.listTools(undefined, {
|
|
21
|
+
timeout: getRequestTimeout(connection.transport),
|
|
22
|
+
});
|
|
23
|
+
toolsByServer.set(serverName, result.tools ?? []);
|
|
24
|
+
tagsByServer.set(serverName, Array.isArray(connection.transport.tags)
|
|
25
|
+
? connection.transport.tags.filter((tag) => typeof tag === 'string')
|
|
26
|
+
: []);
|
|
27
|
+
}));
|
|
28
|
+
return new CapabilityCatalog({
|
|
29
|
+
getToolRegistry: () => ToolRegistry.fromToolsMap(toolsByServer, tagsByServer),
|
|
30
|
+
schemaCache: new SchemaCache({ maxEntries: 100 }),
|
|
31
|
+
outboundConnections: connections,
|
|
32
|
+
getServerConfigs,
|
|
33
|
+
templateHashProvider: ServerManager.current.getTemplateServerManager(),
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export function resolveOutboundConnection(clientName, sessionId, outboundConns, inboundConn) {
|
|
37
|
+
const scopedConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
38
|
+
const filteredConns = inboundConn ? FilteringService.getFilteredConnections(scopedConns, inboundConn) : scopedConns;
|
|
39
|
+
const templateServerManager = ServerManager.current.getTemplateServerManager();
|
|
40
|
+
const resolver = createConnectionResolver(filteredConns, templateServerManager);
|
|
41
|
+
return resolver.resolve(clientName, sessionId);
|
|
42
|
+
}
|
|
43
|
+
export function filterConnectionsForSession(outboundConns, sessionId) {
|
|
44
|
+
const templateServerManager = ServerManager.current.getTemplateServerManager();
|
|
45
|
+
const resolver = createConnectionResolver(outboundConns, templateServerManager);
|
|
46
|
+
return resolver.filterForSession(sessionId);
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL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,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;IACpH,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAC/E,MAAM,QAAQ,GAAG,wBAAwB,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;IAChF,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,2BAA2B,CACzC,aAAkC,EAClC,SAA6B;IAE7B,MAAM,qBAAqB,GAAG,aAAa,CAAC,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAC/E,MAAM,QAAQ,GAAG,wBAAwB,CAAC,aAAa,EAAE,qBAAqB,CAAC,CAAC;IAChF,OAAO,QAAQ,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { LazyLoadingOrchestrator } from '../../core/capabilities/lazyLoadingOrchestrator.js';
|
|
2
2
|
import { InboundConnection, OutboundConnections } from '../../core/types/index.js';
|
|
3
|
+
import { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection } from './requestHandlerUtils.js';
|
|
4
|
+
export { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection, };
|
|
3
5
|
/**
|
|
4
6
|
* Registers all request handlers based on available capabilities
|
|
5
7
|
* @param clients Record of client instances
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../../../src/core/protocol/requestHandlers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../../../src/core/protocol/requestHandlers.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAE5F,OAAO,EAAgB,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAMhG,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAIlC,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,GAC1B,CAAC;AAsEF;;;;;;GAMG;AAEH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,mBAAmB,EAClC,WAAW,EAAE,iBAAiB,EAC9B,uBAAuB,CAAC,EAAE,uBAAuB,GAChD,IAAI,CA6CN"}
|
|
@@ -1,67 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { McpConfigManager } from '../../config/mcpConfigManager.js';
|
|
3
|
-
import { MCP_URI_SEPARATOR } from '../../constants.js';
|
|
4
|
-
import { InternalCapabilitiesProvider } from '../../core/capabilities/internalCapabilitiesProvider.js';
|
|
5
|
-
import { byCapabilities } from '../../core/filtering/clientFiltering.js';
|
|
6
|
-
import { FilteringService } from '../../core/filtering/filteringService.js';
|
|
7
|
-
import { createConnectionResolver } from '../../core/server/connectionResolver.js';
|
|
8
|
-
import { filterDisabledTools, getDisabledToolError } from '../../core/server/disabledTools.js';
|
|
1
|
+
import { CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema, PingRequestSchema, SetLevelRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
9
2
|
import { ServerManager } from '../../core/server/serverManager.js';
|
|
10
3
|
import { ClientStatus } from '../../core/types/index.js';
|
|
11
|
-
import { setLogLevel } from '../../logger/logger.js';
|
|
12
|
-
import logger from '../../logger/logger.js';
|
|
4
|
+
import logger, { setLogLevel } from '../../logger/logger.js';
|
|
13
5
|
import { withErrorHandling } from '../../utils/core/errorHandling.js';
|
|
14
|
-
import { buildUri, parseUri } from '../../utils/core/parsing.js';
|
|
15
6
|
import { getRequestTimeout } from '../../utils/core/timeoutUtils.js';
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
22
|
-
function getRequestSession(inboundConn) {
|
|
23
|
-
return inboundConn.context?.sessionId;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Resolve outbound connection by client name and session ID.
|
|
27
|
-
* Key format:
|
|
28
|
-
* - Static servers: name (no colon)
|
|
29
|
-
* - Shareable template servers: name:renderedHash
|
|
30
|
-
* - Per-client template servers: name:sessionId
|
|
31
|
-
*
|
|
32
|
-
* Resolution order:
|
|
33
|
-
* 1. Try session-scoped key (for per-client template servers: name:sessionId)
|
|
34
|
-
* 2. Try rendered hash-based key (for shareable template servers: name:renderedHash)
|
|
35
|
-
* 3. Fall back to direct name lookup (for static servers: name)
|
|
36
|
-
*
|
|
37
|
-
* @param clientName The client/server name
|
|
38
|
-
* @param sessionId The session ID (optional)
|
|
39
|
-
* @param outboundConns The outbound connections map
|
|
40
|
-
* @returns The resolved outbound connection or undefined
|
|
41
|
-
*/
|
|
42
|
-
function resolveOutboundConnection(clientName, sessionId, outboundConns) {
|
|
43
|
-
// Delegate to ConnectionResolver for cleaner abstraction
|
|
44
|
-
const templateServerManager = ServerManager.current.getTemplateServerManager();
|
|
45
|
-
const resolver = createConnectionResolver(outboundConns, templateServerManager);
|
|
46
|
-
return resolver.resolve(clientName, sessionId);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Filter outbound connections for a specific session.
|
|
50
|
-
* Key format:
|
|
51
|
-
* - Static servers: name (no colon) - always included
|
|
52
|
-
* - Shareable template servers: name:renderedHash - included if session uses this hash
|
|
53
|
-
* - Per-client template servers: name:sessionId - only included if session matches
|
|
54
|
-
*
|
|
55
|
-
* @param outboundConns The outbound connections map
|
|
56
|
-
* @param sessionId The session ID (optional)
|
|
57
|
-
* @returns A filtered map of outbound connections
|
|
58
|
-
*/
|
|
59
|
-
function filterConnectionsForSession(outboundConns, sessionId) {
|
|
60
|
-
// Delegate to ConnectionResolver for cleaner abstraction
|
|
61
|
-
const templateServerManager = ServerManager.current.getTemplateServerManager();
|
|
62
|
-
const resolver = createConnectionResolver(outboundConns, templateServerManager);
|
|
63
|
-
return resolver.filterForSession(sessionId);
|
|
64
|
-
}
|
|
7
|
+
import { registerCompletionHandlers, registerPromptHandlers } from './promptRequestHandlers.js';
|
|
8
|
+
import { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection, } from './requestHandlerUtils.js';
|
|
9
|
+
import { registerResourceHandlers } from './resourceRequestHandlers.js';
|
|
10
|
+
import { registerToolHandlers } from './toolRequestHandlers.js';
|
|
11
|
+
export { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection, };
|
|
65
12
|
/**
|
|
66
13
|
* Registers server-specific request handlers
|
|
67
14
|
* @param outboundConns Record of client instances
|
|
@@ -143,335 +90,4 @@ export function registerRequestHandlers(outboundConns, inboundConn, lazyLoadingO
|
|
|
143
90
|
// Register server-specific request handlers
|
|
144
91
|
registerServerRequestHandlers(outboundConns, inboundConn);
|
|
145
92
|
}
|
|
146
|
-
/**
|
|
147
|
-
* Registers resource-related request handlers
|
|
148
|
-
* @param clients Record of client instances
|
|
149
|
-
* @param serverInfo The MCP server instance
|
|
150
|
-
*/
|
|
151
|
-
function registerResourceHandlers(outboundConns, inboundConn) {
|
|
152
|
-
const sessionId = getRequestSession(inboundConn);
|
|
153
|
-
// List Resources handler
|
|
154
|
-
inboundConn.server.setRequestHandler(ListResourcesRequestSchema, withErrorHandling(async (request) => {
|
|
155
|
-
// Filter connections for this session first
|
|
156
|
-
const sessionFilteredConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
157
|
-
// Then filter by capabilities, then by tags
|
|
158
|
-
const capabilityFilteredClients = byCapabilities({ resources: {} })(sessionFilteredConns);
|
|
159
|
-
const filteredClients = FilteringService.getFilteredConnections(capabilityFilteredClients, inboundConn);
|
|
160
|
-
const result = await handlePagination(filteredClients, request.params || {}, (client, params, opts) => client.listResources(params, opts), (outboundConn, result) => result.resources?.map((resource) => ({
|
|
161
|
-
...resource,
|
|
162
|
-
uri: buildUri(outboundConn.name, resource.uri, MCP_URI_SEPARATOR),
|
|
163
|
-
})) ?? [], inboundConn.enablePagination ?? false);
|
|
164
|
-
return {
|
|
165
|
-
resources: result.items,
|
|
166
|
-
nextCursor: result.nextCursor,
|
|
167
|
-
};
|
|
168
|
-
}, 'Error listing resources'));
|
|
169
|
-
// List Resource Templates handler
|
|
170
|
-
inboundConn.server.setRequestHandler(ListResourceTemplatesRequestSchema, withErrorHandling(async (request) => {
|
|
171
|
-
// Filter connections for this session first
|
|
172
|
-
const sessionFilteredConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
173
|
-
// Then filter by capabilities, then by tags
|
|
174
|
-
const capabilityFilteredClients = byCapabilities({ resources: {} })(sessionFilteredConns);
|
|
175
|
-
const filteredClients = FilteringService.getFilteredConnections(capabilityFilteredClients, inboundConn);
|
|
176
|
-
const result = await handlePagination(filteredClients, request.params || {}, (client, params, opts) => client.listResourceTemplates(params, opts), (outboundConn, result) => result.resourceTemplates?.map((template) => ({
|
|
177
|
-
...template,
|
|
178
|
-
uriTemplate: buildUri(outboundConn.name, template.uriTemplate, MCP_URI_SEPARATOR),
|
|
179
|
-
})) ?? [], inboundConn.enablePagination ?? false);
|
|
180
|
-
return {
|
|
181
|
-
resourceTemplates: result.items,
|
|
182
|
-
nextCursor: result.nextCursor,
|
|
183
|
-
};
|
|
184
|
-
}, 'Error listing resource templates'));
|
|
185
|
-
// Subscribe Resource handler
|
|
186
|
-
inboundConn.server.setRequestHandler(SubscribeRequestSchema, withErrorHandling(async (request) => {
|
|
187
|
-
const { clientName, resourceName } = parseUri(request.params.uri, MCP_URI_SEPARATOR);
|
|
188
|
-
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns);
|
|
189
|
-
if (!outboundConn) {
|
|
190
|
-
throw new Error(`Unknown client: ${clientName}`);
|
|
191
|
-
}
|
|
192
|
-
return outboundConn.client.subscribeResource({ ...request.params, uri: resourceName }, {
|
|
193
|
-
timeout: getRequestTimeout(outboundConn.transport),
|
|
194
|
-
});
|
|
195
|
-
}, 'Error subscribing to resource'));
|
|
196
|
-
// Unsubscribe Resource handler
|
|
197
|
-
inboundConn.server.setRequestHandler(UnsubscribeRequestSchema, withErrorHandling(async (request) => {
|
|
198
|
-
const { clientName, resourceName } = parseUri(request.params.uri, MCP_URI_SEPARATOR);
|
|
199
|
-
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns);
|
|
200
|
-
if (!outboundConn) {
|
|
201
|
-
throw new Error(`Unknown client: ${clientName}`);
|
|
202
|
-
}
|
|
203
|
-
return outboundConn.client.unsubscribeResource({ ...request.params, uri: resourceName }, {
|
|
204
|
-
timeout: getRequestTimeout(outboundConn.transport),
|
|
205
|
-
});
|
|
206
|
-
}, 'Error unsubscribing from resource'));
|
|
207
|
-
// Read Resource handler
|
|
208
|
-
inboundConn.server.setRequestHandler(ReadResourceRequestSchema, withErrorHandling(async (request) => {
|
|
209
|
-
const { clientName, resourceName } = parseUri(request.params.uri, MCP_URI_SEPARATOR);
|
|
210
|
-
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns);
|
|
211
|
-
if (!outboundConn) {
|
|
212
|
-
throw new Error(`Unknown client: ${clientName}`);
|
|
213
|
-
}
|
|
214
|
-
const resource = await outboundConn.client.readResource({ ...request.params, uri: resourceName }, {
|
|
215
|
-
timeout: getRequestTimeout(outboundConn.transport),
|
|
216
|
-
});
|
|
217
|
-
// Transform resource content URIs to include client name prefix
|
|
218
|
-
const transformedResource = {
|
|
219
|
-
...resource,
|
|
220
|
-
contents: resource.contents.map((content) => ({
|
|
221
|
-
...content,
|
|
222
|
-
uri: buildUri(outboundConn.name, content.uri, MCP_URI_SEPARATOR),
|
|
223
|
-
})),
|
|
224
|
-
};
|
|
225
|
-
return transformedResource;
|
|
226
|
-
}, 'Error reading resource'));
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Registers tool-related request handlers
|
|
230
|
-
* @param clients Record of client instances
|
|
231
|
-
* @param serverInfo The MCP server instance
|
|
232
|
-
*/
|
|
233
|
-
function registerToolHandlers(outboundConns, inboundConn, lazyLoadingOrchestrator) {
|
|
234
|
-
const sessionId = getRequestSession(inboundConn);
|
|
235
|
-
const lazyLoadingEnabled = lazyLoadingOrchestrator?.isEnabled();
|
|
236
|
-
const getServerConfigs = () => McpConfigManager.getInstance().getTransportConfig();
|
|
237
|
-
// List Tools handler
|
|
238
|
-
inboundConn.server.setRequestHandler(ListToolsRequestSchema, withErrorHandling(async (request) => {
|
|
239
|
-
// If lazy loading is enabled, use LazyLoadingOrchestrator for tool listing
|
|
240
|
-
if (lazyLoadingEnabled && lazyLoadingOrchestrator) {
|
|
241
|
-
// Apply the same filtering chain as normal mode
|
|
242
|
-
// Step 1: Filter by session (for template servers like serena)
|
|
243
|
-
const sessionFilteredConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
244
|
-
// Step 2: Filter by capability (servers with tools)
|
|
245
|
-
const capabilityFilteredClients = byCapabilities({ tools: {} })(sessionFilteredConns);
|
|
246
|
-
// Step 3: Filter by preset/tag configuration
|
|
247
|
-
const filteredClients = FilteringService.getFilteredConnections(capabilityFilteredClients, inboundConn);
|
|
248
|
-
// Get the set of filtered server names
|
|
249
|
-
const filteredServerNames = new Set(Array.from(filteredClients.values()).map((conn) => conn.name));
|
|
250
|
-
// Debug logging
|
|
251
|
-
logger.info('Lazy loading: filtered servers', {
|
|
252
|
-
totalOutbound: outboundConns.size,
|
|
253
|
-
sessionFiltered: sessionFilteredConns.size,
|
|
254
|
-
capabilityFiltered: capabilityFilteredClients.size,
|
|
255
|
-
finalFiltered: filteredClients.size,
|
|
256
|
-
filteredServerNames: Array.from(filteredServerNames),
|
|
257
|
-
inboundConfig: {
|
|
258
|
-
tagFilterMode: inboundConn.tagFilterMode,
|
|
259
|
-
tags: inboundConn.tags,
|
|
260
|
-
tagExpression: inboundConn.tagExpression,
|
|
261
|
-
},
|
|
262
|
-
});
|
|
263
|
-
// Get capabilities from orchestrator with filtered servers
|
|
264
|
-
// Store the session filter so that subsequent tool_list meta-tool calls
|
|
265
|
-
// will return only tools from the filtered servers
|
|
266
|
-
const capabilities = await lazyLoadingOrchestrator.getCapabilitiesForFilteredServers(filteredServerNames, sessionId);
|
|
267
|
-
// Get internal tools (always fully loaded) - filter out lazy tools when lazy loading is enabled
|
|
268
|
-
const internalProvider = InternalCapabilitiesProvider.getInstance();
|
|
269
|
-
await internalProvider.initialize();
|
|
270
|
-
const internalTools = internalProvider.getAvailableTools();
|
|
271
|
-
// Filter out lazy tools since they're provided by the MetaToolProvider
|
|
272
|
-
const lazyToolNames = ['tool_list', 'tool_schema', 'tool_invoke'];
|
|
273
|
-
const nonLazyTools = internalTools.filter((tool) => !lazyToolNames.includes(tool.name));
|
|
274
|
-
// Add internal tools to the result (with 1mcp prefix)
|
|
275
|
-
const internalToolsWithPrefix = nonLazyTools.map((tool) => ({
|
|
276
|
-
...tool,
|
|
277
|
-
name: buildUri('1mcp', tool.name, MCP_URI_SEPARATOR),
|
|
278
|
-
}));
|
|
279
|
-
// Combine lazy-loaded tools with internal tools
|
|
280
|
-
const allTools = [...capabilities.tools, ...internalToolsWithPrefix];
|
|
281
|
-
return {
|
|
282
|
-
tools: allTools,
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
// Normal mode: get tools from external MCP servers
|
|
286
|
-
// Filter connections for this session first
|
|
287
|
-
const sessionFilteredConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
288
|
-
// Then filter by capabilities, then by tags
|
|
289
|
-
const capabilityFilteredClients = byCapabilities({ tools: {} })(sessionFilteredConns);
|
|
290
|
-
const filteredClients = FilteringService.getFilteredConnections(capabilityFilteredClients, inboundConn);
|
|
291
|
-
// Get tools from external MCP servers
|
|
292
|
-
const result = await handlePagination(filteredClients, request.params || {}, (client, params, opts) => client.listTools(params, opts), (outboundConn, result) => filterDisabledTools(result.tools || [], getServerConfigs(), outboundConn.name).map((tool) => ({
|
|
293
|
-
...tool,
|
|
294
|
-
name: buildUri(outboundConn.name, tool.name, MCP_URI_SEPARATOR),
|
|
295
|
-
})) ?? [], inboundConn.enablePagination ?? false);
|
|
296
|
-
// Get internal tools if enabled
|
|
297
|
-
const internalProvider = InternalCapabilitiesProvider.getInstance();
|
|
298
|
-
await internalProvider.initialize();
|
|
299
|
-
const internalTools = internalProvider.getAvailableTools();
|
|
300
|
-
// Add internal tools to the result (with 1mcp prefix)
|
|
301
|
-
const internalToolsWithPrefix = internalTools.map((tool) => ({
|
|
302
|
-
...tool,
|
|
303
|
-
name: buildUri('1mcp', tool.name, MCP_URI_SEPARATOR),
|
|
304
|
-
}));
|
|
305
|
-
// Combine external and internal tools
|
|
306
|
-
const allTools = [...result.items, ...internalToolsWithPrefix];
|
|
307
|
-
return {
|
|
308
|
-
tools: allTools,
|
|
309
|
-
nextCursor: result.nextCursor,
|
|
310
|
-
};
|
|
311
|
-
}, 'Error listing tools'));
|
|
312
|
-
// Call Tool handler
|
|
313
|
-
inboundConn.server.setRequestHandler(CallToolRequestSchema, withErrorHandling(async (request) => {
|
|
314
|
-
const toolName = request.params.name;
|
|
315
|
-
// Check if this is an unprefixed meta-tool call (when lazy loading is enabled)
|
|
316
|
-
const isUnprefixedMetaTool = lazyLoadingEnabled && lazyLoadingOrchestrator && lazyLoadingOrchestrator.isMetaTool(toolName);
|
|
317
|
-
if (isUnprefixedMetaTool && lazyLoadingOrchestrator) {
|
|
318
|
-
let result;
|
|
319
|
-
try {
|
|
320
|
-
result = await lazyLoadingOrchestrator.callMetaTool(toolName, request.params.arguments, sessionId);
|
|
321
|
-
}
|
|
322
|
-
catch (metaToolError) {
|
|
323
|
-
logger.error(`Meta-tool ${toolName} execution failed: ${metaToolError}`);
|
|
324
|
-
throw new Error(`Meta-tool ${toolName} failed: ${metaToolError instanceof Error ? metaToolError.message : String(metaToolError)}`);
|
|
325
|
-
}
|
|
326
|
-
// CRITICAL: Do not throw errors for structured error responses
|
|
327
|
-
// Meta-tools return structured errors in the result itself (with error.type and error.message)
|
|
328
|
-
// These should be returned to the client as-is, not thrown as exceptions
|
|
329
|
-
// The client will parse the structured error from the content field
|
|
330
|
-
// Return both content and structuredContent (required by MCP protocol for tools with outputSchema)
|
|
331
|
-
return {
|
|
332
|
-
content: [
|
|
333
|
-
{
|
|
334
|
-
type: 'text',
|
|
335
|
-
text: JSON.stringify(result, null, 2),
|
|
336
|
-
},
|
|
337
|
-
],
|
|
338
|
-
structuredContent: result,
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
// CRITICAL: Handle unprefixed tool names when lazy loading is enabled
|
|
342
|
-
// If lazy loading is on and the tool name doesn't have the URI separator format,
|
|
343
|
-
// return a proper error instead of throwing during URI parsing
|
|
344
|
-
const isUnprefixedTool = lazyLoadingEnabled && !toolName.includes(MCP_URI_SEPARATOR);
|
|
345
|
-
if (isUnprefixedTool) {
|
|
346
|
-
// Unknown unprefixed tool in lazy loading mode
|
|
347
|
-
const errorResult = {
|
|
348
|
-
error: {
|
|
349
|
-
type: 'not_found',
|
|
350
|
-
message: `Unknown tool: ${toolName}. In lazy loading mode, use meta-tools (tool_list, tool_schema, tool_invoke) to discover and call tools.`,
|
|
351
|
-
},
|
|
352
|
-
};
|
|
353
|
-
return {
|
|
354
|
-
content: [
|
|
355
|
-
{
|
|
356
|
-
type: 'text',
|
|
357
|
-
text: JSON.stringify(errorResult, null, 2),
|
|
358
|
-
},
|
|
359
|
-
],
|
|
360
|
-
structuredContent: errorResult,
|
|
361
|
-
};
|
|
362
|
-
}
|
|
363
|
-
const { clientName, resourceName: extractedToolName } = parseUri(toolName, MCP_URI_SEPARATOR);
|
|
364
|
-
// Handle 1mcp tools (includes both internal tools and lazy tools)
|
|
365
|
-
if (clientName === '1mcp') {
|
|
366
|
-
const internalProvider = InternalCapabilitiesProvider.getInstance();
|
|
367
|
-
await internalProvider.initialize();
|
|
368
|
-
const result = await internalProvider.executeTool(extractedToolName, request.params.arguments, sessionId);
|
|
369
|
-
// For tools with output schemas, return both content and structuredContent
|
|
370
|
-
// This is required by the MCP protocol when outputSchema is defined
|
|
371
|
-
return {
|
|
372
|
-
content: [
|
|
373
|
-
{
|
|
374
|
-
type: 'text',
|
|
375
|
-
text: JSON.stringify(result, null, 2),
|
|
376
|
-
},
|
|
377
|
-
],
|
|
378
|
-
structuredContent: result,
|
|
379
|
-
};
|
|
380
|
-
}
|
|
381
|
-
// Handle external MCP server tools
|
|
382
|
-
const disabledError = getDisabledToolError(getServerConfigs(), clientName, extractedToolName);
|
|
383
|
-
if (disabledError) {
|
|
384
|
-
const errorResult = {
|
|
385
|
-
error: {
|
|
386
|
-
type: disabledError.type,
|
|
387
|
-
message: disabledError.message,
|
|
388
|
-
},
|
|
389
|
-
};
|
|
390
|
-
return {
|
|
391
|
-
content: [
|
|
392
|
-
{
|
|
393
|
-
type: 'text',
|
|
394
|
-
text: JSON.stringify(errorResult, null, 2),
|
|
395
|
-
},
|
|
396
|
-
],
|
|
397
|
-
structuredContent: errorResult,
|
|
398
|
-
};
|
|
399
|
-
}
|
|
400
|
-
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns);
|
|
401
|
-
if (!outboundConn) {
|
|
402
|
-
throw new Error(`Unknown client: ${clientName}`);
|
|
403
|
-
}
|
|
404
|
-
return outboundConn.client.callTool({ ...request.params, name: extractedToolName }, CallToolResultSchema, {
|
|
405
|
-
timeout: getRequestTimeout(outboundConn.transport),
|
|
406
|
-
});
|
|
407
|
-
}, 'Error calling tool'));
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Registers prompt-related request handlers
|
|
411
|
-
* @param clients Record of client instances
|
|
412
|
-
* @param serverInfo The MCP server instance
|
|
413
|
-
*/
|
|
414
|
-
function registerPromptHandlers(outboundConns, inboundConn) {
|
|
415
|
-
const sessionId = getRequestSession(inboundConn);
|
|
416
|
-
// List Prompts handler
|
|
417
|
-
inboundConn.server.setRequestHandler(ListPromptsRequestSchema, withErrorHandling(async (request) => {
|
|
418
|
-
// Filter connections for this session first
|
|
419
|
-
const sessionFilteredConns = filterConnectionsForSession(outboundConns, sessionId);
|
|
420
|
-
// Then filter by capabilities, then by tags
|
|
421
|
-
const capabilityFilteredClients = byCapabilities({ prompts: {} })(sessionFilteredConns);
|
|
422
|
-
const filteredClients = FilteringService.getFilteredConnections(capabilityFilteredClients, inboundConn);
|
|
423
|
-
const result = await handlePagination(filteredClients, request.params || {}, (client, params, opts) => client.listPrompts(params, opts), (outboundConn, result) => result.prompts?.map((prompt) => ({
|
|
424
|
-
...prompt,
|
|
425
|
-
name: buildUri(outboundConn.name, prompt.name, MCP_URI_SEPARATOR),
|
|
426
|
-
})) ?? [], inboundConn.enablePagination ?? false);
|
|
427
|
-
return {
|
|
428
|
-
prompts: result.items,
|
|
429
|
-
nextCursor: result.nextCursor,
|
|
430
|
-
};
|
|
431
|
-
}, 'Error listing prompts'));
|
|
432
|
-
// Get Prompt handler
|
|
433
|
-
inboundConn.server.setRequestHandler(GetPromptRequestSchema, withErrorHandling(async (request) => {
|
|
434
|
-
const { clientName, resourceName: promptName } = parseUri(request.params.name, MCP_URI_SEPARATOR);
|
|
435
|
-
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns);
|
|
436
|
-
if (!outboundConn) {
|
|
437
|
-
throw new Error(`Unknown client: ${clientName}`);
|
|
438
|
-
}
|
|
439
|
-
return outboundConn.client.getPrompt({ ...request.params, name: promptName });
|
|
440
|
-
}, 'Error getting prompt'));
|
|
441
|
-
}
|
|
442
|
-
/**
|
|
443
|
-
* Registers completion-related request handlers
|
|
444
|
-
* @param clients Record of client instances
|
|
445
|
-
* @param serverInfo The MCP server instance
|
|
446
|
-
*/
|
|
447
|
-
function registerCompletionHandlers(outboundConns, inboundConn) {
|
|
448
|
-
const sessionId = getRequestSession(inboundConn);
|
|
449
|
-
inboundConn.server.setRequestHandler(CompleteRequestSchema, withErrorHandling(async (request) => {
|
|
450
|
-
const { ref } = request.params;
|
|
451
|
-
let clientName;
|
|
452
|
-
let updatedRef;
|
|
453
|
-
if (ref.type === 'ref/prompt') {
|
|
454
|
-
const { clientName: cn, resourceName } = parseUri(ref.name, MCP_URI_SEPARATOR);
|
|
455
|
-
clientName = cn;
|
|
456
|
-
updatedRef = { ...ref, name: resourceName };
|
|
457
|
-
}
|
|
458
|
-
else if (ref.type === 'ref/resource') {
|
|
459
|
-
const { clientName: cn, resourceName } = parseUri(ref.uri, MCP_URI_SEPARATOR);
|
|
460
|
-
clientName = cn;
|
|
461
|
-
updatedRef = { ...ref, uri: resourceName };
|
|
462
|
-
}
|
|
463
|
-
else {
|
|
464
|
-
// This should be caught by the schema validation, but as a safeguard:
|
|
465
|
-
throw new Error(`Unsupported completion reference type: ${ref.type}`);
|
|
466
|
-
}
|
|
467
|
-
const params = { ...request.params, ref: updatedRef };
|
|
468
|
-
const outboundConn = resolveOutboundConnection(clientName, sessionId, outboundConns);
|
|
469
|
-
if (!outboundConn) {
|
|
470
|
-
throw new Error(`Unknown client: ${clientName}`);
|
|
471
|
-
}
|
|
472
|
-
return outboundConn.client.complete(params, {
|
|
473
|
-
timeout: getRequestTimeout(outboundConn.transport),
|
|
474
|
-
});
|
|
475
|
-
}, 'Error handling completion'));
|
|
476
|
-
}
|
|
477
93
|
//# sourceMappingURL=requestHandlers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestHandlers.js","sourceRoot":"","sources":["../../../src/core/protocol/requestHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EAEpB,qBAAqB,EAErB,0BAA0B,EAE1B,mBAAmB,EACnB,sBAAsB,EAEtB,wBAAwB,EAExB,0BAA0B,EAE1B,kCAAkC,EAElC,sBAAsB,EAEtB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,g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