n8n 2.22.4 → 2.23.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 (626) hide show
  1. package/dist/auth/auth.service.d.ts +2 -0
  2. package/dist/auth/auth.service.js +15 -4
  3. package/dist/auth/auth.service.js.map +1 -1
  4. package/dist/build.tsbuildinfo +1 -1
  5. package/dist/chat/chat-service.types.d.ts +4 -4
  6. package/dist/commands/execute.d.ts +2 -2
  7. package/dist/commands/export/workflow.js +1 -0
  8. package/dist/commands/export/workflow.js.map +1 -1
  9. package/dist/commands/license/info.js +4 -4
  10. package/dist/commands/license/info.js.map +1 -1
  11. package/dist/commands/start.js +21 -1
  12. package/dist/commands/start.js.map +1 -1
  13. package/dist/constants.js +1 -0
  14. package/dist/constants.js.map +1 -1
  15. package/dist/controllers/annotation-tags.controller.ee.d.ts +1 -1
  16. package/dist/controllers/e2e.controller.js +1 -0
  17. package/dist/controllers/e2e.controller.js.map +1 -1
  18. package/dist/controllers/oauth/oauth1-credential.controller.d.ts +1 -1
  19. package/dist/controllers/oauth/oauth1-credential.controller.js +4 -7
  20. package/dist/controllers/oauth/oauth1-credential.controller.js.map +1 -1
  21. package/dist/controllers/oauth/oauth2-credential.controller.js +3 -6
  22. package/dist/controllers/oauth/oauth2-credential.controller.js.map +1 -1
  23. package/dist/controllers/redaction-enforcement-mapper.d.ts +3 -0
  24. package/dist/controllers/redaction-enforcement-mapper.js +27 -0
  25. package/dist/controllers/redaction-enforcement-mapper.js.map +1 -0
  26. package/dist/controllers/security-settings.controller.d.ts +8 -2
  27. package/dist/controllers/security-settings.controller.js +35 -25
  28. package/dist/controllers/security-settings.controller.js.map +1 -1
  29. package/dist/credentials/credential-connection-status-provider.interface.d.ts +3 -0
  30. package/dist/credentials/credential-connection-status-provider.interface.js +3 -0
  31. package/dist/credentials/credential-connection-status-provider.interface.js.map +1 -0
  32. package/dist/credentials/credential-connection-status-proxy.d.ts +6 -0
  33. package/dist/credentials/credential-connection-status-proxy.js +25 -0
  34. package/dist/credentials/credential-connection-status-proxy.js.map +1 -0
  35. package/dist/credentials/credential-resolution-provider.interface.d.ts +1 -0
  36. package/dist/credentials/credentials.controller.d.ts +2 -0
  37. package/dist/credentials/credentials.service.d.ts +10 -1
  38. package/dist/credentials/credentials.service.ee.d.ts +2 -0
  39. package/dist/credentials/credentials.service.ee.js +13 -3
  40. package/dist/credentials/credentials.service.ee.js.map +1 -1
  41. package/dist/credentials/credentials.service.js +34 -7
  42. package/dist/credentials/credentials.service.js.map +1 -1
  43. package/dist/credentials/dynamic-credentials-proxy.d.ts +2 -0
  44. package/dist/credentials/dynamic-credentials-proxy.js +9 -0
  45. package/dist/credentials/dynamic-credentials-proxy.js.map +1 -1
  46. package/dist/credentials-helper.js +2 -1
  47. package/dist/credentials-helper.js.map +1 -1
  48. package/dist/errors/feature-not-licensed.error.d.ts +3 -1
  49. package/dist/errors/feature-not-licensed.error.js +2 -2
  50. package/dist/errors/feature-not-licensed.error.js.map +1 -1
  51. package/dist/evaluation.ee/evaluation-collection.service.js +2 -0
  52. package/dist/evaluation.ee/evaluation-collection.service.js.map +1 -1
  53. package/dist/evaluation.ee/insights/eval-insights.controller.ee.d.ts +41 -0
  54. package/dist/evaluation.ee/insights/eval-insights.controller.ee.js +62 -0
  55. package/dist/evaluation.ee/insights/eval-insights.controller.ee.js.map +1 -0
  56. package/dist/evaluation.ee/insights/eval-insights.service.d.ts +25 -0
  57. package/dist/evaluation.ee/insights/eval-insights.service.js +206 -0
  58. package/dist/evaluation.ee/insights/eval-insights.service.js.map +1 -0
  59. package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +3 -2
  60. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +16 -2
  61. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
  62. package/dist/events/relays/telemetry.event-relay.d.ts +3 -1
  63. package/dist/events/relays/telemetry.event-relay.js +9 -3
  64. package/dist/events/relays/telemetry.event-relay.js.map +1 -1
  65. package/dist/execution-lifecycle/execution-lifecycle-hooks.d.ts +1 -1
  66. package/dist/execution-lifecycle/execution-lifecycle-hooks.js +4 -2
  67. package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
  68. package/dist/executions/execution-data/db-store.d.ts +4 -2
  69. package/dist/executions/execution-data/db-store.js +9 -4
  70. package/dist/executions/execution-data/db-store.js.map +1 -1
  71. package/dist/executions/execution-data/missing-execution-data.error.d.ts +5 -0
  72. package/dist/executions/execution-data/missing-execution-data.error.js +11 -0
  73. package/dist/executions/execution-data/missing-execution-data.error.js.map +1 -0
  74. package/dist/executions/execution-data/types.d.ts +3 -2
  75. package/dist/executions/execution-data/types.js.map +1 -1
  76. package/dist/executions/execution-persistence.d.ts +12 -3
  77. package/dist/executions/execution-persistence.js +102 -26
  78. package/dist/executions/execution-persistence.js.map +1 -1
  79. package/dist/external-hooks.d.ts +6 -1
  80. package/dist/external-hooks.js.map +1 -1
  81. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.d.ts +3 -2
  82. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js +17 -12
  83. package/dist/instance-settings-loader/loaders/sso/provisioning.instance-settings-loader.js.map +1 -1
  84. package/dist/interfaces.d.ts +1 -0
  85. package/dist/license.d.ts +2 -0
  86. package/dist/license.js +6 -0
  87. package/dist/license.js.map +1 -1
  88. package/dist/load-nodes-and-credentials.d.ts +32 -4
  89. package/dist/manual-execution.service.js +3 -0
  90. package/dist/manual-execution.service.js.map +1 -1
  91. package/dist/modules/agents/agent-execution.service.js +5 -5
  92. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  93. package/dist/modules/agents/agent-sse-stream.js +17 -1
  94. package/dist/modules/agents/agent-sse-stream.js.map +1 -1
  95. package/dist/modules/agents/agents-tools.service.js +7 -5
  96. package/dist/modules/agents/agents-tools.service.js.map +1 -1
  97. package/dist/modules/agents/agents.controller.d.ts +29 -3
  98. package/dist/modules/agents/agents.controller.js +88 -7
  99. package/dist/modules/agents/agents.controller.js.map +1 -1
  100. package/dist/modules/agents/agents.module.d.ts +1 -1
  101. package/dist/modules/agents/agents.module.js +12 -6
  102. package/dist/modules/agents/agents.module.js.map +1 -1
  103. package/dist/modules/agents/agents.service.d.ts +7 -8
  104. package/dist/modules/agents/agents.service.js +120 -65
  105. package/dist/modules/agents/agents.service.js.map +1 -1
  106. package/dist/modules/agents/builder/agents-builder-model-recommendations.d.ts +1 -1
  107. package/dist/modules/agents/builder/agents-builder-model-recommendations.js +3 -3
  108. package/dist/modules/agents/builder/agents-builder-model-recommendations.js.map +1 -1
  109. package/dist/modules/agents/builder/agents-builder-prompts.d.ts +9 -17
  110. package/dist/modules/agents/builder/agents-builder-prompts.js +145 -549
  111. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
  112. package/dist/modules/agents/builder/agents-builder-settings.service.js +2 -2
  113. package/dist/modules/agents/builder/agents-builder-settings.service.js.map +1 -1
  114. package/dist/modules/agents/builder/agents-builder-tools.service.js +10 -10
  115. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  116. package/dist/modules/agents/builder/agents-builder.service.d.ts +3 -1
  117. package/dist/modules/agents/builder/agents-builder.service.js +58 -9
  118. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -1
  119. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +2 -2
  120. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +1 -1
  121. package/dist/modules/agents/builder/interactive/ask-llm.tool.js +2 -2
  122. package/dist/modules/agents/builder/interactive/ask-llm.tool.js.map +1 -1
  123. package/dist/modules/agents/builder/interactive/ask-question.tool.js +2 -2
  124. package/dist/modules/agents/builder/interactive/ask-question.tool.js.map +1 -1
  125. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +2 -2
  126. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  127. package/dist/modules/agents/builder/prompts/config-mutation.prompt.d.ts +1 -0
  128. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +132 -0
  129. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -0
  130. package/dist/modules/agents/builder/prompts/config-rules.prompt.d.ts +2 -0
  131. package/dist/modules/agents/builder/prompts/config-rules.prompt.js +63 -0
  132. package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -0
  133. package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +1 -0
  134. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +47 -0
  135. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js.map +1 -0
  136. package/dist/modules/agents/builder/prompts/memory.prompt.d.ts +1 -0
  137. package/dist/modules/agents/builder/prompts/memory.prompt.js +60 -0
  138. package/dist/modules/agents/builder/prompts/memory.prompt.js.map +1 -0
  139. package/dist/modules/agents/builder/prompts/tools.prompt.d.ts +1 -0
  140. package/dist/modules/agents/builder/prompts/tools.prompt.js +81 -0
  141. package/dist/modules/agents/builder/prompts/tools.prompt.js.map +1 -0
  142. package/dist/modules/agents/builder/skills/index.d.ts +2 -0
  143. package/dist/modules/agents/builder/skills/index.js +12 -0
  144. package/dist/modules/agents/builder/skills/index.js.map +1 -0
  145. package/dist/modules/agents/builder/skills/integrations.skill.d.ts +2 -0
  146. package/dist/modules/agents/builder/skills/integrations.skill.js +53 -0
  147. package/dist/modules/agents/builder/skills/integrations.skill.js.map +1 -0
  148. package/dist/modules/agents/builder/skills/research.skill.d.ts +2 -0
  149. package/dist/modules/agents/builder/skills/research.skill.js +42 -0
  150. package/dist/modules/agents/builder/skills/research.skill.js.map +1 -0
  151. package/dist/modules/agents/builder/skills/target-skills.skill.d.ts +2 -0
  152. package/dist/modules/agents/builder/skills/target-skills.skill.js +59 -0
  153. package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -0
  154. package/dist/modules/agents/entities/{agent-published-version.entity.d.ts → agent-history.entity.d.ts} +4 -7
  155. package/dist/modules/agents/entities/{agent-published-version.entity.js → agent-history.entity.js} +22 -34
  156. package/dist/modules/agents/entities/agent-history.entity.js.map +1 -0
  157. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.d.ts +7 -0
  158. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js +38 -0
  159. package/dist/modules/agents/entities/agent-memory-entry-cursor.entity.js.map +1 -0
  160. package/dist/modules/agents/entities/agent-memory-entry-lock.entity.d.ts +7 -0
  161. package/dist/modules/{instance-ai/entities/instance-ai-workflow-snapshot.entity.js → agents/entities/agent-memory-entry-lock.entity.js} +16 -19
  162. package/dist/modules/agents/entities/agent-memory-entry-lock.entity.js.map +1 -0
  163. package/dist/modules/agents/entities/agent-memory-entry-source.entity.d.ts +9 -0
  164. package/dist/modules/agents/entities/agent-memory-entry-source.entity.js +49 -0
  165. package/dist/modules/agents/entities/agent-memory-entry-source.entity.js.map +1 -0
  166. package/dist/modules/agents/entities/agent-memory-entry.entity.d.ts +15 -0
  167. package/dist/modules/agents/entities/agent-memory-entry.entity.js +65 -0
  168. package/dist/modules/agents/entities/agent-memory-entry.entity.js.map +1 -0
  169. package/dist/modules/agents/entities/agent-observation-cursor.entity.d.ts +2 -3
  170. package/dist/modules/agents/entities/agent-observation-cursor.entity.js +5 -4
  171. package/dist/modules/agents/entities/agent-observation-cursor.entity.js.map +1 -1
  172. package/dist/modules/agents/entities/agent-observation-lock.entity.d.ts +2 -3
  173. package/dist/modules/agents/entities/agent-observation-lock.entity.js +5 -4
  174. package/dist/modules/agents/entities/agent-observation-lock.entity.js.map +1 -1
  175. package/dist/modules/agents/entities/agent-observation.entity.d.ts +2 -3
  176. package/dist/modules/agents/entities/agent-observation.entity.js +6 -5
  177. package/dist/modules/agents/entities/agent-observation.entity.js.map +1 -1
  178. package/dist/modules/agents/entities/agent.entity.d.ts +3 -5
  179. package/dist/modules/agents/entities/agent.entity.js +7 -14
  180. package/dist/modules/agents/entities/agent.entity.js.map +1 -1
  181. package/dist/modules/agents/episodic-memory.d.ts +2 -0
  182. package/dist/modules/agents/episodic-memory.js +12 -0
  183. package/dist/modules/agents/episodic-memory.js.map +1 -0
  184. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +2 -1
  185. package/dist/modules/agents/integrations/agent-chat-bridge.js +19 -5
  186. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  187. package/dist/modules/agents/integrations/agent-schedule.service.js +10 -6
  188. package/dist/modules/agents/integrations/agent-schedule.service.js.map +1 -1
  189. package/dist/modules/agents/integrations/chat-integration.service.js +1 -1
  190. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  191. package/dist/modules/agents/integrations/n8n-memory.d.ts +41 -18
  192. package/dist/modules/agents/integrations/n8n-memory.js +519 -77
  193. package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
  194. package/dist/modules/agents/integrations/platforms/slack-integration.js +2 -12
  195. package/dist/modules/agents/integrations/platforms/slack-integration.js.map +1 -1
  196. package/dist/modules/agents/integrations/rich-interaction-tool.d.ts +1 -1
  197. package/dist/modules/agents/integrations/rich-interaction-tool.js +2 -2
  198. package/dist/modules/agents/integrations/rich-interaction-tool.js.map +1 -1
  199. package/dist/modules/agents/integrations/slack-app-setup.service.d.ts +52 -0
  200. package/dist/modules/agents/integrations/slack-app-setup.service.js +316 -0
  201. package/dist/modules/agents/integrations/slack-app-setup.service.js.map +1 -0
  202. package/dist/modules/agents/json-config/from-json-config.d.ts +2 -3
  203. package/dist/modules/agents/json-config/from-json-config.js +76 -61
  204. package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
  205. package/dist/modules/agents/json-config/schema-text-serializer.js +2 -1
  206. package/dist/modules/agents/json-config/schema-text-serializer.js.map +1 -1
  207. package/dist/modules/agents/repositories/agent-history.repository.d.ts +19 -0
  208. package/dist/modules/agents/repositories/agent-history.repository.js +51 -0
  209. package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -0
  210. package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.d.ts +5 -0
  211. package/dist/modules/{instance-ai/repositories/instance-ai-workflow-snapshot.repository.js → agents/repositories/agent-memory-entry-cursor.repository.js} +8 -8
  212. package/dist/modules/agents/repositories/agent-memory-entry-cursor.repository.js.map +1 -0
  213. package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.d.ts +5 -0
  214. package/dist/modules/{instance-ai/repositories/instance-ai-observational-memory.repository.js → agents/repositories/agent-memory-entry-lock.repository.js} +8 -8
  215. package/dist/modules/agents/repositories/agent-memory-entry-lock.repository.js.map +1 -0
  216. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.d.ts +5 -0
  217. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js +26 -0
  218. package/dist/modules/agents/repositories/agent-memory-entry-source.repository.js.map +1 -0
  219. package/dist/modules/agents/repositories/agent-memory-entry.repository.d.ts +5 -0
  220. package/dist/modules/agents/repositories/agent-memory-entry.repository.js +26 -0
  221. package/dist/modules/agents/repositories/agent-memory-entry.repository.js.map +1 -0
  222. package/dist/modules/agents/repositories/agent.repository.js +3 -3
  223. package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
  224. package/dist/modules/agents/runtime/agent-secure-runtime.js +5 -5
  225. package/dist/modules/agents/runtime/agent-secure-runtime.js.map +1 -1
  226. package/dist/modules/agents/tools/environment-tool.d.ts +1 -1
  227. package/dist/modules/agents/tools/environment-tool.js +3 -3
  228. package/dist/modules/agents/tools/environment-tool.js.map +1 -1
  229. package/dist/modules/agents/tools/node-tool-factory.js +5 -5
  230. package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
  231. package/dist/modules/agents/tools/workflow-tool-factory.js +3 -3
  232. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  233. package/dist/modules/agents/tracing/builder-telemetry.d.ts +2 -3
  234. package/dist/modules/agents/tracing/builder-telemetry.js +36 -3
  235. package/dist/modules/agents/tracing/builder-telemetry.js.map +1 -1
  236. package/dist/modules/agents/utils/agent-draft.utils.js +1 -2
  237. package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
  238. package/dist/modules/agents/utils/agent-memory-scope.d.ts +3 -0
  239. package/dist/modules/agents/utils/agent-memory-scope.js +15 -0
  240. package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -0
  241. package/dist/modules/chat-hub/chat-hub.constants.js +4 -0
  242. package/dist/modules/chat-hub/chat-hub.constants.js.map +1 -1
  243. package/dist/modules/chat-hub/context-limits.js +1 -0
  244. package/dist/modules/chat-hub/context-limits.js.map +1 -1
  245. package/dist/modules/dynamic-credentials.ee/constants.d.ts +3 -0
  246. package/dist/modules/dynamic-credentials.ee/constants.js +7 -0
  247. package/dist/modules/dynamic-credentials.ee/constants.js.map +1 -0
  248. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +14 -2
  249. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
  250. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.d.ts +2 -2
  251. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js +18 -4
  252. package/dist/modules/dynamic-credentials.ee/credential-resolvers.controller.js.map +1 -1
  253. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.d.ts +1 -1
  254. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js +4 -1
  255. package/dist/modules/dynamic-credentials.ee/dynamic-credentials.module.js.map +1 -1
  256. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.d.ts +4 -0
  257. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js +11 -0
  258. package/dist/modules/dynamic-credentials.ee/errors/system-resolver-modification.error.js.map +1 -0
  259. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.d.ts +7 -0
  260. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js +40 -0
  261. package/dist/modules/dynamic-credentials.ee/services/credential-connection-status.service.js.map +1 -0
  262. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.d.ts +3 -1
  263. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js +6 -3
  264. package/dist/modules/dynamic-credentials.ee/services/credential-resolver-workflow.service.js.map +1 -1
  265. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.d.ts +2 -0
  266. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js +22 -0
  267. package/dist/modules/dynamic-credentials.ee/services/credential-resolver.service.js.map +1 -1
  268. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.d.ts +3 -1
  269. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js +7 -3
  270. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential-storage.service.js.map +1 -1
  271. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.d.ts +4 -1
  272. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js +11 -3
  273. package/dist/modules/dynamic-credentials.ee/services/dynamic-credential.service.js.map +1 -1
  274. package/dist/modules/dynamic-credentials.ee/services/index.d.ts +2 -0
  275. package/dist/modules/dynamic-credentials.ee/services/index.js +2 -0
  276. package/dist/modules/dynamic-credentials.ee/services/index.js.map +1 -1
  277. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.d.ts +14 -0
  278. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js +70 -0
  279. package/dist/modules/dynamic-credentials.ee/services/n8n-resolver-seeder.service.js.map +1 -0
  280. package/dist/modules/insights/insights-collection.service.js +1 -1
  281. package/dist/modules/insights/insights-collection.service.js.map +1 -1
  282. package/dist/modules/instance-ai/entities/index.d.ts +6 -2
  283. package/dist/modules/instance-ai/entities/index.js +9 -5
  284. package/dist/modules/instance-ai/entities/index.js.map +1 -1
  285. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.d.ts +12 -0
  286. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js +54 -0
  287. package/dist/modules/instance-ai/entities/instance-ai-checkpoint.entity.js.map +1 -0
  288. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.d.ts +6 -0
  289. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js +33 -0
  290. package/dist/modules/instance-ai/entities/instance-ai-observation-cursor.entity.js.map +1 -0
  291. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.d.ts +8 -0
  292. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js +37 -0
  293. package/dist/modules/instance-ai/entities/instance-ai-observation-lock.entity.js.map +1 -0
  294. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.d.ts +12 -0
  295. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js +52 -0
  296. package/dist/modules/instance-ai/entities/instance-ai-observation.entity.js.map +1 -0
  297. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.d.ts +19 -0
  298. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js +82 -0
  299. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js.map +1 -0
  300. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.d.ts +2 -0
  301. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js +8 -0
  302. package/dist/modules/instance-ai/entities/instance-ai-run-snapshot.entity.js.map +1 -1
  303. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.d.ts +12 -2
  304. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js +40 -4
  305. package/dist/modules/instance-ai/eval/eval-mocked-credentials-helper.js.map +1 -1
  306. package/dist/modules/instance-ai/eval/execution.service.d.ts +8 -2
  307. package/dist/modules/instance-ai/eval/execution.service.js +137 -47
  308. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  309. package/dist/modules/instance-ai/eval/llm-wire-server.d.ts +31 -0
  310. package/dist/modules/instance-ai/eval/llm-wire-server.js +127 -0
  311. package/dist/modules/instance-ai/eval/llm-wire-server.js.map +1 -0
  312. package/dist/modules/instance-ai/eval/openai-envelope.d.ts +6 -0
  313. package/dist/modules/instance-ai/eval/openai-envelope.js +96 -0
  314. package/dist/modules/instance-ai/eval/openai-envelope.js.map +1 -0
  315. package/dist/modules/instance-ai/eval/proxy-loopback.d.ts +1 -0
  316. package/dist/modules/instance-ai/eval/proxy-loopback.js +44 -0
  317. package/dist/modules/instance-ai/eval/proxy-loopback.js.map +1 -0
  318. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js +29 -7
  319. package/dist/modules/instance-ai/eval/sub-agent-eval.service.js.map +1 -1
  320. package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +7 -1
  321. package/dist/modules/instance-ai/eval/workflow-analysis.js +178 -3
  322. package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
  323. package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +6 -6
  324. package/dist/modules/instance-ai/instance-ai-memory.service.js +44 -85
  325. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  326. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +2 -1
  327. package/dist/modules/instance-ai/instance-ai-settings.service.js +11 -22
  328. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  329. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +2 -0
  330. package/dist/modules/instance-ai/instance-ai.adapter.service.js +105 -13
  331. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  332. package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
  333. package/dist/modules/instance-ai/instance-ai.module.js +10 -6
  334. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  335. package/dist/modules/instance-ai/instance-ai.service.d.ts +34 -12
  336. package/dist/modules/instance-ai/instance-ai.service.js +724 -264
  337. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  338. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.d.ts +4 -1
  339. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js +3 -1
  340. package/dist/modules/instance-ai/liveness/instance-ai-liveness.service.js.map +1 -1
  341. package/dist/modules/instance-ai/message-parser.d.ts +3 -3
  342. package/dist/modules/instance-ai/message-parser.js +65 -61
  343. package/dist/modules/instance-ai/message-parser.js.map +1 -1
  344. package/dist/modules/instance-ai/node-definition-resolver.js +12 -48
  345. package/dist/modules/instance-ai/node-definition-resolver.js.map +1 -1
  346. package/dist/modules/instance-ai/repositories/index.d.ts +4 -2
  347. package/dist/modules/instance-ai/repositories/index.js +9 -5
  348. package/dist/modules/instance-ai/repositories/index.js.map +1 -1
  349. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.d.ts +5 -0
  350. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js +26 -0
  351. package/dist/modules/instance-ai/repositories/instance-ai-checkpoint.repository.js.map +1 -0
  352. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.d.ts +5 -0
  353. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js +26 -0
  354. package/dist/modules/instance-ai/repositories/instance-ai-observation-cursor.repository.js.map +1 -0
  355. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.d.ts +5 -0
  356. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js +26 -0
  357. package/dist/modules/instance-ai/repositories/instance-ai-observation-lock.repository.js.map +1 -0
  358. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.d.ts +5 -0
  359. package/dist/modules/{agents/repositories/agent-published-version.repository.js → instance-ai/repositories/instance-ai-observation.repository.js} +8 -17
  360. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.js.map +1 -0
  361. package/dist/modules/instance-ai/storage/db-snapshot-storage.d.ts +2 -0
  362. package/dist/modules/instance-ai/storage/db-snapshot-storage.js +12 -2
  363. package/dist/modules/instance-ai/storage/db-snapshot-storage.js.map +1 -1
  364. package/dist/modules/instance-ai/storage/index.d.ts +2 -3
  365. package/dist/modules/instance-ai/storage/index.js +5 -7
  366. package/dist/modules/instance-ai/storage/index.js.map +1 -1
  367. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.d.ts +15 -0
  368. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js +94 -0
  369. package/dist/modules/instance-ai/storage/typeorm-agent-checkpoint-store.js.map +1 -0
  370. package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +94 -0
  371. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +324 -0
  372. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -0
  373. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.d.ts +37 -0
  374. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +212 -0
  375. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -0
  376. package/dist/modules/instance-ai/web-research/fetch-and-extract.js +34 -11
  377. package/dist/modules/instance-ai/web-research/fetch-and-extract.js.map +1 -1
  378. package/dist/modules/mcp/mcp.service.js +5 -5
  379. package/dist/modules/mcp/mcp.service.js.map +1 -1
  380. package/dist/modules/mcp/tools/schemas.d.ts +24 -24
  381. package/dist/modules/mcp/tools/search-projects.tool.js +59 -13
  382. package/dist/modules/mcp/tools/search-projects.tool.js.map +1 -1
  383. package/dist/modules/mcp/tools/test-workflow.tool.d.ts +2 -2
  384. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.d.ts +35 -0
  385. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js +88 -0
  386. package/dist/modules/mcp/tools/workflow-builder/connection-structure-check.js.map +1 -0
  387. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.d.ts +3 -2
  388. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js +41 -9
  389. package/dist/modules/mcp/tools/workflow-builder/create-workflow-from-code.tool.js.map +1 -1
  390. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.d.ts +13 -0
  391. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js +87 -0
  392. package/dist/modules/mcp/tools/workflow-builder/data-table-validation.js.map +1 -0
  393. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +2 -1
  394. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +42 -6
  395. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  396. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.d.ts +2 -1
  397. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js +5 -1
  398. package/dist/modules/mcp/tools/workflow-builder/validate-workflow-code.tool.js.map +1 -1
  399. package/dist/modules/mcp/tools/workflow-validation.utils.js +1 -1
  400. package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
  401. package/dist/modules/mcp-registry/mcp-registry-test.controller.js +5 -1
  402. package/dist/modules/mcp-registry/mcp-registry-test.controller.js.map +1 -1
  403. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +18 -0
  404. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +73 -0
  405. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -0
  406. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +5 -0
  407. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +31 -0
  408. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -0
  409. package/dist/modules/n8n-packages/io/package-writer.d.ts +6 -0
  410. package/dist/{scaling/multi-main-setup.types.js → modules/n8n-packages/io/package-writer.js} +1 -1
  411. package/dist/modules/n8n-packages/io/package-writer.js.map +1 -0
  412. package/dist/modules/n8n-packages/io/slug.utils.d.ts +1 -0
  413. package/dist/modules/n8n-packages/io/slug.utils.js +16 -0
  414. package/dist/modules/n8n-packages/io/slug.utils.js.map +1 -0
  415. package/dist/modules/n8n-packages/io/tar/tar-package-writer.d.ts +9 -0
  416. package/dist/modules/n8n-packages/io/tar/tar-package-writer.js +71 -0
  417. package/dist/modules/n8n-packages/io/tar/tar-package-writer.js.map +1 -0
  418. package/dist/modules/n8n-packages/n8n-packages.controller.d.ts +10 -0
  419. package/dist/modules/n8n-packages/n8n-packages.controller.js +45 -0
  420. package/dist/modules/n8n-packages/n8n-packages.controller.js.map +1 -0
  421. package/dist/modules/{inbound-secrets/inbound-secrets.module.d.ts → n8n-packages/n8n-packages.module.d.ts} +1 -1
  422. package/dist/modules/{inbound-secrets/inbound-secrets.module.js → n8n-packages/n8n-packages.module.js} +12 -16
  423. package/dist/modules/n8n-packages/n8n-packages.module.js.map +1 -0
  424. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +10 -0
  425. package/dist/modules/n8n-packages/n8n-packages.service.js +49 -0
  426. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -0
  427. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +5 -0
  428. package/dist/modules/n8n-packages/n8n-packages.types.js +3 -0
  429. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -0
  430. package/dist/modules/n8n-packages/spec/constants.d.ts +1 -0
  431. package/dist/modules/n8n-packages/spec/constants.js +5 -0
  432. package/dist/modules/n8n-packages/spec/constants.js.map +1 -0
  433. package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +55 -0
  434. package/dist/modules/n8n-packages/spec/manifest.schema.js +17 -0
  435. package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -0
  436. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +169 -0
  437. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +46 -0
  438. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +1 -0
  439. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.d.ts +5 -1
  440. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js +18 -2
  441. package/dist/modules/oauth-jwe/oauth-jwe-decrypt.service.js.map +1 -1
  442. package/dist/modules/oauth-jwe/oauth-jwe.utils.js +27 -2
  443. package/dist/modules/oauth-jwe/oauth-jwe.utils.js.map +1 -1
  444. package/dist/modules/otel/execution-level-tracer.js +1 -0
  445. package/dist/modules/otel/execution-level-tracer.js.map +1 -1
  446. package/dist/modules/otel/execution-level-tracer.types.d.ts +11 -6
  447. package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
  448. package/dist/modules/otel/otel-lifecycle-handler.d.ts +5 -1
  449. package/dist/modules/otel/otel-lifecycle-handler.js +30 -2
  450. package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
  451. package/dist/modules/otel/otel.constants.d.ts +1 -0
  452. package/dist/modules/otel/otel.constants.js +1 -0
  453. package/dist/modules/otel/otel.constants.js.map +1 -1
  454. package/dist/modules/runtime-credentials/path-traversal.js.map +1 -0
  455. package/dist/modules/runtime-credentials/runtime-credentials-access.service.d.ts +8 -0
  456. package/dist/modules/runtime-credentials/runtime-credentials-access.service.js +35 -0
  457. package/dist/modules/runtime-credentials/runtime-credentials-access.service.js.map +1 -0
  458. package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.d.ts → runtime-credentials/runtime-credentials-context-hook.d.ts} +4 -5
  459. package/dist/modules/{inbound-secrets/inbound-secrets-context-hook.js → runtime-credentials/runtime-credentials-context-hook.js} +14 -22
  460. package/dist/modules/runtime-credentials/runtime-credentials-context-hook.js.map +1 -0
  461. package/dist/modules/runtime-credentials/runtime-credentials.config.d.ts +3 -0
  462. package/dist/modules/{inbound-secrets/inbound-secrets.config.js → runtime-credentials/runtime-credentials.config.js} +7 -7
  463. package/dist/modules/runtime-credentials/runtime-credentials.config.js.map +1 -0
  464. package/dist/modules/runtime-credentials/runtime-credentials.module.d.ts +4 -0
  465. package/dist/modules/runtime-credentials/runtime-credentials.module.js +65 -0
  466. package/dist/modules/runtime-credentials/runtime-credentials.module.js.map +1 -0
  467. package/dist/modules/runtime-credentials/runtime-credentials.schemas.d.ts +23 -0
  468. package/dist/modules/runtime-credentials/runtime-credentials.schemas.js +10 -0
  469. package/dist/modules/runtime-credentials/runtime-credentials.schemas.js.map +1 -0
  470. package/dist/modules/runtime-credentials/runtime-credentials.service.d.ts +18 -0
  471. package/dist/modules/{inbound-secrets/inbound-secrets.service.js → runtime-credentials/runtime-credentials.service.js} +31 -28
  472. package/dist/modules/runtime-credentials/runtime-credentials.service.js.map +1 -0
  473. package/dist/modules/source-control.ee/source-control-export.service.ee.d.ts +1 -1
  474. package/dist/modules/source-control.ee/source-control-export.service.ee.js +3 -1
  475. package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
  476. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +2 -2
  477. package/dist/modules/source-control.ee/source-control-import.service.ee.js +29 -8
  478. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  479. package/dist/modules/source-control.ee/source-control-status.service.ee.js +4 -4
  480. package/dist/modules/source-control.ee/source-control-status.service.ee.js.map +1 -1
  481. package/dist/modules/source-control.ee/source-control.controller.ee.d.ts +2 -2
  482. package/dist/modules/source-control.ee/source-control.service.ee.d.ts +1 -1
  483. package/dist/modules/source-control.ee/types/exportable-workflow.d.ts +2 -1
  484. package/dist/modules/sso-saml/saml.service.ee.js +5 -1
  485. package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
  486. package/dist/modules/workflow-index/workflow-dependency.controller.d.ts +1 -4
  487. package/dist/modules/workflow-index/workflow-dependency.controller.js +2 -13
  488. package/dist/modules/workflow-index/workflow-dependency.controller.js.map +1 -1
  489. package/dist/node-catalog/node-catalog.service.d.ts +1 -2
  490. package/dist/node-catalog/node-catalog.service.js +6 -10
  491. package/dist/node-catalog/node-catalog.service.js.map +1 -1
  492. package/dist/node-execution/ephemeral-node-executor.js +19 -11
  493. package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
  494. package/dist/oauth/oauth-jwe-service.proxy.d.ts +12 -2
  495. package/dist/oauth/oauth-jwe-service.proxy.js +5 -0
  496. package/dist/oauth/oauth-jwe-service.proxy.js.map +1 -1
  497. package/dist/oauth/oauth.service.d.ts +6 -1
  498. package/dist/oauth/oauth.service.js +42 -4
  499. package/dist/oauth/oauth.service.js.map +1 -1
  500. package/dist/permissions.ee/check-access.d.ts +2 -2
  501. package/dist/permissions.ee/check-access.js +15 -11
  502. package/dist/permissions.ee/check-access.js.map +1 -1
  503. package/dist/posthog/index.d.ts +2 -0
  504. package/dist/posthog/index.js +28 -6
  505. package/dist/posthog/index.js.map +1 -1
  506. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +10 -0
  507. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +42 -0
  508. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -0
  509. package/dist/public-api/v1/openapi.yml +55 -0
  510. package/dist/requests.d.ts +1 -1
  511. package/dist/scaling/constants.js +3 -0
  512. package/dist/scaling/constants.js.map +1 -1
  513. package/dist/scaling/multi-main-setup.ee.d.ts +12 -7
  514. package/dist/scaling/multi-main-setup.ee.js +125 -22
  515. package/dist/scaling/multi-main-setup.ee.js.map +1 -1
  516. package/dist/server.d.ts +1 -0
  517. package/dist/server.js +3 -4
  518. package/dist/server.js.map +1 -1
  519. package/dist/services/dynamic-node-parameters.service.d.ts +0 -1
  520. package/dist/services/dynamic-node-parameters.service.js +6 -14
  521. package/dist/services/dynamic-node-parameters.service.js.map +1 -1
  522. package/dist/services/frontend.service.js +1 -1
  523. package/dist/services/frontend.service.js.map +1 -1
  524. package/dist/services/import.service.js +3 -1
  525. package/dist/services/import.service.js.map +1 -1
  526. package/dist/services/proxy-token-manager.js +2 -13
  527. package/dist/services/proxy-token-manager.js.map +1 -1
  528. package/dist/services/runtime-credential-proxy.service.d.ts +9 -0
  529. package/dist/services/runtime-credential-proxy.service.js +29 -0
  530. package/dist/services/runtime-credential-proxy.service.js.map +1 -0
  531. package/dist/services/url.service.d.ts +1 -0
  532. package/dist/services/url.service.js +3 -0
  533. package/dist/services/url.service.js.map +1 -1
  534. package/dist/telemetry/index.d.ts +4 -1
  535. package/dist/telemetry/index.js +16 -8
  536. package/dist/telemetry/index.js.map +1 -1
  537. package/dist/utils.d.ts +2 -1
  538. package/dist/utils.js +10 -0
  539. package/dist/utils.js.map +1 -1
  540. package/dist/webhooks/live-webhooks.js +2 -2
  541. package/dist/webhooks/live-webhooks.js.map +1 -1
  542. package/dist/webhooks/webhook-helpers.js +1 -1
  543. package/dist/webhooks/webhook-helpers.js.map +1 -1
  544. package/dist/workflow-execute-additional-data.d.ts +3 -1
  545. package/dist/workflow-execute-additional-data.js +26 -3
  546. package/dist/workflow-execute-additional-data.js.map +1 -1
  547. package/dist/workflow-helpers.d.ts +3 -1
  548. package/dist/workflow-helpers.js +39 -5
  549. package/dist/workflow-helpers.js.map +1 -1
  550. package/dist/workflow-hook-context.service.d.ts +6 -0
  551. package/dist/workflow-hook-context.service.js +32 -0
  552. package/dist/workflow-hook-context.service.js.map +1 -0
  553. package/dist/workflow-runner.js +2 -1
  554. package/dist/workflow-runner.js.map +1 -1
  555. package/dist/workflows/utils.d.ts +3 -0
  556. package/dist/workflows/utils.js +19 -0
  557. package/dist/workflows/utils.js.map +1 -1
  558. package/dist/workflows/workflow-creation.service.js +4 -2
  559. package/dist/workflows/workflow-creation.service.js.map +1 -1
  560. package/dist/workflows/workflow-execution.service.d.ts +4 -3
  561. package/dist/workflows/workflow-execution.service.js +8 -3
  562. package/dist/workflows/workflow-execution.service.js.map +1 -1
  563. package/dist/workflows/workflow-finder.service.d.ts +6 -2
  564. package/dist/workflows/workflow-finder.service.js +18 -0
  565. package/dist/workflows/workflow-finder.service.js.map +1 -1
  566. package/dist/workflows/workflow-history/workflow-history.controller.d.ts +1 -1
  567. package/dist/workflows/workflow-history/workflow-history.service.d.ts +2 -1
  568. package/dist/workflows/workflow-history/workflow-history.service.js +1 -0
  569. package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
  570. package/dist/workflows/workflow-validation.service.d.ts +3 -1
  571. package/dist/workflows/workflow-validation.service.js +6 -3
  572. package/dist/workflows/workflow-validation.service.js.map +1 -1
  573. package/dist/workflows/workflow.service.d.ts +3 -3
  574. package/dist/workflows/workflow.service.js +26 -4
  575. package/dist/workflows/workflow.service.js.map +1 -1
  576. package/dist/workflows/workflows.controller.d.ts +31 -21
  577. package/dist/workflows/workflows.controller.js +6 -2
  578. package/dist/workflows/workflows.controller.js.map +1 -1
  579. package/package.json +36 -34
  580. package/dist/modules/agents/entities/agent-published-version.entity.js.map +0 -1
  581. package/dist/modules/agents/repositories/agent-published-version.repository.d.ts +0 -20
  582. package/dist/modules/agents/repositories/agent-published-version.repository.js.map +0 -1
  583. package/dist/modules/inbound-secrets/inbound-secrets-context-hook.js.map +0 -1
  584. package/dist/modules/inbound-secrets/inbound-secrets.config.d.ts +0 -3
  585. package/dist/modules/inbound-secrets/inbound-secrets.config.js.map +0 -1
  586. package/dist/modules/inbound-secrets/inbound-secrets.module.js.map +0 -1
  587. package/dist/modules/inbound-secrets/inbound-secrets.schemas.d.ts +0 -3
  588. package/dist/modules/inbound-secrets/inbound-secrets.schemas.js +0 -6
  589. package/dist/modules/inbound-secrets/inbound-secrets.schemas.js.map +0 -1
  590. package/dist/modules/inbound-secrets/inbound-secrets.service.d.ts +0 -17
  591. package/dist/modules/inbound-secrets/inbound-secrets.service.js.map +0 -1
  592. package/dist/modules/inbound-secrets/path-traversal.js.map +0 -1
  593. package/dist/modules/instance-ai/compaction.service.d.ts +0 -24
  594. package/dist/modules/instance-ai/compaction.service.js +0 -213
  595. package/dist/modules/instance-ai/compaction.service.js.map +0 -1
  596. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.d.ts +0 -33
  597. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js +0 -145
  598. package/dist/modules/instance-ai/entities/instance-ai-observational-memory.entity.js.map +0 -1
  599. package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.d.ts +0 -8
  600. package/dist/modules/instance-ai/entities/instance-ai-workflow-snapshot.entity.js.map +0 -1
  601. package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.d.ts +0 -5
  602. package/dist/modules/instance-ai/repositories/instance-ai-observational-memory.repository.js.map +0 -1
  603. package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.d.ts +0 -5
  604. package/dist/modules/instance-ai/repositories/instance-ai-workflow-snapshot.repository.js.map +0 -1
  605. package/dist/modules/instance-ai/snapshot-pruning.service.d.ts +0 -17
  606. package/dist/modules/instance-ai/snapshot-pruning.service.js +0 -89
  607. package/dist/modules/instance-ai/snapshot-pruning.service.js.map +0 -1
  608. package/dist/modules/instance-ai/storage/typeorm-composite-store.d.ts +0 -9
  609. package/dist/modules/instance-ai/storage/typeorm-composite-store.js +0 -33
  610. package/dist/modules/instance-ai/storage/typeorm-composite-store.js.map +0 -1
  611. package/dist/modules/instance-ai/storage/typeorm-memory-storage.d.ts +0 -96
  612. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js +0 -864
  613. package/dist/modules/instance-ai/storage/typeorm-memory-storage.js.map +0 -1
  614. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.d.ts +0 -44
  615. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js +0 -156
  616. package/dist/modules/instance-ai/storage/typeorm-workflows-storage.js.map +0 -1
  617. package/dist/scaling/multi-main-setup-legacy.d.ts +0 -25
  618. package/dist/scaling/multi-main-setup-legacy.js +0 -75
  619. package/dist/scaling/multi-main-setup-legacy.js.map +0 -1
  620. package/dist/scaling/multi-main-setup-v2.d.ts +0 -25
  621. package/dist/scaling/multi-main-setup-v2.js +0 -143
  622. package/dist/scaling/multi-main-setup-v2.js.map +0 -1
  623. package/dist/scaling/multi-main-setup.types.d.ts +0 -6
  624. package/dist/scaling/multi-main-setup.types.js.map +0 -1
  625. /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.d.ts +0 -0
  626. /package/dist/modules/{inbound-secrets → runtime-credentials}/path-traversal.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"agents.module.js","sourceRoot":"","sources":["../../../src/modules/agents/agents.module.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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E,cAAc,EAAE,GAAG,wDAAa,mCAAmC,GAAC,CAAC;QAC7E,MAAM,EAAE,YAAY,EAAE,GAAG,wDAAa,iCAAiC,GAAC,CAAC;QACzE,MAAM,EAAE,sBAAsB,EAAE,GAAG,wDAAa,qCAAqC,GAAC,CAAC;QACvF,MAAM,EAAE,4BAA4B,EAAE,GAAG,wDACxC,4CAA4C,GAC5C,CAAC;QACF,MAAM,EAAE,0BAA0B,EAAE,GAAG,wDAAa,0CAA0C,GAAC,CAAC;QAChG,MAAM,EAAE,sBAAsB,EAAE,GAAG,wDAAa,sCAAsC,GAAC,CAAC;QACxF,MAAM,EAAE,0BAA0B,EAAE,GAAG,wDACtC,2CAA2C,GAC3C,CAAC;QACF,MAAM,EAAE,4BAA4B,EAAE,GAAG,wDACxC,6CAA6C,GAC7C,CAAC;QACF,MAAM,EAAE,4BAA4B,EAAE,GAAG,wDACxC,6CAA6C,GAC7C,CAAC;QAEF,OAAO;YACN,KAAK;YACL,eAAe;YACf,mBAAmB;YACnB,iBAAiB;YACjB,kBAAkB;YAClB,oBAAoB;YACpB,cAAc;YACd,YAAY;YACZ,sBAAsB;YACtB,4BAA4B;YAC5B,0BAA0B;YAC1B,sBAAsB;YACtB,0BAA0B;YAC1B,4BAA4B;YAC5B,4BAA4B;SAC5B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,OAAO;QACZ,MAAM,EAAE,aAAa,EAAE,GAAG,wDAAa,kBAAkB,GAAC,CAAC;QAE3D,OAAO,EAAE,aAAa,EAAE,cAAS,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;IACxD,CAAC;CACD,CAAA;AA/HY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,0BAAa,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;GACrB,YAAY,CA+HxB"}
