n8n 2.37.5 → 2.38.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.
Files changed (725) hide show
  1. package/dist/active-executions.js +2 -1
  2. package/dist/active-executions.js.map +1 -1
  3. package/dist/active-workflow-manager.d.ts +5 -1
  4. package/dist/active-workflow-manager.js +64 -33
  5. package/dist/active-workflow-manager.js.map +1 -1
  6. package/dist/binary-data/binary-data-access.service.d.ts +11 -0
  7. package/dist/binary-data/binary-data-access.service.js +50 -0
  8. package/dist/binary-data/binary-data-access.service.js.map +1 -0
  9. package/dist/build.tsbuildinfo +1 -1
  10. package/dist/commands/base-command.d.ts +2 -0
  11. package/dist/commands/base-command.js +8 -0
  12. package/dist/commands/base-command.js.map +1 -1
  13. package/dist/commands/import/workflow.d.ts +1 -0
  14. package/dist/commands/import/workflow.js +12 -3
  15. package/dist/commands/import/workflow.js.map +1 -1
  16. package/dist/commands/start.d.ts +1 -0
  17. package/dist/commands/start.js +2 -1
  18. package/dist/commands/start.js.map +1 -1
  19. package/dist/constants.d.ts +2 -0
  20. package/dist/constants.js +3 -1
  21. package/dist/constants.js.map +1 -1
  22. package/dist/controllers/binary-data.controller.d.ts +5 -2
  23. package/dist/controllers/binary-data.controller.js +11 -3
  24. package/dist/controllers/binary-data.controller.js.map +1 -1
  25. package/dist/controllers/e2e.controller.d.ts +1 -6
  26. package/dist/controllers/e2e.controller.js +7 -20
  27. package/dist/controllers/e2e.controller.js.map +1 -1
  28. package/dist/controllers/project.controller.d.ts +4 -10
  29. package/dist/controllers/project.controller.js +14 -114
  30. package/dist/controllers/project.controller.js.map +1 -1
  31. package/dist/controllers/telemetry.controller.js +1 -1
  32. package/dist/controllers/telemetry.controller.js.map +1 -1
  33. package/dist/credentials/credentials-finder.service.d.ts +2 -0
  34. package/dist/credentials/credentials-finder.service.js +46 -12
  35. package/dist/credentials/credentials-finder.service.js.map +1 -1
  36. package/dist/credentials/credentials.service.d.ts +5 -2
  37. package/dist/credentials/credentials.service.js +4 -1
  38. package/dist/credentials/credentials.service.js.map +1 -1
  39. package/dist/credentials-helper.d.ts +3 -1
  40. package/dist/credentials-helper.js +10 -2
  41. package/dist/credentials-helper.js.map +1 -1
  42. package/dist/deprecation/deprecation.service.js +5 -0
  43. package/dist/deprecation/deprecation.service.js.map +1 -1
  44. package/dist/errors/http-error-serializers.js +3 -0
  45. package/dist/errors/http-error-serializers.js.map +1 -1
  46. package/dist/errors/variable-validation.error.d.ts +2 -2
  47. package/dist/errors/variable-validation.error.js +1 -1
  48. package/dist/errors/variable-validation.error.js.map +1 -1
  49. package/dist/evaluation.ee/evaluation-config-validator.js +3 -2
  50. package/dist/evaluation.ee/evaluation-config-validator.js.map +1 -1
  51. package/dist/evaluation.ee/evaluation-dataset.service.js +8 -1
  52. package/dist/evaluation.ee/evaluation-dataset.service.js.map +1 -1
  53. package/dist/evaluation.ee/test-runner/workflow-compiler.service.js +96 -45
  54. package/dist/evaluation.ee/test-runner/workflow-compiler.service.js.map +1 -1
  55. package/dist/execution-lifecycle/execute-error-workflow.js +3 -0
  56. package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
  57. package/dist/executions/engine-v2-execution-reader.service.d.ts +11 -0
  58. package/dist/executions/engine-v2-execution-reader.service.js +68 -0
  59. package/dist/executions/engine-v2-execution-reader.service.js.map +1 -0
  60. package/dist/executions/execution-id.d.ts +5 -0
  61. package/dist/executions/execution-id.js +10 -0
  62. package/dist/executions/execution-id.js.map +1 -0
  63. package/dist/executions/execution.service.d.ts +3 -1
  64. package/dist/executions/execution.service.js +16 -8
  65. package/dist/executions/execution.service.js.map +1 -1
  66. package/dist/executions/executions.controller.d.ts +1 -0
  67. package/dist/executions/executions.controller.js +12 -6
  68. package/dist/executions/executions.controller.js.map +1 -1
  69. package/dist/expression-observability/expression-observability.provider.js +3 -2
  70. package/dist/expression-observability/expression-observability.provider.js.map +1 -1
  71. package/dist/license/license.service.js +1 -1
  72. package/dist/license/license.service.js.map +1 -1
  73. package/dist/metrics/prometheus/instance-ai-metrics.service.js.map +1 -1
  74. package/dist/middlewares/content-security-policy.d.ts +10 -0
  75. package/dist/middlewares/content-security-policy.js +53 -0
  76. package/dist/middlewares/content-security-policy.js.map +1 -0
  77. package/dist/middlewares/index.d.ts +1 -0
  78. package/dist/middlewares/index.js +1 -0
  79. package/dist/middlewares/index.js.map +1 -1
  80. package/dist/modules/agents/adapters/agents-credential-provider.js +1 -1
  81. package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
  82. package/dist/modules/agents/agent-config.service.js +0 -3
  83. package/dist/modules/agents/agent-config.service.js.map +1 -1
  84. package/dist/modules/agents/agent-default-model-resolver.service.js +3 -5
  85. package/dist/modules/agents/agent-default-model-resolver.service.js.map +1 -1
  86. package/dist/modules/agents/agent-execution-orchestrator.service.js +13 -6
  87. package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
  88. package/dist/modules/agents/agent-execution.service.d.ts +1 -0
  89. package/dist/modules/agents/agent-execution.service.js +3 -0
  90. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  91. package/dist/modules/agents/agent-integrations.controller.d.ts +7 -5
  92. package/dist/modules/agents/agent-integrations.controller.js +10 -17
  93. package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
  94. package/dist/modules/agents/agent-model-catalog.service.js +6 -12
  95. package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
  96. package/dist/modules/agents/agent-publish.service.d.ts +2 -3
  97. package/dist/modules/agents/agent-publish.service.js +12 -5
  98. package/dist/modules/agents/agent-publish.service.js.map +1 -1
  99. package/dist/modules/agents/agent-runtime-cache.service.d.ts +5 -0
  100. package/dist/modules/agents/agent-runtime-cache.service.js +57 -3
  101. package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
  102. package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +14 -7
  103. package/dist/modules/agents/agent-runtime-reconstruction.service.js +89 -36
  104. package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
  105. package/dist/modules/agents/agent-sandbox-runtime.service.d.ts +4 -2
  106. package/dist/modules/agents/agent-sandbox-runtime.service.js +21 -11
  107. package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
  108. package/dist/modules/agents/agent-validation.service.js +0 -4
  109. package/dist/modules/agents/agent-validation.service.js.map +1 -1
  110. package/dist/modules/agents/agent-workflow-execution.service.js +1 -1
  111. package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
  112. package/dist/modules/agents/agent-workflow-tool-resume.service.d.ts +32 -0
  113. package/dist/modules/agents/agent-workflow-tool-resume.service.js +168 -0
  114. package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -0
  115. package/dist/modules/agents/agent-workspace.service.d.ts +8 -2
  116. package/dist/modules/agents/agent-workspace.service.js +15 -4
  117. package/dist/modules/agents/agent-workspace.service.js.map +1 -1
  118. package/dist/modules/agents/agents.module.d.ts +1 -1
  119. package/dist/modules/agents/agents.module.js +8 -7
  120. package/dist/modules/agents/agents.module.js.map +1 -1
  121. package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -6
  122. package/dist/modules/agents/builder/agents-builder-tools.service.js +16 -21
  123. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  124. package/dist/modules/agents/builder/agents-builder.service.d.ts +5 -7
  125. package/dist/modules/agents/builder/agents-builder.service.js +27 -36
  126. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  127. package/dist/modules/agents/builder/builder-model-live-lookup.service.js +1 -1
  128. package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
  129. package/dist/modules/agents/builder/call-agent-failure.d.ts +5 -0
  130. package/dist/modules/agents/builder/call-agent-failure.js +28 -0
  131. package/dist/modules/agents/builder/call-agent-failure.js.map +1 -0
  132. package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +3 -2
  133. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +8 -9
  134. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
  135. package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +3 -2
  136. package/dist/modules/agents/builder/interactive/finish-setup.tool.js +16 -6
  137. package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
  138. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +74 -61
  139. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  140. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +5 -4
  141. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
  142. package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
  143. package/dist/modules/agents/builder/prompts/tools.prompt.js +6 -0
  144. package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
  145. package/dist/modules/agents/builder/skills/external-services.skill.js +51 -8
  146. package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
  147. package/dist/modules/agents/builder/skills/node-tools.skill.js +4 -4
  148. package/dist/modules/agents/builder/skills/node-tools.skill.js.map +1 -1
  149. package/dist/modules/agents/builder/skills/sub-agents.skill.js +15 -12
  150. package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
  151. package/dist/modules/agents/builder/skills/target-tasks.skill.js +16 -5
  152. package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
  153. package/dist/modules/agents/entities/agent-channel-status.entity.d.ts +16 -0
  154. package/dist/modules/agents/entities/agent-channel-status.entity.js +99 -0
  155. package/dist/modules/agents/entities/agent-channel-status.entity.js.map +1 -0
  156. package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +3 -3
  157. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +17 -7
  158. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
  159. package/dist/modules/agents/integrations/agent-channel-reconciler.service.d.ts +38 -0
  160. package/dist/modules/agents/integrations/agent-channel-reconciler.service.js +260 -0
  161. package/dist/modules/agents/integrations/agent-channel-reconciler.service.js.map +1 -0
  162. package/dist/modules/agents/integrations/agent-channel-status-reporter.d.ts +23 -0
  163. package/dist/modules/agents/integrations/agent-channel-status-reporter.js +114 -0
  164. package/dist/modules/agents/integrations/agent-channel-status-reporter.js.map +1 -0
  165. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +9 -0
  166. package/dist/modules/agents/integrations/agent-chat-bridge.js +53 -1
  167. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  168. package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +1 -1
  169. package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +3 -2
  170. package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
  171. package/dist/modules/agents/integrations/agent-chat-integration.d.ts +5 -2
  172. package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
  173. package/dist/modules/agents/integrations/channel-status-report.d.ts +4 -0
  174. package/dist/modules/agents/integrations/channel-status-report.js +58 -0
  175. package/dist/modules/agents/integrations/channel-status-report.js.map +1 -0
  176. package/dist/modules/agents/integrations/chat-integration.service.d.ts +17 -2
  177. package/dist/modules/agents/integrations/chat-integration.service.js +63 -35
  178. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  179. package/dist/modules/agents/integrations/credential-claim.d.ts +3 -0
  180. package/dist/modules/agents/integrations/credential-claim.js +12 -0
  181. package/dist/modules/agents/integrations/credential-claim.js.map +1 -0
  182. package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +2 -0
  183. package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +25 -0
  184. package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
  185. package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +2 -1
  186. package/dist/modules/agents/integrations/platforms/discord-integration.js +9 -6
  187. package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -1
  188. package/dist/modules/agents/integrations/platforms/linear-integration.js +1 -1
  189. package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
  190. package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +2 -1
  191. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +7 -6
  192. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
  193. package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +1 -1
  194. package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
  195. package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +4 -6
  196. package/dist/modules/agents/integrations/platforms/telegram-integration.js +11 -14
  197. package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
  198. package/dist/modules/agents/json-config/credential-field-mapping.js +3 -0
  199. package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
  200. package/dist/modules/agents/json-config/model-config.js +1 -1
  201. package/dist/modules/agents/json-config/model-config.js.map +1 -1
  202. package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js +1 -1
  203. package/dist/modules/agents/json-config/reconcile-node-tool-gateway-credentials.js.map +1 -1
  204. package/dist/modules/agents/llm-provider-defaults.js +16 -1
  205. package/dist/modules/agents/llm-provider-defaults.js.map +1 -1
  206. package/dist/modules/agents/repositories/agent-channel-status.repository.d.ts +29 -0
  207. package/dist/modules/agents/repositories/agent-channel-status.repository.js +63 -0
  208. package/dist/modules/agents/repositories/agent-channel-status.repository.js.map +1 -0
  209. package/dist/modules/agents/repositories/agent-execution.repository.d.ts +1 -0
  210. package/dist/modules/agents/repositories/agent-execution.repository.js +4 -0
  211. package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
  212. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +29 -19
  213. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
  214. package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
  215. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +6 -3
  216. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +43 -16
  217. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
  218. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +1 -0
  219. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +18 -6
  220. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
  221. package/dist/modules/agents/tools/workflow-tool-factory.d.ts +24 -13
  222. package/dist/modules/agents/tools/workflow-tool-factory.js +147 -9
  223. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  224. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +10 -2
  225. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +23 -4
  226. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
  227. package/dist/modules/agents/utils/provider-model-id.d.ts +2 -0
  228. package/dist/modules/agents/utils/provider-model-id.js +21 -0
  229. package/dist/modules/agents/utils/provider-model-id.js.map +1 -0
  230. package/dist/modules/community-packages/community-packages.service.d.ts +4 -0
  231. package/dist/modules/community-packages/community-packages.service.js +96 -92
  232. package/dist/modules/community-packages/community-packages.service.js.map +1 -1
  233. package/dist/modules/community-packages/npm-utils.js +1 -5
  234. package/dist/modules/community-packages/npm-utils.js.map +1 -1
  235. package/dist/modules/data-table/data-table-aggregate.service.d.ts +1 -1
  236. package/dist/modules/data-table/data-table-aggregate.service.js +1 -1
  237. package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
  238. package/dist/modules/data-table/data-table.service.d.ts +9 -4
  239. package/dist/modules/data-table/data-table.service.js +34 -4
  240. package/dist/modules/data-table/data-table.service.js.map +1 -1
  241. package/dist/modules/data-table/errors/data-table-access-denied.error.d.ts +4 -0
  242. package/dist/modules/data-table/errors/data-table-access-denied.error.js +13 -0
  243. package/dist/modules/data-table/errors/data-table-access-denied.error.js.map +1 -0
  244. package/dist/modules/dynamic-credentials.ee/config-redaction.d.ts +5 -0
  245. package/dist/modules/dynamic-credentials.ee/config-redaction.js +81 -0
  246. package/dist/modules/dynamic-credentials.ee/config-redaction.js.map +1 -0
  247. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -3
  248. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -4
  249. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
  250. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +1 -0
  251. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
  252. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
  253. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +3 -2
  254. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
  255. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +22 -4
  256. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
  257. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +1 -0
  258. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +12 -2
  259. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
  260. package/dist/modules/encryption-key-manager/key-manager.service.d.ts +7 -2
  261. package/dist/modules/encryption-key-manager/key-manager.service.js +27 -8
  262. package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
  263. package/dist/modules/engine-v2/engine-control-plane-auth.middleware.d.ts +6 -0
  264. package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js +31 -0
  265. package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js.map +1 -0
  266. package/dist/modules/engine-v2/engine-control-plane-client.d.ts +9 -0
  267. package/dist/modules/engine-v2/engine-control-plane-client.js +51 -0
  268. package/dist/modules/engine-v2/engine-control-plane-client.js.map +1 -0
  269. package/dist/modules/engine-v2/engine-control-plane-server.d.ts +14 -0
  270. package/dist/modules/engine-v2/engine-control-plane-server.js +84 -0
  271. package/dist/modules/engine-v2/engine-control-plane-server.js.map +1 -0
  272. package/dist/modules/engine-v2/engine-data-plane-client.d.ts +3 -1
  273. package/dist/modules/engine-v2/engine-data-plane-client.js +16 -1
  274. package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
  275. package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.d.ts +18 -0
  276. package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js +150 -0
  277. package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js.map +1 -0
  278. package/dist/modules/engine-v2/engine-lifecycle-event.controller.d.ts +7 -0
  279. package/dist/modules/engine-v2/engine-lifecycle-event.controller.js +34 -0
  280. package/dist/modules/engine-v2/engine-lifecycle-event.controller.js.map +1 -0
  281. package/dist/modules/engine-v2/engine-v2.constants.d.ts +2 -0
  282. package/dist/modules/engine-v2/engine-v2.constants.js +6 -0
  283. package/dist/modules/engine-v2/engine-v2.constants.js.map +1 -0
  284. package/dist/modules/engine-v2/engine-v2.module.js +4 -0
  285. package/dist/modules/engine-v2/engine-v2.module.js.map +1 -1
  286. package/dist/modules/engine-v2/engine-v2.runtime.d.ts +3 -1
  287. package/dist/modules/engine-v2/engine-v2.runtime.js +6 -2
  288. package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -1
  289. package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +1 -1
  290. package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
  291. package/dist/modules/external-secrets.ee/providers/infisical.js +1 -1
  292. package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
  293. package/dist/modules/external-secrets.ee/providers/vault.js +1 -1
  294. package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
  295. package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +5 -3
  296. package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +16 -4
  297. package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -1
  298. package/dist/modules/git-connections.ee/git-connections.service.d.ts +4 -2
  299. package/dist/modules/git-connections.ee/git-connections.service.js +87 -4
  300. package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -1
  301. package/dist/modules/instance-ai/browser/browser-local-mcp-server.d.ts +3 -2
  302. package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +48 -30
  303. package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -1
  304. package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
  305. package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +2 -28
  306. package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +5 -228
  307. package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
  308. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.d.ts +1 -3
  309. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js +2 -8
  310. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
  311. package/dist/modules/instance-ai/instance-ai-memory.service.js +1 -3
  312. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  313. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -0
  314. package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -2
  315. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  316. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +0 -2
  317. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -2
  318. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
  319. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -3
  320. package/dist/modules/instance-ai/instance-ai.adapter.service.js +101 -44
  321. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  322. package/dist/modules/instance-ai/instance-ai.controller.d.ts +1 -1
  323. package/dist/modules/instance-ai/instance-ai.controller.js +75 -83
  324. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  325. package/dist/modules/instance-ai/instance-ai.module.js +8 -16
  326. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  327. package/dist/modules/instance-ai/instance-ai.service.d.ts +2 -0
  328. package/dist/modules/instance-ai/instance-ai.service.js +55 -11
  329. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  330. package/dist/modules/instance-ai/internal-messages.d.ts +7 -0
  331. package/dist/modules/instance-ai/internal-messages.js +32 -2
  332. package/dist/modules/instance-ai/internal-messages.js.map +1 -1
  333. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +2 -5
  334. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +4 -7
  335. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
  336. package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
  337. package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
  338. package/dist/modules/instance-ai/workflow-templates.service.js +1 -1
  339. package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -1
  340. package/dist/modules/ldap.ee/ldap.controller.ee.d.ts +4 -2
  341. package/dist/modules/ldap.ee/ldap.controller.ee.js +9 -2
  342. package/dist/modules/ldap.ee/ldap.controller.ee.js.map +1 -1
  343. package/dist/modules/ldap.ee/ldap.service.ee.js +4 -0
  344. package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
  345. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js +1 -1
  346. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js.map +1 -1
  347. package/dist/modules/mcp/mcp-scopes.js +1 -1
  348. package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
  349. package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
  350. package/dist/modules/mcp/mcp.constants.d.ts +3 -1
  351. package/dist/modules/mcp/mcp.constants.js +4 -2
  352. package/dist/modules/mcp/mcp.constants.js.map +1 -1
  353. package/dist/modules/mcp/mcp.controller.js +20 -6
  354. package/dist/modules/mcp/mcp.controller.js.map +1 -1
  355. package/dist/modules/mcp/mcp.service.js +3 -3
  356. package/dist/modules/mcp/mcp.types.d.ts +1 -0
  357. package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
  358. package/dist/modules/mcp/tools/agents/agent-reference.js +2 -2
  359. package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +2 -5
  360. package/dist/modules/mcp/tools/agents/agent-tools.service.js +5 -9
  361. package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
  362. package/dist/modules/mcp/tools/list-credentials.tool.d.ts +1 -1
  363. package/dist/modules/mcp/tools/list-credentials.tool.js +5 -5
  364. package/dist/modules/mcp/tools/list-credentials.tool.js.map +1 -1
  365. package/dist/modules/mcp/tools/{list-n8n-connect-services.tool.d.ts → list-n8n-gateway-services.tool.d.ts} +1 -1
  366. package/dist/modules/mcp/tools/{list-n8n-connect-services.tool.js → list-n8n-gateway-services.tool.js} +13 -13
  367. package/dist/modules/mcp/tools/list-n8n-gateway-services.tool.js.map +1 -0
  368. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +1 -1
  369. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  370. package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js +1 -1
  371. package/dist/modules/mcp/tools/workflow-builder/credentials-auto-assign.js.map +1 -1
  372. package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js +8 -6
  373. package/dist/modules/mcp/tools/workflow-builder/get-workflow-node-types.tool.js.map +1 -1
  374. package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js +1 -1
  375. package/dist/modules/mcp/tools/workflow-builder/mcp-instructions.js.map +1 -1
  376. package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js +8 -6
  377. package/dist/modules/mcp/tools/workflow-builder/search-workflow-nodes.tool.js.map +1 -1
  378. package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -1
  379. package/dist/modules/n8n-packages/engine/import-result.js +1 -0
  380. package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
  381. package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +5 -1
  382. package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
  383. package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +4 -5
  384. package/dist/modules/n8n-packages/engine/project-package-importer.js +9 -7
  385. package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
  386. package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +4 -5
  387. package/dist/modules/n8n-packages/engine/workflow-package-importer.js +18 -20
  388. package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
  389. package/dist/modules/n8n-packages/entities/credential/credential-importer.js +1 -0
  390. package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
  391. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +12 -12
  392. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -1
  393. package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.d.ts +4 -0
  394. package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js +34 -0
  395. package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js.map +1 -0
  396. package/dist/modules/n8n-packages/entities/project/project-importer.js +1 -1
  397. package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
  398. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +22 -14
  399. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
  400. package/dist/modules/n8n-packages/io/directory/directory-package-reader.d.ts +21 -0
  401. package/dist/modules/n8n-packages/io/directory/directory-package-reader.js +146 -0
  402. package/dist/modules/n8n-packages/io/directory/directory-package-reader.js.map +1 -0
  403. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
  404. package/dist/modules/n8n-packages/n8n-packages.service.js +36 -0
  405. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
  406. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +10 -2
  407. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
  408. package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.d.ts +1 -0
  409. package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js +4 -0
  410. package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js.map +1 -1
  411. package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.d.ts +1 -0
  412. package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js.map +1 -1
  413. package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
  414. package/dist/modules/oauth-server/oauth-server.service.js +12 -16
  415. package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
  416. package/dist/modules/oauth-server/oauth-token.service.d.ts +2 -1
  417. package/dist/modules/oauth-server/oauth-token.service.js +15 -3
  418. package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
  419. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.d.ts +22 -0
  420. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js +60 -0
  421. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js.map +1 -0
  422. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.d.ts +24 -0
  423. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js +62 -0
  424. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js.map +1 -0
  425. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.d.ts +22 -0
  426. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js +56 -0
  427. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js.map +1 -0
  428. package/dist/modules/oauth-server/protected-resource-resolvers/index.js +4 -0
  429. package/dist/modules/oauth-server/protected-resource-resolvers/index.js.map +1 -1
  430. package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +4 -0
  431. package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +17 -1
  432. package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
  433. package/dist/modules/oauth-server/resource-identity.d.ts +2 -0
  434. package/dist/modules/oauth-server/resource-identity.js +15 -0
  435. package/dist/modules/oauth-server/resource-identity.js.map +1 -0
  436. package/dist/modules/otel/otel.service.js +14 -7
  437. package/dist/modules/otel/otel.service.js.map +1 -1
  438. package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +1 -0
  439. package/dist/modules/policy-infrastructure/policy-decision.service.js +3 -0
  440. package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
  441. package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +1 -0
  442. package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -1
  443. package/dist/modules/policy-infrastructure/policy-lifecycle-handler.d.ts +9 -0
  444. package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js +45 -0
  445. package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js.map +1 -0
  446. package/dist/modules/quick-connect/handlers/firecrawl.handler.js +1 -1
  447. package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +1 -1
  448. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +18 -1
  449. package/dist/modules/source-control.ee/source-control-import.service.ee.js +11 -3
  450. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  451. package/dist/modules/source-control.ee/source-control-status.service.ee.js +2 -0
  452. package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
  453. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +32 -0
  454. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +16 -0
  455. package/dist/modules/source-control.ee/source-control.service.ee.js +11 -2
  456. package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
  457. package/dist/modules/source-control.ee/types/import-result.d.ts +2 -1
  458. package/dist/modules/sso-oidc/oidc.controller.ee.js +2 -2
  459. package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
  460. package/dist/modules/sso-oidc/oidc.service.ee.js +1 -1
  461. package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
  462. package/dist/modules/sso-oidc/views/oidc-test-result.d.ts +2 -2
  463. package/dist/modules/sso-oidc/views/oidc-test-result.js +10 -4
  464. package/dist/modules/sso-oidc/views/oidc-test-result.js.map +1 -1
  465. package/dist/modules/sso-saml/saml.controller.ee.js +2 -2
  466. package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
  467. package/dist/modules/sso-saml/saml.service.ee.js +1 -1
  468. package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
  469. package/dist/modules/sso-saml/views/init-sso-post.d.ts +1 -1
  470. package/dist/modules/sso-saml/views/init-sso-post.js +2 -2
  471. package/dist/modules/sso-saml/views/init-sso-post.js.map +1 -1
  472. package/dist/modules/token-exchange/services/jwks-resolver.js +1 -1
  473. package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
  474. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.d.ts +7 -0
  475. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js +38 -0
  476. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js.map +1 -0
  477. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.d.ts +9 -0
  478. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js +41 -0
  479. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js.map +1 -0
  480. package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.d.ts +8 -0
  481. package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js +37 -0
  482. package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js.map +1 -0
  483. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.d.ts +17 -0
  484. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js +96 -0
  485. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js.map +1 -0
  486. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +20 -0
  487. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +69 -0
  488. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -0
  489. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.d.ts +18 -0
  490. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +63 -0
  491. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -0
  492. package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -0
  493. package/dist/modules/type-availability-policies/type-availability-policies.module.js +6 -0
  494. package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
  495. package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +3 -5
  496. package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +7 -9
  497. package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
  498. package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.d.ts → workflow-review-authorization.service.d.ts} +12 -3
  499. package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.js → workflow-review-authorization.service.js} +52 -17
  500. package/dist/modules/workflow-reviews.ee/workflow-review-authorization.service.js.map +1 -0
  501. package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.d.ts +14 -0
  502. package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js +17 -0
  503. package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js.map +1 -0
  504. package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +8 -12
  505. package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +28 -82
  506. package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
  507. package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.d.ts +7 -6
  508. package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +80 -110
  509. package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -1
  510. package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.d.ts +17 -0
  511. package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js +69 -0
  512. package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js.map +1 -0
  513. package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.d.ts +34 -0
  514. package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js +237 -0
  515. package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js.map +1 -0
  516. package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.d.ts +10 -0
  517. package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js +57 -0
  518. package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js.map +1 -0
  519. package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.d.ts +17 -0
  520. package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js +93 -0
  521. package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js.map +1 -0
  522. package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.d.ts +34 -0
  523. package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js +268 -0
  524. package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js.map +1 -0
  525. package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +7 -3
  526. package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +13 -9
  527. package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -1
  528. package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.d.ts +9 -0
  529. package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js +37 -0
  530. package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js.map +1 -0
  531. package/dist/oauth/oauth.service.js +0 -1
  532. package/dist/oauth/oauth.service.js.map +1 -1
  533. package/dist/permissions.ee/check-access.js +11 -7
  534. package/dist/permissions.ee/check-access.js.map +1 -1
  535. package/dist/permissions.ee/project-scope.service.d.ts +1 -0
  536. package/dist/permissions.ee/project-scope.service.js +7 -2
  537. package/dist/permissions.ee/project-scope.service.js.map +1 -1
  538. package/dist/policy/evaluate-content-import-safely.d.ts +5 -0
  539. package/dist/policy/evaluate-content-import-safely.js +18 -0
  540. package/dist/policy/evaluate-content-import-safely.js.map +1 -0
  541. package/dist/policy/policy-enforcement-backend.d.ts +1 -0
  542. package/dist/policy/policy-enforcement.service.d.ts +2 -2
  543. package/dist/policy/policy-enforcement.service.js +10 -14
  544. package/dist/policy/policy-enforcement.service.js.map +1 -1
  545. package/dist/policy/policy-violation.error.d.ts +2 -0
  546. package/dist/policy/policy-violation.error.js +10 -0
  547. package/dist/policy/policy-violation.error.js.map +1 -1
  548. package/dist/public-api/types.d.ts +1 -14
  549. package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +2 -1
  550. package/dist/public-api/v1/controllers/git-connections.public.controller.js +24 -3
  551. package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -1
  552. package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +8 -1
  553. package/dist/public-api/v1/controllers/workflows.public.controller.js +151 -14
  554. package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
  555. package/dist/public-api/v1/handlers/credentials/credentials.handler.js +1 -0
  556. package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
  557. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +33 -44
  558. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
  559. package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +1 -1
  560. package/dist/public-api/v1/handlers/discover/discover.handler.js +3 -13
  561. package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
  562. package/dist/public-api/v1/handlers/discover/discover.service.d.ts +2 -3
  563. package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
  564. package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +1 -1
  565. package/dist/public-api/v1/handlers/projects/projects.handler.js +23 -21
  566. package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
  567. package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +1 -1
  568. package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -6
  569. package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
  570. package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -4
  571. package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -102
  572. package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
  573. package/dist/public-api/v1/openapi.yml +4779 -2848
  574. package/dist/response-helper.js +3 -0
  575. package/dist/response-helper.js.map +1 -1
  576. package/dist/scaling/constants.d.ts +2 -2
  577. package/dist/scaling/constants.js +1 -0
  578. package/dist/scaling/constants.js.map +1 -1
  579. package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -1
  580. package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
  581. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +2 -7
  582. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
  583. package/dist/security/content-security-policy.d.ts +8 -0
  584. package/dist/security/content-security-policy.js +18 -0
  585. package/dist/security/content-security-policy.js.map +1 -0
  586. package/dist/security-audit/risk-reporters/instance-risk-reporter.js +1 -1
  587. package/dist/security-audit/risk-reporters/instance-risk-reporter.js.map +1 -1
  588. package/dist/server.js +22 -21
  589. package/dist/server.js.map +1 -1
  590. package/dist/services/active-workflows.service.d.ts +3 -1
  591. package/dist/services/active-workflows.service.js +11 -9
  592. package/dist/services/active-workflows.service.js.map +1 -1
  593. package/dist/services/ai-gateway-eligibility.js +1 -1
  594. package/dist/services/ai-gateway-eligibility.js.map +1 -1
  595. package/dist/services/ai-gateway.service.js +14 -14
  596. package/dist/services/ai-gateway.service.js.map +1 -1
  597. package/dist/services/credentials-tester.service.js +7 -1
  598. package/dist/services/credentials-tester.service.js.map +1 -1
  599. package/dist/services/engine-data-plane-proxy.service.d.ts +4 -1
  600. package/dist/services/engine-data-plane-proxy.service.js +5 -0
  601. package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
  602. package/dist/services/engine-v2-dispatcher.service.d.ts +5 -2
  603. package/dist/services/engine-v2-dispatcher.service.js +46 -24
  604. package/dist/services/engine-v2-dispatcher.service.js.map +1 -1
  605. package/dist/services/engine-v2-push-registry.service.d.ts +8 -0
  606. package/dist/services/engine-v2-push-registry.service.js +51 -0
  607. package/dist/services/engine-v2-push-registry.service.js.map +1 -0
  608. package/dist/services/engine-v2-push-session.d.ts +23 -0
  609. package/dist/services/engine-v2-push-session.js +24 -0
  610. package/dist/services/engine-v2-push-session.js.map +1 -0
  611. package/dist/services/folder-finder.service.js +10 -8
  612. package/dist/services/folder-finder.service.js.map +1 -1
  613. package/dist/services/folder.service.d.ts +1 -1
  614. package/dist/services/folder.service.js +1 -7
  615. package/dist/services/folder.service.js.map +1 -1
  616. package/dist/services/import.service.d.ts +14 -3
  617. package/dist/services/import.service.js +27 -2
  618. package/dist/services/import.service.js.map +1 -1
  619. package/dist/services/node-resource-explorer.service.js +1 -1
  620. package/dist/services/node-resource-explorer.service.js.map +1 -1
  621. package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
  622. package/dist/services/project.service.ee.d.ts +47 -9
  623. package/dist/services/project.service.ee.js +128 -17
  624. package/dist/services/project.service.ee.js.map +1 -1
  625. package/dist/services/role.service.js +10 -5
  626. package/dist/services/role.service.js.map +1 -1
  627. package/dist/task-runners/task-runner-process-py.d.ts +1 -1
  628. package/dist/task-runners/task-runner-process-py.js.map +1 -1
  629. package/dist/telemetry/index.js +1 -1
  630. package/dist/telemetry/index.js.map +1 -1
  631. package/dist/utils/ai-proxy-fetch.d.ts +3 -4
  632. package/dist/utils/ai-proxy-fetch.js +3 -5
  633. package/dist/utils/ai-proxy-fetch.js.map +1 -1
  634. package/dist/utils/strapi-utils.js +1 -1
  635. package/dist/utils/strapi-utils.js.map +1 -1
  636. package/dist/utils/ttl-map.d.ts +1 -0
  637. package/dist/utils/ttl-map.js +9 -0
  638. package/dist/utils/ttl-map.js.map +1 -1
  639. package/dist/webhooks/constants.d.ts +2 -0
  640. package/dist/webhooks/constants.js +2 -1
  641. package/dist/webhooks/constants.js.map +1 -1
  642. package/dist/webhooks/live-webhooks.js +1 -1
  643. package/dist/webhooks/live-webhooks.js.map +1 -1
  644. package/dist/webhooks/test-webhook-registrations.service.d.ts +1 -0
  645. package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
  646. package/dist/webhooks/test-webhooks.d.ts +6 -2
  647. package/dist/webhooks/test-webhooks.js +29 -6
  648. package/dist/webhooks/test-webhooks.js.map +1 -1
  649. package/dist/webhooks/waiting-forms.js +3 -4
  650. package/dist/webhooks/waiting-forms.js.map +1 -1
  651. package/dist/webhooks/waiting-webhooks.js +4 -0
  652. package/dist/webhooks/waiting-webhooks.js.map +1 -1
  653. package/dist/webhooks/webhook-helpers.d.ts +3 -1
  654. package/dist/webhooks/webhook-helpers.js +24 -1
  655. package/dist/webhooks/webhook-helpers.js.map +1 -1
  656. package/dist/webhooks/webhook-response-headers.d.ts +1 -0
  657. package/dist/webhooks/webhook-response-headers.js +6 -0
  658. package/dist/webhooks/webhook-response-headers.js.map +1 -1
  659. package/dist/workflow-execute-additional-data.js +5 -0
  660. package/dist/workflow-execute-additional-data.js.map +1 -1
  661. package/dist/workflow-helpers.d.ts +3 -2
  662. package/dist/workflow-helpers.js +35 -24
  663. package/dist/workflow-helpers.js.map +1 -1
  664. package/dist/workflows/publication/publication-result.d.ts +5 -0
  665. package/dist/workflows/publication/publication-status-reporter.d.ts +1 -0
  666. package/dist/workflows/publication/publication-status-reporter.js +23 -5
  667. package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
  668. package/dist/workflows/publication/workflow-publication-applier.d.ts +6 -1
  669. package/dist/workflows/publication/workflow-publication-applier.js +63 -10
  670. package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
  671. package/dist/workflows/triggers/poll-backoff.service.d.ts +2 -2
  672. package/dist/workflows/triggers/poll-backoff.service.js +3 -3
  673. package/dist/workflows/triggers/poll-backoff.service.js.map +1 -1
  674. package/dist/workflows/triggers/poll-cursor.service.d.ts +2 -2
  675. package/dist/workflows/triggers/poll-cursor.service.js +4 -1
  676. package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
  677. package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +6 -4
  678. package/dist/workflows/triggers/trigger-execution-context.factory.js +13 -7
  679. package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
  680. package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +1 -0
  681. package/dist/workflows/triggers/webhook-trigger-registrar.js +3 -0
  682. package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
  683. package/dist/workflows/triggers/workflow-trigger-activator.d.ts +10 -1
  684. package/dist/workflows/triggers/workflow-trigger-activator.js +78 -38
  685. package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
  686. package/dist/workflows/workflow-creation.service.d.ts +17 -4
  687. package/dist/workflows/workflow-creation.service.js +96 -16
  688. package/dist/workflows/workflow-creation.service.js.map +1 -1
  689. package/dist/workflows/workflow-execution.service.js +2 -0
  690. package/dist/workflows/workflow-execution.service.js.map +1 -1
  691. package/dist/workflows/workflow-finder.service.js +67 -56
  692. package/dist/workflows/workflow-finder.service.js.map +1 -1
  693. package/dist/workflows/workflow-validation.service.js +3 -2
  694. package/dist/workflows/workflow-validation.service.js.map +1 -1
  695. package/dist/workflows/workflow.service.d.ts +4 -1
  696. package/dist/workflows/workflow.service.ee.d.ts +9 -3
  697. package/dist/workflows/workflow.service.ee.js +16 -2
  698. package/dist/workflows/workflow.service.ee.js.map +1 -1
  699. package/dist/workflows/workflow.service.js +25 -4
  700. package/dist/workflows/workflow.service.js.map +1 -1
  701. package/dist/workflows/workflows.controller.d.ts +3 -5
  702. package/dist/workflows/workflows.controller.js +3 -7
  703. package/dist/workflows/workflows.controller.js.map +1 -1
  704. package/package.json +39 -39
  705. package/templates/oauth-callback.handlebars +1 -1
  706. package/templates/oauth-error-callback.handlebars +1 -1
  707. package/templates/saml-connection-test-failed.handlebars +4 -1
  708. package/templates/saml-connection-test-success.handlebars +4 -1
  709. package/dist/modules/instance-ai/output-redaction-config.d.ts +0 -3
  710. package/dist/modules/instance-ai/output-redaction-config.js +0 -21
  711. package/dist/modules/instance-ai/output-redaction-config.js.map +0 -1
  712. package/dist/modules/mcp/tools/list-n8n-connect-services.tool.js.map +0 -1
  713. package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +0 -1
  714. package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.d.ts +0 -18
  715. package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +0 -77
  716. package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +0 -1
  717. package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +0 -51
  718. package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +0 -538
  719. package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +0 -1
  720. package/dist/policy/policy-cleared.d.ts +0 -20
  721. package/dist/policy/policy-cleared.js +0 -22
  722. package/dist/policy/policy-cleared.js.map +0 -1
  723. package/dist/public-api/v1/handlers/data-tables/data-tables.service.d.ts +0 -4
  724. package/dist/public-api/v1/handlers/data-tables/data-tables.service.js +0 -44
  725. package/dist/public-api/v1/handlers/data-tables/data-tables.service.js.map +0 -1
