@1mcp/agent 0.37.0 → 0.38.1
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/admin/assets/{admin-OAuthServicesWorkspace-BHyDoEos.js → admin-OAuthServicesWorkspace-C3DNmymC.js} +1 -1
- package/build/admin/assets/{admin-console-DnlZpz5X.js → admin-console-BmdH0cQS.js} +3 -3
- package/build/admin/index.html +1 -1
- package/build/application/services/healthService.d.ts +6 -6
- package/build/application/services/healthService.d.ts.map +1 -1
- package/build/application/services/healthService.js +1 -1
- package/build/application/services/healthService.js.map +1 -1
- package/build/application/services/tokenEstimationService.d.ts +1 -1
- package/build/application/services/tokenEstimationService.d.ts.map +1 -1
- package/build/application/services/tokenEstimationService.js.map +1 -1
- package/build/auth/oauthAuthorizationFlow.d.ts +17 -11
- package/build/auth/oauthAuthorizationFlow.d.ts.map +1 -1
- package/build/auth/oauthAuthorizationFlow.js +64 -20
- package/build/auth/oauthAuthorizationFlow.js.map +1 -1
- package/build/auth/sdkOAuthClientProvider.d.ts +2 -97
- package/build/auth/sdkOAuthClientProvider.d.ts.map +1 -1
- package/build/auth/sdkOAuthClientProvider.js +1 -242
- package/build/auth/sdkOAuthClientProvider.js.map +1 -1
- package/build/auth/sdkOAuthServerProvider.d.ts +1 -68
- package/build/auth/sdkOAuthServerProvider.d.ts.map +1 -1
- package/build/auth/sdkOAuthServerProvider.js +1 -483
- package/build/auth/sdkOAuthServerProvider.js.map +1 -1
- package/build/auth/sessionTypes.d.ts +1 -1
- package/build/auth/sessionTypes.d.ts.map +1 -1
- package/build/auth/sessionTypes.js.map +1 -1
- package/build/auth/storage/authCodeRepository.d.ts +1 -1
- package/build/auth/storage/authRequestRepository.d.ts +1 -1
- package/build/auth/storage/clientDataRepository.d.ts +1 -1
- package/build/auth/storage/clientDataRepository.d.ts.map +1 -1
- package/build/auth/storage/clientDataRepository.js.map +1 -1
- package/build/auth/storage/clientSessionRepository.d.ts +1 -1
- package/build/auth/storage/fileStorageService.d.ts +3 -1
- package/build/auth/storage/fileStorageService.d.ts.map +1 -1
- package/build/auth/storage/fileStorageService.js +61 -7
- package/build/auth/storage/fileStorageService.js.map +1 -1
- package/build/auth/storage/refreshTokenFamilyRepository.d.ts +1 -1
- package/build/auth/storage/refreshTokenFamilyRepository.js +1 -1
- package/build/auth/storage/sessionRepository.d.ts +1 -1
- package/build/auth/storage/sessionRepository.js +1 -1
- package/build/commands/admin/admin.d.ts +2 -2
- package/build/commands/admin/admin.js +3 -3
- package/build/commands/admin/index.js +1 -1
- package/build/commands/app/consolidate.js +1 -1
- package/build/commands/auth/index.js +1 -1
- package/build/commands/auth/login.js +1 -1
- package/build/commands/auth/runtimeTargetContext.js +1 -1
- package/build/commands/auth/status.js +1 -1
- package/build/commands/inspect/index.js +1 -1
- package/build/commands/inspect/inspect.d.ts +3 -3
- package/build/commands/inspect/inspect.d.ts.map +1 -1
- package/build/commands/inspect/inspect.js +43 -16
- package/build/commands/inspect/inspect.js.map +1 -1
- package/build/commands/inspect/inspectUtils.d.ts +2 -2
- package/build/commands/inspect/inspectUtils.d.ts.map +1 -1
- package/build/commands/inspect/inspectUtils.js +16 -16
- package/build/commands/inspect/inspectUtils.js.map +1 -1
- package/build/commands/instructions/index.js +1 -1
- package/build/commands/instructions/instructions.js +4 -4
- package/build/commands/mcp/enable.d.ts +1 -1
- package/build/commands/mcp/enable.js +2 -2
- package/build/commands/mcp/restart.d.ts +1 -1
- package/build/commands/mcp/restart.js +2 -2
- package/build/commands/mcp/status.d.ts +1 -1
- package/build/commands/mcp/status.js +2 -2
- package/build/commands/mcp/tokens.js +1 -1
- package/build/commands/mcp/tools.d.ts +1 -1
- package/build/commands/mcp/tools.js +1 -1
- package/build/commands/mcp/utils/mcpServerConfig.d.ts +1 -1
- package/build/commands/mcp/utils/mcpServerConfig.js +2 -2
- package/build/commands/preset/edit.js +1 -1
- package/build/commands/preset/interactive.js +1 -1
- package/build/commands/preset/show.js +1 -1
- package/build/commands/preset/test.js +1 -1
- package/build/commands/proxy/proxy.js +1 -1
- package/build/commands/run/index.js +1 -1
- package/build/commands/run/run.d.ts +4 -4
- package/build/commands/run/run.d.ts.map +1 -1
- package/build/commands/run/run.js +19 -13
- package/build/commands/run/run.js.map +1 -1
- package/build/commands/run/runUtils.d.ts +1 -1
- package/build/commands/run/runUtils.d.ts.map +1 -1
- package/build/commands/run/runUtils.js.map +1 -1
- package/build/commands/run/upstreamEofGuidance.d.ts +3 -0
- package/build/commands/run/upstreamEofGuidance.d.ts.map +1 -0
- package/build/commands/run/upstreamEofGuidance.js +19 -0
- package/build/commands/run/upstreamEofGuidance.js.map +1 -0
- package/build/commands/serve/asyncLoadingOptions.d.ts.map +1 -1
- package/build/commands/serve/asyncLoadingOptions.js +1 -1
- package/build/commands/serve/asyncLoadingOptions.js.map +1 -1
- package/build/commands/serve/serve.d.ts +1 -89
- package/build/commands/serve/serve.d.ts.map +1 -1
- package/build/commands/serve/serve.js +1 -550
- package/build/commands/serve/serve.js.map +1 -1
- package/build/commands/serve/serveBackground.d.ts +4 -1
- package/build/commands/serve/serveBackground.d.ts.map +1 -1
- package/build/commands/serve/serveBackground.js +19 -5
- package/build/commands/serve/serveBackground.js.map +1 -1
- package/build/commands/serve/serveStatus.d.ts +2 -1
- package/build/commands/serve/serveStatus.d.ts.map +1 -1
- package/build/commands/serve/serveStatus.js +30 -12
- package/build/commands/serve/serveStatus.js.map +1 -1
- package/build/commands/serve/serveStop.d.ts +2 -1
- package/build/commands/serve/serveStop.d.ts.map +1 -1
- package/build/commands/serve/serveStop.js +113 -20
- package/build/commands/serve/serveStop.js.map +1 -1
- package/build/commands/shared/authProfileStore.d.ts.map +1 -1
- package/build/commands/shared/authProfileStore.js +54 -10
- package/build/commands/shared/authProfileStore.js.map +1 -1
- package/build/commands/shared/clientSurfaceAttachment.d.ts +3 -3
- package/build/commands/shared/clientSurfaceAttachment.d.ts.map +1 -1
- package/build/commands/shared/clientSurfaceAttachment.js +20 -8
- package/build/commands/shared/clientSurfaceAttachment.js.map +1 -1
- package/build/commands/shared/connectionHelper.d.ts +4 -4
- package/build/commands/shared/connectionHelper.d.ts.map +1 -1
- package/build/commands/shared/connectionHelper.js +9 -26
- package/build/commands/shared/connectionHelper.js.map +1 -1
- package/build/commands/shared/inspectApiSchemas.d.ts +21 -8
- package/build/commands/shared/inspectApiSchemas.d.ts.map +1 -1
- package/build/commands/shared/inspectApiSchemas.js +18 -0
- package/build/commands/shared/inspectApiSchemas.js.map +1 -1
- package/build/commands/shared/serveClient.d.ts +1 -69
- package/build/commands/shared/serveClient.d.ts.map +1 -1
- package/build/commands/shared/serveClient.js +1 -234
- package/build/commands/shared/serveClient.js.map +1 -1
- package/build/commands/shared/serveTargetResolver.d.ts +1 -1
- package/build/commands/shared/serveTargetResolver.js +1 -1
- package/build/commands/target/index.js +1 -1
- package/build/commands/wait/index.js +1 -1
- package/build/commands/wait/wait.d.ts +2 -2
- package/build/commands/wait/wait.js +4 -4
- package/build/config/configLoader.js +1 -1
- package/build/config/configManager.js +3 -3
- package/build/config/configManager.js.map +1 -1
- package/build/config/configuredServerTargets.js +1 -1
- package/build/config/envProcessor.d.ts.map +1 -1
- package/build/config/envProcessor.js +26 -1
- package/build/config/envProcessor.js.map +1 -1
- package/build/config/mcpConfigManager.js +3 -3
- package/build/constants/auth.d.ts +7 -0
- package/build/constants/auth.d.ts.map +1 -1
- package/build/constants/auth.js +6 -1
- package/build/constants/auth.js.map +1 -1
- package/build/constants/mcp.d.ts +2 -2
- package/build/constants/mcp.d.ts.map +1 -1
- package/build/constants/mcp.js +1 -1
- package/build/constants.d.ts +1 -1
- package/build/constants.js +1 -1
- package/build/core/capabilities/asyncLoadingOrchestrator.d.ts +4 -4
- package/build/core/capabilities/asyncLoadingOrchestrator.js +3 -3
- package/build/core/capabilities/capabilityAggregator.d.ts +18 -88
- package/build/core/capabilities/capabilityAggregator.d.ts.map +1 -1
- package/build/core/capabilities/capabilityAggregator.js +76 -270
- package/build/core/capabilities/capabilityAggregator.js.map +1 -1
- package/build/core/capabilities/capabilityCatalog.d.ts +5 -6
- package/build/core/capabilities/capabilityCatalog.d.ts.map +1 -1
- package/build/core/capabilities/capabilityCatalog.js +48 -18
- package/build/core/capabilities/capabilityCatalog.js.map +1 -1
- package/build/core/capabilities/capabilityManager.d.ts +10 -33
- package/build/core/capabilities/capabilityManager.d.ts.map +1 -1
- package/build/core/capabilities/capabilityManager.js +7 -6
- package/build/core/capabilities/capabilityManager.js.map +1 -1
- package/build/core/capabilities/capabilityNotificationFacts.js +1 -1
- package/build/core/capabilities/capabilityNotificationFacts.js.map +1 -1
- package/build/core/capabilities/capabilityPagination.d.ts +3 -1
- package/build/core/capabilities/capabilityPagination.d.ts.map +1 -1
- package/build/core/capabilities/capabilityPagination.js +59 -32
- package/build/core/capabilities/capabilityPagination.js.map +1 -1
- package/build/core/capabilities/catalogGeneration.d.ts +47 -0
- package/build/core/capabilities/catalogGeneration.d.ts.map +1 -0
- package/build/core/capabilities/catalogGeneration.js +145 -0
- package/build/core/capabilities/catalogGeneration.js.map +1 -0
- package/build/core/capabilities/configuredToolSnapshot.d.ts +2 -2
- package/build/core/capabilities/configuredToolSnapshot.d.ts.map +1 -1
- package/build/core/capabilities/configuredToolSnapshot.js +1 -1
- package/build/core/capabilities/configuredToolSnapshot.js.map +1 -1
- package/build/core/capabilities/inspectPagination.d.ts +16 -0
- package/build/core/capabilities/inspectPagination.d.ts.map +1 -0
- package/build/core/capabilities/inspectPagination.js +41 -0
- package/build/core/capabilities/inspectPagination.js.map +1 -0
- package/build/core/capabilities/internal/discoveryTools.d.ts +1 -7
- package/build/core/capabilities/internal/discoveryTools.d.ts.map +1 -1
- package/build/core/capabilities/internal/discoveryTools.js +7 -1
- package/build/core/capabilities/internal/discoveryTools.js.map +1 -1
- package/build/core/capabilities/internal/installationTools.d.ts +1 -7
- package/build/core/capabilities/internal/installationTools.d.ts.map +1 -1
- package/build/core/capabilities/internal/installationTools.js +7 -1
- package/build/core/capabilities/internal/installationTools.js.map +1 -1
- package/build/core/capabilities/internal/lazyTools.d.ts +1 -1
- package/build/core/capabilities/internal/lazyTools.d.ts.map +1 -1
- package/build/core/capabilities/internal/lazyTools.js.map +1 -1
- package/build/core/capabilities/internal/managementTools.d.ts +1 -7
- package/build/core/capabilities/internal/managementTools.d.ts.map +1 -1
- package/build/core/capabilities/internal/managementTools.js +7 -1
- package/build/core/capabilities/internal/managementTools.js.map +1 -1
- package/build/core/capabilities/internalCapabilitiesProvider.d.ts +3 -3
- package/build/core/capabilities/internalCapabilitiesProvider.d.ts.map +1 -1
- package/build/core/capabilities/internalCapabilitiesProvider.js +8 -8
- package/build/core/capabilities/internalCapabilitiesProvider.js.map +1 -1
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts +3 -3
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts.map +1 -1
- package/build/core/capabilities/lazyLoadingOrchestrator.js +21 -80
- package/build/core/capabilities/lazyLoadingOrchestrator.js.map +1 -1
- package/build/core/capabilities/metaToolProvider.d.ts +3 -3
- package/build/core/capabilities/metaToolProvider.d.ts.map +1 -1
- package/build/core/capabilities/metaToolProvider.js.map +1 -1
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts +48 -0
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts.map +1 -0
- package/build/core/capabilities/runtimeCapabilityCatalog.js +409 -0
- package/build/core/capabilities/runtimeCapabilityCatalog.js.map +1 -0
- package/build/core/capabilities/schemaCache.d.ts +1 -1
- package/build/core/capabilities/schemaCache.d.ts.map +1 -1
- package/build/core/capabilities/schemaCache.js.map +1 -1
- package/build/core/capabilities/schemas/metaToolSchemas.d.ts +3 -3
- package/build/core/capabilities/toolRegistry.d.ts +11 -1
- package/build/core/capabilities/toolRegistry.d.ts.map +1 -1
- package/build/core/capabilities/toolRegistry.js +51 -32
- package/build/core/capabilities/toolRegistry.js.map +1 -1
- package/build/core/client/clientFactory.d.ts +1 -6
- package/build/core/client/clientFactory.d.ts.map +1 -1
- package/build/core/client/clientFactory.js +1 -35
- package/build/core/client/clientFactory.js.map +1 -1
- package/build/core/client/clientManager.d.ts +1 -89
- package/build/core/client/clientManager.d.ts.map +1 -1
- package/build/core/client/clientManager.js +1 -728
- package/build/core/client/clientManager.js.map +1 -1
- package/build/core/client/connectedClient.d.ts +1 -6
- package/build/core/client/connectedClient.d.ts.map +1 -1
- package/build/core/client/connectionHandler.d.ts +1 -8
- package/build/core/client/connectionHandler.d.ts.map +1 -1
- package/build/core/client/connectionHandler.js +1 -96
- package/build/core/client/connectionHandler.js.map +1 -1
- package/build/core/client/legacyAdapterRequest.d.ts +6 -0
- package/build/core/client/legacyAdapterRequest.d.ts.map +1 -0
- package/build/core/client/legacyAdapterRequest.js +55 -0
- package/build/core/client/legacyAdapterRequest.js.map +1 -0
- package/build/core/client/oauthFlowHandler.d.ts +1 -9
- package/build/core/client/oauthFlowHandler.d.ts.map +1 -1
- package/build/core/client/oauthFlowHandler.js +1 -80
- package/build/core/client/oauthFlowHandler.js.map +1 -1
- package/build/core/client/postAuthOAuthRecovery.d.ts +3 -3
- package/build/core/client/postAuthOAuthRecovery.d.ts.map +1 -1
- package/build/core/client/postAuthOAuthRecovery.js +7 -19
- package/build/core/client/postAuthOAuthRecovery.js.map +1 -1
- package/build/core/client/recreateHttpTransportOptions.d.ts +1 -13
- package/build/core/client/recreateHttpTransportOptions.d.ts.map +1 -1
- package/build/core/client/renderableOutboundConnection.d.ts +5 -0
- package/build/core/client/renderableOutboundConnection.d.ts.map +1 -0
- package/build/core/client/renderableOutboundConnection.js +38 -0
- package/build/core/client/renderableOutboundConnection.js.map +1 -0
- package/build/core/client/transportRecreationState.d.ts +1 -10
- package/build/core/client/transportRecreationState.d.ts.map +1 -1
- package/build/core/client/transportRecreator.d.ts +1 -13
- package/build/core/client/transportRecreator.d.ts.map +1 -1
- package/build/core/client/transportRecreator.js +1 -51
- package/build/core/client/transportRecreator.js.map +1 -1
- package/build/core/client/types.d.ts +1 -6
- package/build/core/client/types.d.ts.map +1 -1
- package/build/core/client/types.js +1 -10
- package/build/core/client/types.js.map +1 -1
- package/build/core/configChangeHandler.d.ts.map +1 -1
- package/build/core/configChangeHandler.js +8 -11
- package/build/core/configChangeHandler.js.map +1 -1
- package/build/core/context/templateContextTrust.d.ts.map +1 -1
- package/build/core/context/templateContextTrust.js +22 -4
- package/build/core/context/templateContextTrust.js.map +1 -1
- package/build/core/filtering/clientFiltering.d.ts +2 -2
- package/build/core/filtering/clientFiltering.d.ts.map +1 -1
- package/build/core/filtering/clientFiltering.js +3 -3
- package/build/core/filtering/clientFiltering.js.map +1 -1
- package/build/core/filtering/filterCache.d.ts +1 -1
- package/build/core/filtering/filterSelection.d.ts +1 -1
- package/build/core/filtering/filteringService.d.ts +2 -2
- package/build/core/filtering/filteringService.d.ts.map +1 -1
- package/build/core/filtering/filteringService.js +4 -4
- package/build/core/filtering/filteringService.js.map +1 -1
- package/build/core/filtering/templateFilteringService.d.ts +2 -2
- package/build/core/filtering/templateIndex.d.ts +1 -1
- package/build/core/flags/flagManager.js +1 -1
- package/build/core/instructions/effectiveServerInstructions.d.ts +1 -1
- package/build/core/instructions/instructionAggregator.d.ts +3 -3
- package/build/core/instructions/instructionAggregator.js +1 -1
- package/build/core/loading/loadingStateTracker.d.ts.map +1 -1
- package/build/core/loading/loadingStateTracker.js +5 -1
- package/build/core/loading/loadingStateTracker.js.map +1 -1
- package/build/core/loading/mcpLoadingManager.d.ts +5 -2
- package/build/core/loading/mcpLoadingManager.d.ts.map +1 -1
- package/build/core/loading/mcpLoadingManager.js.map +1 -1
- package/build/core/notifications/notificationManager.d.ts +4 -3
- package/build/core/notifications/notificationManager.d.ts.map +1 -1
- package/build/core/notifications/notificationManager.js +15 -13
- package/build/core/notifications/notificationManager.js.map +1 -1
- package/build/core/protocol/notificationHandlers.d.ts +1 -13
- package/build/core/protocol/notificationHandlers.d.ts.map +1 -1
- package/build/core/protocol/notificationHandlers.js +1 -123
- package/build/core/protocol/notificationHandlers.js.map +1 -1
- package/build/core/protocol/promptRequestHandlers.d.ts +1 -3
- package/build/core/protocol/promptRequestHandlers.d.ts.map +1 -1
- package/build/core/protocol/promptRequestHandlers.js +1 -72
- package/build/core/protocol/promptRequestHandlers.js.map +1 -1
- package/build/core/protocol/requestHandlerUtils.d.ts +4 -4
- package/build/core/protocol/requestHandlerUtils.d.ts.map +1 -1
- package/build/core/protocol/requestHandlerUtils.js +13 -32
- package/build/core/protocol/requestHandlerUtils.js.map +1 -1
- package/build/core/protocol/requestHandlers.d.ts +1 -12
- package/build/core/protocol/requestHandlers.d.ts.map +1 -1
- package/build/core/protocol/requestHandlers.js +1 -92
- package/build/core/protocol/requestHandlers.js.map +1 -1
- package/build/core/protocol/resourceRequestHandlers.d.ts +1 -2
- package/build/core/protocol/resourceRequestHandlers.d.ts.map +1 -1
- package/build/core/protocol/resourceRequestHandlers.js +1 -95
- package/build/core/protocol/resourceRequestHandlers.js.map +1 -1
- package/build/core/protocol/toolRequestHandlers.d.ts +1 -3
- package/build/core/protocol/toolRequestHandlers.d.ts.map +1 -1
- package/build/core/protocol/toolRequestHandlers.js +1 -187
- package/build/core/protocol/toolRequestHandlers.js.map +1 -1
- package/build/core/server/adapters/ExternalServerAdapter.d.ts +2 -2
- package/build/core/server/adapters/ServerRegistry.d.ts +3 -3
- package/build/core/server/adapters/TemplateServerAdapter.d.ts +3 -3
- package/build/core/server/adapters/types.d.ts +3 -3
- package/build/core/server/adapters/types.js +1 -1
- package/build/core/server/agentConfig.d.ts +3 -3
- package/build/core/server/agentConfig.js +2 -2
- package/build/core/server/backendStdioSupervisor.d.ts.map +1 -1
- package/build/core/server/backendStdioSupervisor.js +8 -5
- package/build/core/server/backendStdioSupervisor.js.map +1 -1
- package/build/core/server/backgroundLaunchConfig.d.ts +1 -1
- package/build/core/server/backgroundLaunchConfig.js +1 -1
- package/build/core/server/backgroundRuntimeSupervisor.d.ts +2 -2
- package/build/core/server/backgroundRuntimeSupervisor.d.ts.map +1 -1
- package/build/core/server/backgroundRuntimeSupervisor.js +12 -4
- package/build/core/server/backgroundRuntimeSupervisor.js.map +1 -1
- package/build/core/server/backgroundRuntimeSupervisorState.d.ts +3 -0
- package/build/core/server/backgroundRuntimeSupervisorState.d.ts.map +1 -1
- package/build/core/server/backgroundRuntimeSupervisorState.js +3 -0
- package/build/core/server/backgroundRuntimeSupervisorState.js.map +1 -1
- package/build/core/server/clientInstanceFactory.d.ts +1 -13
- package/build/core/server/clientInstanceFactory.d.ts.map +1 -1
- package/build/core/server/clientInstanceFactory.js +1 -48
- package/build/core/server/clientInstanceFactory.js.map +1 -1
- package/build/core/server/clientInstancePool.d.ts +1 -115
- package/build/core/server/clientInstancePool.d.ts.map +1 -1
- package/build/core/server/clientInstancePool.js +1 -599
- package/build/core/server/clientInstancePool.js.map +1 -1
- package/build/core/server/clientInstancePoolTypes.d.ts +1 -66
- package/build/core/server/clientInstancePoolTypes.d.ts.map +1 -1
- package/build/core/server/clientInstancePoolTypes.js +1 -14
- package/build/core/server/clientInstancePoolTypes.js.map +1 -1
- package/build/core/server/connectionManager.d.ts +1 -79
- package/build/core/server/connectionManager.d.ts.map +1 -1
- package/build/core/server/connectionManager.js +1 -262
- package/build/core/server/connectionManager.js.map +1 -1
- package/build/core/server/connectionResolver.d.ts +1 -1
- package/build/core/server/disabledTools.d.ts +8 -2
- package/build/core/server/disabledTools.d.ts.map +1 -1
- package/build/core/server/disabledTools.js +13 -0
- package/build/core/server/disabledTools.js.map +1 -1
- package/build/core/server/mcpServerLifecycleManager.d.ts +1 -58
- package/build/core/server/mcpServerLifecycleManager.d.ts.map +1 -1
- package/build/core/server/mcpServerLifecycleManager.js +1 -271
- package/build/core/server/mcpServerLifecycleManager.js.map +1 -1
- package/build/core/server/pidFileManager.d.ts +6 -2
- package/build/core/server/pidFileManager.d.ts.map +1 -1
- package/build/core/server/pidFileManager.js +13 -4
- package/build/core/server/pidFileManager.js.map +1 -1
- package/build/core/server/processIdentity.d.ts +27 -0
- package/build/core/server/processIdentity.d.ts.map +1 -0
- package/build/core/server/processIdentity.js +101 -0
- package/build/core/server/processIdentity.js.map +1 -0
- package/build/core/server/requestContextPreparation.d.ts +1 -38
- package/build/core/server/requestContextPreparation.d.ts.map +1 -1
- package/build/core/server/requestContextPreparation.js +1 -49
- package/build/core/server/requestContextPreparation.js.map +1 -1
- package/build/core/server/runtimeFileLock.d.ts +6 -0
- package/build/core/server/runtimeFileLock.d.ts.map +1 -0
- package/build/core/server/runtimeFileLock.js +34 -0
- package/build/core/server/runtimeFileLock.js.map +1 -0
- package/build/core/server/runtimeLifecycle.d.ts +5 -5
- package/build/core/server/runtimeLifecycle.d.ts.map +1 -1
- package/build/core/server/runtimeLifecycle.js +16 -3
- package/build/core/server/runtimeLifecycle.js.map +1 -1
- package/build/core/server/runtimeScopeOwnership.d.ts +3 -0
- package/build/core/server/runtimeScopeOwnership.d.ts.map +1 -1
- package/build/core/server/runtimeScopeOwnership.js +95 -28
- package/build/core/server/runtimeScopeOwnership.js.map +1 -1
- package/build/core/server/serverManager.d.ts +1 -130
- package/build/core/server/serverManager.d.ts.map +1 -1
- package/build/core/server/serverManager.js +1 -457
- package/build/core/server/serverManager.js.map +1 -1
- package/build/core/server/templateConfigurationManager.d.ts +1 -1
- package/build/core/server/templateServerCleanup.d.ts +1 -22
- package/build/core/server/templateServerCleanup.d.ts.map +1 -1
- package/build/core/server/templateServerCleanup.js +1 -160
- package/build/core/server/templateServerCleanup.js.map +1 -1
- package/build/core/server/templateServerManager.d.ts +1 -154
- package/build/core/server/templateServerManager.d.ts.map +1 -1
- package/build/core/server/templateServerManager.js +1 -603
- package/build/core/server/templateServerManager.js.map +1 -1
- package/build/core/server/toolDescriptionOverrides.d.ts +6 -2
- package/build/core/server/toolDescriptionOverrides.d.ts.map +1 -1
- package/build/core/server/toolDescriptionOverrides.js +6 -0
- package/build/core/server/toolDescriptionOverrides.js.map +1 -1
- package/build/core/tools/handlers/serverManagementHandler.d.ts +32 -24
- package/build/core/tools/handlers/serverManagementHandler.d.ts.map +1 -1
- package/build/core/tools/handlers/serverManagementHandler.js +4 -4
- package/build/core/tools/handlers/serverManagementHandler.js.map +1 -1
- package/build/core/tools/internal/adapters/helpers/configTransformers.d.ts +3 -2
- package/build/core/tools/internal/adapters/helpers/configTransformers.d.ts.map +1 -1
- package/build/core/tools/internal/adapters/management/managementAdapter.d.ts +1 -1
- package/build/core/tools/internal/adapters/management/managementAdapter.js +2 -2
- package/build/core/tools/internal/adapters/management/toolHandlers.js +1 -1
- package/build/core/tools/internal/adapters/management/types.d.ts +18 -8
- package/build/core/tools/internal/adapters/management/types.d.ts.map +1 -1
- package/build/core/tools/internal/adapters/management/validation.d.ts +1 -1
- package/build/core/tools/internal/adapters/validation/configValidation.d.ts +1 -1
- package/build/core/tools/internal/discoveryHandlers.js +1 -1
- package/build/core/tools/internal/installationHandlers.js +2 -2
- package/build/core/tools/internal/managementHandlers.d.ts.map +1 -1
- package/build/core/tools/internal/managementHandlers.js +13 -4
- package/build/core/tools/internal/managementHandlers.js.map +1 -1
- package/build/core/tools/internal/schemas/discovery.d.ts +5 -5
- package/build/core/tools/internal/schemas/index.d.ts +14 -14
- package/build/core/tools/internal/schemas/installation.d.ts +1 -1
- package/build/core/tools/internal/schemas/management.d.ts +8 -8
- package/build/core/types/client.d.ts +30 -17
- package/build/core/types/client.d.ts.map +1 -1
- package/build/core/types/client.js.map +1 -1
- package/build/core/types/server.d.ts +18 -11
- package/build/core/types/server.d.ts.map +1 -1
- package/build/core/types/server.js.map +1 -1
- package/build/core/types/transport.d.ts +18 -19
- package/build/core/types/transport.d.ts.map +1 -1
- package/build/core/types/transport.js +4 -0
- package/build/core/types/transport.js.map +1 -1
- package/build/core/validation/CustomJsonSchemaValidator.d.ts +1 -62
- package/build/core/validation/CustomJsonSchemaValidator.d.ts.map +1 -1
- package/build/core/validation/CustomJsonSchemaValidator.js +1 -309
- package/build/core/validation/CustomJsonSchemaValidator.js.map +1 -1
- package/build/domains/admin/adminConfiguredServerService.d.ts +1 -1
- package/build/domains/admin/adminConfiguredServerService.d.ts.map +1 -1
- package/build/domains/admin/adminConfiguredServerService.js +12 -8
- package/build/domains/admin/adminConfiguredServerService.js.map +1 -1
- package/build/domains/admin/adminDomain.d.ts +2 -2
- package/build/domains/admin/adminDomain.js +1 -1
- package/build/domains/admin/adminInstructionPreviewRuntime.d.ts +1 -1
- package/build/domains/admin/adminInstructionPreviewRuntime.d.ts.map +1 -1
- package/build/domains/admin/adminInstructionPreviewRuntime.js +3 -10
- package/build/domains/admin/adminInstructionPreviewRuntime.js.map +1 -1
- package/build/domains/admin/adminInstructionTemplateService.d.ts +3 -3
- package/build/domains/admin/adminOAuthService.d.ts +1 -0
- package/build/domains/admin/adminOAuthService.d.ts.map +1 -1
- package/build/domains/admin/adminOAuthService.js +8 -2
- package/build/domains/admin/adminOAuthService.js.map +1 -1
- package/build/domains/admin/adminPresetService.d.ts +2 -2
- package/build/domains/admin/adminPresetService.js +2 -2
- package/build/domains/admin/configuredToolInventory.d.ts.map +1 -1
- package/build/domains/admin/configuredToolInventory.js +1 -1
- package/build/domains/admin/configuredToolInventory.js.map +1 -1
- package/build/domains/admin/runtimeConfiguredToolInspectionService.d.ts.map +1 -1
- package/build/domains/admin/runtimeConfiguredToolInspectionService.js +7 -13
- package/build/domains/admin/runtimeConfiguredToolInspectionService.js.map +1 -1
- package/build/domains/admin/runtimeServerManagerBackendRestartService.js +1 -1
- package/build/domains/admin/runtimeServerManagerBackendRestartService.js.map +1 -1
- package/build/domains/discovery/appDiscovery.js +2 -2
- package/build/domains/installation/metadata/defaultsProvider.d.ts +1 -1
- package/build/domains/installation/metadata/metadataExtractor.d.ts +1 -1
- package/build/domains/installation/serverInstallationSourceResolution.d.ts +1 -1
- package/build/domains/installation/serverInstallationTypes.d.ts +2 -2
- package/build/domains/installation/serverInstallationWorkflow.js +2 -2
- package/build/domains/instruction-template/instructionTemplateManager.d.ts +1 -1
- package/build/domains/instruction-template/instructionTemplateManager.js +1 -1
- package/build/domains/preset/manager/presetManager.d.ts +1 -1
- package/build/domains/preset/manager/presetManager.js +3 -3
- package/build/domains/preset/manager/presetManagerCleanup.d.ts +2 -2
- package/build/domains/preset/manager/presetStorage.d.ts +1 -1
- package/build/domains/preset/manager/presetTesting.d.ts +1 -1
- package/build/domains/preset/manager/presetTesting.js +2 -2
- package/build/domains/preset/manager/presetValidation.d.ts +1 -1
- package/build/domains/preset/manager/presetValidation.js +1 -1
- package/build/domains/preset/parsers/tagQueryEvaluator.d.ts +1 -1
- package/build/domains/preset/parsers/tagQueryParser.d.ts +1 -1
- package/build/domains/registry/formatters/commonFormatters.d.ts +1 -1
- package/build/domains/registry/formatters/serverDetailFormatter.d.ts +1 -1
- package/build/domains/registry/formatters/serverDetailFormatter.js +1 -1
- package/build/domains/registry/formatters/versionsFormatter.d.ts +1 -1
- package/build/domains/registry/searchFiltering.d.ts +1 -1
- package/build/domains/registry/searchFiltering.js +1 -1
- package/build/domains/server-management/types.d.ts +1 -1
- package/build/gateway/adapters/index.d.ts +3 -0
- package/build/gateway/adapters/index.d.ts.map +1 -0
- package/build/gateway/adapters/index.js +3 -0
- package/build/gateway/adapters/index.js.map +1 -0
- package/build/gateway/adapters/legacy/index.d.ts +3 -0
- package/build/gateway/adapters/legacy/index.d.ts.map +1 -0
- package/build/gateway/adapters/legacy/index.js +3 -0
- package/build/gateway/adapters/legacy/index.js.map +1 -0
- package/build/gateway/adapters/legacy/legacyEraPin.d.ts +3 -0
- package/build/gateway/adapters/legacy/legacyEraPin.d.ts.map +1 -0
- package/build/gateway/adapters/legacy/legacyEraPin.js +12 -0
- package/build/gateway/adapters/legacy/legacyEraPin.js.map +1 -0
- package/build/gateway/adapters/legacy/legacyInboundEraAdapter.d.ts +19 -0
- package/build/gateway/adapters/legacy/legacyInboundEraAdapter.d.ts.map +1 -0
- package/build/gateway/adapters/legacy/legacyInboundEraAdapter.js +86 -0
- package/build/gateway/adapters/legacy/legacyInboundEraAdapter.js.map +1 -0
- package/build/gateway/adapters/legacy/legacyOutboundEraAdapter.d.ts +19 -0
- package/build/gateway/adapters/legacy/legacyOutboundEraAdapter.d.ts.map +1 -0
- package/build/gateway/adapters/legacy/legacyOutboundEraAdapter.js +76 -0
- package/build/gateway/adapters/legacy/legacyOutboundEraAdapter.js.map +1 -0
- package/build/gateway/adapters/modern/index.d.ts +3 -0
- package/build/gateway/adapters/modern/index.d.ts.map +1 -0
- package/build/gateway/adapters/modern/index.js +3 -0
- package/build/gateway/adapters/modern/index.js.map +1 -0
- package/build/gateway/adapters/modern/modernInboundEraAdapter.d.ts +32 -0
- package/build/gateway/adapters/modern/modernInboundEraAdapter.d.ts.map +1 -0
- package/build/gateway/adapters/modern/modernInboundEraAdapter.js +150 -0
- package/build/gateway/adapters/modern/modernInboundEraAdapter.js.map +1 -0
- package/build/gateway/adapters/modern/modernOutboundEraAdapter.d.ts +24 -0
- package/build/gateway/adapters/modern/modernOutboundEraAdapter.d.ts.map +1 -0
- package/build/gateway/adapters/modern/modernOutboundEraAdapter.js +75 -0
- package/build/gateway/adapters/modern/modernOutboundEraAdapter.js.map +1 -0
- package/build/gateway/adapters/modern/modernPin.d.ts +9 -0
- package/build/gateway/adapters/modern/modernPin.d.ts.map +1 -0
- package/build/gateway/adapters/modern/modernPin.js +14 -0
- package/build/gateway/adapters/modern/modernPin.js.map +1 -0
- package/build/gateway/contracts/effectiveRequestAuthority.d.ts +12 -0
- package/build/gateway/contracts/effectiveRequestAuthority.d.ts.map +1 -0
- package/build/gateway/contracts/effectiveRequestAuthority.js +30 -0
- package/build/gateway/contracts/effectiveRequestAuthority.js.map +1 -0
- package/build/gateway/contracts/gatewayFailure.d.ts +25 -0
- package/build/gateway/contracts/gatewayFailure.d.ts.map +1 -0
- package/build/gateway/contracts/gatewayFailure.js +72 -0
- package/build/gateway/contracts/gatewayFailure.js.map +1 -0
- package/build/gateway/contracts/gatewayRequest.d.ts +32 -0
- package/build/gateway/contracts/gatewayRequest.d.ts.map +1 -0
- package/build/gateway/contracts/gatewayRequest.js +50 -0
- package/build/gateway/contracts/gatewayRequest.js.map +1 -0
- package/build/gateway/contracts/immutableJson.d.ts +6 -0
- package/build/gateway/contracts/immutableJson.d.ts.map +1 -0
- package/build/gateway/contracts/immutableJson.js +14 -0
- package/build/gateway/contracts/immutableJson.js.map +1 -0
- package/build/gateway/contracts/index.d.ts +6 -0
- package/build/gateway/contracts/index.d.ts.map +1 -0
- package/build/gateway/contracts/index.js +6 -0
- package/build/gateway/contracts/index.js.map +1 -0
- package/build/gateway/contracts/protocolEra.d.ts +22 -0
- package/build/gateway/contracts/protocolEra.d.ts.map +1 -0
- package/build/gateway/contracts/protocolEra.js +68 -0
- package/build/gateway/contracts/protocolEra.js.map +1 -0
- package/build/gateway/core/gatewayDispatcher.d.ts +15 -0
- package/build/gateway/core/gatewayDispatcher.d.ts.map +1 -0
- package/build/gateway/core/gatewayDispatcher.js +77 -0
- package/build/gateway/core/gatewayDispatcher.js.map +1 -0
- package/build/gateway/core/gatewaySession.d.ts +13 -0
- package/build/gateway/core/gatewaySession.d.ts.map +1 -0
- package/build/gateway/core/gatewaySession.js +61 -0
- package/build/gateway/core/gatewaySession.js.map +1 -0
- package/build/gateway/core/index.d.ts +3 -0
- package/build/gateway/core/index.d.ts.map +1 -0
- package/build/gateway/core/index.js +3 -0
- package/build/gateway/core/index.js.map +1 -0
- package/build/gateway/index.d.ts +5 -0
- package/build/gateway/index.d.ts.map +1 -0
- package/build/gateway/index.js +5 -0
- package/build/gateway/index.js.map +1 -0
- package/build/gateway/ports/inboundEraAdapter.d.ts +27 -0
- package/build/gateway/ports/inboundEraAdapter.d.ts.map +1 -0
- package/build/gateway/ports/inboundEraAdapter.js +2 -0
- package/build/gateway/ports/inboundEraAdapter.js.map +1 -0
- package/build/gateway/ports/index.d.ts +3 -0
- package/build/gateway/ports/index.d.ts.map +1 -0
- package/build/gateway/ports/index.js +3 -0
- package/build/gateway/ports/index.js.map +1 -0
- package/build/gateway/ports/outboundEraAdapter.d.ts +16 -0
- package/build/gateway/ports/outboundEraAdapter.d.ts.map +1 -0
- package/build/gateway/ports/outboundEraAdapter.js +2 -0
- package/build/gateway/ports/outboundEraAdapter.js.map +1 -0
- package/build/logger/configureGlobalLogger.js +1 -1
- package/build/logger/mcpLoggingEnhancer.d.ts +1 -5
- package/build/logger/mcpLoggingEnhancer.d.ts.map +1 -1
- package/build/logger/mcpLoggingEnhancer.js +1 -192
- package/build/logger/mcpLoggingEnhancer.js.map +1 -1
- package/build/sdk/contracts/index.d.ts +5 -0
- package/build/sdk/contracts/index.d.ts.map +1 -0
- package/build/sdk/contracts/index.js +5 -0
- package/build/sdk/contracts/index.js.map +1 -0
- package/build/sdk/contracts/jsonValue.d.ts +21 -0
- package/build/sdk/contracts/jsonValue.d.ts.map +1 -0
- package/build/sdk/contracts/jsonValue.js +127 -0
- package/build/sdk/contracts/jsonValue.js.map +1 -0
- package/build/sdk/contracts/legacySdkAdapter.d.ts +73 -0
- package/build/sdk/contracts/legacySdkAdapter.d.ts.map +1 -0
- package/build/sdk/contracts/legacySdkAdapter.js +7 -0
- package/build/sdk/contracts/legacySdkAdapter.js.map +1 -0
- package/build/sdk/contracts/oneMcpProtocolError.d.ts +18 -0
- package/build/sdk/contracts/oneMcpProtocolError.d.ts.map +1 -0
- package/build/sdk/contracts/oneMcpProtocolError.js +39 -0
- package/build/sdk/contracts/oneMcpProtocolError.js.map +1 -0
- package/build/sdk/contracts/protocol.d.ts +240 -0
- package/build/sdk/contracts/protocol.d.ts.map +1 -0
- package/build/sdk/contracts/protocol.js +187 -0
- package/build/sdk/contracts/protocol.js.map +1 -0
- package/build/sdk/legacy/auth/sdkOAuthClientProvider.d.ts +98 -0
- package/build/sdk/legacy/auth/sdkOAuthClientProvider.d.ts.map +1 -0
- package/build/sdk/legacy/auth/sdkOAuthClientProvider.js +243 -0
- package/build/sdk/legacy/auth/sdkOAuthClientProvider.js.map +1 -0
- package/build/sdk/legacy/auth/sdkOAuthServerProvider.d.ts +69 -0
- package/build/sdk/legacy/auth/sdkOAuthServerProvider.d.ts.map +1 -0
- package/build/sdk/legacy/auth/sdkOAuthServerProvider.js +519 -0
- package/build/sdk/legacy/auth/sdkOAuthServerProvider.js.map +1 -0
- package/build/sdk/legacy/client/auth.d.ts +2 -0
- package/build/sdk/legacy/client/auth.d.ts.map +1 -0
- package/build/sdk/legacy/client/auth.js +2 -0
- package/build/sdk/legacy/client/auth.js.map +1 -0
- package/build/sdk/legacy/client/index.d.ts +2 -0
- package/build/sdk/legacy/client/index.d.ts.map +1 -0
- package/build/sdk/legacy/client/index.js +2 -0
- package/build/sdk/legacy/client/index.js.map +1 -0
- package/build/sdk/legacy/client/runtime/clientFactory.d.ts +10 -0
- package/build/sdk/legacy/client/runtime/clientFactory.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/clientFactory.js +56 -0
- package/build/sdk/legacy/client/runtime/clientFactory.js.map +1 -0
- package/build/sdk/legacy/client/runtime/clientManager.d.ts +94 -0
- package/build/sdk/legacy/client/runtime/clientManager.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/clientManager.js +834 -0
- package/build/sdk/legacy/client/runtime/clientManager.js.map +1 -0
- package/build/sdk/legacy/client/runtime/connectedClient.d.ts +7 -0
- package/build/sdk/legacy/client/runtime/connectedClient.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/connectedClient.js +2 -0
- package/build/sdk/legacy/client/runtime/connectedClient.js.map +1 -0
- package/build/sdk/legacy/client/runtime/connectionHandler.d.ts +10 -0
- package/build/sdk/legacy/client/runtime/connectionHandler.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/connectionHandler.js +139 -0
- package/build/sdk/legacy/client/runtime/connectionHandler.js.map +1 -0
- package/build/sdk/legacy/client/runtime/legacyGatewayClientAdapter.d.ts +14 -0
- package/build/sdk/legacy/client/runtime/legacyGatewayClientAdapter.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/legacyGatewayClientAdapter.js +66 -0
- package/build/sdk/legacy/client/runtime/legacyGatewayClientAdapter.js.map +1 -0
- package/build/sdk/legacy/client/runtime/legacyOutboundConnection.d.ts +50 -0
- package/build/sdk/legacy/client/runtime/legacyOutboundConnection.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/legacyOutboundConnection.js +93 -0
- package/build/sdk/legacy/client/runtime/legacyOutboundConnection.js.map +1 -0
- package/build/sdk/legacy/client/runtime/legacySdkClientAdapter.d.ts +37 -0
- package/build/sdk/legacy/client/runtime/legacySdkClientAdapter.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/legacySdkClientAdapter.js +240 -0
- package/build/sdk/legacy/client/runtime/legacySdkClientAdapter.js.map +1 -0
- package/build/sdk/legacy/client/runtime/legacyTransport.d.ts +32 -0
- package/build/sdk/legacy/client/runtime/legacyTransport.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/legacyTransport.js +2 -0
- package/build/sdk/legacy/client/runtime/legacyTransport.js.map +1 -0
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.d.ts +40 -0
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.js +238 -0
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.js.map +1 -0
- package/build/sdk/legacy/client/runtime/oauthFlowHandler.d.ts +12 -0
- package/build/sdk/legacy/client/runtime/oauthFlowHandler.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/oauthFlowHandler.js +93 -0
- package/build/sdk/legacy/client/runtime/oauthFlowHandler.js.map +1 -0
- package/build/sdk/legacy/client/runtime/outboundRequestParams.d.ts +4 -0
- package/build/sdk/legacy/client/runtime/outboundRequestParams.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/outboundRequestParams.js +8 -0
- package/build/sdk/legacy/client/runtime/outboundRequestParams.js.map +1 -0
- package/build/sdk/legacy/client/runtime/recreateHttpTransportOptions.d.ts +12 -0
- package/build/sdk/legacy/client/runtime/recreateHttpTransportOptions.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/recreateHttpTransportOptions.js +2 -0
- package/build/sdk/legacy/client/runtime/recreateHttpTransportOptions.js.map +1 -0
- package/build/sdk/legacy/client/runtime/sdkClient.d.ts +5 -0
- package/build/sdk/legacy/client/runtime/sdkClient.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/sdkClient.js +5 -0
- package/build/sdk/legacy/client/runtime/sdkClient.js.map +1 -0
- package/build/sdk/legacy/client/runtime/serveClient.d.ts +70 -0
- package/build/sdk/legacy/client/runtime/serveClient.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/serveClient.js +235 -0
- package/build/sdk/legacy/client/runtime/serveClient.js.map +1 -0
- package/build/sdk/legacy/client/runtime/transportRecreationState.d.ts +14 -0
- package/build/sdk/legacy/client/runtime/transportRecreationState.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/transportRecreationState.js +2 -0
- package/build/sdk/legacy/client/runtime/transportRecreationState.js.map +1 -0
- package/build/sdk/legacy/client/runtime/transportRecreator.d.ts +14 -0
- package/build/sdk/legacy/client/runtime/transportRecreator.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/transportRecreator.js +89 -0
- package/build/sdk/legacy/client/runtime/transportRecreator.js.map +1 -0
- package/build/sdk/legacy/client/runtime/types.d.ts +9 -0
- package/build/sdk/legacy/client/runtime/types.d.ts.map +1 -0
- package/build/sdk/legacy/client/runtime/types.js +13 -0
- package/build/sdk/legacy/client/runtime/types.js.map +1 -0
- package/build/sdk/legacy/client/sse.d.ts +2 -0
- package/build/sdk/legacy/client/sse.d.ts.map +1 -0
- package/build/sdk/legacy/client/sse.js +2 -0
- package/build/sdk/legacy/client/sse.js.map +1 -0
- package/build/sdk/legacy/client/stdio.d.ts +2 -0
- package/build/sdk/legacy/client/stdio.d.ts.map +1 -0
- package/build/sdk/legacy/client/stdio.js +2 -0
- package/build/sdk/legacy/client/stdio.js.map +1 -0
- package/build/sdk/legacy/client/streamableHttp.d.ts +2 -0
- package/build/sdk/legacy/client/streamableHttp.d.ts.map +1 -0
- package/build/sdk/legacy/client/streamableHttp.js +2 -0
- package/build/sdk/legacy/client/streamableHttp.js.map +1 -0
- package/build/sdk/legacy/commands/serve.d.ts +90 -0
- package/build/sdk/legacy/commands/serve.d.ts.map +1 -0
- package/build/sdk/legacy/commands/serve.js +561 -0
- package/build/sdk/legacy/commands/serve.js.map +1 -0
- package/build/sdk/legacy/server/auth/clients.d.ts +2 -0
- package/build/sdk/legacy/server/auth/clients.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/clients.js +2 -0
- package/build/sdk/legacy/server/auth/clients.js.map +1 -0
- package/build/sdk/legacy/server/auth/errors.d.ts +2 -0
- package/build/sdk/legacy/server/auth/errors.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/errors.js +2 -0
- package/build/sdk/legacy/server/auth/errors.js.map +1 -0
- package/build/sdk/legacy/server/auth/middleware/bearerAuth.d.ts +2 -0
- package/build/sdk/legacy/server/auth/middleware/bearerAuth.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/middleware/bearerAuth.js +2 -0
- package/build/sdk/legacy/server/auth/middleware/bearerAuth.js.map +1 -0
- package/build/sdk/legacy/server/auth/provider.d.ts +2 -0
- package/build/sdk/legacy/server/auth/provider.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/provider.js +2 -0
- package/build/sdk/legacy/server/auth/provider.js.map +1 -0
- package/build/sdk/legacy/server/auth/router.d.ts +2 -0
- package/build/sdk/legacy/server/auth/router.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/router.js +2 -0
- package/build/sdk/legacy/server/auth/router.js.map +1 -0
- package/build/sdk/legacy/server/auth/types.d.ts +2 -0
- package/build/sdk/legacy/server/auth/types.d.ts.map +1 -0
- package/build/sdk/legacy/server/auth/types.js +2 -0
- package/build/sdk/legacy/server/auth/types.js.map +1 -0
- package/build/sdk/legacy/server/index.d.ts +2 -0
- package/build/sdk/legacy/server/index.d.ts.map +1 -0
- package/build/sdk/legacy/server/index.js +2 -0
- package/build/sdk/legacy/server/index.js.map +1 -0
- package/build/sdk/legacy/server/protocol/notificationHandlers.d.ts +15 -0
- package/build/sdk/legacy/server/protocol/notificationHandlers.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/notificationHandlers.js +146 -0
- package/build/sdk/legacy/server/protocol/notificationHandlers.js.map +1 -0
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.d.ts +5 -0
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js +50 -0
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js.map +1 -0
- package/build/sdk/legacy/server/protocol/requestHandlers.d.ts +14 -0
- package/build/sdk/legacy/server/protocol/requestHandlers.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/requestHandlers.js +96 -0
- package/build/sdk/legacy/server/protocol/requestHandlers.js.map +1 -0
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.d.ts +4 -0
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js +62 -0
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js.map +1 -0
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.d.ts +5 -0
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.d.ts.map +1 -0
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js +87 -0
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js.map +1 -0
- package/build/sdk/legacy/server/runtime/clientInstanceFactory.d.ts +14 -0
- package/build/sdk/legacy/server/runtime/clientInstanceFactory.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/clientInstanceFactory.js +49 -0
- package/build/sdk/legacy/server/runtime/clientInstanceFactory.js.map +1 -0
- package/build/sdk/legacy/server/runtime/clientInstancePool.d.ts +116 -0
- package/build/sdk/legacy/server/runtime/clientInstancePool.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/clientInstancePool.js +600 -0
- package/build/sdk/legacy/server/runtime/clientInstancePool.js.map +1 -0
- package/build/sdk/legacy/server/runtime/clientInstancePoolTypes.d.ts +67 -0
- package/build/sdk/legacy/server/runtime/clientInstancePoolTypes.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/clientInstancePoolTypes.js +15 -0
- package/build/sdk/legacy/server/runtime/clientInstancePoolTypes.js.map +1 -0
- package/build/sdk/legacy/server/runtime/connectionManager.d.ts +82 -0
- package/build/sdk/legacy/server/runtime/connectionManager.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/connectionManager.js +298 -0
- package/build/sdk/legacy/server/runtime/connectionManager.js.map +1 -0
- package/build/sdk/legacy/server/runtime/legacyInboundConnection.d.ts +17 -0
- package/build/sdk/legacy/server/runtime/legacyInboundConnection.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/legacyInboundConnection.js +22 -0
- package/build/sdk/legacy/server/runtime/legacyInboundConnection.js.map +1 -0
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.d.ts +18 -0
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.js +82 -0
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.js.map +1 -0
- package/build/sdk/legacy/server/runtime/mcpLoggingEnhancer.d.ts +6 -0
- package/build/sdk/legacy/server/runtime/mcpLoggingEnhancer.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/mcpLoggingEnhancer.js +193 -0
- package/build/sdk/legacy/server/runtime/mcpLoggingEnhancer.js.map +1 -0
- package/build/sdk/legacy/server/runtime/mcpServerLifecycleManager.d.ts +60 -0
- package/build/sdk/legacy/server/runtime/mcpServerLifecycleManager.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/mcpServerLifecycleManager.js +274 -0
- package/build/sdk/legacy/server/runtime/mcpServerLifecycleManager.js.map +1 -0
- package/build/sdk/legacy/server/runtime/requestContextPreparation.d.ts +39 -0
- package/build/sdk/legacy/server/runtime/requestContextPreparation.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/requestContextPreparation.js +50 -0
- package/build/sdk/legacy/server/runtime/requestContextPreparation.js.map +1 -0
- package/build/sdk/legacy/server/runtime/serverManager.d.ts +132 -0
- package/build/sdk/legacy/server/runtime/serverManager.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/serverManager.js +462 -0
- package/build/sdk/legacy/server/runtime/serverManager.js.map +1 -0
- package/build/sdk/legacy/server/runtime/templateServerCleanup.d.ts +23 -0
- package/build/sdk/legacy/server/runtime/templateServerCleanup.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/templateServerCleanup.js +161 -0
- package/build/sdk/legacy/server/runtime/templateServerCleanup.js.map +1 -0
- package/build/sdk/legacy/server/runtime/templateServerManager.d.ts +155 -0
- package/build/sdk/legacy/server/runtime/templateServerManager.d.ts.map +1 -0
- package/build/sdk/legacy/server/runtime/templateServerManager.js +606 -0
- package/build/sdk/legacy/server/runtime/templateServerManager.js.map +1 -0
- package/build/sdk/legacy/server/sse.d.ts +2 -0
- package/build/sdk/legacy/server/sse.d.ts.map +1 -0
- package/build/sdk/legacy/server/sse.js +2 -0
- package/build/sdk/legacy/server/sse.js.map +1 -0
- package/build/sdk/legacy/server/stdio.d.ts +2 -0
- package/build/sdk/legacy/server/stdio.d.ts.map +1 -0
- package/build/sdk/legacy/server/stdio.js +2 -0
- package/build/sdk/legacy/server/stdio.js.map +1 -0
- package/build/sdk/legacy/server/streamableHttp.d.ts +2 -0
- package/build/sdk/legacy/server/streamableHttp.d.ts.map +1 -0
- package/build/sdk/legacy/server/streamableHttp.js +2 -0
- package/build/sdk/legacy/server/streamableHttp.js.map +1 -0
- package/build/sdk/legacy/shared/auth.d.ts +2 -0
- package/build/sdk/legacy/shared/auth.d.ts.map +1 -0
- package/build/sdk/legacy/shared/auth.js +2 -0
- package/build/sdk/legacy/shared/auth.js.map +1 -0
- package/build/sdk/legacy/shared/capabilityListCapture.d.ts +4 -0
- package/build/sdk/legacy/shared/capabilityListCapture.d.ts.map +1 -0
- package/build/sdk/legacy/shared/capabilityListCapture.js +30 -0
- package/build/sdk/legacy/shared/capabilityListCapture.js.map +1 -0
- package/build/sdk/legacy/shared/protocol.d.ts +2 -0
- package/build/sdk/legacy/shared/protocol.d.ts.map +1 -0
- package/build/sdk/legacy/shared/protocol.js +2 -0
- package/build/sdk/legacy/shared/protocol.js.map +1 -0
- package/build/sdk/legacy/shared/resourceTemplateRouting.d.ts +12 -0
- package/build/sdk/legacy/shared/resourceTemplateRouting.d.ts.map +1 -0
- package/build/sdk/legacy/shared/resourceTemplateRouting.js +66 -0
- package/build/sdk/legacy/shared/resourceTemplateRouting.js.map +1 -0
- package/build/sdk/legacy/shared/transport.d.ts +2 -0
- package/build/sdk/legacy/shared/transport.d.ts.map +1 -0
- package/build/sdk/legacy/shared/transport.js +2 -0
- package/build/sdk/legacy/shared/transport.js.map +1 -0
- package/build/sdk/legacy/transport/http/loggingSseTransport.d.ts +13 -0
- package/build/sdk/legacy/transport/http/loggingSseTransport.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/loggingSseTransport.js +43 -0
- package/build/sdk/legacy/transport/http/loggingSseTransport.js.map +1 -0
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.d.ts +91 -0
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.js +240 -0
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.js.map +1 -0
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.d.ts +14 -0
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js +50 -0
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js.map +1 -0
- package/build/sdk/legacy/transport/http/restorableStreamableTransport.d.ts +58 -0
- package/build/sdk/legacy/transport/http/restorableStreamableTransport.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/restorableStreamableTransport.js +59 -0
- package/build/sdk/legacy/transport/http/restorableStreamableTransport.js.map +1 -0
- package/build/sdk/legacy/transport/http/routes/sseRoutes.d.ts +5 -0
- package/build/sdk/legacy/transport/http/routes/sseRoutes.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/routes/sseRoutes.js +105 -0
- package/build/sdk/legacy/transport/http/routes/sseRoutes.js.map +1 -0
- package/build/sdk/legacy/transport/http/server.d.ts +90 -0
- package/build/sdk/legacy/transport/http/server.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/server.js +487 -0
- package/build/sdk/legacy/transport/http/server.js.map +1 -0
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.d.ts +92 -0
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.d.ts.map +1 -0
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.js +372 -0
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.js.map +1 -0
- package/build/sdk/legacy/transport/restartableStdioTransport.d.ts +90 -0
- package/build/sdk/legacy/transport/restartableStdioTransport.d.ts.map +1 -0
- package/build/sdk/legacy/transport/restartableStdioTransport.js +192 -0
- package/build/sdk/legacy/transport/restartableStdioTransport.js.map +1 -0
- package/build/sdk/legacy/transport/stdioProxyTransport.d.ts +92 -0
- package/build/sdk/legacy/transport/stdioProxyTransport.d.ts.map +1 -0
- package/build/sdk/legacy/transport/stdioProxyTransport.js +388 -0
- package/build/sdk/legacy/transport/stdioProxyTransport.js.map +1 -0
- package/build/sdk/legacy/transport/transportFactory.d.ts +25 -0
- package/build/sdk/legacy/transport/transportFactory.d.ts.map +1 -0
- package/build/sdk/legacy/transport/transportFactory.js +404 -0
- package/build/sdk/legacy/transport/transportFactory.js.map +1 -0
- package/build/sdk/legacy/types.d.ts +2 -0
- package/build/sdk/legacy/types.d.ts.map +1 -0
- package/build/sdk/legacy/types.js +3 -0
- package/build/sdk/legacy/types.js.map +1 -0
- package/build/sdk/legacy/validation/CustomJsonSchemaValidator.d.ts +57 -0
- package/build/sdk/legacy/validation/CustomJsonSchemaValidator.d.ts.map +1 -0
- package/build/sdk/legacy/validation/CustomJsonSchemaValidator.js +316 -0
- package/build/sdk/legacy/validation/CustomJsonSchemaValidator.js.map +1 -0
- package/build/sdk/legacy/validation.d.ts +2 -0
- package/build/sdk/legacy/validation.d.ts.map +1 -0
- package/build/sdk/legacy/validation.js +2 -0
- package/build/sdk/legacy/validation.js.map +1 -0
- package/build/server.d.ts.map +1 -1
- package/build/server.js +12 -3
- package/build/server.js.map +1 -1
- package/build/transport/http/loggingSseTransport.d.ts +1 -12
- package/build/transport/http/loggingSseTransport.d.ts.map +1 -1
- package/build/transport/http/loggingSseTransport.js +1 -42
- package/build/transport/http/loggingSseTransport.js.map +1 -1
- package/build/transport/http/middlewares/errorHandler.d.ts.map +1 -1
- package/build/transport/http/middlewares/errorHandler.js +18 -1
- package/build/transport/http/middlewares/errorHandler.js.map +1 -1
- package/build/transport/http/middlewares/httpRequestLogger.js +1 -1
- package/build/transport/http/middlewares/scopeAuthMiddleware.d.ts +2 -90
- package/build/transport/http/middlewares/scopeAuthMiddleware.d.ts.map +1 -1
- package/build/transport/http/middlewares/scopeAuthMiddleware.js +2 -239
- 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 +2 -2
- package/build/transport/http/middlewares/tagsExtractor.js.map +1 -1
- package/build/transport/http/restorableStreamableTransport.d.ts +2 -57
- package/build/transport/http/restorableStreamableTransport.d.ts.map +1 -1
- package/build/transport/http/restorableStreamableTransport.js +1 -58
- package/build/transport/http/restorableStreamableTransport.js.map +1 -1
- package/build/transport/http/routes/adminRoutes.d.ts +3 -1
- package/build/transport/http/routes/adminRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/adminRoutes.js +39 -2
- package/build/transport/http/routes/adminRoutes.js.map +1 -1
- package/build/transport/http/routes/apiRoutes.d.ts +5 -1
- package/build/transport/http/routes/apiRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/apiRoutes.js +16 -4
- package/build/transport/http/routes/apiRoutes.js.map +1 -1
- package/build/transport/http/routes/healthRoutes.js.map +1 -1
- package/build/transport/http/routes/inspectHelpers.d.ts +1 -1
- package/build/transport/http/routes/inspectHelpers.d.ts.map +1 -1
- package/build/transport/http/routes/inspectHelpers.js +10 -6
- package/build/transport/http/routes/inspectHelpers.js.map +1 -1
- package/build/transport/http/routes/inspectRequestContext.js +2 -2
- package/build/transport/http/routes/inspectRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/inspectRoutes.js +89 -77
- package/build/transport/http/routes/inspectRoutes.js.map +1 -1
- package/build/transport/http/routes/instructionsRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/instructionsRoutes.js +2 -9
- package/build/transport/http/routes/instructionsRoutes.js.map +1 -1
- package/build/transport/http/routes/modernHttpRoutes.d.ts +29 -0
- package/build/transport/http/routes/modernHttpRoutes.d.ts.map +1 -0
- package/build/transport/http/routes/modernHttpRoutes.js +241 -0
- package/build/transport/http/routes/modernHttpRoutes.js.map +1 -0
- package/build/transport/http/routes/oauthRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/oauthRoutes.js +28 -8
- package/build/transport/http/routes/oauthRoutes.js.map +1 -1
- package/build/transport/http/routes/sseRoutes.d.ts +1 -4
- package/build/transport/http/routes/sseRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/sseRoutes.js +1 -109
- package/build/transport/http/routes/sseRoutes.js.map +1 -1
- package/build/transport/http/routes/streamableHttpRoutes.d.ts +2 -2
- package/build/transport/http/routes/streamableHttpRoutes.js +7 -7
- package/build/transport/http/routes/toolRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/toolRoutes.js +22 -11
- package/build/transport/http/routes/toolRoutes.js.map +1 -1
- package/build/transport/http/server.d.ts +1 -84
- package/build/transport/http/server.d.ts.map +1 -1
- package/build/transport/http/server.js +1 -449
- package/build/transport/http/server.js.map +1 -1
- package/build/transport/http/storage/streamableSessionRepository.js +1 -1
- package/build/transport/http/streamableSessionLifecycle.d.ts +1 -91
- package/build/transport/http/streamableSessionLifecycle.d.ts.map +1 -1
- package/build/transport/http/streamableSessionLifecycle.js +1 -376
- package/build/transport/http/streamableSessionLifecycle.js.map +1 -1
- package/build/transport/http/utils/httpErrorHandler.js +1 -1
- package/build/transport/http/utils/httpErrorHandler.js.map +1 -1
- package/build/transport/http/utils/templateContextAuthority.d.ts.map +1 -1
- package/build/transport/http/utils/templateContextAuthority.js +20 -7
- package/build/transport/http/utils/templateContextAuthority.js.map +1 -1
- package/build/transport/restartableStdioTransport.d.ts +1 -89
- package/build/transport/restartableStdioTransport.d.ts.map +1 -1
- package/build/transport/restartableStdioTransport.js +1 -191
- package/build/transport/restartableStdioTransport.js.map +1 -1
- package/build/transport/stdioProxyTransport.d.ts +1 -82
- package/build/transport/stdioProxyTransport.d.ts.map +1 -1
- package/build/transport/stdioProxyTransport.js +1 -278
- package/build/transport/stdioProxyTransport.js.map +1 -1
- package/build/transport/transportFactory.d.ts +1 -23
- package/build/transport/transportFactory.d.ts.map +1 -1
- package/build/transport/transportFactory.js +1 -379
- package/build/transport/transportFactory.js.map +1 -1
- package/build/transport/transportFactory.testSetup.js +13 -0
- package/build/transport/transportFactory.testSetup.js.map +1 -1
- package/build/utils/client/clientInfoExtractor.d.ts +1 -1
- package/build/utils/client/clientInfoExtractor.d.ts.map +1 -1
- package/build/utils/client/clientInfoExtractor.js.map +1 -1
- package/build/utils/core/errorHandling.d.ts.map +1 -1
- package/build/utils/core/errorHandling.js +1 -1
- package/build/utils/core/errorHandling.js.map +1 -1
- package/build/utils/core/errorTypes.js +1 -1
- package/build/utils/core/errorTypes.js.map +1 -1
- package/build/utils/core/operationExecution.d.ts.map +1 -1
- package/build/utils/core/operationExecution.js +1 -1
- package/build/utils/core/operationExecution.js.map +1 -1
- package/build/utils/crypto.d.ts +5 -1
- package/build/utils/crypto.d.ts.map +1 -1
- package/build/utils/crypto.js +8 -3
- package/build/utils/crypto.js.map +1 -1
- package/build/utils/filePermissions.d.ts +65 -0
- package/build/utils/filePermissions.d.ts.map +1 -0
- package/build/utils/filePermissions.js +212 -0
- package/build/utils/filePermissions.js.map +1 -0
- package/build/utils/validation/urlDetection.js +1 -1
- package/package.json +18 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bearerAuth.js","sourceRoot":"","sources":["../../../../../../src/sdk/legacy/server/auth/middleware/bearerAuth.ts"],"names":[],"mappings":"AAAA,cAAc,gEAAgE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/auth/provider.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/auth/provider.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/auth/router.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"router.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/auth/router.ts"],"names":[],"mappings":"AAAA,cAAc,iDAAiD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/auth/types.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/auth/types.ts"],"names":[],"mappings":"AAAA,cAAc,gDAAgD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sdk/legacy/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/sdk/legacy/server/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { InboundConnection } from '../../../../core/types/index.js';
|
|
2
|
+
import { type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
3
|
+
/**
|
|
4
|
+
* Sets up client-to-server notification handlers
|
|
5
|
+
* @param clients Record of client instances
|
|
6
|
+
* @param serverInfo The MCP server instance
|
|
7
|
+
*/
|
|
8
|
+
export declare function setupClientToServerNotifications(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection): void;
|
|
9
|
+
/**
|
|
10
|
+
* Sets up server-to-client notification handlers
|
|
11
|
+
* @param clients Record of client instances
|
|
12
|
+
* @param serverInfo The MCP server instance
|
|
13
|
+
*/
|
|
14
|
+
export declare function setupServerToClientNotifications(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection): void;
|
|
15
|
+
//# sourceMappingURL=notificationHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notificationHandlers.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/notificationHandlers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAgB,iBAAiB,EAAgB,MAAM,0BAA0B,CAAC;AAGzF,OAAO,EAEL,KAAK,yBAAyB,EAE/B,MAAM,4DAA4D,CAAC;AAgBpE;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,aAAa,EAAE,yBAAyB,EACxC,WAAW,EAAE,iBAAiB,GAC7B,IAAI,CAuFN;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,aAAa,EAAE,yBAAyB,EACxC,WAAW,EAAE,iBAAiB,GAC7B,IAAI,CAiDN"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { registerCapabilityPaginationNotifications } from '../../../../core/capabilities/capabilityPagination.js';
|
|
2
|
+
import { acquireRuntimeCapabilityCatalog } from '../../../../core/capabilities/runtimeCapabilityCatalog.js';
|
|
3
|
+
import { getRequestSession, resolveCapabilityVisibility } from '../../../../core/protocol/requestHandlerUtils.js';
|
|
4
|
+
import { ClientStatus, ServerStatus } from '../../../../core/types/index.js';
|
|
5
|
+
import logger from '../../../../logger/logger.js';
|
|
6
|
+
import { toJsonValue } from '../../../contracts/index.js';
|
|
7
|
+
import { getLegacyTransport, setOutboundNotificationHandler, } from '../../client/runtime/legacyOutboundConnection.js';
|
|
8
|
+
import { getLegacyInboundServer } from '../runtime/legacyInboundConnection.js';
|
|
9
|
+
import { projectResourceUri } from '../../shared/resourceTemplateRouting.js';
|
|
10
|
+
import { CancelledNotificationSchema, LoggingMessageNotificationSchema, ProgressNotificationSchema, ResourceUpdatedNotificationSchema, RootsListChangedNotificationSchema, } from '../../types.js';
|
|
11
|
+
import { withErrorHandling } from '../../../../utils/core/errorHandling.js';
|
|
12
|
+
function formatNotificationError(error) {
|
|
13
|
+
return error instanceof Error ? `Error: ${error.message}` : String(error);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Sets up client-to-server notification handlers
|
|
17
|
+
* @param clients Record of client instances
|
|
18
|
+
* @param serverInfo The MCP server instance
|
|
19
|
+
*/
|
|
20
|
+
export function setupClientToServerNotifications(outboundConns, inboundConn) {
|
|
21
|
+
const clientNotificationSchemas = [
|
|
22
|
+
CancelledNotificationSchema,
|
|
23
|
+
ProgressNotificationSchema,
|
|
24
|
+
LoggingMessageNotificationSchema,
|
|
25
|
+
ResourceUpdatedNotificationSchema,
|
|
26
|
+
];
|
|
27
|
+
for (const [name, outboundConn] of outboundConns.entries()) {
|
|
28
|
+
registerCapabilityPaginationNotifications(outboundConns, outboundConn, inboundConn, withErrorHandling(async (notification) => {
|
|
29
|
+
logger.info(`Received notification in client: ${name} ${JSON.stringify(notification)}`);
|
|
30
|
+
if (inboundConn.status !== ServerStatus.Connected || !getLegacyInboundServer(inboundConn).transport) {
|
|
31
|
+
logger.warn(`Server transport not connected. Dropping notification from ${name}`);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
await getLegacyInboundServer(inboundConn).notification({
|
|
36
|
+
method: notification.method,
|
|
37
|
+
params: {
|
|
38
|
+
...notification.params,
|
|
39
|
+
server: name,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (error instanceof Error && error.message.includes('Not connected')) {
|
|
45
|
+
logger.warn(`Server transport not connected. Dropping notification from ${name}`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
logger.error(`Failed to send notification from ${name}: ${formatNotificationError(error)}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}, `Error handling client notification from ${name}`));
|
|
52
|
+
clientNotificationSchemas.forEach((schema) => {
|
|
53
|
+
setOutboundNotificationHandler(outboundConn, schema, withErrorHandling(async (notification) => {
|
|
54
|
+
logger.info(`Received notification in client: ${name} ${JSON.stringify(notification)}`);
|
|
55
|
+
// Check if client is connected before attempting to send
|
|
56
|
+
if (inboundConn.status !== ServerStatus.Connected || !getLegacyInboundServer(inboundConn).transport) {
|
|
57
|
+
logger.warn(`Server transport not connected. Dropping notification from ${name}`);
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// Try to send notification, catch connection errors gracefully
|
|
61
|
+
try {
|
|
62
|
+
let params = notification.params;
|
|
63
|
+
if (notification.method === 'notifications/resources/updated') {
|
|
64
|
+
const visibility = resolveCapabilityVisibility(outboundConns, inboundConn, getRequestSession(inboundConn), 'resources');
|
|
65
|
+
if (!visibility.serverCandidates.has(name) || typeof params?.uri !== 'string')
|
|
66
|
+
return;
|
|
67
|
+
const snapshot = await acquireRuntimeCapabilityCatalog(outboundConns, visibility);
|
|
68
|
+
if (snapshot.connections.get(name) !== outboundConn)
|
|
69
|
+
return;
|
|
70
|
+
params = { ...params, uri: projectResourceUri(snapshot, name, params.uri) };
|
|
71
|
+
}
|
|
72
|
+
// Preserve original message structure and only modify params
|
|
73
|
+
const forwardedNotification = {
|
|
74
|
+
method: notification.method,
|
|
75
|
+
params: {
|
|
76
|
+
...params,
|
|
77
|
+
server: name,
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
await getLegacyInboundServer(inboundConn).notification(forwardedNotification);
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
if (error instanceof Error && error.message.includes('Not connected')) {
|
|
84
|
+
logger.warn(`Server transport not connected. Dropping notification from ${name}`);
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
logger.error(`Failed to send notification from ${name}: ${formatNotificationError(error)}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, `Error handling client notification from ${name}`));
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Sets up server-to-client notification handlers
|
|
96
|
+
* @param clients Record of client instances
|
|
97
|
+
* @param serverInfo The MCP server instance
|
|
98
|
+
*/
|
|
99
|
+
export function setupServerToClientNotifications(outboundConns, inboundConn) {
|
|
100
|
+
// NOTE: InitializedNotificationSchema is intentionally excluded here.
|
|
101
|
+
// The inbound client sends notifications/initialized to 1MCP as part of its
|
|
102
|
+
// own session handshake. Forwarding it to already-connected downstream servers
|
|
103
|
+
// causes them to re-enter initialization state, rejecting subsequent
|
|
104
|
+
// tools/list and prompts/list with "method is invalid during session
|
|
105
|
+
// initialization". See: https://github.com/1mcp-app/agent/issues/255
|
|
106
|
+
const serverNotificationSchemas = [
|
|
107
|
+
CancelledNotificationSchema,
|
|
108
|
+
ProgressNotificationSchema,
|
|
109
|
+
RootsListChangedNotificationSchema,
|
|
110
|
+
];
|
|
111
|
+
for (const [name, outboundConn] of outboundConns.entries()) {
|
|
112
|
+
serverNotificationSchemas.forEach((schema) => {
|
|
113
|
+
getLegacyInboundServer(inboundConn).setNotificationHandler(schema, withErrorHandling(async (notification) => {
|
|
114
|
+
logger.info(`Received notification in server: ${name} ${JSON.stringify(notification)}`);
|
|
115
|
+
if (outboundConn.status !== ClientStatus.Connected || !getLegacyTransport(outboundConn)) {
|
|
116
|
+
logger.warn(`Client ${name} is not connected. Notification not sent.`);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
// Try to send notification, catch connection errors gracefully
|
|
120
|
+
try {
|
|
121
|
+
// Preserve original message structure and only modify params
|
|
122
|
+
const forwardedNotification = {
|
|
123
|
+
method: notification.method,
|
|
124
|
+
params: {
|
|
125
|
+
...notification.params,
|
|
126
|
+
client: name,
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
await outboundConn.adapter.notify({
|
|
130
|
+
method: forwardedNotification.method,
|
|
131
|
+
params: toJsonValue(forwardedNotification.params),
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
if (error instanceof Error && error.message.includes('Not connected')) {
|
|
136
|
+
logger.warn(`Client ${name} transport not connected. Dropping notification.`);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
logger.error(`Failed to send notification to ${name}: ${formatNotificationError(error)}`);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}, `Error handling server notification to ${name}`));
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=notificationHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification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BAAqB,GAAG;wBAC5B,MAAM,EAAE,YAAY,CAAC,MAAM;wBAC3B,MAAM,EAAE;4BACN,GAAG,YAAY,CAAC,MAAM;4BACtB,MAAM,EAAE,IAAI;yBACb;qBACF,CAAC;oBACF,MAAM,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC;wBAChC,MAAM,EAAE,qBAAqB,CAAC,MAAM;wBACpC,MAAM,EAAE,WAAW,CAAC,qBAAqB,CAAC,MAAM,CAAC;qBAClD,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC;wBACtE,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,kDAAkD,CAAC,CAAC;oBAChF,CAAC;yBAAM,CAAC;wBACN,MAAM,CAAC,KAAK,CAAC,kCAAkC,IAAI,KAAK,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;oBAC5F,CAAC;gBACH,CAAC;YACH,CAAC,EAAE,yCAAyC,IAAI,EAAE,CAAC,CACpD,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InboundConnection } from '../../../../core/types/index.js';
|
|
2
|
+
import { type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
3
|
+
export declare function registerPromptHandlers(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection): void;
|
|
4
|
+
export declare function registerCompletionHandlers(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection): void;
|
|
5
|
+
//# sourceMappingURL=promptRequestHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promptRequestHandlers.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/promptRequestHandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,4DAA4D,CAAC;AAKpE,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,yBAAyB,EAAE,WAAW,EAAE,iBAAiB,GAAG,IAAI,CAoCrH;AAED,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,yBAAyB,EACxC,WAAW,EAAE,iBAAiB,GAC7B,IAAI,CA4BN"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { acquireRuntimeCapabilityCatalog } from '../../../../core/capabilities/runtimeCapabilityCatalog.js';
|
|
2
|
+
import { getRequestSession, resolveCapabilityVisibility } from '../../../../core/protocol/requestHandlerUtils.js';
|
|
3
|
+
import { requestLegacyOutbound, } from '../../client/runtime/legacyOutboundConnection.js';
|
|
4
|
+
import { getLegacyInboundServer } from '../runtime/legacyInboundConnection.js';
|
|
5
|
+
import { CompleteRequestSchema, GetPromptRequestSchema, ListPromptsRequestSchema } from '../../types.js';
|
|
6
|
+
import { withErrorHandling } from '../../../../utils/core/errorHandling.js';
|
|
7
|
+
export function registerPromptHandlers(outboundConns, inboundConn) {
|
|
8
|
+
const acquire = (cursor) => acquireRuntimeCapabilityCatalog(outboundConns, resolveCapabilityVisibility(outboundConns, inboundConn, getRequestSession(inboundConn), 'prompts'), {
|
|
9
|
+
continuation: cursor
|
|
10
|
+
? { kind: 'prompts', cursor, enablePagination: inboundConn.enablePagination ?? false }
|
|
11
|
+
: undefined,
|
|
12
|
+
});
|
|
13
|
+
const server = getLegacyInboundServer(inboundConn);
|
|
14
|
+
server.setRequestHandler(ListPromptsRequestSchema, withErrorHandling(async (request) => {
|
|
15
|
+
const result = await (await acquire(request.params?.cursor)).list('prompts', { cursor: request.params?.cursor, enablePagination: inboundConn.enablePagination ?? false });
|
|
16
|
+
return {
|
|
17
|
+
prompts: result.items,
|
|
18
|
+
...(result.nextCursor === undefined ? {} : { nextCursor: result.nextCursor }),
|
|
19
|
+
...(result._meta === undefined ? {} : { _meta: result._meta }),
|
|
20
|
+
};
|
|
21
|
+
}, 'Error listing prompts'));
|
|
22
|
+
server.setRequestHandler(GetPromptRequestSchema, withErrorHandling(async (request) => {
|
|
23
|
+
const route = (await acquire()).resolve('prompts', request.params.name);
|
|
24
|
+
if (!route?.connection)
|
|
25
|
+
throw new Error(`Unknown prompt: ${request.params.name}`);
|
|
26
|
+
return requestLegacyOutbound(route.connection, 'prompts/get', {
|
|
27
|
+
...request.params,
|
|
28
|
+
name: route.entry.route.upstreamIdentity,
|
|
29
|
+
});
|
|
30
|
+
}, 'Error getting prompt'));
|
|
31
|
+
}
|
|
32
|
+
export function registerCompletionHandlers(outboundConns, inboundConn) {
|
|
33
|
+
getLegacyInboundServer(inboundConn).setRequestHandler(CompleteRequestSchema, withErrorHandling(async (request) => {
|
|
34
|
+
const ref = request.params.ref;
|
|
35
|
+
const prompt = ref.type === 'ref/prompt';
|
|
36
|
+
const snapshot = await acquireRuntimeCapabilityCatalog(outboundConns, resolveCapabilityVisibility(outboundConns, inboundConn, getRequestSession(inboundConn), prompt ? 'prompts' : 'resources'));
|
|
37
|
+
const identity = prompt ? ref.name : ref.uri;
|
|
38
|
+
const route = snapshot.resolve(prompt ? 'prompts' : 'resourceTemplates', identity) ??
|
|
39
|
+
(!prompt ? snapshot.resolve('resources', identity) : undefined);
|
|
40
|
+
if (!route?.connection)
|
|
41
|
+
throw new Error(`Unknown completion reference: ${identity}`);
|
|
42
|
+
return requestLegacyOutbound(route.connection, 'completion/complete', {
|
|
43
|
+
...request.params,
|
|
44
|
+
ref: prompt
|
|
45
|
+
? { ...ref, name: route.entry.route.upstreamIdentity }
|
|
46
|
+
: { ...ref, uri: route.entry.route.upstreamIdentity },
|
|
47
|
+
});
|
|
48
|
+
}, 'Error handling completion'));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=promptRequestHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"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KAAK,YAAY,CAAC;QACzC,MAAM,QAAQ,GAAG,MAAM,+BAA+B,CACpD,aAAa,EACb,2BAA2B,CACzB,aAAa,EACb,WAAW,EACX,iBAAiB,CAAC,WAAW,CAAC,EAC9B,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CACjC,CACF,CAAC;QACF,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;QAC7C,MAAM,KAAK,GACT,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,mBAAmB,EAAE,QAAQ,CAAC;YACpE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAClE,IAAI,CAAC,KAAK,EAAE,UAAU;YAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,QAAQ,EAAE,CAAC,CAAC;QACrF,OAAO,qBAAqB,CAAC,KAAK,CAAC,UAAU,EAAE,qBAAqB,EAAE;YACpE,GAAG,OAAO,CAAC,MAAM;YACjB,GAAG,EAAE,MAAM;gBACT,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE;gBACtD,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE;SACxD,CAAC,CAAC;IACL,CAAC,EAAE,2BAA2B,CAAC,CAChC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LazyLoadingOrchestrator } from '../../../../core/capabilities/lazyLoadingOrchestrator.js';
|
|
2
|
+
import { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection } from '../../../../core/protocol/requestHandlerUtils.js';
|
|
3
|
+
import { InboundConnection } from '../../../../core/types/index.js';
|
|
4
|
+
import { type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
5
|
+
export { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection, };
|
|
6
|
+
/**
|
|
7
|
+
* Registers all request handlers based on available capabilities
|
|
8
|
+
* @param clients Record of client instances
|
|
9
|
+
* @param server The MCP server instance
|
|
10
|
+
* @param capabilities The server capabilities
|
|
11
|
+
* @param tags Array of tags to filter clients by
|
|
12
|
+
*/
|
|
13
|
+
export declare function registerRequestHandlers(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection, lazyLoadingOrchestrator?: LazyLoadingOrchestrator): void;
|
|
14
|
+
//# sourceMappingURL=requestHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHandlers.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/requestHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,2CAA2C,CAAC;AAEnD,OAAO,EAAgB,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAEL,KAAK,yBAAyB,EAG/B,MAAM,4DAA4D,CAAC;AAmBpE,OAAO,EACL,sCAAsC,EACtC,2BAA2B,EAC3B,iBAAiB,EACjB,yBAAyB,GAC1B,CAAC;AA0EF;;;;;;GAMG;AAEH,wBAAgB,uBAAuB,CACrC,aAAa,EAAE,yBAAyB,EACxC,WAAW,EAAE,iBAAiB,EAC9B,uBAAuB,CAAC,EAAE,uBAAuB,GAChD,IAAI,CA6CN"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection, } from '../../../../core/protocol/requestHandlerUtils.js';
|
|
2
|
+
import { ServerManager } from '../../../../core/server/serverManager.js';
|
|
3
|
+
import { ClientStatus } from '../../../../core/types/index.js';
|
|
4
|
+
import logger, { setLogLevel } from '../../../../logger/logger.js';
|
|
5
|
+
import { getLegacyTransport, requestLegacyOutbound, setOutboundRequestHandler, } from '../../client/runtime/legacyOutboundConnection.js';
|
|
6
|
+
import { getLegacyInboundServer } from '../runtime/legacyInboundConnection.js';
|
|
7
|
+
import { CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema, PingRequestSchema, SetLevelRequestSchema, } from '../../types.js';
|
|
8
|
+
import { withErrorHandling } from '../../../../utils/core/errorHandling.js';
|
|
9
|
+
import { getRequestTimeout } from '../../../../utils/core/timeoutUtils.js';
|
|
10
|
+
import { registerCompletionHandlers, registerPromptHandlers } from './promptRequestHandlers.js';
|
|
11
|
+
import { registerResourceHandlers } from './resourceRequestHandlers.js';
|
|
12
|
+
import { registerToolHandlers } from './toolRequestHandlers.js';
|
|
13
|
+
export { createCapabilityCatalogFromConnections, filterConnectionsForSession, getRequestSession, resolveOutboundConnection, };
|
|
14
|
+
/**
|
|
15
|
+
* Registers server-specific request handlers
|
|
16
|
+
* @param outboundConns Record of client instances
|
|
17
|
+
* @param serverInfo The MCP server instance
|
|
18
|
+
*/
|
|
19
|
+
function registerServerRequestHandlers(outboundConns, inboundConn) {
|
|
20
|
+
Array.from(outboundConns.entries()).forEach(([_, outboundConn]) => {
|
|
21
|
+
const capabilities = outboundConn.capabilities;
|
|
22
|
+
// Ping is always supported
|
|
23
|
+
setOutboundRequestHandler(outboundConn, PingRequestSchema, withErrorHandling(async () => {
|
|
24
|
+
return ServerManager.current.executeServerOperation(inboundConn, (inboundConn) => getLegacyInboundServer(inboundConn).ping());
|
|
25
|
+
}, 'Error pinging'));
|
|
26
|
+
// Only register CreateMessage handler if server supports sampling capability
|
|
27
|
+
if (capabilities?.sampling) {
|
|
28
|
+
setOutboundRequestHandler(outboundConn, CreateMessageRequestSchema, withErrorHandling(async (request) => {
|
|
29
|
+
return ServerManager.current.executeServerOperation(inboundConn, (inboundConn) => getLegacyInboundServer(inboundConn).createMessage(request.params, {
|
|
30
|
+
timeout: getRequestTimeout(getLegacyTransport(outboundConn)),
|
|
31
|
+
}));
|
|
32
|
+
}, 'Error creating message'));
|
|
33
|
+
}
|
|
34
|
+
// Only register ElicitRequest handler if server supports elicitation capability
|
|
35
|
+
if (capabilities?.elicitation) {
|
|
36
|
+
setOutboundRequestHandler(outboundConn, ElicitRequestSchema, withErrorHandling(async (request) => {
|
|
37
|
+
return ServerManager.current.executeServerOperation(inboundConn, (inboundConn) => getLegacyInboundServer(inboundConn).elicitInput(request.params, {
|
|
38
|
+
timeout: getRequestTimeout(getLegacyTransport(outboundConn)),
|
|
39
|
+
}));
|
|
40
|
+
}, 'Error eliciting input'));
|
|
41
|
+
}
|
|
42
|
+
// Only register ListRoots handler if server supports roots capability
|
|
43
|
+
if (capabilities?.roots) {
|
|
44
|
+
setOutboundRequestHandler(outboundConn, ListRootsRequestSchema, withErrorHandling(async (request) => {
|
|
45
|
+
return ServerManager.current.executeServerOperation(inboundConn, (inboundConn) => getLegacyInboundServer(inboundConn).listRoots(request.params, {
|
|
46
|
+
timeout: getRequestTimeout(getLegacyTransport(outboundConn)),
|
|
47
|
+
}));
|
|
48
|
+
}, 'Error listing roots'));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Registers all request handlers based on available capabilities
|
|
54
|
+
* @param clients Record of client instances
|
|
55
|
+
* @param server The MCP server instance
|
|
56
|
+
* @param capabilities The server capabilities
|
|
57
|
+
* @param tags Array of tags to filter clients by
|
|
58
|
+
*/
|
|
59
|
+
export function registerRequestHandlers(outboundConns, inboundConn, lazyLoadingOrchestrator) {
|
|
60
|
+
// Register logging level handler
|
|
61
|
+
getLegacyInboundServer(inboundConn).setRequestHandler(SetLevelRequestSchema, async (request) => {
|
|
62
|
+
setLogLevel(request.params.level);
|
|
63
|
+
return {};
|
|
64
|
+
});
|
|
65
|
+
// Register ping handler
|
|
66
|
+
getLegacyInboundServer(inboundConn).setRequestHandler(PingRequestSchema, withErrorHandling(async () => {
|
|
67
|
+
// Health check all connected upstream clients
|
|
68
|
+
const healthCheckPromises = Array.from(outboundConns.entries()).map(async ([clientName, outboundConn]) => {
|
|
69
|
+
if (outboundConn.status === ClientStatus.Connected) {
|
|
70
|
+
try {
|
|
71
|
+
await requestLegacyOutbound(outboundConn, 'ping');
|
|
72
|
+
logger.info(`Health check successful for client: ${clientName}`);
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
logger.warn(`Health check failed for client ${clientName}: ${error}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
// Wait for all health checks to complete (but don't fail if some fail)
|
|
80
|
+
await Promise.allSettled(healthCheckPromises);
|
|
81
|
+
// Always return successful pong response
|
|
82
|
+
return {};
|
|
83
|
+
}, 'Error handling ping'));
|
|
84
|
+
// Register resource-related handlers
|
|
85
|
+
registerResourceHandlers(outboundConns, inboundConn);
|
|
86
|
+
// Register tool-related handlers
|
|
87
|
+
registerToolHandlers(outboundConns, inboundConn, lazyLoadingOrchestrator);
|
|
88
|
+
// Register prompt-related handlers
|
|
89
|
+
registerPromptHandlers(outboundConns, inboundConn);
|
|
90
|
+
// Register completion-related handlers
|
|
91
|
+
registerCompletionHandlers(outboundConns, inboundConn);
|
|
92
|
+
// Register server-specific request handlers
|
|
93
|
+
if (!inboundConn.requestOnly)
|
|
94
|
+
registerServerRequestHandlers(outboundConns, inboundConn);
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=requestHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requestHandlers.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/requestHandlers.ts"],"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,CAAC,IAAI,CAAC,kCAAkC,UAAU,KAAK,KAAK,EAAE,CAAC,CAAC;gBACxE,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,uEAAuE;QACvE,MAAM,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QAE9C,yCAAyC;QACzC,OAAO,EAAE,CAAC;IACZ,CAAC,EAAE,qBAAqB,CAAC,CAC1B,CAAC;IAEF,qCAAqC;IACrC,wBAAwB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAErD,iCAAiC;IACjC,oBAAoB,CAAC,aAAa,EAAE,WAAW,EAAE,uBAAuB,CAAC,CAAC;IAE1E,mCAAmC;IACnC,sBAAsB,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAEnD,uCAAuC;IACvC,0BAA0B,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;IAEvD,4CAA4C;IAC5C,IAAI,CAAC,WAAW,CAAC,WAAW;QAAE,6BAA6B,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { InboundConnection } from '../../../../core/types/index.js';
|
|
2
|
+
import { type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
3
|
+
export declare function registerResourceHandlers(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection): void;
|
|
4
|
+
//# sourceMappingURL=resourceRequestHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceRequestHandlers.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/resourceRequestHandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,4DAA4D,CAAC;AAYpE,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,yBAAyB,EACxC,WAAW,EAAE,iBAAiB,GAC7B,IAAI,CA6EN"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { acquireRuntimeCapabilityCatalog } from '../../../../core/capabilities/runtimeCapabilityCatalog.js';
|
|
2
|
+
import { getRequestSession, resolveCapabilityVisibility } from '../../../../core/protocol/requestHandlerUtils.js';
|
|
3
|
+
import { requestLegacyOutbound, } from '../../client/runtime/legacyOutboundConnection.js';
|
|
4
|
+
import { getLegacyInboundServer } from '../runtime/legacyInboundConnection.js';
|
|
5
|
+
import { projectResourceUri, resolveResourceRoute } from '../../shared/resourceTemplateRouting.js';
|
|
6
|
+
import { ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ReadResourceRequestSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, } from '../../types.js';
|
|
7
|
+
import { withErrorHandling } from '../../../../utils/core/errorHandling.js';
|
|
8
|
+
export function registerResourceHandlers(outboundConns, inboundConn) {
|
|
9
|
+
const acquire = (cursor, kind = 'resources') => acquireRuntimeCapabilityCatalog(outboundConns, resolveCapabilityVisibility(outboundConns, inboundConn, getRequestSession(inboundConn), 'resources'), { continuation: cursor ? { kind, cursor, enablePagination: inboundConn.enablePagination ?? false } : undefined });
|
|
10
|
+
const server = getLegacyInboundServer(inboundConn);
|
|
11
|
+
server.setRequestHandler(ListResourcesRequestSchema, withErrorHandling(async (request) => {
|
|
12
|
+
const snapshot = await acquire(request.params?.cursor);
|
|
13
|
+
const result = await snapshot.list('resources', {
|
|
14
|
+
cursor: request.params?.cursor,
|
|
15
|
+
enablePagination: inboundConn.enablePagination ?? false,
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
resources: result.items,
|
|
19
|
+
...(result.nextCursor === undefined ? {} : { nextCursor: result.nextCursor }),
|
|
20
|
+
...(result._meta === undefined ? {} : { _meta: result._meta }),
|
|
21
|
+
};
|
|
22
|
+
}, 'Error listing resources'));
|
|
23
|
+
server.setRequestHandler(ListResourceTemplatesRequestSchema, withErrorHandling(async (request) => {
|
|
24
|
+
const snapshot = await acquire(request.params?.cursor, 'resourceTemplates');
|
|
25
|
+
const result = await snapshot.list('resourceTemplates', {
|
|
26
|
+
cursor: request.params?.cursor,
|
|
27
|
+
enablePagination: inboundConn.enablePagination ?? false,
|
|
28
|
+
});
|
|
29
|
+
return {
|
|
30
|
+
resourceTemplates: result.items,
|
|
31
|
+
...(result.nextCursor === undefined ? {} : { nextCursor: result.nextCursor }),
|
|
32
|
+
...(result._meta === undefined ? {} : { _meta: result._meta }),
|
|
33
|
+
};
|
|
34
|
+
}, 'Error listing resource templates'));
|
|
35
|
+
server.setRequestHandler(SubscribeRequestSchema, withErrorHandling(async (request) => {
|
|
36
|
+
const route = resolveResourceRoute(await acquire(), request.params.uri);
|
|
37
|
+
return requestLegacyOutbound(route.connection, 'resources/subscribe', {
|
|
38
|
+
...request.params,
|
|
39
|
+
uri: route.upstreamIdentity,
|
|
40
|
+
});
|
|
41
|
+
}, 'Error subscribing to resource'));
|
|
42
|
+
server.setRequestHandler(UnsubscribeRequestSchema, withErrorHandling(async (request) => {
|
|
43
|
+
const route = resolveResourceRoute(await acquire(), request.params.uri);
|
|
44
|
+
return requestLegacyOutbound(route.connection, 'resources/unsubscribe', {
|
|
45
|
+
...request.params,
|
|
46
|
+
uri: route.upstreamIdentity,
|
|
47
|
+
});
|
|
48
|
+
}, 'Error unsubscribing from resource'));
|
|
49
|
+
server.setRequestHandler(ReadResourceRequestSchema, withErrorHandling(async (request) => {
|
|
50
|
+
const snapshot = await acquire();
|
|
51
|
+
const route = resolveResourceRoute(snapshot, request.params.uri);
|
|
52
|
+
const result = await requestLegacyOutbound(route.connection, 'resources/read', { ...request.params, uri: route.upstreamIdentity });
|
|
53
|
+
return {
|
|
54
|
+
...result,
|
|
55
|
+
contents: result.contents.map((content) => ({
|
|
56
|
+
...content,
|
|
57
|
+
uri: projectResourceUri(snapshot, route.entry.route.connectionKey, content.uri),
|
|
58
|
+
})),
|
|
59
|
+
};
|
|
60
|
+
}, 'Error reading resource'));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=resourceRequestHandlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceRequestHandlers.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/resourceRequestHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AAE3G,OAAO,EAEL,qBAAqB,GACtB,MAAM,4DAA4D,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,mDAAmD,CAAC;AAC7G,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,UAAU,wBAAwB,CACtC,aAAwC,EACxC,WAA8B;IAE9B,MAAM,OAAO,GAAG,CAAC,MAAe,EAAE,OAA0C,WAAW,EAAE,EAAE,CACzF,+BAA+B,CAC7B,aAAa,EACb,2BAA2B,CAAC,aAAa,EAAE,WAAW,EAAE,iBAAiB,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,EACpG,EAAE,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,WAAW,CAAC,gBAAgB,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CACjH,CAAC;IACJ,MAAM,MAAM,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;IACnD,MAAM,CAAC,iBAAiB,CACtB,0BAA0B,EAC1B,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE;QAClC,MAAM,QAAQ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,KAAK,CAAC,UAAU,EAChB,gBAAgB,EAChB,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,gBAAgB,EAAE,CACnD,CAAC;QACF,OAAO;YACL,GAAG,MAAM;YACT,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAC1C,GAAG,OAAO;gBACV,GAAG,EAAE,kBAAkB,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC;aAChF,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC,EAAE,wBAAwB,CAAC,CAC7B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LazyLoadingOrchestrator } from '../../../../core/capabilities/lazyLoadingOrchestrator.js';
|
|
2
|
+
import { InboundConnection } from '../../../../core/types/index.js';
|
|
3
|
+
import { type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
4
|
+
export declare function registerToolHandlers(outboundConns: LegacyOutboundConnections, inboundConn: InboundConnection, lazyLoadingOrchestrator?: LazyLoadingOrchestrator): void;
|
|
5
|
+
//# sourceMappingURL=toolRequestHandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolRequestHandlers.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/server/protocol/toolRequestHandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAS5F,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,4DAA4D,CAAC;AAKpE,wBAAgB,oBAAoB,CAClC,aAAa,EAAE,yBAAyB,EACxC,WAAW,EAAE,iBAAiB,EAC9B,uBAAuB,CAAC,EAAE,uBAAuB,GAChD,IAAI,CAoFN"}
|