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
|
@@ -21,6 +21,7 @@ const db_1 = require("@n8n/db");
|
|
|
21
21
|
const decorators_1 = require("@n8n/decorators");
|
|
22
22
|
const di_1 = require("@n8n/di");
|
|
23
23
|
const instance_ai_1 = require("@n8n/instance-ai");
|
|
24
|
+
const telemetry_1 = require("@n8n/telemetry");
|
|
24
25
|
const lazy_import_1 = require("@n8n/utils/lazy-import");
|
|
25
26
|
const workflow_sdk_1 = require("@n8n/workflow-sdk");
|
|
26
27
|
const n8n_core_1 = require("n8n-core");
|
|
@@ -36,7 +37,8 @@ const publisher_service_1 = require("../../scaling/pubsub/publisher.service");
|
|
|
36
37
|
const ai_service_1 = require("../../services/ai.service");
|
|
37
38
|
const proxy_token_manager_1 = require("../../services/proxy-token-manager");
|
|
38
39
|
const url_service_1 = require("../../services/url.service");
|
|
39
|
-
const
|
|
40
|
+
const telemetry_2 = require("../../telemetry");
|
|
41
|
+
const utils_1 = require("../../utils");
|
|
40
42
|
const agent_preview_handoff_1 = require("./agent-preview-handoff");
|
|
41
43
|
const composite_local_mcp_server_1 = require("./browser/composite-local-mcp-server");
|
|
42
44
|
const instance_ai_browser_session_service_1 = require("./browser/instance-ai-browser-session.service");
|
|
@@ -44,6 +46,7 @@ const thread_credential_allowlist_service_1 = require("./eval/thread-credential-
|
|
|
44
46
|
const durable_event_log_1 = require("./event-bus/durable-event-log");
|
|
45
47
|
const in_process_event_bus_1 = require("./event-bus/in-process-event-bus");
|
|
46
48
|
const interrupted_run_sweeper_1 = require("./event-bus/interrupted-run-sweeper");
|
|
49
|
+
const instance_ai_credit_display_1 = require("./instance-ai-credit-display");
|
|
47
50
|
const instance_ai_credit_service_1 = require("./instance-ai-credit.service");
|
|
48
51
|
const instance_ai_error_reporter_service_1 = require("./instance-ai-error-reporter.service");
|
|
49
52
|
const instance_ai_gateway_service_1 = require("./instance-ai-gateway.service");
|
|
@@ -95,6 +98,9 @@ function buildContextResourcesBlock(contextAttachments) {
|
|
|
95
98
|
const lines = contextAttachments.map((attachment) => {
|
|
96
99
|
const name = attachment.name ? ` "${attachment.name}"` : '';
|
|
97
100
|
if (attachment.type === 'agent') {
|
|
101
|
+
if (attachment.pending) {
|
|
102
|
+
return `- New unsaved Agent artifact${name} (pending id: \`${attachment.id}\`, in project \`${attachment.projectId}\`).`;
|
|
103
|
+
}
|
|
98
104
|
return `- Agent${name} (id: \`${attachment.id}\`, in project \`${attachment.projectId}\`).`;
|
|
99
105
|
}
|
|
100
106
|
const execution = attachment.executionId
|
|
@@ -105,22 +111,35 @@ function buildContextResourcesBlock(contextAttachments) {
|
|
|
105
111
|
const header = contextAttachments.some((attachment) => attachment.type === 'agent')
|
|
106
112
|
? 'The user opened this conversation from the agent editor, where they are looking at:'
|
|
107
113
|
: 'The user opened this conversation from the workflow editor, where they are looking at:';
|
|
114
|
+
const pendingAgentGuidance = contextAttachments.some((attachment) => attachment.type === 'agent' && attachment.pending)
|
|
115
|
+
? "Treat references such as “the agent” as this pending artifact. It has no persisted agent row yet. When the user asks to build or change it, use `build-agent`'s new-agent path with a name; do not pass its pending id as an existing `agentId`. The thread's pending target will make creation reuse that id."
|
|
116
|
+
: '';
|
|
108
117
|
const prose = [
|
|
109
118
|
header,
|
|
110
119
|
...lines,
|
|
120
|
+
pendingAgentGuidance,
|
|
111
121
|
"Treat this purely as context. Until the user tells you what they need, don't read, inspect, run, or otherwise call tools on these resources, and don't make claims about their contents — just briefly acknowledge what they're working on and ask how you can help.",
|
|
112
|
-
]
|
|
122
|
+
]
|
|
123
|
+
.filter(Boolean)
|
|
124
|
+
.join('\n');
|
|
113
125
|
return `${internal_messages_1.EDITOR_CONTEXT_OPEN_TAG}\n${JSON.stringify(contextAttachments)}\n\n${prose}\n${internal_messages_1.EDITOR_CONTEXT_CLOSE_TAG}`;
|
|
114
126
|
}
|
|
115
127
|
function buildHandoffContextBlock(context) {
|
|
116
128
|
if (!context || context.source !== 'credential-modal')
|
|
117
129
|
return '';
|
|
118
130
|
const { credential } = context;
|
|
131
|
+
const placeholderTitles = credential.placeholderTitles ?? [];
|
|
119
132
|
const lines = [
|
|
120
133
|
`- Credential type: \`${credential.credentialType}\` (${credential.displayName}).`,
|
|
121
134
|
credential.id ? `- Existing credential id: \`${credential.id}\`.` : '',
|
|
122
135
|
credential.nodeName ? `- Node name: "${credential.nodeName}".` : '',
|
|
123
136
|
credential.nodeType ? `- Node type: \`${credential.nodeType}\`.` : '',
|
|
137
|
+
placeholderTitles.length
|
|
138
|
+
? `- The credential form is fully pre-filled from a recipe; the user only pastes: ${placeholderTitles.map((title) => `"${title}"`).join(', ')}.`
|
|
139
|
+
: '',
|
|
140
|
+
credential.docsUrl
|
|
141
|
+
? `- The provider page where the user creates/copies the secret (verified during recipe research): ${credential.docsUrl}`
|
|
142
|
+
: '',
|
|
124
143
|
credential.documentationUrl ? `- n8n documentation URL: ${credential.documentationUrl}` : '',
|
|
125
144
|
credential.oauthRedirectUrl
|
|
126
145
|
? `- OAuth redirect/callback URL shown in the modal: ${credential.oauthRedirectUrl}`
|
|
@@ -130,7 +149,12 @@ function buildHandoffContextBlock(context) {
|
|
|
130
149
|
'The user opened this conversation from the credential setup modal and is asking for setup guidance.',
|
|
131
150
|
...lines,
|
|
132
151
|
'Use this metadata only as setup context. Never ask the user to paste credential secrets into chat. For credential setup docs, load `n8n-docs-assistant` and use `n8n-docs` with `intent: "credential-setup"`.',
|
|
133
|
-
|
|
152
|
+
placeholderTitles.length
|
|
153
|
+
? `Because the form is pre-filled, give step-by-step guidance on where to obtain the listed value(s) on the provider side${credential.docsUrl ? ' — direct the user to the provider page above rather than re-researching' : ' (research the provider if needed)'} — and do NOT suggest editing the auth template, test URL, or any other credential field.`
|
|
154
|
+
: '',
|
|
155
|
+
]
|
|
156
|
+
.filter(Boolean)
|
|
157
|
+
.join('\n');
|
|
134
158
|
return `${internal_messages_1.CREDENTIAL_CONTEXT_OPEN_TAG}\n${JSON.stringify(context)}\n\n${prose}\n${internal_messages_1.CREDENTIAL_CONTEXT_CLOSE_TAG}`;
|
|
135
159
|
}
|
|
136
160
|
function isTelemetryConfigurableAgent(agent) {
|
|
@@ -141,6 +165,7 @@ function isTelemetryConfigurableAgent(agent) {
|
|
|
141
165
|
const INSTANCE_AI_CHECKPOINT_PRUNE_RETRY_MS = 30 * 1000;
|
|
142
166
|
const WORKFLOW_SETUP_ROUTING_CLAIM_TTL_MS = 15 * 60 * 1000;
|
|
143
167
|
const CONFIRMATION_EXPIRED_MESSAGE = 'This confirmation has expired. Send a new message to continue.';
|
|
168
|
+
const RESUME_REJECTED_MESSAGE = 'I could not apply that confirmation. Send a new message to continue.';
|
|
144
169
|
const INSTANCE_AI_SHUTDOWN_DRAIN_TIMEOUT_MS = 5 * 1000;
|
|
145
170
|
function isTextMessagePart(part) {
|
|
146
171
|
return (typeof part === 'object' &&
|
|
@@ -157,10 +182,12 @@ function isStaleResumeError(error) {
|
|
|
157
182
|
return error instanceof Error && error.name === 'StaleResumeError';
|
|
158
183
|
}
|
|
159
184
|
exports.QUOTA_EXHAUSTED_USER_MESSAGE = "You've run out of AI credits. Upgrade your plan to continue using the AI assistant.";
|
|
185
|
+
const OPERATIONAL_ERROR_USER_MESSAGE = 'I hit an operational error before I could finish that response. Please try again.';
|
|
186
|
+
const GENERIC_ERROR_USER_MESSAGE = 'Something went wrong before I could finish that response. Please try again.';
|
|
160
187
|
function getUserFacingErrorCode(error) {
|
|
161
188
|
return (0, instance_ai_1.isQuotaExhaustedError)(error) ? 'quota_exhausted' : undefined;
|
|
162
189
|
}
|
|
163
|
-
function getUserFacingErrorMessage(error) {
|
|
190
|
+
function getUserFacingErrorMessage(error, fallback = GENERIC_ERROR_USER_MESSAGE) {
|
|
164
191
|
if ((0, instance_ai_1.isQuotaExhaustedError)(error)) {
|
|
165
192
|
return exports.QUOTA_EXHAUSTED_USER_MESSAGE;
|
|
166
193
|
}
|
|
@@ -174,12 +201,9 @@ function getUserFacingErrorMessage(error) {
|
|
|
174
201
|
return "I couldn't finish preparing the workspace sandbox. Please try again in a moment.";
|
|
175
202
|
}
|
|
176
203
|
if (error instanceof n8n_workflow_1.OperationalError) {
|
|
177
|
-
return
|
|
204
|
+
return OPERATIONAL_ERROR_USER_MESSAGE;
|
|
178
205
|
}
|
|
179
|
-
|
|
180
|
-
return 'Something went wrong before I could finish that response. Please try again.';
|
|
181
|
-
}
|
|
182
|
-
return 'Something went wrong before I could finish that response. Please try again.';
|
|
206
|
+
return fallback;
|
|
183
207
|
}
|
|
184
208
|
function isMaskedStreamFailure(error) {
|
|
185
209
|
if (!(error instanceof Error))
|
|
@@ -212,6 +236,18 @@ function getAbortReason(signal) {
|
|
|
212
236
|
return reason.message;
|
|
213
237
|
return typeof reason === 'string' ? reason : 'user_cancelled';
|
|
214
238
|
}
|
|
239
|
+
function classifyUnclaimedResume(error, flags) {
|
|
240
|
+
if (isStaleResumeError(error))
|
|
241
|
+
return { kind: 'stale' };
|
|
242
|
+
if (flags.aborted)
|
|
243
|
+
return flags.preserveHitl ? { kind: 'preserve-hitl' } : { kind: 'cancelled' };
|
|
244
|
+
return {
|
|
245
|
+
kind: 'errored',
|
|
246
|
+
reason: getUserFacingErrorMessage(error, RESUME_REJECTED_MESSAGE),
|
|
247
|
+
errorCode: getUserFacingErrorCode(error),
|
|
248
|
+
errorMessage: getErrorMessage(error),
|
|
249
|
+
};
|
|
250
|
+
}
|
|
215
251
|
const MAX_CONCURRENT_BACKGROUND_TASKS_PER_THREAD = 5;
|
|
216
252
|
const MAX_CONSECUTIVE_FAILED_INTERNAL_FOLLOW_UPS = 3;
|
|
217
253
|
const TITLE_REFINE_HISTORY_LIMIT = 50;
|
|
@@ -462,14 +498,16 @@ let InstanceAiService = class InstanceAiService {
|
|
|
462
498
|
return this.modelService.isProxyEnabled();
|
|
463
499
|
}
|
|
464
500
|
async getCredits(user) {
|
|
465
|
-
|
|
501
|
+
await this.creditService.ensureQuotaLockApplied(user);
|
|
502
|
+
const credits = await this.modelService.getCredits(user);
|
|
503
|
+
return (0, instance_ai_credit_display_1.maskCreditsForDisplay)(credits, this.settingsService.isActivationCapped());
|
|
466
504
|
}
|
|
467
505
|
async reclassifyMaskedStreamFailure(error, user, context) {
|
|
468
506
|
if (!isMaskedStreamFailure(error))
|
|
469
507
|
return error;
|
|
470
508
|
try {
|
|
471
|
-
const { creditsQuota, creditsClaimed } = await this.modelService.getCredits(user);
|
|
472
|
-
if (creditsQuota < 0 || creditsClaimed < creditsQuota)
|
|
509
|
+
const { creditsQuota, creditsClaimed, quotaLocked } = await this.modelService.getCredits(user);
|
|
510
|
+
if (!quotaLocked && (creditsQuota < 0 || creditsClaimed < creditsQuota))
|
|
473
511
|
return error;
|
|
474
512
|
}
|
|
475
513
|
catch (creditsError) {
|
|
@@ -1291,11 +1329,13 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1291
1329
|
const browserUseEnabledGlobally = adminSettings.browserUseEnabled;
|
|
1292
1330
|
const localGatewayDisabledForUser = await this.settingsService.isLocalGatewayDisabledForUser(user.id);
|
|
1293
1331
|
const userGateway = this.gatewayService.findGateway(user.id);
|
|
1332
|
+
await this.creditService.ensureQuotaLockApplied(user);
|
|
1294
1333
|
const { searchProxyConfig, tracingProxyConfig, tokenManager, proxyBaseUrl } = proxyRunConfig ?? (await this.createProxyRunConfig(user));
|
|
1295
1334
|
const modelId = proxyBaseUrl && tokenManager
|
|
1296
1335
|
? await this.modelService.resolveProxyModel(user, proxyBaseUrl, tokenManager)
|
|
1297
1336
|
: await this.modelService.resolveAgentModelConfig(user);
|
|
1298
1337
|
const configEvalsEnabled = await this.adapterService.isConfigEvalsEnabled(user);
|
|
1338
|
+
const mcpConnectionsEnabled = await this.adapterService.isMcpConnectionsEnabled(user);
|
|
1299
1339
|
const context = this.adapterService.createContext(user, {
|
|
1300
1340
|
searchProxyConfig,
|
|
1301
1341
|
pushRef,
|
|
@@ -1304,6 +1344,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1304
1344
|
credentialIdAllowlist: this.evalCredentialAllowlists.get(threadId),
|
|
1305
1345
|
shouldBypassCredentialTest: (credentialId) => this.evalCredentialAllowlists.shouldBypassTest(threadId, credentialId),
|
|
1306
1346
|
configEvalsEnabled,
|
|
1347
|
+
mcpConnectionsEnabled,
|
|
1307
1348
|
modelId,
|
|
1308
1349
|
});
|
|
1309
1350
|
this.gatewayService.applyToolPolicy(user.id);
|
|
@@ -1430,6 +1471,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1430
1471
|
}
|
|
1431
1472
|
}
|
|
1432
1473
|
context.workspace = runtimeWorkspace;
|
|
1474
|
+
context.workspaceRoot = workspaceRoot;
|
|
1433
1475
|
context.threadId = threadId;
|
|
1434
1476
|
context.threadMemory = memory;
|
|
1435
1477
|
context.trackTelemetry = (eventName, properties) => {
|
|
@@ -2057,18 +2099,31 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2057
2099
|
try {
|
|
2058
2100
|
errorReporterExecutionToken = this.instanceAiErrorReporter.beginRun(runId);
|
|
2059
2101
|
messageId = (0, nanoid_1.nanoid)();
|
|
2060
|
-
const traceInput = {
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2102
|
+
const traceInput = { message };
|
|
2103
|
+
if (fileAttachments.length) {
|
|
2104
|
+
traceInput.attachments = fileAttachments.map((attachment) => ({
|
|
2105
|
+
mimeType: attachment.mimeType,
|
|
2106
|
+
size: attachment.data.length,
|
|
2107
|
+
}));
|
|
2108
|
+
}
|
|
2109
|
+
if (contextAttachments.length) {
|
|
2110
|
+
traceInput.resourceAttachments = contextAttachments.map((attachment) => {
|
|
2111
|
+
const resource = {
|
|
2112
|
+
type: attachment.type,
|
|
2113
|
+
id: attachment.id,
|
|
2114
|
+
};
|
|
2115
|
+
if (attachment.type === 'agent') {
|
|
2116
|
+
resource.projectId = attachment.projectId;
|
|
2068
2117
|
}
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2118
|
+
if (attachment.type === 'workflow' && attachment.executionId) {
|
|
2119
|
+
resource.executionId = attachment.executionId;
|
|
2120
|
+
}
|
|
2121
|
+
return resource;
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
if (messageGroupId) {
|
|
2125
|
+
traceInput.messageGroupId = messageGroupId;
|
|
2126
|
+
}
|
|
2072
2127
|
const proxyRunConfig = await this.createProxyRunConfig(user);
|
|
2073
2128
|
if (resumeReason) {
|
|
2074
2129
|
tracing = await this.tracing.createOrchestratorResumeTraceContext({
|
|
@@ -2192,6 +2247,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2192
2247
|
this.tracing.storeTraceContext(runId, threadId, tracing, messageGroupId);
|
|
2193
2248
|
}
|
|
2194
2249
|
}
|
|
2250
|
+
await this.snapshotAttachedAgents(contextAttachments, orchestrationContext, tracing);
|
|
2195
2251
|
const enrichedMessage = await this.buildMessageWithRunningTasks(threadId, message);
|
|
2196
2252
|
const contextResourcesBlock = buildContextResourcesBlock(contextAttachments);
|
|
2197
2253
|
let handoffContextBlock = '';
|
|
@@ -3027,6 +3083,16 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3027
3083
|
const { agent, runId, agentRunId, threadId, user, toolCallId, toolName, suspendPayload, abortController, tracing, modelId, messageGroupId, checkpoint, plannedBuild, runHandoff, orchestrationContext, } = suspended;
|
|
3028
3084
|
if (user.id !== requestingUserId)
|
|
3029
3085
|
return null;
|
|
3086
|
+
const activeRun = this.runState.getActiveRun(threadId);
|
|
3087
|
+
if (activeRun) {
|
|
3088
|
+
this.logger.warn('Rejecting suspended-run confirmation: thread already has an active run', {
|
|
3089
|
+
requestId,
|
|
3090
|
+
threadId,
|
|
3091
|
+
suspendedRunId: runId,
|
|
3092
|
+
activeRunId: activeRun.runId,
|
|
3093
|
+
});
|
|
3094
|
+
return null;
|
|
3095
|
+
}
|
|
3030
3096
|
const activeUser = await this.revalidateActiveUser(user.id);
|
|
3031
3097
|
if (!activeUser) {
|
|
3032
3098
|
this.logger.warn('Cancelling suspended run: user no longer authorized for AI Assistant', {
|
|
@@ -3096,12 +3162,24 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3096
3162
|
if (data.autoSetup) {
|
|
3097
3163
|
const rebuilt = await this.rebuildAgentForAutoSetupResume(activeUser, threadId, runId, abortController, effectiveTracing, runHandoff, messageGroupId);
|
|
3098
3164
|
if (!rebuilt) {
|
|
3165
|
+
const rebuildFailure = 'Agent rebuild failed';
|
|
3099
3166
|
await this.tracing.finalizeDetachedTraceRun(`resume-rebuild:${runId}`, unregisteredResumeTracing, {
|
|
3100
3167
|
status: 'failed',
|
|
3101
|
-
error:
|
|
3168
|
+
error: rebuildFailure,
|
|
3102
3169
|
metadata: { completion_source: 'resume_rebuild' },
|
|
3103
3170
|
});
|
|
3104
3171
|
this.cancelRun(threadId, 'agent_rebuild_failed');
|
|
3172
|
+
await this.emitTerminalRun({
|
|
3173
|
+
threadId,
|
|
3174
|
+
runId,
|
|
3175
|
+
status: 'errored',
|
|
3176
|
+
reason: OPERATIONAL_ERROR_USER_MESSAGE,
|
|
3177
|
+
errorInfo: { errorMessage: rebuildFailure, errorSource: 'exception' },
|
|
3178
|
+
messageGroupId,
|
|
3179
|
+
user: activeUser,
|
|
3180
|
+
snapshotStorage: this.dbSnapshotStorage,
|
|
3181
|
+
});
|
|
3182
|
+
this.runState.clearActiveRun(threadId, resumeExecutionToken);
|
|
3105
3183
|
return null;
|
|
3106
3184
|
}
|
|
3107
3185
|
resumeAgent = rebuilt.agent;
|
|
@@ -3128,7 +3206,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3128
3206
|
resumeExecutionToken,
|
|
3129
3207
|
messageGroupId,
|
|
3130
3208
|
resumeTracing,
|
|
3131
|
-
|
|
3209
|
+
unregisteredResumeTracing,
|
|
3132
3210
|
});
|
|
3133
3211
|
return { ok: true, runId };
|
|
3134
3212
|
}
|
|
@@ -3205,20 +3283,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3205
3283
|
if (!resumeClaimed) {
|
|
3206
3284
|
skipPostRunCleanup = true;
|
|
3207
3285
|
const claimError = result.error ?? new Error('Resume checkpoint claim did not complete');
|
|
3208
|
-
this.
|
|
3209
|
-
component: 'instance-ai-resume-claim',
|
|
3210
|
-
threadId: opts.threadId,
|
|
3211
|
-
runId: opts.runId,
|
|
3212
|
-
tracing: opts.tracing,
|
|
3213
|
-
agentId: (0, instance_ai_1.orchestratorAgentId)(opts.runId),
|
|
3214
|
-
userId: opts.user.id,
|
|
3215
|
-
messageGroupId: opts.messageGroupId,
|
|
3216
|
-
});
|
|
3217
|
-
await this.tracing.finalizeDetachedTraceRun(`unclaimed-resume:${opts.runId}`, opts.discardTracingOnStale, {
|
|
3218
|
-
status: 'failed',
|
|
3219
|
-
error: getErrorMessage(claimError),
|
|
3220
|
-
metadata: { completion_source: 'resume_claim' },
|
|
3221
|
-
});
|
|
3286
|
+
await this.settleUnclaimedResume(opts, claimError, 'stream');
|
|
3222
3287
|
return;
|
|
3223
3288
|
}
|
|
3224
3289
|
if (result.status === 'suspended') {
|
|
@@ -3398,31 +3463,9 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3398
3463
|
}
|
|
3399
3464
|
}
|
|
3400
3465
|
catch (error) {
|
|
3401
|
-
if (!resumeClaimed && isStaleResumeError(error)) {
|
|
3402
|
-
skipPostRunCleanup = true;
|
|
3403
|
-
await this.tracing.finalizeDetachedTraceRun(`stale-resume:${opts.runId}`, opts.discardTracingOnStale, {
|
|
3404
|
-
status: 'cancelled',
|
|
3405
|
-
outputs: { runId: opts.runId },
|
|
3406
|
-
metadata: { completion_source: 'stale_resume' },
|
|
3407
|
-
});
|
|
3408
|
-
return;
|
|
3409
|
-
}
|
|
3410
3466
|
if (!resumeClaimed) {
|
|
3411
3467
|
skipPostRunCleanup = true;
|
|
3412
|
-
this.
|
|
3413
|
-
component: 'instance-ai-resume-claim',
|
|
3414
|
-
threadId: opts.threadId,
|
|
3415
|
-
runId: opts.runId,
|
|
3416
|
-
tracing: opts.tracing,
|
|
3417
|
-
agentId: (0, instance_ai_1.orchestratorAgentId)(opts.runId),
|
|
3418
|
-
userId: opts.user.id,
|
|
3419
|
-
messageGroupId: opts.messageGroupId,
|
|
3420
|
-
});
|
|
3421
|
-
await this.tracing.finalizeDetachedTraceRun(`unclaimed-resume:${opts.runId}`, opts.discardTracingOnStale, {
|
|
3422
|
-
status: 'failed',
|
|
3423
|
-
error: getErrorMessage(error),
|
|
3424
|
-
metadata: { completion_source: 'resume_claim' },
|
|
3425
|
-
});
|
|
3468
|
+
await this.settleUnclaimedResume(opts, error, 'exception');
|
|
3426
3469
|
return;
|
|
3427
3470
|
}
|
|
3428
3471
|
if (opts.signal.aborted) {
|
|
@@ -3547,6 +3590,92 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3547
3590
|
}
|
|
3548
3591
|
}
|
|
3549
3592
|
}
|
|
3593
|
+
async settleUnclaimedResume(opts, error, errorSource) {
|
|
3594
|
+
const outcome = classifyUnclaimedResume(error, {
|
|
3595
|
+
aborted: opts.signal.aborted,
|
|
3596
|
+
preserveHitl: this.shouldPreserveHitlOnShutdown(opts.runId),
|
|
3597
|
+
});
|
|
3598
|
+
switch (outcome.kind) {
|
|
3599
|
+
case 'preserve-hitl':
|
|
3600
|
+
return;
|
|
3601
|
+
case 'stale':
|
|
3602
|
+
await this.tracing.finalizeDetachedTraceRun(`stale-resume:${opts.runId}`, opts.unregisteredResumeTracing, {
|
|
3603
|
+
status: 'cancelled',
|
|
3604
|
+
outputs: { runId: opts.runId },
|
|
3605
|
+
metadata: { completion_source: 'stale_resume' },
|
|
3606
|
+
});
|
|
3607
|
+
return;
|
|
3608
|
+
case 'cancelled': {
|
|
3609
|
+
const reason = this.liveness.consumeRunTimeout(opts.runId).timedOut
|
|
3610
|
+
? liveness_1.INSTANCE_AI_RUN_TIMEOUT_REASON
|
|
3611
|
+
: getAbortReason(opts.signal);
|
|
3612
|
+
await this.tracing.finalizeDetachedTraceRun(`cancelled-resume:${opts.runId}`, opts.unregisteredResumeTracing, {
|
|
3613
|
+
status: 'cancelled',
|
|
3614
|
+
outputs: { runId: opts.runId },
|
|
3615
|
+
metadata: { completion_source: 'resume_cancelled', cancellation_reason: reason },
|
|
3616
|
+
});
|
|
3617
|
+
await this.emitTerminalRun({
|
|
3618
|
+
threadId: opts.threadId,
|
|
3619
|
+
runId: opts.runId,
|
|
3620
|
+
status: 'cancelled',
|
|
3621
|
+
reason,
|
|
3622
|
+
messageGroupId: opts.messageGroupId,
|
|
3623
|
+
user: opts.user,
|
|
3624
|
+
snapshotStorage: opts.snapshotStorage,
|
|
3625
|
+
});
|
|
3626
|
+
return;
|
|
3627
|
+
}
|
|
3628
|
+
case 'errored':
|
|
3629
|
+
this.instanceAiErrorReporter.report(error, {
|
|
3630
|
+
component: 'instance-ai-resume-claim',
|
|
3631
|
+
threadId: opts.threadId,
|
|
3632
|
+
runId: opts.runId,
|
|
3633
|
+
tracing: opts.tracing,
|
|
3634
|
+
agentId: (0, instance_ai_1.orchestratorAgentId)(opts.runId),
|
|
3635
|
+
userId: opts.user.id,
|
|
3636
|
+
messageGroupId: opts.messageGroupId,
|
|
3637
|
+
});
|
|
3638
|
+
await this.tracing.finalizeDetachedTraceRun(`unclaimed-resume:${opts.runId}`, opts.unregisteredResumeTracing, {
|
|
3639
|
+
status: 'failed',
|
|
3640
|
+
error: outcome.errorMessage,
|
|
3641
|
+
metadata: { completion_source: 'resume_claim' },
|
|
3642
|
+
});
|
|
3643
|
+
await this.emitTerminalRun({
|
|
3644
|
+
threadId: opts.threadId,
|
|
3645
|
+
runId: opts.runId,
|
|
3646
|
+
status: 'errored',
|
|
3647
|
+
reason: outcome.reason,
|
|
3648
|
+
errorCode: outcome.errorCode,
|
|
3649
|
+
errorInfo: { errorMessage: outcome.errorMessage, errorSource },
|
|
3650
|
+
messageGroupId: opts.messageGroupId,
|
|
3651
|
+
user: opts.user,
|
|
3652
|
+
snapshotStorage: opts.snapshotStorage,
|
|
3653
|
+
});
|
|
3654
|
+
return;
|
|
3655
|
+
default:
|
|
3656
|
+
(0, utils_1.assertNever)(outcome);
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
async emitTerminalRun(args) {
|
|
3660
|
+
const { threadId, runId, status } = args;
|
|
3661
|
+
const context = { threadId, runId };
|
|
3662
|
+
await this.bestEffort('Failed to evaluate the terminal response for a settling run', context, async () => await this.terminalOutcome.evaluateTerminalResponse(threadId, runId, status, {
|
|
3663
|
+
messageGroupId: args.messageGroupId,
|
|
3664
|
+
...(status === 'errored' ? { errorMessage: args.reason, errorCode: args.errorCode } : {}),
|
|
3665
|
+
}));
|
|
3666
|
+
const archivedWorkflowIds = (await this.bestEffort('Failed to reap temporary workflows for a settling run', context, async () => await this.temporaryWorkflowService.reapForRun(threadId, args.user, undefined, this.backgroundTasks.getRunningTasks(threadId).length))) ?? [];
|
|
3667
|
+
this.publishRunFinish(threadId, runId, status, args.reason, archivedWorkflowIds, args.user.id, args.errorInfo);
|
|
3668
|
+
await this.bestEffort('Failed to save the agent tree snapshot for a settling run', context, async () => await this.saveAgentTreeSnapshot(threadId, runId, args.snapshotStorage));
|
|
3669
|
+
}
|
|
3670
|
+
async bestEffort(failureMessage, context, step) {
|
|
3671
|
+
try {
|
|
3672
|
+
return await step();
|
|
3673
|
+
}
|
|
3674
|
+
catch (error) {
|
|
3675
|
+
this.logger.warn(failureMessage, { ...context, error: getErrorMessage(error) });
|
|
3676
|
+
return undefined;
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3550
3679
|
spawnBackgroundTask(runId, opts, snapshotStorage, messageGroupIdOverride) {
|
|
3551
3680
|
const outcome = this.backgroundTasks.spawn({
|
|
3552
3681
|
taskId: opts.taskId,
|
|
@@ -3732,6 +3861,32 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3732
3861
|
}
|
|
3733
3862
|
return { status: 'limit-reached' };
|
|
3734
3863
|
}
|
|
3864
|
+
async snapshotAttachedAgents(attachments, orchestrationContext, tracing) {
|
|
3865
|
+
const delegate = orchestrationContext.domainContext?.builderDelegate;
|
|
3866
|
+
if (!delegate || !tracing)
|
|
3867
|
+
return;
|
|
3868
|
+
for (const attachment of attachments) {
|
|
3869
|
+
if (attachment.type !== 'agent')
|
|
3870
|
+
continue;
|
|
3871
|
+
let artifact = null;
|
|
3872
|
+
try {
|
|
3873
|
+
artifact = (await delegate.readAgentArtifact?.(attachment.id)) ?? null;
|
|
3874
|
+
}
|
|
3875
|
+
catch (error) {
|
|
3876
|
+
this.logger.debug(`[agent-snapshot] attached read for ${attachment.id} failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
3877
|
+
continue;
|
|
3878
|
+
}
|
|
3879
|
+
if (!artifact)
|
|
3880
|
+
continue;
|
|
3881
|
+
await (0, instance_ai_1.emitAgentSnapshotTraceEvent)(tracing, {
|
|
3882
|
+
agentId: attachment.id,
|
|
3883
|
+
projectId: attachment.projectId,
|
|
3884
|
+
reason: 'attached',
|
|
3885
|
+
artifact,
|
|
3886
|
+
logger: this.logger,
|
|
3887
|
+
});
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3735
3890
|
async buildMessageWithRunningTasks(threadId, message) {
|
|
3736
3891
|
return await (0, instance_ai_1.enrichMessageWithBackgroundTasks)(message, this.backgroundTasks.getRunningTasks(threadId), {
|
|
3737
3892
|
formatTask: async (task) => `[Running task — ${task.role}]: taskId=${task.taskId}`,
|
|
@@ -3773,13 +3928,33 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3773
3928
|
numSteps = payload.planItems.length;
|
|
3774
3929
|
}
|
|
3775
3930
|
}
|
|
3931
|
+
const credentialRequests = (Array.isArray(payload.credentialRequests) ? payload.credentialRequests : []).filter((request) => typeof request === 'object' && request !== null);
|
|
3932
|
+
const containsTemplatedCred = credentialRequests.some((request) => request.credentialType === api_types_1.TEMPLATED_CUSTOM_AUTH_CREDENTIAL_TYPE ||
|
|
3933
|
+
(request.setupHint !== null && request.setupHint !== undefined));
|
|
3776
3934
|
this.telemetry.track('Builder asked for input', {
|
|
3777
3935
|
user_id: userId,
|
|
3778
3936
|
thread_id: threadId,
|
|
3779
3937
|
input_thread_id: inputThreadId,
|
|
3780
3938
|
type,
|
|
3781
3939
|
num_steps: numSteps,
|
|
3940
|
+
contains_templated_cred: containsTemplatedCred,
|
|
3782
3941
|
});
|
|
3942
|
+
for (const request of credentialRequests) {
|
|
3943
|
+
const parsedHint = api_types_1.credentialSetupHintSchema.safeParse(request.setupHint);
|
|
3944
|
+
if (!parsedHint.success)
|
|
3945
|
+
continue;
|
|
3946
|
+
const hint = parsedHint.data;
|
|
3947
|
+
this.telemetry.track(telemetry_1.TELEMETRY_EVENT.INSTANCE_AI.BUILDER_SPECCED_TEMPLATED_CRED, {
|
|
3948
|
+
thread_id: threadId,
|
|
3949
|
+
input_thread_id: inputThreadId,
|
|
3950
|
+
template: hint.template,
|
|
3951
|
+
placeholders: hint.placeholders,
|
|
3952
|
+
test_url: hint.testUrl,
|
|
3953
|
+
docs_url: hint.docsUrl,
|
|
3954
|
+
service_host: hint.serviceHost,
|
|
3955
|
+
accepted_status_codes: hint.acceptedStatusCodes,
|
|
3956
|
+
});
|
|
3957
|
+
}
|
|
3783
3958
|
}
|
|
3784
3959
|
async finalizeCancelledSuspendedRun(suspended, reason = 'user_cancelled') {
|
|
3785
3960
|
const runTimeout = reason === liveness_1.INSTANCE_AI_RUN_TIMEOUT_REASON
|
|
@@ -4067,6 +4242,6 @@ __decorate([
|
|
|
4067
4242
|
], InstanceAiService.prototype, "stopCheckpointPruning", null);
|
|
4068
4243
|
exports.InstanceAiService = InstanceAiService = __decorate([
|
|
4069
4244
|
(0, di_1.Service)(),
|
|
4070
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, config_1.GlobalConfig, n8n_core_1.InstanceSettings, instance_ai_adapter_service_1.InstanceAiAdapterService, in_process_event_bus_1.InProcessEventBus, durable_event_log_1.DurableEventLog, interrupted_run_sweeper_1.InterruptedRunSweeper, instance_ai_settings_service_1.InstanceAiSettingsService, instance_ai_gateway_service_1.InstanceAiGatewayService, instance_ai_browser_session_service_1.InstanceAiBrowserSessionService, instance_ai_memory_service_1.InstanceAiMemoryService, typeorm_agent_memory_1.TypeORMAgentMemory, typeorm_agent_checkpoint_store_1.TypeORMAgentCheckpointStore, ai_service_1.AiService, instance_ai_thread_grant_repository_1.InstanceAiThreadGrantRepository, instance_ai_pending_confirmation_repository_1.InstanceAiPendingConfirmationRepository, url_service_1.UrlService, db_snapshot_storage_1.DbSnapshotStorage, db_iteration_log_storage_1.DbIterationLogStorage, source_control_preferences_service_ee_1.SourceControlPreferencesService,
|
|
4245
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, config_1.GlobalConfig, n8n_core_1.InstanceSettings, instance_ai_adapter_service_1.InstanceAiAdapterService, in_process_event_bus_1.InProcessEventBus, durable_event_log_1.DurableEventLog, interrupted_run_sweeper_1.InterruptedRunSweeper, instance_ai_settings_service_1.InstanceAiSettingsService, instance_ai_gateway_service_1.InstanceAiGatewayService, instance_ai_browser_session_service_1.InstanceAiBrowserSessionService, instance_ai_memory_service_1.InstanceAiMemoryService, typeorm_agent_memory_1.TypeORMAgentMemory, typeorm_agent_checkpoint_store_1.TypeORMAgentCheckpointStore, ai_service_1.AiService, instance_ai_thread_grant_repository_1.InstanceAiThreadGrantRepository, instance_ai_pending_confirmation_repository_1.InstanceAiPendingConfirmationRepository, url_service_1.UrlService, db_snapshot_storage_1.DbSnapshotStorage, db_iteration_log_storage_1.DbIterationLogStorage, source_control_preferences_service_ee_1.SourceControlPreferencesService, telemetry_2.Telemetry, mcp_1.InstanceAiMcpRegistryService, db_1.UserRepository, instance_ai_temporary_workflow_service_1.InstanceAiTemporaryWorkflowService, n8n_core_1.ErrorReporter, config_1.SsrfProtectionConfig, backend_network_1.SsrfProtectionService, event_service_1.EventService, thread_credential_allowlist_service_1.EvalThreadCredentialAllowlistService, instance_ai_run_probe_1.InstanceAiRunProbe, instance_ai_model_service_1.InstanceAiModelService, instance_ai_credit_service_1.InstanceAiCreditService, publisher_service_1.Publisher, instance_ai_error_reporter_service_1.InstanceAiErrorReporterService])
|
|
4071
4246
|
], InstanceAiService);
|
|
4072
4247
|
//# sourceMappingURL=instance-ai.service.js.map
|