@@ -15,12 +15,13 @@ Use this to resolve the target agent's main \`model\` and \`credential\`.
15
15
  ### Workflow
16
16
 
17
17
  1. For fresh agents, call \`read_config\` first. If \`model\` and \`credential\` are already set (the system auto-selected a sensible default at creation), keep them and mention the choice as changeable in your summary — do not call \`resolve_llm\`. Otherwise call \`resolve_llm\` once, silently, before the first config write — with provider/model when the user named them, otherwise with no arguments.
18
- 2. If \`resolve_llm\` succeeds, persist \`model = "{provider}/{model}"\` and \`credential = credentialId\`. If the result has \`claimedFreeOpenAiCredits: true\`, tell the user you set them up with free OpenAI credits. If the result's \`credentialName\` is "n8n credits" (its \`credentialId\` is the managed tag), persist it like any credential and tell the user the model runs on n8n credits — never surface the internal "n8n Connect" or "AI Gateway" names. If it has \`autoPicked: true\`, tell the user which provider and model you picked and that they can ask to change it — do not ask for confirmation and do not raise a trailing model question.
18
+ 2. If \`resolve_llm\` succeeds, persist \`model = "{provider}/{model}"\` and \`credential = credentialId\`. If the result has \`claimedFreeOpenAiCredits: true\`, tell the user you set them up with free OpenAI credits. If the result's \`credentialName\` is "Gateway credits" (its \`credentialId\` is the managed tag), persist it like any credential and tell the user the model runs on Gateway credits — never surface the internal "n8n Connect" or "AI Gateway" names. If it has \`autoPicked: true\`, tell the user which provider and model you picked and that they can ask to change it — do not ask for confirmation and do not raise a trailing model question.
19
19
  3. If the user asks to pick, change, confirm, or configure a model or main credential, ask via \`ask_questions\`; do not ask in prose.
20
- - Exception — when the user explicitly asks to use n8n credits for the main model, do NOT ask: call \`resolve_llm\` with \`useN8nCredits: true\` (and \`provider\` when the user named one). It resolves n8n credits for that provider even if the user already has their own credential for it; persist the result (\`credentialName\` "n8n credits") and tell the user the model runs on n8n credits. If it returns \`n8n_credits_unsupported_provider\`, tell the user n8n credits does not cover that provider and offer their own credential; if \`ambiguous_n8n_credits_provider\`, ask which provider via \`ask_questions\` using the returned \`providers\`; if \`n8n_credits_unavailable\`, tell the user n8n credits is not available on this instance and resolve their own credential instead. On \`unknown_model\`, retry with a value from the returned \`availableModels\` or surface those options.
20
+ - Exception — when the user explicitly asks to use Gateway credits for the main model, do NOT ask: call \`resolve_llm\` with \`useGatewayCredits: true\` (and \`provider\` when the user named one). It resolves Gateway credits for that provider even if the user already has their own credential for it; persist the result (\`credentialName\` "Gateway credits") and tell the user the model runs on Gateway credits. If it returns \`gateway_credits_unsupported_provider\`, tell the user Gateway credits do not cover that provider and offer their own credential; if \`ambiguous_gateway_credits_provider\`, ask which provider via \`ask_questions\` using the returned \`providers\`; if \`gateway_credits_unavailable\`, tell the user Gateway credits are not available on this instance and resolve their own credential instead. On \`unknown_model\`, retry with a value from the returned \`availableModels\` or surface those options.
21
21
  4. During an initial build, if \`resolve_llm\` reports missing or ambiguous credentials/provider, do not ask: mark the model task \`blocked\`, keep building with \`model: ""\` and no \`credential\`, and include the model choice as a question in the trailing \`finish_setup\` call — for ambiguity between multiple credentials of one provider, use the credential names from the resolve_llm result as the question's options — when it resolves, call \`resolve_llm\` with the answer (pass \`credentialId\` when the user picked a specific credential) and patch \`/model\` and \`/credential\` — after \`read_config\`, since the user may have already set the model in the panel. For a model change on an existing agent, ask immediately instead, and never write \`model: ""\` over an existing model — keep the current model and credential until the new one is resolved.
22
- 5. If \`resolve_llm\` reports \`unknown_model\`, retry with a plausible returned model value or ask via \`ask_questions\`. If it reports \`model_lookup_failed\` (the provider's model list could not be fetched, e.g. a transient error — possible even on the default no-model path), retry \`resolve_llm\`; do not guess a model.
23
- 6. If the model is still unresolved when the user asks to run or publish the agent, leave the draft with \`model: ""\`, do not guess a model, and tell the user the agent needs a model and credential first — in the panel or here in chat. If they dismiss a model-change question on an existing agent, keep the current model and credential unchanged.
22
+ 5. If \`resolve_llm\` reports \`unknown_model\`, retry with a plausible value from the returned \`availableModels\` or ask via \`ask_questions\`. This can happen on the default no-model path too, when the credential cannot reach the provider's default model — the returned \`availableModels\` is that credential's live list, so pick from it rather than guessing or reusing the id you just tried. If it reports \`model_lookup_failed\` (the provider's model list could not be fetched, e.g. a transient error — possible even on the default no-model path), retry \`resolve_llm\`; do not guess a model.
23
+ 6. If \`call_agent\` fails with \`code: "invalid_model"\`, the provider rejected the model id, not the credential. Do not tell the user to check, revoke, or regenerate their API key. Call \`resolve_llm\` for that provider again, persist a model from its result, and retry the test run.
24
+ 7. If the model is still unresolved when the user asks to run or publish the agent, leave the draft with \`model: ""\`, do not guess a model, and tell the user the agent needs a model and credential first — in the panel or here in chat. If they dismiss a model-change question on an existing agent, keep the current model and credential unchanged.
24
25
 
25
26
  ### Rules
26
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"llm-selection.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/llm-selection.prompt.ts"],"names":[],"mappings":";;;AAAA,+BAAsC,2BAA0C;IAC/E,MAAM,sBAAsB,GAAG,2BAA2B;QACzD,CAAC,CAAC,OAAO,2BAA2B,EAAE;QACtC,CAAC,CAAC,8MAA8M,CAAC;IAElN,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iJAqDyI,sBAAsB,EAAE,CAAC;AAC1K,CAAC"}
1
+ {"version":3,"file":"llm-selection.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/llm-selection.prompt.ts"],"names":[],"mappings":";;;AAAA,+BAAsC,2BAA0C;IAC/E,MAAM,sBAAsB,GAAG,2BAA2B;QACzD,CAAC,CAAC,OAAO,2BAA2B,EAAE;QACtC,CAAC,CAAC,8MAA8M,CAAC;IAElN,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iJAsDyI,sBAAsB,EAAE,CAAC;AAC1K,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 MCP servers,\nworkflows, nodes, custom code tools, or provider tools.\n\n### Workflow\n\nUse this guidance before calling `resolve_integration`, `search_nodes`,\n`search_mcp_servers`, `get_node_types`, `build_custom_tool`, or adding,\nchanging, or removing entries in `tools[]` / `mcpServers` / `providerTools`.\n\nFor an external product, load `agent-builder-external-services` once and\nfollow it. It covers the chat-integration-versus-callable-tool decision, chat\nintegration setup, and MCP servers. Load `agent-builder-node-tools` before\nconfiguring a node tool.\n\n- Chat/trigger integration: call `list_integration_types`, then\n `configure_channel` with a returned type. Do not call `resolve_integration`\n for chat/trigger integrations.\n- Callable external service: the conversation or trigger happens elsewhere and\n the agent only operates on the product. For each requested non-chat callable\n service, call `resolve_integration` separately, using `queries` as\n alternative search terms for that one service. Do not infer MCP availability\n from memory.\n - `kind: \"mcp\"`: follow the skill's MCP Servers section \u2014 credential,\n verification, and config workflow.\n - `kind: \"node\"`: load `agent-builder-node-tools`, use the returned node\n results, and continue with `get_node_types`.\n\nUse `search_nodes` directly only when the user explicitly asks for an n8n node,\nwhen refining node results, or when a verified MCP server lacks the requested\ncapability. Use `search_mcp_servers` directly only when refining MCP results or\nwhen the user explicitly asks to browse the MCP registry.\n\nPreference order for non-chat callable services:\n1. MCP servers selected by `resolve_integration`\n2. Node tools returned by `resolve_integration`\n3. Workflow tools (`list_workflows`)\n4. Custom tools (`build_custom_tool`) \u2014 last resort\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\n#### Workflow Tools\n\n- Call `list_workflows`; reference supported workflows with `{ \"type\": \"workflow\", \"workflowId\": \"<id>\", \"workflow\": \"<name>\" }` using both values it returns.\n\n#### Node Tools\n\nLoad `agent-builder-node-tools` before adding, changing, or removing\nnode-backed tools, `nodeParameters`, `$fromAI` usage, or n8n expressions.\nFor an HTTP Request Tool, use only an exact URL explicitly supplied by the\nuser. If the user has not supplied one during an initial build, you MUST ask\nfor it through the trailing `finish_setup` call, then configure the tool with\nthe answer. On later turns, use `ask_questions` before mutating the config.\nNever infer or invent a URL.\n\n#### MCP Servers\n\nLoad `agent-builder-external-services` when the user explicitly requests a\ncustom MCP server, and follow its MCP Servers section.\n\n#### Custom Tools\n\nCustom tools are last resort and only for pure computation. Load\n`agent-builder-custom-tools` before calling `build_custom_tool`.\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- Generic web search must use `config.webSearch`; never add an HTTP Request\n Tool unless the user explicitly requests direct HTTP, API, or specific-page\n fetching.\n- Live crawling, fetching, and API integrations need MCP, workflow, or node tools, not custom tools.\n- Do not invent MCP servers, node type names, workflow names, credential ids, or provider tool keys.\n\n### Verify\n\n- Chat/trigger integrations bypassed `resolve_integration` and were set up\n through `configure_channel`.\n- Each non-chat callable service was resolved separately through\n `resolve_integration` unless the user explicitly requested an n8n node or\n custom MCP server.\n- Workflow tools reference discovered workflow IDs and names.\n- Provider tool keys match the configured model provider and the valid key list.";
1
+ export declare const TOOLS_PROMPT = "## Tool Guidance\n\n### Purpose\n\nUse this to give the target agent callable capabilities through MCP servers,\nworkflows, nodes, custom code tools, or provider tools.\n\n### Workflow\n\nUse this guidance before calling `resolve_integration`, `search_nodes`,\n`search_mcp_servers`, `get_node_types`, `build_custom_tool`, or adding,\nchanging, or removing entries in `tools[]` / `mcpServers` / `providerTools`.\n\nFor an external product, load `agent-builder-external-services` once and\nfollow it. It covers the chat-integration-versus-callable-tool decision, chat\nintegration setup, and MCP servers. Load `agent-builder-node-tools` before\nconfiguring a node tool.\n\n- Chat/trigger integration: call `list_integration_types`, then\n `configure_channel` with a returned type. Do not call `resolve_integration`\n for chat/trigger integrations.\n- A configured chat integration generates its own context and action tools for\n every top-level Agent run, including scheduled tasks. When its capabilities\n include the requested action, do not add a same-platform node, MCP, or\n workflow tool. A scheduled or proactive message with no inbound conversation\n is not, by itself, a reason to add another tool.\n- Callable external service: the conversation or trigger happens elsewhere and\n the agent only operates on the product. For each requested non-chat callable\n service, call `resolve_integration` separately, using `queries` as\n alternative search terms for that one service. Do not infer MCP availability\n from memory.\n - `kind: \"mcp\"`: follow the skill's MCP Servers section \u2014 credential,\n verification, and config workflow.\n - `kind: \"node\"`: load `agent-builder-node-tools`, use the returned node\n results, and continue with `get_node_types`.\n\nUse `search_nodes` directly only when the user explicitly asks for an n8n node,\nwhen refining node results, or when a verified MCP server lacks the requested\ncapability. Use `search_mcp_servers` directly only when refining MCP results or\nwhen the user explicitly asks to browse the MCP registry.\n\nPreference order for non-chat callable services:\n1. MCP servers selected by `resolve_integration`\n2. Node tools returned by `resolve_integration`\n3. Workflow tools (`list_workflows`)\n4. Custom tools (`build_custom_tool`) \u2014 last resort\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\n#### Workflow Tools\n\n- Call `list_workflows`; reference supported workflows with `{ \"type\": \"workflow\", \"workflowId\": \"<id>\", \"workflow\": \"<name>\" }` using both values it returns.\n\n#### Node Tools\n\nLoad `agent-builder-node-tools` before adding, changing, or removing\nnode-backed tools, `nodeParameters`, `$fromAI` usage, or n8n expressions.\nFor an HTTP Request Tool, use only an exact URL explicitly supplied by the\nuser. If the user has not supplied one during an initial build, you MUST ask\nfor it through the trailing `finish_setup` call, then configure the tool with\nthe answer. On later turns, use `ask_questions` before mutating the config.\nNever infer or invent a URL.\n\n#### MCP Servers\n\nLoad `agent-builder-external-services` when the user explicitly requests a\ncustom MCP server, and follow its MCP Servers section.\n\n#### Custom Tools\n\nCustom tools are last resort and only for pure computation. Load\n`agent-builder-custom-tools` before calling `build_custom_tool`.\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- Generic web search must use `config.webSearch`; never add an HTTP Request\n Tool unless the user explicitly requests direct HTTP, API, or specific-page\n fetching.\n- Live crawling, fetching, and API integrations need MCP, workflow, or node tools, not custom tools.\n- Do not invent MCP servers, node type names, workflow names, credential ids, or provider tool keys.\n- Do not duplicate an action already supplied by a configured chat integration.\n\n### Verify\n\n- Chat/trigger integrations bypassed `resolve_integration` and were set up\n through `configure_channel`.\n- Each non-chat callable service was resolved separately through\n `resolve_integration` unless the user explicitly requested an n8n node or\n custom MCP server.\n- Workflow tools reference discovered workflow IDs and names.\n- Provider tool keys match the configured model provider and the valid key list.";
@@ -23,6 +23,11 @@ configuring a node tool.
23
23
  - Chat/trigger integration: call \`list_integration_types\`, then
24
24
  \`configure_channel\` with a returned type. Do not call \`resolve_integration\`
25
25
  for chat/trigger integrations.
26
+ - A configured chat integration generates its own context and action tools for
27
+ every top-level Agent run, including scheduled tasks. When its capabilities
28
+ include the requested action, do not add a same-platform node, MCP, or
29
+ workflow tool. A scheduled or proactive message with no inbound conversation
30
+ is not, by itself, a reason to add another tool.
26
31
  - Callable external service: the conversation or trigger happens elsewhere and
27
32
  the agent only operates on the product. For each requested non-chat callable
28
33
  service, call \`resolve_integration\` separately, using \`queries\` as
@@ -84,6 +89,7 @@ Custom tools are last resort and only for pure computation. Load
84
89
  fetching.
85
90
  - Live crawling, fetching, and API integrations need MCP, workflow, or node tools, not custom tools.
86
91
  - Do not invent MCP servers, node type names, workflow names, credential ids, or provider tool keys.
92
+ - Do not duplicate an action already supplied by a configured chat integration.
87
93
 
88
94
  ### Verify
89
95
 
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFA4FqD,CAAC"}
1
+ {"version":3,"file":"tools.prompt.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/prompts/tools.prompt.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iFAkGqD,CAAC"}
@@ -31,6 +31,7 @@ function externalServicesSkill() {
31
31
  'read_config',
32
32
  'patch_config',
33
33
  'write_config',
34
+ 'report_required_artifact',
34
35
  'load_skill',
35
36
  ],
36
37
  instructions: `\
