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
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { GlobalConfig } from '@n8n/config';
|
|
2
|
-
import { LicenseMetricsRepository, WorkflowRepository } from '@n8n/db';
|
|
3
|
-
import type express from 'express';
|
|
4
|
-
import { InstanceSettings, StorageConfig } from 'n8n-core';
|
|
5
|
-
import { MessageEventBus } from '../eventbus/message-event-bus/message-event-bus';
|
|
6
|
-
import { EventService } from '../events/event.service';
|
|
7
|
-
import { CacheService } from '../services/cache/cache.service';
|
|
8
|
-
import type { MetricCategory, MetricLabel } from './types';
|
|
9
|
-
export declare class PrometheusMetricsService {
|
|
10
|
-
private readonly cacheService;
|
|
11
|
-
private readonly eventBus;
|
|
12
|
-
private readonly globalConfig;
|
|
13
|
-
private readonly eventService;
|
|
14
|
-
private readonly instanceSettings;
|
|
15
|
-
private readonly workflowRepository;
|
|
16
|
-
private readonly licenseMetricsRepository;
|
|
17
|
-
private readonly storageConfig;
|
|
18
|
-
constructor(cacheService: CacheService, eventBus: MessageEventBus, globalConfig: GlobalConfig, eventService: EventService, instanceSettings: InstanceSettings, workflowRepository: WorkflowRepository, licenseMetricsRepository: LicenseMetricsRepository, storageConfig: StorageConfig);
|
|
19
|
-
private readonly counters;
|
|
20
|
-
private tokenExchangeListenersRegistered;
|
|
21
|
-
private executionDataListenersRegistered;
|
|
22
|
-
private readonly gauges;
|
|
23
|
-
private readonly histograms;
|
|
24
|
-
private readonly prefix;
|
|
25
|
-
private readonly includes;
|
|
26
|
-
init(app: express.Application): Promise<void>;
|
|
27
|
-
enableMetric(metric: MetricCategory): void;
|
|
28
|
-
disableMetric(metric: MetricCategory): void;
|
|
29
|
-
disableAllMetrics(): void;
|
|
30
|
-
enableLabels(labels: MetricLabel[]): void;
|
|
31
|
-
disableAllLabels(): void;
|
|
32
|
-
private initN8nVersionMetric;
|
|
33
|
-
private initInstanceRoleMetric;
|
|
34
|
-
updateOnLeaderTakeover(): void;
|
|
35
|
-
updateOnLeaderStepdown(): void;
|
|
36
|
-
private initDefaultMetrics;
|
|
37
|
-
private initPssMetric;
|
|
38
|
-
private initRouteMetrics;
|
|
39
|
-
private mountMetricsEndpoint;
|
|
40
|
-
private initCacheMetrics;
|
|
41
|
-
private toCounter;
|
|
42
|
-
private initEventBusMetrics;
|
|
43
|
-
private initQueueMetrics;
|
|
44
|
-
private initWorkflowExecutionDurationMetric;
|
|
45
|
-
private initActiveWorkflowCountMetric;
|
|
46
|
-
private toLabels;
|
|
47
|
-
private buildWorkflowLabels;
|
|
48
|
-
private workflowStatisticsCache;
|
|
49
|
-
private getWorkflowStatistics;
|
|
50
|
-
private createWorkflowStatisticsGauge;
|
|
51
|
-
private initWorkflowStatisticsMetrics;
|
|
52
|
-
private initTokenExchangeMetrics;
|
|
53
|
-
private initExecutionDataMetrics;
|
|
54
|
-
}
|
|
@@ -1,607 +0,0 @@
|
|
|
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.PrometheusMetricsService = void 0;
|
|
16
|
-
const node_fs_1 = require("node:fs");
|
|
17
|
-
const config_1 = require("@n8n/config");
|
|
18
|
-
const constants_1 = require("@n8n/constants");
|
|
19
|
-
const db_1 = require("@n8n/db");
|
|
20
|
-
const decorators_1 = require("@n8n/decorators");
|
|
21
|
-
const di_1 = require("@n8n/di");
|
|
22
|
-
const express_prom_bundle_1 = __importDefault(require("express-prom-bundle"));
|
|
23
|
-
const luxon_1 = require("luxon");
|
|
24
|
-
const n8n_core_1 = require("n8n-core");
|
|
25
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
26
|
-
const prom_client_1 = __importDefault(require("prom-client"));
|
|
27
|
-
const parse_1 = __importDefault(require("semver/functions/parse"));
|
|
28
|
-
const constants_2 = require("../constants");
|
|
29
|
-
const message_event_bus_1 = require("../eventbus/message-event-bus/message-event-bus");
|
|
30
|
-
const event_service_1 = require("../events/event.service");
|
|
31
|
-
const cache_service_1 = require("../services/cache/cache.service");
|
|
32
|
-
const DURATION_BUCKETS_SECONDS = [
|
|
33
|
-
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10, 30, 60, 120, 300, 600,
|
|
34
|
-
];
|
|
35
|
-
let PrometheusMetricsService = class PrometheusMetricsService {
|
|
36
|
-
constructor(cacheService, eventBus, globalConfig, eventService, instanceSettings, workflowRepository, licenseMetricsRepository, storageConfig) {
|
|
37
|
-
this.cacheService = cacheService;
|
|
38
|
-
this.eventBus = eventBus;
|
|
39
|
-
this.globalConfig = globalConfig;
|
|
40
|
-
this.eventService = eventService;
|
|
41
|
-
this.instanceSettings = instanceSettings;
|
|
42
|
-
this.workflowRepository = workflowRepository;
|
|
43
|
-
this.licenseMetricsRepository = licenseMetricsRepository;
|
|
44
|
-
this.storageConfig = storageConfig;
|
|
45
|
-
this.counters = {};
|
|
46
|
-
this.tokenExchangeListenersRegistered = false;
|
|
47
|
-
this.executionDataListenersRegistered = false;
|
|
48
|
-
this.gauges = {};
|
|
49
|
-
this.histograms = {};
|
|
50
|
-
this.prefix = this.globalConfig.endpoints.metrics.prefix;
|
|
51
|
-
this.includes = {
|
|
52
|
-
metrics: {
|
|
53
|
-
default: this.globalConfig.endpoints.metrics.includeDefaultMetrics,
|
|
54
|
-
routes: this.globalConfig.endpoints.metrics.includeApiEndpoints,
|
|
55
|
-
cache: this.globalConfig.endpoints.metrics.includeCacheMetrics,
|
|
56
|
-
logs: this.globalConfig.endpoints.metrics.includeMessageEventBusMetrics,
|
|
57
|
-
queue: this.globalConfig.endpoints.metrics.includeQueueMetrics,
|
|
58
|
-
workflowExecutionDuration: this.globalConfig.endpoints.metrics.includeWorkflowExecutionDuration,
|
|
59
|
-
workflowStatistics: this.globalConfig.endpoints.metrics.includeWorkflowStatistics,
|
|
60
|
-
executionData: this.globalConfig.endpoints.metrics.includeExecutionDataMetrics,
|
|
61
|
-
},
|
|
62
|
-
labels: {
|
|
63
|
-
credentialsType: this.globalConfig.endpoints.metrics.includeCredentialTypeLabel,
|
|
64
|
-
nodeType: this.globalConfig.endpoints.metrics.includeNodeTypeLabel,
|
|
65
|
-
workflowId: this.globalConfig.endpoints.metrics.includeWorkflowIdLabel,
|
|
66
|
-
apiPath: this.globalConfig.endpoints.metrics.includeApiPathLabel,
|
|
67
|
-
apiMethod: this.globalConfig.endpoints.metrics.includeApiMethodLabel,
|
|
68
|
-
apiStatusCode: this.globalConfig.endpoints.metrics.includeApiStatusCodeLabel,
|
|
69
|
-
workflowName: this.globalConfig.endpoints.metrics.includeWorkflowNameLabel,
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
this.workflowStatisticsCache = null;
|
|
73
|
-
}
|
|
74
|
-
async init(app) {
|
|
75
|
-
prom_client_1.default.register.clear();
|
|
76
|
-
this.initDefaultMetrics();
|
|
77
|
-
this.initPssMetric();
|
|
78
|
-
this.initN8nVersionMetric();
|
|
79
|
-
if (this.instanceSettings.instanceType === 'main')
|
|
80
|
-
this.initInstanceRoleMetric();
|
|
81
|
-
this.initCacheMetrics();
|
|
82
|
-
this.initEventBusMetrics();
|
|
83
|
-
this.initRouteMetrics(app);
|
|
84
|
-
this.initQueueMetrics();
|
|
85
|
-
this.initWorkflowExecutionDurationMetric();
|
|
86
|
-
this.initActiveWorkflowCountMetric();
|
|
87
|
-
this.initWorkflowStatisticsMetrics();
|
|
88
|
-
this.initTokenExchangeMetrics();
|
|
89
|
-
this.initExecutionDataMetrics();
|
|
90
|
-
this.mountMetricsEndpoint(app);
|
|
91
|
-
}
|
|
92
|
-
enableMetric(metric) {
|
|
93
|
-
this.includes.metrics[metric] = true;
|
|
94
|
-
}
|
|
95
|
-
disableMetric(metric) {
|
|
96
|
-
this.includes.metrics[metric] = false;
|
|
97
|
-
}
|
|
98
|
-
disableAllMetrics() {
|
|
99
|
-
for (const metric in this.includes.metrics) {
|
|
100
|
-
this.includes.metrics[metric] = false;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
enableLabels(labels) {
|
|
104
|
-
for (const label of labels) {
|
|
105
|
-
this.includes.labels[label] = true;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
disableAllLabels() {
|
|
109
|
-
for (const label in this.includes.labels) {
|
|
110
|
-
this.includes.labels[label] = false;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
initN8nVersionMetric() {
|
|
114
|
-
const n8nVersion = (0, parse_1.default)(constants_2.N8N_VERSION ?? '0.0.0');
|
|
115
|
-
if (!n8nVersion)
|
|
116
|
-
return;
|
|
117
|
-
const versionGauge = new prom_client_1.default.Gauge({
|
|
118
|
-
name: this.prefix + 'version_info',
|
|
119
|
-
help: 'n8n version info.',
|
|
120
|
-
labelNames: ['version', 'major', 'minor', 'patch'],
|
|
121
|
-
});
|
|
122
|
-
const { version, major, minor, patch } = n8nVersion;
|
|
123
|
-
versionGauge.set({ version: 'v' + version, major, minor, patch }, 1);
|
|
124
|
-
}
|
|
125
|
-
initInstanceRoleMetric() {
|
|
126
|
-
this.gauges.instanceRoleLeader = new prom_client_1.default.Gauge({
|
|
127
|
-
name: this.prefix + 'instance_role_leader',
|
|
128
|
-
help: 'Whether this main instance is the leader (1) or not (0).',
|
|
129
|
-
});
|
|
130
|
-
this.gauges.instanceRoleLeader.set(this.instanceSettings.isLeader ? 1 : 0);
|
|
131
|
-
}
|
|
132
|
-
updateOnLeaderTakeover() {
|
|
133
|
-
this.gauges.instanceRoleLeader?.set(1);
|
|
134
|
-
}
|
|
135
|
-
updateOnLeaderStepdown() {
|
|
136
|
-
this.gauges.instanceRoleLeader?.set(0);
|
|
137
|
-
}
|
|
138
|
-
initDefaultMetrics() {
|
|
139
|
-
if (!this.includes.metrics.default)
|
|
140
|
-
return;
|
|
141
|
-
prom_client_1.default.collectDefaultMetrics({ prefix: this.globalConfig.endpoints.metrics.prefix });
|
|
142
|
-
}
|
|
143
|
-
initPssMetric() {
|
|
144
|
-
if (!this.includes.metrics.default)
|
|
145
|
-
return;
|
|
146
|
-
let pssAvailable = true;
|
|
147
|
-
try {
|
|
148
|
-
(0, node_fs_1.readFileSync)('/proc/self/smaps_rollup', 'utf8');
|
|
149
|
-
}
|
|
150
|
-
catch {
|
|
151
|
-
pssAvailable = false;
|
|
152
|
-
}
|
|
153
|
-
if (!pssAvailable)
|
|
154
|
-
return;
|
|
155
|
-
const prefix = this.prefix;
|
|
156
|
-
new prom_client_1.default.Gauge({
|
|
157
|
-
name: prefix + 'process_pss_bytes',
|
|
158
|
-
help: 'Proportional Set Size of the process in bytes.',
|
|
159
|
-
collect() {
|
|
160
|
-
try {
|
|
161
|
-
const content = (0, node_fs_1.readFileSync)('/proc/self/smaps_rollup', 'utf8');
|
|
162
|
-
const match = content.match(/^Pss:\s+(\d+)\s+kB$/m);
|
|
163
|
-
if (match) {
|
|
164
|
-
this.set(parseInt(match[1], 10) * 1024);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
catch {
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
initRouteMetrics(app) {
|
|
173
|
-
if (!this.includes.metrics.routes)
|
|
174
|
-
return;
|
|
175
|
-
const metricsMiddleware = (0, express_prom_bundle_1.default)({
|
|
176
|
-
autoregister: false,
|
|
177
|
-
includeUp: false,
|
|
178
|
-
includePath: this.includes.labels.apiPath,
|
|
179
|
-
includeMethod: this.includes.labels.apiMethod,
|
|
180
|
-
includeStatusCode: this.includes.labels.apiStatusCode,
|
|
181
|
-
httpDurationMetricName: this.prefix + 'http_request_duration_seconds',
|
|
182
|
-
});
|
|
183
|
-
const activityGauge = new prom_client_1.default.Gauge({
|
|
184
|
-
name: this.prefix + 'last_activity',
|
|
185
|
-
help: 'last instance activity (backend request) in Unix time (seconds).',
|
|
186
|
-
});
|
|
187
|
-
activityGauge.set(luxon_1.DateTime.now().toUnixInteger());
|
|
188
|
-
app.use([
|
|
189
|
-
'/api/',
|
|
190
|
-
`/${this.globalConfig.endpoints.rest}/`,
|
|
191
|
-
`/${this.globalConfig.endpoints.webhook}/`,
|
|
192
|
-
`/${this.globalConfig.endpoints.webhookWaiting}/`,
|
|
193
|
-
`/${this.globalConfig.endpoints.webhookTest}/`,
|
|
194
|
-
`/${this.globalConfig.endpoints.form}/`,
|
|
195
|
-
`/${this.globalConfig.endpoints.formWaiting}/`,
|
|
196
|
-
`/${this.globalConfig.endpoints.formTest}/`,
|
|
197
|
-
], async (req, res, next) => {
|
|
198
|
-
activityGauge.set(luxon_1.DateTime.now().toUnixInteger());
|
|
199
|
-
await metricsMiddleware(req, res, next);
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
mountMetricsEndpoint(app) {
|
|
203
|
-
app.get('/metrics', async (_req, res) => {
|
|
204
|
-
const metrics = await prom_client_1.default.register.metrics();
|
|
205
|
-
res.setHeader('Content-Type', prom_client_1.default.register.contentType);
|
|
206
|
-
res.send(metrics).end();
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
initCacheMetrics() {
|
|
210
|
-
if (!this.includes.metrics.cache)
|
|
211
|
-
return;
|
|
212
|
-
const [hitsConfig, missesConfig, updatesConfig] = ['hits', 'misses', 'updates'].map((kind) => ({
|
|
213
|
-
name: this.prefix + 'cache_' + kind + '_total',
|
|
214
|
-
help: `Total number of cache ${kind}.`,
|
|
215
|
-
labelNames: ['cache'],
|
|
216
|
-
}));
|
|
217
|
-
this.counters.cacheHitsTotal = new prom_client_1.default.Counter(hitsConfig);
|
|
218
|
-
this.counters.cacheHitsTotal.inc(0);
|
|
219
|
-
this.cacheService.on('metrics.cache.hit', () => this.counters.cacheHitsTotal?.inc(1));
|
|
220
|
-
this.counters.cacheMissesTotal = new prom_client_1.default.Counter(missesConfig);
|
|
221
|
-
this.counters.cacheMissesTotal.inc(0);
|
|
222
|
-
this.cacheService.on('metrics.cache.miss', () => this.counters.cacheMissesTotal?.inc(1));
|
|
223
|
-
this.counters.cacheUpdatesTotal = new prom_client_1.default.Counter(updatesConfig);
|
|
224
|
-
this.counters.cacheUpdatesTotal.inc(0);
|
|
225
|
-
this.cacheService.on('metrics.cache.update', () => this.counters.cacheUpdatesTotal?.inc(1));
|
|
226
|
-
}
|
|
227
|
-
toCounter(event) {
|
|
228
|
-
const { eventName } = event;
|
|
229
|
-
if (!this.counters[eventName]) {
|
|
230
|
-
const metricName = this.prefix + eventName.replace('n8n.', '').replace(/\./g, '_') + '_total';
|
|
231
|
-
if (!prom_client_1.default.validateMetricName(metricName)) {
|
|
232
|
-
this.counters[eventName] = null;
|
|
233
|
-
return null;
|
|
234
|
-
}
|
|
235
|
-
const labels = this.toLabels(event);
|
|
236
|
-
const counter = new prom_client_1.default.Counter({
|
|
237
|
-
name: metricName,
|
|
238
|
-
help: `Total number of ${eventName} events.`,
|
|
239
|
-
labelNames: Object.keys(labels),
|
|
240
|
-
});
|
|
241
|
-
this.counters[eventName] = counter;
|
|
242
|
-
}
|
|
243
|
-
return this.counters[eventName];
|
|
244
|
-
}
|
|
245
|
-
initEventBusMetrics() {
|
|
246
|
-
if (!this.includes.metrics.logs)
|
|
247
|
-
return;
|
|
248
|
-
this.eventBus.on('metrics.eventBus.event', (event) => {
|
|
249
|
-
const counter = this.toCounter(event);
|
|
250
|
-
if (!counter)
|
|
251
|
-
return;
|
|
252
|
-
const labels = this.toLabels(event);
|
|
253
|
-
counter.inc(labels, 1);
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
initQueueMetrics() {
|
|
257
|
-
if (!this.includes.metrics.queue ||
|
|
258
|
-
this.globalConfig.executions.mode !== 'queue' ||
|
|
259
|
-
this.instanceSettings.instanceType !== 'main') {
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
this.gauges.waiting = new prom_client_1.default.Gauge({
|
|
263
|
-
name: this.prefix + 'scaling_mode_queue_jobs_waiting',
|
|
264
|
-
help: 'Current number of enqueued jobs waiting for pickup in scaling mode.',
|
|
265
|
-
});
|
|
266
|
-
this.gauges.active = new prom_client_1.default.Gauge({
|
|
267
|
-
name: this.prefix + 'scaling_mode_queue_jobs_active',
|
|
268
|
-
help: 'Current number of jobs being processed across all workers in scaling mode.',
|
|
269
|
-
});
|
|
270
|
-
this.counters.completed = new prom_client_1.default.Counter({
|
|
271
|
-
name: this.prefix + 'scaling_mode_queue_jobs_completed',
|
|
272
|
-
help: 'Total number of jobs completed across all workers in scaling mode since instance start.',
|
|
273
|
-
});
|
|
274
|
-
this.counters.failed = new prom_client_1.default.Counter({
|
|
275
|
-
name: this.prefix + 'scaling_mode_queue_jobs_failed',
|
|
276
|
-
help: 'Total number of jobs failed across all workers in scaling mode since instance start.',
|
|
277
|
-
});
|
|
278
|
-
this.gauges.waiting.set(0);
|
|
279
|
-
this.gauges.active.set(0);
|
|
280
|
-
this.counters.completed.inc(0);
|
|
281
|
-
this.counters.failed.inc(0);
|
|
282
|
-
this.eventService.on('job-counts-updated', (jobCounts) => {
|
|
283
|
-
this.gauges.waiting.set(jobCounts.waiting);
|
|
284
|
-
this.gauges.active.set(jobCounts.active);
|
|
285
|
-
this.counters.completed?.inc(jobCounts.completed);
|
|
286
|
-
this.counters.failed?.inc(jobCounts.failed);
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
initWorkflowExecutionDurationMetric() {
|
|
290
|
-
if (!this.includes.metrics.workflowExecutionDuration)
|
|
291
|
-
return;
|
|
292
|
-
const labelNames = ['status', 'mode'];
|
|
293
|
-
if (this.includes.labels.workflowId)
|
|
294
|
-
labelNames.push('workflow_id');
|
|
295
|
-
this.histograms.workflowExecutionDuration = new prom_client_1.default.Histogram({
|
|
296
|
-
name: this.prefix + 'workflow_execution_duration_seconds',
|
|
297
|
-
help: 'Workflow execution duration in seconds.',
|
|
298
|
-
labelNames,
|
|
299
|
-
buckets: DURATION_BUCKETS_SECONDS,
|
|
300
|
-
});
|
|
301
|
-
this.eventService.on('workflow-post-execute', ({ runData, workflow }) => {
|
|
302
|
-
if (!runData?.stoppedAt)
|
|
303
|
-
return;
|
|
304
|
-
const durationSeconds = (runData.stoppedAt.getTime() - runData.startedAt.getTime()) / 1000;
|
|
305
|
-
const labels = {
|
|
306
|
-
status: runData.status === 'success' ? 'success' : 'failed',
|
|
307
|
-
mode: runData.mode,
|
|
308
|
-
};
|
|
309
|
-
if (this.includes.labels.workflowId) {
|
|
310
|
-
labels.workflow_id = String(workflow.id ?? 'unknown');
|
|
311
|
-
}
|
|
312
|
-
this.histograms.workflowExecutionDuration?.observe(labels, durationSeconds);
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
initActiveWorkflowCountMetric() {
|
|
316
|
-
const workflowRepository = this.workflowRepository;
|
|
317
|
-
const cacheService = this.cacheService;
|
|
318
|
-
const cacheKey = 'metrics:active-workflow-count';
|
|
319
|
-
const cacheTtl = this.globalConfig.endpoints.metrics.activeWorkflowCountInterval * constants_1.Time.seconds.toMilliseconds;
|
|
320
|
-
new prom_client_1.default.Gauge({
|
|
321
|
-
name: this.prefix + 'active_workflow_count',
|
|
322
|
-
help: 'Total number of active workflows.',
|
|
323
|
-
async collect() {
|
|
324
|
-
const value = await cacheService.get(cacheKey);
|
|
325
|
-
const numericValue = value !== undefined ? parseInt(value, 10) : undefined;
|
|
326
|
-
if (numericValue !== undefined && Number.isFinite(numericValue)) {
|
|
327
|
-
this.set(numericValue);
|
|
328
|
-
}
|
|
329
|
-
else {
|
|
330
|
-
const activeWorkflowCount = await workflowRepository.getActiveCount();
|
|
331
|
-
await cacheService.set(cacheKey, activeWorkflowCount.toString(), cacheTtl);
|
|
332
|
-
this.set(activeWorkflowCount);
|
|
333
|
-
}
|
|
334
|
-
},
|
|
335
|
-
});
|
|
336
|
-
}
|
|
337
|
-
toLabels(event) {
|
|
338
|
-
const { __type, eventName, payload } = event;
|
|
339
|
-
switch (__type) {
|
|
340
|
-
case "$$EventMessageAudit":
|
|
341
|
-
if (eventName.startsWith('n8n.audit.user.credentials')) {
|
|
342
|
-
return this.includes.labels.credentialsType
|
|
343
|
-
? {
|
|
344
|
-
credential_type: String((event.payload.credentialType ?? 'unknown').replace(/\./g, '_')),
|
|
345
|
-
}
|
|
346
|
-
: {};
|
|
347
|
-
}
|
|
348
|
-
if (eventName.startsWith('n8n.audit.workflow')) {
|
|
349
|
-
return this.buildWorkflowLabels(payload);
|
|
350
|
-
}
|
|
351
|
-
break;
|
|
352
|
-
case "$$EventMessageNode":
|
|
353
|
-
const nodeLabels = this.buildWorkflowLabels(payload);
|
|
354
|
-
if (this.includes.labels.nodeType) {
|
|
355
|
-
nodeLabels.node_type = String((payload.nodeType ?? 'unknown').replace('n8n-nodes-', '').replace(/\./g, '_'));
|
|
356
|
-
}
|
|
357
|
-
return nodeLabels;
|
|
358
|
-
case "$$EventMessageWorkflow":
|
|
359
|
-
return this.buildWorkflowLabels(payload);
|
|
360
|
-
}
|
|
361
|
-
return {};
|
|
362
|
-
}
|
|
363
|
-
buildWorkflowLabels(payload) {
|
|
364
|
-
const labels = {};
|
|
365
|
-
if (this.includes.labels.workflowId) {
|
|
366
|
-
labels.workflow_id = String(payload.workflowId ?? 'unknown');
|
|
367
|
-
}
|
|
368
|
-
if (this.includes.labels.workflowName) {
|
|
369
|
-
labels.workflow_name = String(payload.workflowName ?? 'unknown');
|
|
370
|
-
}
|
|
371
|
-
return labels;
|
|
372
|
-
}
|
|
373
|
-
async getWorkflowStatistics(cacheService, licenseMetricsRepository, cacheTtl) {
|
|
374
|
-
const now = Date.now();
|
|
375
|
-
if (this.workflowStatisticsCache &&
|
|
376
|
-
now - this.workflowStatisticsCache.timestamp < this.workflowStatisticsCache.ttl) {
|
|
377
|
-
return this.workflowStatisticsCache.data;
|
|
378
|
-
}
|
|
379
|
-
const fullCacheKey = 'metrics:workflow-statistics:shared';
|
|
380
|
-
const cachedValue = await cacheService.get(fullCacheKey);
|
|
381
|
-
if (cachedValue !== undefined) {
|
|
382
|
-
const parsedValue = (0, n8n_workflow_1.jsonParse)(String(cachedValue), { fallbackValue: undefined });
|
|
383
|
-
if (parsedValue !== undefined) {
|
|
384
|
-
this.workflowStatisticsCache = {
|
|
385
|
-
data: parsedValue,
|
|
386
|
-
timestamp: now,
|
|
387
|
-
ttl: 1000,
|
|
388
|
-
};
|
|
389
|
-
return parsedValue;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
const metrics = await licenseMetricsRepository.getLicenseRenewalMetrics();
|
|
393
|
-
await cacheService.set(fullCacheKey, JSON.stringify(metrics), cacheTtl);
|
|
394
|
-
this.workflowStatisticsCache = {
|
|
395
|
-
data: metrics,
|
|
396
|
-
timestamp: now,
|
|
397
|
-
ttl: 1000,
|
|
398
|
-
};
|
|
399
|
-
return metrics;
|
|
400
|
-
}
|
|
401
|
-
createWorkflowStatisticsGauge(metricName, help, getMetricValue, cacheService, licenseMetricsRepository, cacheTtl) {
|
|
402
|
-
const getWorkflowStatistics = this.getWorkflowStatistics.bind(this);
|
|
403
|
-
return new prom_client_1.default.Gauge({
|
|
404
|
-
name: this.prefix + metricName,
|
|
405
|
-
help,
|
|
406
|
-
async collect() {
|
|
407
|
-
const metrics = await getWorkflowStatistics(cacheService, licenseMetricsRepository, cacheTtl);
|
|
408
|
-
const value = getMetricValue(metrics);
|
|
409
|
-
this.set(value);
|
|
410
|
-
},
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
initWorkflowStatisticsMetrics() {
|
|
414
|
-
if (!this.includes.metrics.workflowStatistics)
|
|
415
|
-
return;
|
|
416
|
-
const licenseMetricsRepository = this.licenseMetricsRepository;
|
|
417
|
-
const cacheService = this.cacheService;
|
|
418
|
-
const cacheTtl = this.globalConfig.endpoints.metrics.workflowStatisticsInterval * constants_1.Time.seconds.toMilliseconds;
|
|
419
|
-
const metricsConfig = [
|
|
420
|
-
{
|
|
421
|
-
name: 'production_executions',
|
|
422
|
-
help: 'Total number of production workflow executions (success + error).',
|
|
423
|
-
getValue: (metrics) => Number(metrics.productionExecutions) || 0,
|
|
424
|
-
},
|
|
425
|
-
{
|
|
426
|
-
name: 'production_root_executions',
|
|
427
|
-
help: 'Total number of production root workflow executions (excludes sub-workflows).',
|
|
428
|
-
getValue: (metrics) => Number(metrics.productionRootExecutions) || 0,
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
name: 'manual_executions',
|
|
432
|
-
help: 'Total number of manual workflow executions (success + error).',
|
|
433
|
-
getValue: (metrics) => Number(metrics.manualExecutions) || 0,
|
|
434
|
-
},
|
|
435
|
-
{
|
|
436
|
-
name: 'enabled_users',
|
|
437
|
-
help: 'Total number of enabled users.',
|
|
438
|
-
getValue: (metrics) => Number(metrics.enabledUsers) || 0,
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
name: 'users',
|
|
442
|
-
help: 'Total number of users.',
|
|
443
|
-
getValue: (metrics) => Number(metrics.totalUsers) || 0,
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
name: 'workflows',
|
|
447
|
-
help: 'Total number of workflows.',
|
|
448
|
-
getValue: (metrics) => Number(metrics.totalWorkflows) || 0,
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
name: 'credentials',
|
|
452
|
-
help: 'Total number of credentials.',
|
|
453
|
-
getValue: (metrics) => Number(metrics.totalCredentials) || 0,
|
|
454
|
-
},
|
|
455
|
-
];
|
|
456
|
-
metricsConfig.forEach((config) => {
|
|
457
|
-
this.createWorkflowStatisticsGauge(config.name, config.help, config.getValue, cacheService, licenseMetricsRepository, cacheTtl);
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
initTokenExchangeMetrics() {
|
|
461
|
-
this.counters.tokenExchangeRequestsTotal = new prom_client_1.default.Counter({
|
|
462
|
-
name: this.prefix + 'token_exchange_requests_total',
|
|
463
|
-
help: 'Total number of token exchange requests.',
|
|
464
|
-
labelNames: ['result'],
|
|
465
|
-
});
|
|
466
|
-
this.counters.tokenExchangeRequestsTotal.inc({ result: 'success' }, 0);
|
|
467
|
-
this.counters.tokenExchangeRequestsTotal.inc({ result: 'failure' }, 0);
|
|
468
|
-
this.counters.tokenExchangeFailuresTotal = new prom_client_1.default.Counter({
|
|
469
|
-
name: this.prefix + 'token_exchange_failures_total',
|
|
470
|
-
help: 'Total number of token exchange failures broken down by reason.',
|
|
471
|
-
labelNames: ['reason'],
|
|
472
|
-
});
|
|
473
|
-
this.counters.embedLoginRequestsTotal = new prom_client_1.default.Counter({
|
|
474
|
-
name: this.prefix + 'embed_login_requests_total',
|
|
475
|
-
help: 'Total number of embed login requests.',
|
|
476
|
-
labelNames: ['result'],
|
|
477
|
-
});
|
|
478
|
-
this.counters.embedLoginRequestsTotal.inc({ result: 'success' }, 0);
|
|
479
|
-
this.counters.embedLoginRequestsTotal.inc({ result: 'failure' }, 0);
|
|
480
|
-
this.counters.embedLoginFailuresTotal = new prom_client_1.default.Counter({
|
|
481
|
-
name: this.prefix + 'embed_login_failures_total',
|
|
482
|
-
help: 'Total number of embed login failures broken down by reason.',
|
|
483
|
-
labelNames: ['reason'],
|
|
484
|
-
});
|
|
485
|
-
this.counters.tokenExchangeJitProvisioningTotal = new prom_client_1.default.Counter({
|
|
486
|
-
name: this.prefix + 'token_exchange_jit_provisioning_total',
|
|
487
|
-
help: 'Total number of users JIT-provisioned via token exchange.',
|
|
488
|
-
});
|
|
489
|
-
this.counters.tokenExchangeJitProvisioningTotal.inc(0);
|
|
490
|
-
this.counters.tokenExchangeIdentityLinkedTotal = new prom_client_1.default.Counter({
|
|
491
|
-
name: this.prefix + 'token_exchange_identity_linked_total',
|
|
492
|
-
help: 'Total number of external identities linked to existing users via token exchange.',
|
|
493
|
-
});
|
|
494
|
-
this.counters.tokenExchangeIdentityLinkedTotal.inc(0);
|
|
495
|
-
if (this.tokenExchangeListenersRegistered)
|
|
496
|
-
return;
|
|
497
|
-
this.tokenExchangeListenersRegistered = true;
|
|
498
|
-
this.eventService.on('token-exchange-succeeded', () => {
|
|
499
|
-
this.counters.tokenExchangeRequestsTotal?.inc({ result: 'success' }, 1);
|
|
500
|
-
});
|
|
501
|
-
this.eventService.on('token-exchange-failed', ({ failureReason }) => {
|
|
502
|
-
this.counters.tokenExchangeRequestsTotal?.inc({ result: 'failure' }, 1);
|
|
503
|
-
this.counters.tokenExchangeFailuresTotal?.inc({ reason: failureReason }, 1);
|
|
504
|
-
});
|
|
505
|
-
this.eventService.on('embed-login', () => {
|
|
506
|
-
this.counters.embedLoginRequestsTotal?.inc({ result: 'success' }, 1);
|
|
507
|
-
});
|
|
508
|
-
this.eventService.on('embed-login-failed', ({ failureReason }) => {
|
|
509
|
-
this.counters.embedLoginRequestsTotal?.inc({ result: 'failure' }, 1);
|
|
510
|
-
this.counters.embedLoginFailuresTotal?.inc({ reason: failureReason }, 1);
|
|
511
|
-
});
|
|
512
|
-
this.eventService.on('token-exchange-user-provisioned', () => {
|
|
513
|
-
this.counters.tokenExchangeJitProvisioningTotal?.inc(1);
|
|
514
|
-
});
|
|
515
|
-
this.eventService.on('token-exchange-identity-linked', () => {
|
|
516
|
-
this.counters.tokenExchangeIdentityLinkedTotal?.inc(1);
|
|
517
|
-
});
|
|
518
|
-
}
|
|
519
|
-
initExecutionDataMetrics() {
|
|
520
|
-
if (!this.includes.metrics.executionData)
|
|
521
|
-
return;
|
|
522
|
-
const readsTotal = (this.counters.executionDataReadsTotal = new prom_client_1.default.Counter({
|
|
523
|
-
name: this.prefix + 'execution_data_reads_total',
|
|
524
|
-
help: 'Total number of execution data reads.',
|
|
525
|
-
labelNames: ['mode', 'result'],
|
|
526
|
-
}));
|
|
527
|
-
const writesTotal = (this.counters.executionDataWritesTotal = new prom_client_1.default.Counter({
|
|
528
|
-
name: this.prefix + 'execution_data_writes_total',
|
|
529
|
-
help: 'Total number of execution data writes.',
|
|
530
|
-
labelNames: ['mode', 'result'],
|
|
531
|
-
}));
|
|
532
|
-
const unreadableBundlesTotal = (this.counters.executionDataUnreadableBundlesTotal =
|
|
533
|
-
new prom_client_1.default.Counter({
|
|
534
|
-
name: this.prefix + 'execution_data_unreadable_bundles_total',
|
|
535
|
-
help: 'Total number of execution data bundles that were missing or corrupt on read.',
|
|
536
|
-
labelNames: ['mode'],
|
|
537
|
-
}));
|
|
538
|
-
for (const mode of ['db', 'fs']) {
|
|
539
|
-
for (const result of ['success', 'failure']) {
|
|
540
|
-
readsTotal.inc({ mode, result }, 0);
|
|
541
|
-
writesTotal.inc({ mode, result }, 0);
|
|
542
|
-
}
|
|
543
|
-
unreadableBundlesTotal.inc({ mode }, 0);
|
|
544
|
-
}
|
|
545
|
-
this.histograms.executionDataReadDuration = new prom_client_1.default.Histogram({
|
|
546
|
-
name: this.prefix + 'execution_data_read_duration_seconds',
|
|
547
|
-
help: 'Execution data read duration in seconds (fetch + deserialize).',
|
|
548
|
-
labelNames: ['mode'],
|
|
549
|
-
buckets: DURATION_BUCKETS_SECONDS,
|
|
550
|
-
});
|
|
551
|
-
this.histograms.executionDataWriteDuration = new prom_client_1.default.Histogram({
|
|
552
|
-
name: this.prefix + 'execution_data_write_duration_seconds',
|
|
553
|
-
help: 'Execution data write duration in seconds.',
|
|
554
|
-
labelNames: ['mode'],
|
|
555
|
-
buckets: DURATION_BUCKETS_SECONDS,
|
|
556
|
-
});
|
|
557
|
-
this.gauges.executionDataStorageMode = new prom_client_1.default.Gauge({
|
|
558
|
-
name: this.prefix + 'execution_data_storage_mode',
|
|
559
|
-
help: 'Configured execution data storage mode (1 for the active mode, 0 otherwise).',
|
|
560
|
-
labelNames: ['mode'],
|
|
561
|
-
});
|
|
562
|
-
this.gauges.executionDataStorageMode.set({ mode: 'db' }, 0);
|
|
563
|
-
this.gauges.executionDataStorageMode.set({ mode: 'fs' }, 0);
|
|
564
|
-
this.gauges.executionDataStorageMode.set({ mode: this.storageConfig.modeTag }, 1);
|
|
565
|
-
if (this.executionDataListenersRegistered)
|
|
566
|
-
return;
|
|
567
|
-
this.executionDataListenersRegistered = true;
|
|
568
|
-
this.eventService.on('execution-data-read', ({ mode, durationMs, success, unreadableBundles }) => {
|
|
569
|
-
this.counters.executionDataReadsTotal?.inc({ mode, result: success ? 'success' : 'failure' }, 1);
|
|
570
|
-
if (success)
|
|
571
|
-
this.histograms.executionDataReadDuration?.observe({ mode }, durationMs / 1000);
|
|
572
|
-
if (unreadableBundles > 0) {
|
|
573
|
-
this.counters.executionDataUnreadableBundlesTotal?.inc({ mode }, unreadableBundles);
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
|
-
this.eventService.on('execution-data-write', ({ mode, durationMs, success }) => {
|
|
577
|
-
this.counters.executionDataWritesTotal?.inc({ mode, result: success ? 'success' : 'failure' }, 1);
|
|
578
|
-
if (success)
|
|
579
|
-
this.histograms.executionDataWriteDuration?.observe({ mode }, durationMs / 1000);
|
|
580
|
-
});
|
|
581
|
-
}
|
|
582
|
-
};
|
|
583
|
-
exports.PrometheusMetricsService = PrometheusMetricsService;
|
|
584
|
-
__decorate([
|
|
585
|
-
(0, decorators_1.OnLeaderTakeover)(),
|
|
586
|
-
__metadata("design:type", Function),
|
|
587
|
-
__metadata("design:paramtypes", []),
|
|
588
|
-
__metadata("design:returntype", void 0)
|
|
589
|
-
], PrometheusMetricsService.prototype, "updateOnLeaderTakeover", null);
|
|
590
|
-
__decorate([
|
|
591
|
-
(0, decorators_1.OnLeaderStepdown)(),
|
|
592
|
-
__metadata("design:type", Function),
|
|
593
|
-
__metadata("design:paramtypes", []),
|
|
594
|
-
__metadata("design:returntype", void 0)
|
|
595
|
-
], PrometheusMetricsService.prototype, "updateOnLeaderStepdown", null);
|
|
596
|
-
exports.PrometheusMetricsService = PrometheusMetricsService = __decorate([
|
|
597
|
-
(0, di_1.Service)(),
|
|
598
|
-
__metadata("design:paramtypes", [cache_service_1.CacheService,
|
|
599
|
-
message_event_bus_1.MessageEventBus,
|
|
600
|
-
config_1.GlobalConfig,
|
|
601
|
-
event_service_1.EventService,
|
|
602
|
-
n8n_core_1.InstanceSettings,
|
|
603
|
-
db_1.WorkflowRepository,
|
|
604
|
-
db_1.LicenseMetricsRepository,
|
|
605
|
-
n8n_core_1.StorageConfig])
|
|
606
|
-
], PrometheusMetricsService);
|
|
607
|
-
//# sourceMappingURL=prometheus-metrics.service.js.map
|