n8n 2.26.4 → 2.27.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.d.ts +9 -17
- package/dist/active-workflow-manager.js +48 -159
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/binary-data/database.manager.js +2 -1
- package/dist/binary-data/database.manager.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/audit.d.ts +1 -0
- package/dist/commands/audit.js +9 -0
- package/dist/commands/audit.js.map +1 -1
- package/dist/commands/base-command.d.ts +1 -0
- package/dist/commands/base-command.js +31 -10
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/export/workflow.js +9 -0
- package/dist/commands/export/workflow.js.map +1 -1
- package/dist/commands/import/workflow.js +6 -0
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.js +7 -3
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/worker.js +6 -3
- package/dist/commands/worker.js.map +1 -1
- package/dist/concurrency/concurrency-queue.d.ts +1 -1
- package/dist/concurrency/concurrency-queue.js +2 -2
- package/dist/concurrency/concurrency-queue.js.map +1 -1
- package/dist/controllers/api-keys.controller.js +6 -2
- package/dist/controllers/api-keys.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.js +1 -1
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +7 -0
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.d.ts +3 -3
- package/dist/controllers/security-settings.controller.js +3 -8
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/credentials-helper.js +3 -0
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/http-error-serializers.js +2 -15
- package/dist/errors/http-error-serializers.js.map +1 -1
- package/dist/errors/response-errors/bad-request.error.d.ts +1 -1
- package/dist/errors/response-errors/bad-request.error.js +2 -2
- package/dist/errors/response-errors/bad-request.error.js.map +1 -1
- package/dist/errors/response-errors/unprocessable.error.d.ts +2 -1
- package/dist/errors/response-errors/unprocessable.error.js +2 -1
- package/dist/errors/response-errors/unprocessable.error.js.map +1 -1
- package/dist/events/event.service.d.ts +1 -1
- package/dist/events/event.service.js +2 -2
- package/dist/events/event.service.js.map +1 -1
- package/dist/events/maps/execution-data.event-map.d.ts +1 -0
- package/dist/events/maps/relay.event-map.d.ts +13 -0
- package/dist/events/relays/log-streaming.event-relay.js +2 -2
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +2 -0
- package/dist/events/relays/telemetry.event-relay.js +21 -2
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +3 -1
- package/dist/executions/execution-data/db-store.js +14 -0
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/fs-store.d.ts +1 -1
- package/dist/executions/execution-data/fs-store.js +3 -1
- package/dist/executions/execution-data/fs-store.js.map +1 -1
- package/dist/executions/execution-data/s3-store.ee.d.ts +15 -0
- package/dist/executions/execution-data/s3-store.ee.js +115 -0
- package/dist/executions/execution-data/s3-store.ee.js.map +1 -0
- package/dist/executions/execution-data/types.d.ts +1 -1
- package/dist/executions/execution-persistence.d.ts +16 -2
- package/dist/executions/execution-persistence.js +80 -22
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/metrics/prometheus/active-workflow-metrics.service.d.ts +12 -0
- package/dist/metrics/prometheus/active-workflow-metrics.service.js +61 -0
- package/dist/metrics/prometheus/active-workflow-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/base.d.ts +5 -0
- package/dist/metrics/{types.js → prometheus/base.js} +1 -1
- package/dist/metrics/prometheus/base.js.map +1 -0
- package/dist/metrics/prometheus/cache-metrics.service.d.ts +11 -0
- package/dist/metrics/prometheus/cache-metrics.service.js +48 -0
- package/dist/metrics/prometheus/cache-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/constant.d.ts +2 -0
- package/dist/metrics/prometheus/constant.js +18 -0
- package/dist/metrics/prometheus/constant.js.map +1 -0
- package/dist/metrics/prometheus/default-metrics.service.d.ts +8 -0
- package/dist/metrics/prometheus/default-metrics.service.js +35 -0
- package/dist/metrics/prometheus/default-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/dns-cache-metrics.service.d.ts +12 -0
- package/dist/metrics/prometheus/dns-cache-metrics.service.js +58 -0
- package/dist/metrics/prometheus/dns-cache-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/event-bus-metrics.service.d.ts +15 -0
- package/dist/metrics/prometheus/event-bus-metrics.service.js +106 -0
- package/dist/metrics/prometheus/event-bus-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/execution-data-metrics.service.d.ts +12 -0
- package/dist/metrics/prometheus/execution-data-metrics.service.js +106 -0
- package/dist/metrics/prometheus/execution-data-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/index.d.ts +1 -0
- package/dist/metrics/prometheus/index.js +6 -0
- package/dist/metrics/prometheus/index.js.map +1 -0
- package/dist/metrics/prometheus/instance-role-metrics.service.d.ts +13 -0
- package/dist/metrics/prometheus/instance-role-metrics.service.js +61 -0
- package/dist/metrics/prometheus/instance-role-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/prometheus.service.d.ts +26 -0
- package/dist/metrics/prometheus/prometheus.service.js +105 -0
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -0
- package/dist/metrics/prometheus/pss-metrics.service.d.ts +9 -0
- package/dist/metrics/prometheus/pss-metrics.service.js +59 -0
- package/dist/metrics/prometheus/pss-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/queue-metrics.service.d.ts +13 -0
- package/dist/metrics/prometheus/queue-metrics.service.js +71 -0
- package/dist/metrics/prometheus/queue-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/route-metrics.service.d.ts +11 -0
- package/dist/metrics/prometheus/route-metrics.service.js +69 -0
- package/dist/metrics/prometheus/route-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/ssrf-metrics.service.d.ts +11 -0
- package/dist/metrics/prometheus/ssrf-metrics.service.js +65 -0
- package/dist/metrics/prometheus/ssrf-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/token-exchange-metrics.service.d.ts +10 -0
- package/dist/metrics/prometheus/token-exchange-metrics.service.js +91 -0
- package/dist/metrics/prometheus/token-exchange-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/version-metrics.service.d.ts +8 -0
- package/dist/metrics/prometheus/version-metrics.service.js +46 -0
- package/dist/metrics/prometheus/version-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/workflow-execution-duration-metrics.service.d.ts +10 -0
- package/dist/metrics/prometheus/workflow-execution-duration-metrics.service.js +61 -0
- package/dist/metrics/prometheus/workflow-execution-duration-metrics.service.js.map +1 -0
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.d.ts +17 -0
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.js +130 -0
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.js.map +1 -0
- package/dist/modules/agents/agent-knowledge.service.d.ts +3 -32
- package/dist/modules/agents/agent-knowledge.service.js +7 -248
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +1 -6
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +2 -28
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agents-list.controller.d.ts +9 -0
- package/dist/modules/agents/agents-list.controller.js +39 -0
- package/dist/modules/agents/agents-list.controller.js.map +1 -0
- package/dist/modules/agents/agents.controller.d.ts +6 -6
- package/dist/modules/agents/agents.controller.js +12 -19
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +3 -2
- package/dist/modules/agents/agents.module.js +4 -2
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +10 -2
- package/dist/modules/agents/agents.service.js +119 -82
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/entities/agent-chat-subscription.entity.d.ts +10 -0
- package/dist/modules/agents/entities/{agent-file.entity.js → agent-chat-subscription.entity.js} +34 -23
- package/dist/modules/agents/entities/agent-chat-subscription.entity.js.map +1 -0
- package/dist/modules/agents/execution-recorder.js +15 -2
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-subscription-state.adapter.d.ts +43 -0
- package/dist/modules/agents/integrations/agent-chat-subscription-state.adapter.js +139 -0
- package/dist/modules/agents/integrations/agent-chat-subscription-state.adapter.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-subscription-state.service.d.ts +26 -0
- package/dist/modules/agents/integrations/agent-chat-subscription-state.service.js +88 -0
- package/dist/modules/agents/integrations/agent-chat-subscription-state.service.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +3 -1
- package/dist/modules/agents/integrations/chat-integration.service.js +47 -18
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js +8 -8
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/repositories/agent-chat-subscription.repository.d.ts +15 -0
- package/dist/modules/agents/repositories/agent-chat-subscription.repository.js +51 -0
- package/dist/modules/agents/repositories/agent-chat-subscription.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent.repository.js +28 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/data-table/data-table.repository.js +1 -1
- package/dist/modules/data-table/data-table.repository.js.map +1 -1
- package/dist/modules/data-table/utils/sql-utils.js +16 -1
- package/dist/modules/data-table/utils/sql-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +15 -7
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.js +51 -32
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +77 -13
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.js +8 -1
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +2 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +5 -4
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +7 -121
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +5 -28
- package/dist/modules/instance-ai/instance-ai.service.js +58 -471
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/output-redaction-config.d.ts +3 -0
- package/dist/modules/instance-ai/output-redaction-config.js +19 -0
- package/dist/modules/instance-ai/output-redaction-config.js.map +1 -0
- package/dist/modules/instance-ai/sandbox/index.d.ts +1 -0
- package/dist/modules/instance-ai/sandbox/index.js +6 -0
- package/dist/modules/instance-ai/sandbox/index.js.map +1 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.d.ts +77 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +297 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -0
- package/dist/modules/instance-ai/suspended-run-restorer.service.d.ts +62 -0
- package/dist/modules/instance-ai/suspended-run-restorer.service.js +116 -0
- package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -0
- package/dist/modules/instance-ai/suspended-thread-persistence.service.d.ts +51 -0
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js +106 -0
- package/dist/modules/instance-ai/suspended-thread-persistence.service.js.map +1 -0
- package/dist/modules/instance-ai/web-research/fetch-and-extract.d.ts +1 -1
- package/dist/modules/mcp/mcp-api-key.service.d.ts +3 -7
- package/dist/modules/mcp/mcp-api-key.service.js +1 -22
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +13 -0
- package/dist/modules/mcp/mcp-protected-resource.js +39 -0
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -0
- package/dist/modules/mcp/mcp-server-middleware.service.d.ts +5 -4
- package/dist/modules/mcp/mcp-server-middleware.service.js +9 -6
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.errors.d.ts +0 -13
- package/dist/modules/mcp/mcp.errors.js +1 -27
- package/dist/modules/mcp/mcp.errors.js.map +1 -1
- package/dist/modules/mcp/mcp.module.d.ts +0 -1
- package/dist/modules/mcp/mcp.module.js +3 -11
- package/dist/modules/mcp/mcp.module.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +5 -1
- package/dist/modules/mcp/mcp.service.js +16 -2
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +6 -14
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-tags.tool.d.ts +26 -0
- package/dist/modules/mcp/tools/list-tags.tool.js +91 -0
- package/dist/modules/mcp/tools/list-tags.tool.js.map +1 -0
- package/dist/modules/mcp/tools/schemas.d.ts +7 -0
- package/dist/modules/mcp/tools/schemas.js +3 -1
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +2 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +14 -4
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.js +2 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +24 -6
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/explore-node-resources.tool.d.ts +18 -0
- package/dist/modules/mcp/tools/workflow-builder/explore-node-resources.tool.js +119 -0
- package/dist/modules/mcp/tools/workflow-builder/explore-node-resources.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +4 -4
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +8 -6
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +4 -294
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +137 -16
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +23 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +54 -2
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-validation.utils.js +1 -0
- package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
- package/dist/modules/mcp-registry/node-description-transform.js +6 -0
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.d.ts +4 -0
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +14 -0
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +9 -7
- package/dist/modules/n8n-packages/engine/import-pipeline.js +57 -113
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +11 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +114 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-importer.d.ts +4 -5
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js +9 -12
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +27 -2
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.d.ts +3 -7
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +6 -13
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +3 -10
- package/dist/modules/n8n-packages/entities/credential/credential.types.js +0 -4
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js +11 -6
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.js +12 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-id-policy.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-id-policy.js +12 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-id-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.d.ts +15 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js +18 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-import.types.d.ts +47 -0
- package/dist/modules/n8n-packages/entities/workflow/{workflow-conflict-policy.types.js → workflow-import.types.js} +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-import.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.d.ts +14 -6
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +136 -19
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.d.ts +16 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +87 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.js +28 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.js +10 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.d.ts +10 -3
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js +103 -20
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.config.d.ts +6 -0
- package/dist/modules/n8n-packages/n8n-packages.config.js +43 -0
- package/dist/modules/n8n-packages/n8n-packages.config.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.controller.js +0 -1
- package/dist/modules/n8n-packages/n8n-packages.controller.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.module.js +0 -2
- package/dist/modules/n8n-packages/n8n-packages.module.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +41 -7
- package/dist/modules/n8n-packages/n8n-packages.types.js +7 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +3 -3
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.js +2 -2
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -1
- package/dist/modules/oauth-server/database/entities/oauth-access-token.entity.js.map +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-authorization-code.entity.js.map +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-client.entity.js.map +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js.map +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-user-consent.entity.js.map +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-access-token.repository.js.map +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-authorization-code.repository.js.map +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-client.repository.js.map +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js.map +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-user-consent.repository.js.map +1 -0
- package/dist/modules/oauth-server/dto/approve-consent-request.dto.js.map +1 -0
- package/dist/modules/{mcp/mcp-oauth-authorization-code.service.d.ts → oauth-server/oauth-authorization-code.service.d.ts} +1 -1
- package/dist/modules/{mcp/mcp-oauth-authorization-code.service.js → oauth-server/oauth-authorization-code.service.js} +12 -12
- package/dist/modules/oauth-server/oauth-authorization-code.service.js.map +1 -0
- package/dist/modules/{mcp/mcp.oauth-clients.controller.d.ts → oauth-server/oauth-clients.controller.d.ts} +4 -4
- package/dist/modules/{mcp/mcp.oauth-clients.controller.js → oauth-server/oauth-clients.controller.js} +16 -16
- package/dist/modules/oauth-server/oauth-clients.controller.js.map +1 -0
- package/dist/modules/{mcp/mcp.auth.consent.controller.d.ts → oauth-server/oauth-consent.controller.d.ts} +3 -3
- package/dist/modules/{mcp/mcp.auth.consent.controller.js → oauth-server/oauth-consent.controller.js} +16 -10
- package/dist/modules/oauth-server/oauth-consent.controller.js.map +1 -0
- package/dist/modules/{mcp/mcp-oauth-consent.service.d.ts → oauth-server/oauth-consent.service.d.ts} +16 -7
- package/dist/modules/{mcp/mcp-oauth-consent.service.js → oauth-server/oauth-consent.service.js} +28 -12
- package/dist/modules/oauth-server/oauth-consent.service.js.map +1 -0
- package/dist/modules/oauth-server/oauth-server.module.d.ts +5 -0
- package/dist/modules/oauth-server/oauth-server.module.js +75 -0
- package/dist/modules/oauth-server/oauth-server.module.js.map +1 -0
- package/dist/modules/{mcp/mcp-oauth-service.d.ts → oauth-server/oauth-server.service.d.ts} +6 -6
- package/dist/modules/{mcp/mcp-oauth-service.js → oauth-server/oauth-server.service.js} +33 -30
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -0
- package/dist/modules/oauth-server/oauth-session.service.js.map +1 -0
- package/dist/modules/{mcp/mcp-oauth-token.service.d.ts → oauth-server/oauth-token.service.d.ts} +5 -8
- package/dist/modules/{mcp/mcp-oauth-token.service.js → oauth-server/oauth-token.service.js} +29 -30
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -0
- package/dist/modules/{mcp/mcp.oauth.controller.d.ts → oauth-server/oauth.controller.d.ts} +5 -3
- package/dist/modules/{mcp/mcp.oauth.controller.js → oauth-server/oauth.controller.js} +79 -68
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -0
- package/dist/modules/oauth-server/oauth.errors.d.ts +13 -0
- package/dist/modules/oauth-server/oauth.errors.js +30 -0
- package/dist/modules/oauth-server/oauth.errors.js.map +1 -0
- package/dist/modules/{mcp/mcp-oauth.helpers.d.ts → oauth-server/oauth.helpers.d.ts} +1 -1
- package/dist/modules/{mcp/mcp-oauth.helpers.js → oauth-server/oauth.helpers.js} +4 -4
- package/dist/modules/oauth-server/oauth.helpers.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +4 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +41 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.d.ts +28 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js +78 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.d.ts +30 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js +95 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.d.ts +5 -4
- package/dist/modules/otel/execution-level-tracer.js +8 -5
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +8 -4
- package/dist/modules/otel/otel-lifecycle-handler.js +32 -15
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/otel/otel-settings.controller.d.ts +18 -0
- package/dist/modules/otel/otel-settings.controller.js +79 -0
- package/dist/modules/otel/otel-settings.controller.js.map +1 -0
- package/dist/modules/otel/otel-settings.service.d.ts +21 -0
- package/dist/modules/otel/otel-settings.service.js +89 -0
- package/dist/modules/otel/otel-settings.service.js.map +1 -0
- package/dist/modules/otel/otel.config.js +11 -10
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +14 -0
- package/dist/modules/otel/otel.constants.js +15 -1
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/otel/otel.module.js +9 -17
- package/dist/modules/otel/otel.module.js.map +1 -1
- package/dist/modules/otel/otel.service.d.ts +15 -4
- package/dist/modules/otel/otel.service.js +73 -17
- package/dist/modules/otel/otel.service.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.d.ts +1 -0
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +46 -19
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.js +0 -6
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +2 -5
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js +3 -2
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.js +39 -20
- package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +14 -0
- package/dist/oauth/oauth.service.js +220 -102
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/oauth/types.d.ts +1 -0
- package/dist/oauth/types.js.map +1 -1
- package/dist/public-api/index.js +8 -8
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +1 -6
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +7 -8
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +1 -1
- 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 +3 -3
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +208 -51
- package/dist/push/abstract.push.d.ts +1 -2
- package/dist/push/abstract.push.js +1 -2
- package/dist/push/abstract.push.js.map +1 -1
- package/dist/push/index.d.ts +1 -2
- package/dist/push/index.js +3 -4
- package/dist/push/index.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/job-processor.d.ts +0 -1
- package/dist/scaling/job-processor.js +1 -23
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/multi-main-setup.ee.d.ts +1 -2
- package/dist/scaling/multi-main-setup.ee.js +1 -2
- package/dist/scaling/multi-main-setup.ee.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +7 -0
- package/dist/scaling/pubsub/pubsub.eventbus.d.ts +1 -1
- package/dist/scaling/pubsub/pubsub.eventbus.js +2 -2
- package/dist/scaling/pubsub/pubsub.eventbus.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/worker-server.d.ts +1 -1
- package/dist/scaling/worker-server.js +5 -5
- package/dist/scaling/worker-server.js.map +1 -1
- package/dist/server.js +4 -3
- package/dist/server.js.map +1 -1
- package/dist/services/ai-workflow-builder.service.d.ts +2 -1
- package/dist/services/ai-workflow-builder.service.js +2 -1
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/cache/cache.service.d.ts +1 -1
- package/dist/services/cache/cache.service.js +2 -2
- package/dist/services/cache/cache.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +16 -0
- package/dist/services/node-resource-explorer.service.js +154 -0
- package/dist/services/node-resource-explorer.service.js.map +1 -0
- package/dist/services/oauth-token-verifier-proxy.service.d.ts +22 -0
- package/dist/services/oauth-token-verifier-proxy.service.js +36 -0
- package/dist/services/oauth-token-verifier-proxy.service.js.map +1 -0
- package/dist/services/protected-resource.registry.d.ts +31 -0
- package/dist/services/protected-resource.registry.js +115 -0
- package/dist/services/protected-resource.registry.js.map +1 -0
- package/dist/services/public-api-key.service.d.ts +8 -2
- package/dist/services/public-api-key.service.js +29 -6
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/redis-client.service.d.ts +2 -2
- package/dist/services/redis-client.service.js +6 -4
- package/dist/services/redis-client.service.js.map +1 -1
- package/dist/services/tag.service.d.ts +10 -0
- package/dist/services/tag.service.js +84 -4
- package/dist/services/tag.service.js.map +1 -1
- package/dist/services/workflow-statistics.service.d.ts +1 -2
- package/dist/services/workflow-statistics.service.js +1 -2
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/task-runners/sliding-window-signal.d.ts +1 -1
- package/dist/task-runners/task-runner-lifecycle-events.d.ts +1 -1
- package/dist/task-runners/task-runner-lifecycle-events.js +2 -2
- package/dist/task-runners/task-runner-lifecycle-events.js.map +1 -1
- package/dist/task-runners/task-runner-process-base.d.ts +1 -2
- package/dist/task-runners/task-runner-process-base.js +1 -2
- package/dist/task-runners/task-runner-process-base.js.map +1 -1
- package/dist/task-runners/task-runner-process-restart-loop-detector.d.ts +1 -1
- package/dist/task-runners/task-runner-process-restart-loop-detector.js +2 -2
- package/dist/task-runners/task-runner-process-restart-loop-detector.js.map +1 -1
- package/dist/user-management/email/templates/api-key-revoked.handlebars +196 -0
- package/dist/user-management/email/user-management-mailer.d.ts +6 -2
- package/dist/user-management/email/user-management-mailer.js +32 -0
- package/dist/user-management/email/user-management-mailer.js.map +1 -1
- package/dist/wait-tracker.d.ts +1 -1
- package/dist/wait-tracker.js +3 -3
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +30 -1
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-server.js +2 -2
- package/dist/webhooks/webhook-server.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +4 -1
- package/dist/webhooks/webhook.service.js +19 -4
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +1 -1
- package/dist/workflow-execute-additional-data.js +4 -1
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +1 -1
- package/dist/workflow-helpers.js +13 -3
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.js +0 -2
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/publication-result.d.ts +17 -0
- package/dist/workflows/publication/publication-result.js +3 -0
- package/dist/workflows/publication/publication-result.js.map +1 -0
- package/dist/workflows/publication/publication-status-reporter.d.ts +19 -0
- package/dist/workflows/publication/publication-status-reporter.js +110 -0
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -0
- package/dist/workflows/publication/trigger-diff.d.ts +6 -0
- package/dist/workflows/publication/trigger-diff.js +27 -0
- package/dist/workflows/publication/trigger-diff.js.map +1 -0
- package/dist/workflows/publication/workflow-publication-applier.d.ts +14 -0
- package/dist/workflows/publication/workflow-publication-applier.js +96 -0
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -0
- package/dist/workflows/{workflow-publication-outbox-consumer.d.ts → publication/workflow-publication-outbox-consumer.d.ts} +9 -13
- package/dist/workflows/{workflow-publication-outbox-consumer.js → publication/workflow-publication-outbox-consumer.js} +25 -93
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -0
- package/dist/workflows/triggers/non-webhook-trigger-registrar.d.ts +39 -0
- package/dist/workflows/triggers/non-webhook-trigger-registrar.js +58 -0
- package/dist/workflows/triggers/non-webhook-trigger-registrar.js.map +1 -0
- package/dist/workflows/triggers/trigger-count.service.d.ts +5 -0
- package/dist/workflows/triggers/trigger-count.service.js +65 -0
- package/dist/workflows/triggers/trigger-count.service.js.map +1 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +33 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.js +171 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +29 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.js +143 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -0
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +56 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js +313 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -0
- package/dist/workflows/workflow-validation.service.d.ts +3 -0
- package/dist/workflows/workflow-validation.service.js +63 -37
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +5 -3
- package/dist/workflows/workflow.service.js +91 -28
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +3 -3
- package/dist/workflows/workflows.controller.js +3 -3
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +34 -33
- package/templates/oauth-callback.handlebars +3 -0
- package/templates/oauth-error-callback.handlebars +3 -0
- package/dist/metrics/prometheus-metrics.service.d.ts +0 -54
- package/dist/metrics/prometheus-metrics.service.js +0 -607
- package/dist/metrics/prometheus-metrics.service.js.map +0 -1
- package/dist/metrics/types.d.ts +0 -6
- package/dist/metrics/types.js.map +0 -1
- package/dist/modules/agents/agent-knowledge-command.service.d.ts +0 -40
- package/dist/modules/agents/agent-knowledge-command.service.js +0 -221
- package/dist/modules/agents/agent-knowledge-command.service.js.map +0 -1
- package/dist/modules/agents/entities/agent-file.entity.d.ts +0 -11
- package/dist/modules/agents/entities/agent-file.entity.js.map +0 -1
- package/dist/modules/agents/repositories/agent-file.repository.d.ts +0 -7
- package/dist/modules/agents/repositories/agent-file.repository.js +0 -35
- package/dist/modules/agents/repositories/agent-file.repository.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/csv-helpers.d.ts +0 -73
- package/dist/modules/agents/tools/knowledge/csv-helpers.js +0 -341
- package/dist/modules/agents/tools/knowledge/csv-helpers.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/csv.operation.d.ts +0 -61
- package/dist/modules/agents/tools/knowledge/csv.operation.js +0 -207
- package/dist/modules/agents/tools/knowledge/csv.operation.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/file-references.d.ts +0 -16
- package/dist/modules/agents/tools/knowledge/file-references.js +0 -35
- package/dist/modules/agents/tools/knowledge/file-references.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/read.operation.d.ts +0 -8
- package/dist/modules/agents/tools/knowledge/read.operation.js +0 -38
- package/dist/modules/agents/tools/knowledge/read.operation.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/schemas.d.ts +0 -1505
- package/dist/modules/agents/tools/knowledge/schemas.js +0 -441
- package/dist/modules/agents/tools/knowledge/schemas.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/search.operation.d.ts +0 -9
- package/dist/modules/agents/tools/knowledge/search.operation.js +0 -332
- package/dist/modules/agents/tools/knowledge/search.operation.js.map +0 -1
- package/dist/modules/agents/tools/knowledge/tool.d.ts +0 -8
- package/dist/modules/agents/tools/knowledge/tool.js +0 -121
- package/dist/modules/agents/tools/knowledge/tool.js.map +0 -1
- package/dist/modules/mcp/database/entities/oauth-access-token.entity.js.map +0 -1
- package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.js.map +0 -1
- package/dist/modules/mcp/database/entities/oauth-client.entity.js.map +0 -1
- package/dist/modules/mcp/database/entities/oauth-refresh-token.entity.js.map +0 -1
- package/dist/modules/mcp/database/entities/oauth-user-consent.entity.js.map +0 -1
- package/dist/modules/mcp/database/repositories/oauth-access-token.repository.js.map +0 -1
- package/dist/modules/mcp/database/repositories/oauth-authorization-code.repository.js.map +0 -1
- package/dist/modules/mcp/database/repositories/oauth-client.repository.js.map +0 -1
- package/dist/modules/mcp/database/repositories/oauth-refresh-token.repository.js.map +0 -1
- package/dist/modules/mcp/database/repositories/oauth-user-consent.repository.js.map +0 -1
- package/dist/modules/mcp/dto/approve-consent-request.dto.js.map +0 -1
- package/dist/modules/mcp/mcp-oauth-authorization-code.service.js.map +0 -1
- package/dist/modules/mcp/mcp-oauth-consent.service.js.map +0 -1
- package/dist/modules/mcp/mcp-oauth-service.js.map +0 -1
- package/dist/modules/mcp/mcp-oauth-token.service.js.map +0 -1
- package/dist/modules/mcp/mcp-oauth.helpers.js.map +0 -1
- package/dist/modules/mcp/mcp.auth.consent.controller.js.map +0 -1
- package/dist/modules/mcp/mcp.oauth-clients.controller.js.map +0 -1
- package/dist/modules/mcp/mcp.oauth.controller.js.map +0 -1
- package/dist/modules/mcp/oauth-session.service.js.map +0 -1
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.d.ts +0 -7
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.js +0 -35
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.js.map +0 -1
- package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.d.ts +0 -3
- package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.js +0 -14
- package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.d.ts +0 -9
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.js +0 -41
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.d.ts +0 -10
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.js +0 -20
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.d.ts +0 -11
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.js +0 -42
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.d.ts +0 -9
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.js +0 -33
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.d.ts +0 -10
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.js +0 -37
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.d.ts +0 -20
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.js.map +0 -1
- package/dist/modules/redaction/redaction-enforcement.feature-flag.d.ts +0 -2
- package/dist/modules/redaction/redaction-enforcement.feature-flag.js +0 -9
- package/dist/modules/redaction/redaction-enforcement.feature-flag.js.map +0 -1
- package/dist/typed-emitter.d.ts +0 -14
- package/dist/typed-emitter.js +0 -29
- package/dist/typed-emitter.js.map +0 -1
- package/dist/workflows/workflow-publication-outbox-consumer.js.map +0 -1
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-access-token.entity.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-access-token.entity.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-authorization-code.entity.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-authorization-code.entity.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-client.entity.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-client.entity.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-refresh-token.entity.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-refresh-token.entity.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-user-consent.entity.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/entities/oauth-user-consent.entity.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-access-token.repository.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-access-token.repository.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-authorization-code.repository.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-authorization-code.repository.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-client.repository.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-client.repository.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-refresh-token.repository.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-refresh-token.repository.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-user-consent.repository.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/database/repositories/oauth-user-consent.repository.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/dto/approve-consent-request.dto.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/dto/approve-consent-request.dto.js +0 -0
- /package/dist/modules/{mcp → oauth-server}/oauth-session.service.d.ts +0 -0
- /package/dist/modules/{mcp → oauth-server}/oauth-session.service.js +0 -0
|
@@ -60,13 +60,16 @@ const instance_ai_gateway_service_1 = require("./instance-ai-gateway.service");
|
|
|
60
60
|
const instance_ai_memory_service_1 = require("./instance-ai-memory.service");
|
|
61
61
|
const instance_ai_settings_service_1 = require("./instance-ai-settings.service");
|
|
62
62
|
const instance_ai_adapter_service_1 = require("./instance-ai.adapter.service");
|
|
63
|
+
const output_redaction_config_1 = require("./output-redaction-config");
|
|
63
64
|
const internal_messages_1 = require("./internal-messages");
|
|
64
65
|
const liveness_1 = require("./liveness");
|
|
65
66
|
const mcp_1 = require("./mcp");
|
|
66
67
|
const instance_ai_pending_confirmation_repository_1 = require("./repositories/instance-ai-pending-confirmation.repository");
|
|
67
68
|
const instance_ai_thread_repository_1 = require("./repositories/instance-ai-thread.repository");
|
|
69
|
+
const sandbox_1 = require("./sandbox");
|
|
70
|
+
const suspended_run_restorer_service_1 = require("./suspended-run-restorer.service");
|
|
71
|
+
const suspended_thread_persistence_service_1 = require("./suspended-thread-persistence.service");
|
|
68
72
|
const run_trace_metadata_1 = require("./run-trace-metadata");
|
|
69
|
-
const sandbox_provider_1 = require("./sandbox-provider");
|
|
70
73
|
const db_iteration_log_storage_1 = require("./storage/db-iteration-log-storage");
|
|
71
74
|
const db_snapshot_storage_1 = require("./storage/db-snapshot-storage");
|
|
72
75
|
const typeorm_agent_checkpoint_store_1 = require("./storage/typeorm-agent-checkpoint-store");
|
|
@@ -83,6 +86,7 @@ const ai_service_1 = require("../../services/ai.service");
|
|
|
83
86
|
const proxy_token_manager_1 = require("../../services/proxy-token-manager");
|
|
84
87
|
const url_service_1 = require("../../services/url.service");
|
|
85
88
|
const telemetry_1 = require("../../telemetry");
|
|
89
|
+
const backend_network_1 = require("@n8n/backend-network");
|
|
86
90
|
function getErrorMessage(error) {
|
|
87
91
|
return error instanceof Error ? error.message : String(error);
|
|
88
92
|
}
|
|
@@ -103,66 +107,6 @@ function isTextMessagePart(part) {
|
|
|
103
107
|
typeof part.text === 'string');
|
|
104
108
|
}
|
|
105
109
|
const ORCHESTRATOR_AGENT_ID = 'agent-001';
|
|
106
|
-
const SANDBOX_NAME_MAX_LEN = 63;
|
|
107
|
-
const SANDBOX_LABEL_MAX_LEN = 63;
|
|
108
|
-
const NAME_PREFIX_SLUG_MAX_LEN = 24;
|
|
109
|
-
const DEFAULT_SANDBOX_TTL_MS = 15 * 60 * 1000;
|
|
110
|
-
function slugifySandboxName(value, maxLen) {
|
|
111
|
-
const slug = value
|
|
112
|
-
.toLowerCase()
|
|
113
|
-
.replace(/[^a-z0-9]+/g, '-')
|
|
114
|
-
.replace(/^-+|-+$/g, '');
|
|
115
|
-
return slug.slice(0, maxLen).replace(/-+$/, '');
|
|
116
|
-
}
|
|
117
|
-
function slugifySandboxLabel(value, maxLen) {
|
|
118
|
-
return value
|
|
119
|
-
.replace(/[^A-Za-z0-9_.-]+/g, '-')
|
|
120
|
-
.replace(/^[-.]+|[-.]+$/g, '')
|
|
121
|
-
.slice(0, maxLen)
|
|
122
|
-
.replace(/[-.]+$/, '');
|
|
123
|
-
}
|
|
124
|
-
function getThreadScopedSandboxName(threadId) {
|
|
125
|
-
return `instance-ai-thread-${threadId}`;
|
|
126
|
-
}
|
|
127
|
-
function buildThreadScopedSandboxName(threadId, namePrefix) {
|
|
128
|
-
const parts = [];
|
|
129
|
-
if (namePrefix) {
|
|
130
|
-
const prefixSlug = slugifySandboxName(namePrefix, NAME_PREFIX_SLUG_MAX_LEN);
|
|
131
|
-
if (prefixSlug)
|
|
132
|
-
parts.push(prefixSlug);
|
|
133
|
-
}
|
|
134
|
-
const threadSlug = slugifySandboxName(getThreadScopedSandboxName(threadId), SANDBOX_NAME_MAX_LEN);
|
|
135
|
-
if (threadSlug)
|
|
136
|
-
parts.push(threadSlug);
|
|
137
|
-
const name = slugifySandboxName(parts.join('-'), SANDBOX_NAME_MAX_LEN);
|
|
138
|
-
if (!name)
|
|
139
|
-
throw new n8n_workflow_1.UnexpectedError('Failed to build thread-scoped sandbox name');
|
|
140
|
-
return name;
|
|
141
|
-
}
|
|
142
|
-
function buildThreadScopedSandboxLabels(threadId, namePrefix) {
|
|
143
|
-
const baseName = getThreadScopedSandboxName(threadId);
|
|
144
|
-
const labels = {
|
|
145
|
-
'n8n-builder': slugifySandboxLabel(baseName, SANDBOX_LABEL_MAX_LEN),
|
|
146
|
-
thread_id: slugifySandboxLabel(threadId, SANDBOX_LABEL_MAX_LEN),
|
|
147
|
-
};
|
|
148
|
-
if (namePrefix)
|
|
149
|
-
labels.name_prefix = slugifySandboxLabel(namePrefix, SANDBOX_LABEL_MAX_LEN);
|
|
150
|
-
return labels;
|
|
151
|
-
}
|
|
152
|
-
function withThreadScopedSandboxIdentity(config, threadId) {
|
|
153
|
-
if (!config.enabled || config.provider !== 'daytona')
|
|
154
|
-
return config;
|
|
155
|
-
const name = buildThreadScopedSandboxName(threadId, config.namePrefix);
|
|
156
|
-
return {
|
|
157
|
-
...config,
|
|
158
|
-
id: name,
|
|
159
|
-
name,
|
|
160
|
-
labels: {
|
|
161
|
-
...buildThreadScopedSandboxLabels(threadId, config.namePrefix),
|
|
162
|
-
...config.labels,
|
|
163
|
-
},
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
110
|
function getUserFacingErrorMessage(error) {
|
|
167
111
|
if (error instanceof n8n_workflow_1.UserError) {
|
|
168
112
|
return error.message;
|
|
@@ -357,8 +301,6 @@ let InstanceAiService = class InstanceAiService {
|
|
|
357
301
|
this.runState = new instance_ai_1.RunStateRegistry();
|
|
358
302
|
this.backgroundTasks = new instance_ai_1.BackgroundTaskManager(MAX_CONCURRENT_BACKGROUND_TASKS_PER_THREAD);
|
|
359
303
|
this.traceContextsByRunId = new Map();
|
|
360
|
-
this.sandboxes = new Map();
|
|
361
|
-
this.sandboxCreations = new Map();
|
|
362
304
|
this.domainAccessTrackersByThread = new Map();
|
|
363
305
|
this.threadPushRef = new Map();
|
|
364
306
|
this.planRequestsByThread = new Map();
|
|
@@ -375,6 +317,23 @@ let InstanceAiService = class InstanceAiService {
|
|
|
375
317
|
this.workflowObligations = new workflow_verification_obligation_service_1.WorkflowVerificationObligationService(this.agentMemory);
|
|
376
318
|
this.taskProjector = new workflow_verification_task_projector_1.WorkflowVerificationTaskProjector(this.agentMemory, this.eventBus, this.logger, this.workflowObligations);
|
|
377
319
|
this.instanceAiConfig = globalConfig.instanceAi;
|
|
320
|
+
this.suspendedThreads = new suspended_thread_persistence_service_1.SuspendedThreadPersistenceService({
|
|
321
|
+
logger: this.logger,
|
|
322
|
+
config: this.instanceAiConfig,
|
|
323
|
+
pendingConfirmationRepo: this.pendingConfirmationRepo,
|
|
324
|
+
agentMemory: this.agentMemory,
|
|
325
|
+
});
|
|
326
|
+
this.suspendedRunRestorer = new suspended_run_restorer_service_1.SuspendedRunRestorer({
|
|
327
|
+
logger: this.logger,
|
|
328
|
+
pendingConfirmationRepo: this.pendingConfirmationRepo,
|
|
329
|
+
runState: this.runState,
|
|
330
|
+
dbSnapshotStorage: this.dbSnapshotStorage,
|
|
331
|
+
eventBus: this.eventBus,
|
|
332
|
+
rebuilder: {
|
|
333
|
+
rebuildSuspendedRun: this.rebuildSuspendedRunFromCheckpoint.bind(this),
|
|
334
|
+
resumeSuspendedRun: this.resumeSuspendedRun.bind(this),
|
|
335
|
+
},
|
|
336
|
+
});
|
|
378
337
|
const livenessPolicyConfig = (0, instance_ai_1.createInstanceAiLivenessPolicyConfig)({
|
|
379
338
|
confirmationTimeoutMs: this.instanceAiConfig.confirmationTimeout,
|
|
380
339
|
});
|
|
@@ -389,9 +348,18 @@ let InstanceAiService = class InstanceAiService {
|
|
|
389
348
|
void this.finalizeCancelledSuspendedRun(suspended, reason);
|
|
390
349
|
},
|
|
391
350
|
onPendingConfirmationRejected: (requestId) => {
|
|
392
|
-
void this.dropPendingConfirmation(requestId);
|
|
351
|
+
void this.suspendedThreads.dropPendingConfirmation(requestId);
|
|
393
352
|
},
|
|
394
353
|
});
|
|
354
|
+
this.sandboxService = new sandbox_1.InstanceAiSandboxService({
|
|
355
|
+
config: this.instanceAiConfig,
|
|
356
|
+
logger: this.logger,
|
|
357
|
+
errorReporter: this.errorReporter,
|
|
358
|
+
runState: this.runState,
|
|
359
|
+
backgroundTasks: this.backgroundTasks,
|
|
360
|
+
settingsService: this.settingsService,
|
|
361
|
+
aiService: this.aiService,
|
|
362
|
+
});
|
|
395
363
|
this.defaultTimeZone = globalConfig.generic.timezone;
|
|
396
364
|
const restEndpoint = globalConfig.endpoints.rest;
|
|
397
365
|
this.oauth2CallbackUrl = `${this.urlService.getInstanceBaseUrl()}/${restEndpoint}/oauth2-credential/callback`;
|
|
@@ -414,216 +382,6 @@ let InstanceAiService = class InstanceAiService {
|
|
|
414
382
|
if (this.instanceSettings.isLeader)
|
|
415
383
|
this.startCheckpointPruning();
|
|
416
384
|
}
|
|
417
|
-
getSandboxConfigFromEnv() {
|
|
418
|
-
const { sandboxEnabled, sandboxProvider, daytonaApiUrl, daytonaApiKey, n8nSandboxServiceUrl, n8nSandboxServiceApiKey, sandboxImage, sandboxTimeout, sandboxNamePrefix, daytonaTokenRefreshSkewMs, } = this.instanceAiConfig;
|
|
419
|
-
const provider = (0, sandbox_provider_1.normalizeSandboxProvider)(sandboxProvider);
|
|
420
|
-
if (!sandboxEnabled) {
|
|
421
|
-
return {
|
|
422
|
-
enabled: false,
|
|
423
|
-
provider,
|
|
424
|
-
timeout: sandboxTimeout,
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
if (provider === 'daytona') {
|
|
428
|
-
return {
|
|
429
|
-
enabled: true,
|
|
430
|
-
provider: 'daytona',
|
|
431
|
-
daytonaApiUrl: daytonaApiUrl || undefined,
|
|
432
|
-
daytonaApiKey: daytonaApiKey || undefined,
|
|
433
|
-
image: sandboxImage || undefined,
|
|
434
|
-
n8nVersion: constants_1.N8N_VERSION || undefined,
|
|
435
|
-
timeout: sandboxTimeout,
|
|
436
|
-
namePrefix: sandboxNamePrefix || undefined,
|
|
437
|
-
refreshSkewMs: daytonaTokenRefreshSkewMs,
|
|
438
|
-
};
|
|
439
|
-
}
|
|
440
|
-
return {
|
|
441
|
-
enabled: true,
|
|
442
|
-
provider: 'n8n-sandbox',
|
|
443
|
-
serviceUrl: (0, sandbox_provider_1.requireN8nSandboxServiceUrl)(n8nSandboxServiceUrl),
|
|
444
|
-
apiKey: n8nSandboxServiceApiKey || undefined,
|
|
445
|
-
timeout: sandboxTimeout,
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
async resolveSandboxConfig(user) {
|
|
449
|
-
const base = this.getSandboxConfigFromEnv();
|
|
450
|
-
if (!base.enabled)
|
|
451
|
-
return base;
|
|
452
|
-
if (base.provider === 'daytona') {
|
|
453
|
-
if (this.aiService.isProxyEnabled()) {
|
|
454
|
-
const client = await this.aiService.getClient();
|
|
455
|
-
const proxyConfig = await client.getSandboxProxyConfig();
|
|
456
|
-
return {
|
|
457
|
-
...base,
|
|
458
|
-
daytonaApiUrl: client.getSandboxProxyBaseUrl(),
|
|
459
|
-
image: proxyConfig.image,
|
|
460
|
-
logger: this.logger,
|
|
461
|
-
getAuthToken: async () => {
|
|
462
|
-
const token = await client.getBuilderApiProxyToken({ id: user.id }, { userMessageId: (0, nanoid_1.nanoid)() });
|
|
463
|
-
return token.accessToken;
|
|
464
|
-
},
|
|
465
|
-
};
|
|
466
|
-
}
|
|
467
|
-
const daytona = await this.settingsService.resolveDaytonaConfig(user);
|
|
468
|
-
return {
|
|
469
|
-
...base,
|
|
470
|
-
daytonaApiUrl: daytona.apiUrl ?? base.daytonaApiUrl,
|
|
471
|
-
daytonaApiKey: daytona.apiKey ?? base.daytonaApiKey,
|
|
472
|
-
};
|
|
473
|
-
}
|
|
474
|
-
const sandbox = await this.settingsService.resolveN8nSandboxConfig(user);
|
|
475
|
-
return {
|
|
476
|
-
...base,
|
|
477
|
-
serviceUrl: sandbox.serviceUrl ?? base.serviceUrl,
|
|
478
|
-
apiKey: sandbox.apiKey ?? base.apiKey,
|
|
479
|
-
};
|
|
480
|
-
}
|
|
481
|
-
async getOrCreateWorkspaceEntry(threadId, user) {
|
|
482
|
-
const existing = this.sandboxes.get(threadId);
|
|
483
|
-
if (existing) {
|
|
484
|
-
if (this.isSandboxEntryExpired(existing) && !this.isSandboxInUse(threadId)) {
|
|
485
|
-
this.evictSandboxEntry(threadId, existing);
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
488
|
-
this.touchSandboxEntry(threadId, existing);
|
|
489
|
-
return existing;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
const pending = this.sandboxCreations.get(threadId);
|
|
493
|
-
if (pending)
|
|
494
|
-
return await pending;
|
|
495
|
-
const creation = this.createWorkspaceEntry(threadId, user);
|
|
496
|
-
this.sandboxCreations.set(threadId, creation);
|
|
497
|
-
try {
|
|
498
|
-
return await creation;
|
|
499
|
-
}
|
|
500
|
-
finally {
|
|
501
|
-
this.sandboxCreations.delete(threadId);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
async getOrCreateWorkspace(threadId, user, context) {
|
|
505
|
-
const entry = await this.getOrCreateWorkspaceEntry(threadId, user);
|
|
506
|
-
if (entry)
|
|
507
|
-
await this.ensureWorkspaceSetup(entry, context);
|
|
508
|
-
return entry;
|
|
509
|
-
}
|
|
510
|
-
async ensureWorkspaceSetup(entry, context) {
|
|
511
|
-
if (entry.setupComplete)
|
|
512
|
-
return;
|
|
513
|
-
entry.setupPromise ??= (0, instance_ai_1.setupSandboxWorkspace)(entry.workspace, context)
|
|
514
|
-
.then(() => {
|
|
515
|
-
entry.setupComplete = true;
|
|
516
|
-
})
|
|
517
|
-
.finally(() => {
|
|
518
|
-
entry.setupPromise = undefined;
|
|
519
|
-
});
|
|
520
|
-
await entry.setupPromise;
|
|
521
|
-
}
|
|
522
|
-
async createWorkspaceEntry(threadId, user) {
|
|
523
|
-
const config = withThreadScopedSandboxIdentity(await this.resolveSandboxConfig(user), threadId);
|
|
524
|
-
if (!config.enabled)
|
|
525
|
-
return undefined;
|
|
526
|
-
const sandbox = await (0, instance_ai_1.createSandbox)(config, {
|
|
527
|
-
logger: this.logger,
|
|
528
|
-
errorReporter: this.errorReporter,
|
|
529
|
-
useSnapshotFallback: true,
|
|
530
|
-
});
|
|
531
|
-
const workspace = (0, instance_ai_1.createWorkspace)(sandbox);
|
|
532
|
-
if (!sandbox || !workspace)
|
|
533
|
-
return undefined;
|
|
534
|
-
try {
|
|
535
|
-
await workspace.init();
|
|
536
|
-
}
|
|
537
|
-
catch (error) {
|
|
538
|
-
try {
|
|
539
|
-
await workspace.destroy();
|
|
540
|
-
}
|
|
541
|
-
catch {
|
|
542
|
-
}
|
|
543
|
-
throw error;
|
|
544
|
-
}
|
|
545
|
-
const entry = {
|
|
546
|
-
sandbox,
|
|
547
|
-
workspace,
|
|
548
|
-
setupComplete: false,
|
|
549
|
-
setupPromise: undefined,
|
|
550
|
-
expiresAt: this.nextSandboxExpiry(),
|
|
551
|
-
};
|
|
552
|
-
this.sandboxes.set(threadId, entry);
|
|
553
|
-
this.scheduleSandboxExpiry(threadId, entry);
|
|
554
|
-
return entry;
|
|
555
|
-
}
|
|
556
|
-
evictSandboxEntry(threadId, entry) {
|
|
557
|
-
if (this.sandboxes.get(threadId) !== entry)
|
|
558
|
-
return;
|
|
559
|
-
this.sandboxes.delete(threadId);
|
|
560
|
-
if (entry.cleanupTimer) {
|
|
561
|
-
clearTimeout(entry.cleanupTimer);
|
|
562
|
-
entry.cleanupTimer = undefined;
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
async destroySandbox(threadId, reason = 'thread_cleanup') {
|
|
566
|
-
const entry = this.sandboxes.get(threadId);
|
|
567
|
-
if (!entry?.sandbox)
|
|
568
|
-
return;
|
|
569
|
-
this.evictSandboxEntry(threadId, entry);
|
|
570
|
-
try {
|
|
571
|
-
await entry.workspace?.destroy();
|
|
572
|
-
}
|
|
573
|
-
catch (error) {
|
|
574
|
-
this.logger.warn('Failed to destroy sandbox', {
|
|
575
|
-
threadId,
|
|
576
|
-
reason,
|
|
577
|
-
error: error instanceof Error ? error.message : String(error),
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
}
|
|
581
|
-
get sandboxTtlMs() {
|
|
582
|
-
return this.instanceAiConfig?.builderSandboxTtlMs ?? DEFAULT_SANDBOX_TTL_MS;
|
|
583
|
-
}
|
|
584
|
-
nextSandboxExpiry() {
|
|
585
|
-
return Date.now() + this.sandboxTtlMs;
|
|
586
|
-
}
|
|
587
|
-
isSandboxEntryExpired(entry) {
|
|
588
|
-
return this.sandboxTtlMs > 0 && entry.expiresAt <= Date.now();
|
|
589
|
-
}
|
|
590
|
-
touchSandboxEntry(threadId, entry) {
|
|
591
|
-
if (this.sandboxTtlMs <= 0)
|
|
592
|
-
return;
|
|
593
|
-
entry.expiresAt = this.nextSandboxExpiry();
|
|
594
|
-
this.scheduleSandboxExpiry(threadId, entry);
|
|
595
|
-
}
|
|
596
|
-
isSandboxInUse(threadId) {
|
|
597
|
-
return Boolean(this.runState.getActiveRunId(threadId) ||
|
|
598
|
-
this.runState.hasSuspendedRun(threadId) ||
|
|
599
|
-
this.backgroundTasks.getRunningTasks(threadId).length > 0);
|
|
600
|
-
}
|
|
601
|
-
scheduleSandboxExpiry(threadId, entry) {
|
|
602
|
-
if (this.sandboxTtlMs <= 0)
|
|
603
|
-
return;
|
|
604
|
-
if (entry.cleanupTimer)
|
|
605
|
-
clearTimeout(entry.cleanupTimer);
|
|
606
|
-
const delay = Math.max(0, entry.expiresAt - Date.now());
|
|
607
|
-
entry.cleanupTimer = setTimeout(() => {
|
|
608
|
-
const current = this.sandboxes.get(threadId);
|
|
609
|
-
if (current !== entry)
|
|
610
|
-
return;
|
|
611
|
-
if (this.isSandboxInUse(threadId)) {
|
|
612
|
-
this.touchSandboxEntry(threadId, entry);
|
|
613
|
-
return;
|
|
614
|
-
}
|
|
615
|
-
this.evictSandboxEntry(threadId, entry);
|
|
616
|
-
}, delay);
|
|
617
|
-
entry.cleanupTimer.unref();
|
|
618
|
-
}
|
|
619
|
-
stopSandboxExpiryTimers() {
|
|
620
|
-
for (const entry of this.sandboxes.values()) {
|
|
621
|
-
if (!entry.cleanupTimer)
|
|
622
|
-
continue;
|
|
623
|
-
clearTimeout(entry.cleanupTimer);
|
|
624
|
-
entry.cleanupTimer = undefined;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
385
|
async getProxyAuth(user) {
|
|
628
386
|
const client = await this.aiService.getClient();
|
|
629
387
|
const token = await client.getBuilderApiProxyToken({ id: user.id }, { userMessageId: (0, nanoid_1.nanoid)() });
|
|
@@ -1103,7 +861,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1103
861
|
if (reason === liveness_1.INSTANCE_AI_RUN_TIMEOUT_REASON)
|
|
1104
862
|
this.liveness.markRunTimedOut(active.runId);
|
|
1105
863
|
active.abortController.abort();
|
|
1106
|
-
void this.dropPendingConfirmationsForThread(threadId);
|
|
864
|
+
void this.suspendedThreads.dropPendingConfirmationsForThread(threadId);
|
|
1107
865
|
return;
|
|
1108
866
|
}
|
|
1109
867
|
if (suspended) {
|
|
@@ -1112,7 +870,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1112
870
|
suspended.abortController.abort();
|
|
1113
871
|
void this.finalizeCancelledSuspendedRun(suspended, reason);
|
|
1114
872
|
}
|
|
1115
|
-
void this.dropPendingConfirmationsForThread(threadId);
|
|
873
|
+
void this.suspendedThreads.dropPendingConfirmationsForThread(threadId);
|
|
1116
874
|
}
|
|
1117
875
|
sendCorrectionToTask(threadId, taskId, correction) {
|
|
1118
876
|
return this.backgroundTasks.queueCorrection(threadId, taskId, correction);
|
|
@@ -1299,9 +1057,9 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1299
1057
|
this.threadPushRef.delete(threadId);
|
|
1300
1058
|
this.planRequestsByThread.delete(threadId);
|
|
1301
1059
|
this.deleteTraceContextsForThread(threadId);
|
|
1302
|
-
await this.destroySandbox(threadId);
|
|
1060
|
+
await this.sandboxService.destroySandbox(threadId);
|
|
1303
1061
|
await this.reapAiTemporaryForThreadCleanup(threadId);
|
|
1304
|
-
await this.dropPendingConfirmationsForThread(threadId);
|
|
1062
|
+
await this.suspendedThreads.dropPendingConfirmationsForThread(threadId);
|
|
1305
1063
|
this.eventBus.clearThread(threadId);
|
|
1306
1064
|
}
|
|
1307
1065
|
async shutdown() {
|
|
@@ -1348,7 +1106,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1348
1106
|
});
|
|
1349
1107
|
}
|
|
1350
1108
|
this.gatewayService.disconnectAll();
|
|
1351
|
-
this.stopSandboxExpiryTimers();
|
|
1109
|
+
this.sandboxService.stopSandboxExpiryTimers();
|
|
1352
1110
|
this.domainAccessTrackersByThread.clear();
|
|
1353
1111
|
this.traceContextsByRunId.clear();
|
|
1354
1112
|
this.eventBus.clear();
|
|
@@ -1393,7 +1151,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1393
1151
|
const entry = this.userMessagePersistenceByRun.get(runId);
|
|
1394
1152
|
if (!entry)
|
|
1395
1153
|
return;
|
|
1396
|
-
const ok = await this.persistUserMessageOnSuspend(threadId, entry.userId, entry.message);
|
|
1154
|
+
const ok = await this.suspendedThreads.persistUserMessageOnSuspend(threadId, entry.userId, entry.message);
|
|
1397
1155
|
if (ok)
|
|
1398
1156
|
this.userMessagePersistenceByRun.delete(runId);
|
|
1399
1157
|
}
|
|
@@ -1422,7 +1180,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1422
1180
|
else {
|
|
1423
1181
|
this.logger.debug('No stale Instance AI checkpoints to expire');
|
|
1424
1182
|
}
|
|
1425
|
-
await this.pruneStalePendingConfirmations(now);
|
|
1183
|
+
await this.suspendedThreads.pruneStalePendingConfirmations(now);
|
|
1426
1184
|
await this.pruneExpiredThreads();
|
|
1427
1185
|
this.scheduleCheckpointPrune();
|
|
1428
1186
|
}
|
|
@@ -1443,96 +1201,6 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1443
1201
|
});
|
|
1444
1202
|
}
|
|
1445
1203
|
}
|
|
1446
|
-
async pruneStalePendingConfirmations(now) {
|
|
1447
|
-
try {
|
|
1448
|
-
const count = await this.pendingConfirmationRepo.deleteExpired(new Date(now));
|
|
1449
|
-
if (count === 0) {
|
|
1450
|
-
this.logger.debug('No stale Instance AI pending confirmations to drop');
|
|
1451
|
-
return;
|
|
1452
|
-
}
|
|
1453
|
-
this.logger.info('Dropped stale Instance AI pending confirmations', { count });
|
|
1454
|
-
}
|
|
1455
|
-
catch (error) {
|
|
1456
|
-
this.logger.warn('Failed to drop stale Instance AI pending confirmations', {
|
|
1457
|
-
error: getErrorMessage(error),
|
|
1458
|
-
});
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
computePendingConfirmationExpiresAt() {
|
|
1462
|
-
const timeoutMs = this.instanceAiConfig.confirmationTimeout;
|
|
1463
|
-
return timeoutMs > 0 ? new Date(Date.now() + timeoutMs) : null;
|
|
1464
|
-
}
|
|
1465
|
-
async persistPendingConfirmation(params) {
|
|
1466
|
-
try {
|
|
1467
|
-
await this.pendingConfirmationRepo.save(this.pendingConfirmationRepo.create({
|
|
1468
|
-
requestId: params.requestId,
|
|
1469
|
-
threadId: params.threadId,
|
|
1470
|
-
userId: params.userId,
|
|
1471
|
-
kind: params.kind,
|
|
1472
|
-
runId: params.runId,
|
|
1473
|
-
messageGroupId: params.messageGroupId ?? null,
|
|
1474
|
-
toolCallId: params.toolCallId ?? null,
|
|
1475
|
-
checkpointKey: params.checkpointKey ?? null,
|
|
1476
|
-
checkpointTaskId: params.checkpointTaskId ?? null,
|
|
1477
|
-
expiresAt: this.computePendingConfirmationExpiresAt(),
|
|
1478
|
-
}));
|
|
1479
|
-
}
|
|
1480
|
-
catch (error) {
|
|
1481
|
-
this.logger.warn('Failed to persist pending confirmation', {
|
|
1482
|
-
requestId: params.requestId,
|
|
1483
|
-
threadId: params.threadId,
|
|
1484
|
-
kind: params.kind,
|
|
1485
|
-
error: getErrorMessage(error),
|
|
1486
|
-
});
|
|
1487
|
-
}
|
|
1488
|
-
}
|
|
1489
|
-
async dropPendingConfirmation(requestId) {
|
|
1490
|
-
try {
|
|
1491
|
-
await this.pendingConfirmationRepo.deleteByRequestId(requestId);
|
|
1492
|
-
}
|
|
1493
|
-
catch (error) {
|
|
1494
|
-
this.logger.warn('Failed to drop pending confirmation', {
|
|
1495
|
-
requestId,
|
|
1496
|
-
error: getErrorMessage(error),
|
|
1497
|
-
});
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
async dropPendingConfirmationsForThread(threadId) {
|
|
1501
|
-
try {
|
|
1502
|
-
await this.pendingConfirmationRepo.deleteByThreadId(threadId);
|
|
1503
|
-
}
|
|
1504
|
-
catch (error) {
|
|
1505
|
-
this.logger.warn('Failed to drop pending confirmations for thread', {
|
|
1506
|
-
threadId,
|
|
1507
|
-
error: getErrorMessage(error),
|
|
1508
|
-
});
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
async persistUserMessageOnSuspend(threadId, userId, message) {
|
|
1512
|
-
try {
|
|
1513
|
-
await this.agentMemory.saveMessages({
|
|
1514
|
-
threadId,
|
|
1515
|
-
resourceId: userId,
|
|
1516
|
-
messages: [
|
|
1517
|
-
{
|
|
1518
|
-
id: message.id,
|
|
1519
|
-
role: 'user',
|
|
1520
|
-
content: [{ type: 'text', text: message.text }],
|
|
1521
|
-
createdAt: new Date(),
|
|
1522
|
-
},
|
|
1523
|
-
],
|
|
1524
|
-
});
|
|
1525
|
-
return true;
|
|
1526
|
-
}
|
|
1527
|
-
catch (error) {
|
|
1528
|
-
this.logger.warn('Failed to persist user message on HITL suspend', {
|
|
1529
|
-
threadId,
|
|
1530
|
-
userId,
|
|
1531
|
-
error: getErrorMessage(error),
|
|
1532
|
-
});
|
|
1533
|
-
return false;
|
|
1534
|
-
}
|
|
1535
|
-
}
|
|
1536
1204
|
async persistShutdownSnapshot(threadId, runId, messageGroupId) {
|
|
1537
1205
|
try {
|
|
1538
1206
|
await this.saveAgentTreeSnapshot(threadId, runId, this.dbSnapshotStorage, true, messageGroupId);
|
|
@@ -1739,7 +1407,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
1739
1407
|
}
|
|
1740
1408
|
async finishInvalidConfirmationRun(args) {
|
|
1741
1409
|
this.runState.cancelThread(args.threadId);
|
|
1742
|
-
void this.dropPendingConfirmationsForThread(args.threadId);
|
|
1410
|
+
void this.suspendedThreads.dropPendingConfirmationsForThread(args.threadId);
|
|
1743
1411
|
args.abortController.abort();
|
|
1744
1412
|
await this.finalizeRunTracing(args.runId, args.tracing, {
|
|
1745
1413
|
status: 'error',
|
|
@@ -2090,19 +1758,21 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2090
1758
|
let workspaceRoot;
|
|
2091
1759
|
const sandboxStatus = this.settingsService.getSandboxStatus();
|
|
2092
1760
|
if (sandboxStatus.workflowBuilderAvailable) {
|
|
2093
|
-
const sandboxConfig = await this.resolveSandboxConfig(user);
|
|
1761
|
+
const sandboxConfig = await this.sandboxService.resolveSandboxConfig(user);
|
|
2094
1762
|
if (sandboxConfig.enabled) {
|
|
2095
1763
|
workspaceRoot = (0, instance_ai_1.getPromptWorkspaceRoot)(sandboxConfig.provider);
|
|
2096
1764
|
let sandboxEntryPromise;
|
|
2097
1765
|
const getSandboxEntry = async () => {
|
|
2098
|
-
sandboxEntryPromise ??= this.
|
|
1766
|
+
sandboxEntryPromise ??= this.sandboxService
|
|
1767
|
+
.getOrCreateWorkspaceEntry(threadId, user)
|
|
1768
|
+
.catch((error) => {
|
|
2099
1769
|
sandboxEntryPromise = undefined;
|
|
2100
1770
|
throw error;
|
|
2101
1771
|
});
|
|
2102
1772
|
return await sandboxEntryPromise;
|
|
2103
1773
|
};
|
|
2104
1774
|
const getSetupSandboxEntry = async () => {
|
|
2105
|
-
return await this.getOrCreateWorkspace(threadId, user, context);
|
|
1775
|
+
return await this.sandboxService.getOrCreateWorkspace(threadId, user, context);
|
|
2106
1776
|
};
|
|
2107
1777
|
const scopeWorkspaceForAgent = async (workspace) => {
|
|
2108
1778
|
if (!workspace)
|
|
@@ -2137,6 +1807,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2137
1807
|
subAgentMaxSteps: this.instanceAiConfig.subAgentMaxSteps,
|
|
2138
1808
|
eventBus: this.eventBus,
|
|
2139
1809
|
logger: this.logger,
|
|
1810
|
+
outputRedaction: (0, output_redaction_config_1.resolveOutputRedaction)(this.instanceAiConfig),
|
|
2140
1811
|
trackTelemetry: (eventName, properties) => {
|
|
2141
1812
|
this.telemetry.track(eventName, properties);
|
|
2142
1813
|
},
|
|
@@ -2160,7 +1831,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2160
1831
|
userId: user.id,
|
|
2161
1832
|
createdAt: Date.now(),
|
|
2162
1833
|
});
|
|
2163
|
-
void this.persistPendingConfirmation({
|
|
1834
|
+
void this.suspendedThreads.persistPendingConfirmation({
|
|
2164
1835
|
requestId,
|
|
2165
1836
|
threadId,
|
|
2166
1837
|
userId: user.id,
|
|
@@ -2877,6 +2548,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2877
2548
|
eventBus: this.eventBus,
|
|
2878
2549
|
logger: this.logger,
|
|
2879
2550
|
onActivity: () => this.runState.touchActiveRun(threadId),
|
|
2551
|
+
outputRedaction: (0, output_redaction_config_1.resolveOutputRedaction)(this.instanceAiConfig),
|
|
2880
2552
|
});
|
|
2881
2553
|
})
|
|
2882
2554
|
: await (0, instance_ai_1.streamAgentRun)(agent, streamInput, {
|
|
@@ -2897,6 +2569,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2897
2569
|
eventBus: this.eventBus,
|
|
2898
2570
|
logger: this.logger,
|
|
2899
2571
|
onActivity: () => this.runState.touchActiveRun(threadId),
|
|
2572
|
+
outputRedaction: (0, output_redaction_config_1.resolveOutputRedaction)(this.instanceAiConfig),
|
|
2900
2573
|
});
|
|
2901
2574
|
if (result.status === 'suspended') {
|
|
2902
2575
|
if (result.suspension) {
|
|
@@ -2916,7 +2589,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
2916
2589
|
checkpoint,
|
|
2917
2590
|
plannedBuild,
|
|
2918
2591
|
});
|
|
2919
|
-
void this.persistPendingConfirmation({
|
|
2592
|
+
void this.suspendedThreads.persistPendingConfirmation({
|
|
2920
2593
|
requestId: result.suspension.requestId,
|
|
2921
2594
|
threadId,
|
|
2922
2595
|
userId: user.id,
|
|
@@ -3294,7 +2967,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3294
2967
|
return false;
|
|
3295
2968
|
}
|
|
3296
2969
|
if (this.runState.resolvePendingConfirmation(freshUser.id, requestId, data)) {
|
|
3297
|
-
void this.dropPendingConfirmation(requestId);
|
|
2970
|
+
void this.suspendedThreads.dropPendingConfirmation(requestId);
|
|
3298
2971
|
this.logger.debug('Resolved pending confirmation (sub-agent HITL)', {
|
|
3299
2972
|
requestId,
|
|
3300
2973
|
approved: data.approved,
|
|
@@ -3308,95 +2981,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3308
2981
|
if (await this.resumeSuspendedRun(requestingUserId, requestId, data)) {
|
|
3309
2982
|
return true;
|
|
3310
2983
|
}
|
|
3311
|
-
return await this.resolveOrphanedConfirmation(requestingUserId, requestId, data);
|
|
3312
|
-
}
|
|
3313
|
-
async resolveOrphanedConfirmation(userId, requestId, data) {
|
|
3314
|
-
let orphan;
|
|
3315
|
-
try {
|
|
3316
|
-
orphan = await this.pendingConfirmationRepo.claim(requestId, userId);
|
|
3317
|
-
}
|
|
3318
|
-
catch (error) {
|
|
3319
|
-
this.logger.warn('Failed to claim orphaned pending confirmation', {
|
|
3320
|
-
requestId,
|
|
3321
|
-
error: getErrorMessage(error),
|
|
3322
|
-
});
|
|
3323
|
-
return false;
|
|
3324
|
-
}
|
|
3325
|
-
if (!orphan)
|
|
3326
|
-
return false;
|
|
3327
|
-
this.logger.info('Reclaiming pending confirmation orphaned by a process restart', {
|
|
3328
|
-
requestId,
|
|
3329
|
-
threadId: orphan.threadId,
|
|
3330
|
-
runId: orphan.runId,
|
|
3331
|
-
kind: orphan.kind,
|
|
3332
|
-
hasCheckpoint: Boolean(orphan.checkpointKey),
|
|
3333
|
-
});
|
|
3334
|
-
if (orphan.kind === 'suspended' && this.canResumeOrphan(orphan)) {
|
|
3335
|
-
const resumed = await this.tryResumeFromOrphan(orphan, data);
|
|
3336
|
-
if (resumed)
|
|
3337
|
-
return true;
|
|
3338
|
-
}
|
|
3339
|
-
this.finalizeUnresumableOrphan(orphan);
|
|
3340
|
-
throw new n8n_workflow_1.UserError('This confirmation was lost when the assistant restarted. Send a new message to continue.');
|
|
3341
|
-
}
|
|
3342
|
-
canResumeOrphan(orphan) {
|
|
3343
|
-
return Boolean(orphan.toolCallId && orphan.checkpointKey);
|
|
3344
|
-
}
|
|
3345
|
-
finalizeUnresumableOrphan(orphan) {
|
|
3346
|
-
try {
|
|
3347
|
-
this.publishRunFinish(orphan.threadId, orphan.runId, 'cancelled', 'restart_lost_confirmation');
|
|
3348
|
-
void this.dbSnapshotStorage
|
|
3349
|
-
.markRunCancelled(orphan.threadId, orphan.runId)
|
|
3350
|
-
.catch((error) => {
|
|
3351
|
-
this.logger.warn('Failed to mark orphan snapshot as cancelled', {
|
|
3352
|
-
requestId: orphan.requestId,
|
|
3353
|
-
threadId: orphan.threadId,
|
|
3354
|
-
runId: orphan.runId,
|
|
3355
|
-
error: getErrorMessage(error),
|
|
3356
|
-
});
|
|
3357
|
-
});
|
|
3358
|
-
}
|
|
3359
|
-
catch (error) {
|
|
3360
|
-
this.logger.warn('Failed to finalize orphaned confirmation snapshot', {
|
|
3361
|
-
requestId: orphan.requestId,
|
|
3362
|
-
error: getErrorMessage(error),
|
|
3363
|
-
});
|
|
3364
|
-
}
|
|
3365
|
-
}
|
|
3366
|
-
async tryResumeFromOrphan(orphan, data) {
|
|
3367
|
-
const outcome = await this.rebuildSuspendedRunFromCheckpoint(orphan);
|
|
3368
|
-
switch (outcome.kind) {
|
|
3369
|
-
case 'ready':
|
|
3370
|
-
this.runState.suspendRun(orphan.threadId, outcome.state);
|
|
3371
|
-
return await this.resumeSuspendedRun(orphan.userId, orphan.requestId, data);
|
|
3372
|
-
case 'no-user':
|
|
3373
|
-
this.logger.warn('Cannot resume orphaned run: user no longer authorized', {
|
|
3374
|
-
requestId: orphan.requestId,
|
|
3375
|
-
userId: orphan.userId,
|
|
3376
|
-
});
|
|
3377
|
-
return false;
|
|
3378
|
-
case 'no-checkpoint':
|
|
3379
|
-
this.logger.warn('Cannot resume orphaned run: checkpoint missing or unavailable', {
|
|
3380
|
-
requestId: orphan.requestId,
|
|
3381
|
-
checkpointKey: orphan.checkpointKey,
|
|
3382
|
-
...(outcome.error ? { error: getErrorMessage(outcome.error) } : {}),
|
|
3383
|
-
});
|
|
3384
|
-
return false;
|
|
3385
|
-
case 'env-failure':
|
|
3386
|
-
this.logger.warn('Cannot resume orphaned run: failed to build execution environment', {
|
|
3387
|
-
requestId: orphan.requestId,
|
|
3388
|
-
threadId: orphan.threadId,
|
|
3389
|
-
error: getErrorMessage(outcome.error),
|
|
3390
|
-
});
|
|
3391
|
-
return false;
|
|
3392
|
-
case 'agent-failure':
|
|
3393
|
-
this.logger.warn('Cannot resume orphaned run: failed to build agent', {
|
|
3394
|
-
requestId: orphan.requestId,
|
|
3395
|
-
threadId: orphan.threadId,
|
|
3396
|
-
error: getErrorMessage(outcome.error),
|
|
3397
|
-
});
|
|
3398
|
-
return false;
|
|
3399
|
-
}
|
|
2984
|
+
return await this.suspendedRunRestorer.resolveOrphanedConfirmation(requestingUserId, requestId, data);
|
|
3400
2985
|
}
|
|
3401
2986
|
async rebuildSuspendedRunFromCheckpoint(orphan) {
|
|
3402
2987
|
const user = await this.revalidateActiveUser(orphan.userId);
|
|
@@ -3499,7 +3084,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3499
3084
|
return false;
|
|
3500
3085
|
}
|
|
3501
3086
|
this.runState.activateSuspendedRun(threadId);
|
|
3502
|
-
void this.dropPendingConfirmation(requestId);
|
|
3087
|
+
void this.suspendedThreads.dropPendingConfirmation(requestId);
|
|
3503
3088
|
const credentialsPayload = data.nodeCredentials ?? data.credentials;
|
|
3504
3089
|
const resumeData = {
|
|
3505
3090
|
approved: data.approved,
|
|
@@ -3589,6 +3174,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3589
3174
|
logger: this.logger,
|
|
3590
3175
|
agentRunId: opts.agentRunId,
|
|
3591
3176
|
onActivity: () => this.runState.touchActiveRun(opts.threadId),
|
|
3177
|
+
outputRedaction: (0, output_redaction_config_1.resolveOutputRedaction)(this.instanceAiConfig),
|
|
3592
3178
|
});
|
|
3593
3179
|
})
|
|
3594
3180
|
: await (0, instance_ai_1.resumeAgentRun)(agent, resumeData, {
|
|
@@ -3604,6 +3190,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3604
3190
|
logger: this.logger,
|
|
3605
3191
|
agentRunId: opts.agentRunId,
|
|
3606
3192
|
onActivity: () => this.runState.touchActiveRun(opts.threadId),
|
|
3193
|
+
outputRedaction: (0, output_redaction_config_1.resolveOutputRedaction)(this.instanceAiConfig),
|
|
3607
3194
|
});
|
|
3608
3195
|
if (result.status === 'suspended') {
|
|
3609
3196
|
if (result.suspension) {
|
|
@@ -3624,7 +3211,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
3624
3211
|
checkpoint: opts.checkpoint,
|
|
3625
3212
|
plannedBuild: opts.plannedBuild,
|
|
3626
3213
|
});
|
|
3627
|
-
void this.persistPendingConfirmation({
|
|
3214
|
+
void this.suspendedThreads.persistPendingConfirmation({
|
|
3628
3215
|
requestId: result.suspension.requestId,
|
|
3629
3216
|
threadId: opts.threadId,
|
|
3630
3217
|
userId: opts.user.id,
|
|
@@ -4120,7 +3707,7 @@ let InstanceAiService = class InstanceAiService {
|
|
|
4120
3707
|
...(runTimeout ? { runTimeout } : {}),
|
|
4121
3708
|
}),
|
|
4122
3709
|
});
|
|
4123
|
-
void this.dropPendingConfirmation(suspended.requestId);
|
|
3710
|
+
void this.suspendedThreads.dropPendingConfirmation(suspended.requestId);
|
|
4124
3711
|
}
|
|
4125
3712
|
async reapAiTemporaryForThreadCleanup(threadId) {
|
|
4126
3713
|
let markedWorkflows;
|
|
@@ -4402,7 +3989,7 @@ exports.InstanceAiService = InstanceAiService = __decorate([
|
|
|
4402
3989
|
db_1.AiBuilderTemporaryWorkflowRepository,
|
|
4403
3990
|
n8n_core_1.ErrorReporter,
|
|
4404
3991
|
config_1.SsrfProtectionConfig,
|
|
4405
|
-
|
|
3992
|
+
backend_network_1.SsrfProtectionService,
|
|
4406
3993
|
event_service_1.EventService])
|
|
4407
3994
|
], InstanceAiService);
|
|
4408
3995
|
//# sourceMappingURL=instance-ai.service.js.map
|