n8n 2.20.6 → 2.21.0
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/dist/abstract-server.d.ts +1 -0
- package/dist/abstract-server.js +10 -3
- package/dist/abstract-server.js.map +1 -1
- package/dist/agent-library-bundle.js +5989 -0
- package/dist/auth/auth.service.js +3 -3
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/execute-batch.d.ts +2 -2
- package/dist/commands/export/workflow.d.ts +2 -2
- package/dist/commands/import/workflow.d.ts +3 -0
- package/dist/commands/import/workflow.js +15 -1
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +2 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +6 -1
- package/dist/constants.js.map +1 -1
- package/dist/controller.registry.js +6 -0
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/auth.controller.js +7 -2
- package/dist/controllers/auth.controller.js.map +1 -1
- package/dist/controllers/me.controller.d.ts +1 -0
- package/dist/controllers/me.controller.js +4 -1
- package/dist/controllers/me.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +2 -2
- package/dist/credentials/credentials.service.d.ts +1 -0
- package/dist/credentials/credentials.service.js +11 -4
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/evaluation.ee/evaluation-api-error.d.ts +7 -0
- package/dist/evaluation.ee/evaluation-api-error.js +16 -0
- package/dist/evaluation.ee/evaluation-api-error.js.map +1 -0
- package/dist/evaluation.ee/evaluation-config-validator.d.ts +30 -0
- package/dist/evaluation.ee/evaluation-config-validator.js +236 -0
- package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -0
- package/dist/evaluation.ee/evaluation-config.controller.d.ts +24 -0
- package/dist/evaluation.ee/evaluation-config.controller.js +94 -0
- package/dist/evaluation.ee/evaluation-config.controller.js.map +1 -0
- package/dist/evaluation.ee/evaluation-config.service.d.ts +18 -0
- package/dist/evaluation.ee/evaluation-config.service.js +74 -0
- package/dist/evaluation.ee/evaluation-config.service.js.map +1 -0
- package/dist/evaluation.ee/llm-judge-provider-registry.d.ts +13 -0
- package/dist/evaluation.ee/llm-judge-provider-registry.js +122 -0
- package/dist/evaluation.ee/llm-judge-provider-registry.js.map +1 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +5 -0
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +32 -10
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.d.ts +22 -0
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +285 -0
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -0
- package/dist/evaluation.ee/test-runs.controller.ee.d.ts +3 -0
- package/dist/evaluation.ee/test-runs.controller.ee.js +26 -9
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runs.types.ee.d.ts +3 -0
- package/dist/eventbus/message-event-bus/message-event-bus.d.ts +2 -0
- package/dist/eventbus/message-event-bus/message-event-bus.js +54 -46
- package/dist/eventbus/message-event-bus/message-event-bus.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +3 -0
- package/dist/instance-settings-loader/instance-settings-loader.service.d.ts +4 -2
- package/dist/instance-settings-loader/instance-settings-loader.service.js +7 -3
- package/dist/instance-settings-loader/instance-settings-loader.service.js.map +1 -1
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.d.ts +20 -0
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js +235 -0
- package/dist/instance-settings-loader/loaders/community-packages.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/{sso.instance-settings-loader.d.ts → sso/oidc.instance-settings-loader.d.ts} +4 -10
- package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js +98 -0
- package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.d.ts +10 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +65 -0
- package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.d.ts +12 -0
- package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.js +75 -0
- package/dist/instance-settings-loader/loaders/sso/saml.instance-settings-loader.js.map +1 -0
- package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.d.ts +15 -0
- package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js +75 -0
- package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js.map +1 -0
- package/dist/load-nodes-and-credentials.d.ts +3 -3
- package/dist/load-nodes-and-credentials.js +25 -17
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +12 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js +63 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +42 -0
- package/dist/modules/agents/agent-execution.service.js +153 -0
- package/dist/modules/agents/agent-execution.service.js.map +1 -0
- package/dist/modules/agents/agent-message-mapper.d.ts +5 -0
- package/dist/modules/agents/agent-message-mapper.js +43 -0
- package/dist/modules/agents/agent-message-mapper.js.map +1 -0
- package/dist/modules/agents/agent-skills.service.d.ts +24 -0
- package/dist/modules/agents/agent-skills.service.js +166 -0
- package/dist/modules/agents/agent-skills.service.js.map +1 -0
- package/dist/modules/agents/agent-sse-stream.d.ts +15 -0
- package/dist/modules/agents/agent-sse-stream.js +194 -0
- package/dist/modules/agents/agent-sse-stream.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +18 -0
- package/dist/modules/agents/agents-tools.service.js +193 -0
- package/dist/modules/agents/agents-tools.service.js.map +1 -0
- package/dist/modules/agents/agents.controller.d.ts +260 -0
- package/dist/modules/agents/agents.controller.js +818 -0
- package/dist/modules/agents/agents.controller.js.map +1 -0
- package/dist/modules/agents/agents.module.d.ts +12 -0
- package/dist/modules/agents/agents.module.js +136 -0
- package/dist/modules/agents/agents.module.js.map +1 -0
- package/dist/modules/agents/agents.service.d.ts +151 -0
- package/dist/modules/agents/agents.service.js +1134 -0
- package/dist/modules/agents/agents.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +27 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js +584 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.d.ts +11 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.js +61 -0
- package/dist/modules/agents/builder/agents-builder-settings.controller.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-settings.service.d.ts +31 -0
- package/dist/modules/agents/builder/agents-builder-settings.service.js +199 -0
- package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +31 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.js +420 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder.service.d.ts +26 -0
- package/dist/modules/agents/builder/agents-builder.service.js +164 -0
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -0
- package/dist/modules/agents/builder/builder-model-lookup.service.d.ts +17 -0
- package/dist/modules/agents/builder/builder-model-lookup.service.js +67 -0
- package/dist/modules/agents/builder/builder-model-lookup.service.js.map +1 -0
- package/dist/modules/agents/builder/builder-tool-names.d.ts +14 -0
- package/dist/modules/agents/builder/builder-tool-names.js +17 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -0
- package/dist/modules/agents/builder/errors.d.ts +6 -0
- package/dist/modules/agents/builder/errors.js +13 -0
- package/dist/modules/agents/builder/errors.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +5 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +29 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-llm.tool.d.ts +2 -0
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +27 -0
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/ask-question.tool.d.ts +2 -0
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +26 -0
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/index.d.ts +4 -0
- package/dist/modules/agents/builder/interactive/index.js +12 -0
- package/dist/modules/agents/builder/interactive/index.js.map +1 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.d.ts +17 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +60 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.d.ts +13 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +136 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.d.ts +9 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.js +43 -0
- package/dist/modules/agents/entities/agent-checkpoint.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +16 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js +74 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +26 -0
- package/dist/modules/agents/entities/agent-execution.entity.js +100 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-message.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-message.entity.js +47 -0
- package/dist/modules/agents/entities/agent-message.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +8 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.js +37 -0
- package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +8 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.js +37 -0
- package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-observation.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-observation.entity.js +47 -0
- package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-published-version.entity.d.ts +22 -0
- package/dist/modules/agents/entities/agent-published-version.entity.js +67 -0
- package/dist/modules/agents/entities/agent-published-version.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-resource.entity.d.ts +5 -0
- package/dist/modules/agents/entities/agent-resource.entity.js +29 -0
- package/dist/modules/agents/entities/agent-resource.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-thread.entity.d.ts +6 -0
- package/dist/modules/agents/entities/agent-thread.entity.js +33 -0
- package/dist/modules/agents/entities/agent-thread.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent.entity.d.ts +24 -0
- package/dist/modules/agents/entities/agent.entity.js +74 -0
- package/dist/modules/agents/entities/agent.entity.js.map +1 -0
- package/dist/modules/agents/execution-recorder.d.ts +82 -0
- package/dist/modules/agents/execution-recorder.js +272 -0
- package/dist/modules/agents/execution-recorder.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +62 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +540 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +39 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js +45 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -0
- package/dist/modules/agents/integrations/agent-schedule.service.d.ts +30 -0
- package/dist/modules/agents/integrations/agent-schedule.service.js +327 -0
- package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -0
- package/dist/modules/agents/integrations/callback-store.d.ts +11 -0
- package/dist/modules/agents/integrations/callback-store.js +30 -0
- package/dist/modules/agents/integrations/callback-store.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +58 -0
- package/dist/modules/agents/integrations/chat-integration.service.js +397 -0
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -0
- package/dist/modules/agents/integrations/component-mapper.d.ts +57 -0
- package/dist/modules/agents/integrations/component-mapper.js +223 -0
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -0
- package/dist/modules/agents/integrations/cron-validation.d.ts +1 -0
- package/dist/modules/agents/integrations/cron-validation.js +8 -0
- package/dist/modules/agents/integrations/cron-validation.js.map +1 -0
- package/dist/modules/agents/integrations/esm-loader.d.ts +5 -0
- package/dist/modules/agents/integrations/esm-loader.js +24 -0
- package/dist/modules/agents/integrations/esm-loader.js.map +1 -0
- package/dist/modules/agents/integrations/integrations-sync.d.ts +4 -0
- package/dist/modules/agents/integrations/integrations-sync.js +78 -0
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +36 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +148 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -0
- package/dist/modules/agents/integrations/n8n-memory.d.ts +76 -0
- package/dist/modules/agents/integrations/n8n-memory.js +383 -0
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +14 -0
- package/dist/modules/agents/integrations/platforms/linear-integration.js +83 -0
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +12 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.js +81 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +30 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +122 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -0
- package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +47 -0
- package/dist/modules/agents/integrations/rich-interaction-tool.js +109 -0
- package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -0
- package/dist/modules/agents/integrations/types.d.ts +8 -0
- package/dist/modules/agents/integrations/types.js +12 -0
- package/dist/modules/agents/integrations/types.js.map +1 -0
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +9 -0
- package/dist/modules/agents/json-config/agent-config-composition.js +27 -0
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -0
- package/dist/modules/agents/json-config/agent-json-config.d.ts +1022 -0
- package/dist/modules/agents/json-config/agent-json-config.js +128 -0
- package/dist/modules/agents/json-config/agent-json-config.js.map +1 -0
- package/dist/modules/agents/json-config/credential-field-mapping.d.ts +4 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js +41 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -0
- package/dist/modules/agents/json-config/from-json-config.d.ts +18 -0
- package/dist/modules/agents/json-config/from-json-config.js +209 -0
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -0
- package/dist/modules/agents/json-config/integration-config.d.ts +61 -0
- package/dist/modules/agents/json-config/integration-config.js +33 -0
- package/dist/modules/agents/json-config/integration-config.js.map +1 -0
- package/dist/modules/agents/json-config/provider-tool-aliases.d.ts +1 -0
- package/dist/modules/agents/json-config/provider-tool-aliases.js +15 -0
- package/dist/modules/agents/json-config/provider-tool-aliases.js.map +1 -0
- package/dist/modules/agents/json-config/schema-text-serializer.d.ts +2 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js +205 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +6 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +18 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +120 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +10 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +59 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-message.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-message.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-message.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-observation-cursor.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-observation-cursor.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-observation-cursor.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-observation-lock.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-observation-lock.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-observation-lock.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-observation.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-observation.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-observation.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +20 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-published-version.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-resource.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-resource.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-resource.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-thread.repository.d.ts +5 -0
- package/dist/modules/agents/repositories/agent-thread.repository.js +26 -0
- package/dist/modules/agents/repositories/agent-thread.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.d.ts +9 -0
- package/dist/modules/agents/repositories/agent.repository.js +50 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -0
- package/dist/modules/agents/runtime/agent-isolate-pool.d.ts +48 -0
- package/dist/modules/agents/runtime/agent-isolate-pool.js +246 -0
- package/dist/modules/agents/runtime/agent-isolate-pool.js.map +1 -0
- package/dist/modules/agents/runtime/agent-secure-runtime.d.ts +21 -0
- package/dist/modules/agents/runtime/agent-secure-runtime.js +281 -0
- package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -0
- package/dist/modules/agents/runtime/sandbox-polyfills.d.ts +1 -0
- package/dist/modules/agents/runtime/sandbox-polyfills.js +74 -0
- package/dist/modules/agents/runtime/sandbox-polyfills.js.map +1 -0
- package/dist/modules/agents/tool-registry.d.ts +13 -0
- package/dist/modules/agents/tool-registry.js +42 -0
- package/dist/modules/agents/tool-registry.js.map +1 -0
- package/dist/modules/agents/tools/environment-tool.d.ts +3 -0
- package/dist/modules/agents/tools/environment-tool.js +26 -0
- package/dist/modules/agents/tools/environment-tool.js.map +1 -0
- package/dist/modules/agents/tools/node-tool-factory.d.ts +10 -0
- package/dist/modules/agents/tools/node-tool-factory.js +100 -0
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -0
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +43 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +404 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -0
- package/dist/modules/agents/tracing/builder-telemetry.d.ts +12 -0
- package/dist/modules/agents/tracing/builder-telemetry.js +48 -0
- package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -0
- package/dist/modules/agents/types/components.d.ts +71 -0
- package/dist/modules/agents/types/components.js +3 -0
- package/dist/modules/agents/types/components.js.map +1 -0
- package/dist/modules/agents/types/index.d.ts +1 -0
- package/dist/modules/agents/types/index.js +3 -0
- package/dist/modules/agents/types/index.js.map +1 -0
- package/dist/modules/agents/utils/agent-draft.utils.d.ts +2 -0
- package/dist/modules/agents/utils/agent-draft.utils.js +11 -0
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -0
- package/dist/modules/agents/utils/agent-resource-id.d.ts +3 -0
- package/dist/modules/agents/utils/agent-resource-id.js +14 -0
- package/dist/modules/agents/utils/agent-resource-id.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
- package/dist/modules/chat-hub/chat-hub.types.d.ts +2 -2
- package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
- package/dist/modules/community-packages/community-packages.config.js +2 -2
- package/dist/modules/community-packages/community-packages.config.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +4 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +14 -2
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.module.d.ts +1 -1
- package/dist/modules/community-packages/community-packages.module.js +10 -5
- package/dist/modules/community-packages/community-packages.module.js.map +1 -1
- package/dist/modules/data-table/data-table.service.js +6 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/slack-signature-identifier.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.d.ts +2 -0
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js +10 -0
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.config.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +16 -4
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.d.ts +3 -3
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js +11 -3
- package/dist/modules/dynamic-credentials.ee/workflow-status.controller.js.map +1 -1
- package/dist/modules/encryption-key-manager/encryption-bootstrap.service.js +4 -2
- package/dist/modules/encryption-key-manager/encryption-bootstrap.service.js.map +1 -1
- package/dist/modules/encryption-key-manager/encryption-key-manager.module.js +5 -2
- package/dist/modules/encryption-key-manager/encryption-key-manager.module.js.map +1 -1
- package/dist/modules/encryption-key-manager/encryption-key.controller.d.ts +3 -3
- package/dist/modules/encryption-key-manager/encryption-key.controller.js +8 -2
- package/dist/modules/encryption-key-manager/encryption-key.controller.js.map +1 -1
- package/dist/modules/encryption-key-manager/key-manager.service.d.ts +5 -1
- package/dist/modules/encryption-key-manager/key-manager.service.js +11 -4
- package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
- package/dist/modules/insights/insights-collection.service.js +1 -0
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +17 -49
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.d.ts +1 -0
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js +21 -3
- package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +3 -2
- package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -9
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +21 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js +35 -3
- package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +72 -42
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai.controller.js +25 -1
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +0 -1
- package/dist/modules/instance-ai/instance-ai.module.js +0 -2
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -5
- package/dist/modules/instance-ai/instance-ai.service.js +723 -76
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/index.d.ts +1 -0
- package/dist/modules/instance-ai/liveness/index.js +7 -0
- package/dist/modules/instance-ai/liveness/index.js.map +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +72 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +123 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -0
- package/dist/modules/instance-ai/message-parser.js +85 -6
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +4 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +1 -0
- package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +1 -1
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js +23 -7
- package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -3
- package/dist/modules/mcp/mcp.service.js +12 -9
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.js +6 -4
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.d.ts +40 -0
- package/dist/modules/mcp/tools/list-credentials.tool.js +148 -0
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +5 -4
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +3 -3
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +3 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +3 -3
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +12 -4
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +12 -5
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +1 -2
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.d.ts +5 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.js +4 -2
- package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry-node-loader.d.ts +27 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js +105 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.d.ts +1 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js +244 -0
- package/dist/modules/mcp-registry/mcp-registry-node-loader.test.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry.module.d.ts +4 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js +60 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -0
- package/dist/modules/mcp-registry/node-description-transform.d.ts +8 -0
- package/dist/modules/mcp-registry/node-description-transform.js +133 -0
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -0
- package/dist/modules/mcp-registry/node-description-transform.test.d.ts +1 -0
- package/dist/modules/mcp-registry/node-description-transform.test.js +286 -0
- package/dist/modules/mcp-registry/node-description-transform.test.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +8 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +31 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js +41 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.test.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +36 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +3 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mock-servers.d.ts +3 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js +80 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.d.ts +1 -1
- package/dist/modules/otel/execution-level-tracer.js +24 -9
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +9 -7
- package/dist/modules/otel/execution-level-tracer.types.js +14 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +176 -0
- package/dist/modules/quick-connect/quick-connect.config.js +8 -0
- package/dist/modules/quick-connect/quick-connect.config.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.module.d.ts +15 -0
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -3
- package/dist/modules/redaction/executions/execution-redaction.service.js +2 -6
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +3 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +8 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/node-catalog/index.d.ts +1 -0
- package/dist/node-catalog/index.js +6 -0
- package/dist/node-catalog/index.js.map +1 -0
- package/dist/{modules/mcp/tools/workflow-builder/workflow-builder-tools.service.d.ts → node-catalog/node-catalog.service.d.ts} +9 -15
- package/dist/{modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js → node-catalog/node-catalog.service.js} +38 -28
- package/dist/node-catalog/node-catalog.service.js.map +1 -0
- package/dist/node-execution/ephemeral-node-executor.d.ts +47 -0
- package/dist/node-execution/ephemeral-node-executor.js +289 -0
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -0
- package/dist/node-execution/index.d.ts +2 -0
- package/dist/node-execution/index.js +8 -0
- package/dist/node-execution/index.js.map +1 -0
- package/dist/public-api/v1/handlers/audit/audit.handler.d.ts +5 -4
- package/dist/public-api/v1/handlers/audit/audit.handler.js +5 -9
- package/dist/public-api/v1/handlers/audit/audit.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.d.ts +20 -17
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js +12 -39
- package/dist/public-api/v1/handlers/community-packages/community-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.d.ts +12 -49
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +6 -5
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.d.ts +8 -19
- package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.js +11 -11
- package/dist/public-api/v1/handlers/data-tables/data-tables.columns.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.d.ts +9 -17
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +19 -23
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.d.ts +9 -23
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +17 -27
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +11 -9
- package/dist/public-api/v1/handlers/discover/discover.handler.js +5 -3
- package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.d.ts +12 -11
- package/dist/public-api/v1/handlers/executions/executions.handler.js +46 -80
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/folders/folders.handler.d.ts +12 -17
- package/dist/public-api/v1/handlers/folders/folders.handler.js +17 -20
- package/dist/public-api/v1/handlers/folders/folders.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/insights/insights.handler.d.ts +5 -4
- package/dist/public-api/v1/handlers/insights/insights.handler.js +9 -5
- package/dist/public-api/v1/handlers/insights/insights.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +28 -11
- package/dist/public-api/v1/handlers/projects/projects.handler.js +44 -75
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/source-control/source-control.handler.d.ts +5 -6
- package/dist/public-api/v1/handlers/source-control/source-control.handler.js +3 -2
- package/dist/public-api/v1/handlers/source-control/source-control.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/tags/tags.handler.d.ts +9 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js +11 -8
- package/dist/public-api/v1/handlers/tags/tags.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/users/users.handler.ee.d.ts +14 -11
- package/dist/public-api/v1/handlers/users/users.handler.ee.js +7 -8
- package/dist/public-api/v1/handlers/users/users.handler.ee.js.map +1 -1
- package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +13 -7
- package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -3
- package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +17 -49
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +27 -46
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/shared/handler.types.d.ts +7 -1
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -2
- package/dist/public-api/v1/shared/middlewares/global.middleware.js +7 -6
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/job-processor.js +2 -0
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +9 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/scaling.types.d.ts +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.js +2 -0
- package/dist/server.js.map +1 -1
- package/dist/services/frontend.service.js +7 -14
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/import.service.d.ts +9 -3
- package/dist/services/import.service.js +72 -5
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/proxy-token-manager.js.map +1 -0
- package/dist/services/workflow-statistics.service.js +1 -0
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.d.ts +2 -0
- package/dist/task-runners/task-broker/task-broker.service.js +13 -1
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/utils/ttl-map.d.ts +17 -0
- package/dist/utils/ttl-map.js +80 -0
- package/dist/utils/ttl-map.js.map +1 -0
- package/dist/webhooks/test-webhooks.d.ts +3 -1
- package/dist/webhooks/test-webhooks.js +11 -3
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -1
- package/dist/workflow-execute-additional-data.js +34 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -0
- package/dist/workflow-helpers.js +15 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +2 -0
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/workflow-creation.service.js +1 -0
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow.service.js +4 -0
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +40 -25
- package/dist/instance-settings-loader/loaders/sso.instance-settings-loader.js +0 -203
- package/dist/instance-settings-loader/loaders/sso.instance-settings-loader.js.map +0 -1
- package/dist/modules/instance-ai/proxy-token-manager.js.map +0 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-builder-tools.service.js.map +0 -1
- /package/dist/{modules/instance-ai → services}/proxy-token-manager.d.ts +0 -0
- /package/dist/{modules/instance-ai → services}/proxy-token-manager.js +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jest_mock_extended_1 = require("jest-mock-extended");
|
|
4
|
+
const n8n_core_1 = require("n8n-core");
|
|
5
|
+
const logger = (0, jest_mock_extended_1.mock)();
|
|
6
|
+
const mcp_registry_node_loader_1 = require("./mcp-registry-node-loader");
|
|
7
|
+
const node_description_transform_1 = require("./node-description-transform");
|
|
8
|
+
const mock_servers_1 = require("./registry/mock-servers");
|
|
9
|
+
const baseDescription = {
|
|
10
|
+
displayName: 'MCP Registry Client (internal)',
|
|
11
|
+
name: 'mcpRegistryClientTool',
|
|
12
|
+
hidden: true,
|
|
13
|
+
group: ['output'],
|
|
14
|
+
version: 1,
|
|
15
|
+
description: 'Runtime backing for MCP registry-derived nodes',
|
|
16
|
+
defaults: { name: 'MCP Registry Client' },
|
|
17
|
+
codex: {
|
|
18
|
+
categories: ['AI'],
|
|
19
|
+
subcategories: { AI: ['Model Context Protocol'] },
|
|
20
|
+
alias: ['MCP', 'Model Context Protocol'],
|
|
21
|
+
},
|
|
22
|
+
inputs: [],
|
|
23
|
+
outputs: [],
|
|
24
|
+
credentials: [{ name: 'mcpOAuth2Api', required: true }],
|
|
25
|
+
properties: [
|
|
26
|
+
{ displayName: 'Endpoint URL', name: 'endpointUrl', type: 'hidden', default: '' },
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Server Transport',
|
|
29
|
+
name: 'serverTransport',
|
|
30
|
+
type: 'hidden',
|
|
31
|
+
default: 'httpStreamable',
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
};
|
|
35
|
+
function createBaseNodeClass() {
|
|
36
|
+
const baseInstance = {
|
|
37
|
+
description: baseDescription,
|
|
38
|
+
methods: {
|
|
39
|
+
loadOptions: {
|
|
40
|
+
getTools: jest.fn(),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
return baseInstance;
|
|
45
|
+
}
|
|
46
|
+
function createLoadNodesAndCredentials(options) {
|
|
47
|
+
const baseNode = createBaseNodeClass();
|
|
48
|
+
const sourcePath = '/path/to/McpRegistryClientTool.node.js';
|
|
49
|
+
const langchainLoader = (0, jest_mock_extended_1.mock)();
|
|
50
|
+
langchainLoader.getNode.mockImplementation((nodeType) => {
|
|
51
|
+
if (options?.withBaseNode !== false && nodeType === node_description_transform_1.MCP_REGISTRY_BASE_NODE_NAME) {
|
|
52
|
+
return { type: baseNode, sourcePath };
|
|
53
|
+
}
|
|
54
|
+
throw new Error('not found');
|
|
55
|
+
});
|
|
56
|
+
const loaders = options?.withLangchainLoader === false ? {} : { [node_description_transform_1.LANGCHAIN_PACKAGE_NAME]: langchainLoader };
|
|
57
|
+
const loadNodesAndCredentials = (0, jest_mock_extended_1.mock)({
|
|
58
|
+
loaders,
|
|
59
|
+
});
|
|
60
|
+
return { loadNodesAndCredentials, baseNode, sourcePath };
|
|
61
|
+
}
|
|
62
|
+
function createServiceWithServers(servers) {
|
|
63
|
+
const service = (0, jest_mock_extended_1.mock)();
|
|
64
|
+
service.getAll.mockReturnValue(servers);
|
|
65
|
+
return service;
|
|
66
|
+
}
|
|
67
|
+
describe('McpRegistryNodeLoader', () => {
|
|
68
|
+
describe('packageName', () => {
|
|
69
|
+
it('matches MCP_REGISTRY_PACKAGE_NAME', () => {
|
|
70
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
71
|
+
const service = createServiceWithServers([]);
|
|
72
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
73
|
+
expect(loader.packageName).toBe(node_description_transform_1.MCP_REGISTRY_PACKAGE_NAME);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
describe('loadAll', () => {
|
|
77
|
+
it('populates `types`, `known`, registers synthetic nodes and credentials for each supported server', async () => {
|
|
78
|
+
const { loadNodesAndCredentials, sourcePath } = createLoadNodesAndCredentials();
|
|
79
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
80
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
81
|
+
await loader.loadAll();
|
|
82
|
+
expect(loader.types.nodes).toHaveLength(1);
|
|
83
|
+
expect(loader.types.nodes[0]).toMatchObject({
|
|
84
|
+
name: 'notion',
|
|
85
|
+
displayName: 'Notion MCP',
|
|
86
|
+
});
|
|
87
|
+
expect(loader.types.credentials).toHaveLength(1);
|
|
88
|
+
expect(loader.types.credentials[0]).toMatchObject({
|
|
89
|
+
name: 'notionMcpOAuth2Api',
|
|
90
|
+
displayName: 'Notion MCP OAuth2',
|
|
91
|
+
});
|
|
92
|
+
const loadedNode = loader.getNode('notion');
|
|
93
|
+
const loadedCredential = loader.getCredential('notionMcpOAuth2Api');
|
|
94
|
+
expect(loadedNode).toBeDefined();
|
|
95
|
+
expect(loadedNode.sourcePath).toBe(sourcePath);
|
|
96
|
+
expect(loadedCredential).toBeDefined();
|
|
97
|
+
expect(loadedCredential.sourcePath).toBe('');
|
|
98
|
+
expect(loader.known.nodes.notion).toEqual({
|
|
99
|
+
className: 'McpRegistryClientTool',
|
|
100
|
+
sourcePath,
|
|
101
|
+
});
|
|
102
|
+
expect(loader.known.credentials.notionMcpOAuth2Api).toEqual({
|
|
103
|
+
className: 'McpRegistryApi',
|
|
104
|
+
sourcePath: '',
|
|
105
|
+
extends: ['mcpOAuth2Api'],
|
|
106
|
+
supportedNodes: ['notion'],
|
|
107
|
+
});
|
|
108
|
+
});
|
|
109
|
+
it('inherits prototype methods from the base node class on synthetic nodes', async () => {
|
|
110
|
+
const { loadNodesAndCredentials, baseNode } = createLoadNodesAndCredentials();
|
|
111
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
112
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
113
|
+
await loader.loadAll();
|
|
114
|
+
const synthetic = loader.getNode('notion').type;
|
|
115
|
+
expect(synthetic.methods).toBe(baseNode.methods);
|
|
116
|
+
expect(synthetic.description.name).toBe('notion');
|
|
117
|
+
expect(synthetic.description.displayName).toBe('Notion MCP');
|
|
118
|
+
});
|
|
119
|
+
it('skips servers whose remote selection returns null', async () => {
|
|
120
|
+
const unsupportedServer = {
|
|
121
|
+
...mock_servers_1.notionMockServer,
|
|
122
|
+
slug: 'no-remotes',
|
|
123
|
+
title: 'No Remotes',
|
|
124
|
+
remotes: [],
|
|
125
|
+
};
|
|
126
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
127
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer, unsupportedServer]);
|
|
128
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
129
|
+
await loader.loadAll();
|
|
130
|
+
expect(loader.types.nodes).toHaveLength(1);
|
|
131
|
+
expect(loader.types.nodes[0].name).toBe('notion');
|
|
132
|
+
expect(loader.types.credentials).toHaveLength(1);
|
|
133
|
+
expect(loader.types.credentials[0].name).toBe('notionMcpOAuth2Api');
|
|
134
|
+
expect(() => loader.getNode('noRemotes')).toThrow(n8n_core_1.UnrecognizedNodeTypeError);
|
|
135
|
+
expect(() => loader.getCredential('noRemotesMcpOAuth2Api')).toThrow(n8n_core_1.UnrecognizedCredentialTypeError);
|
|
136
|
+
});
|
|
137
|
+
it('no-ops when the langchain loader is missing', async () => {
|
|
138
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials({
|
|
139
|
+
withLangchainLoader: false,
|
|
140
|
+
});
|
|
141
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
142
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
143
|
+
await loader.loadAll();
|
|
144
|
+
expect(loader.types.nodes).toHaveLength(0);
|
|
145
|
+
expect(loader.types.credentials).toHaveLength(0);
|
|
146
|
+
});
|
|
147
|
+
it('no-ops when the base node is not registered on the langchain loader', async () => {
|
|
148
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials({
|
|
149
|
+
withBaseNode: false,
|
|
150
|
+
});
|
|
151
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
152
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
153
|
+
await loader.loadAll();
|
|
154
|
+
expect(loader.types.nodes).toHaveLength(0);
|
|
155
|
+
expect(loader.types.credentials).toHaveLength(0);
|
|
156
|
+
});
|
|
157
|
+
it('resets prior state before loading', async () => {
|
|
158
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
159
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
160
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
161
|
+
await loader.loadAll();
|
|
162
|
+
await loader.loadAll();
|
|
163
|
+
expect(loader.types.nodes).toHaveLength(1);
|
|
164
|
+
expect(loader.types.credentials).toHaveLength(1);
|
|
165
|
+
});
|
|
166
|
+
it('requests deprecated servers from the registry so existing workflows keep loading', async () => {
|
|
167
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
168
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
169
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
170
|
+
await loader.loadAll();
|
|
171
|
+
expect(service.getAll).toHaveBeenCalledWith({ includeDeprecated: true });
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
describe('getNode', () => {
|
|
175
|
+
it('returns the synthetic LoadedClass for a known type', async () => {
|
|
176
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
177
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
178
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
179
|
+
await loader.loadAll();
|
|
180
|
+
const result = loader.getNode('notion');
|
|
181
|
+
expect(result.type).toBeDefined();
|
|
182
|
+
expect(result.type.description.name).toBe('notion');
|
|
183
|
+
});
|
|
184
|
+
it('throws UnrecognizedNodeTypeError for an unknown type', () => {
|
|
185
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
186
|
+
const service = createServiceWithServers([]);
|
|
187
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
188
|
+
expect(() => loader.getNode('unknown')).toThrow(n8n_core_1.UnrecognizedNodeTypeError);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
describe('getCredential', () => {
|
|
192
|
+
it('returns the credential for a known credential type', async () => {
|
|
193
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
194
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
195
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
196
|
+
await loader.loadAll();
|
|
197
|
+
const result = loader.getCredential('notionMcpOAuth2Api');
|
|
198
|
+
expect(result.type).toBeDefined();
|
|
199
|
+
expect(result.type.name).toBe('notionMcpOAuth2Api');
|
|
200
|
+
});
|
|
201
|
+
it('throws UnrecognizedCredentialTypeError for an unknown credential type', () => {
|
|
202
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
203
|
+
const service = createServiceWithServers([]);
|
|
204
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
205
|
+
expect(() => loader.getCredential('unknown')).toThrow(n8n_core_1.UnrecognizedCredentialTypeError);
|
|
206
|
+
});
|
|
207
|
+
});
|
|
208
|
+
describe('state management', () => {
|
|
209
|
+
it('reset clears known, types, and registered node types', async () => {
|
|
210
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
211
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
212
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
213
|
+
await loader.loadAll();
|
|
214
|
+
loader.reset();
|
|
215
|
+
expect(loader.types.nodes).toEqual([]);
|
|
216
|
+
expect(loader.types.credentials).toEqual([]);
|
|
217
|
+
expect(loader.known.nodes).toEqual({});
|
|
218
|
+
expect(loader.known.credentials).toEqual({});
|
|
219
|
+
expect(() => loader.getNode('notion')).toThrow(n8n_core_1.UnrecognizedNodeTypeError);
|
|
220
|
+
expect(() => loader.getCredential('notionMcpOAuth2Api')).toThrow(n8n_core_1.UnrecognizedCredentialTypeError);
|
|
221
|
+
});
|
|
222
|
+
it('releaseTypes only clears types', async () => {
|
|
223
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
224
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
225
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
226
|
+
await loader.loadAll();
|
|
227
|
+
loader.releaseTypes();
|
|
228
|
+
expect(loader.types.nodes).toEqual([]);
|
|
229
|
+
expect(loader.types.credentials).toEqual([]);
|
|
230
|
+
expect(loader.getNode('notion')).toBeDefined();
|
|
231
|
+
expect(loader.getCredential('notionMcpOAuth2Api')).toBeDefined();
|
|
232
|
+
});
|
|
233
|
+
it('ensureTypesLoaded calls loadAll only when types are empty', async () => {
|
|
234
|
+
const { loadNodesAndCredentials } = createLoadNodesAndCredentials();
|
|
235
|
+
const service = createServiceWithServers([mock_servers_1.notionMockServer]);
|
|
236
|
+
const loader = new mcp_registry_node_loader_1.McpRegistryNodeLoader(service, loadNodesAndCredentials, logger);
|
|
237
|
+
await loader.ensureTypesLoaded();
|
|
238
|
+
expect(service.getAll).toHaveBeenCalledTimes(1);
|
|
239
|
+
await loader.ensureTypesLoaded();
|
|
240
|
+
expect(service.getAll).toHaveBeenCalledTimes(1);
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
//# sourceMappingURL=mcp-registry-node-loader.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-registry-node-loader.test.js","sourceRoot":"","sources":["../../../src/modules/mcp-registry/mcp-registry-node-lo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AI,gDAAqB,CAAC,OAAO,EAAE,uBAAuB,EAAE,MAAM,CAAC,CAAC;YAEnF,MAAM,MAAM,CAAC,iBAAiB,EAAE,CAAC;YACjC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAEhD,MAAM,MAAM,CAAC,iBAAiB,EAAE,CAAC;YACjC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.McpRegistryModule = void 0;
|
|
43
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
44
|
+
const decorators_1 = require("@n8n/decorators");
|
|
45
|
+
const di_1 = require("@n8n/di");
|
|
46
|
+
const load_nodes_and_credentials_1 = require("../../load-nodes-and-credentials");
|
|
47
|
+
let McpRegistryModule = class McpRegistryModule {
|
|
48
|
+
async nodeLoaders() {
|
|
49
|
+
const { McpRegistryService } = await Promise.resolve().then(() => __importStar(require('./registry/mcp-registry.service')));
|
|
50
|
+
const { McpRegistryNodeLoader } = await Promise.resolve().then(() => __importStar(require('./mcp-registry-node-loader')));
|
|
51
|
+
return [
|
|
52
|
+
new McpRegistryNodeLoader(di_1.Container.get(McpRegistryService), di_1.Container.get(load_nodes_and_credentials_1.LoadNodesAndCredentials), di_1.Container.get(backend_common_1.Logger)),
|
|
53
|
+
];
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.McpRegistryModule = McpRegistryModule;
|
|
57
|
+
exports.McpRegistryModule = McpRegistryModule = __decorate([
|
|
58
|
+
(0, decorators_1.BackendModule)({ name: 'mcp-registry' })
|
|
59
|
+
], McpRegistryModule);
|
|
60
|
+
//# sourceMappingURL=mcp-registry.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-registry.module.js","sourceRoot":"","sources":["../../../src/modules/mcp-registry/mcp-registry.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gDAAgD;AAChD,gCAAoC;AAEpC,6EAAuE;AAGhE,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC7B,KAAK,CAAC,WAAW;QAChB,MAAM,EAAE,kBAAkB,EAAE,GAAG,wDAAa,iCAAiC,GAAC,CAAC;QAC/E,MAAM,EAAE,qBAAqB,EAAE,GAAG,wDAAa,4BAA4B,GAAC,CAAC;QAE7E,OAAO;YACN,IAAI,qBAAqB,CACxB,cAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,EACjC,cAAS,CAAC,GAAG,CAAC,oDAAuB,CAAC,EACtC,cAAS,CAAC,GAAG,CAAC,uBAAM,CAAC,CACrB;SACD,CAAC;IACH,CAAC;CACD,CAAA;AAbY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,0BAAa,EAAC,EAAE,IAAI,EAAE,cAAc,EAAE,CAAC;GAC3B,iBAAiB,CAa7B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ICredentialType, INodeTypeDescription } from 'n8n-workflow';
|
|
2
|
+
import type { McpRegistryServer } from './registry/mcp-registry.types';
|
|
3
|
+
export declare const MCP_REGISTRY_PACKAGE_NAME = "@n8n/mcp-registry";
|
|
4
|
+
export declare const LANGCHAIN_PACKAGE_NAME = "@n8n/n8n-nodes-langchain";
|
|
5
|
+
export declare const MCP_REGISTRY_BASE_NODE_NAME = "mcpRegistryClientTool";
|
|
6
|
+
export declare const MCP_BASE_OAUTH2_CREDENTIAL_NAME = "mcpOAuth2Api";
|
|
7
|
+
export declare function serverToCredentialDescription(server: McpRegistryServer): ICredentialType | null;
|
|
8
|
+
export declare function serverToNodeDescription(server: McpRegistryServer, baseDescription: INodeTypeDescription): INodeTypeDescription | null;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MCP_BASE_OAUTH2_CREDENTIAL_NAME = exports.MCP_REGISTRY_BASE_NODE_NAME = exports.LANGCHAIN_PACKAGE_NAME = exports.MCP_REGISTRY_PACKAGE_NAME = void 0;
|
|
4
|
+
exports.serverToCredentialDescription = serverToCredentialDescription;
|
|
5
|
+
exports.serverToNodeDescription = serverToNodeDescription;
|
|
6
|
+
const change_case_1 = require("change-case");
|
|
7
|
+
exports.MCP_REGISTRY_PACKAGE_NAME = '@n8n/mcp-registry';
|
|
8
|
+
exports.LANGCHAIN_PACKAGE_NAME = '@n8n/n8n-nodes-langchain';
|
|
9
|
+
exports.MCP_REGISTRY_BASE_NODE_NAME = 'mcpRegistryClientTool';
|
|
10
|
+
exports.MCP_BASE_OAUTH2_CREDENTIAL_NAME = 'mcpOAuth2Api';
|
|
11
|
+
function getMcpRegistryNodeTypeName(server) {
|
|
12
|
+
return (0, change_case_1.camelCase)(server.slug);
|
|
13
|
+
}
|
|
14
|
+
function getMcpRegistryCredentialTypeName(server) {
|
|
15
|
+
return `${(0, change_case_1.camelCase)(server.slug)}McpOAuth2Api`;
|
|
16
|
+
}
|
|
17
|
+
function serverToOAuth2CredentialDescription(server) {
|
|
18
|
+
const remote = pickRemote(server);
|
|
19
|
+
if (!remote)
|
|
20
|
+
return null;
|
|
21
|
+
return {
|
|
22
|
+
name: getMcpRegistryCredentialTypeName(server),
|
|
23
|
+
extends: [exports.MCP_BASE_OAUTH2_CREDENTIAL_NAME],
|
|
24
|
+
icon: `node:${exports.MCP_REGISTRY_PACKAGE_NAME}.${getMcpRegistryNodeTypeName(server)}`,
|
|
25
|
+
displayName: `${server.title} MCP OAuth2`,
|
|
26
|
+
properties: [
|
|
27
|
+
{
|
|
28
|
+
displayName: 'Use Dynamic Client Registration',
|
|
29
|
+
name: 'useDynamicClientRegistration',
|
|
30
|
+
type: 'hidden',
|
|
31
|
+
default: true,
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Server URL',
|
|
35
|
+
name: 'serverUrl',
|
|
36
|
+
type: 'hidden',
|
|
37
|
+
default: remote.endpointUrl,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: 'Allowed HTTP Request Domains',
|
|
41
|
+
name: 'allowedHttpRequestDomains',
|
|
42
|
+
type: 'hidden',
|
|
43
|
+
default: 'none',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function getNodeDescriptionCredentials(server) {
|
|
49
|
+
switch (server.authType) {
|
|
50
|
+
case 'oauth2':
|
|
51
|
+
return [{ name: getMcpRegistryCredentialTypeName(server), required: true }];
|
|
52
|
+
default:
|
|
53
|
+
return [];
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function pickRemote(server) {
|
|
57
|
+
const streamable = server.remotes.find((r) => r.type === 'streamable-http');
|
|
58
|
+
if (streamable)
|
|
59
|
+
return { transport: 'httpStreamable', endpointUrl: streamable.url };
|
|
60
|
+
const sse = server.remotes.find((r) => r.type === 'sse');
|
|
61
|
+
if (sse)
|
|
62
|
+
return { transport: 'sse', endpointUrl: sse.url };
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
const ICON_MIME_PREFERENCE = [
|
|
66
|
+
'image/svg+xml',
|
|
67
|
+
'image/webp',
|
|
68
|
+
'image/png',
|
|
69
|
+
'image/jpeg',
|
|
70
|
+
'image/jpg',
|
|
71
|
+
];
|
|
72
|
+
function preferredIcon(icons) {
|
|
73
|
+
for (const mimeType of ICON_MIME_PREFERENCE) {
|
|
74
|
+
const match = icons.find((icon) => icon.mimeType === mimeType);
|
|
75
|
+
if (match)
|
|
76
|
+
return match;
|
|
77
|
+
}
|
|
78
|
+
return icons[0];
|
|
79
|
+
}
|
|
80
|
+
function pickIconUrl(icons) {
|
|
81
|
+
const light = preferredIcon(icons.filter((icon) => icon.theme === 'light'));
|
|
82
|
+
const dark = preferredIcon(icons.filter((icon) => icon.theme === 'dark'));
|
|
83
|
+
if (light && dark)
|
|
84
|
+
return { light: light.src, dark: dark.src };
|
|
85
|
+
return preferredIcon(icons)?.src;
|
|
86
|
+
}
|
|
87
|
+
function withRemoteDefaults(properties, transport, endpointUrl) {
|
|
88
|
+
return properties.map((prop) => {
|
|
89
|
+
if (prop.name === 'endpointUrl')
|
|
90
|
+
return { ...prop, default: endpointUrl };
|
|
91
|
+
if (prop.name === 'serverTransport')
|
|
92
|
+
return { ...prop, default: transport };
|
|
93
|
+
return prop;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
function serverToCredentialDescription(server) {
|
|
97
|
+
switch (server.authType) {
|
|
98
|
+
case 'oauth2':
|
|
99
|
+
return serverToOAuth2CredentialDescription(server);
|
|
100
|
+
default:
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function serverToNodeDescription(server, baseDescription) {
|
|
105
|
+
if (server.authType !== 'oauth2')
|
|
106
|
+
return null;
|
|
107
|
+
const remote = pickRemote(server);
|
|
108
|
+
if (!remote)
|
|
109
|
+
return null;
|
|
110
|
+
const displayName = `${server.title} MCP`;
|
|
111
|
+
const description = structuredClone(baseDescription);
|
|
112
|
+
if (server.status === 'deprecated') {
|
|
113
|
+
description.hidden = true;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
delete description.hidden;
|
|
117
|
+
}
|
|
118
|
+
description.displayName = displayName;
|
|
119
|
+
description.name = (0, change_case_1.camelCase)(server.slug);
|
|
120
|
+
description.iconUrl = pickIconUrl(server.icons);
|
|
121
|
+
description.description = server.description;
|
|
122
|
+
description.defaults = { name: displayName };
|
|
123
|
+
description.credentials = getNodeDescriptionCredentials(server);
|
|
124
|
+
if (description.codex) {
|
|
125
|
+
description.codex.alias?.push(server.title, displayName);
|
|
126
|
+
if (server.websiteUrl) {
|
|
127
|
+
description.codex.resources = { primaryDocumentation: [{ url: server.websiteUrl }] };
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
description.properties = withRemoteDefaults(description.properties, remote.transport, remote.endpointUrl);
|
|
131
|
+
return description;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=node-description-transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-description-transform.js","sourceRoot":"","sources":["../../../src/modules/mcp-registry/node-description-transform.ts"],"names":[],"mappings":";;;AAiJA,sEAOC;AAKD,0DAoCC;AAjMD,6CAAwC;AAW3B,QAAA,yBAAyB,GAAG,mBAAmB,CAAC;AAChD,QAAA,sBAAsB,GAAG,0BAA0B,CAAC;AACpD,QAAA,2BAA2B,GAAG,uBAAuB,CAAC;AACtD,QAAA,+BAA+B,GAAG,cAAc,CAAC;AAK9D,SAAS,0BAA0B,CAAC,MAAyB;IAC5D,OAAO,IAAA,uBAAS,EAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC;AAKD,SAAS,gCAAgC,CAAC,MAAyB;IAElE,OAAO,GAAG,IAAA,uBAAS,EAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;AAChD,CAAC;AAKD,SAAS,mCAAmC,CAAC,MAAyB;IACrE,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO;QACN,IAAI,EAAE,gCAAgC,CAAC,MAAM,CAAC;QAC9C,OAAO,EAAE,CAAC,uCAA+B,CAAC;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