n8n 2.34.3 → 2.35.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/active-workflow-manager.js +2 -14
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/agent-library-bundle.js +6 -6
- package/dist/build.tsbuildinfo +1 -1
- package/dist/controllers/ai.controller.js +3 -0
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +0 -1
- package/dist/controllers/role.controller.js +6 -14
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +1 -1
- package/dist/credentials/credentials.controller.js +7 -1
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +2 -1
- package/dist/credentials/credentials.service.js +24 -0
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.js +4 -7
- package/dist/credentials-helper.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +5 -0
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +9 -0
- package/dist/events/relays/telemetry.event-relay.d.ts +4 -2
- package/dist/events/relays/telemetry.event-relay.js +23 -7
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execute-error-workflow.js +19 -5
- package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-persistence.d.ts +6 -4
- package/dist/executions/execution-persistence.js +7 -14
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +31 -2
- package/dist/executions/execution.service.js +108 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/middlewares/body-parser.js +3 -2
- package/dist/middlewares/body-parser.js.map +1 -1
- package/dist/middlewares/cors.js +1 -1
- package/dist/middlewares/cors.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-rating.service.d.ts +12 -15
- package/dist/modules/agent-evals/agent-eval-rating.service.js +33 -46
- package/dist/modules/agent-evals/agent-eval-rating.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-record-mappers.d.ts +3 -2
- package/dist/modules/agent-evals/agent-eval-record-mappers.js +13 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-runner.service.js +15 -7
- package/dist/modules/agent-evals/agent-eval-runner.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval.service.d.ts +8 -3
- package/dist/modules/agent-evals/agent-eval.service.js +6 -6
- package/dist/modules/agent-evals/agent-eval.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals-required-modules.js +2 -2
- package/dist/modules/agent-evals/agent-evals-required-modules.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals.controller.d.ts +12 -4
- package/dist/modules/agent-evals/agent-evals.controller.js +50 -9
- package/dist/modules/agent-evals/agent-evals.controller.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.d.ts +3 -5
- package/dist/modules/agents/agent-chat.controller.js +19 -25
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-config.service.d.ts +5 -1
- package/dist/modules/agents/agent-config.service.js +10 -3
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-credential-index.listener.d.ts +11 -0
- package/dist/modules/agents/agent-credential-index.listener.js +55 -0
- package/dist/modules/agents/agent-credential-index.listener.js.map +1 -0
- package/dist/modules/agents/agent-credential-index.service.d.ts +14 -0
- package/dist/modules/agents/agent-credential-index.service.js +57 -0
- package/dist/modules/agents/agent-credential-index.service.js.map +1 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +5 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js +89 -23
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.d.ts +20 -0
- package/dist/modules/agents/agent-execution-update-broadcaster.js +65 -0
- package/dist/modules/agents/agent-execution-update-broadcaster.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +30 -4
- package/dist/modules/agents/agent-execution.service.js +217 -46
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +33 -0
- package/dist/modules/agents/agent-integration-management.service.js +80 -0
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -0
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +3 -1
- package/dist/modules/agents/agent-integration-persistence.service.js +6 -2
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +4 -24
- package/dist/modules/agents/agent-integrations.controller.js +28 -114
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +11 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js +63 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -0
- package/dist/modules/agents/agent-model-catalog.service.d.ts +1 -0
- package/dist/modules/agents/agent-model-catalog.service.js +37 -8
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +3 -1
- package/dist/modules/agents/agent-publish.service.js +8 -2
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-run-tracing.service.d.ts +1 -0
- package/dist/modules/agents/agent-run-tracing.service.js +4 -1
- package/dist/modules/agents/agent-run-tracing.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +3 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +14 -8
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-slack-integrations.controller.d.ts +23 -0
- package/dist/modules/agents/agent-slack-integrations.controller.js +98 -0
- package/dist/modules/agents/agent-slack-integrations.controller.js.map +1 -0
- package/dist/modules/agents/agent-test-run.service.d.ts +134 -0
- package/dist/modules/agents/agent-test-run.service.js +240 -0
- package/dist/modules/agents/agent-test-run.service.js.map +1 -0
- package/dist/modules/agents/agent-validation.service.d.ts +1 -0
- package/dist/modules/agents/agent-validation.service.js +32 -13
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +5 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +137 -64
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +8 -0
- package/dist/modules/agents/agents.module.d.ts +3 -1
- package/dist/modules/agents/agents.module.js +35 -1
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +4 -2
- package/dist/modules/agents/agents.service.js +6 -2
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/attachable-workflows.service.d.ts +1 -0
- package/dist/modules/agents/attachable-workflows.service.js +2 -1
- package/dist/modules/agents/attachable-workflows.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +2 -2
- package/dist/modules/agents/builder/agents-builder-prompts.js +26 -7
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js +130 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +16 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +69 -22
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +4 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +68 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +5 -2
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +26 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-credential-dependency.entity.d.ts +9 -0
- package/dist/modules/agents/entities/agent-credential-dependency.entity.js +40 -0
- package/dist/modules/agents/entities/agent-credential-dependency.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.js +2 -1
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +7 -1
- package/dist/modules/agents/execution-recorder.js +64 -8
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +6 -2
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +24 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +3 -2
- package/dist/modules/agents/integrations/agent-chat-bridge.js +30 -13
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +3 -2
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +25 -12
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +38 -6
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.js +13 -6
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +7 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/callback-store.d.ts +13 -4
- package/dist/modules/agents/integrations/callback-store.js +44 -18
- package/dist/modules/agents/integrations/callback-store.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +7 -3
- package/dist/modules/agents/integrations/chat-integration.service.js +59 -22
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +1 -1
- package/dist/modules/agents/integrations/component-mapper.js +1 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/esm-loader.d.ts +1 -0
- package/dist/modules/agents/integrations/esm-loader.js +4 -0
- package/dist/modules/agents/integrations/esm-loader.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +2 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +74 -20
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js +35 -2
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +10 -5
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-schema.js +8 -2
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-memory.js +6 -7
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/discord-gateway.d.ts +32 -0
- package/dist/modules/agents/integrations/platforms/discord-gateway.js +138 -0
- package/dist/modules/agents/integrations/platforms/discord-gateway.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +73 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.js +364 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.d.ts +64 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.js +176 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{slack-bridge-behavior.d.ts → slack/slack-bridge-behavior.d.ts} +3 -3
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{slack-integration.d.ts → slack/slack-integration.d.ts} +11 -6
- package/dist/modules/agents/integrations/platforms/{slack-integration.js → slack/slack-integration.js} +32 -23
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.d.ts +35 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.js +150 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +36 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +193 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.d.ts +10 -0
- package/dist/modules/agents/integrations/platforms/{slack-operations.js → slack/slack-operations.js} +1 -57
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js +6 -36
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +3 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +14 -5
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/typing-indicator.d.ts +9 -0
- package/dist/modules/agents/integrations/platforms/typing-indicator.js +42 -0
- package/dist/modules/agents/integrations/platforms/typing-indicator.js.map +1 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js +11 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js.map +1 -1
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.d.ts +9 -0
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.js +34 -0
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.js.map +1 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.d.ts +4 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js +152 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js.map +1 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.d.ts +12 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js +92 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +20 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent.repository.js +18 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +2 -0
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +69 -5
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +5 -1
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +7 -4
- package/dist/modules/agents/tools/workflow-tool-factory.js +86 -41
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +14 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +50 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.d.ts +3 -3
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.js +28 -23
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.js.map +1 -1
- package/dist/modules/agents/utils/extract-agent-credential-ids.d.ts +1 -0
- package/dist/modules/agents/utils/extract-agent-credential-ids.js +41 -0
- package/dist/modules/agents/utils/extract-agent-credential-ids.js.map +1 -0
- package/dist/modules/agents/utils/node-tool-validation.js +2 -2
- package/dist/modules/agents/utils/node-tool-validation.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.d.ts +6 -2
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +26 -3
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -1
- package/dist/modules/data-table/data-table-permissions.d.ts +5 -0
- package/dist/modules/data-table/data-table-permissions.js +14 -0
- package/dist/modules/data-table/data-table-permissions.js.map +1 -0
- package/dist/modules/data-table/data-table-proxy.service.js +2 -0
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.d.ts +1 -1
- package/dist/modules/data-table/data-table.controller.js +7 -19
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +3 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js +8 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.d.ts +1 -0
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js +100 -3
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/types.d.ts +4 -0
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +2 -1
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +11 -5
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +6 -3
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +31 -11
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights.controller.js +13 -7
- package/dist/modules/insights/insights.controller.js.map +1 -1
- package/dist/modules/insights/insights.service.d.ts +6 -3
- package/dist/modules/insights/insights.service.js +6 -3
- package/dist/modules/insights/insights.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js +10 -3
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +37 -3
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +5 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js +67 -9
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.d.ts +15 -0
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.js +130 -0
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +17 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +234 -24
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.d.ts +20 -0
- package/dist/modules/instance-ai/instance-ai-verification.service.js +232 -0
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +78 -4
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai.controller.js +84 -2
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.module.js +3 -7
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +5 -1
- package/dist/modules/instance-ai/instance-ai.service.js +231 -60
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.d.ts +0 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +0 -19
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +1 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +37 -2
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +6 -6
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +9 -0
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +3 -4
- package/dist/modules/mcp/mcp-protected-resource.js +4 -4
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.js +2 -0
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +4 -0
- package/dist/modules/mcp/mcp.constants.js +5 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +14 -14
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +4 -3
- package/dist/modules/mcp/mcp.service.js +49 -34
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +31 -5
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/mcp.utils.d.ts +1 -0
- package/dist/modules/mcp/mcp.utils.js +22 -5
- package/dist/modules/mcp/mcp.utils.js.map +1 -1
- package/dist/modules/mcp/tool-schema.util.d.ts +3 -0
- package/dist/modules/mcp/tool-schema.util.js +32 -0
- package/dist/modules/mcp/tool-schema.util.js.map +1 -0
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +17 -6
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +9 -8
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +207 -52
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +4 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +60 -23
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +81 -40
- package/dist/modules/mcp/tools/schemas.js +31 -11
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +1 -9
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js +2 -7
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +2 -11
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +2 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js +17 -5
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +2 -0
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-gates.d.ts +3 -4
- package/dist/modules/n8n-packages/engine/import-gates.js +10 -8
- package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +6 -2
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +36 -8
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -0
- package/dist/modules/n8n-packages/engine/import-result.js +13 -2
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js +8 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +3 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +29 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/package-layout.d.ts +18 -1
- package/dist/modules/n8n-packages/engine/package-layout.js +36 -7
- package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +28 -16
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +12 -12
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.js +12 -0
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +13 -3
- package/dist/modules/n8n-packages/entities/project/project-importer.d.ts +3 -3
- package/dist/modules/n8n-packages/entities/project/project-importer.js +58 -29
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.d.ts +4 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js +10 -3
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-importer.d.ts +1 -4
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js +22 -10
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.types.d.ts +13 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js +36 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-importer.d.ts +6 -5
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js +85 -21
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js +8 -3
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +18 -23
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +21 -2
- package/dist/modules/n8n-packages/entities/variable/variable.types.js +15 -0
- package/dist/modules/n8n-packages/entities/variable/variable.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.d.ts +6 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +33 -11
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +35 -3
- package/dist/modules/n8n-packages/n8n-packages.types.js +12 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +0 -11
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +0 -10
- package/dist/modules/n8n-packages/spec/requirements.schema.js +0 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.d.ts +3 -3
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.js +3 -2
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +2 -2
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.d.ts +2 -0
- package/dist/modules/otel/execution-level-tracer.js +4 -0
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.d.ts +3 -1
- package/dist/modules/redaction/redaction-context-hook.js +9 -2
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +4 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +26 -6
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.d.ts +8 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.js +76 -18
- package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.d.ts +16 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js +95 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.d.ts +15 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.js +52 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +3 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +10 -4
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +9 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +71 -40
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +3 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.js +20 -13
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/oauth/dcr-managed-fields.d.ts +6 -0
- package/dist/oauth/dcr-managed-fields.js +13 -0
- package/dist/oauth/dcr-managed-fields.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +1 -0
- package/dist/oauth/oauth.service.js +24 -25
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/posthog/index.d.ts +2 -0
- package/dist/posthog/index.js +19 -0
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.d.ts +1 -0
- package/dist/public-api/public-api-controller.registry.js +36 -35
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +38 -0
- package/dist/public-api/public-api-route-resolver.js +136 -0
- package/dist/public-api/public-api-route-resolver.js.map +1 -0
- package/dist/public-api/types.d.ts +3 -6
- package/dist/public-api/v1/controllers/index.d.ts +1 -0
- package/dist/public-api/v1/controllers/index.js +1 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +11 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js +65 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/tags.public.controller.js +9 -2
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +10 -2
- package/dist/public-api/v1/controllers/workflows.public.controller.js +132 -4
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +7 -15
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/decorator-routed.handler.d.ts +2 -0
- package/dist/public-api/v1/handlers/decorator-routed.handler.js +10 -0
- package/dist/public-api/v1/handlers/decorator-routed.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/discover/discover.service.js +54 -49
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +25 -65
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +2 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +44 -122
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +18 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +160 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/generate.d.ts +25 -0
- package/dist/public-api/v1/openapi-gen/generate.js +149 -0
- package/dist/public-api/v1/openapi-gen/generate.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.d.ts +1 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.js +6 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +625 -166
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -3
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +1 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/{modules/mcp/tools/workflow-builder → services}/ai-gateway-eligibility.d.ts +1 -0
- package/dist/{modules/mcp/tools/workflow-builder → services}/ai-gateway-eligibility.js +7 -1
- package/dist/services/ai-gateway-eligibility.js.map +1 -0
- package/dist/services/ai-gateway.service.d.ts +2 -0
- package/dist/services/ai-gateway.service.js +17 -3
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/cache/cache.service.d.ts +2 -0
- package/dist/services/cache/cache.service.js +21 -0
- package/dist/services/cache/cache.service.js.map +1 -1
- package/dist/services/cache/redis.cache-manager.d.ts +1 -0
- package/dist/services/cache/redis.cache-manager.js +6 -0
- package/dist/services/cache/redis.cache-manager.js.map +1 -1
- package/dist/services/credentials-tester.service.d.ts +5 -1
- package/dist/services/credentials-tester.service.js +9 -3
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/free-ai-credits.service.js +1 -1
- package/dist/services/free-ai-credits.service.js.map +1 -1
- package/dist/services/frontend.service.js +3 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +13 -0
- package/dist/services/node-resource-explorer.service.js +117 -0
- package/dist/services/node-resource-explorer.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +1 -1
- package/dist/services/project.service.ee.d.ts +3 -3
- package/dist/services/project.service.ee.js +4 -7
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/role-authorization.d.ts +3 -0
- package/dist/services/role-authorization.js +14 -0
- package/dist/services/role-authorization.js.map +1 -0
- package/dist/services/tag.service.d.ts +5 -2
- package/dist/services/tag.service.js +9 -2
- package/dist/services/tag.service.js.map +1 -1
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.d.ts +1 -0
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.js +2 -2
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.js.map +1 -1
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.d.ts +6 -2
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.js +8 -4
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-server.d.ts +1 -0
- package/dist/task-runners/task-broker/task-broker-server.js +13 -3
- package/dist/task-runners/task-broker/task-broker-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-ws-server.d.ts +1 -0
- package/dist/task-runners/task-broker/task-broker-ws-server.js +8 -5
- package/dist/task-runners/task-broker/task-broker-ws-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.js +2 -9
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/task-runners/task-runner-lifecycle-events.d.ts +0 -1
- package/dist/task-runners/task-runner-process-base.d.ts +2 -2
- package/dist/task-runners/task-runner-process-base.js +14 -10
- package/dist/task-runners/task-runner-process-base.js.map +1 -1
- package/dist/task-runners/task-runner-process-js.d.ts +1 -2
- package/dist/task-runners/task-runner-process-js.js +4 -4
- package/dist/task-runners/task-runner-process-js.js.map +1 -1
- package/dist/task-runners/task-runner-process-py.d.ts +1 -2
- package/dist/task-runners/task-runner-process-py.js +2 -2
- package/dist/task-runners/task-runner-process-py.js.map +1 -1
- package/dist/utils/node-definition-dirs.d.ts +1 -0
- package/dist/utils/node-definition-dirs.js +24 -0
- package/dist/utils/node-definition-dirs.js.map +1 -0
- package/dist/webhooks/constants.d.ts +1 -0
- package/dist/webhooks/constants.js +2 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +4 -2
- package/dist/webhooks/live-webhooks.js +25 -4
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-execution-context.d.ts +5 -2
- package/dist/webhooks/webhook-execution-context.js +10 -0
- package/dist/webhooks/webhook-execution-context.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +9 -8
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +5 -1
- package/dist/webhooks/webhook.service.js +52 -9
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +3 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.js +43 -38
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +0 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +1 -16
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +20 -31
- package/dist/workflows/workflow-finder.service.js +42 -9
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +14 -0
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +35 -0
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +1 -0
- package/dist/workflows/workflow-sharing.service.d.ts +4 -1
- package/dist/workflows/workflow-sharing.service.js +14 -2
- package/dist/workflows/workflow-sharing.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +9 -6
- package/dist/workflows/workflow.service.ee.d.ts +3 -3
- package/dist/workflows/workflow.service.ee.js +20 -7
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +33 -9
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +43 -39
- package/templates/form-shell.handlebars +418 -0
- package/templates/form-trigger.handlebars +30 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.d.ts +0 -17
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.d.ts +0 -48
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js +0 -42
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js.map +0 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +0 -54
- package/dist/modules/agents/integrations/slack-app-setup.service.js +0 -326
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +0 -1
- package/dist/modules/mcp/tools/workflow-builder/ai-gateway-eligibility.js.map +0 -1
- package/dist/public-api/v1/handlers/executions/executions.service.d.ts +0 -14
- package/dist/public-api/v1/handlers/executions/executions.service.js +0 -49
- package/dist/public-api/v1/handlers/executions/executions.service.js.map +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.d.ts +0 -13
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +0 -98
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +0 -1
- /package/dist/modules/agents/integrations/platforms/{slack-bridge-behavior.js → slack/slack-bridge-behavior.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.controller.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gDAA0F;AAC1F,gCAAoC;
|
|
1
|
+
{"version":3,"file":"mcp.controller.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAE7C,gDAA0F;AAC1F,gCAAoC;AACpC,wDAAoD;AAEpD,uCAAyC;AAEzC,2CAAwC;AAExC,qEAAgE;AAChE,mFAA6E;AAC7E,6CAAyC;AACzC,mDAKyB;AACzB,+CAAiE;AACjE,iEAA4D;AAC5D,qDAAoD;AAEpD,2CAAgE;AAIhE,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAAC,cAAS,CAAC,GAAG,CAAC,0DAA0B,CAAC,CAAC,iBAAiB,EAAE,CAAC;AAE9F,MAAM,SAAS,GAAG,cAAS,CAAC,GAAG,CAAC,sBAAS,CAAC,CAAC;AAGpC,IAAM,aAAa,GAAnB,MAAM,aAAa;IACzB,YACkB,aAA4B,EAC5B,UAAsB,EACtB,kBAAsC,EACtC,SAAoB,EACpB,MAAc,EACd,oBAA0C;6BAL1C,aAAa;0BACb,UAAU;kCACV,kBAAkB;yBAClB,SAAS;sBACT,MAAM;oCACN,oBAAoB;IACnC,CAAC;IAGI,cAAc,CAAC,GAAa;QAEnC,GAAG,CAAC,MAAM,CAAC,6BAA6B,EAAE,GAAG,CAAC,CAA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K;IANL,IAAA,gBAAG,EAAC,OAAO,EAAE;QACb,WAAW,EAAE,IAAA,8BAAiB,EAAC,SAAS,CAAC,eAAe,CAAC;QACzD,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC;QAClC,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;KACnB,CAAC;;;;8CAmBD;AAQK;IANL,IAAA,iBAAI,EAAC,OAAO,EAAE;QACd,WAAW,EAAE,IAAA,8BAAiB,EAAC,SAAS,CAAC,eAAe,CAAC;QACzD,WAAW,EAAE,CAAC,iBAAiB,EAAE,CAAC;QAClC,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,IAAI;KACnB,CAAC;;;;0CAqFD;wBAzKW,aAAa;IADzB,IAAA,gCAAmB,EAAC,aAAa,CAAC;qCAGD,wBAAa,EAChB,wBAAU,EACF,yCAAkB,EAC3B,qBAAS,EACZ,uBAAM,EACQ,6CAAoB;GAPhD,aAAa,CA2MzB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { LicenseState, Logger, ModuleRegistry } from '@n8n/backend-common';
|
|
3
3
|
import { ExecutionsConfig, GlobalConfig, WorkflowsConfig } from '@n8n/config';
|
|
4
4
|
import { ExecutionRepository, FolderRepository, ProjectRepository, SharedWorkflowRepository, User } from '@n8n/db';
|
|
@@ -28,7 +28,7 @@ import { WorkflowFinderService } from '../../workflows/workflow-finder.service';
|
|
|
28
28
|
import { WorkflowHistoryService } from '../../workflows/workflow-history/workflow-history.service';
|
|
29
29
|
import { WorkflowPublishedDataService } from '../../workflows/workflow-published-data.service';
|
|
30
30
|
import { WorkflowService } from '../../workflows/workflow.service';
|
|
31
|
-
import type { McpAppsTelemetryVariant, McpClientInfo } from './mcp.types';
|
|
31
|
+
import type { McpAppsTelemetryVariant, McpClientInfo, RegisterResourceFn, ToolDefinition } from './mcp.types';
|
|
32
32
|
export type McpAppsResolution = {
|
|
33
33
|
enabled: boolean;
|
|
34
34
|
variant: McpAppsTelemetryVariant;
|
|
@@ -77,7 +77,8 @@ export declare class McpService {
|
|
|
77
77
|
resolveFeatureFlags(user: User): Promise<McpFeatureFlags>;
|
|
78
78
|
private resolveMcpApps;
|
|
79
79
|
private buildMcpAppTelemetryConfig;
|
|
80
|
-
|
|
80
|
+
createToolRegistrar(server: McpServer, user: User, clientInfo?: McpClientInfo): (tool: ToolDefinition) => import("@modelcontextprotocol/server").RegisteredTool;
|
|
81
|
+
createResourceRegistrar(server: McpServer): RegisterResourceFn;
|
|
81
82
|
getServer(user: User, featureFlags: McpFeatureFlags, clientInfo?: McpClientInfo, grantedScopes?: string[]): Promise<McpServer>;
|
|
82
83
|
private registerBuilderTools;
|
|
83
84
|
get isQueueMode(): boolean;
|
|
@@ -47,6 +47,7 @@ const workflow_service_1 = require("../../workflows/workflow.service");
|
|
|
47
47
|
const mcp_constants_1 = require("./mcp.constants");
|
|
48
48
|
const mcp_scopes_1 = require("./mcp-scopes");
|
|
49
49
|
const mcp_tool_availability_1 = require("./mcp-tool-availability");
|
|
50
|
+
const tool_schema_util_1 = require("./tool-schema.util");
|
|
50
51
|
const data_table_1 = require("./tools/data-table");
|
|
51
52
|
const execute_workflow_tool_1 = require("./tools/execute-workflow.tool");
|
|
52
53
|
const get_execution_tool_1 = require("./tools/get-execution.tool");
|
|
@@ -81,7 +82,9 @@ const validate_workflow_code_tool_1 = require("./tools/workflow-builder/validate
|
|
|
81
82
|
function getToolCallOutcome(result) {
|
|
82
83
|
if (!result)
|
|
83
84
|
return { status: 'success' };
|
|
84
|
-
const structured = result.structuredContent
|
|
85
|
+
const structured = typeof result.structuredContent === 'object' && result.structuredContent !== null
|
|
86
|
+
? result.structuredContent
|
|
87
|
+
: undefined;
|
|
85
88
|
const errorMessage = typeof structured?.error === 'string' ? structured.error : undefined;
|
|
86
89
|
if (result.isError !== true && structured?.status !== 'error' && errorMessage === undefined) {
|
|
87
90
|
return { status: 'success' };
|
|
@@ -193,10 +196,9 @@ let McpService = class McpService {
|
|
|
193
196
|
};
|
|
194
197
|
}
|
|
195
198
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const invoke = handler;
|
|
199
|
+
createToolRegistrar(server, user, clientInfo) {
|
|
200
|
+
return (tool) => {
|
|
201
|
+
const invoke = tool.handler;
|
|
200
202
|
const instrumentedHandler = async (...handlerArgs) => {
|
|
201
203
|
const workflowId = getWorkflowId(handlerArgs[0]);
|
|
202
204
|
try {
|
|
@@ -204,7 +206,7 @@ let McpService = class McpService {
|
|
|
204
206
|
const { status, errorMessage } = getToolCallOutcome(result);
|
|
205
207
|
this.eventService.emit('mcp-tool-called', {
|
|
206
208
|
user,
|
|
207
|
-
toolName: name,
|
|
209
|
+
toolName: tool.name,
|
|
208
210
|
workflowId: workflowId ?? getWorkflowId(result?.structuredContent),
|
|
209
211
|
status,
|
|
210
212
|
errorMessage,
|
|
@@ -215,7 +217,7 @@ let McpService = class McpService {
|
|
|
215
217
|
catch (error) {
|
|
216
218
|
this.eventService.emit('mcp-tool-called', {
|
|
217
219
|
user,
|
|
218
|
-
toolName: name,
|
|
220
|
+
toolName: tool.name,
|
|
219
221
|
workflowId,
|
|
220
222
|
status: 'error',
|
|
221
223
|
errorMessage: error instanceof Error ? error.message : String(error),
|
|
@@ -224,11 +226,19 @@ let McpService = class McpService {
|
|
|
224
226
|
throw error;
|
|
225
227
|
}
|
|
226
228
|
};
|
|
227
|
-
|
|
229
|
+
const { inputSchema, outputSchema, ...config } = tool.config;
|
|
230
|
+
return server.registerTool(tool.name, {
|
|
231
|
+
...config,
|
|
232
|
+
...(inputSchema ? { inputSchema: (0, tool_schema_util_1.shapeToStandardSchema)(inputSchema) } : {}),
|
|
233
|
+
...(outputSchema ? { outputSchema: (0, tool_schema_util_1.shapeToStandardSchema)(outputSchema) } : {}),
|
|
234
|
+
}, instrumentedHandler);
|
|
228
235
|
};
|
|
229
236
|
}
|
|
237
|
+
createResourceRegistrar(server) {
|
|
238
|
+
return (resource) => server.registerResource(resource.name, resource.uri, resource.config, resource.read);
|
|
239
|
+
}
|
|
230
240
|
async getServer(user, featureFlags, clientInfo, grantedScopes) {
|
|
231
|
-
const { McpServer } = await (0, lazy_import_1.lazyImport)(async () => await import('@modelcontextprotocol/
|
|
241
|
+
const { McpServer } = await (0, lazy_import_1.lazyImport)(async () => await import('@modelcontextprotocol/server'));
|
|
232
242
|
const builderEnabled = this.globalConfig.endpoints.mcpBuilderEnabled;
|
|
233
243
|
const n8nConnectAvailable = builderEnabled
|
|
234
244
|
? (await this.aiGatewayService.isAvailable()).available
|
|
@@ -249,11 +259,12 @@ let McpService = class McpService {
|
|
|
249
259
|
isAgentsEnabled: agentInstructionsEnabled,
|
|
250
260
|
}),
|
|
251
261
|
});
|
|
252
|
-
this.
|
|
262
|
+
const registerTool = this.createToolRegistrar(server, user, clientInfo);
|
|
263
|
+
const registerResource = this.createResourceRegistrar(server);
|
|
253
264
|
const registerIfAllowed = (tool) => {
|
|
254
265
|
if (allowedToolNames && !allowedToolNames.has(tool.name))
|
|
255
266
|
return;
|
|
256
|
-
|
|
267
|
+
registerTool(tool);
|
|
257
268
|
};
|
|
258
269
|
const workflowSearchTool = (0, search_workflows_tool_1.createSearchWorkflowsTool)(user, this.workflowService, this.telemetry);
|
|
259
270
|
registerIfAllowed(workflowSearchTool);
|
|
@@ -304,15 +315,15 @@ let McpService = class McpService {
|
|
|
304
315
|
const addDataTableRowsTool = (0, data_table_1.createAddDataTableRowsTool)(user, dataTableOps, this.telemetry);
|
|
305
316
|
registerIfAllowed(addDataTableRowsTool);
|
|
306
317
|
if (builderEnabled) {
|
|
307
|
-
await this.registerBuilderTools(server, user, dataTableOps, featureFlags, registerIfAllowed, allowedToolNames, clientInfo);
|
|
318
|
+
await this.registerBuilderTools(server, user, dataTableOps, featureFlags, registerIfAllowed, registerResource, allowedToolNames, clientInfo);
|
|
308
319
|
}
|
|
309
320
|
if (agentsEnabled) {
|
|
310
321
|
const { McpAgentToolsService } = await import('./tools/agents/agent-tools.service.js');
|
|
311
|
-
di_1.Container.get(McpAgentToolsService).registerTools(
|
|
322
|
+
di_1.Container.get(McpAgentToolsService).registerTools(registerIfAllowed, registerResource, user, allowedToolNames);
|
|
312
323
|
}
|
|
313
324
|
return server;
|
|
314
325
|
}
|
|
315
|
-
async registerBuilderTools(server, user, dataTableOps, featureFlags, registerIfAllowed, allowedToolNames, clientInfo) {
|
|
326
|
+
async registerBuilderTools(server, user, dataTableOps, featureFlags, registerIfAllowed, registerResource, allowedToolNames, clientInfo) {
|
|
316
327
|
await this.nodeCatalogService.initialize();
|
|
317
328
|
const searchNodesTool = (0, search_workflow_nodes_tool_1.createSearchWorkflowNodesTool)(user, this.nodeCatalogService, this.telemetry, this.aiGatewayService);
|
|
318
329
|
registerIfAllowed(searchNodesTool);
|
|
@@ -345,14 +356,13 @@ let McpService = class McpService {
|
|
|
345
356
|
});
|
|
346
357
|
},
|
|
347
358
|
});
|
|
348
|
-
(
|
|
349
|
-
...createTool
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
},
|
|
359
|
+
registerIfAllowed({
|
|
360
|
+
...createTool,
|
|
361
|
+
config: {
|
|
362
|
+
...createTool.config,
|
|
363
|
+
_meta: (0, server_1.mcpAppToolMeta)(server_1.WORKFLOW_PREVIEW_APP_URI),
|
|
354
364
|
},
|
|
355
|
-
}
|
|
365
|
+
});
|
|
356
366
|
}
|
|
357
367
|
else {
|
|
358
368
|
registerIfAllowed(createTool);
|
|
@@ -367,19 +377,24 @@ let McpService = class McpService {
|
|
|
367
377
|
registerIfAllowed(updateTool);
|
|
368
378
|
const restoreVersionTool = (0, restore_workflow_version_tool_1.createRestoreWorkflowVersionTool)(user, this.workflowFinderService, this.workflowHistoryService, this.workflowService, this.telemetry, this.collaborationService);
|
|
369
379
|
registerIfAllowed(restoreVersionTool);
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
registerResource({
|
|
381
|
+
name: 'workflow-sdk-reference',
|
|
382
|
+
uri: 'n8n://workflow-sdk/reference',
|
|
383
|
+
config: {
|
|
384
|
+
description: 'Required n8n Workflow SDK reference for building workflows from code. Read this before writing workflow code.',
|
|
385
|
+
},
|
|
386
|
+
read: () => ({
|
|
387
|
+
contents: [
|
|
388
|
+
{
|
|
389
|
+
uri: 'n8n://workflow-sdk/reference',
|
|
390
|
+
mimeType: 'text/plain',
|
|
391
|
+
text: (0, sdk_reference_content_1.getSdkReferenceContent)(undefined, {
|
|
392
|
+
includeGroups: featureFlags.canvasGroupsEnabled,
|
|
393
|
+
}),
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
}),
|
|
397
|
+
});
|
|
383
398
|
const sdkRefTool = (0, get_workflow_sdk_reference_tool_1.createGetWorkflowSdkReferenceTool)(user, this.telemetry, {
|
|
384
399
|
canvasGroupsEnabled: featureFlags.canvasGroupsEnabled,
|
|
385
400
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.service.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,8CAKwB;AACxB,wDAA2E;AAC3E,wCAA8E;AAC9E,gCAMiB;AACjB,gCAA6C;AAC7C,iDAK8B;AAC9B,wDAAoD;AACpD,0EAAmG;AACnG,uCAA4C;AAC5C,+CAA2F;AAE3F,2DAAuD;AACvD,iFAA6E;AAC7E,2CAA0C;AAC1C,2EAAuE;AACvE,0DAAsD;AACtD,sEAAkE;AAClE,6GAAwG;AACxG,4FAAsF;AACtF,iDAAoD;AACpD,6CAAyC;AACzC,uCAA0C;AAC1C,sEAAiE;AACjE,8FAAwF;AACxF,sEAA+D;AAC/D,0D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,CAAC;CAGD,CAAA;;qBAtqBY,UAAU;IADtB,IAAA,YAAO,GAAE;qCASiB,uBAAM,EACI,yBAAgB,EAChB,2BAAgB,EACX,+CAAqB,EAC3B,kCAAe,EACpB,wBAAU,EACF,wCAAkB,EACpB,oCAAgB,EACpB,qBAAY,EACf,qBAAS,EACJ,gCAAc,EACjB,0BAAW,EACR,mCAAc,EACV,iCAAkB,EACb,mDAAuB,EACrC,sBAAS,EACD,sBAAiB,EAClB,qBAAgB,EACR,6BAAwB,EAC7B,wBAAmB,EACtB,oCAAgB,EACX,gDAAqB,EACtB,4CAAoB,EACb,4DAA2B,EAC5C,wBAAU,EACR,6BAAY,EACX,uBAAa,EACJ,iDAAsB,EAC7B,wBAAe,EACF,8DAA4B,EAChC,qDAAwB,EAChC,qCAAgB,EAClB,+BAAc,EAChB,4BAAY;GAzChC,UAAU,CAsqBtB"}
|
|
1
|
+
{"version":3,"file":"mcp.service.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,8CAKwB;AACxB,wDAA2E;AAC3E,wCAA8E;AAC9E,gCAMiB;AACjB,gCAA6C;AAC7C,iDAK8B;AAC9B,wDAAoD;AACpD,0EAAmG;AACnG,uCAA4C;AAC5C,+CAA2F;AAE3F,2DAAuD;AACvD,iFAA6E;AAC7E,2CAA0C;AAC1C,2EAAuE;AACvE,0DAAsD;AACtD,sEAAkE;AAClE,6GAAwG;AACxG,4FAAsF;AACtF,iDAAoD;AACpD,6CAAyC;AACzC,uCAA0C;AAC1C,sEAAiE;AACjE,8FAAwF;AACxF,sEAA+D;AAC/D,0DAAsD;AACtD,wDAAoD;AACpD,wDAAoD;AACpD,2CAAwC;AACxC,uDAAmD;AACnD,qFAAgF;AAChF,iFAA4E;AAC5E,oGAA+F;AAC/F,iGAA2F;AAC3F,mEAA+D;AAE/D,mDAAiG;AACjG,6CAAmD;AACnD,mEAAiE;AAQjE,yDAA2D;AAC3D,mDAQ4B;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AC,CAAC;QACrE,CAAC;IACF,CAAC;IAMD,0BAA0B,CAAC,MAAM,GAAG,sBAAsB;QACzD,MAAM,YAAY,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE;YAC1D,KAAK,EAAE,YAAY,CAAC,MAAM;YAC1B,MAAM;SACN,CAAC,CAAC;QAEH,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACxC,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAClD,CAAC;IACF,CAAC;IAKD,IAAI,qBAAqB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC;IACnC,CAAC;CAGD,CAAA;;qBA/rBY,UAAU;IADtB,IAAA,YAAO,GAAE;qCASiB,uBAAM,EACI,yBAAgB,EAChB,2BAAgB,EACX,+CAAqB,EAC3B,kCAAe,EACpB,wBAAU,EACF,wCAAkB,EACpB,oCAAgB,EACpB,qBAAY,EACf,qBAAS,EACJ,gCAAc,EACjB,0BAAW,EACR,mCAAc,EACV,iCAAkB,EACb,mDAAuB,EACrC,sBAAS,EACD,sBAAiB,EAClB,qBAAgB,EACR,6BAAwB,EAC7B,wBAAmB,EACtB,oCAAgB,EACX,gDAAqB,EACtB,4CAAoB,EACb,4DAA2B,EAC5C,wBAAU,EACR,6BAAY,EACX,uBAAa,EACJ,iDAAsB,EAC7B,wBAAe,EACF,8DAA4B,EAChC,qDAAwB,EAChC,qCAAgB,EAClB,+BAAc,EAChB,4BAAY;GAzChC,UAAU,CA+rBtB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { WorkflowPublishBlockedReason } from '@n8n/api-types';
|
|
3
3
|
import type { INode } from 'n8n-workflow';
|
|
4
4
|
import type z from 'zod';
|
|
5
5
|
import type { Mcpauth_type } from '../../services/oauth-token-verifier-proxy.service';
|
|
6
6
|
import type { SUPPORTED_PRODUCTION_MCP_TRIGGERS } from './mcp.constants';
|
|
7
7
|
import type { WorkflowDetailsOutputSchema } from './tools/get-workflow-details.tool';
|
|
8
|
+
export type ToolHandler<InputArgs extends z.ZodRawShape = z.ZodRawShape> = (args: z.objectOutputType<InputArgs, z.ZodTypeAny>, extra?: unknown) => CallToolResult | Promise<CallToolResult>;
|
|
8
9
|
export type ToolDefinition<InputArgs extends z.ZodRawShape = z.ZodRawShape> = {
|
|
9
10
|
name: string;
|
|
10
11
|
config: {
|
|
@@ -18,10 +19,34 @@ export type ToolDefinition<InputArgs extends z.ZodRawShape = z.ZodRawShape> = {
|
|
|
18
19
|
idempotentHint?: boolean;
|
|
19
20
|
openWorldHint?: boolean;
|
|
20
21
|
};
|
|
22
|
+
_meta?: Record<string, unknown>;
|
|
21
23
|
};
|
|
22
|
-
handler:
|
|
24
|
+
handler: ToolHandler<InputArgs>;
|
|
23
25
|
};
|
|
24
26
|
export type RegisterToolFn = <InputArgs extends z.ZodRawShape>(tool: ToolDefinition<InputArgs>) => void;
|
|
27
|
+
type ResourceReadResult = {
|
|
28
|
+
contents: Array<{
|
|
29
|
+
uri: string;
|
|
30
|
+
mimeType: string;
|
|
31
|
+
text: string;
|
|
32
|
+
_meta?: Record<string, unknown>;
|
|
33
|
+
}>;
|
|
34
|
+
};
|
|
35
|
+
export type ResourceDefinition = {
|
|
36
|
+
name: string;
|
|
37
|
+
uri: string;
|
|
38
|
+
config: {
|
|
39
|
+
description?: string;
|
|
40
|
+
mimeType?: string;
|
|
41
|
+
cacheHint?: {
|
|
42
|
+
ttlMs: number;
|
|
43
|
+
cacheScope: 'private' | 'public';
|
|
44
|
+
};
|
|
45
|
+
_meta?: Record<string, unknown>;
|
|
46
|
+
};
|
|
47
|
+
read: () => ResourceReadResult | Promise<ResourceReadResult>;
|
|
48
|
+
};
|
|
49
|
+
export type RegisterResourceFn = (resource: ResourceDefinition) => void;
|
|
25
50
|
export declare const SEARCH_WORKFLOWS_SORT_BY_VALUES: readonly ['updatedAt:desc', 'updatedAt:asc', 'createdAt:desc', 'createdAt:asc', 'name:asc', 'name:desc'];
|
|
26
51
|
export type SearchWorkflowsSortBy = (typeof SEARCH_WORKFLOWS_SORT_BY_VALUES)[number];
|
|
27
52
|
export type SearchWorkflowsParams = {
|
|
@@ -39,8 +64,6 @@ export type SearchWorkflowsItem = {
|
|
|
39
64
|
createdAt: string | null;
|
|
40
65
|
updatedAt: string | null;
|
|
41
66
|
triggerCount: number | null;
|
|
42
|
-
scopes: string[];
|
|
43
|
-
canExecute: boolean;
|
|
44
67
|
availableInMCP: boolean;
|
|
45
68
|
tags: Array<{
|
|
46
69
|
id: string;
|
|
@@ -53,12 +76,13 @@ export type SearchWorkflowsResult = {
|
|
|
53
76
|
};
|
|
54
77
|
export type WorkflowDetailsResult = z.infer<WorkflowDetailsOutputSchema>;
|
|
55
78
|
export type WorkflowDetailsWorkflow = WorkflowDetailsResult['workflow'];
|
|
56
|
-
export type WorkflowDetailsNode = WorkflowDetailsWorkflow['nodes'][number];
|
|
79
|
+
export type WorkflowDetailsNode = NonNullable<WorkflowDetailsWorkflow['nodes']>[number];
|
|
57
80
|
export type JSONRPCRequest = {
|
|
58
81
|
jsonrpc?: string;
|
|
59
82
|
method?: string;
|
|
60
83
|
params?: {
|
|
61
84
|
clientInfo?: McpClientInfo;
|
|
85
|
+
_meta?: Record<string, unknown>;
|
|
62
86
|
[key: string]: unknown;
|
|
63
87
|
};
|
|
64
88
|
id?: string | number | null;
|
|
@@ -72,6 +96,7 @@ export type UserConnectedToMCPEventPayload = {
|
|
|
72
96
|
user_id?: string;
|
|
73
97
|
client_name?: string;
|
|
74
98
|
client_version?: string;
|
|
99
|
+
protocol_version?: string;
|
|
75
100
|
auth_type?: Mcpauth_type;
|
|
76
101
|
mcp_connection_status: 'success' | 'error';
|
|
77
102
|
mcp_apps_enabled?: boolean;
|
|
@@ -102,3 +127,4 @@ export type N8nConnectCoverage = {
|
|
|
102
127
|
export type MCPTriggersMap = {
|
|
103
128
|
[K in keyof typeof SUPPORTED_PRODUCTION_MCP_TRIGGERS]: INode[];
|
|
104
129
|
};
|
|
130
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.types.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.types.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"mcp.types.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.types.ts"],"names":[],"mappings":";;;AA6Ea,QAAA,+BAA+B,GAAG;IAC9C,gBAAgB;IAChB,eAAe;IACf,gBAAgB;IAChB,eAAe;IACf,UAAU;IACV,WAAW;CACF,CAAC"}
|
|
@@ -4,6 +4,7 @@ import type { INode } from 'n8n-workflow';
|
|
|
4
4
|
import type { McpClientInfo } from './mcp.types';
|
|
5
5
|
type McpExecutionMode = 'manual' | 'production';
|
|
6
6
|
export declare const getClientInfo: (req: Request | AuthenticatedRequest) => McpClientInfo | undefined;
|
|
7
|
+
export declare const getProtocolVersion: (req: Request | AuthenticatedRequest) => string | undefined;
|
|
7
8
|
export declare const getToolName: (body: unknown) => string;
|
|
8
9
|
export declare const getToolArguments: (body: unknown) => Record<string, unknown>;
|
|
9
10
|
export declare const findMcpSupportedTrigger: (nodes: INode[], mode?: McpExecutionMode) => INode | undefined;
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findMcpSupportedTrigger = exports.getToolArguments = exports.getToolName = exports.getClientInfo = void 0;
|
|
3
|
+
exports.findMcpSupportedTrigger = exports.getToolArguments = exports.getToolName = exports.getProtocolVersion = exports.getClientInfo = void 0;
|
|
4
4
|
const is_record_1 = require("@n8n/utils/is-record");
|
|
5
5
|
const mcp_constants_1 = require("./mcp.constants");
|
|
6
6
|
const mcp_typeguards_1 = require("./mcp.typeguards");
|
|
7
|
+
const getRequestMetaValue = (params, key) => {
|
|
8
|
+
const meta = params?._meta;
|
|
9
|
+
return (0, is_record_1.isRecord)(meta) ? meta[key] : undefined;
|
|
10
|
+
};
|
|
7
11
|
const getClientInfo = (req) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
if (!(0, mcp_typeguards_1.isJSONRPCRequest)(req.body))
|
|
13
|
+
return undefined;
|
|
14
|
+
const params = req.body.params;
|
|
15
|
+
const metaClientInfo = getRequestMetaValue(params, mcp_constants_1.MCP_CLIENT_INFO_META_KEY);
|
|
16
|
+
if ((0, is_record_1.isRecord)(metaClientInfo)) {
|
|
17
|
+
return {
|
|
18
|
+
name: typeof metaClientInfo.name === 'string' ? metaClientInfo.name : undefined,
|
|
19
|
+
version: typeof metaClientInfo.version === 'string' ? metaClientInfo.version : undefined,
|
|
20
|
+
};
|
|
11
21
|
}
|
|
12
|
-
return clientInfo;
|
|
22
|
+
return params?.clientInfo;
|
|
13
23
|
};
|
|
14
24
|
exports.getClientInfo = getClientInfo;
|
|
25
|
+
const getProtocolVersion = (req) => {
|
|
26
|
+
if (!(0, mcp_typeguards_1.isJSONRPCRequest)(req.body))
|
|
27
|
+
return undefined;
|
|
28
|
+
const version = getRequestMetaValue(req.body.params, mcp_constants_1.MCP_PROTOCOL_VERSION_META_KEY);
|
|
29
|
+
return typeof version === 'string' ? version : undefined;
|
|
30
|
+
};
|
|
31
|
+
exports.getProtocolVersion = getProtocolVersion;
|
|
15
32
|
const getToolName = (body) => {
|
|
16
33
|
if (!(0, mcp_typeguards_1.isJSONRPCRequest)(body))
|
|
17
34
|
return 'unknown';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.utils.js","sourceRoot":"","sources":["../../../src/modules/mcp/mcp.utils.ts"],"names":[],"mappings":";;;AACA,oDAAgD;AAIhD,
|
|
1
|
+
{"version":3,"file":"mcp.utils.js","sour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C,IAAI,CAAC,sCAAsB,CAAC,CAAC;IACxC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AACrF,CAAC,CAAC;AATW,QAAA,uBAAuB,GAAvB,uBAAuB,CASlC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { StandardSchemaWithJSON } from '@modelcontextprotocol/server';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare function shapeToStandardSchema<Shape extends z.ZodRawShape>(shape: Shape): StandardSchemaWithJSON<z.objectInputType<Shape, z.ZodTypeAny>, z.objectOutputType<Shape, z.ZodTypeAny>>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shapeToStandardSchema = shapeToStandardSchema;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
6
|
+
function shapeToStandardSchema(shape) {
|
|
7
|
+
const schema = zod_1.z.object(shape);
|
|
8
|
+
const jsonSchema = { ...(0, zod_to_json_schema_1.zodToJsonSchema)(schema) };
|
|
9
|
+
delete jsonSchema.$schema;
|
|
10
|
+
return {
|
|
11
|
+
'~standard': {
|
|
12
|
+
version: 1,
|
|
13
|
+
vendor: 'n8n-zod-classic',
|
|
14
|
+
validate: (value) => {
|
|
15
|
+
const result = schema.safeParse(value);
|
|
16
|
+
return result.success
|
|
17
|
+
? { value: result.data }
|
|
18
|
+
: {
|
|
19
|
+
issues: result.error.issues.map((issue) => ({
|
|
20
|
+
message: issue.message,
|
|
21
|
+
path: issue.path,
|
|
22
|
+
})),
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
jsonSchema: {
|
|
26
|
+
input: () => jsonSchema,
|
|
27
|
+
output: () => jsonSchema,
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=tool-schema.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-schema.util.js","sourceRoot":"","sources":["../../../src/modules/mcp/tool-schema.util.ts"],"names":[],"mappings":";;;AACA,6BAAwB;AACxB,2DAAqD;AAUrD,+BACC,KAAY;IAKZ,MAAM,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,UAAU,GAA4B,EAAE,GAAG,IAAA,oCAAe,EAAC,MAAM,CAAC,EAAE,CAAC;IAG3E,OAAO,UAAU,CAAC,OAAO,CAAC;IAE1B,OAAO;QACN,WAAW,EAAE;YACZ,OAAO,EAAE,CAAC;YACV,MAAM,EAAE,iBAAiB;YACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBACnB,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;gBACvC,OAAO,MAAM,CAAC,OAAO;oBACpB,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,EAAE;oBACxB,CAAC,CAAC;wBACA,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;4BAC3C,OAAO,EAAE,KAAK,CAAC,OAAO;4BACtB,IAAI,EAAE,KAAK,CAAC,IAAI;yBAChB,CAAC,CAAC;qBACH,CAAC;YACL,CAAC;YACD,UAAU,EAAE;gBACX,KAAK,EAAE,GAAG,EAAE,CAAC,UAAU;gBACvB,MAAM,EAAE,GAAG,EAAE,CAAC,UAAU;aACxB;SACD;KACD,CAAC;AACH,CAAC"}
|
|
@@ -5,5 +5,5 @@ export declare const AGENT_CONFIG_JSON_SCHEMA: import("zod-to-json-schema").Json
|
|
|
5
5
|
[key: string]: import("zod-to-json-schema").JsonSchema7Type;
|
|
6
6
|
} | undefined;
|
|
7
7
|
};
|
|
8
|
-
export declare const AGENT_BUILDER_GUIDE = "# n8n Agent management\n\nUse the Agent MCP tools to create and edit persisted n8n Agents. The MCP client is the\norchestrator: there is no nested conversational Agent Builder.\n\n## Choose an Agent or workflow\n\nAn n8n Agent is a first-class persisted resource with its own instructions, model, tools, skills,\ntasks, memory, integrations, and lifecycle. An AI Agent node is a node inside a workflow whose\ntrigger, surrounding graph, and lifecycle are owned by that workflow.\n\nIf the request is actually a fixed trigger or schedule with enumerable, repeatable steps, it is\nprobably a workflow \u2014 explain the mismatch and ask before building the alternative. Never substitute\na Chat Trigger plus an AI Agent node for a requested n8n Agent.\n\n## Build sequence\n\n1. Use search_projects to identify the project, or search_agents and get_agent for an existing Agent.\n By-ID tools (get_agent, mutate_agent, validate_agent, publish_agent, unpublish_agent,\n revert_agent, list_agent_versions, delete_agent, update_agent_integration) take an agentId alone\n and resolve the project from it.\n2. Use discover_agent_assets plus list_credentials, search_nodes, get_node_types, and\n explore_node_resources to ground model, tool, workflow, integration, and credential choices.\n3. For a new Agent, call create_agent with the initial config after discovering its assets. The\n top-level name is injected into config; omit config only when the Agent ID is needed first.\n4. Call mutate_agent once per logical sidecar or subsequent mutation, always passing the latest\n configHash. Skills, tasks, and custom tools are created after the Agent because they need\n server-generated IDs.\n5. Call validate_agent and resolve every reported error. A valid Agent is a completed draft; do not\n publish it merely to finish the build.\n6. Report that the draft is ready, include a clickable link using the `url` returned by\n validate_agent, and ask whether the user wants to publish it.\n7. Call publish_agent only when the user explicitly requested publication, activation, deployment,\n or making the Agent live, or confirms publication after the build.\n8. Use update_agent_integration to configure chat integrations. Configuration never publishes the\n Agent. A configured channel stays inactive until explicit publication unless the Agent already has an active version.\n\n## Publication approval\n\nBuilding, editing, validating, or configuring an Agent never implies permission to publish or\nrepublish it. Leave the Agent as a draft by default. An explicit request to publish, activate,\ndeploy, or make live counts as approval; otherwise ask after validation and wait for the answer\nbefore calling publish_agent. Configuring a channel on an already published Agent connects it\nimmediately, so confirm that external connection before calling update_agent_integration.\n\n## Version history\n\nlist_agent_versions lists an Agent's published versions; get_agent with a versionId inspects one\nbefore acting on it. revert_agent restores the draft from a version without publishing, returning a\nfresh configHash for further mutations. publish_agent with a versionId republishes that version\ndirectly, leaving the draft untouched; as a (re)publication it requires the same explicit approval.\n\nIn publish, unpublish, and revert responses, `activeVersionId` identifies the live published\nversion (null when unpublished) while `versionId` is the draft's internal pointer \u2014 do not report\n`versionId` as a published version.\n\n## mutate_agent operations\n\nPass a single `operation` object whose `type` selects the mutation. Each operation's fields sit\ndirectly on that object \u2014 there is no `value` wrapper. For example:\n\n```json\n{ \"type\": \"config.patch\", \"patch\": [{ \"op\": \"add\", \"path\": \"/tools/-\", \"value\": { \"type\": \"workflow\", \"workflow\": \"My Workflow\", \"name\": \"my_tool\" } }] }\n```\n\n- config.replace: Set `config` to the complete editable Agent JSON configuration. Must not include\n integrations; use update_agent_integration for those.\n- config.patch: Set `patch` to an array of RFC 6902 operations (add, remove, replace, move, copy,\n test). Paths under /integrations are rejected; use update_agent_integration for those.\n- skill.upsert: Set `skill` to the complete skill body. Omit `skillId` to create and attach a new\n skill, or pass it to replace an existing skill body.\n- skill.delete: Set `skillId` to the skill to delete; its config reference is removed.\n- task.upsert: Set `task` to the complete task body. Omit `taskId` to create and attach a new\n scheduled task, or pass it to replace an existing one. `enabled` controls the task config reference.\n- task.delete: Set `taskId` to the task to delete; its config reference is removed.\n- customTool.upsert: Set `code` to the tool source; it is compiled, validated, stored, and attached.\n Only `@n8n/agents` and `zod` imports are available. The default export must be a Tool builder\n chain with `description`, `input` (a Zod schema), and `handler`; `output` is optional:\n\n ```typescript\n import { Tool } from '@n8n/agents';\n import { z } from 'zod';\n\n export default new Tool('get_current_datetime')\n \t.description('Return the current date and time as an ISO 8601 string')\n \t.input(z.object({}))\n \t.handler(async () => new Date().toISOString());\n ```\n- customTool.delete: Set `toolId` to the custom tool to delete; its config reference is removed.\n\nEvery mutation requires baseConfigHash from get_agent or the previous successful mutation. Mutation\nresponses contain only the next configHash and the affected resource ID, not the full Agent. On a\nstale_config response, call get_agent and retry against the returned snapshot.\n\n## Agent JSON configuration\n\nThe required runnable fields are name, model, credential, and instructions. Common optional fields\ninclude tools, skills, tasks, memory, subAgents, providerTools, mcpServers, vectorStores,\npersonalisation, and config. Integrations are not part of this config (see below).\n\nTool references use these forms:\n\n- Custom tool: { \"type\": \"custom\", \"id\": \"tool_name\" }\n- Workflow tool: { \"type\": \"workflow\", \"workflow\": \"Workflow Name\", \"name\": \"tool_name\" }\n- Node tool: { \"type\": \"node\", \"name\": \"tool_name\", \"node\": { \"nodeType\": \"...\",\n \"nodeTypeVersion\": 1, \"nodeParameters\": {}, \"credentials\": {} } }\n\nCreating a resource does not give the Agent access to it. For example, a data table created with\ncreate_data_table is only usable by the Agent once it is attached as a node tool\n(n8n-nodes-base.dataTable); discover it with search_nodes usage=\"agentTool\" like any other node.\n\nSub-agents are not tool entries. Configure them under the top-level `subAgents` field:\n{ \"subAgents\": { \"agents\": [{ \"agentId\": \"...\", \"useWhen\": \"...\" }] } }\n\nDo not guess node parameters or stable resource IDs. Discover the node definition and live resource\noptions first. Never place credential secret data in Agent configuration or MCP tool arguments; use\ncredential IDs returned by list_credentials.\n\nSkills and tasks have separately persisted bodies. Always manage them through mutate_agent instead\nof manually inventing their IDs. Saved sub-agents must be published Agents from the same project.\nUse discover_agent_assets with kind=subagents to obtain valid IDs.\n\nChat integrations are conversation surfaces, not ordinary node tools. Use an integration when users\nshould invoke and converse with the Agent in Slack, Telegram, or Linear. Use a node/workflow tool\nwhen the Agent only needs to call that service as an API.\n\nIntegrations are persisted separately from editable config. get_agent reports them in a read-only\nintegrations field, but config.replace and config.patch can't add, change, or remove them, and they\nnever appear in the config schema above. Manage them exclusively with update_agent_integration,\nwhich validates the credential and persists the configuration without publishing. A configured\nchannel stays inactive until publish_agent is called unless the Agent already has an active version;\nin that case, it connects immediately to the existing active snapshot.\n\n## MCP servers\n\nThe top-level `mcpServers` config array connects external MCP tool catalogs to the Agent. Discover\nregistry-backed servers with discover_agent_assets kind=mcpServers, or use a URL the user provides.\nWhen the server requires authentication, resolve an accessible credential ID with list_credentials\nfirst; the same ID is passed to verification and stored in the config entry. Credentials cannot be\ncreated through these tools \u2014 when none exists, ask the user to create one in n8n.\n\nBefore writing an entry into mcpServers, call verify_agent_mcp_server with the same name, url,\ntransport, authentication, and credential. The server does not need to be attached to the Agent\nfirst: verification opens a temporary connection and returns the server's live tools. validate_agent\nnever performs this handshake, so an unverified entry can pass validation and still fail at runtime.\nConfirm the returned tools cover the requested capability and use the list to populate toolFilter\ninstead of guessing tool names. If verification fails, report the error and resolve it with the user\ninstead of persisting a broken server. Only when the user cannot supply the URL or credential yet,\npersist the known fields without inventing values and skip verification.\n";
|
|
8
|
+
export declare const AGENT_BUILDER_GUIDE = "# n8n Agent management\n\nUse the Agent MCP tools to create and edit persisted n8n Agents. The MCP client is the\norchestrator: there is no nested conversational Agent Builder.\n\n## Choose an Agent or workflow\n\nAn n8n Agent is a first-class persisted resource with its own instructions, model, tools, skills,\ntasks, memory, integrations, and lifecycle. An AI Agent node is a node inside a workflow whose\ntrigger, surrounding graph, and lifecycle are owned by that workflow.\n\nIf the request is actually a fixed trigger or schedule with enumerable, repeatable steps, it is\nprobably a workflow \u2014 explain the mismatch and ask before building the alternative. Never substitute\na Chat Trigger plus an AI Agent node for a requested n8n Agent.\n\n## Build sequence\n\n1. Use search_projects to identify the project, or search_agents and get_agent for an existing Agent.\n By-ID tools (get_agent, mutate_agent, validate_agent, call_agent, publish_agent,\n unpublish_agent, revert_agent, list_agent_versions, delete_agent, update_agent_integration) take\n an agentId alone and resolve the project from it.\n2. Use discover_agent_assets plus list_credentials, search_nodes, get_node_types, and\n explore_node_resources to ground model, tool, workflow, integration, and credential choices.\n3. For a new Agent, call create_agent with the initial config after discovering its assets. The\n top-level name is injected into config; omit config only when the Agent ID is needed first.\n4. Call mutate_agent once per logical sidecar or subsequent mutation, always passing the latest\n configHash. Skills, tasks, and custom tools are created after the Agent because they need\n server-generated IDs.\n5. Call validate_agent and resolve every reported error. A valid Agent is a completed draft; do not\n publish it merely to finish the build.\n6. After validation succeeds, if call_agent is available and authorized, send one representative\n message before reporting the draft ready. Otherwise, report the successfully validated draft\n ready without a test run.\n7. Report that the draft is ready, include a clickable link using the `url` returned by\n validate_agent, and ask whether the user wants to publish it.\n8. Call publish_agent only when the user explicitly requested publication, activation, deployment,\n or making the Agent live, or confirms publication after the build.\n9. Use update_agent_integration to configure chat integrations. Configuration never publishes the\n Agent. A configured channel stays inactive until explicit publication unless the Agent already has an active version.\n\n## Draft test runs\n\ncall_agent verifies the draft Agent's behavior through built-in Preview chat, not configured channel\ntriggers, platform context, message delivery, or replies. Real tools and credentials are used, so\nside effects are possible. If the test exposes errors, report them and ask whether to fix them rather\nthan mutating the Agent automatically. Every approval decision must come from the human; resume each\nreturned approval individually.\n\n## Publication approval\n\nBuilding, editing, validating, or configuring an Agent never implies permission to publish or\nrepublish it. Leave the Agent as a draft by default. An explicit request to publish, activate,\ndeploy, or make live counts as approval; otherwise ask after validation and wait for the answer\nbefore calling publish_agent. Configuring a channel on an already published Agent connects it\nimmediately, so confirm that external connection before calling update_agent_integration.\n\n## Version history\n\nlist_agent_versions lists an Agent's published versions; get_agent with a versionId inspects one\nbefore acting on it. revert_agent restores the draft from a version without publishing, returning a\nfresh configHash for further mutations. publish_agent with a versionId republishes that version\ndirectly, leaving the draft untouched; as a (re)publication it requires the same explicit approval.\n\nIn publish, unpublish, and revert responses, `activeVersionId` identifies the live published\nversion (null when unpublished) while `versionId` is the draft's internal pointer \u2014 do not report\n`versionId` as a published version.\n\n## mutate_agent operations\n\nPass a single `operation` object whose `type` selects the mutation. Each operation's fields sit\ndirectly on that object \u2014 there is no `value` wrapper. For example:\n\n```json\n{ \"type\": \"config.patch\", \"patch\": [{ \"op\": \"add\", \"path\": \"/tools/-\", \"value\": { \"type\": \"workflow\", \"workflow\": \"My Workflow\", \"name\": \"my_tool\" } }] }\n```\n\n- config.replace: Set `config` to the complete editable Agent JSON configuration. Must not include\n integrations; use update_agent_integration for those.\n- config.patch: Set `patch` to an array of RFC 6902 operations (add, remove, replace, move, copy,\n test). Paths under /integrations are rejected; use update_agent_integration for those.\n- skill.upsert: Set `skill` to the complete skill body. Omit `skillId` to create and attach a new\n skill, or pass it to replace an existing skill body.\n- skill.delete: Set `skillId` to the skill to delete; its config reference is removed.\n- task.upsert: Set `task` to the complete task body. Omit `taskId` to create and attach a new\n scheduled task, or pass it to replace an existing one. `enabled` controls the task config reference.\n- task.delete: Set `taskId` to the task to delete; its config reference is removed.\n- customTool.upsert: Set `code` to the tool source; it is compiled, validated, stored, and attached.\n Only `@n8n/agents` and `zod` imports are available. The default export must be a Tool builder\n chain with `description`, `input` (a Zod schema), and `handler`; `output` is optional:\n\n ```typescript\n import { Tool } from '@n8n/agents';\n import { z } from 'zod';\n\n export default new Tool('get_current_datetime')\n \t.description('Return the current date and time as an ISO 8601 string')\n \t.input(z.object({}))\n \t.handler(async () => new Date().toISOString());\n ```\n- customTool.delete: Set `toolId` to the custom tool to delete; its config reference is removed.\n\nEvery mutation requires baseConfigHash from get_agent or the previous successful mutation. Mutation\nresponses contain only the next configHash and the affected resource ID, not the full Agent. On a\nstale_config response, call get_agent and retry against the returned snapshot.\n\n## Agent JSON configuration\n\nThe required runnable fields are name, model, credential, and instructions. Common optional fields\ninclude tools, skills, tasks, memory, subAgents, providerTools, mcpServers, vectorStores,\npersonalisation, and config. Integrations are not part of this config (see below).\n\nTool references use these forms:\n\n- Custom tool: { \"type\": \"custom\", \"id\": \"tool_name\" }\n- Workflow tool: { \"type\": \"workflow\", \"workflow\": \"Workflow Name\", \"name\": \"tool_name\" }\n- Node tool: { \"type\": \"node\", \"name\": \"tool_name\", \"node\": { \"nodeType\": \"...\",\n \"nodeTypeVersion\": 1, \"nodeParameters\": {}, \"credentials\": {} } }\n\nCreating a resource does not give the Agent access to it. For example, a data table created with\ncreate_data_table is only usable by the Agent once it is attached as a node tool\n(n8n-nodes-base.dataTable); discover it with search_nodes usage=\"agentTool\" like any other node.\n\nSub-agents are not tool entries. Configure them under the top-level `subAgents` field:\n{ \"subAgents\": { \"agents\": [{ \"agentId\": \"...\", \"useWhen\": \"...\" }] } }\n\nDo not guess node parameters or stable resource IDs. Discover the node definition and live resource\noptions first. Never place credential secret data in Agent configuration or MCP tool arguments; use\ncredential IDs returned by list_credentials.\n\nSkills and tasks have separately persisted bodies. Always manage them through mutate_agent instead\nof manually inventing their IDs. Saved sub-agents must be published Agents from the same project.\nUse discover_agent_assets with kind=subagents to obtain valid IDs.\n\nChat integrations are conversation surfaces, not ordinary node tools. Use an integration when users\nshould invoke and converse with the Agent in Slack, Telegram, or Linear. Use a node/workflow tool\nwhen the Agent only needs to call that service as an API.\n\nIntegrations are persisted separately from editable config. get_agent reports them in a read-only\nintegrations field, but config.replace and config.patch can't add, change, or remove them, and they\nnever appear in the config schema above. Manage them exclusively with update_agent_integration,\nwhich validates the credential and persists the configuration without publishing. A configured\nchannel stays inactive until publish_agent is called unless the Agent already has an active version;\nin that case, it connects immediately to the existing active snapshot.\n\n## MCP servers\n\nThe top-level `mcpServers` config array connects external MCP tool catalogs to the Agent. Discover\nregistry-backed servers with discover_agent_assets kind=mcpServers, or use a URL the user provides.\nWhen the server requires authentication, resolve an accessible credential ID with list_credentials\nfirst; the same ID is passed to verification and stored in the config entry. Credentials cannot be\ncreated through these tools \u2014 when none exists, ask the user to create one in n8n.\n\nBefore writing an entry into mcpServers, call verify_agent_mcp_server with the same name, url,\ntransport, authentication, and credential. The server does not need to be attached to the Agent\nfirst: verification opens a temporary connection and returns the server's live tools. validate_agent\nnever performs this handshake, so an unverified entry can pass validation and still fail at runtime.\nConfirm the returned tools cover the requested capability and use the list to populate toolFilter\ninstead of guessing tool names. If verification fails, report the error and resolve it with the user\ninstead of persisting a broken server. Only when the user cannot supply the URL or credential yet,\npersist the known fields without inventing values and skip verification.\n";
|
|
9
9
|
export declare const AGENT_BUILDER_REFERENCE: string;
|
|
@@ -26,9 +26,9 @@ a Chat Trigger plus an AI Agent node for a requested n8n Agent.
|
|
|
26
26
|
## Build sequence
|
|
27
27
|
|
|
28
28
|
1. Use search_projects to identify the project, or search_agents and get_agent for an existing Agent.
|
|
29
|
-
By-ID tools (get_agent, mutate_agent, validate_agent,
|
|
30
|
-
revert_agent, list_agent_versions, delete_agent, update_agent_integration) take
|
|
31
|
-
and resolve the project from it.
|
|
29
|
+
By-ID tools (get_agent, mutate_agent, validate_agent, call_agent, publish_agent,
|
|
30
|
+
unpublish_agent, revert_agent, list_agent_versions, delete_agent, update_agent_integration) take
|
|
31
|
+
an agentId alone and resolve the project from it.
|
|
32
32
|
2. Use discover_agent_assets plus list_credentials, search_nodes, get_node_types, and
|
|
33
33
|
explore_node_resources to ground model, tool, workflow, integration, and credential choices.
|
|
34
34
|
3. For a new Agent, call create_agent with the initial config after discovering its assets. The
|
|
@@ -38,13 +38,24 @@ a Chat Trigger plus an AI Agent node for a requested n8n Agent.
|
|
|
38
38
|
server-generated IDs.
|
|
39
39
|
5. Call validate_agent and resolve every reported error. A valid Agent is a completed draft; do not
|
|
40
40
|
publish it merely to finish the build.
|
|
41
|
-
6.
|
|
41
|
+
6. After validation succeeds, if call_agent is available and authorized, send one representative
|
|
42
|
+
message before reporting the draft ready. Otherwise, report the successfully validated draft
|
|
43
|
+
ready without a test run.
|
|
44
|
+
7. Report that the draft is ready, include a clickable link using the \`url\` returned by
|
|
42
45
|
validate_agent, and ask whether the user wants to publish it.
|
|
43
|
-
|
|
46
|
+
8. Call publish_agent only when the user explicitly requested publication, activation, deployment,
|
|
44
47
|
or making the Agent live, or confirms publication after the build.
|
|
45
|
-
|
|
48
|
+
9. Use update_agent_integration to configure chat integrations. Configuration never publishes the
|
|
46
49
|
Agent. A configured channel stays inactive until explicit publication unless the Agent already has an active version.
|
|
47
50
|
|
|
51
|
+
## Draft test runs
|
|
52
|
+
|
|
53
|
+
call_agent verifies the draft Agent's behavior through built-in Preview chat, not configured channel
|
|
54
|
+
triggers, platform context, message delivery, or replies. Real tools and credentials are used, so
|
|
55
|
+
side effects are possible. If the test exposes errors, report them and ask whether to fix them rather
|
|
56
|
+
than mutating the Agent automatically. Every approval decision must come from the human; resume each
|
|
57
|
+
returned approval individually.
|
|
58
|
+
|
|
48
59
|
## Publication approval
|
|
49
60
|
|
|
50
61
|
Building, editing, validating, or configuring an Agent never implies permission to publish or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-reference.js","sourceRoot":"","sources":["../../../../../src/modules/mcp/tools/agents/agent-reference.ts"],"names":[],"mappings":";;;AAAA,8CAA2D;AAC3D,2DAAqD;AAExC,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AAIpE,MAAM,6BAA6B,GAAG,qCAAyB,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAEhF,QAAA,wBAAwB,GAAG,IAAA,oCAAe,EAAC,6BAA6B,EAAE;IACtF,IAAI,EAAE,iBAAiB;CACvB,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG
|
|
1
|
+
{"version":3,"file":"agent-reference.js","sourceRoot":"","sources":["../../../../../src/modules/mcp/tools/agents/agent-reference.ts"],"names":[],"mappings":";;;AAAA,8CAA2D;AAC3D,2DAAqD;AAExC,QAAA,2BAA2B,GAAG,wBAAwB,CAAC;AAIpE,MAAM,6BAA6B,GAAG,qCAAyB,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC;AAEhF,QAAA,wBAAwB,GAAG,IAAA,oCAAe,EAAC,6BAA6B,EAAE;IACtF,IAAI,EAAE,iBAAiB;CACvB,CAAC,CAAC;AAEU,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgKlC,CAAC;AAEW,QAAA,uBAAuB,GAAG,GAAG,QAAA,mBAAmB;;;;;EAK3D,IAAI,CAAC,SAAS,CAAC,QAAA,wBAAwB,EAAE,IAAI,EAAE,CAAC,CAAC;;CAElD,CAAC"}
|