n8n 2.30.3 → 2.31.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/agent-library-bundle.js +9 -0
- package/dist/blob-storage/azure-byte-store.ee.d.ts +1 -1
- package/dist/blob-storage/azure-byte-store.ee.js +3 -18
- package/dist/blob-storage/azure-byte-store.ee.js.map +1 -1
- package/dist/blob-storage/json-store.js +3 -0
- package/dist/blob-storage/json-store.js.map +1 -1
- package/dist/blob-storage/s3-byte-store.ee.d.ts +1 -1
- package/dist/blob-storage/s3-byte-store.ee.js +2 -17
- package/dist/blob-storage/s3-byte-store.ee.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/commands/base-command.d.ts +2 -2
- package/dist/commands/base-command.js +5 -5
- package/dist/commands/base-command.js.map +1 -1
- package/dist/commands/start.js +2 -0
- package/dist/commands/start.js.map +1 -1
- package/dist/constants/workflow-reviews.d.ts +4 -0
- package/dist/constants/workflow-reviews.js +14 -0
- package/dist/constants/workflow-reviews.js.map +1 -0
- package/dist/constants.js +2 -0
- package/dist/constants.js.map +1 -1
- package/dist/controllers/e2e.controller.js +1 -0
- package/dist/controllers/e2e.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.d.ts +15 -10
- package/dist/controllers/security-settings.controller.js +41 -65
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/controllers/users.controller.d.ts +2 -2
- package/dist/credentials/credential-connection-status-provider.interface.d.ts +2 -1
- package/dist/credentials/credential-connection-status-proxy.d.ts +2 -1
- package/dist/credentials/credential-connection-status-proxy.js +7 -2
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
- package/dist/credentials/credentials.controller.js +5 -5
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +1 -0
- package/dist/credentials/credentials.service.ee.d.ts +3 -1
- package/dist/credentials/credentials.service.ee.js +10 -2
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +14 -0
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +4 -2
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +19 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +2 -0
- package/dist/events/relays/log-streaming.event-relay.js +30 -2
- 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 +88 -10
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +21 -4
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-data/db-store.d.ts +8 -15
- package/dist/executions/execution-data/db-store.js +12 -25
- package/dist/executions/execution-data/db-store.js.map +1 -1
- package/dist/executions/execution-data/execution-data-json-store.d.ts +7 -0
- package/dist/executions/execution-data/execution-data-json-store.js +45 -0
- package/dist/executions/execution-data/execution-data-json-store.js.map +1 -0
- package/dist/executions/execution-data/types.d.ts +3 -14
- package/dist/executions/execution-data/types.js.map +1 -1
- package/dist/executions/execution-persistence.d.ts +7 -14
- package/dist/executions/execution-persistence.js +40 -88
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/executions/execution.service.d.ts +3 -4
- package/dist/executions/execution.service.js +4 -13
- package/dist/executions/execution.service.js.map +1 -1
- package/dist/executions/executions.controller.js +1 -10
- package/dist/executions/executions.controller.js.map +1 -1
- package/dist/interfaces.d.ts +4 -1
- package/dist/load-nodes-and-credentials.js +1 -1
- package/dist/load-nodes-and-credentials.js.map +1 -1
- package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
- package/dist/metrics/prometheus/prometheus.service.js +5 -2
- package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
- package/dist/metrics/prometheus/scheduler-metrics.service.d.ts +35 -0
- package/dist/metrics/prometheus/scheduler-metrics.service.js +187 -0
- package/dist/metrics/prometheus/scheduler-metrics.service.js.map +1 -0
- package/dist/modules/agents/adapters/agents-credential-provider.d.ts +1 -0
- package/dist/modules/agents/adapters/agents-credential-provider.js +13 -3
- package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
- package/dist/modules/agents/agent-config.service.js +11 -1
- package/dist/modules/agents/agent-config.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge.controller.js +1 -1
- package/dist/modules/agents/agent-knowledge.controller.js.map +1 -1
- package/dist/modules/agents/agent-upload.middleware.d.ts +2 -0
- package/dist/modules/agents/agent-upload.middleware.js +11 -0
- package/dist/modules/agents/agent-upload.middleware.js.map +1 -1
- package/dist/modules/agents/agent-validation.service.js +19 -2
- package/dist/modules/agents/agent-validation.service.js.map +1 -1
- package/dist/modules/agents/agent-vector-stores.controller.d.ts +11 -0
- package/dist/modules/agents/agent-vector-stores.controller.js +41 -0
- package/dist/modules/agents/agent-vector-stores.controller.js.map +1 -0
- package/dist/modules/agents/agent-vector-stores.service.d.ts +9 -0
- package/dist/modules/agents/agent-vector-stores.service.js +195 -0
- package/dist/modules/agents/agent-vector-stores.service.js.map +1 -0
- package/dist/modules/agents/agents-config.controller.d.ts +112 -69
- package/dist/modules/agents/agents.controller.d.ts +5 -1
- package/dist/modules/agents/agents.controller.js +11 -0
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.js +1 -0
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +7 -2
- package/dist/modules/agents/agents.service.js +65 -2
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/attachable-workflows.service.d.ts +12 -0
- package/dist/modules/agents/attachable-workflows.service.js +58 -0
- package/dist/modules/agents/attachable-workflows.service.js.map +1 -0
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js +3 -2
- package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +4 -4
- package/dist/modules/agents/builder/agents-builder-prompts.js +40 -27
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +3 -5
- package/dist/modules/agents/builder/agents-builder-tools.service.js +48 -194
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +10 -3
- package/dist/modules/agents/builder/agents-builder.service.js +22 -12
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/errors.d.ts +3 -2
- package/dist/modules/agents/builder/errors.js +3 -2
- package/dist/modules/agents/builder/errors.js.map +1 -1
- package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +99 -2
- package/dist/modules/agents/builder/get-resource-locator-options.tool.js +103 -101
- package/dist/modules/agents/builder/get-resource-locator-options.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +48 -32
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-questions.tool.d.ts +2 -0
- package/dist/modules/agents/builder/interactive/ask-questions.tool.js +108 -0
- package/dist/modules/agents/builder/interactive/ask-questions.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/configure-channel.tool.d.ts +7 -0
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js +52 -0
- package/dist/modules/agents/builder/interactive/configure-channel.tool.js.map +1 -0
- package/dist/modules/agents/builder/interactive/index.d.ts +2 -2
- package/dist/modules/agents/builder/interactive/index.js +5 -5
- package/dist/modules/agents/builder/interactive/index.js.map +1 -1
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +2 -2
- package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +2 -2
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +10 -10
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/memory.prompt.js +1 -1
- package/dist/modules/agents/builder/search-mcp-servers.tool.js +1 -63
- package/dist/modules/agents/builder/search-mcp-servers.tool.js.map +1 -1
- package/dist/modules/agents/builder/skills/index.d.ts +1 -1
- package/dist/modules/agents/builder/skills/index.js +5 -1
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/integrations.skill.js +15 -6
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/mcp.skill.js +2 -2
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/resource-locators.skill.js +2 -2
- package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/sub-agents.skill.js +7 -5
- package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +5 -4
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +5 -5
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +14 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +96 -0
- package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -0
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +72 -72
- package/dist/modules/agents/integrations/integration-tool-definitions.d.ts +574 -574
- package/dist/modules/agents/json-config/embedding-credential.d.ts +4 -0
- package/dist/modules/agents/json-config/embedding-credential.js +25 -0
- package/dist/modules/agents/json-config/embedding-credential.js.map +1 -0
- package/dist/modules/agents/json-config/from-json-config.d.ts +2 -6
- package/dist/modules/agents/json-config/from-json-config.js +16 -16
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/model-config.js +2 -2
- package/dist/modules/agents/json-config/model-config.js.map +1 -1
- package/dist/modules/agents/json-config/vector-store-factory.d.ts +5 -0
- package/dist/modules/agents/json-config/vector-store-factory.js +138 -0
- package/dist/modules/agents/json-config/vector-store-factory.js.map +1 -0
- package/dist/modules/breaking-changes/rules/index.d.ts +8 -0
- package/dist/modules/breaking-changes/rules/index.js +8 -0
- package/dist/modules/breaking-changes/rules/index.js.map +1 -1
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.d.ts +6 -0
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js +59 -0
- package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.d.ts +9 -0
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js +57 -0
- package/dist/modules/breaking-changes/rules/v3/docker-only-deployment.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.d.ts +10 -0
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js +53 -0
- package/dist/modules/breaking-changes/rules/v3/get-paired-item.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.d.ts +9 -0
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js +56 -0
- package/dist/modules/breaking-changes/rules/v3/in-memory-binary-data.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.d.ts +9 -0
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js +57 -0
- package/dist/modules/breaking-changes/rules/v3/offload-manual-executions.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.d.ts +6 -0
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js +50 -0
- package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.d.ts +9 -0
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js +57 -0
- package/dist/modules/breaking-changes/rules/v3/unverified-packages.rule.js.map +1 -0
- package/dist/modules/breaking-changes/rules/v3/workflow-import-url-removed.rule.d.ts +6 -0
- package/dist/modules/breaking-changes/rules/v3/workflow-import-url-removed.rule.js +47 -0
- package/dist/modules/breaking-changes/rules/v3/workflow-import-url-removed.rule.js.map +1 -0
- package/dist/modules/chat-hub/chat-hub.module.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.settings.controller.d.ts +3 -3
- package/dist/modules/data-table/data-table-ddl.service.d.ts +2 -0
- package/dist/modules/data-table/data-table-ddl.service.js +16 -0
- package/dist/modules/data-table/data-table-ddl.service.js.map +1 -1
- package/dist/modules/data-table/data-table.service.d.ts +6 -3
- package/dist/modules/data-table/data-table.service.js +19 -0
- package/dist/modules/data-table/data-table.service.js.map +1 -1
- package/dist/modules/data-table/utils/sql-utils.d.ts +1 -0
- package/dist/modules/data-table/utils/sql-utils.js +4 -0
- package/dist/modules/data-table/utils/sql-utils.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.d.ts +0 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +0 -13
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +5 -3
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +19 -7
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +1 -1
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/favorites/dto/add-favorite.dto.d.ts +2 -2
- package/dist/modules/favorites/favorites.event-relay.js +2 -3
- package/dist/modules/favorites/favorites.event-relay.js.map +1 -1
- package/dist/modules/favorites/favorites.service.d.ts +4 -1
- package/dist/modules/favorites/favorites.service.js +28 -3
- package/dist/modules/favorites/favorites.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/execution.service.d.ts +4 -1
- package/dist/modules/instance-ai/eval/execution.service.js +26 -3
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.js +7 -0
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/pin-data-generator.js +17 -17
- package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +17 -6
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +153 -30
- package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +7 -2
- package/dist/modules/instance-ai/instance-ai-memory.service.js +12 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +0 -7
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +89 -3
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +272 -42
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.controller.js +9 -2
- package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +0 -1
- package/dist/modules/instance-ai/instance-ai.service.js +45 -107
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/workflow-templates.service.d.ts +17 -0
- package/dist/modules/instance-ai/workflow-templates.service.js +63 -0
- package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -0
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.d.ts +1 -0
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.js +2 -0
- package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination.ee.js.map +1 -1
- package/dist/modules/mcp/dto/update-workflows-availability.dto.d.ts +2 -0
- package/dist/modules/mcp/dto/update-workflows-availability.dto.js +1 -0
- package/dist/modules/mcp/dto/update-workflows-availability.dto.js.map +1 -1
- package/dist/modules/mcp/mcp-protected-resource.d.ts +4 -1
- package/dist/modules/mcp/mcp-protected-resource.js +13 -3
- package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
- package/dist/modules/mcp/mcp.config.d.ts +1 -0
- package/dist/modules/mcp/mcp.config.js +20 -0
- package/dist/modules/mcp/mcp.config.js.map +1 -1
- package/dist/modules/mcp/mcp.module.d.ts +1 -0
- package/dist/modules/mcp/mcp.module.js +3 -1
- package/dist/modules/mcp/mcp.module.js.map +1 -1
- package/dist/modules/mcp/mcp.settings.service.d.ts +1 -1
- package/dist/modules/mcp/mcp.settings.service.js +33 -18
- package/dist/modules/mcp/mcp.settings.service.js.map +1 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +4 -2
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +2 -0
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +10 -5
- package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.js +4 -0
- package/dist/modules/mcp/tools/workflow-builder/restore-workflow-version.tool.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 +5 -1
- package/dist/modules/mcp/tools/workflow-builder/skills-used.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +10 -5
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/version-metadata.d.ts +27 -0
- package/dist/modules/mcp/tools/workflow-builder/version-metadata.js +109 -0
- package/dist/modules/mcp/tools/workflow-builder/version-metadata.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +18 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js +64 -0
- package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +2 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js +4 -0
- package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js +2 -1
- package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
- package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +30 -0
- package/dist/modules/n8n-packages/engine/import-orchestrator.js +86 -0
- package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-result.d.ts +14 -0
- package/dist/modules/n8n-packages/engine/import-result.js +43 -0
- package/dist/modules/n8n-packages/engine/import-result.js.map +1 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +7 -0
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js +72 -13
- package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
- package/dist/modules/n8n-packages/engine/package-layout.d.ts +11 -0
- package/dist/modules/n8n-packages/engine/package-layout.js +21 -0
- package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +11 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.js +44 -0
- package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +24 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js +168 -0
- package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.d.ts +3 -1
- package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js +8 -2
- package/dist/modules/n8n-packages/entities/credential/credential-matcher-factory.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.d.ts +6 -6
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +34 -4
- package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/credential-tier-selection.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/credential/credential-tier-selection.js +27 -0
- package/dist/modules/n8n-packages/entities/credential/credential-tier-selection.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 +18 -2
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.d.ts +3 -7
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js +8 -23
- package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js.map +1 -1
- package/dist/modules/n8n-packages/entities/credential/name-and-type-credential-matcher.d.ts +8 -0
- package/dist/modules/n8n-packages/entities/credential/name-and-type-credential-matcher.js +31 -0
- package/dist/modules/n8n-packages/entities/credential/name-and-type-credential-matcher.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/type-only-credential-matcher.d.ts +8 -0
- package/dist/modules/n8n-packages/entities/credential/type-only-credential-matcher.js +31 -0
- package/dist/modules/n8n-packages/entities/credential/type-only-credential-matcher.js.map +1 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js +38 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.d.ts +26 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +97 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js +31 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.types.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.types.js +3 -0
- package/dist/modules/n8n-packages/entities/data-table/data-table.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js +11 -0
- package/dist/modules/n8n-packages/entities/folder/folder-conflict-policy.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder-import.types.d.ts +20 -0
- package/dist/modules/n8n-packages/entities/folder/folder-import.types.js +3 -0
- package/dist/modules/n8n-packages/entities/folder/folder-import.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder-importer.d.ts +10 -0
- package/dist/modules/n8n-packages/entities/folder/folder-importer.js +140 -0
- package/dist/modules/n8n-packages/entities/folder/folder-importer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +5 -2
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +48 -44
- package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/folder/folder.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/entities/package-export.errors.d.ts +8 -0
- package/dist/modules/n8n-packages/entities/package-export.errors.js +27 -0
- package/dist/modules/n8n-packages/entities/package-export.errors.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +15 -0
- package/dist/modules/n8n-packages/entities/project/project-import.types.js +3 -0
- package/dist/modules/n8n-packages/entities/project/project-import.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project-importer.d.ts +13 -0
- package/dist/modules/n8n-packages/entities/project/project-importer.js +97 -0
- package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +22 -4
- package/dist/modules/n8n-packages/entities/project/project.exporter.js +71 -26
- package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/requirements.types.d.ts +2 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js +1 -0
- package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +4 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +11 -17
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +12 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js +51 -11
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +47 -22
- package/dist/modules/n8n-packages/n8n-packages.types.js +5 -1
- package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
- package/dist/modules/n8n-packages/package-failure-classifier.d.ts +2 -0
- package/dist/modules/n8n-packages/package-failure-classifier.js +29 -0
- package/dist/modules/n8n-packages/package-failure-classifier.js.map +1 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +62 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +55 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js +26 -15
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/serialized/data-table.schema.d.ts +49 -0
- package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js +20 -0
- package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js.map +1 -0
- package/dist/modules/redaction/executions/execution-redaction.service.js +1 -1
- package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
- package/dist/modules/source-control.ee/constants.d.ts +1 -0
- package/dist/modules/source-control.ee/constants.js +2 -1
- package/dist/modules/source-control.ee/constants.js.map +1 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.d.ts +0 -1
- package/dist/modules/source-control.ee/source-control-git.service.ee.js +0 -22
- 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 -1
- package/dist/modules/source-control.ee/source-control-helper.ee.js +13 -0
- 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.d.ts +10 -2
- package/dist/modules/source-control.ee/source-control-import.service.ee.js +94 -59
- 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.d.ts +0 -1
- package/dist/modules/source-control.ee/source-control-status.service.ee.js +30 -30
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +6 -6
- package/dist/modules/source-control.ee/source-control.service.ee.d.ts +3 -3
- package/dist/modules/source-control.ee/source-control.service.ee.js +8 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/public-api/types.d.ts +5 -1
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js +9 -0
- package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +87 -38
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/handlers/security-policy/security-policy.handler.d.ts +8 -0
- package/dist/public-api/v1/handlers/security-policy/security-policy.handler.js +39 -0
- package/dist/public-api/v1/handlers/security-policy/security-policy.handler.js.map +1 -0
- package/dist/public-api/v1/openapi.yml +243 -12
- package/dist/scaling/job-processor.js +44 -6
- package/dist/scaling/job-processor.js.map +1 -1
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +4 -1
- package/dist/scheduling/durable-job-provisioner.d.ts +16 -0
- package/dist/scheduling/durable-job-provisioner.js +135 -0
- package/dist/scheduling/durable-job-provisioner.js.map +1 -0
- package/dist/scheduling/durable-scheduler.d.ts +16 -0
- package/dist/scheduling/durable-scheduler.js +117 -0
- package/dist/scheduling/durable-scheduler.js.map +1 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.d.ts +23 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.js +149 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task-handler.js.map +1 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.d.ts +10 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.js +33 -0
- package/dist/scheduling/schedule-trigger-node/schedule-trigger-task.js.map +1 -0
- package/dist/scheduling/scheduler-tracer.d.ts +3 -0
- package/dist/scheduling/scheduler-tracer.js +11 -0
- package/dist/scheduling/scheduler-tracer.js.map +1 -0
- package/dist/server.js +6 -1
- package/dist/server.js.map +1 -1
- package/dist/services/folder-finder.service.d.ts +2 -0
- package/dist/services/folder-finder.service.js +16 -0
- package/dist/services/folder-finder.service.js.map +1 -1
- package/dist/services/folder.service.d.ts +3 -2
- package/dist/services/folder.service.js +11 -1
- package/dist/services/folder.service.js.map +1 -1
- package/dist/services/frontend.service.d.ts +3 -1
- package/dist/services/frontend.service.js +14 -2
- package/dist/services/frontend.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +7 -1
- package/dist/services/project.service.ee.js +21 -4
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/protected-resource.registry.d.ts +1 -0
- package/dist/services/protected-resource.registry.js +11 -7
- package/dist/services/protected-resource.registry.js.map +1 -1
- package/dist/services/security-settings.service.d.ts +31 -1
- package/dist/services/security-settings.service.js +75 -2
- package/dist/services/security-settings.service.js.map +1 -1
- package/dist/services/workflow-review-policy.service.d.ts +11 -0
- package/dist/services/workflow-review-policy.service.js +52 -0
- package/dist/services/workflow-review-policy.service.js.map +1 -0
- package/dist/telemetry/index.d.ts +2 -0
- package/dist/telemetry/index.js +6 -3
- package/dist/telemetry/index.js.map +1 -1
- package/dist/webhooks/live-webhooks.js +2 -2
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/test-webhooks.js +4 -1
- package/dist/webhooks/test-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-webhooks.js +2 -2
- package/dist/webhooks/waiting-webhooks.js.map +1 -1
- package/dist/workflow-execute-additional-data.js +5 -4
- package/dist/workflow-execute-additional-data.js.map +1 -1
- package/dist/workflow-helpers.js +26 -0
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/triggers/webhook-trigger-registrar.js +22 -15
- package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
- package/dist/workflows/triggers/workflow-trigger-activator.js +1 -7
- package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +2 -0
- package/dist/workflows/workflow-creation.service.js +4 -2
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-execution.service.js +8 -5
- package/dist/workflows/workflow-execution.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +5 -2
- package/dist/workflows/workflow-finder.service.js +25 -2
- package/dist/workflows/workflow-finder.service.js.map +1 -1
- package/dist/workflows/workflow-history/workflow-history.service.d.ts +4 -1
- package/dist/workflows/workflow-history/workflow-history.service.js +3 -1
- package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
- package/dist/workflows/workflow-validation.service.js +3 -3
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.request.d.ts +7 -22
- package/dist/workflows/workflow.service.d.ts +2 -0
- package/dist/workflows/workflow.service.js +4 -2
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +1 -1
- package/dist/workflows/workflows.controller.js +8 -3
- package/dist/workflows/workflows.controller.js.map +1 -1
- package/package.json +45 -40
- package/templates/form-trigger-completion.handlebars +6 -6
- package/dist/executions/execution-data/azure-store.ee.d.ts +0 -15
- package/dist/executions/execution-data/azure-store.ee.js +0 -117
- package/dist/executions/execution-data/azure-store.ee.js.map +0 -1
- package/dist/executions/execution-data/fs-store.d.ts +0 -16
- package/dist/executions/execution-data/fs-store.js +0 -118
- package/dist/executions/execution-data/fs-store.js.map +0 -1
- package/dist/executions/execution-data/s3-store.ee.d.ts +0 -15
- package/dist/executions/execution-data/s3-store.ee.js +0 -116
- package/dist/executions/execution-data/s3-store.ee.js.map +0 -1
- package/dist/modules/agents/builder/from-ai-node-parameters.d.ts +0 -7
- package/dist/modules/agents/builder/from-ai-node-parameters.js +0 -43
- package/dist/modules/agents/builder/from-ai-node-parameters.js.map +0 -1
- package/dist/modules/agents/builder/interactive/ask-llm.tool.d.ts +0 -2
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js +0 -25
- package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +0 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.d.ts +0 -2
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +0 -27
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +0 -1
- package/dist/modules/agents/json-config/model-id.d.ts +0 -1
- package/dist/modules/agents/json-config/model-id.js +0 -8
- package/dist/modules/agents/json-config/model-id.js.map +0 -1
- package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +0 -7
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js +0 -55
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +0 -1
- package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +0 -28
- package/dist/modules/n8n-packages/engine/import-pipeline.js +0 -204
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +0 -1
|
@@ -2,13 +2,13 @@ export declare function getAgentStateSection(configJson: string, configHash: str
|
|
|
2
2
|
export declare const TARGET_AGENT_SECTION = "## Builder vs Target Agent\n\nYou are the builder agent, not the target agent.\nThe target agent is the AI agent you are configuring for the user. Changes to\nconfig, tools, memory, integrations, and target-agent skills affect the target\nagent, not your own builder behavior.";
|
|
3
3
|
export declare function getConversationModeSection(agentPreviewPath: string): string;
|
|
4
4
|
export declare function getBuilderSkillRoutingSection(): string;
|
|
5
|
-
export declare const INTERACTIVE_TOOLS_SECTION = "## Interactive tools\n\nThese tools render a UI card in the chat and suspend your run until the user\nresponds. Treat the resume value as authoritative; it is the user's choice and\nmust be persisted exactly as returned.\n\nOnce you are building, ask for any specific decision, choice, value, or\nclarification through one of these tools rather than in plain prose. Use\n`
|
|
5
|
+
export declare const INTERACTIVE_TOOLS_SECTION = "## Interactive tools\n\nThese tools render a UI card in the chat and suspend your run until the user\nresponds. Treat the resume value as authoritative; it is the user's choice and\nmust be persisted exactly as returned.\n\nOnce you are building, ask for any specific decision, choice, value, or\nclarification through one of these tools rather than in plain prose. Use\n`ask_credential` for node-tool credentials, `configure_channel` for\nchat-channel connections, and `ask_questions` for everything else, including\nthe model/credential choice \u2014 resolve the answer with `resolve_llm`.\nException: the opening reply to a greeting, a \"what do you do\", or a vague\nintent \u2014 there you reply conversationally and ask for the overall goal, per\n\"When To Build vs When To Converse\".\n\n- `ask_credential`: use once per required node-tool credential slot before\n the config mutation that introduces the tool. NEVER use it for a chat-channel\n credential \u2014 use `configure_channel` instead.\n- `configure_channel`: ALWAYS use this to connect a chat platform (Slack,\n Telegram, ...) as an agent channel, with a type from `list_integration_types`.\n The setup UI creates and persists the credential itself.\n- `ask_questions`: the default way to ask the user anything that isn't a\n node-tool credential or channel choice, including when the user must choose,\n confirm, configure, or change the target agent's main provider, model, or\n LLM credential \u2014 resolve the answer with `resolve_llm`. Batch every\n question you currently need into a single call instead of asking one at a\n time. Each question is single-select, multi-select, or free-text; pass\n discrete `options` for a known small set of choices, or `type: \"text\"` for\n an open-ended question.\n- Never call two interactive tools in parallel. The run suspends on the first.\n- Never re-ask a question the user already answered in this thread.\n- After resume, continue with the next concrete tool action. Do not narrate the\n answer back to the user.";
|
|
6
6
|
export declare const N8N_EXPRESSIONS_SECTION = "## n8n expressions\n\nNode tool parameters inside `nodeParameters` can use n8n expressions.\nPrefer `$fromAI` whenever the target agent should decide a value at runtime.\nDo not use `$fromAI` for stable resource IDs that the target agent cannot know\nat runtime, such as Linear `teamId`, project IDs, channel IDs, calendar IDs,\ndatabase IDs, table IDs, or other dynamic \"Name or ID\" selectors. Resolve those\nwith the `agent-builder-resource-locators` skill, `ask_credential`, and\n`get_resource_locator_options`; write the returned `parameterValue` into\n`nodeParameters`.\n\n- `={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('fieldName', 'What value to provide', 'string') }}`\n- `={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('count', 'How many items', 'number') }}`\n- `={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('enabled', 'Whether to enable this option', 'boolean') }}`\n- `={{ $now.toISO() }}` for current date/time.\n- `={{ $today }}` for the start of today.\n\nAlways wrap expressions in `={{ }}`. Never pipe AI-chosen node-tool fields\nthrough `$json`; use `$fromAI` for those fields instead.";
|
|
7
7
|
export declare const READ_CONFIG_FRESHNESS_SECTION = "## Config Freshness\n\nThe agent config can change at any time \u2014 the user can edit it directly in the UI\nbetween your turns \u2014 so your memory of it is NEVER authoritative. Never assume the\nconfig's contents or answer from memory, conversation history, or earlier tool\nresults.\n\nAlways call `read_config` first whenever a request touches the config, including:\n\n- Answering any question about the current config: which tools, skills, model,\n memory, or integrations are configured, whether a specific item is present, or\n what a value is currently set to.\n- Before any `write_config` or `patch_config`: use only the freshly returned\n `config` and `configHash` as the write base, never a remembered snapshot.\n\nExample: you added a tool earlier, the user then removed it in the UI, and now\nasks you to add it back. Do NOT assume it is still there \u2014 call `read_config`\nfirst, then act on the real current state.\n\nIf `write_config` or `patch_config` returns `stage: \"stale\"`, retry once\nfrom the returned `config` and `configHash`. For any independent later\nchange, call `read_config` again.";
|
|
8
|
-
export declare const IMPORTANT_SECTION = "## Important\n\n- Credentials are user-controlled. Use `resolve_llm`
|
|
8
|
+
export declare const IMPORTANT_SECTION = "## Important\n\n- Credentials are user-controlled. Use `resolve_llm` (asking via\n `ask_questions` first when the user must choose) for the target agent's\n main model, `ask_credential` for node-tool or Episodic Memory credentials,\n and `configure_channel` (never `ask_credential`) for chat-channel\n credentials. Never copy credential IDs from `list_credentials` into config.\n- To get a specific decision, choice, or value for a build step, use\n `ask_questions` (discrete options for a known set, `type: \"text\"` for\n open-ended; batch multiple questions into one call) for model, credential,\n and other choices, or `ask_credential`/`configure_channel` for node-tool\n and channel credentials \u2014 not plain prose. Replying conversationally to a\n greeting or vague intent to ask for the overall goal is fine; see \"When To\n Build vs When To Converse\".\n- Tool preference order for real-world integrations:\n 1. MCP servers (`search_mcp_servers`) \u2014 always check first\n 2. Node tools (`search_nodes`)\n\t\t- Exception: generic web search is configured via `config.webSearch`, including Brave and SearXNG fallback search credentials via `config.webSearch.fallbackSearchCredentials`. Do not call `search_nodes` for web search.\n 3. Workflow tools (`list_workflows`)\n 4. Custom tools (`build_custom_tool`) \u2014 last resort\n- `build_custom_tool` stores code only; register the returned id in config.\n- `create_skill` stores a target-agent skill body only. Write a specific routing\n `description` and a `body` that follows the structured template (Overview,\n Inputs, Steps, Rules, Example, Gotchas); keep asking clarifying questions until\n you have the domain detail to fill it with concrete content \u2014 never a vague or\n placeholder skill. It is active only after `read_config` plus `patch_config` or\n `write_config` adds `{ \"type\": \"skill\", \"id\": \"<returned id>\" }` to `skills`.\n Load `agent-builder-target-skills` for the full workflow and the template.\n- `create_task` creates a recurring scheduled task (name + objective + cron) for\n the target agent. The objective MUST follow the structured template (Objective,\n Context, Steps, Output, Constraints, Success criteria) with every section filled\n in; keep asking clarifying questions until you can complete every section and the\n schedule is clear. A task can only use tools the agent already has, so if its\n steps need a capability the agent is missing (an integration, node/workflow tool,\n or web search), add it to the agent config first \u2014 follow the tool-preference\n order above via `read_config` + `patch_config`/`write_config` \u2014 before calling\n `create_task`. `create_task` adds a `{ type: \"task\", id, enabled }` ref to\n `config.tasks` (the config is the source of truth) and the task runs once the\n agent is published; disable or remove a task by editing `config.tasks`. Load\n `agent-builder-target-tasks` for the full workflow and the template.\n- Fresh agents must include enabled n8n session-scoped memory unless the user\n explicitly asks to disable memory.";
|
|
9
9
|
export declare const RESPONSE_STYLE_SECTION = "## Response Style\n\nBe concise. After a build step, give a 1-2 sentence summary of what changed and\none useful next step if there is one. Do not narrate reasoning before tool\ncalls, reprint JSON, or list what is already visible in the sidebar.";
|
|
10
|
-
export declare const WORKFLOW_SECTION = "## Workflow\n\n1. If the agent has no `instructions` and `credential` yet, call\n `resolve_llm` when the user specified a provider/model, or call `
|
|
11
|
-
export declare const FEW_SHOT_FLOWS_SECTION = "## Example flows\n\n### New agent: \"Build me a Slack triage agent\"\n1. `
|
|
10
|
+
export declare const WORKFLOW_SECTION = "## Workflow\n\n1. If the agent has no `instructions` and `credential` yet, call\n `resolve_llm` when the user specified a provider/model, or ask via\n `ask_questions` and call `resolve_llm` with the answer if they didn't.\n2. Draft real target-agent `instructions`; never write empty placeholders.\n3. Use `ask_questions` for clarifying questions with discrete options, batching\n multiple questions into one call.\n4. Before adding any node tool that needs credentials, call `ask_credential`\n for each required slot.\n5. Prefer existing workflow tools and node tools over custom tools for\n real-world integrations.\n6. Use `create_skill` for reusable target-agent instruction bundles, then\n attach the returned id to `skills` through `read_config` plus\n `patch_config` or `write_config`.\n7. Before every `write_config` or `patch_config`, call `read_config` in the\n same turn and use the returned `configHash` as `baseConfigHash`.";
|
|
11
|
+
export declare const FEW_SHOT_FLOWS_SECTION = "## Example flows\n\n### New agent: \"Build me a Slack triage agent\"\n1. `ask_questions({ ... })` for the model choice, then\n `resolve_llm({ provider, model })` -> resolved provider, model, and credential.\n2. `search_nodes({ query: \"slack\" })`, then `get_node_types(...)`.\n3. `ask_credential(...)` for the Slack credential slot.\n4. `read_config()`.\n5. `write_config(...)` with model, credential, instructions, and Slack tool.\n\n### New agent: \"Use Anthropic via OpenRouter\"\n1. `resolve_llm({ provider: \"openrouter\" })`.\n2. `read_config()`.\n3. `write_config(...)` with `model: \"openrouter/{resolvedModel}\"`,\n `credential`, and requested instructions.\n\n### Change the existing model\n1. `ask_questions({ ... })` for the new model choice, then\n `resolve_llm({ provider, model })`.\n2. `read_config()`.\n3. `patch_config(...)` replacing `/model` and `/credential`.\n\n### Add a node tool to an existing agent\n1. Search and inspect the node type.\n2. `ask_credential` for every required slot.\n3. `read_config()`.\n4. `patch_config(...)` adding the node tool to `/tools/-`.\n\n### Add a node tool when credential setup is skipped\n1. Search and inspect the node type.\n2. `ask_credential(...)` -> `{ skipped: true }`.\n3. `read_config()`.\n4. `patch_config(...)` adding the tool and omitting only the skipped\n credential slot. Do not abort the tool addition.\n\n### Add MCP integration: \"Connect Notion MCP\"\n1. `load_skill({ \"skillId\": \"agent-builder-mcp\" })`.\n2. `search_mcp_servers({ queries: [\"notion\"] })`.\n3. `ask_credential({ credentialType: \"<result.credentialType>\" })`.\n4. `verify_mcp_server({ name, url, transport, authentication, credential })`.\n5. `read_config()`.\n6. `patch_config(...)` adding a new `/mcpServers/-` entry (including\n `metadata.nodeTypeName` when returned by `search_mcp_servers`).\n\n### Ambiguous request: \"Make it post somewhere\"\n1. `ask_questions(...)` with the known destination choices.\n2. Continue the chosen branch with node discovery, credentials, and config\n mutation.";
|
|
12
12
|
export interface BuilderPromptContext {
|
|
13
13
|
configJson: string;
|
|
14
14
|
configHash: string | null;
|
|
@@ -93,21 +93,27 @@ must be persisted exactly as returned.
|
|
|
93
93
|
|
|
94
94
|
Once you are building, ask for any specific decision, choice, value, or
|
|
95
95
|
clarification through one of these tools rather than in plain prose. Use
|
|
96
|
-
\`
|
|
97
|
-
and \`
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
target agent's main provider, model, or LLM credential.
|
|
96
|
+
\`ask_credential\` for node-tool credentials, \`configure_channel\` for
|
|
97
|
+
chat-channel connections, and \`ask_questions\` for everything else, including
|
|
98
|
+
the model/credential choice — resolve the answer with \`resolve_llm\`.
|
|
99
|
+
Exception: the opening reply to a greeting, a "what do you do", or a vague
|
|
100
|
+
intent — there you reply conversationally and ask for the overall goal, per
|
|
101
|
+
"When To Build vs When To Converse".
|
|
102
|
+
|
|
104
103
|
- \`ask_credential\`: use once per required node-tool credential slot before
|
|
105
|
-
the config mutation that introduces the tool.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
the config mutation that introduces the tool. NEVER use it for a chat-channel
|
|
105
|
+
credential — use \`configure_channel\` instead.
|
|
106
|
+
- \`configure_channel\`: ALWAYS use this to connect a chat platform (Slack,
|
|
107
|
+
Telegram, ...) as an agent channel, with a type from \`list_integration_types\`.
|
|
108
|
+
The setup UI creates and persists the credential itself.
|
|
109
|
+
- \`ask_questions\`: the default way to ask the user anything that isn't a
|
|
110
|
+
node-tool credential or channel choice, including when the user must choose,
|
|
111
|
+
confirm, configure, or change the target agent's main provider, model, or
|
|
112
|
+
LLM credential — resolve the answer with \`resolve_llm\`. Batch every
|
|
113
|
+
question you currently need into a single call instead of asking one at a
|
|
114
|
+
time. Each question is single-select, multi-select, or free-text; pass
|
|
115
|
+
discrete \`options\` for a known small set of choices, or \`type: "text"\` for
|
|
116
|
+
an open-ended question.
|
|
111
117
|
- Never call two interactive tools in parallel. The run suspends on the first.
|
|
112
118
|
- Never re-ask a question the user already answered in this thread.
|
|
113
119
|
- After resume, continue with the next concrete tool action. Do not narrate the
|
|
@@ -158,15 +164,18 @@ change, call \`read_config\` again.`;
|
|
|
158
164
|
exports.IMPORTANT_SECTION = `\
|
|
159
165
|
## Important
|
|
160
166
|
|
|
161
|
-
- Credentials are user-controlled. Use \`resolve_llm\`
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
\`
|
|
167
|
+
- Credentials are user-controlled. Use \`resolve_llm\` (asking via
|
|
168
|
+
\`ask_questions\` first when the user must choose) for the target agent's
|
|
169
|
+
main model, \`ask_credential\` for node-tool or Episodic Memory credentials,
|
|
170
|
+
and \`configure_channel\` (never \`ask_credential\`) for chat-channel
|
|
171
|
+
credentials. Never copy credential IDs from \`list_credentials\` into config.
|
|
165
172
|
- To get a specific decision, choice, or value for a build step, use
|
|
166
|
-
\`
|
|
167
|
-
open-ended
|
|
168
|
-
|
|
169
|
-
|
|
173
|
+
\`ask_questions\` (discrete options for a known set, \`type: "text"\` for
|
|
174
|
+
open-ended; batch multiple questions into one call) for model, credential,
|
|
175
|
+
and other choices, or \`ask_credential\`/\`configure_channel\` for node-tool
|
|
176
|
+
and channel credentials — not plain prose. Replying conversationally to a
|
|
177
|
+
greeting or vague intent to ask for the overall goal is fine; see "When To
|
|
178
|
+
Build vs When To Converse".
|
|
170
179
|
- Tool preference order for real-world integrations:
|
|
171
180
|
1. MCP servers (\`search_mcp_servers\`) — always check first
|
|
172
181
|
2. Node tools (\`search_nodes\`)
|
|
@@ -205,9 +214,11 @@ exports.WORKFLOW_SECTION = `\
|
|
|
205
214
|
## Workflow
|
|
206
215
|
|
|
207
216
|
1. If the agent has no \`instructions\` and \`credential\` yet, call
|
|
208
|
-
\`resolve_llm\` when the user specified a provider/model, or
|
|
217
|
+
\`resolve_llm\` when the user specified a provider/model, or ask via
|
|
218
|
+
\`ask_questions\` and call \`resolve_llm\` with the answer if they didn't.
|
|
209
219
|
2. Draft real target-agent \`instructions\`; never write empty placeholders.
|
|
210
|
-
3. Use \`
|
|
220
|
+
3. Use \`ask_questions\` for clarifying questions with discrete options, batching
|
|
221
|
+
multiple questions into one call.
|
|
211
222
|
4. Before adding any node tool that needs credentials, call \`ask_credential\`
|
|
212
223
|
for each required slot.
|
|
213
224
|
5. Prefer existing workflow tools and node tools over custom tools for
|
|
@@ -221,7 +232,8 @@ exports.FEW_SHOT_FLOWS_SECTION = `\
|
|
|
221
232
|
## Example flows
|
|
222
233
|
|
|
223
234
|
### New agent: "Build me a Slack triage agent"
|
|
224
|
-
1. \`
|
|
235
|
+
1. \`ask_questions({ ... })\` for the model choice, then
|
|
236
|
+
\`resolve_llm({ provider, model })\` -> resolved provider, model, and credential.
|
|
225
237
|
2. \`search_nodes({ query: "slack" })\`, then \`get_node_types(...)\`.
|
|
226
238
|
3. \`ask_credential(...)\` for the Slack credential slot.
|
|
227
239
|
4. \`read_config()\`.
|
|
@@ -234,7 +246,8 @@ exports.FEW_SHOT_FLOWS_SECTION = `\
|
|
|
234
246
|
\`credential\`, and requested instructions.
|
|
235
247
|
|
|
236
248
|
### Change the existing model
|
|
237
|
-
1. \`
|
|
249
|
+
1. \`ask_questions({ ... })\` for the new model choice, then
|
|
250
|
+
\`resolve_llm({ provider, model })\`.
|
|
238
251
|
2. \`read_config()\`.
|
|
239
252
|
3. \`patch_config(...)\` replacing \`/model\` and \`/credential\`.
|
|
240
253
|
|
|
@@ -261,7 +274,7 @@ exports.FEW_SHOT_FLOWS_SECTION = `\
|
|
|
261
274
|
\`metadata.nodeTypeName\` when returned by \`search_mcp_servers\`).
|
|
262
275
|
|
|
263
276
|
### Ambiguous request: "Make it post somewhere"
|
|
264
|
-
1. \`
|
|
277
|
+
1. \`ask_questions(...)\` with the known destination choices.
|
|
265
278
|
2. Continue the chosen branch with node discovery, credentials, and config
|
|
266
279
|
mutation.`;
|
|
267
280
|
function buildBuilderPrompt(ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agents-builder-prompts.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/agents-builder-prompts.ts"],"names":[],"mappings":";;;AAKA,oDAwBC;AAUD,gEAiBC;AAMD,sEA8BC;
|
|
1
|
+
{"version":3,"file":"agents-builder-prompts.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/agents-builder-prompts.ts"],"names":[],"mappings":";;;AAKA,oDAwBC;AAUD,gEAiBC;AAMD,sEA8BC;AAoND,gDA8BC;AA9UD,6EAA2E;AAC3E,yEAAuE;AACvE,2DAAwD;AACxD,yDAAsD;AAEtD,SAAgB,oBAAoB,CACnC,UAAkB,EAClB,UAAyB,EACzB,eAA8B,EAC9B,QAAgB;IAEhB,OAAO;;;gBAGQ,UAAU,IAAI,MAAM;eACrB,eAAe,IAAI,MAAM;;;EAGtC,UAAU;;;;;;;;;;EAUV,QAAQ,EAAE,CAAC;AACb,CAAC;AAEY,QAAA,oBAAoB,GAAG;;;;;;sCAME,CAAC;AAEvC,SAAgB,0BAA0B,CAAC,gBAAwB;IAClE,OAAO;;;;;;;;;;;yBAWiB,gBAAgB;;;;oEAI2B,CAAC;AACrE,CAAC;AAMD,SAAgB,6BAA6B;IAC5C,MAAM,KAAK,GAAa;QACvB,iFAAiF;YAChF,kFAAkF;YAClF,0DAA0D;QAC3D,0JAA0J;QAC1J,4WAA4W;QAC5W,mLAAmL;QACnL,wEAAwE;QACxE,0FAA0F;KAC1F,CAAC;IAEF,OAAO;;;;;;;;EAQN,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;2CASyB,CAAC;AAC5C,CAAC;AAEY,QAAA,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAiCd,CAAC;AAEf,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;6DAmBsB,CAAC;AAEjD,QAAA,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;oCAsBT,CAAC;AAExB,QAAA,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCA0CI,CAAC;AAEzB,QAAA,sBAAsB,GAAG;;;;;qEAK+B,CAAC;AAEzD,QAAA,gBAAgB,GAAG;;;;;;;;;;;;;;;;;wEAiBwC,CAAC;AAE5D,QAAA,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAgDzB,CAAC;AAYd,SAAgB,kBAAkB,CAAC,GAAyB;IAC3D,MAAM,EACL,UAAU,EACV,UAAU,EACV,eAAe,EACf,QAAQ,EACR,gBAAgB,EAChB,2BAA2B,GAC3B,GAAG,GAAG,CAAC;IAER,MAAM,QAAQ,GAAG;QAChB,6IAA6I;QAC7I,4BAAoB;QACpB,oBAAoB,CAAC,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,QAAQ,CAAC;QACvE,0BAA0B,CAAC,gBAAgB,CAAC;QAC5C,IAAA,gDAAuB,GAAE;QACzB,IAAA,4CAAqB,EAAC,2BAA2B,CAAC;QAClD,6BAAa;QACb,2BAAY;QACZ,6BAA6B,EAAE;QAC/B,iCAAyB;QACzB,+BAAuB;QACvB,qCAA6B;QAC7B,wBAAgB;QAChB,8BAAsB;QACtB,yBAAiB;QACjB,8BAAsB;KACtB,CAAC;IAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9B,CAAC"}
|
|
@@ -3,7 +3,6 @@ import { type AgentJsonConfig } from '@n8n/api-types';
|
|
|
3
3
|
import { OutboundHttp, SsrfProtectionService } from '@n8n/backend-network';
|
|
4
4
|
import { SsrfProtectionConfig } from '@n8n/config';
|
|
5
5
|
import type { User } from '@n8n/db';
|
|
6
|
-
import { WorkflowRepository } from '@n8n/db';
|
|
7
6
|
import { CredentialTypes } from '../../../credential-types';
|
|
8
7
|
import { McpRegistryService } from '../../../modules/mcp-registry/registry/mcp-registry.service';
|
|
9
8
|
import { NodeTypes } from '../../../node-types';
|
|
@@ -17,6 +16,7 @@ import { AgentSkillsService } from '../agent-skills.service';
|
|
|
17
16
|
import { AgentTaskService } from '../agent-task.service';
|
|
18
17
|
import { AgentsToolsService } from '../agents-tools.service';
|
|
19
18
|
import { AgentsService } from '../agents.service';
|
|
19
|
+
import { AttachableWorkflowsService } from '../attachable-workflows.service';
|
|
20
20
|
import { BuilderModelLiveLookupService } from './builder-model-live-lookup.service';
|
|
21
21
|
import { AgentRepository } from '../repositories/agent.repository';
|
|
22
22
|
import { AgentSecureRuntime } from '../runtime/agent-secure-runtime';
|
|
@@ -38,7 +38,7 @@ export declare class AgentsBuilderToolsService {
|
|
|
38
38
|
private readonly agentIntegrationPersistenceService;
|
|
39
39
|
private readonly agentSkillsService;
|
|
40
40
|
private readonly secureRuntime;
|
|
41
|
-
private readonly
|
|
41
|
+
private readonly attachableWorkflowsService;
|
|
42
42
|
private readonly agentsToolsService;
|
|
43
43
|
private readonly builderModelLiveLookupService;
|
|
44
44
|
private readonly mcpRegistryService;
|
|
@@ -52,9 +52,7 @@ export declare class AgentsBuilderToolsService {
|
|
|
52
52
|
private readonly nodeTypes;
|
|
53
53
|
private readonly ssrfConfig;
|
|
54
54
|
private readonly ssrfProtectionService;
|
|
55
|
-
constructor(agentsService: AgentsService, agentConfigService: AgentConfigService, agentCustomToolsService: AgentCustomToolsService, agentIntegrationPersistenceService: AgentIntegrationPersistenceService, agentSkillsService: AgentSkillsService, secureRuntime: AgentSecureRuntime,
|
|
56
|
-
private getDynamicSelectorPath;
|
|
57
|
-
private rejectIfDynamicSelectorUsesFromAi;
|
|
55
|
+
constructor(agentsService: AgentsService, agentConfigService: AgentConfigService, agentCustomToolsService: AgentCustomToolsService, agentIntegrationPersistenceService: AgentIntegrationPersistenceService, agentSkillsService: AgentSkillsService, secureRuntime: AgentSecureRuntime, attachableWorkflowsService: AttachableWorkflowsService, agentsToolsService: AgentsToolsService, builderModelLiveLookupService: BuilderModelLiveLookupService, mcpRegistryService: McpRegistryService, oauthService: OauthService, credentialTypes: CredentialTypes, agentTaskService: AgentTaskService, agentRepository: AgentRepository, aiService: AiService, outboundHttp: OutboundHttp, dynamicNodeParametersService: DynamicNodeParametersService, nodeTypes: NodeTypes, ssrfConfig: SsrfProtectionConfig, ssrfProtectionService: SsrfProtectionService);
|
|
58
56
|
getTools(agentId: string, projectId: string, credentialProvider: CredentialProvider, user: User): BuilderTools;
|
|
59
57
|
private getJsonTools;
|
|
60
58
|
private getSharedTools;
|
|
@@ -45,11 +45,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
45
45
|
exports.AgentsBuilderToolsService = void 0;
|
|
46
46
|
exports.getAgentConfigHash = getAgentConfigHash;
|
|
47
47
|
const tool_1 = require("@n8n/agents/tool");
|
|
48
|
-
const
|
|
48
|
+
const agent_config_1 = require("@n8n/ai-utilities/agent-config");
|
|
49
49
|
const api_types_1 = require("@n8n/api-types");
|
|
50
50
|
const backend_network_1 = require("@n8n/backend-network");
|
|
51
51
|
const config_1 = require("@n8n/config");
|
|
52
|
-
const db_1 = require("@n8n/db");
|
|
53
52
|
const di_1 = require("@n8n/di");
|
|
54
53
|
const is_record_1 = require("@n8n/utils/is-record");
|
|
55
54
|
const node_crypto_1 = require("node:crypto");
|
|
@@ -68,9 +67,9 @@ const agent_skills_service_1 = require("../agent-skills.service");
|
|
|
68
67
|
const agent_task_service_1 = require("../agent-task.service");
|
|
69
68
|
const agents_tools_service_1 = require("../agents-tools.service");
|
|
70
69
|
const agents_service_1 = require("../agents.service");
|
|
70
|
+
const attachable_workflows_service_1 = require("../attachable-workflows.service");
|
|
71
71
|
const builder_model_live_lookup_service_1 = require("./builder-model-live-lookup.service");
|
|
72
72
|
const builder_tool_names_1 = require("./builder-tool-names");
|
|
73
|
-
const from_ai_node_parameters_1 = require("./from-ai-node-parameters");
|
|
74
73
|
const get_resource_locator_options_tool_1 = require("./get-resource-locator-options.tool");
|
|
75
74
|
const interactive_1 = require("./interactive");
|
|
76
75
|
const search_mcp_servers_tool_1 = require("./search-mcp-servers.tool");
|
|
@@ -78,18 +77,17 @@ const skill_body_template_1 = require("./skill-body-template");
|
|
|
78
77
|
const task_objective_template_1 = require("./task-objective-template");
|
|
79
78
|
const verify_mcp_server_tool_1 = require("./verify-mcp-server.tool");
|
|
80
79
|
const agent_config_composition_1 = require("../json-config/agent-config-composition");
|
|
81
|
-
const model_id_1 = require("../json-config/model-id");
|
|
82
|
-
const native_web_search_provider_tools_1 = require("../json-config/native-web-search-provider-tools");
|
|
83
80
|
const agent_repository_1 = require("../repositories/agent.repository");
|
|
84
81
|
const agent_secure_runtime_1 = require("../runtime/agent-secure-runtime");
|
|
85
|
-
const EMPTY_INSTRUCTIONS_ERROR = {
|
|
86
|
-
path: '/instructions',
|
|
87
|
-
message: 'Refusing to write an agent with empty instructions. Ask the user what the agent should do before calling write_config or patch_config again.',
|
|
88
|
-
};
|
|
89
82
|
const STALE_CONFIG_ERROR = {
|
|
90
83
|
path: '(root)',
|
|
91
84
|
message: 'Agent config changed since you last read it. Call read_config and retry with the returned configHash.',
|
|
92
85
|
};
|
|
86
|
+
const CLI_AGENT_CONFIG_MESSAGES = {
|
|
87
|
+
emptyInstructionsFollowUp: 'saving the config again.',
|
|
88
|
+
dynamicSelectorFollowUp: 'Load skill agent-builder-resource-locators, resolve a credential if missing, then call ' +
|
|
89
|
+
'get_resource_locator_options and write the returned parameterValue into nodeParameters.',
|
|
90
|
+
};
|
|
93
91
|
const createSkillInputSchema = zod_1.z
|
|
94
92
|
.object({
|
|
95
93
|
name: api_types_1.agentSkillSchema.shape.name.describe('Human-readable skill name'),
|
|
@@ -103,54 +101,6 @@ const createSkillInputSchema = zod_1.z
|
|
|
103
101
|
.describe('Markdown-only supporting files under references/... paths. References are not automatically loaded; instructions must say exactly when to load each reference by path.'),
|
|
104
102
|
})
|
|
105
103
|
.strict();
|
|
106
|
-
function rejectIfEmptyInstructions(config) {
|
|
107
|
-
if (!config.instructions.trim()) {
|
|
108
|
-
return { errors: [EMPTY_INSTRUCTIONS_ERROR] };
|
|
109
|
-
}
|
|
110
|
-
return null;
|
|
111
|
-
}
|
|
112
|
-
function rejectIfUnsupportedNativeWebSearch(config) {
|
|
113
|
-
const webSearch = config.config?.webSearch;
|
|
114
|
-
const requestsNativeWebSearch = webSearch?.enabled === true &&
|
|
115
|
-
(webSearch.provider === undefined ||
|
|
116
|
-
webSearch.provider === 'auto' ||
|
|
117
|
-
webSearch.provider === 'native');
|
|
118
|
-
if (!requestsNativeWebSearch || (0, native_web_search_provider_tools_1.hasNativeWebSearchProvider)(config.model))
|
|
119
|
-
return null;
|
|
120
|
-
return {
|
|
121
|
-
errors: [
|
|
122
|
-
{
|
|
123
|
-
path: '/config/webSearch/provider',
|
|
124
|
-
message: 'Native web search is only supported for Anthropic and OpenAI models. Use Brave or SearXNG fallback web search for this model.',
|
|
125
|
-
},
|
|
126
|
-
],
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
function isNodeTool(tool) {
|
|
130
|
-
return tool?.type === 'node';
|
|
131
|
-
}
|
|
132
|
-
function hasSameNodeType(left, right) {
|
|
133
|
-
return (left.node.nodeType === right.node.nodeType &&
|
|
134
|
-
left.node.nodeTypeVersion === right.node.nodeTypeVersion);
|
|
135
|
-
}
|
|
136
|
-
function hasSameNodeToolIdentity(left, right) {
|
|
137
|
-
return left.name === right.name && hasSameNodeType(left, right);
|
|
138
|
-
}
|
|
139
|
-
function findPreviousNodeTool(previousConfig, currentTool, currentToolIndex) {
|
|
140
|
-
const previousTools = previousConfig?.tools ?? [];
|
|
141
|
-
const sameIndexTool = previousTools[currentToolIndex];
|
|
142
|
-
if (isNodeTool(sameIndexTool) && hasSameNodeToolIdentity(sameIndexTool, currentTool)) {
|
|
143
|
-
return sameIndexTool;
|
|
144
|
-
}
|
|
145
|
-
const matchingTools = previousTools.filter((tool) => isNodeTool(tool) && hasSameNodeToolIdentity(tool, currentTool));
|
|
146
|
-
return matchingTools.length === 1 ? matchingTools[0] : null;
|
|
147
|
-
}
|
|
148
|
-
function getPreviousFromAiReferences(previousConfig, currentTool, currentToolIndex) {
|
|
149
|
-
const previousTool = findPreviousNodeTool(previousConfig, currentTool, currentToolIndex);
|
|
150
|
-
if (!previousTool)
|
|
151
|
-
return [];
|
|
152
|
-
return (0, from_ai_node_parameters_1.collectFromAiParameterReferences)(previousTool.node.nodeParameters);
|
|
153
|
-
}
|
|
154
104
|
function canonicalizeJson(value) {
|
|
155
105
|
if (Array.isArray(value)) {
|
|
156
106
|
return value.map((item) => canonicalizeJson(item));
|
|
@@ -178,39 +128,8 @@ function snapshotFromConfig(config, updatedAt, versionId) {
|
|
|
178
128
|
versionId,
|
|
179
129
|
};
|
|
180
130
|
}
|
|
181
|
-
function applyNativeWebSearchBuilderDefaults(config) {
|
|
182
|
-
const providerTools = (0, native_web_search_provider_tools_1.getNativeWebSearchProviderTools)(config, {
|
|
183
|
-
includeDefaultArgs: true,
|
|
184
|
-
defaultEnabled: true,
|
|
185
|
-
});
|
|
186
|
-
const webSearch = config.config?.webSearch;
|
|
187
|
-
const fallbackWebSearch = webSearch?.enabled === true &&
|
|
188
|
-
(webSearch.provider === 'brave' || webSearch.provider === 'searxng');
|
|
189
|
-
const hasNativeWebSearch = !fallbackWebSearch && webSearch?.enabled !== false && (0, native_web_search_provider_tools_1.hasNativeWebSearchProvider)(config.model);
|
|
190
|
-
if (!hasNativeWebSearch) {
|
|
191
|
-
const { webSearch, ...restConfig } = config.config ?? {};
|
|
192
|
-
const { config: _config, providerTools: _providerTools, ...restAgentConfig } = config;
|
|
193
|
-
const normalizedConfig = {
|
|
194
|
-
...restConfig,
|
|
195
|
-
...(fallbackWebSearch ? { webSearch } : {}),
|
|
196
|
-
};
|
|
197
|
-
return {
|
|
198
|
-
...restAgentConfig,
|
|
199
|
-
...(Object.keys(normalizedConfig).length > 0 ? { config: normalizedConfig } : {}),
|
|
200
|
-
...(Object.keys(providerTools).length > 0 ? { providerTools } : {}),
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
return {
|
|
204
|
-
...config,
|
|
205
|
-
config: {
|
|
206
|
-
...(config.config ?? {}),
|
|
207
|
-
webSearch: { enabled: true },
|
|
208
|
-
},
|
|
209
|
-
providerTools,
|
|
210
|
-
};
|
|
211
|
-
}
|
|
212
131
|
function applyPromptCachingBuilderDefaults(config) {
|
|
213
|
-
const providerPrefix = (0,
|
|
132
|
+
const providerPrefix = (0, agent_config_1.getProviderPrefix)(config.model);
|
|
214
133
|
const capability = api_types_1.PROVIDER_CAPABILITIES[providerPrefix]?.promptCaching ?? false;
|
|
215
134
|
const resolved = (0, api_types_1.resolvePromptCaching)(config.config?.promptCaching, capability);
|
|
216
135
|
if (!resolved) {
|
|
@@ -232,14 +151,14 @@ function applyPromptCachingBuilderDefaults(config) {
|
|
|
232
151
|
};
|
|
233
152
|
}
|
|
234
153
|
let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
235
|
-
constructor(agentsService, agentConfigService, agentCustomToolsService, agentIntegrationPersistenceService, agentSkillsService, secureRuntime,
|
|
154
|
+
constructor(agentsService, agentConfigService, agentCustomToolsService, agentIntegrationPersistenceService, agentSkillsService, secureRuntime, attachableWorkflowsService, agentsToolsService, builderModelLiveLookupService, mcpRegistryService, oauthService, credentialTypes, agentTaskService, agentRepository, aiService, outboundHttp, dynamicNodeParametersService, nodeTypes, ssrfConfig, ssrfProtectionService) {
|
|
236
155
|
this.agentsService = agentsService;
|
|
237
156
|
this.agentConfigService = agentConfigService;
|
|
238
157
|
this.agentCustomToolsService = agentCustomToolsService;
|
|
239
158
|
this.agentIntegrationPersistenceService = agentIntegrationPersistenceService;
|
|
240
159
|
this.agentSkillsService = agentSkillsService;
|
|
241
160
|
this.secureRuntime = secureRuntime;
|
|
242
|
-
this.
|
|
161
|
+
this.attachableWorkflowsService = attachableWorkflowsService;
|
|
243
162
|
this.agentsToolsService = agentsToolsService;
|
|
244
163
|
this.builderModelLiveLookupService = builderModelLiveLookupService;
|
|
245
164
|
this.mcpRegistryService = mcpRegistryService;
|
|
@@ -254,59 +173,6 @@ let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
|
254
173
|
this.ssrfConfig = ssrfConfig;
|
|
255
174
|
this.ssrfProtectionService = ssrfProtectionService;
|
|
256
175
|
}
|
|
257
|
-
getDynamicSelectorPath(nodeTypeDescription, parameterPath) {
|
|
258
|
-
const normalizedPath = (0, node_catalog_1.normalizeParameterPath)(parameterPath);
|
|
259
|
-
const pathParts = normalizedPath.split('.');
|
|
260
|
-
for (let length = pathParts.length; length > 0; length--) {
|
|
261
|
-
const candidatePath = pathParts.slice(0, length).join('.');
|
|
262
|
-
const property = (0, node_catalog_1.findNodeParameterProperty)(nodeTypeDescription.description.properties, candidatePath);
|
|
263
|
-
if (!property)
|
|
264
|
-
continue;
|
|
265
|
-
const lookup = (0, node_catalog_1.getDynamicNodeParameterLookup)(property);
|
|
266
|
-
if (lookup)
|
|
267
|
-
return candidatePath;
|
|
268
|
-
}
|
|
269
|
-
return null;
|
|
270
|
-
}
|
|
271
|
-
rejectIfDynamicSelectorUsesFromAi(config, previousConfig) {
|
|
272
|
-
const errors = [];
|
|
273
|
-
for (const [toolIndex, tool] of (config.tools ?? []).entries()) {
|
|
274
|
-
if (tool.type !== 'node')
|
|
275
|
-
continue;
|
|
276
|
-
const fromAiReferences = (0, from_ai_node_parameters_1.collectFromAiParameterReferences)(tool.node.nodeParameters);
|
|
277
|
-
if (fromAiReferences.length === 0)
|
|
278
|
-
continue;
|
|
279
|
-
let nodeTypeDescription;
|
|
280
|
-
try {
|
|
281
|
-
nodeTypeDescription = this.nodeTypes.getByNameAndVersion(tool.node.nodeType, tool.node.nodeTypeVersion);
|
|
282
|
-
}
|
|
283
|
-
catch {
|
|
284
|
-
continue;
|
|
285
|
-
}
|
|
286
|
-
const previousFromAiReferences = getPreviousFromAiReferences(previousConfig, tool, toolIndex);
|
|
287
|
-
const reportedDynamicPaths = new Set();
|
|
288
|
-
for (const fromAiReference of fromAiReferences) {
|
|
289
|
-
const { parameterPath, jsonPointer } = fromAiReference;
|
|
290
|
-
const dynamicPath = this.getDynamicSelectorPath(nodeTypeDescription, parameterPath);
|
|
291
|
-
if (!dynamicPath || reportedDynamicPaths.has(dynamicPath))
|
|
292
|
-
continue;
|
|
293
|
-
if ((0, from_ai_node_parameters_1.hasMatchingFromAiParameterReference)(previousFromAiReferences, fromAiReference)) {
|
|
294
|
-
continue;
|
|
295
|
-
}
|
|
296
|
-
reportedDynamicPaths.add(dynamicPath);
|
|
297
|
-
errors.push({
|
|
298
|
-
path: `/tools/${toolIndex}/node/nodeParameters/${jsonPointer}`,
|
|
299
|
-
message: `Node tool "${tool.name}" parameter "${dynamicPath}" is a dynamic selector. ` +
|
|
300
|
-
'Do not use $fromAI for this value. Load skill agent-builder-resource-locators, ' +
|
|
301
|
-
'use ask_credential if credentials are missing, then call get_resource_locator_options ' +
|
|
302
|
-
'and write the returned parameterValue into nodeParameters.',
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
if (errors.length === 0)
|
|
307
|
-
return null;
|
|
308
|
-
return { errors };
|
|
309
|
-
}
|
|
310
176
|
getTools(agentId, projectId, credentialProvider, user) {
|
|
311
177
|
return {
|
|
312
178
|
json: this.getJsonTools(agentId, projectId, credentialProvider, user),
|
|
@@ -367,21 +233,21 @@ let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
|
367
233
|
if (!zodResult.success) {
|
|
368
234
|
return { ok: false, errors: (0, api_types_1.formatZodErrors)(zodResult.error) };
|
|
369
235
|
}
|
|
370
|
-
const emptyInstructions = rejectIfEmptyInstructions(zodResult.data);
|
|
236
|
+
const emptyInstructions = (0, agent_config_1.rejectIfEmptyInstructions)(zodResult.data, CLI_AGENT_CONFIG_MESSAGES);
|
|
371
237
|
if (emptyInstructions) {
|
|
372
|
-
return { ok: false, errors: emptyInstructions
|
|
238
|
+
return { ok: false, errors: emptyInstructions };
|
|
373
239
|
}
|
|
374
|
-
const unsupportedNativeWebSearch = rejectIfUnsupportedNativeWebSearch(zodResult.data);
|
|
240
|
+
const unsupportedNativeWebSearch = (0, agent_config_1.rejectIfUnsupportedNativeWebSearch)(zodResult.data);
|
|
375
241
|
if (unsupportedNativeWebSearch) {
|
|
376
|
-
return { ok: false, errors: unsupportedNativeWebSearch
|
|
242
|
+
return { ok: false, errors: unsupportedNativeWebSearch };
|
|
377
243
|
}
|
|
378
|
-
const dynamicSelectorFromAi =
|
|
244
|
+
const dynamicSelectorFromAi = (0, agent_config_1.rejectIfDynamicSelectorUsesFromAi)(zodResult.data, snapshot.config, this.nodeTypes, CLI_AGENT_CONFIG_MESSAGES);
|
|
379
245
|
if (dynamicSelectorFromAi) {
|
|
380
|
-
return { ok: false, errors: dynamicSelectorFromAi
|
|
246
|
+
return { ok: false, errors: dynamicSelectorFromAi };
|
|
381
247
|
}
|
|
382
|
-
const
|
|
248
|
+
const configWithDefaults = applyPromptCachingBuilderDefaults((0, agent_config_1.applyNativeWebSearchDefaultOn)(zodResult.data));
|
|
383
249
|
try {
|
|
384
|
-
const result = await this.agentConfigService.updateConfig(agentId, projectId,
|
|
250
|
+
const result = await this.agentConfigService.updateConfig(agentId, projectId, configWithDefaults);
|
|
385
251
|
return {
|
|
386
252
|
ok: true,
|
|
387
253
|
...snapshotFromConfig(result.config, result.updatedAt, result.versionId),
|
|
@@ -455,21 +321,21 @@ let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
|
455
321
|
if (!zodResult.success) {
|
|
456
322
|
return { ok: false, stage: 'schema', errors: (0, api_types_1.formatZodErrors)(zodResult.error) };
|
|
457
323
|
}
|
|
458
|
-
const emptyInstructions = rejectIfEmptyInstructions(zodResult.data);
|
|
324
|
+
const emptyInstructions = (0, agent_config_1.rejectIfEmptyInstructions)(zodResult.data, CLI_AGENT_CONFIG_MESSAGES);
|
|
459
325
|
if (emptyInstructions) {
|
|
460
|
-
return { ok: false, stage: 'schema', errors: emptyInstructions
|
|
326
|
+
return { ok: false, stage: 'schema', errors: emptyInstructions };
|
|
461
327
|
}
|
|
462
|
-
const unsupportedNativeWebSearch = rejectIfUnsupportedNativeWebSearch(zodResult.data);
|
|
328
|
+
const unsupportedNativeWebSearch = (0, agent_config_1.rejectIfUnsupportedNativeWebSearch)(zodResult.data);
|
|
463
329
|
if (unsupportedNativeWebSearch) {
|
|
464
|
-
return { ok: false, stage: 'schema', errors: unsupportedNativeWebSearch
|
|
330
|
+
return { ok: false, stage: 'schema', errors: unsupportedNativeWebSearch };
|
|
465
331
|
}
|
|
466
|
-
const dynamicSelectorFromAi =
|
|
332
|
+
const dynamicSelectorFromAi = (0, agent_config_1.rejectIfDynamicSelectorUsesFromAi)(zodResult.data, snapshot.config, this.nodeTypes, CLI_AGENT_CONFIG_MESSAGES);
|
|
467
333
|
if (dynamicSelectorFromAi) {
|
|
468
|
-
return { ok: false, stage: 'schema', errors: dynamicSelectorFromAi
|
|
334
|
+
return { ok: false, stage: 'schema', errors: dynamicSelectorFromAi };
|
|
469
335
|
}
|
|
470
|
-
const
|
|
336
|
+
const configWithDefaults = applyPromptCachingBuilderDefaults((0, agent_config_1.applyNativeWebSearchDefaultOn)(zodResult.data));
|
|
471
337
|
try {
|
|
472
|
-
const result = await this.agentConfigService.updateConfig(agentId, projectId,
|
|
338
|
+
const result = await this.agentConfigService.updateConfig(agentId, projectId, configWithDefaults);
|
|
473
339
|
return {
|
|
474
340
|
ok: true,
|
|
475
341
|
...snapshotFromConfig(result.config, result.updatedAt, result.versionId),
|
|
@@ -533,8 +399,14 @@ let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
|
533
399
|
isCredentialTypeKnown: (credentialType) => this.credentialTypes.recognizes(credentialType),
|
|
534
400
|
isAssistantProxyEnabled: () => this.aiService.isProxyEnabled(),
|
|
535
401
|
}),
|
|
536
|
-
(0, interactive_1.
|
|
537
|
-
(0, interactive_1.
|
|
402
|
+
(0, interactive_1.buildAskQuestionsTool)(),
|
|
403
|
+
(0, interactive_1.buildConfigureChannelTool)({
|
|
404
|
+
agentId,
|
|
405
|
+
projectId,
|
|
406
|
+
listChatIntegrationTypes: () => this.agentIntegrationPersistenceService
|
|
407
|
+
.listChatIntegrations()
|
|
408
|
+
.map((integration) => integration.type),
|
|
409
|
+
}),
|
|
538
410
|
(0, verify_mcp_server_tool_1.buildVerifyMcpServerTool)({
|
|
539
411
|
credentialProvider,
|
|
540
412
|
oauthService: this.oauthService,
|
|
@@ -616,8 +488,8 @@ let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
|
616
488
|
'parameter for the template. You MUST NOT call this tool with a vague, broad, or placeholder ' +
|
|
617
489
|
'objective, an objective missing any section, or an unclear schedule. First make sure you can ' +
|
|
618
490
|
'fill every section of the template and know how often/when it should run; if anything is ' +
|
|
619
|
-
'ambiguous, ask the user clarifying questions (
|
|
620
|
-
'or
|
|
491
|
+
'ambiguous, ask the user clarifying questions (ask_questions with discrete options for choices, ' +
|
|
492
|
+
'or type: "text" for open-ended) and only call create_task once the objective is complete and the cadence ' +
|
|
621
493
|
'is known. This adds a `{ type: "task", id, enabled }` ref to the agent config (config.tasks) ' +
|
|
622
494
|
'and the task starts running once the agent is (re)published. Returns { ok: true, task } or ' +
|
|
623
495
|
'{ ok: false, errors }.')
|
|
@@ -660,36 +532,18 @@ let AgentsBuilderToolsService = class AgentsBuilderToolsService {
|
|
|
660
532
|
.description('List the n8n workflows that can be attached as tools via `type: "workflow"` in the agent config. ' +
|
|
661
533
|
'ALWAYS call this at the start — workflows are the preferred way to give agents real capabilities ' +
|
|
662
534
|
'(sending emails, creating calendar events, querying databases, calling APIs, etc.). ' +
|
|
663
|
-
'Only returns workflows with supported trigger types.'
|
|
664
|
-
.
|
|
665
|
-
.
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
'n8n-nodes-base.manualTrigger': 'manual',
|
|
675
|
-
'n8n-nodes-base.executeWorkflowTrigger': 'executeWorkflow',
|
|
676
|
-
'n8n-nodes-base.chatTrigger': 'chat',
|
|
677
|
-
'n8n-nodes-base.scheduleTrigger': 'schedule',
|
|
678
|
-
'n8n-nodes-base.formTrigger': 'form',
|
|
535
|
+
'Only returns workflows with supported trigger types. Pass `searchTerm` to narrow by workflow name; ' +
|
|
536
|
+
'omitting it returns the 10 most recently updated attachable workflows.')
|
|
537
|
+
.input(zod_1.z.object({
|
|
538
|
+
searchTerm: zod_1.z
|
|
539
|
+
.string()
|
|
540
|
+
.optional()
|
|
541
|
+
.describe('Optional workflow-name search term. Omit to return the first 10 results.'),
|
|
542
|
+
}))
|
|
543
|
+
.handler(async ({ searchTerm }) => {
|
|
544
|
+
return {
|
|
545
|
+
workflows: await this.attachableWorkflowsService.list(user, projectId, searchTerm),
|
|
679
546
|
};
|
|
680
|
-
const compatible = workflows
|
|
681
|
-
.map((w) => {
|
|
682
|
-
const triggerNode = (w.nodes ?? []).find((n) => SUPPORTED_TRIGGERS[n.type]);
|
|
683
|
-
if (!triggerNode)
|
|
684
|
-
return null;
|
|
685
|
-
return {
|
|
686
|
-
name: w.name,
|
|
687
|
-
active: w.active,
|
|
688
|
-
triggerType: SUPPORTED_TRIGGERS[triggerNode.type],
|
|
689
|
-
};
|
|
690
|
-
})
|
|
691
|
-
.filter(Boolean);
|
|
692
|
-
return { workflows: compatible };
|
|
693
547
|
})
|
|
694
548
|
.build();
|
|
695
549
|
return [
|
|
@@ -725,7 +579,7 @@ exports.AgentsBuilderToolsService = AgentsBuilderToolsService = __decorate([
|
|
|
725
579
|
agent_integration_persistence_service_1.AgentIntegrationPersistenceService,
|
|
726
580
|
agent_skills_service_1.AgentSkillsService,
|
|
727
581
|
agent_secure_runtime_1.AgentSecureRuntime,
|
|
728
|
-
|
|
582
|
+
attachable_workflows_service_1.AttachableWorkflowsService,
|
|
729
583
|
agents_tools_service_1.AgentsToolsService,
|
|
730
584
|
builder_model_live_lookup_service_1.BuilderModelLiveLookupService,
|
|
731
585
|
mcp_registry_service_1.McpRegistryService,
|