n8n 2.37.6 → 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 (692) 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/agent-config.service.js +0 -3
  81. package/dist/modules/agents/agent-config.service.js.map +1 -1
  82. package/dist/modules/agents/agent-default-model-resolver.service.js +2 -4
  83. package/dist/modules/agents/agent-default-model-resolver.service.js.map +1 -1
  84. package/dist/modules/agents/agent-execution-orchestrator.service.js +13 -6
  85. package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
  86. package/dist/modules/agents/agent-execution.service.d.ts +1 -0
  87. package/dist/modules/agents/agent-execution.service.js +3 -0
  88. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  89. package/dist/modules/agents/agent-integrations.controller.d.ts +7 -5
  90. package/dist/modules/agents/agent-integrations.controller.js +10 -17
  91. package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
  92. package/dist/modules/agents/agent-model-catalog.service.js +6 -12
  93. package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
  94. package/dist/modules/agents/agent-publish.service.d.ts +2 -3
  95. package/dist/modules/agents/agent-publish.service.js +12 -5
  96. package/dist/modules/agents/agent-publish.service.js.map +1 -1
  97. package/dist/modules/agents/agent-runtime-cache.service.d.ts +5 -0
  98. package/dist/modules/agents/agent-runtime-cache.service.js +57 -3
  99. package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
  100. package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +14 -7
  101. package/dist/modules/agents/agent-runtime-reconstruction.service.js +89 -36
  102. package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
  103. package/dist/modules/agents/agent-sandbox-runtime.service.d.ts +4 -2
  104. package/dist/modules/agents/agent-sandbox-runtime.service.js +21 -11
  105. package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
  106. package/dist/modules/agents/agent-validation.service.js +0 -4
  107. package/dist/modules/agents/agent-validation.service.js.map +1 -1
  108. package/dist/modules/agents/agent-workflow-execution.service.js +1 -1
  109. package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
  110. package/dist/modules/agents/agent-workflow-tool-resume.service.d.ts +32 -0
  111. package/dist/modules/agents/agent-workflow-tool-resume.service.js +168 -0
  112. package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -0
  113. package/dist/modules/agents/agent-workspace.service.d.ts +8 -2
  114. package/dist/modules/agents/agent-workspace.service.js +15 -4
  115. package/dist/modules/agents/agent-workspace.service.js.map +1 -1
  116. package/dist/modules/agents/agents.module.d.ts +1 -1
  117. package/dist/modules/agents/agents.module.js +8 -7
  118. package/dist/modules/agents/agents.module.js.map +1 -1
  119. package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -6
  120. package/dist/modules/agents/builder/agents-builder-tools.service.js +16 -21
  121. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  122. package/dist/modules/agents/builder/agents-builder.service.d.ts +5 -7
  123. package/dist/modules/agents/builder/agents-builder.service.js +27 -36
  124. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  125. package/dist/modules/agents/builder/call-agent-failure.d.ts +5 -0
  126. package/dist/modules/agents/builder/call-agent-failure.js +28 -0
  127. package/dist/modules/agents/builder/call-agent-failure.js.map +1 -0
  128. package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +3 -2
  129. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +8 -9
  130. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
  131. package/dist/modules/agents/builder/interactive/finish-setup.tool.d.ts +3 -2
  132. package/dist/modules/agents/builder/interactive/finish-setup.tool.js +16 -6
  133. package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
  134. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +57 -44
  135. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  136. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +3 -2
  137. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -1
  138. package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -1
  139. package/dist/modules/agents/builder/prompts/tools.prompt.js +6 -0
  140. package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -1
  141. package/dist/modules/agents/builder/skills/external-services.skill.js +51 -8
  142. package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
  143. package/dist/modules/agents/builder/skills/sub-agents.skill.js +15 -12
  144. package/dist/modules/agents/builder/skills/sub-agents.skill.js.map +1 -1
  145. package/dist/modules/agents/builder/skills/target-tasks.skill.js +16 -5
  146. package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
  147. package/dist/modules/agents/entities/agent-channel-status.entity.d.ts +16 -0
  148. package/dist/modules/agents/entities/agent-channel-status.entity.js +99 -0
  149. package/dist/modules/agents/entities/agent-channel-status.entity.js.map +1 -0
  150. package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +3 -3
  151. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +17 -7
  152. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
  153. package/dist/modules/agents/integrations/agent-channel-reconciler.service.d.ts +38 -0
  154. package/dist/modules/agents/integrations/agent-channel-reconciler.service.js +260 -0
  155. package/dist/modules/agents/integrations/agent-channel-reconciler.service.js.map +1 -0
  156. package/dist/modules/agents/integrations/agent-channel-status-reporter.d.ts +23 -0
  157. package/dist/modules/agents/integrations/agent-channel-status-reporter.js +114 -0
  158. package/dist/modules/agents/integrations/agent-channel-status-reporter.js.map +1 -0
  159. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +9 -0
  160. package/dist/modules/agents/integrations/agent-chat-bridge.js +53 -1
  161. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  162. package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.d.ts +1 -1
  163. package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js +3 -2
  164. package/dist/modules/agents/integrations/agent-chat-hitl-resume-handler.js.map +1 -1
  165. package/dist/modules/agents/integrations/agent-chat-integration.d.ts +5 -2
  166. package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
  167. package/dist/modules/agents/integrations/channel-status-report.d.ts +4 -0
  168. package/dist/modules/agents/integrations/channel-status-report.js +58 -0
  169. package/dist/modules/agents/integrations/channel-status-report.js.map +1 -0
  170. package/dist/modules/agents/integrations/chat-integration.service.d.ts +17 -2
  171. package/dist/modules/agents/integrations/chat-integration.service.js +63 -35
  172. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  173. package/dist/modules/agents/integrations/credential-claim.d.ts +3 -0
  174. package/dist/modules/agents/integrations/credential-claim.js +12 -0
  175. package/dist/modules/agents/integrations/credential-claim.js.map +1 -0
  176. package/dist/modules/agents/integrations/n8n-checkpoint-storage.d.ts +2 -0
  177. package/dist/modules/agents/integrations/n8n-checkpoint-storage.js +25 -0
  178. package/dist/modules/agents/integrations/n8n-checkpoint-storage.js.map +1 -1
  179. package/dist/modules/agents/integrations/platforms/discord-integration.d.ts +2 -1
  180. package/dist/modules/agents/integrations/platforms/discord-integration.js +9 -6
  181. package/dist/modules/agents/integrations/platforms/discord-integration.js.map +1 -1
  182. package/dist/modules/agents/integrations/platforms/linear-integration.js +1 -1
  183. package/dist/modules/agents/integrations/platforms/linear-integration.js.map +1 -1
  184. package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +2 -1
  185. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +7 -6
  186. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
  187. package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js +1 -1
  188. package/dist/modules/agents/integrations/platforms/slack/slack-methods.service.js.map +1 -1
  189. package/dist/modules/agents/integrations/platforms/telegram-integration.d.ts +4 -6
  190. package/dist/modules/agents/integrations/platforms/telegram-integration.js +11 -14
  191. package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
  192. package/dist/modules/agents/json-config/credential-field-mapping.js +3 -0
  193. package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
  194. package/dist/modules/agents/llm-provider-defaults.js +16 -1
  195. package/dist/modules/agents/llm-provider-defaults.js.map +1 -1
  196. package/dist/modules/agents/repositories/agent-channel-status.repository.d.ts +29 -0
  197. package/dist/modules/agents/repositories/agent-channel-status.repository.js +63 -0
  198. package/dist/modules/agents/repositories/agent-channel-status.repository.js.map +1 -0
  199. package/dist/modules/agents/repositories/agent-execution.repository.d.ts +1 -0
  200. package/dist/modules/agents/repositories/agent-execution.repository.js +4 -0
  201. package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
  202. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +29 -19
  203. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
  204. package/dist/modules/agents/sub-agents/sub-agent-cleanup.service.js.map +1 -1
  205. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.d.ts +6 -3
  206. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js +43 -16
  207. package/dist/modules/agents/sub-agents/sub-agent-foreground-runner.js.map +1 -1
  208. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +1 -0
  209. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +18 -6
  210. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
  211. package/dist/modules/agents/tools/workflow-tool-factory.d.ts +24 -13
  212. package/dist/modules/agents/tools/workflow-tool-factory.js +147 -9
  213. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  214. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.d.ts +10 -2
  215. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +23 -4
  216. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
  217. package/dist/modules/agents/utils/provider-model-id.d.ts +2 -0
  218. package/dist/modules/agents/utils/provider-model-id.js +21 -0
  219. package/dist/modules/agents/utils/provider-model-id.js.map +1 -0
  220. package/dist/modules/community-packages/community-packages.service.d.ts +4 -0
  221. package/dist/modules/community-packages/community-packages.service.js +96 -92
  222. package/dist/modules/community-packages/community-packages.service.js.map +1 -1
  223. package/dist/modules/community-packages/npm-utils.js +1 -5
  224. package/dist/modules/community-packages/npm-utils.js.map +1 -1
  225. package/dist/modules/data-table/data-table-aggregate.service.d.ts +1 -1
  226. package/dist/modules/data-table/data-table-aggregate.service.js +1 -1
  227. package/dist/modules/data-table/data-table-aggregate.service.js.map +1 -1
  228. package/dist/modules/data-table/data-table.service.d.ts +9 -4
  229. package/dist/modules/data-table/data-table.service.js +34 -4
  230. package/dist/modules/data-table/data-table.service.js.map +1 -1
  231. package/dist/modules/data-table/errors/data-table-access-denied.error.d.ts +4 -0
  232. package/dist/modules/data-table/errors/data-table-access-denied.error.js +13 -0
  233. package/dist/modules/data-table/errors/data-table-access-denied.error.js.map +1 -0
  234. package/dist/modules/dynamic-credentials.ee/config-redaction.d.ts +5 -0
  235. package/dist/modules/dynamic-credentials.ee/config-redaction.js +81 -0
  236. package/dist/modules/dynamic-credentials.ee/config-redaction.js.map +1 -0
  237. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.d.ts +2 -3
  238. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js +2 -4
  239. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/oauth2-metadata-http-client.js.map +1 -1
  240. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +1 -0
  241. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
  242. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
  243. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js +3 -2
  244. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.controller.js.map +1 -1
  245. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +22 -4
  246. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -1
  247. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +1 -0
  248. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +12 -2
  249. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
  250. package/dist/modules/encryption-key-manager/key-manager.service.d.ts +7 -2
  251. package/dist/modules/encryption-key-manager/key-manager.service.js +27 -8
  252. package/dist/modules/encryption-key-manager/key-manager.service.js.map +1 -1
  253. package/dist/modules/engine-v2/engine-control-plane-auth.middleware.d.ts +6 -0
  254. package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js +31 -0
  255. package/dist/modules/engine-v2/engine-control-plane-auth.middleware.js.map +1 -0
  256. package/dist/modules/engine-v2/engine-control-plane-client.d.ts +9 -0
  257. package/dist/modules/engine-v2/engine-control-plane-client.js +51 -0
  258. package/dist/modules/engine-v2/engine-control-plane-client.js.map +1 -0
  259. package/dist/modules/engine-v2/engine-control-plane-server.d.ts +14 -0
  260. package/dist/modules/engine-v2/engine-control-plane-server.js +84 -0
  261. package/dist/modules/engine-v2/engine-control-plane-server.js.map +1 -0
  262. package/dist/modules/engine-v2/engine-data-plane-client.d.ts +3 -1
  263. package/dist/modules/engine-v2/engine-data-plane-client.js +16 -1
  264. package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
  265. package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.d.ts +18 -0
  266. package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js +150 -0
  267. package/dist/modules/engine-v2/engine-lifecycle-event-push-relay.js.map +1 -0
  268. package/dist/modules/engine-v2/engine-lifecycle-event.controller.d.ts +7 -0
  269. package/dist/modules/engine-v2/engine-lifecycle-event.controller.js +34 -0
  270. package/dist/modules/engine-v2/engine-lifecycle-event.controller.js.map +1 -0
  271. package/dist/modules/engine-v2/engine-v2.constants.d.ts +2 -0
  272. package/dist/modules/engine-v2/engine-v2.constants.js +6 -0
  273. package/dist/modules/engine-v2/engine-v2.constants.js.map +1 -0
  274. package/dist/modules/engine-v2/engine-v2.module.js +4 -0
  275. package/dist/modules/engine-v2/engine-v2.module.js.map +1 -1
  276. package/dist/modules/engine-v2/engine-v2.runtime.d.ts +3 -1
  277. package/dist/modules/engine-v2/engine-v2.runtime.js +6 -2
  278. package/dist/modules/engine-v2/engine-v2.runtime.js.map +1 -1
  279. package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js +1 -1
  280. package/dist/modules/external-secrets.ee/providers/aws-secrets-manager.js.map +1 -1
  281. package/dist/modules/external-secrets.ee/providers/infisical.js +1 -1
  282. package/dist/modules/external-secrets.ee/providers/infisical.js.map +1 -1
  283. package/dist/modules/external-secrets.ee/providers/vault.js +1 -1
  284. package/dist/modules/external-secrets.ee/providers/vault.js.map +1 -1
  285. package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.d.ts +5 -3
  286. package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js +16 -4
  287. package/dist/modules/git-connections.ee/database/repositories/git-connection-project.repository.js.map +1 -1
  288. package/dist/modules/git-connections.ee/git-connections.service.d.ts +4 -2
  289. package/dist/modules/git-connections.ee/git-connections.service.js +87 -4
  290. package/dist/modules/git-connections.ee/git-connections.service.js.map +1 -1
  291. package/dist/modules/instance-ai/browser/browser-local-mcp-server.d.ts +3 -2
  292. package/dist/modules/instance-ai/browser/browser-local-mcp-server.js +48 -30
  293. package/dist/modules/instance-ai/browser/browser-local-mcp-server.js.map +1 -1
  294. package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
  295. package/dist/modules/instance-ai/event-bus/in-process-event-bus.d.ts +2 -28
  296. package/dist/modules/instance-ai/event-bus/in-process-event-bus.js +5 -228
  297. package/dist/modules/instance-ai/event-bus/in-process-event-bus.js.map +1 -1
  298. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.d.ts +1 -3
  299. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js +2 -8
  300. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
  301. package/dist/modules/instance-ai/instance-ai-memory.service.js +1 -3
  302. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  303. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -0
  304. package/dist/modules/instance-ai/instance-ai-settings.service.js +10 -2
  305. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  306. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +0 -2
  307. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +1 -2
  308. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
  309. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -3
  310. package/dist/modules/instance-ai/instance-ai.adapter.service.js +101 -44
  311. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  312. package/dist/modules/instance-ai/instance-ai.controller.d.ts +1 -1
  313. package/dist/modules/instance-ai/instance-ai.controller.js +75 -83
  314. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  315. package/dist/modules/instance-ai/instance-ai.module.js +8 -16
  316. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  317. package/dist/modules/instance-ai/instance-ai.service.d.ts +2 -0
  318. package/dist/modules/instance-ai/instance-ai.service.js +55 -11
  319. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  320. package/dist/modules/instance-ai/internal-messages.d.ts +7 -0
  321. package/dist/modules/instance-ai/internal-messages.js +32 -2
  322. package/dist/modules/instance-ai/internal-messages.js.map +1 -1
  323. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.d.ts +2 -5
  324. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js +4 -7
  325. package/dist/modules/instance-ai/mcp/instance-ai-mcp-registry.service.js.map +1 -1
  326. package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
  327. package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
  328. package/dist/modules/instance-ai/workflow-templates.service.js +1 -1
  329. package/dist/modules/instance-ai/workflow-templates.service.js.map +1 -1
  330. package/dist/modules/ldap.ee/ldap.controller.ee.d.ts +4 -2
  331. package/dist/modules/ldap.ee/ldap.controller.ee.js +9 -2
  332. package/dist/modules/ldap.ee/ldap.controller.ee.js.map +1 -1
  333. package/dist/modules/ldap.ee/ldap.service.ee.js +4 -0
  334. package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
  335. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js +1 -1
  336. package/dist/modules/log-streaming.ee/destinations/message-event-bus-destination-webhook.ee.js.map +1 -1
  337. package/dist/modules/mcp/mcp-server-middleware.service.js +1 -0
  338. package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
  339. package/dist/modules/mcp/mcp.constants.d.ts +2 -0
  340. package/dist/modules/mcp/mcp.constants.js +3 -1
  341. package/dist/modules/mcp/mcp.constants.js.map +1 -1
  342. package/dist/modules/mcp/mcp.controller.js +20 -6
  343. package/dist/modules/mcp/mcp.controller.js.map +1 -1
  344. package/dist/modules/mcp/mcp.types.d.ts +1 -0
  345. package/dist/modules/mcp/tools/agents/agent-reference.d.ts +1 -1
  346. package/dist/modules/mcp/tools/agents/agent-reference.js +2 -2
  347. package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +2 -5
  348. package/dist/modules/mcp/tools/agents/agent-tools.service.js +5 -9
  349. package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
  350. package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -1
  351. package/dist/modules/n8n-packages/engine/import-result.js +1 -0
  352. package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
  353. package/dist/modules/n8n-packages/engine/import-telemetry.d.ts +5 -1
  354. package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
  355. package/dist/modules/n8n-packages/engine/project-package-importer.d.ts +4 -5
  356. package/dist/modules/n8n-packages/engine/project-package-importer.js +9 -7
  357. package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
  358. package/dist/modules/n8n-packages/engine/workflow-package-importer.d.ts +4 -5
  359. package/dist/modules/n8n-packages/engine/workflow-package-importer.js +18 -20
  360. package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
  361. package/dist/modules/n8n-packages/entities/credential/credential-importer.js +1 -0
  362. package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
  363. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +12 -12
  364. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -1
  365. package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.d.ts +4 -0
  366. package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js +34 -0
  367. package/dist/modules/n8n-packages/entities/credential/workflow-credential-references.js.map +1 -0
  368. package/dist/modules/n8n-packages/entities/project/project-importer.js +1 -1
  369. package/dist/modules/n8n-packages/entities/project/project-importer.js.map +1 -1
  370. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +22 -14
  371. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
  372. package/dist/modules/n8n-packages/io/directory/directory-package-reader.d.ts +21 -0
  373. package/dist/modules/n8n-packages/io/directory/directory-package-reader.js +146 -0
  374. package/dist/modules/n8n-packages/io/directory/directory-package-reader.js.map +1 -0
  375. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
  376. package/dist/modules/n8n-packages/n8n-packages.service.js +36 -0
  377. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
  378. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +10 -2
  379. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
  380. package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.d.ts +1 -0
  381. package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js +4 -0
  382. package/dist/modules/oauth-server/database/entities/oauth-refresh-token.entity.js.map +1 -1
  383. package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.d.ts +1 -0
  384. package/dist/modules/oauth-server/database/repositories/oauth-refresh-token.repository.js.map +1 -1
  385. package/dist/modules/oauth-server/oauth-server.service.d.ts +1 -1
  386. package/dist/modules/oauth-server/oauth-server.service.js +12 -16
  387. package/dist/modules/oauth-server/oauth-server.service.js.map +1 -1
  388. package/dist/modules/oauth-server/oauth-token.service.d.ts +2 -1
  389. package/dist/modules/oauth-server/oauth-token.service.js +15 -3
  390. package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
  391. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.d.ts +22 -0
  392. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js +60 -0
  393. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.base.js.map +1 -0
  394. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.d.ts +24 -0
  395. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js +62 -0
  396. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-resource.resolver.js.map +1 -0
  397. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.d.ts +22 -0
  398. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js +56 -0
  399. package/dist/modules/oauth-server/protected-resource-resolvers/chat-trigger-test-resource.resolver.js.map +1 -0
  400. package/dist/modules/oauth-server/protected-resource-resolvers/index.js +4 -0
  401. package/dist/modules/oauth-server/protected-resource-resolvers/index.js.map +1 -1
  402. package/dist/modules/oauth-server/protected-resource-resolvers/utils.d.ts +4 -0
  403. package/dist/modules/oauth-server/protected-resource-resolvers/utils.js +17 -1
  404. package/dist/modules/oauth-server/protected-resource-resolvers/utils.js.map +1 -1
  405. package/dist/modules/oauth-server/resource-identity.d.ts +2 -0
  406. package/dist/modules/oauth-server/resource-identity.js +15 -0
  407. package/dist/modules/oauth-server/resource-identity.js.map +1 -0
  408. package/dist/modules/otel/otel.service.js +14 -7
  409. package/dist/modules/otel/otel.service.js.map +1 -1
  410. package/dist/modules/policy-infrastructure/policy-decision.service.d.ts +1 -0
  411. package/dist/modules/policy-infrastructure/policy-decision.service.js +3 -0
  412. package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
  413. package/dist/modules/policy-infrastructure/policy-infrastructure.module.js +1 -0
  414. package/dist/modules/policy-infrastructure/policy-infrastructure.module.js.map +1 -1
  415. package/dist/modules/policy-infrastructure/policy-lifecycle-handler.d.ts +9 -0
  416. package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js +45 -0
  417. package/dist/modules/policy-infrastructure/policy-lifecycle-handler.js.map +1 -0
  418. package/dist/modules/quick-connect/handlers/firecrawl.handler.js +1 -1
  419. package/dist/modules/quick-connect/handlers/firecrawl.handler.js.map +1 -1
  420. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +18 -1
  421. package/dist/modules/source-control.ee/source-control-import.service.ee.js +11 -3
  422. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  423. package/dist/modules/source-control.ee/source-control-status.service.ee.js +2 -0
  424. package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
  425. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +32 -0
  426. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +16 -0
  427. package/dist/modules/source-control.ee/source-control.service.ee.js +11 -2
  428. package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
  429. package/dist/modules/source-control.ee/types/import-result.d.ts +2 -1
  430. package/dist/modules/sso-oidc/oidc.controller.ee.js +2 -2
  431. package/dist/modules/sso-oidc/oidc.controller.ee.js.map +1 -1
  432. package/dist/modules/sso-oidc/oidc.service.ee.js +1 -1
  433. package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
  434. package/dist/modules/sso-oidc/views/oidc-test-result.d.ts +2 -2
  435. package/dist/modules/sso-oidc/views/oidc-test-result.js +10 -4
  436. package/dist/modules/sso-oidc/views/oidc-test-result.js.map +1 -1
  437. package/dist/modules/sso-saml/saml.controller.ee.js +2 -2
  438. package/dist/modules/sso-saml/saml.controller.ee.js.map +1 -1
  439. package/dist/modules/sso-saml/saml.service.ee.js +1 -1
  440. package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
  441. package/dist/modules/sso-saml/views/init-sso-post.d.ts +1 -1
  442. package/dist/modules/sso-saml/views/init-sso-post.js +2 -2
  443. package/dist/modules/sso-saml/views/init-sso-post.js.map +1 -1
  444. package/dist/modules/token-exchange/services/jwks-resolver.js +1 -1
  445. package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
  446. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.d.ts +7 -0
  447. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js +38 -0
  448. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-attachment.entity.js.map +1 -0
  449. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.d.ts +9 -0
  450. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js +41 -0
  451. package/dist/modules/type-availability-policies/database/entities/type-availability-policy-scope.entity.js.map +1 -0
  452. package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.d.ts +8 -0
  453. package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js +37 -0
  454. package/dist/modules/type-availability-policies/database/entities/type-availability-policy.entity.js.map +1 -0
  455. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.d.ts +17 -0
  456. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js +96 -0
  457. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js.map +1 -0
  458. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +20 -0
  459. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +69 -0
  460. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -0
  461. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.d.ts +18 -0
  462. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js +63 -0
  463. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy.repository.js.map +1 -0
  464. package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -0
  465. package/dist/modules/type-availability-policies/type-availability-policies.module.js +6 -0
  466. package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
  467. package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.d.ts +3 -5
  468. package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js +7 -9
  469. package/dist/modules/workflow-reviews.ee/workflow-review-activity.service.js.map +1 -1
  470. package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.d.ts → workflow-review-authorization.service.d.ts} +12 -3
  471. package/dist/modules/workflow-reviews.ee/{workflow-review-access.service.js → workflow-review-authorization.service.js} +52 -17
  472. package/dist/modules/workflow-reviews.ee/workflow-review-authorization.service.js.map +1 -0
  473. package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.d.ts +14 -0
  474. package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js +17 -0
  475. package/dist/modules/workflow-reviews.ee/workflow-review-decision-policy.js.map +1 -0
  476. package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.d.ts +8 -12
  477. package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js +28 -82
  478. package/dist/modules/workflow-reviews.ee/workflow-review-inbox.service.js.map +1 -1
  479. package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.d.ts +7 -6
  480. package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js +80 -110
  481. package/dist/modules/workflow-reviews.ee/workflow-review-lifecycle.service.js.map +1 -1
  482. package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.d.ts +17 -0
  483. package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js +69 -0
  484. package/dist/modules/workflow-reviews.ee/workflow-review-participant.resolver.js.map +1 -0
  485. package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.d.ts +34 -0
  486. package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js +237 -0
  487. package/dist/modules/workflow-reviews.ee/workflow-review-request-decision.service.js.map +1 -0
  488. package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.d.ts +10 -0
  489. package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js +57 -0
  490. package/dist/modules/workflow-reviews.ee/workflow-review-request-mutation-guard.service.js.map +1 -0
  491. package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.d.ts +17 -0
  492. package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js +93 -0
  493. package/dist/modules/workflow-reviews.ee/workflow-review-request-status.service.js.map +1 -0
  494. package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.d.ts +34 -0
  495. package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js +268 -0
  496. package/dist/modules/workflow-reviews.ee/workflow-review-request-submission.service.js.map +1 -0
  497. package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.d.ts +7 -3
  498. package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js +13 -9
  499. package/dist/modules/workflow-reviews.ee/workflow-review-requests.controller.js.map +1 -1
  500. package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.d.ts +9 -0
  501. package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js +37 -0
  502. package/dist/modules/workflow-reviews.ee/workflow-review-state-notifier.service.js.map +1 -0
  503. package/dist/oauth/oauth.service.js +0 -1
  504. package/dist/oauth/oauth.service.js.map +1 -1
  505. package/dist/permissions.ee/check-access.js +11 -7
  506. package/dist/permissions.ee/check-access.js.map +1 -1
  507. package/dist/permissions.ee/project-scope.service.d.ts +1 -0
  508. package/dist/permissions.ee/project-scope.service.js +7 -2
  509. package/dist/permissions.ee/project-scope.service.js.map +1 -1
  510. package/dist/policy/evaluate-content-import-safely.d.ts +5 -0
  511. package/dist/policy/evaluate-content-import-safely.js +18 -0
  512. package/dist/policy/evaluate-content-import-safely.js.map +1 -0
  513. package/dist/policy/policy-enforcement-backend.d.ts +1 -0
  514. package/dist/policy/policy-enforcement.service.d.ts +2 -2
  515. package/dist/policy/policy-enforcement.service.js +10 -14
  516. package/dist/policy/policy-enforcement.service.js.map +1 -1
  517. package/dist/policy/policy-violation.error.d.ts +2 -0
  518. package/dist/policy/policy-violation.error.js +10 -0
  519. package/dist/policy/policy-violation.error.js.map +1 -1
  520. package/dist/public-api/types.d.ts +1 -14
  521. package/dist/public-api/v1/controllers/git-connections.public.controller.d.ts +2 -1
  522. package/dist/public-api/v1/controllers/git-connections.public.controller.js +24 -3
  523. package/dist/public-api/v1/controllers/git-connections.public.controller.js.map +1 -1
  524. package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +8 -1
  525. package/dist/public-api/v1/controllers/workflows.public.controller.js +151 -14
  526. package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
  527. package/dist/public-api/v1/handlers/credentials/credentials.handler.js +1 -0
  528. package/dist/public-api/v1/handlers/credentials/credentials.handler.js.map +1 -1
  529. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js +33 -44
  530. package/dist/public-api/v1/handlers/data-tables/data-tables.handler.js.map +1 -1
  531. package/dist/public-api/v1/handlers/discover/discover.handler.d.ts +1 -1
  532. package/dist/public-api/v1/handlers/discover/discover.handler.js +3 -13
  533. package/dist/public-api/v1/handlers/discover/discover.handler.js.map +1 -1
  534. package/dist/public-api/v1/handlers/discover/discover.service.d.ts +2 -3
  535. package/dist/public-api/v1/handlers/discover/discover.service.js.map +1 -1
  536. package/dist/public-api/v1/handlers/projects/projects.handler.d.ts +1 -1
  537. package/dist/public-api/v1/handlers/projects/projects.handler.js +23 -21
  538. package/dist/public-api/v1/handlers/projects/projects.handler.js.map +1 -1
  539. package/dist/public-api/v1/handlers/variables/variables.handler.d.ts +1 -1
  540. package/dist/public-api/v1/handlers/variables/variables.handler.js +5 -6
  541. package/dist/public-api/v1/handlers/variables/variables.handler.js.map +1 -1
  542. package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -4
  543. package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -102
  544. package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +1 -1
  545. package/dist/public-api/v1/openapi.yml +4779 -2848
  546. package/dist/response-helper.js +3 -0
  547. package/dist/response-helper.js.map +1 -1
  548. package/dist/scaling/constants.d.ts +2 -2
  549. package/dist/scaling/constants.js +1 -0
  550. package/dist/scaling/constants.js.map +1 -1
  551. package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -1
  552. package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
  553. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +2 -7
  554. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
  555. package/dist/security/content-security-policy.d.ts +8 -0
  556. package/dist/security/content-security-policy.js +18 -0
  557. package/dist/security/content-security-policy.js.map +1 -0
  558. package/dist/security-audit/risk-reporters/instance-risk-reporter.js +1 -1
  559. package/dist/security-audit/risk-reporters/instance-risk-reporter.js.map +1 -1
  560. package/dist/server.js +22 -21
  561. package/dist/server.js.map +1 -1
  562. package/dist/services/active-workflows.service.d.ts +3 -1
  563. package/dist/services/active-workflows.service.js +11 -9
  564. package/dist/services/active-workflows.service.js.map +1 -1
  565. package/dist/services/ai-gateway.service.js +1 -1
  566. package/dist/services/ai-gateway.service.js.map +1 -1
  567. package/dist/services/credentials-tester.service.js +7 -1
  568. package/dist/services/credentials-tester.service.js.map +1 -1
  569. package/dist/services/engine-data-plane-proxy.service.d.ts +4 -1
  570. package/dist/services/engine-data-plane-proxy.service.js +5 -0
  571. package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
  572. package/dist/services/engine-v2-dispatcher.service.d.ts +5 -2
  573. package/dist/services/engine-v2-dispatcher.service.js +46 -24
  574. package/dist/services/engine-v2-dispatcher.service.js.map +1 -1
  575. package/dist/services/engine-v2-push-registry.service.d.ts +8 -0
  576. package/dist/services/engine-v2-push-registry.service.js +51 -0
  577. package/dist/services/engine-v2-push-registry.service.js.map +1 -0
  578. package/dist/services/engine-v2-push-session.d.ts +23 -0
  579. package/dist/services/engine-v2-push-session.js +24 -0
  580. package/dist/services/engine-v2-push-session.js.map +1 -0
  581. package/dist/services/folder-finder.service.js +10 -8
  582. package/dist/services/folder-finder.service.js.map +1 -1
  583. package/dist/services/folder.service.d.ts +1 -1
  584. package/dist/services/folder.service.js +1 -7
  585. package/dist/services/folder.service.js.map +1 -1
  586. package/dist/services/import.service.d.ts +14 -3
  587. package/dist/services/import.service.js +27 -2
  588. package/dist/services/import.service.js.map +1 -1
  589. package/dist/services/ownership-transfer/ownership-transfer.manifest.json +5 -0
  590. package/dist/services/project.service.ee.d.ts +47 -9
  591. package/dist/services/project.service.ee.js +128 -17
  592. package/dist/services/project.service.ee.js.map +1 -1
  593. package/dist/services/role.service.js +10 -5
  594. package/dist/services/role.service.js.map +1 -1
  595. package/dist/task-runners/task-runner-process-py.d.ts +1 -1
  596. package/dist/task-runners/task-runner-process-py.js.map +1 -1
  597. package/dist/telemetry/index.js +1 -1
  598. package/dist/telemetry/index.js.map +1 -1
  599. package/dist/utils/ai-proxy-fetch.d.ts +3 -4
  600. package/dist/utils/ai-proxy-fetch.js +3 -5
  601. package/dist/utils/ai-proxy-fetch.js.map +1 -1
  602. package/dist/utils/strapi-utils.js +1 -1
  603. package/dist/utils/strapi-utils.js.map +1 -1
  604. package/dist/utils/ttl-map.d.ts +1 -0
  605. package/dist/utils/ttl-map.js +9 -0
  606. package/dist/utils/ttl-map.js.map +1 -1
  607. package/dist/webhooks/constants.d.ts +2 -0
  608. package/dist/webhooks/constants.js +2 -1
  609. package/dist/webhooks/constants.js.map +1 -1
  610. package/dist/webhooks/live-webhooks.js +1 -1
  611. package/dist/webhooks/live-webhooks.js.map +1 -1
  612. package/dist/webhooks/test-webhook-registrations.service.d.ts +1 -0
  613. package/dist/webhooks/test-webhook-registrations.service.js.map +1 -1
  614. package/dist/webhooks/test-webhooks.d.ts +6 -2
  615. package/dist/webhooks/test-webhooks.js +29 -6
  616. package/dist/webhooks/test-webhooks.js.map +1 -1
  617. package/dist/webhooks/waiting-forms.js +3 -4
  618. package/dist/webhooks/waiting-forms.js.map +1 -1
  619. package/dist/webhooks/waiting-webhooks.js +4 -0
  620. package/dist/webhooks/waiting-webhooks.js.map +1 -1
  621. package/dist/webhooks/webhook-helpers.d.ts +3 -1
  622. package/dist/webhooks/webhook-helpers.js +24 -1
  623. package/dist/webhooks/webhook-helpers.js.map +1 -1
  624. package/dist/webhooks/webhook-response-headers.d.ts +1 -0
  625. package/dist/webhooks/webhook-response-headers.js +6 -0
  626. package/dist/webhooks/webhook-response-headers.js.map +1 -1
  627. package/dist/workflow-execute-additional-data.js +5 -0
  628. package/dist/workflow-execute-additional-data.js.map +1 -1
  629. package/dist/workflow-helpers.d.ts +3 -2
  630. package/dist/workflow-helpers.js +35 -24
  631. package/dist/workflow-helpers.js.map +1 -1
  632. package/dist/workflows/publication/publication-result.d.ts +5 -0
  633. package/dist/workflows/publication/publication-status-reporter.d.ts +1 -0
  634. package/dist/workflows/publication/publication-status-reporter.js +23 -5
  635. package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
  636. package/dist/workflows/publication/workflow-publication-applier.d.ts +6 -1
  637. package/dist/workflows/publication/workflow-publication-applier.js +63 -10
  638. package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
  639. package/dist/workflows/triggers/poll-backoff.service.d.ts +2 -2
  640. package/dist/workflows/triggers/poll-backoff.service.js +3 -3
  641. package/dist/workflows/triggers/poll-backoff.service.js.map +1 -1
  642. package/dist/workflows/triggers/poll-cursor.service.d.ts +2 -2
  643. package/dist/workflows/triggers/poll-cursor.service.js +4 -1
  644. package/dist/workflows/triggers/poll-cursor.service.js.map +1 -1
  645. package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +6 -4
  646. package/dist/workflows/triggers/trigger-execution-context.factory.js +13 -7
  647. package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
  648. package/dist/workflows/triggers/webhook-trigger-registrar.d.ts +1 -0
  649. package/dist/workflows/triggers/webhook-trigger-registrar.js +3 -0
  650. package/dist/workflows/triggers/webhook-trigger-registrar.js.map +1 -1
  651. package/dist/workflows/triggers/workflow-trigger-activator.d.ts +10 -1
  652. package/dist/workflows/triggers/workflow-trigger-activator.js +78 -38
  653. package/dist/workflows/triggers/workflow-trigger-activator.js.map +1 -1
  654. package/dist/workflows/workflow-creation.service.d.ts +17 -4
  655. package/dist/workflows/workflow-creation.service.js +96 -16
  656. package/dist/workflows/workflow-creation.service.js.map +1 -1
  657. package/dist/workflows/workflow-execution.service.js +2 -0
  658. package/dist/workflows/workflow-execution.service.js.map +1 -1
  659. package/dist/workflows/workflow-finder.service.js +67 -56
  660. package/dist/workflows/workflow-finder.service.js.map +1 -1
  661. package/dist/workflows/workflow-validation.service.js +3 -2
  662. package/dist/workflows/workflow-validation.service.js.map +1 -1
  663. package/dist/workflows/workflow.service.d.ts +4 -1
  664. package/dist/workflows/workflow.service.ee.d.ts +9 -3
  665. package/dist/workflows/workflow.service.ee.js +16 -2
  666. package/dist/workflows/workflow.service.ee.js.map +1 -1
  667. package/dist/workflows/workflow.service.js +25 -4
  668. package/dist/workflows/workflow.service.js.map +1 -1
  669. package/dist/workflows/workflows.controller.d.ts +3 -5
  670. package/dist/workflows/workflows.controller.js +3 -7
  671. package/dist/workflows/workflows.controller.js.map +1 -1
  672. package/package.json +38 -38
  673. package/templates/oauth-callback.handlebars +1 -1
  674. package/templates/oauth-error-callback.handlebars +1 -1
  675. package/templates/saml-connection-test-failed.handlebars +4 -1
  676. package/templates/saml-connection-test-success.handlebars +4 -1
  677. package/dist/modules/instance-ai/output-redaction-config.d.ts +0 -3
  678. package/dist/modules/instance-ai/output-redaction-config.js +0 -21
  679. package/dist/modules/instance-ai/output-redaction-config.js.map +0 -1
  680. package/dist/modules/workflow-reviews.ee/workflow-review-access.service.js.map +0 -1
  681. package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.d.ts +0 -18
  682. package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js +0 -77
  683. package/dist/modules/workflow-reviews.ee/workflow-review-eligibility.service.js.map +0 -1
  684. package/dist/modules/workflow-reviews.ee/workflow-review-request.service.d.ts +0 -51
  685. package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js +0 -538
  686. package/dist/modules/workflow-reviews.ee/workflow-review-request.service.js.map +0 -1
  687. package/dist/policy/policy-cleared.d.ts +0 -20
  688. package/dist/policy/policy-cleared.js +0 -22
  689. package/dist/policy/policy-cleared.js.map +0 -1
  690. package/dist/public-api/v1/handlers/data-tables/data-tables.service.d.ts +0 -4
  691. package/dist/public-api/v1/handlers/data-tables/data-tables.service.js +0 -44
  692. package/dist/public-api/v1/handlers/data-tables/data-tables.service.js.map +0 -1
