n8n 2.34.4 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-workflow-manager.js +2 -14
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/agent-library-bundle.js +6 -6
- package/dist/build.tsbuildinfo +1 -1
- package/dist/controllers/ai.controller.js +3 -0
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +0 -1
- package/dist/controllers/role.controller.js +6 -14
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +1 -1
- package/dist/credentials/credentials.controller.js +7 -1
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +2 -1
- package/dist/credentials/credentials.service.js +24 -0
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.js +4 -7
- package/dist/credentials-helper.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +5 -0
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +9 -0
- package/dist/events/relays/telemetry.event-relay.d.ts +4 -2
- package/dist/events/relays/telemetry.event-relay.js +23 -7
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execute-error-workflow.js +19 -5
- package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-persistence.d.ts +6 -4
- package/dist/executions/execution-persistence.js +7 -14
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +31 -2
- package/dist/executions/execution.service.js +108 -1
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/middlewares/body-parser.js +3 -2
- package/dist/middlewares/body-parser.js.map +1 -1
- package/dist/middlewares/cors.js +1 -1
- package/dist/middlewares/cors.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-rating.service.d.ts +12 -15
- package/dist/modules/agent-evals/agent-eval-rating.service.js +33 -46
- package/dist/modules/agent-evals/agent-eval-rating.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-record-mappers.d.ts +3 -2
- package/dist/modules/agent-evals/agent-eval-record-mappers.js +13 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-runner.service.js +15 -7
- package/dist/modules/agent-evals/agent-eval-runner.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval.service.d.ts +8 -3
- package/dist/modules/agent-evals/agent-eval.service.js +6 -6
- package/dist/modules/agent-evals/agent-eval.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals-required-modules.js +2 -2
- package/dist/modules/agent-evals/agent-evals-required-modules.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals.controller.d.ts +12 -4
- package/dist/modules/agent-evals/agent-evals.controller.js +50 -9
- package/dist/modules/agent-evals/agent-evals.controller.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.d.ts +3 -5
- package/dist/modules/agents/agent-chat.controller.js +19 -25
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-config.service.d.ts +5 -1
- package/dist/modules/agents/agent-config.service.js +10 -3
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-credential-index.listener.d.ts +11 -0
- package/dist/modules/agents/agent-credential-index.listener.js +55 -0
- package/dist/modules/agents/agent-credential-index.listener.js.map +1 -0
- package/dist/modules/agents/agent-credential-index.service.d.ts +14 -0
- package/dist/modules/agents/agent-credential-index.service.js +57 -0
- package/dist/modules/agents/agent-credential-index.service.js.map +1 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +5 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.js +89 -23
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.d.ts +20 -0
- package/dist/modules/agents/agent-execution-update-broadcaster.js +65 -0
- package/dist/modules/agents/agent-execution-update-broadcaster.js.map +1 -0
- package/dist/modules/agents/agent-execution.service.d.ts +30 -4
- package/dist/modules/agents/agent-execution.service.js +217 -46
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +33 -0
- package/dist/modules/agents/agent-integration-management.service.js +80 -0
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -0
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +3 -1
- package/dist/modules/agents/agent-integration-persistence.service.js +6 -2
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +4 -24
- package/dist/modules/agents/agent-integrations.controller.js +28 -114
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +11 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js +63 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -0
- package/dist/modules/agents/agent-model-catalog.service.d.ts +1 -0
- package/dist/modules/agents/agent-model-catalog.service.js +37 -8
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +3 -1
- package/dist/modules/agents/agent-publish.service.js +8 -2
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-run-tracing.service.d.ts +1 -0
- package/dist/modules/agents/agent-run-tracing.service.js +4 -1
- package/dist/modules/agents/agent-run-tracing.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +3 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +14 -8
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-slack-integrations.controller.d.ts +23 -0
- package/dist/modules/agents/agent-slack-integrations.controller.js +98 -0
- package/dist/modules/agents/agent-slack-integrations.controller.js.map +1 -0
- package/dist/modules/agents/agent-test-run.service.d.ts +134 -0
- package/dist/modules/agents/agent-test-run.service.js +240 -0
- package/dist/modules/agents/agent-test-run.service.js.map +1 -0
- package/dist/modules/agents/agent-validation.service.d.ts +1 -0
- package/dist/modules/agents/agent-validation.service.js +32 -13
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +5 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +137 -64
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +8 -0
- package/dist/modules/agents/agents.module.d.ts +3 -1
- package/dist/modules/agents/agents.module.js +35 -1
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +4 -2
- package/dist/modules/agents/agents.service.js +6 -2
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/attachable-workflows.service.d.ts +1 -0
- package/dist/modules/agents/attachable-workflows.service.js +2 -1
- package/dist/modules/agents/attachable-workflows.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +2 -2
- package/dist/modules/agents/builder/agents-builder-prompts.js +26 -7
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js +130 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +16 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +69 -22
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +4 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +68 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -0
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +5 -2
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +26 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-credential-dependency.entity.d.ts +9 -0
- package/dist/modules/agents/entities/agent-credential-dependency.entity.js +40 -0
- package/dist/modules/agents/entities/agent-credential-dependency.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.js +2 -1
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +7 -1
- package/dist/modules/agents/execution-recorder.js +64 -8
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +6 -2
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +24 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +3 -2
- package/dist/modules/agents/integrations/agent-chat-bridge.js +30 -13
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +3 -2
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +25 -12
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +38 -6
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.js +13 -6
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +7 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/callback-store.d.ts +13 -4
- package/dist/modules/agents/integrations/callback-store.js +44 -18
- package/dist/modules/agents/integrations/callback-store.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +7 -3
- package/dist/modules/agents/integrations/chat-integration.service.js +59 -22
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +1 -1
- package/dist/modules/agents/integrations/component-mapper.js +1 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/esm-loader.d.ts +1 -0
- package/dist/modules/agents/integrations/esm-loader.js +4 -0
- package/dist/modules/agents/integrations/esm-loader.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +2 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +74 -20
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js +35 -2
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +10 -5
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-schema.js +8 -2
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-memory.js +6 -7
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/discord-gateway.d.ts +32 -0
- package/dist/modules/agents/integrations/platforms/discord-gateway.js +138 -0
- package/dist/modules/agents/integrations/platforms/discord-gateway.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +73 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.js +364 -0
- package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.d.ts +64 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.js +176 -0
- package/dist/modules/agents/integrations/platforms/discord-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{slack-bridge-behavior.d.ts → slack/slack-bridge-behavior.d.ts} +3 -3
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/{slack-integration.d.ts → slack/slack-integration.d.ts} +11 -6
- package/dist/modules/agents/integrations/platforms/{slack-integration.js → slack/slack-integration.js} +32 -23
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.d.ts +35 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.js +150 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-manual-setup.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +36 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +193 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.d.ts +10 -0
- package/dist/modules/agents/integrations/platforms/{slack-operations.js → slack/slack-operations.js} +1 -57
- package/dist/modules/agents/integrations/platforms/slack/slack-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js +6 -36
- package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +3 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +14 -5
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/typing-indicator.d.ts +9 -0
- package/dist/modules/agents/integrations/platforms/typing-indicator.js +42 -0
- package/dist/modules/agents/integrations/platforms/typing-indicator.js.map +1 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js +11 -0
- package/dist/modules/agents/integrations/recording/recording-adapter.js.map +1 -1
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.d.ts +9 -0
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.js +34 -0
- package/dist/modules/agents/json-config/node-tool-ai-gateway.service.js.map +1 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.d.ts +4 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js +152 -0
- package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js.map +1 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.d.ts +12 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js +92 -0
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +20 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent.repository.js +18 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +2 -0
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +69 -5
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +5 -1
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +7 -4
- package/dist/modules/agents/tools/workflow-tool-factory.js +86 -41
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +14 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +50 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -0
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.d.ts +3 -3
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.js +28 -23
- package/dist/modules/agents/tools/workflow-tool-workflow-resolver.js.map +1 -1
- package/dist/modules/agents/utils/extract-agent-credential-ids.d.ts +1 -0
- package/dist/modules/agents/utils/extract-agent-credential-ids.js +41 -0
- package/dist/modules/agents/utils/extract-agent-credential-ids.js.map +1 -0
- package/dist/modules/agents/utils/node-tool-validation.js +2 -2
- package/dist/modules/agents/utils/node-tool-validation.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.d.ts +6 -2
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +26 -3
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -1
- package/dist/modules/data-table/data-table-permissions.d.ts +5 -0
- package/dist/modules/data-table/data-table-permissions.js +14 -0
- package/dist/modules/data-table/data-table-permissions.js.map +1 -0
- package/dist/modules/data-table/data-table-proxy.service.js +2 -0
- package/dist/modules/data-table/data-table-proxy.service.js.map +1 -1
- package/dist/modules/data-table/data-table.controller.d.ts +1 -1
- package/dist/modules/data-table/data-table.controller.js +7 -19
- package/dist/modules/data-table/data-table.controller.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +3 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js +8 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.d.ts +1 -0
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js +100 -3
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/azure-key-vault.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/azure-key-vault/types.d.ts +4 -0
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +2 -1
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +11 -5
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +6 -3
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +31 -11
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +1 -1
- package/dist/modules/insights/insights.controller.js +13 -7
- package/dist/modules/insights/insights.controller.js.map +1 -1
- package/dist/modules/insights/insights.service.d.ts +6 -3
- package/dist/modules/insights/insights.service.js +6 -3
- package/dist/modules/insights/insights.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js +10 -3
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +1 -0
- package/dist/modules/instance-ai/eval/execution.service.js +37 -3
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +5 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js +67 -9
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.d.ts +15 -0
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.js +130 -0
- package/dist/modules/instance-ai/instance-ai-model-catalog.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +17 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +234 -24
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.d.ts +20 -0
- package/dist/modules/instance-ai/instance-ai-verification.service.js +232 -0
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +78 -4
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai.controller.js +84 -2
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -0
- package/dist/modules/instance-ai/instance-ai.module.js +3 -7
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +5 -1
- package/dist/modules/instance-ai/instance-ai.service.js +231 -60
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.d.ts +0 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +0 -19
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +1 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +37 -2
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +6 -6
- package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +1 -1
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +9 -0
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +3 -4
- package/dist/modules/mcp/mcp-protected-resource.js +4 -4
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.js +2 -0
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +4 -0
- package/dist/modules/mcp/mcp.constants.js +5 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +14 -14
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +4 -3
- package/dist/modules/mcp/mcp.service.js +49 -34
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +31 -5
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/mcp.utils.d.ts +1 -0
- package/dist/modules/mcp/mcp.utils.js +22 -5
- package/dist/modules/mcp/mcp.utils.js.map +1 -1
- package/dist/modules/mcp/tool-schema.util.d.ts +3 -0
- package/dist/modules/mcp/tool-schema.util.js +32 -0
- package/dist/modules/mcp/tool-schema.util.js.map +1 -0
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +17 -6
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +9 -8
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +207 -52
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +4 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +60 -23
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +81 -40
- package/dist/modules/mcp/tools/schemas.js +31 -11
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +1 -9
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js +2 -7
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +2 -11
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js +2 -1
- package/dist/modules/mcp/tools/workflow-builder/sdk-reference-content.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js +17 -5
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +2 -0
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-gates.d.ts +3 -4
- package/dist/modules/n8n-packages/engine/import-gates.js +10 -8
- package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +6 -2
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +36 -8
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -0
- package/dist/modules/n8n-packages/engine/import-result.js +13 -2
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js +8 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +3 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +29 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/package-layout.d.ts +18 -1
- package/dist/modules/n8n-packages/engine/package-layout.js +36 -7
- package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +28 -16
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +12 -12
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.js +12 -0
- package/dist/modules/n8n-packages/entities/project/project-conflict-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +13 -3
- package/dist/modules/n8n-packages/entities/project/project-importer.d.ts +3 -3
- package/dist/modules/n8n-packages/entities/project/project-importer.js +58 -29
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.d.ts +4 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js +10 -3
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-importer.d.ts +1 -4
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js +22 -10
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.types.d.ts +13 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js +36 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-importer.d.ts +6 -5
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js +85 -21
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js +8 -3
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +18 -23
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +21 -2
- package/dist/modules/n8n-packages/entities/variable/variable.types.js +15 -0
- package/dist/modules/n8n-packages/entities/variable/variable.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.d.ts +6 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +33 -11
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +35 -3
- package/dist/modules/n8n-packages/n8n-packages.types.js +12 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +0 -11
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +0 -10
- package/dist/modules/n8n-packages/spec/requirements.schema.js +0 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.d.ts +3 -3
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.js +3 -2
- package/dist/modules/n8n-packages/spec/serialized/variable.schema.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +2 -2
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.d.ts +2 -0
- package/dist/modules/otel/execution-level-tracer.js +4 -0
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.d.ts +3 -1
- package/dist/modules/redaction/redaction-context-hook.js +9 -2
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +4 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +26 -6
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.d.ts +8 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.js +76 -18
- package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.d.ts +16 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js +95 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.d.ts +15 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.js +52 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-eligibility.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +3 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +10 -4
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +9 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +71 -40
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +3 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.js +20 -13
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/oauth/dcr-managed-fields.d.ts +6 -0
- package/dist/oauth/dcr-managed-fields.js +13 -0
- package/dist/oauth/dcr-managed-fields.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +1 -0
- package/dist/oauth/oauth.service.js +24 -25
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/posthog/index.d.ts +2 -0
- package/dist/posthog/index.js +19 -0
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.d.ts +1 -0
- package/dist/public-api/public-api-controller.registry.js +36 -35
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +38 -0
- package/dist/public-api/public-api-route-resolver.js +136 -0
- package/dist/public-api/public-api-route-resolver.js.map +1 -0
- package/dist/public-api/types.d.ts +3 -6
- package/dist/public-api/v1/controllers/index.d.ts +1 -0
- package/dist/public-api/v1/controllers/index.js +1 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +11 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js +65 -0
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/tags.public.controller.js +9 -2
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +10 -2
- package/dist/public-api/v1/controllers/workflows.public.controller.js +132 -4
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js +7 -15
- package/dist/public-api/v1/handlers/data-tables/data-tables.rows.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/decorator-routed.handler.d.ts +2 -0
- package/dist/public-api/v1/handlers/decorator-routed.handler.js +10 -0
- package/dist/public-api/v1/handlers/decorator-routed.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/discover/discover.service.js +54 -49
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +25 -65
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +2 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +44 -122
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +18 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +160 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/generate.d.ts +25 -0
- package/dist/public-api/v1/openapi-gen/generate.js +149 -0
- package/dist/public-api/v1/openapi-gen/generate.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.d.ts +1 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.js +6 -0
- package/dist/public-api/v1/openapi-gen/zod-extend.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +625 -166
- package/dist/public-api/v1/shared/middlewares/global.middleware.d.ts +1 -3
- package/dist/public-api/v1/shared/middlewares/global.middleware.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +1 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/{modules/mcp/tools/workflow-builder → services}/ai-gateway-eligibility.d.ts +1 -0
- package/dist/{modules/mcp/tools/workflow-builder → services}/ai-gateway-eligibility.js +7 -1
- package/dist/services/ai-gateway-eligibility.js.map +1 -0
- package/dist/services/ai-gateway.service.d.ts +2 -0
- package/dist/services/ai-gateway.service.js +17 -3
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/cache/cache.service.d.ts +2 -0
- package/dist/services/cache/cache.service.js +21 -0
- package/dist/services/cache/cache.service.js.map +1 -1
- package/dist/services/cache/redis.cache-manager.d.ts +1 -0
- package/dist/services/cache/redis.cache-manager.js +6 -0
- package/dist/services/cache/redis.cache-manager.js.map +1 -1
- package/dist/services/credentials-tester.service.d.ts +5 -1
- package/dist/services/credentials-tester.service.js +9 -3
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/free-ai-credits.service.js +1 -1
- package/dist/services/free-ai-credits.service.js.map +1 -1
- package/dist/services/frontend.service.js +3 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +13 -0
- package/dist/services/node-resource-explorer.service.js +117 -0
- package/dist/services/node-resource-explorer.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +1 -1
- package/dist/services/project.service.ee.d.ts +3 -3
- package/dist/services/project.service.ee.js +4 -7
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/role-authorization.d.ts +3 -0
- package/dist/services/role-authorization.js +14 -0
- package/dist/services/role-authorization.js.map +1 -0
- package/dist/services/tag.service.d.ts +5 -2
- package/dist/services/tag.service.js +9 -2
- package/dist/services/tag.service.js.map +1 -1
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.d.ts +1 -0
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.js +2 -2
- package/dist/task-runners/task-broker/auth/task-broker-auth.controller.js.map +1 -1
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.d.ts +6 -2
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.js +8 -4
- package/dist/task-runners/task-broker/auth/task-broker-auth.service.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-server.d.ts +1 -0
- package/dist/task-runners/task-broker/task-broker-server.js +13 -3
- package/dist/task-runners/task-broker/task-broker-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker-ws-server.d.ts +1 -0
- package/dist/task-runners/task-broker/task-broker-ws-server.js +8 -5
- package/dist/task-runners/task-broker/task-broker-ws-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.js +2 -9
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/task-runners/task-runner-lifecycle-events.d.ts +0 -1
- package/dist/task-runners/task-runner-process-base.d.ts +2 -2
- package/dist/task-runners/task-runner-process-base.js +14 -10
- package/dist/task-runners/task-runner-process-base.js.map +1 -1
- package/dist/task-runners/task-runner-process-js.d.ts +1 -2
- package/dist/task-runners/task-runner-process-js.js +4 -4
- package/dist/task-runners/task-runner-process-js.js.map +1 -1
- package/dist/task-runners/task-runner-process-py.d.ts +1 -2
- package/dist/task-runners/task-runner-process-py.js +2 -2
- package/dist/task-runners/task-runner-process-py.js.map +1 -1
- package/dist/utils/node-definition-dirs.d.ts +1 -0
- package/dist/utils/node-definition-dirs.js +24 -0
- package/dist/utils/node-definition-dirs.js.map +1 -0
- package/dist/webhooks/constants.d.ts +1 -0
- package/dist/webhooks/constants.js +2 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +4 -2
- package/dist/webhooks/live-webhooks.js +25 -4
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-execution-context.d.ts +5 -2
- package/dist/webhooks/webhook-execution-context.js +10 -0
- package/dist/webhooks/webhook-execution-context.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +9 -8
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +5 -1
- package/dist/webhooks/webhook.service.js +52 -9
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +3 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.js +43 -38
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +0 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +1 -16
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +20 -31
- package/dist/workflows/workflow-finder.service.js +42 -9
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +14 -0
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +35 -0
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +1 -0
- package/dist/workflows/workflow-sharing.service.d.ts +4 -1
- package/dist/workflows/workflow-sharing.service.js +14 -2
- package/dist/workflows/workflow-sharing.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +9 -6
- package/dist/workflows/workflow.service.ee.d.ts +3 -3
- package/dist/workflows/workflow.service.ee.js +20 -7
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +33 -9
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +43 -39
- package/templates/form-shell.handlebars +418 -0
- package/templates/form-trigger.handlebars +30 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.d.ts +0 -17
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +0 -1
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.d.ts +0 -48
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js +0 -42
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js.map +0 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +0 -54
- package/dist/modules/agents/integrations/slack-app-setup.service.js +0 -326
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +0 -1
- package/dist/modules/mcp/tools/workflow-builder/ai-gateway-eligibility.js.map +0 -1
- package/dist/public-api/v1/handlers/executions/executions.service.d.ts +0 -14
- package/dist/public-api/v1/handlers/executions/executions.service.js +0 -49
- package/dist/public-api/v1/handlers/executions/executions.service.js.map +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.d.ts +0 -13
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +0 -98
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +0 -1
- /package/dist/modules/agents/integrations/platforms/{slack-bridge-behavior.js → slack/slack-bridge-behavior.js} +0 -0
|
@@ -1,41 +1,21 @@
|
|
|
1
|
-
import { AgentDisconnectIntegrationDto, type AgentIntegrationStatusResponse
|
|
1
|
+
import { AgentDisconnectIntegrationDto, type AgentIntegrationStatusResponse } from '@n8n/api-types';
|
|
2
2
|
import type { AuthenticatedRequest } from '@n8n/db';
|
|
3
3
|
import type { Request, Response } from 'express';
|
|
4
|
-
import {
|
|
5
|
-
import { AgentIntegrationPersistenceService } from './agent-integration-persistence.service';
|
|
4
|
+
import { AgentIntegrationManagementService } from './agent-integration-management.service';
|
|
6
5
|
import { ChatIntegrationRegistry } from './integrations/agent-chat-integration';
|
|
7
6
|
import { ChatIntegrationService } from './integrations/chat-integration.service';
|
|
8
|
-
import { SlackAppSetupService } from './integrations/slack-app-setup.service';
|
|
9
7
|
import { AgentRepository } from './repositories/agent.repository';
|
|
10
8
|
export declare class AgentIntegrationsController {
|
|
11
|
-
private readonly
|
|
12
|
-
private readonly credentialsService;
|
|
9
|
+
private readonly integrationManagementService;
|
|
13
10
|
private readonly chatIntegrationService;
|
|
14
11
|
private readonly agentRepository;
|
|
15
12
|
private readonly chatIntegrationRegistry;
|
|
16
|
-
|
|
17
|
-
constructor(agentIntegrationPersistenceService: AgentIntegrationPersistenceService, credentialsService: CredentialsService, chatIntegrationService: ChatIntegrationService, agentRepository: AgentRepository, chatIntegrationRegistry: ChatIntegrationRegistry, slackAppSetupService: SlackAppSetupService);
|
|
18
|
-
private validateIntegration;
|
|
13
|
+
constructor(integrationManagementService: AgentIntegrationManagementService, chatIntegrationService: ChatIntegrationService, agentRepository: AgentRepository, chatIntegrationRegistry: ChatIntegrationRegistry);
|
|
19
14
|
connectIntegration(req: AuthenticatedRequest<{
|
|
20
15
|
projectId: string;
|
|
21
16
|
}>, _res: Response, agentId: string): Promise<{
|
|
22
17
|
status: string;
|
|
23
18
|
}>;
|
|
24
|
-
createSlackApp(req: AuthenticatedRequest<{
|
|
25
|
-
projectId: string;
|
|
26
|
-
}>, _res: Response, agentId: string, payload: CreateSlackAgentAppDto): Promise<CreateSlackAgentAppResponse>;
|
|
27
|
-
getSlackAppManifest(req: AuthenticatedRequest<{
|
|
28
|
-
projectId: string;
|
|
29
|
-
}>, _res: Response, agentId: string): Promise<SlackAgentAppManifestResponse>;
|
|
30
|
-
handleSlackAppOAuthCallback(req: Request<{
|
|
31
|
-
projectId: string;
|
|
32
|
-
agentId: string;
|
|
33
|
-
}, unknown, unknown, {
|
|
34
|
-
code?: string;
|
|
35
|
-
state?: string;
|
|
36
|
-
error?: string;
|
|
37
|
-
error_description?: string;
|
|
38
|
-
}>, res: Response, agentId: string): Promise<void>;
|
|
39
19
|
disconnectIntegration(req: AuthenticatedRequest<{
|
|
40
20
|
projectId: string;
|
|
41
21
|
}>, _res: Response, agentId: string, payload: AgentDisconnectIntegrationDto): Promise<{
|
|
@@ -15,116 +15,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.AgentIntegrationsController = void 0;
|
|
16
16
|
const api_types_1 = require("@n8n/api-types");
|
|
17
17
|
const decorators_1 = require("@n8n/decorators");
|
|
18
|
-
const credentials_service_1 = require("../../credentials/credentials.service");
|
|
19
|
-
const bad_request_error_1 = require("../../errors/response-errors/bad-request.error");
|
|
20
18
|
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
21
|
-
const
|
|
19
|
+
const agent_integration_management_service_1 = require("./agent-integration-management.service");
|
|
22
20
|
const agent_chat_integration_1 = require("./integrations/agent-chat-integration");
|
|
23
21
|
const chat_integration_service_1 = require("./integrations/chat-integration.service");
|
|
24
22
|
const channel_integration_recorder_1 = require("./integrations/recording/channel-integration-recorder");
|
|
25
|
-
const slack_app_setup_service_1 = require("./integrations/slack-app-setup.service");
|
|
26
23
|
const agent_repository_1 = require("./repositories/agent.repository");
|
|
27
24
|
let AgentIntegrationsController = class AgentIntegrationsController {
|
|
28
|
-
constructor(
|
|
29
|
-
this.
|
|
30
|
-
this.credentialsService = credentialsService;
|
|
25
|
+
constructor(integrationManagementService, chatIntegrationService, agentRepository, chatIntegrationRegistry) {
|
|
26
|
+
this.integrationManagementService = integrationManagementService;
|
|
31
27
|
this.chatIntegrationService = chatIntegrationService;
|
|
32
28
|
this.agentRepository = agentRepository;
|
|
33
29
|
this.chatIntegrationRegistry = chatIntegrationRegistry;
|
|
34
|
-
this.slackAppSetupService = slackAppSetupService;
|
|
35
|
-
}
|
|
36
|
-
async validateIntegration(dto) {
|
|
37
|
-
const integrationParseResult = await api_types_1.AgentIntegrationSchema.safeParseAsync(dto);
|
|
38
|
-
if (!integrationParseResult.success) {
|
|
39
|
-
throw new bad_request_error_1.BadRequestError(integrationParseResult.error.message);
|
|
40
|
-
}
|
|
41
|
-
const integration = integrationParseResult.data;
|
|
42
|
-
if (integration.type === 'telegram' && !integration.settings) {
|
|
43
|
-
throw new bad_request_error_1.BadRequestError('Telegram integration settings are required');
|
|
44
|
-
}
|
|
45
|
-
return integration;
|
|
46
30
|
}
|
|
47
31
|
async connectIntegration(req, _res, agentId) {
|
|
48
|
-
|
|
49
|
-
const { credentialId } = integration;
|
|
32
|
+
await this.integrationManagementService.validateConfig(req.body);
|
|
50
33
|
const agent = await this.agentRepository.findByIdAndProjectId(agentId, req.params.projectId);
|
|
51
34
|
if (!agent)
|
|
52
35
|
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if (!integrationImpl.credentialTypes.includes(credential.type)) {
|
|
59
|
-
throw new bad_request_error_1.BadRequestError(`${integrationImpl.displayLabel} integrations do not support ${credential.type} credentials`);
|
|
60
|
-
}
|
|
61
|
-
const savedAgent = await this.agentIntegrationPersistenceService.saveCredentialIntegration(agent, integration, { user: req.user, modifiedBy: 'user', broadcast: false });
|
|
36
|
+
const { savedAgent } = await this.integrationManagementService.connect({
|
|
37
|
+
agent,
|
|
38
|
+
user: req.user,
|
|
39
|
+
integration: req.body,
|
|
40
|
+
});
|
|
62
41
|
if (savedAgent.activeVersionId === null)
|
|
63
42
|
return { status: 'configured' };
|
|
64
|
-
await this.chatIntegrationService.connect(agentId, integration, agent.projectId);
|
|
65
|
-
await this.chatIntegrationService.broadcastIntegrationChange(agentId, integration, 'connect');
|
|
66
43
|
return { status: 'connected' };
|
|
67
44
|
}
|
|
68
|
-
async createSlackApp(req, _res, agentId, payload) {
|
|
69
|
-
return await this.slackAppSetupService.createApp({
|
|
70
|
-
projectId: req.params.projectId,
|
|
71
|
-
agentId,
|
|
72
|
-
appConfigurationToken: payload.appConfigurationToken,
|
|
73
|
-
user: req.user,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
async getSlackAppManifest(req, _res, agentId) {
|
|
77
|
-
return await this.slackAppSetupService.getManualManifest({
|
|
78
|
-
projectId: req.params.projectId,
|
|
79
|
-
agentId,
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
async handleSlackAppOAuthCallback(req, res, agentId) {
|
|
83
|
-
const { code, state, error, error_description: errorDescription } = req.query;
|
|
84
|
-
if (error) {
|
|
85
|
-
return res.render('oauth-error-callback', {
|
|
86
|
-
error: {
|
|
87
|
-
message: error,
|
|
88
|
-
...(errorDescription ? { reason: errorDescription } : {}),
|
|
89
|
-
},
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
if (!code || !state) {
|
|
93
|
-
return res.render('oauth-error-callback', {
|
|
94
|
-
error: { message: 'Insufficient parameters for Slack app setup callback.' },
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
try {
|
|
98
|
-
await this.slackAppSetupService.completeInstall({
|
|
99
|
-
projectId: req.params.projectId,
|
|
100
|
-
agentId,
|
|
101
|
-
code,
|
|
102
|
-
state,
|
|
103
|
-
});
|
|
104
|
-
return res.render('oauth-callback');
|
|
105
|
-
}
|
|
106
|
-
catch (callbackError) {
|
|
107
|
-
const message = callbackError instanceof Error ? callbackError.message : 'Slack app setup failed';
|
|
108
|
-
return res.render('oauth-error-callback', {
|
|
109
|
-
error: { message },
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
45
|
async disconnectIntegration(req, _res, agentId, payload) {
|
|
114
46
|
const { type, credentialId } = payload;
|
|
115
47
|
const agent = await this.agentRepository.findByIdAndProjectId(agentId, req.params.projectId);
|
|
116
48
|
if (!agent)
|
|
117
49
|
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
await this.chatIntegrationService.disconnect(agentId, { type, credentialId });
|
|
126
|
-
}
|
|
127
|
-
await this.agentIntegrationPersistenceService.removeCredentialIntegration(agent, type, credentialId, { user: req.user, modifiedBy: 'user', broadcast: false });
|
|
50
|
+
await this.integrationManagementService.disconnect({
|
|
51
|
+
agent,
|
|
52
|
+
user: req.user,
|
|
53
|
+
type,
|
|
54
|
+
credentialId,
|
|
55
|
+
});
|
|
128
56
|
return { status: 'disconnected' };
|
|
129
57
|
}
|
|
130
58
|
async integrationStatus(req, _res, agentId) {
|
|
@@ -149,9 +77,19 @@ let AgentIntegrationsController = class AgentIntegrationsController {
|
|
|
149
77
|
}
|
|
150
78
|
async handleWebhook(req, res) {
|
|
151
79
|
const { agentId, platform } = req.params;
|
|
152
|
-
const
|
|
80
|
+
const integration = this.chatIntegrationRegistry.get(platform);
|
|
81
|
+
const resolution = integration?.resolveWebhookRequest?.({
|
|
82
|
+
headers: req.headers,
|
|
83
|
+
body: req.body,
|
|
84
|
+
});
|
|
85
|
+
if (resolution?.type === 'reject') {
|
|
86
|
+
res.status(resolution.response.status).json(resolution.response.body);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const webhookHandler = resolution?.type === 'no_match'
|
|
90
|
+
? undefined
|
|
91
|
+
: this.chatIntegrationService.getWebhookHandler(agentId, platform, resolution?.type === 'select' ? resolution.connectionSelector : undefined);
|
|
153
92
|
if (!webhookHandler) {
|
|
154
|
-
const integration = this.chatIntegrationRegistry.get(platform);
|
|
155
93
|
const earlyResponse = integration?.handleUnauthenticatedWebhook?.(req.body);
|
|
156
94
|
if (earlyResponse) {
|
|
157
95
|
res.status(earlyResponse.status).json(earlyResponse.body);
|
|
@@ -222,30 +160,6 @@ __decorate([
|
|
|
222
160
|
__metadata("design:paramtypes", [Object, Object, String]),
|
|
223
161
|
__metadata("design:returntype", Promise)
|
|
224
162
|
], AgentIntegrationsController.prototype, "connectIntegration", null);
|
|
225
|
-
__decorate([
|
|
226
|
-
(0, decorators_1.Post)('/:agentId/integrations/slack/app'),
|
|
227
|
-
(0, decorators_1.ProjectScope)('agent:update'),
|
|
228
|
-
__param(2, (0, decorators_1.Param)('agentId')),
|
|
229
|
-
__param(3, decorators_1.Body),
|
|
230
|
-
__metadata("design:type", Function),
|
|
231
|
-
__metadata("design:paramtypes", [Object, Object, String, api_types_1.CreateSlackAgentAppDto]),
|
|
232
|
-
__metadata("design:returntype", Promise)
|
|
233
|
-
], AgentIntegrationsController.prototype, "createSlackApp", null);
|
|
234
|
-
__decorate([
|
|
235
|
-
(0, decorators_1.Get)('/:agentId/integrations/slack/manifest'),
|
|
236
|
-
(0, decorators_1.ProjectScope)('agent:read'),
|
|
237
|
-
__param(2, (0, decorators_1.Param)('agentId')),
|
|
238
|
-
__metadata("design:type", Function),
|
|
239
|
-
__metadata("design:paramtypes", [Object, Object, String]),
|
|
240
|
-
__metadata("design:returntype", Promise)
|
|
241
|
-
], AgentIntegrationsController.prototype, "getSlackAppManifest", null);
|
|
242
|
-
__decorate([
|
|
243
|
-
(0, decorators_1.Get)('/:agentId/integrations/slack/oauth/callback', { skipAuth: true, usesTemplates: true }),
|
|
244
|
-
__param(2, (0, decorators_1.Param)('agentId')),
|
|
245
|
-
__metadata("design:type", Function),
|
|
246
|
-
__metadata("design:paramtypes", [Object, Object, String]),
|
|
247
|
-
__metadata("design:returntype", Promise)
|
|
248
|
-
], AgentIntegrationsController.prototype, "handleSlackAppOAuthCallback", null);
|
|
249
163
|
__decorate([
|
|
250
164
|
(0, decorators_1.Post)('/:agentId/integrations/disconnect'),
|
|
251
165
|
(0, decorators_1.ProjectScope)('agent:update'),
|
|
@@ -271,6 +185,6 @@ __decorate([
|
|
|
271
185
|
], AgentIntegrationsController.prototype, "handleWebhook", null);
|
|
272
186
|
exports.AgentIntegrationsController = AgentIntegrationsController = __decorate([
|
|
273
187
|
(0, decorators_1.RestController)('/projects/:projectId/agents/v2'),
|
|
274
|
-
__metadata("design:paramtypes", [
|
|
188
|
+
__metadata("design:paramtypes", [agent_integration_management_service_1.AgentIntegrationManagementService, chat_integration_service_1.ChatIntegrationService, agent_repository_1.AgentRepository, agent_chat_integration_1.ChatIntegrationRegistry])
|
|
275
189
|
], AgentIntegrationsController);
|
|
276
190
|
//# sourceMappingURL=agent-integrations.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-integrations.controller.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-integrations.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"agent-integrations.controller.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-integrations.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAIwB;AAExB,gDAAuF;AAGvF,8EAAyE;AAEzE,iGAA2F;AAC3F,kFAAgF;AAChF,sFAAiF;AACjF,wGAAmG;AACnG,sEAAkE;AAG3D,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B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,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAC1C,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3B,CAAC,CAAC,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,EAAE,CAAC;QACtC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;CACD,CAAA;;AA3LM;IAFL,IAAA,iBAAI,EAAC,gCAAgC,CAAC;IACtC,IAAA,yBAAY,EAAC,cAAc,CAAC;IAI3B,WAAA,IAAA,kBAAK,EAAC,SAAS,CAAC,CAAA;;;;qEAajB;AAIK;IAFL,IAAA,iBAAI,EAAC,mCAAmC,CAAC;IACzC,IAAA,yBAAY,EAAC,cAAc,CAAC;IAI3B,WAAA,IAAA,kBAAK,EAAC,SAAS,CAAC,CAAA;IAChB,WAAA,iBAAI,CAAA;;6DAAU,yCAA6B;;wEAa5C;AAIK;IAFL,IAAA,gBAAG,EAAC,+BAA+B,CAAC;IACpC,IAAA,yBAAY,EAAC,YAAY,CAAC;IAIzB,WAAA,IAAA,kBAAK,EAAC,SAAS,CAAC,CAAA;;;;oEAyBjB;AAKK;IADL,IAAA,iBAAI,EAAC,8BAA8B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;;;gEAiHzE;sCApMW,2BAA2B;IADvC,IAAA,2BAAc,EAAC,gCAAgC,CAAC;qCAGA,wEAAiC,EACvC,iDAAsB,EAC7B,kCAAe,EACP,gDAAuB;GALtD,2BAA2B,CAqMvC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Logger } from '@n8n/backend-common';
|
|
2
|
+
import { AgentExecutionService } from './agent-execution.service';
|
|
3
|
+
import { AgentExecutionRepository } from './repositories/agent-execution.repository';
|
|
4
|
+
export declare class AgentInterruptedExecutionSweeper {
|
|
5
|
+
private readonly logger;
|
|
6
|
+
private readonly executionRepository;
|
|
7
|
+
private readonly executionService;
|
|
8
|
+
static readonly LIVENESS_GRACE_MS: number;
|
|
9
|
+
constructor(logger: Logger, executionRepository: AgentExecutionRepository, executionService: AgentExecutionService);
|
|
10
|
+
sweep(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var AgentInterruptedExecutionSweeper_1;
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.AgentInterruptedExecutionSweeper = void 0;
|
|
14
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
+
const di_1 = require("@n8n/di");
|
|
16
|
+
const agent_execution_service_1 = require("./agent-execution.service");
|
|
17
|
+
const agent_execution_repository_1 = require("./repositories/agent-execution.repository");
|
|
18
|
+
let AgentInterruptedExecutionSweeper = AgentInterruptedExecutionSweeper_1 = class AgentInterruptedExecutionSweeper {
|
|
19
|
+
constructor(logger, executionRepository, executionService) {
|
|
20
|
+
this.logger = logger;
|
|
21
|
+
this.executionRepository = executionRepository;
|
|
22
|
+
this.executionService = executionService;
|
|
23
|
+
this.logger = this.logger.scoped('agents');
|
|
24
|
+
}
|
|
25
|
+
async sweep() {
|
|
26
|
+
let running;
|
|
27
|
+
try {
|
|
28
|
+
running = await this.executionRepository.findRunning();
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
this.logger.error('Failed to query running agent executions', { error });
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
for (const execution of running) {
|
|
35
|
+
try {
|
|
36
|
+
if (execution.updatedAt.getTime() >
|
|
37
|
+
Date.now() - AgentInterruptedExecutionSweeper_1.LIVENESS_GRACE_MS) {
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
if (await this.executionService.finalizeInterruptedExecution(execution)) {
|
|
41
|
+
this.logger.info('Marked abandoned agent execution as interrupted', {
|
|
42
|
+
executionId: execution.id,
|
|
43
|
+
threadId: execution.threadId,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
this.logger.error('Failed to finalize interrupted agent execution', {
|
|
49
|
+
executionId: execution.id,
|
|
50
|
+
threadId: execution.threadId,
|
|
51
|
+
error,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
exports.AgentInterruptedExecutionSweeper = AgentInterruptedExecutionSweeper;
|
|
58
|
+
AgentInterruptedExecutionSweeper.LIVENESS_GRACE_MS = 2 * 60 * 1000;
|
|
59
|
+
exports.AgentInterruptedExecutionSweeper = AgentInterruptedExecutionSweeper = AgentInterruptedExecutionSweeper_1 = __decorate([
|
|
60
|
+
(0, di_1.Service)(),
|
|
61
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, agent_execution_repository_1.AgentExecutionRepository, agent_execution_service_1.AgentExecutionService])
|
|
62
|
+
], AgentInterruptedExecutionSweeper);
|
|
63
|
+
//# sourceMappingURL=agent-interrupted-execution-sweeper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-interrupted-execution-swee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nE,WAAW,EAAE,SAAS,CAAC,EAAE;oBACzB,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,KAAK;iBACL,CAAC,CAAC;YACJ,CAAC;QACF,CAAC;IACF,CAAC;CACD,CAAA;;AA1CgB,kDAAiB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,AAAhB,CAAiB;2CADtC,gCAAgC;IAD5C,IAAA,YAAO,GAAE;qCAKiB,uBAAM,EACO,qDAAwB,EAC3B,+CAAqB;GAN7C,gCAAgC,CA2C5C"}
|
|
@@ -7,5 +7,6 @@ export declare class AgentModelCatalogService {
|
|
|
7
7
|
private readonly builderModelLiveLookupService;
|
|
8
8
|
constructor(logger: Logger, builderModelLiveLookupService: BuilderModelLiveLookupService);
|
|
9
9
|
getProviderModels(user: User, projectId: string, provider: string, credentialId?: string): Promise<AgentProviderModelsResponse>;
|
|
10
|
+
private logLiveLookupFailure;
|
|
10
11
|
private getCatalogModels;
|
|
11
12
|
}
|
|
@@ -38,26 +38,49 @@ let AgentModelCatalogService = class AgentModelCatalogService {
|
|
|
38
38
|
this.builderModelLiveLookupService = builderModelLiveLookupService;
|
|
39
39
|
}
|
|
40
40
|
async getProviderModels(user, projectId, provider, credentialId) {
|
|
41
|
-
const catalogModels = await this.getCatalogModels(provider);
|
|
42
41
|
const credentialType = getProviderCredentialType(provider);
|
|
43
42
|
if (!credentialId || !credentialType) {
|
|
43
|
+
const catalogModels = await this.getCatalogModels(provider);
|
|
44
44
|
return { provider, verified: false, models: Object.values(catalogModels) };
|
|
45
45
|
}
|
|
46
|
-
let
|
|
46
|
+
let lookup;
|
|
47
47
|
try {
|
|
48
|
-
|
|
48
|
+
lookup = await this.builderModelLiveLookupService.lookup(user, projectId, credentialId, credentialType, provider);
|
|
49
49
|
}
|
|
50
50
|
catch (error) {
|
|
51
|
-
this.
|
|
52
|
-
provider,
|
|
53
|
-
error: error instanceof Error ? error.message : String(error),
|
|
54
|
-
});
|
|
51
|
+
this.logLiveLookupFailure(provider, error);
|
|
55
52
|
if (credentialId === api_types_1.AI_GATEWAY_MANAGED_TAG) {
|
|
56
53
|
return { provider, verified: true, unavailable: true, models: [] };
|
|
57
54
|
}
|
|
55
|
+
const catalogModels = await this.getCatalogModels(provider);
|
|
58
56
|
return { provider, verified: false, models: Object.values(catalogModels) };
|
|
59
57
|
}
|
|
60
|
-
if (
|
|
58
|
+
if (lookup.policy === 'endpoint-only') {
|
|
59
|
+
if (lookup.status === 'unavailable') {
|
|
60
|
+
this.logLiveLookupFailure(provider, lookup.error);
|
|
61
|
+
return { provider, verified: true, unavailable: true, models: [] };
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
provider,
|
|
65
|
+
verified: true,
|
|
66
|
+
models: lookup.models.map((live) => ({
|
|
67
|
+
id: live.value,
|
|
68
|
+
name: live.name || live.value,
|
|
69
|
+
toolCall: true,
|
|
70
|
+
})),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
if (lookup.status === 'unavailable') {
|
|
74
|
+
this.logLiveLookupFailure(provider, lookup.error);
|
|
75
|
+
if (lookup.policy === 'managed' || credentialId === api_types_1.AI_GATEWAY_MANAGED_TAG) {
|
|
76
|
+
return { provider, verified: true, unavailable: true, models: [] };
|
|
77
|
+
}
|
|
78
|
+
const catalogModels = await this.getCatalogModels(provider);
|
|
79
|
+
return { provider, verified: false, models: Object.values(catalogModels) };
|
|
80
|
+
}
|
|
81
|
+
const liveModels = lookup.models;
|
|
82
|
+
const catalogModels = await this.getCatalogModels(provider);
|
|
83
|
+
if (lookup.policy === 'managed') {
|
|
61
84
|
return {
|
|
62
85
|
provider,
|
|
63
86
|
verified: true,
|
|
@@ -96,6 +119,12 @@ let AgentModelCatalogService = class AgentModelCatalogService {
|
|
|
96
119
|
}),
|
|
97
120
|
};
|
|
98
121
|
}
|
|
122
|
+
logLiveLookupFailure(provider, error) {
|
|
123
|
+
this.logger.warn('Live model list failed', {
|
|
124
|
+
provider,
|
|
125
|
+
error: error instanceof Error ? error.message : String(error),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
99
128
|
async getCatalogModels(provider) {
|
|
100
129
|
try {
|
|
101
130
|
const { fetchProviderCatalog } = await import('@n8n/agents');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-model-catalog.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-model-catalog.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAKwB;AACxB,wDAA6C;AAE7C,gCAAkC;AAElC,uEAA6E;AAE7E,
|
|
1
|
+
{"version":3,"file":"agent-model-catalog.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-model-catalog.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAKwB;AACxB,wDAA6C;AAE7C,gCAAkC;AAElC,uEAA6E;AAE7E,mGAGqD;AAGrD,MAAM,sBAAsB,GAAG,SAAS,CAAC;AAEzC,SAAS,yBAAyB,CAAC,QAAgB;IAClD,IAAI,CAAC,IAAA,0CAAwB,EAAC,QAAQ,CAAC;QAAE,OAAO,SAAS,CAAC;IAC1D,OAAO,IAAA,gDAAoC,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1D,CAAC;AAED,SAAS,uBAAuB,CAAC,QAAgB,EAAE,KAAa;IAC/D,IAAI,QAAQ,KAAK,QAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,sBAAsB,CAAC,EAAE,CAAC;QACvE,OAAO,KAAK,CAAC,KAAK,CAAC,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAGD,MAAM,eAAe,GAAG,+BAA+B,CAAC;AASxD,SAAS,mBAAmB,CAAC,EAAU;IACtC,MAAM,KAAK,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC;IAC9C,OAAO,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,C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AAwB,CAwJpC"}
|
|
@@ -2,6 +2,7 @@ import { type AgentConfigValidationResponse, type AgentVersionListItemDto } from
|
|
|
2
2
|
import { Logger } from '@n8n/backend-common';
|
|
3
3
|
import type { User } from '@n8n/db';
|
|
4
4
|
import { CredentialsService } from '../../credentials/credentials.service';
|
|
5
|
+
import { EventService } from '../../events/event.service';
|
|
5
6
|
import { Telemetry } from '../../telemetry';
|
|
6
7
|
import { AgentCustomToolsService } from './agent-custom-tools.service';
|
|
7
8
|
import { AgentModificationTelemetryService, type AgentActor } from './agent-modification-telemetry.service';
|
|
@@ -40,9 +41,10 @@ export declare class AgentPublishService {
|
|
|
40
41
|
private readonly agentValidationService;
|
|
41
42
|
private readonly credentialsService;
|
|
42
43
|
private readonly telemetry;
|
|
44
|
+
private readonly eventService;
|
|
43
45
|
private readonly setupCompletionService;
|
|
44
46
|
private readonly modificationTelemetry;
|
|
45
|
-
constructor(logger: Logger, agentRepository: AgentRepository, agentHistoryRepository: AgentHistoryRepository, agentTaskSnapshotRepository: AgentTaskSnapshotRepository, agentTaskRepository: AgentTaskRepository, customToolsService: AgentCustomToolsService, runtimeCacheService: AgentRuntimeCacheService, subAgentCleanupService: SubAgentCleanupService, agentValidationService: AgentValidationService, credentialsService: CredentialsService, telemetry: Telemetry, setupCompletionService: AgentSetupCompletionService, modificationTelemetry: AgentModificationTelemetryService);
|
|
47
|
+
constructor(logger: Logger, agentRepository: AgentRepository, agentHistoryRepository: AgentHistoryRepository, agentTaskSnapshotRepository: AgentTaskSnapshotRepository, agentTaskRepository: AgentTaskRepository, customToolsService: AgentCustomToolsService, runtimeCacheService: AgentRuntimeCacheService, subAgentCleanupService: SubAgentCleanupService, agentValidationService: AgentValidationService, credentialsService: CredentialsService, telemetry: Telemetry, eventService: EventService, setupCompletionService: AgentSetupCompletionService, modificationTelemetry: AgentModificationTelemetryService);
|
|
46
48
|
publishAgent(agentId: string, projectId: string, user: User, emitter: AgentPublishEmitter, versionId?: string): Promise<PublishAgentResult>;
|
|
47
49
|
private assertPublishable;
|
|
48
50
|
unpublishAgent(agentId: string, projectId: string, user: User, by: AgentActor): Promise<Agent>;
|
|
@@ -22,6 +22,7 @@ const uuid_1 = require("uuid");
|
|
|
22
22
|
const credentials_service_1 = require("../../credentials/credentials.service");
|
|
23
23
|
const conflict_error_1 = require("../../errors/response-errors/conflict.error");
|
|
24
24
|
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
25
|
+
const event_service_1 = require("../../events/event.service");
|
|
25
26
|
const agent_missing_skill_ids_1 = require("../../modules/agents/utils/agent-missing-skill-ids");
|
|
26
27
|
const telemetry_2 = require("../../telemetry");
|
|
27
28
|
const agents_credential_provider_1 = require("./adapters/agents-credential-provider");
|
|
@@ -45,7 +46,7 @@ function requireValidValidation(validation) {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
let AgentPublishService = class AgentPublishService {
|
|
48
|
-
constructor(logger, agentRepository, agentHistoryRepository, agentTaskSnapshotRepository, agentTaskRepository, customToolsService, runtimeCacheService, subAgentCleanupService, agentValidationService, credentialsService, telemetry, setupCompletionService, modificationTelemetry) {
|
|
49
|
+
constructor(logger, agentRepository, agentHistoryRepository, agentTaskSnapshotRepository, agentTaskRepository, customToolsService, runtimeCacheService, subAgentCleanupService, agentValidationService, credentialsService, telemetry, eventService, setupCompletionService, modificationTelemetry) {
|
|
49
50
|
this.logger = logger;
|
|
50
51
|
this.agentRepository = agentRepository;
|
|
51
52
|
this.agentHistoryRepository = agentHistoryRepository;
|
|
@@ -57,6 +58,7 @@ let AgentPublishService = class AgentPublishService {
|
|
|
57
58
|
this.agentValidationService = agentValidationService;
|
|
58
59
|
this.credentialsService = credentialsService;
|
|
59
60
|
this.telemetry = telemetry;
|
|
61
|
+
this.eventService = eventService;
|
|
60
62
|
this.setupCompletionService = setupCompletionService;
|
|
61
63
|
this.modificationTelemetry = modificationTelemetry;
|
|
62
64
|
}
|
|
@@ -105,6 +107,7 @@ let AgentPublishService = class AgentPublishService {
|
|
|
105
107
|
}
|
|
106
108
|
await trx.save(agent);
|
|
107
109
|
});
|
|
110
|
+
this.eventService.emit('agent-saved', { agentId });
|
|
108
111
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
109
112
|
this.trackPublished(agent, projectId, user, emitter, targetHistory);
|
|
110
113
|
await emitSetupCompleted?.();
|
|
@@ -143,6 +146,7 @@ let AgentPublishService = class AgentPublishService {
|
|
|
143
146
|
agent.versionId = (0, uuid_1.v4)();
|
|
144
147
|
await trx.save(agent);
|
|
145
148
|
});
|
|
149
|
+
this.eventService.emit('agent-saved', { agentId });
|
|
146
150
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
147
151
|
this.trackUnpublished(agentId, projectId, user, by);
|
|
148
152
|
await this.subAgentCleanupService.removeSubAgentFromParents(agentId, projectId);
|
|
@@ -247,6 +251,7 @@ let AgentPublishService = class AgentPublishService {
|
|
|
247
251
|
await trx.save(agent);
|
|
248
252
|
tasksChanged = await this.restoreTasksFromSnapshot(trx, agentId, activeVersion.versionId);
|
|
249
253
|
});
|
|
254
|
+
this.eventService.emit('agent-saved', { agentId });
|
|
250
255
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
251
256
|
await this.recordRevert(agent, projectId, user, modifiedBy, previousSchema, {
|
|
252
257
|
tools: !(0, isEqual_1.default)(previousTools, agent.tools ?? {}),
|
|
@@ -280,6 +285,7 @@ let AgentPublishService = class AgentPublishService {
|
|
|
280
285
|
await trx.save(agent);
|
|
281
286
|
tasksChanged = await this.restoreTasksFromSnapshot(trx, agentId, target.versionId);
|
|
282
287
|
});
|
|
288
|
+
this.eventService.emit('agent-saved', { agentId });
|
|
283
289
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
284
290
|
await this.recordRevert(agent, projectId, user, modifiedBy, previousSchema, {
|
|
285
291
|
tools: !(0, isEqual_1.default)(previousTools, agent.tools ?? {}),
|
|
@@ -420,6 +426,6 @@ let AgentPublishService = class AgentPublishService {
|
|
|
420
426
|
exports.AgentPublishService = AgentPublishService;
|
|
421
427
|
exports.AgentPublishService = AgentPublishService = __decorate([
|
|
422
428
|
(0, di_1.Service)(),
|
|
423
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, agent_repository_1.AgentRepository, agent_history_repository_1.AgentHistoryRepository, agent_task_snapshot_repository_1.AgentTaskSnapshotRepository, agent_task_repository_1.AgentTaskRepository, agent_custom_tools_service_1.AgentCustomToolsService, agent_runtime_cache_service_1.AgentRuntimeCacheService, sub_agent_cleanup_service_1.SubAgentCleanupService, agent_validation_service_1.AgentValidationService, credentials_service_1.CredentialsService, telemetry_2.Telemetry, agent_setup_completion_service_1.AgentSetupCompletionService, agent_modification_telemetry_service_1.AgentModificationTelemetryService])
|
|
429
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, agent_repository_1.AgentRepository, agent_history_repository_1.AgentHistoryRepository, agent_task_snapshot_repository_1.AgentTaskSnapshotRepository, agent_task_repository_1.AgentTaskRepository, agent_custom_tools_service_1.AgentCustomToolsService, agent_runtime_cache_service_1.AgentRuntimeCacheService, sub_agent_cleanup_service_1.SubAgentCleanupService, agent_validation_service_1.AgentValidationService, credentials_service_1.CredentialsService, telemetry_2.Telemetry, event_service_1.EventService, agent_setup_completion_service_1.AgentSetupCompletionService, agent_modification_telemetry_service_1.AgentModificationTelemetryService])
|
|
424
430
|
], AgentPublishService);
|
|
425
431
|
//# sourceMappingURL=agent-publish.service.js.map
|