@@ -47,15 +48,28 @@ Use an integration when the product is the agent's conversation or trigger
47
48
  surface: humans will mention, message, comment to, or resume the agent there,
48
49
  or the agent needs to respond in that same platform conversation context.
49
50
 
51
+ Native Agent chat integrations are bidirectional within their conversation
52
+ context. The integration both receives the triggering message and delivers the
53
+ Agent's replies. Do not add a same-platform node, MCP, or workflow tool merely
54
+ so the Agent can reply, send a normal conversational message, or use interaction
55
+ features already listed in that integration's capabilities.
56
+
57
+ Configured integrations also generate their listed context and action tools for
58
+ every top-level Agent run, including scheduled tasks. A scheduled task can use
59
+ actions such as \`send_dm\` or \`send_channel_message\` without an inbound
60
+ message. Being proactive, scheduled, or outside an open conversation is never
61
+ by itself a reason to add a same-platform node, MCP, or workflow tool.
62
+
50
63
  Use an MCP, node, or workflow tool when the product is only something the agent
51
64
  operates on: searching records, creating tickets, updating objects, or sending a
52
65
  business-process notification while the conversation happens elsewhere.
53
66
 
54
- When building an agent that should interact with Slack, Discord, or Telegram,
55
- prefer the matching chat integration over an MCP, node, or workflow tool, even
56
- when a callable tool could perform the same messaging action. Use a callable
57
- tool instead only when the user explicitly asks for one or the requested
58
- operation is not supported by the chat integration.
67
+ When building an agent that should interact with Slack, Discord, Telegram, or
68
+ Linear, use the matching chat integration instead of an MCP, node, or workflow
69
+ tool when the platform is the conversation surface. Add a callable tool only
70
+ for an explicitly requested operation that is absent from the selected
71
+ integration's returned capabilities. Compare the exact operation; do not infer
72
+ that the integration is unavailable merely because the run starts from a task.
59
73
 
60
74
  Examples:
61
75
 
@@ -65,7 +79,8 @@ Examples:
65
79
  - Discord integration: the agent should be mentioned or messaged in Discord,
66
80
  respond in Discord threads or DMs, or render approval buttons there.
67
81
  - Telegram integration: the agent should receive or send Telegram messages,
68
- continue conversations there, or render supported interactive messages.
82
+ continue conversations there, render supported interactive messages, or use
83
+ \`send_dm\` to initiate a scheduled message to a known Telegram user ID.
69
84
  - Linear integration: the agent should be triggered from Linear issues/comments,
70
85
  understand the current Linear subject, or reply in the same Linear
71
86
  conversation.
@@ -73,10 +88,35 @@ Examples:
73
88
  workflow and only needs to search/create/update Linear tickets via MCP or node
74
89
  tools.
75
90
 
91
+ If \`list_integration_types\` does not return the requested conversation
92
+ platform, do not substitute a platform messaging node as an Agent tool. The
93
+ Agent needs an external channel-bridge workflow instead:
94
+
95
+ 1. Finish the Agent without a native integration for that platform.
96
+ 2. When \`report_required_artifact\` is available, call it once with an
97
+ \`artifact\` whose \`type\` is \`"workflow"\` and \`relationship\` is
98
+ \`"agent-entrypoint"\`. Require the
99
+ platform trigger, Message an Agent using the incoming message and a stable
100
+ platform conversation/sender identifier as its custom session key, and the
101
+ platform send action using the Agent's text response.
102
+ 3. The bridge invokes the Agent. Never add it to the Agent's \`tools\` array and
103
+ never report it as \`relationship: "agent-tool"\`.
104
+ 4. If the reporting tool is unavailable, state the same workflow requirement
105
+ clearly in the final reply so the calling surface can create it.
106
+
76
107
  For callable (non-chat) services, call \`resolve_integration\` separately per
77
108
  service and follow the returned \`kind\`: \`"mcp"\` -> MCP Servers section
78
109
  below, \`"node"\` -> load \`agent-builder-node-tools\`.
79
110
 
111
+ ### Correcting a redundant channel tool
112
+
113
+ If the user questions why a same-platform tool exists, inspect the current
114
+ config and the integration's returned capabilities before answering. When the
115
+ integration supplies the tool's purpose, remove the redundant node, MCP, or
116
+ workflow tool and explain the correction. Do not defend it merely because the
117
+ message is proactive, scheduled, or has no current conversation; generated
118
+ actions such as \`send_dm\` are available without inbound message context.
119
+
80
120
  ## Chat Integrations
81
121
 
82
122
  The \`integrations\` array controls how the target agent is triggered.
@@ -118,8 +158,9 @@ The \`integrations\` array controls how the target agent is triggered.
118
158
  - Do not add a chat integration just because the agent needs CRUD or notifications
119
159
  for that product. Resolve the callable capability through \`resolve_integration\`
120
160
  unless the product itself is the chat/trigger context.
121
- - For recurring or scheduled runs, create a task (\`create_tasks\`), not an
122
- integration.
161
+ - For recurring or scheduled runs, create a task (\`create_tasks\`) for the
162
+ cadence. Keep a requested chat integration, and use its generated action
163
+ tools when the task sends through that same platform.
123
164
  - Omitting \`integrations\` from a config write preserves the current channels.
124
165
  To remove one, write an explicit filtered array or remove the exact array
125
166
  entry.
@@ -294,6 +335,8 @@ Auth, or None) via \`${api_types_1.ASK_QUESTIONS_TOOL_NAME}\`. Then map to:
294
335
  - The chosen integration matches \`useIntegrationWhen\`; otherwise resolve the
295
336
  callable capability through \`resolve_integration\` and use MCP, node, or
296
337
  workflow tools.
338
+ - No node, MCP, or workflow tool duplicates an action listed by a configured
339
+ chat integration, including for proactive scheduled tasks.
297
340
  - Generic non-chat external services were routed through \`resolve_integration\`
298
341
  before MCP or node setup.
299
342
  - The final \`integrations\` array keeps unrelated integrations intact and
@@ -1 +1 @@
1
- {"version":3,"file":"external-services.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/external-services.skill.ts"],"names":[],"mappings":";;;AACA,8CAAgF;AAEhF,2DAAqD;AAErD,qFAAmF;AACnF,0EAAqE;AAErE,MAAM,mBAAmB,GAAG,IAAA,gDAAuB,EAClD,IAAA,oCAAe,EAAC,iCAAqB,CAAgB,CACrD,CAAC;AAEF;IACC,OAAO;QACN,EAAE,EAAE,iCAAiC;QACrC,IAAI,EAAE,iCAAiC;QACvC,WAAW,EACV,kQAAkQ;QACnQ,gBAAgB,EAAE;YACjB,qBAAqB;YACrB,wBAAwB;YACxB,mBAAmB;YACnB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,cAAc;SACd;QACD,YAAY,EAAE;YACb,qBAAqB;YACrB,wBAAwB;YACxB,mBAAmB;YACnB,oBAAoB;YACpB,gBAAgB;YAChB,mBAAmB;YACnB,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,YAAY;SACZ;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0DZ,yCAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuDhB,mCAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgC3B,yCAAkB;;;;;;;;;;;;;;;;;;EAkBlB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAiEE,mCAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAoCA;KAC5C,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"external-services.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/external-services.skill.ts"],"names":[],"mappings":";;;AACA,8CAAgF;AAEhF,2DAAqD;AAErD,qFAAmF;AACnF,0EAAqE;AAErE,MAAM,mBAAmB,GAAG,IAAA,gDAAuB,EAClD,IAAA,oCAAe,EAAC,iCAAqB,CAAgB,CACrD,CAAC;AAEF;IACC,OAAO;QACN,EAAE,EAAE,iCAAiC;QACrC,IAAI,EAAE,iCAAiC;QACvC,WAAW,EACV,kQAAkQ;QACnQ,gBAAgB,EAAE;YACjB,qBAAqB;YACrB,wBAAwB;YACxB,mBAAmB;YACnB,gBAAgB;YAChB,mBAAmB;YACnB,aAAa;YACb,cAAc;SACd;QACD,YAAY,EAAE;YACb,qBAAqB;YACrB,wBAAwB;YACxB,mBAAmB;YACnB,oBAAoB;YACpB,gBAAgB;YAChB,mBAAmB;YACnB,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,0BAA0B;YAC1B,YAAY;SACZ;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAiGZ,yCAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAwDhB,mCAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgC3B,yCAAkB;;;;;;;;;;;;;;;;;;EAkBlB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAiEE,mCAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8CAsCA;KAC5C,CAAC;AACH,CAAC"}
@@ -80,10 +80,10 @@ conventions. Never add an incomplete tool or use a placeholder URL.
80
80
  - Never write literal \`"$fromAI"\` or bare \`$fromAI\`; the node will treat it as the actual value.
81
81
  - Do not pipe AI-chosen fields through \`$json\`.
82
82
  - Do not include \`inputSchema\` or \`toolDescription\` for node tools.
83
- - n8n Connect (\`n8n credits\`) covers many services, including some community nodes. Adding a node tool with its credential slot omitted triggers server-side assignment: for a covered service the server attaches the managed \`n8n credits\` credential (\`{ id: null, name: "n8n credits", __aiGatewayManaged: true }\`) to each required, eligible slot on write — but only when the project has no credential of that type; an existing credential of the type wins and the slot stays empty for the normal credential flow below. Add the tool with the credential slot omitted, then \`read_config\`.
84
- - Exception — when the user explicitly asks to run a tool on n8n credits, write \`{ "id": null, "name": "n8n credits", "__aiGatewayManaged": true }\` into that credential slot yourself: the server keeps it when the service is covered (even if the user has their own credential of the type) and removes it when not covered — check \`read_config\` after the write and resolve a real credential if it was removed.
85
- - The \`n8n credits\` managed credential IS the real, working credential — the tool executes through n8n's gateway on n8n credits, so NO separate API key is needed. It is NOT a placeholder and NOT "invalid for the service", even for a community node. For a slot \`read_config\` shows populated with it: the slot is fully connected and the tool WILL run. Do NOT call \`ask_credential\` for it; do NOT include it in \`finish_setup\`; NEVER clear, remove, or replace it via \`patch_config\`; and NEVER seek a "real" API key to swap in for it. Report the tool as ready, running on n8n credits — exactly like a managed model. Never tell the user the credential is "not connected"/"not set up" or that the tool "won't run until a credential is added".
86
- - Only for a required slot that \`read_config\` shows still empty after the write (a service n8n Connect does not cover) do you resolve a real credential: call \`ask_credential\` once before the config mutation for an addition to an existing agent. ${initial_build_prompt_1.INITIAL_BUILD_NOTE} After the trailing \`finish_setup\` resolves the credential, copy the returned credentials into \`node.credentials\` via \`patch_config\`; for resource-locator resolution follow \`agent-builder-resource-locators\` then. 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.
83
+ - Gateway credits cover many services, including some community nodes. Adding a node tool with its credential slot omitted triggers server-side assignment: for a covered service the server attaches the managed \`Gateway credits\` credential (\`{ id: null, name: "Gateway credits", __aiGatewayManaged: true }\`) to each required, eligible slot on write — but only when the project has no credential of that type; an existing credential of the type wins and the slot stays empty for the normal credential flow below. Add the tool with the credential slot omitted, then \`read_config\`.
84
+ - Exception — when the user explicitly asks to run a tool on Gateway credits, write \`{ "id": null, "name": "Gateway credits", "__aiGatewayManaged": true }\` into that credential slot yourself: the server keeps it when the service is covered (even if the user has their own credential of the type) and removes it when not covered — check \`read_config\` after the write and resolve a real credential if it was removed.
85
+ - The \`Gateway credits\` managed credential IS the real, working credential — the tool executes through n8n's gateway on Gateway credits, so NO separate API key is needed. It is NOT a placeholder and NOT "invalid for the service", even for a community node. For a slot \`read_config\` shows populated with it: the slot is fully connected and the tool WILL run. Do NOT call \`ask_credential\` for it; do NOT include it in \`finish_setup\`; NEVER clear, remove, or replace it via \`patch_config\`; and NEVER seek a "real" API key to swap in for it. Report the tool as ready, running on Gateway credits — exactly like a managed model. Never tell the user the credential is "not connected"/"not set up" or that the tool "won't run until a credential is added".
86
+ - Only for a required slot that \`read_config\` shows still empty after the write (a service Gateway credits do not cover) do you resolve a real credential: call \`ask_credential\` once before the config mutation for an addition to an existing agent. ${initial_build_prompt_1.INITIAL_BUILD_NOTE} After the trailing \`finish_setup\` resolves the credential, copy the returned credentials into \`node.credentials\` via \`patch_config\`; for resource-locator resolution follow \`agent-builder-resource-locators\` then. 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.
87
87
  - When the agent already has a chat channel configured and the tool needs the same
88
88
  credential type, \`ask_credential\` reuses the channel's credential automatically —
89
89
  do not ask the user to pick a different one.
@@ -1 +1 @@
1
- {"version":3,"file":"node-tools.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/node-tools.skill.ts"],"names":[],"mappings":";;;AACA,8CAAyD;AAEzD,0EAAqE;AAErE;IACC,OAAO;QACN,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,kOAAkO;QACnO,gBAAgB,EAAE;YACjB,qBAAqB;YACrB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,cAAc;SACd;QACD,YAAY,EAAE;YACb,qBAAqB;YACrB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,8BAA8B;YAC9B,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,YAAY;SACZ;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;gBAwBA,mCAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2PA+BoN,yCAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DA2ClN;KACzD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"node-tools.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/node-tools.skill.ts"],"names":[],"mappings":";;;AACA,8CAAyD;AAEzD,0EAAqE;AAErE;IACC,OAAO;QACN,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,kOAAkO;QACnO,gBAAgB,EAAE;YACjB,qBAAqB;YACrB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,aAAa;YACb,cAAc;SACd;QACD,YAAY,EAAE;YACb,qBAAqB;YACrB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,8BAA8B;YAC9B,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,YAAY;SACZ;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;gBAwBA,mCAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6PA+BsN,yCAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2DA2CpN;KACzD,CAAC;AACH,CAAC"}
@@ -6,7 +6,7 @@ function subAgentsSkill() {
6
6
  return {
7
7
  id: 'agent-builder-sub-agents',
8
8
  name: 'Agent Builder Sub-Agents',
9
- description: 'Use when configuring inline or saved sub-agent delegation for the target agent, selecting published same-project sub-agents, or changing subAgents.maxChildren.',
9
+ description: 'Use when configuring inline or saved sub-agent delegation for the target agent, selecting same-project sub-agents, or changing subAgents.maxChildren.',
10
10
  recommendedTools: ['list_sub_agents', 'ask_questions', 'read_config', 'patch_config'],
11
11
  allowedTools: [
12
12
  'list_sub_agents',
@@ -30,9 +30,8 @@ The target agent can call \`delegate_subagent\` with \`subAgentId: "inline"\`
30
30
  without any saved-agent refs. Inline subagents are ad-hoc child agents for
31
31
  one-off focused tasks.
32
32
 
33
- \`subAgents.agents\` is only for optional saved/published n8n Agent specialists
34
- that the target agent may select by id when they are a better fit than an inline
35
- subagent.
33
+ \`subAgents.agents\` is only for optional saved n8n Agent specialists that the
34
+ target agent may select by id when they are a better fit than an inline subagent.
36
35
 
37
36
  ## When to configure
38
37
 
@@ -43,19 +42,19 @@ subagent.
43
42
  delegated tasks in a run. It is not the same as \`config.toolCallConcurrency\`.
44
43
  - Do not create fields such as \`subAgents.maxConcurrentDelegations\`,
45
44
  \`delegationConcurrency\`, or \`delegateConcurrency\`.
46
- - Add saved subagent refs only when the user asks to use specific published
47
- agents, reusable specialists, named helper agents, or saved-agent delegation.
45
+ - Add saved subagent refs only when the user asks to use specific agents,
46
+ reusable specialists, named helper agents, or saved-agent delegation.
48
47
 
49
48
  ## Saved sub-agent workflow
50
49
 
51
- 1. Call \`list_sub_agents\` to discover published same-project agents that can be
52
- added. Do not write agent ids from memory, prose, or user-entered free text.
53
- 2. If published agents are available and the user has not named exact agents,
50
+ 1. Call \`list_sub_agents\` to discover same-project agents that can be added.
51
+ Do not write agent ids from memory, prose, or user-entered free text.
52
+ 2. If agents are available and the user has not named exact agents,
54
53
  call \`ask_questions\` with one \`type: "multi"\` question whose \`options\`
55
54
  are the returned agent names. Map each selected option back to the
56
55
  matching \`agentId\` from the \`list_sub_agents\` result.
57
- 3. If no published agents are available, do not configure saved subagents.
58
- Inline delegation still works without saved-agent refs.
56
+ 3. If no agents are available, do not configure saved subagents. Inline
57
+ delegation still works without saved-agent refs.
59
58
  4. Determine the parent-owned routing guidance for each selected saved
60
59
  subagent. Store it as \`useWhen\`, for example
61
60
  \`{ "agentId": "<returned-agent-id>", "useWhen": "Use for billing-policy questions and invoice investigations." }\`.
@@ -80,6 +79,10 @@ Example patch flow:
80
79
 
81
80
  ## Rules
82
81
 
82
+ - Saved subagents run their current draft in Preview/test runs and their
83
+ published version in production runs. Delegating to a never-published agent
84
+ fails in production, so tell the user to publish saved subagents the target
85
+ agent relies on before production use.
83
86
  - If the resumed values include text that is not one of the listed agent ids,
84
87
  do not persist it as an agent id; ask a follow-up.
85
88
  - \`useWhen\` is relationship-specific routing guidance owned by this parent
@@ -121,7 +124,7 @@ Example shape:
121
124
  ## Verify
122
125
 
123
126
  - Inline delegation still works even when \`subAgents.agents\` is absent.
124
- - Saved refs use only returned same-project published agent ids.
127
+ - Saved refs use only returned same-project agent ids.
125
128
  - New or updated saved refs include concrete \`useWhen\` guidance.
126
129
  - Any \`subAgents.maxChildren\` value stays within ${api_types_1.SUB_AGENT_MAX_CHILDREN_MIN} to ${api_types_1.SUB_AGENT_MAX_CHILDREN_MAX}.`,
