n8n 2.25.6 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/active-executions.js +1 -1
- package/dist/active-executions.js.map +1 -1
- package/dist/active-workflow-manager.d.ts +7 -7
- package/dist/active-workflow-manager.js +20 -20
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/agent-library-bundle.js +42 -10
- package/dist/build.tsbuildinfo +1 -1
- package/dist/chat/chat-execution-manager.d.ts +3 -1
- package/dist/chat/chat-execution-manager.js +6 -3
- package/dist/chat/chat-execution-manager.js.map +1 -1
- package/dist/chat/chat-service.types.d.ts +4 -4
- package/dist/commands/base-command.js +2 -2
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/execute-batch.d.ts +2 -2
- package/dist/commands/execute.d.ts +2 -2
- package/dist/commands/export/credentials.d.ts +4 -4
- package/dist/commands/export/entities.d.ts +2 -2
- package/dist/commands/export/workflow.d.ts +4 -4
- package/dist/commands/import/credentials.d.ts +2 -2
- package/dist/commands/import/workflow.d.ts +2 -2
- package/dist/commands/start.js +1 -1
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/ttwf/generate.d.ts +2 -2
- package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
- package/dist/controllers/api-keys.controller.d.ts +16 -4
- package/dist/controllers/api-keys.controller.js +11 -8
- package/dist/controllers/api-keys.controller.js.map +1 -1
- package/dist/controllers/e2e.controller.d.ts +15 -0
- package/dist/controllers/e2e.controller.js +60 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.js +7 -9
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.js +3 -3
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +1 -1
- package/dist/controllers/project.controller.js +9 -1
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.d.ts +1 -1
- package/dist/controllers/security-settings.controller.js +18 -14
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/controllers/telemetry.controller.d.ts +4 -1
- package/dist/controllers/telemetry.controller.js +61 -2
- package/dist/controllers/telemetry.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +2 -2
- package/dist/credentials/credential-connection-status-provider.interface.d.ts +1 -0
- package/dist/credentials/credential-connection-status-proxy.d.ts +1 -0
- package/dist/credentials/credential-connection-status-proxy.js +5 -0
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
- package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -0
- package/dist/credentials/credentials.controller.d.ts +3 -1
- package/dist/credentials/credentials.controller.js +23 -2
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials-helper.js +3 -0
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/http-error-serializers.js +22 -2
- package/dist/errors/http-error-serializers.js.map +1 -1
- package/dist/errors/response-errors/conflict.error.d.ts +2 -1
- package/dist/errors/response-errors/conflict.error.js +2 -1
- package/dist/errors/response-errors/conflict.error.js.map +1 -1
- package/dist/evaluation.ee/evaluation-config-validator.d.ts +1 -0
- package/dist/evaluation.ee/evaluation-config-validator.js +69 -0
- package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -1
- package/dist/evaluation.ee/test-runner/evaluation-metrics.ee.js +2 -1
- package/dist/evaluation.ee/test-runner/evaluation-metrics.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +6 -2
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +59 -16
- package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +28 -1
- package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -1
- package/dist/evaluation.ee/test-runs.controller.ee.js +6 -1
- package/dist/evaluation.ee/test-runs.controller.ee.js.map +1 -1
- package/dist/events/event.service.d.ts +2 -1
- package/dist/events/event.service.js.map +1 -1
- package/dist/events/maps/execution-data.event-map.d.ts +14 -0
- package/dist/events/maps/execution-data.event-map.js +3 -0
- package/dist/events/maps/execution-data.event-map.js.map +1 -0
- package/dist/events/maps/relay.event-map.d.ts +19 -5
- package/dist/events/relays/log-streaming.event-relay.js +2 -0
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +3 -0
- package/dist/events/relays/telemetry.event-relay.js +47 -6
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/save-execution-progress.js +3 -3
- package/dist/execution-lifecycle/save-execution-progress.js.map +1 -1
- package/dist/execution-lifecycle/shared/shared-hook-functions.js +3 -3
- package/dist/execution-lifecycle/shared/shared-hook-functions.js.map +1 -1
- package/dist/executions/execution-persistence.d.ts +8 -1
- package/dist/executions/execution-persistence.js +183 -42
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution-recovery.service.d.ts +3 -1
- package/dist/executions/execution-recovery.service.js +7 -4
- package/dist/executions/execution-recovery.service.js.map +1 -1
- package/dist/executions/execution.service.d.ts +1 -0
- package/dist/executions/execution.service.js +21 -7
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/interfaces.d.ts +1 -1
- package/dist/load-nodes-and-credentials.js +6 -0
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus-metrics.service.d.ts +5 -2
- package/dist/metrics/prometheus-metrics.service.js +74 -3
- package/dist/metrics/prometheus-metrics.service.js.map +1 -1
- package/dist/metrics/types.d.ts +1 -1
- package/dist/modules/agents/agent-execution.service.d.ts +2 -0
- package/dist/modules/agents/agent-execution.service.js +2 -2
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +84 -0
- package/dist/modules/agents/agent-runtime-reconstruction.service.js +362 -0
- package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -0
- package/dist/modules/agents/agent-sse-stream.js +15 -1
- package/dist/modules/agents/agent-sse-stream.js.map +1 -1
- package/dist/modules/agents/agents-tools.service.js +8 -1
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +34 -19
- package/dist/modules/agents/agents.controller.js +39 -3
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +1 -1
- package/dist/modules/agents/agents.service.d.ts +13 -31
- package/dist/modules/agents/agents.service.js +154 -282
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.js +1 -0
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +21 -2
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.js +3 -11
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js +1 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js +10 -0
- package/dist/modules/agents/builder/interactive/llm-provider-defaults.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +5 -3
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +7 -2
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/skills/index.js +2 -0
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +101 -0
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +2 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js +8 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.js +1 -1
- package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
- package/dist/modules/agents/execution-recorder.d.ts +3 -0
- package/dist/modules/agents/execution-recorder.js +75 -10
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +4 -7
- package/dist/modules/agents/integrations/agent-chat-bridge.js +138 -105
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +5 -0
- package/dist/modules/agents/integrations/chat-integration.service.js +5 -0
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +21 -11
- package/dist/modules/agents/integrations/component-mapper.js +50 -20
- package/dist/modules/agents/integrations/component-mapper.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 -9
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -1
- package/dist/modules/agents/integrations/integration-tools.js +176 -31
- package/dist/modules/agents/integrations/integration-tools.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js +1 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +1 -1
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/json-config/credential-field-mapping.js +1 -0
- package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +2 -1
- package/dist/modules/agents/json-config/from-json-config.js +41 -15
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +0 -6
- package/dist/modules/agents/json-config/mcp-client-factory.js +2 -31
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
- package/dist/modules/agents/json-config/model-config.d.ts +2 -0
- package/dist/modules/agents/json-config/model-config.js +11 -0
- package/dist/modules/agents/json-config/model-config.js.map +1 -0
- package/dist/modules/agents/json-config/model-id.d.ts +1 -0
- package/dist/modules/agents/json-config/model-id.js +8 -0
- package/dist/modules/agents/json-config/model-id.js.map +1 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +0 -1
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js +3 -7
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +1 -1
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.d.ts +1 -0
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +63 -0
- package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -0
- package/dist/modules/agents/model-catalog.d.ts +1 -0
- package/dist/modules/agents/model-catalog.js +15 -0
- package/dist/modules/agents/model-catalog.js.map +1 -0
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +5 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js +5 -3
- package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +17 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +66 -0
- package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +27 -0
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +235 -0
- package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -0
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +20 -0
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +87 -0
- package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.d.ts +2 -2
- package/dist/modules/agents/tools/knowledge/schemas.d.ts +91 -91
- package/dist/modules/agents/tools/node-tool-factory.js +9 -12
- package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
- package/dist/modules/agents/tools/workflow-tool-factory.d.ts +2 -3
- package/dist/modules/agents/tools/workflow-tool-factory.js +6 -4
- package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
- package/dist/modules/agents/utils/agent-stream.d.ts +2 -0
- package/dist/modules/agents/utils/agent-stream.js +27 -0
- package/dist/modules/agents/utils/agent-stream.js.map +1 -0
- package/dist/modules/agents/utils/execution-to-message-mapper.js +2 -0
- package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
- package/dist/modules/agents/utils/structured-output-error.d.ts +1 -0
- package/dist/modules/agents/utils/structured-output-error.js +34 -0
- package/dist/modules/agents/utils/structured-output-error.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub-execution-watcher.service.d.ts +3 -3
- package/dist/modules/chat-hub/chat-hub-execution-watcher.service.js +5 -5
- package/dist/modules/chat-hub/chat-hub-execution-watcher.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-execution.service.d.ts +3 -1
- package/dist/modules/chat-hub/chat-hub-execution.service.js +6 -3
- package/dist/modules/chat-hub/chat-hub-execution.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub-title.service.d.ts +4 -3
- package/dist/modules/chat-hub/chat-hub-title.service.js +5 -5
- package/dist/modules/chat-hub/chat-hub-title.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
- package/dist/modules/chat-hub/chat-hub.service.d.ts +4 -3
- package/dist/modules/chat-hub/chat-hub.service.js +5 -5
- package/dist/modules/chat-hub/chat-hub.service.js.map +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +4 -4
- package/dist/modules/chat-hub/chat-hub.types.d.ts +5 -5
- package/dist/modules/chat-hub/dto/chat-models-request.dto.d.ts +1 -1
- package/dist/modules/data-table/data-table.module.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-introspection-identifier.d.ts +2 -2
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.d.ts +1 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js +3 -0
- package/dist/modules/dynamic-credentials.ee/credential-resolvers/n8n-credential-resolver.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.d.ts +5 -0
- package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js +15 -0
- package/dist/modules/dynamic-credentials.ee/database/repositories/dynamic-credential-user-entry.repository.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +9 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +57 -3
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +14 -3
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/external-secrets.ee/providers/infisical.d.ts +20 -14
- package/dist/modules/external-secrets.ee/providers/infisical.js +215 -90
- package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
- package/dist/modules/favorites/dto/add-favorite.dto.d.ts +1 -1
- package/dist/modules/insights/database/entities/insights-shared.d.ts +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +2 -1
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +2 -3
- package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +1 -1
- package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +3 -3
- package/dist/modules/insights/insights.service.d.ts +3 -3
- package/dist/modules/instance-ai/entities/index.d.ts +1 -0
- package/dist/modules/instance-ai/entities/index.js +3 -1
- package/dist/modules/instance-ai/entities/index.js.map +1 -1
- package/dist/modules/instance-ai/entities/instance-ai-mcp-registry-connection.entity.d.ts +12 -0
- package/dist/modules/instance-ai/entities/instance-ai-mcp-registry-connection.entity.js +42 -0
- package/dist/modules/instance-ai/entities/instance-ai-mcp-registry-connection.entity.js.map +1 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.d.ts +3 -1
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js +10 -0
- package/dist/modules/instance-ai/entities/instance-ai-thread.entity.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +8 -2
- package/dist/modules/instance-ai/eval/execution.service.js +183 -40
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +5 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/extract-resolved-node-parameters.d.ts +1 -2
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js +4 -2
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-gateway.service.d.ts +31 -0
- package/dist/modules/instance-ai/instance-ai-gateway.service.js +84 -0
- package/dist/modules/instance-ai/instance-ai-gateway.service.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +5 -4
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +10 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +47 -5
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-test.controller.d.ts +6 -2
- package/dist/modules/instance-ai/instance-ai-test.controller.js +17 -3
- package/dist/modules/instance-ai/instance-ai-test.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +5 -5
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +104 -36
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.d.ts +8 -6
- package/dist/modules/instance-ai/instance-ai.controller.js +31 -36
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +4 -1
- package/dist/modules/instance-ai/instance-ai.module.js +7 -6
- package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +50 -41
- package/dist/modules/instance-ai/instance-ai.service.js +599 -246
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/internal-messages.js +1 -1
- package/dist/modules/instance-ai/internal-messages.js.map +1 -1
- package/dist/modules/instance-ai/mcp/index.d.ts +1 -0
- package/dist/modules/instance-ai/mcp/index.js +18 -0
- package/dist/modules/instance-ai/mcp/index.js.map +1 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.d.ts +17 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js +125 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-connection.controller.js.map +1 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +35 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +264 -0
- package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -0
- package/dist/modules/instance-ai/planned-task-action-runner.d.ts +91 -0
- package/dist/modules/instance-ai/planned-task-action-runner.js +138 -0
- package/dist/modules/instance-ai/planned-task-action-runner.js.map +1 -0
- package/dist/modules/instance-ai/repositories/index.d.ts +1 -0
- package/dist/modules/instance-ai/repositories/index.js +3 -1
- package/dist/modules/instance-ai/repositories/index.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-mcp-registry-connection.repository.d.ts +5 -0
- package/dist/modules/instance-ai/repositories/instance-ai-mcp-registry-connection.repository.js +26 -0
- package/dist/modules/instance-ai/repositories/instance-ai-mcp-registry-connection.repository.js.map +1 -0
- package/dist/modules/instance-ai/sandbox-provider.d.ts +4 -0
- package/dist/modules/instance-ai/sandbox-provider.js +19 -0
- package/dist/modules/instance-ai/sandbox-provider.js.map +1 -0
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +4 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +103 -12
- package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
- package/dist/modules/instance-ai/trace-replay-state.d.ts +2 -0
- package/dist/modules/instance-ai/trace-replay-state.js +56 -6
- package/dist/modules/instance-ai/trace-replay-state.js.map +1 -1
- package/dist/modules/instance-ai/workflow-verification-obligation-service.d.ts +20 -0
- package/dist/modules/instance-ai/workflow-verification-obligation-service.js +59 -0
- package/dist/modules/instance-ai/workflow-verification-obligation-service.js.map +1 -0
- package/dist/modules/instance-ai/workflow-verification-task-projector.d.ts +21 -0
- package/dist/modules/instance-ai/workflow-verification-task-projector.js +323 -0
- package/dist/modules/instance-ai/workflow-verification-task-projector.js.map +1 -0
- package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.d.ts +1 -0
- package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.js +4 -0
- package/dist/modules/mcp/database/entities/oauth-authorization-code.entity.js.map +1 -1
- package/dist/modules/mcp/mcp-oauth-authorization-code.service.d.ts +3 -1
- package/dist/modules/mcp/mcp-oauth-authorization-code.service.js +35 -5
- package/dist/modules/mcp/mcp-oauth-authorization-code.service.js.map +1 -1
- package/dist/modules/mcp/mcp-oauth-consent.service.js +1 -1
- package/dist/modules/mcp/mcp-oauth-consent.service.js.map +1 -1
- package/dist/modules/mcp/mcp-oauth-service.d.ts +4 -2
- package/dist/modules/mcp/mcp-oauth-service.js +60 -9
- package/dist/modules/mcp/mcp-oauth-service.js.map +1 -1
- package/dist/modules/mcp/mcp-oauth-token.service.d.ts +8 -6
- package/dist/modules/mcp/mcp-oauth-token.service.js +53 -16
- package/dist/modules/mcp/mcp-oauth-token.service.js.map +1 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js +2 -1
- package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
- package/dist/modules/mcp/mcp.constants.d.ts +1 -0
- package/dist/modules/mcp/mcp.constants.js +2 -1
- package/dist/modules/mcp/mcp.constants.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +1 -1
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +7 -4
- package/dist/modules/mcp/mcp.service.js +60 -9
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +5 -4
- package/dist/modules/mcp/mcp.utils.d.ts +2 -4
- package/dist/modules/mcp/mcp.utils.js.map +1 -1
- package/dist/modules/mcp/oauth-session.service.d.ts +1 -0
- package/dist/modules/mcp/oauth-session.service.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +7 -7
- package/dist/modules/mcp/tools/get-execution.tool.d.ts +1 -1
- package/dist/modules/mcp/tools/get-execution.tool.js +3 -3
- package/dist/modules/mcp/tools/get-execution.tool.js.map +1 -1
- package/dist/modules/mcp/tools/schemas.d.ts +28 -28
- package/dist/modules/mcp/tools/search-projects.tool.d.ts +2 -1
- package/dist/modules/mcp/tools/search-projects.tool.js +16 -7
- package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.d.ts +1 -1
- package/dist/modules/mcp/tools/workflow-builder/constants.js +2 -2
- package/dist/modules/mcp/tools/workflow-builder/constants.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +9 -2
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.d.ts +27 -0
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js +123 -0
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-best-practices.tool.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/skills-used.d.ts +1 -0
- package/dist/modules/mcp/tools/workflow-builder/skills-used.js +26 -0
- package/dist/modules/mcp/tools/workflow-builder/skills-used.js.map +1 -0
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +20 -19
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +9 -2
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/validate-node.tool.d.ts +2 -2
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +19 -19
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js +3 -2
- package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -1
- package/dist/modules/mcp-registry/mcp-registry.controller.d.ts +7 -0
- package/dist/modules/mcp-registry/mcp-registry.controller.js +54 -0
- package/dist/modules/mcp-registry/mcp-registry.controller.js.map +1 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js +1 -0
- package/dist/modules/mcp-registry/mcp-registry.module.js.map +1 -1
- package/dist/modules/mcp-registry/node-description-transform.d.ts +5 -3
- package/dist/modules/mcp-registry/node-description-transform.js +82 -24
- package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js +8 -4
- package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +7 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +35 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js +13 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mock-servers.d.ts +2 -0
- package/dist/modules/mcp-registry/registry/mock-servers.js +45 -1
- package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +5 -3
- package/dist/modules/n8n-packages/engine/import-pipeline.js +36 -25
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-importer.d.ts +9 -0
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js +41 -0
- package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.d.ts +8 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js +35 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.d.ts +18 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +34 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.js +35 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode-factory.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +17 -0
- package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.js +14 -0
- package/dist/modules/n8n-packages/entities/credential/credential-resolution-error.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +30 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js +12 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.d.ts +13 -0
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js +47 -0
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.d.ts +9 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.js +41 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-fail.handler.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.d.ts +10 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.js +20 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-handler.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.d.ts +11 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.js +42 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-new-version.handler.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.d.ts +9 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.js +33 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy-skip.handler.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.d.ts +10 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.js +37 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.factory.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.d.ts +20 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.js +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.d.ts +7 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js +54 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.d.ts +14 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +47 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +23 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js +21 -0
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +41 -31
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +17 -7
- package/dist/modules/n8n-packages/spec/requirements.schema.js +17 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +2 -2
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +40 -33
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +2 -1
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -1
- package/dist/modules/n8n-packages/utils/import-package-upload.js +1 -1
- package/dist/modules/oauth-jwe/oauth-jwe.schemas.d.ts +18 -18
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +6 -2
- package/dist/modules/otel/otel-lifecycle-handler.js +30 -17
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/quick-connect/quick-connect.config.d.ts +29 -29
- package/dist/modules/quick-connect/quick-connect.module.d.ts +11 -11
- package/dist/modules/redaction/executions/execution-redaction.interfaces.d.ts +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.d.ts +1 -0
- package/dist/modules/redaction/executions/execution-redaction.service.js +25 -11
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.js +1 -1
- package/dist/modules/redaction/executions/strategies/full-item-redaction.strategy.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.d.ts +9 -7
- package/dist/modules/redaction/instance-redaction-enforcement.service.js +32 -14
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.js +14 -16
- package/dist/modules/redaction/redaction-context-hook.js.map +1 -1
- package/dist/modules/redaction/redaction-enforcement.service.d.ts +5 -5
- package/dist/modules/redaction/redaction-enforcement.service.js +13 -11
- package/dist/modules/redaction/redaction-enforcement.service.js.map +1 -1
- package/dist/modules/redaction/redaction-policy.d.ts +7 -0
- package/dist/modules/redaction/redaction-policy.js +31 -0
- package/dist/modules/redaction/redaction-policy.js.map +1 -0
- package/dist/modules/redaction/redaction.module.js +1 -0
- package/dist/modules/redaction/redaction.module.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +1 -1
- package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -4
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +2 -2
- package/dist/modules/sso-oidc/oidc.controller.ee.d.ts +1 -1
- package/dist/modules/sso-oidc/oidc.service.ee.d.ts +2 -1
- package/dist/modules/sso-oidc/oidc.service.ee.js +35 -18
- package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
- package/dist/modules/token-exchange/token-exchange.schemas.d.ts +12 -12
- package/dist/node-execution/ephemeral-node-executor.js +3 -0
- package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
- package/dist/oauth/oauth.service.d.ts +20 -6
- package/dist/oauth/oauth.service.js +80 -18
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/public-api/v1/handlers/executions/executions.handler.js +4 -4
- package/dist/public-api/v1/handlers/executions/executions.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +3 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/users/users.service.ee.js +1 -0
- package/dist/public-api/v1/handlers/users/users.service.ee.js.map +1 -1
- package/dist/public-api/v1/handlers/workflows/workflows.service.js +2 -0
- package/dist/public-api/v1/handlers/workflows/workflows.service.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +169 -6
- package/dist/response-helper.js +16 -1
- package/dist/response-helper.js.map +1 -1
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/job-processor.d.ts +3 -1
- package/dist/scaling/job-processor.js +6 -3
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +1 -0
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/scaling/scaling.service.d.ts +3 -1
- package/dist/scaling/scaling.service.js +5 -2
- package/dist/scaling/scaling.service.js.map +1 -1
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.d.ts +4 -3
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js +6 -4
- package/dist/security-audit/risk-reporters/credentials-risk-reporter.js.map +1 -1
- package/dist/services/ai-workflow-builder.service.d.ts +1 -2
- package/dist/services/ai-workflow-builder.service.js +2 -3
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/dynamic-node-parameters.service.js +3 -5
- package/dist/services/dynamic-node-parameters.service.js.map +1 -1
- package/dist/services/frontend.service.js +2 -0
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +1 -0
- package/dist/services/project.service.ee.js +34 -2
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +25 -7
- package/dist/services/public-api-key.service.js +93 -14
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/services/role.service.d.ts +3 -3
- package/dist/task-runners/errors/task-cancelled.error.d.ts +4 -0
- package/dist/task-runners/errors/task-cancelled.error.js +11 -0
- package/dist/task-runners/errors/task-cancelled.error.js.map +1 -0
- package/dist/task-runners/task-managers/task-requester.js +2 -1
- package/dist/task-runners/task-managers/task-requester.js.map +1 -1
- package/dist/telemetry/index.js +2 -2
- package/dist/tool-generation/hitl-tools.js +1 -1
- package/dist/tool-generation/hitl-tools.js.map +1 -1
- package/dist/utils/auth-fetch.d.ts +6 -0
- package/dist/utils/auth-fetch.js +33 -0
- package/dist/utils/auth-fetch.js.map +1 -0
- package/dist/wait-tracker.d.ts +6 -1
- package/dist/wait-tracker.js +43 -18
- package/dist/wait-tracker.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.d.ts +3 -3
- package/dist/webhooks/waiting-webhooks.js +5 -5
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/webhooks/webhook-helpers.js +1 -19
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-server.d.ts +1 -0
- package/dist/webhooks/webhook-server.js +39 -0
- package/dist/webhooks/webhook-server.js.map +1 -1
- package/dist/workflow-execute-additional-data.d.ts +3 -2
- package/dist/workflow-execute-additional-data.js +42 -15
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.d.ts +2 -2
- package/dist/workflow-helpers.js +5 -3
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflow-runner.d.ts +3 -1
- package/dist/workflow-runner.js +8 -2
- package/dist/workflow-runner.js.map +1 -1
- package/dist/workflows/utils.d.ts +2 -0
- package/dist/workflows/utils.js +6 -0
- package/dist/workflows/utils.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +7 -3
- package/dist/workflows/workflow-creation.service.js +38 -14
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +9 -0
- package/dist/workflows/workflow-finder.service.js +60 -16
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-publication-outbox-consumer.d.ts +31 -0
- package/dist/workflows/workflow-publication-outbox-consumer.js +209 -0
- package/dist/workflows/workflow-publication-outbox-consumer.js.map +1 -0
- package/dist/workflows/workflow-validation.service.js +1 -1
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.d.ts +5 -5
- package/dist/workflows/workflow.service.js +1 -1
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +29 -29
- package/dist/workflows/workflows.controller.js +3 -4
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +38 -38
- package/dist/controllers/redaction-enforcement-mapper.d.ts +0 -3
- package/dist/controllers/redaction-enforcement-mapper.js +0 -27
- package/dist/controllers/redaction-enforcement-mapper.js.map +0 -1
- package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +0 -47
- package/dist/modules/agents/integrations/rich-interaction-tool.js +0 -109
- package/dist/modules/agents/integrations/rich-interaction-tool.js.map +0 -1
- package/dist/modules/instance-ai/eval/sub-agent-eval.service.d.ts +0 -13
- package/dist/modules/instance-ai/eval/sub-agent-eval.service.js +0 -154
- package/dist/modules/instance-ai/eval/sub-agent-eval.service.js.map +0 -1
- package/dist/modules/instance-ai/eval/sub-agent-roles.d.ts +0 -7
- package/dist/modules/instance-ai/eval/sub-agent-roles.js +0 -21
- package/dist/modules/instance-ai/eval/sub-agent-roles.js.map +0 -1
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.d.ts +0 -10
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js +0 -64
- package/dist/modules/mcp/tools/workflow-builder/get-suggested-workflow-nodes.tool.js.map +0 -1
- package/dist/modules/redaction/redaction.config.d.ts +0 -3
- package/dist/modules/redaction/redaction.config.js +0 -27
- package/dist/modules/redaction/redaction.config.js.map +0 -1
- package/dist/services/ssrf/dns-resolver.d.ts +0 -13
- package/dist/services/ssrf/dns-resolver.js +0 -93
- package/dist/services/ssrf/dns-resolver.js.map +0 -1
- package/dist/services/ssrf/hostname-matcher.d.ts +0 -6
- package/dist/services/ssrf/hostname-matcher.js +0 -38
- package/dist/services/ssrf/hostname-matcher.js.map +0 -1
- package/dist/services/ssrf/in-memory-dns-cache.service.d.ts +0 -11
- package/dist/services/ssrf/in-memory-dns-cache.service.js +0 -61
- package/dist/services/ssrf/in-memory-dns-cache.service.js.map +0 -1
- package/dist/services/ssrf/ip-range-builder.d.ts +0 -10
- package/dist/services/ssrf/ip-range-builder.js +0 -52
- package/dist/services/ssrf/ip-range-builder.js.map +0 -1
- package/dist/services/ssrf/ssrf-blocked-ip.error.d.ts +0 -6
- package/dist/services/ssrf/ssrf-blocked-ip.error.js +0 -21
- package/dist/services/ssrf/ssrf-blocked-ip.error.js.map +0 -1
- package/dist/services/ssrf/ssrf-protection.service.d.ts +0 -26
- package/dist/services/ssrf/ssrf-protection.service.js +0 -159
- package/dist/services/ssrf/ssrf-protection.service.js.map +0 -1
|
@@ -54,52 +54,39 @@ const decorators_1 = require("@n8n/decorators");
|
|
|
54
54
|
const di_1 = require("@n8n/di");
|
|
55
55
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
56
56
|
const uuid_1 = require("uuid");
|
|
57
|
-
const active_executions_1 = require("../../active-executions");
|
|
58
57
|
const credentials_service_1 = require("../../credentials/credentials.service");
|
|
59
58
|
const conflict_error_1 = require("../../errors/response-errors/conflict.error");
|
|
60
59
|
const not_found_error_1 = require("../../errors/response-errors/not-found.error");
|
|
61
60
|
const node_definition_resolver_1 = require("../../modules/instance-ai/node-definition-resolver");
|
|
62
|
-
const node_execution_1 = require("../../node-execution");
|
|
63
|
-
const oauth_service_1 = require("../../oauth/oauth.service");
|
|
64
61
|
const publisher_service_1 = require("../../scaling/pubsub/publisher.service");
|
|
65
|
-
const url_service_1 = require("../../services/url.service");
|
|
66
62
|
const telemetry_1 = require("../../telemetry");
|
|
67
63
|
const ttl_map_1 = require("../../utils/ttl-map");
|
|
68
|
-
const workflow_runner_1 = require("../../workflow-runner");
|
|
69
|
-
const workflow_finder_service_1 = require("../../workflows/workflow-finder.service");
|
|
70
64
|
const agents_credential_provider_1 = require("./adapters/agents-credential-provider");
|
|
71
65
|
const agent_draft_utils_1 = require("./utils/agent-draft.utils");
|
|
72
66
|
const agent_memory_scope_1 = require("./utils/agent-memory-scope");
|
|
73
67
|
const execution_to_message_mapper_1 = require("./utils/execution-to-message-mapper");
|
|
74
68
|
const agent_resource_id_1 = require("./utils/agent-resource-id");
|
|
69
|
+
const agent_stream_1 = require("./utils/agent-stream");
|
|
70
|
+
const structured_output_error_1 = require("./utils/structured-output-error");
|
|
75
71
|
const agent_execution_service_1 = require("./agent-execution.service");
|
|
76
72
|
const agent_skills_service_1 = require("./agent-skills.service");
|
|
77
|
-
const agents_tools_service_1 = require("./agents-tools.service");
|
|
78
73
|
const builder_tool_names_1 = require("./builder/builder-tool-names");
|
|
79
74
|
const llm_provider_defaults_1 = require("./builder/interactive/llm-provider-defaults");
|
|
80
75
|
const agent_task_entity_1 = require("./entities/agent-task.entity");
|
|
81
76
|
const execution_recorder_1 = require("./execution-recorder");
|
|
82
77
|
const agent_chat_integration_1 = require("./integrations/agent-chat-integration");
|
|
83
|
-
const integration_action_executor_1 = require("./integrations/integration-action-executor");
|
|
84
|
-
const integration_context_query_executor_1 = require("./integrations/integration-context-query-executor");
|
|
85
|
-
const integration_message_context_service_1 = require("./integrations/integration-message-context.service");
|
|
86
|
-
const integration_tools_1 = require("./integrations/integration-tools");
|
|
87
78
|
const integrations_sync_1 = require("./integrations/integrations-sync");
|
|
88
79
|
const n8n_checkpoint_storage_1 = require("./integrations/n8n-checkpoint-storage");
|
|
89
80
|
const n8n_memory_1 = require("./integrations/n8n-memory");
|
|
90
|
-
const environment_tool_1 = require("./tools/environment-tool");
|
|
91
|
-
const rich_interaction_tool_1 = require("./integrations/rich-interaction-tool");
|
|
92
81
|
const agent_config_composition_1 = require("./json-config/agent-config-composition");
|
|
93
|
-
const
|
|
94
|
-
const
|
|
82
|
+
const model_id_1 = require("./json-config/model-id");
|
|
83
|
+
const sanitize_unknown_agent_credentials_1 = require("./json-config/sanitize-unknown-agent-credentials");
|
|
84
|
+
const agent_runtime_reconstruction_service_1 = require("./agent-runtime-reconstruction.service");
|
|
95
85
|
const agent_history_repository_1 = require("./repositories/agent-history.repository");
|
|
96
86
|
const agent_task_snapshot_repository_1 = require("./repositories/agent-task-snapshot.repository");
|
|
97
87
|
const agent_task_repository_1 = require("./repositories/agent-task.repository");
|
|
98
88
|
const agent_repository_1 = require("./repositories/agent.repository");
|
|
99
|
-
const agent_secure_runtime_1 = require("./runtime/agent-secure-runtime");
|
|
100
|
-
const tool_registry_1 = require("./tool-registry");
|
|
101
89
|
const chat_integration_service_1 = require("./integrations/chat-integration.service");
|
|
102
|
-
const agent_knowledge_command_service_1 = require("./agent-knowledge-command.service");
|
|
103
90
|
const agent_knowledge_service_1 = require("./agent-knowledge.service");
|
|
104
91
|
function chatThreadId(agentId, userId) {
|
|
105
92
|
const baseThreadId = `${builder_tool_names_1.AGENT_THREAD_PREFIX.TEST}${agentId}`;
|
|
@@ -157,21 +144,11 @@ let AgentsService = class AgentsService {
|
|
|
157
144
|
handleAgentConfigChanged(payload) {
|
|
158
145
|
this.clearRuntimes(payload.agentId, { skipBroadcast: true });
|
|
159
146
|
}
|
|
160
|
-
constructor(logger, agentRepository, projectRelationRepository,
|
|
147
|
+
constructor(logger, agentRepository, projectRelationRepository, n8nCheckpointStorage, n8nMemory, agentExecutionService, agentHistoryRepository, agentSkillsService, agentTaskRepository, agentTaskSnapshotRepository, publisher, agentsConfig, globalConfig, telemetry, chatIntegrationService, agentKnowledgeService, agentRuntimeReconstructionService) {
|
|
161
148
|
this.logger = logger;
|
|
162
149
|
this.agentRepository = agentRepository;
|
|
163
150
|
this.projectRelationRepository = projectRelationRepository;
|
|
164
|
-
this.workflowRunner = workflowRunner;
|
|
165
|
-
this.activeExecutions = activeExecutions;
|
|
166
|
-
this.executionRepository = executionRepository;
|
|
167
|
-
this.workflowRepository = workflowRepository;
|
|
168
|
-
this.userRepository = userRepository;
|
|
169
|
-
this.workflowFinderService = workflowFinderService;
|
|
170
|
-
this.urlService = urlService;
|
|
171
151
|
this.n8nCheckpointStorage = n8nCheckpointStorage;
|
|
172
|
-
this.secureRuntime = secureRuntime;
|
|
173
|
-
this.ephemeralNodeExecutor = ephemeralNodeExecutor;
|
|
174
|
-
this.agentsToolsService = agentsToolsService;
|
|
175
152
|
this.n8nMemory = n8nMemory;
|
|
176
153
|
this.agentExecutionService = agentExecutionService;
|
|
177
154
|
this.agentHistoryRepository = agentHistoryRepository;
|
|
@@ -184,8 +161,7 @@ let AgentsService = class AgentsService {
|
|
|
184
161
|
this.telemetry = telemetry;
|
|
185
162
|
this.chatIntegrationService = chatIntegrationService;
|
|
186
163
|
this.agentKnowledgeService = agentKnowledgeService;
|
|
187
|
-
this.
|
|
188
|
-
this.oauthService = oauthService;
|
|
164
|
+
this.agentRuntimeReconstructionService = agentRuntimeReconstructionService;
|
|
189
165
|
this.runtimes = new ttl_map_1.TtlMap(30 * constants_1.Time.minutes.toMilliseconds);
|
|
190
166
|
}
|
|
191
167
|
isNodeToolsModuleEnabled() {
|
|
@@ -222,9 +198,6 @@ let AgentsService = class AgentsService {
|
|
|
222
198
|
}),
|
|
223
199
|
};
|
|
224
200
|
}
|
|
225
|
-
shouldAttachNodeTools(config) {
|
|
226
|
-
return this.isNodeToolsModuleEnabled() && (0, api_types_1.isNodeToolsEnabled)(config);
|
|
227
|
-
}
|
|
228
201
|
listChatIntegrations() {
|
|
229
202
|
return di_1.Container.get(agent_chat_integration_1.ChatIntegrationRegistry)
|
|
230
203
|
.list()
|
|
@@ -510,9 +483,6 @@ let AgentsService = class AgentsService {
|
|
|
510
483
|
return null;
|
|
511
484
|
return (0, execution_to_message_mapper_1.executionsToMessagesDto)(detail.executions);
|
|
512
485
|
}
|
|
513
|
-
getMemoryFactory(agentId) {
|
|
514
|
-
return (_params) => this.n8nMemory.getImplementation(agentId);
|
|
515
|
-
}
|
|
516
486
|
createCredentialProvider(projectId) {
|
|
517
487
|
return new agents_credential_provider_1.AgentsCredentialProvider(di_1.Container.get(credentials_service_1.CredentialsService), projectId);
|
|
518
488
|
}
|
|
@@ -528,16 +498,7 @@ let AgentsService = class AgentsService {
|
|
|
528
498
|
let n8nUserId = params.n8nUserId;
|
|
529
499
|
let agentData = agentEntity;
|
|
530
500
|
if (usePublishedVersion) {
|
|
531
|
-
|
|
532
|
-
if (!activeVersionSchema) {
|
|
533
|
-
throw new not_found_error_1.NotFoundError(`Agent ${agentId} is not published`);
|
|
534
|
-
}
|
|
535
|
-
agentData = {
|
|
536
|
-
...agentEntity,
|
|
537
|
-
schema: activeVersionSchema,
|
|
538
|
-
tools: agentEntity.activeVersion?.tools ?? agentEntity.tools ?? {},
|
|
539
|
-
skills: agentEntity.activeVersion?.skills ?? agentEntity.skills ?? {},
|
|
540
|
-
};
|
|
501
|
+
agentData = this.getPublishedAgent(agentEntity);
|
|
541
502
|
n8nUserId ??= agentEntity.activeVersion?.publishedById ?? undefined;
|
|
542
503
|
}
|
|
543
504
|
if (!n8nUserId) {
|
|
@@ -551,87 +512,8 @@ let AgentsService = class AgentsService {
|
|
|
551
512
|
throw new Error(`Agent ${agentId} failed to reconstruct`);
|
|
552
513
|
return runtime;
|
|
553
514
|
}
|
|
554
|
-
makeToolResolver(projectId, userId) {
|
|
555
|
-
return async (ref) => {
|
|
556
|
-
if (ref.type === 'workflow') {
|
|
557
|
-
if (!userId) {
|
|
558
|
-
throw new n8n_workflow_1.UserError('userId is required when agent uses workflow tools');
|
|
559
|
-
}
|
|
560
|
-
const { resolveWorkflowTool } = await Promise.resolve().then(() => __importStar(require('./tools/workflow-tool-factory')));
|
|
561
|
-
return await resolveWorkflowTool(ref, {
|
|
562
|
-
workflowRepository: this.workflowRepository,
|
|
563
|
-
workflowRunner: this.workflowRunner,
|
|
564
|
-
activeExecutions: this.activeExecutions,
|
|
565
|
-
executionRepository: this.executionRepository,
|
|
566
|
-
workflowFinderService: this.workflowFinderService,
|
|
567
|
-
userRepository: this.userRepository,
|
|
568
|
-
userId,
|
|
569
|
-
projectId,
|
|
570
|
-
webhookBaseUrl: this.urlService.getWebhookBaseUrl(),
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
if (ref.type === 'node') {
|
|
574
|
-
const { resolveNodeTool } = await Promise.resolve().then(() => __importStar(require('./tools/node-tool-factory')));
|
|
575
|
-
return await resolveNodeTool(ref, {
|
|
576
|
-
executor: this.ephemeralNodeExecutor,
|
|
577
|
-
projectId,
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
return null;
|
|
581
|
-
};
|
|
582
|
-
}
|
|
583
|
-
async injectRuntimeDependencies(params) {
|
|
584
|
-
const { agent, agentId, projectId, credentialProvider, nodeToolsEnabled, credentialIntegrations, integrationType, } = params;
|
|
585
|
-
agent.tool((0, environment_tool_1.createGetEnvironmentTool)());
|
|
586
|
-
if (this.isKnowledgeBaseModuleEnabled()) {
|
|
587
|
-
try {
|
|
588
|
-
const { createSearchKnowledgeTool } = await Promise.resolve().then(() => __importStar(require('./tools/knowledge/tool')));
|
|
589
|
-
agent.tool(createSearchKnowledgeTool({
|
|
590
|
-
agentId,
|
|
591
|
-
projectId,
|
|
592
|
-
knowledgeService: this.agentKnowledgeService,
|
|
593
|
-
commandService: this.agentKnowledgeCommandService,
|
|
594
|
-
}));
|
|
595
|
-
}
|
|
596
|
-
catch (toolError) {
|
|
597
|
-
this.logger.warn('Failed to inject search_knowledge tool', {
|
|
598
|
-
agentId,
|
|
599
|
-
error: toolError instanceof Error ? toolError.message : String(toolError),
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
const integrationRegistry = di_1.Container.get(agent_chat_integration_1.ChatIntegrationRegistry);
|
|
604
|
-
const integration = integrationType ? integrationRegistry.get(integrationType) : undefined;
|
|
605
|
-
if (integration?.supportedComponents !== undefined) {
|
|
606
|
-
agent.tool((0, rich_interaction_tool_1.createRichInteractionTool)(integrationType));
|
|
607
|
-
}
|
|
608
|
-
if (credentialIntegrations.length > 0) {
|
|
609
|
-
const messageContextStore = di_1.Container.get(integration_message_context_service_1.IntegrationMessageContextService);
|
|
610
|
-
const actionExecutor = di_1.Container.get(integration_action_executor_1.ChatIntegrationActionExecutor);
|
|
611
|
-
const queryExecutor = di_1.Container.get(integration_context_query_executor_1.ChatIntegrationContextQueryExecutor);
|
|
612
|
-
for (const descriptor of (0, integration_tools_1.getIntegrationToolConnectionDescriptors)(credentialIntegrations, agentId, (integrationConfig) => {
|
|
613
|
-
const integrationDef = integrationRegistry.get(integrationConfig.type);
|
|
614
|
-
return {
|
|
615
|
-
contextQueries: integrationDef?.contextQueries,
|
|
616
|
-
actions: integrationDef?.actions,
|
|
617
|
-
};
|
|
618
|
-
})) {
|
|
619
|
-
agent.tool((0, integration_tools_1.createIntegrationContextTool)({ descriptor, messageContextStore, queryExecutor }));
|
|
620
|
-
agent.tool((0, integration_tools_1.createIntegrationActionTool)({ descriptor, messageContextStore, actionExecutor }));
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
if (nodeToolsEnabled) {
|
|
624
|
-
this.attachNodeToolChain(agent, credentialProvider, projectId);
|
|
625
|
-
}
|
|
626
|
-
if (!agent.hasCheckpointStorage()) {
|
|
627
|
-
agent.checkpoint(this.n8nCheckpointStorage);
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
attachNodeToolChain(agent, credentialProvider, projectId) {
|
|
631
|
-
agent.tool(this.agentsToolsService.getRuntimeTools(credentialProvider, projectId));
|
|
632
|
-
}
|
|
633
515
|
async *resumeForChat(config) {
|
|
634
|
-
const { agentId, projectId, runId, toolCallId, resumeData, integrationType } = config;
|
|
516
|
+
const { agentId, projectId, runId, toolCallId, resumeData, integrationType, userId, usePublishedVersion = true, } = config;
|
|
635
517
|
const checkpointStatus = await this.n8nCheckpointStorage.getStatus(runId);
|
|
636
518
|
if (checkpointStatus.status === 'expired') {
|
|
637
519
|
throw new n8n_workflow_1.UserError(`Checkpoint ${runId} is expired and cannot be resumed`);
|
|
@@ -647,7 +529,8 @@ let AgentsService = class AgentsService {
|
|
|
647
529
|
const runtime = await this.getRuntime({
|
|
648
530
|
agentId,
|
|
649
531
|
projectId,
|
|
650
|
-
|
|
532
|
+
...(userId ? { n8nUserId: userId } : {}),
|
|
533
|
+
usePublishedVersion,
|
|
651
534
|
integrationType,
|
|
652
535
|
});
|
|
653
536
|
const { agent: agentInstance, toolRegistry } = runtime;
|
|
@@ -655,20 +538,11 @@ let AgentsService = class AgentsService {
|
|
|
655
538
|
const resultStream = await agentInstance.resume('stream', resumeData, {
|
|
656
539
|
runId,
|
|
657
540
|
toolCallId,
|
|
658
|
-
executionCounter: this.createAgentExecutionCounter({ agentId }),
|
|
541
|
+
executionCounter: this.createAgentExecutionCounter({ agentId, userId }),
|
|
659
542
|
});
|
|
660
|
-
const
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
const { done, value } = await reader.read();
|
|
664
|
-
if (done)
|
|
665
|
-
break;
|
|
666
|
-
recorder.record(value);
|
|
667
|
-
yield value;
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
finally {
|
|
671
|
-
reader.releaseLock();
|
|
543
|
+
for await (const value of (0, agent_stream_1.streamAgentChunks)(resultStream.stream)) {
|
|
544
|
+
recorder.record(value);
|
|
545
|
+
yield value;
|
|
672
546
|
}
|
|
673
547
|
const messageRecord = recorder.getMessageRecord();
|
|
674
548
|
void this.agentExecutionService
|
|
@@ -758,6 +632,16 @@ let AgentsService = class AgentsService {
|
|
|
758
632
|
}
|
|
759
633
|
}
|
|
760
634
|
}
|
|
635
|
+
try {
|
|
636
|
+
const modelsByDifficulty = config.subAgents?.modelsByDifficulty;
|
|
637
|
+
if (modelsByDifficulty) {
|
|
638
|
+
for (const difficulty of api_types_1.SUB_AGENT_TASK_DIFFICULTIES) {
|
|
639
|
+
await this.validateMemoryWorkerModel(modelsByDifficulty[difficulty], `subAgents.modelsByDifficulty.${difficulty}`, findCredential, missing);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
catch {
|
|
644
|
+
}
|
|
761
645
|
missing.push(...this.agentSkillsService
|
|
762
646
|
.getMissingSkillIds(config, agentEntity.skills ?? {})
|
|
763
647
|
.map((skillId) => `skill:${skillId}`));
|
|
@@ -785,7 +669,7 @@ let AgentsService = class AgentsService {
|
|
|
785
669
|
}
|
|
786
670
|
}
|
|
787
671
|
workerCredentialSupportsModel(credentialType, model) {
|
|
788
|
-
return llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS[credentialType]?.provider === getProviderPrefix(model);
|
|
672
|
+
return llm_provider_defaults_1.LLM_PROVIDER_DEFAULTS[credentialType]?.provider === (0, model_id_1.getProviderPrefix)(model);
|
|
789
673
|
}
|
|
790
674
|
async *executeForChat(config) {
|
|
791
675
|
const { agentId, projectId, message, userId, memory } = config;
|
|
@@ -878,30 +762,21 @@ let AgentsService = class AgentsService {
|
|
|
878
762
|
persistence: { threadId, resourceId },
|
|
879
763
|
executionCounter: this.createAgentExecutionCounter({ agentId, userId }),
|
|
880
764
|
});
|
|
881
|
-
const
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
});
|
|
894
|
-
}
|
|
895
|
-
if (value.type === 'finish' && value.finishReason === 'max-iterations') {
|
|
896
|
-
for (const chunk of getMaxIterationsChunks()) {
|
|
897
|
-
yield chunk;
|
|
898
|
-
}
|
|
765
|
+
for await (const value of (0, agent_stream_1.streamAgentChunks)(resultStream.stream)) {
|
|
766
|
+
recorder.record(value);
|
|
767
|
+
if (value.type === 'tool-call-suspended') {
|
|
768
|
+
this.logger.info('Chat: tool-call-suspended chunk received', {
|
|
769
|
+
agentId,
|
|
770
|
+
toolCallId: value.toolCallId,
|
|
771
|
+
toolName: value.toolName,
|
|
772
|
+
});
|
|
773
|
+
}
|
|
774
|
+
if (value.type === 'finish' && value.finishReason === 'max-iterations') {
|
|
775
|
+
for (const chunk of getMaxIterationsChunks()) {
|
|
776
|
+
yield chunk;
|
|
899
777
|
}
|
|
900
|
-
yield value;
|
|
901
778
|
}
|
|
902
|
-
|
|
903
|
-
finally {
|
|
904
|
-
reader.releaseLock();
|
|
779
|
+
yield value;
|
|
905
780
|
}
|
|
906
781
|
const messageRecord = recorder.getMessageRecord();
|
|
907
782
|
void this.agentExecutionService
|
|
@@ -925,12 +800,15 @@ let AgentsService = class AgentsService {
|
|
|
925
800
|
});
|
|
926
801
|
});
|
|
927
802
|
}
|
|
928
|
-
async compileIsolated(agentEntity, credentialProvider, userId) {
|
|
803
|
+
async compileIsolated(agentEntity, credentialProvider, userId, outputSchema) {
|
|
929
804
|
if (!agentEntity.schema) {
|
|
930
805
|
return { ok: false, error: 'Agent has no JSON config. Create a config first.' };
|
|
931
806
|
}
|
|
932
807
|
try {
|
|
933
808
|
const { agent: reconstructed } = await this.reconstructFromConfig(agentEntity, credentialProvider, userId);
|
|
809
|
+
if (outputSchema) {
|
|
810
|
+
reconstructed.structuredOutput(outputSchema);
|
|
811
|
+
}
|
|
934
812
|
return { ok: true, agent: reconstructed };
|
|
935
813
|
}
|
|
936
814
|
catch (e) {
|
|
@@ -940,16 +818,29 @@ let AgentsService = class AgentsService {
|
|
|
940
818
|
};
|
|
941
819
|
}
|
|
942
820
|
}
|
|
943
|
-
|
|
821
|
+
getPublishedAgent(agentEntity) {
|
|
822
|
+
const activeVersionSchema = agentEntity.activeVersion?.schema;
|
|
823
|
+
if (!activeVersionSchema) {
|
|
824
|
+
throw new n8n_workflow_1.OperationalError('Agent is not published. Publish the agent before using it in a workflow.');
|
|
825
|
+
}
|
|
826
|
+
return {
|
|
827
|
+
...agentEntity,
|
|
828
|
+
schema: activeVersionSchema,
|
|
829
|
+
tools: agentEntity.activeVersion?.tools ?? agentEntity.tools ?? {},
|
|
830
|
+
skills: agentEntity.activeVersion?.skills ?? agentEntity.skills ?? {},
|
|
831
|
+
};
|
|
832
|
+
}
|
|
833
|
+
async executeForWorkflow(agentId, message, executionId, threadId, userId, projectId, telemetryUserId, useDraftVersion, outputSchema) {
|
|
944
834
|
const agentEntity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
945
835
|
if (!agentEntity) {
|
|
946
836
|
throw new n8n_workflow_1.OperationalError('Agent not found or not accessible.');
|
|
947
837
|
}
|
|
948
|
-
if (!agentEntity.activeVersionId) {
|
|
949
|
-
throw new n8n_workflow_1.OperationalError('Agent is not published. Publish the agent before using it in a workflow.');
|
|
950
|
-
}
|
|
951
838
|
const credentialProvider = new agents_credential_provider_1.AgentsCredentialProvider(di_1.Container.get(credentials_service_1.CredentialsService), projectId);
|
|
952
|
-
|
|
839
|
+
let agentData = agentEntity;
|
|
840
|
+
if (!useDraftVersion) {
|
|
841
|
+
agentData = this.getPublishedAgent(agentEntity);
|
|
842
|
+
}
|
|
843
|
+
const compiled = await this.compileIsolated(agentData, credentialProvider, userId, outputSchema);
|
|
953
844
|
if (!compiled.ok || !compiled.agent) {
|
|
954
845
|
throw new n8n_workflow_1.OperationalError(`Failed to compile agent: ${compiled.error ?? 'unknown error'}`);
|
|
955
846
|
}
|
|
@@ -962,32 +853,23 @@ let AgentsService = class AgentsService {
|
|
|
962
853
|
persistence: { resourceId: executionId, threadId },
|
|
963
854
|
executionCounter: this.createAgentExecutionCounter({ agentId, userId: telemetryUserId }),
|
|
964
855
|
});
|
|
965
|
-
const
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
});
|
|
982
|
-
toolInputs.delete(value.toolCallId);
|
|
983
|
-
}
|
|
984
|
-
else if (value.type === 'finish' && value.structuredOutput !== undefined) {
|
|
985
|
-
structuredOutput = value.structuredOutput;
|
|
986
|
-
}
|
|
856
|
+
for await (const value of (0, agent_stream_1.streamAgentChunks)(resultStream.stream)) {
|
|
857
|
+
recorder.record(value);
|
|
858
|
+
if (value.type === 'tool-call') {
|
|
859
|
+
toolInputs.set(value.toolCallId, { toolName: value.toolName, input: value.input });
|
|
860
|
+
}
|
|
861
|
+
else if (value.type === 'tool-result') {
|
|
862
|
+
const pending = toolInputs.get(value.toolCallId);
|
|
863
|
+
toolCalls.push({
|
|
864
|
+
toolName: value.toolName,
|
|
865
|
+
input: pending?.input ?? null,
|
|
866
|
+
result: value.output,
|
|
867
|
+
});
|
|
868
|
+
toolInputs.delete(value.toolCallId);
|
|
869
|
+
}
|
|
870
|
+
else if (value.type === 'finish' && value.structuredOutput !== undefined) {
|
|
871
|
+
structuredOutput = value.structuredOutput;
|
|
987
872
|
}
|
|
988
|
-
}
|
|
989
|
-
finally {
|
|
990
|
-
reader.releaseLock();
|
|
991
873
|
}
|
|
992
874
|
const messageRecord = recorder.getMessageRecord();
|
|
993
875
|
void this.agentExecutionService
|
|
@@ -1012,10 +894,19 @@ let AgentsService = class AgentsService {
|
|
|
1012
894
|
'Suspend/resume is not supported in workflow execution context.');
|
|
1013
895
|
}
|
|
1014
896
|
if (messageRecord.error) {
|
|
897
|
+
if (outputSchema) {
|
|
898
|
+
const structuredOutputError = (0, structured_output_error_1.describeStructuredOutputError)(messageRecord.error);
|
|
899
|
+
if (structuredOutputError) {
|
|
900
|
+
throw new n8n_workflow_1.OperationalError(structuredOutputError);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
1015
903
|
throw new n8n_workflow_1.OperationalError(`Agent execution failed: ${messageRecord.error}`);
|
|
1016
904
|
}
|
|
1017
905
|
if (messageRecord.finishReason === 'error') {
|
|
1018
|
-
throw new n8n_workflow_1.OperationalError(
|
|
906
|
+
throw new n8n_workflow_1.OperationalError(outputSchema
|
|
907
|
+
? 'Agent execution finished with an error while producing structured output. ' +
|
|
908
|
+
"The agent's model or provider may not support JSON Schema structured output."
|
|
909
|
+
: 'Agent execution finished with an error.');
|
|
1019
910
|
}
|
|
1020
911
|
return {
|
|
1021
912
|
response: messageRecord.assistantResponse,
|
|
@@ -1047,7 +938,10 @@ let AgentsService = class AgentsService {
|
|
|
1047
938
|
return config;
|
|
1048
939
|
}
|
|
1049
940
|
async validateConfig(raw) {
|
|
1050
|
-
|
|
941
|
+
if (hasNodeToolInputSchema(raw)) {
|
|
942
|
+
return { valid: false, error: 'Node tool configs must not include inputSchema.' };
|
|
943
|
+
}
|
|
944
|
+
const parsed = api_types_1.AgentJsonConfigSchema.safeParse((0, api_types_1.sanitizeAgentJsonConfig)(raw));
|
|
1051
945
|
if (!parsed.success) {
|
|
1052
946
|
return { valid: false, error: parsed.error.message };
|
|
1053
947
|
}
|
|
@@ -1058,15 +952,6 @@ let AgentsService = class AgentsService {
|
|
|
1058
952
|
error: 'config.nodeTools.enabled requires the node-tools-searcher agents module to be enabled.',
|
|
1059
953
|
};
|
|
1060
954
|
}
|
|
1061
|
-
const mcpServers = config.mcpServers ?? [];
|
|
1062
|
-
for (const server of mcpServers) {
|
|
1063
|
-
if (server.authentication !== 'none' && !server.credential) {
|
|
1064
|
-
return {
|
|
1065
|
-
valid: false,
|
|
1066
|
-
error: `MCP server "${server.name}" requires a credential when authentication is not "none".`,
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
}
|
|
1070
955
|
try {
|
|
1071
956
|
this.validateNodeToolExpressions(config);
|
|
1072
957
|
}
|
|
@@ -1094,23 +979,19 @@ let AgentsService = class AgentsService {
|
|
|
1094
979
|
const entity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
|
|
1095
980
|
if (!entity)
|
|
1096
981
|
throw new not_found_error_1.NotFoundError('Agent not found');
|
|
1097
|
-
const
|
|
982
|
+
const credentialProvider = this.createCredentialProvider(projectId);
|
|
983
|
+
const accessibleCredentialIds = new Set((await credentialProvider.list()).map((credential) => credential.id));
|
|
984
|
+
const sanitizedConfig = (0, sanitize_unknown_agent_credentials_1.sanitizeUnknownAgentCredentials)((0, api_types_1.sanitizeAgentJsonConfig)(config), accessibleCredentialIds);
|
|
985
|
+
const result = await this.validateConfig(sanitizedConfig);
|
|
1098
986
|
if (!result.valid) {
|
|
1099
987
|
throw new n8n_workflow_1.UserError(`Invalid agent config: ${result.error}`);
|
|
1100
988
|
}
|
|
1101
|
-
this.validateConfigRefs(result.config, entity);
|
|
1102
989
|
const tasksProvided = result.config.tasks !== undefined;
|
|
1103
990
|
const existingTaskIds = tasksProvided
|
|
1104
991
|
? (await this.agentTaskRepository.findByAgentId(agentId)).map((task) => task.id)
|
|
1105
992
|
: [];
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
for (const ref of result.config.tasks ?? []) {
|
|
1109
|
-
if (!existingTaskIdSet.has(ref.id)) {
|
|
1110
|
-
throw new n8n_workflow_1.UserError(`Invalid agent config: Missing task body: ${ref.id}`);
|
|
1111
|
-
}
|
|
1112
|
-
}
|
|
1113
|
-
}
|
|
993
|
+
const resolvedSubAgents = await this.removeMissingConfigRefs(result.config, entity, new Set(existingTaskIds));
|
|
994
|
+
this.validateSubAgentRefs(resolvedSubAgents, entity);
|
|
1114
995
|
const previousIntegrations = entity.integrations ?? [];
|
|
1115
996
|
const previousSchema = entity.schema ?? null;
|
|
1116
997
|
const integrationsProvided = result.config.integrations !== undefined;
|
|
@@ -1119,6 +1000,7 @@ let AgentsService = class AgentsService {
|
|
|
1119
1000
|
const descriptionProvided = result.config.description !== undefined;
|
|
1120
1001
|
const credentialProvided = result.config.credential !== undefined;
|
|
1121
1002
|
const memoryProvided = result.config.memory !== undefined;
|
|
1003
|
+
const subAgentsProvided = result.config.subAgents !== undefined;
|
|
1122
1004
|
const providerToolsProvided = result.config.providerTools !== undefined;
|
|
1123
1005
|
const configBlockProvided = result.config.config !== undefined;
|
|
1124
1006
|
const mcpServersProvided = result.config.mcpServers !== undefined;
|
|
@@ -1132,6 +1014,7 @@ let AgentsService = class AgentsService {
|
|
|
1132
1014
|
...(descriptionProvided ? { description: decomposedSchema.description } : {}),
|
|
1133
1015
|
...(credentialProvided ? { credential: decomposedSchema.credential } : {}),
|
|
1134
1016
|
...(memoryProvided ? { memory: decomposedSchema.memory } : {}),
|
|
1017
|
+
...(subAgentsProvided ? { subAgents: decomposedSchema.subAgents } : {}),
|
|
1135
1018
|
...(toolsProvided ? { tools: decomposedSchema.tools } : {}),
|
|
1136
1019
|
...(skillsProvided ? { skills: decomposedSchema.skills } : {}),
|
|
1137
1020
|
...(tasksProvided ? { tasks: decomposedSchema.tasks } : {}),
|
|
@@ -1187,6 +1070,9 @@ let AgentsService = class AgentsService {
|
|
|
1187
1070
|
}
|
|
1188
1071
|
const validated = parseResult.data;
|
|
1189
1072
|
const { type, credentialId } = validated;
|
|
1073
|
+
if (credentialId === '') {
|
|
1074
|
+
throw new n8n_workflow_1.UserError('Credential integration requires a credential ID.');
|
|
1075
|
+
}
|
|
1190
1076
|
const existing = agent.integrations ?? [];
|
|
1191
1077
|
const alreadyExists = existing.some((i) => i.type === type && i.credentialId === credentialId);
|
|
1192
1078
|
agent.integrations = alreadyExists
|
|
@@ -1294,14 +1180,50 @@ let AgentsService = class AgentsService {
|
|
|
1294
1180
|
}
|
|
1295
1181
|
return errors.length > 0 ? errors.join('\n') : null;
|
|
1296
1182
|
}
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1183
|
+
async removeMissingConfigRefs(config, entity, existingTaskIds) {
|
|
1184
|
+
if (config.skills !== undefined) {
|
|
1185
|
+
const skills = entity.skills ?? {};
|
|
1186
|
+
config.skills = config.skills.filter((ref) => Boolean(skills[ref.id]));
|
|
1187
|
+
}
|
|
1188
|
+
if (config.tools !== undefined) {
|
|
1189
|
+
const tools = entity.tools ?? {};
|
|
1190
|
+
config.tools = config.tools.filter((ref) => ref.type !== 'custom' || Boolean(tools[ref.id]));
|
|
1301
1191
|
}
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1192
|
+
if (config.tasks !== undefined) {
|
|
1193
|
+
config.tasks = config.tasks.filter((ref) => existingTaskIds.has(ref.id));
|
|
1194
|
+
}
|
|
1195
|
+
if (config.subAgents?.agents !== undefined) {
|
|
1196
|
+
const resolvedSubAgents = await this.fetchUniqueSubAgents(config.subAgents.agents, entity.projectId);
|
|
1197
|
+
const existingSubAgentIds = new Set(resolvedSubAgents.filter(({ agent }) => agent !== null).map(({ agentId }) => agentId));
|
|
1198
|
+
config.subAgents.agents = config.subAgents.agents.filter(({ agentId }) => existingSubAgentIds.has(agentId));
|
|
1199
|
+
return resolvedSubAgents;
|
|
1200
|
+
}
|
|
1201
|
+
return [];
|
|
1202
|
+
}
|
|
1203
|
+
async fetchUniqueSubAgents(refs, projectId) {
|
|
1204
|
+
const seen = new Set();
|
|
1205
|
+
const resolved = [];
|
|
1206
|
+
for (const { agentId } of refs) {
|
|
1207
|
+
if (seen.has(agentId))
|
|
1208
|
+
continue;
|
|
1209
|
+
seen.add(agentId);
|
|
1210
|
+
resolved.push({
|
|
1211
|
+
agentId,
|
|
1212
|
+
agent: await this.agentRepository.findByIdAndProjectId(agentId, projectId),
|
|
1213
|
+
});
|
|
1214
|
+
}
|
|
1215
|
+
return resolved;
|
|
1216
|
+
}
|
|
1217
|
+
validateSubAgentRefs(resolvedSubAgents, entity) {
|
|
1218
|
+
for (const { agentId, agent } of resolvedSubAgents) {
|
|
1219
|
+
if (!agent)
|
|
1220
|
+
continue;
|
|
1221
|
+
if (agentId === entity.id) {
|
|
1222
|
+
throw new n8n_workflow_1.UserError('Invalid agent config: An agent cannot use itself as a subagent');
|
|
1223
|
+
}
|
|
1224
|
+
if (!agent.activeVersionId) {
|
|
1225
|
+
throw new n8n_workflow_1.UserError(`Invalid agent config: Subagent "${agentId}" must be published`);
|
|
1226
|
+
}
|
|
1305
1227
|
}
|
|
1306
1228
|
}
|
|
1307
1229
|
getMissingCustomToolIds(config, tools) {
|
|
@@ -1390,50 +1312,7 @@ let AgentsService = class AgentsService {
|
|
|
1390
1312
|
}
|
|
1391
1313
|
}
|
|
1392
1314
|
async reconstructFromConfig(agentEntity, credentialProvider, userId, integrationType) {
|
|
1393
|
-
|
|
1394
|
-
if (!config) {
|
|
1395
|
-
throw new n8n_workflow_1.UserError('Agent has no JSON config.');
|
|
1396
|
-
}
|
|
1397
|
-
const toolsByName = {};
|
|
1398
|
-
for (const [_toolId, toolEntry] of Object.entries(agentEntity.tools ?? {})) {
|
|
1399
|
-
toolsByName[toolEntry.descriptor.name] = toolEntry.code;
|
|
1400
|
-
}
|
|
1401
|
-
const toolDescriptors = {};
|
|
1402
|
-
for (const [toolId, toolEntry] of Object.entries(agentEntity.tools ?? {})) {
|
|
1403
|
-
toolDescriptors[toolId] = toolEntry.descriptor;
|
|
1404
|
-
}
|
|
1405
|
-
const toolExecutor = this.secureRuntime.createToolExecutor(toolsByName);
|
|
1406
|
-
const toolResolver = this.makeToolResolver(agentEntity.projectId, userId);
|
|
1407
|
-
const resolvedTools = [];
|
|
1408
|
-
const buildMcpClient = async (server) => await (0, mcp_client_factory_1.buildMcpClientForServer)(server, {
|
|
1409
|
-
credentialProvider,
|
|
1410
|
-
oauthService: this.oauthService,
|
|
1411
|
-
projectId: agentEntity.projectId,
|
|
1412
|
-
});
|
|
1413
|
-
const reconstructed = await (0, from_json_config_1.buildFromJson)(config, toolDescriptors, {
|
|
1414
|
-
toolExecutor,
|
|
1415
|
-
credentialProvider,
|
|
1416
|
-
resolveTool: async (ref) => {
|
|
1417
|
-
const resolved = await toolResolver(ref);
|
|
1418
|
-
if (resolved)
|
|
1419
|
-
resolvedTools.push(resolved);
|
|
1420
|
-
return resolved;
|
|
1421
|
-
},
|
|
1422
|
-
skills: agentEntity.skills ?? {},
|
|
1423
|
-
memoryFactory: this.getMemoryFactory(agentEntity.id),
|
|
1424
|
-
buildMcpClient,
|
|
1425
|
-
});
|
|
1426
|
-
await this.injectRuntimeDependencies({
|
|
1427
|
-
agent: reconstructed,
|
|
1428
|
-
agentId: agentEntity.id,
|
|
1429
|
-
projectId: agentEntity.projectId,
|
|
1430
|
-
credentialProvider,
|
|
1431
|
-
nodeToolsEnabled: this.shouldAttachNodeTools(config.config),
|
|
1432
|
-
credentialIntegrations: agentEntity.integrations ?? [],
|
|
1433
|
-
integrationType,
|
|
1434
|
-
});
|
|
1435
|
-
const toolRegistry = (0, tool_registry_1.buildToolRegistry)(resolvedTools);
|
|
1436
|
-
return { agent: reconstructed, toolRegistry };
|
|
1315
|
+
return await this.agentRuntimeReconstructionService.reconstructFromAgentEntity(agentEntity, credentialProvider, userId, integrationType);
|
|
1437
1316
|
}
|
|
1438
1317
|
};
|
|
1439
1318
|
exports.AgentsService = AgentsService;
|
|
@@ -1448,17 +1327,7 @@ exports.AgentsService = AgentsService = __decorate([
|
|
|
1448
1327
|
__metadata("design:paramtypes", [backend_common_1.Logger,
|
|
1449
1328
|
agent_repository_1.AgentRepository,
|
|
1450
1329
|
db_1.ProjectRelationRepository,
|
|
1451
|
-
workflow_runner_1.WorkflowRunner,
|
|
1452
|
-
active_executions_1.ActiveExecutions,
|
|
1453
|
-
db_1.ExecutionRepository,
|
|
1454
|
-
db_1.WorkflowRepository,
|
|
1455
|
-
db_1.UserRepository,
|
|
1456
|
-
workflow_finder_service_1.WorkflowFinderService,
|
|
1457
|
-
url_service_1.UrlService,
|
|
1458
1330
|
n8n_checkpoint_storage_1.N8NCheckpointStorage,
|
|
1459
|
-
agent_secure_runtime_1.AgentSecureRuntime,
|
|
1460
|
-
node_execution_1.EphemeralNodeExecutor,
|
|
1461
|
-
agents_tools_service_1.AgentsToolsService,
|
|
1462
1331
|
n8n_memory_1.N8nMemory,
|
|
1463
1332
|
agent_execution_service_1.AgentExecutionService,
|
|
1464
1333
|
agent_history_repository_1.AgentHistoryRepository,
|
|
@@ -1471,11 +1340,14 @@ exports.AgentsService = AgentsService = __decorate([
|
|
|
1471
1340
|
telemetry_1.Telemetry,
|
|
1472
1341
|
chat_integration_service_1.ChatIntegrationService,
|
|
1473
1342
|
agent_knowledge_service_1.AgentKnowledgeService,
|
|
1474
|
-
|
|
1475
|
-
oauth_service_1.OauthService])
|
|
1343
|
+
agent_runtime_reconstruction_service_1.AgentRuntimeReconstructionService])
|
|
1476
1344
|
], AgentsService);
|
|
1477
|
-
function
|
|
1478
|
-
|
|
1479
|
-
|
|
1345
|
+
function isRecord(value) {
|
|
1346
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
1347
|
+
}
|
|
1348
|
+
function hasNodeToolInputSchema(raw) {
|
|
1349
|
+
if (!isRecord(raw) || !Array.isArray(raw.tools))
|
|
1350
|
+
return false;
|
|
1351
|
+
return raw.tools.some((tool) => isRecord(tool) && tool.type === 'node' && 'inputSchema' in tool);
|
|
1480
1352
|
}
|
|
1481
1353
|
//# sourceMappingURL=agents.service.js.map
|