n8n 2.33.3 → 2.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-executions.d.ts +2 -2
- package/dist/active-executions.js +18 -13
- package/dist/active-executions.js.map +1 -1
- package/dist/agent-library-bundle.js +158 -137
- package/dist/auth/auth.service.d.ts +1 -0
- package/dist/auth/auth.service.js +8 -1
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-execution-manager.js +8 -5
- package/dist/chat/chat-execution-manager.js.map +1 -1
- package/dist/commands/base-command.js +3 -2
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/import/workflow.js +1 -1
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.d.ts +0 -1
- package/dist/commands/start.js +4 -32
- package/dist/commands/start.js.map +1 -1
- package/dist/constants/oauth2-triggers.d.ts +2 -0
- package/dist/constants/oauth2-triggers.js +11 -0
- package/dist/constants/oauth2-triggers.js.map +1 -0
- package/dist/controllers/api-keys.controller.js +0 -3
- package/dist/controllers/api-keys.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +7 -0
- package/dist/controllers/e2e.controller.js +12 -1
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/crash-journal.js +2 -2
- package/dist/crash-journal.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +2 -0
- package/dist/credentials/credentials.controller.js +23 -4
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +5 -1
- package/dist/credentials/credentials.service.js +45 -8
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +39 -1
- package/dist/credentials-helper.js.map +1 -1
- package/dist/credentials-overwrites.d.ts +2 -1
- package/dist/credentials-overwrites.js +4 -5
- package/dist/credentials-overwrites.js.map +1 -1
- package/dist/environments.ee/variables/variables.service.ee.d.ts +4 -0
- package/dist/environments.ee/variables/variables.service.ee.js +10 -6
- package/dist/environments.ee/variables/variables.service.ee.js.map +1 -1
- package/dist/errors/http-error-serializers.js +10 -1
- package/dist/errors/http-error-serializers.js.map +1 -1
- package/dist/errors/response-errors/workflow-publish-blocked.error.d.ts +6 -0
- package/dist/errors/response-errors/workflow-publish-blocked.error.js +19 -0
- package/dist/errors/response-errors/workflow-publish-blocked.error.js.map +1 -0
- package/dist/errors/webhook-response-too-large.error.d.ts +7 -0
- package/dist/errors/webhook-response-too-large.error.js +11 -0
- package/dist/errors/webhook-response-too-large.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +33 -0
- package/dist/eventbus/event-message-classes/event-message-mcp.js +29 -0
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +6 -3
- package/dist/eventbus/event-message-classes/index.js +7 -1
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/eventbus/message-event-bus/message-event-bus.d.ts +2 -0
- package/dist/eventbus/message-event-bus/message-event-bus.js +4 -0
- package/dist/eventbus/message-event-bus/message-event-bus.js.map +1 -1
- package/dist/eventbus/message-event-bus-writer/message-event-bus-log-writer.js +3 -0
- package/dist/eventbus/message-event-bus-writer/message-event-bus-log-writer.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +18 -1
- package/dist/events/maps/workflow-publication-metrics.event-map.d.ts +5 -0
- package/dist/events/relays/log-streaming.event-relay.d.ts +3 -0
- package/dist/events/relays/log-streaming.event-relay.js +33 -0
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.js +10 -0
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +46 -18
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/enqueued-execution-recovery.service.d.ts +21 -0
- package/dist/executions/enqueued-execution-recovery.service.js +79 -0
- package/dist/executions/enqueued-execution-recovery.service.js.map +1 -0
- package/dist/executions/execution-data/execution-data-json-store.d.ts +3 -6
- package/dist/executions/execution-data/execution-data-json-store.js +2 -15
- package/dist/executions/execution-data/execution-data-json-store.js.map +1 -1
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution-recovery.service.js +23 -12
- package/dist/executions/execution-recovery.service.js.map +1 -1
- package/dist/external-hooks.d.ts +3 -2
- package/dist/external-hooks.js.map +1 -1
- package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js +4 -0
- package/dist/instance-settings-loader/loaders/sso/oidc.instance-settings-loader.js.map +1 -1
- package/dist/interfaces.d.ts +6 -0
- package/dist/metrics/prometheus/scheduler-metrics.service.d.ts +7 -2
- package/dist/metrics/prometheus/scheduler-metrics.service.js +29 -1
- package/dist/metrics/prometheus/scheduler-metrics.service.js.map +1 -1
- package/dist/metrics/prometheus/workflow-publication-metrics.service.d.ts +1 -0
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js +22 -1
- package/dist/metrics/prometheus/workflow-publication-metrics.service.js.map +1 -1
- package/dist/modules/agent-evals/agent-eval-case-generation.service.d.ts +25 -0
- package/dist/modules/agent-evals/agent-eval-case-generation.service.js +192 -0
- package/dist/modules/agent-evals/agent-eval-case-generation.service.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval-rating.service.d.ts +23 -0
- package/dist/modules/agent-evals/agent-eval-rating.service.js +124 -0
- package/dist/modules/agent-evals/agent-eval-rating.service.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.d.ts +5 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js +68 -0
- package/dist/modules/agent-evals/agent-eval-record-mappers.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval-runner.service.d.ts +42 -0
- package/dist/modules/agent-evals/agent-eval-runner.service.js +409 -0
- package/dist/modules/agent-evals/agent-eval-runner.service.js.map +1 -0
- package/dist/modules/agent-evals/agent-eval.service.d.ts +31 -0
- package/dist/modules/agent-evals/agent-eval.service.js +138 -0
- package/dist/modules/agent-evals/agent-eval.service.js.map +1 -0
- package/dist/modules/agent-evals/agent-evals-flag-gate.d.ts +8 -0
- package/dist/{services/trigger-auth-identity-seeder-proxy.service.js → modules/agent-evals/agent-evals-flag-gate.js} +18 -16
- package/dist/modules/agent-evals/agent-evals-flag-gate.js.map +1 -0
- package/dist/modules/agent-evals/agent-evals-required-modules.d.ts +2 -0
- package/dist/modules/agent-evals/agent-evals-required-modules.js +12 -0
- package/dist/modules/agent-evals/agent-evals-required-modules.js.map +1 -0
- package/dist/modules/agent-evals/agent-evals.controller.d.ts +33 -0
- package/dist/modules/agent-evals/agent-evals.controller.js +172 -0
- package/dist/modules/agent-evals/agent-evals.controller.js.map +1 -0
- package/dist/modules/agent-evals/agent-evals.module.d.ts +4 -0
- package/dist/modules/agent-evals/agent-evals.module.js +24 -0
- package/dist/modules/agent-evals/agent-evals.module.js.map +1 -0
- package/dist/modules/agent-evals/case-generation/case-generation-prompt.d.ts +37 -0
- package/dist/modules/agent-evals/case-generation/case-generation-prompt.js +87 -0
- package/dist/modules/agent-evals/case-generation/case-generation-prompt.js.map +1 -0
- package/dist/modules/agent-evals/case-generation/dimensions.d.ts +11 -0
- package/dist/modules/agent-evals/case-generation/dimensions.js +54 -0
- package/dist/modules/agent-evals/case-generation/dimensions.js.map +1 -0
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +3 -1
- package/dist/modules/agents/adapters/agents-credential-provider.js +15 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
- package/dist/modules/agents/agent-chat-attachment.service.d.ts +46 -0
- package/dist/modules/agents/agent-chat-attachment.service.js +144 -0
- package/dist/modules/agents/agent-chat-attachment.service.js.map +1 -0
- package/dist/modules/agents/agent-chat.controller.d.ts +15 -1
- package/dist/modules/agents/agent-chat.controller.js +177 -34
- package/dist/modules/agents/agent-chat.controller.js.map +1 -1
- package/dist/modules/agents/agent-config.service.d.ts +10 -3
- package/dist/modules/agents/agent-config.service.js +44 -5
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-custom-tools.service.d.ts +7 -3
- package/dist/modules/agents/agent-custom-tools.service.js +44 -7
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +14 -2
- package/dist/modules/agents/agent-execution-orchestrator.service.js +85 -9
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +4 -1
- package/dist/modules/agents/agent-execution.service.js +7 -2
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-persistence.service.d.ts +14 -7
- package/dist/modules/agents/agent-integration-persistence.service.js +35 -7
- package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +1 -9
- package/dist/modules/agents/agent-integrations.controller.js +12 -16
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-file-store.d.ts +24 -0
- package/dist/modules/agents/agent-knowledge-file-store.js +100 -0
- package/dist/modules/agents/agent-knowledge-file-store.js.map +1 -0
- package/dist/modules/agents/agent-knowledge-retrieval.d.ts +3 -1
- package/dist/modules/agents/agent-knowledge-retrieval.js +1 -1
- package/dist/modules/agents/agent-knowledge-retrieval.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-sandbox.service.d.ts +4 -3
- package/dist/modules/agents/agent-knowledge-sandbox.service.js +17 -8
- package/dist/modules/agents/agent-knowledge-sandbox.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-storage.d.ts +0 -1
- package/dist/modules/agents/agent-knowledge-storage.js +0 -10
- package/dist/modules/agents/agent-knowledge-storage.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.service.d.ts +3 -4
- package/dist/modules/agents/agent-knowledge.service.js +25 -27
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -1
- package/dist/modules/agents/agent-mcp-access.controller.d.ts +14 -0
- package/dist/modules/agents/agent-mcp-access.controller.js +49 -0
- package/dist/modules/agents/agent-mcp-access.controller.js.map +1 -0
- package/dist/modules/agents/agent-mcp-access.service.d.ts +22 -0
- package/dist/modules/agents/agent-mcp-access.service.js +83 -0
- package/dist/modules/agents/agent-mcp-access.service.js.map +1 -0
- package/dist/modules/agents/agent-message-mapper.js +9 -0
- package/dist/modules/agents/agent-message-mapper.js.map +1 -1
- package/dist/modules/agents/agent-model-catalog.service.d.ts +1 -1
- package/dist/modules/agents/agent-model-catalog.service.js +22 -7
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-modification-telemetry.service.d.ts +25 -0
- package/dist/modules/agents/agent-modification-telemetry.service.js +119 -0
- package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -0
- package/dist/modules/agents/agent-publish.controller.js +4 -4
- package/dist/modules/agents/agent-publish.controller.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +23 -9
- package/dist/modules/agents/agent-publish.service.js +146 -33
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +6 -2
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +16 -6
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-setup-completion.service.d.ts +19 -0
- package/dist/modules/agents/agent-setup-completion.service.js +79 -0
- package/dist/modules/agents/agent-setup-completion.service.js.map +1 -0
- package/dist/modules/agents/agent-skills.service.d.ts +8 -6
- package/dist/modules/agents/agent-skills.service.js +55 -12
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-sse-stream.js +35 -0
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +7 -5
- package/dist/modules/agents/agent-task.service.js +56 -21
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-tasks.controller.js +18 -6
- package/dist/modules/agents/agent-tasks.controller.js.map +1 -1
- package/dist/modules/agents/agent-test-chat.service.d.ts +3 -1
- package/dist/modules/agents/agent-test-chat.service.js +7 -3
- package/dist/modules/agents/agent-test-chat.service.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +5 -2
- package/dist/modules/agents/agent-validation.service.js +22 -4
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +13 -7
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +1 -5
- package/dist/modules/agents/agents-config.controller.js +7 -2
- package/dist/modules/agents/agents-config.controller.js.map +1 -1
- package/dist/modules/agents/agents-skills.controller.js +12 -3
- package/dist/modules/agents/agents-skills.controller.js.map +1 -1
- package/dist/modules/agents/agents-tools.service.js +1 -5
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.js +3 -1
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +1 -1
- package/dist/modules/agents/agents.module.js +10 -11
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +12 -4
- package/dist/modules/agents/agents.service.js +52 -4
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +2 -2
- package/dist/modules/agents/builder/agents-builder-prompts.js +13 -11
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +3 -6
- package/dist/modules/agents/builder/agents-builder-tools.service.js +37 -84
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -7
- package/dist/modules/agents/builder/agents-builder.service.js +27 -34
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-config-telemetry.d.ts +1 -10
- package/dist/modules/agents/builder/builder-config-telemetry.js +0 -64
- package/dist/modules/agents/builder/builder-config-telemetry.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +5 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +23 -2
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/format-preview-context.js +3 -0
- package/dist/modules/agents/builder/format-preview-context.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js +6 -5
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +0 -5
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +28 -45
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +88 -8
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +1 -1
- package/dist/modules/agents/builder/prompts/initial-build.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/initial-build.prompt.js +8 -15
- package/dist/modules/agents/builder/prompts/initial-build.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +2 -2
- package/dist/modules/agents/builder/skills/external-services.skill.js +10 -11
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-chat-attachment.entity.d.ts +16 -0
- package/dist/modules/agents/entities/agent-chat-attachment.entity.js +70 -0
- package/dist/modules/agents/entities/agent-chat-attachment.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +6 -0
- package/dist/modules/agents/entities/agent-execution.entity.js +4 -0
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-file.entity.d.ts +3 -2
- package/dist/modules/agents/entities/agent-file.entity.js +6 -3
- package/dist/modules/agents/entities/agent-file.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +2 -0
- package/dist/modules/agents/entities/agent.entity.js +8 -0
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/execution-log/agent-execution-log-store.d.ts +3 -6
- package/dist/modules/agents/execution-log/agent-execution-log-store.js +2 -15
- package/dist/modules/agents/execution-log/agent-execution-log-store.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +11 -0
- package/dist/modules/agents/execution-recorder.js +69 -0
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +6 -2
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +8 -2
- package/dist/modules/agents/integrations/agent-chat-bridge.js +114 -16
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +4 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +40 -7
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +16 -1
- 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-message-context.d.ts +2 -1
- package/dist/modules/agents/integrations/agent-chat-message-context.js +1 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +2 -0
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +27 -12
- package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.d.ts +7 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js +1 -0
- package/dist/modules/agents/integrations/agent-chat-suspension-cards.js.map +1 -1
- package/dist/modules/agents/integrations/callback-store.d.ts +4 -1
- package/dist/modules/agents/integrations/callback-store.js +11 -3
- package/dist/modules/agents/integrations/callback-store.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +10 -4
- package/dist/modules/agents/integrations/chat-integration.service.js +108 -35
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +2 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +52 -1
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-context-query-executor.js +2 -1
- package/dist/modules/agents/integrations/integration-context-query-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-error-codes.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.js +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-definitions.js +20 -0
- package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-descriptions.js +6 -0
- package/dist/modules/agents/integrations/integration-tool-descriptions.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +5 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.d.ts +7 -7
- package/dist/modules/agents/integrations/integration-tool-factory.js +1 -1
- package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-schema.d.ts +11 -8
- package/dist/modules/agents/integrations/integration-tool-schema.js +7 -7
- package/dist/modules/agents/integrations/integration-tool-schema.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +3 -1
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +8 -6
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +39 -14
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.js +2 -1
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.d.ts +6 -1
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js +36 -24
- package/dist/modules/agents/integrations/platforms/slack-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +6 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js +3 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.d.ts +15 -2
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js +9 -0
- package/dist/modules/agents/integrations/platforms/slack-tool-definitions.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +4 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +22 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +1 -3
- package/dist/modules/agents/integrations/slack-app-setup.service.js +9 -10
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.js +4 -3
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +4 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js +12 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
- package/dist/modules/agents/json-config/model-config.d.ts +5 -2
- package/dist/modules/agents/json-config/model-config.js +15 -1
- package/dist/modules/agents/json-config/model-config.js.map +1 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +22 -3
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
- package/dist/modules/agents/register-blob-byte-stores.d.ts +8 -0
- package/dist/modules/agents/register-blob-byte-stores.js +21 -0
- package/dist/modules/agents/register-blob-byte-stores.js.map +1 -0
- package/dist/modules/agents/repositories/agent-chat-attachment.repository.d.ts +19 -0
- package/dist/modules/agents/repositories/agent-chat-attachment.repository.js +38 -0
- package/dist/modules/agents/repositories/agent-chat-attachment.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-checkpoint.repository.d.ts +6 -1
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js +22 -3
- package/dist/modules/agents/repositories/agent-checkpoint.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +23 -1
- package/dist/modules/agents/repositories/agent.repository.js +85 -5
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +60 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +12 -3
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +124 -60
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js +30 -1
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-capabilities.d.ts +14 -0
- package/dist/modules/agents/utils/agent-capabilities.js +35 -0
- package/dist/modules/agents/utils/agent-capabilities.js.map +1 -0
- package/dist/modules/agents/utils/agent-config-hash.d.ts +2 -0
- package/dist/modules/agents/utils/agent-config-hash.js +23 -0
- package/dist/modules/agents/utils/agent-config-hash.js.map +1 -0
- package/dist/modules/agents/utils/agent-execution-counter.d.ts +3 -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/execution-to-message-mapper.d.ts +1 -1
- package/dist/modules/agents/utils/execution-to-message-mapper.js +33 -16
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/agents/utils/inbound-attachments.d.ts +4 -0
- package/dist/modules/agents/utils/inbound-attachments.js +50 -0
- package/dist/modules/agents/utils/inbound-attachments.js.map +1 -0
- package/dist/modules/agents/utils/messages-envelope.js +5 -1
- package/dist/modules/agents/utils/messages-envelope.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.controller.d.ts +5 -2
- package/dist/modules/breaking-changes/breaking-changes.controller.js +16 -2
- package/dist/modules/breaking-changes/breaking-changes.controller.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.d.ts +10 -0
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.js +42 -0
- package/dist/modules/breaking-changes/breaking-changes.migration-registry.service.js.map +1 -0
- package/dist/modules/breaking-changes/breaking-changes.migration.service.d.ts +31 -0
- package/dist/modules/breaking-changes/breaking-changes.migration.service.js +120 -0
- package/dist/modules/breaking-changes/breaking-changes.migration.service.js.map +1 -0
- package/dist/modules/breaking-changes/breaking-changes.module.js +2 -0
- package/dist/modules/breaking-changes/breaking-changes.module.js.map +1 -1
- package/dist/modules/breaking-changes/breaking-changes.service.d.ts +3 -2
- package/dist/modules/breaking-changes/breaking-changes.service.js +9 -13
- package/dist/modules/breaking-changes/breaking-changes.service.js.map +1 -1
- package/dist/modules/breaking-changes/group-nodes-by-type.d.ts +2 -0
- package/dist/modules/breaking-changes/group-nodes-by-type.js +15 -0
- package/dist/modules/breaking-changes/group-nodes-by-type.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/ai-transform-to-code.migration.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/ai-transform-to-code.migration.js +24 -0
- package/dist/modules/breaking-changes/migrations/ai-transform-to-code.migration.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/index.d.ts +2 -0
- package/dist/modules/breaking-changes/migrations/index.js +6 -0
- package/dist/modules/breaking-changes/migrations/index.js.map +1 -0
- package/dist/modules/breaking-changes/migrations/node-migration.d.ts +10 -0
- package/dist/modules/breaking-changes/migrations/node-migration.js +3 -0
- package/dist/modules/breaking-changes/migrations/node-migration.js.map +1 -0
- package/dist/modules/breaking-changes/rules/index.d.ts +2 -0
- package/dist/modules/breaking-changes/rules/index.js +2 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.d.ts +11 -0
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.js +53 -0
- package/dist/modules/breaking-changes/rules/v3/ai-transform-deprecated.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.js +62 -0
- package/dist/modules/breaking-changes/rules/v3/execute-workflow-source-modes.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-execution.service.js +2 -1
- package/dist/modules/chat-hub/chat-hub-execution.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +0 -3
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.d.ts +4 -2
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js +7 -4
- package/dist/modules/dynamic-credentials.ee/services/credential-check-proxy.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.d.ts +2 -4
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js +27 -20
- package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js.map +1 -1
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.d.ts +24 -6
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js +184 -43
- package/dist/modules/external-secrets.ee/external-secrets-provider-connection-manager.ee.js.map +1 -1
- package/dist/modules/insights/insights-collection.service.js +3 -0
- package/dist/modules/insights/insights-collection.service.js.map +1 -1
- package/dist/modules/insights/insights-compaction.service.js +2 -2
- package/dist/modules/insights/insights-compaction.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.d.ts +1 -1
- package/dist/modules/instance-ai/eval/agent-execution.service.js +16 -7
- package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +6 -1
- package/dist/modules/instance-ai/eval/execution.service.js +45 -3
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/ledger-snapshot.d.ts +1 -0
- package/dist/modules/instance-ai/eval/ledger-snapshot.js +11 -0
- package/dist/modules/instance-ai/eval/ledger-snapshot.js.map +1 -0
- package/dist/modules/instance-ai/eval/llm-wire-server.js +26 -2
- package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.d.ts +3 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +60 -2
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.js +5 -4
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js +11 -2
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js.map +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.d.ts +2 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js +28 -12
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
- package/dist/modules/instance-ai/eval/provider-shapes.js +101 -8
- package/dist/modules/instance-ai/eval/provider-shapes.js.map +1 -1
- package/dist/modules/instance-ai/eval/thread-credential-allowlist.service.d.ts +3 -1
- package/dist/modules/instance-ai/eval/thread-credential-allowlist.service.js +8 -1
- package/dist/modules/instance-ai/eval/thread-credential-allowlist.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +2 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js +9 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js +3 -1
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-credit.service.js +2 -1
- package/dist/modules/instance-ai/instance-ai-credit.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.d.ts +9 -2
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.js +25 -11
- package/dist/modules/instance-ai/instance-ai-error-reporter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +33 -21
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.js +160 -38
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/node-definition-resolver.js +1 -5
- package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +2 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +20 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +5 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +1 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +3 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -1
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +2 -0
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +7 -2
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
- package/dist/modules/ldap.ee/helpers.ee.d.ts +2 -1
- package/dist/modules/ldap.ee/helpers.ee.js +11 -2
- package/dist/modules/ldap.ee/helpers.ee.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.errors.d.ts +5 -0
- package/dist/modules/ldap.ee/ldap.errors.js +11 -0
- package/dist/modules/ldap.ee/ldap.errors.js.map +1 -0
- package/dist/modules/ldap.ee/ldap.service.ee.d.ts +2 -2
- package/dist/modules/ldap.ee/ldap.service.ee.js +29 -7
- package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.d.ts +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js +10 -2
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +4 -2
- package/dist/modules/mcp/mcp-protected-resource.js +17 -5
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp-scopes.d.ts +1 -0
- package/dist/modules/mcp/mcp-scopes.js +35 -7
- package/dist/modules/mcp/mcp-scopes.js.map +1 -1
- package/dist/modules/mcp/mcp-tool-availability.d.ts +3 -0
- package/dist/modules/mcp/mcp-tool-availability.js +7 -0
- package/dist/modules/mcp/mcp-tool-availability.js.map +1 -0
- package/dist/modules/mcp/mcp.constants.d.ts +1 -0
- package/dist/modules/mcp/mcp.constants.js +2 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.d.ts +1 -1
- package/dist/modules/mcp/mcp.controller.js +10 -18
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +6 -2
- package/dist/modules/mcp/mcp.service.js +72 -4
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.settings.controller.d.ts +4 -2
- package/dist/modules/mcp/mcp.settings.controller.js +6 -3
- package/dist/modules/mcp/mcp.settings.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +2 -1
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +9 -0
- package/dist/modules/mcp/tools/agents/agent-reference.js +169 -0
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -0
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +87 -0
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +1157 -0
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -0
- package/dist/modules/mcp/tools/get-execution.tool.js +4 -4
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/get-workflow-details.tool.js +7 -4
- package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
- package/dist/modules/mcp/tools/get-workflow-version.tool.js +1 -1
- package/dist/modules/mcp/tools/get-workflow-version.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js +1 -1
- package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
- package/dist/modules/mcp/tools/list-tags.tool.js +3 -3
- package/dist/modules/mcp/tools/list-tags.tool.js.map +1 -1
- package/dist/modules/mcp/tools/prepare-workflow-pin-data.tool.js +3 -3
- package/dist/modules/mcp/tools/prepare-workflow-pin-data.tool.js.map +1 -1
- package/dist/modules/mcp/tools/publish-workflow.tool.js +14 -2
- package/dist/modules/mcp/tools/publish-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +381 -0
- package/dist/modules/mcp/tools/schemas.js +25 -1
- package/dist/modules/mcp/tools/schemas.js.map +1 -1
- package/dist/modules/mcp/tools/search-executions.tool.js +3 -3
- package/dist/modules/mcp/tools/search-executions.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.js +1 -1
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/test-workflow.tool.js +2 -2
- package/dist/modules/mcp/tools/test-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/webhook-utils.d.ts +1 -1
- package/dist/modules/mcp/tools/webhook-utils.js +5 -1
- package/dist/modules/mcp/tools/webhook-utils.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +12 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js +55 -29
- package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-sdk-reference.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +27 -3
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.d.ts +10 -1
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +14 -4
- package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +119 -15
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +15 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +46 -18
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js +8 -6
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +3 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +3 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-gates.d.ts +11 -0
- package/dist/modules/n8n-packages/engine/import-gates.js +34 -0
- package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +17 -8
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +42 -24
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +16 -4
- package/dist/modules/n8n-packages/engine/import-result.js +56 -20
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +4 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js +25 -5
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +4 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/package-layout.d.ts +1 -0
- package/dist/modules/n8n-packages/engine/package-layout.js +9 -0
- package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +3 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.js +68 -25
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +3 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +54 -16
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/project/project-importer.js +9 -1
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +2 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project.serializer.js +3 -0
- package/dist/modules/n8n-packages/entities/project/project.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/reference.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/reference.js +3 -0
- package/dist/modules/n8n-packages/entities/reference.js.map +1 -0
- package/dist/modules/n8n-packages/entities/requirements.types.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js +1 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.d.ts +24 -0
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js +69 -0
- package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js.map +1 -0
- package/dist/modules/n8n-packages/entities/tag/tag-importer.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js +142 -0
- package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/tag/tag-requirements.extractor.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/tag/tag-requirements.extractor.js +23 -0
- package/dist/modules/n8n-packages/entities/tag/tag-requirements.extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.d.ts +15 -0
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +45 -0
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.d.ts +48 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js +10 -0
- package/dist/modules/n8n-packages/entities/tag/tag.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-importer.d.ts +8 -2
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js +82 -6
- package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.d.ts +1 -0
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js +9 -4
- package/dist/modules/n8n-packages/entities/variable/variable-missing-mode.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +31 -1
- package/dist/modules/n8n-packages/entities/variable/variable.types.js +36 -0
- 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 +1 -0
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js +4 -3
- 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 +4 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +10 -6
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/references/caller-ids.reference.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/references/caller-ids.reference.js +20 -0
- package/dist/modules/n8n-packages/entities/workflow/references/caller-ids.reference.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/references/error-workflow.reference.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/references/error-workflow.reference.js +25 -0
- package/dist/modules/n8n-packages/entities/workflow/references/error-workflow.reference.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/references/extract-workflow-requirements.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/references/extract-workflow-requirements.js +16 -0
- package/dist/modules/n8n-packages/entities/workflow/references/extract-workflow-requirements.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.js +55 -0
- package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/references/workflow-references.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/references/workflow-references.js +12 -0
- package/dist/modules/n8n-packages/entities/workflow/references/workflow-references.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.js +45 -0
- package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.d.ts +2 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.js +7 -5
- package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-import.types.d.ts +14 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.d.ts +5 -6
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +25 -19
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.d.ts +11 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js +17 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow-publisher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.d.ts +7 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.js +28 -7
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +4 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +11 -5
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +3 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +6 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.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 +32 -9
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +49 -4
- package/dist/modules/n8n-packages/n8n-packages.types.js +15 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +95 -11
- package/dist/modules/n8n-packages/spec/manifest.schema.js +2 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +52 -7
- package/dist/modules/n8n-packages/spec/requirements.schema.js +10 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/project.schema.d.ts +18 -0
- package/dist/modules/n8n-packages/spec/serialized/project.schema.js +5 -0
- package/dist/modules/n8n-packages/spec/serialized/project.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/tag.schema.d.ts +12 -0
- package/dist/modules/n8n-packages/spec/serialized/tag.schema.js +11 -0
- package/dist/modules/n8n-packages/spec/serialized/tag.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +3 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-server/database/entities/oauth-client.entity.d.ts +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-client.entity.js +4 -0
- package/dist/modules/oauth-server/database/entities/oauth-client.entity.js.map +1 -1
- package/dist/modules/oauth-server/database/repositories/oauth-user-consent.repository.d.ts +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-user-consent.repository.js +13 -1
- package/dist/modules/oauth-server/database/repositories/oauth-user-consent.repository.js.map +1 -1
- package/dist/modules/oauth-server/oauth-flow.service.d.ts +17 -0
- package/dist/modules/oauth-server/oauth-flow.service.js +100 -0
- package/dist/modules/oauth-server/oauth-flow.service.js.map +1 -0
- package/dist/modules/oauth-server/oauth-server.module.js +5 -5
- package/dist/modules/oauth-server/oauth-server.module.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.d.ts +8 -2
- package/dist/modules/oauth-server/oauth-server.service.js +64 -11
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth.controller.js +3 -1
- package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.d.ts +38 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js +95 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.d.ts +37 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js +88 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.d.ts +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js +20 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +5 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +16 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.d.ts +19 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js +107 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.d.ts +21 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js +109 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +0 -1
- package/dist/modules/otel/otel-lifecycle-handler.js +1 -4
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +4 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +102 -20
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.d.ts +3 -1
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.js +13 -5
- package/dist/modules/provisioning.ee/role-deletion-checker.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +7 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +33 -7
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +8 -0
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +4 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js +5 -2
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/import-result.d.ts +2 -0
- package/dist/modules/sso-oidc/constants.d.ts +2 -0
- package/dist/modules/sso-oidc/constants.js +3 -1
- package/dist/modules/sso-oidc/constants.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +4 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +54 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.d.ts +9 -2
- package/dist/modules/sso-oidc/oidc.service.ee.js +44 -15
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml-helpers.js +2 -3
- package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js +2 -3
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.d.ts +10 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js +54 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +31 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +219 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.d.ts +9 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js +40 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-publish-guard.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +19 -18
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +163 -155
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +6 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +29 -4
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.d.ts +3 -0
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js +12 -0
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +4 -0
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +1 -0
- package/dist/node-catalog/node-catalog.service.js +11 -3
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/permissions.ee/project-scope.service.d.ts +9 -0
- package/dist/permissions.ee/project-scope.service.js +34 -0
- package/dist/permissions.ee/project-scope.service.js.map +1 -0
- package/dist/public-api/types.d.ts +11 -1
- package/dist/public-api/v1/handlers/ldap/ldap.handler.d.ts +10 -0
- package/dist/public-api/v1/handlers/ldap/ldap.handler.js +76 -0
- package/dist/public-api/v1/handlers/ldap/ldap.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/ldap/ldap.mapper.d.ts +17 -0
- package/dist/public-api/v1/handlers/ldap/ldap.mapper.js +35 -0
- package/dist/public-api/v1/handlers/ldap/ldap.mapper.js.map +1 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +1 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +4 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/sso-oidc/sso-oidc.handler.d.ts +8 -0
- package/dist/public-api/v1/handlers/sso-oidc/sso-oidc.handler.js +38 -0
- package/dist/public-api/v1/handlers/sso-oidc/sso-oidc.handler.js.map +1 -0
- package/dist/public-api/v1/handlers/sso-oidc/sso-oidc.mapper.d.ts +5 -0
- package/dist/public-api/v1/handlers/sso-oidc/sso-oidc.mapper.js +12 -0
- package/dist/public-api/v1/handlers/sso-oidc/sso-oidc.mapper.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +789 -9
- package/dist/push/index.js +1 -1
- package/dist/push/index.js.map +1 -1
- package/dist/push/origin-validator.d.ts +2 -1
- package/dist/push/origin-validator.js +15 -2
- package/dist/push/origin-validator.js.map +1 -1
- package/dist/push/sse.push.js +2 -0
- package/dist/push/sse.push.js.map +1 -1
- package/dist/scaling/job-processor.d.ts +3 -2
- package/dist/scaling/job-processor.js +17 -14
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/scaling.service.d.ts +3 -2
- package/dist/scaling/scaling.service.js +19 -16
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/scaling/webhook-response-relay.d.ts +34 -0
- package/dist/scaling/webhook-response-relay.js +323 -0
- package/dist/scaling/webhook-response-relay.js.map +1 -0
- package/dist/scheduling/durable-job-provisioner.d.ts +2 -1
- package/dist/scheduling/durable-job-provisioner.js +21 -3
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.js +22 -0
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +2 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -1
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.js +11 -4
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-job-registrar.js.map +1 -1
- package/dist/services/ai-gateway.service.d.ts +3 -0
- package/dist/services/ai-gateway.service.js +16 -0
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/credentials-tester.service.d.ts +7 -0
- package/dist/services/credentials-tester.service.js +69 -9
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/frontend.service.js +14 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/oauth2-flow-proxy.service.d.ts +11 -0
- package/dist/services/oauth2-flow-proxy.service.js +34 -0
- package/dist/services/oauth2-flow-proxy.service.js.map +1 -0
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/project.service.ee.d.ts +5 -0
- package/dist/services/project.service.ee.js +15 -1
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/protected-resource.registry.d.ts +2 -1
- package/dist/services/protected-resource.registry.js +7 -2
- package/dist/services/protected-resource.registry.js.map +1 -1
- package/dist/services/pruning/workflow-history-compaction.service.js +3 -2
- package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
- package/dist/services/tag.service.d.ts +2 -1
- package/dist/services/tag.service.js +14 -31
- package/dist/services/tag.service.js.map +1 -1
- package/dist/sso.ee/sso-helpers.d.ts +1 -0
- package/dist/sso.ee/sso-helpers.js +8 -0
- package/dist/sso.ee/sso-helpers.js.map +1 -1
- package/dist/task-runners/errors/task-request-timeout.error.d.ts +2 -2
- package/dist/task-runners/errors/task-request-timeout.error.js +3 -3
- package/dist/task-runners/errors/task-request-timeout.error.js.map +1 -1
- package/dist/task-runners/task-broker/errors/task-requester-accept-timeout.error.d.ts +4 -0
- package/dist/task-runners/task-broker/errors/task-requester-accept-timeout.error.js +11 -0
- package/dist/task-runners/task-broker/errors/task-requester-accept-timeout.error.js.map +1 -0
- package/dist/task-runners/task-broker/errors/task-runner-unreachable.error.d.ts +4 -0
- package/dist/task-runners/task-broker/errors/task-runner-unreachable.error.js +11 -0
- package/dist/task-runners/task-broker/errors/task-runner-unreachable.error.js.map +1 -0
- package/dist/task-runners/task-broker/task-broker-ws-server.d.ts +9 -1
- package/dist/task-runners/task-broker/task-broker-ws-server.js +61 -32
- package/dist/task-runners/task-broker/task-broker-ws-server.js.map +1 -1
- package/dist/task-runners/task-broker/task-broker.service.d.ts +18 -1
- package/dist/task-runners/task-broker/task-broker.service.js +134 -63
- package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
- package/dist/task-runners/task-managers/task-requester.d.ts +1 -0
- package/dist/task-runners/task-managers/task-requester.js +4 -1
- package/dist/task-runners/task-managers/task-requester.js.map +1 -1
- package/dist/task-runners/task-runner-module.js +2 -2
- package/dist/task-runners/task-runner-module.js.map +1 -1
- package/dist/telemetry/index.d.ts +3 -1
- package/dist/telemetry/index.js +15 -8
- package/dist/telemetry/index.js.map +1 -1
- package/dist/utils/ai-service-retry.js +2 -4
- package/dist/utils/ai-service-retry.js.map +1 -1
- package/dist/wait-tracker.js +6 -2
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +1 -0
- package/dist/webhooks/test-webhooks.js +14 -9
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +69 -16
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook.service.d.ts +4 -0
- package/dist/webhooks/webhook.service.js +40 -12
- package/dist/webhooks/webhook.service.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +2 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +4 -1
- package/dist/workflow-helpers.js +22 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.d.ts +2 -1
- package/dist/workflow-runner.js +4 -4
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/published-workflow-trigger-deactivator.d.ts +11 -3
- package/dist/workflows/publication/published-workflow-trigger-deactivator.js +66 -23
- package/dist/workflows/publication/published-workflow-trigger-deactivator.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-lifecycle-lock.d.ts +0 -5
- package/dist/workflows/publication/workflow-publication-lifecycle-lock.js +0 -44
- package/dist/workflows/publication/workflow-publication-lifecycle-lock.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js +3 -0
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-reconciler.service.d.ts +4 -2
- package/dist/workflows/publication/workflow-publication-reconciler.service.js +43 -30
- package/dist/workflows/publication/workflow-publication-reconciler.service.js.map +1 -1
- package/dist/workflows/triggers/trigger-activation-retry.js +2 -1
- package/dist/workflows/triggers/trigger-activation-retry.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.js +8 -1
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-finder.service.js +3 -1
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-publish-guard-proxy.service.d.ts +8 -0
- package/dist/workflows/workflow-publish-guard-proxy.service.js +26 -0
- package/dist/workflows/workflow-publish-guard-proxy.service.js.map +1 -0
- package/dist/workflows/workflow-validation.service.d.ts +1 -0
- package/dist/workflows/workflow-validation.service.js +23 -8
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +7 -3
- package/dist/workflows/workflow.service.ee.d.ts +4 -1
- package/dist/workflows/workflow.service.js +75 -30
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +4 -1
- package/package.json +40 -40
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/index.d.ts +0 -2
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/index.js +0 -19
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/index.js.map +0 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/metadata.d.ts +0 -20
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/metadata.js +0 -12
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/metadata.js.map +0 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-extractor.d.ts +0 -12
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-extractor.js +0 -85
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-extractor.js.map +0 -1
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-seeder.d.ts +0 -10
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-seeder.js +0 -77
- package/dist/modules/dynamic-credentials.ee/context-establishment-hooks/n8n-oauth/n8n-oauth-seeder.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-id.d.ts +0 -2
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-id.js +0 -23
- package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-id.js.map +0 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.d.ts +0 -7
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.js +0 -41
- package/dist/modules/n8n-packages/entities/workflow/workflow-requirements.extractor.js.map +0 -1
- package/dist/services/trigger-auth-identity-seeder-proxy.service.d.ts +0 -10
- package/dist/services/trigger-auth-identity-seeder-proxy.service.js.map +0 -1
- package/dist/workflows/publication/published-workflow-enqueuer.d.ts +0 -13
- package/dist/workflows/publication/published-workflow-enqueuer.js +0 -50
- package/dist/workflows/publication/published-workflow-enqueuer.js.map +0 -1
|
@@ -18,7 +18,9 @@ const di_1 = require("@n8n/di");
|
|
|
18
18
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
19
19
|
const credentials_service_1 = require("../../credentials/credentials.service");
|
|
20
20
|
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
21
|
+
const agent_modification_telemetry_service_1 = require("./agent-modification-telemetry.service");
|
|
21
22
|
const agent_runtime_cache_service_1 = require("./agent-runtime-cache.service");
|
|
23
|
+
const agent_setup_completion_service_1 = require("./agent-setup-completion.service");
|
|
22
24
|
const agent_skills_service_1 = require("./agent-skills.service");
|
|
23
25
|
const integrations_sync_1 = require("./integrations/integrations-sync");
|
|
24
26
|
const agent_config_composition_1 = require("./json-config/agent-config-composition");
|
|
@@ -31,7 +33,7 @@ const agent_draft_utils_1 = require("./utils/agent-draft.utils");
|
|
|
31
33
|
const node_tool_validation_1 = require("./utils/node-tool-validation");
|
|
32
34
|
const sub_agent_resolver_1 = require("./utils/sub-agent-resolver");
|
|
33
35
|
let AgentConfigService = class AgentConfigService {
|
|
34
|
-
constructor(logger, agentRepository, agentTaskRepository, agentSkillsService, runtimeCacheService, credentialsService, workflowRepository) {
|
|
36
|
+
constructor(logger, agentRepository, agentTaskRepository, agentSkillsService, runtimeCacheService, credentialsService, workflowRepository, setupCompletionService, modificationTelemetry) {
|
|
35
37
|
this.logger = logger;
|
|
36
38
|
this.agentRepository = agentRepository;
|
|
37
39
|
this.agentTaskRepository = agentTaskRepository;
|
|
@@ -39,6 +41,8 @@ let AgentConfigService = class AgentConfigService {
|
|
|
39
41
|
this.runtimeCacheService = runtimeCacheService;
|
|
40
42
|
this.credentialsService = credentialsService;
|
|
41
43
|
this.workflowRepository = workflowRepository;
|
|
44
|
+
this.setupCompletionService = setupCompletionService;
|
|
45
|
+
this.modificationTelemetry = modificationTelemetry;
|
|
42
46
|
}
|
|
43
47
|
async getConfig(agentId, projectId) {
|
|
44
48
|
const entity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
@@ -82,11 +86,11 @@ let AgentConfigService = class AgentConfigService {
|
|
|
82
86
|
}
|
|
83
87
|
return { valid: true, config };
|
|
84
88
|
}
|
|
85
|
-
async updateConfig(agentId, projectId, config) {
|
|
89
|
+
async updateConfig(agentId, projectId, config, user, options) {
|
|
86
90
|
const entity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
87
91
|
if (!entity)
|
|
88
92
|
throw new not_found_error_1.NotFoundError('Agent not found');
|
|
89
|
-
const credentialProvider = (0, agent_credential_provider_1.createAgentCredentialProvider)(this.credentialsService, projectId);
|
|
93
|
+
const credentialProvider = (0, agent_credential_provider_1.createAgentCredentialProvider)(this.credentialsService, projectId, user);
|
|
90
94
|
const accessibleCredentialIds = new Set((await credentialProvider.list()).map((credential) => credential.id));
|
|
91
95
|
const sanitizedBaseConfig = (0, api_types_1.sanitizeAgentJsonConfig)(config);
|
|
92
96
|
const sanitizedConfig = (0, sanitize_unknown_agent_credentials_1.sanitizeUnknownAgentCredentials)(sanitizedBaseConfig, accessibleCredentialIds);
|
|
@@ -120,7 +124,9 @@ let AgentConfigService = class AgentConfigService {
|
|
|
120
124
|
const { schemaConfig: decomposedSchema, integrations: decomposedIntegrations } = (0, agent_config_composition_1.decomposeJsonConfig)(validatedConfig);
|
|
121
125
|
const nextIntegrations = integrationsProvided ? decomposedIntegrations : previousIntegrations;
|
|
122
126
|
const nextPersonalisation = personalisationProvided
|
|
123
|
-
?
|
|
127
|
+
? options?.clearOmittedOptionalFields
|
|
128
|
+
? decomposedSchema.personalisation
|
|
129
|
+
: mergePersonalisationWithPreviousGradient(decomposedSchema.personalisation, previousSchema, config)
|
|
124
130
|
: undefined;
|
|
125
131
|
const nextSchema = {
|
|
126
132
|
...omitLegacyAgentDescription(previousSchema),
|
|
@@ -139,6 +145,10 @@ let AgentConfigService = class AgentConfigService {
|
|
|
139
145
|
...(mcpServersProvided ? { mcpServers: decomposedSchema.mcpServers } : {}),
|
|
140
146
|
...(vectorStoresProvided ? { vectorStores: decomposedSchema.vectorStores } : {}),
|
|
141
147
|
};
|
|
148
|
+
if (options?.clearOmittedOptionalFields) {
|
|
149
|
+
clearOmittedOptionalFields(nextSchema, validatedConfig);
|
|
150
|
+
}
|
|
151
|
+
const changedParts = (0, agent_modification_telemetry_service_1.diffAgentConfigParts)(previousSchema, nextSchema, previousIntegrations, nextIntegrations);
|
|
142
152
|
entity.schema = nextSchema;
|
|
143
153
|
entity.name = validatedConfig.name;
|
|
144
154
|
entity.integrations = nextIntegrations;
|
|
@@ -160,8 +170,18 @@ let AgentConfigService = class AgentConfigService {
|
|
|
160
170
|
this.agentSkillsService.removeUnreferencedSkills(entity, validatedConfig);
|
|
161
171
|
}
|
|
162
172
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
173
|
+
const emitSetupCompleted = await this.setupCompletionService.recordIfSetupComplete(entity, projectId, credentialProvider, user);
|
|
163
174
|
const saved = await this.agentRepository.save(entity);
|
|
164
175
|
this.logger.debug('Updated agent JSON config', { agentId, projectId });
|
|
176
|
+
this.modificationTelemetry.record({
|
|
177
|
+
agent: saved,
|
|
178
|
+
projectId,
|
|
179
|
+
user,
|
|
180
|
+
by: options.modifiedBy,
|
|
181
|
+
changedParts,
|
|
182
|
+
wasUnconfigured: (0, agent_modification_telemetry_service_1.isUnconfiguredAgent)(previousSchema, previousIntegrations),
|
|
183
|
+
});
|
|
184
|
+
await emitSetupCompleted?.();
|
|
165
185
|
if (tasksProvided) {
|
|
166
186
|
const referencedTaskIds = new Set((validatedConfig.tasks ?? []).map((ref) => ref.id));
|
|
167
187
|
const orphanTaskIds = existingTaskIds.filter((id) => !referencedTaskIds.has(id));
|
|
@@ -222,7 +242,7 @@ let AgentConfigService = class AgentConfigService {
|
|
|
222
242
|
exports.AgentConfigService = AgentConfigService;
|
|
223
243
|
exports.AgentConfigService = AgentConfigService = __decorate([
|
|
224
244
|
(0, di_1.Service)(),
|
|
225
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, agent_repository_1.AgentRepository, agent_task_repository_1.AgentTaskRepository, agent_skills_service_1.AgentSkillsService, agent_runtime_cache_service_1.AgentRuntimeCacheService, credentials_service_1.CredentialsService, db_1.WorkflowRepository])
|
|
245
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, agent_repository_1.AgentRepository, agent_task_repository_1.AgentTaskRepository, agent_skills_service_1.AgentSkillsService, agent_runtime_cache_service_1.AgentRuntimeCacheService, credentials_service_1.CredentialsService, db_1.WorkflowRepository, agent_setup_completion_service_1.AgentSetupCompletionService, agent_modification_telemetry_service_1.AgentModificationTelemetryService])
|
|
226
246
|
], AgentConfigService);
|
|
227
247
|
function isRecord(value) {
|
|
228
248
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -246,6 +266,25 @@ function hasNodeToolInputSchema(raw) {
|
|
|
246
266
|
return false;
|
|
247
267
|
return raw.tools.some((tool) => isRecord(tool) && tool.type === 'node' && 'inputSchema' in tool);
|
|
248
268
|
}
|
|
269
|
+
function clearOmittedOptionalFields(schema, submitted) {
|
|
270
|
+
const optionalFields = [
|
|
271
|
+
'credential',
|
|
272
|
+
'personalisation',
|
|
273
|
+
'memory',
|
|
274
|
+
'subAgents',
|
|
275
|
+
'tools',
|
|
276
|
+
'skills',
|
|
277
|
+
'tasks',
|
|
278
|
+
'providerTools',
|
|
279
|
+
'config',
|
|
280
|
+
'mcpServers',
|
|
281
|
+
'vectorStores',
|
|
282
|
+
];
|
|
283
|
+
for (const field of optionalFields) {
|
|
284
|
+
if (submitted[field] === undefined)
|
|
285
|
+
delete schema[field];
|
|
286
|
+
}
|
|
287
|
+
}
|
|
249
288
|
function omitLegacyAgentDescription(config) {
|
|
250
289
|
if (!config)
|
|
251
290
|
return {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-config.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-config.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA0E;AAC1E,8CAOwB;AACxB,wDAA6C;AAC7C,gCAA6C;AAC7C,gCAAkC;AAClC,+CAAyC;AAEzC,2EAAuE;AACvE,8EAAyE;AAEzE,+EAAyE;AACzE,iEAA4D;AAE5D,wEAAyE;AACzE,qFAAgG;AAChG,yGAAmG;AACnG,gFAA2E;AAC3E,sEAAkE;AAClE,6FAAoF;AACpF,iFAAkF;AAClF,iEAAgE;AAChE,uEAAoG;AACpG,mEAA8F;AAGvF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nE,IAAI,CAAC,gBAAgB;QAAE,OAAO,eAAe,CAAC;IAE9C,OAAO;QACN,GAAG,eAAe;QAClB,QAAQ,EAAE,gBAAgB;KAC1B,CAAC;AACH,CAAC;AAED,SAAS,sBAAsB,CAAC,GAAY;IAC3C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAE9D,OAAO,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,aAAa,IAAI,IAAI,CAAC,CAAC;AAClG,CAAC;AAED,SAAS,0BAA0B,CAAC,MAA8B;IACjE,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEvB,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAE9C,CAAC;IACF,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent-config.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-config.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iEAA0E;AAC1E,8CAOwB;AACxB,wDAA6C;AAC7C,gCAAwD;AACxD,gCAAkC;AAClC,+CAAyC;AAEzC,2EAAuE;AACvE,8EAAyE;AAEzE,iGAKgD;AAChD,+EAAyE;AACzE,qFAA+E;AAC/E,iEAA4D;AAE5D,wEAAyE;AACzE,qFAAgG;AAChG,yGAAmG;AACnG,gFAA2E;AAC3E,sEAAkE;AAClE,6FAAoF;AACpF,iFAAkF;AAClF,iEAAgE;AAChE,uEAAoG;AACpG,mEAA8F;AAGvF,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;IAC9B,YACkB,MAAc,EACd,eAAgC,EAChC,mBAAwC,EACxC,kBAAsC,EACtC,mBAA6C,EAC7C,k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,YAAY;QACZ,iBAAiB;QACjB,QAAQ;QACR,WAAW;QACX,OAAO;QACP,QAAQ;QACR,OAAO;QACP,eAAe;QACf,QAAQ;QACR,YAAY;QACZ,cAAc;KACL,CAAC;IACX,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACpC,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,SAAS;YAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IAC1D,CAAC;AACF,CAAC;AAED,SAAS,0BAA0B,CAAC,MAA8B;IACjE,IAAI,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IAEvB,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,MAE9C,CAAC;IACF,OAAO,IAAI,CAAC;AACb,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type ToolDescriptor } from '@n8n/agents';
|
|
2
2
|
import { type AgentJsonConfig } from '@n8n/api-types';
|
|
3
3
|
import { Logger } from '@n8n/backend-common';
|
|
4
|
+
import { AgentModificationTelemetryService, type AgentMutationTelemetryContext } from './agent-modification-telemetry.service';
|
|
4
5
|
import { AgentRuntimeCacheService } from './agent-runtime-cache.service';
|
|
5
6
|
import type { Agent } from './entities/agent.entity';
|
|
6
7
|
import { AgentRepository } from './repositories/agent.repository';
|
|
@@ -9,13 +10,16 @@ export declare class AgentCustomToolsService {
|
|
|
9
10
|
private readonly logger;
|
|
10
11
|
private readonly agentRepository;
|
|
11
12
|
private readonly runtimeCacheService;
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
private readonly modificationTelemetry;
|
|
14
|
+
constructor(logger: Logger, agentRepository: AgentRepository, runtimeCacheService: AgentRuntimeCacheService, modificationTelemetry: AgentModificationTelemetryService);
|
|
15
|
+
buildCustomTool(agentId: string, projectId: string, code: string, descriptor: ToolDescriptor, context: AgentMutationTelemetryContext, options?: {
|
|
16
|
+
recordTelemetry?: boolean;
|
|
17
|
+
}): Promise<{
|
|
14
18
|
ok: boolean;
|
|
15
19
|
id: string;
|
|
16
20
|
descriptor: ToolDescriptor;
|
|
17
21
|
}>;
|
|
18
|
-
deleteCustomTool(agentId: string, projectId: string, toolId: string): Promise<void>;
|
|
22
|
+
deleteCustomTool(agentId: string, projectId: string, toolId: string, context: AgentMutationTelemetryContext): Promise<void>;
|
|
19
23
|
private getMissingCustomToolIds;
|
|
20
24
|
snapshotConfiguredTools(config: AgentJsonConfig | null, tools: AgentToolEntries): AgentToolEntries | null;
|
|
21
25
|
}
|
|
@@ -8,23 +8,30 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
15
|
exports.AgentCustomToolsService = void 0;
|
|
13
16
|
const api_types_1 = require("@n8n/api-types");
|
|
14
17
|
const backend_common_1 = require("@n8n/backend-common");
|
|
15
18
|
const di_1 = require("@n8n/di");
|
|
19
|
+
const isEqual_1 = __importDefault(require("lodash/isEqual"));
|
|
16
20
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
17
21
|
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
22
|
+
const agent_modification_telemetry_service_1 = require("./agent-modification-telemetry.service");
|
|
18
23
|
const agent_runtime_cache_service_1 = require("./agent-runtime-cache.service");
|
|
19
24
|
const agent_repository_1 = require("./repositories/agent.repository");
|
|
25
|
+
const agent_capabilities_1 = require("./utils/agent-capabilities");
|
|
20
26
|
const agent_draft_utils_1 = require("./utils/agent-draft.utils");
|
|
21
27
|
let AgentCustomToolsService = class AgentCustomToolsService {
|
|
22
|
-
constructor(logger, agentRepository, runtimeCacheService) {
|
|
28
|
+
constructor(logger, agentRepository, runtimeCacheService, modificationTelemetry) {
|
|
23
29
|
this.logger = logger;
|
|
24
30
|
this.agentRepository = agentRepository;
|
|
25
31
|
this.runtimeCacheService = runtimeCacheService;
|
|
32
|
+
this.modificationTelemetry = modificationTelemetry;
|
|
26
33
|
}
|
|
27
|
-
async buildCustomTool(agentId, projectId, code, descriptor) {
|
|
34
|
+
async buildCustomTool(agentId, projectId, code, descriptor, context, options = {}) {
|
|
28
35
|
const entity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
29
36
|
if (!entity)
|
|
30
37
|
throw new not_found_error_1.NotFoundError('Agent not found');
|
|
@@ -32,20 +39,42 @@ let AgentCustomToolsService = class AgentCustomToolsService {
|
|
|
32
39
|
throw new n8n_workflow_1.UserError(`Custom tool name "${descriptor.name}" contains invalid characters. Only letters, numbers, and underscores are allowed.`);
|
|
33
40
|
}
|
|
34
41
|
const toolId = descriptor.name;
|
|
42
|
+
const nextEntry = { code, descriptor };
|
|
43
|
+
if ((0, isEqual_1.default)(entity.tools?.[toolId], nextEntry)) {
|
|
44
|
+
return { ok: true, id: toolId, descriptor };
|
|
45
|
+
}
|
|
46
|
+
const previousSchema = entity.schema ?? null;
|
|
47
|
+
const previousIntegrations = entity.integrations ?? [];
|
|
48
|
+
const wasUnconfigured = (0, agent_capabilities_1.isUnconfiguredAgent)(previousSchema, previousIntegrations);
|
|
35
49
|
entity.tools = {
|
|
36
50
|
...entity.tools,
|
|
37
|
-
[toolId]:
|
|
51
|
+
[toolId]: nextEntry,
|
|
38
52
|
};
|
|
39
53
|
(0, agent_draft_utils_1.markAgentDraftDirty)(entity);
|
|
40
54
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
41
|
-
await this.agentRepository.save(entity);
|
|
55
|
+
const saved = await this.agentRepository.save(entity);
|
|
56
|
+
if (options.recordTelemetry !== false) {
|
|
57
|
+
this.modificationTelemetry.record({
|
|
58
|
+
agent: saved,
|
|
59
|
+
projectId,
|
|
60
|
+
user: context.user,
|
|
61
|
+
by: context.modifiedBy,
|
|
62
|
+
changedParts: (0, agent_modification_telemetry_service_1.diffAgentConfigParts)(previousSchema, saved.schema, previousIntegrations, saved.integrations ?? [], { tools: true }),
|
|
63
|
+
wasUnconfigured,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
42
66
|
this.logger.debug('Built custom tool', { agentId, projectId, toolId });
|
|
43
67
|
return { ok: true, id: toolId, descriptor };
|
|
44
68
|
}
|
|
45
|
-
async deleteCustomTool(agentId, projectId, toolId) {
|
|
69
|
+
async deleteCustomTool(agentId, projectId, toolId, context) {
|
|
46
70
|
const entity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
47
71
|
if (!entity)
|
|
48
72
|
throw new not_found_error_1.NotFoundError('Agent not found');
|
|
73
|
+
if (!entity.tools?.[toolId])
|
|
74
|
+
return;
|
|
75
|
+
const previousSchema = entity.schema ?? null;
|
|
76
|
+
const previousIntegrations = entity.integrations ?? [];
|
|
77
|
+
const wasUnconfigured = (0, agent_capabilities_1.isUnconfiguredAgent)(previousSchema, previousIntegrations);
|
|
49
78
|
const tools = { ...entity.tools };
|
|
50
79
|
delete tools[toolId];
|
|
51
80
|
entity.tools = tools;
|
|
@@ -54,7 +83,15 @@ let AgentCustomToolsService = class AgentCustomToolsService {
|
|
|
54
83
|
}
|
|
55
84
|
(0, agent_draft_utils_1.markAgentDraftDirty)(entity);
|
|
56
85
|
this.runtimeCacheService.clearRuntimes(agentId);
|
|
57
|
-
await this.agentRepository.save(entity);
|
|
86
|
+
const saved = await this.agentRepository.save(entity);
|
|
87
|
+
this.modificationTelemetry.record({
|
|
88
|
+
agent: saved,
|
|
89
|
+
projectId,
|
|
90
|
+
user: context.user,
|
|
91
|
+
by: context.modifiedBy,
|
|
92
|
+
changedParts: (0, agent_modification_telemetry_service_1.diffAgentConfigParts)(previousSchema, saved.schema, previousIntegrations, saved.integrations ?? [], { tools: true }),
|
|
93
|
+
wasUnconfigured,
|
|
94
|
+
});
|
|
58
95
|
this.logger.debug('Deleted custom tool', { agentId, projectId, toolId });
|
|
59
96
|
}
|
|
60
97
|
getMissingCustomToolIds(config, tools) {
|
|
@@ -91,6 +128,6 @@ let AgentCustomToolsService = class AgentCustomToolsService {
|
|
|
91
128
|
exports.AgentCustomToolsService = AgentCustomToolsService;
|
|
92
129
|
exports.AgentCustomToolsService = AgentCustomToolsService = __decorate([
|
|
93
130
|
(0, di_1.Service)(),
|
|
94
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, agent_repository_1.AgentRepository, agent_runtime_cache_service_1.AgentRuntimeCacheService])
|
|
131
|
+
__metadata("design:paramtypes", [backend_common_1.Logger, agent_repository_1.AgentRepository, agent_runtime_cache_service_1.AgentRuntimeCacheService, agent_modification_telemetry_service_1.AgentModificationTelemetryService])
|
|
95
132
|
], AgentCustomToolsService);
|
|
96
133
|
//# sourceMappingURL=agent-custom-tools.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-custom-tools.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-custom-tools.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"agent-custom-tools.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-custom-tools.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,8CAIwB;AACxB,wDAA6C;AAC7C,gCAAkC;AAClC,6DAAqC;AACrC,+CAAyC;AAEzC,8EAAyE;AAEzE,iGAIgD;AAChD,+EAAyE;AAEzE,sEAAkE;AAClE,mEAAiE;AACjE,iEAAgE;AAKzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACnC,YACkB,MAAc,EACd,eAAgC,EAChC,mBAA6C,EAC7C,qBAAwD;sBAHxD,MAAM;+BACN,eAAe;mCACf,mBAAmB;qCACnB,qBAAqB;IACpC,CAAC;IAOJ,KAAK,CAAC,eAAe,CACpB,OAAe,EACf,SAAiB,EACjB,IAAY,EACZ,UAA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-1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Agent as RuntimeAgent, type StreamChunk } from '@n8n/agents';
|
|
2
2
|
import type { AgentPersistedMessageDto } from '@n8n/api-types';
|
|
3
3
|
import { Logger } from '@n8n/backend-common';
|
|
4
4
|
import type { User } from '@n8n/db';
|
|
@@ -11,6 +11,7 @@ import { AgentRuntimeCacheService } from './agent-runtime-cache.service';
|
|
|
11
11
|
import { IntegrationMessageContextService } from './integrations/integration-message-context.service';
|
|
12
12
|
import { N8NCheckpointStorage } from './integrations/n8n-checkpoint-storage';
|
|
13
13
|
import type { ToolRegistry } from './tool-registry';
|
|
14
|
+
import type { StoredAttachmentRef } from './agent-chat-attachment.service';
|
|
14
15
|
export interface AgentMemoryScope {
|
|
15
16
|
threadId: string;
|
|
16
17
|
resourceId: string;
|
|
@@ -21,13 +22,16 @@ export interface ExecuteForChatConfig {
|
|
|
21
22
|
message: string;
|
|
22
23
|
user: User;
|
|
23
24
|
memory: AgentMemoryScope;
|
|
25
|
+
attachments?: StoredAttachmentRef[];
|
|
24
26
|
onExecutionRecorded?: (executionId: string) => void;
|
|
27
|
+
abortSignal?: AbortSignal;
|
|
25
28
|
}
|
|
26
29
|
export interface ExecuteForChatPublishedConfig {
|
|
27
30
|
agentId: string;
|
|
28
31
|
projectId: string;
|
|
29
32
|
message: string;
|
|
30
33
|
memory: AgentMemoryScope;
|
|
34
|
+
attachments?: StoredAttachmentRef[];
|
|
31
35
|
integrationType?: string;
|
|
32
36
|
}
|
|
33
37
|
export interface ResumeForChatConfig {
|
|
@@ -40,6 +44,7 @@ export interface ResumeForChatConfig {
|
|
|
40
44
|
usePublishedVersion?: boolean;
|
|
41
45
|
integrationType?: string;
|
|
42
46
|
onExecutionRecorded?: (executionId: string) => void;
|
|
47
|
+
abortSignal?: AbortSignal;
|
|
43
48
|
}
|
|
44
49
|
export interface ExecuteForTaskPublishedConfig {
|
|
45
50
|
agentId: string;
|
|
@@ -63,16 +68,18 @@ export interface StreamChatResponseConfig {
|
|
|
63
68
|
agentId: string;
|
|
64
69
|
userId?: string;
|
|
65
70
|
message: string;
|
|
71
|
+
attachments?: StoredAttachmentRef[];
|
|
66
72
|
memory: AgentMemoryScope;
|
|
67
73
|
projectId: string;
|
|
68
74
|
source?: string;
|
|
69
75
|
taskId?: string;
|
|
70
76
|
taskVersionId?: string;
|
|
71
|
-
telemetry
|
|
77
|
+
telemetry: {
|
|
72
78
|
runType: AgentRunTelemetryType;
|
|
73
79
|
configuration: IAgentConfigurationTelemetryProperties;
|
|
74
80
|
};
|
|
75
81
|
onExecutionRecorded?: (executionId: string) => void;
|
|
82
|
+
abortSignal?: AbortSignal;
|
|
76
83
|
}
|
|
77
84
|
export declare class AgentExecutionOrchestratorService {
|
|
78
85
|
private readonly logger;
|
|
@@ -89,6 +96,11 @@ export declare class AgentExecutionOrchestratorService {
|
|
|
89
96
|
projectId: string;
|
|
90
97
|
agentId: string;
|
|
91
98
|
}): Promise<AgentPersistedMessageDto[] | null>;
|
|
99
|
+
cancelChatRun(params: {
|
|
100
|
+
agentId: string;
|
|
101
|
+
runId: string;
|
|
102
|
+
resourceId: string;
|
|
103
|
+
}): Promise<boolean>;
|
|
92
104
|
resumeForChat(config: ResumeForChatConfig): AsyncGenerator<StreamChunk>;
|
|
93
105
|
executeForChat(config: ExecuteForChatConfig): AsyncGenerator<StreamChunk>;
|
|
94
106
|
executeForChatPublished(config: ExecuteForChatPublishedConfig): AsyncGenerator<StreamChunk>;
|
|
@@ -10,9 +10,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AgentExecutionOrchestratorService = void 0;
|
|
13
|
+
const agents_1 = require("@n8n/agents");
|
|
13
14
|
const api_types_1 = require("@n8n/api-types");
|
|
14
15
|
const backend_common_1 = require("@n8n/backend-common");
|
|
15
16
|
const di_1 = require("@n8n/di");
|
|
17
|
+
const is_record_1 = require("@n8n/utils/is-record");
|
|
16
18
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
17
19
|
const external_hooks_1 = require("../../external-hooks");
|
|
18
20
|
const telemetry_1 = require("../../telemetry");
|
|
@@ -23,6 +25,7 @@ const execution_recorder_1 = require("./execution-recorder");
|
|
|
23
25
|
const integration_message_context_service_1 = require("./integrations/integration-message-context.service");
|
|
24
26
|
const n8n_checkpoint_storage_1 = require("./integrations/n8n-checkpoint-storage");
|
|
25
27
|
const agent_execution_counter_1 = require("./utils/agent-execution-counter");
|
|
28
|
+
const inbound_attachments_1 = require("./utils/inbound-attachments");
|
|
26
29
|
const agent_stream_1 = require("./utils/agent-stream");
|
|
27
30
|
const execution_to_message_mapper_1 = require("./utils/execution-to-message-mapper");
|
|
28
31
|
function getMaxIterationsChunks() {
|
|
@@ -37,6 +40,43 @@ function getMaxIterationsChunks() {
|
|
|
37
40
|
{ type: 'text-end', id },
|
|
38
41
|
];
|
|
39
42
|
}
|
|
43
|
+
function normalizeAbortedMessageRecord(record, abortSignal) {
|
|
44
|
+
if (!abortSignal?.aborted)
|
|
45
|
+
return record;
|
|
46
|
+
return { ...record, finishReason: 'cancelled', error: null };
|
|
47
|
+
}
|
|
48
|
+
function getDelegatedChildCheckpoints(checkpoint, parentAgentId) {
|
|
49
|
+
const childCheckpoints = [];
|
|
50
|
+
const seen = new Set();
|
|
51
|
+
for (const pendingToolCall of Object.values(checkpoint.pendingToolCalls)) {
|
|
52
|
+
if (!pendingToolCall.suspended)
|
|
53
|
+
continue;
|
|
54
|
+
const childCheckpoint = (0, agents_1.parseDelegateSubAgentContinuation)(pendingToolCall.continuation);
|
|
55
|
+
if (!childCheckpoint)
|
|
56
|
+
continue;
|
|
57
|
+
let ownerAgentId;
|
|
58
|
+
if (childCheckpoint.subAgentId === agents_1.INLINE_SUB_AGENT_ID) {
|
|
59
|
+
if (childCheckpoint.resumeContext !== undefined)
|
|
60
|
+
continue;
|
|
61
|
+
ownerAgentId = parentAgentId;
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
if (!(0, is_record_1.isRecord)(childCheckpoint.resumeContext) ||
|
|
65
|
+
childCheckpoint.resumeContext.agentId !== childCheckpoint.subAgentId ||
|
|
66
|
+
typeof childCheckpoint.resumeContext.versionId !== 'string' ||
|
|
67
|
+
childCheckpoint.resumeContext.versionId.length === 0) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
ownerAgentId = childCheckpoint.subAgentId;
|
|
71
|
+
}
|
|
72
|
+
const identity = `${ownerAgentId}\0${childCheckpoint.runId}`;
|
|
73
|
+
if (seen.has(identity))
|
|
74
|
+
continue;
|
|
75
|
+
seen.add(identity);
|
|
76
|
+
childCheckpoints.push({ runId: childCheckpoint.runId, agentId: ownerAgentId });
|
|
77
|
+
}
|
|
78
|
+
return childCheckpoints;
|
|
79
|
+
}
|
|
40
80
|
let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService {
|
|
41
81
|
constructor(logger, n8nCheckpointStorage, agentExecutionService, telemetry, runtimeCacheService, integrationMessageContextService, agentRunTracingService, externalHooks) {
|
|
42
82
|
this.logger = logger;
|
|
@@ -55,9 +95,30 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
55
95
|
return null;
|
|
56
96
|
return (0, execution_to_message_mapper_1.executionsToMessagesDto)(detail.executions);
|
|
57
97
|
}
|
|
98
|
+
async cancelChatRun(params) {
|
|
99
|
+
const checkpointStatus = await this.n8nCheckpointStorage.getStatus(params.runId, params.agentId);
|
|
100
|
+
if (checkpointStatus.status === 'not-found' || checkpointStatus.checkpoint === undefined) {
|
|
101
|
+
return false;
|
|
102
|
+
}
|
|
103
|
+
const { checkpoint } = checkpointStatus;
|
|
104
|
+
if (checkpoint.status !== 'suspended' ||
|
|
105
|
+
checkpoint.persistence?.delegated === true ||
|
|
106
|
+
checkpoint.persistence?.resourceId !== params.resourceId) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
const childCheckpoints = getDelegatedChildCheckpoints(checkpoint, params.agentId);
|
|
110
|
+
if (checkpointStatus.status === 'active') {
|
|
111
|
+
const cancelled = await this.n8nCheckpointStorage.cancelSuspended(params.runId, checkpoint, params.agentId);
|
|
112
|
+
if (!cancelled)
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
await Promise.all(childCheckpoints.map(async ({ runId, agentId }) => await this.n8nCheckpointStorage.delete(runId, agentId)));
|
|
116
|
+
await this.n8nCheckpointStorage.delete(params.runId, params.agentId);
|
|
117
|
+
return true;
|
|
118
|
+
}
|
|
58
119
|
async *resumeForChat(config) {
|
|
59
|
-
const { agentId, projectId, runId, toolCallId, resumeData, integrationType, user, usePublishedVersion = true, onExecutionRecorded, } = config;
|
|
60
|
-
const checkpointStatus = await this.n8nCheckpointStorage.getStatus(runId);
|
|
120
|
+
const { agentId, projectId, runId, toolCallId, resumeData, integrationType, user, usePublishedVersion = true, onExecutionRecorded, abortSignal, } = config;
|
|
121
|
+
const checkpointStatus = await this.n8nCheckpointStorage.getStatus(runId, agentId);
|
|
61
122
|
if (checkpointStatus.status === 'expired') {
|
|
62
123
|
throw new n8n_workflow_1.UserError(`Checkpoint ${runId} is expired and cannot be resumed`);
|
|
63
124
|
}
|
|
@@ -68,6 +129,9 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
68
129
|
if (!memoryScope) {
|
|
69
130
|
throw new n8n_workflow_1.UserError(`Checkpoint ${runId} has no memory data and cannot be resumed`);
|
|
70
131
|
}
|
|
132
|
+
if (memoryScope.delegated === true) {
|
|
133
|
+
throw new n8n_workflow_1.UserError('Delegated actions must be resumed through their parent agent');
|
|
134
|
+
}
|
|
71
135
|
const threadId = memoryScope.threadId;
|
|
72
136
|
const runtime = await this.runtimeCacheService.getRuntime({
|
|
73
137
|
agentId,
|
|
@@ -97,8 +161,10 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
97
161
|
executionCounter: (0, agent_execution_counter_1.createAgentExecutionCounter)(this.telemetry, {
|
|
98
162
|
agentId,
|
|
99
163
|
userId: user?.id,
|
|
164
|
+
runType,
|
|
100
165
|
}),
|
|
101
166
|
...(tracing ? { telemetry: tracing } : {}),
|
|
167
|
+
...(abortSignal ? { abortSignal } : {}),
|
|
102
168
|
});
|
|
103
169
|
for await (const value of (0, agent_stream_1.streamAgentChunks)(resultStream.stream)) {
|
|
104
170
|
recorder.record(value);
|
|
@@ -111,7 +177,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
111
177
|
throw error;
|
|
112
178
|
}
|
|
113
179
|
finally {
|
|
114
|
-
const messageRecord = recorder.getMessageRecord();
|
|
180
|
+
const messageRecord = normalizeAbortedMessageRecord(recorder.getMessageRecord(), abortSignal);
|
|
115
181
|
await this.persistRecordedExecution({
|
|
116
182
|
onExecutionRecorded,
|
|
117
183
|
failureMessage: 'Failed to record resumed agent execution',
|
|
@@ -132,7 +198,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
132
198
|
}
|
|
133
199
|
}
|
|
134
200
|
async *executeForChat(config) {
|
|
135
|
-
const { agentId, projectId, message, user, memory, onExecutionRecorded } = config;
|
|
201
|
+
const { agentId, projectId, message, user, memory, attachments, onExecutionRecorded, abortSignal, } = config;
|
|
136
202
|
const runtime = await this.runtimeCacheService.getRuntime({
|
|
137
203
|
agentId,
|
|
138
204
|
projectId,
|
|
@@ -152,6 +218,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
152
218
|
agentId,
|
|
153
219
|
userId: user.id,
|
|
154
220
|
message,
|
|
221
|
+
attachments,
|
|
155
222
|
memory,
|
|
156
223
|
projectId: runtime.projectId,
|
|
157
224
|
telemetry: {
|
|
@@ -159,10 +226,11 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
159
226
|
configuration: runtime.telemetryConfiguration,
|
|
160
227
|
},
|
|
161
228
|
onExecutionRecorded,
|
|
229
|
+
abortSignal,
|
|
162
230
|
});
|
|
163
231
|
}
|
|
164
232
|
async *executeForChatPublished(config) {
|
|
165
|
-
const { agentId, projectId, message, memory, integrationType } = config;
|
|
233
|
+
const { agentId, projectId, message, memory, integrationType, attachments } = config;
|
|
166
234
|
await this.externalHooks.run('agent.preExecute', [agentId]);
|
|
167
235
|
const runtime = await this.runtimeCacheService.getRuntime({
|
|
168
236
|
agentId,
|
|
@@ -175,6 +243,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
175
243
|
toolRegistry: runtime.toolRegistry,
|
|
176
244
|
agentId,
|
|
177
245
|
message,
|
|
246
|
+
attachments,
|
|
178
247
|
memory,
|
|
179
248
|
projectId: runtime.projectId,
|
|
180
249
|
source: integrationType,
|
|
@@ -233,7 +302,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
233
302
|
});
|
|
234
303
|
}
|
|
235
304
|
async *streamChatResponse(config) {
|
|
236
|
-
const { agentInstance, toolRegistry, agentId, userId, message, memory, projectId, source, taskId, taskVersionId, telemetry, onExecutionRecorded, } = config;
|
|
305
|
+
const { agentInstance, toolRegistry, agentId, userId, message, attachments, memory, projectId, source, taskId, taskVersionId, telemetry, onExecutionRecorded, abortSignal, } = config;
|
|
237
306
|
const { threadId, resourceId } = memory;
|
|
238
307
|
const recorder = new execution_recorder_1.ExecutionRecorder(toolRegistry);
|
|
239
308
|
try {
|
|
@@ -245,10 +314,16 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
245
314
|
source: source ?? 'test',
|
|
246
315
|
modelId: (0, agent_run_tracing_service_1.modelIdFromSnapshot)(agentInstance.snapshot.model),
|
|
247
316
|
});
|
|
248
|
-
const
|
|
317
|
+
const input = attachments?.length ? (0, inbound_attachments_1.buildInboundUserMessage)(message, attachments) : message;
|
|
318
|
+
const resultStream = await agentInstance.stream(input, {
|
|
249
319
|
persistence: { threadId, resourceId },
|
|
250
|
-
executionCounter: (0, agent_execution_counter_1.createAgentExecutionCounter)(this.telemetry, {
|
|
320
|
+
executionCounter: (0, agent_execution_counter_1.createAgentExecutionCounter)(this.telemetry, {
|
|
321
|
+
agentId,
|
|
322
|
+
userId,
|
|
323
|
+
runType: telemetry.runType,
|
|
324
|
+
}),
|
|
251
325
|
...(tracing ? { telemetry: tracing } : {}),
|
|
326
|
+
...(abortSignal ? { abortSignal } : {}),
|
|
252
327
|
});
|
|
253
328
|
for await (const value of (0, agent_stream_1.streamAgentChunks)(resultStream.stream)) {
|
|
254
329
|
recorder.record(value);
|
|
@@ -274,7 +349,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
274
349
|
throw error;
|
|
275
350
|
}
|
|
276
351
|
finally {
|
|
277
|
-
const messageRecord = recorder.getMessageRecord();
|
|
352
|
+
const messageRecord = normalizeAbortedMessageRecord(recorder.getMessageRecord(), abortSignal);
|
|
278
353
|
await this.persistRecordedExecution({
|
|
279
354
|
onExecutionRecorded,
|
|
280
355
|
failureMessage: 'Failed to record agent execution',
|
|
@@ -284,6 +359,7 @@ let AgentExecutionOrchestratorService = class AgentExecutionOrchestratorService
|
|
|
284
359
|
agentName: agentInstance.name,
|
|
285
360
|
projectId,
|
|
286
361
|
userMessage: message,
|
|
362
|
+
attachments,
|
|
287
363
|
record: messageRecord,
|
|
288
364
|
hitlStatus: recorder.suspended ? 'suspended' : undefined,
|
|
289
365
|
source,
|