127
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sub-agents.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/sub-agents.skill.ts"],"names":[],"mappings":";;;AACA,8CAIwB;AAExB;IACC,OAAO;QACN,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,iKAAiK;QAClK,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;QACrF,YAAY,EAAE;YACb,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;SACd;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;sDAuBsC,sCAA0B,OAAO,sCAA0B,gCAAgC,0CAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAqF1H,sCAA0B,OAAO,sCAA0B,GAAG;KACjH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"sub-agents.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/sub-agents.skill.ts"],"names":[],"mappings":";;;AACA,8CAIwB;AAExB;IACC,OAAO;QACN,EAAE,EAAE,0BAA0B;QAC9B,IAAI,EAAE,0BAA0B;QAChC,WAAW,EACV,uJAAuJ;QACxJ,gBAAgB,EAAE,CAAC,iBAAiB,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,CAAC;QACrF,YAAY,EAAE;YACb,iBAAiB;YACjB,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;SACd;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;sDAsBsC,sCAA0B,OAAO,sCAA0B,gCAAgC,0CAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qDAyF1H,sCAA0B,OAAO,sCAA0B,GAAG;KACjH,CAAC;AACH,CAAC"}
@@ -88,9 +88,13 @@ Initial Build rules in your system prompt. Never create a placeholder or
88
88
  - For each new or replacement objective, fill every template section with