@@ -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"}
@@ -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,SAAS,CAAC,CAAC,IAAI;QACnB,IAAI,CAAC;YACJ,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBAClC,IAAI,gBAAgB,CAAC,KAAK,CAAC;oBAAE,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC;gBAChD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,WAAW,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;IACF,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC;AACrC,CAAC;AAcM,IAAM,uCAAuC,GAA7C,MAAM,uCAAuC;IACnD,YACkB,aAA4B,EAC5B,oBAA0C,EAC1C,SAAoB,EACpB,qBAA4C,EAC5C,WAA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CAAoB,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,CAAC,CAAC,CAAC;IACH,IAAI,wBAAwE,CAAC;IAC7E,MAAM,wBAAwB,GAAG,IAAI,OAAO,CAA4B,CAAC,OAAO,EAAE,EAAE;QACnF,wBAAwB,GAAG,OAAO,CAAC;IACpC,CAAC,CAAC,CAAC;IACH,IAAI,GAAG,GAAG,EAAE,CAAC;IAEb,KAAK,SAAS,CAAC,CAAC,IAAI;QACnB,IAAI,CAAC;YACJ,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;gBAClC,IAAI,gBAAgB,CAAC,KAAK,CAAC;oBAAE,GAAG,IAAI,KAAK,CAAC,KAAK,CAAC;gBAChD,MAAM,KAAK,CAAC;YACb,CAAC;QACF,CAAC;gBAAS,CAAC;YACV,WAAW,CAAC,GAAG,CAAC,CAAC;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AA6B,EAAC,kBAAkB,CAAC,CAAC;QACjE,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC;YACrD,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;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;;kDApKY,uCAAuC;IADnD,IAAA,YAAO,GAAE;qCAGwB,8BAAa,EACN,6CAAoB,EAC/B,sBAAS,EACG,+CAAqB,EAC/B,yCAAkB,EAClB,yCAAkB;GAPrC,uCAAuC,CAoKnD"}
@@ -0,0 +1,38 @@
1
+ import { Logger } from '@n8n/backend-common';
2
+ import { AgentsConfig } from '@n8n/config';
3
+ import { ErrorReporter, InstanceSettings } from 'n8n-core';
4
+ import { AgentChannelStatusReporter } from './agent-channel-status-reporter';
5
+ import { ChatIntegrationRegistry } from './agent-chat-integration';
6
+ import { ChatIntegrationService } from './chat-integration.service';
7
+ import { AgentChannelStatusRepository } from '../repositories/agent-channel-status.repository';
8
+ import { AgentRepository } from '../repositories/agent.repository';
9
+ export type ChannelReconcileReason = 'startup' | 'leader-takeover' | 'interval';
10
+ export declare class AgentChannelReconciler {
11
+ private readonly logger;
12
+ private readonly agentsConfig;
13
+ private readonly agentRepository;
14
+ private readonly channelStatusRepository;
15
+ private readonly statusReporter;
16
+ private readonly chatIntegrationService;
17
+ private readonly integrationRegistry;
18
+ private readonly instanceSettings;
19
+ private readonly errorReporter;
20
+ private reconcileInterval;
21
+ private isInitialized;
22
+ private isShuttingDown;
23
+ private inFlight;
24
+ constructor(logger: Logger, agentsConfig: AgentsConfig, agentRepository: AgentRepository, channelStatusRepository: AgentChannelStatusRepository, statusReporter: AgentChannelStatusReporter, chatIntegrationService: ChatIntegrationService, integrationRegistry: ChatIntegrationRegistry, instanceSettings: InstanceSettings, errorReporter: ErrorReporter);
25
+ init(): void;
26
+ shutdown(): Promise<void>;
27
+ private settleInFlight;
28
+ reconcileOnLeaderTakeover(): Promise<void>;
29
+ reconcile(reason: ChannelReconcileReason): Promise<void>;
30
+ private runPass;
31
+ private runsHere;
32
+ private settleWanted;
33
+ private affirmRunning;
34
+ private releaseGhosts;
35
+ private forgetOwnOrphans;
36
+ private sweepExpired;
37
+ private refOf;
38
+ }