n8n 2.37.6 → 2.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-executions.js +2 -1
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.d.ts +5 -1
- package/dist/active-workflow-manager.js +64 -33
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/binary-data/binary-data-access.service.d.ts +11 -0
- package/dist/binary-data/binary-data-access.service.js +50 -0
- package/dist/binary-data/binary-data-access.service.js.map +1 -0
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.d.ts +2 -0
- package/dist/commands/base-command.js +8 -0
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/import/workflow.d.ts +1 -0
- package/dist/commands/import/workflow.js +12 -3
- package/dist/commands/import/workflow.js.map +1 -1
- package/dist/commands/start.d.ts +1 -0
- package/dist/commands/start.js +2 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +3 -1
- package/dist/constants.js.map +1 -1
- package/dist/controllers/binary-data.controller.d.ts +5 -2
- package/dist/controllers/binary-data.controller.js +11 -3
- package/dist/controllers/binary-data.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +1 -6
- package/dist/controllers/e2e.controller.js +7 -20
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/invitation.controller.d.ts +1 -5
- package/dist/controllers/invitation.controller.js +3 -32
- package/dist/controllers/invitation.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +4 -10
- package/dist/controllers/project.controller.js +14 -114
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/telemetry.controller.js +1 -1
- package/dist/controllers/telemetry.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +2 -27
- package/dist/controllers/users.controller.js +6 -132
- package/dist/controllers/users.controller.js.map +1 -1
- package/dist/credentials/credentials-finder.service.d.ts +2 -0
- package/dist/credentials/credentials-finder.service.js +46 -12
- package/dist/credentials/credentials-finder.service.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +5 -2
- package/dist/credentials/credentials.service.js +4 -1
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.d.ts +3 -1
- package/dist/credentials-helper.js +10 -2
- package/dist/credentials-helper.js.map +1 -1
- package/dist/deprecation/deprecation.service.js +5 -0
- package/dist/deprecation/deprecation.service.js.map +1 -1
- package/dist/errors/http-error-serializers.js +3 -0
- package/dist/errors/http-error-serializers.js.map +1 -1
- package/dist/errors/variable-validation.error.d.ts +2 -2
- package/dist/errors/variable-validation.error.js +1 -1
- package/dist/errors/variable-validation.error.js.map +1 -1
- package/dist/evaluation.ee/evaluation-config-validator.js +3 -2
- package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -1
- package/dist/evaluation.ee/evaluation-dataset.service.js +8 -1
- package/dist/evaluation.ee/evaluation-dataset.service.js.map +1 -1
- package/dist/evaluation.ee/evaluation-test-run.service.d.ts +46 -0
- package/dist/evaluation.ee/evaluation-test-run.service.js +65 -0
- package/dist/evaluation.ee/evaluation-test-run.service.js.map +1 -0
- package/dist/evaluation.ee/insights/insights-context-builder.js +4 -2
- package/dist/evaluation.ee/insights/insights-context-builder.js.map +1 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +96 -45
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.d.ts +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.js +5 -2
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/execution-lifecycle/execute-error-workflow.js +3 -0
- package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
- package/dist/executions/engine-v2-execution-reader.service.d.ts +11 -0
- package/dist/executions/engine-v2-execution-reader.service.js +68 -0
- package/dist/executions/engine-v2-execution-reader.service.js.map +1 -0
- package/dist/executions/execution-id.d.ts +5 -0
- package/dist/executions/execution-id.js +10 -0
- package/dist/executions/execution-id.js.map +1 -0
- package/dist/executions/execution.service.d.ts +3 -1
- package/dist/executions/execution.service.js +16 -8
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/executions.controller.d.ts +1 -0
- package/dist/executions/executions.controller.js +12 -6
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/expression-observability/expression-observability.provider.js +3 -2
- package/dist/expression-observability/expression-observability.provider.js.map +1 -1
- package/dist/license/license.service.js +1 -1
- package/dist/license/license.service.js.map +1 -1
- package/dist/metrics/prometheus/instance-ai-metrics.service.js.map +1 -1
- package/dist/middlewares/content-security-policy.d.ts +10 -0
- package/dist/middlewares/content-security-policy.js +53 -0
- package/dist/middlewares/content-security-policy.js.map +1 -0
- package/dist/middlewares/index.d.ts +1 -0
- package/dist/middlewares/index.js +1 -0
- package/dist/middlewares/index.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +0 -3
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-default-model-resolver.service.js +2 -4
- package/dist/modules/agents/agent-default-model-resolver.service.js.map +1 -1
- package/dist/modules/agents/agent-execution-orchestrator.service.js +13 -6
- package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +1 -0
- package/dist/modules/agents/agent-execution.service.js +3 -0
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integrations.controller.d.ts +7 -5
- package/dist/modules/agents/agent-integrations.controller.js +10 -17
- package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +5 -1
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js +14 -2
- package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -1
- package/dist/modules/agents/agent-model-catalog.service.js +6 -12
- package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +2 -3
- package/dist/modules/agents/agent-publish.service.js +12 -5
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-cache.service.d.ts +5 -0
- package/dist/modules/agents/agent-runtime-cache.service.js +57 -3
- package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +15 -7
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +123 -37
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-runtime.service.d.ts +4 -2
- package/dist/modules/agents/agent-sandbox-runtime.service.js +21 -11
- package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.js +0 -4
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.js +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-tool-resume.service.d.ts +32 -0
- package/dist/modules/agents/agent-workflow-tool-resume.service.js +168 -0
- package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -0
- package/dist/modules/agents/agent-workspace.service.d.ts +8 -2
- package/dist/modules/agents/agent-workspace.service.js +15 -4
- package/dist/modules/agents/agent-workspace.service.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +1 -1
- package/dist/modules/agents/agents.module.js +11 -7
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/background/agent-background-job.service.d.ts +34 -0
- package/dist/modules/agents/background/agent-background-job.service.js +168 -0
- package/dist/modules/agents/background/agent-background-job.service.js.map +1 -0
- package/dist/modules/agents/background/background-job-tools.d.ts +21 -0
- package/dist/modules/agents/background/background-job-tools.js +157 -0
- package/dist/modules/agents/background/background-job-tools.js.map +1 -0
- package/dist/modules/agents/background/sub-agent-background-runner.d.ts +27 -0
- package/dist/modules/agents/background/sub-agent-background-runner.js +123 -0
- package/dist/modules/agents/background/sub-agent-background-runner.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -6
- package/dist/modules/agents/builder/agents-builder-tools.service.js +16 -21
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +5 -7
- package/dist/modules/agents/builder/agents-builder.service.js +27 -36
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/call-agent-failure.d.ts +5 -0
- package/dist/modules/agents/builder/call-agent-failure.js +28 -0
- package/dist/modules/agents/builder/call-agent-failure.js.map +1 -0
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +3 -2
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +8 -9
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +3 -2
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js +16 -6
- package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +57 -44
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +3 -2
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +6 -0
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/external-services.skill.js +51 -8
- package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +15 -12
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +16 -5
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-background-job.entity.d.ts +18 -0
- package/dist/modules/agents/entities/agent-background-job.entity.js +78 -0
- package/dist/modules/agents/entities/agent-background-job.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-channel-status.entity.d.ts +16 -0
- package/dist/modules/agents/entities/agent-channel-status.entity.js +99 -0
- package/dist/modules/agents/entities/agent-channel-status.entity.js.map +1 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +3 -3
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +17 -7
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.d.ts +38 -0
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.js +260 -0
- package/dist/modules/agents/integrations/agent-channel-reconciler.service.js.map +1 -0
- package/dist/modules/agents/integrations/agent-channel-status-reporter.d.ts +23 -0
- package/dist/modules/agents/integrations/agent-channel-status-reporter.js +114 -0
- package/dist/modules/agents/integrations/agent-channel-status-reporter.js.map +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +9 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +53 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +1 -1
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +3 -2
- package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +5 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/channel-status-report.d.ts +4 -0
- package/dist/modules/agents/integrations/channel-status-report.js +58 -0
- package/dist/modules/agents/integrations/channel-status-report.js.map +1 -0
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +17 -2
- package/dist/modules/agents/integrations/chat-integration.service.js +63 -35
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/credential-claim.d.ts +3 -0
- package/dist/modules/agents/integrations/credential-claim.js +12 -0
- package/dist/modules/agents/integrations/credential-claim.js.map +1 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +25 -0
- package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +2 -1
- package/dist/modules/agents/integrations/platforms/discord-integration.js +9 -6
- package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.js +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +2 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +7 -6
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +4 -6
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +11 -14
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/credential-field-mapping.js +3 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
- package/dist/modules/agents/llm-provider-defaults.js +16 -1
- package/dist/modules/agents/llm-provider-defaults.js.map +1 -1
- package/dist/modules/agents/repositories/agent-background-job.repository.d.ts +37 -0
- package/dist/modules/agents/repositories/agent-background-job.repository.js +61 -0
- package/dist/modules/agents/repositories/agent-background-job.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-channel-status.repository.d.ts +29 -0
- package/dist/modules/agents/repositories/agent-channel-status.repository.js +63 -0
- package/dist/modules/agents/repositories/agent-channel-status.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +1 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js +4 -0
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +4 -5
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +32 -32
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
- package/dist/modules/agents/sub-agents/format-sub-agent-tool-output.d.ts +3 -0
- package/dist/modules/agents/sub-agents/format-sub-agent-tool-output.js +14 -0
- package/dist/modules/agents/sub-agents/format-sub-agent-tool-output.js.map +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
- package/dist/modules/agents/sub-agents/{sub-agent-foreground-runner.d.ts → sub-agent-runner.d.ts} +10 -7
- package/dist/modules/agents/sub-agents/{sub-agent-foreground-runner.js → sub-agent-runner.js} +51 -27
- package/dist/modules/agents/sub-agents/sub-agent-runner.js.map +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +18 -6
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +24 -13
- package/dist/modules/agents/tools/workflow-tool-factory.js +147 -9
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +10 -2
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +23 -4
- package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
- package/dist/modules/agents/utils/provider-model-id.d.ts +2 -0
- package/dist/modules/agents/utils/provider-model-id.js +21 -0
- package/dist/modules/agents/utils/provider-model-id.js.map +1 -0
- package/dist/modules/community-packages/community-packages.service.d.ts +4 -0
- package/dist/modules/community-packages/community-packages.service.js +96 -92
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/community-packages/npm-utils.js +1 -5
- package/dist/modules/community-packages/npm-utils.js.map +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.d.ts +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js +1 -1
- package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +9 -4
- package/dist/modules/data-table/data-table.service.js +34 -4
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/data-table/errors/data-table-access-denied.error.d.ts +4 -0
- package/dist/modules/data-table/errors/data-table-access-denied.error.js +13 -0
- package/dist/modules/data-table/errors/data-table-access-denied.error.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/config-redaction.d.ts +5 -0
- package/dist/modules/dynamic-credentials.ee/config-redaction.js +81 -0
- package/dist/modules/dynamic-credentials.ee/config-redaction.js.map +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +3 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +22 -4
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +12 -2
- package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
- package/dist/modules/encryption-key-manager/key-manager.service.d.ts +7 -2
- package/dist/modules/encryption-key-manager/key-manager.service.js +27 -8
- package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.d.ts +6 -0
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js +31 -0
- package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js.map +1 -0
- package/dist/modules/engine-v2/engine-control-plane-client.d.ts +9 -0
- package/dist/modules/engine-v2/engine-control-plane-client.js +51 -0
- package/dist/modules/engine-v2/engine-control-plane-client.js.map +1 -0
- package/dist/modules/engine-v2/engine-control-plane-server.d.ts +14 -0
- package/dist/modules/engine-v2/engine-control-plane-server.js +84 -0
- package/dist/modules/engine-v2/engine-control-plane-server.js.map +1 -0
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +3 -1
- package/dist/modules/engine-v2/engine-data-plane-client.js +16 -1
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
- package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.d.ts +18 -0
- package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js +150 -0
- package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js.map +1 -0
- package/dist/modules/engine-v2/engine-lifecycle-event.controller.d.ts +7 -0
- package/dist/modules/engine-v2/engine-lifecycle-event.controller.js +34 -0
- package/dist/modules/engine-v2/engine-lifecycle-event.controller.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.constants.d.ts +2 -0
- package/dist/modules/engine-v2/engine-v2.constants.js +6 -0
- package/dist/modules/engine-v2/engine-v2.constants.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.module.js +4 -0
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -1
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +3 -1
- package/dist/modules/engine-v2/engine-v2.runtime.js +6 -2
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +1 -1
- package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.js +1 -1
- package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +5 -3
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +16 -4
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -1
- package/dist/modules/git-connections.ee/git-connections.service.d.ts +4 -2
- package/dist/modules/git-connections.ee/git-connections.service.js +87 -4
- package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -1
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.d.ts +3 -2
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +48 -30
- package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +2 -28
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +5 -228
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.d.ts +1 -3
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js +2 -8
- package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +1 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -2
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +0 -2
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -2
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -3
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +101 -44
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +75 -83
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +8 -16
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +2 -0
- package/dist/modules/instance-ai/instance-ai.service.js +55 -11
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.d.ts +7 -0
- package/dist/modules/instance-ai/internal-messages.js +32 -2
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +2 -5
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +4 -7
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
- package/dist/modules/instance-ai/workflow-templates.service.js +1 -1
- package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.controller.ee.d.ts +4 -2
- package/dist/modules/ldap.ee/ldap.controller.ee.js +9 -2
- package/dist/modules/ldap.ee/ldap.controller.ee.js.map +1 -1
- package/dist/modules/ldap.ee/ldap.service.ee.js +4 -0
- 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.js +1 -1
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +2 -0
- package/dist/modules/mcp/mcp.constants.js +3 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +20 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +1 -0
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +2 -2
- package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +2 -5
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +5 -9
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -1
- package/dist/modules/n8n-packages/engine/import-result.js +1 -0
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +5 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +4 -5
- package/dist/modules/n8n-packages/engine/project-package-importer.js +9 -7
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +4 -5
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +18 -20
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +12 -12
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js +34 -0
- package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-importer.js +1 -1
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +22 -14
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/directory-package-reader.d.ts +21 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-reader.js +146 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +36 -0
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +10 -2
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.d.ts +1 -0
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js +4 -0
- package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js.map +1 -1
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.d.ts +1 -0
- package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js.map +1 -1
- package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
- package/dist/modules/oauth-server/oauth-server.service.js +12 -16
- package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +2 -1
- package/dist/modules/oauth-server/oauth-token.service.js +15 -3
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.d.ts +22 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js +60 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.d.ts +24 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js +62 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.d.ts +22 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js +56 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js.map +1 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js +4 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/index.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +4 -0
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +17 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
- package/dist/modules/oauth-server/resource-identity.d.ts +2 -0
- package/dist/modules/oauth-server/resource-identity.js +15 -0
- package/dist/modules/oauth-server/resource-identity.js.map +1 -0
- package/dist/modules/otel/otel.service.js +14 -7
- package/dist/modules/otel/otel.service.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js +3 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +1 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-lifecycle-handler.d.ts +9 -0
- package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js +45 -0
- package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js.map +1 -0
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js +1 -1
- package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +18 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +11 -3
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +2 -0
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +32 -0
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +16 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js +11 -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 -1
- package/dist/modules/sso-oidc/oidc.controller.ee.js +2 -2
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/sso-oidc/views/oidc-test-result.d.ts +2 -2
- package/dist/modules/sso-oidc/views/oidc-test-result.js +10 -4
- package/dist/modules/sso-oidc/views/oidc-test-result.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +2 -2
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js +1 -1
- package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
- package/dist/modules/sso-saml/views/init-sso-post.d.ts +1 -1
- package/dist/modules/sso-saml/views/init-sso-post.js +2 -2
- package/dist/modules/sso-saml/views/init-sso-post.js.map +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js +1 -1
- package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.d.ts +7 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js +38 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js.map +1 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.d.ts +9 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js +41 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js.map +1 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.d.ts +8 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js +37 -0
- package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.d.ts +17 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js +96 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +20 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +69 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.d.ts +18 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +63 -0
- package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +6 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +3 -5
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +7 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.d.ts → workflow-review-authorization.service.d.ts} +12 -3
- package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.js → workflow-review-authorization.service.js} +52 -17
- package/dist/modules/workflow-reviews.ee/workflow-review-authorization.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.d.ts +14 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js +17 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +8 -12
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +28 -82
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.d.ts +7 -6
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +80 -110
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.d.ts +17 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js +69 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.d.ts +34 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js +237 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.d.ts +10 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js +57 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.d.ts +17 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js +93 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.d.ts +34 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js +268 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +7 -3
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +13 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.d.ts +9 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js +37 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js.map +1 -0
- package/dist/oauth/oauth.service.js +0 -1
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/permissions.ee/check-access.js +11 -7
- package/dist/permissions.ee/check-access.js.map +1 -1
- package/dist/permissions.ee/project-scope.service.d.ts +1 -0
- package/dist/permissions.ee/project-scope.service.js +7 -2
- package/dist/permissions.ee/project-scope.service.js.map +1 -1
- package/dist/policy/evaluate-content-import-safely.d.ts +5 -0
- package/dist/policy/evaluate-content-import-safely.js +18 -0
- package/dist/policy/evaluate-content-import-safely.js.map +1 -0
- package/dist/policy/policy-enforcement-backend.d.ts +1 -0
- package/dist/policy/policy-enforcement.service.d.ts +2 -2
- package/dist/policy/policy-enforcement.service.js +10 -14
- package/dist/policy/policy-enforcement.service.js.map +1 -1
- package/dist/policy/policy-violation.error.d.ts +2 -0
- package/dist/policy/policy-violation.error.js +10 -0
- package/dist/policy/policy-violation.error.js.map +1 -1
- package/dist/public-api/types.d.ts +1 -14
- package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +2 -1
- package/dist/public-api/v1/controllers/git-connections.public.controller.js +24 -3
- package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +8 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.js +151 -14
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +33 -44
- package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +1 -1
- package/dist/public-api/v1/handlers/discover/discover.handler.js +3 -13
- package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/discover/discover.service.d.ts +2 -3
- package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
- package/dist/public-api/v1/handlers/evaluations/evaluations.handler.js +11 -35
- package/dist/public-api/v1/handlers/evaluations/evaluations.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.js +23 -21
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/users/users.handler.ee.d.ts +1 -1
- package/dist/public-api/v1/handlers/users/users.handler.ee.js +16 -18
- package/dist/public-api/v1/handlers/users/users.handler.ee.js.map +1 -1
- package/dist/public-api/v1/handlers/users/users.mapper.d.ts +12 -0
- package/dist/public-api/v1/handlers/users/users.mapper.js +27 -0
- package/dist/public-api/v1/handlers/users/users.mapper.js.map +1 -0
- package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +1 -1
- package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -6
- package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -4
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -102
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +4779 -2848
- package/dist/response-helper.js +3 -0
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/constants.js +2 -0
- package/dist/scaling/constants.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +8 -1
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +2 -7
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
- package/dist/security/content-security-policy.d.ts +8 -0
- package/dist/security/content-security-policy.js +18 -0
- package/dist/security/content-security-policy.js.map +1 -0
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js +1 -1
- package/dist/security-audit/risk-reporters/instance-risk-reporter.js.map +1 -1
- package/dist/server.js +22 -21
- package/dist/server.js.map +1 -1
- package/dist/services/active-workflows.service.d.ts +3 -1
- package/dist/services/active-workflows.service.js +11 -9
- package/dist/services/active-workflows.service.js.map +1 -1
- package/dist/services/ai-gateway.service.js +1 -1
- package/dist/services/ai-gateway.service.js.map +1 -1
- package/dist/services/credentials-tester.service.js +7 -1
- package/dist/services/credentials-tester.service.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +4 -1
- package/dist/services/engine-data-plane-proxy.service.js +5 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
- package/dist/services/engine-v2-dispatcher.service.d.ts +5 -2
- package/dist/services/engine-v2-dispatcher.service.js +46 -24
- package/dist/services/engine-v2-dispatcher.service.js.map +1 -1
- package/dist/services/engine-v2-push-registry.service.d.ts +8 -0
- package/dist/services/engine-v2-push-registry.service.js +51 -0
- package/dist/services/engine-v2-push-registry.service.js.map +1 -0
- package/dist/services/engine-v2-push-session.d.ts +23 -0
- package/dist/services/engine-v2-push-session.js +24 -0
- package/dist/services/engine-v2-push-session.js.map +1 -0
- package/dist/services/folder-finder.service.js +10 -8
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.d.ts +1 -1
- package/dist/services/folder.service.js +1 -7
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/import.service.d.ts +14 -3
- package/dist/services/import.service.js +27 -2
- package/dist/services/import.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/project.service.ee.d.ts +48 -9
- package/dist/services/project.service.ee.js +131 -17
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/role.service.js +10 -5
- package/dist/services/role.service.js.map +1 -1
- package/dist/services/user.service.d.ts +41 -8
- package/dist/services/user.service.js +174 -8
- package/dist/services/user.service.js.map +1 -1
- package/dist/task-runners/task-runner-process-py.d.ts +1 -1
- package/dist/task-runners/task-runner-process-py.js.map +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry/index.js.map +1 -1
- package/dist/utils/ai-proxy-fetch.d.ts +3 -4
- package/dist/utils/ai-proxy-fetch.js +3 -5
- package/dist/utils/ai-proxy-fetch.js.map +1 -1
- package/dist/utils/strapi-utils.js +1 -1
- package/dist/utils/strapi-utils.js.map +1 -1
- package/dist/utils/ttl-map.d.ts +1 -0
- package/dist/utils/ttl-map.js +9 -0
- package/dist/utils/ttl-map.js.map +1 -1
- package/dist/webhooks/constants.d.ts +2 -0
- package/dist/webhooks/constants.js +2 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +1 -1
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhook-registrations.service.d.ts +1 -0
- package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
- package/dist/webhooks/test-webhooks.d.ts +6 -2
- package/dist/webhooks/test-webhooks.js +29 -6
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +3 -4
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +4 -0
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +3 -1
- package/dist/webhooks/webhook-helpers.js +24 -1
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-response-headers.d.ts +1 -0
- package/dist/webhooks/webhook-response-headers.js +6 -0
- package/dist/webhooks/webhook-response-headers.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +5 -0
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +3 -2
- package/dist/workflow-helpers.js +35 -24
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/publication/publication-result.d.ts +5 -0
- package/dist/workflows/publication/publication-status-reporter.d.ts +1 -0
- package/dist/workflows/publication/publication-status-reporter.js +23 -5
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +6 -1
- package/dist/workflows/publication/workflow-publication-applier.js +63 -10
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/triggers/poll-backoff.service.d.ts +2 -2
- package/dist/workflows/triggers/poll-backoff.service.js +3 -3
- package/dist/workflows/triggers/poll-backoff.service.js.map +1 -1
- package/dist/workflows/triggers/poll-cursor.service.d.ts +2 -2
- package/dist/workflows/triggers/poll-cursor.service.js +4 -1
- package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
- package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +6 -4
- package/dist/workflows/triggers/trigger-execution-context.factory.js +13 -7
- package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +1 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.js +3 -0
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +10 -1
- package/dist/workflows/triggers/workflow-trigger-activator.js +78 -38
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +17 -4
- package/dist/workflows/workflow-creation.service.js +96 -16
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.js +2 -0
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.js +67 -56
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +3 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +4 -1
- package/dist/workflows/workflow.service.ee.d.ts +9 -3
- package/dist/workflows/workflow.service.ee.js +16 -2
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +25 -4
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +3 -5
- package/dist/workflows/workflows.controller.js +3 -7
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +37 -37
- package/templates/oauth-callback.handlebars +1 -1
- package/templates/oauth-error-callback.handlebars +1 -1
- package/templates/saml-connection-test-failed.handlebars +4 -1
- package/templates/saml-connection-test-success.handlebars +4 -1
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +0 -1
- package/dist/modules/instance-ai/output-redaction-config.d.ts +0 -3
- package/dist/modules/instance-ai/output-redaction-config.js +0 -21
- package/dist/modules/instance-ai/output-redaction-config.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.d.ts +0 -18
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +0 -77
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +0 -51
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +0 -538
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +0 -1
- package/dist/policy/policy-cleared.d.ts +0 -20
- package/dist/policy/policy-cleared.js +0 -22
- package/dist/policy/policy-cleared.js.map +0 -1
- package/dist/public-api/v1/handlers/data-tables/data-tables.service.d.ts +0 -4
- package/dist/public-api/v1/handlers/data-tables/data-tables.service.js +0 -44
- package/dist/public-api/v1/handlers/data-tables/data-tables.service.js.map +0 -1
- package/dist/public-api/v1/handlers/users/users.service.ee.d.ts +0 -21
- package/dist/public-api/v1/handlers/users/users.service.ee.js +0 -68
- package/dist/public-api/v1/handlers/users/users.service.ee.js.map +0 -1
|
@@ -6,7 +6,7 @@ function subAgentsSkill() {
|
|
|
6
6
|
return {
|
|
7
7
|
id: 'agent-builder-sub-agents',
|
|
8
8
|
name: 'Agent Builder Sub-Agents',
|
|
9
|
-
description: 'Use when configuring inline or saved sub-agent delegation for the target agent, selecting
|
|
9
|
+
description: 'Use when configuring inline or saved sub-agent delegation for the target agent, selecting same-project sub-agents, or changing subAgents.maxChildren.',
|
|
10
10
|
recommendedTools: ['list_sub_agents', 'ask_questions', 'read_config', 'patch_config'],
|
|
11
11
|
allowedTools: [
|
|
12
12
|
'list_sub_agents',
|
|
@@ -30,9 +30,8 @@ The target agent can call \`delegate_subagent\` with \`subAgentId: "inline"\`
|
|
|
30
30
|
without any saved-agent refs. Inline subagents are ad-hoc child agents for
|
|
31
31
|
one-off focused tasks.
|
|
32
32
|
|
|
33
|
-
\`subAgents.agents\` is only for optional saved
|
|
34
|
-
|
|
35
|
-
subagent.
|
|
33
|
+
\`subAgents.agents\` is only for optional saved n8n Agent specialists that the
|
|
34
|
+
target agent may select by id when they are a better fit than an inline subagent.
|
|
36
35
|
|
|
37
36
|
## When to configure
|
|
38
37
|
|
|
@@ -43,19 +42,19 @@ subagent.
|
|
|
43
42
|
delegated tasks in a run. It is not the same as \`config.toolCallConcurrency\`.
|
|
44
43
|
- Do not create fields such as \`subAgents.maxConcurrentDelegations\`,
|
|
45
44
|
\`delegationConcurrency\`, or \`delegateConcurrency\`.
|
|
46
|
-
- Add saved subagent refs only when the user asks to use specific
|
|
47
|
-
|
|
45
|
+
- Add saved subagent refs only when the user asks to use specific agents,
|
|
46
|
+
reusable specialists, named helper agents, or saved-agent delegation.
|
|
48
47
|
|
|
49
48
|
## Saved sub-agent workflow
|
|
50
49
|
|
|
51
|
-
1. Call \`list_sub_agents\` to discover
|
|
52
|
-
|
|
53
|
-
2. If
|
|
50
|
+
1. Call \`list_sub_agents\` to discover same-project agents that can be added.
|
|
51
|
+
Do not write agent ids from memory, prose, or user-entered free text.
|
|
52
|
+
2. If agents are available and the user has not named exact agents,
|
|
54
53
|
call \`ask_questions\` with one \`type: "multi"\` question whose \`options\`
|
|
55
54
|
are the returned agent names. Map each selected option back to the
|
|
56
55
|
matching \`agentId\` from the \`list_sub_agents\` result.
|
|
57
|
-
3. If no
|
|
58
|
-
|
|
56
|
+
3. If no agents are available, do not configure saved subagents. Inline
|
|
57
|
+
delegation still works without saved-agent refs.
|
|
59
58
|
4. Determine the parent-owned routing guidance for each selected saved
|
|
60
59
|
subagent. Store it as \`useWhen\`, for example
|
|
61
60
|
\`{ "agentId": "<returned-agent-id>", "useWhen": "Use for billing-policy questions and invoice investigations." }\`.
|
|
@@ -80,6 +79,10 @@ Example patch flow:
|
|
|
80
79
|
|
|
81
80
|
## Rules
|
|
82
81
|
|
|
82
|
+
- Saved subagents run their current draft in Preview/test runs and their
|
|
83
|
+
published version in production runs. Delegating to a never-published agent
|
|
84
|
+
fails in production, so tell the user to publish saved subagents the target
|
|
85
|
+
agent relies on before production use.
|
|
83
86
|
- If the resumed values include text that is not one of the listed agent ids,
|
|
84
87
|
do not persist it as an agent id; ask a follow-up.
|
|
85
88
|
- \`useWhen\` is relationship-specific routing guidance owned by this parent
|
|
@@ -121,7 +124,7 @@ Example shape:
|
|
|
121
124
|
## Verify
|
|
122
125
|
|
|
123
126
|
- Inline delegation still works even when \`subAgents.agents\` is absent.
|
|
124
|
-
- Saved refs use only returned same-project
|
|
127
|
+
- Saved refs use only returned same-project agent ids.
|
|
125
128
|
- New or updated saved refs include concrete \`useWhen\` guidance.
|
|
126
129
|
- Any \`subAgents.maxChildren\` value stays within ${api_types_1.SUB_AGENT_MAX_CHILDREN_MIN} to ${api_types_1.SUB_AGENT_MAX_CHILDREN_MAX}.`,
|
|
127
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sub-agents.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/sub-agents.skill.ts"],"names":[],"mappings":";;;AACA,8CAIwB;AAExB;IACC,OAAO;QACN,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,
|
|
1
|
+
{"version":3,"file":"sub-agents.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/sub-agents.skill.ts"],"names":[],"mappings":";;;AACA,8CAIwB;AAExB;IACC,OAAO;QACN,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,uJAAuJ;QACxJ,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;QACrF,YAAY,EAAE;YACb,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;SACd;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;sDAsBsC,sCAA0B,OAAO,sCAA0B,gCAAgC,0CAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAyF1H,sCAA0B,OAAO,sCAA0B,GAAG;KACjH,CAAC;AACH,CAAC"}
|
|
@@ -88,9 +88,13 @@ Initial Build rules in your system prompt. Never create a placeholder or
|
|
|
88
88
|
- For each new or replacement objective, fill every template section with
|
|
89
89
|
run-specific details. Do not duplicate Agent Instructions or Skill bodies;
|
|
90
90
|
name a configured capability only when it helps route the work.
|
|
91
|
-
- Make sure the agent already has every
|
|
92
|
-
node/workflow tool, or web search).
|
|
93
|
-
|
|
91
|
+
- Make sure the agent already has every capability the steps need (an
|
|
92
|
+
integration, node/workflow tool, or web search). Configured chat integrations
|
|
93
|
+
automatically generate their context and action tools in scheduled runs too.
|
|
94
|
+
If the task sends through a configured platform and the integration lists the
|
|
95
|
+
needed action (for example \`send_dm\`), use that action; do not add a
|
|
96
|
+
same-platform node, MCP, or workflow tool. Add a tool only when the exact
|
|
97
|
+
operation is not supplied by an existing integration.
|
|
94
98
|
- Translate each cadence into a valid 5-field cron expression (e.g. daily 09:00
|
|
95
99
|
-> "0 9 * * *"; weekdays 08:30 -> "30 8 * * 1-5"; hourly -> "0 * * * *").
|
|
96
100
|
Keep this cadence out of the objective; only a data lookback window belongs
|
|
@@ -125,8 +129,15 @@ Initial Build rules in your system prompt. Never create a placeholder or
|
|
|
125
129
|
- To disable or remove a task, edit \`config.tasks\` with \`patch_config\` (set
|
|
126
130
|
\`enabled: false\`, or drop the ref). Changes take effect on the next
|
|
127
131
|
\`publish_agent\`.
|
|
128
|
-
- \`create_tasks\` does
|
|
129
|
-
|
|
132
|
+
- \`create_tasks\` does not add config tools. This does not mean a scheduled
|
|
133
|
+
message needs a messaging node: configured integrations supply their generated
|
|
134
|
+
action tools at runtime even when the task has no inbound conversation.
|
|
135
|
+
- A proactive or scheduled send through a connected chat platform is not a
|
|
136
|
+
separate backend integration. Use the channel's \`send_dm\` or
|
|
137
|
+
\`send_channel_message\` action when available.
|
|
138
|
+
- Never claim that a task requires a same-platform messaging node solely because
|
|
139
|
+
it starts without an inbound conversation. If such a redundant tool already
|
|
140
|
+
exists and the integration covers its action, remove it.
|
|
130
141
|
- Do not call \`create_tasks\` once per task when several are ready; batch them
|
|
131
142
|
into one call so the whole set is stored in a single round trip.`,
|
|
132
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target-tasks.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/target-tasks.skill.ts"],"names":[],"mappings":";;;AAEA,wEAAiG;AAEjG;IACC,OAAO;QACN,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACV,kMAAkM;QACnM,gBAAgB,EAAE;YACjB,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,eAAe;SACf;QACD,YAAY,EAAE;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,gBAAgB;YAChB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,eAAe;SACf;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;EAyBd,oDAA0B;;EAE1B,iDAAuB
|
|
1
|
+
{"version":3,"file":"target-tasks.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/target-tasks.skill.ts"],"names":[],"mappings":";;;AAEA,wEAAiG;AAEjG;IACC,OAAO;QACN,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACV,kMAAkM;QACnM,gBAAgB,EAAE;YACjB,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,eAAe;SACf;QACD,YAAY,EAAE;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,gBAAgB;YAChB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,eAAe;SACf;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;EAyBd,oDAA0B;;EAE1B,iDAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAkF0C;KACjE,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WithTimestampsAndStringId } from '@n8n/db';
|
|
2
|
+
export type AgentBackgroundJobKind = 'subagent' | 'workflow';
|
|
3
|
+
export type AgentBackgroundJobStatus = 'running' | 'completed' | 'failed' | 'cancelled';
|
|
4
|
+
export declare class AgentBackgroundJob extends WithTimestampsAndStringId {
|
|
5
|
+
kind: AgentBackgroundJobKind;
|
|
6
|
+
status: AgentBackgroundJobStatus;
|
|
7
|
+
parentAgentId: string;
|
|
8
|
+
parentThreadId: string;
|
|
9
|
+
title: string;
|
|
10
|
+
subAgentId: string | null;
|
|
11
|
+
childThreadId: string | null;
|
|
12
|
+
childExecutionId: string | null;
|
|
13
|
+
workflowId: string | null;
|
|
14
|
+
timeoutAt: Date | null;
|
|
15
|
+
result: string | null;
|
|
16
|
+
error: string | null;
|
|
17
|
+
settledAt: Date | null;
|
|
18
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AgentBackgroundJob = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
let AgentBackgroundJob = class AgentBackgroundJob extends db_1.WithTimestampsAndStringId {
|
|
16
|
+
};
|
|
17
|
+
exports.AgentBackgroundJob = AgentBackgroundJob;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], AgentBackgroundJob.prototype, "kind", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 16 }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], AgentBackgroundJob.prototype, "status", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36 }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], AgentBackgroundJob.prototype, "parentAgentId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 128 }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], AgentBackgroundJob.prototype, "parentThreadId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], AgentBackgroundJob.prototype, "title", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36, nullable: true }),
|
|
40
|
+
__metadata("design:type", Object)
|
|
41
|
+
], AgentBackgroundJob.prototype, "subAgentId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 128, nullable: true }),
|
|
44
|
+
__metadata("design:type", Object)
|
|
45
|
+
], AgentBackgroundJob.prototype, "childThreadId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36, nullable: true }),
|
|
48
|
+
__metadata("design:type", Object)
|
|
49
|
+
], AgentBackgroundJob.prototype, "childExecutionId", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 36, nullable: true }),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], AgentBackgroundJob.prototype, "workflowId", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, db_1.DateTimeColumn)({ precision: 3, nullable: true }),
|
|
56
|
+
__metadata("design:type", Object)
|
|
57
|
+
], AgentBackgroundJob.prototype, "timeoutAt", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
60
|
+
__metadata("design:type", Object)
|
|
61
|
+
], AgentBackgroundJob.prototype, "result", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], AgentBackgroundJob.prototype, "error", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, db_1.DateTimeColumn)({ precision: 3, nullable: true }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], AgentBackgroundJob.prototype, "settledAt", void 0);
|
|
70
|
+
exports.AgentBackgroundJob = AgentBackgroundJob = __decorate([
|
|
71
|
+
(0, typeorm_1.Entity)({ name: 'agent_background_job' }),
|
|
72
|
+
(0, typeorm_1.Index)(['parentThreadId', 'status']),
|
|
73
|
+
(0, typeorm_1.Index)(['parentAgentId']),
|
|
74
|
+
(0, typeorm_1.Index)(['settledAt']),
|
|
75
|
+
(0, typeorm_1.Index)(['childExecutionId'], { unique: true, where: '"childExecutionId" IS NOT NULL' }),
|
|
76
|
+
(0, typeorm_1.Index)(['timeoutAt'], { where: '"status" = \'running\'' })
|
|
77
|
+
], AgentBackgroundJob);
|
|
78
|
+
//# sourceMappingURL=agent-background-job.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-background-job.entity.js","sourceRoot":"","sources":["../../../../src/modules/agents/entities/agent-background-job.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAoE;AACpE,0CAAqD;AAkB9C,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,8BAAyB;CAiDhE,CAAA;;AA/CA;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;;gDACX;AAG7B;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SA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I,EAAE,CAAC;;qDAC1B;6BAhDX,kBAAkB;IAN9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;IACxC,IAAA,eAAK,EAAC,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;IACnC,IAAA,eAAK,EAAC,CAAC,eAAe,CAAC,CAAC;IACxB,IAAA,eAAK,EAAC,CAAC,WAAW,CAAC,CAAC;IACpB,IAAA,eAAK,EAAC,CAAC,kBAAkB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC;IACtF,IAAA,eAAK,EAAC,CAAC,WAAW,CAAC,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;GAC7C,kBAAkB,CAiD9B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { WithTimestamps } from '@n8n/db';
|
|
2
|
+
import { type Relation } from '@n8n/typeorm';
|
|
3
|
+
import { Agent } from './agent.entity';
|
|
4
|
+
export type AgentChannelStatusValue = 'connected' | 'error';
|
|
5
|
+
export declare class AgentChannelStatus extends WithTimestamps {
|
|
6
|
+
agentId: string;
|
|
7
|
+
agent: Relation<Agent>;
|
|
8
|
+
integrationType: string;
|
|
9
|
+
credentialId: string;
|
|
10
|
+
hostId: string;
|
|
11
|
+
status: AgentChannelStatusValue;
|
|
12
|
+
errorMessage: string | null;
|
|
13
|
+
attempts: number;
|
|
14
|
+
backoffUntil: Date | null;
|
|
15
|
+
expiresAt: Date | null;
|
|
16
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.AgentChannelStatus = void 0;
|
|
13
|
+
const db_1 = require("@n8n/db");
|
|
14
|
+
const typeorm_1 = require("@n8n/typeorm");
|
|
15
|
+
const agent_entity_1 = require("./agent.entity");
|
|
16
|
+
let AgentChannelStatus = class AgentChannelStatus extends db_1.WithTimestamps {
|
|
17
|
+
};
|
|
18
|
+
exports.AgentChannelStatus = AgentChannelStatus;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
21
|
+
type: 'varchar',
|
|
22
|
+
length: 36,
|
|
23
|
+
comment: 'Agent that owns this channel',
|
|
24
|
+
}),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], AgentChannelStatus.prototype, "agentId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.ManyToOne)(() => agent_entity_1.Agent, { onDelete: 'CASCADE' }),
|
|
29
|
+
(0, typeorm_1.JoinColumn)({ name: 'agentId' }),
|
|
30
|
+
__metadata("design:type", Object)
|
|
31
|
+
], AgentChannelStatus.prototype, "agent", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
34
|
+
type: 'varchar',
|
|
35
|
+
length: 64,
|
|
36
|
+
comment: 'Chat integration platform for this channel',
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], AgentChannelStatus.prototype, "integrationType", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
42
|
+
type: 'varchar',
|
|
43
|
+
length: 36,
|
|
44
|
+
comment: 'Credential connection that backs this channel; no FK so a failure is still recordable after the credential is deleted',
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AgentChannelStatus.prototype, "credentialId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Index)(),
|
|
50
|
+
(0, typeorm_1.PrimaryColumn)({
|
|
51
|
+
type: 'varchar',
|
|
52
|
+
length: 128,
|
|
53
|
+
comment: 'Process that observed this; the only writer of this row',
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], AgentChannelStatus.prototype, "hostId", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({
|
|
59
|
+
type: 'varchar',
|
|
60
|
+
length: 16,
|
|
61
|
+
comment: 'What this process last observed: connected or error',
|
|
62
|
+
}),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], AgentChannelStatus.prototype, "status", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)({
|
|
67
|
+
type: 'text',
|
|
68
|
+
nullable: true,
|
|
69
|
+
comment: 'Why this process could not start the channel; null once it succeeds',
|
|
70
|
+
}),
|
|
71
|
+
__metadata("design:type", Object)
|
|
72
|
+
], AgentChannelStatus.prototype, "errorMessage", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({
|
|
75
|
+
type: 'int',
|
|
76
|
+
default: 0,
|
|
77
|
+
comment: 'Consecutive failed startup attempts by this process, reset on success',
|
|
78
|
+
}),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], AgentChannelStatus.prototype, "attempts", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, db_1.DateTimeColumn)({
|
|
83
|
+
nullable: true,
|
|
84
|
+
comment: 'Earliest this process should retry; null when there is nothing to retry',
|
|
85
|
+
}),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], AgentChannelStatus.prototype, "backoffUntil", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, typeorm_1.Index)(),
|
|
90
|
+
(0, db_1.DateTimeColumn)({
|
|
91
|
+
nullable: true,
|
|
92
|
+
comment: 'When this row stops counting unless its owner refreshes it; null never expires',
|
|
93
|
+
}),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], AgentChannelStatus.prototype, "expiresAt", void 0);
|
|
96
|
+
exports.AgentChannelStatus = AgentChannelStatus = __decorate([
|
|
97
|
+
(0, typeorm_1.Entity)({ name: 'agent_channel_status' })
|
|
98
|
+
], AgentChannelStatus);
|
|
99
|
+
//# sourceMappingURL=agent-channel-status.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-channel-status.entity.js","sourceRoot":"","sources":["../../../../src/modules/agents/entities/agent-channel-status.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAyD;AACzD,0CAQsB;AAEtB,iDAAuC;AAwBhC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,mBAAc;CAiFrD,CAAA;;AA3EA;IALC,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,8BAA8B;KACvC,CAAC;;mDACc;AAIhB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC/C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iDACT;AAOvB;IALC,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,4CAA4C;KACrD,CAAC;;2DACsB;AAQxB;IANC,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EACN,uHAAuH;KACxH,CAAC;;wDACmB;AASrB;IANC,IAAA,eAAK,GAAE;IACP,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,GAAG;QACX,OAAO,EAAE,yDAAyD;KAClE,CAAC;;kDACa;AAOf;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,qDAAqD;KAC9D,CAAC;;kDAC8B;AAOhC;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,qEAAqE;KAC9E,CAAC;;wDAC0B;AAO5B;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,uEAAuE;KAChF,CAAC;;oDACe;AAUjB;IAJC,IAAA,mBAAc,EAAC;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,yEAAyE;KAClF,CAAC;;wDACwB;AAe1B;IALC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAc,EAAC;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,gFAAgF;KACzF,CAAC;;qDACqB;6BAhFX,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;GAC5B,kBAAkB,CAiF9B"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { CredentialProvider } from '@n8n/agents';
|
|
2
2
|
import type { User } from '@n8n/db';
|
|
3
|
-
import type
|
|
3
|
+
import { type InstanceAiBuilderDelegate, type InstanceAiCredentialService } from '@n8n/instance-ai';
|
|
4
4
|
import { AgentConfigService } from './agent-config.service';
|
|
5
5
|
import { AgentSkillsService } from './agent-skills.service';
|
|
6
6
|
import { AgentsService } from './agents.service';
|
|
7
7
|
import { AgentsBuilderService } from './builder/agents-builder.service';
|
|
8
8
|
import { N8nMemory } from './integrations/n8n-memory';
|
|
9
9
|
import { AgentThreadRepository } from './repositories/agent-thread.repository';
|
|
10
|
-
export declare const INSTANCE_AI_BUILDER_ADDENDUM = "## Instance AI session rules\n\nYou are running as a sub-agent inside n8n's instance AI chat; the user sees your questions as chat cards.\n\nPreview links work in this chat. Include a markdown Preview link after a successful build and when `call_agent` reports an unsupported interaction as `approval_required`, using the exact relative path from \"When To Build vs When To Converse\" (form: `[Preview](<path>)`). Do not invent absolute URLs. Do not omit the link and describe the path in plain text instead.\n\nYou can publish and unpublish the target agent with `publish_agent` and `unpublish_agent`. Never tell the user to open the agent editor and click Publish.\n\nThe Instance AI orchestrator can create workflows and data tables \u2014 never ask the user to create them manually.
|
|
10
|
+
export declare const INSTANCE_AI_BUILDER_ADDENDUM = "## Instance AI session rules\n\nYou are running as a sub-agent inside n8n's instance AI chat; the user sees your questions as chat cards.\n\nPreview links work in this chat. Include a markdown Preview link after a successful build and when `call_agent` reports an unsupported interaction as `approval_required`, using the exact relative path from \"When To Build vs When To Converse\" (form: `[Preview](<path>)`). Do not invent absolute URLs. Do not omit the link and describe the path in plain text instead.\n\nYou can publish and unpublish the target agent with `publish_agent` and `unpublish_agent`. Never tell the user to open the agent editor and click Publish.\n\nThe Instance AI orchestrator can create workflows and data tables \u2014 never ask the user to create them manually. For each missing artifact, call `report_required_artifact` with its concrete requirements before your final reply; the orchestrator will provision them and call you again when the Agent needs the result.\n\nSome requested chat platforms do not have a native Agent integration. In that case, finish the Agent without adding same-platform messaging nodes as Agent tools, then report an `agent-entrypoint` workflow. It must use the platform trigger, pass the incoming message and a stable conversation identifier into Message an Agent with a custom session key, then send the Agent's text response back through the platform. This workflow invokes the Agent and must never be attached to the Agent as a workflow tool.";
|
|
11
11
|
export declare class InstanceAiBuilderDelegateAdapterService {
|
|
12
12
|
private readonly agentsService;
|
|
13
13
|
private readonly agentsBuilderService;
|
|
@@ -17,6 +17,6 @@ export declare class InstanceAiBuilderDelegateAdapterService {
|
|
|
17
17
|
private readonly agentSkills;
|
|
18
18
|
constructor(agentsService: AgentsService, agentsBuilderService: AgentsBuilderService, n8nMemory: N8nMemory, agentThreadRepository: AgentThreadRepository, agentConfig: AgentConfigService, agentSkills: AgentSkillsService);
|
|
19
19
|
private buildSubAgentSession;
|
|
20
|
-
createDelegate(user: User, projectId: string, credentialProvider: CredentialProvider): InstanceAiBuilderDelegate;
|
|
20
|
+
createDelegate(user: User, projectId: string, credentialProvider: CredentialProvider, credentialService: InstanceAiCredentialService): InstanceAiBuilderDelegate;
|
|
21
21
|
deleteBuilderSessions(instanceAiThreadId: string): Promise<void>;
|
|
22
22
|
}
|
|
@@ -31,15 +31,21 @@ Preview links work in this chat. Include a markdown Preview link after a success
|
|
|
31
31
|
|
|
32
32
|
You can publish and unpublish the target agent with \`publish_agent\` and \`unpublish_agent\`. Never tell the user to open the agent editor and click Publish.
|
|
33
33
|
|
|
34
|
-
The Instance AI orchestrator can create workflows and data tables — never ask the user to create them manually.
|
|
34
|
+
The Instance AI orchestrator can create workflows and data tables — never ask the user to create them manually. For each missing artifact, call \`report_required_artifact\` with its concrete requirements before your final reply; the orchestrator will provision them and call you again when the Agent needs the result.
|
|
35
|
+
|
|
36
|
+
Some requested chat platforms do not have a native Agent integration. In that case, finish the Agent without adding same-platform messaging nodes as Agent tools, then report an \`agent-entrypoint\` workflow. It must use the platform trigger, pass the incoming message and a stable conversation identifier into Message an Agent with a custom session key, then send the Agent's text response back through the platform. This workflow invokes the Agent and must never be attached to the Agent as a workflow tool.`;
|
|
35
37
|
function isTextDeltaChunk(chunk) {
|
|
36
38
|
return chunk.type === 'text-delta';
|
|
37
39
|
}
|
|
38
|
-
function toBuilderTurnStream(chunks) {
|
|
40
|
+
function toBuilderTurnStream(chunks, requiredArtifacts) {
|
|
39
41
|
let resolveText;
|
|
40
42
|
const text = new Promise((resolve) => {
|
|
41
43
|
resolveText = resolve;
|
|
42
44
|
});
|
|
45
|
+
let resolveRequiredArtifacts;
|
|
46
|
+
const requiredArtifactsPromise = new Promise((resolve) => {
|
|
47
|
+
resolveRequiredArtifacts = resolve;
|
|
48
|
+
});
|
|
43
49
|
let acc = '';
|
|
44
50
|
async function* pump() {
|
|
45
51
|
try {
|
|
@@ -51,9 +57,10 @@ function toBuilderTurnStream(chunks) {
|
|
|
51
57
|
}
|
|
52
58
|
finally {
|
|
53
59
|
resolveText(acc);
|
|
60
|
+
resolveRequiredArtifacts([...requiredArtifacts]);
|
|
54
61
|
}
|
|
55
62
|
}
|
|
56
|
-
return { fullStream: pump(), text };
|
|
63
|
+
return { fullStream: pump(), text, requiredArtifacts: requiredArtifactsPromise };
|
|
57
64
|
}
|
|
58
65
|
let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAdapterService {
|
|
59
66
|
constructor(agentsService, agentsBuilderService, n8nMemory, agentThreadRepository, agentConfig, agentSkills) {
|
|
@@ -64,7 +71,7 @@ let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAda
|
|
|
64
71
|
this.agentConfig = agentConfig;
|
|
65
72
|
this.agentSkills = agentSkills;
|
|
66
73
|
}
|
|
67
|
-
buildSubAgentSession(session) {
|
|
74
|
+
buildSubAgentSession(session, onRequiredArtifact) {
|
|
68
75
|
return {
|
|
69
76
|
threadId: session.threadId,
|
|
70
77
|
hostThreadId: session.hostThreadId,
|
|
@@ -75,9 +82,10 @@ let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAda
|
|
|
75
82
|
...(session.memoryTaskObserver ? { memoryTaskObserver: session.memoryTaskObserver } : {}),
|
|
76
83
|
abortSignal: session.abortSignal,
|
|
77
84
|
...(session.mcpTools ? { mcpTools: session.mcpTools } : {}),
|
|
85
|
+
onRequiredArtifact,
|
|
78
86
|
};
|
|
79
87
|
}
|
|
80
|
-
createDelegate(user, projectId, credentialProvider) {
|
|
88
|
+
createDelegate(user, projectId, credentialProvider, credentialService) {
|
|
81
89
|
const assertProjectScope = async (scope) => {
|
|
82
90
|
if (!(await (0, check_access_1.userHasScopes)(user, [scope], false, { projectId }))) {
|
|
83
91
|
throw new forbidden_error_1.ForbiddenError('You do not have permission to access agents in this project.');
|
|
@@ -94,11 +102,13 @@ let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAda
|
|
|
94
102
|
},
|
|
95
103
|
streamBuild: async (agentId, message, session) => {
|
|
96
104
|
await assertProjectScope('agent:update');
|
|
97
|
-
|
|
105
|
+
const requiredArtifacts = [];
|
|
106
|
+
return toBuilderTurnStream(this.agentsBuilderService.buildAgent(agentId, projectId, message, credentialProvider, credentialService, user, this.buildSubAgentSession(session, (artifact) => requiredArtifacts.push(artifact))), requiredArtifacts);
|
|
98
107
|
},
|
|
99
108
|
resumeBuild: async (agentId, resume, session) => {
|
|
100
109
|
await assertProjectScope('agent:update');
|
|
101
|
-
|
|
110
|
+
const requiredArtifacts = [];
|
|
111
|
+
return toBuilderTurnStream(this.agentsBuilderService.resumeBuild(agentId, projectId, resume.runId, resume.toolCallId, resume.resumeData, credentialProvider, credentialService, user, this.buildSubAgentSession(session, (artifact) => requiredArtifacts.push(artifact))), requiredArtifacts);
|
|
102
112
|
},
|
|
103
113
|
findOpenSuspensions: async (agentId, session) => {
|
|
104
114
|
await assertProjectScope('agent:update');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instance-ai-builder-delegate.adapter.js","sourceRoot":"","sources":["../../../src/modules/agents/instance-ai-builder-delegate.adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"instance-ai-builder-delegate.adapter.js","sourceRoot":"","sources":["../../../src/modules/agents/instance-ai-builder-delegate.adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gCAAkC;AAClC,kDAO0B;AAE1B,0CAAoC;AACpC,+CAAyC;AAEzC,8EAA0E;AAC1E,gEAA8D;AAE9D,iEAA4D;AAC5D,iEAA4D;AAC5D,qDAAiD;AACjD,6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AC,iBAAiB,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACzE,MAAM,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;YACxC,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC;IACF,CAAC;CACD,CAAA;;kDApKY,uCAAuC;IADnD,IAAA,YAAO,GAAE;qCAGwB,8BAAa,EACN,6CAAoB,EAC/B,sBAAS,EACG,+CAAqB,EAC/B,yCAAkB,EAClB,yCAAkB;GAPrC,uCAAuC,CAoKnD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Logger } from '@n8n/backend-common';
|
|
2
|
+
import { AgentsConfig } from '@n8n/config';
|
|
3
|
+
import { ErrorReporter, InstanceSettings } from 'n8n-core';
|
|
4
|
+
import { AgentChannelStatusReporter } from './agent-channel-status-reporter';
|
|
5
|
+
import { ChatIntegrationRegistry } from './agent-chat-integration';
|
|
6
|
+
import { ChatIntegrationService } from './chat-integration.service';
|
|
7
|
+
import { AgentChannelStatusRepository } from '../repositories/agent-channel-status.repository';
|
|
8
|
+
import { AgentRepository } from '../repositories/agent.repository';
|
|
9
|
+
export type ChannelReconcileReason = 'startup' | 'leader-takeover' | 'interval';
|
|
10
|
+
export declare class AgentChannelReconciler {
|
|
11
|
+
private readonly logger;
|
|
12
|
+
private readonly agentsConfig;
|
|
13
|
+
private readonly agentRepository;
|
|
14
|
+
private readonly channelStatusRepository;
|
|
15
|
+
private readonly statusReporter;
|
|
16
|
+
private readonly chatIntegrationService;
|
|
17
|
+
private readonly integrationRegistry;
|
|
18
|
+
private readonly instanceSettings;
|
|
19
|
+
private readonly errorReporter;
|
|
20
|
+
private reconcileInterval;
|
|
21
|
+
private isInitialized;
|
|
22
|
+
private isShuttingDown;
|
|
23
|
+
private inFlight;
|
|
24
|
+
constructor(logger: Logger, agentsConfig: AgentsConfig, agentRepository: AgentRepository, channelStatusRepository: AgentChannelStatusRepository, statusReporter: AgentChannelStatusReporter, chatIntegrationService: ChatIntegrationService, integrationRegistry: ChatIntegrationRegistry, instanceSettings: InstanceSettings, errorReporter: ErrorReporter);
|
|
25
|
+
init(): void;
|
|
26
|
+
shutdown(): Promise<void>;
|
|
27
|
+
private settleInFlight;
|
|
28
|
+
reconcileOnLeaderTakeover(): Promise<void>;
|
|
29
|
+
reconcile(reason: ChannelReconcileReason): Promise<void>;
|
|
30
|
+
private runPass;
|
|
31
|
+
private runsHere;
|
|
32
|
+
private settleWanted;
|
|
33
|
+
private affirmRunning;
|
|
34
|
+
private releaseGhosts;
|
|
35
|
+
private forgetOwnOrphans;
|
|
36
|
+
private sweepExpired;
|
|
37
|
+
private refOf;
|
|
38
|
+
}
|