89
89
  run-specific details. Do not duplicate Agent Instructions or Skill bodies;
90
90
  name a configured capability only when it helps route the work.
91
- - Make sure the agent already has every tool the steps need (an integration,
92
- node/workflow tool, or web search). If something is missing, add it to the agent
93
- config first — a task can only use tools the agent already has.
91
+ - Make sure the agent already has every capability the steps need (an
92
+ integration, node/workflow tool, or web search). Configured chat integrations
93
+ automatically generate their context and action tools in scheduled runs too.
94
+ If the task sends through a configured platform and the integration lists the
95
+ needed action (for example \`send_dm\`), use that action; do not add a
96
+ same-platform node, MCP, or workflow tool. Add a tool only when the exact
97
+ operation is not supplied by an existing integration.
94
98
  - Translate each cadence into a valid 5-field cron expression (e.g. daily 09:00
95
99
  -> "0 9 * * *"; weekdays 08:30 -> "30 8 * * 1-5"; hourly -> "0 * * * *").
96
100
  Keep this cadence out of the objective; only a data lookback window belongs
@@ -125,8 +129,15 @@ Initial Build rules in your system prompt. Never create a placeholder or
125
129
  - To disable or remove a task, edit \`config.tasks\` with \`patch_config\` (set
126
130
  \`enabled: false\`, or drop the ref). Changes take effect on the next
127
131
  \`publish_agent\`.
128
- - \`create_tasks\` does NOT add tools — if a task needs a tool the agent lacks,
129
- add it to the config yourself first.
132
+ - \`create_tasks\` does not add config tools. This does not mean a scheduled
133
+ message needs a messaging node: configured integrations supply their generated
134
+ action tools at runtime even when the task has no inbound conversation.
135
+ - A proactive or scheduled send through a connected chat platform is not a
136
+ separate backend integration. Use the channel's \`send_dm\` or
137
+ \`send_channel_message\` action when available.
138
+ - Never claim that a task requires a same-platform messaging node solely because
139
+ it starts without an inbound conversation. If such a redundant tool already
140
+ exists and the integration covers its action, remove it.
130
141
  - Do not call \`create_tasks\` once per task when several are ready; batch them
131
142
  into one call so the whole set is stored in a single round trip.`,
132
143
  };