@@ -1,9 +1,8 @@
1
1
  import type { CredentialProvider, StreamChunk, ToolDescriptor } from '@n8n/agents';
2
2
  import { type AgentCredentialIntegrationConfig, type AgentJsonConfig, type AgentSkill, type AgentSkillMutationResponse, type ChatIntegrationDescriptor, AgentPersistedMessageDto } from '@n8n/api-types';
3
- import * as agents from '@n8n/agents';
4
3
  import { Logger } from '@n8n/backend-common';
5
4
  import { AgentsConfig, GlobalConfig } from '@n8n/config';
6
- import { ExecutionRepository, ProjectRelationRepository, UserRepository, WorkflowRepository } from '@n8n/db';
5
+ import { ExecutionRepository, ProjectRelationRepository, User, UserRepository, WorkflowRepository } from '@n8n/db';
7
6
  import { type ExecuteAgentData } from 'n8n-workflow';
8
7
  import { ActiveExecutions } from '../../active-executions';
9
8
  import { EphemeralNodeExecutor } from '../../node-execution';
@@ -19,7 +18,7 @@ import { AgentsToolsService } from './agents-tools.service';
19
18
  import { Agent } from './entities/agent.entity';
20
19
  import { N8NCheckpointStorage } from './integrations/n8n-checkpoint-storage';
