n8n 2.23.2 → 2.24.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-workflow-manager.d.ts +8 -4
- package/dist/active-workflow-manager.js +26 -9
- package/dist/active-workflow-manager.js.map +1 -1
- package/dist/auth/auth.service.d.ts +1 -1
- package/dist/auth/auth.service.js +2 -1
- package/dist/auth/auth.service.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/controllers/ai.controller.js +1 -1
- package/dist/controllers/ai.controller.js.map +1 -1
- package/dist/controllers/api-keys.controller.d.ts +20 -15
- package/dist/controllers/api-keys.controller.js +7 -4
- package/dist/controllers/api-keys.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth1-credential.controller.d.ts +4 -2
- package/dist/controllers/oauth/oauth1-credential.controller.js +15 -5
- package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
- package/dist/controllers/oauth/oauth2-credential.controller.d.ts +4 -2
- package/dist/controllers/oauth/oauth2-credential.controller.js +15 -6
- package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
- package/dist/controllers/project.controller.d.ts +8 -0
- package/dist/controllers/project.controller.js +2 -1
- package/dist/controllers/project.controller.js.map +1 -1
- package/dist/controllers/security-settings.controller.js +18 -1
- package/dist/controllers/security-settings.controller.js.map +1 -1
- package/dist/controllers/telemetry.controller.js +4 -1
- package/dist/controllers/telemetry.controller.js.map +1 -1
- package/dist/credentials/credential-connection-status-provider.interface.d.ts +3 -0
- package/dist/credentials/credential-connection-status-proxy.d.ts +3 -0
- package/dist/credentials/credential-connection-status-proxy.js +10 -0
- package/dist/credentials/credential-connection-status-proxy.js.map +1 -1
- package/dist/credentials/credentials.controller.d.ts +6 -0
- package/dist/credentials/credentials.controller.js +39 -2
- package/dist/credentials/credentials.controller.js.map +1 -1
- package/dist/credentials/credentials.service.d.ts +29 -13
- package/dist/credentials/credentials.service.ee.d.ts +2 -0
- package/dist/credentials/credentials.service.ee.js +3 -0
- package/dist/credentials/credentials.service.ee.js.map +1 -1
- package/dist/credentials/credentials.service.js +27 -6
- package/dist/credentials/credentials.service.js.map +1 -1
- package/dist/credentials-helper.d.ts +1 -0
- package/dist/credentials-helper.js +14 -4
- package/dist/credentials-helper.js.map +1 -1
- package/dist/errors/credential-missing-id.error.d.ts +4 -0
- package/dist/errors/credential-missing-id.error.js +14 -0
- package/dist/errors/credential-missing-id.error.js.map +1 -0
- package/dist/eventbus/event-message-classes/index.d.ts +2 -2
- package/dist/eventbus/event-message-classes/index.js +3 -0
- package/dist/eventbus/event-message-classes/index.js.map +1 -1
- package/dist/events/maps/relay.event-map.d.ts +54 -2
- package/dist/events/relays/log-streaming.event-relay.d.ts +3 -0
- package/dist/events/relays/log-streaming.event-relay.js +39 -1
- package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
- package/dist/events/relays/telemetry.event-relay.d.ts +6 -0
- package/dist/events/relays/telemetry.event-relay.js +74 -3
- package/dist/events/relays/telemetry.event-relay.js.map +1 -1
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js +6 -5
- package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
- package/dist/executions/execution-persistence.js +4 -0
- package/dist/executions/execution-persistence.js.map +1 -1
- package/dist/expression-observability/expression-observability.provider.d.ts +3 -1
- package/dist/expression-observability/expression-observability.provider.js +48 -46
- package/dist/expression-observability/expression-observability.provider.js.map +1 -1
- package/dist/interfaces.d.ts +3 -1
- package/dist/modules/agents/agent-execution.service.d.ts +4 -2
- package/dist/modules/agents/agent-execution.service.js +3 -3
- package/dist/modules/agents/agent-execution.service.js.map +1 -1
- package/dist/modules/agents/agent-knowledge-command.service.d.ts +40 -0
- package/dist/modules/agents/agent-knowledge-command.service.js +221 -0
- package/dist/modules/agents/agent-knowledge-command.service.js.map +1 -0
- package/dist/modules/agents/agent-knowledge.service.d.ts +42 -0
- package/dist/modules/agents/agent-knowledge.service.js +300 -0
- package/dist/modules/agents/agent-knowledge.service.js.map +1 -0
- package/dist/modules/agents/agent-task.service.d.ts +52 -0
- package/dist/modules/agents/agent-task.service.js +487 -0
- package/dist/modules/agents/agent-task.service.js.map +1 -0
- package/dist/modules/agents/agent-upload.middleware.d.ts +7 -0
- package/dist/modules/agents/agent-upload.middleware.js +62 -0
- package/dist/modules/agents/agent-upload.middleware.js.map +1 -0
- package/dist/modules/agents/agents-tools.service.d.ts +1 -1
- package/dist/modules/agents/agents-tools.service.js +12 -3
- package/dist/modules/agents/agents-tools.service.js.map +1 -1
- package/dist/modules/agents/agents.controller.d.ts +138 -45
- package/dist/modules/agents/agents.controller.js +176 -48
- package/dist/modules/agents/agents.controller.js.map +1 -1
- package/dist/modules/agents/agents.module.d.ts +2 -2
- package/dist/modules/agents/agents.module.js +13 -5
- package/dist/modules/agents/agents.module.js.map +1 -1
- package/dist/modules/agents/agents.service.d.ts +43 -7
- package/dist/modules/agents/agents.service.js +341 -57
- package/dist/modules/agents/agents.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-prompts.d.ts +6 -5
- package/dist/modules/agents/builder/agents-builder-prompts.js +92 -18
- package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +11 -1
- package/dist/modules/agents/builder/agents-builder-tools.service.js +164 -26
- package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
- package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
- package/dist/modules/agents/builder/agents-builder.service.js +8 -3
- package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
- package/dist/modules/agents/builder/builder-tool-names.d.ts +3 -0
- package/dist/modules/agents/builder/builder-tool-names.js +3 -0
- package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +1 -0
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js +25 -4
- package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
- package/dist/modules/agents/builder/interactive/ask-question.tool.js +6 -5
- package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +20 -5
- package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js +23 -4
- package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +18 -1
- 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 +5 -3
- package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
- package/dist/modules/agents/builder/prompts/tools.prompt.js +11 -2
- package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
- package/dist/modules/agents/builder/search-mcp-servers.tool.d.ts +6 -0
- package/dist/modules/agents/builder/search-mcp-servers.tool.js +85 -0
- package/dist/modules/agents/builder/search-mcp-servers.tool.js.map +1 -0
- package/dist/modules/agents/builder/skill-body-template.d.ts +4 -0
- package/dist/modules/agents/builder/skill-body-template.js +31 -0
- package/dist/modules/agents/builder/skill-body-template.js.map +1 -0
- package/dist/modules/agents/builder/skills/index.js +6 -1
- package/dist/modules/agents/builder/skills/index.js.map +1 -1
- package/dist/modules/agents/builder/skills/integrations.skill.js +39 -18
- package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/mcp.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js +110 -0
- package/dist/modules/agents/builder/skills/mcp.skill.js.map +1 -0
- package/dist/modules/agents/builder/skills/research.skill.js +8 -5
- package/dist/modules/agents/builder/skills/research.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-skills.skill.js +41 -13
- package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
- package/dist/modules/agents/builder/skills/target-tasks.skill.d.ts +2 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js +82 -0
- package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -0
- package/dist/modules/agents/builder/task-objective-template.d.ts +3 -0
- package/dist/modules/agents/builder/task-objective-template.js +27 -0
- package/dist/modules/agents/builder/task-objective-template.js.map +1 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.d.ts +8 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js +79 -0
- package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +4 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js +26 -0
- package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -1
- package/dist/modules/agents/entities/agent-file.entity.d.ts +11 -0
- package/dist/modules/agents/entities/agent-file.entity.js +48 -0
- package/dist/modules/agents/entities/agent-file.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.d.ts +10 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.js +54 -0
- package/dist/modules/agents/entities/agent-task-run-lock.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.d.ts +12 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js +70 -0
- package/dist/modules/agents/entities/agent-task-snapshot.entity.js.map +1 -0
- package/dist/modules/agents/entities/agent-task.entity.d.ts +11 -0
- package/dist/modules/agents/entities/agent-task.entity.js +64 -0
- package/dist/modules/agents/entities/agent-task.entity.js.map +1 -0
- package/dist/modules/agents/execution-recorder.d.ts +1 -0
- package/dist/modules/agents/execution-recorder.js +9 -5
- package/dist/modules/agents/execution-recorder.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +16 -4
- package/dist/modules/agents/integrations/agent-chat-bridge.js +372 -116
- package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
- package/dist/modules/agents/integrations/agent-chat-integration.d.ts +27 -2
- package/dist/modules/agents/integrations/agent-chat-integration.js +5 -0
- package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
- package/dist/modules/agents/integrations/chat-integration.service.d.ts +15 -6
- package/dist/modules/agents/integrations/chat-integration.service.js +9 -10
- package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
- package/dist/modules/agents/integrations/component-mapper.d.ts +14 -0
- package/dist/modules/agents/integrations/component-mapper.js +9 -1
- package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
- package/dist/modules/agents/integrations/integration-action-executor.d.ts +22 -0
- package/dist/modules/agents/integrations/integration-action-executor.js +171 -0
- package/dist/modules/agents/integrations/integration-action-executor.js.map +1 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.d.ts +18 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.js +58 -0
- package/dist/modules/agents/integrations/integration-context-query-executor.js.map +1 -0
- package/dist/modules/agents/integrations/integration-error-codes.d.ts +13 -0
- package/dist/modules/agents/integrations/integration-error-codes.js +16 -0
- package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -0
- package/dist/modules/agents/integrations/integration-helpers.d.ts +21 -0
- package/dist/modules/agents/integrations/integration-helpers.js +72 -0
- package/dist/modules/agents/integrations/integration-helpers.js.map +1 -0
- package/dist/modules/agents/integrations/integration-message-context.service.d.ts +13 -0
- package/dist/modules/agents/integrations/integration-message-context.service.js +129 -0
- package/dist/modules/agents/integrations/integration-message-context.service.js.map +1 -0
- package/dist/modules/agents/integrations/integration-tools.d.ts +205 -0
- package/dist/modules/agents/integrations/integration-tools.js +955 -0
- package/dist/modules/agents/integrations/integration-tools.js.map +1 -0
- package/dist/modules/agents/integrations/integrations-sync.d.ts +1 -1
- package/dist/modules/agents/integrations/integrations-sync.js +1 -29
- package/dist/modules/agents/integrations/integrations-sync.js.map +1 -1
- package/dist/modules/agents/integrations/n8n-memory.d.ts +2 -0
- package/dist/modules/agents/integrations/n8n-memory.js +18 -11
- package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +13 -2
- package/dist/modules/agents/integrations/platforms/linear-integration.js +70 -15
- package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/linear-operations.d.ts +18 -0
- package/dist/modules/agents/integrations/platforms/linear-operations.js +679 -0
- package/dist/modules/agents/integrations/platforms/linear-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/slack-integration.d.ts +11 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js +53 -1
- package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
- package/dist/modules/agents/integrations/platforms/slack-operations.d.ts +17 -0
- package/dist/modules/agents/integrations/platforms/slack-operations.js +288 -0
- package/dist/modules/agents/integrations/platforms/slack-operations.js.map +1 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +9 -2
- package/dist/modules/agents/integrations/platforms/telegram-integration.js +17 -0
- package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js +7 -1
- package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -1
- package/dist/modules/agents/json-config/from-json-config.d.ts +4 -2
- package/dist/modules/agents/json-config/from-json-config.js +88 -11
- package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
- package/dist/modules/agents/json-config/mcp-client-factory.d.ts +16 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js +155 -0
- package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.d.ts +8 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js +59 -0
- package/dist/modules/agents/json-config/native-web-search-provider-tools.js.map +1 -0
- package/dist/modules/agents/json-config/schema-text-serializer.js +12 -2
- package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
- package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +1 -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/repositories/agent-file.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-file.repository.js +35 -0
- package/dist/modules/agents/repositories/agent-file.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-history.repository.d.ts +2 -0
- package/dist/modules/agents/repositories/agent-history.repository.js +18 -0
- package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.d.ts +12 -0
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.js +72 -0
- package/dist/modules/agents/repositories/agent-task-run-lock.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +11 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js +45 -0
- package/dist/modules/agents/repositories/agent-task-snapshot.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent-task.repository.d.ts +7 -0
- package/dist/modules/agents/repositories/agent-task.repository.js +32 -0
- package/dist/modules/agents/repositories/agent-task.repository.js.map +1 -0
- package/dist/modules/agents/repositories/agent.repository.js +1 -2
- package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
- package/dist/modules/agents/tools/knowledge/csv-helpers.d.ts +73 -0
- package/dist/modules/agents/tools/knowledge/csv-helpers.js +341 -0
- package/dist/modules/agents/tools/knowledge/csv-helpers.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.d.ts +61 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.js +207 -0
- package/dist/modules/agents/tools/knowledge/csv.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/file-references.d.ts +16 -0
- package/dist/modules/agents/tools/knowledge/file-references.js +35 -0
- package/dist/modules/agents/tools/knowledge/file-references.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/read.operation.d.ts +8 -0
- package/dist/modules/agents/tools/knowledge/read.operation.js +38 -0
- package/dist/modules/agents/tools/knowledge/read.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/schemas.d.ts +1505 -0
- package/dist/modules/agents/tools/knowledge/schemas.js +441 -0
- package/dist/modules/agents/tools/knowledge/schemas.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/search.operation.d.ts +9 -0
- package/dist/modules/agents/tools/knowledge/search.operation.js +332 -0
- package/dist/modules/agents/tools/knowledge/search.operation.js.map +1 -0
- package/dist/modules/agents/tools/knowledge/tool.d.ts +8 -0
- package/dist/modules/agents/tools/knowledge/tool.js +121 -0
- package/dist/modules/agents/tools/knowledge/tool.js.map +1 -0
- package/dist/modules/agents/utils/agent-memory-scope.d.ts +1 -1
- package/dist/modules/agents/utils/agent-memory-scope.js +4 -4
- package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
- package/dist/modules/agents/utils/agent-resource-id.d.ts +1 -1
- package/dist/modules/chat-hub/chat-hub.module.d.ts +2 -2
- 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/dynamic-credentials.ee/constants.d.ts +1 -1
- package/dist/modules/dynamic-credentials.ee/constants.js +2 -1
- package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.d.ts +9 -2
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +45 -14
- package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +4 -0
- package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +16 -0
- 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 +6 -2
- package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +1 -0
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +21 -2
- package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.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 +118 -24
- package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
- package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +8 -3
- package/dist/modules/instance-ai/eval/llm-wire-server.js +147 -50
- package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-handler.js +45 -8
- package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
- package/dist/modules/instance-ai/eval/mock-quirks.d.ts +4 -2
- package/dist/modules/instance-ai/eval/mock-quirks.js +83 -4
- package/dist/modules/instance-ai/eval/mock-quirks.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-envelope.d.ts +8 -0
- package/dist/modules/instance-ai/eval/openai-envelope.js +121 -8
- package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -1
- package/dist/modules/instance-ai/eval/openai-responses-envelope.d.ts +11 -0
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js +238 -0
- package/dist/modules/instance-ai/eval/openai-responses-envelope.js.map +1 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.d.ts +1 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.js +74 -0
- package/dist/modules/instance-ai/eval/request-binary-redactor.js.map +1 -0
- package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +19 -1
- package/dist/modules/instance-ai/eval/workflow-analysis.js +159 -76
- package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
- package/dist/modules/instance-ai/extract-resolved-node-parameters.d.ts +7 -0
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js +221 -0
- package/dist/modules/instance-ai/extract-resolved-node-parameters.js.map +1 -0
- package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +7 -1
- package/dist/modules/instance-ai/instance-ai-memory.service.js +80 -3
- package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai-settings.service.js +1 -16
- package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.adapter.service.js +67 -7
- package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
- package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
- package/dist/modules/instance-ai/instance-ai.service.d.ts +24 -1
- package/dist/modules/instance-ai/instance-ai.service.js +400 -26
- package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +1 -0
- package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
- package/dist/modules/instance-ai/message-parser.d.ts +2 -0
- package/dist/modules/instance-ai/message-parser.js +165 -36
- package/dist/modules/instance-ai/message-parser.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +2 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +13 -0
- package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -1
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.d.ts +12 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js +80 -0
- package/dist/modules/instance-ai/repositories/instance-ai-pending-confirmation.repository.js.map +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +1 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js +23 -0
- package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +10 -4
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +49 -37
- package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -1
- package/dist/modules/instance-ai/web-research/index.d.ts +0 -2
- package/dist/modules/instance-ai/web-research/index.js +1 -5
- package/dist/modules/instance-ai/web-research/index.js.map +1 -1
- package/dist/modules/ldap.ee/helpers.ee.js +6 -2
- package/dist/modules/ldap.ee/helpers.ee.js.map +1 -1
- package/dist/modules/mcp/mcp.controller.js +13 -6
- package/dist/modules/mcp/mcp.controller.js.map +1 -1
- package/dist/modules/mcp/mcp.service.d.ts +10 -2
- package/dist/modules/mcp/mcp.service.js +36 -6
- package/dist/modules/mcp/mcp.service.js.map +1 -1
- package/dist/modules/mcp/mcp.settings.controller.d.ts +2 -0
- package/dist/modules/mcp/mcp.settings.service.d.ts +2 -0
- package/dist/modules/mcp/mcp.settings.service.js +6 -5
- package/dist/modules/mcp/mcp.settings.service.js.map +1 -1
- package/dist/modules/mcp/mcp.types.d.ts +6 -0
- package/dist/modules/mcp/mcp.types.js +9 -0
- package/dist/modules/mcp/mcp.types.js.map +1 -1
- package/dist/modules/mcp/tools/execute-workflow.tool.d.ts +6 -6
- package/dist/modules/mcp/tools/search-workflows.tool.d.ts +2 -1
- package/dist/modules/mcp/tools/search-workflows.tool.js +12 -4
- package/dist/modules/mcp/tools/search-workflows.tool.js.map +1 -1
- package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
- package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +67 -6
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.d.ts +67 -6
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js +51 -0
- package/dist/modules/mcp/tools/workflow-builder/workflow-operations.js.map +1 -1
- package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
- package/dist/modules/mcp-registry/synthesize-type-def.d.ts +2 -0
- package/dist/modules/mcp-registry/synthesize-type-def.js +35 -0
- package/dist/modules/mcp-registry/synthesize-type-def.js.map +1 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.d.ts +24 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.js +206 -0
- package/dist/modules/n8n-packages/engine/import-pipeline.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +33 -0
- package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +23 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +68 -0
- package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +5 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +25 -0
- package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +6 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js +3 -0
- package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.d.ts +4 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.js +3 -0
- package/dist/modules/n8n-packages/entities/requirements-extractor.js.map +1 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +12 -3
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +11 -20
- package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +3 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +10 -0
- package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
- package/dist/modules/n8n-packages/io/package-reader.d.ts +6 -0
- package/dist/modules/n8n-packages/io/package-reader.js +3 -0
- package/dist/modules/n8n-packages/io/package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -1
- package/dist/modules/n8n-packages/io/slug.utils.js +3 -3
- package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -1
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.d.ts +13 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js +84 -0
- package/dist/modules/n8n-packages/io/tar/tar-package-reader.js.map +1 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.d.ts +7 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js +27 -0
- package/dist/modules/n8n-packages/io/unique-filename-allocator.js.map +1 -0
- package/dist/modules/n8n-packages/n8n-packages.service.d.ts +7 -2
- package/dist/modules/n8n-packages/n8n-packages.service.js +21 -3
- package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
- package/dist/modules/n8n-packages/n8n-packages.types.d.ts +22 -0
- package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +121 -4
- package/dist/modules/n8n-packages/spec/manifest.schema.js +22 -3
- package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
- package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +51 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js +14 -0
- package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +15 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +12 -0
- package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +1 -0
- package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +4 -4
- package/dist/modules/n8n-packages/utils/import-package-upload.d.ts +13 -0
- package/dist/modules/n8n-packages/utils/import-package-upload.js +59 -0
- package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -0
- package/dist/modules/otel/execution-level-tracer.js +15 -6
- package/dist/modules/otel/execution-level-tracer.js.map +1 -1
- package/dist/modules/otel/execution-level-tracer.types.d.ts +3 -0
- package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
- package/dist/modules/otel/otel-lifecycle-handler.d.ts +4 -2
- package/dist/modules/otel/otel-lifecycle-handler.js +69 -4
- package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
- package/dist/modules/otel/otel.config.d.ts +1 -0
- package/dist/modules/otel/otel.config.js +5 -0
- package/dist/modules/otel/otel.config.js.map +1 -1
- package/dist/modules/otel/otel.constants.d.ts +2 -0
- package/dist/modules/otel/otel.constants.js +2 -0
- package/dist/modules/otel/otel.constants.js.map +1 -1
- package/dist/modules/redaction/instance-redaction-enforcement.service.d.ts +4 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js +8 -0
- package/dist/modules/redaction/instance-redaction-enforcement.service.js.map +1 -1
- package/dist/modules/redaction/redaction-context-hook.d.ts +9 -0
- package/dist/modules/redaction/redaction-context-hook.js +57 -0
- package/dist/modules/redaction/redaction-context-hook.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/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-status.service.ee.js +5 -0
- package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +4 -2
- package/dist/modules/source-control.ee/source-control.controller.ee.js +32 -5
- package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
- package/dist/modules/source-control.ee/source-control.service.ee.js +2 -0
- package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js +2 -1
- package/dist/modules/workflow-builder/workflow-builder-session.repository.js.map +1 -1
- package/dist/node-catalog/node-catalog.service.d.ts +2 -0
- package/dist/node-catalog/node-catalog.service.js +38 -2
- package/dist/node-catalog/node-catalog.service.js.map +1 -1
- package/dist/oauth/oauth-browser-binding.service.d.ts +18 -0
- package/dist/oauth/oauth-browser-binding.service.js +68 -0
- package/dist/oauth/oauth-browser-binding.service.js.map +1 -0
- package/dist/oauth/oauth.service.d.ts +10 -4
- package/dist/oauth/oauth.service.js +87 -4
- package/dist/oauth/oauth.service.js.map +1 -1
- package/dist/oauth/types.d.ts +1 -0
- package/dist/oauth/types.js.map +1 -1
- package/dist/public-api/index.js +5 -1
- package/dist/public-api/index.js.map +1 -1
- package/dist/public-api/types.d.ts +6 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js +1 -0
- package/dist/public-api/v1/handlers/credentials/credentials.service.js.map +1 -1
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +5 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +22 -0
- package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
- package/dist/public-api/v1/openapi.yml +207 -59
- package/dist/requests.d.ts +4 -0
- package/dist/scaling/constants.d.ts +2 -2
- package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -2
- package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
- package/dist/services/ai-workflow-builder.service.d.ts +6 -3
- package/dist/services/ai-workflow-builder.service.js +13 -5
- package/dist/services/ai-workflow-builder.service.js.map +1 -1
- package/dist/services/api-key-auth.strategy.d.ts +4 -1
- package/dist/services/api-key-auth.strategy.js +18 -2
- package/dist/services/api-key-auth.strategy.js.map +1 -1
- package/dist/services/ownership.service.d.ts +1 -0
- package/dist/services/ownership.service.js +7 -0
- package/dist/services/ownership.service.js.map +1 -1
- package/dist/services/project.service.ee.d.ts +6 -2
- package/dist/services/project.service.ee.js +30 -8
- package/dist/services/project.service.ee.js.map +1 -1
- package/dist/services/public-api-key.service.d.ts +21 -14
- package/dist/services/public-api-key.service.js +14 -9
- package/dist/services/public-api-key.service.js.map +1 -1
- package/dist/telemetry/index.d.ts +6 -9
- package/dist/telemetry/index.js +23 -9
- package/dist/telemetry/index.js.map +1 -1
- package/dist/webhooks/constants.js +5 -1
- package/dist/webhooks/constants.js.map +1 -1
- package/dist/webhooks/live-webhooks.d.ts +8 -1
- package/dist/webhooks/live-webhooks.js +37 -22
- package/dist/webhooks/live-webhooks.js.map +1 -1
- package/dist/webhooks/waiting-forms.js +8 -1
- package/dist/webhooks/waiting-forms.js.map +1 -1
- package/dist/webhooks/webhook-helpers.d.ts +1 -1
- package/dist/webhooks/webhook-helpers.js +20 -10
- package/dist/webhooks/webhook-helpers.js.map +1 -1
- package/dist/webhooks/webhook-request-handler.js +1 -1
- package/dist/webhooks/webhook-request-handler.js.map +1 -1
- package/dist/workflow-helpers.d.ts +6 -1
- package/dist/workflow-helpers.js +9 -1
- package/dist/workflow-helpers.js.map +1 -1
- package/dist/workflows/workflow-creation.service.d.ts +4 -1
- package/dist/workflows/workflow-creation.service.js +12 -3
- package/dist/workflows/workflow-creation.service.js.map +1 -1
- package/dist/workflows/workflow-finder.service.d.ts +1 -0
- package/dist/workflows/workflow-published-data.service.d.ts +11 -0
- package/dist/workflows/workflow-published-data.service.js +39 -0
- package/dist/workflows/workflow-published-data.service.js.map +1 -0
- package/dist/workflows/workflow-validation.service.d.ts +5 -1
- package/dist/workflows/workflow-validation.service.js +55 -2
- package/dist/workflows/workflow-validation.service.js.map +1 -1
- package/dist/workflows/workflow.service.js +4 -0
- package/dist/workflows/workflow.service.js.map +1 -1
- package/dist/workflows/workflows.controller.d.ts +8 -0
- package/package.json +40 -32
- package/templates/form-trigger-completion.handlebars +12 -1
- package/dist/modules/agents/integrations/agent-schedule.service.d.ts +0 -30
- package/dist/modules/agents/integrations/agent-schedule.service.js +0 -331
- package/dist/modules/agents/integrations/agent-schedule.service.js.map +0 -1
- package/dist/modules/instance-ai/web-research/brave-search.d.ts +0 -10
- package/dist/modules/instance-ai/web-research/brave-search.js +0 -44
- package/dist/modules/instance-ai/web-research/brave-search.js.map +0 -1
- package/dist/modules/instance-ai/web-research/searxng-search.d.ts +0 -6
- package/dist/modules/instance-ai/web-research/searxng-search.js +0 -39
- package/dist/modules/instance-ai/web-research/searxng-search.js.map +0 -1
|
@@ -71,13 +71,26 @@ Use \`patch_config\` with:
|
|
|
71
71
|
#### Configure Native Provider Features
|
|
72
72
|
|
|
73
73
|
- Thinking lives under \`config.thinking\`.
|
|
74
|
-
-
|
|
74
|
+
- Web search lives under \`config.webSearch\`.
|
|
75
|
+
- Only OpenAI and Anthropic models support native web search. For those models, set
|
|
76
|
+
\`config.webSearch = { "enabled": true, "provider": "native" }\` unless the
|
|
77
|
+
user asks to disable web search. Omitting \`provider\` also means native.
|
|
78
|
+
- For every other provider, never use \`provider: "native"\` or omit
|
|
79
|
+
\`provider\` for enabled web search.
|
|
80
|
+
- For Brave or SearXNG search, call \`ask_credential\`, then set
|
|
81
|
+
\`config.webSearch = { "enabled": true, "provider": "brave" | "searxng", "credential": "<credentialId>" }\`.
|
|
82
|
+
- Brave and SearXNG remain fallback tools even when the model provider also supports native search.
|
|
83
|
+
- When patching only \`/model\` and \`/credential\`, do not patch
|
|
84
|
+
\`/config/webSearch\` if the existing provider is \`"brave"\` or \`"searxng"\`
|
|
85
|
+
unless the user explicitly asked to change the web-search method.
|
|
86
|
+
- Never write \`{ "enabled": true }\` alone for fallback search.
|
|
87
|
+
- The write path fills native provider tool defaults only for native search. Do not invent provider tool keys.
|
|
75
88
|
|
|
76
89
|
#### Configure Fallback Services
|
|
77
90
|
|
|
78
|
-
- Services that require credentials must call \`ask_credential\` first.
|
|
79
|
-
- Persist only the credential id returned by \`ask_credential\`.
|
|
91
|
+
- Services that require credentials must call \`ask_credential\` first and persist only its returned credential id.
|
|
80
92
|
- If credential selection is skipped, do not enable the feature unless it supports missing credentials.
|
|
93
|
+
- For fallback web search, use exact credential type names: \`braveSearchApi\` for \`provider: "brave"\`, and \`searXngApi\` for \`provider: "searxng"\`.
|
|
81
94
|
|
|
82
95
|
#### Add Node Or Workflow Tools
|
|
83
96
|
|
|
@@ -89,7 +102,7 @@ Use \`patch_config\` with:
|
|
|
89
102
|
|
|
90
103
|
Bad: inventing top-level fields
|
|
91
104
|
\`\`\`json
|
|
92
|
-
{ "
|
|
105
|
+
{ "webSearch": { "enabled": true } }
|
|
93
106
|
\`\`\`
|
|
94
107
|
|
|
95
108
|
Bad: provider namespace as provider tool
|
|
@@ -104,7 +117,7 @@ Bad: copying credential IDs from \`list_credentials\`
|
|
|
104
117
|
|
|
105
118
|
Bad: replacing \`config\` while dropping unrelated settings
|
|
106
119
|
\`\`\`json
|
|
107
|
-
{ "config": { "
|
|
120
|
+
{ "config": { "webSearch": { "enabled": true } } }
|
|
108
121
|
\`\`\`
|
|
109
122
|
|
|
110
123
|
### Gotchas
|
|
@@ -112,12 +125,14 @@ Bad: replacing \`config\` while dropping unrelated settings
|
|
|
112
125
|
- \`write_config\` replaces the full config; include every field that should survive.
|
|
113
126
|
- \`patch_config\` cannot create a config when none exists; use \`write_config\` first.
|
|
114
127
|
- \`/array/-\` appends to an array; \`/array/0\` inserts before the current first item.
|
|
128
|
+
- Model-only changes must preserve existing Brave or SearXNG \`config.webSearch\`.
|
|
115
129
|
- Empty, placeholder, or guessed \`instructions\` are rejected; ask for details instead.
|
|
116
130
|
|
|
117
131
|
### Verify
|
|
118
132
|
|
|
119
133
|
- The final payload validates against the Config schema reference.
|
|
120
134
|
- Existing unrelated config, tools, skills, integrations, and memory remain present unless intentionally changed.
|
|
135
|
+
- Existing Brave or SearXNG web search remains present on model-only changes.
|
|
121
136
|
- Credential fields use ids returned by the correct interactive credential tools.
|
|
122
137
|
- Provider tool keys are valid and match the selected model provider.
|
|
123
138
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-mutation.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/config-mutation.prompt.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"config-mutation.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/config-mutation.prompt.ts"],"names":[],"mappings":";;AAEA,0DA6IC;AA/ID,+DAAyF;AAEzF,SAAgB,uBAAuB;IACtC,OAAO;;;;;;;;;;;;;;;;;;;;;EAqBN,IAAA,2CAAqB,GAAE;;EAEvB,IAAA,+CAAyB,GAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EAoH+C,CAAC;AAC7E,CAAC"}
|
|
@@ -6,13 +6,18 @@ const zod_1 = require("zod");
|
|
|
6
6
|
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
7
7
|
const api_types_1 = require("@n8n/api-types");
|
|
8
8
|
const schema_text_serializer_1 = require("../../json-config/schema-text-serializer");
|
|
9
|
+
const BuilderPromptMemoryWorkerModelSchema = zod_1.z.object({
|
|
10
|
+
model: api_types_1.AgentModelSchema,
|
|
11
|
+
credential: zod_1.z.string().trim().min(1),
|
|
12
|
+
});
|
|
9
13
|
const BuilderPromptMemoryConfigSchema = zod_1.z.object({
|
|
10
14
|
enabled: zod_1.z.boolean(),
|
|
11
15
|
storage: zod_1.z.literal('n8n'),
|
|
12
|
-
lastMessages: zod_1.z.number().int().min(1).max(200).optional(),
|
|
13
16
|
observationalMemory: zod_1.z
|
|
14
17
|
.object({
|
|
15
18
|
enabled: zod_1.z.boolean().optional(),
|
|
19
|
+
observerModel: BuilderPromptMemoryWorkerModelSchema.optional(),
|
|
20
|
+
reflectorModel: BuilderPromptMemoryWorkerModelSchema.optional(),
|
|
16
21
|
observerThresholdTokens: zod_1.z.number().int().min(1).optional(),
|
|
17
22
|
reflectorThresholdTokens: zod_1.z.number().int().min(1).optional(),
|
|
18
23
|
renderTokenBudget: zod_1.z.number().int().min(1).optional(),
|
|
@@ -26,6 +31,8 @@ const BuilderPromptMemoryConfigSchema = zod_1.z.object({
|
|
|
26
31
|
zod_1.z.object({
|
|
27
32
|
enabled: zod_1.z.literal(true),
|
|
28
33
|
credential: zod_1.z.string().min(1),
|
|
34
|
+
extractorModel: BuilderPromptMemoryWorkerModelSchema.optional(),
|
|
35
|
+
reflectorModel: BuilderPromptMemoryWorkerModelSchema.optional(),
|
|
29
36
|
topK: zod_1.z.number().int().min(1).max(100).optional(),
|
|
30
37
|
maxEntriesPerRun: zod_1.z.number().int().min(1).max(50).optional(),
|
|
31
38
|
}),
|
|
@@ -42,17 +49,29 @@ function getConfigRulesSection() {
|
|
|
42
49
|
- \`model\` must be "provider/model-name".
|
|
43
50
|
- \`credential\` must be the id returned by \`resolve_llm\` or \`ask_llm\`.
|
|
44
51
|
- Fresh agents must include
|
|
45
|
-
\`memory: { "enabled": true, "storage": "n8n"
|
|
52
|
+
\`memory: { "enabled": true, "storage": "n8n" }\`
|
|
46
53
|
unless the user explicitly asks to disable memory.
|
|
47
|
-
- \`memory.storage\` must be "n8n"
|
|
54
|
+
- \`memory.storage\` must be "n8n".
|
|
48
55
|
- \`memory.episodicMemory\` requires \`ask_credential\` with
|
|
49
56
|
\`credentialType: "openAiApi"\`.
|
|
57
|
+
- Memory worker model fields use \`{ "model": "provider/model-name", "credential": "<credentialId>" }\`;
|
|
58
|
+
use only credential IDs returned by \`resolve_llm\`, \`ask_llm\`, or \`ask_credential\`.
|
|
59
|
+
- Web search lives under \`config.webSearch\`. Only OpenAI and Anthropic models
|
|
60
|
+
support native web search; for those providers, use
|
|
61
|
+
\`{ "enabled": true, "provider": "native" }\` or omit \`provider\`. Every
|
|
62
|
+
other provider requires fallback search with \`provider: "brave"\` or
|
|
63
|
+
\`provider: "searxng"\` and a credential. Never write \`{ "enabled": true }\`
|
|
64
|
+
alone for fallback search. Use exact \`ask_credential\` types:
|
|
65
|
+
\`braveSearchApi\` for Brave and \`searXngApi\` for SearXNG.
|
|
66
|
+
- Preserve existing Brave/SearXNG \`config.webSearch\` on model switches unless
|
|
67
|
+
the user explicitly asks to change web-search method.
|
|
50
68
|
- \`config.maxIterations\` caps the number of agent loop iterations per run. Do not set or change this unless the user explicitly asks.
|
|
51
69
|
- Fresh agents need a real model, credential, and instructions before config
|
|
52
70
|
is written.`;
|
|
53
71
|
}
|
|
54
72
|
function getSchemaReferenceSection() {
|
|
55
|
-
const
|
|
73
|
+
const zodSchema = BuilderPromptAgentJsonConfigSchema;
|
|
74
|
+
const jsonSchemaText = (0, schema_text_serializer_1.jsonSchemaToCompactText)((0, zod_to_json_schema_1.zodToJsonSchema)(zodSchema));
|
|
56
75
|
return `\
|
|
57
76
|
#### Config Schema Reference
|
|
58
77
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-rules.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/config-rules.prompt.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"config-rules.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/config-rules.prompt.ts"],"names":[],"mappings":";;AAgDA,sDA0BC;AAED,8DASC;AAnFD,6BAAwB;AACxB,2DAAqD;AAErD,8CAAiF;AAEjF,qFAAmF;AAEnF,MAAM,oCAAoC,GAAG,OAAC,CAAC,MAAM,CAAC;IACrD,KAAK,EAAE,4BAAgB;IACvB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,+BAA+B,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE;IACpB,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,mBAAmB,EAAE,OAAC;SACpB,MAAM,CAAC;QACP,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;QAC/B,aAAa,EAAE,oCAAoC,CAAC,QAAQ,EAAE;QAC9D,cAAc,EAAE,oCAAoC,CAAC,QAAQ,EAAE;QAC/D,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3D,wBAAwB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC5D,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QACrD,uBAAuB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;QAC3D,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;KAC7C,CAAC;SACD,QAAQ,EAAE;IACZ,cAAc,EAAE,OAAC;SACf,kBAAkB,CAAC,SAAS,EAAE;QAC9B,OAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,OAAC,CAAC,MAAM,CAAC;YACR,OAAO,EAAE,OAAC,CAAC,OAAO,CAAC,IAAI,CAAC;YACxB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;YAC7B,cAAc,EAAE,oCAAoC,CAAC,QAAQ,EAAE;YAC/D,cAAc,EAAE,oCAAoC,CAAC,QAAQ,EAAE;YAC/D,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YACjD,gBAAgB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;SAC5D,CAAC;KACF,CAAC;SACD,QAAQ,EAAE;CACZ,CAAC,CAAC;AAEH,MAAM,kCAAkC,GAAG,yCAA6B,CAAC,MAAM,CAAC;IAC/E,MAAM,EAAE,+BAA+B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAEH,SAAgB,qBAAqB;IACpC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;cAwBM,CAAC;AACf,CAAC;AAED,SAAgB,yBAAyB;IACxC,MAAM,SAAS,GAA2B,kCAAkC,CAAC;IAC7E,MAAM,cAAc,GAAG,IAAA,gDAAuB,EAAC,IAAA,oCAAe,EAAC,SAAS,CAAgB,CAAC,CAAC;IAC1F,OAAO;;;;EAIN,cAAc;OACT,CAAC;AACR,CAAC"}
|
|
@@ -26,6 +26,21 @@ Use this to resolve the target agent's main \`model\` and \`credential\`.
|
|
|
26
26
|
- Explicit provider/model requests go to \`resolve_llm\` first.
|
|
27
27
|
- If the user asks to pick, change, confirm, or configure a model or main credential, call \`ask_llm\`; do not ask in prose.
|
|
28
28
|
- If \`resolve_llm\` succeeds, persist \`model = "{provider}/{model}"\` and \`credential = credentialId\`.
|
|
29
|
+
- Only OpenAI and Anthropic models support native web search. Use native web
|
|
30
|
+
search by default for those providers only, and only for
|
|
31
|
+
fresh agents or agents with no existing \`config.webSearch\`. Persist
|
|
32
|
+
\`config.webSearch = { "enabled": true, "provider": "native" }\` unless the
|
|
33
|
+
user asks to disable web search. Do not write native \`providerTools\`; the
|
|
34
|
+
write path derives them.
|
|
35
|
+
- When changing models, preserve existing Brave or SearXNG
|
|
36
|
+
\`config.webSearch\` unchanged, including its credential, even if the new
|
|
37
|
+
model supports native search. Switch fallback search to native only when the
|
|
38
|
+
user explicitly asks for native/provider web search.
|
|
39
|
+
- For every provider other than OpenAI or Anthropic, web search requires
|
|
40
|
+
fallback search: call \`ask_credential\`, then use \`provider: "brave"\` or
|
|
41
|
+
\`provider: "searxng"\`.
|
|
42
|
+
- If the user explicitly asks for Brave or SearXNG, keep that provider even
|
|
43
|
+
when the selected model also supports native search.
|
|
29
44
|
- If \`resolve_llm\` reports missing or ambiguous credentials/provider, call \`ask_llm\`.
|
|
30
45
|
- If it reports \`unknown_model\`, retry with a plausible returned model value or call \`ask_llm\`.
|
|
31
46
|
- For "Anthropic via OpenRouter", pass \`provider: "openrouter"\`; if the user names a routed model, pass the routed id without adding another provider prefix.
|
|
@@ -37,11 +52,13 @@ Use this to resolve the target agent's main \`model\` and \`credential\`.
|
|
|
37
52
|
- Use \`resolve_llm\` or \`ask_llm\` only for the target agent's main model credential.
|
|
38
53
|
- Use \`ask_credential\` for node tools, integrations, and Episodic Memory.
|
|
39
54
|
- For OpenRouter, \`provider\` is \`"openrouter"\`; the model can be a routed id such as \`anthropic/...\`.
|
|
55
|
+
- Model changes must not silently replace existing Brave or SearXNG web search with native search.
|
|
40
56
|
- Do not recommend current, best, latest, or fallback model IDs from memory when the recommendation catalog is unavailable.
|
|
41
57
|
|
|
42
58
|
### Verify
|
|
43
59
|
|
|
44
60
|
- The persisted \`model\` is in \`provider/model\` form.
|
|
45
|
-
- The persisted \`credential\` came from \`resolve_llm\` or \`ask_llm
|
|
61
|
+
- The persisted \`credential\` came from \`resolve_llm\` or \`ask_llm\`.
|
|
62
|
+
- Existing Brave or SearXNG \`config.webSearch\` is preserved on model changes unless the user explicitly requested a web-search method change.${recommendationGuidance}`;
|
|
46
63
|
}
|
|
47
64
|
//# sourceMappingURL=llm-selection.prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-selection.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/llm-selection.prompt.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"llm-selection.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/llm-selection.prompt.ts"],"names":[],"mappings":";;AAAA,sDA4DC;AA5DD,SAAgB,qBAAqB,CAAC,2BAA0C;IAC/E,MAAM,sBAAsB,GAAG,2BAA2B;QACzD,CAAC,CAAC,OAAO,2BAA2B,EAAE;QACtC,CAAC,CAAC,mMAAmM,CAAC;IAEvM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iJAsDyI,sBAAsB,EAAE,CAAC;AAC1K,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const MEMORY_PROMPT = "## Memory Guidance\n\n### Purpose\n\nUse this to configure the target agent's memory behavior.\n\n### Workflow\n\nFresh agents must include this default memory config unless the user explicitly asks to disable or change memory:\n```json\n{\n \"enabled\": true,\n \"storage\": \"n8n\",\n \"
|
|
1
|
+
export declare const MEMORY_PROMPT = "## Memory Guidance\n\n### Purpose\n\nUse this to configure the target agent's memory behavior.\n\n### Workflow\n\nFresh agents must include this default memory config unless the user explicitly asks to disable or change memory:\n```json\n{\n \"enabled\": true,\n \"storage\": \"n8n\",\n \"observationalMemory\": {\n \"enabled\": true\n }\n}\n```\n\nThis is the configurable agent's session memory. The runtime-managed\n`observationalMemory` settings tune that memory behavior; they are not a\nseparate user-facing memory product.\n\n### Rules\n\n- When creating a new agent, always write the exact default `memory` object above.\n- Set `storage` to \"n8n\".\n- Set `observationalMemory.enabled` to `true` for new agents unless the user explicitly asks to disable observational memory.\n- Keep the rest of `observationalMemory` optional; add tuning fields only for explicit tuning or disabling.\n- Supported observational memory tuning fields: `enabled`, `observerModel`, `reflectorModel`, `observerThresholdTokens`, `reflectorThresholdTokens`, `renderTokenBudget`, `observationLogTailLimit`, and `lockTtlMs`.\n- Memory worker model fields must use object shape: `{ \"model\": \"provider/model-name\", \"credential\": \"<credentialId>\" }`.\n- Only set `observerModel`, `reflectorModel`, `extractorModel`, or `episodicMemory.reflectorModel` when the user explicitly asks to use a specific model for memory work.\n- Use only credential IDs returned by `resolve_llm`, `ask_llm`, or `ask_credential` for memory worker model fields. Do not invent IDs or copy a main-model credential unless one of those tools returned it for that worker model provider.\n\n### Episodic Memory\n\n- Enable `memory.episodicMemory` only when the user asks for Episodic Memory, long-term memory, prior conversations, remembered decisions, exact artifacts, or cross-session memory.\n- Before enabling it, call `ask_credential({ credentialType: \"openAiApi\", purpose: \"OpenAI credential for Episodic Memory embeddings\" })`.\n- On success, set `memory.episodicMemory = { \"enabled\": true, \"credential\": \"<credentialId>\" }` and preserve existing `topK` or `maxEntriesPerRun`.\n- `memory.episodicMemory.credential` is only for OpenAI embeddings. It is separate from optional `extractorModel` and `reflectorModel` worker credentials.\n- If credential selection is skipped, do not enable Episodic Memory; explain that it needs an OpenAI credential for embeddings.\n- Do not add instructions saying the agent should remember, store, save, or decide what context matters. The runtime handles memory extraction and indexing.\n- If instructions mention Episodic Memory, phrase it as retrieval/use only, e.g. \"Use recalled prior context when relevant to the user's request.\"\n- Do not invent Episodic Memory credential IDs or reuse the main model credential unless `ask_credential` returned it for this purpose.\n\n### Gotchas\n\n- Session memory and Episodic Memory are different features; do not use one as a substitute for the other.\n- Observational memory is runtime-managed session memory behavior; do not add target-agent instructions telling it how to save observations.\n- A skipped Episodic Memory credential means Episodic Memory stays disabled.\n\n### Verify\n\n- Fresh runnable agents have enabled n8n memory unless explicitly disabled.\n- Fresh runnable agents set `observationalMemory.enabled` to `true` unless explicitly disabled.\n- Episodic Memory has an OpenAI credential returned by `ask_credential`.\n- Existing memory tuning is preserved unless the user asked to change it.";
|
|
@@ -15,7 +15,6 @@ Fresh agents must include this default memory config unless the user explicitly
|
|
|
15
15
|
{
|
|
16
16
|
"enabled": true,
|
|
17
17
|
"storage": "n8n",
|
|
18
|
-
"lastMessages": 50,
|
|
19
18
|
"observationalMemory": {
|
|
20
19
|
"enabled": true
|
|
21
20
|
}
|
|
@@ -30,16 +29,19 @@ separate user-facing memory product.
|
|
|
30
29
|
|
|
31
30
|
- When creating a new agent, always write the exact default \`memory\` object above.
|
|
32
31
|
- Set \`storage\` to "n8n".
|
|
33
|
-
- \`lastMessages\` defaults to 50.
|
|
34
32
|
- Set \`observationalMemory.enabled\` to \`true\` for new agents unless the user explicitly asks to disable observational memory.
|
|
35
33
|
- Keep the rest of \`observationalMemory\` optional; add tuning fields only for explicit tuning or disabling.
|
|
36
|
-
- Supported observational memory tuning fields: \`enabled\`, \`observerThresholdTokens\`, \`reflectorThresholdTokens\`, \`renderTokenBudget\`, \`observationLogTailLimit\`, and \`lockTtlMs\`.
|
|
34
|
+
- Supported observational memory tuning fields: \`enabled\`, \`observerModel\`, \`reflectorModel\`, \`observerThresholdTokens\`, \`reflectorThresholdTokens\`, \`renderTokenBudget\`, \`observationLogTailLimit\`, and \`lockTtlMs\`.
|
|
35
|
+
- Memory worker model fields must use object shape: \`{ "model": "provider/model-name", "credential": "<credentialId>" }\`.
|
|
36
|
+
- Only set \`observerModel\`, \`reflectorModel\`, \`extractorModel\`, or \`episodicMemory.reflectorModel\` when the user explicitly asks to use a specific model for memory work.
|
|
37
|
+
- Use only credential IDs returned by \`resolve_llm\`, \`ask_llm\`, or \`ask_credential\` for memory worker model fields. Do not invent IDs or copy a main-model credential unless one of those tools returned it for that worker model provider.
|
|
37
38
|
|
|
38
39
|
### Episodic Memory
|
|
39
40
|
|
|
40
41
|
- Enable \`memory.episodicMemory\` only when the user asks for Episodic Memory, long-term memory, prior conversations, remembered decisions, exact artifacts, or cross-session memory.
|
|
41
42
|
- Before enabling it, call \`ask_credential({ credentialType: "openAiApi", purpose: "OpenAI credential for Episodic Memory embeddings" })\`.
|
|
42
43
|
- On success, set \`memory.episodicMemory = { "enabled": true, "credential": "<credentialId>" }\` and preserve existing \`topK\` or \`maxEntriesPerRun\`.
|
|
44
|
+
- \`memory.episodicMemory.credential\` is only for OpenAI embeddings. It is separate from optional \`extractorModel\` and \`reflectorModel\` worker credentials.
|
|
43
45
|
- If credential selection is skipped, do not enable Episodic Memory; explain that it needs an OpenAI credential for embeddings.
|
|
44
46
|
- Do not add instructions saying the agent should remember, store, save, or decide what context matters. The runtime handles memory extraction and indexing.
|
|
45
47
|
- If instructions mention Episodic Memory, phrase it as retrieval/use only, e.g. "Use recalled prior context when relevant to the user's request."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/memory.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG
|
|
1
|
+
{"version":3,"file":"memory.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/memory.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0EAyD6C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const TOOLS_PROMPT = "## Tool Guidance\n\n### Purpose\n\nUse this to give the target agent callable capabilities through workflows,\nnodes, custom code tools, or provider tools.\n\n### Workflow\n\nUse this guidance before calling `search_nodes`, `get_node_types`, `build_custom_tool`,\nor adding, changing, or removing entries in `tools[]` / `providerTools`.\n\
|
|
1
|
+
export declare const TOOLS_PROMPT = "## Tool Guidance\n\n### Purpose\n\nUse this to give the target agent callable capabilities through workflows,\nnodes, custom code tools, or provider tools.\n\n### Workflow\n\nUse this guidance before calling `search_nodes`, `get_node_types`, `build_custom_tool`,\nor adding, changing, or removing entries in `tools[]` / `providerTools`.\n\nCustom tools are for pure computation, validation, formatting, or planning logic;\nthey cannot perform live network, filesystem, process, timer, or host I/O.\n\nIf a product also has a target-agent integration, use node/workflow tools when\nthe product is only an API capability and the conversation or trigger happens\nelsewhere. Use the integration only when that product is the chat/trigger\nsurface or the agent needs the current platform conversation context. For\nexample, use Linear node tools for ordinary issue search/create/update when\nthe agent is triggered from Slack, schedule, Preview, or a workflow; use the\nLinear integration only when people will talk to the agent from Linear\nissues/comments.\n\n#### Workflow Tools\n\n- Call `list_workflows`; reference supported workflows by name with `{ \"type\": \"workflow\", \"workflow\": \"<name>\" }`.\n\n#### Node Tools\n\n- Use `search_nodes`, then `get_node_types`; never guess node type names.\n- Use the tool node id from discovery, usually ending in `Tool`.\n- Put fixed values in `nodeParameters`; use complete n8n expressions for values the agent should decide at runtime:\n `={{ $fromAI('url', 'The URL to inspect', 'string') }}`.\n- Never write literal `\"$fromAI\"` or bare `$fromAI`; the node will treat it as the actual value.\n- Do not pipe AI-chosen fields through `$json`.\n- Do not include `inputSchema` or `toolDescription` for node tools.\n- For each required credential slot, call `ask_credential` once before config mutation. Pass the node's credential key as `credentialSlot`. On success, copy the returned `credentials` object directly to `node.credentials`. If skipped, still add the tool and omit only that credential slot.\n\n#### Custom Tools\n\n- Use `build_custom_tool` with `export default new Tool(...)` and imports only from `@n8n/agents` and `zod`.\n- Do not use custom tools for live website crawling, HTTP fetching, API calls, SEO crawlers, or scraping. Use workflow or node tools for those.\n- Register the returned custom tool id in config after `build_custom_tool`.\n- Custom handlers are pure functions: take validated `input`, compute, and return a JSON-serializable value. Do not call `.build()`.\n- Follow this pattern:\n```typescript\nimport { Tool } from '@n8n/agents';\nimport { z } from 'zod';\n\nexport default new Tool('tool_name')\n .description('What the tool does')\n .input(z.object({ query: z.string() }))\n .handler(async ({ query }, ctx) => {\n return { result: query.toUpperCase() };\n });\n```\n- Custom handlers run in a V8 isolate. No network, filesystem, process, Buffer, fetch, timers, wall-clock waiting, or host I/O.\n- Some globals may exist as stubs: `setTimeout` fires synchronously, `console.log` goes nowhere, and `TextEncoder.encode` returns its input unchanged.\n- Safe globals include `Math`, `Date`, `JSON`, `RegExp`, `Array`, `Object`, `Map`, `Set`, `Promise`, typed arrays, and methods on provided values.\n- The handler receives `(input, ctx)`; `ctx.suspend(payload)` pauses for human-in-the-loop flows. Ignore `ctx` otherwise.\n- Execution is capped at 5 seconds and about 32 MB memory. If runtime fails, fix the code from the returned error and call `build_custom_tool` again.\n\n#### Provider Tools\n\n- Match provider tools to the configured model provider.\n- Anthropic: `providerTools[\"anthropic.web_search\"]`.\n- OpenAI: `providerTools[\"openai.web_search\"]` or `providerTools[\"openai.image_generation\"]`, only for compatible OpenAI models.\n\n### Gotchas\n\n- Web-search fallback services are config, not node tools, unless the user explicitly asks for a node integration.\n- Live crawling, fetching, and API integrations need workflow or node tools, not custom tools.\n- Do not include `inputSchema` or `toolDescription` for node tools.\n- `$fromAI(...)` placeholders define the node tool input schema; do not add it manually.\n- Do not invent node type names, workflow names, credential ids, or provider tool keys.\n- If a required node-tool credential is skipped, add the tool and omit only that credential slot.\n- `build_custom_tool` stores code only; the config still needs a `{ \"type\": \"custom\", \"id\": \"<returned id>\" }` tool ref.\n\n### Verify\n\n- Workflow tools reference discovered workflow names.\n- Node tools use discovered tool node ids and valid node parameters.\n- Custom tools return a stored custom tool id that is registered in config.\n- Provider tool keys match the configured model provider and the valid key list.";
|
|
@@ -14,10 +14,18 @@ nodes, custom code tools, or provider tools.
|
|
|
14
14
|
Use this guidance before calling \`search_nodes\`, \`get_node_types\`, \`build_custom_tool\`,
|
|
15
15
|
or adding, changing, or removing entries in \`tools[]\` / \`providerTools\`.
|
|
16
16
|
|
|
17
|
-
Prefer existing workflow tools and node tools over custom tools for real-world actions.
|
|
18
17
|
Custom tools are for pure computation, validation, formatting, or planning logic;
|
|
19
18
|
they cannot perform live network, filesystem, process, timer, or host I/O.
|
|
20
19
|
|
|
20
|
+
If a product also has a target-agent integration, use node/workflow tools when
|
|
21
|
+
the product is only an API capability and the conversation or trigger happens
|
|
22
|
+
elsewhere. Use the integration only when that product is the chat/trigger
|
|
23
|
+
surface or the agent needs the current platform conversation context. For
|
|
24
|
+
example, use Linear node tools for ordinary issue search/create/update when
|
|
25
|
+
the agent is triggered from Slack, schedule, Preview, or a workflow; use the
|
|
26
|
+
Linear integration only when people will talk to the agent from Linear
|
|
27
|
+
issues/comments.
|
|
28
|
+
|
|
21
29
|
#### Workflow Tools
|
|
22
30
|
|
|
23
31
|
- Call \`list_workflows\`; reference supported workflows by name with \`{ "type": "workflow", "workflow": "<name>" }\`.
|
|
@@ -31,7 +39,7 @@ they cannot perform live network, filesystem, process, timer, or host I/O.
|
|
|
31
39
|
- Never write literal \`"$fromAI"\` or bare \`$fromAI\`; the node will treat it as the actual value.
|
|
32
40
|
- Do not pipe AI-chosen fields through \`$json\`.
|
|
33
41
|
- Do not include \`inputSchema\` or \`toolDescription\` for node tools.
|
|
34
|
-
- For each required credential slot, call \`ask_credential\` once before config mutation. If skipped, still add the tool and omit only that credential slot.
|
|
42
|
+
- For each required credential slot, call \`ask_credential\` once before config mutation. Pass the node's credential key as \`credentialSlot\`. On success, copy the returned \`credentials\` object directly to \`node.credentials\`. If skipped, still add the tool and omit only that credential slot.
|
|
35
43
|
|
|
36
44
|
#### Custom Tools
|
|
37
45
|
|
|
@@ -65,6 +73,7 @@ export default new Tool('tool_name')
|
|
|
65
73
|
|
|
66
74
|
### Gotchas
|
|
67
75
|
|
|
76
|
+
- Web-search fallback services are config, not node tools, unless the user explicitly asks for a node integration.
|
|
68
77
|
- Live crawling, fetching, and API integrations need workflow or node tools, not custom tools.
|
|
69
78
|
- Do not include \`inputSchema\` or \`toolDescription\` for node tools.
|
|
70
79
|
- \`$fromAI(...)\` placeholders define the node tool input schema; do not add it manually.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/tools.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"tools.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/tools.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAqFqD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { BuiltTool } from '@n8n/agents';
|
|
2
|
+
import type { McpRegistryService } from '../../../modules/mcp-registry/registry/mcp-registry.service';
|
|
3
|
+
export interface SearchMcpServersDeps {
|
|
4
|
+
mcpRegistryService: McpRegistryService;
|
|
5
|
+
}
|
|
6
|
+
export declare function buildSearchMcpServersTool(deps: SearchMcpServersDeps): BuiltTool;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildSearchMcpServersTool = buildSearchMcpServersTool;
|
|
4
|
+
const tool_1 = require("@n8n/agents/tool");
|
|
5
|
+
const change_case_1 = require("change-case");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const node_description_transform_1 = require("../../../modules/mcp-registry/node-description-transform");
|
|
8
|
+
const builder_tool_names_1 = require("./builder-tool-names");
|
|
9
|
+
const searchMcpServersInputSchema = zod_1.z.object({
|
|
10
|
+
queries: zod_1.z
|
|
11
|
+
.array(zod_1.z.string())
|
|
12
|
+
.min(1)
|
|
13
|
+
.describe('Search queries for MCP servers (e.g., ["github"], ["slack"])'),
|
|
14
|
+
});
|
|
15
|
+
function getMcpRegistryCredentialTypeName(server) {
|
|
16
|
+
return `${(0, change_case_1.camelCase)(server.slug)}McpOAuth2Api`;
|
|
17
|
+
}
|
|
18
|
+
function pickPreferredRemote(server) {
|
|
19
|
+
const streamable = server.remotes.find((remote) => remote.type === 'streamable-http');
|
|
20
|
+
if (streamable)
|
|
21
|
+
return { type: 'streamableHttp', url: streamable.url };
|
|
22
|
+
const sse = server.remotes.find((remote) => remote.type === 'sse');
|
|
23
|
+
if (sse)
|
|
24
|
+
return { type: 'sse', url: sse.url };
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
function registryServerToMcpConfig(server) {
|
|
28
|
+
const remote = pickPreferredRemote(server);
|
|
29
|
+
if (!remote)
|
|
30
|
+
return null;
|
|
31
|
+
const credentialType = getMcpRegistryCredentialTypeName(server);
|
|
32
|
+
const nodeTypeName = `${node_description_transform_1.MCP_REGISTRY_PACKAGE_NAME}.${(0, change_case_1.camelCase)(server.slug)}`;
|
|
33
|
+
return {
|
|
34
|
+
name: (0, change_case_1.camelCase)(server.slug),
|
|
35
|
+
title: server.title,
|
|
36
|
+
description: server.tagline,
|
|
37
|
+
url: remote.url,
|
|
38
|
+
transport: remote.type,
|
|
39
|
+
authentication: credentialType,
|
|
40
|
+
credentialType,
|
|
41
|
+
tools: server.tools.map((tool) => ({
|
|
42
|
+
name: tool.name,
|
|
43
|
+
...(tool.title ? { title: tool.title } : {}),
|
|
44
|
+
})),
|
|
45
|
+
metadata: {
|
|
46
|
+
nodeTypeName,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function normalizeQueries(queries) {
|
|
51
|
+
return queries.map((query) => query.trim().toLowerCase()).filter((query) => query.length > 0);
|
|
52
|
+
}
|
|
53
|
+
function matchesServerQuery(server, normalizedQueries) {
|
|
54
|
+
const fields = [
|
|
55
|
+
server.slug,
|
|
56
|
+
(0, change_case_1.camelCase)(server.slug),
|
|
57
|
+
server.title,
|
|
58
|
+
server.description,
|
|
59
|
+
server.tagline,
|
|
60
|
+
]
|
|
61
|
+
.map((field) => (typeof field === 'string' ? field.toLowerCase() : null))
|
|
62
|
+
.filter((field) => field !== null);
|
|
63
|
+
return normalizedQueries.some((query) => fields.some((field) => field.includes(query)));
|
|
64
|
+
}
|
|
65
|
+
function buildSearchMcpServersTool(deps) {
|
|
66
|
+
return new tool_1.Tool(builder_tool_names_1.BUILDER_TOOLS.SEARCH_MCP_SERVERS)
|
|
67
|
+
.description('Search the MCP registry for available MCP servers. Returns MCP config-ready server details, ' +
|
|
68
|
+
'including credentialType for ask_credential and server metadata needed for patch_config.')
|
|
69
|
+
.input(searchMcpServersInputSchema)
|
|
70
|
+
.handler(async ({ queries }) => {
|
|
71
|
+
const normalizedQueries = normalizeQueries(queries);
|
|
72
|
+
if (normalizedQueries.length === 0)
|
|
73
|
+
return { results: [] };
|
|
74
|
+
const servers = await deps.mcpRegistryService.getAll();
|
|
75
|
+
const results = servers.flatMap((server) => {
|
|
76
|
+
if (!matchesServerQuery(server, normalizedQueries))
|
|
77
|
+
return [];
|
|
78
|
+
const transformed = registryServerToMcpConfig(server);
|
|
79
|
+
return transformed ? [transformed] : [];
|
|
80
|
+
});
|
|
81
|
+
return { results };
|
|
82
|
+
})
|
|
83
|
+
.build();
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=search-mcp-servers.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-mcp-servers.tool.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/search-mcp-servers.tool.ts"],"names":[],"mappings":";;AA4FA,8DAsBC;AAjHD,2CAAwC;AAExC,6CAAwC;AACxC,6BAAwB;AAExB,kGAA8F;AAI9F,6DAAqD;AAgBrD,MAAM,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,OAAC;SACR,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;SACjB,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,8DAA8D,CAAC;CAC1E,CAAC,CAAC;AAEH,SAAS,gCAAgC,CAAC,MAAyB;IAClE,OAAO,GAAG,IAAA,uBAAS,EAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC;AAChD,CAAC;AAED,SAAS,mBAAmB,CAC3B,MAAyB;IAEzB,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,iBAAiB,CAAC,CAAC;IACtF,IAAI,UAAU;QAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,GAAG,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC;IAEvE,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC;IACnE,IAAI,GAAG;QAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,CAAC;IAE9C,OAAO,IAAI,CAAC;AACb,CAAC;AAED,SAAS,yBAAyB,CAAC,MAAyB;IAC3D,MAAM,MAAM,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,MAAM,cAAc,GAAG,gCAAgC,CAAC,MAAM,CAAC,CAAC;IAChE,MAAM,YAAY,GAAG,GAAG,sDAAyB,IAAI,IAAA,uBAAS,EAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;IAE9E,OAAO;QACN,IAAI,EAAE,IAAA,uBAAS,EAAC,MAAM,CAAC,IAAI,CAAC;QAC5B,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,WAAW,EAAE,MAAM,CAAC,OAAO;QAC3B,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,SAAS,EAAE,MAAM,CAAC,IAAI;QACtB,cAAc,EAAE,cAAc;QAC9B,cAAc;QACd,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAClC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC5C,CAAC,CAAC;QACH,QAAQ,EAAE;YACT,YAAY;SACZ;KACD,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,OAAiB;IAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAyB,EAAE,iBAA2B;IACjF,MAAM,MAAM,GAAG;QACd,MAAM,CAAC,IAAI;QACX,IAAA,uBAAS,EAAC,MAAM,CAAC,IAAI,CAAC;QACtB,MAAM,CAAC,KAAK;QACZ,MAAM,CAAC,WAAW;QAClB,MAAM,CAAC,OAAO;KACd;SACC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;SACxE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC;IAEpC,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACzF,CAAC;AAED,SAAgB,yBAAyB,CAAC,IAA0B;IACnE,OAAO,IAAI,WAAI,CAAC,kCAAa,CAAC,kBAAkB,CAAC;SAC/C,WAAW,CACX,8FAA8F;QAC7F,0FAA0F,CAC3F;SACA,KAAK,CAAC,2BAA2B,CAAC;SAClC,OAAO,CAAC,KAAK,EAAE,EAAE,OAAO,EAAyB,EAAE,EAAE;QACrD,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;QAE3D,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;QACvD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;YAC1C,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,CAAC;gBAAE,OAAO,EAAE,CAAC;YAE9D,MAAM,WAAW,GAAG,yBAAyB,CAAC,MAAM,CAAC,CAAC;YACtD,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH,OAAO,EAAE,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC;SACD,KAAK,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SKILL_DESCRIPTION_RULE: string;
|
|
2
|
+
export declare const SKILL_BODY_FORMAT_RULE: string;
|
|
3
|
+
export declare const SKILL_BODY_TEMPLATE = "## Overview\n<1-2 sentences: what the agent should do when this skill is loaded, and the outcome it produces.>\n\n## Inputs\n<What the agent needs before starting \u2014 required inputs, tools, credentials, or context \u2014 and how to obtain them. Write \"None\" if there are no prerequisites.>\n\n## Steps\n1. <First action \u2014 specific and actionable.>\n2. <Next action.>\n\n## Rules\n- <A constraint or guideline the agent must always follow.>\n\n## Example\n<A concrete, representative example: the input and the expected output or result.>\n\n## Gotchas\n<Common mistakes or edge cases, and how to handle them.>";
|
|
4
|
+
export declare const SKILL_BODY_GUIDANCE = "The body is loaded only after the skill triggers, so it must be a self-contained, actionable operating manual. Follow this exact Markdown structure, filling each applicable section with concrete, specific content \u2014 no placeholders or angle-bracket text. Do NOT put \"when to use\" triggers here; those belong in the description:\n\n## Overview\n<1-2 sentences: what the agent should do when this skill is loaded, and the outcome it produces.>\n\n## Inputs\n<What the agent needs before starting \u2014 required inputs, tools, credentials, or context \u2014 and how to obtain them. Write \"None\" if there are no prerequisites.>\n\n## Steps\n1. <First action \u2014 specific and actionable.>\n2. <Next action.>\n\n## Rules\n- <A constraint or guideline the agent must always follow.>\n\n## Example\n<A concrete, representative example: the input and the expected output or result.>\n\n## Gotchas\n<Common mistakes or edge cases, and how to handle them.>";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SKILL_BODY_GUIDANCE = exports.SKILL_BODY_TEMPLATE = exports.SKILL_BODY_FORMAT_RULE = exports.SKILL_DESCRIPTION_RULE = void 0;
|
|
4
|
+
exports.SKILL_DESCRIPTION_RULE = 'The description is the routing contract — the only text the agent sees when deciding whether ' +
|
|
5
|
+
'to load this skill, so it must be specific: state what the skill does AND the concrete ' +
|
|
6
|
+
'situations or keywords that should trigger it (e.g. "Use when the user asks to …"), plus when ' +
|
|
7
|
+
'NOT to use it where helpful. A vague description means the skill never loads.';
|
|
8
|
+
exports.SKILL_BODY_FORMAT_RULE = 'The body is loaded only after the skill triggers, so it must be a self-contained, actionable ' +
|
|
9
|
+
'operating manual. Follow this exact Markdown structure, filling each applicable section with ' +
|
|
10
|
+
'concrete, specific content — no placeholders or angle-bracket text. Do NOT put "when to use" ' +
|
|
11
|
+
'triggers here; those belong in the description:';
|
|
12
|
+
exports.SKILL_BODY_TEMPLATE = `## Overview
|
|
13
|
+
<1-2 sentences: what the agent should do when this skill is loaded, and the outcome it produces.>
|
|
14
|
+
|
|
15
|
+
## Inputs
|
|
16
|
+
<What the agent needs before starting — required inputs, tools, credentials, or context — and how to obtain them. Write "None" if there are no prerequisites.>
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
1. <First action — specific and actionable.>
|
|
20
|
+
2. <Next action.>
|
|
21
|
+
|
|
22
|
+
## Rules
|
|
23
|
+
- <A constraint or guideline the agent must always follow.>
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
<A concrete, representative example: the input and the expected output or result.>
|
|
27
|
+
|
|
28
|
+
## Gotchas
|
|
29
|
+
<Common mistakes or edge cases, and how to handle them.>`;
|
|
30
|
+
exports.SKILL_BODY_GUIDANCE = `${exports.SKILL_BODY_FORMAT_RULE}\n\n${exports.SKILL_BODY_TEMPLATE}`;
|
|
31
|
+
//# sourceMappingURL=skill-body-template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-body-template.js","sourceRoot":"","sources":["../../../../src/modules/agents/builder/skill-body-template.ts"],"names":[],"mappings":";;;AAgBa,QAAA,sBAAsB,GAClC,+FAA+F;IAC/F,yFAAyF;IACzF,gGAAgG;IAChG,+EAA+E,CAAC;AAGpE,QAAA,sBAAsB,GAClC,+FAA+F;IAC/F,+FAA+F;IAC/F,+FAA+F;IAC/F,iDAAiD,CAAC;AAEtC,QAAA,mBAAmB,GAAG;;;;;;;;;;;;;;;;;yDAiBsB,CAAC;AAG7C,QAAA,mBAAmB,GAAG,GAAG,8BAAsB,OAAO,2BAAmB,EAAE,CAAC"}
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getBuilderRuntimeSkills = getBuilderRuntimeSkills;
|
|
4
4
|
const integrations_skill_1 = require("./integrations.skill");
|
|
5
|
+
const mcp_skill_1 = require("./mcp.skill");
|
|
5
6
|
const target_skills_skill_1 = require("./target-skills.skill");
|
|
7
|
+
const target_tasks_skill_1 = require("./target-tasks.skill");
|
|
6
8
|
function getBuilderRuntimeSkills() {
|
|
7
|
-
|
|
9
|
+
const skills = [
|
|
8
10
|
(0, integrations_skill_1.integrationsSkill)(),
|
|
11
|
+
(0, mcp_skill_1.mcpSkill)(),
|
|
9
12
|
(0, target_skills_skill_1.targetSkillsSkill)(),
|
|
13
|
+
(0, target_tasks_skill_1.targetTasksSkill)(),
|
|
10
14
|
];
|
|
15
|
+
return skills;
|
|
11
16
|
}
|
|
12
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/index.ts"],"names":[],"mappings":";;AAOA,0DAaC;AAlBD,6DAAyD;AACzD,2CAAuC;AACvC,+DAA0D;AAC1D,6DAAwD;AAExD,SAAgB,uBAAuB;IACtC,MAAM,MAAM,GAAmB;QAC9B,IAAA,sCAAiB,GAAE;QACnB,IAAA,oBAAQ,GAAE;QACV,IAAA,uCAAiB,GAAE;QACnB,IAAA,qCAAgB,GAAE;KAKlB,CAAC;IAEF,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -5,48 +5,69 @@ function integrationsSkill() {
|
|
|
5
5
|
return {
|
|
6
6
|
id: 'agent-builder-integrations',
|
|
7
7
|
name: 'Agent Builder Integrations',
|
|
8
|
-
description: 'Use when
|
|
8
|
+
description: 'Use when deciding whether Slack, Linear, Telegram, or another external platform should be a target-agent chat integration/trigger versus a node tool, and when adding or changing chat integrations; not for built-in Build chat or Preview chat behavior.',
|
|
9
9
|
instructions: `\
|
|
10
10
|
## Purpose
|
|
11
11
|
|
|
12
|
-
Use this to
|
|
12
|
+
Use this to decide whether the target agent needs an entry in \`integrations\`
|
|
13
|
+
or a normal node/workflow tool for an external product, then configure
|
|
14
|
+
\`integrations\` only when the integration is the right surface.
|
|
13
15
|
|
|
14
|
-
##
|
|
16
|
+
## Use when
|
|
15
17
|
|
|
16
|
-
- The user
|
|
17
|
-
|
|
18
|
-
- The user
|
|
19
|
-
|
|
18
|
+
- The user asks to add, update, or remove entries in the target agent's
|
|
19
|
+
\`integrations\` array.
|
|
20
|
+
- The user asks to connect the target agent to an external chat platform with
|
|
21
|
+
credentials.
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Integration vs Node Tool Decision
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
Use an integration when the product is the agent's conversation or trigger
|
|
26
|
+
surface: humans will mention, message, comment to, or resume the agent there,
|
|
27
|
+
or the agent needs to respond in that same platform conversation context.
|
|
28
|
+
|
|
29
|
+
Use a node/workflow tool when the product is only something the agent operates
|
|
30
|
+
on: searching records, creating tickets, updating objects, or sending a
|
|
31
|
+
business-process notification while the conversation happens elsewhere.
|
|
32
|
+
|
|
33
|
+
Examples:
|
|
24
34
|
|
|
25
|
-
|
|
35
|
+
- Slack integration: the agent should be chatted with in Slack, respond in
|
|
36
|
+
Slack threads, DM users, message channels, add reactions, or render rich UI
|
|
37
|
+
to Slack users.
|
|
38
|
+
- Linear integration: the agent should be triggered from Linear issues/comments,
|
|
39
|
+
understand the current Linear subject, or reply in the same Linear
|
|
40
|
+
conversation.
|
|
41
|
+
- Linear node tools: the agent is triggered from Slack, Preview, a task, or a
|
|
42
|
+
workflow and only needs to search/create/update Linear tickets.
|
|
26
43
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- Use standard 5-field cron.
|
|
44
|
+
## Workflow
|
|
45
|
+
|
|
46
|
+
The \`integrations\` array controls how the target agent is triggered.
|
|
31
47
|
|
|
32
48
|
### Chat Integrations
|
|
33
49
|
|
|
34
50
|
- These are connected external chat platforms, not built-in Preview chat.
|
|
35
51
|
- Call \`list_integration_types\` first.
|
|
52
|
+
- Read the returned \`capabilities\`, \`useIntegrationWhen\`, and
|
|
53
|
+
\`useNodeToolWhen\` fields before deciding to add an integration.
|
|
36
54
|
- Pick one returned \`credentialTypes\` entry and pass it to \`ask_credential\`.
|
|
37
55
|
- Persist only \`type\` and \`credentialId\`; never invent credential IDs or names.
|
|
38
|
-
- Preserve existing
|
|
56
|
+
- Preserve existing chat integrations unless the user asked to remove them.
|
|
39
57
|
|
|
40
58
|
## Gotchas
|
|
41
59
|
|
|
42
|
-
- Active schedules are rejected until the agent is published; create or update schedules as inactive.
|
|
43
|
-
- The schedule \`wakeUpPrompt\` is the message sent when the schedule fires, not target-agent system instructions.
|
|
44
60
|
- Chat integration credential types must come from \`list_integration_types\`.
|
|
61
|
+
- Do not add a Linear integration just because the agent needs Linear issue
|
|
62
|
+
CRUD. Use Linear node tools unless Linear itself is the chat/trigger context.
|
|
63
|
+
- For recurring or scheduled runs, create a task (\`create_task\`), not an
|
|
64
|
+
integration.
|
|
45
65
|
|
|
46
66
|
## Verify
|
|
47
67
|
|
|
48
|
-
- Schedule configs include \`type\`, \`active\`, \`cronExpression\`, and \`wakeUpPrompt\`.
|
|
49
68
|
- Connected chat integrations use a credential id returned by \`ask_credential\`.
|
|
69
|
+
- The chosen integration matches \`useIntegrationWhen\`; otherwise use node or
|
|
70
|
+
workflow tools.
|
|
50
71
|
- The final \`integrations\` array keeps unrelated integrations intact.`,
|
|
51
72
|
};
|
|
52
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/integrations.skill.ts"],"names":[],"mappings":";;AAEA,
|
|
1
|
+
{"version":3,"file":"integrations.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/integrations.skill.ts"],"names":[],"mappings":";;AAEA,8CAsEC;AAtED,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACV,4PAA4P;QAC7P,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wEA8DwD;KACtE,CAAC;AACH,CAAC"}
|