@1mcp/agent 0.38.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-CzXIIHM0.js → admin-OAuthServicesWorkspace-C3DNmymC.js} +1 -1
- package/build/admin/assets/{admin-console-Mv3xmdoU.js → admin-console-BmdH0cQS.js} +3 -3
- package/build/admin/index.html +1 -1
- package/build/auth/oauthAuthorizationFlow.d.ts +4 -0
- package/build/auth/oauthAuthorizationFlow.d.ts.map +1 -1
- package/build/auth/oauthAuthorizationFlow.js +61 -4
- package/build/auth/oauthAuthorizationFlow.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/clientSessionRepository.d.ts +1 -1
- package/build/auth/storage/fileStorageService.d.ts +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 +2 -2
- package/build/commands/inspect/inspect.d.ts.map +1 -1
- package/build/commands/inspect/inspect.js +37 -7
- package/build/commands/inspect/inspect.js.map +1 -1
- package/build/commands/inspect/inspectUtils.d.ts +1 -1
- package/build/commands/inspect/inspectUtils.d.ts.map +1 -1
- package/build/commands/inspect/inspectUtils.js +12 -3
- 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 +3 -3
- package/build/commands/run/run.d.ts.map +1 -1
- package/build/commands/run/run.js +14 -8
- package/build/commands/run/run.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/serveBackground.d.ts +3 -0
- 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/clientSurfaceAttachment.d.ts +3 -3
- package/build/commands/shared/clientSurfaceAttachment.js +4 -4
- package/build/commands/shared/inspectApiSchemas.d.ts +13 -0
- 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/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/configuredServerTargets.js +1 -1
- package/build/config/mcpConfigManager.js +3 -3
- package/build/constants/mcp.d.ts +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 +1 -1
- package/build/core/capabilities/capabilityAggregator.js +1 -1
- package/build/core/capabilities/capabilityCatalog.d.ts +2 -2
- package/build/core/capabilities/capabilityCatalog.js +5 -5
- package/build/core/capabilities/capabilityManager.d.ts +1 -1
- package/build/core/capabilities/capabilityManager.js +2 -2
- package/build/core/capabilities/capabilityPagination.d.ts +1 -1
- package/build/core/capabilities/configuredToolSnapshot.d.ts +1 -1
- package/build/core/capabilities/configuredToolSnapshot.js +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.js +1 -1
- package/build/core/capabilities/internal/installationTools.js +1 -1
- package/build/core/capabilities/internal/managementTools.js +1 -1
- package/build/core/capabilities/internalCapabilitiesProvider.d.ts +2 -2
- package/build/core/capabilities/internalCapabilitiesProvider.js +8 -8
- package/build/core/capabilities/lazyLoadingOrchestrator.d.ts +3 -3
- package/build/core/capabilities/lazyLoadingOrchestrator.js +3 -3
- package/build/core/capabilities/metaToolProvider.d.ts +2 -2
- package/build/core/capabilities/runtimeCapabilityCatalog.d.ts +1 -1
- package/build/core/capabilities/runtimeCapabilityCatalog.js +4 -4
- package/build/core/capabilities/toolRegistry.d.ts +1 -1
- package/build/core/client/postAuthOAuthRecovery.d.ts +1 -1
- package/build/core/client/postAuthOAuthRecovery.js +3 -3
- package/build/core/client/renderableOutboundConnection.d.ts +2 -2
- package/build/core/configChangeHandler.js +6 -6
- package/build/core/filtering/clientFiltering.d.ts +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 +1 -1
- package/build/core/filtering/filteringService.js +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 +2 -2
- package/build/core/notifications/notificationManager.d.ts +2 -2
- package/build/core/notifications/notificationManager.js +2 -2
- package/build/core/protocol/requestHandlerUtils.d.ts +4 -4
- package/build/core/protocol/requestHandlerUtils.js +9 -9
- 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/connectionResolver.d.ts +1 -1
- package/build/core/server/disabledTools.d.ts +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/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/templateConfigurationManager.d.ts +1 -1
- package/build/core/server/toolDescriptionOverrides.d.ts +1 -1
- package/build/core/tools/handlers/serverManagementHandler.d.ts +4 -4
- package/build/core/tools/handlers/serverManagementHandler.js +3 -3
- package/build/core/tools/internal/adapters/helpers/configTransformers.d.ts +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 +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.js +2 -2
- package/build/core/types/server.d.ts +2 -2
- package/build/domains/admin/adminConfiguredServerService.d.ts +1 -1
- package/build/domains/admin/adminConfiguredServerService.js +2 -2
- 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.js +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.js +1 -1
- package/build/domains/admin/runtimeConfiguredToolInspectionService.js +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/logger/configureGlobalLogger.js +1 -1
- package/build/sdk/legacy/auth/sdkOAuthClientProvider.d.ts +2 -2
- package/build/sdk/legacy/auth/sdkOAuthServerProvider.d.ts +4 -4
- package/build/sdk/legacy/auth/sdkOAuthServerProvider.js +1 -1
- package/build/sdk/legacy/client/runtime/clientManager.d.ts +1 -1
- package/build/sdk/legacy/client/runtime/legacyGatewayClientAdapter.d.ts +2 -2
- package/build/sdk/legacy/client/runtime/legacyGatewayClientAdapter.js +1 -1
- package/build/sdk/legacy/client/runtime/legacyOutboundConnection.js +1 -1
- package/build/sdk/legacy/client/runtime/legacySdkClientAdapter.d.ts +2 -2
- package/build/sdk/legacy/client/runtime/legacySdkClientAdapter.js +4 -4
- package/build/sdk/legacy/client/runtime/legacyTransport.d.ts +1 -1
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.d.ts +1 -1
- package/build/sdk/legacy/client/runtime/modernSdkClientAdapter.js +2 -2
- package/build/sdk/legacy/client/runtime/outboundRequestParams.d.ts +1 -1
- package/build/sdk/legacy/client/runtime/serveClient.d.ts +2 -2
- package/build/sdk/legacy/client/runtime/serveClient.d.ts.map +1 -1
- package/build/sdk/legacy/client/runtime/serveClient.js +4 -4
- package/build/sdk/legacy/client/runtime/serveClient.js.map +1 -1
- package/build/sdk/legacy/commands/serve.js +1 -1
- package/build/sdk/legacy/server/protocol/notificationHandlers.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/notificationHandlers.js +5 -5
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/promptRequestHandlers.js +3 -3
- package/build/sdk/legacy/server/protocol/requestHandlers.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/requestHandlers.js +3 -3
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/resourceRequestHandlers.js +4 -4
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.d.ts +1 -1
- package/build/sdk/legacy/server/protocol/toolRequestHandlers.js +3 -3
- package/build/sdk/legacy/server/runtime/clientInstancePoolTypes.d.ts +2 -2
- package/build/sdk/legacy/server/runtime/connectionManager.d.ts +1 -1
- package/build/sdk/legacy/server/runtime/connectionManager.js +2 -2
- package/build/sdk/legacy/server/runtime/legacyInboundConnection.d.ts +2 -2
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.d.ts +3 -3
- package/build/sdk/legacy/server/runtime/legacySdkServerAdapter.js +2 -2
- package/build/sdk/legacy/server/runtime/mcpLoggingEnhancer.d.ts +1 -1
- package/build/sdk/legacy/server/runtime/mcpServerLifecycleManager.d.ts +2 -2
- package/build/sdk/legacy/server/runtime/mcpServerLifecycleManager.js +1 -1
- package/build/sdk/legacy/server/runtime/requestContextPreparation.d.ts +1 -1
- package/build/sdk/legacy/server/runtime/serverManager.d.ts +1 -1
- package/build/sdk/legacy/server/runtime/serverManager.js +1 -1
- package/build/sdk/legacy/server/runtime/templateServerCleanup.d.ts +1 -1
- package/build/sdk/legacy/server/runtime/templateServerManager.d.ts +1 -1
- package/build/sdk/legacy/server/runtime/templateServerManager.js +1 -1
- package/build/sdk/legacy/shared/capabilityListCapture.d.ts +1 -1
- package/build/sdk/legacy/shared/capabilityListCapture.js +1 -1
- package/build/sdk/legacy/transport/http/loggingSseTransport.d.ts +2 -2
- package/build/sdk/legacy/transport/http/loggingSseTransport.js +1 -1
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.d.ts +1 -1
- package/build/sdk/legacy/transport/http/middlewares/scopeAuthMiddleware.js +1 -1
- package/build/sdk/legacy/transport/http/modernInboundLegacyBridge.js +2 -2
- package/build/sdk/legacy/transport/http/restorableStreamableTransport.d.ts +1 -1
- package/build/sdk/legacy/transport/http/restorableStreamableTransport.js +1 -1
- package/build/sdk/legacy/transport/http/routes/sseRoutes.js +2 -2
- package/build/sdk/legacy/transport/http/server.js +2 -2
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.d.ts +1 -1
- package/build/sdk/legacy/transport/http/streamableSessionLifecycle.js +1 -1
- package/build/sdk/legacy/transport/restartableStdioTransport.d.ts +3 -3
- package/build/sdk/legacy/transport/restartableStdioTransport.js +1 -1
- package/build/sdk/legacy/transport/stdioProxyTransport.js +2 -2
- package/build/sdk/legacy/transport/transportFactory.js +3 -3
- package/build/sdk/legacy/validation/CustomJsonSchemaValidator.d.ts +1 -1
- package/build/transport/http/middlewares/httpRequestLogger.js +1 -1
- package/build/transport/http/middlewares/tagsExtractor.js +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 +36 -1
- package/build/transport/http/routes/adminRoutes.js.map +1 -1
- package/build/transport/http/routes/apiRoutes.js +1 -1
- package/build/transport/http/routes/inspectHelpers.js +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 +57 -59
- package/build/transport/http/routes/inspectRoutes.js.map +1 -1
- package/build/transport/http/routes/modernHttpRoutes.js +1 -1
- package/build/transport/http/routes/oauthRoutes.d.ts.map +1 -1
- package/build/transport/http/routes/oauthRoutes.js +20 -4
- package/build/transport/http/routes/oauthRoutes.js.map +1 -1
- package/build/transport/http/routes/streamableHttpRoutes.d.ts +2 -2
- package/build/transport/http/routes/streamableHttpRoutes.js +7 -7
- package/build/transport/http/routes/toolRoutes.js +1 -1
- package/build/transport/http/storage/streamableSessionRepository.js +1 -1
- package/build/transport/http/utils/templateContextAuthority.js +1 -1
- package/build/utils/validation/urlDetection.js +1 -1
- package/package.json +1 -1
|
@@ -14,7 +14,10 @@ export class AdminOAuthService {
|
|
|
14
14
|
run: async () => {
|
|
15
15
|
let result;
|
|
16
16
|
try {
|
|
17
|
-
result = await this.options.oauthFlow.startBackendOAuth({
|
|
17
|
+
result = await this.options.oauthFlow.startBackendOAuth({
|
|
18
|
+
serverName: input.serviceId,
|
|
19
|
+
...(input.adminReturnOrigin ? { adminReturnOrigin: input.adminReturnOrigin } : {}),
|
|
20
|
+
});
|
|
18
21
|
}
|
|
19
22
|
catch {
|
|
20
23
|
throw new Error('backend_oauth_authorization_start_failed');
|
|
@@ -46,7 +49,10 @@ export class AdminOAuthService {
|
|
|
46
49
|
run: async () => {
|
|
47
50
|
let result;
|
|
48
51
|
try {
|
|
49
|
-
result = await this.options.oauthFlow.restartBackendOAuth({
|
|
52
|
+
result = await this.options.oauthFlow.restartBackendOAuth({
|
|
53
|
+
serverName: input.serviceId,
|
|
54
|
+
...(input.adminReturnOrigin ? { adminReturnOrigin: input.adminReturnOrigin } : {}),
|
|
55
|
+
});
|
|
50
56
|
}
|
|
51
57
|
catch {
|
|
52
58
|
throw new Error('backend_oauth_authorization_start_failed');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adminOAuthService.js","sourceRoot":"","sources":["../../../src/domains/admin/adminOAuthService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adminOAuthService.js","sourceRoot":"","sources":["../../../src/domains/admin/adminOAuthService.ts"],"names":[],"mappings":"AAyBA,MAAM,OAAO,iBAAiB;IACC;IAA7B,YAA6B,OAAiC;QAAjC,YAAO,GAAP,OAAO,CAA0B;IAAG,CAAC;IAElE,KAAK,CAAC,gBAAgB,CAAC,KAA+B;QACpD,MAAM,OAAO,GAAG;YACd,GAAG,KAAK,CAAC,OAAO;YAChB,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,EAAE,KAAK,CAAC,SAAS,EAAE;SAC/D,CAAC;QAEF,OAAO,IAAI,CAAC,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC;YACnD,OAAO;YACP,aAAa,EAAE,uBAAuB;YACtC,GAAG,EAAE,KAAK,IAAI,EAAE;gBACd,IAAI,MAAM,CAAC;gBACX,IAAI,CAAC;oBACH,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,iBAAiB,CAAC;wBACtD,UAAU,EAAE,KAAK,CAAC,SAAS;wBAC3B,GAAG,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;qBACnF,CAAC,CAAC;gBACL,CAAC;gBAAC,MAAM,CAAC;oBACP,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBAC9D,CAAC;gBACD,IAAI,MAAM,CAAC,MAAM,KAAK,mBAAmB,EAAE,CAAC;oBAC1C,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;gBACrD,CAAC;gBACD,IAAI,MAAM,CAAC,MAAM,KAAK,qBAAq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AAqB,EAAE,CAAC;oBAC5C,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;gBACvD,CAAC;gBACD,IAAI,MAAM,CAAC,MAAM,KAAK,WAAW,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;oBACzD,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;gBAC9D,CAAC;gBAED,OAAO;oBACL,SAAS,EAAE,KAAK,CAAC,SAAS;oBAC1B,WAAW,EAAE,MAAM,CAAC,WAAW;iBAChC,CAAC;YACJ,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MCPServerParams } from '../../core/types/index.js';
|
|
2
|
-
import type { PresetManager } from '
|
|
3
|
-
import type { PresetStrategy, TagQuery } from '
|
|
2
|
+
import type { PresetManager } from '../preset/manager/presetManager.js';
|
|
3
|
+
import type { PresetStrategy, TagQuery } from '../preset/types/presetTypes.js';
|
|
4
4
|
import type { AdminOperationContext, AdminOperationResult, AdminOperationService } from './adminOperationService.js';
|
|
5
5
|
export interface AdminPresetDraft {
|
|
6
6
|
name: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash, randomUUID } from 'node:crypto';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
|
-
import { TagQueryEvaluator } from '
|
|
4
|
-
import { TagQueryParser } from '
|
|
3
|
+
import { TagQueryEvaluator } from '../preset/parsers/tagQueryEvaluator.js';
|
|
4
|
+
import { TagQueryParser } from '../preset/parsers/tagQueryParser.js';
|
|
5
5
|
export class AdminPresetConflictError extends Error {
|
|
6
6
|
code = 'preset_revision_conflict';
|
|
7
7
|
constructor() {
|
|
@@ -4,7 +4,7 @@ import { publishCompleteConfiguredToolInspection, readCompleteConfiguredToolTarg
|
|
|
4
4
|
import { getDisabledTools, getLogicalToolName, isToolDisabled } from '../../core/server/disabledTools.js';
|
|
5
5
|
import { applyEffectiveToolDescription, getToolDescriptionOverrides, } from '../../core/server/toolDescriptionOverrides.js';
|
|
6
6
|
import { ClientStatus, } from '../../core/types/index.js';
|
|
7
|
-
import { isConfiguredServerTargetDisabled } from '
|
|
7
|
+
import { isConfiguredServerTargetDisabled } from '../config-change/configChange.js';
|
|
8
8
|
export async function createConfiguredToolInventory(input) {
|
|
9
9
|
const model = input.model?.trim() || 'gpt-4o';
|
|
10
10
|
const matchingConnections = input.instances
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { collectConfiguredToolPages, publishCompleteConfiguredToolInspection, readConfiguredToolSnapshot, } from '../../core/capabilities/configuredToolSnapshot.js';
|
|
2
2
|
import { requestLegacyAdapter } from '../../core/client/legacyAdapterRequest.js';
|
|
3
3
|
import { ClientStatus } from '../../core/types/index.js';
|
|
4
|
-
import { isConfiguredServerTargetDisabled } from '
|
|
4
|
+
import { isConfiguredServerTargetDisabled } from '../config-change/configChange.js';
|
|
5
5
|
import { createConfiguredToolInventory, } from './configuredToolInventory.js';
|
|
6
6
|
const INSPECTION_PAGE_TIMEOUT_BUDGET = 4;
|
|
7
7
|
const DEFAULT_REQUEST_TIMEOUT_MS = 60_000;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import { getAppConfigPaths, getAppPreset, isAppConfigurable } from '
|
|
2
|
+
import { getAppConfigPaths, getAppPreset, isAppConfigurable } from './appPresets.js';
|
|
3
3
|
import JSON5 from 'json5';
|
|
4
4
|
/**
|
|
5
5
|
* Discover all configuration files for a given application
|
|
@@ -351,7 +351,7 @@ export function generateAppConfig(appName, url) {
|
|
|
351
351
|
export async function discoverInstalledApps() {
|
|
352
352
|
const configurableApps = [];
|
|
353
353
|
const manualOnlyApps = [];
|
|
354
|
-
const { APP_PRESETS } = await import('
|
|
354
|
+
const { APP_PRESETS } = await import('./appPresets.js');
|
|
355
355
|
for (const [appName, preset] of Object.entries(APP_PRESETS)) {
|
|
356
356
|
if (preset.configurable) {
|
|
357
357
|
const discovery = await discoverAppConfigs(appName);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryServer } from '
|
|
1
|
+
import type { RegistryServer } from '../../registry/types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Extract default environment variables from server metadata
|
|
4
4
|
* @deprecated Use extractEnvVarMetadata and filter for defaults instead
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryServer } from '
|
|
1
|
+
import type { RegistryServer } from '../../registry/types.js';
|
|
2
2
|
import type { ArgMetadata, EnvVarMetadata } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Extract all environment variables with metadata from server packages
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RegistryServer } from '
|
|
1
|
+
import type { RegistryServer } from '../registry/types.js';
|
|
2
2
|
import { type DirectInstallationSource, type RegistryInstallationSource, type TargetResolution } from './serverInstallationTypes.js';
|
|
3
3
|
export declare function resolveDirectInstallTarget(source: DirectInstallationSource): TargetResolution;
|
|
4
4
|
export declare function resolveRegistryInstallTarget(source: RegistryInstallationSource, registryServer: RegistryServer): TargetResolution;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MCPServerParams } from '../../core/types/index.js';
|
|
2
|
-
import type { ConfigBackupPolicy, ConfigChangeResult, ConfiguredServerTargetRef } from '
|
|
3
|
-
import type { RegistryServer } from '
|
|
2
|
+
import type { ConfigBackupPolicy, ConfigChangeResult, ConfiguredServerTargetRef } from '../config-change/configChange.js';
|
|
3
|
+
import type { RegistryServer } from '../registry/types.js';
|
|
4
4
|
export type ServerInstallationWorkflowMode = 'preview' | 'apply';
|
|
5
5
|
export type ServerInstallationWorkflowSourceType = 'registry' | 'direct';
|
|
6
6
|
export type DirectInstallTransport = 'stdio' | 'http' | 'sse';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveServerTarget } from '../../commands/mcp/utils/mcpServerConfig.js';
|
|
2
|
-
import { createConfigChangeService, } from '
|
|
3
|
-
import { createRegistryClient } from '
|
|
2
|
+
import { createConfigChangeService, } from '../config-change/configChange.js';
|
|
3
|
+
import { createRegistryClient } from '../registry/mcpRegistryClient.js';
|
|
4
4
|
import { resolveDirectInstallTarget, resolveRegistryInstallTarget, validateRegistrySource, } from './serverInstallationSourceResolution.js';
|
|
5
5
|
export function createServerInstallationWorkflow(ports = {}) {
|
|
6
6
|
return new DefaultServerInstallationWorkflow(ports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TemplateValidationResult } from '../../core/instructions/templateValidator.js';
|
|
2
2
|
import type { InstructionTemplateConfig } from '../../core/types/transport.js';
|
|
3
|
-
import { type ConfigChangeResult, type ConfigChangeService } from '
|
|
3
|
+
import { type ConfigChangeResult, type ConfigChangeService } from '../config-change/configChange.js';
|
|
4
4
|
export { DEFAULT_CLI_INSTRUCTION_TEMPLATE } from '../../core/instructions/templateTypes.js';
|
|
5
5
|
export interface InstructionTemplateValidation {
|
|
6
6
|
valid: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { promises as fs } from 'node:fs';
|
|
2
2
|
import { DEFAULT_CLI_INSTRUCTION_TEMPLATE, DEFAULT_INSTRUCTION_TEMPLATE, } from '../../core/instructions/templateTypes.js';
|
|
3
3
|
import { validateTemplateContent } from '../../core/instructions/templateValidator.js';
|
|
4
|
-
import { fingerprintConfiguredServerConfigDocument, } from '
|
|
4
|
+
import { fingerprintConfiguredServerConfigDocument, } from '../config-change/configChange.js';
|
|
5
5
|
export { DEFAULT_CLI_INSTRUCTION_TEMPLATE } from '../../core/instructions/templateTypes.js';
|
|
6
6
|
const DEFAULT_IDENTITY = 'default';
|
|
7
7
|
const DEFAULT_VARIANTS = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PresetConfig, PresetListItem, PresetValidationResult } from '
|
|
1
|
+
import { PresetConfig, PresetListItem, PresetValidationResult } from '../types/presetTypes.js';
|
|
2
2
|
/**
|
|
3
3
|
* PresetManager handles dynamic preset storage, validation, and hot-reloading.
|
|
4
4
|
* Integrates with client notification system for real-time updates.
|
|
@@ -2,9 +2,9 @@ import { promises as fs, watch } from 'fs';
|
|
|
2
2
|
import { join } from 'path';
|
|
3
3
|
import { getAllServerTargets } from '../../../commands/shared/baseConfigUtils.js';
|
|
4
4
|
import { getConfigDir } from '../../../constants.js';
|
|
5
|
-
import { TagQueryEvaluator } from '
|
|
6
|
-
import { PresetErrorHandler } from '
|
|
7
|
-
import { PresetServerChangeDetector } from '
|
|
5
|
+
import { TagQueryEvaluator } from '../parsers/tagQueryEvaluator.js';
|
|
6
|
+
import { PresetErrorHandler } from '../services/presetErrorHandler.js';
|
|
7
|
+
import { PresetServerChangeDetector } from '../services/presetServerChangeDetector.js';
|
|
8
8
|
import logger from '../../../logger/logger.js';
|
|
9
9
|
import { cleanupPresetManagerState } from './presetManagerCleanup.js';
|
|
10
10
|
import { ensurePresetConfigDirectory, writePresetStorage } from './presetStorage.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { FSWatcher } from 'fs';
|
|
2
|
-
import { PresetServerChangeDetector } from '
|
|
3
|
-
import { PresetConfig } from '
|
|
2
|
+
import { PresetServerChangeDetector } from '../services/presetServerChangeDetector.js';
|
|
3
|
+
import { PresetConfig } from '../types/presetTypes.js';
|
|
4
4
|
export interface PresetManagerCleanupState {
|
|
5
5
|
reloadTimeout: ReturnType<typeof setTimeout> | null;
|
|
6
6
|
watcher: FSWatcher | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PresetConfig } from '
|
|
1
|
+
import { PresetConfig } from '../types/presetTypes.js';
|
|
2
2
|
export declare function ensurePresetConfigDirectory(configDirOption?: string): Promise<void>;
|
|
3
3
|
export declare function writePresetStorage(configPath: string, presets: Map<string, PresetConfig>, configDirOption?: string): Promise<void>;
|
|
4
4
|
//# sourceMappingURL=presetStorage.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MCPServerParams } from '../../../core/types/index.js';
|
|
2
|
-
import { PresetConfig } from '
|
|
2
|
+
import { PresetConfig } from '../types/presetTypes.js';
|
|
3
3
|
export interface PresetTestSummary {
|
|
4
4
|
servers: string[];
|
|
5
5
|
tags: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TagQueryEvaluator } from '
|
|
2
|
-
import { TagQueryParser } from '
|
|
1
|
+
import { TagQueryEvaluator } from '../parsers/tagQueryEvaluator.js';
|
|
2
|
+
import { TagQueryParser } from '../parsers/tagQueryParser.js';
|
|
3
3
|
import logger from '../../../logger/logger.js';
|
|
4
4
|
export function testPresetAgainstServers(name, preset, availableServers) {
|
|
5
5
|
const matchingServers = [];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { PresetConfig, PresetValidationResult } from '
|
|
1
|
+
import { PresetConfig, PresetValidationResult } from '../types/presetTypes.js';
|
|
2
2
|
export declare function validatePresetConfig(name: string, config: Omit<PresetConfig, 'name' | 'created' | 'lastModified'>): PresetValidationResult;
|
|
3
3
|
//# sourceMappingURL=presetValidation.d.ts.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* JSON-based tag query evaluator for MongoDB-like queries
|
|
3
3
|
* Supports three-state tag selection: empty, selected, not selected
|
|
4
4
|
*/
|
|
5
|
-
import { TagQuery } from '
|
|
5
|
+
import { TagQuery } from '../types/presetTypes.js';
|
|
6
6
|
/**
|
|
7
7
|
* Validation result for tag queries
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Advanced tag query parser supporting boolean expressions
|
|
3
3
|
* Supports multiple syntax variants: compact, natural language, and symbols
|
|
4
4
|
*/
|
|
5
|
-
import { TagQuery } from '
|
|
5
|
+
import { TagQuery } from '../types/presetTypes.js';
|
|
6
6
|
export interface TagExpression {
|
|
7
7
|
type: 'and' | 'or' | 'not' | 'tag' | 'group';
|
|
8
8
|
value?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OAuthClientProvider } from '
|
|
2
|
-
import type { OAuthClientInformationFull, OAuthClientMetadata, OAuthTokens } from '
|
|
1
|
+
import { OAuthClientProvider } from '../client/auth.js';
|
|
2
|
+
import type { OAuthClientInformationFull, OAuthClientMetadata, OAuthTokens } from '../shared/auth.js';
|
|
3
3
|
/**
|
|
4
4
|
* OAuth client configuration for connecting to downstream MCP servers
|
|
5
5
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { OAuthStorageService } from '../../../auth/storage/oauthStorageService.js';
|
|
2
|
-
import type { OAuthRegisteredClientsStore } from '
|
|
3
|
-
import type { AuthorizationParams, OAuthServerProvider } from '
|
|
4
|
-
import type { AuthInfo } from '
|
|
5
|
-
import type { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '
|
|
2
|
+
import type { OAuthRegisteredClientsStore } from '../server/auth/clients.js';
|
|
3
|
+
import type { AuthorizationParams, OAuthServerProvider } from '../server/auth/provider.js';
|
|
4
|
+
import type { AuthInfo } from '../server/auth/types.js';
|
|
5
|
+
import type { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '../shared/auth.js';
|
|
6
6
|
import type { Response } from 'express';
|
|
7
7
|
/**
|
|
8
8
|
* Implementation of SDK's OAuthServerProvider interface using the new repository architecture.
|
|
@@ -5,7 +5,7 @@ import { AUTH_CONFIG } from '../../../constants.js';
|
|
|
5
5
|
import { RuntimeIdentityService } from '../../../core/runtime/runtimeIdentityService.js';
|
|
6
6
|
import { AgentConfigManager } from '../../../core/server/agentConfig.js';
|
|
7
7
|
import logger from '../../../logger/logger.js';
|
|
8
|
-
import { InvalidGrantError, InvalidScopeError, InvalidTargetError, ServerError, } from '
|
|
8
|
+
import { InvalidGrantError, InvalidScopeError, InvalidTargetError, ServerError, } from '../server/auth/errors.js';
|
|
9
9
|
import { InsecureFilePermissionsError } from '../../../utils/filePermissions.js';
|
|
10
10
|
import { escapeHtml } from '../../../utils/validation/sanitization.js';
|
|
11
11
|
import { auditScopeOperation, scopesToTags, tagsToScopes, validateScopesAgainstAvailableTags, } from '../../../utils/validation/scopeValidation.js';
|
|
@@ -2,7 +2,7 @@ import { EventEmitter } from 'node:events';
|
|
|
2
2
|
import { InstructionAggregator } from '../../../../core/instructions/instructionAggregator.js';
|
|
3
3
|
import { type BackendSupervisionSnapshot } from '../../../../core/server/backendStdioSupervisor.js';
|
|
4
4
|
import { OperationOptions, OutboundConnections, ServerCapability } from '../../../../core/types/index.js';
|
|
5
|
-
import type { Client } from '
|
|
5
|
+
import type { Client } from '../index.js';
|
|
6
6
|
import { type LegacyOutboundConnection } from './legacyOutboundConnection.js';
|
|
7
7
|
import type { AuthProviderTransport } from './legacyTransport.js';
|
|
8
8
|
import { OAuthRequiredError } from './types.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type JsonValue, type LegacyRequestId, type LegacySdkRequest } from '
|
|
2
|
-
import type { Client } from '
|
|
1
|
+
import { type JsonValue, type LegacyRequestId, type LegacySdkRequest } from '../../../contracts/index.js';
|
|
2
|
+
import type { Client } from '../index.js';
|
|
3
3
|
import { LegacySdkClientAdapter, type LegacySdkClientAdapterOptions } from './legacySdkClientAdapter.js';
|
|
4
4
|
import type { AuthProviderTransport } from './legacyTransport.js';
|
|
5
5
|
/** Routes the gateway-supported legacy slice through the legacy era adapter. */
|
|
@@ -2,7 +2,7 @@ import { LegacyOutboundEraAdapter } from '../../../../gateway/adapters/legacy/le
|
|
|
2
2
|
import { createEffectiveRequestAuthority } from '../../../../gateway/contracts/effectiveRequestAuthority.js';
|
|
3
3
|
import { gatewayOperationSchema } from '../../../../gateway/contracts/gatewayRequest.js';
|
|
4
4
|
import { toImmutableJsonValue } from '../../../../gateway/contracts/immutableJson.js';
|
|
5
|
-
import { createLegacyTimeoutMs, toJsonValue, } from '
|
|
5
|
+
import { createLegacyTimeoutMs, toJsonValue, } from '../../../contracts/index.js';
|
|
6
6
|
import { LegacySdkClientAdapter } from './legacySdkClientAdapter.js';
|
|
7
7
|
import { stripInboundRequestMeta } from './outboundRequestParams.js';
|
|
8
8
|
/** Routes the gateway-supported legacy slice through the legacy era adapter. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { requestLegacyAdapter } from '../../../../core/client/legacyAdapterRequest.js';
|
|
2
|
-
import { toJsonValue } from '
|
|
2
|
+
import { toJsonValue } from '../../../contracts/index.js';
|
|
3
3
|
import { LegacyGatewayClientAdapter } from './legacyGatewayClientAdapter.js';
|
|
4
4
|
import { bindLegacySdkConnection, getLegacySdkClient, getLegacySdkTransport, setLegacySdkTransport, } from './legacySdkClientAdapter.js';
|
|
5
5
|
import { getModernSdkClient, getModernSdkTransport, ModernSdkClientAdapter, setModernSdkTransport, } from './modernSdkClientAdapter.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type OutboundConnection } from '../../../../core/types/client.js';
|
|
2
|
-
import { type JsonValue, type LegacyConnectionId, type LegacyRequestId, type LegacySdkAdapter, type LegacySdkEvent, type LegacySdkLifecycleState, type LegacySdkNotification, type LegacySdkRequest, type LegacySdkResponse } from '
|
|
3
|
-
import type { Client } from '
|
|
2
|
+
import { type JsonValue, type LegacyConnectionId, type LegacyRequestId, type LegacySdkAdapter, type LegacySdkEvent, type LegacySdkLifecycleState, type LegacySdkNotification, type LegacySdkRequest, type LegacySdkResponse } from '../../../contracts/index.js';
|
|
3
|
+
import type { Client } from '../index.js';
|
|
4
4
|
import type { AuthProviderTransport } from './legacyTransport.js';
|
|
5
5
|
export interface LegacySdkClientAdapterOptions {
|
|
6
6
|
readonly recreateHttpTransport?: (transport: AuthProviderTransport, serverName?: string) => AuthProviderTransport;
|
|
@@ -3,10 +3,10 @@ import { LoadingState } from '../../../../core/loading/loadingStateTracker.js';
|
|
|
3
3
|
import { McpLoadingManager } from '../../../../core/loading/mcpLoadingManager.js';
|
|
4
4
|
import { ClientStatus } from '../../../../core/types/client.js';
|
|
5
5
|
import logger from '../../../../logger/logger.js';
|
|
6
|
-
import { OneMcpProtocolError, toJsonValue, } from '
|
|
7
|
-
import { StreamableHTTPError } from '
|
|
8
|
-
import { captureCapabilityListResult } from '
|
|
9
|
-
import { PromptListChangedNotificationSchema, ResourceListChangedNotificationSchema, ResultSchema, ToolListChangedNotificationSchema, } from '
|
|
6
|
+
import { OneMcpProtocolError, toJsonValue, } from '../../../contracts/index.js';
|
|
7
|
+
import { StreamableHTTPError } from '../streamableHttp.js';
|
|
8
|
+
import { captureCapabilityListResult } from '../../shared/capabilityListCapture.js';
|
|
9
|
+
import { PromptListChangedNotificationSchema, ResourceListChangedNotificationSchema, ResultSchema, ToolListChangedNotificationSchema, } from '../../types.js';
|
|
10
10
|
import { TransportRecreator } from './transportRecreator.js';
|
|
11
11
|
const INTERNAL_ERROR = -32_603;
|
|
12
12
|
const POST_AUTH_UNAUTHORIZED_MESSAGE = 'Server returned 401 after successful authentication';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SDKOAuthClientProvider } from '../../../../auth/sdkOAuthClientProvider.js';
|
|
2
|
-
import type { Transport } from '
|
|
2
|
+
import type { Transport } from '../../shared/transport.js';
|
|
3
3
|
export type OutboundProtocolVersion = 'auto' | 'legacy' | '2026-07-28';
|
|
4
4
|
export interface RecreateTransportOptions {
|
|
5
5
|
readonly preserveSessionId?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Client } from '@modelcontextprotocol/client';
|
|
2
|
-
import { type JsonValue, type LegacyConnectionId, type LegacyRequestId, type LegacySdkAdapter, type LegacySdkEvent, type LegacySdkLifecycleState, type LegacySdkNotification, type LegacySdkRequest, type LegacySdkResponse } from '
|
|
2
|
+
import { type JsonValue, type LegacyConnectionId, type LegacyRequestId, type LegacySdkAdapter, type LegacySdkEvent, type LegacySdkLifecycleState, type LegacySdkNotification, type LegacySdkRequest, type LegacySdkResponse } from '../../../contracts/index.js';
|
|
3
3
|
import type { AuthProviderTransport } from './legacyTransport.js';
|
|
4
4
|
/** Plain-data compatibility boundary around one v2 Client and its negotiated era. */
|
|
5
5
|
export declare class ModernSdkClientAdapter implements LegacySdkAdapter {
|
|
@@ -4,8 +4,8 @@ import { ModernOutboundEraAdapter } from '../../../../gateway/adapters/modern/mo
|
|
|
4
4
|
import { createEffectiveRequestAuthority } from '../../../../gateway/contracts/effectiveRequestAuthority.js';
|
|
5
5
|
import { gatewayOperationSchema } from '../../../../gateway/contracts/gatewayRequest.js';
|
|
6
6
|
import { toImmutableJsonValue } from '../../../../gateway/contracts/immutableJson.js';
|
|
7
|
-
import { createLegacyTimeoutMs, OneMcpProtocolError, toJsonValue, } from '
|
|
8
|
-
import { captureCapabilityListResult } from '
|
|
7
|
+
import { createLegacyTimeoutMs, OneMcpProtocolError, toJsonValue, } from '../../../contracts/index.js';
|
|
8
|
+
import { captureCapabilityListResult } from '../../shared/capabilityListCapture.js';
|
|
9
9
|
import { z } from 'zod';
|
|
10
10
|
import { stripInboundRequestMeta } from './outboundRequestParams.js';
|
|
11
11
|
const LIST_CHANGED_METHODS = [
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JsonValue } from '
|
|
1
|
+
import type { JsonValue } from '../../../contracts/index.js';
|
|
2
2
|
/** Removes caller-owned protocol metadata before an outbound hop regenerates it. */
|
|
3
3
|
export declare function stripInboundRequestMeta(params: JsonValue | undefined): JsonValue | undefined;
|
|
4
4
|
//# sourceMappingURL=outboundRequestParams.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TemplateContextProof } from '../../../../core/context/templateContextTrust.js';
|
|
2
|
-
import { type CallToolResult, type Tool } from '
|
|
2
|
+
import { type CallToolResult, type Tool } from '../../types.js';
|
|
3
3
|
import type { ContextData } from '../../../../types/context.js';
|
|
4
4
|
export interface JsonRpcSuccessEnvelope<Result> {
|
|
5
5
|
jsonrpc: '2.0';
|
|
@@ -51,7 +51,7 @@ export declare class StreamableServeClient {
|
|
|
51
51
|
constructor(serverUrl: URL, sessionId?: string, bearerToken?: string);
|
|
52
52
|
start(): Promise<void>;
|
|
53
53
|
initialize(context?: ContextData, contextProof?: TemplateContextProof): Promise<JsonRpcResponse<InitializeResult>>;
|
|
54
|
-
listTools(): Promise<JsonRpcResponse<ListToolsResult>>;
|
|
54
|
+
listTools(cursor?: string): Promise<JsonRpcResponse<ListToolsResult>>;
|
|
55
55
|
callTool(name: string, args: Record<string, unknown>): Promise<JsonRpcResponse<CallToolResult>>;
|
|
56
56
|
get sessionId(): string | undefined;
|
|
57
57
|
close(): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serveClient.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/legacy/client/runtime/serveClient.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAItF,OAAO,EAAE,KAAK,cAAc,EAAgD,KAAK,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACxH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAGzD,MAAM,WAAW,sBAAsB,CAAC,MAAM;IAC5C,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,OAAO,CAAC;KAChB,CAAC;CACH;AAED,MAAM,MAAM,eAAe,CAAC,MAAM,IAAI,sBAAsB,CAAC,MAAM,CAAC,GAAG,oBAAoB,CAAC;AAE5F,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,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,EACjB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAyBjC;AAED,wBAAsB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAKnG;AAED,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5E"}
|
|
@@ -5,8 +5,8 @@ import path from 'node:path';
|
|
|
5
5
|
import { MCP_SERVER_NAME, MCP_SERVER_VERSION } from '../../../../constants.js';
|
|
6
6
|
import { resolveFilterSelection } from '../../../../core/filtering/filterSelection.js';
|
|
7
7
|
import logger from '../../../../logger/logger.js';
|
|
8
|
-
import { StreamableHTTPClientTransport } from '
|
|
9
|
-
import { LATEST_PROTOCOL_VERSION } from '
|
|
8
|
+
import { StreamableHTTPClientTransport } from '../streamableHttp.js';
|
|
9
|
+
import { LATEST_PROTOCOL_VERSION } from '../../types.js';
|
|
10
10
|
import { createContextHash } from '../../../../utils/context/contextHash.js';
|
|
11
11
|
export const SESSION_CACHE_TTL_MS = 24 * 60 * 60 * 1000;
|
|
12
12
|
export class StreamableServeClient {
|
|
@@ -66,8 +66,8 @@ export class StreamableServeClient {
|
|
|
66
66
|
});
|
|
67
67
|
return response;
|
|
68
68
|
}
|
|
69
|
-
async listTools() {
|
|
70
|
-
return this.sendRequest('tools/list', {});
|
|
69
|
+
async listTools(cursor) {
|
|
70
|
+
return this.sendRequest('tools/list', cursor === undefined ? {} : { cursor });
|
|
71
71
|
}
|
|
72
72
|
async callTool(name, args) {
|
|
73
73
|
return this.sendRequest('tools/call', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serveClient.js","sourceRoot":"","sources":["../../../../../src/sdk/legacy/client/runtime/serveClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,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configureGlobalLogger.js';
|
|
19
19
|
import logger, { debugIf } from '../../../logger/logger.js';
|
|
20
20
|
import { resolveLoggingConfig } from '../../../logger/loggingConfig.js';
|
|
21
|
-
import { StdioServerTransport } from '
|
|
21
|
+
import { StdioServerTransport } from '../server/stdio.js';
|
|
22
22
|
import { setupServer } from '../../../server.js';
|
|
23
23
|
import { ExpressServer } from '../../../transport/http/server.js';
|
|
24
24
|
import { InsecureFilePermissionsError } from '../../../utils/filePermissions.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InboundConnection } from '../../../../core/types/index.js';
|
|
2
|
-
import { type LegacyOutboundConnections } from '
|
|
2
|
+
import { type LegacyOutboundConnections } from '../../client/runtime/legacyOutboundConnection.js';
|
|
3
3
|
/**
|
|
4
4
|
* Sets up client-to-server notification handlers
|
|
5
5
|
* @param clients Record of client instances
|