n8n 2.34.4 → 2.35.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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/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-credit-display.d.ts +9 -0
- package/dist/modules/instance-ai/instance-ai-credit-display.js +15 -0
- package/dist/modules/instance-ai/instance-ai-credit-display.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-credit.service.d.ts +11 -1
- package/dist/modules/instance-ai/instance-ai-credit.service.js +52 -9
- package/dist/modules/instance-ai/instance-ai-credit.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-model.service.d.ts +2 -4
- package/dist/modules/instance-ai/instance-ai-model.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +19 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +240 -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 +10 -6
- 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 +3 -1
- package/dist/modules/instance-ai/instance-ai.module.js +4 -7
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +7 -6
- package/dist/modules/instance-ai/instance-ai.service.js +238 -63
- 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/repositories/instance-ai-message.repository.d.ts +1 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.js +10 -0
- package/dist/modules/instance-ai/repositories/instance-ai-message.repository.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/ai.service.d.ts +1 -0
- package/dist/services/ai.service.js +4 -0
- package/dist/services/ai.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/instance-activation.service.d.ts +10 -0
- package/dist/services/instance-activation.service.js +48 -0
- package/dist/services/instance-activation.service.js.map +1 -0
- 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/services/workflow-statistics.service.d.ts +1 -0
- package/dist/services/workflow-statistics.service.js +12 -0
- package/dist/services/workflow-statistics.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 +45 -41
- 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
|
@@ -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"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
1
|
import { OutboundHttp, SsrfProtectionService } from '@n8n/backend-network';
|
|
3
2
|
import { SsrfProtectionConfig } from '@n8n/config';
|
|
4
3
|
import type { User } from '@n8n/db';
|
|
5
4
|
import { CredentialsService } from '../../../../credentials/credentials.service';
|
|
6
5
|
import { AgentConfigService } from '../../../../modules/agents/agent-config.service';
|
|
7
6
|
import { AgentCustomToolsService } from '../../../../modules/agents/agent-custom-tools.service';
|
|
7
|
+
import { AgentIntegrationManagementService } from '../../../../modules/agents/agent-integration-management.service';
|
|
8
8
|
import { AgentIntegrationPersistenceService } from '../../../../modules/agents/agent-integration-persistence.service';
|
|
9
9
|
import { AgentModelCatalogService } from '../../../../modules/agents/agent-model-catalog.service';
|
|
10
10
|
import { AgentPublishService } from '../../../../modules/agents/agent-publish.service';
|
|
11
11
|
import { AgentSkillsService } from '../../../../modules/agents/agent-skills.service';
|
|
12
12
|
import { AgentTaskService } from '../../../../modules/agents/agent-task.service';
|
|
13
|
+
import { AgentTestRunService } from '../../../../modules/agents/agent-test-run.service';
|
|
13
14
|
import { AgentValidationService } from '../../../../modules/agents/agent-validation.service';
|
|
14
15
|
import { AgentsService } from '../../../../modules/agents/agents.service';
|
|
15
16
|
import { AttachableWorkflowsService } from '../../../../modules/agents/attachable-workflows.service';
|
|
16
|
-
import { ChatIntegrationRegistry } from '../../../../modules/agents/integrations/agent-chat-integration';
|
|
17
|
-
import { ChatIntegrationService } from '../../../../modules/agents/integrations/chat-integration.service';
|
|
18
17
|
import { AgentSecureRuntime } from '../../../../modules/agents/runtime/agent-secure-runtime';
|
|
19
18
|
import { McpRegistryService } from '../../../../modules/mcp-registry/registry/mcp-registry.service';
|
|
20
19
|
import { NodeTypes } from '../../../../node-types';
|
|
@@ -22,6 +21,7 @@ import { OauthService } from '../../../../oauth/oauth.service';
|
|
|
22
21
|
import { ProjectScopeService } from '../../../../permissions.ee/project-scope.service';
|
|
23
22
|
import { UrlService } from '../../../../services/url.service';
|
|
24
23
|
import { Telemetry } from '../../../../telemetry';
|
|
24
|
+
import type { RegisterResourceFn, RegisterToolFn } from '../../mcp.types';
|
|
25
25
|
export declare class McpAgentToolsService {
|
|
26
26
|
private readonly telemetry;
|
|
27
27
|
private readonly credentialsService;
|
|
@@ -31,11 +31,11 @@ export declare class McpAgentToolsService {
|
|
|
31
31
|
private readonly agentPublishService;
|
|
32
32
|
private readonly agentSkillsService;
|
|
33
33
|
private readonly agentTaskService;
|
|
34
|
+
private readonly agentTestRunService;
|
|
34
35
|
private readonly agentCustomToolsService;
|
|
35
36
|
private readonly agentSecureRuntime;
|
|
36
37
|
private readonly integrationPersistenceService;
|
|
37
|
-
private readonly
|
|
38
|
-
private readonly chatIntegrationRegistry;
|
|
38
|
+
private readonly integrationManagementService;
|
|
39
39
|
private readonly agentModelCatalogService;
|
|
40
40
|
private readonly attachableWorkflowsService;
|
|
41
41
|
private readonly mcpRegistryService;
|
|
@@ -46,14 +46,14 @@ export declare class McpAgentToolsService {
|
|
|
46
46
|
private readonly ssrfProtectionService;
|
|
47
47
|
private readonly urlService;
|
|
48
48
|
private readonly projectScopeService;
|
|
49
|
-
constructor(telemetry: Telemetry, credentialsService: CredentialsService, agentsService: AgentsService, agentConfigService: AgentConfigService, agentValidationService: AgentValidationService, agentPublishService: AgentPublishService, agentSkillsService: AgentSkillsService, agentTaskService: AgentTaskService, agentCustomToolsService: AgentCustomToolsService, agentSecureRuntime: AgentSecureRuntime, integrationPersistenceService: AgentIntegrationPersistenceService,
|
|
50
|
-
registerTools(
|
|
51
|
-
private register;
|
|
49
|
+
constructor(telemetry: Telemetry, credentialsService: CredentialsService, agentsService: AgentsService, agentConfigService: AgentConfigService, agentValidationService: AgentValidationService, agentPublishService: AgentPublishService, agentSkillsService: AgentSkillsService, agentTaskService: AgentTaskService, agentTestRunService: AgentTestRunService, agentCustomToolsService: AgentCustomToolsService, agentSecureRuntime: AgentSecureRuntime, integrationPersistenceService: AgentIntegrationPersistenceService, integrationManagementService: AgentIntegrationManagementService, agentModelCatalogService: AgentModelCatalogService, attachableWorkflowsService: AttachableWorkflowsService, mcpRegistryService: McpRegistryService, nodeTypes: NodeTypes, oauthService: OauthService, outboundHttp: OutboundHttp, ssrfConfig: SsrfProtectionConfig, ssrfProtectionService: SsrfProtectionService, urlService: UrlService, projectScopeService: ProjectScopeService);
|
|
50
|
+
registerTools(registerTool: RegisterToolFn, registerResource: RegisterResourceFn, user: User, allowedToolNames?: Set<string>): void;
|
|
52
51
|
private searchAgentsTool;
|
|
53
52
|
private getAgentTool;
|
|
54
53
|
private createAgentTool;
|
|
55
54
|
private mutateAgentTool;
|
|
56
55
|
private validateAgentTool;
|
|
56
|
+
private callAgentTool;
|
|
57
57
|
private publishAgentTool;
|
|
58
58
|
private revertAgentTool;
|
|
59
59
|
private listAgentVersionsTool;
|
|
@@ -68,6 +68,7 @@ export declare class McpAgentToolsService {
|
|
|
68
68
|
private fetchConfigHash;
|
|
69
69
|
private configFromEntity;
|
|
70
70
|
private getAgentUrl;
|
|
71
|
+
private callAgent;
|
|
71
72
|
private applyMutation;
|
|
72
73
|
private assertSanitizeStable;
|
|
73
74
|
private assertPassesConfigGuards;
|
|
@@ -23,16 +23,16 @@ const credentials_service_1 = require("../../../../credentials/credentials.servi
|
|
|
23
23
|
const forbidden_error_1 = require("../../../../errors/response-errors/forbidden.error");
|
|
24
24
|
const agent_config_service_1 = require("../../../../modules/agents/agent-config.service");
|
|
25
25
|
const agent_custom_tools_service_1 = require("../../../../modules/agents/agent-custom-tools.service");
|
|
26
|
+
const agent_integration_management_service_1 = require("../../../../modules/agents/agent-integration-management.service");
|
|
26
27
|
const agent_integration_persistence_service_1 = require("../../../../modules/agents/agent-integration-persistence.service");
|
|
27
28
|
const agent_model_catalog_service_1 = require("../../../../modules/agents/agent-model-catalog.service");
|
|
28
29
|
const agent_publish_service_1 = require("../../../../modules/agents/agent-publish.service");
|
|
29
30
|
const agent_skills_service_1 = require("../../../../modules/agents/agent-skills.service");
|
|
30
31
|
const agent_task_service_1 = require("../../../../modules/agents/agent-task.service");
|
|
32
|
+
const agent_test_run_service_1 = require("../../../../modules/agents/agent-test-run.service");
|
|
31
33
|
const agent_validation_service_1 = require("../../../../modules/agents/agent-validation.service");
|
|
32
34
|
const agents_service_1 = require("../../../../modules/agents/agents.service");
|
|
33
35
|
const attachable_workflows_service_1 = require("../../../../modules/agents/attachable-workflows.service");
|
|
34
|
-
const agent_chat_integration_1 = require("../../../../modules/agents/integrations/agent-chat-integration");
|
|
35
|
-
const chat_integration_service_1 = require("../../../../modules/agents/integrations/chat-integration.service");
|
|
36
36
|
const agent_config_composition_1 = require("../../../../modules/agents/json-config/agent-config-composition");
|
|
37
37
|
const mcp_client_factory_1 = require("../../../../modules/agents/json-config/mcp-client-factory");
|
|
38
38
|
const sanitize_unknown_agent_credentials_1 = require("../../../../modules/agents/json-config/sanitize-unknown-agent-credentials");
|
|
@@ -246,6 +246,26 @@ const updateIntegrationInput = {
|
|
|
246
246
|
.optional()
|
|
247
247
|
.describe('Integration settings; required for Telegram connect operations'),
|
|
248
248
|
};
|
|
249
|
+
const callAgentRequestSchema = zod_1.z.discriminatedUnion('type', [
|
|
250
|
+
zod_1.z
|
|
251
|
+
.object({
|
|
252
|
+
type: zod_1.z.literal('message'),
|
|
253
|
+
message: zod_1.z.string().trim().min(1),
|
|
254
|
+
sessionId: zod_1.z.string().trim().min(1).optional(),
|
|
255
|
+
})
|
|
256
|
+
.strict(),
|
|
257
|
+
zod_1.z
|
|
258
|
+
.object({
|
|
259
|
+
type: zod_1.z.literal('approval'),
|
|
260
|
+
approved: zod_1.z.boolean(),
|
|
261
|
+
continuation: agent_test_run_service_1.agentTestRunContinuationSchema,
|
|
262
|
+
})
|
|
263
|
+
.strict(),
|
|
264
|
+
]);
|
|
265
|
+
const callAgentInput = {
|
|
266
|
+
...agentIdentityShape,
|
|
267
|
+
request: callAgentRequestSchema,
|
|
268
|
+
};
|
|
249
269
|
const emptyInput = {};
|
|
250
270
|
function toolResult(data, isError = false) {
|
|
251
271
|
return {
|
|
@@ -255,7 +275,7 @@ function toolResult(data, isError = false) {
|
|
|
255
275
|
};
|
|
256
276
|
}
|
|
257
277
|
let McpAgentToolsService = class McpAgentToolsService {
|
|
258
|
-
constructor(telemetry, credentialsService, agentsService, agentConfigService, agentValidationService, agentPublishService, agentSkillsService, agentTaskService, agentCustomToolsService, agentSecureRuntime, integrationPersistenceService,
|
|
278
|
+
constructor(telemetry, credentialsService, agentsService, agentConfigService, agentValidationService, agentPublishService, agentSkillsService, agentTaskService, agentTestRunService, agentCustomToolsService, agentSecureRuntime, integrationPersistenceService, integrationManagementService, agentModelCatalogService, attachableWorkflowsService, mcpRegistryService, nodeTypes, oauthService, outboundHttp, ssrfConfig, ssrfProtectionService, urlService, projectScopeService) {
|
|
259
279
|
this.telemetry = telemetry;
|
|
260
280
|
this.credentialsService = credentialsService;
|
|
261
281
|
this.agentsService = agentsService;
|
|
@@ -264,11 +284,11 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
264
284
|
this.agentPublishService = agentPublishService;
|
|
265
285
|
this.agentSkillsService = agentSkillsService;
|
|
266
286
|
this.agentTaskService = agentTaskService;
|
|
287
|
+
this.agentTestRunService = agentTestRunService;
|
|
267
288
|
this.agentCustomToolsService = agentCustomToolsService;
|
|
268
289
|
this.agentSecureRuntime = agentSecureRuntime;
|
|
269
290
|
this.integrationPersistenceService = integrationPersistenceService;
|
|
270
|
-
this.
|
|
271
|
-
this.chatIntegrationRegistry = chatIntegrationRegistry;
|
|
291
|
+
this.integrationManagementService = integrationManagementService;
|
|
272
292
|
this.agentModelCatalogService = agentModelCatalogService;
|
|
273
293
|
this.attachableWorkflowsService = attachableWorkflowsService;
|
|
274
294
|
this.mcpRegistryService = mcpRegistryService;
|
|
@@ -280,17 +300,19 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
280
300
|
this.urlService = urlService;
|
|
281
301
|
this.projectScopeService = projectScopeService;
|
|
282
302
|
}
|
|
283
|
-
registerTools(
|
|
303
|
+
registerTools(registerTool, registerResource, user, allowedToolNames) {
|
|
304
|
+
const isCallAgentAvailable = allowedToolNames?.has(mcp_constants_1.MCP_CALL_AGENT_TOOL_NAME) ?? true;
|
|
284
305
|
const registerIfAllowed = (tool) => {
|
|
285
306
|
if (allowedToolNames && !allowedToolNames.has(tool.name))
|
|
286
307
|
return;
|
|
287
|
-
|
|
308
|
+
registerTool(tool);
|
|
288
309
|
};
|
|
289
310
|
registerIfAllowed(this.searchAgentsTool(user));
|
|
290
311
|
registerIfAllowed(this.getAgentTool(user));
|
|
291
312
|
registerIfAllowed(this.createAgentTool(user));
|
|
292
313
|
registerIfAllowed(this.mutateAgentTool(user));
|
|
293
|
-
registerIfAllowed(this.validateAgentTool(user));
|
|
314
|
+
registerIfAllowed(this.validateAgentTool(user, isCallAgentAvailable));
|
|
315
|
+
registerIfAllowed(this.callAgentTool(user));
|
|
294
316
|
registerIfAllowed(this.publishAgentTool(user));
|
|
295
317
|
registerIfAllowed(this.unpublishAgentTool(user));
|
|
296
318
|
registerIfAllowed(this.revertAgentTool(user));
|
|
@@ -302,18 +324,20 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
302
324
|
registerIfAllowed(this.referenceTool(user));
|
|
303
325
|
if (allowedToolNames && !allowedToolNames.has('get_agent_builder_reference'))
|
|
304
326
|
return;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
327
|
+
registerResource({
|
|
328
|
+
name: 'agent-builder-reference',
|
|
329
|
+
uri: agent_reference_1.AGENT_BUILDER_REFERENCE_URI,
|
|
330
|
+
config: { description: 'Reference for creating and managing n8n Agents through MCP.' },
|
|
331
|
+
read: () => ({
|
|
332
|
+
contents: [
|
|
333
|
+
{
|
|
334
|
+
uri: agent_reference_1.AGENT_BUILDER_REFERENCE_URI,
|
|
335
|
+
mimeType: 'text/markdown',
|
|
336
|
+
text: agent_reference_1.AGENT_BUILDER_REFERENCE,
|
|
337
|
+
},
|
|
338
|
+
],
|
|
339
|
+
}),
|
|
340
|
+
});
|
|
317
341
|
}
|
|
318
342
|
searchAgentsTool(user) {
|
|
319
343
|
return {
|
|
@@ -481,7 +505,7 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
481
505
|
}),
|
|
482
506
|
};
|
|
483
507
|
}
|
|
484
|
-
validateAgentTool(user) {
|
|
508
|
+
validateAgentTool(user, isCallAgentAvailable) {
|
|
485
509
|
return {
|
|
486
510
|
name: 'validate_agent',
|
|
487
511
|
config: {
|
|
@@ -498,14 +522,50 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
498
522
|
handler: async ({ agentId }) => await this.run(user, 'validate_agent', { agentId }, async () => {
|
|
499
523
|
const agent = await this.resolveAgent(user, agentId);
|
|
500
524
|
await this.assertScope(user, agent.projectId, 'agent:read');
|
|
525
|
+
const validation = await this.validateAgent(user, agent);
|
|
526
|
+
const shouldSuggestCallAgent = validation.valid &&
|
|
527
|
+
isCallAgentAvailable &&
|
|
528
|
+
(await (0, check_access_1.userHasScopes)(user, ['agent:execute'], false, { projectId: agent.projectId }));
|
|
501
529
|
return {
|
|
502
530
|
ok: true,
|
|
503
|
-
...
|
|
531
|
+
...validation,
|
|
504
532
|
url: this.getAgentUrl(agent.projectId, agentId),
|
|
533
|
+
...(shouldSuggestCallAgent
|
|
534
|
+
? {
|
|
535
|
+
nextStep: {
|
|
536
|
+
tool: mcp_constants_1.MCP_CALL_AGENT_TOOL_NAME,
|
|
537
|
+
reason: 'Test the runnable draft before reporting it ready',
|
|
538
|
+
},
|
|
539
|
+
}
|
|
540
|
+
: {}),
|
|
505
541
|
};
|
|
506
542
|
}),
|
|
507
543
|
};
|
|
508
544
|
}
|
|
545
|
+
callAgentTool(user) {
|
|
546
|
+
return {
|
|
547
|
+
name: mcp_constants_1.MCP_CALL_AGENT_TOOL_NAME,
|
|
548
|
+
config: {
|
|
549
|
+
description: 'Test an Agent draft through built-in Preview chat. Start or continue a conversation with a message request, or resume one returned approval after the human decides. This uses real tools and credentials, so external side effects are possible.',
|
|
550
|
+
inputSchema: callAgentInput,
|
|
551
|
+
annotations: {
|
|
552
|
+
title: 'Call Agent',
|
|
553
|
+
readOnlyHint: false,
|
|
554
|
+
destructiveHint: true,
|
|
555
|
+
idempotentHint: false,
|
|
556
|
+
openWorldHint: true,
|
|
557
|
+
},
|
|
558
|
+
},
|
|
559
|
+
handler: async (input, extra) => {
|
|
560
|
+
const abortSignal = (0, is_record_1.isRecord)(extra) && extra.signal instanceof AbortSignal ? extra.signal : undefined;
|
|
561
|
+
return await this.run(user, mcp_constants_1.MCP_CALL_AGENT_TOOL_NAME, { agentId: input.agentId }, async () => {
|
|
562
|
+
const agent = await this.resolveAgent(user, input.agentId);
|
|
563
|
+
await this.assertScope(user, agent.projectId, 'agent:execute');
|
|
564
|
+
return await this.callAgent(user, agent, input.request, abortSignal);
|
|
565
|
+
});
|
|
566
|
+
},
|
|
567
|
+
};
|
|
568
|
+
}
|
|
509
569
|
publishAgentTool(user) {
|
|
510
570
|
return {
|
|
511
571
|
name: 'publish_agent',
|
|
@@ -813,6 +873,118 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
813
873
|
getAgentUrl(projectId, agentId) {
|
|
814
874
|
return `${this.urlService.getInstanceBaseUrl()}/projects/${encodeURIComponent(projectId)}/agents/${encodeURIComponent(agentId)}`;
|
|
815
875
|
}
|
|
876
|
+
async callAgent(user, agent, request, abortSignal) {
|
|
877
|
+
const { id: agentId, projectId } = agent;
|
|
878
|
+
const previewUrl = `${this.getAgentUrl(projectId, agentId)}/preview`;
|
|
879
|
+
try {
|
|
880
|
+
let result;
|
|
881
|
+
if (request.type === 'message') {
|
|
882
|
+
result = await this.agentTestRunService.executeDraftRun({
|
|
883
|
+
agentId,
|
|
884
|
+
projectId,
|
|
885
|
+
message: request.message,
|
|
886
|
+
sessionId: request.sessionId,
|
|
887
|
+
credentialProvider: this.credentialProvider(user, projectId),
|
|
888
|
+
user,
|
|
889
|
+
source: 'mcp',
|
|
890
|
+
abortSignal,
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
else {
|
|
894
|
+
result = await this.agentTestRunService.resumeDraftApproval({
|
|
895
|
+
agentId,
|
|
896
|
+
projectId,
|
|
897
|
+
continuation: request.continuation,
|
|
898
|
+
approved: request.approved,
|
|
899
|
+
user,
|
|
900
|
+
source: 'mcp',
|
|
901
|
+
abortSignal,
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
if (result.status === 'session_not_found') {
|
|
905
|
+
return {
|
|
906
|
+
ok: false,
|
|
907
|
+
status: 'error',
|
|
908
|
+
code: 'session_not_found',
|
|
909
|
+
message: 'Session not found.',
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
if (result.status === 'agent_misconfigured') {
|
|
913
|
+
return {
|
|
914
|
+
ok: false,
|
|
915
|
+
status: 'error',
|
|
916
|
+
code: 'agent_misconfigured',
|
|
917
|
+
message: "This agent isn't ready to run yet. Finish configuring it and try again.",
|
|
918
|
+
missing: result.missing,
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
if (result.status === 'completed')
|
|
922
|
+
return { ok: true, ...result };
|
|
923
|
+
const approvals = (0, agent_test_run_service_1.collectStandardApprovals)(result);
|
|
924
|
+
if (approvals) {
|
|
925
|
+
return {
|
|
926
|
+
ok: true,
|
|
927
|
+
status: 'suspended',
|
|
928
|
+
response: result.response,
|
|
929
|
+
sessionId: result.sessionId,
|
|
930
|
+
...(result.executionId ? { executionId: result.executionId } : {}),
|
|
931
|
+
approvals,
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
const canOpenPreview = await (0, check_access_1.userHasScopes)(user, ['project:read', 'agent:read'], false, {
|
|
935
|
+
projectId,
|
|
936
|
+
});
|
|
937
|
+
const previewAccessNote = canOpenPreview
|
|
938
|
+
? undefined
|
|
939
|
+
: 'Your access permits running this agent but not opening Preview. Share the Preview URL with a project member who has project and agent read access.';
|
|
940
|
+
const cancelled = await this.agentTestRunService.cancelSuspendedRuns({
|
|
941
|
+
agentId,
|
|
942
|
+
suspensions: result.suspensions,
|
|
943
|
+
userId: user.id,
|
|
944
|
+
});
|
|
945
|
+
if (!cancelled) {
|
|
946
|
+
return {
|
|
947
|
+
ok: false,
|
|
948
|
+
status: 'error',
|
|
949
|
+
code: 'cancellation_failed',
|
|
950
|
+
message: 'This test needs approval, but its suspended run could not be cancelled. Open Preview before continuing this session.',
|
|
951
|
+
sessionId: result.sessionId,
|
|
952
|
+
previewUrl,
|
|
953
|
+
...(previewAccessNote ? { previewAccessNote } : {}),
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
return {
|
|
957
|
+
ok: true,
|
|
958
|
+
status: 'approval_required',
|
|
959
|
+
response: result.response,
|
|
960
|
+
sessionId: result.sessionId,
|
|
961
|
+
...(result.executionId ? { executionId: result.executionId } : {}),
|
|
962
|
+
suspensions: result.suspensions.map(({ runId, toolCallId, toolName }) => ({
|
|
963
|
+
runId,
|
|
964
|
+
toolCallId,
|
|
965
|
+
toolName,
|
|
966
|
+
})),
|
|
967
|
+
previewUrl,
|
|
968
|
+
...(previewAccessNote ? { previewAccessNote } : {}),
|
|
969
|
+
};
|
|
970
|
+
}
|
|
971
|
+
catch (error) {
|
|
972
|
+
if (error instanceof agent_test_run_service_1.InvalidAgentTestRunCheckpointError) {
|
|
973
|
+
return {
|
|
974
|
+
ok: false,
|
|
975
|
+
status: 'error',
|
|
976
|
+
code: error.code,
|
|
977
|
+
message: error.message,
|
|
978
|
+
};
|
|
979
|
+
}
|
|
980
|
+
return {
|
|
981
|
+
ok: false,
|
|
982
|
+
status: 'error',
|
|
983
|
+
code: 'execution_failed',
|
|
984
|
+
message: error instanceof Error ? error.message : 'Agent test run failed.',
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
}
|
|
816
988
|
async applyMutation(user, input, config, projectId) {
|
|
817
989
|
const { agentId, operation } = input;
|
|
818
990
|
const telemetryContext = { user, modifiedBy: 'mcp' };
|
|
@@ -1041,25 +1213,16 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
1041
1213
|
await this.assertScope(user, projectId, 'agent:update');
|
|
1042
1214
|
return input.action === 'disconnect'
|
|
1043
1215
|
? await this.disconnectIntegration(user, input, agent)
|
|
1044
|
-
: await this.connectIntegration(user, input, agent
|
|
1216
|
+
: await this.connectIntegration(user, input, agent);
|
|
1045
1217
|
}
|
|
1046
1218
|
async disconnectIntegration(user, input, agent) {
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1219
|
+
const { savedAgent: saved } = await this.integrationManagementService.disconnect({
|
|
1220
|
+
agent,
|
|
1221
|
+
user,
|
|
1049
1222
|
type: input.type,
|
|
1050
1223
|
credentialId: input.credentialId,
|
|
1224
|
+
modifiedBy: 'mcp',
|
|
1051
1225
|
});
|
|
1052
|
-
const integration = persisted ?? (parsed.success ? parsed.data : undefined);
|
|
1053
|
-
if (integration) {
|
|
1054
|
-
await this.chatIntegrationService.disconnectChannel(input.agentId, integration);
|
|
1055
|
-
}
|
|
1056
|
-
else {
|
|
1057
|
-
await this.chatIntegrationService.disconnect(input.agentId, {
|
|
1058
|
-
type: input.type,
|
|
1059
|
-
credentialId: input.credentialId,
|
|
1060
|
-
});
|
|
1061
|
-
}
|
|
1062
|
-
const saved = await this.integrationPersistenceService.removeCredentialIntegration(agent, input.type, input.credentialId, { user, modifiedBy: 'mcp', broadcast: false });
|
|
1063
1226
|
return {
|
|
1064
1227
|
ok: true,
|
|
1065
1228
|
agentId: input.agentId,
|
|
@@ -1070,24 +1233,18 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
1070
1233
|
configHash: (0, agent_config_hash_1.getAgentConfigHash)(this.configFromEntity(saved)),
|
|
1071
1234
|
};
|
|
1072
1235
|
}
|
|
1073
|
-
async connectIntegration(user, input, agent
|
|
1236
|
+
async connectIntegration(user, input, agent) {
|
|
1074
1237
|
const candidate = {
|
|
1075
1238
|
type: input.type,
|
|
1076
1239
|
credentialId: input.credentialId,
|
|
1077
1240
|
...(input.settings ? { settings: input.settings } : {}),
|
|
1078
1241
|
};
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
}
|
|
1085
|
-
const credential = await this.requireAccessibleCredential(this.credentialProvider(user, projectId), input.credentialId);
|
|
1086
|
-
const implementation = this.chatIntegrationRegistry.require(parsed.data.type);
|
|
1087
|
-
if (!implementation.credentialTypes.includes(credential.type)) {
|
|
1088
|
-
throw new n8n_workflow_1.UserError(`${implementation.displayLabel} integrations do not support ${credential.type} credentials`);
|
|
1089
|
-
}
|
|
1090
|
-
const saved = await this.integrationPersistenceService.saveCredentialIntegration(agent, parsed.data, { user, modifiedBy: 'mcp', broadcast: false });
|
|
1242
|
+
const { savedAgent: saved } = await this.integrationManagementService.connect({
|
|
1243
|
+
agent,
|
|
1244
|
+
user,
|
|
1245
|
+
integration: candidate,
|
|
1246
|
+
modifiedBy: 'mcp',
|
|
1247
|
+
});
|
|
1091
1248
|
const result = {
|
|
1092
1249
|
ok: true,
|
|
1093
1250
|
agentId: input.agentId,
|
|
@@ -1099,8 +1256,6 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
1099
1256
|
};
|
|
1100
1257
|
if (saved.activeVersionId === null)
|
|
1101
1258
|
return { ...result, connected: false };
|
|
1102
|
-
await this.chatIntegrationService.connect(input.agentId, parsed.data, projectId);
|
|
1103
|
-
await this.chatIntegrationService.broadcastIntegrationChange(input.agentId, parsed.data, 'connect');
|
|
1104
1259
|
return {
|
|
1105
1260
|
...result,
|
|
1106
1261
|
connected: true,
|
|
@@ -1152,6 +1307,6 @@ let McpAgentToolsService = class McpAgentToolsService {
|
|
|
1152
1307
|
exports.McpAgentToolsService = McpAgentToolsService;
|
|
1153
1308
|
exports.McpAgentToolsService = McpAgentToolsService = __decorate([
|
|
1154
1309
|
(0, di_1.Service)(),
|
|
1155
|
-
__metadata("design:paramtypes", [telemetry_1.Telemetry, credentials_service_1.CredentialsService, agents_service_1.AgentsService, agent_config_service_1.AgentConfigService, agent_validation_service_1.AgentValidationService, agent_publish_service_1.AgentPublishService, agent_skills_service_1.AgentSkillsService, agent_task_service_1.AgentTaskService, agent_custom_tools_service_1.AgentCustomToolsService, agent_secure_runtime_1.AgentSecureRuntime, agent_integration_persistence_service_1.AgentIntegrationPersistenceService,
|
|
1310
|
+
__metadata("design:paramtypes", [telemetry_1.Telemetry, credentials_service_1.CredentialsService, agents_service_1.AgentsService, agent_config_service_1.AgentConfigService, agent_validation_service_1.AgentValidationService, agent_publish_service_1.AgentPublishService, agent_skills_service_1.AgentSkillsService, agent_task_service_1.AgentTaskService, agent_test_run_service_1.AgentTestRunService, agent_custom_tools_service_1.AgentCustomToolsService, agent_secure_runtime_1.AgentSecureRuntime, agent_integration_persistence_service_1.AgentIntegrationPersistenceService, agent_integration_management_service_1.AgentIntegrationManagementService, agent_model_catalog_service_1.AgentModelCatalogService, attachable_workflows_service_1.AttachableWorkflowsService, mcp_registry_service_1.McpRegistryService, node_types_1.NodeTypes, oauth_service_1.OauthService, backend_network_1.OutboundHttp, config_1.SsrfProtectionConfig, backend_network_1.SsrfProtectionService, url_service_1.UrlService, project_scope_service_1.ProjectScopeService])
|
|
1156
1311
|
], McpAgentToolsService);
|
|
1157
1312
|
//# sourceMappingURL=agent-tools.service.js.map
|