@@ -1 +1 @@
1
- {"version":3,"file":"target-tasks.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/target-tasks.skill.ts"],"names":[],"mappings":";;;AAEA,wEAAiG;AAEjG;IACC,OAAO;QACN,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACV,kMAAkM;QACnM,gBAAgB,EAAE;YACjB,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,eAAe;SACf;QACD,YAAY,EAAE;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,gBAAgB;YAChB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,eAAe;SACf;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;EAyBd,oDAA0B;;EAE1B,iDAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAuE0C;KACjE,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"target-tasks.skill.js","sourceRoot":"","sources":["../../../../../src/modules/agents/builder/skills/target-tasks.skill.ts"],"names":[],"mappings":";;;AAEA,wEAAiG;AAEjG;IACC,OAAO;QACN,EAAE,EAAE,4BAA4B;QAChC,IAAI,EAAE,4BAA4B;QAClC,WAAW,EACV,kMAAkM;QACnM,gBAAgB,EAAE;YACjB,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,eAAe;SACf;QACD,YAAY,EAAE;YACb,cAAc;YACd,YAAY;YACZ,aAAa;YACb,eAAe;YACf,aAAa;YACb,cAAc;YACd,cAAc;YACd,gBAAgB;YAChB,cAAc;YACd,gBAAgB;YAChB,gBAAgB;YAChB,eAAe;SACf;QACD,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;EAyBd,oDAA0B;;EAE1B,iDAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAkF0C;KACjE,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { WithTimestamps } from '@n8n/db';
2
+ import { type Relation } from '@n8n/typeorm';
3
+ import { Agent } from './agent.entity';
4
+ export type AgentChannelStatusValue = 'connected' | 'error';
5
+ export declare class AgentChannelStatus extends WithTimestamps {
6
+ agentId: string;
7
+ agent: Relation<Agent>;
8
+ integrationType: string;
9
+ credentialId: string;
10
+ hostId: string;
11
+ status: AgentChannelStatusValue;
12
+ errorMessage: string | null;
13
+ attempts: number;
14
+ backoffUntil: Date | null;
15
+ expiresAt: Date | null;
16
+ }
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.AgentChannelStatus = void 0;
13
+ const db_1 = require("@n8n/db");
14
+ const typeorm_1 = require("@n8n/typeorm");
15
+ const agent_entity_1 = require("./agent.entity");
16
+ let AgentChannelStatus = class AgentChannelStatus extends db_1.WithTimestamps {
17
+ };
18
+ exports.AgentChannelStatus = AgentChannelStatus;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryColumn)({
21
+ type: 'varchar',
22
+ length: 36,
23
+ comment: 'Agent that owns this channel',
24
+ }),
25
+ __metadata("design:type", String)
26
+ ], AgentChannelStatus.prototype, "agentId", void 0);
27
+ __decorate([
28
+ (0, typeorm_1.ManyToOne)(() => agent_entity_1.Agent, { onDelete: 'CASCADE' }),
29
+ (0, typeorm_1.JoinColumn)({ name: 'agentId' }),
30
+ __metadata("design:type", Object)
31
+ ], AgentChannelStatus.prototype, "agent", void 0);
32
+ __decorate([
33
+ (0, typeorm_1.PrimaryColumn)({
34
+ type: 'varchar',
35
+ length: 64,
36
+ comment: 'Chat integration platform for this channel',
37
+ }),
38
+ __metadata("design:type", String)
39
+ ], AgentChannelStatus.prototype, "integrationType", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.PrimaryColumn)({
42
+ type: 'varchar',
43
+ length: 36,
44
+ comment: 'Credential connection that backs this channel; no FK so a failure is still recordable after the credential is deleted',
45
+ }),
46
+ __metadata("design:type", String)
47
+ ], AgentChannelStatus.prototype, "credentialId", void 0);
48
+ __decorate([
49
+ (0, typeorm_1.Index)(),
50
+ (0, typeorm_1.PrimaryColumn)({
51
+ type: 'varchar',
52
+ length: 128,
53
+ comment: 'Process that observed this; the only writer of this row',
54
+ }),
55
+ __metadata("design:type", String)
56
+ ], AgentChannelStatus.prototype, "hostId", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({
59
+ type: 'varchar',
60
+ length: 16,
61
+ comment: 'What this process last observed: connected or error',
62
+ }),
63
+ __metadata("design:type", String)
64
+ ], AgentChannelStatus.prototype, "status", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.Column)({
67
+ type: 'text',
68
+ nullable: true,
69
+ comment: 'Why this process could not start the channel; null once it succeeds',
70
+ }),
71
+ __metadata("design:type", Object)
72
+ ], AgentChannelStatus.prototype, "errorMessage", void 0);
73
+ __decorate([
74
+ (0, typeorm_1.Column)({
75
+ type: 'int',
76
+ default: 0,
77
+ comment: 'Consecutive failed startup attempts by this process, reset on success',
78
+ }),
79
+ __metadata("design:type", Number)
80
+ ], AgentChannelStatus.prototype, "attempts", void 0);
81
+ __decorate([
82
+ (0, db_1.DateTimeColumn)({
83
+ nullable: true,
84
+ comment: 'Earliest this process should retry; null when there is nothing to retry',
85
+ }),
86
+ __metadata("design:type", Object)
87
+ ], AgentChannelStatus.prototype, "backoffUntil", void 0);
88
+ __decorate([
89
+ (0, typeorm_1.Index)(),
90
+ (0, db_1.DateTimeColumn)({
91
+ nullable: true,
92
+ comment: 'When this row stops counting unless its owner refreshes it; null never expires',
93
+ }),
94
+ __metadata("design:type", Object)
95
+ ], AgentChannelStatus.prototype, "expiresAt", void 0);
96
+ exports.AgentChannelStatus = AgentChannelStatus = __decorate([
97
+ (0, typeorm_1.Entity)({ name: 'agent_channel_status' })
98
+ ], AgentChannelStatus);
99
+ //# sourceMappingURL=agent-channel-status.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-channel-status.entity.js","sourceRoot":"","sources":["../../../../src/modules/agents/entities/agent-channel-status.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gCAAyD;AACzD,0CAQsB;AAEtB,iDAAuC;AAwBhC,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,mBAAc;CAiFrD,CAAA;;AA3EA;IALC,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,8BAA8B;KACvC,CAAC;;mDACc;AAIhB;IAFC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAC;IAC/C,IAAA,oBAAU,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;;iDACT;AAOvB;IALC,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,4CAA4C;KACrD,CAAC;;2DACsB;AAQxB;IANC,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EACN,uHAAuH;KACxH,CAAC;;wDACmB;AASrB;IANC,IAAA,eAAK,GAAE;IACP,IAAA,uBAAa,EAAC;QACd,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,GAAG;QACX,OAAO,EAAE,yDAAyD;KAClE,CAAC;;kDACa;AAOf;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,qDAAqD;KAC9D,CAAC;;kDAC8B;AAOhC;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,qEAAqE;KAC9E,CAAC;;wDAC0B;AAO5B;IALC,IAAA,gBAAM,EAAC;QACP,IAAI,EAAE,KAAK;QACX,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,uEAAuE;KAChF,CAAC;;oDACe;AAUjB;IAJC,IAAA,mBAAc,EAAC;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,yEAAyE;KAClF,CAAC;;wDACwB;AAe1B;IALC,IAAA,eAAK,GAAE;IACP,IAAA,mBAAc,EAAC;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE,gFAAgF;KACzF,CAAC;;qDACqB;6BAhFX,kBAAkB;IAD9B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,sBAAsB,EAAE,CAAC;GAC5B,kBAAkB,CAiF9B"}
@@ -1,13 +1,13 @@
1
1
  import type { CredentialProvider } from '@n8n/agents';
