n8n 2.36.7 → 2.37.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/README.md +4 -4
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/start.js +1 -2
- package/dist/commands/start.js.map +1 -1
- package/dist/constants/oauth2-triggers.d.ts +1 -1
- package/dist/constants/oauth2-triggers.js +3 -3
- package/dist/constants/workflow-reviews.d.ts +0 -3
- package/dist/constants/workflow-reviews.js +1 -10
- package/dist/constants/workflow-reviews.js.map +1 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +4 -1
- package/dist/constants.js.map +1 -1
- package/dist/controller.registry.js +11 -1
- package/dist/controller.registry.js.map +1 -1
- package/dist/controllers/binary-data.controller.d.ts +2 -5
- package/dist/controllers/binary-data.controller.js +3 -11
- package/dist/controllers/binary-data.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +2 -0
- package/dist/controllers/e2e.controller.js +7 -1
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/project.controller.js +3 -3
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/role.controller.d.ts +0 -1
- package/dist/controllers/role.controller.js +24 -17
- package/dist/controllers/role.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.js +1 -2
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -1
- package/dist/credentials/dynamic-credentials-proxy.d.ts +1 -1
- package/dist/credentials/dynamic-credentials-proxy.js +2 -2
- package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
- package/dist/credentials-helper.js +1 -1
- package/dist/credentials-helper.js.map +1 -1
- package/dist/eventbus/event-message-classes/event-message-audit.d.ts +1 -1
- package/dist/eventbus/event-message-classes/event-message-mcp.d.ts +2 -0
- package/dist/eventbus/event-message-classes/event-message-mcp.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +7 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/poll-trigger-metrics.event-map.d.ts +3 -0
- package/dist/events/maps/relay.event-map.d.ts +42 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +4 -0
- package/dist/events/relays/log-streaming.event-relay.js +72 -1
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +5 -0
- package/dist/events/relays/telemetry.event-relay.js +55 -1
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +1 -1
- package/dist/executions/execution-data/db-store.js +3 -2
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/types.d.ts +4 -2
- package/dist/executions/execution-data/types.js +4 -0
- package/dist/executions/execution-data/types.js.map +1 -1
- package/dist/executions/execution-data/unreadable-run-data.error.d.ts +5 -0
- package/dist/executions/execution-data/unreadable-run-data.error.js +11 -0
- package/dist/executions/execution-data/unreadable-run-data.error.js.map +1 -0
- package/dist/executions/execution-persistence.d.ts +3 -1
- package/dist/executions/execution-persistence.js +23 -10
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +4 -1
- package/dist/executions/execution.service.js +9 -7
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/execution.types.d.ts +1 -7
- package/dist/executions/executions.controller.d.ts +4 -1
- package/dist/executions/executions.controller.js +8 -3
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js +3 -21
- package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
- package/dist/metrics/prometheus/poll-trigger-metrics.service.js +8 -0
- package/dist/metrics/prometheus/poll-trigger-metrics.service.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +1 -1
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-custom-tools.service.js +2 -2
- package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +5 -1
- package/dist/modules/agents/agent-execution.service.js +33 -5
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-integration-management.service.d.ts +1 -0
- package/dist/modules/agents/agent-integration-management.service.js +16 -4
- package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
- package/dist/modules/agents/agent-publish.service.d.ts +1 -1
- package/dist/modules/agents/agent-publish.service.js +56 -20
- package/dist/modules/agents/agent-publish.service.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-principal.d.ts +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js +2 -2
- package/dist/modules/agents/agent-sandbox-principal.js.map +1 -1
- package/dist/modules/agents/agent-sandbox-runtime.service.js +2 -2
- package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
- package/dist/modules/agents/agent-skills.service.js +3 -3
- package/dist/modules/agents/agent-skills.service.js.map +1 -1
- package/dist/modules/agents/agent-task.service.d.ts +2 -0
- package/dist/modules/agents/agent-task.service.js +45 -10
- package/dist/modules/agents/agent-task.service.js.map +1 -1
- package/dist/modules/agents/agent-threads.controller.d.ts +3 -4
- package/dist/modules/agents/agent-threads.controller.js +10 -4
- package/dist/modules/agents/agent-threads.controller.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.d.ts +2 -6
- package/dist/modules/agents/agent-validation.service.js +5 -9
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-workflow-execution.service.d.ts +3 -2
- package/dist/modules/agents/agent-workflow-execution.service.js +31 -14
- package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
- package/dist/modules/agents/agents-config.controller.d.ts +9 -0
- package/dist/modules/agents/agents.module.js +0 -3
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +5 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +2 -0
- package/dist/modules/agents/builder/agents-builder.service.js +18 -5
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +4 -3
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js +11 -10
- package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +3 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.d.ts +2 -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-task-snapshot.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js +10 -1
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-task.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent-task.entity.js +10 -1
- package/dist/modules/agents/entities/agent-task.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent.entity.d.ts +1 -0
- package/dist/modules/agents/entities/agent.entity.js +4 -0
- package/dist/modules/agents/entities/agent.entity.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +1 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
- package/dist/modules/agents/integrations/agent-chat-bridge.js +22 -8
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +13 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +1 -1
- 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 +15 -0
- package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +14 -1
- package/dist/modules/agents/integrations/chat-integration.service.js +128 -11
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +1 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +20 -6
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +8 -1
- package/dist/modules/agents/integrations/integration-message-context.service.js +87 -3
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-execution.js +7 -0
- package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tool-types.d.ts +8 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.d.ts +25 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.js +123 -0
- package/dist/modules/agents/integrations/leader-channel-relay.service.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js +8 -4
- package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +12 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +34 -2
- package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.d.ts +4 -1
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +37 -9
- package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +3 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +2 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.d.ts +1 -1
- package/dist/modules/agents/json-config/agent-config-composition.js +3 -10
- package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +5 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +89 -8
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution.repository.d.ts +5 -2
- package/dist/modules/agents/repositories/agent-execution.repository.js +41 -2
- package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +1 -1
- package/dist/modules/agents/repositories/agent.repository.d.ts +6 -1
- package/dist/modules/agents/repositories/agent.repository.js +38 -0
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.d.ts +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js +20 -7
- package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +11 -0
- package/dist/modules/agents/tools/workflow-tool-factory.js +109 -40
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-draft.utils.d.ts +4 -0
- package/dist/modules/agents/utils/agent-draft.utils.js +9 -0
- package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +1 -0
- package/dist/modules/agents/utils/agent-memory-scope.js +4 -0
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/execution-failure-summary.d.ts +23 -0
- package/dist/modules/agents/utils/execution-failure-summary.js +54 -0
- package/dist/modules/agents/utils/execution-failure-summary.js.map +1 -0
- package/dist/modules/agents/workflow-agent-stream.d.ts +41 -0
- package/dist/modules/agents/workflow-agent-stream.js +132 -0
- package/dist/modules/agents/workflow-agent-stream.js.map +1 -0
- package/dist/modules/breaking-changes/breaking-changes.service.js +1 -1
- package/dist/modules/breaking-changes/breaking-changes.service.js.map +1 -1
- package/dist/modules/breaking-changes/rules/index.d.ts +4 -0
- package/dist/modules/breaking-changes/rules/index.js +4 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.d.ts +4 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.js +26 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-mode.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js +53 -0
- package/dist/modules/breaking-changes/rules/v3/agent-node-version.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js +56 -0
- package/dist/modules/breaking-changes/rules/v3/agent-removed-modes.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.js +54 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-any-removed.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js +63 -0
- package/dist/modules/breaking-changes/rules/v3/caller-policy-default-any.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.models.service.js +1 -69
- package/dist/modules/chat-hub/chat-hub.models.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.lifecycle.service.js +4 -14
- package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
- package/dist/modules/community-packages/community-packages.service.d.ts +8 -6
- package/dist/modules/community-packages/community-packages.service.js +263 -177
- package/dist/modules/community-packages/community-packages.service.js.map +1 -1
- package/dist/modules/data-table/data-table-size-validator.service.js +2 -2
- package/dist/modules/data-table/data-table-size-validator.service.js.map +1 -1
- package/dist/modules/data-table/multer-upload-middleware.js +2 -2
- package/dist/modules/data-table/multer-upload-middleware.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/identifier-interface.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +13 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +33 -3
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +3 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js +14 -16
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -2
- 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/identifiers/oauth2-userinfo-identifier.d.ts +12 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js +135 -19
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-userinfo-identifier.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.d.ts +6 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.js +29 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.d.ts +5 -5
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js +12 -12
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.d.ts +15 -4
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.js +8 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/oauth-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +3 -3
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/engine-v2/engine-data-plane-client.d.ts +15 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js +76 -0
- package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.module.d.ts +5 -0
- package/dist/modules/engine-v2/engine-v2.module.js +48 -0
- package/dist/modules/engine-v2/engine-v2.module.js.map +1 -0
- package/dist/modules/engine-v2/engine-v2.runtime.d.ts +20 -0
- package/dist/modules/engine-v2/engine-v2.runtime.js +164 -0
- package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -0
- 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/git-connections.ee/constants.d.ts +7 -0
- package/dist/modules/git-connections.ee/constants.js +11 -0
- package/dist/modules/git-connections.ee/constants.js.map +1 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.d.ts +8 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js +36 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection-project.entity.js.map +1 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.d.ts +14 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js +61 -0
- package/dist/modules/git-connections.ee/database/entities/git-connection.entity.js.map +1 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +9 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +46 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.d.ts +12 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js +37 -0
- package/dist/modules/git-connections.ee/database/repositories/git-connection.repository.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.d.ts +33 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.js +191 -0
- package/dist/modules/git-connections.ee/git-connections-git.service.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.d.ts +13 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.js +49 -0
- package/dist/modules/git-connections.ee/git-connections-git.utils.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections.module.d.ts +5 -0
- package/dist/modules/git-connections.ee/git-connections.module.js +32 -0
- package/dist/modules/git-connections.ee/git-connections.module.js.map +1 -0
- package/dist/modules/git-connections.ee/git-connections.service.d.ts +64 -0
- package/dist/modules/git-connections.ee/git-connections.service.js +331 -0
- package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.d.ts +2 -0
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js +10 -1
- package/dist/modules/instance-ai/browser/browser-use-ws.constants.js.map +1 -1
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.d.ts +2 -0
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js +19 -2
- package/dist/modules/instance-ai/browser/instance-ai-browser-session.service.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/durable-event-log.d.ts +2 -0
- package/dist/modules/instance-ai/event-bus/durable-event-log.js +30 -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 +3 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +33 -23
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +49 -7
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -1
- package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-verification.service.js +3 -2
- package/dist/modules/instance-ai/instance-ai-verification.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +4 -0
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +91 -32
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.js +5 -0
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.service.js +36 -87
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +3 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +14 -6
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.d.ts +3 -2
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js +10 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -1
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +4 -2
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +47 -4
- 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.d.ts +9 -1
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +34 -2
- package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.d.ts +4 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js +14 -0
- package/dist/modules/instance-ai/repositories/instance-ai-run-snapshot.repository.js.map +1 -1
- package/dist/modules/instance-ai/run-trace-metadata.js +2 -1
- package/dist/modules/instance-ai/run-trace-metadata.js.map +1 -1
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js +5 -0
- package/dist/modules/instance-ai/sandbox/instance-ai-sandbox.service.js.map +1 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +4 -1
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +2 -5
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +2 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +6 -2
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/tracing/index.d.ts +1 -1
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +9 -6
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +18 -3
- package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js +1 -1
- package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +7 -3
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +3 -3
- package/dist/modules/mcp/mcp.service.js +7 -5
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +14 -1
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tool-schema.util.js +2 -3
- package/dist/modules/mcp/tool-schema.util.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
- package/dist/modules/mcp/tools/agents/agent-reference.js +2 -0
- package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
- package/dist/modules/mcp/tools/agents/agent-tools.service.js +1 -0
- package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js +1 -1
- package/dist/modules/mcp/tools/search-folders.tool.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +5 -2
- package/dist/modules/mcp/tools/search-workflows.tool.js +58 -7
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js +2 -21
- package/dist/modules/mcp/tools/workflow-builder/credential-validation.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +2 -2
- 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 +3 -25
- package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +62 -13
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +13 -3
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +33 -3
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-result.d.ts +3 -1
- package/dist/modules/n8n-packages/engine/import-result.js +2 -0
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/import-telemetry.js +9 -0
- package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +6 -1
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +16 -2
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/project-package-importer.js +11 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +2 -2
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +2 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js +43 -0
- package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +5 -2
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +4 -2
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +2 -1
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.d.ts +5 -1
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js +24 -0
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.d.ts +11 -0
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.js +3 -0
- package/dist/modules/n8n-packages/entities/folder/folder-removal.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.js +110 -0
- package/dist/modules/n8n-packages/entities/folder/folder-remover.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +4 -4
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +4 -4
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +3 -3
- package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +16 -16
- package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.d.ts +21 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.js +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-removal.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.d.ts +12 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js +109 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +2 -2
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +2 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.d.ts +9 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.js +39 -0
- package/dist/modules/n8n-packages/io/directory/directory-package-writer.js.map +1 -0
- package/dist/modules/n8n-packages/io/package-writer.d.ts +2 -4
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
- package/dist/modules/n8n-packages/n8n-packages.service.js +41 -16
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +57 -4
- package/dist/modules/n8n-packages/n8n-packages.types.js +10 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +8 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +12 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +28 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +7 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/oauth-server/oauth-token.service.d.ts +1 -0
- package/dist/modules/oauth-server/oauth-token.service.js +12 -1
- package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js +0 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-resource.resolver.js.map +1 -1
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js +0 -4
- package/dist/modules/oauth-server/protected-resource-resolvers/form-trigger-test-resource.resolver.js.map +1 -1
- package/dist/modules/policy-infrastructure/policy-check-failed.error.d.ts +10 -0
- package/dist/modules/policy-infrastructure/policy-check-failed.error.js +14 -0
- package/dist/modules/policy-infrastructure/policy-check-failed.error.js.map +1 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +14 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js +121 -0
- package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.d.ts +4 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +23 -0
- package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -0
- package/dist/modules/provisioning.ee/constants.d.ts +1 -0
- package/dist/modules/provisioning.ee/constants.js +3 -1
- package/dist/modules/provisioning.ee/constants.js.map +1 -1
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.d.ts +4 -0
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.js +11 -0
- package/dist/modules/provisioning.ee/errors/sso-access-denied.error.js.map +1 -0
- package/dist/modules/provisioning.ee/provisioning.service.ee.js +4 -4
- package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.d.ts +1 -3
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js +16 -23
- package/dist/modules/provisioning.ee/role-mapping-rule.controller.ee.js.map +1 -1
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.d.ts +17 -5
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js +31 -9
- package/dist/modules/provisioning.ee/role-mapping-rule.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-export.service.ee.js +1 -0
- package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +7 -19
- package/dist/modules/source-control.ee/source-control-git.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +3 -5
- package/dist/modules/source-control.ee/source-control-helper.ee.js +10 -40
- package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +7 -2
- 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 +1 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +1 -0
- package/dist/modules/source-control.ee/types/source-control-workflow-version-id.d.ts +1 -0
- package/dist/modules/sso-oidc/oidc.controller.ee.js +23 -7
- package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
- package/dist/modules/sso-saml/saml.controller.ee.js +5 -0
- package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
- package/dist/modules/type-availability-policies/policy-evaluator.d.ts +2 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js +28 -0
- package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -0
- package/dist/modules/type-availability-policies/policy-rule.types.d.ts +23 -0
- package/dist/modules/type-availability-policies/policy-rule.types.js +3 -0
- package/dist/modules/type-availability-policies/policy-rule.types.js.map +1 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +4 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js +18 -0
- package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.d.ts +4 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js +25 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +5 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +14 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +9 -9
- package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js +1 -2
- package/dist/modules/workflow-reviews.ee/workflow-review-feature-gate.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +2 -3
- package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +5 -5
- 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 +30 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +256 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -0
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +6 -6
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +61 -52
- package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.d.ts +3 -2
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js +24 -1
- package/dist/modules/workflow-reviews.ee/workflow-review.mapper.js.map +1 -1
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js +2 -5
- package/dist/modules/workflow-reviews.ee/workflow-reviews.module.js.map +1 -1
- package/dist/policy/policy-cleared.d.ts +20 -0
- package/dist/policy/policy-cleared.js +22 -0
- package/dist/policy/policy-cleared.js.map +1 -0
- package/dist/policy/policy-enforcement-backend.d.ts +15 -0
- package/dist/policy/policy-enforcement-backend.js +3 -0
- package/dist/policy/policy-enforcement-backend.js.map +1 -0
- package/dist/policy/policy-enforcement.service.d.ts +21 -0
- package/dist/policy/policy-enforcement.service.js +87 -0
- package/dist/policy/policy-enforcement.service.js.map +1 -0
- package/dist/policy/policy-violation.error.d.ts +13 -0
- package/dist/policy/policy-violation.error.js +22 -0
- package/dist/policy/policy-violation.error.js.map +1 -0
- package/dist/posthog/index.js +1 -1
- package/dist/posthog/index.js.map +1 -1
- package/dist/public-api/public-api-controller.registry.js +2 -1
- package/dist/public-api/public-api-controller.registry.js.map +1 -1
- package/dist/public-api/public-api-route-resolver.d.ts +2 -2
- package/dist/public-api/public-api-route-resolver.js.map +1 -1
- package/dist/public-api/public-api-validation-error.d.ts +2 -0
- package/dist/public-api/public-api-validation-error.js +17 -0
- package/dist/public-api/public-api-validation-error.js.map +1 -0
- package/dist/public-api/types.d.ts +2 -9
- package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +20 -0
- package/dist/public-api/v1/controllers/git-connections.public.controller.js +278 -0
- package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -0
- package/dist/public-api/v1/controllers/index.d.ts +1 -0
- package/dist/public-api/v1/controllers/index.js +1 -0
- package/dist/public-api/v1/controllers/index.js.map +1 -1
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.d.ts +6 -1
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js +117 -11
- package/dist/public-api/v1/controllers/role-mapping-rules.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/roles.public.controller.d.ts +2 -1
- package/dist/public-api/v1/controllers/roles.public.controller.js +46 -2
- package/dist/public-api/v1/controllers/roles.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/tags.public.controller.js +1 -18
- package/dist/public-api/v1/controllers/tags.public.controller.js.map +1 -1
- package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +16 -3
- package/dist/public-api/v1/controllers/workflows.public.controller.js +169 -5
- package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +3 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +1 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +2 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/projects/projects.handler.js +3 -3
- package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -6
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -72
- package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
- package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +32 -0
- package/dist/public-api/v1/openapi-gen/decorator-routes.js +37 -9
- package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +5196 -1873
- package/dist/push/index.js +3 -3
- package/dist/push/index.js.map +1 -1
- package/dist/response-helper.js +1 -2
- 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 +19 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
- package/dist/scaling/pubsub/subscriber.service.d.ts +1 -0
- package/dist/scaling/pubsub/subscriber.service.js +24 -4
- package/dist/scaling/pubsub/subscriber.service.js.map +1 -1
- package/dist/scheduling/durable-job-provisioner.js +1 -1
- package/dist/scheduling/durable-job-provisioner.js.map +1 -1
- package/dist/scheduling/durable-scheduler.js +9 -0
- package/dist/scheduling/durable-scheduler.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.d.ts +2 -0
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js +9 -0
- package/dist/scheduling/poll-trigger-node/durable-poller-chain.js.map +1 -0
- package/dist/scheduling/poll-trigger-node/poll-job-provider.d.ts +1 -3
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js +4 -8
- package/dist/scheduling/poll-trigger-node/poll-job-provider.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.d.ts +3 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +9 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -1
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.d.ts +8 -3
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +86 -7
- package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
- package/dist/services/engine-data-plane-proxy.service.d.ts +10 -0
- package/dist/services/engine-data-plane-proxy.service.js +33 -0
- package/dist/services/engine-data-plane-proxy.service.js.map +1 -0
- package/dist/services/engine-v2-dispatcher.service.d.ts +14 -0
- package/dist/services/engine-v2-dispatcher.service.js +93 -0
- package/dist/services/engine-v2-dispatcher.service.js.map +1 -0
- package/dist/services/folder-finder.service.d.ts +1 -0
- package/dist/services/folder-finder.service.js +9 -0
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.d.ts +5 -0
- package/dist/services/folder.service.js +7 -0
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/frontend.service.d.ts +3 -4
- package/dist/services/frontend.service.js +5 -13
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/node-resource-explorer.service.d.ts +1 -0
- package/dist/services/node-resource-explorer.service.js +72 -13
- package/dist/services/node-resource-explorer.service.js.map +1 -1
- package/dist/services/oauth-token-verifier-proxy.service.d.ts +11 -1
- package/dist/services/oauth-token-verifier-proxy.service.js +6 -0
- package/dist/services/oauth-token-verifier-proxy.service.js.map +1 -1
- package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
- package/dist/services/role-authorization.d.ts +11 -2
- package/dist/services/role-authorization.js +15 -6
- package/dist/services/role-authorization.js.map +1 -1
- package/dist/services/role.service.d.ts +5 -1
- package/dist/services/role.service.js +7 -2
- package/dist/services/role.service.js.map +1 -1
- package/dist/utils/ai-service-retry.js +3 -4
- package/dist/utils/ai-service-retry.js.map +1 -1
- package/dist/webhooks/webhook-blank-file-inputs.d.ts +4 -0
- package/dist/webhooks/webhook-blank-file-inputs.js +32 -0
- package/dist/webhooks/webhook-blank-file-inputs.js.map +1 -0
- package/dist/webhooks/webhook-form-data.js +29 -15
- package/dist/webhooks/webhook-form-data.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +2 -2
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-sanitizer.js +10 -4
- package/dist/webhooks/webhook-request-sanitizer.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +2 -2
- package/dist/workflow-execute-additional-data.js +17 -6
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +2 -7
- package/dist/workflow-helpers.js +3 -34
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.d.ts +3 -1
- package/dist/workflow-runner.js +7 -2
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/publication/heal-node-ids.d.ts +26 -0
- package/dist/workflows/publication/heal-node-ids.js +65 -0
- package/dist/workflows/publication/heal-node-ids.js.map +1 -0
- package/dist/workflows/publication/publication-result.d.ts +1 -1
- package/dist/workflows/publication/publication-status-reporter.js +8 -3
- package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-applier.d.ts +10 -1
- package/dist/workflows/publication/workflow-publication-applier.js +56 -3
- package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js +1 -1
- package/dist/workflows/publication/workflow-publication-outbox-consumer.js.map +1 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.d.ts +2 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.js +5 -1
- package/dist/workflows/triggers/enabled-trigger-nodes.js.map +1 -1
- package/dist/workflows/triggers/poll-backoff-policy.d.ts +15 -0
- package/dist/workflows/triggers/poll-backoff-policy.js +78 -0
- package/dist/workflows/triggers/poll-backoff-policy.js.map +1 -0
- package/dist/workflows/triggers/poll-backoff.service.d.ts +30 -0
- package/dist/workflows/triggers/poll-backoff.service.js +121 -0
- package/dist/workflows/triggers/poll-backoff.service.js.map +1 -0
- package/dist/workflows/triggers/poll-cursor.service.d.ts +7 -5
- package/dist/workflows/triggers/poll-cursor.service.js +14 -6
- package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.d.ts +1 -0
- package/dist/workflows/triggers/workflow-trigger-activator.js +31 -3
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +3 -1
- package/dist/workflows/workflow-creation.service.js +9 -2
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +8 -0
- package/dist/workflows/workflow-finder.service.js +20 -0
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-mutation-hooks-proxy.service.d.ts +16 -6
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js +9 -6
- package/dist/workflows/workflow-mutation-hooks-proxy.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +2 -5
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +15 -1
- package/dist/workflows/workflow.service.ee.d.ts +3 -1
- package/dist/workflows/workflow.service.ee.js +12 -6
- package/dist/workflows/workflow.service.ee.js.map +1 -1
- package/dist/workflows/workflow.service.js +77 -25
- package/dist/workflows/workflow.service.js.map +1 -1
- package/package.json +64 -62
- package/templates/form-shell.handlebars +92 -7
- package/templates/form-trigger-completion.handlebars +5 -3
- package/templates/form-trigger.handlebars +11 -4
- package/templates/partials/formHostNavigation.handlebars +44 -0
- package/dist/binary-data/binary-data-access.service.d.ts +0 -11
- package/dist/binary-data/binary-data-access.service.js +0 -50
- package/dist/binary-data/binary-data-access.service.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder-settings.controller.d.ts +0 -10
- package/dist/modules/agents/builder/agents-builder-settings.controller.js +0 -52
- package/dist/modules/agents/builder/agents-builder-settings.controller.js.map +0 -1
- package/dist/modules/agents/builder/agents-builder-settings.service.d.ts +0 -38
- package/dist/modules/agents/builder/agents-builder-settings.service.js +0 -174
- package/dist/modules/agents/builder/agents-builder-settings.service.js.map +0 -1
- package/dist/modules/data-table/utils/size-utils.d.ts +0 -2
- package/dist/modules/data-table/utils/size-utils.js +0 -19
- package/dist/modules/data-table/utils/size-utils.js.map +0 -1
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.d.ts +0 -18
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js +0 -114
- package/dist/modules/workflow-reviews.ee/workflow-review-auto-close.service.js.map +0 -1
- package/dist/workflows/triggers/durable-poller-gate.service.d.ts +0 -19
- package/dist/workflows/triggers/durable-poller-gate.service.js +0 -78
- package/dist/workflows/triggers/durable-poller-gate.service.js.map +0 -1
|
@@ -60,11 +60,19 @@
|
|
|
60
60
|
box-shadow: var(--box-shadow-card);
|
|
61
61
|
padding: 14px 18px;
|
|
62
62
|
}
|
|
63
|
-
.summary-
|
|
63
|
+
.summary-info { position: relative; display: flex; flex-shrink: 0; }
|
|
64
|
+
.summary-icon { display: flex; background: none; border: 0; padding: 0; cursor: pointer; color: var(--color-muted); }
|
|
64
65
|
.summary-icon svg { display: block; }
|
|
65
66
|
.summary-icon .icon-ok, .req-summary.all-connected .summary-icon .icon-pending { display: none; }
|
|
66
67
|
.req-summary.all-connected .summary-icon { color: var(--color-ok); }
|
|
67
68
|
.req-summary.all-connected .summary-icon .icon-ok { display: block; }
|
|
69
|
+
/* Hover/focus for pointer + keyboard; `.open` is the tap toggle (iOS Safari
|
|
70
|
+
doesn't focus buttons on tap, so :focus-within alone won't show it there). */
|
|
71
|
+
.summary-tooltip { display: none; position: absolute; top: 100%; left: -12px; padding-top: 8px; width: min(300px, calc(100vw - 32px)); z-index: 20; }
|
|
72
|
+
.summary-info:hover .summary-tooltip, .summary-info:focus-within .summary-tooltip, .summary-info.open .summary-tooltip { display: block; }
|
|
73
|
+
.summary-tooltip-body { display: block; background: var(--color-card-bg); border: 1px solid var(--color-card-border); border-radius: var(--border-radius-card); box-shadow: var(--box-shadow-dialog); padding: 10px 12px; font-size: 12px; line-height: 1.5; color: var(--color-label); }
|
|
74
|
+
.summary-tooltip-body a { color: var(--color-primary); font-weight: 600; text-decoration: none; white-space: nowrap; }
|
|
75
|
+
.summary-tooltip-body a:hover { text-decoration: underline; }
|
|
68
76
|
.summary-text { flex: 1; min-width: 0; font-size: 13px; color: var(--color-header); }
|
|
69
77
|
|
|
70
78
|
/* --- Credential row (shared by the single-account panel + dialog) --- */
|
|
@@ -170,9 +178,14 @@
|
|
|
170
178
|
<div class='shell' data-submitter-email='{{submitterEmail}}'>
|
|
171
179
|
{{#if useDialog}}
|
|
172
180
|
<div class='req-summary{{#if allConnected}} all-connected{{/if}}' id='req-summary'>
|
|
173
|
-
<span class='summary-
|
|
174
|
-
<
|
|
175
|
-
|
|
181
|
+
<span class='summary-info' id='summary-info'>
|
|
182
|
+
<button type='button' class='summary-icon' aria-describedby='summary-tooltip' aria-label='About the accounts this form uses'>
|
|
183
|
+
<svg class='icon-pending' width='17' height='17' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.3' aria-hidden='true'><circle cx='8' cy='8' r='6.7' /><path d='M8 7.3v3.5' stroke-linecap='round' /><circle cx='8' cy='5.1' r='.8' fill='currentColor' stroke='none' /></svg>
|
|
184
|
+
<svg class='icon-ok' width='17' height='17' viewBox='0 0 16 16' fill='none' stroke='currentColor' stroke-width='1.3' aria-hidden='true'><circle cx='8' cy='8' r='6.7' /><path d='m5.2 8.2 1.9 1.9 3.7-4' stroke-linecap='round' stroke-linejoin='round' /></svg>
|
|
185
|
+
</button>
|
|
186
|
+
<span class='summary-tooltip' role='tooltip' id='summary-tooltip'>
|
|
187
|
+
<span class='summary-tooltip-body'>Submitting this form runs actions on your behalf, using accounts you connect. You can disconnect them at any time. <a href='https://docs.n8n.io/administer/manage-credentials/end-user-credentials' target='_blank' rel='noopener noreferrer'>Learn more</a></span>
|
|
188
|
+
</span>
|
|
176
189
|
</span>
|
|
177
190
|
<span class='summary-text' id='summary-text'>{{summaryText}}</span>
|
|
178
191
|
<button class='btn btn-primary' id='open-dialog'><span class='dot'></span><span class='label'>{{#if allConnected}}Manage{{else}}Connect{{/if}}</span></button>
|
|
@@ -318,6 +331,51 @@
|
|
|
318
331
|
|
|
319
332
|
var pendingId = null;
|
|
320
333
|
|
|
334
|
+
// The frame is sandboxed to an opaque origin, so its own navigations are
|
|
335
|
+
// treated as cross-site and lose the form's auth cookie. It asks the shell to
|
|
336
|
+
// move it instead, and the shell — on the real origin — sets `src`, which is a
|
|
337
|
+
// same-origin navigation that keeps the cookie. Narrowed to this form's own
|
|
338
|
+
// follow-up pages: the frame is author-scriptable, so this must not become a
|
|
339
|
+
// way to point it at arbitrary n8n pages. Returns null when the target isn't
|
|
340
|
+
// one of them.
|
|
341
|
+
//
|
|
342
|
+
// The flag tells the page it is rendering inside this shell, which is what
|
|
343
|
+
// makes it hand its own next navigation back here instead of doing it itself.
|
|
344
|
+
var FORM_WAITING_PATH = '{{formWaitingPath}}';
|
|
345
|
+
function resolveFrameNavigation(target) {
|
|
346
|
+
if (typeof target !== 'string' || !target || !FORM_WAITING_PATH) return null;
|
|
347
|
+
try {
|
|
348
|
+
var here = new URL(window.location.href);
|
|
349
|
+
var resolved = new URL(target, here);
|
|
350
|
+
if (resolved.origin !== here.origin) return null;
|
|
351
|
+
if (
|
|
352
|
+
resolved.pathname !== FORM_WAITING_PATH &&
|
|
353
|
+
resolved.pathname.indexOf(FORM_WAITING_PATH + '/') !== 0
|
|
354
|
+
) {
|
|
355
|
+
return null;
|
|
356
|
+
}
|
|
357
|
+
resolved.searchParams.set('n8nShellHosted', '1');
|
|
358
|
+
return resolved.toString();
|
|
359
|
+
} catch (e) {
|
|
360
|
+
return null;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// The author's own redirect target, once the form is done. Any http(s) URL is
|
|
365
|
+
// allowed — this is where the author said to send the submitter, and a form
|
|
366
|
+
// outside the shell goes there too — but the scheme has to be one of those two.
|
|
367
|
+
// Returns null otherwise.
|
|
368
|
+
function resolveExternalRedirect(target) {
|
|
369
|
+
if (typeof target !== 'string' || !target) return null;
|
|
370
|
+
try {
|
|
371
|
+
var resolved = new URL(target, window.location.href);
|
|
372
|
+
if (resolved.protocol !== 'http:' && resolved.protocol !== 'https:') return null;
|
|
373
|
+
return resolved.toString();
|
|
374
|
+
} catch (e) {
|
|
375
|
+
return null;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
321
379
|
// Connected only on the oauth-callback success signal — never on popup close,
|
|
322
380
|
// which also happens on provider-side failures.
|
|
323
381
|
function onSuccessSignal() { if (pendingId) markConnected(pendingId); }
|
|
@@ -328,10 +386,25 @@
|
|
|
328
386
|
});
|
|
329
387
|
} catch (e) {}
|
|
330
388
|
window.addEventListener('message', function (event) {
|
|
331
|
-
// The sandboxed form iframe can't spoof a connect:
|
|
332
|
-
//
|
|
333
|
-
// the
|
|
389
|
+
// The sandboxed form iframe can't spoof a connect: it is only ever answered
|
|
390
|
+
// with a page move inside this form, the author's own end-of-form redirect,
|
|
391
|
+
// or the POST gate's rejection, which carries ids and moves rows one way only
|
|
392
|
+
// — so the worst author script can do is degrade its own form's UX.
|
|
393
|
+
// `event.origin` is the string 'null' for an opaque-origin frame and cannot be
|
|
394
|
+
// checked; `event.source` identifies it.
|
|
334
395
|
if (frame && event.source === frame.contentWindow) {
|
|
396
|
+
if (event.data && event.data.type === 'n8n-form-navigate') {
|
|
397
|
+
var next = resolveFrameNavigation(event.data.url);
|
|
398
|
+
if (next) frame.src = next;
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
if (event.data && event.data.type === 'n8n-form-redirect') {
|
|
402
|
+
// The form is finished, so the author's redirect takes the whole tab —
|
|
403
|
+
// the same place a form rendered without this shell would end up.
|
|
404
|
+
var away = resolveExternalRedirect(event.data.url);
|
|
405
|
+
if (away) window.location.replace(away);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
335
408
|
handleGateRejection(event.data);
|
|
336
409
|
return;
|
|
337
410
|
}
|
|
@@ -455,6 +528,18 @@
|
|
|
455
528
|
document.querySelectorAll('.cred-menu.open').forEach(function (m) { m.classList.remove('open'); });
|
|
456
529
|
});
|
|
457
530
|
|
|
531
|
+
// Tap fallback for the info tooltip: hover/focus don't fire on touch
|
|
532
|
+
// (iOS Safari doesn't focus buttons on tap), so the button toggles it.
|
|
533
|
+
var summaryInfo = document.getElementById('summary-info');
|
|
534
|
+
if (summaryInfo) {
|
|
535
|
+
summaryInfo.querySelector('.summary-icon').addEventListener('click', function () {
|
|
536
|
+
summaryInfo.classList.toggle('open');
|
|
537
|
+
});
|
|
538
|
+
document.addEventListener('click', function (e) {
|
|
539
|
+
if (!summaryInfo.contains(e.target)) summaryInfo.classList.remove('open');
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
|
|
458
543
|
// Dialog (two or more accounts)
|
|
459
544
|
var overlay = document.getElementById('overlay');
|
|
460
545
|
var open = document.getElementById('open-dialog');
|
|
@@ -162,6 +162,8 @@
|
|
|
162
162
|
const url = new URL(window.location.href);
|
|
163
163
|
const formSignature = url.searchParams.get('signature');
|
|
164
164
|
|
|
165
|
+
{{> formHostNavigation path=hostNavigationPath withRedirect=true}}
|
|
166
|
+
|
|
165
167
|
let interval = 1000;
|
|
166
168
|
let timeoutId;
|
|
167
169
|
const checkExecutionStatus = async () => {
|
|
@@ -183,7 +185,7 @@
|
|
|
183
185
|
if (formSignature) {
|
|
184
186
|
redirectUrl.searchParams.set('signature', formSignature);
|
|
185
187
|
}
|
|
186
|
-
|
|
188
|
+
navigateTo(redirectUrl.toString());
|
|
187
189
|
return;
|
|
188
190
|
}
|
|
189
191
|
|
|
@@ -250,7 +252,7 @@
|
|
|
250
252
|
if (response.status === 200) {
|
|
251
253
|
const redirectUrl = document.getElementById("redirectUrl");
|
|
252
254
|
if (redirectUrl) {
|
|
253
|
-
|
|
255
|
+
redirectTo(redirectUrl.href);
|
|
254
256
|
}
|
|
255
257
|
}
|
|
256
258
|
|
|
@@ -262,7 +264,7 @@
|
|
|
262
264
|
} catch (e) {}
|
|
263
265
|
|
|
264
266
|
if (json?.redirectURL) {
|
|
265
|
-
|
|
267
|
+
redirectTo(json.redirectURL);
|
|
266
268
|
}
|
|
267
269
|
})
|
|
268
270
|
.catch(function (error) {
|
|
@@ -736,6 +736,8 @@
|
|
|
736
736
|
const url = new URL(window.location.href);
|
|
737
737
|
let formSignature = url.searchParams.get('signature');
|
|
738
738
|
|
|
739
|
+
{{> formHostNavigation path=hostNavigationPath withRedirect=true}}
|
|
740
|
+
|
|
739
741
|
function updateError(errorElement, action = 'add', message = '') {
|
|
740
742
|
if(action === 'add') {
|
|
741
743
|
errorElement.textContent = message;
|
|
@@ -999,7 +1001,7 @@
|
|
|
999
1001
|
if (formSignature) {
|
|
1000
1002
|
redirectUrl.searchParams.set('signature', formSignature);
|
|
1001
1003
|
}
|
|
1002
|
-
|
|
1004
|
+
navigateTo(redirectUrl.toString());
|
|
1003
1005
|
return;
|
|
1004
1006
|
}
|
|
1005
1007
|
|
|
@@ -1143,7 +1145,9 @@
|
|
|
1143
1145
|
}
|
|
1144
1146
|
|
|
1145
1147
|
if (json?.redirectURL) {
|
|
1146
|
-
|
|
1148
|
+
// The author's end-of-form redirect leaves the form, so inside the
|
|
1149
|
+
// hosting shell it must take the whole tab, not the sandboxed frame.
|
|
1150
|
+
redirectTo(json.redirectURL);
|
|
1147
1151
|
return;
|
|
1148
1152
|
}
|
|
1149
1153
|
|
|
@@ -1169,12 +1173,15 @@
|
|
|
1169
1173
|
|
|
1170
1174
|
if (response.status === 200) {
|
|
1171
1175
|
if(response.redirected) {
|
|
1172
|
-
|
|
1176
|
+
// Another page of this form moves the frame; anything else is a
|
|
1177
|
+
// redirect out of the form and takes the tab.
|
|
1178
|
+
if (isHostNavigable(response.url)) navigateTo(response.url);
|
|
1179
|
+
else redirectTo(response.url);
|
|
1173
1180
|
return;
|
|
1174
1181
|
}
|
|
1175
1182
|
const redirectUrl = document.getElementById("redirectUrl");
|
|
1176
1183
|
if (redirectUrl) {
|
|
1177
|
-
|
|
1184
|
+
redirectTo(redirectUrl.href);
|
|
1178
1185
|
} else {
|
|
1179
1186
|
form.style.display = 'none';
|
|
1180
1187
|
document.querySelector('#submitted-form').style.display = 'block';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Set only inside the n8n hosting shell's frame: the path prefix whose pages this
|
|
2
|
+
// page may hand to the host to navigate to. Empty everywhere else.
|
|
3
|
+
const hostNavigationPath = '{{path}}';
|
|
4
|
+
const isShellHosted = window.parent !== window && !!hostNavigationPath;
|
|
5
|
+
|
|
6
|
+
// True for this form's own follow-up pages, the only ones the shell will move to.
|
|
7
|
+
function isHostNavigable(target) {
|
|
8
|
+
if (!hostNavigationPath) return false;
|
|
9
|
+
try {
|
|
10
|
+
const here = new URL(window.location.href);
|
|
11
|
+
const resolved = new URL(target, here);
|
|
12
|
+
if (resolved.origin !== here.origin) return false;
|
|
13
|
+
return resolved.pathname === hostNavigationPath
|
|
14
|
+
|| resolved.pathname.startsWith(hostNavigationPath + '/');
|
|
15
|
+
} catch (e) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Ask the host for a move this document can't make itself: inside the shell it is
|
|
21
|
+
// sandboxed to an opaque origin, so a navigation it starts counts as cross-site and
|
|
22
|
+
// the browser withholds the form's own auth cookie. The shell runs on the real
|
|
23
|
+
// origin, so the move it makes for us keeps the cookie. `type` says which move —
|
|
24
|
+
// another page of this form inside the frame, or the author's redirect for the tab.
|
|
25
|
+
function requestHostNavigation(type, target) {
|
|
26
|
+
// targetOrigin '*': an opaque-origin document cannot name its parent's origin,
|
|
27
|
+
// and the payload is only a URL the parent can already read.
|
|
28
|
+
window.parent.postMessage({ type, url: String(target) }, '*');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Move to another page of this form.
|
|
32
|
+
function navigateTo(target) {
|
|
33
|
+
if (isShellHosted && isHostNavigable(target)) requestHostNavigation('n8n-form-navigate', target);
|
|
34
|
+
else window.location.replace(target);
|
|
35
|
+
}
|
|
36
|
+
{{#if withRedirect}}
|
|
37
|
+
|
|
38
|
+
// Leave for the redirect the form's author configured. The form is finished, so this
|
|
39
|
+
// takes the whole tab, which is where a form rendered without the shell ends up too.
|
|
40
|
+
function redirectTo(target) {
|
|
41
|
+
if (isShellHosted) requestHostNavigation('n8n-form-redirect', target);
|
|
42
|
+
else window.location.replace(target);
|
|
43
|
+
}
|
|
44
|
+
{{/if}}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { User } from '@n8n/db';
|
|
2
|
-
import { BinaryDataRepository, ExecutionRepository } from '@n8n/db';
|
|
3
|
-
import { WorkflowSharingService } from '../workflows/workflow-sharing.service';
|
|
4
|
-
export declare class BinaryDataAccessService {
|
|
5
|
-
private readonly workflowSharingService;
|
|
6
|
-
private readonly executionRepository;
|
|
7
|
-
private readonly binaryDataRepository;
|
|
8
|
-
constructor(workflowSharingService: WorkflowSharingService, executionRepository: ExecutionRepository, binaryDataRepository: BinaryDataRepository);
|
|
9
|
-
hasReadAccess(user: User, binaryDataId: string): Promise<boolean>;
|
|
10
|
-
private resolveExecutionId;
|
|
11
|
-
}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BinaryDataAccessService = void 0;
|
|
13
|
-
const db_1 = require("@n8n/db");
|
|
14
|
-
const di_1 = require("@n8n/di");
|
|
15
|
-
const n8n_core_1 = require("n8n-core");
|
|
16
|
-
const workflow_sharing_service_1 = require("../workflows/workflow-sharing.service");
|
|
17
|
-
let BinaryDataAccessService = class BinaryDataAccessService {
|
|
18
|
-
constructor(workflowSharingService, executionRepository, binaryDataRepository) {
|
|
19
|
-
this.workflowSharingService = workflowSharingService;
|
|
20
|
-
this.executionRepository = executionRepository;
|
|
21
|
-
this.binaryDataRepository = binaryDataRepository;
|
|
22
|
-
}
|
|
23
|
-
async hasReadAccess(user, binaryDataId) {
|
|
24
|
-
const executionId = await this.resolveExecutionId(binaryDataId);
|
|
25
|
-
if (!executionId)
|
|
26
|
-
return false;
|
|
27
|
-
const accessibleWorkflowIds = await this.workflowSharingService.getSharedWorkflowIds(user, {
|
|
28
|
-
scopes: ['workflow:read'],
|
|
29
|
-
});
|
|
30
|
-
return await this.executionRepository.existsForAccessibleWorkflows(executionId, accessibleWorkflowIds);
|
|
31
|
-
}
|
|
32
|
-
async resolveExecutionId(binaryDataId) {
|
|
33
|
-
const separatorIndex = binaryDataId.indexOf(':');
|
|
34
|
-
if (separatorIndex === -1)
|
|
35
|
-
return null;
|
|
36
|
-
const mode = binaryDataId.substring(0, separatorIndex);
|
|
37
|
-
const fileId = binaryDataId.substring(separatorIndex + 1);
|
|
38
|
-
if (mode === 'database') {
|
|
39
|
-
const source = await this.binaryDataRepository.findSourceByFileId(fileId);
|
|
40
|
-
return source?.sourceType === 'execution' ? source.sourceId : null;
|
|
41
|
-
}
|
|
42
|
-
return (0, n8n_core_1.getExecutionIdFromFileId)(fileId);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
exports.BinaryDataAccessService = BinaryDataAccessService;
|
|
46
|
-
exports.BinaryDataAccessService = BinaryDataAccessService = __decorate([
|
|
47
|
-
(0, di_1.Service)(),
|
|
48
|
-
__metadata("design:paramtypes", [workflow_sharing_service_1.WorkflowSharingService, db_1.ExecutionRepository, db_1.BinaryDataRepository])
|
|
49
|
-
], BinaryDataAccessService);
|
|
50
|
-
//# sourceMappingURL=binary-data-access.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"binary-data-access.service.js","sourceRoot":"","sources":["../../src/binary-data/binary-data-access.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,gCAAoE;AACpE,gCAAkC;AAClC,uCAAoD;AAEpD,mFAA8E;AAOvE,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IACnC,YACkB,sBAA8C,EAC9C,mBAAwC,EACxC,oBAA0C;sCAF1C,sBAAsB;mCACtB,mBAAmB;oCACnB,oBAAoB;IACnC,CAAC;IAGJ,KAAK,CAAC,aAAa,CAAC,IAAU,EAAE,YAAoB;QACnD,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;QAChE,IAAI,CAAC,WAAW;YAAE,OAAO,KAAK,CAAC;QAE/B,MAAM,qBAAqB,GAAG,MAAM,IAAI,CAAC,sBAAsB,CAAC,oBAAoB,CAAC,IAAI,EAAE;YAC1F,MAAM,EAAE,CAAC,eAAe,CAAC;SACzB,CAAC,CAAC;QAEH,OAAO,MAAM,IAAI,CAAC,mBAAmB,CAAC,4BAA4B,CACjE,WAAW,EACX,qBAAqB,CACrB,CAAC;IACH,CAAC;IAMO,KAAK,CAAC,kBAAkB,CAAC,YAAoB;QACpD,MAAM,cAAc,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,cAAc,KAAK,CAAC,CAAC;YAAE,OAAO,IAAI,CAAC;QAEvC,MAAM,IAAI,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,CAAC,cAAc,GAAG,CAAC,CAAC,CAAC;QAG1D,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAC1E,OAAO,MAAM,EAAE,UAAU,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,CAAC;QAGD,OAAO,IAAA,mCAAwB,EAAC,MAAM,CAAC,CAAC;IACzC,CAAC;CACD,CAAA;;kCA1CY,uBAAuB;IADnC,IAAA,YAAO,GAAE;qCAGiC,iDAAsB,EACzB,wBAAmB,EAClB,yBAAoB;GAJhD,uBAAuB,CA0CnC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type AgentBuilderAdminSettingsResponse } from '@n8n/api-types';
|
|
2
|
-
import { AuthenticatedRequest } from '@n8n/db';
|
|
3
|
-
import type { Response } from 'express';
|
|
4
|
-
import { AgentsBuilderSettingsService } from './agents-builder-settings.service';
|
|
5
|
-
export declare class AgentsBuilderSettingsController {
|
|
6
|
-
private readonly settingsService;
|
|
7
|
-
constructor(settingsService: AgentsBuilderSettingsService);
|
|
8
|
-
getAdminSettings(_req: AuthenticatedRequest): Promise<AgentBuilderAdminSettingsResponse>;
|
|
9
|
-
updateAdminSettings(req: AuthenticatedRequest, _res: Response): Promise<AgentBuilderAdminSettingsResponse>;
|
|
10
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AgentsBuilderSettingsController = void 0;
|
|
13
|
-
const api_types_1 = require("@n8n/api-types");
|
|
14
|
-
const decorators_1 = require("@n8n/decorators");
|
|
15
|
-
const bad_request_error_1 = require("../../../errors/response-errors/bad-request.error");
|
|
16
|
-
const agents_builder_settings_service_1 = require("./agents-builder-settings.service");
|
|
17
|
-
let AgentsBuilderSettingsController = class AgentsBuilderSettingsController {
|
|
18
|
-
constructor(settingsService) {
|
|
19
|
-
this.settingsService = settingsService;
|
|
20
|
-
}
|
|
21
|
-
async getAdminSettings(_req) {
|
|
22
|
-
return await this.settingsService.getAdminSettings();
|
|
23
|
-
}
|
|
24
|
-
async updateAdminSettings(req, _res) {
|
|
25
|
-
const parseResult = api_types_1.AgentBuilderAdminSettingsUpdateDto.safeParse(req.body);
|
|
26
|
-
if (!parseResult.success) {
|
|
27
|
-
throw new bad_request_error_1.BadRequestError(parseResult.error.errors[0]?.message ?? 'Invalid request body');
|
|
28
|
-
}
|
|
29
|
-
await this.settingsService.updateAdminSettings(parseResult.data);
|
|
30
|
-
return await this.settingsService.getAdminSettings();
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.AgentsBuilderSettingsController = AgentsBuilderSettingsController;
|
|
34
|
-
__decorate([
|
|
35
|
-
(0, decorators_1.Get)('/settings'),
|
|
36
|
-
(0, decorators_1.GlobalScope)('agent:manage'),
|
|
37
|
-
__metadata("design:type", Function),
|
|
38
|
-
__metadata("design:paramtypes", [Object]),
|
|
39
|
-
__metadata("design:returntype", Promise)
|
|
40
|
-
], AgentsBuilderSettingsController.prototype, "getAdminSettings", null);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, decorators_1.Patch)('/settings'),
|
|
43
|
-
(0, decorators_1.GlobalScope)('agent:manage'),
|
|
44
|
-
__metadata("design:type", Function),
|
|
45
|
-
__metadata("design:paramtypes", [Object, Object]),
|
|
46
|
-
__metadata("design:returntype", Promise)
|
|
47
|
-
], AgentsBuilderSettingsController.prototype, "updateAdminSettings", null);
|
|
48
|
-
exports.AgentsBuilderSettingsController = AgentsBuilderSettingsController = __decorate([
|
|
49
|
-
(0, decorators_1.RestController)('/agent-builder'),
|
|
50
|
-
__metadata("design:paramtypes", [agents_builder_settings_service_1.AgentsBuilderSettingsService])
|
|
51
|
-
], AgentsBuilderSettingsController);
|
|
52
|
-
//# sourceMappingURL=agents-builder-settings.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents-builder-settings.controller.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/agents-builder-settings.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAGwB;AAExB,gDAA0E;AAG1E,kFAA6E;AAE7E,uFAAiF;AAG1E,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAC3C,YAA6B,eAA6C;+BAA7C,eAAe;IAAiC,CAAC;IAIxE,AAAN,KAAK,CAAC,gBAAgB,CAAC,IAA0B;QAChD,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,CAAC;IACtD,CAAC;IAIK,AAAN,KAAK,CAAC,mBAAmB,CACxB,GAAyB,EACzB,IAAc;QAMd,MAAM,WAAW,GAAG,8CAAkC,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC3E,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC1B,MAAM,IAAI,mCAAe,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI,sBAAsB,CAAC,CAAC;QAC3F,CAAC;QACD,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACjE,OAAO,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB,EAAE,CAAC;IACtD,CAAC;CACD,CAAA;;AArBM;IAFL,IAAA,gBAAG,EAAC,WAAW,CAAC;IAChB,IAAA,wBAAW,EAAC,cAAc,CAAC;;;;uEAG3B;AAIK;IAFL,IAAA,kBAAK,EAAC,WAAW,CAAC;IAClB,IAAA,wBAAW,EAAC,cAAc,CAAC;;;;0EAe3B;0CAzBW,+BAA+B;IAD3C,IAAA,2BAAc,EAAC,gBAAgB,CAAC;qCAEc,8DAA4B;GAD9D,+BAA+B,CA0B3C"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { ModelConfig } from '@n8n/agents';
|
|
2
|
-
import { type AgentBuilderAdminSettingsResponse, type AgentBuilderAdminSettingsUpdateRequest } from '@n8n/api-types';
|
|
3
|
-
import { Logger } from '@n8n/backend-common';
|
|
4
|
-
import { OutboundHttp } from '@n8n/backend-network';
|
|
5
|
-
import { GlobalConfig } from '@n8n/config';
|
|
6
|
-
import type { User } from '@n8n/db';
|
|
7
|
-
import { SettingsRepository } from '@n8n/db';
|
|
8
|
-
import { CredentialsFinderService } from '../../../credentials/credentials-finder.service';
|
|
9
|
-
import { CredentialsService } from '../../../credentials/credentials.service';
|
|
10
|
-
import { AiService } from '../../../services/ai.service';
|
|
11
|
-
interface BuilderTelemetryProxyConfig {
|
|
12
|
-
apiUrl: string;
|
|
13
|
-
getAuthHeaders: () => Promise<Record<string, string>>;
|
|
14
|
-
}
|
|
15
|
-
interface ResolvedBuilderModelConfig {
|
|
16
|
-
config: ModelConfig;
|
|
17
|
-
isProxied: boolean;
|
|
18
|
-
tracingProxyConfig?: BuilderTelemetryProxyConfig;
|
|
19
|
-
}
|
|
20
|
-
export declare class AgentsBuilderSettingsService {
|
|
21
|
-
private readonly logger;
|
|
22
|
-
private readonly settingsRepository;
|
|
23
|
-
private readonly aiService;
|
|
24
|
-
private readonly globalConfig;
|
|
25
|
-
private readonly credentialsService;
|
|
26
|
-
private readonly credentialsFinderService;
|
|
27
|
-
private readonly outboundHttp;
|
|
28
|
-
private cached;
|
|
29
|
-
constructor(logger: Logger, settingsRepository: SettingsRepository, aiService: AiService, globalConfig: GlobalConfig, credentialsService: CredentialsService, credentialsFinderService: CredentialsFinderService, outboundHttp: OutboundHttp);
|
|
30
|
-
private loadSettings;
|
|
31
|
-
private persist;
|
|
32
|
-
getAdminSettings(): Promise<AgentBuilderAdminSettingsResponse>;
|
|
33
|
-
updateAdminSettings(payload: AgentBuilderAdminSettingsUpdateRequest): Promise<void>;
|
|
34
|
-
resolveModelConfig(user: User): Promise<ResolvedBuilderModelConfig>;
|
|
35
|
-
private tryResolveCustomCredential;
|
|
36
|
-
private resolveProxyModel;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AgentsBuilderSettingsService = void 0;
|
|
13
|
-
const api_types_1 = require("@n8n/api-types");
|
|
14
|
-
const backend_common_1 = require("@n8n/backend-common");
|
|
15
|
-
const backend_network_1 = require("@n8n/backend-network");
|
|
16
|
-
const config_1 = require("@n8n/config");
|
|
17
|
-
const db_1 = require("@n8n/db");
|
|
18
|
-
const di_1 = require("@n8n/di");
|
|
19
|
-
const n8n_workflow_1 = require("n8n-workflow");
|
|
20
|
-
const nanoid_1 = require("nanoid");
|
|
21
|
-
const constants_1 = require("../../../constants");
|
|
22
|
-
const credentials_finder_service_1 = require("../../../credentials/credentials-finder.service");
|
|
23
|
-
const credentials_service_1 = require("../../../credentials/credentials.service");
|
|
24
|
-
const unprocessable_error_1 = require("../../../errors/response-errors/unprocessable.error");
|
|
25
|
-
const ai_service_1 = require("../../../services/ai.service");
|
|
26
|
-
const proxy_token_manager_1 = require("../../../services/proxy-token-manager");
|
|
27
|
-
const ai_proxy_language_model_1 = require("../../../utils/ai-proxy-language-model");
|
|
28
|
-
const errors_1 = require("./errors");
|
|
29
|
-
const credential_field_mapping_1 = require("../json-config/credential-field-mapping");
|
|
30
|
-
const SETTINGS_KEY = 'agentBuilder.settings';
|
|
31
|
-
const DEFAULT_SETTINGS = { mode: 'default' };
|
|
32
|
-
function readEnvAnthropicKey() {
|
|
33
|
-
const key = process.env.N8N_AI_ANTHROPIC_KEY ?? process.env.ANTHROPIC_API_KEY;
|
|
34
|
-
return key && key.length > 0 ? key : null;
|
|
35
|
-
}
|
|
36
|
-
function readEnvInstanceAiModelConfig() {
|
|
37
|
-
const model = process.env.N8N_INSTANCE_AI_MODEL?.trim();
|
|
38
|
-
const apiKey = process.env.N8N_INSTANCE_AI_MODEL_API_KEY?.trim();
|
|
39
|
-
if (!model || !model.includes('/') || !apiKey)
|
|
40
|
-
return null;
|
|
41
|
-
const modelUrl = process.env.N8N_INSTANCE_AI_MODEL_URL?.trim();
|
|
42
|
-
const id = model;
|
|
43
|
-
if (modelUrl) {
|
|
44
|
-
return { id, url: modelUrl, apiKey };
|
|
45
|
-
}
|
|
46
|
-
return { id, apiKey };
|
|
47
|
-
}
|
|
48
|
-
let AgentsBuilderSettingsService = class AgentsBuilderSettingsService {
|
|
49
|
-
constructor(logger, settingsRepository, aiService, globalConfig, credentialsService, credentialsFinderService, outboundHttp) {
|
|
50
|
-
this.logger = logger;
|
|
51
|
-
this.settingsRepository = settingsRepository;
|
|
52
|
-
this.aiService = aiService;
|
|
53
|
-
this.globalConfig = globalConfig;
|
|
54
|
-
this.credentialsService = credentialsService;
|
|
55
|
-
this.credentialsFinderService = credentialsFinderService;
|
|
56
|
-
this.outboundHttp = outboundHttp;
|
|
57
|
-
this.cached = null;
|
|
58
|
-
}
|
|
59
|
-
async loadSettings() {
|
|
60
|
-
if (this.cached)
|
|
61
|
-
return this.cached;
|
|
62
|
-
const row = await this.settingsRepository.findByKey(SETTINGS_KEY);
|
|
63
|
-
if (!row) {
|
|
64
|
-
this.cached = DEFAULT_SETTINGS;
|
|
65
|
-
return this.cached;
|
|
66
|
-
}
|
|
67
|
-
const raw = (0, n8n_workflow_1.jsonParse)(row.value, { fallbackValue: undefined });
|
|
68
|
-
const parseResult = api_types_1.agentBuilderAdminSettingsSchema.safeParse(raw);
|
|
69
|
-
this.cached = parseResult.success ? parseResult.data : DEFAULT_SETTINGS;
|
|
70
|
-
return this.cached;
|
|
71
|
-
}
|
|
72
|
-
async persist(settings) {
|
|
73
|
-
await this.settingsRepository.upsert({
|
|
74
|
-
key: SETTINGS_KEY,
|
|
75
|
-
value: JSON.stringify(settings),
|
|
76
|
-
loadOnStartup: true,
|
|
77
|
-
}, ['key']);
|
|
78
|
-
this.cached = settings;
|
|
79
|
-
}
|
|
80
|
-
async getAdminSettings() {
|
|
81
|
-
const settings = await this.loadSettings();
|
|
82
|
-
return { settings };
|
|
83
|
-
}
|
|
84
|
-
async updateAdminSettings(payload) {
|
|
85
|
-
if (payload.mode === 'custom' && !(0, credential_field_mapping_1.isSupportedAgentProvider)(payload.provider)) {
|
|
86
|
-
throw new unprocessable_error_1.UnprocessableRequestError(`Unsupported provider "${payload.provider}". Supported: ${credential_field_mapping_1.SUPPORTED_AGENT_PROVIDERS.join(', ')}`);
|
|
87
|
-
}
|
|
88
|
-
await this.persist(payload);
|
|
89
|
-
}
|
|
90
|
-
async resolveModelConfig(user) {
|
|
91
|
-
const settings = await this.loadSettings();
|
|
92
|
-
if (settings.mode === 'custom') {
|
|
93
|
-
const fromCredential = await this.tryResolveCustomCredential(settings);
|
|
94
|
-
if (fromCredential) {
|
|
95
|
-
return { config: fromCredential, isProxied: false };
|
|
96
|
-
}
|
|
97
|
-
this.logger.warn('Agent builder custom credential could not be resolved; falling back to default', { credentialId: settings.credentialId });
|
|
98
|
-
}
|
|
99
|
-
if (this.aiService.isProxyEnabled()) {
|
|
100
|
-
return await this.resolveProxyModel(user);
|
|
101
|
-
}
|
|
102
|
-
const instanceAiEnv = readEnvInstanceAiModelConfig();
|
|
103
|
-
if (instanceAiEnv) {
|
|
104
|
-
return { config: instanceAiEnv, isProxied: false };
|
|
105
|
-
}
|
|
106
|
-
const envKey = readEnvAnthropicKey();
|
|
107
|
-
if (envKey) {
|
|
108
|
-
return {
|
|
109
|
-
config: {
|
|
110
|
-
id: `anthropic/${api_types_1.AGENT_BUILDER_DEFAULT_MODEL}`,
|
|
111
|
-
apiKey: envKey,
|
|
112
|
-
},
|
|
113
|
-
isProxied: false,
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
throw new errors_1.BuilderNotConfiguredError();
|
|
117
|
-
}
|
|
118
|
-
async tryResolveCustomCredential(settings) {
|
|
119
|
-
if (!(0, credential_field_mapping_1.isSupportedAgentProvider)(settings.provider)) {
|
|
120
|
-
this.logger.warn('Agent builder provider is not supported by the runtime', {
|
|
121
|
-
provider: settings.provider,
|
|
122
|
-
credentialId: settings.credentialId,
|
|
123
|
-
});
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
const credential = await this.credentialsFinderService.findById(settings.credentialId);
|
|
127
|
-
if (!credential)
|
|
128
|
-
return null;
|
|
129
|
-
const data = await this.credentialsService.decrypt(credential, true);
|
|
130
|
-
const mapped = (0, credential_field_mapping_1.mapCredentialForProvider)(settings.provider, data);
|
|
131
|
-
const id = `${settings.provider}/${settings.modelName}`;
|
|
132
|
-
return { id, ...mapped };
|
|
133
|
-
}
|
|
134
|
-
async resolveProxyModel(user) {
|
|
135
|
-
const client = await this.aiService.getClient();
|
|
136
|
-
const proxyBaseUrl = client.getApiProxyBaseUrl().replace(/\/$/, '');
|
|
137
|
-
const configuredModelId = this.globalConfig.instanceAi.model.trim();
|
|
138
|
-
const isExactKimi = (0, api_types_1.isMoonshotaiKimiK3ModelId)(configuredModelId);
|
|
139
|
-
const modelId = isExactKimi ? configuredModelId : api_types_1.AGENT_BUILDER_DEFAULT_MODEL;
|
|
140
|
-
const tokenManager = new proxy_token_manager_1.ProxyTokenManager(async () => {
|
|
141
|
-
return await client.getBuilderApiProxyToken({ id: user.id }, { userMessageId: (0, nanoid_1.nanoid)() });
|
|
142
|
-
});
|
|
143
|
-
const proxyHeaders = {
|
|
144
|
-
feature: 'agent-builder',
|
|
145
|
-
n8nVersion: constants_1.N8N_VERSION,
|
|
146
|
-
};
|
|
147
|
-
const model = await (0, ai_proxy_language_model_1.createProxyLanguageModel)({
|
|
148
|
-
proxyBaseUrl,
|
|
149
|
-
modelId,
|
|
150
|
-
tokenManager,
|
|
151
|
-
feature: proxyHeaders.feature,
|
|
152
|
-
n8nVersion: proxyHeaders.n8nVersion,
|
|
153
|
-
outboundHttp: this.outboundHttp,
|
|
154
|
-
});
|
|
155
|
-
const tracingHeaders = (0, api_types_1.buildProxyHeaders)(proxyHeaders);
|
|
156
|
-
return {
|
|
157
|
-
config: model,
|
|
158
|
-
isProxied: true,
|
|
159
|
-
tracingProxyConfig: {
|
|
160
|
-
apiUrl: proxyBaseUrl + '/langsmith',
|
|
161
|
-
getAuthHeaders: async () => ({
|
|
162
|
-
...(await tokenManager.getAuthHeaders()),
|
|
163
|
-
...tracingHeaders,
|
|
164
|
-
}),
|
|
165
|
-
},
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
exports.AgentsBuilderSettingsService = AgentsBuilderSettingsService;
|
|
170
|
-
exports.AgentsBuilderSettingsService = AgentsBuilderSettingsService = __decorate([
|
|
171
|
-
(0, di_1.Service)(),
|
|
172
|
-
__metadata("design:paramtypes", [backend_common_1.Logger, db_1.SettingsRepository, ai_service_1.AiService, config_1.GlobalConfig, credentials_service_1.CredentialsService, credentials_finder_service_1.CredentialsFinderService, backend_network_1.OutboundHttp])
|
|
173
|
-
], AgentsBuilderSettingsService);
|
|
174
|
-
//# sourceMappingURL=agents-builder-settings.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agents-builder-settings.service.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/agents-builder-settings.service.ts"],"names":[],"mappings":"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"}
|