21
20
  import { N8nMemory } from './integrations/n8n-memory';
22
- import { AgentPublishedVersionRepository } from './repositories/agent-published-version.repository';
21
+ import { AgentHistoryRepository } from './repositories/agent-history.repository';
23
22
  import { AgentRepository } from './repositories/agent.repository';
24
23
  import { AgentSecureRuntime } from './runtime/agent-secure-runtime';
25
24
  import { ChatIntegrationService } from './integrations/chat-integration.service';
@@ -73,7 +72,7 @@ export declare class AgentsService {
73
72
  private readonly agentsToolsService;
74
73
  private readonly n8nMemory;
75
74
  private readonly agentExecutionService;
76
- private readonly agentPublishedVersionRepository;
75
+ private readonly agentHistoryRepository;
77
76
  private readonly agentSkillsService;
78
77
  private readonly publisher;
79
78
  private readonly agentsConfig;
@@ -84,7 +83,7 @@ export declare class AgentsService {
84
83
  private computeRuntimeCacheKey;
85
84
  private clearRuntimes;
86
85
  handleAgentConfigChanged(payload: PubSubCommandMap['agent-config-changed']): void;
87
- constructor(logger: Logger, agentRepository: AgentRepository, projectRelationRepository: ProjectRelationRepository, workflowRunner: WorkflowRunner, activeExecutions: ActiveExecutions, executionRepository: ExecutionRepository, workflowRepository: WorkflowRepository, userRepository: UserRepository, workflowFinderService: WorkflowFinderService, urlService: UrlService, n8nCheckpointStorage: N8NCheckpointStorage, secureRuntime: AgentSecureRuntime, ephemeralNodeExecutor: EphemeralNodeExecutor, agentsToolsService: AgentsToolsService, n8nMemory: N8nMemory, agentExecutionService: AgentExecutionService, agentPublishedVersionRepository: AgentPublishedVersionRepository, agentSkillsService: AgentSkillsService, publisher: Publisher, agentsConfig: AgentsConfig, globalConfig: GlobalConfig, telemetry: Telemetry, chatIntegrationService: ChatIntegrationService);
86
+ constructor(logger: Logger, agentRepository: AgentRepository, projectRelationRepository: ProjectRelationRepository, workflowRunner: WorkflowRunner, activeExecutions: ActiveExecutions, executionRepository: ExecutionRepository, workflowRepository: WorkflowRepository, userRepository: UserRepository, workflowFinderService: WorkflowFinderService, urlService: UrlService, n8nCheckpointStorage: N8NCheckpointStorage, secureRuntime: AgentSecureRuntime, ephemeralNodeExecutor: EphemeralNodeExecutor, agentsToolsService: AgentsToolsService, n8nMemory: N8nMemory, agentExecutionService: AgentExecutionService, agentHistoryRepository: AgentHistoryRepository, agentSkillsService: AgentSkillsService, publisher: Publisher, agentsConfig: AgentsConfig, globalConfig: GlobalConfig, telemetry: Telemetry, chatIntegrationService: ChatIntegrationService);
88
87
  private isNodeToolsModuleEnabled;
89
88
  private createAgentExecutionCounter;
90
89
  private shouldAttachNodeTools;
@@ -96,7 +95,7 @@ export declare class AgentsService {
96
95
  updateDescription(agentId: string, projectId: string, description: string, updatedAt?: string): Promise<Agent | null>;
97
96
  findByUser(userId: string): Promise<Agent[]>;
98
97
  findPublishedByUser(userId: string): Promise<Agent[]>;
99
- publishAgent(agentId: string, projectId: string, userId: string): Promise<Agent>;
98
+ publishAgent(agentId: string, projectId: string, user: User, versionId?: string): Promise<Agent>;
100
99
  unpublishAgent(agentId: string, projectId: string): Promise<Agent>;
101
100
  revertToPublishedAgent(agentId: string, projectId: string): Promise<Agent>;
102
101
  delete(agentId: string, projectId: string): Promise<boolean>;
@@ -116,14 +115,14 @@ export declare class AgentsService {
116
115
  missing: string[];
117
116
  }>;
118
117
  executeForChat(config: ExecuteForChatConfig): AsyncGenerator<StreamChunk>;
119
- getTestChatMessages(agentId: string, userId: string): Promise<agents.AgentDbMessage[]>;
118
+ getTestChatMessages(agentId: string, userId: string): Promise<import("@n8n/agents").AgentDbMessage[]>;
120
119
  clearTestChatMessages(agentId: string, userId: string): Promise<void>;
121
120
  clearAllTestChatMessages(agentId: string): Promise<void>;
122
121
  executeForChatPublished(config: ExecuteForChatPublishedConfig): AsyncGenerator<StreamChunk>;
123
122
  executeForSchedulePublished(config: ExecuteForSchedulePublishedConfig): AsyncGenerator<StreamChunk>;
124
123
  private streamChatResponse;
125
124
  private compileIsolated;
126
- executeForWorkflow(agentId: string, message: string, executionId: string, threadId: string, userId: string, projectId: string): Promise<ExecuteAgentData>;
125
+ executeForWorkflow(agentId: string, message: string, executionId: string, threadId: string, userId: string, projectId: string, telemetryUserId?: string): Promise<ExecuteAgentData>;
127
126
  getConfig(agentId: string, projectId: string): Promise<AgentJsonConfig>;
128
127
  validateConfig(raw: unknown): Promise<{
129
128
  valid: true;
@@ -45,7 +45,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
45
45
  exports.AgentsService = void 0;
46
46
  exports.chatThreadId = chatThreadId;
47
47
  const api_types_1 = require("@n8n/api-types");
48
- const ai_utilities_1 = require("@n8n/ai-utilities");
48
+ const fromai_helpers_1 = require("@n8n/ai-utilities/fromai-helpers");
49
49
  const backend_common_1 = require("@n8n/backend-common");
50
50
  const config_1 = require("@n8n/config");
51
51
  const constants_1 = require("@n8n/constants");
@@ -68,6 +68,7 @@ const workflow_runner_1 = require("../../workflow-runner");
68
68
  const workflow_finder_service_1 = require("../../workflows/workflow-finder.service");
69
69
  const agents_credential_provider_1 = require("./adapters/agents-credential-provider");
70
70
  const agent_draft_utils_1 = require("./utils/agent-draft.utils");
71
+ const agent_memory_scope_1 = require("./utils/agent-memory-scope");
71
72
  const execution_to_message_mapper_1 = require("./utils/execution-to-message-mapper");
72
73
  const agent_resource_id_1 = require("./utils/agent-resource-id");
73
74
  const agent_execution_service_1 = require("./agent-execution.service");
@@ -81,7 +82,7 @@ const n8n_checkpoint_storage_1 = require("./integrations/n8n-checkpoint-storage"
81
82
  const n8n_memory_1 = require("./integrations/n8n-memory");
82
83
  const agent_config_composition_1 = require("./json-config/agent-config-composition");
83
84
  const from_json_config_1 = require("./json-config/from-json-config");
84
- const agent_published_version_repository_1 = require("./repositories/agent-published-version.repository");
85
+ const agent_history_repository_1 = require("./repositories/agent-history.repository");
85
86
  const agent_repository_1 = require("./repositories/agent.repository");
86
87
  const agent_secure_runtime_1 = require("./runtime/agent-secure-runtime");
87
88
  const tool_registry_1 = require("./tool-registry");
@@ -90,6 +91,18 @@ function chatThreadId(agentId, userId) {
90
91
  const baseThreadId = `${builder_tool_names_1.AGENT_THREAD_PREFIX.TEST}${agentId}`;
91
92
  return userId ? `${baseThreadId}:${userId}` : baseThreadId;
92
93
  }
94
+ function getMaxIterationsChunks() {
95
+ const id = crypto.randomUUID();
96
+ return [
97
+ { type: 'text-start', id },
98
+ {
99
+ type: 'text-delta',
100
+ id,
101
+ delta: 'The agent has reached the maximum number of iterations and has stopped.',
102
+ },
103
+ { type: 'text-end', id },
104
+ ];
105
+ }
93
106
  let AgentsService = class AgentsService {
94
107
  computeRuntimeCacheKey(params) {
95
108
  if (params.usePublishedVersion) {
@@ -127,7 +140,7 @@ let AgentsService = class AgentsService {
127
140
  handleAgentConfigChanged(payload) {
128
141
  this.clearRuntimes(payload.agentId, { skipBroadcast: true });
129
142
  }
130
- constructor(logger, agentRepository, projectRelationRepository, workflowRunner, activeExecutions, executionRepository, workflowRepository, userRepository, workflowFinderService, urlService, n8nCheckpointStorage, secureRuntime, ephemeralNodeExecutor, agentsToolsService, n8nMemory, agentExecutionService, agentPublishedVersionRepository, agentSkillsService, publisher, agentsConfig, globalConfig, telemetry, chatIntegrationService) {
143
+ constructor(logger, agentRepository, projectRelationRepository, workflowRunner, activeExecutions, executionRepository, workflowRepository, userRepository, workflowFinderService, urlService, n8nCheckpointStorage, secureRuntime, ephemeralNodeExecutor, agentsToolsService, n8nMemory, agentExecutionService, agentHistoryRepository, agentSkillsService, publisher, agentsConfig, globalConfig, telemetry, chatIntegrationService) {
131
144
  this.logger = logger;
132
145
  this.agentRepository = agentRepository;
133
146
  this.projectRelationRepository = projectRelationRepository;
@@ -144,7 +157,7 @@ let AgentsService = class AgentsService {
144
157
  this.agentsToolsService = agentsToolsService;
145
158
  this.n8nMemory = n8nMemory;
146
159
  this.agentExecutionService = agentExecutionService;
147
- this.agentPublishedVersionRepository = agentPublishedVersionRepository;
160
+ this.agentHistoryRepository = agentHistoryRepository;
148
161
  this.agentSkillsService = agentSkillsService;
149
162
  this.publisher = publisher;
150
163
  this.agentsConfig = agentsConfig;
@@ -156,11 +169,24 @@ let AgentsService = class AgentsService {
156
169
  isNodeToolsModuleEnabled() {
157
170
  return this.agentsConfig.modules.includes('node-tools-searcher');
158
171
  }
159
- createAgentExecutionCounter(agentId) {
172
+ createAgentExecutionCounter({ agentId, userId, }) {
173
+ const attribution = userId ? { user_id: userId } : {};
160
174
  return {
161
- incrementMessageCount: () => this.telemetry.trackAgentExecution({ agent_id: agentId, message_count: 1 }),
162
- incrementTokenCount: (tokenCount) => this.telemetry.trackAgentExecution({ agent_id: agentId, token_count: tokenCount }),
163
- incrementToolCallCount: () => this.telemetry.trackAgentExecution({ agent_id: agentId, tool_call_count: 1 }),
175
+ incrementMessageCount: () => this.telemetry.trackAgentExecution({
176
+ agent_id: agentId,
177
+ ...attribution,
178
+ message_count: 1,
179
+ }),
180
+ incrementTokenCount: (tokenCount) => this.telemetry.trackAgentExecution({
181
+ agent_id: agentId,
182
+ ...attribution,
183
+ token_count: tokenCount,
184
+ }),
185
+ incrementToolCallCount: () => this.telemetry.trackAgentExecution({
186
+ agent_id: agentId,
187
+ ...attribution,
188
+ tool_call_count: 1,
189
+ }),
164
190
  };
165
191
  }
166
192
  shouldAttachNodeTools(config) {
@@ -248,32 +274,41 @@ let AgentsService = class AgentsService {
248
274
  return [];
249
275
  const agents = await this.agentRepository.find({
250
276
  where: { projectId: (0, db_1.In)(projectIds) },
251
- relations: { publishedVersion: true },
277
+ relations: { activeVersion: true },
252
278
  order: { updatedAt: 'DESC' },
253
279
  });
254
- return agents.filter((agent) => agent.publishedVersion);
280
+ return agents.filter((agent) => agent.activeVersionId !== null);
255
281
  }
256
- async publishAgent(agentId, projectId, userId) {
282
+ async publishAgent(agentId, projectId, user, versionId) {
257
283
  const agent = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
258
284
  if (!agent) {
259
285
  throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
260
286
  }
287
+ if (!versionId && agent.versionId !== null && agent.versionId === agent.activeVersionId) {
288
+ return agent;
289
+ }
261
290
  await this.agentRepository.manager.transaction(async (trx) => {
262
- if (!agent.versionId) {
263
- agent.versionId = (0, uuid_1.v4)();
264
- await trx.save(agent);
291
+ if (versionId) {
292
+ const existing = await this.agentHistoryRepository.findByVersionAndAgentId(versionId, agentId, trx);
293
+ if (!existing) {
294
+ throw new not_found_error_1.NotFoundError(`Version "${versionId}" not found for agent "${agentId}"`);
295
+ }
296
+ agent.activeVersionId = existing.versionId;
297
+ agent.activeVersion = existing;
265
298
  }
266
- agent.publishedVersion = await this.agentPublishedVersionRepository.savePublishedVersion({
267
- agentId: agent.id,
268
- schema: agent.schema,
269
- tools: this.snapshotConfiguredTools(agent.schema, agent.tools ?? {}),
270
- skills: this.agentSkillsService.snapshotConfiguredSkills(agent.schema, agent.skills ?? {}),
271
- publishedFromVersionId: agent.versionId,
272
- model: agent.model,
273
- provider: agent.provider,
274
- credentialId: agent.credentialId,
275
- publishedById: userId,
276
- }, trx);
299
+ else {
300
+ agent.versionId ??= (0, uuid_1.v4)();
301
+ agent.activeVersion = await this.agentHistoryRepository.saveVersion({
302
+ versionId: agent.versionId,
303
+ agentId: agent.id,
304
+ schema: agent.schema,
305
+ tools: this.snapshotConfiguredTools(agent.schema, agent.tools ?? {}),
306
+ skills: this.agentSkillsService.snapshotConfiguredSkills(agent.schema, agent.skills ?? {}),
307
+ publishedBy: user,
308
+ }, trx);
309
+ agent.activeVersionId = agent.versionId;
310
+ }
311
+ await trx.save(agent);
277
312
  });
278
313
  this.clearRuntimes(agentId);
279
314
  const credentialIntegrations = (agent.integrations ?? []).filter(api_types_1.isAgentCredentialIntegration);
@@ -286,7 +321,7 @@ let AgentsService = class AgentsService {
286
321
  error,
287
322
  }));
288
323
  }
289
- this.logger.debug('Published SDK agent', { agentId, projectId, userId });
324
+ this.logger.debug('Published SDK agent', { agentId, projectId, userId: user.id });
290
325
  return agent;
291
326
  }
292
327
  async unpublishAgent(agentId, projectId) {
@@ -295,13 +330,14 @@ let AgentsService = class AgentsService {
295
330
  throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
296
331
  }
297
332
  await this.agentRepository.manager.transaction(async (trx) => {
298
- await this.agentPublishedVersionRepository.deleteByAgentId(agentId, trx);
299
- agent.publishedVersion = null;
333
+ agent.activeVersionId = null;
334
+ agent.activeVersion = null;
335
+ agent.versionId = (0, uuid_1.v4)();
300
336
  const hasActiveSchedule = (agent.integrations ?? []).some((integration) => (0, api_types_1.isAgentScheduleIntegration)(integration) && integration.active);
301
337
  if (hasActiveSchedule) {
302
338
  agent.integrations = (agent.integrations ?? []).map((integration) => (0, api_types_1.isAgentScheduleIntegration)(integration) ? { ...integration, active: false } : integration);
303
- await trx.save(agent);
304
339
  }
340
+ await trx.save(agent);
305
341
  });
306
342
  this.clearRuntimes(agentId);
307
343
  const { ChatIntegrationService } = await Promise.resolve().then(() => __importStar(require('./integrations/chat-integration.service')));
@@ -316,18 +352,15 @@ let AgentsService = class AgentsService {
316
352
  if (!agent) {
317
353
  throw new not_found_error_1.NotFoundError(`Agent "${agentId}" not found`);
318
354
  }
319
- const publishedVersion = agent.publishedVersion;
320
- if (!publishedVersion) {
355
+ const activeVersion = agent.activeVersion;
356
+ if (!activeVersion) {
321
357
  throw new conflict_error_1.ConflictError(`Agent "${agentId}" is not published`);
322
358
  }
323
359
  await this.agentRepository.manager.transaction(async (trx) => {
324
- agent.schema = publishedVersion.schema ? (0, n8n_workflow_1.deepCopy)(publishedVersion.schema) : null;
325
- agent.tools = (0, n8n_workflow_1.deepCopy)(publishedVersion.tools ?? {});
326
- agent.skills = (0, n8n_workflow_1.deepCopy)(publishedVersion.skills ?? {});
327
- agent.model = publishedVersion.model;
328
- agent.provider = publishedVersion.provider;
329
- agent.credentialId = publishedVersion.credentialId;
330
- agent.versionId = publishedVersion.publishedFromVersionId;
360
+ agent.schema = activeVersion.schema ? (0, n8n_workflow_1.deepCopy)(activeVersion.schema) : null;
361
+ agent.tools = (0, n8n_workflow_1.deepCopy)(activeVersion.tools ?? {});
362
+ agent.skills = (0, n8n_workflow_1.deepCopy)(activeVersion.skills ?? {});
363
+ agent.versionId = activeVersion.versionId;
331
364
  if (agent.schema) {
332
365
  agent.name = agent.schema.name;
333
366
  agent.description = agent.schema.description ?? null;
@@ -374,8 +407,8 @@ let AgentsService = class AgentsService {
374
407
  return null;
375
408
  return (0, execution_to_message_mapper_1.executionsToMessagesDto)(detail.executions);
376
409
  }
377
- getMemoryFactory() {
378
- return (_params) => this.n8nMemory;
410
+ getMemoryFactory(agentId) {
411
+ return (_params) => this.n8nMemory.getImplementation(agentId);
379
412
  }
380
413
  createCredentialProvider(projectId) {
381
414
  return new agents_credential_provider_1.AgentsCredentialProvider(di_1.Container.get(credentials_service_1.CredentialsService), projectId);
@@ -392,17 +425,17 @@ let AgentsService = class AgentsService {
392
425
  let n8nUserId = params.n8nUserId;
393
426
  let agentData = agentEntity;
394
427
  if (usePublishedVersion) {
395
- const publishedSchema = agentEntity.publishedVersion?.schema;
396
- if (!publishedSchema) {
428
+ const activeVersionSchema = agentEntity.activeVersion?.schema;
429
+ if (!activeVersionSchema) {
397
430
  throw new not_found_error_1.NotFoundError(`Agent ${agentId} is not published`);
398
431
  }
399
432
  agentData = {
400
433
  ...agentEntity,
401
- schema: publishedSchema,
402
- tools: agentEntity.publishedVersion?.tools ?? agentEntity.tools ?? {},
403
- skills: agentEntity.publishedVersion?.skills ?? agentEntity.skills ?? {},
434
+ schema: activeVersionSchema,
435
+ tools: agentEntity.activeVersion?.tools ?? agentEntity.tools ?? {},
436
+ skills: agentEntity.activeVersion?.skills ?? agentEntity.skills ?? {},
404
437
  };
405
- n8nUserId ??= agentEntity.publishedVersion?.publishedById ?? undefined;
438
+ n8nUserId ??= agentEntity.activeVersion?.publishedById ?? undefined;
406
439
  }
407
440
  if (!n8nUserId) {
408
441
  throw new n8n_workflow_1.UserError('Agent user owner id is required');
@@ -506,7 +539,7 @@ let AgentsService = class AgentsService {
506
539
  const resultStream = await agentInstance.resume('stream', resumeData, {
507
540
  runId,
508
541
  toolCallId,
509
- executionCounter: this.createAgentExecutionCounter(agentId),
542
+ executionCounter: this.createAgentExecutionCounter({ agentId }),
510
543
  });
511
544
  const reader = resultStream.stream.getReader();
512
545
  try {
@@ -556,20 +589,33 @@ let AgentsService = class AgentsService {
556
589
  if (!config.model?.trim() || !api_types_1.AgentModelSchema.safeParse(config.model).success) {
557
590
  missing.push('model');
558
591
  }
592
+ let credentialList;
593
+ const credentialExists = async (credentialId) => {
594
+ credentialList ??= await credentialProvider.list();
595
+ return credentialList.some((credential) => credential.id === credentialId);
596
+ };
559
597
  if (!config.credential?.trim()) {
560
598
  missing.push('credential');
561
599
  }
562
600
  else {
563
601
  try {
564
602
  const credentialId = config.credential.trim();
565
- const creds = await credentialProvider.list();
566
- const exists = creds.some((c) => c.id === credentialId);
567
- if (!exists)
603
+ if (!(await credentialExists(credentialId)))
568
604
  missing.push('credential');
569
605
  }
570
606
  catch {
571
607
  }
572
608
  }
609
+ const episodicMemory = config.memory?.episodicMemory;
610
+ if (config.memory?.enabled && episodicMemory?.enabled === true) {
611
+ try {
612
+ if (!(await credentialExists(episodicMemory.credential.trim()))) {
613
+ missing.push('episodicMemory.credential');
614
+ }
615
+ }
616
+ catch {
617
+ }
618
+ }
573
619
  missing.push(...this.agentSkillsService
574
620
  .getMissingSkillIds(config, agentEntity.skills ?? {})
575
621
  .map((skillId) => `skill:${skillId}`));
@@ -582,24 +628,28 @@ let AgentsService = class AgentsService {
582
628
  agentInstance: runtime.agent,
583
629
  toolRegistry: runtime.toolRegistry,
584
630
  agentId,
631
+ userId,
585
632
  message,
586
633
  memory,
587
634
  projectId: runtime.projectId,
588
635
  });
589
636
  }
590
637
  async getTestChatMessages(agentId, userId) {
591
- return await this.n8nMemory.getMessages(chatThreadId(agentId, userId), {
592
- resourceId: userId,
638
+ return await this.n8nMemory
639
+ .getImplementation(agentId)
640
+ .getMessages(chatThreadId(agentId, userId), {
641
+ resourceId: (0, agent_memory_scope_1.draftChatMemoryResourceId)(userId),
593
642
  });
594
643
  }
595
644
  async clearTestChatMessages(agentId, userId) {
596
- await this.n8nMemory.deleteMessagesByThread(chatThreadId(agentId, userId), userId);
645
+ await this.n8nMemory.getImplementation(agentId).deleteThread(chatThreadId(agentId, userId));
597
646
  }
598
647
  async clearAllTestChatMessages(agentId) {
599
648
  const threadId = chatThreadId(agentId);
600
- await this.n8nMemory.deleteThreadsByPrefix(threadId);
601
- await this.n8nMemory.deleteMessagesByThread(threadId);
602
- await this.n8nMemory.deleteThread(threadId);
649
+ const memory = this.n8nMemory.getImplementation(agentId);
650
+ await memory.deleteThreadsByPrefix(threadId);
651
+ await memory.deleteMessagesByThread(threadId);
652
+ await memory.deleteThread(threadId);
603
653
  }
604
654
  async *executeForChatPublished(config) {
605
655
  const { agentId, projectId, message, memory, integrationType } = config;
@@ -638,12 +688,12 @@ let AgentsService = class AgentsService {
638
688
  });
639
689
  }
640
690
  async *streamChatResponse(config) {
641
- const { agentInstance, toolRegistry, agentId, message, memory, projectId, source } = config;
691
+ const { agentInstance, toolRegistry, agentId, userId, message, memory, projectId, source } = config;
642
692
  const { threadId, resourceId } = memory;
643
693
  const recorder = new execution_recorder_1.ExecutionRecorder(toolRegistry);
644
694
  const resultStream = await agentInstance.stream(message, {
645
695
  persistence: { threadId, resourceId },
646
- executionCounter: this.createAgentExecutionCounter(agentId),
696
+ executionCounter: this.createAgentExecutionCounter({ agentId, userId }),
647
697
  });
648
698
  const reader = resultStream.stream.getReader();
649
699
  try {
@@ -659,6 +709,11 @@ let AgentsService = class AgentsService {
659
709
  toolName: value.toolName,
660
710
  });
661
711
  }
712
+ if (value.type === 'finish' && value.finishReason === 'max-iterations') {
713
+ for (const chunk of getMaxIterationsChunks()) {
714
+ yield chunk;
715
+ }
716
+ }
662
717
  yield value;
663
718
  }
664
719
  }
@@ -700,12 +755,12 @@ let AgentsService = class AgentsService {
700
755
  };
701
756
  }
702
757
  }
703
- async executeForWorkflow(agentId, message, executionId, threadId, userId, projectId) {
758
+ async executeForWorkflow(agentId, message, executionId, threadId, userId, projectId, telemetryUserId) {
704
759
  const agentEntity = await this.agentRepository.findByIdAndProjectId(agentId, projectId);
705
760
  if (!agentEntity) {
706
761
  throw new n8n_workflow_1.OperationalError('Agent not found or not accessible.');
707
762
  }
708
- if (!agentEntity.publishedVersion) {
763
+ if (!agentEntity.activeVersionId) {
709
764
  throw new n8n_workflow_1.OperationalError('Agent is not published. Publish the agent before using it in a workflow.');
710
765
  }
711
766
  const credentialProvider = new agents_credential_provider_1.AgentsCredentialProvider(di_1.Container.get(credentials_service_1.CredentialsService), projectId);
@@ -720,7 +775,7 @@ let AgentsService = class AgentsService {
720
775
  const toolInputs = new Map();
721
776
  const resultStream = await agentInstance.stream(message, {
722
777
  persistence: { resourceId: executionId, threadId },
723
- executionCounter: this.createAgentExecutionCounter(agentId),
778
+ executionCounter: this.createAgentExecutionCounter({ agentId, userId: telemetryUserId }),
724
779
  });
725
780
  const reader = resultStream.stream.getReader();
726
781
  try {
@@ -838,7 +893,7 @@ let AgentsService = class AgentsService {
838
893
  for (const tool of config.tools ?? []) {
839
894
  if (tool.type !== 'node')
840
895
  continue;
841
- (0, ai_utilities_1.extractFromAIParameters)((tool.node.nodeParameters ?? {}));
896
+ (0, fromai_helpers_1.extractFromAIParameters)((tool.node.nodeParameters ?? {}));
842
897
  }
843
898
  }
844
899
  async updateConfig(agentId, projectId, config) {
@@ -942,7 +997,7 @@ let AgentsService = class AgentsService {
942
997
  }
943
998
  validateIntegrationRefs(integrations, agent) {
944
999
  const activeUnpublishedSchedule = integrations.some((integration) => (0, api_types_1.isAgentScheduleIntegration)(integration) && integration.active);
945
- if (activeUnpublishedSchedule && !agent.publishedVersion) {
1000
+ if (activeUnpublishedSchedule && !agent.activeVersionId) {
946
1001
  throw new n8n_workflow_1.UserError('Invalid agent config: schedule integration cannot be active until the agent is published');
947
1002
  }
948
1003
  }
@@ -1092,7 +1147,7 @@ let AgentsService = class AgentsService {
1092
1147
  return resolved;
1093
1148
  },
1094
1149
  skills: agentEntity.skills ?? {},
1095
- memoryFactory: this.getMemoryFactory(),
1150
+ memoryFactory: this.getMemoryFactory(agentEntity.id),
1096
1151
  });
1097
1152
  await this.injectRuntimeDependencies({
1098
1153
  agent: reconstructed,
@@ -1131,7 +1186,7 @@ exports.AgentsService = AgentsService = __decorate([
1131
1186
  agents_tools_service_1.AgentsToolsService,
1132
1187
  n8n_memory_1.N8nMemory,
1133
1188
  agent_execution_service_1.AgentExecutionService,
1134
- agent_published_version_repository_1.AgentPublishedVersionRepository,
1189
+ agent_history_repository_1.AgentHistoryRepository,
1135
1190
  agent_skills_service_1.AgentSkillsService,
1136
1191
  publisher_service_1.Publisher,
1137
1192
  config_1.AgentsConfig,