n8n 2.43.3 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abstract-server.d.ts +2 -0
- package/dist/abstract-server.js +12 -1
- package/dist/abstract-server.js.map +1 -1
- package/dist/agent-library-bundle.js +8 -0
- package/dist/auth/auth.service.js +1 -1
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/binary-data/binary-data-access.service.d.ts +4 -1
- package/dist/binary-data/binary-data-access.service.js +20 -6
- package/dist/binary-data/binary-data-access.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-execution-manager.js +1 -0
- package/dist/chat/chat-execution-manager.js.map +1 -1
- package/dist/commands/base-command.d.ts +4 -0
- package/dist/commands/base-command.js +10 -3
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/engine.d.ts +1 -0
- package/dist/commands/engine.js +16 -0
- package/dist/commands/engine.js.map +1 -1
- package/dist/commands/start.js +0 -4
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/webhook.js +1 -0
- package/dist/commands/webhook.js.map +1 -1
- package/dist/controllers/e2e.controller.js +1 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/crash-journal.js +1 -1
- package/dist/crash-journal.js.map +1 -1
- package/dist/credentials/credential-options.controller.d.ts +10 -0
- package/dist/credentials/credential-options.controller.js +64 -0
- package/dist/credentials/credential-options.controller.js.map +1 -0
- package/dist/credentials/credential-options.service.d.ts +21 -0
- package/dist/credentials/credential-options.service.js +105 -0
- package/dist/credentials/credential-options.service.js.map +1 -0
- package/dist/credentials/credentials.service.d.ts +12 -2
- package/dist/credentials/credentials.service.ee.d.ts +3 -1
- package/dist/credentials/credentials.service.ee.js +8 -2
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +44 -18
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials/pending-authorization-cleanup.task.js +5 -1
- package/dist/credentials/pending-authorization-cleanup.task.js.map +1 -1
- package/dist/errors/job-returned-to-queue.error.d.ts +5 -0
- package/dist/errors/job-returned-to-queue.error.js +12 -0
- package/dist/errors/job-returned-to-queue.error.js.map +1 -0
- package/dist/errors/response-errors/incompatible-nodes-api-version.error.d.ts +4 -4
- package/dist/events/maps/relay.event-map.d.ts +24 -2
- package/dist/events/maps/system-task-metrics.event-map.d.ts +1 -1
- package/dist/events/maps/system-task-metrics.event-map.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +2 -0
- package/dist/events/relays/telemetry.event-relay.js +66 -2
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +3 -2
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/engine-v2-execution-reader.service.d.ts +4 -0
- package/dist/executions/engine-v2-execution-reader.service.js +11 -0
- package/dist/executions/engine-v2-execution-reader.service.js.map +1 -1
- package/dist/executions/enqueued-execution-recovery.service.js +5 -1
- package/dist/executions/enqueued-execution-recovery.service.js.map +1 -1
- package/dist/executions/execution-crash.service.d.ts +3 -1
- package/dist/executions/execution-crash.service.js +4 -4
- package/dist/executions/execution-crash.service.js.map +1 -1
- package/dist/executions/execution-id.d.ts +1 -0
- package/dist/executions/execution-id.js +4 -1
- package/dist/executions/execution-id.js.map +1 -1
- package/dist/executions/execution-persistence.js +1 -1
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution-recovery.service.d.ts +1 -0
- package/dist/executions/execution-recovery.service.js +17 -5
- package/dist/executions/execution-recovery.service.js.map +1 -1
- package/dist/executions/execution.service.js +1 -0
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.d.ts +3 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js +32 -3
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
- package/dist/interfaces.d.ts +4 -1
- package/dist/license/license-renewal.task.d.ts +3 -0
- package/dist/license/license-renewal.task.js +4 -1
- package/dist/license/license-renewal.task.js.map +1 -1
- package/dist/license.js +14 -3
- package/dist/license.js.map +1 -1
- package/dist/load-nodes-and-credentials.d.ts +6 -0
- package/dist/load-nodes-and-credentials.js +28 -12
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/manual-execution.service.d.ts +5 -3
- package/dist/manual-execution.service.js +7 -6
- package/dist/manual-execution.service.js.map +1 -1
- package/dist/metrics/prometheus/active-workflow-metrics.service.d.ts +3 -5
- package/dist/metrics/prometheus/active-workflow-metrics.service.js +6 -13
- package/dist/metrics/prometheus/active-workflow-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/cached-metric-query.d.ts +14 -3
- package/dist/metrics/prometheus/cached-metric-query.js +59 -7
- package/dist/metrics/prometheus/cached-metric-query.js.map +1 -1
- package/dist/metrics/prometheus/constant.d.ts +1 -0
- package/dist/metrics/prometheus/constant.js +2 -1
- package/dist/metrics/prometheus/constant.js.map +1 -1
- package/dist/metrics/prometheus/database-metric-query.service.d.ts +39 -0
- package/dist/metrics/prometheus/database-metric-query.service.js +88 -0
- package/dist/metrics/prometheus/database-metric-query.service.js.map +1 -0
- package/dist/metrics/prometheus/db-pool-metrics.service.js +21 -0
- package/dist/metrics/prometheus/db-pool-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/prometheus.service.d.ts +3 -1
- package/dist/metrics/prometheus/prometheus.service.js +7 -3
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/metrics/prometheus/scheduler-metrics.service.d.ts +7 -5
- package/dist/metrics/prometheus/scheduler-metrics.service.js +30 -23
- package/dist/metrics/prometheus/scheduler-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/system-task-metrics.service.d.ts +4 -6
- package/dist/metrics/prometheus/system-task-metrics.service.js +9 -22
- package/dist/metrics/prometheus/system-task-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-info-metrics.service.d.ts +3 -5
- package/dist/metrics/prometheus/workflow-info-metrics.service.js +14 -20
- package/dist/metrics/prometheus/workflow-info-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-publication-metrics.service.d.ts +4 -5
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js +10 -22
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.d.ts +3 -5
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.js +6 -13
- package/dist/metrics/prometheus/workflow-statistics-metrics.service.js.map +1 -1
- package/dist/middlewares/content-security-policy.js +45 -10
- package/dist/middlewares/content-security-policy.js.map +1 -1
- package/dist/middlewares/list-query/dtos/workflow.filter.dto.d.ts +2 -0
- package/dist/middlewares/list-query/dtos/workflow.filter.dto.js +9 -0
- package/dist/middlewares/list-query/dtos/workflow.filter.dto.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-case-generation.service.d.ts +8 -2
- package/dist/modules/agent-evals/agent-eval-case-generation.service.js +113 -14
- package/dist/modules/agent-evals/agent-eval-case-generation.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-fix-suggestion.d.ts +21 -0
- package/dist/modules/agent-evals/agent-eval-fix-suggestion.js +55 -0
- package/dist/modules/agent-evals/agent-eval-fix-suggestion.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval-instructions-rewrite.d.ts +22 -0
- package/dist/modules/agent-evals/agent-eval-instructions-rewrite.js +108 -0
- package/dist/modules/agent-evals/agent-eval-instructions-rewrite.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval-judge.d.ts +22 -0
- package/dist/modules/agent-evals/agent-eval-judge.js +36 -0
- package/dist/modules/agent-evals/agent-eval-judge.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js +8 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-runner.service.d.ts +12 -2
- package/dist/modules/agent-evals/agent-eval-runner.service.js +102 -2
- package/dist/modules/agent-evals/agent-eval-runner.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval.service.d.ts +17 -3
- package/dist/modules/agent-evals/agent-eval.service.js +185 -2
- package/dist/modules/agent-evals/agent-eval.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-evals.controller.d.ts +16 -2
- package/dist/modules/agent-evals/agent-evals.controller.js +111 -2
- package/dist/modules/agent-evals/agent-evals.controller.js.map +1 -1
- package/dist/modules/agent-evals/case-generation/case-generation-prompt.d.ts +18 -1
- package/dist/modules/agent-evals/case-generation/case-generation-prompt.js +47 -9
- package/dist/modules/agent-evals/case-generation/case-generation-prompt.js.map +1 -1
- package/dist/modules/agents/agent-budget-alert.service.d.ts +21 -0
- package/dist/modules/agents/agent-budget-alert.service.js +82 -0
- package/dist/modules/agents/agent-budget-alert.service.js.map +1 -0
- package/dist/modules/agents/agent-chat-execution.service.d.ts +6 -2
- package/dist/modules/agents/agent-chat-execution.service.js +13 -15
- package/dist/modules/agents/agent-chat-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-chat.controller.d.ts +36 -0
- package/dist/modules/agents/agent-chat.controller.js +149 -54
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-checkpoint-pruning.task.d.ts +5 -2
- package/dist/modules/agents/agent-checkpoint-pruning.task.js +7 -4
- package/dist/modules/agents/agent-checkpoint-pruning.task.js.map +1 -1
- package/dist/modules/agents/agent-config-preparation.service.d.ts +325 -0
- package/dist/modules/agents/agent-config-preparation.service.js +100 -0
- package/dist/modules/agents/agent-config-preparation.service.js.map +1 -0
- package/dist/modules/agents/agent-config.service.d.ts +15 -18
- package/dist/modules/agents/agent-config.service.js +58 -129
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-context-readers.js +1 -2
- package/dist/modules/agents/agent-context-readers.js.map +1 -1
- package/dist/modules/agents/agent-custom-tools.service.d.ts +8 -9
- package/dist/modules/agents/agent-custom-tools.service.js +14 -19
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-definition.service.d.ts +19 -0
- package/dist/modules/agents/agent-definition.service.js +75 -0
- package/dist/modules/agents/agent-definition.service.js.map +1 -0
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +10 -8
- package/dist/modules/agents/agent-execution-orchestrator.service.js +250 -146
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.js +2 -1
- package/dist/modules/agents/agent-execution-update-broadcaster.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +9 -1
- package/dist/modules/agents/agent-execution.service.js +22 -1
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +3 -1
- package/dist/modules/agents/agent-integration-persistence.service.js +23 -15
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +12 -2
- package/dist/modules/agents/agent-integrations.controller.js +49 -4
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweep.task.d.ts +12 -0
- package/dist/modules/agents/agent-interrupted-execution-sweep.task.js +36 -0
- package/dist/modules/agents/agent-interrupted-execution-sweep.task.js.map +1 -0
- package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +3 -2
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js +20 -7
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -1
- package/dist/modules/agents/agent-message-queue-consumer.service.js +2 -5
- package/dist/modules/agents/agent-message-queue-consumer.service.js.map +1 -1
- package/dist/modules/agents/agent-message-queue.service.d.ts +3 -1
- package/dist/modules/agents/agent-message-queue.service.js +7 -5
- package/dist/modules/agents/agent-message-queue.service.js.map +1 -1
- package/dist/modules/agents/agent-message-steering.service.d.ts +2 -1
- package/dist/modules/agents/agent-message-steering.service.js +17 -9
- package/dist/modules/agents/agent-message-steering.service.js.map +1 -1
- package/dist/modules/agents/agent-modification-telemetry.service.d.ts +33 -3
- package/dist/modules/agents/agent-modification-telemetry.service.js +11 -8
- package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -1
- package/dist/modules/agents/agent-n8n-chat-unavailable.error.d.ts +4 -0
- package/dist/modules/agents/agent-n8n-chat-unavailable.error.js +11 -0
- package/dist/modules/agents/agent-n8n-chat-unavailable.error.js.map +1 -0
- package/dist/modules/agents/agent-policy.service.d.ts +10 -0
- package/dist/modules/agents/agent-policy.service.js +44 -0
- package/dist/modules/agents/agent-policy.service.js.map +1 -0
- package/dist/modules/agents/agent-publish.service.d.ts +17 -8
- package/dist/modules/agents/agent-publish.service.js +95 -113
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-push-recipients.service.d.ts +1 -0
- package/dist/modules/agents/agent-push-recipients.service.js +5 -2
- package/dist/modules/agents/agent-push-recipients.service.js.map +1 -1
- package/dist/modules/agents/agent-runnable-state.service.d.ts +3 -1
- package/dist/modules/agents/agent-runnable-state.service.js +5 -3
- package/dist/modules/agents/agent-runnable-state.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +3 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +7 -7
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-instrumentation.d.ts +6 -0
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +2 -2
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +23 -16
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-save-completion.service.d.ts +14 -0
- package/dist/modules/agents/agent-save-completion.service.js +51 -0
- package/dist/modules/agents/agent-save-completion.service.js.map +1 -0
- package/dist/modules/agents/agent-setup-completion.service.d.ts +2 -1
- package/dist/modules/agents/agent-setup-completion.service.js +5 -3
- package/dist/modules/agents/agent-setup-completion.service.js.map +1 -1
- package/dist/modules/agents/agent-skill-refs.service.d.ts +12 -0
- package/dist/modules/agents/agent-skill-refs.service.js +52 -0
- package/dist/modules/agents/agent-skill-refs.service.js.map +1 -0
- package/dist/modules/agents/agent-skills.service.d.ts +14 -8
- package/dist/modules/agents/agent-skills.service.js +64 -41
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.d.ts +1 -0
- package/dist/modules/agents/agent-sse-stream.js +15 -0
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +12 -7
- package/dist/modules/agents/agent-task.service.js +35 -31
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-telemetry.d.ts +2 -2
- package/dist/modules/agents/agent-telemetry.js +3 -2
- package/dist/modules/agents/agent-telemetry.js.map +1 -1
- package/dist/modules/agents/agent-test-run.service.d.ts +4 -2
- package/dist/modules/agents/agent-test-run.service.js +2 -2
- package/dist/modules/agents/agent-test-run.service.js.map +1 -1
- package/dist/modules/agents/agent-threads.controller.js +2 -1
- package/dist/modules/agents/agent-threads.controller.js.map +1 -1
- package/dist/modules/agents/agent-tool-approval.service.d.ts +1 -1
- package/dist/modules/agents/agent-tool-approval.service.js +2 -1
- package/dist/modules/agents/agent-tool-approval.service.js.map +1 -1
- package/dist/modules/agents/agent-turn-execution.service.d.ts +4 -4
- package/dist/modules/agents/agent-turn-execution.service.js +27 -25
- package/dist/modules/agents/agent-turn-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +11 -7
- package/dist/modules/agents/agent-validation.service.js +60 -30
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +13 -5
- package/dist/modules/agents/agent-workflow-execution.service.js +44 -20
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.js +2 -3
- package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +16 -0
- package/dist/modules/agents/agents-list.controller.d.ts +4 -1
- package/dist/modules/agents/agents-list.controller.js +44 -0
- package/dist/modules/agents/agents-list.controller.js.map +1 -1
- package/dist/modules/agents/agents.controller.js +1 -0
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +1 -3
- package/dist/modules/agents/agents.module.js +9 -25
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +21 -5
- package/dist/modules/agents/agents.service.js +63 -12
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/background/agent-background-job.service.d.ts +3 -3
- package/dist/modules/agents/background/agent-background-job.service.js +39 -10
- package/dist/modules/agents/background/agent-background-job.service.js.map +1 -1
- package/dist/modules/agents/background/agent-wake.service.js +13 -5
- package/dist/modules/agents/background/agent-wake.service.js.map +1 -1
- package/dist/modules/agents/background/background-job-tools.d.ts +2 -2
- package/dist/modules/agents/background/background-job-tools.js +9 -58
- package/dist/modules/agents/background/background-job-tools.js.map +1 -1
- package/dist/modules/agents/budget-guardrail.d.ts +1 -0
- package/dist/modules/agents/budget-guardrail.js +42 -1
- package/dist/modules/agents/budget-guardrail.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +5 -5
- package/dist/modules/agents/builder/agents-builder-prompts.js +52 -31
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +189 -89
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +25 -12
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +4 -4
- package/dist/modules/agents/builder/skills/node-tools.skill.js +4 -4
- package/dist/modules/agents/builder/skills/node-tools.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +14 -8
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/verify-mcp-server.tool.d.ts +9 -3
- package/dist/modules/agents/builder/verify-mcp-server.tool.js +16 -3
- package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -1
- package/dist/modules/agents/entities/agent-history.entity.d.ts +2 -2
- package/dist/modules/agents/entities/agent-history.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +2 -2
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/instance-ai-agent-context.adapter.d.ts +3 -1
- package/dist/modules/agents/instance-ai-agent-context.adapter.js +5 -3
- package/dist/modules/agents/instance-ai-agent-context.adapter.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +4 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +67 -20
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +18 -3
- package/dist/modules/agents/integrations/agent-chat-integration.js +1 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +4 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +81 -24
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/channel-rate-limit.d.ts +6 -0
- package/dist/modules/agents/integrations/channel-rate-limit.js +11 -1
- package/dist/modules/agents/integrations/channel-rate-limit.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +6 -0
- package/dist/modules/agents/integrations/component-mapper.js +16 -3
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/esm-loader.d.ts +1 -0
- package/dist/modules/agents/integrations/esm-loader.js +4 -0
- package/dist/modules/agents/integrations/esm-loader.js.map +1 -1
- package/dist/modules/agents/integrations/integration-helpers.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-helpers.js +7 -0
- package/dist/modules/agents/integrations/integration-helpers.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js +13 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.js +1 -0
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +7 -0
- package/dist/modules/agents/integrations/n8n-memory.js +24 -10
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +2 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +2 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-integration.d.ts +15 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-integration.js +63 -2
- package/dist/modules/agents/integrations/platforms/teams/teams-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.d.ts +11 -0
- package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js +5 -3
- package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/whatsapp-integration.d.ts +43 -0
- package/dist/modules/agents/integrations/platforms/whatsapp-integration.js +337 -0
- package/dist/modules/agents/integrations/platforms/whatsapp-integration.js.map +1 -0
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +2 -1
- package/dist/modules/agents/json-config/agent-config-composition.js +3 -2
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -1
- package/dist/modules/agents/json-config/agent-document.d.ts +7 -0
- package/dist/modules/agents/json-config/agent-document.js +13 -0
- package/dist/modules/agents/json-config/agent-document.js.map +1 -0
- package/dist/modules/agents/json-config/credential-field-mapping.d.ts +1 -1
- package/dist/modules/agents/json-config/credential-field-mapping.js +33 -8
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.js +6 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
- package/dist/modules/agents/json-config/model-config.js +13 -1
- package/dist/modules/agents/json-config/model-config.js.map +1 -1
- package/dist/modules/agents/json-config/prune-missing-config-references.d.ts +5 -0
- package/dist/modules/agents/json-config/prune-missing-config-references.js +20 -0
- package/dist/modules/agents/json-config/prune-missing-config-references.js.map +1 -0
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +8 -94
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
- package/dist/modules/agents/plans/agent-plan-tools.js +3 -3
- package/dist/modules/agents/plans/agent-plan-tools.js.map +1 -1
- package/dist/modules/agents/register-favorite-resolver.js +2 -2
- package/dist/modules/agents/register-favorite-resolver.js.map +1 -1
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js +4 -1
- package/dist/modules/agents/repositories/agent-credential-dependency.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +10 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +67 -8
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +8 -9
- package/dist/modules/agents/repositories/agent-history.repository.js +9 -8
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-message-queue.repository.d.ts +15 -2
- package/dist/modules/agents/repositories/agent-message-queue.repository.js +9 -2
- package/dist/modules/agents/repositories/agent-message-queue.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +6 -5
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js +9 -8
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task.repository.d.ts +9 -4
- package/dist/modules/agents/repositories/agent-task.repository.js +40 -6
- package/dist/modules/agents/repositories/agent-task.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-thread.repository.d.ts +6 -0
- package/dist/modules/agents/repositories/agent-thread.repository.js +20 -0
- package/dist/modules/agents/repositories/agent-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +23 -9
- package/dist/modules/agents/repositories/agent.repository.js +118 -15
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +1 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +2 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +3 -1
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +8 -5
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
- package/dist/modules/agents/tools/node-tool-factory.d.ts +1 -1
- package/dist/modules/agents/tools/node-tool-factory.js +3 -14
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +4 -2
- package/dist/modules/agents/tools/workflow-tool-factory.js +39 -13
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +5 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
- package/dist/modules/agents/types/agent-queued-message.d.ts +1 -0
- package/dist/modules/agents/types/agent-queued-message.js +3 -1
- package/dist/modules/agents/types/agent-queued-message.js.map +1 -1
- package/dist/modules/agents/utils/agent-config-hash.d.ts +1 -0
- package/dist/modules/agents/utils/agent-config-hash.js +4 -0
- package/dist/modules/agents/utils/agent-config-hash.js.map +1 -1
- package/dist/modules/agents/utils/agent-definition.d.ts +329 -0
- package/dist/modules/agents/utils/agent-definition.js +17 -0
- package/dist/modules/agents/utils/agent-definition.js.map +1 -0
- package/dist/modules/agents/utils/agent-draft.utils.d.ts +2 -3
- package/dist/modules/agents/utils/agent-draft.utils.js +2 -2
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
- package/dist/modules/agents/utils/agent-execution-counter.d.ts +2 -1
- package/dist/modules/agents/utils/agent-execution-counter.js +4 -1
- package/dist/modules/agents/utils/agent-execution-counter.js.map +1 -1
- package/dist/modules/agents/utils/agent-missing-skill-ids.d.ts +3 -2
- package/dist/modules/agents/utils/agent-missing-skill-ids.js +2 -2
- package/dist/modules/agents/utils/agent-missing-skill-ids.js.map +1 -1
- package/dist/modules/agents/utils/agent-published-snapshot.d.ts +8 -1
- package/dist/modules/agents/utils/agent-published-snapshot.js +21 -7
- package/dist/modules/agents/utils/agent-published-snapshot.js.map +1 -1
- package/dist/modules/agents/utils/agent-ref.d.ts +8 -0
- package/dist/modules/agents/utils/agent-ref.js +12 -0
- package/dist/modules/agents/utils/agent-ref.js.map +1 -0
- package/dist/modules/agents/utils/agent-thread-access.d.ts +3 -1
- package/dist/modules/agents/utils/agent-thread-access.js +7 -0
- package/dist/modules/agents/utils/agent-thread-access.js.map +1 -1
- package/dist/modules/agents/utils/extract-agent-credential-ids.d.ts +1 -2
- package/dist/modules/agents/utils/extract-agent-credential-ids.js +6 -33
- package/dist/modules/agents/utils/extract-agent-credential-ids.js.map +1 -1
- package/dist/modules/agents/utils/extract-agent-workflow-refs.d.ts +1 -1
- package/dist/modules/agents/utils/extract-agent-workflow-refs.js.map +1 -1
- package/dist/modules/agents/utils/parse-thread-list-limit.d.ts +1 -0
- package/dist/modules/agents/utils/parse-thread-list-limit.js +7 -0
- package/dist/modules/agents/utils/parse-thread-list-limit.js.map +1 -0
- package/dist/modules/agents/utils/skill-instruction-edits.d.ts +5 -0
- package/dist/modules/agents/utils/skill-instruction-edits.js +15 -0
- package/dist/modules/agents/utils/skill-instruction-edits.js.map +1 -0
- package/dist/modules/agents/utils/visit-agent-credential-references.d.ts +8 -0
- package/dist/modules/agents/utils/visit-agent-credential-references.js +67 -0
- package/dist/modules/agents/utils/visit-agent-credential-references.js.map +1 -0
- package/dist/modules/breaking-changes/breaking-changes.controller.d.ts +17 -5
- package/dist/modules/breaking-changes/breaking-changes.controller.js +94 -8
- package/dist/modules/breaking-changes/breaking-changes.controller.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.module.d.ts +1 -1
- package/dist/modules/breaking-changes/breaking-changes.module.js +2 -1
- package/dist/modules/breaking-changes/breaking-changes.module.js.map +1 -1
- package/dist/modules/breaking-changes/database/entities/migration-workflow-owner.entity.d.ts +14 -0
- package/dist/modules/breaking-changes/database/entities/migration-workflow-owner.entity.js +57 -0
- package/dist/modules/breaking-changes/database/entities/migration-workflow-owner.entity.js.map +1 -0
- package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.d.ts +12 -6
- package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.js +104 -30
- package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.js.map +1 -1
- package/dist/modules/breaking-changes/database/repositories/migration-workflow-owner.repository.d.ts +14 -0
- package/dist/modules/breaking-changes/database/repositories/migration-workflow-owner.repository.js +79 -0
- package/dist/modules/breaking-changes/database/repositories/migration-workflow-owner.repository.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/index.js +1 -2
- package/dist/modules/breaking-changes/migrations/index.js.map +1 -1
- package/dist/modules/breaking-changes/owners/migration-owner-assignment.service.d.ts +17 -0
- package/dist/modules/breaking-changes/owners/migration-owner-assignment.service.js +64 -0
- package/dist/modules/breaking-changes/owners/migration-owner-assignment.service.js.map +1 -0
- package/dist/modules/breaking-changes/owners/migration-owner-suggestion.service.d.ts +16 -0
- package/dist/modules/breaking-changes/owners/migration-owner-suggestion.service.js +113 -0
- package/dist/modules/breaking-changes/owners/migration-owner-suggestion.service.js.map +1 -0
- package/dist/modules/breaking-changes/owners/workflow-owner.d.ts +3 -0
- package/dist/modules/breaking-changes/owners/workflow-owner.js +13 -0
- package/dist/modules/breaking-changes/owners/workflow-owner.js.map +1 -0
- package/dist/modules/breaking-changes/query/migration-finding-query.service.d.ts +16 -5
- package/dist/modules/breaking-changes/query/migration-finding-query.service.js +51 -16
- package/dist/modules/breaking-changes/query/migration-finding-query.service.js.map +1 -1
- package/dist/modules/breaking-changes/rules/index.d.ts +0 -1
- package/dist/modules/breaking-changes/rules/index.js +0 -1
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/sync/migration-finding-diff.js +2 -1
- package/dist/modules/breaking-changes/sync/migration-finding-diff.js.map +1 -1
- package/dist/modules/breaking-changes/sync/migration-finding-sync.service.d.ts +7 -3
- package/dist/modules/breaking-changes/sync/migration-finding-sync.service.js +22 -15
- package/dist/modules/breaking-changes/sync/migration-finding-sync.service.js.map +1 -1
- package/dist/modules/breaking-changes/triage/migration-finding-triage.service.d.ts +11 -0
- package/dist/modules/breaking-changes/triage/migration-finding-triage.service.js +47 -0
- package/dist/modules/breaking-changes/triage/migration-finding-triage.service.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-execution-watcher.service.js +2 -0
- package/dist/modules/chat-hub/chat-hub-execution-watcher.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-execution.service.js +1 -0
- package/dist/modules/chat-hub/chat-hub-execution.service.js.map +1 -1
- package/dist/modules/community-packages/community-node-types-utils.d.ts +2 -2
- package/dist/modules/community-packages/community-node.command.d.ts +1 -1
- package/dist/modules/community-packages/community-packages.config.d.ts +1 -1
- package/dist/modules/community-packages/community-packages.service.js +6 -6
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/data-table/data-table-column.repository.d.ts +12 -4
- package/dist/modules/data-table/data-table-column.repository.js +51 -6
- package/dist/modules/data-table/data-table-column.repository.js.map +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.service.d.ts +5 -7
- package/dist/modules/data-table/data-table-file-cleanup.service.js +35 -37
- package/dist/modules/data-table/data-table-file-cleanup.service.js.map +1 -1
- package/dist/modules/data-table/data-table-file-cleanup.task.d.ts +14 -0
- package/dist/modules/data-table/data-table-file-cleanup.task.js +37 -0
- package/dist/modules/data-table/data-table-file-cleanup.task.js.map +1 -0
- package/dist/modules/data-table/data-table.module.d.ts +2 -1
- package/dist/modules/data-table/data-table.module.js +4 -4
- package/dist/modules/data-table/data-table.module.js.map +1 -1
- package/dist/modules/data-table/data-table.repository.d.ts +1 -1
- package/dist/modules/data-table/data-table.repository.js +2 -1
- package/dist/modules/data-table/data-table.repository.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +8 -1
- package/dist/modules/data-table/data-table.service.js +11 -2
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/data-table/register-favorite-resolver.js +2 -2
- package/dist/modules/data-table/register-favorite-resolver.js.map +1 -1
- package/dist/modules/data-table/utils/pair-columns.d.ts +27 -0
- package/dist/modules/data-table/utils/pair-columns.js +48 -0
- package/dist/modules/data-table/utils/pair-columns.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +40 -52
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +55 -40
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.d.ts +1 -4
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js +2 -15
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-refresh.task.d.ts +13 -0
- package/dist/modules/external-secrets.ee/external-secrets-refresh.task.js +36 -0
- package/dist/modules/external-secrets.ee/external-secrets-refresh.task.js.map +1 -0
- package/dist/modules/external-secrets.ee/external-secrets.config.js +1 -1
- package/dist/modules/external-secrets.ee/external-secrets.config.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets.module.d.ts +1 -0
- package/dist/modules/external-secrets.ee/external-secrets.module.js +4 -0
- package/dist/modules/external-secrets.ee/external-secrets.module.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/one-password.js +1 -1
- package/dist/modules/external-secrets.ee/providers/one-password.js.map +1 -1
- package/dist/modules/external-secrets.ee/secrets-cache.service.d.ts +4 -2
- package/dist/modules/external-secrets.ee/secrets-cache.service.js +25 -8
- package/dist/modules/external-secrets.ee/secrets-cache.service.js.map +1 -1
- package/dist/modules/favorites/favorites.service.d.ts +1 -1
- package/dist/modules/favorites/favorites.service.js +2 -2
- package/dist/modules/favorites/favorites.service.js.map +1 -1
- package/dist/modules/inbound-auth-core/authentication-pipeline.d.ts +11 -0
- package/dist/modules/inbound-auth-core/authentication-pipeline.js +50 -0
- package/dist/modules/inbound-auth-core/authentication-pipeline.js.map +1 -0
- package/dist/modules/inbound-auth-core/authentication.service.d.ts +12 -0
- package/dist/modules/inbound-auth-core/authentication.service.js +86 -0
- package/dist/modules/inbound-auth-core/authentication.service.js.map +1 -0
- package/dist/modules/inbound-auth-core/database/entities/trusted-source.entity.d.ts +3 -0
- package/dist/modules/inbound-auth-core/database/entities/trusted-source.entity.js +12 -0
- package/dist/modules/inbound-auth-core/database/entities/trusted-source.entity.js.map +1 -1
- package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.d.ts +20 -3
- package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.js +70 -2
- package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.js.map +1 -1
- package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.d.ts +15 -3
- package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.js +58 -2
- package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.js.map +1 -1
- package/dist/modules/inbound-auth-core/grant-authorization.d.ts +4 -0
- package/dist/modules/inbound-auth-core/grant-authorization.js +10 -0
- package/dist/modules/inbound-auth-core/grant-authorization.js.map +1 -0
- package/dist/modules/inbound-auth-core/identity/external-identity.d.ts +3 -0
- package/dist/modules/inbound-auth-core/identity/external-identity.js +86 -0
- package/dist/modules/inbound-auth-core/identity/external-identity.js.map +1 -0
- package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.d.ts +27 -0
- package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.js +287 -0
- package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.js.map +1 -0
- package/dist/modules/inbound-auth-core/inbound-auth-core.module.d.ts +1 -0
- package/dist/modules/inbound-auth-core/inbound-auth-core.module.js +30 -20
- package/dist/modules/inbound-auth-core/inbound-auth-core.module.js.map +1 -1
- package/dist/modules/inbound-auth-core/key.utils.d.ts +2 -0
- package/dist/modules/inbound-auth-core/key.utils.js +18 -0
- package/dist/modules/inbound-auth-core/key.utils.js.map +1 -0
- package/dist/modules/inbound-auth-core/oauth2-bearer.driver.d.ts +16 -0
- package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js +171 -0
- package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js.map +1 -0
- package/dist/modules/inbound-auth-core/system-trusted-source.seeder.d.ts +52 -0
- package/dist/modules/inbound-auth-core/system-trusted-source.seeder.js +74 -0
- package/dist/modules/inbound-auth-core/system-trusted-source.seeder.js.map +1 -0
- package/dist/modules/inbound-auth-core/trusted-source-discovery.service.d.ts +19 -0
- package/dist/modules/inbound-auth-core/trusted-source-discovery.service.js +141 -0
- package/dist/modules/inbound-auth-core/trusted-source-discovery.service.js.map +1 -0
- package/dist/modules/inbound-auth-core/trusted-source-discovery.task.d.ts +12 -0
- package/dist/modules/{insights/insights-compaction.task.js → inbound-auth-core/trusted-source-discovery.task.js} +14 -16
- package/dist/modules/inbound-auth-core/trusted-source-discovery.task.js.map +1 -0
- package/dist/modules/inbound-auth-core/trusted-source.gate.d.ts +13 -0
- package/dist/modules/inbound-auth-core/trusted-source.gate.js +53 -0
- package/dist/modules/inbound-auth-core/trusted-source.gate.js.map +1 -0
- package/dist/modules/inbound-auth-core/trusted-source.store.d.ts +18 -16
- package/dist/modules/inbound-auth-core/trusted-source.store.js +107 -7
- package/dist/modules/inbound-auth-core/trusted-source.store.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.d.ts +2 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js +42 -37
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +7 -2
- package/dist/modules/instance-ai/eval/execution.service.js +150 -22
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +6 -3
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js +2 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +1 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js +2 -1
- package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +25 -9
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.d.ts +4 -2
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js +5 -2
- package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-credit.service.d.ts +3 -0
- package/dist/modules/instance-ai/instance-ai-credit.service.js +18 -0
- package/dist/modules/instance-ai/instance-ai-credit.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-pending-agent.service.js +1 -0
- package/dist/modules/instance-ai/instance-ai-pending-agent.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-thread-tabs.service.d.ts +10 -1
- package/dist/modules/instance-ai/instance-ai-thread-tabs.service.js +74 -5
- package/dist/modules/instance-ai/instance-ai-thread-tabs.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +30 -7
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +28 -2
- package/dist/modules/instance-ai/instance-ai.controller.js +5 -3
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +8 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +10 -1
- package/dist/modules/instance-ai/instance-ai.service.js +164 -24
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-context.service.js +4 -5
- package/dist/modules/instance-ai/instance-context.service.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-thread-tabs.repository.d.ts +5 -3
- package/dist/modules/instance-ai/repositories/instance-ai-thread-tabs.repository.js +24 -4
- package/dist/modules/instance-ai/repositories/instance-ai-thread-tabs.repository.js.map +1 -1
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.d.ts +23 -0
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.js +100 -0
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.js.map +1 -0
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.d.ts +10 -0
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js +50 -0
- package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js.map +1 -0
- package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.d.ts +16 -0
- package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.js +77 -0
- package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.js.map +1 -0
- package/dist/modules/instance-ai/self-healing/self-healing-result.service.d.ts +33 -0
- package/dist/modules/instance-ai/self-healing/self-healing-result.service.js +178 -0
- package/dist/modules/instance-ai/self-healing/self-healing-result.service.js.map +1 -0
- package/dist/modules/instance-ai/self-healing/self-healing-results.controller.d.ts +16 -0
- package/dist/modules/instance-ai/self-healing/self-healing-results.controller.js +69 -0
- package/dist/modules/instance-ai/self-healing/self-healing-results.controller.js.map +1 -0
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion-activity.entity.d.ts +3 -1
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion-activity.entity.js +10 -0
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion-activity.entity.js.map +1 -1
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.entity.d.ts +6 -1
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.entity.js +20 -0
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.entity.js.map +1 -1
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.repository.d.ts +5 -2
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.repository.js +45 -1
- package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.repository.js.map +1 -1
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.d.ts +26 -0
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.js +173 -0
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.js.map +1 -0
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.d.ts +6 -0
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.js +57 -0
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.js.map +1 -0
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.d.ts +29 -5
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.js +86 -25
- package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.js.map +1 -1
- package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.d.ts +1 -1
- package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.js +2 -2
- package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.js.map +1 -1
- package/dist/modules/instance-reporting.ee/instance-reporting.service.d.ts +3 -2
- package/dist/modules/instance-reporting.ee/instance-reporting.service.js +23 -9
- package/dist/modules/instance-reporting.ee/instance-reporting.service.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +4 -3
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-slack-setup.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +3 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +72 -43
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +6 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.js +1 -0
- package/dist/modules/mcp/tools/publish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +2 -9
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-history.utils.js +1 -1
- package/dist/modules/mcp/tools/workflow-history.utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.d.ts +2 -1
- package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
- package/dist/modules/modules.manifest.js +3 -1
- package/dist/modules/modules.manifest.js.map +1 -1
- package/dist/modules/n8n-packages/engine/credential-save-policy.d.ts +11 -0
- package/dist/modules/n8n-packages/engine/credential-save-policy.js +56 -0
- package/dist/modules/n8n-packages/engine/credential-save-policy.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-gates.d.ts +2 -0
- package/dist/modules/n8n-packages/engine/import-gates.js +9 -0
- package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +4 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +106 -32
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/import-result.js +2 -2
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js +2 -0
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +6 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +72 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +7 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +1 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/agent/agent-export.types.d.ts +39 -0
- package/dist/modules/n8n-packages/entities/agent/agent-export.types.js +3 -0
- package/dist/modules/n8n-packages/entities/agent/agent-export.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/agent/agent-import.types.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/agent/agent-import.types.js +3 -0
- package/dist/modules/n8n-packages/entities/agent/agent-import.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.d.ts +12 -0
- package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.js +75 -0
- package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/agent/agent-selection.exporter.d.ts +20 -0
- package/dist/modules/n8n-packages/entities/agent/agent-selection.exporter.js +173 -0
- package/dist/modules/n8n-packages/entities/agent/agent-selection.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/agent/agent.exporter.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/agent/agent.exporter.js +76 -0
- package/dist/modules/n8n-packages/entities/agent/agent.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/agent/agent.serializer.d.ts +8 -0
- package/dist/modules/n8n-packages/entities/agent/agent.serializer.js +50 -0
- package/dist/modules/n8n-packages/entities/agent/agent.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js +1 -12
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +1 -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 +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +12 -1
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.d.ts +5 -4
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +18 -1
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +2 -2
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +19 -14
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +8 -5
- package/dist/modules/n8n-packages/entities/credential/credential.types.js +0 -1
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-compat.d.ts +14 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table-compat.js +52 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table-compat.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-importer.d.ts +10 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table-importer.js +136 -30
- package/dist/modules/n8n-packages/entities/data-table/data-table-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-matching-mode.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-matching-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.d.ts +9 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js +11 -8
- package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.d.ts +2 -7
- package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.js +16 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.d.ts +2 -3
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +5 -19
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js +1 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.types.d.ts +46 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table.types.js +0 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +4 -4
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project-export-access.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/project/project-export-access.js +14 -0
- package/dist/modules/n8n-packages/entities/project/project-export-access.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-shell.exporter.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/project/project-shell.exporter.js +35 -0
- package/dist/modules/n8n-packages/entities/project/project-shell.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +7 -7
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +20 -17
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/requirement-source.d.ts +13 -0
- package/dist/modules/n8n-packages/entities/requirement-source.js +23 -0
- package/dist/modules/n8n-packages/entities/requirement-source.js.map +1 -0
- package/dist/modules/n8n-packages/entities/requirements.types.d.ts +10 -10
- package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js +5 -19
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +3 -3
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.types.d.ts +1 -6
- package/dist/modules/n8n-packages/entities/tag/tag.types.js +3 -11
- package/dist/modules/n8n-packages/entities/tag/tag.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js +7 -6
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.js +9 -3
- package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.d.ts +0 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +25 -28
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +6 -9
- package/dist/modules/n8n-packages/entities/variable/variable.types.js +1 -27
- package/dist/modules/n8n-packages/entities/variable/variable.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.d.ts +9 -7
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js +17 -31
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.d.ts +5 -6
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +6 -17
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js +2 -1
- package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/node-type-usage.d.ts +7 -10
- package/dist/modules/n8n-packages/entities/workflow/node-type-usage.js +17 -13
- package/dist/modules/n8n-packages/entities/workflow/node-type-usage.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.d.ts +4 -1
- package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-requirements.d.ts +2 -2
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-requirements.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.js +2 -1
- package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.d.ts +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.js +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.d.ts +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.js +5 -11
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-version-policy.d.ts +3 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow-version-policy.js +5 -5
- package/dist/modules/n8n-packages/entities/workflow/workflow-version-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +4 -4
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +3 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.types.d.ts +6 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.d.ts +8 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js +23 -0
- package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js.map +1 -1
- package/dist/modules/n8n-packages/io/manifest-entry.d.ts +5 -0
- package/dist/modules/n8n-packages/io/manifest-entry.js +6 -0
- package/dist/modules/n8n-packages/io/manifest-entry.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +124 -59
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +29 -8
- package/dist/modules/n8n-packages/n8n-packages.types.js +5 -3
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +471 -97
- package/dist/modules/n8n-packages/spec/manifest.schema.js +12 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirement-consumers.d.ts +5 -0
- package/dist/modules/n8n-packages/spec/requirement-consumers.js +16 -0
- package/dist/modules/n8n-packages/spec/requirement-consumers.js.map +1 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +457 -82
- package/dist/modules/n8n-packages/spec/requirements.schema.js +37 -10
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/agent.schema.d.ts +3860 -0
- package/dist/modules/n8n-packages/spec/serialized/agent.schema.js +55 -0
- package/dist/modules/n8n-packages/spec/serialized/agent.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/data-table.schema.d.ts +10 -0
- package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js +1 -0
- package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js.map +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.d.ts +3 -15
- package/dist/modules/n8n-packages/utils/import-package-upload.js +4 -60
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -1
- package/dist/modules/oauth-server/oauth-local-authorization-server.d.ts +14 -0
- package/dist/modules/oauth-server/oauth-local-authorization-server.js +55 -0
- package/dist/modules/oauth-server/oauth-local-authorization-server.js.map +1 -0
- package/dist/modules/oauth-server/oauth-server.module.js +3 -0
- package/dist/modules/oauth-server/oauth-server.module.js.map +1 -1
- package/dist/modules/oauth-server/oauth-signing-key.constants.d.ts +3 -1
- package/dist/modules/oauth-server/oauth-signing-key.constants.js +4 -2
- package/dist/modules/oauth-server/oauth-signing-key.constants.js.map +1 -1
- package/dist/modules/oauth-server/oauth-signing-key.service.d.ts +16 -4
- package/dist/modules/oauth-server/oauth-signing-key.service.js +95 -19
- package/dist/modules/oauth-server/oauth-signing-key.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +5 -3
- package/dist/modules/oauth-server/oauth-token.service.js +30 -21
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth.controller.d.ts +4 -2
- package/dist/modules/oauth-server/oauth.controller.js +17 -26
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
- package/dist/modules/oauth-server/resource-gate.d.ts +0 -2
- package/dist/modules/oauth-server/resource-gate.js +2 -8
- package/dist/modules/oauth-server/resource-gate.js.map +1 -1
- package/dist/modules/otel/execution-identity.d.ts +27 -0
- package/dist/modules/otel/execution-identity.js +43 -0
- package/dist/modules/otel/execution-identity.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.d.ts +1 -0
- package/dist/modules/otel/execution-level-tracer.js +75 -37
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +5 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +5 -1
- package/dist/modules/otel/otel-lifecycle-handler.js +44 -16
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/otel/otel-settings.service.js +2 -0
- package/dist/modules/otel/otel-settings.service.js.map +1 -1
- package/dist/modules/otel/otel.config.d.ts +2 -0
- package/dist/modules/otel/otel.config.js +10 -0
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +3 -0
- package/dist/modules/otel/otel.constants.js +3 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/otel/otel.service.js +2 -1
- package/dist/modules/otel/otel.service.js.map +1 -1
- package/dist/modules/otel/tracing-context.d.ts +1 -0
- package/dist/modules/otel/tracing-context.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision-audit.d.ts +2 -0
- package/dist/modules/policy-infrastructure/policy-decision-audit.js +15 -11
- package/dist/modules/policy-infrastructure/policy-decision-audit.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision.service.js +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
- package/dist/modules/promotions.ee/base-branch-files.d.ts +3 -3
- package/dist/modules/promotions.ee/base-branch-files.js.map +1 -1
- package/dist/modules/promotions.ee/branch-placement.d.ts +6 -7
- package/dist/modules/promotions.ee/branch-placement.js +19 -18
- package/dist/modules/promotions.ee/branch-placement.js.map +1 -1
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.d.ts +1 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js +13 -0
- package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js.map +1 -1
- package/dist/modules/promotions.ee/git-hosts/git-host-clients.d.ts +8 -0
- package/dist/modules/promotions.ee/git-hosts/git-host-clients.js +28 -0
- package/dist/modules/promotions.ee/git-hosts/git-host-clients.js.map +1 -0
- package/dist/modules/promotions.ee/git-hosts/git-host.types.d.ts +7 -0
- package/dist/modules/promotions.ee/git-hosts/git-host.types.js +3 -0
- package/dist/modules/promotions.ee/git-hosts/git-host.types.js.map +1 -0
- package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.d.ts +10 -0
- package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js +151 -0
- package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js.map +1 -0
- package/dist/modules/promotions.ee/import-manifest-bridge.d.ts +2 -0
- package/dist/modules/promotions.ee/import-manifest-bridge.js +20 -14
- package/dist/modules/promotions.ee/import-manifest-bridge.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.d.ts +6 -1
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js +35 -3
- package/dist/modules/promotions.ee/promotion-binding-preflight.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-change.service.js +12 -6
- package/dist/modules/promotions.ee/promotion-change.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotion-connections.service.d.ts +1 -1
- package/dist/modules/promotions.ee/promotion-providers.service.d.ts +10 -4
- package/dist/modules/promotions.ee/promotion-providers.service.js +100 -29
- package/dist/modules/promotions.ee/promotion-providers.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.service.js +41 -14
- package/dist/modules/promotions.ee/promotions.service.js.map +1 -1
- package/dist/modules/promotions.ee/promotions.types.d.ts +2 -0
- package/dist/modules/promotions.ee/working-copy-updater.d.ts +3 -1
- package/dist/modules/promotions.ee/working-copy-updater.js +51 -29
- package/dist/modules/promotions.ee/working-copy-updater.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.module.js +9 -3
- package/dist/modules/provisioning.ee/provisioning.module.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +5 -2
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +2 -2
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-provider.ee.d.ts +14 -0
- package/dist/modules/provisioning.ee/role-mapping-provider.ee.js +33 -0
- package/dist/modules/provisioning.ee/role-mapping-provider.ee.js.map +1 -0
- package/dist/modules/provisioning.ee/role-resolver-types.d.ts +2 -41
- package/dist/modules/provisioning.ee/role-resolver.service.ee.d.ts +2 -2
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js +5 -9
- package/dist/modules/provisioning.ee/role-resolver.service.ee.js.map +1 -1
- package/dist/modules/scim/database/scim-api-key.repository.d.ts +11 -0
- package/dist/modules/scim/database/scim-api-key.repository.js +51 -0
- package/dist/modules/scim/database/scim-api-key.repository.js.map +1 -0
- package/dist/modules/scim/scim-auth.middleware.d.ts +14 -0
- package/dist/modules/scim/scim-auth.middleware.js +80 -0
- package/dist/modules/scim/scim-auth.middleware.js.map +1 -0
- package/dist/modules/scim/scim-discovery.controller.d.ts +7 -0
- package/dist/modules/scim/scim-discovery.controller.js +90 -0
- package/dist/modules/scim/scim-discovery.controller.js.map +1 -0
- package/dist/modules/scim/scim-route.d.ts +9 -0
- package/dist/modules/scim/scim-route.js +17 -0
- package/dist/modules/scim/scim-route.js.map +1 -0
- package/dist/modules/scim/scim-settings.service.d.ts +9 -0
- package/dist/modules/scim/scim-settings.service.js +41 -0
- package/dist/modules/scim/scim-settings.service.js.map +1 -0
- package/dist/modules/scim/scim-token.controller.d.ts +17 -0
- package/dist/modules/scim/scim-token.controller.js +115 -0
- package/dist/modules/scim/scim-token.controller.js.map +1 -0
- package/dist/modules/scim/scim-token.service.d.ts +23 -0
- package/dist/modules/scim/scim-token.service.js +83 -0
- package/dist/modules/scim/scim-token.service.js.map +1 -0
- package/dist/modules/scim/scim.config.d.ts +3 -0
- package/dist/modules/scim/scim.config.js +28 -0
- package/dist/modules/scim/scim.config.js.map +1 -0
- package/dist/modules/scim/scim.module.d.ts +8 -0
- package/dist/modules/scim/scim.module.js +36 -0
- package/dist/modules/scim/scim.module.js.map +1 -0
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +13 -2
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js +12 -7
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js +1 -3
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
- package/dist/modules/token-exchange/services/token-exchange.service.js.map +1 -1
- package/dist/modules/token-exchange/services/trusted-key.service.js +0 -2
- package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +6 -6
- package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.d.ts +4 -4
- package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.js +3 -3
- package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/credential-type-policy-project.controller.d.ts +2 -2
- package/dist/modules/type-availability-policies/credential-type-policy-project.controller.js +1 -1
- package/dist/modules/type-availability-policies/credential-type-policy-project.controller.js.map +1 -1
- package/dist/modules/type-availability-policies/credential-type-policy.check.d.ts +2 -1
- package/dist/modules/type-availability-policies/credential-type-policy.check.js +5 -0
- package/dist/modules/type-availability-policies/credential-type-policy.check.js.map +1 -1
- package/dist/modules/type-availability-policies/database/repositories/restricted-node-type-match.d.ts +25 -0
- package/dist/modules/type-availability-policies/database/repositories/restricted-node-type-match.js +43 -0
- package/dist/modules/type-availability-policies/database/repositories/restricted-node-type-match.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/restricted-workflow.repository.d.ts +8 -0
- package/dist/modules/type-availability-policies/database/repositories/restricted-workflow.repository.js +49 -0
- package/dist/modules/type-availability-policies/database/repositories/restricted-workflow.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.d.ts +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js +23 -19
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +4 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +8 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -1
- package/dist/modules/type-availability-policies/package-resolver.d.ts +2 -1
- package/dist/modules/type-availability-policies/package-resolver.js +28 -4
- package/dist/modules/type-availability-policies/package-resolver.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +1 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js +2 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-shadow-lint.js +28 -6
- package/dist/modules/type-availability-policies/policy-shadow-lint.js.map +1 -1
- package/dist/modules/type-availability-policies/restricted-node-types.provider.d.ts +15 -0
- package/dist/modules/type-availability-policies/restricted-node-types.provider.js +64 -0
- package/dist/modules/type-availability-policies/restricted-node-types.provider.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +4 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
- package/dist/modules/type-availability-policies/type-availability-policy.service.d.ts +8 -0
- package/dist/modules/type-availability-policies/type-availability-policy.service.js +75 -21
- package/dist/modules/type-availability-policies/type-availability-policy.service.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.d.ts +3 -1
- package/dist/modules/workflow-index/workflow-dependency-query.service.js +16 -2
- package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
- package/dist/modules/workflow-index/workflow-dependency.controller.js +1 -1
- package/dist/modules/workflow-index/workflow-dependency.controller.js.map +1 -1
- package/dist/node-catalog/index.d.ts +1 -0
- package/dist/node-catalog/index.js +4 -1
- package/dist/node-catalog/index.js.map +1 -1
- package/dist/node-catalog/module-gated-node-types.d.ts +3 -0
- package/dist/node-catalog/module-gated-node-types.js +26 -0
- package/dist/node-catalog/module-gated-node-types.js.map +1 -0
- package/dist/node-catalog/node-catalog.service.d.ts +3 -2
- package/dist/node-catalog/node-catalog.service.js +15 -6
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.d.ts +5 -1
- package/dist/node-execution/ephemeral-node-executor.js +37 -12
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/node-execution/index.d.ts +1 -0
- package/dist/node-execution/index.js +3 -1
- package/dist/node-execution/index.js.map +1 -1
- package/dist/node-execution/resolve-tool-node-type.d.ts +1 -0
- package/dist/node-execution/resolve-tool-node-type.js +19 -0
- package/dist/node-execution/resolve-tool-node-type.js.map +1 -0
- package/dist/policy/policed-agent-nodes.d.ts +3 -0
- package/dist/policy/policed-agent-nodes.js +91 -0
- package/dist/policy/policed-agent-nodes.js.map +1 -0
- package/dist/policy/policy-enforcement-backend.d.ts +2 -1
- package/dist/policy/policy-enforcement.service.d.ts +3 -1
- package/dist/policy/policy-enforcement.service.js +35 -10
- package/dist/policy/policy-enforcement.service.js.map +1 -1
- package/dist/policy/policy-violation.error.js +1 -6
- package/dist/policy/policy-violation.error.js.map +1 -1
- package/dist/posthog/index.js +1 -1
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/idempotency-key-cleanup.task.d.ts +14 -0
- package/dist/public-api/idempotency-key-cleanup.task.js +45 -0
- package/dist/public-api/idempotency-key-cleanup.task.js.map +1 -0
- package/dist/public-api/idempotency-key.service.d.ts +7 -0
- package/dist/public-api/idempotency-key.service.js +35 -0
- package/dist/public-api/idempotency-key.service.js.map +1 -0
- package/dist/public-api/index.js +1 -3
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/media-types/binary-response.d.ts +3 -0
- package/dist/public-api/media-types/binary-response.js +79 -0
- package/dist/public-api/media-types/binary-response.js.map +1 -0
- package/dist/public-api/public-api-controller.registry.js +6 -0
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +2 -1
- package/dist/public-api/public-api-route-resolver.js +1 -0
- package/dist/public-api/public-api-route-resolver.js.map +1 -1
- package/dist/public-api/types.d.ts +1 -43
- package/dist/public-api/v1/controllers/credential-type-policies.public.controller.d.ts +10 -10
- package/dist/public-api/v1/controllers/credential-type-policies.public.controller.js +13 -13
- package/dist/public-api/v1/controllers/credential-type-policies.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/index.d.ts +1 -0
- package/dist/public-api/v1/controllers/index.js +1 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/insights.public.controller.d.ts +1 -1
- package/dist/public-api/v1/controllers/insights.public.controller.js +2 -2
- package/dist/public-api/v1/controllers/insights.public.controller.js.map +1 -1
- package/dist/public-api/v1/{handlers/log-streaming → controllers}/log-streaming.mapper.d.ts +20 -20
- package/dist/public-api/v1/{handlers/log-streaming → controllers}/log-streaming.mapper.js +10 -10
- package/dist/public-api/v1/controllers/log-streaming.mapper.js.map +1 -0
- package/dist/public-api/v1/controllers/log-streaming.public.controller.d.ts +23 -1
- package/dist/public-api/v1/controllers/log-streaming.public.controller.js +161 -1
- package/dist/public-api/v1/controllers/log-streaming.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/n8n-packages.public.controller.d.ts +13 -0
- package/dist/public-api/v1/controllers/n8n-packages.public.controller.js +134 -0
- package/dist/public-api/v1/controllers/n8n-packages.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js +13 -6
- package/dist/public-api/v1/controllers/node-type-policies.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.d.ts +9 -0
- package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.js +55 -0
- package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.js.map +1 -0
- package/dist/public-api/v1/controllers/otel.public.controller.js +1 -1
- package/dist/public-api/v1/controllers/otel.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/promotions.public.controller.js +6 -5
- package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +2 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.js +35 -4
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +2 -20
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +17 -105
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +27 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +37 -14
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/generate.js +2 -2
- package/dist/public-api/v1/openapi-gen/generate.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/object-union-type.d.ts +1 -0
- package/dist/public-api/v1/openapi-gen/object-union-type.js +33 -0
- package/dist/public-api/v1/openapi-gen/object-union-type.js.map +1 -0
- package/dist/public-api/v1/openapi-gen/schema-modifiers.d.ts +1 -0
- package/dist/public-api/v1/openapi-gen/schema-modifiers.js +12 -0
- package/dist/public-api/v1/openapi-gen/schema-modifiers.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +10389 -8020
- package/dist/public-api/v1/shared/otel.mapper.js +2 -0
- package/dist/public-api/v1/shared/otel.mapper.js.map +1 -1
- package/dist/public-api/v1/shared/services/pagination.service.js +1 -1
- package/dist/public-api/v1/shared/services/pagination.service.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/job-processor.d.ts +7 -1
- package/dist/scaling/job-processor.js +32 -26
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/job-return.d.ts +3 -0
- package/dist/scaling/job-return.js +33 -0
- package/dist/scaling/job-return.js.map +1 -0
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +1 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/scaling/scaling.service.d.ts +2 -0
- package/dist/scaling/scaling.service.js +37 -3
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/scaling/scaling.types.d.ts +1 -0
- package/dist/scheduling/durable-job-provisioner.d.ts +3 -2
- package/dist/scheduling/durable-job-provisioner.js +34 -71
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.js +0 -9
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.d.ts +1 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +2 -0
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.d.ts +5 -5
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +59 -95
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
- package/dist/scheduling/system-tasks/main-system-tasks.js +17 -5
- package/dist/scheduling/system-tasks/main-system-tasks.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-handler.d.ts +2 -2
- package/dist/scheduling/system-tasks/system-task-handler.js +4 -4
- package/dist/scheduling/system-tasks/system-task-handler.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-job-registrar.js +2 -1
- package/dist/scheduling/system-tasks/system-task-job-registrar.js.map +1 -1
- package/dist/scheduling/system-tasks/system-task-run-observer.d.ts +3 -3
- package/dist/scheduling/system-tasks/system-task-run-observer.js +14 -6
- package/dist/scheduling/system-tasks/system-task-run-observer.js.map +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +1 -0
- package/dist/server.js.map +1 -1
- package/dist/services/ai-preference.service.d.ts +2 -1
- package/dist/services/ai-preference.service.js +10 -0
- package/dist/services/ai-preference.service.js.map +1 -1
- package/dist/services/database-independent-routes.service.d.ts +5 -0
- package/dist/services/database-independent-routes.service.js +29 -0
- package/dist/services/database-independent-routes.service.js.map +1 -0
- package/dist/services/frontend.service.d.ts +3 -0
- package/dist/services/frontend.service.js +12 -1
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/jwt.service.d.ts +4 -3
- package/dist/services/jwt.service.js +9 -6
- package/dist/services/jwt.service.js.map +1 -1
- package/dist/services/oauth-token-verifier-proxy.service.d.ts +0 -2
- package/dist/services/oauth-token-verifier-proxy.service.js +0 -6
- package/dist/services/oauth-token-verifier-proxy.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +6 -1
- package/dist/services/ownership-transfer/ownership-transfer.service.d.ts +9 -2
- package/dist/services/ownership-transfer/ownership-transfer.service.js +27 -2
- package/dist/services/ownership-transfer/ownership-transfer.service.js.map +1 -1
- package/dist/services/ownership.service.d.ts +4 -6
- package/dist/services/ownership.service.js +7 -38
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +2 -0
- package/dist/services/project.service.ee.js +13 -0
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/pruning/execution-pruning-hard-delete.task.d.ts +17 -0
- package/dist/{modules/insights/insights-pruning.task.js → services/pruning/execution-pruning-hard-delete.task.js} +17 -15
- package/dist/services/pruning/execution-pruning-hard-delete.task.js.map +1 -0
- package/dist/services/pruning/execution-pruning-soft-delete.task.d.ts +4 -2
- package/dist/services/pruning/execution-pruning-soft-delete.task.js +4 -2
- package/dist/services/pruning/execution-pruning-soft-delete.task.js.map +1 -1
- package/dist/services/pruning/executions-pruning.service.d.ts +6 -18
- package/dist/services/pruning/executions-pruning.service.js +54 -88
- package/dist/services/pruning/executions-pruning.service.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction-optimize.task.d.ts +1 -0
- package/dist/services/pruning/workflow-history-compaction-optimize.task.js +1 -0
- package/dist/services/pruning/workflow-history-compaction-optimize.task.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction-trim.task.d.ts +2 -0
- package/dist/services/pruning/workflow-history-compaction-trim.task.js +8 -6
- package/dist/services/pruning/workflow-history-compaction-trim.task.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.d.ts +1 -5
- package/dist/services/pruning/workflow-history-compaction.service.js +14 -19
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.utils.d.ts +6 -0
- package/dist/services/pruning/workflow-history-compaction.utils.js +14 -0
- package/dist/services/pruning/workflow-history-compaction.utils.js.map +1 -0
- package/dist/services/pruning/workflow-history-pruning.task.d.ts +4 -1
- package/dist/services/pruning/workflow-history-pruning.task.js +5 -2
- package/dist/services/pruning/workflow-history-pruning.task.js.map +1 -1
- package/dist/services/role-mapping-proxy.service.d.ts +53 -0
- package/dist/{modules/favorites/favorite-resource-resolver.registry.js → services/role-mapping-proxy.service.js} +11 -11
- package/dist/services/role-mapping-proxy.service.js.map +1 -0
- package/dist/services/token-purposes.d.ts +2 -0
- package/dist/services/token-purposes.js +2 -0
- package/dist/services/token-purposes.js.map +1 -1
- package/dist/services/user.service.js +1 -0
- package/dist/services/user.service.js.map +1 -1
- package/dist/services/workflow-statistics-rollup.service.d.ts +6 -17
- package/dist/services/workflow-statistics-rollup.service.js +26 -77
- package/dist/services/workflow-statistics-rollup.service.js.map +1 -1
- package/dist/services/workflow-statistics-rollup.task.d.ts +14 -0
- package/dist/services/workflow-statistics-rollup.task.js +43 -0
- package/dist/services/workflow-statistics-rollup.task.js.map +1 -0
- package/dist/services/workflow-statistics.service.js +10 -18
- package/dist/services/workflow-statistics.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +10 -4
- package/dist/telemetry/index.js +51 -30
- package/dist/telemetry/index.js.map +1 -1
- package/dist/tool-generation/hitl-tools.js +5 -0
- package/dist/tool-generation/hitl-tools.js.map +1 -1
- package/dist/user-management/email/templates/agent-budget-alert.handlebars +196 -0
- package/dist/user-management/email/user-management-mailer.d.ts +8 -1
- package/dist/user-management/email/user-management-mailer.js +16 -0
- package/dist/user-management/email/user-management-mailer.js.map +1 -1
- package/dist/utils/strapi-utils.d.ts +1 -1
- package/dist/wait-tracker.js +2 -0
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +7 -6
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +4 -1
- package/dist/webhooks/webhook-helpers.js +21 -3
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -1
- package/dist/workflow-execute-additional-data.js +17 -8
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-runner.d.ts +2 -2
- package/dist/workflow-runner.js +10 -12
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/execution-timeout-validation.d.ts +2 -0
- package/dist/workflows/execution-timeout-validation.js +16 -0
- package/dist/workflows/execution-timeout-validation.js.map +1 -0
- package/dist/workflows/restricted-node-types-provider-proxy.service.d.ts +9 -0
- package/dist/workflows/restricted-node-types-provider-proxy.service.js +26 -0
- package/dist/workflows/restricted-node-types-provider-proxy.service.js.map +1 -0
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +8 -5
- package/dist/workflows/triggers/trigger-execution-context.factory.js +19 -13
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/workflow-execution.service.d.ts +3 -3
- package/dist/workflows/workflow-execution.service.js +4 -2
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +9 -3
- package/dist/workflows/workflow-finder.service.js +6 -5
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.controller.d.ts +2 -2
- package/dist/workflows/workflow-history/workflow-history.controller.js +9 -6
- package/dist/workflows/workflow-history/workflow-history.controller.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.d.ts +27 -11
- package/dist/workflows/workflow-history/workflow-history.service.js +56 -34
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.d.ts +1 -1
- package/dist/workflows/workflow-validation.service.js +2 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +44 -17
- package/dist/workflows/workflow.service.ee.d.ts +5 -3
- package/dist/workflows/workflow.service.ee.js +35 -9
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +81 -24
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.js +5 -1
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +44 -42
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.d.ts +0 -2
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js +0 -159
- package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js.map +0 -1
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.d.ts +0 -10
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js +0 -47
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js.map +0 -1
- package/dist/modules/favorites/favorite-resource-resolver.registry.d.ts +0 -17
- package/dist/modules/favorites/favorite-resource-resolver.registry.js.map +0 -1
- package/dist/modules/insights/database/entities/insights-by-period.d.ts +0 -17
- package/dist/modules/insights/database/entities/insights-by-period.js +0 -73
- package/dist/modules/insights/database/entities/insights-by-period.js.map +0 -1
- package/dist/modules/insights/database/entities/insights-metadata.d.ts +0 -8
- package/dist/modules/insights/database/entities/insights-metadata.js +0 -40
- package/dist/modules/insights/database/entities/insights-metadata.js.map +0 -1
- package/dist/modules/insights/database/entities/insights-raw.d.ts +0 -13
- package/dist/modules/insights/database/entities/insights-raw.js +0 -61
- package/dist/modules/insights/database/entities/insights-raw.js.map +0 -1
- package/dist/modules/insights/database/entities/insights-shared.d.ts +0 -21
- package/dist/modules/insights/database/entities/insights-shared.js +0 -30
- package/dist/modules/insights/database/entities/insights-shared.js.map +0 -1
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +0 -15
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +0 -45
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +0 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +0 -100
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js +0 -347
- package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +0 -1
- package/dist/modules/insights/database/repositories/insights-metadata.repository.d.ts +0 -7
- package/dist/modules/insights/database/repositories/insights-metadata.repository.js +0 -36
- package/dist/modules/insights/database/repositories/insights-metadata.repository.js.map +0 -1
- package/dist/modules/insights/database/repositories/insights-raw.repository.d.ts +0 -12
- package/dist/modules/insights/database/repositories/insights-raw.repository.js +0 -36
- package/dist/modules/insights/database/repositories/insights-raw.repository.js.map +0 -1
- package/dist/modules/insights/insights-collection.service.d.ts +0 -30
- package/dist/modules/insights/insights-collection.service.js +0 -280
- package/dist/modules/insights/insights-collection.service.js.map +0 -1
- package/dist/modules/insights/insights-compaction.service.d.ts +0 -19
- package/dist/modules/insights/insights-compaction.service.js +0 -161
- package/dist/modules/insights/insights-compaction.service.js.map +0 -1
- package/dist/modules/insights/insights-compaction.task.d.ts +0 -14
- package/dist/modules/insights/insights-compaction.task.js.map +0 -1
- package/dist/modules/insights/insights-pruning.service.d.ts +0 -11
- package/dist/modules/insights/insights-pruning.service.js +0 -49
- package/dist/modules/insights/insights-pruning.service.js.map +0 -1
- package/dist/modules/insights/insights-pruning.task.d.ts +0 -15
- package/dist/modules/insights/insights-pruning.task.js.map +0 -1
- package/dist/modules/insights/insights.config.d.ts +0 -13
- package/dist/modules/insights/insights.config.js +0 -80
- package/dist/modules/insights/insights.config.js.map +0 -1
- package/dist/modules/insights/insights.constants.d.ts +0 -4
- package/dist/modules/insights/insights.constants.js +0 -24
- package/dist/modules/insights/insights.constants.js.map +0 -1
- package/dist/modules/insights/insights.controller.d.ts +0 -16
- package/dist/modules/insights/insights.controller.js +0 -159
- package/dist/modules/insights/insights.controller.js.map +0 -1
- package/dist/modules/insights/insights.module.d.ts +0 -17
- package/dist/modules/insights/insights.module.js +0 -51
- package/dist/modules/insights/insights.module.js.map +0 -1
- package/dist/modules/insights/insights.service.d.ts +0 -73
- package/dist/modules/insights/insights.service.js +0 -257
- package/dist/modules/insights/insights.service.js.map +0 -1
- package/dist/modules/insights/insights.settings.d.ts +0 -20
- package/dist/modules/insights/insights.settings.js +0 -48
- package/dist/modules/insights/insights.settings.js.map +0 -1
- package/dist/public-api/v1/handlers/log-streaming/log-streaming.handler.d.ts +0 -12
- package/dist/public-api/v1/handlers/log-streaming/log-streaming.handler.js +0 -107
- package/dist/public-api/v1/handlers/log-streaming/log-streaming.handler.js.map +0 -1
- package/dist/public-api/v1/handlers/log-streaming/log-streaming.mapper.js.map +0 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -7
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -31
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +0 -1
|
@@ -1,280 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InsightsCollectionService = void 0;
|
|
13
|
-
const backend_common_1 = require("@n8n/backend-common");
|
|
14
|
-
const backend_services_1 = require("@n8n/backend-services");
|
|
15
|
-
const db_1 = require("@n8n/db");
|
|
16
|
-
const decorators_1 = require("@n8n/decorators");
|
|
17
|
-
const di_1 = require("@n8n/di");
|
|
18
|
-
const luxon_1 = require("luxon");
|
|
19
|
-
const insights_metadata_1 = require("./database/entities/insights-metadata");
|
|
20
|
-
const insights_raw_1 = require("./database/entities/insights-raw");
|
|
21
|
-
const insights_metadata_repository_1 = require("./database/repositories/insights-metadata.repository");
|
|
22
|
-
const insights_raw_repository_1 = require("./database/repositories/insights-raw.repository");
|
|
23
|
-
const insights_config_1 = require("./insights.config");
|
|
24
|
-
const shouldSkipStatus = {
|
|
25
|
-
success: false,
|
|
26
|
-
crashed: false,
|
|
27
|
-
error: false,
|
|
28
|
-
canceled: true,
|
|
29
|
-
new: true,
|
|
30
|
-
running: true,
|
|
31
|
-
unknown: true,
|
|
32
|
-
waiting: true,
|
|
33
|
-
};
|
|
34
|
-
const shouldSkipMode = {
|
|
35
|
-
cli: false,
|
|
36
|
-
error: false,
|
|
37
|
-
retry: false,
|
|
38
|
-
trigger: false,
|
|
39
|
-
webhook: false,
|
|
40
|
-
evaluation: false,
|
|
41
|
-
integrated: true,
|
|
42
|
-
internal: true,
|
|
43
|
-
manual: true,
|
|
44
|
-
chat: true,
|
|
45
|
-
agent: true,
|
|
46
|
-
};
|
|
47
|
-
const MIN_RUNTIME = 0;
|
|
48
|
-
const MAX_RUNTIME = 2 ** 31 - 1;
|
|
49
|
-
function integerValueForInsightsRaw(value) {
|
|
50
|
-
if (!Number.isFinite(value)) {
|
|
51
|
-
return 0;
|
|
52
|
-
}
|
|
53
|
-
return Math.round(value);
|
|
54
|
-
}
|
|
55
|
-
let InsightsCollectionService = class InsightsCollectionService {
|
|
56
|
-
constructor(sharedWorkflowRepository, insightsRawRepository, insightsMetadataRepository, insightsConfig, logger) {
|
|
57
|
-
this.sharedWorkflowRepository = sharedWorkflowRepository;
|
|
58
|
-
this.insightsRawRepository = insightsRawRepository;
|
|
59
|
-
this.insightsMetadataRepository = insightsMetadataRepository;
|
|
60
|
-
this.insightsConfig = insightsConfig;
|
|
61
|
-
this.logger = logger;
|
|
62
|
-
this.cachedMetadata = new Map();
|
|
63
|
-
this.bufferedInsights = new Set();
|
|
64
|
-
this.isAsynchronouslySavingInsights = true;
|
|
65
|
-
this.flushesInProgress = new Set();
|
|
66
|
-
this.isInitialized = false;
|
|
67
|
-
this.logger = this.logger.scoped('insights');
|
|
68
|
-
}
|
|
69
|
-
init() {
|
|
70
|
-
this.isInitialized = true;
|
|
71
|
-
this.isAsynchronouslySavingInsights = true;
|
|
72
|
-
this.scheduleFlushing();
|
|
73
|
-
this.logger.debug('Started flushing timer');
|
|
74
|
-
}
|
|
75
|
-
scheduleFlushing() {
|
|
76
|
-
if (!this.isInitialized)
|
|
77
|
-
return;
|
|
78
|
-
this.cancelScheduledFlushing();
|
|
79
|
-
this.flushInsightsRawBufferTimer = setTimeout(async () => await this.flushEvents(), this.insightsConfig.flushIntervalSeconds * 1000);
|
|
80
|
-
}
|
|
81
|
-
cancelScheduledFlushing() {
|
|
82
|
-
if (this.flushInsightsRawBufferTimer !== undefined) {
|
|
83
|
-
clearTimeout(this.flushInsightsRawBufferTimer);
|
|
84
|
-
this.flushInsightsRawBufferTimer = undefined;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
stopFlushingTimer() {
|
|
88
|
-
this.cancelScheduledFlushing();
|
|
89
|
-
this.logger.debug('Stopped flushing timer');
|
|
90
|
-
}
|
|
91
|
-
async shutdown() {
|
|
92
|
-
this.stopFlushingTimer();
|
|
93
|
-
this.isAsynchronouslySavingInsights = false;
|
|
94
|
-
this.logger.debug('Flushing remaining insights before shutdown');
|
|
95
|
-
await Promise.all([...this.flushesInProgress, this.flushEvents()]);
|
|
96
|
-
this.isInitialized = false;
|
|
97
|
-
}
|
|
98
|
-
async handleWorkflowExecuteAfter(ctx) {
|
|
99
|
-
if (!this.isInitialized) {
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (shouldSkipStatus[ctx.runData.status] || shouldSkipMode[ctx.runData.mode]) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (ctx.source === 'instance_ai') {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const status = ctx.runData.status === 'success' ? 'success' : 'failure';
|
|
109
|
-
const commonWorkflowData = {
|
|
110
|
-
workflowId: ctx.workflow.id,
|
|
111
|
-
workflowName: ctx.workflow.name,
|
|
112
|
-
timestamp: luxon_1.DateTime.utc().toJSDate(),
|
|
113
|
-
};
|
|
114
|
-
this.bufferedInsights.add({
|
|
115
|
-
...commonWorkflowData,
|
|
116
|
-
type: status,
|
|
117
|
-
value: 1,
|
|
118
|
-
});
|
|
119
|
-
if ((0, backend_services_1.isBillableExecution)(ctx.runData, ctx.source)) {
|
|
120
|
-
this.bufferedInsights.add({
|
|
121
|
-
...commonWorkflowData,
|
|
122
|
-
type: 'billable',
|
|
123
|
-
value: 1,
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
if (ctx.runData.stoppedAt) {
|
|
127
|
-
const runtimeMs = ctx.runData.stoppedAt.getTime() - ctx.runData.startedAt.getTime();
|
|
128
|
-
if (runtimeMs < MIN_RUNTIME || runtimeMs > MAX_RUNTIME) {
|
|
129
|
-
this.logger.warn(`Invalid runtime detected: ${runtimeMs}ms, clamping to safe range`);
|
|
130
|
-
}
|
|
131
|
-
const value = Math.min(Math.max(runtimeMs, MIN_RUNTIME), MAX_RUNTIME);
|
|
132
|
-
this.bufferedInsights.add({
|
|
133
|
-
...commonWorkflowData,
|
|
134
|
-
type: 'runtime_ms',
|
|
135
|
-
value,
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
if (status === 'success' && ctx.runData.mode !== 'error') {
|
|
139
|
-
const finalTimeSaved = this.calculateTimeSaved(ctx);
|
|
140
|
-
if (finalTimeSaved !== undefined) {
|
|
141
|
-
this.bufferedInsights.add({
|
|
142
|
-
...commonWorkflowData,
|
|
143
|
-
type: 'time_saved_min',
|
|
144
|
-
value: finalTimeSaved,
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
if (!this.isAsynchronouslySavingInsights) {
|
|
149
|
-
this.logger.debug('Flushing insights synchronously (shutdown in progress)');
|
|
150
|
-
await this.flushEvents();
|
|
151
|
-
}
|
|
152
|
-
if (this.bufferedInsights.size >= this.insightsConfig.flushBatchSize) {
|
|
153
|
-
this.logger.debug(`Buffer is full (${this.bufferedInsights.size} insights), flushing events`);
|
|
154
|
-
void this.flushEvents();
|
|
155
|
-
}
|
|
156
|
-
}
|
|
157
|
-
async saveInsightsMetadataAndRaw(insightsRawToInsertBuffer) {
|
|
158
|
-
this.logger.debug(`Flushing ${insightsRawToInsertBuffer.size} insights`);
|
|
159
|
-
const workflowIdNames = new Map();
|
|
160
|
-
for (const event of insightsRawToInsertBuffer) {
|
|
161
|
-
workflowIdNames.set(event.workflowId, event.workflowName);
|
|
162
|
-
}
|
|
163
|
-
const ownerProjects = await this.sharedWorkflowRepository.findOwnerProjectsByWorkflowIds([
|
|
164
|
-
...workflowIdNames.keys(),
|
|
165
|
-
]);
|
|
166
|
-
const metadataToUpsert = [];
|
|
167
|
-
for (const [workflowId, workflowName] of workflowIdNames) {
|
|
168
|
-
const project = ownerProjects.get(workflowId);
|
|
169
|
-
if (!project)
|
|
170
|
-
continue;
|
|
171
|
-
const cachedMetadata = this.cachedMetadata.get(workflowId);
|
|
172
|
-
if (!cachedMetadata ||
|
|
173
|
-
cachedMetadata.projectId !== project.id ||
|
|
174
|
-
cachedMetadata.projectName !== project.name ||
|
|
175
|
-
cachedMetadata.workflowName !== workflowName) {
|
|
176
|
-
const metadata = new insights_metadata_1.InsightsMetadata();
|
|
177
|
-
metadata.projectId = project.id;
|
|
178
|
-
metadata.projectName = project.name;
|
|
179
|
-
metadata.workflowId = workflowId;
|
|
180
|
-
metadata.workflowName = workflowName;
|
|
181
|
-
metadataToUpsert.push(metadata);
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
if (metadataToUpsert.length > 0) {
|
|
185
|
-
this.logger.debug(`Saving ${metadataToUpsert.length} insights metadata for workflows`);
|
|
186
|
-
await this.insightsMetadataRepository.upsertWorkflowMetadata(metadataToUpsert);
|
|
187
|
-
const upsertMetadata = await this.insightsMetadataRepository.findByWorkflowIds(metadataToUpsert.map((metadata) => metadata.workflowId));
|
|
188
|
-
for (const metadata of upsertMetadata) {
|
|
189
|
-
this.cachedMetadata.set(metadata.workflowId, metadata);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
const events = [];
|
|
193
|
-
const workflowIdsWithoutMetadata = new Set();
|
|
194
|
-
for (const event of insightsRawToInsertBuffer) {
|
|
195
|
-
const insight = new insights_raw_1.InsightsRaw();
|
|
196
|
-
const metadata = this.cachedMetadata.get(event.workflowId);
|
|
197
|
-
if (!metadata) {
|
|
198
|
-
workflowIdsWithoutMetadata.add(event.workflowId);
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
insight.metaId = metadata.metaId;
|
|
202
|
-
insight.type = event.type;
|
|
203
|
-
insight.value = integerValueForInsightsRaw(event.value);
|
|
204
|
-
insight.timestamp = event.timestamp;
|
|
205
|
-
events.push(insight);
|
|
206
|
-
}
|
|
207
|
-
if (workflowIdsWithoutMetadata.size > 0) {
|
|
208
|
-
this.logger.warn('Dropped insights for workflows with no shared workflow', {
|
|
209
|
-
workflowIds: [...workflowIdsWithoutMetadata],
|
|
210
|
-
});
|
|
211
|
-
}
|
|
212
|
-
if (events.length === 0)
|
|
213
|
-
return;
|
|
214
|
-
this.logger.debug(`Inserting ${events.length} insights raw`);
|
|
215
|
-
await this.insightsRawRepository.insert(events);
|
|
216
|
-
}
|
|
217
|
-
async flushEvents() {
|
|
218
|
-
if (!this.isInitialized) {
|
|
219
|
-
return;
|
|
220
|
-
}
|
|
221
|
-
if (this.bufferedInsights.size === 0) {
|
|
222
|
-
this.scheduleFlushing();
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
this.cancelScheduledFlushing();
|
|
226
|
-
const bufferedInsightsToFlush = new Set(this.bufferedInsights);
|
|
227
|
-
this.bufferedInsights.clear();
|
|
228
|
-
let flushPromise = undefined;
|
|
229
|
-
flushPromise = (async () => {
|
|
230
|
-
try {
|
|
231
|
-
await this.saveInsightsMetadataAndRaw(bufferedInsightsToFlush);
|
|
232
|
-
}
|
|
233
|
-
catch (e) {
|
|
234
|
-
this.logger.error('Error while saving insights metadata and raw data', { error: e });
|
|
235
|
-
for (const event of bufferedInsightsToFlush) {
|
|
236
|
-
this.bufferedInsights.add(event);
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
finally {
|
|
240
|
-
this.scheduleFlushing();
|
|
241
|
-
this.flushesInProgress.delete(flushPromise);
|
|
242
|
-
}
|
|
243
|
-
})();
|
|
244
|
-
this.flushesInProgress.add(flushPromise);
|
|
245
|
-
await flushPromise;
|
|
246
|
-
}
|
|
247
|
-
calculateTimeSaved(ctx) {
|
|
248
|
-
const workflowTimeSaved = ctx.workflow.settings?.timeSavedPerExecution;
|
|
249
|
-
if (ctx.workflow.settings?.timeSavedMode !== 'dynamic') {
|
|
250
|
-
return workflowTimeSaved ?? 0;
|
|
251
|
-
}
|
|
252
|
-
const nodeTimeSaved = this.extractTimeSavedFromNodes(ctx.runData);
|
|
253
|
-
return nodeTimeSaved;
|
|
254
|
-
}
|
|
255
|
-
extractTimeSavedFromNodes(runData) {
|
|
256
|
-
let totalMinutes = 0;
|
|
257
|
-
const resultData = runData.data.resultData?.runData ?? {};
|
|
258
|
-
for (const nodeName in resultData) {
|
|
259
|
-
const taskData = resultData[nodeName];
|
|
260
|
-
for (const taskDataEntry of taskData) {
|
|
261
|
-
if (taskDataEntry?.metadata?.timeSaved) {
|
|
262
|
-
totalMinutes += taskDataEntry?.metadata?.timeSaved.minutes;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
return totalMinutes;
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
exports.InsightsCollectionService = InsightsCollectionService;
|
|
270
|
-
__decorate([
|
|
271
|
-
(0, decorators_1.OnLifecycleEvent)('workflowExecuteAfter'),
|
|
272
|
-
__metadata("design:type", Function),
|
|
273
|
-
__metadata("design:paramtypes", [Object]),
|
|
274
|
-
__metadata("design:returntype", Promise)
|
|
275
|
-
], InsightsCollectionService.prototype, "handleWorkflowExecuteAfter", null);
|
|
276
|
-
exports.InsightsCollectionService = InsightsCollectionService = __decorate([
|
|
277
|
-
(0, di_1.Service)(),
|
|
278
|
-
__metadata("design:paramtypes", [db_1.SharedWorkflowRepository, insights_raw_repository_1.InsightsRawRepository, insights_metadata_repository_1.InsightsMetadataRepository, insights_config_1.InsightsConfig, backend_common_1.Logger])
|
|
279
|
-
], InsightsCollectionService);
|
|
280
|
-
//# sourceMappingURL=insights-collection.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-collection.service.js","sourceRoot":"","sources":["../../../src/modules/insights/insights-collection.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,4DAA4D;AAC5D,gCAAmD;AACnD,gDAAqF;AACrF,gCAAkC;AAClC,iCAAiC;AAGjC,6EAAyE;AACzE,mEAA+D;AAC/D,uGAAkG;AAClG,6FAAwF;AACxF,uDAAmD;AAEnD,MAAM,gBAAgB,GAAqC;IAC1D,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;IAEZ,QAAQ,EAAE,IAAI;IACd,GAAG,EAAE,IAAI;IACT,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,MAAM,cAAc,GAAyC;IAC5D,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,KAAK;IAGjB,UAAU,EAAE,IAAI;IAGhB,QAAQ,EAAE,IAAI;IAEd,MAAM,EAAE,IAAI;IAGZ,IAAI,EAAE,IAAI;IAGV,KAAK,EAAE,IAAI;CACX,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,CAAC;AAGtB,MAAM,WAAW,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;AAMhC,SAAS,0BAA0B,CAAC,KAAa;IAChD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,CAAC;IACV,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAYM,IAAM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AO,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,IAAI,EAAE,CAAC;QAG1D,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC;YAGtC,KAAK,MAAM,aAAa,IAAI,QAAQ,EAAE,CAAC;gBACtC,IAAI,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;oBACxC,YAAY,IAAI,aAAa,EAAE,QAAQ,EAAE,SAAS,CAAC,OAAO,CAAC;gBAC5D,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,YAAY,CAAC;IACrB,CAAC;CACD,CAAA;;AAlPM;IADL,IAAA,6BAAgB,EAAC,sBAAsB,CAAC;;;;2EA+ExC;oCApJW,yBAAyB;IADrC,IAAA,YAAO,GAAE;qCAemC,6BAAwB,EAC3B,+CAAqB,EAChB,yDAA0B,EACtC,gCAAc,EACtB,uBAAM;GAlBpB,yBAAyB,CAwTrC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@n8n/backend-common';
|
|
2
|
-
import { InsightsByPeriodRepository } from './database/repositories/insights-by-period.repository';
|
|
3
|
-
import { InsightsRawRepository } from './database/repositories/insights-raw.repository';
|
|
4
|
-
import { InsightsConfig } from './insights.config';
|
|
5
|
-
export declare class InsightsCompactionService {
|
|
6
|
-
private readonly insightsByPeriodRepository;
|
|
7
|
-
private readonly insightsRawRepository;
|
|
8
|
-
private readonly insightsConfig;
|
|
9
|
-
private readonly logger;
|
|
10
|
-
constructor(insightsByPeriodRepository: InsightsByPeriodRepository, insightsRawRepository: InsightsRawRepository, insightsConfig: InsightsConfig, logger: Logger);
|
|
11
|
-
compactInsights(signal: AbortSignal): Promise<void>;
|
|
12
|
-
private compactStage;
|
|
13
|
-
private getCompactionRunStopReason;
|
|
14
|
-
private logCompactionRunLimitReached;
|
|
15
|
-
private waitBeforeNextBatchIfFull;
|
|
16
|
-
compactRawToHour(): Promise<number>;
|
|
17
|
-
compactHourToDay(): Promise<number>;
|
|
18
|
-
compactDayToWeek(): Promise<number>;
|
|
19
|
-
}
|
|
@@ -1,161 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InsightsCompactionService = void 0;
|
|
13
|
-
const backend_common_1 = require("@n8n/backend-common");
|
|
14
|
-
const constants_1 = require("@n8n/constants");
|
|
15
|
-
const di_1 = require("@n8n/di");
|
|
16
|
-
const sleep_1 = require("@n8n/utils/sleep");
|
|
17
|
-
const insights_by_period_repository_1 = require("./database/repositories/insights-by-period.repository");
|
|
18
|
-
const insights_raw_repository_1 = require("./database/repositories/insights-raw.repository");
|
|
19
|
-
const insights_config_1 = require("./insights.config");
|
|
20
|
-
let InsightsCompactionService = class InsightsCompactionService {
|
|
21
|
-
constructor(insightsByPeriodRepository, insightsRawRepository, insightsConfig, logger) {
|
|
22
|
-
this.insightsByPeriodRepository = insightsByPeriodRepository;
|
|
23
|
-
this.insightsRawRepository = insightsRawRepository;
|
|
24
|
-
this.insightsConfig = insightsConfig;
|
|
25
|
-
this.logger = logger;
|
|
26
|
-
this.logger = this.logger.scoped('insights');
|
|
27
|
-
}
|
|
28
|
-
async compactInsights(signal) {
|
|
29
|
-
const runState = {
|
|
30
|
-
startedAt: Date.now(),
|
|
31
|
-
batchesProcessed: 0,
|
|
32
|
-
rowsCompacted: 0,
|
|
33
|
-
signal,
|
|
34
|
-
};
|
|
35
|
-
const stoppedAfterRawToHour = await this.compactStage({
|
|
36
|
-
stageName: 'raw-to-hour',
|
|
37
|
-
beforeBatchMessage: 'Compacting raw data to hourly aggregates',
|
|
38
|
-
afterBatchMessage: (rowsCompacted) => `Compacted ${rowsCompacted} raw data to hourly aggregates`,
|
|
39
|
-
compactBatch: this.compactRawToHour.bind(this),
|
|
40
|
-
runState,
|
|
41
|
-
});
|
|
42
|
-
if (stoppedAfterRawToHour)
|
|
43
|
-
return;
|
|
44
|
-
const stoppedAfterHourToDay = await this.compactStage({
|
|
45
|
-
stageName: 'hour-to-day',
|
|
46
|
-
beforeBatchMessage: 'Compacting hourly data to daily aggregates',
|
|
47
|
-
afterBatchMessage: (rowsCompacted) => `Compacted ${rowsCompacted} hourly data to daily aggregates`,
|
|
48
|
-
compactBatch: this.compactHourToDay.bind(this),
|
|
49
|
-
runState,
|
|
50
|
-
});
|
|
51
|
-
if (stoppedAfterHourToDay)
|
|
52
|
-
return;
|
|
53
|
-
await this.compactStage({
|
|
54
|
-
stageName: 'day-to-week',
|
|
55
|
-
beforeBatchMessage: 'Compacting daily data to weekly aggregates',
|
|
56
|
-
afterBatchMessage: (rowsCompacted) => `Compacted ${rowsCompacted} daily data to weekly aggregates`,
|
|
57
|
-
compactBatch: this.compactDayToWeek.bind(this),
|
|
58
|
-
runState,
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
async compactStage({ stageName, beforeBatchMessage, afterBatchMessage, compactBatch, runState, }) {
|
|
62
|
-
let numberOfCompactedData;
|
|
63
|
-
do {
|
|
64
|
-
const stopReason = this.getCompactionRunStopReason(runState);
|
|
65
|
-
if (stopReason !== undefined) {
|
|
66
|
-
this.logCompactionRunLimitReached(stopReason, stageName, runState);
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
this.logger.debug(beforeBatchMessage);
|
|
70
|
-
numberOfCompactedData = await compactBatch();
|
|
71
|
-
this.logger.debug(afterBatchMessage(numberOfCompactedData));
|
|
72
|
-
runState.batchesProcessed++;
|
|
73
|
-
runState.rowsCompacted += numberOfCompactedData;
|
|
74
|
-
const stopReasonAfterBatch = this.getCompactionRunStopReason(runState);
|
|
75
|
-
if (stopReasonAfterBatch !== undefined) {
|
|
76
|
-
this.logCompactionRunLimitReached(stopReasonAfterBatch, stageName, runState);
|
|
77
|
-
return true;
|
|
78
|
-
}
|
|
79
|
-
await this.waitBeforeNextBatchIfFull(numberOfCompactedData, runState);
|
|
80
|
-
} while (numberOfCompactedData === this.insightsConfig.compactionBatchSize);
|
|
81
|
-
return false;
|
|
82
|
-
}
|
|
83
|
-
getCompactionRunStopReason(runState) {
|
|
84
|
-
if (runState.signal.aborted) {
|
|
85
|
-
return 'aborted';
|
|
86
|
-
}
|
|
87
|
-
if (this.insightsConfig.compactionMaxBatchesPerRun > 0 &&
|
|
88
|
-
runState.batchesProcessed >= this.insightsConfig.compactionMaxBatchesPerRun) {
|
|
89
|
-
return 'max-batches';
|
|
90
|
-
}
|
|
91
|
-
if (this.insightsConfig.compactionMaxRuntimeSeconds > 0 &&
|
|
92
|
-
Date.now() - runState.startedAt >=
|
|
93
|
-
this.insightsConfig.compactionMaxRuntimeSeconds * constants_1.Time.seconds.toMilliseconds) {
|
|
94
|
-
return 'max-runtime';
|
|
95
|
-
}
|
|
96
|
-
return undefined;
|
|
97
|
-
}
|
|
98
|
-
logCompactionRunLimitReached(reason, stageName, runState) {
|
|
99
|
-
const details = {
|
|
100
|
-
reason,
|
|
101
|
-
stageName,
|
|
102
|
-
batchesProcessed: runState.batchesProcessed,
|
|
103
|
-
rowsCompacted: runState.rowsCompacted,
|
|
104
|
-
compactionMaxBatchesPerRun: this.insightsConfig.compactionMaxBatchesPerRun,
|
|
105
|
-
compactionMaxRuntimeSeconds: this.insightsConfig.compactionMaxRuntimeSeconds,
|
|
106
|
-
};
|
|
107
|
-
if (reason === 'aborted') {
|
|
108
|
-
this.logger.debug('Stopping insights compaction because the run was aborted', details);
|
|
109
|
-
}
|
|
110
|
-
else {
|
|
111
|
-
this.logger.warn('Stopping insights compaction because a per-run limit was reached', details);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
async waitBeforeNextBatchIfFull(numberOfCompactedData, runState) {
|
|
115
|
-
if (numberOfCompactedData !== this.insightsConfig.compactionBatchSize ||
|
|
116
|
-
this.insightsConfig.compactionBatchDelayMilliseconds <= 0) {
|
|
117
|
-
return;
|
|
118
|
-
}
|
|
119
|
-
try {
|
|
120
|
-
await (0, sleep_1.sleep)(this.insightsConfig.compactionBatchDelayMilliseconds, runState.signal);
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
async compactRawToHour() {
|
|
126
|
-
const batchQuery = this.insightsRawRepository.getRawInsightsBatchQuery(this.insightsConfig.compactionBatchSize);
|
|
127
|
-
return await this.insightsByPeriodRepository.compactSourceDataIntoInsightPeriod({
|
|
128
|
-
sourceBatchQuery: batchQuery,
|
|
129
|
-
sourceTableName: this.insightsRawRepository.metadata.tableName,
|
|
130
|
-
periodUnitToCompactInto: 'hour',
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
async compactHourToDay() {
|
|
134
|
-
const batchQuery = this.insightsByPeriodRepository.getPeriodInsightsBatchQuery({
|
|
135
|
-
periodUnitToCompactFrom: 'hour',
|
|
136
|
-
compactionBatchSize: this.insightsConfig.compactionBatchSize,
|
|
137
|
-
maxAgeInDays: this.insightsConfig.compactionHourlyToDailyThresholdDays,
|
|
138
|
-
});
|
|
139
|
-
return await this.insightsByPeriodRepository.compactSourceDataIntoInsightPeriod({
|
|
140
|
-
sourceBatchQuery: batchQuery,
|
|
141
|
-
periodUnitToCompactInto: 'day',
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
async compactDayToWeek() {
|
|
145
|
-
const batchQuery = this.insightsByPeriodRepository.getPeriodInsightsBatchQuery({
|
|
146
|
-
periodUnitToCompactFrom: 'day',
|
|
147
|
-
compactionBatchSize: this.insightsConfig.compactionBatchSize,
|
|
148
|
-
maxAgeInDays: this.insightsConfig.compactionDailyToWeeklyThresholdDays,
|
|
149
|
-
});
|
|
150
|
-
return await this.insightsByPeriodRepository.compactSourceDataIntoInsightPeriod({
|
|
151
|
-
sourceBatchQuery: batchQuery,
|
|
152
|
-
periodUnitToCompactInto: 'week',
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
exports.InsightsCompactionService = InsightsCompactionService;
|
|
157
|
-
exports.InsightsCompactionService = InsightsCompactionService = __decorate([
|
|
158
|
-
(0, di_1.Service)(),
|
|
159
|
-
__metadata("design:paramtypes", [insights_by_period_repository_1.InsightsByPeriodRepository, insights_raw_repository_1.InsightsRawRepository, insights_config_1.InsightsConfig, backend_common_1.Logger])
|
|
160
|
-
], InsightsCompactionService);
|
|
161
|
-
//# sourceMappingURL=insights-compaction.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-compaction.service.js","sourceRoot":"","sources":["../../../src/modules/insights/insights-compaction.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,8CAAsC;AACtC,gCAAkC;AAClC,4CAAyC;AAEzC,yGAAmG;AACnG,6FAAwF;AACxF,uDAAmD;AAkB5C,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACrC,YACkB,0BAAsD,EACtD,qBAA4C,EAC5C,cAA8B,EAC9B,MAAc;0CAHd,0BAA0B;qCAC1B,qBAAqB;8BACrB,cAAc;sBACd,MAAM;QAEvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9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} from '@n8n/decorators';
|
|
2
|
-
import type { SystemTaskEffects, SystemTaskPlacement, SystemTaskSchedule } from '@n8n/decorators';
|
|
3
|
-
import { InsightsCompactionService } from './insights-compaction.service';
|
|
4
|
-
import { InsightsConfig } from './insights.config';
|
|
5
|
-
export declare class InsightsCompactionTask implements SystemTask {
|
|
6
|
-
private readonly insightsConfig;
|
|
7
|
-
private readonly compactionService;
|
|
8
|
-
readonly name = "insights-compaction";
|
|
9
|
-
readonly schedule: SystemTaskSchedule;
|
|
10
|
-
readonly effects: SystemTaskEffects;
|
|
11
|
-
readonly placement: SystemTaskPlacement;
|
|
12
|
-
constructor(insightsConfig: InsightsConfig, compactionService: InsightsCompactionService);
|
|
13
|
-
run(signal: AbortSignal): Promise<void>;
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-compaction.task.js","sourceRoot":"","sources":["../../../src/modules/insights/insights-compaction.task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAsC;AACtC,gDAAkE;AAGlE,+EAA0E;AAC1E,uDAAmD;AAO5C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAWlC,YACkB,cAA8B,EAC9B,iBAA4C;QAD5C,mBAAc,GAAd,cAAc,CAAgB;QAC9B,sBAAiB,GAAjB,iBAAiB,CAA2B;QAZrD,SAAI,GAAG,qBAAqB,CAAC;QAE7B,aAAQ,GAAuB,IAAA,gCAAmB,EAC1D,IAAI,CAAC,cAAc,CAAC,yBAAyB,GAAG,gBAAI,CAAC,OAAO,CAAC,SAAS,CACtE,CAAC;QAEO,YAAO,GAAsB,YAAY,CAAC;QAE1C,cAAS,GAAwB,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAK3E,CAAC;IAEJ,KAAK,CAAC,GAAG,CAAC,MAAmB;QAC5B,MAAM,IAAI,CAAC,iBAAiB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;IACtD,CAAC;CACD,CAAA;;iCAnBY,sBAAsB;IADlC,IAAA,uBAAU,GAAE;qCAasB,gCAAc,EACX,uDAAyB;GAblD,sBAAsB,CAmBlC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Logger } from '@n8n/backend-common';
|
|
2
|
-
import { InsightsByPeriodRepository } from './database/repositories/insights-by-period.repository';
|
|
3
|
-
import { InsightsConfig } from './insights.config';
|
|
4
|
-
export declare class InsightsPruningService {
|
|
5
|
-
private readonly insightsByPeriodRepository;
|
|
6
|
-
private readonly config;
|
|
7
|
-
private readonly logger;
|
|
8
|
-
constructor(insightsByPeriodRepository: InsightsByPeriodRepository, config: InsightsConfig, logger: Logger);
|
|
9
|
-
get pruningMaxAgeInDays(): number;
|
|
10
|
-
pruneInsights(): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,49 +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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.InsightsPruningService = void 0;
|
|
13
|
-
const backend_common_1 = require("@n8n/backend-common");
|
|
14
|
-
const di_1 = require("@n8n/di");
|
|
15
|
-
const insights_by_period_repository_1 = require("./database/repositories/insights-by-period.repository");
|
|
16
|
-
const insights_config_1 = require("./insights.config");
|
|
17
|
-
const insights_constants_1 = require("./insights.constants");
|
|
18
|
-
let InsightsPruningService = class InsightsPruningService {
|
|
19
|
-
constructor(insightsByPeriodRepository, config, logger) {
|
|
20
|
-
this.insightsByPeriodRepository = insightsByPeriodRepository;
|
|
21
|
-
this.config = config;
|
|
22
|
-
this.logger = logger;
|
|
23
|
-
this.logger = this.logger.scoped('insights');
|
|
24
|
-
}
|
|
25
|
-
get pruningMaxAgeInDays() {
|
|
26
|
-
const configuredMaxAgeDays = this.config.maxAgeDays;
|
|
27
|
-
if (typeof configuredMaxAgeDays !== 'number' || !Number.isFinite(configuredMaxAgeDays)) {
|
|
28
|
-
return insights_constants_1.INSIGHTS_MAX_AGE_DAYS_DEFAULT;
|
|
29
|
-
}
|
|
30
|
-
if (configuredMaxAgeDays === -1) {
|
|
31
|
-
return insights_constants_1.INSIGHTS_MAX_AGE_DAYS_CAP;
|
|
32
|
-
}
|
|
33
|
-
if (configuredMaxAgeDays < 1) {
|
|
34
|
-
return insights_constants_1.INSIGHTS_MAX_AGE_DAYS_DEFAULT;
|
|
35
|
-
}
|
|
36
|
-
return Math.min(configuredMaxAgeDays, insights_constants_1.INSIGHTS_MAX_AGE_DAYS_CAP);
|
|
37
|
-
}
|
|
38
|
-
async pruneInsights() {
|
|
39
|
-
this.logger.info('Pruning old insights data');
|
|
40
|
-
const result = await this.insightsByPeriodRepository.pruneOldData(this.pruningMaxAgeInDays);
|
|
41
|
-
this.logger.debug('Deleted insights by period', result.affected ? { count: result.affected } : {});
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.InsightsPruningService = InsightsPruningService;
|
|
45
|
-
exports.InsightsPruningService = InsightsPruningService = __decorate([
|
|
46
|
-
(0, di_1.Service)(),
|
|
47
|
-
__metadata("design:paramtypes", [insights_by_period_repository_1.InsightsByPeriodRepository, insights_config_1.InsightsConfig, backend_common_1.Logger])
|
|
48
|
-
], InsightsPruningService);
|
|
49
|
-
//# sourceMappingURL=insights-pruning.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-pruning.service.js","sourceRoot":"","sources":["../../../src/modules/insights/insights-pruning.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,gCAAkC;AAElC,yGAAmG;AACnG,uDAAmD;AACnD,6DAAgG;AAGzF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAClC,YACkB,0BAAsD,EACtD,MAAsB,EACtB,MAAc;0CAFd,0BAA0B;sBAC1B,MAAM;sBACN,MAAM;QAEvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;IAED,IAAI,mBAAmB;QACtB,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;QACpD,IAAI,OAAO,oBAAoB,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,CAAC;YACxF,OAAO,kDAA6B,CAAC;QACtC,CAAC;QAED,IAAI,oBAAoB,KAAK,CAAC,CAAC,EAAE,CAAC;YACjC,OAAO,8CAAyB,CAAC;QAClC,CAAC;QAED,IAAI,oBAAoB,GAAG,CAAC,EAAE,CAAC;YAC9B,OAAO,kDAA6B,CAAC;QACtC,CAAC;QAED,OAAO,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE,8CAAyB,CAAC,CAAC;IAClE,CAAC;IAGD,KAAK,CAAC,aAAa;QAClB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC,YAAY,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC5F,IAAI,CAAC,MAAM,CAAC,KAAK,CAChB,4BAA4B,EAC5B,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CACjD,CAAC;IACH,CAAC;CACD,CAAA;;iCAnCY,sBAAsB;IADlC,IAAA,YAAO,GAAE;qCAGqC,0DAA0B,EAC9C,gCAAc,EACd,uBAAM;GAJpB,sBAAsB,CAmClC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SystemTask } from '@n8n/decorators';
|
|
2
|
-
import type { SystemTaskEffects, SystemTaskPlacement, SystemTaskSchedule } from '@n8n/decorators';
|
|
3
|
-
import { InsightsPruningService } from './insights-pruning.service';
|
|
4
|
-
import { InsightsConfig } from './insights.config';
|
|
5
|
-
export declare class InsightsPruningTask implements SystemTask {
|
|
6
|
-
private readonly insightsConfig;
|
|
7
|
-
private readonly pruningService;
|
|
8
|
-
readonly name = "insights-pruning";
|
|
9
|
-
readonly schedule: SystemTaskSchedule;
|
|
10
|
-
readonly effects: SystemTaskEffects;
|
|
11
|
-
readonly placement: SystemTaskPlacement;
|
|
12
|
-
readonly retryDelaySeconds = 1;
|
|
13
|
-
constructor(insightsConfig: InsightsConfig, pruningService: InsightsPruningService);
|
|
14
|
-
run(): Promise<void>;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insights-pruning.task.js","sourceRoot":"","sources":["../../../src/modules/insights/insights-pruning.task.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAsC;AACtC,gDAAkE;AAGlE,yEAAoE;AACpE,uDAAmD;AAO5C,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAc/B,YACkB,cAA8B,EAC9B,cAAsC;QADtC,mBAAc,GAAd,cAAc,CAAgB;QAC9B,mBAAc,GAAd,cAAc,CAAwB;QAf/C,SAAI,GAAG,kBAAkB,CAAC;QAE1B,aAAQ,GAAuB,IAAA,gCAAmB,EAC1D,IAAI,CAAC,cAAc,CAAC,uBAAuB,GAAG,gBAAI,CAAC,KAAK,CAAC,SAAS,CAClE,CAAC;QAEO,YAAO,GAAsB,YAAY,CAAC;QAE1C,cAAS,GAAwB,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;QAGrE,sBAAiB,GAAG,CAAC,CAAC;IAK5B,CAAC;IAEJ,KAAK,CAAC,GAAG;QACR,MAAM,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;IAC3C,CAAC;CACD,CAAA;;8BAtBY,mBAAmB;IAD/B,IAAA,uBAAU,GAAE;qCAgBsB,gCAAc,EACd,iDAAsB;GAhB5C,mBAAmB,CAsB/B"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare class InsightsConfig {
|
|
2
|
-
compactionIntervalMinutes: number;
|
|
3
|
-
compactionBatchSize: number;
|
|
4
|
-
compactionHourlyToDailyThresholdDays: number;
|
|
5
|
-
compactionDailyToWeeklyThresholdDays: number;
|
|
6
|
-
flushBatchSize: number;
|
|
7
|
-
flushIntervalSeconds: number;
|
|
8
|
-
maxAgeDays: number;
|
|
9
|
-
pruneCheckIntervalHours: number;
|
|
10
|
-
compactionMaxBatchesPerRun: number;
|
|
11
|
-
compactionMaxRuntimeSeconds: number;
|
|
12
|
-
compactionBatchDelayMilliseconds: number;
|
|
13
|
-
}
|