2
2
  import type { User } from '@n8n/db';
3
- import type { InstanceAiBuilderDelegate } from '@n8n/instance-ai';
3
+ import { type InstanceAiBuilderDelegate, type InstanceAiCredentialService } from '@n8n/instance-ai';
4
4
  import { AgentConfigService } from './agent-config.service';
5
5
  import { AgentSkillsService } from './agent-skills.service';
6
6
  import { AgentsService } from './agents.service';
7
7
  import { AgentsBuilderService } from './builder/agents-builder.service';
8
8
  import { N8nMemory } from './integrations/n8n-memory';
9
9
  import { AgentThreadRepository } from './repositories/agent-thread.repository';
10
- export declare const INSTANCE_AI_BUILDER_ADDENDUM = "## Instance AI session rules\n\nYou are running as a sub-agent inside n8n's instance AI chat; the user sees your questions as chat cards.\n\nPreview links work in this chat. Include a markdown Preview link after a successful build and when `call_agent` reports an unsupported interaction as `approval_required`, using the exact relative path from \"When To Build vs When To Converse\" (form: `[Preview](<path>)`). Do not invent absolute URLs. Do not omit the link and describe the path in plain text instead.\n\nYou can publish and unpublish the target agent with `publish_agent` and `unpublish_agent`. Never tell the user to open the agent editor and click Publish.\n\nThe Instance AI orchestrator can create workflows and data tables \u2014 never ask the user to create them manually. State missing prerequisites in your reply; the orchestrator will provision them and call you again.";
10
+ export declare const INSTANCE_AI_BUILDER_ADDENDUM = "## Instance AI session rules\n\nYou are running as a sub-agent inside n8n's instance AI chat; the user sees your questions as chat cards.\n\nPreview links work in this chat. Include a markdown Preview link after a successful build and when `call_agent` reports an unsupported interaction as `approval_required`, using the exact relative path from \"When To Build vs When To Converse\" (form: `[Preview](<path>)`). Do not invent absolute URLs. Do not omit the link and describe the path in plain text instead.\n\nYou can publish and unpublish the target agent with `publish_agent` and `unpublish_agent`. Never tell the user to open the agent editor and click Publish.\n\nThe Instance AI orchestrator can create workflows and data tables \u2014 never ask the user to create them manually. For each missing artifact, call `report_required_artifact` with its concrete requirements before your final reply; the orchestrator will provision them and call you again when the Agent needs the result.\n\nSome requested chat platforms do not have a native Agent integration. In that case, finish the Agent without adding same-platform messaging nodes as Agent tools, then report an `agent-entrypoint` workflow. It must use the platform trigger, pass the incoming message and a stable conversation identifier into Message an Agent with a custom session key, then send the Agent's text response back through the platform. This workflow invokes the Agent and must never be attached to the Agent as a workflow tool.";
11
11
  export declare class InstanceAiBuilderDelegateAdapterService {
12
12
  private readonly agentsService;
13
13
  private readonly agentsBuilderService;
@@ -17,6 +17,6 @@ export declare class InstanceAiBuilderDelegateAdapterService {
17
17
  private readonly agentSkills;
18
18
  constructor(agentsService: AgentsService, agentsBuilderService: AgentsBuilderService, n8nMemory: N8nMemory, agentThreadRepository: AgentThreadRepository, agentConfig: AgentConfigService, agentSkills: AgentSkillsService);
19
19
  private buildSubAgentSession;
20
- createDelegate(user: User, projectId: string, credentialProvider: CredentialProvider): InstanceAiBuilderDelegate;
20
+ createDelegate(user: User, projectId: string, credentialProvider: CredentialProvider, credentialService: InstanceAiCredentialService): InstanceAiBuilderDelegate;
21
21
  deleteBuilderSessions(instanceAiThreadId: string): Promise<void>;
22
22
  }
@@ -31,15 +31,21 @@ Preview links work in this chat. Include a markdown Preview link after a success
31
31
 
32
32
  You can publish and unpublish the target agent with \`publish_agent\` and \`unpublish_agent\`. Never tell the user to open the agent editor and click Publish.
33
33
 
34
- The Instance AI orchestrator can create workflows and data tables — never ask the user to create them manually. State missing prerequisites in your reply; the orchestrator will provision them and call you again.`;
34
+ The Instance AI orchestrator can create workflows and data tables — never ask the user to create them manually. For each missing artifact, call \`report_required_artifact\` with its concrete requirements before your final reply; the orchestrator will provision them and call you again when the Agent needs the result.
35
+
36
+ Some requested chat platforms do not have a native Agent integration. In that case, finish the Agent without adding same-platform messaging nodes as Agent tools, then report an \`agent-entrypoint\` workflow. It must use the platform trigger, pass the incoming message and a stable conversation identifier into Message an Agent with a custom session key, then send the Agent's text response back through the platform. This workflow invokes the Agent and must never be attached to the Agent as a workflow tool.`;
35
37
  function isTextDeltaChunk(chunk) {
36
38
  return chunk.type === 'text-delta';
37
39
  }
38
- function toBuilderTurnStream(chunks) {
40
+ function toBuilderTurnStream(chunks, requiredArtifacts) {
39
41
  let resolveText;
40
42
  const text = new Promise((resolve) => {
41
43
  resolveText = resolve;
42
44
  });
45
+ let resolveRequiredArtifacts;
46
+ const requiredArtifactsPromise = new Promise((resolve) => {
47
+ resolveRequiredArtifacts = resolve;
48
+ });
43
49
  let acc = '';
44
50
  async function* pump() {
45
51
  try {
@@ -51,9 +57,10 @@ function toBuilderTurnStream(chunks) {
51
57
  }
52
58
  finally {
53
59
  resolveText(acc);
60
+ resolveRequiredArtifacts([...requiredArtifacts]);
54
61
  }
55
62
  }
56
- return { fullStream: pump(), text };
63
+ return { fullStream: pump(), text, requiredArtifacts: requiredArtifactsPromise };
57
64
  }
58
65
  let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAdapterService {
59
66
  constructor(agentsService, agentsBuilderService, n8nMemory, agentThreadRepository, agentConfig, agentSkills) {
@@ -64,7 +71,7 @@ let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAda
64
71
  this.agentConfig = agentConfig;
65
72
  this.agentSkills = agentSkills;
66
73
  }
67
- buildSubAgentSession(session) {
74
+ buildSubAgentSession(session, onRequiredArtifact) {
68
75
  return {
69
76
  threadId: session.threadId,
70
77
  hostThreadId: session.hostThreadId,
@@ -75,9 +82,10 @@ let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAda
75
82
  ...(session.memoryTaskObserver ? { memoryTaskObserver: session.memoryTaskObserver } : {}),
76
83
  abortSignal: session.abortSignal,
77
84
  ...(session.mcpTools ? { mcpTools: session.mcpTools } : {}),
85
+ onRequiredArtifact,
78
86
  };
79
87
  }
80
- createDelegate(user, projectId, credentialProvider) {
88
+ createDelegate(user, projectId, credentialProvider, credentialService) {
81
89
  const assertProjectScope = async (scope) => {
82
90
  if (!(await (0, check_access_1.userHasScopes)(user, [scope], false, { projectId }))) {
83
91
  throw new forbidden_error_1.ForbiddenError('You do not have permission to access agents in this project.');
@@ -94,11 +102,13 @@ let InstanceAiBuilderDelegateAdapterService = class InstanceAiBuilderDelegateAda
94
102
  },
95
103
  streamBuild: async (agentId, message, session) => {
96
104
  await assertProjectScope('agent:update');
97
- return toBuilderTurnStream(this.agentsBuilderService.buildAgent(agentId, projectId, message, credentialProvider, user, this.buildSubAgentSession(session)));
105
+ const requiredArtifacts = [];
106
+ return toBuilderTurnStream(this.agentsBuilderService.buildAgent(agentId, projectId, message, credentialProvider, credentialService, user, this.buildSubAgentSession(session, (artifact) => requiredArtifacts.push(artifact))), requiredArtifacts);
98
107
  },
99
108
  resumeBuild: async (agentId, resume, session) => {
100
109
  await assertProjectScope('agent:update');
101
- return toBuilderTurnStream(this.agentsBuilderService.resumeBuild(agentId, projectId, resume.runId, resume.toolCallId, resume.resumeData, credentialProvider, user, this.buildSubAgentSession(session)));
110
+ const requiredArtifacts = [];
111
+ return toBuilderTurnStream(this.agentsBuilderService.resumeBuild(agentId, projectId, resume.runId, resume.toolCallId, resume.resumeData, credentialProvider, credentialService, user, this.buildSubAgentSession(session, (artifact) => requiredArtifacts.push(artifact))), requiredArtifacts);
102
112
  },
103
113
  findOpenSuspensions: async (agentId, session) => {
104
114
  await assertProjectScope('agent:update');
@@ -1 +1 @@
1
- {"version":3,"file":"instance-ai-builder-delegate.adapter.js","sourceRoot":"","sources":["../../../src/modules/agents/instance-ai-builder-delegate.adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gCAAkC;AAClC,kDAAiE;AAOjE,0CAAoC;AACpC,+CAAyC;AAEzC,8EAA0E;AAC1E,gEAA8D;AAE9D,iEAA4D;AAC5D,iEAA4D;AAC5D,qDAAiD;AACjD,6EAAwE;AAExE,0DAAsD;AACtD,oFAA+E;AAC/E,iEAA+D;AAGlD,QAAA,4BAA4B,GAAG;;;;;;;;oNAQwK,CAAC;AAErN,SAAS,gBAAgB,CACxB,KAAkB;IAElB,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;AACpC,CAAC;AAKD,SAAS,mBAAmB,CAAC,MAAmC;IAC/D,IAAI,WAAmC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;QAC5C,WAAW,GAAG,OAAO,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,IAAI,GAAG,GAAG,EAAE,CAAC;IAEb,KAAK,S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;YACpB,KAAK,EAAE,EAAE,EAAE,EAAE,IAAA,cAAI,EAAC,GAAG,MAAM,GAAG,CAAC,EAAE;SACjC,CAAC,CAAC;QACH,KAAK,MAAM,EAAE,EAAE,EAAE,IAAI,OAAO,EAAE,CAAC;YAE9B,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;YACzE,MAAM,MAAM,CAAC,sBAAsB,CAAC,EAAE,CAAC,CAAC;YACxC,MAAM,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;QAC/B,CAAC;IACF,CAAC;CACD,CAAA;;kDAzJY,uCAAuC;IADnD,IAAA,YAAO,GAAE;qCAGwB,8BAAa,EACN,6CAAoB,EAC/B,sBAAS,EACG,+CAAqB,EAC/B,yCAAkB,EAClB,yCAAkB;GAPrC,uCAAuC,CAyJnD"}
1
+ {"version":3,"file":"instance-ai-builder-delegate.adapter.js","sourceRoot":"","sources":["../../../src/modules/agents/instance-ai-builder-delegate.adapter.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,gCAAkC;AAClC,kDAO0B;AAE1B,0CAAoC;AACpC,+CAAyC;AAEzC,8EAA0E;AAC1E,gEAA8D;AAE9D,iEAA4D;AAC5D,iEAA4D;AAC5D,qDAAiD;AACjD,6EAAwE;AAExE,0DAAsD;AACtD,oFAA+E;AAC/E,iEAA+D;AAGlD,QAAA,4BAA4B,GAAG;;;;;;;;;;6fAUid,CAAC;AAE9f,SAAS,gBAAgB,CACxB,KAAkB;IAElB,OAAO,KAAK,CAAC,IAAI,KAAK,YAAY,CAAC;AACpC,CAAC;AAKD,SAAS,mBAAmB,CAC3B,MAAmC,EACnC,iBAA4C;IAE5C,IAAI,WAAmC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,EAAE;QAC5C,WAAW,GAAG,OAAO,CAAC;IACvB,CA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