n8n 2.26.6 → 2.27.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.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/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 +1 -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.js +3 -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.config.d.ts +3 -0
- package/dist/modules/mcp/mcp.config.js +28 -0
- package/dist/modules/mcp/mcp.config.js.map +1 -0
- package/dist/modules/mcp/mcp.controller.js +4 -2
- package/dist/modules/mcp/mcp.controller.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.config.d.ts +7 -0
- package/dist/modules/oauth-server/oauth-server.config.js +49 -0
- package/dist/modules/oauth-server/oauth-server.config.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} +86 -72
- 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 +35 -34
- 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
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.PrometheusWorkflowStatisticsMetricsService = void 0;
|
|
16
|
+
const config_1 = require("@n8n/config");
|
|
17
|
+
const constants_1 = require("@n8n/constants");
|
|
18
|
+
const db_1 = require("@n8n/db");
|
|
19
|
+
const di_1 = require("@n8n/di");
|
|
20
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
21
|
+
const prom_client_1 = __importDefault(require("prom-client"));
|
|
22
|
+
const cache_service_1 = require("../../services/cache/cache.service");
|
|
23
|
+
let PrometheusWorkflowStatisticsMetricsService = class PrometheusWorkflowStatisticsMetricsService {
|
|
24
|
+
constructor(config, cacheService, licenseMetricsRepository) {
|
|
25
|
+
this.config = config;
|
|
26
|
+
this.cacheService = cacheService;
|
|
27
|
+
this.licenseMetricsRepository = licenseMetricsRepository;
|
|
28
|
+
this.workflowStatisticsCache = null;
|
|
29
|
+
this.inFlightRequest = null;
|
|
30
|
+
}
|
|
31
|
+
get enabled() {
|
|
32
|
+
return this.config.includeWorkflowStatistics;
|
|
33
|
+
}
|
|
34
|
+
init() {
|
|
35
|
+
const cacheTtl = this.config.workflowStatisticsInterval * constants_1.Time.seconds.toMilliseconds;
|
|
36
|
+
const metricsConfig = [
|
|
37
|
+
{
|
|
38
|
+
name: 'production_executions',
|
|
39
|
+
help: 'Total number of production workflow executions (success + error).',
|
|
40
|
+
getValue: (metrics) => Number(metrics.productionExecutions) || 0,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'production_root_executions',
|
|
44
|
+
help: 'Total number of production root workflow executions (excludes sub-workflows).',
|
|
45
|
+
getValue: (metrics) => Number(metrics.productionRootExecutions) || 0,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'manual_executions',
|
|
49
|
+
help: 'Total number of manual workflow executions (success + error).',
|
|
50
|
+
getValue: (metrics) => Number(metrics.manualExecutions) || 0,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'enabled_users',
|
|
54
|
+
help: 'Total number of enabled users.',
|
|
55
|
+
getValue: (metrics) => Number(metrics.enabledUsers) || 0,
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'users',
|
|
59
|
+
help: 'Total number of users.',
|
|
60
|
+
getValue: (metrics) => Number(metrics.totalUsers) || 0,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: 'workflows',
|
|
64
|
+
help: 'Total number of workflows.',
|
|
65
|
+
getValue: (metrics) => Number(metrics.totalWorkflows) || 0,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'credentials',
|
|
69
|
+
help: 'Total number of credentials.',
|
|
70
|
+
getValue: (metrics) => Number(metrics.totalCredentials) || 0,
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
metricsConfig.forEach((config) => {
|
|
74
|
+
this.createWorkflowStatisticsGauge(config.name, config.help, config.getValue, cacheTtl);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
createWorkflowStatisticsGauge(metricName, help, getMetricValue, cacheTtl) {
|
|
78
|
+
const fetchMetrics = async () => await this.getWorkflowStatistics(cacheTtl);
|
|
79
|
+
return new prom_client_1.default.Gauge({
|
|
80
|
+
name: `${this.config.prefix}${metricName}`,
|
|
81
|
+
help,
|
|
82
|
+
async collect() {
|
|
83
|
+
this.set(getMetricValue(await fetchMetrics()));
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async getWorkflowStatistics(cacheTtl) {
|
|
88
|
+
const now = Date.now();
|
|
89
|
+
if (this.workflowStatisticsCache &&
|
|
90
|
+
now - this.workflowStatisticsCache.timestamp < this.workflowStatisticsCache.ttl) {
|
|
91
|
+
return this.workflowStatisticsCache.data;
|
|
92
|
+
}
|
|
93
|
+
this.inFlightRequest ??= this.fetchAndCacheMetrics(cacheTtl).finally(() => {
|
|
94
|
+
this.inFlightRequest = null;
|
|
95
|
+
});
|
|
96
|
+
return await this.inFlightRequest;
|
|
97
|
+
}
|
|
98
|
+
async fetchAndCacheMetrics(cacheTtl) {
|
|
99
|
+
const now = Date.now();
|
|
100
|
+
const fullCacheKey = 'metrics:workflow-statistics:shared';
|
|
101
|
+
const cachedValue = await this.cacheService.get(fullCacheKey);
|
|
102
|
+
if (typeof cachedValue === 'string') {
|
|
103
|
+
const parsedValue = (0, n8n_workflow_1.jsonParse)(cachedValue, { fallbackValue: undefined });
|
|
104
|
+
if (parsedValue !== undefined) {
|
|
105
|
+
this.workflowStatisticsCache = {
|
|
106
|
+
data: parsedValue,
|
|
107
|
+
timestamp: now,
|
|
108
|
+
ttl: 1_000,
|
|
109
|
+
};
|
|
110
|
+
return parsedValue;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const metrics = await this.licenseMetricsRepository.getLicenseRenewalMetrics();
|
|
114
|
+
await this.cacheService.set(fullCacheKey, JSON.stringify(metrics), cacheTtl);
|
|
115
|
+
this.workflowStatisticsCache = {
|
|
116
|
+
data: metrics,
|
|
117
|
+
timestamp: now,
|
|
118
|
+
ttl: 1_000,
|
|
119
|
+
};
|
|
120
|
+
return metrics;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
exports.PrometheusWorkflowStatisticsMetricsService = PrometheusWorkflowStatisticsMetricsService;
|
|
124
|
+
exports.PrometheusWorkflowStatisticsMetricsService = PrometheusWorkflowStatisticsMetricsService = __decorate([
|
|
125
|
+
(0, di_1.Service)(),
|
|
126
|
+
__metadata("design:paramtypes", [config_1.PrometheusMetricsConfig,
|
|
127
|
+
cache_service_1.CacheService,
|
|
128
|
+
db_1.LicenseMetricsRepository])
|
|
129
|
+
], PrometheusWorkflowStatisticsMetricsService);
|
|
130
|
+
//# sourceMappingURL=workflow-statistics-metrics.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-statistics-metrics.service.js","sourceRoot":"","sources":["../../../src/metrics/prometheus/workflow-statistics-metrics.service.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,42 +1,13 @@
|
|
|
1
1
|
import type { AgentFileDto } from '@n8n/api-types';
|
|
2
|
-
import { BinaryDataService } from 'n8n-core';
|
|
3
|
-
import { AgentFileRepository } from './repositories/agent-file.repository';
|
|
4
2
|
import { AgentRepository } from './repositories/agent.repository';
|
|
5
|
-
export interface KnowledgeWorkspaceFile {
|
|
6
|
-
id: string;
|
|
7
|
-
fileName: string;
|
|
8
|
-
mimeType: string;
|
|
9
|
-
fileSizeBytes: number;
|
|
10
|
-
relativePath: string;
|
|
11
|
-
}
|
|
12
|
-
interface MaterializeWorkspaceOptions {
|
|
13
|
-
fileReferences?: string[];
|
|
14
|
-
}
|
|
15
3
|
export declare class AgentKnowledgeService {
|
|
16
4
|
private readonly agentRepository;
|
|
17
|
-
|
|
18
|
-
private readonly binaryDataService;
|
|
19
|
-
constructor(agentRepository: AgentRepository, agentFileRepository: AgentFileRepository, binaryDataService: BinaryDataService);
|
|
5
|
+
constructor(agentRepository: AgentRepository);
|
|
20
6
|
uploadFiles(agentId: string, projectId: string, files: Express.Multer.File[]): Promise<AgentFileDto[]>;
|
|
21
7
|
listFiles(agentId: string, projectId: string): Promise<AgentFileDto[]>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
deleteAllFilesForAgent(agentId: string): Promise<void>;
|
|
25
|
-
resolveWorkspaceFiles(agentId: string, projectId: string, fileReferences?: string[]): Promise<KnowledgeWorkspaceFile[]>;
|
|
26
|
-
materializeWorkspace(agentId: string, projectId: string, workspaceRoot: string, options?: MaterializeWorkspaceOptions): Promise<KnowledgeWorkspaceFile[]>;
|
|
8
|
+
deleteFile(agentId: string, projectId: string, _fileId: string): Promise<void>;
|
|
9
|
+
deleteAllFilesForAgent(_agentId: string): Promise<void>;
|
|
27
10
|
private ensureAgentBelongsToProject;
|
|
28
|
-
private storeFile;
|
|
29
|
-
private toDto;
|
|
30
|
-
private toWorkspaceFile;
|
|
31
|
-
private assertWorkspaceWithinLimits;
|
|
32
|
-
private filterFilesForWorkspace;
|
|
33
|
-
private getWorkspaceRelativePath;
|
|
34
|
-
private prepareStoredContent;
|
|
35
|
-
private isPdf;
|
|
36
|
-
private extractPdfText;
|
|
37
|
-
private validateMetadataLength;
|
|
38
|
-
private cleanupStoredFiles;
|
|
39
11
|
private cleanupUploadTempFiles;
|
|
40
12
|
private cleanupUploadTempFile;
|
|
41
13
|
}
|
|
42
|
-
export {};
|
|
@@ -1,135 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
7
|
};
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
10
|
};
|
|
44
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
-
};
|
|
47
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
12
|
exports.AgentKnowledgeService = void 0;
|
|
49
13
|
const di_1 = require("@n8n/di");
|
|
50
|
-
const utils_1 = require("@n8n/utils");
|
|
51
|
-
const n8n_core_1 = require("n8n-core");
|
|
52
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
53
|
-
const node_fs_1 = require("node:fs");
|
|
54
14
|
const promises_1 = require("node:fs/promises");
|
|
55
|
-
const node_path_1 = __importDefault(require("node:path"));
|
|
56
|
-
const promises_2 = require("node:stream/promises");
|
|
57
|
-
const bad_request_error_1 = require("../../errors/response-errors/bad-request.error");
|
|
58
15
|
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
59
|
-
const agent_file_repository_1 = require("./repositories/agent-file.repository");
|
|
60
16
|
const agent_repository_1 = require("./repositories/agent.repository");
|
|
61
|
-
const MAX_AGENT_FILE_METADATA_LENGTH = 255;
|
|
62
|
-
const MAX_WORKSPACE_FILES = 2_000;
|
|
63
|
-
const MAX_WORKSPACE_BYTES = 2 * 1024 * 1024 * 1024;
|
|
64
17
|
let AgentKnowledgeService = class AgentKnowledgeService {
|
|
65
|
-
constructor(agentRepository
|
|
18
|
+
constructor(agentRepository) {
|
|
66
19
|
this.agentRepository = agentRepository;
|
|
67
|
-
this.agentFileRepository = agentFileRepository;
|
|
68
|
-
this.binaryDataService = binaryDataService;
|
|
69
20
|
}
|
|
70
21
|
async uploadFiles(agentId, projectId, files) {
|
|
71
|
-
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
72
|
-
const storedFiles = [];
|
|
73
22
|
try {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
catch (error) {
|
|
79
|
-
await this.cleanupStoredFiles(storedFiles).catch(() => { });
|
|
80
|
-
throw error;
|
|
23
|
+
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
24
|
+
return [];
|
|
81
25
|
}
|
|
82
26
|
finally {
|
|
83
27
|
await this.cleanupUploadTempFiles(files);
|
|
84
28
|
}
|
|
85
|
-
return storedFiles.map((file) => this.toDto(file));
|
|
86
29
|
}
|
|
87
30
|
async listFiles(agentId, projectId) {
|
|
88
31
|
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
89
|
-
|
|
90
|
-
return files.map((file) => this.toDto(file));
|
|
91
|
-
}
|
|
92
|
-
async listWorkspaceFiles(agentId, projectId) {
|
|
93
|
-
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
94
|
-
const files = await this.agentFileRepository.findByAgentId(agentId);
|
|
95
|
-
return files.map((file) => this.toWorkspaceFile(file));
|
|
96
|
-
}
|
|
97
|
-
async deleteFile(agentId, projectId, fileId) {
|
|
98
|
-
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
99
|
-
const file = await this.agentFileRepository.findByIdAndAgentId(fileId, agentId);
|
|
100
|
-
if (!file) {
|
|
101
|
-
throw new not_found_error_1.NotFoundError(`Agent file "${fileId}" not found`);
|
|
102
|
-
}
|
|
103
|
-
await this.binaryDataService.deleteManyByBinaryDataId([file.binaryDataId]);
|
|
104
|
-
await this.agentFileRepository.delete({ id: fileId, agentId });
|
|
105
|
-
}
|
|
106
|
-
async deleteAllFilesForAgent(agentId) {
|
|
107
|
-
const files = await this.agentFileRepository.findByAgentId(agentId);
|
|
108
|
-
if (files.length === 0)
|
|
109
|
-
return;
|
|
110
|
-
await this.binaryDataService.deleteManyByBinaryDataId(files.map((file) => file.binaryDataId));
|
|
111
|
-
await this.agentFileRepository.delete({ agentId });
|
|
32
|
+
return [];
|
|
112
33
|
}
|
|
113
|
-
async
|
|
34
|
+
async deleteFile(agentId, projectId, _fileId) {
|
|
114
35
|
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
115
|
-
const files = this.filterFilesForWorkspace(await this.agentFileRepository.findByAgentId(agentId), fileReferences);
|
|
116
|
-
this.assertWorkspaceWithinLimits(files);
|
|
117
|
-
return files.map((file) => this.toWorkspaceFile(file));
|
|
118
36
|
}
|
|
119
|
-
async
|
|
120
|
-
await this.ensureAgentBelongsToProject(agentId, projectId);
|
|
121
|
-
await (0, promises_1.mkdir)(workspaceRoot, { recursive: true });
|
|
122
|
-
const files = this.filterFilesForWorkspace(await this.agentFileRepository.findByAgentId(agentId), options.fileReferences);
|
|
123
|
-
this.assertWorkspaceWithinLimits(files);
|
|
124
|
-
const materializedFiles = [];
|
|
125
|
-
for (const file of files) {
|
|
126
|
-
const relativePath = this.getWorkspaceRelativePath(file);
|
|
127
|
-
const targetPath = node_path_1.default.join(workspaceRoot, relativePath);
|
|
128
|
-
const contentStream = await this.binaryDataService.getAsStream(file.binaryDataId);
|
|
129
|
-
await (0, promises_2.pipeline)(contentStream, (0, node_fs_1.createWriteStream)(targetPath));
|
|
130
|
-
materializedFiles.push(this.toWorkspaceFile(file));
|
|
131
|
-
}
|
|
132
|
-
return materializedFiles;
|
|
37
|
+
async deleteAllFilesForAgent(_agentId) {
|
|
133
38
|
}
|
|
134
39
|
async ensureAgentBelongsToProject(agentId, projectId) {
|
|
135
40
|
const agent = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
@@ -137,150 +42,6 @@ let AgentKnowledgeService = class AgentKnowledgeService {
|
|
|
137
42
|
throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
|
|
138
43
|
}
|
|
139
44
|
}
|
|
140
|
-
async storeFile(agentId, file) {
|
|
141
|
-
let storedBinaryDataId;
|
|
142
|
-
try {
|
|
143
|
-
const fileId = (0, utils_1.generateNanoId)();
|
|
144
|
-
const fileName = (0, utils_1.sanitizeFilename)(Buffer.from(file.originalname, 'latin1').toString('utf8'), MAX_AGENT_FILE_METADATA_LENGTH + 1);
|
|
145
|
-
this.validateMetadataLength('File name', fileName);
|
|
146
|
-
const buffer = file.buffer ?? (await (0, promises_1.readFile)(file.path));
|
|
147
|
-
const storedContent = await this.prepareStoredContent(fileName, file.mimetype, buffer);
|
|
148
|
-
this.validateMetadataLength('MIME type', storedContent.mimeType);
|
|
149
|
-
const binaryData = {
|
|
150
|
-
data: '',
|
|
151
|
-
mimeType: storedContent.mimeType,
|
|
152
|
-
fileName: storedContent.fileName,
|
|
153
|
-
fileSize: `${storedContent.buffer.length}`,
|
|
154
|
-
bytes: storedContent.buffer.length,
|
|
155
|
-
fileExtension: storedContent.fileExtension,
|
|
156
|
-
};
|
|
157
|
-
const storedBinaryData = await this.binaryDataService.store(n8n_core_1.FileLocation.ofCustom({
|
|
158
|
-
sourceType: 'agent_file',
|
|
159
|
-
sourceId: fileId,
|
|
160
|
-
pathSegments: ['agents', agentId, 'files', fileId],
|
|
161
|
-
}), storedContent.buffer, binaryData);
|
|
162
|
-
if (!storedBinaryData.id) {
|
|
163
|
-
throw new n8n_workflow_1.UnexpectedError('Agent file upload requires persisted binary data');
|
|
164
|
-
}
|
|
165
|
-
storedBinaryDataId = storedBinaryData.id;
|
|
166
|
-
const agentFile = this.agentFileRepository.create({
|
|
167
|
-
id: fileId,
|
|
168
|
-
agentId,
|
|
169
|
-
binaryDataId: storedBinaryDataId,
|
|
170
|
-
fileName,
|
|
171
|
-
mimeType: storedContent.mimeType,
|
|
172
|
-
fileSizeBytes: buffer.length,
|
|
173
|
-
});
|
|
174
|
-
return await this.agentFileRepository.save(agentFile);
|
|
175
|
-
}
|
|
176
|
-
catch (error) {
|
|
177
|
-
if (storedBinaryDataId) {
|
|
178
|
-
await this.binaryDataService.deleteManyByBinaryDataId([storedBinaryDataId]);
|
|
179
|
-
}
|
|
180
|
-
throw error;
|
|
181
|
-
}
|
|
182
|
-
finally {
|
|
183
|
-
if (file.path) {
|
|
184
|
-
await (0, promises_1.unlink)(file.path).catch(() => { });
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
toDto(file) {
|
|
189
|
-
return {
|
|
190
|
-
id: file.id,
|
|
191
|
-
agentId: file.agentId,
|
|
192
|
-
fileName: file.fileName,
|
|
193
|
-
mimeType: file.mimeType,
|
|
194
|
-
fileSizeBytes: file.fileSizeBytes,
|
|
195
|
-
createdAt: file.createdAt.toISOString(),
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
toWorkspaceFile(file) {
|
|
199
|
-
return {
|
|
200
|
-
id: file.id,
|
|
201
|
-
fileName: file.fileName,
|
|
202
|
-
mimeType: file.mimeType,
|
|
203
|
-
fileSizeBytes: file.fileSizeBytes,
|
|
204
|
-
relativePath: this.getWorkspaceRelativePath(file),
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
assertWorkspaceWithinLimits(files) {
|
|
208
|
-
if (files.length > MAX_WORKSPACE_FILES) {
|
|
209
|
-
throw new bad_request_error_1.BadRequestError(`Cannot materialize ${files.length} knowledge files at once (limit ${MAX_WORKSPACE_FILES}). Pass file references to narrow the operation.`);
|
|
210
|
-
}
|
|
211
|
-
const totalBytes = files.reduce((total, file) => total + file.fileSizeBytes, 0);
|
|
212
|
-
if (totalBytes > MAX_WORKSPACE_BYTES) {
|
|
213
|
-
throw new bad_request_error_1.BadRequestError(`Cannot materialize ${totalBytes} bytes of knowledge files at once (limit ${MAX_WORKSPACE_BYTES}). Pass file references to narrow the operation.`);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
filterFilesForWorkspace(files, fileReferences) {
|
|
217
|
-
if (!fileReferences)
|
|
218
|
-
return files;
|
|
219
|
-
const requested = new Set(fileReferences);
|
|
220
|
-
return files.filter((file) => requested.has(file.id) ||
|
|
221
|
-
requested.has(this.getWorkspaceRelativePath(file)) ||
|
|
222
|
-
requested.has(file.fileName));
|
|
223
|
-
}
|
|
224
|
-
getWorkspaceRelativePath(file) {
|
|
225
|
-
const extension = node_path_1.default.extname(file.fileName).toLowerCase();
|
|
226
|
-
if (extension === '.pdf' && file.mimeType === 'text/plain') {
|
|
227
|
-
return `${file.id}.pdf.txt`;
|
|
228
|
-
}
|
|
229
|
-
return `${file.id}${node_path_1.default.extname(file.fileName)}`;
|
|
230
|
-
}
|
|
231
|
-
async prepareStoredContent(fileName, mimeType, buffer) {
|
|
232
|
-
if (!this.isPdf(fileName, mimeType)) {
|
|
233
|
-
return {
|
|
234
|
-
buffer,
|
|
235
|
-
mimeType: mimeType || 'application/octet-stream',
|
|
236
|
-
fileName,
|
|
237
|
-
fileExtension: fileName.split('.').pop(),
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
const extractedText = await this.extractPdfText(fileName, buffer);
|
|
241
|
-
const extractedBuffer = Buffer.from(extractedText, 'utf8');
|
|
242
|
-
return {
|
|
243
|
-
buffer: extractedBuffer,
|
|
244
|
-
mimeType: 'text/plain',
|
|
245
|
-
fileName: `${fileName}.txt`,
|
|
246
|
-
fileExtension: 'txt',
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
isPdf(fileName, mimeType) {
|
|
250
|
-
return node_path_1.default.extname(fileName).toLowerCase() === '.pdf' || mimeType === 'application/pdf';
|
|
251
|
-
}
|
|
252
|
-
async extractPdfText(fileName, buffer) {
|
|
253
|
-
const { PDFParse } = await Promise.resolve().then(() => __importStar(require('pdf-parse')));
|
|
254
|
-
const parser = new PDFParse({ data: buffer });
|
|
255
|
-
try {
|
|
256
|
-
const result = await parser.getText();
|
|
257
|
-
const text = result.text.trim();
|
|
258
|
-
if (!text) {
|
|
259
|
-
throw new bad_request_error_1.BadRequestError(`PDF "${fileName}" contains no extractable text and cannot be added to knowledge`);
|
|
260
|
-
}
|
|
261
|
-
return text;
|
|
262
|
-
}
|
|
263
|
-
catch (error) {
|
|
264
|
-
if (error instanceof bad_request_error_1.BadRequestError)
|
|
265
|
-
throw error;
|
|
266
|
-
const message = error instanceof Error ? error.message : 'unknown error';
|
|
267
|
-
throw new bad_request_error_1.BadRequestError(`Failed to extract text from PDF "${fileName}": ${message}`);
|
|
268
|
-
}
|
|
269
|
-
finally {
|
|
270
|
-
await parser.destroy();
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
validateMetadataLength(label, value) {
|
|
274
|
-
if (value.length <= MAX_AGENT_FILE_METADATA_LENGTH)
|
|
275
|
-
return;
|
|
276
|
-
throw new bad_request_error_1.BadRequestError(`${label} must be ${MAX_AGENT_FILE_METADATA_LENGTH} characters or less`);
|
|
277
|
-
}
|
|
278
|
-
async cleanupStoredFiles(files) {
|
|
279
|
-
if (files.length === 0)
|
|
280
|
-
return;
|
|
281
|
-
await this.agentFileRepository.delete(files.map((file) => file.id));
|
|
282
|
-
await this.binaryDataService.deleteManyByBinaryDataId(files.map((file) => file.binaryDataId));
|
|
283
|
-
}
|
|
284
45
|
async cleanupUploadTempFiles(files) {
|
|
285
46
|
await Promise.all(files.map(async (file) => await this.cleanupUploadTempFile(file)));
|
|
286
47
|
}
|
|
@@ -293,8 +54,6 @@ let AgentKnowledgeService = class AgentKnowledgeService {
|
|
|
293
54
|
exports.AgentKnowledgeService = AgentKnowledgeService;
|
|
294
55
|
exports.AgentKnowledgeService = AgentKnowledgeService = __decorate([
|
|
295
56
|
(0, di_1.Service)(),
|
|
296
|
-
__metadata("design:paramtypes", [agent_repository_1.AgentRepository
|
|
297
|
-
agent_file_repository_1.AgentFileRepository,
|
|
298
|
-
n8n_core_1.BinaryDataService])
|
|
57
|
+
__metadata("design:paramtypes", [agent_repository_1.AgentRepository])
|
|
299
58
|
], AgentKnowledgeService);
|
|
300
59
|
//# sourceMappingURL=agent-knowledge.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-knowledge.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-knowledge.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-knowledge.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-knowledge.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAkC;AAClC,+CAA0C;AAE1C,8EAAyE;AAEzE,sEAAkE;AAG3D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YAA6B,eAAgC;QAAhC,oBAAe,GAAf,eAAe,CAAiB;IAAG,CAAC;IAEjE,KAAK,CAAC,WAAW,CAChB,OAAe,EACf,SAAiB,EACjB,KAA4B;QAE5B,IAAI,CAAC;YACJ,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAC3D,OAAO,EAAE,CAAC;QACX,CAAC;gBAAS,CAAC;YACV,MAAM,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;IACF,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,OAAe,EAAE,SAAiB;QACjD,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAC3D,OAAO,EAAE,CAAC;IACX,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,SAAiB,EAAE,OAAe;QACnE,MAAM,IAAI,CAAC,2BAA2B,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC5D,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,QAAgB;IAE7C,CAAC;IAEO,KAAK,CAAC,2BAA2B,CAAC,OAAe,EAAE,SAAiB;QAC3E,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,oBAAoB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAClF,IAAI,CAAC,KAAK,EAAE,CAAC;YACZ,MAAM,IAAI,+BAAa,CAAC,UAAU,OAAO,aAAa,CAAC,CAAC;QACzD,CAAC;IACF,CAAC;IAEO,KAAK,CAAC,sBAAsB,CAAC,KAA4B;QAChE,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACtF,CAAC;IAEO,KAAK,CAAC,qBAAqB,CAAC,IAAyB;QAC5D,IAAI,CAAC,IAAI,CAAC,IAAI;YAAE,OAAO;QAEvB,MAAM,IAAA,iBAAM,EAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;IACzC,CAAC;CACD,CAAA;AA7CY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,YAAO,GAAE;qCAEqC,kCAAe;GADjD,qBAAqB,CA6CjC"}
|
|
@@ -15,8 +15,6 @@ import { N8nMemory } from './integrations/n8n-memory';
|
|
|
15
15
|
import { AgentRepository } from './repositories/agent.repository';
|
|
16
16
|
import { AgentSecureRuntime } from './runtime/agent-secure-runtime';
|
|
17
17
|
import { type ToolRegistry } from './tool-registry';
|
|
18
|
-
import { AgentKnowledgeCommandService } from './agent-knowledge-command.service';
|
|
19
|
-
import { AgentKnowledgeService } from './agent-knowledge.service';
|
|
20
18
|
import { AgentsToolsService } from './agents-tools.service';
|
|
21
19
|
export type AgentRuntimeProfile = 'top-level' | 'sub-agent';
|
|
22
20
|
export interface SubAgentDelegationConfig {
|
|
@@ -57,9 +55,7 @@ export declare class AgentRuntimeReconstructionService {
|
|
|
57
55
|
private readonly n8nMemory;
|
|
58
56
|
private readonly oauthService;
|
|
59
57
|
private readonly agentsConfig;
|
|
60
|
-
|
|
61
|
-
private readonly agentKnowledgeCommandService;
|
|
62
|
-
constructor(logger: Logger, agentRepository: AgentRepository, workflowRunner: WorkflowRunner, activeExecutions: ActiveExecutions, workflowRepository: WorkflowRepository, userRepository: UserRepository, workflowFinderService: WorkflowFinderService, urlService: UrlService, n8nCheckpointStorage: N8NCheckpointStorage, secureRuntime: AgentSecureRuntime, ephemeralNodeExecutor: EphemeralNodeExecutor, agentsToolsService: AgentsToolsService, n8nMemory: N8nMemory, oauthService: OauthService, agentsConfig: AgentsConfig, agentKnowledgeService: AgentKnowledgeService, agentKnowledgeCommandService: AgentKnowledgeCommandService);
|
|
58
|
+
constructor(logger: Logger, agentRepository: AgentRepository, workflowRunner: WorkflowRunner, activeExecutions: ActiveExecutions, workflowRepository: WorkflowRepository, userRepository: UserRepository, workflowFinderService: WorkflowFinderService, urlService: UrlService, n8nCheckpointStorage: N8NCheckpointStorage, secureRuntime: AgentSecureRuntime, ephemeralNodeExecutor: EphemeralNodeExecutor, agentsToolsService: AgentsToolsService, n8nMemory: N8nMemory, oauthService: OauthService, agentsConfig: AgentsConfig);
|
|
63
59
|
reconstructFromAgentEntity(agentEntity: Agent, credentialProvider: CredentialProvider, userId: string, integrationType?: string): Promise<{
|
|
64
60
|
agent: RuntimeAgent;
|
|
65
61
|
toolRegistry: ToolRegistry;
|
|
@@ -74,7 +70,6 @@ export declare class AgentRuntimeReconstructionService {
|
|
|
74
70
|
private getMemoryFactory;
|
|
75
71
|
private shouldAttachNodeTools;
|
|
76
72
|
private isNodeToolsModuleEnabled;
|
|
77
|
-
private isKnowledgeBaseModuleEnabled;
|
|
78
73
|
private makeToolResolver;
|
|
79
74
|
private injectRuntimeDependencies;
|
|
80
75
|
private attachSubAgentDelegationTool;
|
|
@@ -70,13 +70,11 @@ const model_config_1 = require("./json-config/model-config");
|
|
|
70
70
|
const agent_repository_1 = require("./repositories/agent.repository");
|
|
71
71
|
const agent_secure_runtime_1 = require("./runtime/agent-secure-runtime");
|
|
72
72
|
const tool_registry_1 = require("./tool-registry");
|
|
73
|
-
const agent_knowledge_command_service_1 = require("./agent-knowledge-command.service");
|
|
74
|
-
const agent_knowledge_service_1 = require("./agent-knowledge.service");
|
|
75
73
|
const agents_tools_service_1 = require("./agents-tools.service");
|
|
76
74
|
const delegate_sub_agent_tool_1 = require("./sub-agents/delegate-sub-agent-tool");
|
|
77
75
|
const sub_agent_foreground_runner_1 = require("./sub-agents/sub-agent-foreground-runner");
|
|
78
76
|
let AgentRuntimeReconstructionService = class AgentRuntimeReconstructionService {
|
|
79
|
-
constructor(logger, agentRepository, workflowRunner, activeExecutions, workflowRepository, userRepository, workflowFinderService, urlService, n8nCheckpointStorage, secureRuntime, ephemeralNodeExecutor, agentsToolsService, n8nMemory, oauthService, agentsConfig
|
|
77
|
+
constructor(logger, agentRepository, workflowRunner, activeExecutions, workflowRepository, userRepository, workflowFinderService, urlService, n8nCheckpointStorage, secureRuntime, ephemeralNodeExecutor, agentsToolsService, n8nMemory, oauthService, agentsConfig) {
|
|
80
78
|
this.logger = logger;
|
|
81
79
|
this.agentRepository = agentRepository;
|
|
82
80
|
this.workflowRunner = workflowRunner;
|
|
@@ -92,8 +90,6 @@ let AgentRuntimeReconstructionService = class AgentRuntimeReconstructionService
|
|
|
92
90
|
this.n8nMemory = n8nMemory;
|
|
93
91
|
this.oauthService = oauthService;
|
|
94
92
|
this.agentsConfig = agentsConfig;
|
|
95
|
-
this.agentKnowledgeService = agentKnowledgeService;
|
|
96
|
-
this.agentKnowledgeCommandService = agentKnowledgeCommandService;
|
|
97
93
|
}
|
|
98
94
|
async reconstructFromAgentEntity(agentEntity, credentialProvider, userId, integrationType) {
|
|
99
95
|
const config = agentEntity.schema;
|
|
@@ -209,9 +205,6 @@ let AgentRuntimeReconstructionService = class AgentRuntimeReconstructionService
|
|
|
209
205
|
isNodeToolsModuleEnabled() {
|
|
210
206
|
return this.agentsConfig.modules.includes('node-tools-searcher');
|
|
211
207
|
}
|
|
212
|
-
isKnowledgeBaseModuleEnabled() {
|
|
213
|
-
return this.agentsConfig.modules.includes('knowledge-base');
|
|
214
|
-
}
|
|
215
208
|
makeToolResolver(projectId, userId) {
|
|
216
209
|
return async (ref) => {
|
|
217
210
|
if (ref.type === 'workflow') {
|
|
@@ -243,23 +236,6 @@ let AgentRuntimeReconstructionService = class AgentRuntimeReconstructionService
|
|
|
243
236
|
async injectRuntimeDependencies(params) {
|
|
244
237
|
const { agent, agentId, projectId, credentialProvider, userId, runtimeProfile, config, nodeToolsEnabled, subAgentDelegation, parentAgentIdForDelegation, credentialIntegrations, } = params;
|
|
245
238
|
agent.tool((0, environment_tool_1.createGetEnvironmentTool)());
|
|
246
|
-
if (this.isKnowledgeBaseModuleEnabled()) {
|
|
247
|
-
try {
|
|
248
|
-
const { createSearchKnowledgeTool } = await Promise.resolve().then(() => __importStar(require('./tools/knowledge/tool')));
|
|
249
|
-
agent.tool(createSearchKnowledgeTool({
|
|
250
|
-
agentId,
|
|
251
|
-
projectId,
|
|
252
|
-
knowledgeService: this.agentKnowledgeService,
|
|
253
|
-
commandService: this.agentKnowledgeCommandService,
|
|
254
|
-
}));
|
|
255
|
-
}
|
|
256
|
-
catch (toolError) {
|
|
257
|
-
this.logger.warn('Failed to inject search_knowledge tool', {
|
|
258
|
-
agentId,
|
|
259
|
-
error: toolError instanceof Error ? toolError.message : String(toolError),
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
239
|
if (runtimeProfile === 'top-level') {
|
|
264
240
|
const integrationRegistry = di_1.Container.get(agent_chat_integration_1.ChatIntegrationRegistry);
|
|
265
241
|
if (credentialIntegrations.length > 0) {
|
|
@@ -355,8 +331,6 @@ exports.AgentRuntimeReconstructionService = AgentRuntimeReconstructionService =
|
|
|
355
331
|
agents_tools_service_1.AgentsToolsService,
|
|
356
332
|
n8n_memory_1.N8nMemory,
|
|
357
333
|
oauth_service_1.OauthService,
|
|
358
|
-
config_1.AgentsConfig
|
|
359
|
-
agent_knowledge_service_1.AgentKnowledgeService,
|
|
360
|
-
agent_knowledge_command_service_1.AgentKnowledgeCommandService])
|
|
334
|
+
config_1.AgentsConfig])
|
|
361
335
|
], AgentRuntimeReconstructionService);
|
|
362
336
|
//# sourceMappingURL=agent-runtime-reconstruction.service.js.map
|