n8n 2.43.4 → 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/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/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/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.service.js +1 -0
- package/dist/modules/chat-hub/chat-hub-execution.service.js.map +1 -1
- package/dist/modules/community-packages/community-node.command.d.ts +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 +29 -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/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/wait-tracker.js +1 -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 +14 -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 +9 -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 +9 -10
- package/dist/workflows/triggers/trigger-execution-context.factory.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 +42 -40
- 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
|
@@ -0,0 +1,287 @@
|
|
|
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.TrustedSourceIdentityService = void 0;
|
|
13
|
+
const api_types_1 = require("@n8n/api-types");
|
|
14
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
+
const backend_services_1 = require("@n8n/backend-services");
|
|
16
|
+
const constants_1 = require("@n8n/constants");
|
|
17
|
+
const db_1 = require("@n8n/db");
|
|
18
|
+
const di_1 = require("@n8n/di");
|
|
19
|
+
const inbound_auth_1 = require("@n8n/inbound-auth");
|
|
20
|
+
const permissions_1 = require("@n8n/permissions");
|
|
21
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
22
|
+
const role_mapping_proxy_service_1 = require("../../../services/role-mapping-proxy.service");
|
|
23
|
+
const trusted_source_identity_repository_1 = require("../database/repositories/trusted-source-identity.repository");
|
|
24
|
+
const external_identity_1 = require("./external-identity");
|
|
25
|
+
function isStale(lastSeenAt) {
|
|
26
|
+
return lastSeenAt === null || Date.now() - lastSeenAt.getTime() > constants_1.Time.days.toMilliseconds;
|
|
27
|
+
}
|
|
28
|
+
const PLACEHOLDER_PASSWORD = '!trusted-source-no-password';
|
|
29
|
+
const MAX_NAME_LENGTH = 32;
|
|
30
|
+
function buildContext(verified, external, subject, actor) {
|
|
31
|
+
return {
|
|
32
|
+
...(actor ? { actor } : {}),
|
|
33
|
+
subject,
|
|
34
|
+
authMethod: 'oauth-access-token',
|
|
35
|
+
subjectClaim: {
|
|
36
|
+
sourceId: verified.source.id,
|
|
37
|
+
issuer: verified.source.issuer,
|
|
38
|
+
subject: external.subject,
|
|
39
|
+
},
|
|
40
|
+
clientId: external.clientId,
|
|
41
|
+
tokenScopes: external.scopes,
|
|
42
|
+
resource: verified.resource,
|
|
43
|
+
grant: verified.grant,
|
|
44
|
+
assurance: external.assurance,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
let TrustedSourceIdentityService = class TrustedSourceIdentityService extends inbound_auth_1.IdentityService {
|
|
48
|
+
constructor(logger, identities, users, txRunner, eventService, roleService, roleMapping) {
|
|
49
|
+
super();
|
|
50
|
+
this.logger = logger;
|
|
51
|
+
this.identities = identities;
|
|
52
|
+
this.users = users;
|
|
53
|
+
this.txRunner = txRunner;
|
|
54
|
+
this.eventService = eventService;
|
|
55
|
+
this.roleService = roleService;
|
|
56
|
+
this.roleMapping = roleMapping;
|
|
57
|
+
}
|
|
58
|
+
async mapRoles(source, claims, ctx) {
|
|
59
|
+
const provider = this.roleMapping.getProvider();
|
|
60
|
+
if (provider === null)
|
|
61
|
+
return { ok: false, reason: 'no-role' };
|
|
62
|
+
const { instanceRoleRules, projectRoleRules, fallbackInstanceRole } = source.config.identity.roleMapping;
|
|
63
|
+
const resolved = await provider.resolveRoles({ instanceRoleRules, projectRoleRules, fallbackInstanceRole: fallbackInstanceRole ?? '' }, {
|
|
64
|
+
$claims: claims,
|
|
65
|
+
$provider: 'oauth2',
|
|
66
|
+
}, ctx);
|
|
67
|
+
const instanceRole = resolved.instanceRole.role;
|
|
68
|
+
if (instanceRole === api_types_1.BLOCK_ACCESS_ASSIGNMENT ||
|
|
69
|
+
!(await this.isAssignableInstanceRole(instanceRole, ctx))) {
|
|
70
|
+
return { ok: false, reason: 'no-role' };
|
|
71
|
+
}
|
|
72
|
+
const projectRoles = [...resolved.projectRoles.values()].map(({ projectId, role }) => ({
|
|
73
|
+
projectId,
|
|
74
|
+
role,
|
|
75
|
+
}));
|
|
76
|
+
if (!(await this.identities.projectRolesExist(projectRoles.map(({ role }) => role), ctx))) {
|
|
77
|
+
return { ok: false, reason: 'no-role' };
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
ok: true,
|
|
81
|
+
value: {
|
|
82
|
+
instanceRole,
|
|
83
|
+
projectRoles,
|
|
84
|
+
resolved,
|
|
85
|
+
managed: {
|
|
86
|
+
instanceRole: instanceRoleRules.some((rule) => rule.enabled),
|
|
87
|
+
projectRoles: projectRoleRules.some((rule) => rule.enabled),
|
|
88
|
+
},
|
|
89
|
+
provider,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async mapIfContinuous(source, claims, ctx) {
|
|
94
|
+
if (source.config.identity.roleMapping.mode !== 'continuous') {
|
|
95
|
+
return { ok: true, value: undefined };
|
|
96
|
+
}
|
|
97
|
+
return await this.mapRoles(source, claims, ctx);
|
|
98
|
+
}
|
|
99
|
+
async resolveByUserId(id) {
|
|
100
|
+
const user = await this.users.findByIdWithRole(id);
|
|
101
|
+
if (user === null)
|
|
102
|
+
return { ok: false, reason: 'unknown-subject' };
|
|
103
|
+
if (user.disabled)
|
|
104
|
+
return { ok: false, reason: 'user-disabled' };
|
|
105
|
+
return { ok: true, value: (0, db_1.principalFromUser)(user) };
|
|
106
|
+
}
|
|
107
|
+
async acceptBinding(source, binding, claims, ctx, mapped) {
|
|
108
|
+
if (binding.status !== 'active')
|
|
109
|
+
return { ok: false, reason: 'binding-inactive' };
|
|
110
|
+
if (binding.user.disabled)
|
|
111
|
+
return { ok: false, reason: 'user-disabled' };
|
|
112
|
+
let mappedRoles = mapped;
|
|
113
|
+
if (mappedRoles === undefined) {
|
|
114
|
+
const result = await this.mapIfContinuous(source, claims, ctx);
|
|
115
|
+
if (!result.ok)
|
|
116
|
+
return result;
|
|
117
|
+
mappedRoles = result.value;
|
|
118
|
+
}
|
|
119
|
+
if (isStale(binding.lastSeenAt)) {
|
|
120
|
+
await this.identities.touchLastSeen(binding.sourceId, binding.subject, new Date(), ctx);
|
|
121
|
+
}
|
|
122
|
+
const continuous = mappedRoles !== undefined &&
|
|
123
|
+
binding.provenance === 'jit' &&
|
|
124
|
+
binding.user.role.slug !== permissions_1.GLOBAL_OWNER_ROLE_SLUG
|
|
125
|
+
? mappedRoles
|
|
126
|
+
: undefined;
|
|
127
|
+
return {
|
|
128
|
+
ok: true,
|
|
129
|
+
value: {
|
|
130
|
+
principal: (0, db_1.principalFromUser)(binding.user),
|
|
131
|
+
...(continuous && {
|
|
132
|
+
onCommit: async () => {
|
|
133
|
+
await continuous.provider.applyResolvedRoles(binding.user, continuous.resolved, continuous.managed);
|
|
134
|
+
if (!continuous.managed.instanceRole ||
|
|
135
|
+
binding.user.role.slug === continuous.instanceRole)
|
|
136
|
+
return;
|
|
137
|
+
const user = await this.users.findByIdWithRole(binding.user.id);
|
|
138
|
+
return user === null ? undefined : (0, db_1.principalFromUser)(user);
|
|
139
|
+
},
|
|
140
|
+
}),
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
async link(source, external, user, ctx) {
|
|
145
|
+
const row = {
|
|
146
|
+
sourceId: source.id,
|
|
147
|
+
subject: external.subject,
|
|
148
|
+
userId: user.id,
|
|
149
|
+
provenance: 'claim-match',
|
|
150
|
+
status: 'active',
|
|
151
|
+
};
|
|
152
|
+
const mapped = await this.mapIfContinuous(source, external.raw, ctx);
|
|
153
|
+
if (!mapped.ok)
|
|
154
|
+
return mapped;
|
|
155
|
+
await this.identities.insertIfAbsent(row, ctx);
|
|
156
|
+
const binding = await this.identities.findBySubject(source.id, external.subject, ctx);
|
|
157
|
+
if (binding === null)
|
|
158
|
+
throw new n8n_workflow_1.UnexpectedError('Binding missing after insert');
|
|
159
|
+
const accepted = await this.acceptBinding(source, binding, external.raw, ctx, mapped.value);
|
|
160
|
+
if (accepted.ok && binding.user.id === user.id) {
|
|
161
|
+
return {
|
|
162
|
+
ok: true,
|
|
163
|
+
value: {
|
|
164
|
+
principal: accepted.value.principal,
|
|
165
|
+
onCommit: async () => {
|
|
166
|
+
const refreshed = await accepted.value.onCommit?.();
|
|
167
|
+
this.eventService.emit('trusted-source-identity-linked', {
|
|
168
|
+
userId: user.id,
|
|
169
|
+
sourceId: source.id,
|
|
170
|
+
subject: external.subject,
|
|
171
|
+
issuer: source.issuer,
|
|
172
|
+
provenance: 'claim-match',
|
|
173
|
+
});
|
|
174
|
+
return refreshed;
|
|
175
|
+
},
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return accepted;
|
|
180
|
+
}
|
|
181
|
+
async provision(source, external, ctx) {
|
|
182
|
+
const { provision } = source.config.identity;
|
|
183
|
+
if (provision.human === 'off')
|
|
184
|
+
return { ok: false, reason: 'provision-refused' };
|
|
185
|
+
const email = external.email;
|
|
186
|
+
if (email === undefined || !(0, db_1.isValidEmail)(email))
|
|
187
|
+
return { ok: false, reason: 'provision-refused' };
|
|
188
|
+
if (source.config.identity.roleMapping.mode === 'off')
|
|
189
|
+
return { ok: false, reason: 'no-role' };
|
|
190
|
+
const mapped = await this.mapRoles(source, external.raw, ctx);
|
|
191
|
+
if (!mapped.ok)
|
|
192
|
+
return mapped;
|
|
193
|
+
const { instanceRole: role, projectRoles } = mapped.value;
|
|
194
|
+
const [firstName = '', ...rest] = (external.displayName ?? '').trim().split(/\s+/);
|
|
195
|
+
const user = await this.identities.createUserWithBinding(ctx, {
|
|
196
|
+
email,
|
|
197
|
+
firstName: firstName.slice(0, MAX_NAME_LENGTH),
|
|
198
|
+
lastName: rest.join(' ').slice(0, MAX_NAME_LENGTH),
|
|
199
|
+
role: {
|
|
200
|
+
slug: role,
|
|
201
|
+
},
|
|
202
|
+
password: PLACEHOLDER_PASSWORD,
|
|
203
|
+
}, {
|
|
204
|
+
sourceId: source.id,
|
|
205
|
+
subject: external.subject,
|
|
206
|
+
provenance: 'jit',
|
|
207
|
+
status: 'active',
|
|
208
|
+
}, projectRoles);
|
|
209
|
+
return {
|
|
210
|
+
ok: true,
|
|
211
|
+
value: {
|
|
212
|
+
principal: (0, db_1.principalFromUser)(user),
|
|
213
|
+
onCommit: async () => {
|
|
214
|
+
this.eventService.emit('trusted-source-user-provisioned', {
|
|
215
|
+
userId: user.id,
|
|
216
|
+
sourceId: source.id,
|
|
217
|
+
subject: external.subject,
|
|
218
|
+
issuer: source.issuer,
|
|
219
|
+
role,
|
|
220
|
+
});
|
|
221
|
+
return undefined;
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
async isAssignableInstanceRole(slug, ctx) {
|
|
227
|
+
if (slug === permissions_1.GLOBAL_OWNER_ROLE_SLUG)
|
|
228
|
+
return false;
|
|
229
|
+
if (!(await this.identities.globalRoleExists(slug, ctx)))
|
|
230
|
+
return false;
|
|
231
|
+
return this.roleService.isRoleLicensed(slug);
|
|
232
|
+
}
|
|
233
|
+
async linkOrProvision(source, external, ctx) {
|
|
234
|
+
const { linkByEmail } = source.config.identity;
|
|
235
|
+
if (linkByEmail === 'off')
|
|
236
|
+
return { ok: false, reason: 'link-refused' };
|
|
237
|
+
const mayUseEmail = linkByEmail === 'any' || (linkByEmail === 'verified-only' && external.emailVerified === true);
|
|
238
|
+
const email = mayUseEmail ? external.email : undefined;
|
|
239
|
+
if (email !== undefined) {
|
|
240
|
+
const user = await this.identities.findUserByEmail(email, ctx);
|
|
241
|
+
if (user !== null) {
|
|
242
|
+
if (user.disabled)
|
|
243
|
+
return { ok: false, reason: 'user-disabled' };
|
|
244
|
+
if (user.role.slug === permissions_1.GLOBAL_OWNER_ROLE_SLUG)
|
|
245
|
+
return { ok: false, reason: 'link-refused' };
|
|
246
|
+
return await this.link(source, external, user, ctx);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return await this.provision(source, { ...external, email }, ctx);
|
|
250
|
+
}
|
|
251
|
+
async resolveBinding(source, external) {
|
|
252
|
+
const result = await this.txRunner.run({}, async (ctx) => {
|
|
253
|
+
const binding = await this.identities.findBySubject(source.id, external.subject, ctx);
|
|
254
|
+
if (binding !== null)
|
|
255
|
+
return await this.acceptBinding(source, binding, external.raw, ctx);
|
|
256
|
+
return await this.linkOrProvision(source, external, ctx);
|
|
257
|
+
});
|
|
258
|
+
if (result.ok) {
|
|
259
|
+
const refreshed = await result.value.onCommit?.();
|
|
260
|
+
return { ok: true, value: refreshed ?? result.value.principal };
|
|
261
|
+
}
|
|
262
|
+
return result;
|
|
263
|
+
}
|
|
264
|
+
async identify(verified) {
|
|
265
|
+
const { source } = verified;
|
|
266
|
+
const identity = source.config.identity;
|
|
267
|
+
const translated = (0, external_identity_1.translateClaims)(verified.claims, identity.claimMapping, this.logger);
|
|
268
|
+
if (!translated.ok)
|
|
269
|
+
return translated;
|
|
270
|
+
const externalIdentity = translated.value;
|
|
271
|
+
const resolved = identity.subject === 'n8n-user-id'
|
|
272
|
+
? await this.resolveByUserId(externalIdentity.subject)
|
|
273
|
+
: await this.resolveBinding(source, externalIdentity);
|
|
274
|
+
if (!resolved.ok)
|
|
275
|
+
return resolved;
|
|
276
|
+
return {
|
|
277
|
+
ok: true,
|
|
278
|
+
value: buildContext(verified, externalIdentity, resolved.value),
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
exports.TrustedSourceIdentityService = TrustedSourceIdentityService;
|
|
283
|
+
exports.TrustedSourceIdentityService = TrustedSourceIdentityService = __decorate([
|
|
284
|
+
(0, di_1.Service)(),
|
|
285
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, trusted_source_identity_repository_1.TrustedSourceIdentityRepository, db_1.UserRepository, db_1.TransactionRunner, backend_services_1.EventService, backend_services_1.RoleService, role_mapping_proxy_service_1.RoleMappingProxyService])
|
|
286
|
+
], TrustedSourceIdentityService);
|
|
287
|
+
//# sourceMappingURL=trusted-source-identity.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-source-identity.service.js","sourceRoot":"","sources":["../../../../src/modules/inbound-auth-core/identity/trusted-source-identity.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAAyD;AACzD,wDAA6C;AAC7C,4DAAkE;AAClE,8CAAsC;AACtC,gCAOiB;AACjB,gCAAkC;AAClC,oDAM2B;AAC3B,kDAAgG;AAChG,+CAA+C;AAE/C,sFAI+C;AAG/C,oHAGqE;AACrE,2DAAsD;AAGtD,SAAS,OAAO,CAAC,UAAuB;IACvC,OAAO,UAA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AED,KAAK,CAAC,QAAQ,CAAC,QAAkB;QAChC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC;QAC5B,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC;QAExC,MAAM,UAAU,GAAG,IAAA,mCAAe,EAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAExF,IAAI,CAAC,UAAU,CAAC,EAAE;YAAE,OAAO,UAAU,CAAC;QAEtC,MAAM,gBAAgB,GAAG,UAAU,CAAC,KAAK,CAAC;QAE1C,MAAM,QAAQ,GACb,QAAQ,CAAC,OAAO,KAAK,aAAa;YACjC,CAAC,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACtD,CAAC,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAExD,IAAI,CAAC,QAAQ,CAAC,EAAE;YAAE,OAAO,QAAQ,CAAC;QAElC,OAAO;YACN,EAAE,EAAE,IAAI;YACR,KAAK,EAAE,YAAY,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,CAAC,KAAK,CAAC;SAC/D,CAAC;IACH,CAAC;CACD,CAAA;;uCAxUY,4BAA4B;IADxC,IAAA,YAAO,GAAE;qCAGiB,uBAAM,EACF,oEAA+B,EACpC,mBAAc,EACX,sBAAiB,EACb,+BAAY,EACb,8BAAW,EACX,oDAAuB;GAR1C,4BAA4B,CAwUxC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ModuleInterface } from '@n8n/decorators';
|
|
2
2
|
export declare class InboundAuthCoreModule implements ModuleInterface {
|
|
3
3
|
init(): Promise<void>;
|
|
4
|
+
systemTasks(): Promise<typeof import("./trusted-source-discovery.task.js").TrustedSourceDiscoveryTask[]>;
|
|
4
5
|
entities(): Promise<(typeof import("./database/entities/trusted-source.entity.js").TrustedSourceEntity | typeof import("./database/entities/trusted-source-identity.entity.js").TrustedSourceIdentityEntity)[]>;
|
|
5
6
|
}
|
|
@@ -10,35 +10,45 @@ exports.InboundAuthCoreModule = void 0;
|
|
|
10
10
|
const decorators_1 = require("@n8n/decorators");
|
|
11
11
|
const di_1 = require("@n8n/di");
|
|
12
12
|
const inbound_auth_1 = require("@n8n/inbound-auth");
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
const n8n_core_1 = require("n8n-core");
|
|
14
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
15
|
+
class UnregisteredLocalAuthorizationServer extends inbound_auth_1.LocalAuthorizationServer {
|
|
16
|
+
async getMetadata() {
|
|
17
|
+
throw new n8n_workflow_1.OperationalError('No local authorization server is registered');
|
|
16
18
|
}
|
|
17
|
-
async
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
class UnregisteredIdentityService extends inbound_auth_1.IdentityService {
|
|
22
|
-
async identify(_verified) {
|
|
23
|
-
return { ok: false, reason: 'source-unusable' };
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
class UnregisteredTrustedSourceGate extends inbound_auth_1.TrustedSourceGate {
|
|
27
|
-
async authorizeSealed() {
|
|
28
|
-
return false;
|
|
19
|
+
async getJwks() {
|
|
20
|
+
throw new n8n_workflow_1.OperationalError('No local authorization server is registered');
|
|
29
21
|
}
|
|
30
22
|
}
|
|
31
23
|
let InboundAuthCoreModule = class InboundAuthCoreModule {
|
|
32
24
|
async init() {
|
|
33
|
-
if (!di_1.Container.has(inbound_auth_1.
|
|
34
|
-
di_1.Container.set(inbound_auth_1.
|
|
25
|
+
if (!di_1.Container.has(inbound_auth_1.LocalAuthorizationServer)) {
|
|
26
|
+
di_1.Container.set(inbound_auth_1.LocalAuthorizationServer, new UnregisteredLocalAuthorizationServer());
|
|
35
27
|
}
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
const { TrustedSourceDbStore } = await import('./trusted-source.store.js');
|
|
29
|
+
if (!di_1.Container.has(inbound_auth_1.TrustedSourceStore)) {
|
|
30
|
+
di_1.Container.set(inbound_auth_1.TrustedSourceStore, di_1.Container.get(TrustedSourceDbStore));
|
|
38
31
|
}
|
|
32
|
+
const { TrustedSourceDbGate } = await import('./trusted-source.gate.js');
|
|
39
33
|
if (!di_1.Container.has(inbound_auth_1.TrustedSourceGate)) {
|
|
40
|
-
di_1.Container.set(inbound_auth_1.TrustedSourceGate,
|
|
34
|
+
di_1.Container.set(inbound_auth_1.TrustedSourceGate, di_1.Container.get(TrustedSourceDbGate));
|
|
41
35
|
}
|
|
36
|
+
if (di_1.Container.get(n8n_core_1.InstanceSettings).instanceType === 'main') {
|
|
37
|
+
const { SystemTrustedSourceSeeder } = await import('./system-trusted-source.seeder.js');
|
|
38
|
+
await di_1.Container.get(SystemTrustedSourceSeeder).seed();
|
|
39
|
+
}
|
|
40
|
+
const { OAuth2AuthenticationService } = await import('./authentication.service.js');
|
|
41
|
+
di_1.Container.set(inbound_auth_1.AuthenticationService, di_1.Container.get(OAuth2AuthenticationService));
|
|
42
|
+
const { TrustedSourceIdentityService } = await import('./identity/trusted-source-identity.service.js');
|
|
43
|
+
if (!di_1.Container.has(inbound_auth_1.IdentityService)) {
|
|
44
|
+
di_1.Container.set(inbound_auth_1.IdentityService, di_1.Container.get(TrustedSourceIdentityService));
|
|
45
|
+
}
|
|
46
|
+
const { InboundAuthPipeline } = await import('./authentication-pipeline.js');
|
|
47
|
+
di_1.Container.set(inbound_auth_1.AuthenticationPipeline, di_1.Container.get(InboundAuthPipeline));
|
|
48
|
+
}
|
|
49
|
+
async systemTasks() {
|
|
50
|
+
const { TrustedSourceDiscoveryTask } = await import('./trusted-source-discovery.task.js');
|
|
51
|
+
return [TrustedSourceDiscoveryTask];
|
|
42
52
|
}
|
|
43
53
|
async entities() {
|
|
44
54
|
const { TrustedSourceEntity } = await import('./database/entities/trusted-source.entity.js');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inbound-auth-core.module.js","sourceRoot":"","sources":["../../../src/modules/inbound-auth-core/inbound-auth-core.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAgD;AAChD,gCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"inbound-auth-core.module.js","sourceRoot":"","sources":["../../../src/modules/inbound-auth-core/inbound-auth-core.module.ts"],"names":[],"mappings":";;;;;;;;;AACA,gDAAgD;AAChD,gCAAoC;AACpC,oDAS2B;AAC3B,uCAA4C;AAC5C,+CAAgD;AAGhD,MAAM,oCAAqC,SAAQ,uCAAwB;IAC1E,KAAK,CAAC,WAAW;QAChB,MAAM,IAAI,+BAAgB,CAAC,6CAA6C,CAAC,CAAC;IAC3E,CAAC;IAED,KAAK,CAAC,OAAO;QACZ,MAAM,IAAI,+BAAgB,CAAC,6CAA6C,CAAC,CAAC;IAC3E,CAAC;CACD;AASM,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,KAAK,CAAC,IAAI;QAET,IAAI,CAAC,cAAS,CAAC,GAAG,CAAC,uCAAwB,CAAC,EAAE,CAAC;YAC9C,cAAS,CAAC,GAAG,CAAC,uCAAwB,EAAE,IAAI,oCAAoC,EAAE,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,EAAE,oBAAoB,EAAE,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC,CAAC;QAC3E,IAAI,CAAC,cAAS,CAAC,GAAG,CAAC,iCAAkB,CAAC,EAAE,CAAC;YACxC,cAAS,CAAC,GAAG,CAAC,iCAAkB,EAAE,cAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC,CAAC;QACxE,CAAC;QAED,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,0BAA0B,CAAC,CAAC;QACzE,IAAI,CAAC,cAAS,CAAC,GAAG,CAAC,gCAAiB,CAAC,EAAE,CAAC;YACvC,cAAS,CAAC,GAAG,CAAC,gCAAiB,EAAE,cAAS,CAAC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vD,CAAC;QAEF,OAAO,CAAC,mBAAmB,EAAE,2BAA2B,CAAC,CAAC;IAC3D,CAAC;CACD,CAAA;;gCAlDY,qBAAqB;IADjC,IAAA,0BAAa,EAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,aAAa,EAAE,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC;GAC9E,qBAAqB,CAkDjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPublicKeyFromJwk = void 0;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const getPublicKeyFromJwk = (jwks, kid, usage = 'sig') => {
|
|
6
|
+
const foundKey = jwks
|
|
7
|
+
.filter((key) => key.use === usage || !key.use)
|
|
8
|
+
.find((key) => key.kid === kid);
|
|
9
|
+
if (!foundKey) {
|
|
10
|
+
return undefined;
|
|
11
|
+
}
|
|
12
|
+
return (0, node_crypto_1.createPublicKey)({
|
|
13
|
+
key: foundKey,
|
|
14
|
+
format: 'jwk',
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
exports.getPublicKeyFromJwk = getPublicKeyFromJwk;
|
|
18
|
+
//# sourceMappingURL=key.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key.utils.js","sourceRoot":"","sources":["../../../src/modules/inbound-auth-core/key.utils.ts"],"names":[],"mappings":";;;AAEA,6CAA8C;AAEvC,MAAM,mBAAmB,GAAG,CAAC,IAAgB,EAAE,GAAW,EAAE,KAAK,GAAW,KAAK,EAAE,EAAE;IAC3F,MAAM,QAAQ,GAAG,IAAI;SACnB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,KAAK,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;SAC9C,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;IAEjC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO,IAAA,6BAAe,EAAC;QACtB,GAAG,EAAE,QAAQ;QACb,MAAM,EAAE,KAAK;KACb,CAAC,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,mBAAmB,GAAnB,mBAAmB,CAY9B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AuthenticationDriver, TrustedSourceStore, type AdvertisedResource, type Extracted, type Result, type TrustedSource, type Verified } from '@n8n/inbound-auth';
|
|
2
|
+
import { Logger } from '@n8n/backend-common';
|
|
3
|
+
export declare class Oauth2BearerDriver extends AuthenticationDriver {
|
|
4
|
+
private readonly store;
|
|
5
|
+
readonly credentialKind: 'bearer';
|
|
6
|
+
readonly sourceTypes: Array<TrustedSource['type']>;
|
|
7
|
+
private readonly logger;
|
|
8
|
+
constructor(store: TrustedSourceStore, logger: Logger);
|
|
9
|
+
selectSource(extracted: Extracted): Promise<TrustedSource | undefined>;
|
|
10
|
+
private reject;
|
|
11
|
+
verify(extracted: Extracted, source: TrustedSource): Promise<Result<Verified>>;
|
|
12
|
+
advertise(resource: AdvertisedResource, sources: TrustedSource[]): {
|
|
13
|
+
authorizationServers?: string[];
|
|
14
|
+
challenge?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
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.Oauth2BearerDriver = void 0;
|
|
13
|
+
const di_1 = require("@n8n/di");
|
|
14
|
+
const inbound_auth_1 = require("@n8n/inbound-auth");
|
|
15
|
+
const jsonwebtoken_1 = require("jsonwebtoken");
|
|
16
|
+
const backend_common_1 = require("@n8n/backend-common");
|
|
17
|
+
const key_utils_1 = require("./key.utils");
|
|
18
|
+
const isJwtFailure = (error) => typeof error === 'object' && error !== null && 'name' in error && typeof error.name === 'string';
|
|
19
|
+
const normalizeAudiences = (aud) => {
|
|
20
|
+
if (typeof aud === 'string')
|
|
21
|
+
return [aud];
|
|
22
|
+
if (Array.isArray(aud))
|
|
23
|
+
return aud.filter((entry) => typeof entry === 'string');
|
|
24
|
+
return [];
|
|
25
|
+
};
|
|
26
|
+
let Oauth2BearerDriver = class Oauth2BearerDriver extends inbound_auth_1.AuthenticationDriver {
|
|
27
|
+
constructor(store, logger) {
|
|
28
|
+
super();
|
|
29
|
+
this.store = store;
|
|
30
|
+
this.credentialKind = 'bearer';
|
|
31
|
+
this.sourceTypes = ['oauth2'];
|
|
32
|
+
this.logger = logger.scoped('inbound-auth');
|
|
33
|
+
}
|
|
34
|
+
async selectSource(extracted) {
|
|
35
|
+
let issuer;
|
|
36
|
+
try {
|
|
37
|
+
const decoded = (0, jsonwebtoken_1.decode)(extracted.credential.token);
|
|
38
|
+
issuer =
|
|
39
|
+
typeof decoded === 'object' && decoded !== null && typeof decoded.iss === 'string'
|
|
40
|
+
? decoded.iss
|
|
41
|
+
: undefined;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
this.logger.warn('Failed to decode JWT', { error });
|
|
45
|
+
}
|
|
46
|
+
return issuer ? await this.store.getByIssuer(issuer) : undefined;
|
|
47
|
+
}
|
|
48
|
+
reject(error) {
|
|
49
|
+
if (!isJwtFailure(error))
|
|
50
|
+
return { ok: false, reason: 'signature-invalid' };
|
|
51
|
+
switch (error.name) {
|
|
52
|
+
case 'TokenExpiredError':
|
|
53
|
+
return { ok: false, reason: 'expired', detail: error.message };
|
|
54
|
+
case 'JsonWebTokenError':
|
|
55
|
+
if (error.message === 'jwt must be provided')
|
|
56
|
+
return { ok: false, reason: 'not-an-access-token' };
|
|
57
|
+
if (error.message.startsWith('jwt audience invalid'))
|
|
58
|
+
return { ok: false, reason: 'audience-mismatch', detail: error.message };
|
|
59
|
+
return { ok: false, reason: 'signature-invalid', detail: error.message };
|
|
60
|
+
case 'NotBeforeError':
|
|
61
|
+
return { ok: false, reason: 'expired', detail: error.message };
|
|
62
|
+
default:
|
|
63
|
+
return { ok: false, reason: 'signature-invalid', detail: error.name };
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async verify(extracted, source) {
|
|
67
|
+
const { authentication } = source.config;
|
|
68
|
+
const jwks = source.metadata?.documents.find((doc) => doc.kind === 'jwks');
|
|
69
|
+
if (!jwks) {
|
|
70
|
+
return {
|
|
71
|
+
ok: false,
|
|
72
|
+
reason: 'source-unusable',
|
|
73
|
+
detail: 'JWKS document not found',
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
const allowedAudiences = source.config.surfaces[extracted.surface]?.audiences ?? extracted.resource.acceptedAudiences;
|
|
77
|
+
let token;
|
|
78
|
+
try {
|
|
79
|
+
token = await new Promise((resolve, reject) => {
|
|
80
|
+
(0, jsonwebtoken_1.verify)(extracted.credential.token, (header, keyCallback) => {
|
|
81
|
+
if (!header.kid) {
|
|
82
|
+
return keyCallback(new Error('Missing kid in JWT header'));
|
|
83
|
+
}
|
|
84
|
+
const key = (0, key_utils_1.getPublicKeyFromJwk)(jwks.keys, header.kid);
|
|
85
|
+
if (!key) {
|
|
86
|
+
return keyCallback(new Error('Public key not found for the given kid'));
|
|
87
|
+
}
|
|
88
|
+
keyCallback(null, key);
|
|
89
|
+
}, {
|
|
90
|
+
issuer: source.issuer,
|
|
91
|
+
algorithms: authentication.algorithms,
|
|
92
|
+
clockTolerance: authentication.clockSkewSeconds,
|
|
93
|
+
complete: true,
|
|
94
|
+
}, (jwtError, decoded) => {
|
|
95
|
+
if (jwtError) {
|
|
96
|
+
reject(jwtError);
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
if (!decoded) {
|
|
100
|
+
reject(new Error('Decoded JWT is undefined'));
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
resolve(decoded);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
catch (error) {
|
|
109
|
+
return this.reject(error);
|
|
110
|
+
}
|
|
111
|
+
const { typ } = token.header;
|
|
112
|
+
const allowedTokenTypes = authentication.allowedTokenTypes;
|
|
113
|
+
if (!typ || !allowedTokenTypes.includes(typ)) {
|
|
114
|
+
return { ok: false, reason: 'not-an-access-token' };
|
|
115
|
+
}
|
|
116
|
+
const payload = typeof token.payload === 'object' && token.payload !== null ? token.payload : {};
|
|
117
|
+
const { exp, iat } = payload;
|
|
118
|
+
if (typeof exp !== 'number' || typeof iat !== 'number')
|
|
119
|
+
return { ok: false, reason: 'expired' };
|
|
120
|
+
const max = authentication.maxTokenLifetimeSeconds;
|
|
121
|
+
if (exp - iat > max)
|
|
122
|
+
return {
|
|
123
|
+
ok: false,
|
|
124
|
+
reason: 'expired',
|
|
125
|
+
detail: `lifetime ${exp - iat}s exceeds the source maximum of ${max}s`,
|
|
126
|
+
};
|
|
127
|
+
if (iat > Math.floor(Date.now() / 1000) + authentication.clockSkewSeconds) {
|
|
128
|
+
return { ok: false, reason: 'expired', detail: 'Token is not yet valid' };
|
|
129
|
+
}
|
|
130
|
+
const tokenAudiences = normalizeAudiences(payload.aud);
|
|
131
|
+
if (!tokenAudiences.some((aud) => allowedAudiences.includes(aud))) {
|
|
132
|
+
return {
|
|
133
|
+
ok: false,
|
|
134
|
+
reason: 'audience-mismatch',
|
|
135
|
+
detail: 'JWT audience is not allowed',
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const { credential, request: { headers: _headers, ...request }, ...rest } = extracted;
|
|
139
|
+
return {
|
|
140
|
+
ok: true,
|
|
141
|
+
value: {
|
|
142
|
+
...rest,
|
|
143
|
+
request,
|
|
144
|
+
credentialKind: credential.kind,
|
|
145
|
+
source,
|
|
146
|
+
claims: payload,
|
|
147
|
+
expiresAt: new Date(exp * 1000),
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
advertise(resource, sources) {
|
|
152
|
+
try {
|
|
153
|
+
const url = new URL(resource.resource.url);
|
|
154
|
+
const path = url.pathname === '/' ? '' : url.pathname;
|
|
155
|
+
return {
|
|
156
|
+
authorizationServers: sources.filter((s) => s.type === 'oauth2').map((s) => s.issuer),
|
|
157
|
+
challenge: `Bearer resource_metadata="${url.origin}/.well-known/oauth-protected-resource${path}"`,
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
catch (error) {
|
|
161
|
+
this.logger.warn('Failed to advertise resource', { error });
|
|
162
|
+
return {};
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
exports.Oauth2BearerDriver = Oauth2BearerDriver;
|
|
167
|
+
exports.Oauth2BearerDriver = Oauth2BearerDriver = __decorate([
|
|
168
|
+
(0, di_1.Service)(),
|
|
169
|
+
__metadata("design:paramtypes", [inbound_auth_1.TrustedSourceStore, backend_common_1.Logger])
|
|
170
|
+
], Oauth2BearerDriver);
|
|
171
|
+
//# sourceMappingURL=oauth2-bearer.driver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth2-bearer.driver.js","sourceRoot":"","sources":["../../../src/modules/inbound-auth-core/oauth2-bearer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