n8n 2.45.6 → 2.46.1

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 (1890) hide show
  1. package/README.md +1 -1
  2. package/dist/active-executions.d.ts +1 -0
  3. package/dist/active-executions.js +7 -3
  4. package/dist/active-executions.js.map +1 -1
  5. package/dist/active-workflow-manager.js +11 -12
  6. package/dist/active-workflow-manager.js.map +1 -1
  7. package/dist/build.tsbuildinfo +1 -1
  8. package/dist/chat/chat-execution-manager.js +1 -1
  9. package/dist/chat/chat-execution-manager.js.map +1 -1
  10. package/dist/commands/start.d.ts +2 -0
  11. package/dist/commands/start.js +23 -0
  12. package/dist/commands/start.js.map +1 -1
  13. package/dist/concurrency/concurrency-control.service.d.ts +3 -1
  14. package/dist/concurrency/concurrency-control.service.js +16 -5
  15. package/dist/concurrency/concurrency-control.service.js.map +1 -1
  16. package/dist/controllers/ai-preference.controller.d.ts +1 -1
  17. package/dist/controllers/ai-preference.controller.js +2 -2
  18. package/dist/controllers/ai-preference.controller.js.map +1 -1
  19. package/dist/controllers/folder.controller.d.ts +3 -2
  20. package/dist/controllers/folder.controller.js +21 -0
  21. package/dist/controllers/folder.controller.js.map +1 -1
  22. package/dist/controllers/public-api-rate-limit-settings.controller.d.ts +10 -0
  23. package/dist/controllers/public-api-rate-limit-settings.controller.js +50 -0
  24. package/dist/controllers/public-api-rate-limit-settings.controller.js.map +1 -0
  25. package/dist/controllers/users.controller.d.ts +3 -2
  26. package/dist/controllers/users.controller.js +6 -3
  27. package/dist/controllers/users.controller.js.map +1 -1
  28. package/dist/crash-journal.d.ts +2 -0
  29. package/dist/crash-journal.js +9 -5
  30. package/dist/crash-journal.js.map +1 -1
  31. package/dist/credentials/credential-data-merge.js +2 -2
  32. package/dist/credentials/credential-data-merge.js.map +1 -1
  33. package/dist/credentials/credential-field-mapping.js.map +1 -0
  34. package/dist/credentials/credentials.controller.d.ts +2 -1
  35. package/dist/credentials/credentials.controller.js +13 -0
  36. package/dist/credentials/credentials.controller.js.map +1 -1
  37. package/dist/credentials/credentials.service.d.ts +4 -0
  38. package/dist/credentials/credentials.service.ee.d.ts +3 -0
  39. package/dist/credentials/credentials.service.ee.js +28 -18
  40. package/dist/credentials/credentials.service.ee.js.map +1 -1
  41. package/dist/credentials/credentials.service.js +28 -27
  42. package/dist/credentials/credentials.service.js.map +1 -1
  43. package/dist/errors/response-errors/deprecated-nodes.error.d.ts +3 -7
  44. package/dist/errors/response-errors/deprecated-nodes.error.js.map +1 -1
  45. package/dist/evaluation.ee/test-runner/test-runner.service.ee.d.ts +4 -3
  46. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js +15 -20
  47. package/dist/evaluation.ee/test-runner/test-runner.service.ee.js.map +1 -1
  48. package/dist/eventbus/event-message-classes/index.d.ts +2 -2
  49. package/dist/eventbus/event-message-classes/index.js +3 -0
  50. package/dist/eventbus/event-message-classes/index.js.map +1 -1
  51. package/dist/events/maps/relay.event-map.d.ts +43 -3
  52. package/dist/events/relays/log-streaming.event-relay.d.ts +1 -0
  53. package/dist/events/relays/log-streaming.event-relay.js +32 -22
  54. package/dist/events/relays/log-streaming.event-relay.js.map +1 -1
  55. package/dist/events/relays/telemetry.event-relay.d.ts +4 -0
  56. package/dist/events/relays/telemetry.event-relay.js +40 -0
  57. package/dist/events/relays/telemetry.event-relay.js.map +1 -1
  58. package/dist/execution-lifecycle/execute-error-workflow.js +2 -1
  59. package/dist/execution-lifecycle/execute-error-workflow.js.map +1 -1
  60. package/dist/execution-lifecycle/execution-lifecycle-hooks.js +36 -4
  61. package/dist/execution-lifecycle/execution-lifecycle-hooks.js.map +1 -1
  62. package/dist/execution-lifecycle/save-execution-progress.d.ts +1 -1
  63. package/dist/execution-lifecycle/save-execution-progress.js +4 -2
  64. package/dist/execution-lifecycle/save-execution-progress.js.map +1 -1
  65. package/dist/executions/engine-v2-execution-reader.service.d.ts +4 -0
  66. package/dist/executions/engine-v2-execution-reader.service.js +23 -4
  67. package/dist/executions/engine-v2-execution-reader.service.js.map +1 -1
  68. package/dist/executions/execution-persistence.d.ts +3 -1
  69. package/dist/executions/execution-persistence.js +50 -8
  70. package/dist/executions/execution-persistence.js.map +1 -1
  71. package/dist/executions/execution-recovery.service.d.ts +2 -2
  72. package/dist/executions/execution-recovery.service.js.map +1 -1
  73. package/dist/executions/execution-viewer-reader.d.ts +6 -0
  74. package/dist/executions/execution-viewer-reader.js +24 -0
  75. package/dist/executions/execution-viewer-reader.js.map +1 -0
  76. package/dist/executions/execution.service.d.ts +3 -2
  77. package/dist/executions/execution.service.js +25 -10
  78. package/dist/executions/execution.service.js.map +1 -1
  79. package/dist/executions/execution.types.d.ts +2 -1
  80. package/dist/executions/executions.controller.d.ts +1 -1
  81. package/dist/executions/executions.controller.js +11 -9
  82. package/dist/executions/executions.controller.js.map +1 -1
  83. package/dist/executions/pre-execution-checks/credential-refusal.d.ts +7 -0
  84. package/dist/executions/pre-execution-checks/credential-refusal.js +26 -0
  85. package/dist/executions/pre-execution-checks/credential-refusal.js.map +1 -0
  86. package/dist/executions/pre-execution-checks/credentials-permission-checker.js +2 -11
  87. package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
  88. package/dist/executions/pre-execution-checks/index.d.ts +1 -0
  89. package/dist/executions/pre-execution-checks/index.js +3 -1
  90. package/dist/executions/pre-execution-checks/index.js.map +1 -1
  91. package/dist/executions/pre-execution-checks/subworkflow-policy-checker.d.ts +2 -0
  92. package/dist/executions/pre-execution-checks/subworkflow-policy-checker.js +23 -11
  93. package/dist/executions/pre-execution-checks/subworkflow-policy-checker.js.map +1 -1
  94. package/dist/executions/sum-binary-data-bytes.d.ts +1 -0
  95. package/dist/executions/sum-binary-data-bytes.js +16 -0
  96. package/dist/executions/sum-binary-data-bytes.js.map +1 -1
  97. package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js +1 -0
  98. package/dist/instance-settings-loader/loaders/sso/sso.instance-settings-loader.js.map +1 -1
  99. package/dist/interfaces.d.ts +3 -0
  100. package/dist/memory-guard/estimate-run-data-size.d.ts +36 -0
  101. package/dist/memory-guard/estimate-run-data-size.js +233 -0
  102. package/dist/memory-guard/estimate-run-data-size.js.map +1 -0
  103. package/dist/memory-guard/memory-guard-journal.d.ts +14 -0
  104. package/dist/memory-guard/memory-guard-journal.js +87 -0
  105. package/dist/memory-guard/memory-guard-journal.js.map +1 -0
  106. package/dist/memory-guard/memory-guard.constants.d.ts +13 -0
  107. package/dist/memory-guard/memory-guard.constants.js +17 -0
  108. package/dist/memory-guard/memory-guard.constants.js.map +1 -0
  109. package/dist/memory-guard/memory-guard.service.d.ts +73 -0
  110. package/dist/memory-guard/memory-guard.service.js +453 -0
  111. package/dist/memory-guard/memory-guard.service.js.map +1 -0
  112. package/dist/memory-guard/memory-guard.types.d.ts +11 -0
  113. package/dist/{modules/agents/agent-runtime-instrumentation.js → memory-guard/memory-guard.types.js} +1 -1
  114. package/dist/memory-guard/memory-guard.types.js.map +1 -0
  115. package/dist/memory-guard/memory-guard.utils.d.ts +13 -0
  116. package/dist/memory-guard/memory-guard.utils.js +74 -0
  117. package/dist/memory-guard/memory-guard.utils.js.map +1 -0
  118. package/dist/memory-guard/memory-stopped-executions.d.ts +18 -0
  119. package/dist/memory-guard/memory-stopped-executions.js +62 -0
  120. package/dist/memory-guard/memory-stopped-executions.js.map +1 -0
  121. package/dist/memory-guard/memory-usage.d.ts +7 -0
  122. package/dist/memory-guard/memory-usage.js +28 -0
  123. package/dist/memory-guard/memory-usage.js.map +1 -0
  124. package/dist/memory-guard/production-hold.d.ts +14 -0
  125. package/dist/memory-guard/production-hold.js +63 -0
  126. package/dist/memory-guard/production-hold.js.map +1 -0
  127. package/dist/memory-guard/run-data-tracker.d.ts +27 -0
  128. package/dist/memory-guard/run-data-tracker.js +242 -0
  129. package/dist/memory-guard/run-data-tracker.js.map +1 -0
  130. package/dist/metrics/prometheus/memory-guard-metrics.service.d.ts +13 -0
  131. package/dist/metrics/prometheus/memory-guard-metrics.service.js +91 -0
  132. package/dist/metrics/prometheus/memory-guard-metrics.service.js.map +1 -0
  133. package/dist/metrics/prometheus/prometheus.service.d.ts +2 -1
  134. package/dist/metrics/prometheus/prometheus.service.js +4 -2
  135. package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
  136. package/dist/modules/agent-evals/agent-eval-case-generation.service.d.ts +3 -3
  137. package/dist/modules/agent-evals/agent-eval-case-generation.service.js +16 -19
  138. package/dist/modules/agent-evals/agent-eval-case-generation.service.js.map +1 -1
  139. package/dist/modules/agent-evals/agent-eval-fix-suggestion.js +1 -1
  140. package/dist/modules/agent-evals/agent-eval-fix-suggestion.js.map +1 -1
  141. package/dist/modules/agent-evals/agent-eval-instructions-rewrite.js +1 -1
  142. package/dist/modules/agent-evals/agent-eval-instructions-rewrite.js.map +1 -1
  143. package/dist/modules/agent-evals/agent-eval-judge.js +1 -1
  144. package/dist/modules/agent-evals/agent-eval-judge.js.map +1 -1
  145. package/dist/modules/agents/adapters/agents-credential-provider.d.ts +5 -2
  146. package/dist/modules/agents/adapters/agents-credential-provider.js +5 -1
  147. package/dist/modules/agents/adapters/agents-credential-provider.js.map +1 -1
  148. package/dist/modules/agents/agent-chat-attachment.service.d.ts +5 -0
  149. package/dist/modules/agents/agent-chat-attachment.service.js +3 -0
  150. package/dist/modules/agents/agent-chat-attachment.service.js.map +1 -1
  151. package/dist/modules/agents/agent-chat-execution.service.d.ts +8 -5
  152. package/dist/modules/agents/agent-chat-execution.service.js +61 -49
  153. package/dist/modules/agents/agent-chat-execution.service.js.map +1 -1
  154. package/dist/modules/agents/agent-chat-relay.service.d.ts +3 -2
  155. package/dist/modules/agents/agent-chat-relay.service.js +23 -30
  156. package/dist/modules/agents/agent-chat-relay.service.js.map +1 -1
  157. package/dist/modules/agents/agent-chat.controller.d.ts +4 -4
  158. package/dist/modules/agents/agent-chat.controller.js +18 -50
  159. package/dist/modules/agents/agent-chat.controller.js.map +1 -1
  160. package/dist/modules/agents/agent-config-preparation.service.d.ts +350 -2
  161. package/dist/modules/agents/agent-config-preparation.service.js +264 -2
  162. package/dist/modules/agents/agent-config-preparation.service.js.map +1 -1
  163. package/dist/modules/agents/agent-config.service.d.ts +10 -8
  164. package/dist/modules/agents/agent-config.service.js +59 -131
  165. package/dist/modules/agents/agent-config.service.js.map +1 -1
  166. package/dist/modules/agents/agent-context.contracts.d.ts +87 -0
  167. package/dist/modules/agents/agent-context.contracts.js +3 -0
  168. package/dist/modules/agents/agent-context.contracts.js.map +1 -0
  169. package/dist/modules/agents/agent-context.service.d.ts +338 -0
  170. package/dist/modules/agents/{instance-ai-agent-context.adapter.js → agent-context.service.js} +51 -17
  171. package/dist/modules/agents/agent-context.service.js.map +1 -0
  172. package/dist/modules/agents/agent-conversation-state.service.d.ts +2 -1
  173. package/dist/modules/agents/agent-conversation-state.service.js +3 -3
  174. package/dist/modules/agents/agent-conversation-state.service.js.map +1 -1
  175. package/dist/modules/agents/agent-credential-provider.contracts.d.ts +5 -0
  176. package/dist/modules/agents/agent-credential-provider.contracts.js +3 -0
  177. package/dist/modules/agents/agent-credential-provider.contracts.js.map +1 -0
  178. package/dist/modules/agents/agent-custom-tools.service.d.ts +1 -0
  179. package/dist/modules/agents/agent-custom-tools.service.js +9 -8
  180. package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
  181. package/dist/modules/agents/agent-default-model-resolver.service.js +6 -5
  182. package/dist/modules/agents/agent-default-model-resolver.service.js.map +1 -1
  183. package/dist/modules/agents/agent-definition.service.d.ts +2 -2
  184. package/dist/modules/agents/agent-definition.service.js +3 -3
  185. package/dist/modules/agents/agent-definition.service.js.map +1 -1
  186. package/dist/modules/agents/agent-draft.contracts.d.ts +51 -0
  187. package/dist/modules/agents/agent-draft.contracts.js +3 -0
  188. package/dist/modules/agents/agent-draft.contracts.js.map +1 -0
  189. package/dist/modules/agents/agent-draft.service.d.ts +17 -0
  190. package/dist/modules/agents/agent-draft.service.js +98 -0
  191. package/dist/modules/agents/agent-draft.service.js.map +1 -0
  192. package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +3 -1
  193. package/dist/modules/agents/agent-execution-orchestrator.service.js +11 -3
  194. package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
  195. package/dist/modules/agents/agent-execution.service.d.ts +11 -4
  196. package/dist/modules/agents/agent-execution.service.js +43 -7
  197. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  198. package/dist/modules/agents/agent-formatted-turn.error.d.ts +6 -0
  199. package/dist/modules/agents/agent-formatted-turn.error.js +12 -0
  200. package/dist/modules/agents/agent-formatted-turn.error.js.map +1 -0
  201. package/dist/modules/agents/agent-integration-management.service.js +1 -1
  202. package/dist/modules/agents/agent-integration-management.service.js.map +1 -1
  203. package/dist/modules/agents/agent-integration-persistence.service.d.ts +1 -1
  204. package/dist/modules/agents/agent-integration-persistence.service.js +3 -3
  205. package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
  206. package/dist/modules/agents/agent-knowledge-snapshot.service.d.ts +19 -0
  207. package/dist/modules/agents/agent-knowledge-snapshot.service.js +84 -0
  208. package/dist/modules/agents/agent-knowledge-snapshot.service.js.map +1 -0
  209. package/dist/modules/agents/agent-knowledge-snapshot.task.d.ts +13 -0
  210. package/dist/modules/agents/agent-knowledge-snapshot.task.js +48 -0
  211. package/dist/modules/agents/agent-knowledge-snapshot.task.js.map +1 -0
  212. package/dist/modules/agents/agent-knowledge-storage.js +2 -2
  213. package/dist/modules/agents/agent-knowledge-storage.js.map +1 -1
  214. package/dist/modules/agents/agent-knowledge-telemetry.d.ts +3 -0
  215. package/dist/modules/agents/agent-knowledge-telemetry.js +28 -0
  216. package/dist/modules/agents/agent-knowledge-telemetry.js.map +1 -0
  217. package/dist/modules/agents/agent-knowledge-upload.error.d.ts +11 -0
  218. package/dist/modules/agents/agent-knowledge-upload.error.js +12 -0
  219. package/dist/modules/agents/agent-knowledge-upload.error.js.map +1 -0
  220. package/dist/modules/agents/agent-knowledge-usage-tracker.d.ts +33 -0
  221. package/dist/modules/agents/agent-knowledge-usage-tracker.js +107 -0
  222. package/dist/modules/agents/agent-knowledge-usage-tracker.js.map +1 -0
  223. package/dist/modules/agents/agent-knowledge.controller.d.ts +8 -4
  224. package/dist/modules/agents/agent-knowledge.controller.js +58 -10
  225. package/dist/modules/agents/agent-knowledge.controller.js.map +1 -1
  226. package/dist/modules/agents/agent-knowledge.service.d.ts +14 -3
  227. package/dist/modules/agents/agent-knowledge.service.js +45 -11
  228. package/dist/modules/agents/agent-knowledge.service.js.map +1 -1
  229. package/dist/modules/agents/agent-memory-entries.service.d.ts +18 -0
  230. package/dist/modules/agents/agent-memory-entries.service.js +124 -0
  231. package/dist/modules/agents/agent-memory-entries.service.js.map +1 -0
  232. package/dist/modules/agents/agent-memory.controller.d.ts +19 -0
  233. package/dist/modules/agents/agent-memory.controller.js +68 -0
  234. package/dist/modules/agents/agent-memory.controller.js.map +1 -0
  235. package/dist/modules/agents/agent-message-queue-consumer.service.d.ts +6 -1
  236. package/dist/modules/agents/agent-message-queue-consumer.service.js +78 -40
  237. package/dist/modules/agents/agent-message-queue-consumer.service.js.map +1 -1
  238. package/dist/modules/agents/agent-message-queue.service.d.ts +4 -1
  239. package/dist/modules/agents/agent-message-queue.service.js +23 -16
  240. package/dist/modules/agents/agent-message-queue.service.js.map +1 -1
  241. package/dist/modules/agents/agent-model-catalog.service.d.ts +1 -0
  242. package/dist/modules/agents/agent-model-catalog.service.js +22 -7
  243. package/dist/modules/agents/agent-model-catalog.service.js.map +1 -1
  244. package/dist/modules/agents/agent-modification-telemetry.service.d.ts +15 -400
  245. package/dist/modules/agents/agent-modification-telemetry.service.js +120 -32
  246. package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -1
  247. package/dist/modules/agents/agent-policy.service.d.ts +4 -1
  248. package/dist/modules/agents/agent-policy.service.js +14 -1
  249. package/dist/modules/agents/agent-policy.service.js.map +1 -1
  250. package/dist/modules/agents/agent-publish.service.d.ts +4 -1
  251. package/dist/modules/agents/agent-publish.service.js +32 -14
  252. package/dist/modules/agents/agent-publish.service.js.map +1 -1
  253. package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
  254. package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +14 -3
  255. package/dist/modules/agents/agent-runtime-reconstruction.service.js +113 -31
  256. package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
  257. package/dist/modules/agents/agent-sandbox-runtime.service.d.ts +1 -3
  258. package/dist/modules/agents/agent-sandbox-runtime.service.js +8 -32
  259. package/dist/modules/agents/agent-sandbox-runtime.service.js.map +1 -1
  260. package/dist/modules/agents/agent-sandbox.controller.d.ts +3 -3
  261. package/dist/modules/agents/agent-sandbox.controller.js +5 -5
  262. package/dist/modules/agents/agent-sandbox.controller.js.map +1 -1
  263. package/dist/modules/agents/agent-save-completion.service.d.ts +8 -1
  264. package/dist/modules/agents/agent-save-completion.service.js +28 -0
  265. package/dist/modules/agents/agent-save-completion.service.js.map +1 -1
  266. package/dist/modules/agents/agent-session-langsmith-export.service.js +27 -0
  267. package/dist/modules/agents/agent-session-langsmith-export.service.js.map +1 -1
  268. package/dist/modules/agents/agent-session-read.d.ts +3 -0
  269. package/dist/modules/agents/agent-session-read.js +29 -0
  270. package/dist/modules/agents/agent-session-read.js.map +1 -0
  271. package/dist/modules/agents/agent-setup-completion.service.d.ts +2 -2
  272. package/dist/modules/agents/agent-setup-completion.service.js +8 -2
  273. package/dist/modules/agents/agent-setup-completion.service.js.map +1 -1
  274. package/dist/modules/agents/agent-skill-refs.service.d.ts +23 -29
  275. package/dist/modules/agents/agent-skill-refs.service.js +61 -123
  276. package/dist/modules/agents/agent-skill-refs.service.js.map +1 -1
  277. package/dist/modules/agents/agent-skill-usage.service.d.ts +40 -0
  278. package/dist/modules/agents/agent-skill-usage.service.js +137 -0
  279. package/dist/modules/agents/agent-skill-usage.service.js.map +1 -0
  280. package/dist/modules/agents/agent-skills.service.d.ts +6 -4
  281. package/dist/modules/agents/agent-skills.service.js +30 -70
  282. package/dist/modules/agents/agent-skills.service.js.map +1 -1
  283. package/dist/modules/agents/agent-sse-stream.d.ts +2 -1
  284. package/dist/modules/agents/agent-sse-stream.js +24 -4
  285. package/dist/modules/agents/agent-sse-stream.js.map +1 -1
  286. package/dist/modules/agents/agent-task.service.d.ts +8 -0
  287. package/dist/modules/agents/agent-task.service.js +22 -14
  288. package/dist/modules/agents/agent-task.service.js.map +1 -1
  289. package/dist/modules/agents/agent-telemetry.d.ts +3 -0
  290. package/dist/modules/agents/agent-telemetry.js +24 -1
  291. package/dist/modules/agents/agent-telemetry.js.map +1 -1
  292. package/dist/modules/agents/agent-test-run.service.d.ts +1 -0
  293. package/dist/modules/agents/agent-test-run.service.js +9 -0
  294. package/dist/modules/agents/agent-test-run.service.js.map +1 -1
  295. package/dist/modules/agents/agent-threads.controller.d.ts +4 -1
  296. package/dist/modules/agents/agent-threads.controller.js +8 -3
  297. package/dist/modules/agents/agent-threads.controller.js.map +1 -1
  298. package/dist/modules/agents/agent-turn-execution.service.d.ts +13 -2
  299. package/dist/modules/agents/agent-turn-execution.service.js +123 -31
  300. package/dist/modules/agents/agent-turn-execution.service.js.map +1 -1
  301. package/dist/modules/agents/agent-upload.middleware.d.ts +2 -0
  302. package/dist/modules/agents/agent-upload.middleware.js +13 -2
  303. package/dist/modules/agents/agent-upload.middleware.js.map +1 -1
  304. package/dist/modules/agents/agent-validation.service.d.ts +5 -2
  305. package/dist/modules/agents/agent-validation.service.js +78 -14
  306. package/dist/modules/agents/agent-validation.service.js.map +1 -1
  307. package/dist/modules/agents/agent-vector-stores.controller.d.ts +5 -3
  308. package/dist/modules/agents/agent-vector-stores.controller.js +9 -5
  309. package/dist/modules/agents/agent-vector-stores.controller.js.map +1 -1
  310. package/dist/modules/agents/agent-workflow-execution.service.d.ts +1 -1
  311. package/dist/modules/agents/agent-workflow-execution.service.js +4 -2
  312. package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
  313. package/dist/modules/agents/agents-config.controller.d.ts +1 -1
  314. package/dist/modules/agents/agents-settings.service.d.ts +5 -1
  315. package/dist/modules/agents/agents-settings.service.js +13 -3
  316. package/dist/modules/agents/agents-settings.service.js.map +1 -1
  317. package/dist/modules/agents/agents-tools.service.d.ts +2 -6
  318. package/dist/modules/agents/agents-tools.service.js +2 -120
  319. package/dist/modules/agents/agents-tools.service.js.map +1 -1
  320. package/dist/modules/agents/agents.controller.d.ts +26 -3
  321. package/dist/modules/agents/agents.controller.js +10 -4
  322. package/dist/modules/agents/agents.controller.js.map +1 -1
  323. package/dist/modules/agents/agents.module.d.ts +3 -4
  324. package/dist/modules/agents/agents.module.js +18 -20
  325. package/dist/modules/agents/agents.module.js.map +1 -1
  326. package/dist/modules/agents/agents.service.d.ts +36 -9
  327. package/dist/modules/agents/agents.service.js +158 -30
  328. package/dist/modules/agents/agents.service.js.map +1 -1
  329. package/dist/modules/agents/azure-foundry-deployments.service.d.ts +28 -0
  330. package/dist/modules/agents/azure-foundry-deployments.service.js +107 -0
  331. package/dist/modules/agents/azure-foundry-deployments.service.js.map +1 -0
  332. package/dist/modules/agents/background/agent-background-job.service.d.ts +8 -7
  333. package/dist/modules/agents/background/agent-background-job.service.js +26 -9
  334. package/dist/modules/agents/background/agent-background-job.service.js.map +1 -1
  335. package/dist/modules/agents/background/background-job-tools.js +2 -0
  336. package/dist/modules/agents/background/background-job-tools.js.map +1 -1
  337. package/dist/modules/agents/background/sub-agent-background-runner.d.ts +1 -0
  338. package/dist/modules/agents/background/sub-agent-background-runner.js +3 -0
  339. package/dist/modules/agents/background/sub-agent-background-runner.js.map +1 -1
  340. package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +9 -22
  341. package/dist/modules/agents/builder/agents-builder-tools.service.js +51 -79
  342. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  343. package/dist/modules/agents/builder/agents-builder.service.d.ts +40 -0
  344. package/dist/modules/agents/builder/agents-builder.service.js +109 -0
  345. package/dist/modules/agents/builder/agents-builder.service.js.map +1 -0
  346. package/dist/modules/agents/builder/builder-model-live-lookup.service.d.ts +8 -1
  347. package/dist/modules/agents/builder/builder-model-live-lookup.service.js +52 -12
  348. package/dist/modules/agents/builder/builder-model-live-lookup.service.js.map +1 -1
  349. package/dist/modules/agents/builder/builder-session.d.ts +21 -0
  350. package/dist/modules/agents/builder/builder-session.js +7 -0
  351. package/dist/modules/agents/builder/builder-session.js.map +1 -0
  352. package/dist/modules/agents/builder/builder-telemetry-session.d.ts +9 -0
  353. package/dist/modules/agents/builder/builder-telemetry-session.js +14 -0
  354. package/dist/modules/agents/builder/builder-telemetry-session.js.map +1 -0
  355. package/dist/modules/agents/builder/builder-tool-names.d.ts +0 -1
  356. package/dist/modules/agents/builder/builder-tool-names.js +0 -1
  357. package/dist/modules/agents/builder/builder-tool-names.js.map +1 -1
  358. package/dist/modules/agents/builder/interactive/finish-setup.tool.js.map +1 -1
  359. package/dist/modules/agents/builder/interactive/index.d.ts +0 -1
  360. package/dist/modules/agents/builder/interactive/index.js +1 -4
  361. package/dist/modules/agents/builder/interactive/index.js.map +1 -1
  362. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js +56 -28
  363. package/dist/modules/agents/builder/interactive/resolve-llm.tool.js.map +1 -1
  364. package/dist/modules/agents/builder/interactive/setup-tool.types.d.ts +2 -2
  365. package/dist/modules/agents/builder/model-lookup.types.d.ts +1 -0
  366. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +19 -6
  367. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
  368. package/dist/modules/agents/builder/prompts/config-rules.prompt.js +6 -4
  369. package/dist/modules/agents/builder/prompts/config-rules.prompt.js.map +1 -1
  370. package/dist/modules/agents/builder/skills/external-services.skill.js +32 -24
  371. package/dist/modules/agents/builder/skills/external-services.skill.js.map +1 -1
  372. package/dist/modules/agents/builder/skills/memory.skill.js +6 -8
  373. package/dist/modules/agents/builder/skills/memory.skill.js.map +1 -1
  374. package/dist/modules/agents/builder/skills/node-tools.skill.js +16 -16
  375. package/dist/modules/agents/builder/skills/node-tools.skill.js.map +1 -1
  376. package/dist/modules/agents/builder/skills/resource-locators.skill.js +26 -23
  377. package/dist/modules/agents/builder/skills/resource-locators.skill.js.map +1 -1
  378. package/dist/modules/agents/builder/skills/target-skills.skill.js +24 -9
  379. package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
  380. package/dist/modules/agents/builder/skills/target-tasks.skill.js +3 -3
  381. package/dist/modules/agents/builder/skills/target-tasks.skill.js.map +1 -1
  382. package/dist/modules/agents/builder/verify-mcp-server.tool.js +2 -2
  383. package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -1
  384. package/dist/modules/agents/entities/agent-background-job.entity.d.ts +8 -0
  385. package/dist/modules/agents/entities/agent-background-job.entity.js +29 -0
  386. package/dist/modules/agents/entities/agent-background-job.entity.js.map +1 -1
  387. package/dist/modules/agents/entities/agent-execution-thread.entity.d.ts +2 -0
  388. package/dist/modules/agents/entities/agent-execution-thread.entity.js +4 -0
  389. package/dist/modules/agents/entities/agent-execution-thread.entity.js.map +1 -1
  390. package/dist/modules/agents/entities/agent-execution.entity.d.ts +6 -0
  391. package/dist/modules/agents/entities/agent-execution.entity.js +46 -3
  392. package/dist/modules/agents/entities/agent-execution.entity.js.map +1 -1
  393. package/dist/modules/agents/entities/agent-history.entity.js.map +1 -1
  394. package/dist/modules/agents/entities/agent-message.entity.d.ts +2 -1
  395. package/dist/modules/agents/entities/agent-message.entity.js.map +1 -1
  396. package/dist/modules/agents/entities/agent.entity.js.map +1 -1
  397. package/dist/modules/agents/{agent-runtime-instrumentation.d.ts → evaluation/agent-evaluation.contracts.d.ts} +26 -3
  398. package/dist/modules/agents/evaluation/agent-evaluation.contracts.js +3 -0
  399. package/dist/modules/agents/evaluation/agent-evaluation.contracts.js.map +1 -0
  400. package/dist/modules/agents/evaluation/agent-evaluation.service.d.ts +21 -0
  401. package/dist/modules/agents/evaluation/agent-evaluation.service.js +111 -0
  402. package/dist/modules/agents/evaluation/agent-evaluation.service.js.map +1 -0
  403. package/dist/modules/agents/evaluation/evaluation-config.d.ts +8 -0
  404. package/dist/modules/agents/evaluation/evaluation-config.js +81 -0
  405. package/dist/modules/agents/evaluation/evaluation-config.js.map +1 -0
  406. package/dist/modules/agents/execution-recorder.d.ts +21 -0
  407. package/dist/modules/agents/execution-recorder.js +77 -24
  408. package/dist/modules/agents/execution-recorder.js.map +1 -1
  409. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
  410. package/dist/modules/agents/integrations/agent-chat-bridge.js +42 -4
  411. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  412. package/dist/modules/agents/integrations/agent-chat-integration.d.ts +22 -1
  413. package/dist/modules/agents/integrations/agent-chat-integration.js +13 -0
  414. package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
  415. package/dist/modules/agents/integrations/agent-chat-message-context.js +5 -0
  416. package/dist/modules/agents/integrations/agent-chat-message-context.js.map +1 -1
  417. package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +5 -1
  418. package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +96 -25
  419. package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
  420. package/dist/modules/agents/integrations/agent-credential-lookup.service.d.ts +2 -1
  421. package/dist/modules/agents/integrations/agent-credential-lookup.service.js +7 -3
  422. package/dist/modules/agents/integrations/agent-credential-lookup.service.js.map +1 -1
  423. package/dist/modules/agents/integrations/channel-rate-limit.js +2 -1
  424. package/dist/modules/agents/integrations/channel-rate-limit.js.map +1 -1
  425. package/dist/modules/agents/integrations/chat-integration.service.js +4 -1
  426. package/dist/modules/agents/integrations/chat-integration.service.js.map +1 -1
  427. package/dist/modules/agents/integrations/episodic-scope-resolver.d.ts +4 -0
  428. package/dist/modules/agents/integrations/episodic-scope-resolver.js +24 -0
  429. package/dist/modules/agents/integrations/episodic-scope-resolver.js.map +1 -0
  430. package/dist/modules/agents/integrations/integration-context-query-executor.d.ts +3 -1
  431. package/dist/modules/agents/integrations/integration-context-query-executor.js +54 -45
  432. package/dist/modules/agents/integrations/integration-context-query-executor.js.map +1 -1
  433. package/dist/modules/agents/integrations/integration-error-codes.d.ts +2 -0
  434. package/dist/modules/agents/integrations/integration-error-codes.js +2 -0
  435. package/dist/modules/agents/integrations/integration-error-codes.js.map +1 -1
  436. package/dist/modules/agents/integrations/integration-message-context.js +2 -0
  437. package/dist/modules/agents/integrations/integration-message-context.js.map +1 -1
  438. package/dist/modules/agents/integrations/integration-origin-support.d.ts +19 -0
  439. package/dist/modules/agents/integrations/integration-origin-support.js +32 -0
  440. package/dist/modules/agents/integrations/integration-origin-support.js.map +1 -0
  441. package/dist/modules/agents/integrations/integration-origin.d.ts +6 -0
  442. package/dist/modules/agents/integrations/integration-origin.js +54 -0
  443. package/dist/modules/agents/integrations/integration-origin.js.map +1 -0
  444. package/dist/modules/agents/integrations/integration-tool-definitions.js +3 -3
  445. package/dist/modules/agents/integrations/integration-tool-definitions.js.map +1 -1
  446. package/dist/modules/agents/integrations/integration-tool-execution.d.ts +1 -0
  447. package/dist/modules/agents/integrations/integration-tool-execution.js +5 -1
  448. package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
  449. package/dist/modules/agents/integrations/integration-tool-factory.js +2 -0
  450. package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
  451. package/dist/modules/agents/integrations/integration-tool-types.d.ts +3 -0
  452. package/dist/modules/agents/integrations/message-split.d.ts +2 -0
  453. package/dist/modules/agents/integrations/message-split.js +32 -0
  454. package/dist/modules/agents/integrations/message-split.js.map +1 -0
  455. package/dist/modules/agents/integrations/n8n-memory.d.ts +12 -2
  456. package/dist/modules/agents/integrations/n8n-memory.js +59 -94
  457. package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
  458. package/dist/modules/agents/integrations/platforms/discord/discord-gateway.js.map +1 -0
  459. package/dist/modules/agents/integrations/platforms/{discord-integration.d.ts → discord/discord-integration.d.ts} +13 -8
  460. package/dist/modules/agents/integrations/platforms/{discord-integration.js → discord/discord-integration.js} +20 -9
  461. package/dist/modules/agents/integrations/platforms/discord/discord-integration.js.map +1 -0
  462. package/dist/modules/agents/integrations/platforms/{discord-operations.js → discord/discord-operations.js} +1 -1
  463. package/dist/modules/agents/integrations/platforms/discord/discord-operations.js.map +1 -0
  464. package/dist/modules/agents/integrations/platforms/discord/discord-origin.d.ts +4 -0
  465. package/dist/modules/agents/integrations/platforms/discord/discord-origin.js +20 -0
  466. package/dist/modules/agents/integrations/platforms/discord/discord-origin.js.map +1 -0
  467. package/dist/modules/agents/integrations/platforms/linear/linear-integration.d.ts +33 -0
  468. package/dist/modules/agents/integrations/platforms/{linear-integration.js → linear/linear-integration.js} +21 -4
  469. package/dist/modules/agents/integrations/platforms/linear/linear-integration.js.map +1 -0
  470. package/dist/modules/agents/integrations/platforms/{linear-operations.d.ts → linear/linear-operations.d.ts} +2 -2
  471. package/dist/modules/agents/integrations/platforms/{linear-operations.js → linear/linear-operations.js} +2 -2
  472. package/dist/modules/agents/integrations/platforms/linear/linear-operations.js.map +1 -0
  473. package/dist/modules/agents/integrations/platforms/linear/linear-origin.d.ts +4 -0
  474. package/dist/modules/agents/integrations/platforms/linear/linear-origin.js +31 -0
  475. package/dist/modules/agents/integrations/platforms/linear/linear-origin.js.map +1 -0
  476. package/dist/modules/agents/integrations/platforms/{linear-tool-definitions.js → linear/linear-tool-definitions.js} +1 -1
  477. package/dist/modules/agents/integrations/platforms/linear/linear-tool-definitions.js.map +1 -0
  478. package/dist/modules/agents/integrations/platforms/{n8n-chat-flag.service.d.ts → n8n-chat/n8n-chat-flag.service.d.ts} +1 -1
  479. package/dist/modules/agents/integrations/platforms/{n8n-chat-flag.service.js → n8n-chat/n8n-chat-flag.service.js} +1 -1
  480. package/dist/modules/agents/integrations/platforms/n8n-chat/n8n-chat-flag.service.js.map +1 -0
  481. package/dist/modules/agents/integrations/platforms/{n8n-chat-integration.d.ts → n8n-chat/n8n-chat-integration.d.ts} +6 -4
  482. package/dist/modules/agents/integrations/platforms/{n8n-chat-integration.js → n8n-chat/n8n-chat-integration.js} +11 -5
  483. package/dist/modules/agents/integrations/platforms/n8n-chat/n8n-chat-integration.js.map +1 -0
  484. package/dist/modules/agents/integrations/platforms/slack/slack-adapter.d.ts +2 -0
  485. package/dist/modules/agents/integrations/platforms/slack/slack-adapter.js +17 -0
  486. package/dist/modules/agents/integrations/platforms/slack/slack-adapter.js.map +1 -0
  487. package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.d.ts +5 -0
  488. package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js +64 -18
  489. package/dist/modules/agents/integrations/platforms/slack/slack-bridge-behavior.js.map +1 -1
  490. package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +13 -2
  491. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +46 -3
  492. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
  493. package/dist/modules/agents/integrations/platforms/slack/slack-managed-setup.service.js +2 -2
  494. package/dist/modules/agents/integrations/platforms/slack/slack-managed-setup.service.js.map +1 -1
  495. package/dist/modules/agents/integrations/platforms/slack/slack-operations.d.ts +1 -0
  496. package/dist/modules/agents/integrations/platforms/slack/slack-operations.js +131 -53
  497. package/dist/modules/agents/integrations/platforms/slack/slack-operations.js.map +1 -1
  498. package/dist/modules/agents/integrations/platforms/slack/slack-origin.d.ts +4 -0
  499. package/dist/modules/agents/integrations/platforms/slack/slack-origin.js +38 -0
  500. package/dist/modules/agents/integrations/platforms/slack/slack-origin.js.map +1 -0
  501. package/dist/modules/agents/integrations/platforms/slack/slack-search-pagination.d.ts +33 -0
  502. package/dist/modules/agents/integrations/platforms/slack/slack-search-pagination.js +53 -0
  503. package/dist/modules/agents/integrations/platforms/slack/slack-search-pagination.js.map +1 -0
  504. package/dist/modules/agents/integrations/platforms/teams/assets/color.png +0 -0
  505. package/dist/modules/agents/integrations/platforms/teams/assets/outline.png +0 -0
  506. package/dist/modules/agents/integrations/platforms/teams/teams-activity.d.ts +1 -0
  507. package/dist/modules/agents/integrations/platforms/teams/teams-activity.js +10 -0
  508. package/dist/modules/agents/integrations/platforms/teams/teams-activity.js.map +1 -0
  509. package/dist/modules/agents/integrations/platforms/teams/teams-app-icons.d.ts +1 -1
  510. package/dist/modules/agents/integrations/platforms/teams/teams-app-icons.js +6 -5
  511. package/dist/modules/agents/integrations/platforms/teams/teams-app-icons.js.map +1 -1
  512. package/dist/modules/agents/integrations/platforms/teams/teams-entra-provisioning.service.js +1 -1
  513. package/dist/modules/agents/integrations/platforms/teams/teams-entra-provisioning.service.js.map +1 -1
  514. package/dist/modules/agents/integrations/platforms/teams/teams-integration.d.ts +5 -1
  515. package/dist/modules/agents/integrations/platforms/teams/teams-integration.js +13 -8
  516. package/dist/modules/agents/integrations/platforms/teams/teams-integration.js.map +1 -1
  517. package/dist/modules/agents/integrations/platforms/teams/teams-managed-setup.service.d.ts +4 -2
  518. package/dist/modules/agents/integrations/platforms/teams/teams-managed-setup.service.js +26 -9
  519. package/dist/modules/agents/integrations/platforms/teams/teams-managed-setup.service.js.map +1 -1
  520. package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.d.ts +1 -0
  521. package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js +3 -3
  522. package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js.map +1 -1
  523. package/dist/modules/agents/integrations/platforms/teams/teams-message-files.d.ts +1 -0
  524. package/dist/modules/agents/integrations/platforms/teams/teams-operations.d.ts +1 -0
  525. package/dist/modules/agents/integrations/platforms/teams/teams-operations.js +47 -16
  526. package/dist/modules/agents/integrations/platforms/teams/teams-operations.js.map +1 -1
  527. package/dist/modules/agents/integrations/platforms/teams/teams-origin.d.ts +2 -0
  528. package/dist/modules/agents/integrations/platforms/teams/teams-origin.js +13 -0
  529. package/dist/modules/agents/integrations/platforms/teams/teams-origin.js.map +1 -0
  530. package/dist/modules/agents/integrations/platforms/{telegram-bridge-behavior.d.ts → telegram/telegram-bridge-behavior.d.ts} +2 -2
  531. package/dist/modules/agents/integrations/platforms/{telegram-bridge-behavior.js → telegram/telegram-bridge-behavior.js} +1 -1
  532. package/dist/modules/agents/integrations/platforms/telegram/telegram-bridge-behavior.js.map +1 -0
  533. package/dist/modules/agents/integrations/platforms/{telegram-integration.d.ts → telegram/telegram-integration.d.ts} +8 -4
  534. package/dist/modules/agents/integrations/platforms/{telegram-integration.js → telegram/telegram-integration.js} +13 -5
  535. package/dist/modules/agents/integrations/platforms/telegram/telegram-integration.js.map +1 -0
  536. package/dist/modules/agents/integrations/platforms/telegram/telegram-origin.d.ts +2 -0
  537. package/dist/modules/agents/integrations/platforms/telegram/telegram-origin.js +12 -0
  538. package/dist/modules/agents/integrations/platforms/telegram/telegram-origin.js.map +1 -0
  539. package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-integration.d.ts +3 -0
  540. package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-integration.js +7 -0
  541. package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-integration.js.map +1 -1
  542. package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-origin.d.ts +2 -0
  543. package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-origin.js +12 -0
  544. package/dist/modules/agents/integrations/platforms/whatsapp/whatsapp-origin.js.map +1 -0
  545. package/dist/modules/agents/integrations/single-connection.d.ts +3 -0
  546. package/dist/modules/agents/integrations/single-connection.js +19 -0
  547. package/dist/modules/agents/integrations/single-connection.js.map +1 -0
  548. package/dist/modules/agents/json-config/agent-document.d.ts +0 -1
  549. package/dist/modules/agents/json-config/agent-document.js +0 -5
  550. package/dist/modules/agents/json-config/agent-document.js.map +1 -1
  551. package/dist/modules/agents/json-config/from-json-config.d.ts +3 -1
  552. package/dist/modules/agents/json-config/from-json-config.js +39 -8
  553. package/dist/modules/agents/json-config/from-json-config.js.map +1 -1
  554. package/dist/modules/agents/json-config/mcp-client-factory.d.ts +6 -3
  555. package/dist/modules/agents/json-config/mcp-client-factory.js +23 -2
  556. package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
  557. package/dist/modules/agents/json-config/model-config.d.ts +3 -5
  558. package/dist/modules/agents/json-config/model-config.js +30 -7
  559. package/dist/modules/agents/json-config/model-config.js.map +1 -1
  560. package/dist/modules/agents/llm-provider-defaults.d.ts +2 -1
  561. package/dist/modules/agents/llm-provider-defaults.js +7 -0
  562. package/dist/modules/agents/llm-provider-defaults.js.map +1 -1
  563. package/dist/modules/agents/register-skill-agents-provider.d.ts +1 -0
  564. package/dist/modules/agents/register-skill-agents-provider.js +10 -0
  565. package/dist/modules/agents/register-skill-agents-provider.js.map +1 -0
  566. package/dist/modules/agents/register-user-deletion-handler.d.ts +1 -0
  567. package/dist/modules/agents/register-user-deletion-handler.js +17 -0
  568. package/dist/modules/agents/register-user-deletion-handler.js.map +1 -0
  569. package/dist/modules/agents/repositories/agent-chat-attachment.repository.d.ts +5 -0
  570. package/dist/modules/agents/repositories/agent-chat-attachment.repository.js +3 -0
  571. package/dist/modules/agents/repositories/agent-chat-attachment.repository.js.map +1 -1
  572. package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +2 -0
  573. package/dist/modules/agents/repositories/agent-execution-thread.repository.js +22 -2
  574. package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
  575. package/dist/modules/agents/repositories/agent-execution.repository.d.ts +12 -1
  576. package/dist/modules/agents/repositories/agent-execution.repository.js +55 -0
  577. package/dist/modules/agents/repositories/agent-execution.repository.js.map +1 -1
  578. package/dist/modules/agents/repositories/agent-file.repository.d.ts +6 -0
  579. package/dist/modules/agents/repositories/agent-file.repository.js +24 -0
  580. package/dist/modules/agents/repositories/agent-file.repository.js.map +1 -1
  581. package/dist/modules/agents/repositories/agent-history.repository.d.ts +0 -1
  582. package/dist/modules/agents/repositories/agent-history.repository.js +0 -1
  583. package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
  584. package/dist/modules/agents/repositories/agent-memory-entry-candidate.repository.d.ts +3 -0
  585. package/dist/modules/agents/repositories/agent-memory-entry-candidate.repository.js +24 -0
  586. package/dist/modules/agents/repositories/agent-memory-entry-candidate.repository.js.map +1 -1
  587. package/dist/modules/agents/repositories/agent-memory-entry.repository.d.ts +46 -3
  588. package/dist/modules/agents/repositories/agent-memory-entry.repository.js +176 -4
  589. package/dist/modules/agents/repositories/agent-memory-entry.repository.js.map +1 -1
  590. package/dist/modules/agents/repositories/agent-message-queue.repository.d.ts +1 -0
  591. package/dist/modules/agents/repositories/agent-message.repository.d.ts +2 -1
  592. package/dist/modules/agents/repositories/agent-message.repository.js +11 -0
  593. package/dist/modules/agents/repositories/agent-message.repository.js.map +1 -1
  594. package/dist/modules/agents/repositories/agent-observation.repository.d.ts +8 -3
  595. package/dist/modules/agents/repositories/agent-observation.repository.js +59 -4
  596. package/dist/modules/agents/repositories/agent-observation.repository.js.map +1 -1
  597. package/dist/modules/agents/repositories/agent-skill.repository.d.ts +35 -0
  598. package/dist/modules/agents/repositories/agent-skill.repository.js +261 -0
  599. package/dist/modules/agents/repositories/agent-skill.repository.js.map +1 -0
  600. package/dist/modules/agents/repositories/agent-task.repository.d.ts +1 -0
  601. package/dist/modules/agents/repositories/agent-task.repository.js +7 -0
  602. package/dist/modules/agents/repositories/agent-task.repository.js.map +1 -1
  603. package/dist/modules/agents/repositories/agent-thread.repository.d.ts +1 -0
  604. package/dist/modules/agents/repositories/agent-thread.repository.js +7 -0
  605. package/dist/modules/agents/repositories/agent-thread.repository.js.map +1 -1
  606. package/dist/modules/agents/repositories/agent.repository.d.ts +11 -6
  607. package/dist/modules/agents/repositories/agent.repository.js +43 -43
  608. package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
  609. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +6 -0
  610. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
  611. package/dist/modules/agents/sub-agents/sub-agent-runner.d.ts +10 -3
  612. package/dist/modules/agents/sub-agents/sub-agent-runner.js +76 -3
  613. package/dist/modules/agents/sub-agents/sub-agent-runner.js.map +1 -1
  614. package/dist/modules/agents/system-agents/system-agent-access.d.ts +3 -0
  615. package/dist/modules/agents/system-agents/system-agent-access.js +10 -0
  616. package/dist/modules/agents/system-agents/system-agent-access.js.map +1 -0
  617. package/dist/modules/agents/system-agents/system-agent-chat.controller.d.ts +83 -0
  618. package/dist/modules/agents/system-agents/system-agent-chat.controller.js +313 -0
  619. package/dist/modules/agents/system-agents/system-agent-chat.controller.js.map +1 -0
  620. package/dist/modules/agents/system-agents/system-agent-execution.service.d.ts +141 -0
  621. package/dist/modules/agents/system-agents/system-agent-execution.service.js +786 -0
  622. package/dist/modules/agents/system-agents/system-agent-execution.service.js.map +1 -0
  623. package/dist/modules/agents/system-agents/system-agent-host-events.d.ts +21 -0
  624. package/dist/modules/agents/system-agents/system-agent-host-events.js +73 -0
  625. package/dist/modules/agents/system-agents/system-agent-host-events.js.map +1 -0
  626. package/dist/modules/agents/system-agents/system-agent-registration.service.d.ts +9 -0
  627. package/dist/modules/agents/system-agents/system-agent-registration.service.js +31 -0
  628. package/dist/modules/agents/system-agents/system-agent-registration.service.js.map +1 -0
  629. package/dist/modules/agents/system-agents/system-agent-registry.d.ts +7 -0
  630. package/dist/modules/agents/system-agents/system-agent-registry.js +33 -0
  631. package/dist/modules/agents/system-agents/system-agent-registry.js.map +1 -0
  632. package/dist/modules/agents/system-agents/system-agent-usage-relay.d.ts +15 -0
  633. package/dist/modules/agents/system-agents/system-agent-usage-relay.js +63 -0
  634. package/dist/modules/agents/system-agents/system-agent-usage-relay.js.map +1 -0
  635. package/dist/modules/agents/system-agents/system-agent.types.d.ts +102 -0
  636. package/dist/modules/agents/system-agents/system-agent.types.js +3 -0
  637. package/dist/modules/agents/system-agents/system-agent.types.js.map +1 -0
  638. package/dist/modules/agents/tools/knowledge/search-knowledge.tool.d.ts +3 -1
  639. package/dist/modules/agents/tools/knowledge/search-knowledge.tool.js +29 -4
  640. package/dist/modules/agents/tools/knowledge/search-knowledge.tool.js.map +1 -1
  641. package/dist/modules/agents/tools/node-tool-factory.d.ts +1 -1
  642. package/dist/modules/agents/tools/workflow-tool-factory.d.ts +1 -1
  643. package/dist/modules/agents/tools/workflow-tool-factory.js +3 -1
  644. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  645. package/dist/modules/agents/types/agent-queued-message.d.ts +6 -3
  646. package/dist/modules/agents/types/agent-queued-message.js +5 -0
  647. package/dist/modules/agents/types/agent-queued-message.js.map +1 -1
  648. package/dist/modules/agents/types/agent-task-stop.d.ts +23 -0
  649. package/dist/modules/agents/types/agent-task-stop.js +3 -0
  650. package/dist/modules/agents/types/agent-task-stop.js.map +1 -0
  651. package/dist/modules/agents/types/agent-turn-outcome.d.ts +10 -0
  652. package/dist/modules/agents/types/agent-turn-outcome.js +3 -0
  653. package/dist/modules/agents/types/agent-turn-outcome.js.map +1 -0
  654. package/dist/modules/agents/utils/agent-capabilities.d.ts +0 -1
  655. package/dist/modules/agents/utils/agent-capabilities.js +0 -8
  656. package/dist/modules/agents/utils/agent-capabilities.js.map +1 -1
  657. package/dist/modules/agents/utils/agent-config-hash.d.ts +2 -2
  658. package/dist/modules/agents/utils/agent-config-hash.js +3 -4
  659. package/dist/modules/agents/utils/agent-config-hash.js.map +1 -1
  660. package/dist/modules/agents/utils/agent-definition.d.ts +17 -1
  661. package/dist/modules/agents/utils/agent-definition.js +13 -0
  662. package/dist/modules/agents/utils/agent-definition.js.map +1 -1
  663. package/dist/modules/agents/utils/agent-draft.utils.d.ts +2 -1
  664. package/dist/modules/agents/utils/agent-draft.utils.js +2 -2
  665. package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
  666. package/dist/modules/agents/utils/agent-memory-scope.d.ts +0 -5
  667. package/dist/modules/agents/utils/agent-memory-scope.js +0 -11
  668. package/dist/modules/agents/utils/agent-memory-scope.js.map +1 -1
  669. package/dist/modules/agents/utils/agent-thread-access.d.ts +6 -3
  670. package/dist/modules/agents/utils/agent-thread-access.js +32 -11
  671. package/dist/modules/agents/utils/agent-thread-access.js.map +1 -1
  672. package/dist/modules/agents/utils/episodic-scope-metadata.d.ts +2 -0
  673. package/dist/modules/agents/utils/episodic-scope-metadata.js +13 -0
  674. package/dist/modules/agents/utils/episodic-scope-metadata.js.map +1 -0
  675. package/dist/modules/agents/utils/execution-to-message-mapper.js +9 -0
  676. package/dist/modules/agents/utils/execution-to-message-mapper.js.map +1 -1
  677. package/dist/modules/agents/utils/memory-entry-source.d.ts +15 -0
  678. package/dist/modules/agents/utils/memory-entry-source.js +53 -0
  679. package/dist/modules/agents/utils/memory-entry-source.js.map +1 -0
  680. package/dist/modules/agents/utils/memory-source-filter.d.ts +7 -0
  681. package/dist/modules/agents/utils/memory-source-filter.js +154 -0
  682. package/dist/modules/agents/utils/memory-source-filter.js.map +1 -0
  683. package/dist/modules/agents/utils/messages-envelope.d.ts +2 -0
  684. package/dist/modules/agents/utils/messages-envelope.js +15 -0
  685. package/dist/modules/agents/utils/messages-envelope.js.map +1 -1
  686. package/dist/modules/agents/utils/visit-agent-credential-references.d.ts +1 -0
  687. package/dist/modules/agents/utils/visit-agent-credential-references.js +8 -7
  688. package/dist/modules/agents/utils/visit-agent-credential-references.js.map +1 -1
  689. package/dist/modules/apps/sandbox-settings.d.ts +3 -0
  690. package/dist/modules/apps/sandbox-settings.js +41 -0
  691. package/dist/modules/apps/sandbox-settings.js.map +1 -0
  692. package/dist/modules/breaking-changes/breaking-changes.migration.service.js +1 -1
  693. package/dist/modules/breaking-changes/breaking-changes.migration.service.js.map +1 -1
  694. package/dist/modules/breaking-changes/migration-report-csv.js +10 -0
  695. package/dist/modules/breaking-changes/migration-report-csv.js.map +1 -1
  696. package/dist/modules/breaking-changes/migrations/node-removals/agent-tools-v1-to-v2.migration.d.ts +2 -0
  697. package/dist/modules/breaking-changes/migrations/node-removals/agent-tools-v1-to-v2.migration.js +29 -0
  698. package/dist/modules/breaking-changes/migrations/node-removals/agent-tools-v1-to-v2.migration.js.map +1 -0
  699. package/dist/modules/breaking-changes/migrations/node-removals/edit-image-v2.migration.d.ts +2 -0
  700. package/dist/modules/breaking-changes/migrations/node-removals/edit-image-v2.migration.js +20 -0
  701. package/dist/modules/breaking-changes/migrations/node-removals/edit-image-v2.migration.js.map +1 -0
  702. package/dist/modules/breaking-changes/migrations/node-removals/index.js +4 -0
  703. package/dist/modules/breaking-changes/migrations/node-removals/index.js.map +1 -1
  704. package/dist/modules/breaking-changes/rules/index.d.ts +3 -0
  705. package/dist/modules/breaking-changes/rules/index.js +3 -0
  706. package/dist/modules/breaking-changes/rules/index.js.map +1 -1
  707. package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js +6 -6
  708. package/dist/modules/breaking-changes/rules/v3/compression-node-limits.rule.js.map +1 -1
  709. package/dist/modules/breaking-changes/rules/v3/edit-image-version.d.ts +17 -0
  710. package/dist/modules/breaking-changes/rules/v3/edit-image-version.js +101 -0
  711. package/dist/modules/breaking-changes/rules/v3/edit-image-version.js.map +1 -0
  712. package/dist/modules/breaking-changes/rules/v3/edit-image-version.rule.d.ts +10 -0
  713. package/dist/modules/breaking-changes/rules/v3/edit-image-version.rule.js +53 -0
  714. package/dist/modules/breaking-changes/rules/v3/edit-image-version.rule.js.map +1 -0
  715. package/dist/modules/breaking-changes/rules/v3/node-replacement-rule.d.ts +19 -0
  716. package/dist/modules/breaking-changes/rules/v3/node-replacement-rule.js +53 -0
  717. package/dist/modules/breaking-changes/rules/v3/node-replacement-rule.js.map +1 -0
  718. package/dist/modules/breaking-changes/rules/v3/removed-nodes-with-replacements.rule.d.ts +87 -91
  719. package/dist/modules/breaking-changes/rules/v3/removed-nodes-with-replacements.rule.js +31 -79
  720. package/dist/modules/breaking-changes/rules/v3/removed-nodes-with-replacements.rule.js.map +1 -1
  721. package/dist/modules/breaking-changes/rules/v3/removed-nodes.rule.d.ts +75 -11
  722. package/dist/modules/breaking-changes/rules/v3/removed-nodes.rule.js +96 -58
  723. package/dist/modules/breaking-changes/rules/v3/removed-nodes.rule.js.map +1 -1
  724. package/dist/modules/breaking-changes/rules/v3/slack-credential-secret.d.ts +5 -0
  725. package/dist/modules/breaking-changes/rules/v3/slack-credential-secret.js +33 -0
  726. package/dist/modules/breaking-changes/rules/v3/slack-credential-secret.js.map +1 -0
  727. package/dist/modules/breaking-changes/rules/v3/slack-credential-signature-secret.rule.d.ts +13 -0
  728. package/dist/modules/breaking-changes/rules/v3/slack-credential-signature-secret.rule.js +54 -0
  729. package/dist/modules/breaking-changes/rules/v3/slack-credential-signature-secret.rule.js.map +1 -0
  730. package/dist/modules/breaking-changes/rules/v3/slack-trigger-signature-secret.rule.d.ts +13 -0
  731. package/dist/modules/breaking-changes/rules/v3/slack-trigger-signature-secret.rule.js +54 -0
  732. package/dist/modules/breaking-changes/rules/v3/slack-trigger-signature-secret.rule.js.map +1 -0
  733. package/dist/modules/breaking-changes/rules/v3/ssrf-default-blocked-ranges.rule.js +5 -5
  734. package/dist/modules/breaking-changes/rules/v3/ssrf-default-blocked-ranges.rule.js.map +1 -1
  735. package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js +5 -5
  736. package/dist/modules/breaking-changes/rules/v3/task-runner-task-timeout.rule.js.map +1 -1
  737. package/dist/modules/chat-hub/chat-hub.controller.js +11 -12
  738. package/dist/modules/chat-hub/chat-hub.controller.js.map +1 -1
  739. package/dist/modules/community-packages/community-packages.controller.d.ts +17 -1
  740. package/dist/modules/community-packages/community-packages.controller.js +3 -1
  741. package/dist/modules/community-packages/community-packages.controller.js.map +1 -1
  742. package/dist/modules/community-packages/community-packages.lifecycle.service.d.ts +5 -2
  743. package/dist/modules/community-packages/community-packages.lifecycle.service.js +18 -2
  744. package/dist/modules/community-packages/community-packages.lifecycle.service.js.map +1 -1
  745. package/dist/modules/engine-v2/engine-data-plane-client.d.ts +2 -1
  746. package/dist/modules/engine-v2/engine-data-plane-client.js +16 -0
  747. package/dist/modules/engine-v2/engine-data-plane-client.js.map +1 -1
  748. package/dist/modules/external-secrets.ee/redaction.service.ee.js +2 -2
  749. package/dist/modules/external-secrets.ee/redaction.service.ee.js.map +1 -1
  750. package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.d.ts +8 -8
  751. package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.js +8 -11
  752. package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.js.map +1 -1
  753. package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.d.ts +10 -10
  754. package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.js +10 -13
  755. package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.js.map +1 -1
  756. package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js +1 -1
  757. package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js.map +1 -1
  758. package/dist/modules/inbound-auth-core/public-api-oauth.strategy.d.ts +3 -2
  759. package/dist/modules/inbound-auth-core/public-api-oauth.strategy.js +23 -10
  760. package/dist/modules/inbound-auth-core/public-api-oauth.strategy.js.map +1 -1
  761. package/dist/modules/inbound-auth-core/resource-admission.d.ts +5 -3
  762. package/dist/modules/inbound-auth-core/resource-admission.js +6 -2
  763. package/dist/modules/inbound-auth-core/resource-admission.js.map +1 -1
  764. package/dist/modules/inbound-auth-core/trusted-source.gate.js +1 -1
  765. package/dist/modules/inbound-auth-core/trusted-source.gate.js.map +1 -1
  766. package/dist/modules/inbound-auth-core/trusted-source.store.js +15 -15
  767. package/dist/modules/inbound-auth-core/trusted-source.store.js.map +1 -1
  768. package/dist/modules/inbox/inbox-source.registry.d.ts +4 -4
  769. package/dist/modules/inbox/inbox.service.js +5 -1
  770. package/dist/modules/inbox/inbox.service.js.map +1 -1
  771. package/dist/modules/instance-ai/agent-preview-handoff.d.ts +5 -2
  772. package/dist/modules/instance-ai/agent-preview-handoff.js +13 -0
  773. package/dist/modules/instance-ai/agent-preview-handoff.js.map +1 -1
  774. package/dist/modules/instance-ai/agents-access.d.ts +2 -0
  775. package/dist/modules/instance-ai/agents-access.js +12 -0
  776. package/dist/modules/instance-ai/agents-access.js.map +1 -1
  777. package/dist/modules/instance-ai/ai-preferences-telemetry.d.ts +11 -0
  778. package/dist/modules/instance-ai/ai-preferences-telemetry.js +21 -0
  779. package/dist/modules/instance-ai/ai-preferences-telemetry.js.map +1 -0
  780. package/dist/modules/instance-ai/browser/browser-use-availability.d.ts +6 -0
  781. package/dist/modules/instance-ai/browser/browser-use-availability.js +11 -0
  782. package/dist/modules/instance-ai/browser/browser-use-availability.js.map +1 -0
  783. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.d.ts +0 -1
  784. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js +0 -4
  785. package/dist/modules/instance-ai/entities/instance-ai-pending-confirmation.entity.js.map +1 -1
  786. package/dist/modules/instance-ai/eval/agent-execution.service.d.ts +8 -11
  787. package/dist/modules/instance-ai/eval/agent-execution.service.js +128 -224
  788. package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
  789. package/dist/modules/instance-ai/eval/data-table-rows.d.ts +25 -0
  790. package/dist/modules/instance-ai/eval/data-table-rows.js +155 -0
  791. package/dist/modules/instance-ai/eval/data-table-rows.js.map +1 -0
  792. package/dist/modules/instance-ai/eval/eval-timings.d.ts +1 -1
  793. package/dist/modules/instance-ai/eval/eval-timings.js +8 -1
  794. package/dist/modules/instance-ai/eval/eval-timings.js.map +1 -1
  795. package/dist/modules/instance-ai/eval/eval.controller.d.ts +78 -0
  796. package/dist/modules/instance-ai/eval/eval.controller.js +282 -0
  797. package/dist/modules/instance-ai/eval/eval.controller.js.map +1 -0
  798. package/dist/modules/instance-ai/eval/execution.service.d.ts +2 -3
  799. package/dist/modules/instance-ai/eval/execution.service.js +109 -91
  800. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  801. package/dist/modules/instance-ai/eval/failed-execution-portability.service.d.ts +37 -0
  802. package/dist/modules/instance-ai/eval/failed-execution-portability.service.js +401 -0
  803. package/dist/modules/instance-ai/eval/failed-execution-portability.service.js.map +1 -0
  804. package/dist/modules/instance-ai/eval/form-trigger-content.d.ts +2 -0
  805. package/dist/modules/instance-ai/eval/form-trigger-content.js +117 -0
  806. package/dist/modules/instance-ai/eval/form-trigger-content.js.map +1 -0
  807. package/dist/modules/instance-ai/eval/llm-completion-mock.js +19 -6
  808. package/dist/modules/instance-ai/eval/llm-completion-mock.js.map +1 -1
  809. package/dist/modules/instance-ai/eval/mock-handler.d.ts +10 -0
  810. package/dist/modules/instance-ai/eval/mock-handler.js +147 -11
  811. package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
  812. package/dist/modules/instance-ai/eval/node-run-mock.d.ts +19 -0
  813. package/dist/modules/instance-ai/eval/node-run-mock.js +163 -0
  814. package/dist/modules/instance-ai/eval/node-run-mock.js.map +1 -0
  815. package/dist/modules/instance-ai/eval/pin-data-generator.d.ts +1 -2
  816. package/dist/modules/instance-ai/eval/pin-data-generator.js +3 -3
  817. package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
  818. package/dist/modules/instance-ai/eval/provider-shapes.d.ts +1 -0
  819. package/dist/modules/instance-ai/eval/provider-shapes.js +16 -0
  820. package/dist/modules/instance-ai/eval/provider-shapes.js.map +1 -1
  821. package/dist/modules/instance-ai/eval/request-sanitizer.d.ts +1 -0
  822. package/dist/modules/instance-ai/eval/request-sanitizer.js +16 -0
  823. package/dist/modules/instance-ai/eval/request-sanitizer.js.map +1 -1
  824. package/dist/modules/instance-ai/eval/scoped-credential-provider.d.ts +2 -3
  825. package/dist/modules/instance-ai/eval/scoped-credential-provider.js.map +1 -1
  826. package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +2 -2
  827. package/dist/modules/instance-ai/eval/thread-restore.service.js +22 -12
  828. package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
  829. package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +2 -3
  830. package/dist/modules/instance-ai/eval/workflow-analysis.js +7 -25
  831. package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
  832. package/dist/modules/instance-ai/event-bus/durable-event-log.d.ts +1 -13
  833. package/dist/modules/instance-ai/event-bus/durable-event-log.js +0 -4
  834. package/dist/modules/instance-ai/event-bus/durable-event-log.js.map +1 -1
  835. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.d.ts +1 -1
  836. package/dist/modules/instance-ai/event-bus/interrupted-run-sweeper.js.map +1 -1
  837. package/dist/modules/instance-ai/extract-resolved-node-parameters.d.ts +2 -1
  838. package/dist/modules/instance-ai/extract-resolved-node-parameters.js +14 -9
  839. package/dist/modules/instance-ai/extract-resolved-node-parameters.js.map +1 -1
  840. package/dist/modules/{agents/builder/format-preview-context.d.ts → instance-ai/format-agent-session-context.d.ts} +2 -3
  841. package/dist/modules/{agents/builder/format-preview-context.js → instance-ai/format-agent-session-context.js} +7 -1
  842. package/dist/modules/instance-ai/format-agent-session-context.js.map +1 -0
  843. package/dist/modules/instance-ai/instance-ai-agent-context.adapter.d.ts +8 -0
  844. package/dist/modules/instance-ai/instance-ai-agent-context.adapter.js +40 -0
  845. package/dist/modules/instance-ai/instance-ai-agent-context.adapter.js.map +1 -0
  846. package/dist/modules/instance-ai/instance-ai-builder-delegate.adapter.d.ts +18 -0
  847. package/dist/modules/instance-ai/instance-ai-builder-delegate.adapter.js +77 -0
  848. package/dist/modules/instance-ai/instance-ai-builder-delegate.adapter.js.map +1 -0
  849. package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.d.ts +3 -1
  850. package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js +6 -3
  851. package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js.map +1 -1
  852. package/dist/modules/instance-ai/instance-ai-credit.service.d.ts +2 -2
  853. package/dist/modules/instance-ai/instance-ai-credit.service.js +6 -1
  854. package/dist/modules/instance-ai/instance-ai-credit.service.js.map +1 -1
  855. package/dist/modules/instance-ai/instance-ai-hub-skills.d.ts +9 -0
  856. package/dist/modules/instance-ai/instance-ai-hub-skills.js +240 -0
  857. package/dist/modules/instance-ai/instance-ai-hub-skills.js.map +1 -0
  858. package/dist/modules/instance-ai/instance-ai-memory.service.d.ts +1 -0
  859. package/dist/modules/instance-ai/instance-ai-memory.service.js +11 -1
  860. package/dist/modules/instance-ai/instance-ai-memory.service.js.map +1 -1
  861. package/dist/modules/instance-ai/instance-ai-model.service.d.ts +4 -2
  862. package/dist/modules/instance-ai/instance-ai-model.service.js +7 -2
  863. package/dist/modules/instance-ai/instance-ai-model.service.js.map +1 -1
  864. package/dist/modules/instance-ai/instance-ai-pending-agent.service.d.ts +3 -15
  865. package/dist/modules/instance-ai/instance-ai-pending-agent.service.js +13 -33
  866. package/dist/modules/instance-ai/instance-ai-pending-agent.service.js.map +1 -1
  867. package/dist/modules/instance-ai/instance-ai-preference-card.service.d.ts +1 -1
  868. package/dist/modules/instance-ai/instance-ai-preference-card.service.js +2 -2
  869. package/dist/modules/instance-ai/instance-ai-preference-card.service.js.map +1 -1
  870. package/dist/modules/instance-ai/instance-ai-settings.service.d.ts +3 -10
  871. package/dist/modules/instance-ai/instance-ai-settings.service.js +6 -40
  872. package/dist/modules/instance-ai/instance-ai-settings.service.js.map +1 -1
  873. package/dist/modules/instance-ai/instance-ai-skill-display.d.ts +3 -0
  874. package/dist/modules/instance-ai/instance-ai-skill-display.js +38 -0
  875. package/dist/modules/instance-ai/instance-ai-skill-display.js.map +1 -0
  876. package/dist/modules/instance-ai/instance-ai-skills.adapter.d.ts +8 -0
  877. package/dist/modules/instance-ai/instance-ai-skills.adapter.js +72 -0
  878. package/dist/modules/instance-ai/instance-ai-skills.adapter.js.map +1 -0
  879. package/dist/modules/instance-ai/instance-ai-skills.service.d.ts +9 -4
  880. package/dist/modules/instance-ai/instance-ai-skills.service.js +22 -6
  881. package/dist/modules/instance-ai/instance-ai-skills.service.js.map +1 -1
  882. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.d.ts +0 -1
  883. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js +0 -1
  884. package/dist/modules/instance-ai/instance-ai-terminal-outcome.service.js.map +1 -1
  885. package/dist/modules/instance-ai/instance-ai.adapter.service.d.ts +11 -7
  886. package/dist/modules/instance-ai/instance-ai.adapter.service.js +304 -124
  887. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  888. package/dist/modules/instance-ai/instance-ai.controller.d.ts +5 -117
  889. package/dist/modules/instance-ai/instance-ai.controller.js +36 -475
  890. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  891. package/dist/modules/instance-ai/instance-ai.module.d.ts +17 -3
  892. package/dist/modules/instance-ai/instance-ai.module.js +47 -13
  893. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  894. package/dist/modules/instance-ai/instance-ai.service.d.ts +18 -90
  895. package/dist/modules/instance-ai/instance-ai.service.js +273 -1644
  896. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  897. package/dist/modules/instance-ai/instance-context.service.d.ts +0 -1
  898. package/dist/modules/instance-ai/instance-context.service.js +9 -6
  899. package/dist/modules/instance-ai/instance-context.service.js.map +1 -1
  900. package/dist/modules/instance-ai/internal-messages.d.ts +1 -0
  901. package/dist/modules/instance-ai/internal-messages.js +17 -0
  902. package/dist/modules/instance-ai/internal-messages.js.map +1 -1
  903. package/dist/modules/instance-ai/message-parser.js +47 -4
  904. package/dist/modules/instance-ai/message-parser.js.map +1 -1
  905. package/dist/modules/instance-ai/model-config-name.js +9 -7
  906. package/dist/modules/instance-ai/model-config-name.js.map +1 -1
  907. package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.d.ts +4 -1
  908. package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js +12 -6
  909. package/dist/modules/instance-ai/repositories/instance-ai-event-log.repository.js.map +1 -1
  910. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.d.ts +8 -3
  911. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.js +58 -4
  912. package/dist/modules/instance-ai/repositories/instance-ai-observation.repository.js.map +1 -1
  913. package/dist/modules/instance-ai/self-healing/candidate-workflow.d.ts +22 -0
  914. package/dist/modules/instance-ai/self-healing/candidate-workflow.js +127 -0
  915. package/dist/modules/instance-ai/self-healing/candidate-workflow.js.map +1 -0
  916. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration-reviewer.entity.d.ts +9 -0
  917. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration-reviewer.entity.js +41 -0
  918. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration-reviewer.entity.js.map +1 -0
  919. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration-workflow.entity.d.ts +11 -0
  920. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration-workflow.entity.js +51 -0
  921. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration-workflow.entity.js.map +1 -0
  922. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration.entity.d.ts +11 -0
  923. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration.entity.js +54 -0
  924. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration.entity.js.map +1 -0
  925. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration.repository.d.ts +17 -0
  926. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration.repository.js +195 -0
  927. package/dist/modules/instance-ai/self-healing/database/self-healing-configuration.repository.js.map +1 -0
  928. package/dist/modules/instance-ai/self-healing/database/self-healing-investigation.entity.d.ts +21 -0
  929. package/dist/modules/instance-ai/self-healing/database/self-healing-investigation.entity.js +94 -0
  930. package/dist/modules/instance-ai/self-healing/database/self-healing-investigation.entity.js.map +1 -0
  931. package/dist/modules/instance-ai/self-healing/database/self-healing-investigation.repository.d.ts +21 -0
  932. package/dist/modules/instance-ai/self-healing/database/self-healing-investigation.repository.js +77 -0
  933. package/dist/modules/instance-ai/self-healing/database/self-healing-investigation.repository.js.map +1 -0
  934. package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.d.ts +3 -0
  935. package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.js +11 -0
  936. package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.js.map +1 -1
  937. package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.d.ts +8 -1
  938. package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js +25 -1
  939. package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js.map +1 -1
  940. package/dist/modules/instance-ai/self-healing/database/self-healing-temporary-workflow.repository.d.ts +14 -0
  941. package/dist/modules/instance-ai/self-healing/database/self-healing-temporary-workflow.repository.js +92 -0
  942. package/dist/modules/instance-ai/self-healing/database/self-healing-temporary-workflow.repository.js.map +1 -0
  943. package/dist/modules/instance-ai/self-healing/self-healing-agent.service.d.ts +94 -0
  944. package/dist/modules/instance-ai/self-healing/self-healing-agent.service.js +429 -0
  945. package/dist/modules/instance-ai/self-healing/self-healing-agent.service.js.map +1 -0
  946. package/dist/modules/instance-ai/self-healing/self-healing-candidate.service.d.ts +143 -0
  947. package/dist/modules/instance-ai/self-healing/self-healing-candidate.service.js +212 -0
  948. package/dist/modules/instance-ai/self-healing/self-healing-candidate.service.js.map +1 -0
  949. package/dist/modules/instance-ai/self-healing/self-healing-configuration.service.d.ts +34 -0
  950. package/dist/modules/instance-ai/self-healing/self-healing-configuration.service.js +213 -0
  951. package/dist/modules/instance-ai/self-healing/self-healing-configuration.service.js.map +1 -0
  952. package/dist/modules/instance-ai/self-healing/self-healing-configurations.controller.d.ts +20 -0
  953. package/dist/modules/instance-ai/self-healing/self-healing-configurations.controller.js +109 -0
  954. package/dist/modules/instance-ai/self-healing/self-healing-configurations.controller.js.map +1 -0
  955. package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.d.ts +2 -1
  956. package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.js +23 -0
  957. package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.js.map +1 -1
  958. package/dist/modules/instance-ai/self-healing/self-healing-investigation.service.d.ts +55 -0
  959. package/dist/modules/instance-ai/self-healing/self-healing-investigation.service.js +255 -0
  960. package/dist/modules/instance-ai/self-healing/self-healing-investigation.service.js.map +1 -0
  961. package/dist/modules/instance-ai/self-healing/self-healing-reconciliation.task.d.ts +11 -0
  962. package/dist/modules/instance-ai/self-healing/self-healing-reconciliation.task.js +37 -0
  963. package/dist/modules/instance-ai/self-healing/self-healing-reconciliation.task.js.map +1 -0
  964. package/dist/modules/instance-ai/self-healing/self-healing-result.service.d.ts +24 -13
  965. package/dist/modules/instance-ai/self-healing/self-healing-result.service.js +133 -68
  966. package/dist/modules/instance-ai/self-healing/self-healing-result.service.js.map +1 -1
  967. package/dist/modules/instance-ai/self-healing/self-healing-temporary-workflow.service.d.ts +29 -0
  968. package/dist/modules/instance-ai/self-healing/self-healing-temporary-workflow.service.js +118 -0
  969. package/dist/modules/instance-ai/self-healing/self-healing-temporary-workflow.service.js.map +1 -0
  970. package/dist/modules/instance-ai/self-healing/self-healing-trigger.service.d.ts +18 -0
  971. package/dist/modules/instance-ai/self-healing/self-healing-trigger.service.js +100 -0
  972. package/dist/modules/instance-ai/self-healing/self-healing-trigger.service.js.map +1 -0
  973. package/dist/modules/instance-ai/storage/typeorm-agent-memory.d.ts +2 -1
  974. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js +3 -1
  975. package/dist/modules/instance-ai/storage/typeorm-agent-memory.js.map +1 -1
  976. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.d.ts +2 -1
  977. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js +3 -0
  978. package/dist/modules/instance-ai/storage/typeorm-observation-log-store.js.map +1 -1
  979. package/dist/modules/instance-ai/suspended-run-restorer.service.js +1 -0
  980. package/dist/modules/instance-ai/suspended-run-restorer.service.js.map +1 -1
  981. package/dist/modules/instance-ai/suspended-thread-persistence.service.d.ts +0 -1
  982. package/dist/modules/instance-ai/suspended-thread-persistence.service.js +0 -1
  983. package/dist/modules/instance-ai/suspended-thread-persistence.service.js.map +1 -1
  984. package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.d.ts +1 -1
  985. package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js +0 -1
  986. package/dist/modules/instance-ai/tracing/instance-ai-tracing.service.js.map +1 -1
  987. package/dist/modules/instance-ai/turn-setup/assistant-agent.factory.d.ts +51 -0
  988. package/dist/modules/instance-ai/turn-setup/assistant-agent.factory.js +226 -0
  989. package/dist/modules/instance-ai/turn-setup/assistant-agent.factory.js.map +1 -0
  990. package/dist/modules/instance-ai/turn-setup/assistant-credits.d.ts +10 -0
  991. package/dist/modules/instance-ai/turn-setup/assistant-credits.js +22 -0
  992. package/dist/modules/instance-ai/turn-setup/assistant-credits.js.map +1 -0
  993. package/dist/modules/instance-ai/turn-setup/assistant-turn-environment.factory.d.ts +84 -0
  994. package/dist/modules/instance-ai/turn-setup/assistant-turn-environment.factory.js +423 -0
  995. package/dist/modules/instance-ai/turn-setup/assistant-turn-environment.factory.js.map +1 -0
  996. package/dist/modules/instance-ai/turn-setup/assistant-turn-input.builder.d.ts +70 -0
  997. package/dist/modules/instance-ai/turn-setup/assistant-turn-input.builder.js +447 -0
  998. package/dist/modules/instance-ai/turn-setup/assistant-turn-input.builder.js.map +1 -0
  999. package/dist/modules/instance-ai/turn-setup/assistant-turn-runtime.d.ts +36 -0
  1000. package/dist/modules/instance-ai/turn-setup/assistant-turn-runtime.js +3 -0
  1001. package/dist/modules/instance-ai/turn-setup/assistant-turn-runtime.js.map +1 -0
  1002. package/dist/modules/instance-ai/workflow-json.d.ts +6 -0
  1003. package/dist/modules/instance-ai/workflow-json.js +36 -0
  1004. package/dist/modules/instance-ai/workflow-json.js.map +1 -0
  1005. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.d.ts +1 -1
  1006. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.js +15 -11
  1007. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.js.map +1 -1
  1008. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.d.ts +8 -0
  1009. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.js +23 -17
  1010. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.js.map +1 -1
  1011. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.d.ts +1 -0
  1012. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.js +14 -0
  1013. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.js.map +1 -1
  1014. package/dist/modules/instance-ai/workflow-verification-obligation-service.d.ts +3 -13
  1015. package/dist/modules/instance-ai/workflow-verification-obligation-service.js +3 -39
  1016. package/dist/modules/instance-ai/workflow-verification-obligation-service.js.map +1 -1
  1017. package/dist/modules/instance-ai/workflow-verification-task-projector.d.ts +1 -4
  1018. package/dist/modules/instance-ai/workflow-verification-task-projector.js +3 -84
  1019. package/dist/modules/instance-ai/workflow-verification-task-projector.js.map +1 -1
  1020. package/dist/modules/instance-registry/instance-registry.service.d.ts +1 -0
  1021. package/dist/modules/instance-registry/instance-registry.service.js +27 -0
  1022. package/dist/modules/instance-registry/instance-registry.service.js.map +1 -1
  1023. package/dist/modules/knowledge/knowledge-availability.service.d.ts +10 -0
  1024. package/dist/modules/knowledge/knowledge-availability.service.js +39 -0
  1025. package/dist/modules/knowledge/knowledge-availability.service.js.map +1 -0
  1026. package/dist/modules/knowledge/knowledge-consumer-scope.d.ts +6 -0
  1027. package/dist/modules/knowledge/knowledge-consumer-scope.js +3 -0
  1028. package/dist/modules/knowledge/knowledge-consumer-scope.js.map +1 -0
  1029. package/dist/modules/knowledge/knowledge-retriever.d.ts +8 -0
  1030. package/dist/modules/knowledge/knowledge-retriever.js +3 -0
  1031. package/dist/modules/knowledge/knowledge-retriever.js.map +1 -0
  1032. package/dist/modules/knowledge/knowledge-sandbox-provider.d.ts +15 -0
  1033. package/dist/modules/knowledge/knowledge-sandbox-provider.js +3 -0
  1034. package/dist/modules/knowledge/knowledge-sandbox-provider.js.map +1 -0
  1035. package/dist/modules/knowledge/knowledge.module.d.ts +5 -0
  1036. package/dist/modules/knowledge/knowledge.module.js +22 -0
  1037. package/dist/modules/knowledge/knowledge.module.js.map +1 -0
  1038. package/dist/modules/knowledge/vector-stores/connection-test.service.d.ts +8 -0
  1039. package/dist/modules/{agents/agent-vector-stores.service.js → knowledge/vector-stores/connection-test.service.js} +11 -21
  1040. package/dist/modules/knowledge/vector-stores/connection-test.service.js.map +1 -0
  1041. package/dist/modules/{agents/json-config → knowledge/vector-stores}/embedding-credential.js +1 -1
  1042. package/dist/modules/knowledge/vector-stores/embedding-credential.js.map +1 -0
  1043. package/dist/modules/{agents/json-config/vector-store-factory.js → knowledge/vector-stores/factory.js} +1 -1
  1044. package/dist/modules/knowledge/vector-stores/factory.js.map +1 -0
  1045. package/dist/modules/ldap.ee/helpers.ee.js.map +1 -1
  1046. package/dist/modules/ldap.ee/ldap.service.ee.d.ts +1 -3
  1047. package/dist/modules/ldap.ee/ldap.service.ee.js +36 -36
  1048. package/dist/modules/ldap.ee/ldap.service.ee.js.map +1 -1
  1049. package/dist/modules/mcp/mcp-api-key.service.d.ts +5 -1
  1050. package/dist/modules/mcp/mcp-api-key.service.js +13 -10
  1051. package/dist/modules/mcp/mcp-api-key.service.js.map +1 -1
  1052. package/dist/modules/mcp/mcp-protected-resource.js +2 -1
  1053. package/dist/modules/mcp/mcp-protected-resource.js.map +1 -1
  1054. package/dist/modules/mcp/mcp-scopes.js +2 -2
  1055. package/dist/modules/mcp/mcp-scopes.js.map +1 -1
  1056. package/dist/modules/mcp/mcp-server-middleware.service.d.ts +12 -6
  1057. package/dist/modules/mcp/mcp-server-middleware.service.js +107 -67
  1058. package/dist/modules/mcp/mcp-server-middleware.service.js.map +1 -1
  1059. package/dist/modules/mcp/mcp-tool-availability.d.ts +0 -1
  1060. package/dist/modules/mcp/mcp-tool-availability.js +0 -4
  1061. package/dist/modules/mcp/mcp-tool-availability.js.map +1 -1
  1062. package/dist/modules/mcp/mcp.constants.d.ts +1 -0
  1063. package/dist/modules/mcp/mcp.constants.js +2 -1
  1064. package/dist/modules/mcp/mcp.constants.js.map +1 -1
  1065. package/dist/modules/mcp/mcp.module.js.map +1 -1
  1066. package/dist/modules/mcp/mcp.service.d.ts +2 -2
  1067. package/dist/modules/mcp/mcp.service.js +9 -4
  1068. package/dist/modules/mcp/mcp.service.js.map +1 -1
  1069. package/dist/modules/mcp/tools/agents/agent-slack-setup.d.ts +1 -1
  1070. package/dist/modules/mcp/tools/agents/agent-tools.service.js +6 -26
  1071. package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
  1072. package/dist/modules/mcp/tools/get-user-preferences.tool.d.ts +1 -1
  1073. package/dist/modules/mcp/tools/get-user-preferences.tool.js +3 -3
  1074. package/dist/modules/mcp/tools/get-user-preferences.tool.js.map +1 -1
  1075. package/dist/modules/mcp/tools/save-user-preference.tool.d.ts +1 -2
  1076. package/dist/modules/mcp/tools/save-user-preference.tool.js.map +1 -1
  1077. package/dist/modules/mcp/tools/skills/skill-extension.service.d.ts +27 -0
  1078. package/dist/modules/mcp/tools/skills/skill-extension.service.js +160 -0
  1079. package/dist/modules/mcp/tools/skills/skill-extension.service.js.map +1 -0
  1080. package/dist/modules/mcp/tools/skills/skill-tools.service.d.ts +5 -3
  1081. package/dist/modules/mcp/tools/skills/skill-tools.service.js +28 -19
  1082. package/dist/modules/mcp/tools/skills/skill-tools.service.js.map +1 -1
  1083. package/dist/modules/mcp/tools/undo-user-preference.tool.d.ts +1 -1
  1084. package/dist/modules/mcp/tools/update-user-preference.tool.d.ts +1 -2
  1085. package/dist/modules/mcp/tools/update-user-preference.tool.js.map +1 -1
  1086. package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.js +6 -0
  1087. package/dist/modules/mcp/tools/workflow-builder/install-community-node.tool.js.map +1 -1
  1088. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.d.ts +1 -1
  1089. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +3 -3
  1090. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  1091. package/dist/modules/mcp-registry/mcp-auth-fetch.d.ts +2 -1
  1092. package/dist/modules/mcp-registry/mcp-auth-fetch.js +3 -3
  1093. package/dist/modules/mcp-registry/mcp-auth-fetch.js.map +1 -1
  1094. package/dist/modules/mcp-registry/mcp-connection-discovery.service.d.ts +4 -1
  1095. package/dist/modules/mcp-registry/mcp-connection-discovery.service.js +42 -2
  1096. package/dist/modules/mcp-registry/mcp-connection-discovery.service.js.map +1 -1
  1097. package/dist/modules/mcp-registry/mcp-registry-connection.d.ts +3 -1
  1098. package/dist/modules/mcp-registry/mcp-registry-connection.js +51 -3
  1099. package/dist/modules/mcp-registry/mcp-registry-connection.js.map +1 -1
  1100. package/dist/modules/mcp-registry/mcp-registry-node-loader.d.ts +1 -0
  1101. package/dist/modules/mcp-registry/mcp-registry-node-loader.js +6 -1
  1102. package/dist/modules/mcp-registry/mcp-registry-node-loader.js.map +1 -1
  1103. package/dist/modules/mcp-registry/mcp-registry-response.js +2 -0
  1104. package/dist/modules/mcp-registry/mcp-registry-response.js.map +1 -1
  1105. package/dist/modules/mcp-registry/node-description-transform.d.ts +1 -0
  1106. package/dist/modules/mcp-registry/node-description-transform.js +60 -2
  1107. package/dist/modules/mcp-registry/node-description-transform.js.map +1 -1
  1108. package/dist/modules/mcp-registry/registry/mcp-registry-ai-gateway.d.ts +3 -0
  1109. package/dist/modules/mcp-registry/registry/mcp-registry-ai-gateway.js +50 -0
  1110. package/dist/modules/mcp-registry/registry/mcp-registry-ai-gateway.js.map +1 -0
  1111. package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js +4 -0
  1112. package/dist/modules/mcp-registry/registry/mcp-registry-api.client.js.map +1 -1
  1113. package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.d.ts +3 -1
  1114. package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.js +9 -2
  1115. package/dist/modules/mcp-registry/registry/mcp-registry-capabilities.js.map +1 -1
  1116. package/dist/modules/mcp-registry/registry/mcp-registry-search.d.ts +3 -1
  1117. package/dist/modules/mcp-registry/registry/mcp-registry-search.js +9 -2
  1118. package/dist/modules/mcp-registry/registry/mcp-registry-search.js.map +1 -1
  1119. package/dist/modules/mcp-registry/registry/mcp-registry.service.d.ts +8 -1
  1120. package/dist/modules/mcp-registry/registry/mcp-registry.service.js +80 -12
  1121. package/dist/modules/mcp-registry/registry/mcp-registry.service.js.map +1 -1
  1122. package/dist/modules/mcp-registry/registry/mcp-registry.types.d.ts +20 -1
  1123. package/dist/modules/mcp-registry/registry/mcp-registry.types.js +18 -3
  1124. package/dist/modules/mcp-registry/registry/mcp-registry.types.js.map +1 -1
  1125. package/dist/modules/mcp-registry/registry/mock-servers.d.ts +87 -1
  1126. package/dist/modules/mcp-registry/registry/mock-servers.js +48 -1
  1127. package/dist/modules/mcp-registry/registry/mock-servers.js.map +1 -1
  1128. package/dist/modules/modules.manifest.js +7 -0
  1129. package/dist/modules/modules.manifest.js.map +1 -1
  1130. package/dist/modules/n8n-packages/engine/credential-save-policy.d.ts +3 -1
  1131. package/dist/modules/n8n-packages/engine/credential-save-policy.js +47 -0
  1132. package/dist/modules/n8n-packages/engine/credential-save-policy.js.map +1 -1
  1133. package/dist/modules/n8n-packages/engine/import-blocked.error.js +2 -1
  1134. package/dist/modules/n8n-packages/engine/import-blocked.error.js.map +1 -1
  1135. package/dist/modules/n8n-packages/engine/import-gates.d.ts +3 -2
  1136. package/dist/modules/n8n-packages/engine/import-gates.js +7 -0
  1137. package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
  1138. package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +11 -1
  1139. package/dist/modules/n8n-packages/engine/import-orchestrator.js +118 -13
  1140. package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
  1141. package/dist/modules/n8n-packages/engine/import-result.d.ts +12 -1
  1142. package/dist/modules/n8n-packages/engine/import-result.js +29 -4
  1143. package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
  1144. package/dist/modules/n8n-packages/engine/import-telemetry.js +6 -2
  1145. package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
  1146. package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +1 -3
  1147. package/dist/modules/n8n-packages/engine/n8n-package-parser.js +12 -22
  1148. package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
  1149. package/dist/modules/n8n-packages/engine/package-layout.d.ts +1 -2
  1150. package/dist/modules/n8n-packages/engine/package-layout.js.map +1 -1
  1151. package/dist/modules/n8n-packages/engine/project-package-importer.js +32 -8
  1152. package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
  1153. package/dist/modules/n8n-packages/engine/workflow-package-importer.js +22 -21
  1154. package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
  1155. package/dist/modules/n8n-packages/entities/agent/agent-body-issues.d.ts +4 -0
  1156. package/dist/modules/n8n-packages/entities/agent/agent-body-issues.js +16 -0
  1157. package/dist/modules/n8n-packages/entities/agent/agent-body-issues.js.map +1 -0
  1158. package/dist/modules/n8n-packages/entities/agent/agent-import-bindings.d.ts +17 -0
  1159. package/dist/modules/n8n-packages/entities/agent/agent-import-bindings.js +275 -0
  1160. package/dist/modules/n8n-packages/entities/agent/agent-import-bindings.js.map +1 -0
  1161. package/dist/modules/n8n-packages/entities/agent/agent-import-match.service.d.ts +13 -0
  1162. package/dist/modules/n8n-packages/entities/agent/agent-import-match.service.js +111 -0
  1163. package/dist/modules/n8n-packages/entities/agent/agent-import-match.service.js.map +1 -0
  1164. package/dist/modules/n8n-packages/entities/agent/agent-import.types.d.ts +61 -0
  1165. package/dist/modules/n8n-packages/entities/agent/agent-import.types.js +14 -0
  1166. package/dist/modules/n8n-packages/entities/agent/agent-import.types.js.map +1 -1
  1167. package/dist/modules/n8n-packages/entities/agent/agent-importer.d.ts +25 -0
  1168. package/dist/modules/n8n-packages/entities/agent/agent-importer.js +223 -0
  1169. package/dist/modules/n8n-packages/entities/agent/agent-importer.js.map +1 -0
  1170. package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.js +2 -2
  1171. package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.js.map +1 -1
  1172. package/dist/modules/n8n-packages/entities/credential/credential-conflict-policy.d.ts +4 -1
  1173. package/dist/modules/n8n-packages/entities/credential/credential-conflict-policy.js +12 -1
  1174. package/dist/modules/n8n-packages/entities/credential/credential-conflict-policy.js.map +1 -1
  1175. package/dist/modules/n8n-packages/entities/credential/credential-export-policy.d.ts +1 -1
  1176. package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js +3 -2
  1177. package/dist/modules/n8n-packages/entities/credential/credential-export-policy.js.map +1 -1
  1178. package/dist/modules/n8n-packages/entities/credential/credential-importer.d.ts +15 -5
  1179. package/dist/modules/n8n-packages/entities/credential/credential-importer.js +116 -11
  1180. package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
  1181. package/dist/modules/n8n-packages/entities/credential/credential-matcher.d.ts +2 -0
  1182. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +31 -14
  1183. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -1
  1184. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +1 -1
  1185. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -1
  1186. package/dist/modules/n8n-packages/entities/credential/credential.serializer.d.ts +1 -1
  1187. package/dist/modules/n8n-packages/entities/credential/credential.serializer.js +2 -2
  1188. package/dist/modules/n8n-packages/entities/credential/credential.serializer.js.map +1 -1
  1189. package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +8 -2
  1190. package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
  1191. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.d.ts +1 -0
  1192. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js +1 -0
  1193. package/dist/modules/n8n-packages/entities/credential/id-based-credential-matcher.js.map +1 -1
  1194. package/dist/modules/n8n-packages/entities/data-table/data-table-compat.d.ts +1 -1
  1195. package/dist/modules/n8n-packages/entities/data-table/data-table-compat.js.map +1 -1
  1196. package/dist/modules/n8n-packages/entities/data-table/data-table-importer.d.ts +1 -1
  1197. package/dist/modules/n8n-packages/entities/data-table/data-table-importer.js.map +1 -1
  1198. package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.d.ts +1 -1
  1199. package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.js.map +1 -1
  1200. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.d.ts +1 -1
  1201. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js +2 -2
  1202. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js.map +1 -1
  1203. package/dist/modules/n8n-packages/entities/data-table/data-table.types.d.ts +1 -1
  1204. package/dist/modules/n8n-packages/entities/folder/folder-import.types.d.ts +6 -2
  1205. package/dist/modules/n8n-packages/entities/folder/folder-importer.d.ts +3 -1
  1206. package/dist/modules/n8n-packages/entities/folder/folder-importer.js +44 -16
  1207. package/dist/modules/n8n-packages/entities/folder/folder-importer.js.map +1 -1
  1208. package/dist/modules/n8n-packages/entities/folder/folder-remover.d.ts +2 -0
  1209. package/dist/modules/n8n-packages/entities/folder/folder-remover.js +12 -2
  1210. package/dist/modules/n8n-packages/entities/folder/folder-remover.js.map +1 -1
  1211. package/dist/modules/n8n-packages/entities/folder/folder.serializer.d.ts +1 -1
  1212. package/dist/modules/n8n-packages/entities/folder/folder.serializer.js +2 -2
  1213. package/dist/modules/n8n-packages/entities/folder/folder.serializer.js.map +1 -1
  1214. package/dist/modules/n8n-packages/entities/import-conflict-policy.d.ts +6 -0
  1215. package/dist/modules/n8n-packages/entities/import-conflict-policy.js +12 -0
  1216. package/dist/modules/n8n-packages/entities/import-conflict-policy.js.map +1 -0
  1217. package/dist/modules/n8n-packages/entities/import-id-policy.d.ts +2 -0
  1218. package/dist/modules/n8n-packages/entities/import-id-policy.js +12 -0
  1219. package/dist/modules/n8n-packages/entities/import-id-policy.js.map +1 -0
  1220. package/dist/modules/n8n-packages/entities/match-source-ids.d.ts +6 -0
  1221. package/dist/modules/n8n-packages/entities/match-source-ids.js +32 -0
  1222. package/dist/modules/n8n-packages/entities/match-source-ids.js.map +1 -0
  1223. package/dist/modules/n8n-packages/entities/planned-placements.d.ts +6 -0
  1224. package/dist/modules/n8n-packages/entities/planned-placements.js +12 -0
  1225. package/dist/modules/n8n-packages/entities/planned-placements.js.map +1 -0
  1226. package/dist/modules/n8n-packages/entities/project/project-import.types.d.ts +1 -1
  1227. package/dist/modules/n8n-packages/entities/project/project.serializer.d.ts +1 -1
  1228. package/dist/modules/n8n-packages/entities/project/project.serializer.js +2 -2
  1229. package/dist/modules/n8n-packages/entities/project/project.serializer.js.map +1 -1
  1230. package/dist/modules/n8n-packages/entities/tag/tag-importer.d.ts +8 -1
  1231. package/dist/modules/n8n-packages/entities/tag/tag-importer.js +13 -5
  1232. package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -1
  1233. package/dist/modules/n8n-packages/entities/tag/tag.exporter.d.ts +5 -0
  1234. package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +6 -3
  1235. package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -1
  1236. package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
  1237. package/dist/modules/n8n-packages/entities/variable/variable.serializer.d.ts +1 -1
  1238. package/dist/modules/n8n-packages/entities/variable/variable.serializer.js +3 -3
  1239. package/dist/modules/n8n-packages/entities/variable/variable.serializer.js.map +1 -1
  1240. package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.d.ts +2 -2
  1241. package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js +8 -5
  1242. package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js.map +1 -1
  1243. package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.d.ts +0 -6
  1244. package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.js +3 -31
  1245. package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.js.map +1 -1
  1246. package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js +8 -28
  1247. package/dist/modules/n8n-packages/entities/workflow/workflow-import-match.service.js.map +1 -1
  1248. package/dist/modules/n8n-packages/entities/workflow/workflow-import.types.d.ts +2 -6
  1249. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.d.ts +5 -1
  1250. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js +16 -7
  1251. package/dist/modules/n8n-packages/entities/workflow/workflow-importer.js.map +1 -1
  1252. package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.d.ts +4 -2
  1253. package/dist/modules/n8n-packages/entities/workflow/workflow-published-state.js.map +1 -1
  1254. package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.d.ts +1 -0
  1255. package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.js +8 -2
  1256. package/dist/modules/n8n-packages/entities/workflow/workflow-publishing-policy.js.map +1 -1
  1257. package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js +13 -2
  1258. package/dist/modules/n8n-packages/entities/workflow/workflow-remover.js.map +1 -1
  1259. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
  1260. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.d.ts +2 -2
  1261. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js +17 -6
  1262. package/dist/modules/n8n-packages/entities/workflow/workflow.serializer.js.map +1 -1
  1263. package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.d.ts +8 -4
  1264. package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js +28 -10
  1265. package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js.map +1 -1
  1266. package/dist/modules/n8n-packages/io/hashing-package-writer.d.ts +1 -0
  1267. package/dist/modules/n8n-packages/io/hashing-package-writer.js +8 -5
  1268. package/dist/modules/n8n-packages/io/hashing-package-writer.js.map +1 -1
  1269. package/dist/modules/n8n-packages/io/manifest-entry.d.ts +1 -2
  1270. package/dist/modules/n8n-packages/io/manifest-entry.js.map +1 -1
  1271. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +2 -2
  1272. package/dist/modules/n8n-packages/n8n-packages.service.js +4 -3
  1273. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
  1274. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +21 -4
  1275. package/dist/modules/n8n-packages/n8n-packages.types.js +5 -1
  1276. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
  1277. package/dist/modules/n8n-packages/spec/serialized/agent.schema.d.ts +13 -7
  1278. package/dist/modules/oauth-server/oauth-token.service.js +0 -3
  1279. package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
  1280. package/dist/modules/oauth-server/oauth.controller.js +7 -1
  1281. package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
  1282. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.d.ts +2 -0
  1283. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js +1 -0
  1284. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-test-trigger-resource.resolver.js.map +1 -1
  1285. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.d.ts +2 -0
  1286. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js +1 -0
  1287. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-mcp-trigger-resource.resolver.js.map +1 -1
  1288. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js +1 -0
  1289. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-test-trigger-resource.resolver.js.map +1 -1
  1290. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js +1 -0
  1291. package/dist/modules/oauth-server/protected-resource-resolvers/workflow-webhook-trigger-resource.resolver.js.map +1 -1
  1292. package/dist/modules/otel/execution-level-tracer.js +1 -1
  1293. package/dist/modules/otel/execution-level-tracer.js.map +1 -1
  1294. package/dist/modules/otel/execution-level-tracer.types.d.ts +2 -0
  1295. package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
  1296. package/dist/modules/otel/gen-ai-attributes.d.ts +3 -0
  1297. package/dist/modules/otel/gen-ai-attributes.js +72 -0
  1298. package/dist/modules/otel/gen-ai-attributes.js.map +1 -0
  1299. package/dist/modules/otel/otel-lifecycle-handler.js +6 -1
  1300. package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
  1301. package/dist/modules/promotions.ee/branch-placement.d.ts +3 -0
  1302. package/dist/modules/promotions.ee/branch-placement.js +3 -1
  1303. package/dist/modules/promotions.ee/branch-placement.js.map +1 -1
  1304. package/dist/modules/promotions.ee/constants.d.ts +0 -5
  1305. package/dist/modules/promotions.ee/constants.js +1 -3
  1306. package/dist/modules/promotions.ee/constants.js.map +1 -1
  1307. package/dist/modules/promotions.ee/cross-project-moves.d.ts +41 -0
  1308. package/dist/modules/promotions.ee/cross-project-moves.js +59 -0
  1309. package/dist/modules/promotions.ee/cross-project-moves.js.map +1 -0
  1310. package/dist/modules/promotions.ee/database/entities/promotion-environment-project.entity.d.ts +10 -0
  1311. package/dist/modules/promotions.ee/database/entities/{promotion-connection-project.entity.js → promotion-environment-project.entity.js} +18 -14
  1312. package/dist/modules/promotions.ee/database/entities/promotion-environment-project.entity.js.map +1 -0
  1313. package/dist/modules/promotions.ee/database/entities/promotion-environment.entity.d.ts +16 -0
  1314. package/dist/modules/promotions.ee/database/entities/{promotion-connection.entity.js → promotion-environment.entity.js} +36 -13
  1315. package/dist/modules/promotions.ee/database/entities/promotion-environment.entity.js.map +1 -0
  1316. package/dist/modules/promotions.ee/database/entities/promotion-review.entity.d.ts +3 -3
  1317. package/dist/modules/promotions.ee/database/entities/promotion-review.entity.js +7 -7
  1318. package/dist/modules/promotions.ee/database/entities/promotion-review.entity.js.map +1 -1
  1319. package/dist/modules/promotions.ee/database/entities/promotion-run.entity.d.ts +3 -3
  1320. package/dist/modules/promotions.ee/database/entities/promotion-run.entity.js +6 -6
  1321. package/dist/modules/promotions.ee/database/entities/promotion-run.entity.js.map +1 -1
  1322. package/dist/modules/promotions.ee/database/promotion-conflict.error.d.ts +0 -3
  1323. package/dist/modules/promotions.ee/database/promotion-conflict.error.js +0 -4
  1324. package/dist/modules/promotions.ee/database/promotion-conflict.error.js.map +1 -1
  1325. package/dist/modules/promotions.ee/database/repositories/promotion-environment-project.repository.d.ts +11 -0
  1326. package/dist/modules/promotions.ee/database/repositories/{promotion-connection-project.repository.js → promotion-environment-project.repository.js} +21 -20
  1327. package/dist/modules/promotions.ee/database/repositories/promotion-environment-project.repository.js.map +1 -0
  1328. package/dist/modules/promotions.ee/database/repositories/promotion-environment.repository.d.ts +28 -0
  1329. package/dist/modules/promotions.ee/database/repositories/{promotion-connection.repository.js → promotion-environment.repository.js} +21 -22
  1330. package/dist/modules/promotions.ee/database/repositories/promotion-environment.repository.js.map +1 -0
  1331. package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js +1 -1
  1332. package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js.map +1 -1
  1333. package/dist/modules/promotions.ee/database/repositories/promotion-review.repository.d.ts +15 -10
  1334. package/dist/modules/promotions.ee/database/repositories/promotion-review.repository.js +53 -21
  1335. package/dist/modules/promotions.ee/database/repositories/promotion-review.repository.js.map +1 -1
  1336. package/dist/modules/promotions.ee/database/repositories/promotion-run.repository.d.ts +2 -1
  1337. package/dist/modules/promotions.ee/database/repositories/promotion-run.repository.js +8 -0
  1338. package/dist/modules/promotions.ee/database/repositories/promotion-run.repository.js.map +1 -1
  1339. package/dist/modules/promotions.ee/git-hosts/{git-host-target.d.ts → git-host-remote.d.ts} +7 -6
  1340. package/dist/modules/promotions.ee/git-hosts/{git-host-target.js → git-host-remote.js} +24 -18
  1341. package/dist/modules/promotions.ee/git-hosts/git-host-remote.js.map +1 -0
  1342. package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js +2 -2
  1343. package/dist/modules/promotions.ee/git-hosts/gitlab-merge-request.client.d.ts +21 -0
  1344. package/dist/modules/promotions.ee/git-hosts/gitlab-merge-request.client.js +230 -0
  1345. package/dist/modules/promotions.ee/git-hosts/gitlab-merge-request.client.js.map +1 -0
  1346. package/dist/modules/promotions.ee/git-hosts/gitlab-merge-request.types.d.ts +87 -0
  1347. package/dist/modules/promotions.ee/git-hosts/gitlab-merge-request.types.js +33 -0
  1348. package/dist/modules/promotions.ee/git-hosts/gitlab-merge-request.types.js.map +1 -0
  1349. package/dist/modules/promotions.ee/promotion-change.service.d.ts +37 -5
  1350. package/dist/modules/promotions.ee/promotion-change.service.js +294 -48
  1351. package/dist/modules/promotions.ee/promotion-change.service.js.map +1 -1
  1352. package/dist/modules/promotions.ee/promotion-changes.controller.d.ts +7 -3
  1353. package/dist/modules/promotions.ee/promotion-changes.controller.js +38 -6
  1354. package/dist/modules/promotions.ee/promotion-changes.controller.js.map +1 -1
  1355. package/dist/modules/promotions.ee/promotion-commit-message.d.ts +15 -0
  1356. package/dist/modules/promotions.ee/promotion-commit-message.js +30 -0
  1357. package/dist/modules/promotions.ee/promotion-commit-message.js.map +1 -0
  1358. package/dist/modules/promotions.ee/promotion-environment.resolver.d.ts +14 -0
  1359. package/dist/modules/promotions.ee/promotion-environment.resolver.js +79 -0
  1360. package/dist/modules/promotions.ee/promotion-environment.resolver.js.map +1 -0
  1361. package/dist/modules/promotions.ee/promotion-environments.service.d.ts +95 -0
  1362. package/dist/modules/promotions.ee/promotion-environments.service.js +224 -0
  1363. package/dist/modules/promotions.ee/promotion-environments.service.js.map +1 -0
  1364. package/dist/modules/promotions.ee/promotion-preview.d.ts +47 -0
  1365. package/dist/modules/promotions.ee/promotion-preview.js +349 -0
  1366. package/dist/modules/promotions.ee/promotion-preview.js.map +1 -0
  1367. package/dist/modules/promotions.ee/promotion-providers.service.d.ts +3 -3
  1368. package/dist/modules/promotions.ee/promotion-providers.service.js +6 -6
  1369. package/dist/modules/promotions.ee/promotion-providers.service.js.map +1 -1
  1370. package/dist/modules/promotions.ee/promotion-review-changes.service.d.ts +19 -0
  1371. package/dist/modules/promotions.ee/promotion-review-changes.service.js +186 -0
  1372. package/dist/modules/promotions.ee/promotion-review-changes.service.js.map +1 -0
  1373. package/dist/modules/promotions.ee/promotion-review-gate.service.d.ts +17 -0
  1374. package/dist/modules/promotions.ee/promotion-review-gate.service.js +91 -0
  1375. package/dist/modules/promotions.ee/promotion-review-gate.service.js.map +1 -0
  1376. package/dist/modules/promotions.ee/promotion-review-host.resolver.d.ts +16 -0
  1377. package/dist/modules/promotions.ee/promotion-review-host.resolver.js +55 -0
  1378. package/dist/modules/promotions.ee/promotion-review-host.resolver.js.map +1 -0
  1379. package/dist/modules/promotions.ee/promotion-review-inbox.service.d.ts +45 -0
  1380. package/dist/modules/promotions.ee/promotion-review-inbox.service.js +283 -0
  1381. package/dist/modules/promotions.ee/promotion-review-inbox.service.js.map +1 -0
  1382. package/dist/modules/promotions.ee/promotion-review.utils.d.ts +3 -0
  1383. package/dist/modules/promotions.ee/promotion-review.utils.js +27 -0
  1384. package/dist/modules/promotions.ee/promotion-review.utils.js.map +1 -0
  1385. package/dist/modules/promotions.ee/promotion-reviews.controller.d.ts +13 -0
  1386. package/dist/modules/promotions.ee/promotion-reviews.controller.js +70 -0
  1387. package/dist/modules/promotions.ee/promotion-reviews.controller.js.map +1 -0
  1388. package/dist/modules/promotions.ee/promotion-reviews.service.d.ts +29 -0
  1389. package/dist/modules/promotions.ee/promotion-reviews.service.js +100 -0
  1390. package/dist/modules/promotions.ee/promotion-reviews.service.js.map +1 -0
  1391. package/dist/modules/promotions.ee/promotion-working-directory.service.d.ts +5 -5
  1392. package/dist/modules/promotions.ee/promotion-working-directory.service.js +15 -16
  1393. package/dist/modules/promotions.ee/promotion-working-directory.service.js.map +1 -1
  1394. package/dist/modules/promotions.ee/promotions-git.service.d.ts +40 -6
  1395. package/dist/modules/promotions.ee/promotions-git.service.js +235 -17
  1396. package/dist/modules/promotions.ee/promotions-git.service.js.map +1 -1
  1397. package/dist/modules/promotions.ee/promotions-git.utils.d.ts +3 -4
  1398. package/dist/modules/promotions.ee/promotions-git.utils.js +3 -4
  1399. package/dist/modules/promotions.ee/promotions-git.utils.js.map +1 -1
  1400. package/dist/modules/promotions.ee/promotions-selective-push.error.d.ts +4 -1
  1401. package/dist/modules/promotions.ee/promotions-selective-push.error.js +4 -3
  1402. package/dist/modules/promotions.ee/promotions-selective-push.error.js.map +1 -1
  1403. package/dist/modules/promotions.ee/promotions.module.d.ts +1 -1
  1404. package/dist/modules/promotions.ee/promotions.module.js +14 -6
  1405. package/dist/modules/promotions.ee/promotions.module.js.map +1 -1
  1406. package/dist/modules/promotions.ee/promotions.service.d.ts +38 -9
  1407. package/dist/modules/promotions.ee/promotions.service.js +452 -107
  1408. package/dist/modules/promotions.ee/promotions.service.js.map +1 -1
  1409. package/dist/modules/promotions.ee/promotions.types.d.ts +13 -8
  1410. package/dist/modules/promotions.ee/working-copy-updater.js +5 -2
  1411. package/dist/modules/promotions.ee/working-copy-updater.js.map +1 -1
  1412. package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +0 -1
  1413. package/dist/modules/provisioning.ee/provisioning.service.ee.js +2 -14
  1414. package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
  1415. package/dist/modules/redaction/executions/execution-redaction.service.js +0 -3
  1416. package/dist/modules/redaction/executions/execution-redaction.service.js.map +1 -1
  1417. package/dist/modules/scim/database/scim-token.repository.d.ts +32 -0
  1418. package/dist/modules/scim/database/scim-token.repository.js +95 -0
  1419. package/dist/modules/scim/database/scim-token.repository.js.map +1 -0
  1420. package/dist/modules/scim/database/scim-user.repository.js +1 -2
  1421. package/dist/modules/scim/database/scim-user.repository.js.map +1 -1
  1422. package/dist/modules/scim/scim-auth.middleware.d.ts +4 -1
  1423. package/dist/modules/scim/scim-auth.middleware.js +18 -10
  1424. package/dist/modules/scim/scim-auth.middleware.js.map +1 -1
  1425. package/dist/modules/scim/scim-discovery.controller.js +1 -8
  1426. package/dist/modules/scim/scim-discovery.controller.js.map +1 -1
  1427. package/dist/modules/scim/scim-settings.service.d.ts +15 -2
  1428. package/dist/modules/scim/scim-settings.service.js +36 -3
  1429. package/dist/modules/scim/scim-settings.service.js.map +1 -1
  1430. package/dist/modules/scim/scim-sso.service.d.ts +16 -0
  1431. package/dist/modules/scim/scim-sso.service.js +72 -0
  1432. package/dist/modules/scim/scim-sso.service.js.map +1 -0
  1433. package/dist/modules/scim/scim-token.controller.d.ts +7 -3
  1434. package/dist/modules/scim/scim-token.controller.js +43 -10
  1435. package/dist/modules/scim/scim-token.controller.js.map +1 -1
  1436. package/dist/modules/scim/scim-token.service.d.ts +8 -13
  1437. package/dist/modules/scim/scim-token.service.js +35 -48
  1438. package/dist/modules/scim/scim-token.service.js.map +1 -1
  1439. package/dist/modules/scim/scim.controller.js +5 -0
  1440. package/dist/modules/scim/scim.controller.js.map +1 -1
  1441. package/dist/modules/scim/scim.errors.d.ts +9 -0
  1442. package/dist/modules/scim/scim.errors.js +19 -1
  1443. package/dist/modules/scim/scim.errors.js.map +1 -1
  1444. package/dist/modules/scim/scim.module.js +2 -0
  1445. package/dist/modules/scim/scim.module.js.map +1 -1
  1446. package/dist/modules/scim/scim.service.d.ts +9 -9
  1447. package/dist/modules/scim/scim.service.js +46 -69
  1448. package/dist/modules/scim/scim.service.js.map +1 -1
  1449. package/dist/modules/skills/assistant-skills-rollout.d.ts +8 -0
  1450. package/dist/modules/{agents/skills/skills-hub-rollout.js → skills/assistant-skills-rollout.js} +16 -19
  1451. package/dist/modules/skills/assistant-skills-rollout.js.map +1 -0
  1452. package/dist/modules/skills/hub-assistant-skill-provider.service.d.ts +12 -0
  1453. package/dist/modules/skills/hub-assistant-skill-provider.service.js +45 -0
  1454. package/dist/modules/skills/hub-assistant-skill-provider.service.js.map +1 -0
  1455. package/dist/modules/skills/skill-agents-proxy.service.d.ts +39 -0
  1456. package/dist/modules/skills/skill-agents-proxy.service.js +74 -0
  1457. package/dist/modules/skills/skill-agents-proxy.service.js.map +1 -0
  1458. package/dist/modules/{agents/skills → skills}/skill-content-hash.d.ts +1 -1
  1459. package/dist/modules/skills/skill-content-hash.js.map +1 -0
  1460. package/dist/modules/skills/skill-file.entity.js.map +1 -0
  1461. package/dist/modules/skills/skill-hash.d.ts +2 -0
  1462. package/dist/modules/skills/skill-hash.js +21 -0
  1463. package/dist/modules/skills/skill-hash.js.map +1 -0
  1464. package/dist/modules/skills/skill-name-taken.error.js.map +1 -0
  1465. package/dist/modules/skills/skill-names.js.map +1 -0
  1466. package/dist/modules/skills/skill-version.entity.js.map +1 -0
  1467. package/dist/modules/{agents/entities → skills}/skill.entity.d.ts +4 -1
  1468. package/dist/modules/{agents/entities → skills}/skill.entity.js +8 -0
  1469. package/dist/modules/skills/skill.entity.js.map +1 -0
  1470. package/dist/modules/{agents/repositories → skills}/skill.repository.d.ts +39 -38
  1471. package/dist/modules/skills/skill.repository.js +410 -0
  1472. package/dist/modules/skills/skill.repository.js.map +1 -0
  1473. package/dist/modules/{agents/skills → skills}/skill.service.d.ts +35 -27
  1474. package/dist/modules/{agents/skills → skills}/skill.service.js +138 -102
  1475. package/dist/modules/skills/skill.service.js.map +1 -0
  1476. package/dist/modules/{agents/skills → skills}/skills-api.service.d.ts +11 -3
  1477. package/dist/modules/{agents/skills → skills}/skills-api.service.js +111 -31
  1478. package/dist/modules/skills/skills-api.service.js.map +1 -0
  1479. package/dist/modules/{agents/skills → skills}/skills-telemetry.d.ts +7 -5
  1480. package/dist/modules/{agents/skills → skills}/skills-telemetry.js +7 -5
  1481. package/dist/modules/skills/skills-telemetry.js.map +1 -0
  1482. package/dist/modules/{agents → skills}/skills.controller.d.ts +8 -6
  1483. package/dist/modules/{agents → skills}/skills.controller.js +27 -8
  1484. package/dist/modules/skills/skills.controller.js.map +1 -0
  1485. package/dist/modules/skills/skills.module.d.ts +5 -0
  1486. package/dist/modules/skills/skills.module.js +30 -0
  1487. package/dist/modules/skills/skills.module.js.map +1 -0
  1488. package/dist/modules/source-control.ee/source-control-export.service.ee.js +15 -11
  1489. package/dist/modules/source-control.ee/source-control-export.service.ee.js.map +1 -1
  1490. package/dist/modules/source-control.ee/source-control-helper.ee.d.ts +1 -1
  1491. package/dist/modules/source-control.ee/source-control-helper.ee.js +4 -2
  1492. package/dist/modules/source-control.ee/source-control-helper.ee.js.map +1 -1
  1493. package/dist/modules/source-control.ee/source-control-import.service.ee.js +13 -1
  1494. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  1495. package/dist/modules/source-control.ee/source-control-preferences.service.ee.js +11 -6
  1496. package/dist/modules/source-control.ee/source-control-preferences.service.ee.js.map +1 -1
  1497. package/dist/modules/source-control.ee/source-control.controller.ee.js +18 -2
  1498. package/dist/modules/source-control.ee/source-control.controller.ee.js.map +1 -1
  1499. package/dist/modules/source-control.ee/source-control.service.ee.js +2 -0
  1500. package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
  1501. package/dist/modules/source-control.ee/types/source-control-preferences.d.ts +2 -0
  1502. package/dist/modules/source-control.ee/types/source-control-preferences.js +7 -0
  1503. package/dist/modules/source-control.ee/types/source-control-preferences.js.map +1 -1
  1504. package/dist/modules/sso-oidc/oidc.service.ee.js +2 -0
  1505. package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
  1506. package/dist/modules/sso-saml/saml-helpers.js +2 -0
  1507. package/dist/modules/sso-saml/saml-helpers.js.map +1 -1
  1508. package/dist/modules/sso-saml/saml.service.ee.d.ts +3 -2
  1509. package/dist/modules/sso-saml/saml.service.ee.js +15 -3
  1510. package/dist/modules/sso-saml/saml.service.ee.js.map +1 -1
  1511. package/dist/modules/token-exchange/services/scoped-jwt.strategy.d.ts +2 -2
  1512. package/dist/modules/token-exchange/services/scoped-jwt.strategy.js +7 -4
  1513. package/dist/modules/token-exchange/services/scoped-jwt.strategy.js.map +1 -1
  1514. package/dist/modules/type-availability-policies/installed-type-restrictions.provider.d.ts +18 -0
  1515. package/dist/modules/type-availability-policies/installed-type-restrictions.provider.js +56 -0
  1516. package/dist/modules/type-availability-policies/installed-type-restrictions.provider.js.map +1 -0
  1517. package/dist/modules/type-availability-policies/sub-workflow-policy-check.controller.d.ts +9 -0
  1518. package/dist/modules/type-availability-policies/sub-workflow-policy-check.controller.js +46 -0
  1519. package/dist/modules/type-availability-policies/sub-workflow-policy-check.controller.js.map +1 -0
  1520. package/dist/modules/type-availability-policies/sub-workflow-policy-check.service.d.ts +24 -0
  1521. package/dist/modules/type-availability-policies/sub-workflow-policy-check.service.js +88 -0
  1522. package/dist/modules/type-availability-policies/sub-workflow-policy-check.service.js.map +1 -0
  1523. package/dist/modules/type-availability-policies/type-availability-policies.module.d.ts +1 -1
  1524. package/dist/modules/type-availability-policies/type-availability-policies.module.js +3 -0
  1525. package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
  1526. package/dist/modules/type-availability-policies/type-violation.d.ts +2 -1
  1527. package/dist/modules/type-availability-policies/type-violation.js +20 -4
  1528. package/dist/modules/type-availability-policies/type-violation.js.map +1 -1
  1529. package/dist/modules/workflow-index/workflow-dependency-query.service.js +2 -5
  1530. package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
  1531. package/dist/node-execution/ephemeral-node-executor.d.ts +3 -3
  1532. package/dist/node-execution/ephemeral-node-executor.js +16 -17
  1533. package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
  1534. package/dist/node-execution/execute-node.service.d.ts +7 -1
  1535. package/dist/node-execution/execute-node.service.js +23 -7
  1536. package/dist/node-execution/execute-node.service.js.map +1 -1
  1537. package/dist/oauth/oauth.service.js +3 -0
  1538. package/dist/oauth/oauth.service.js.map +1 -1
  1539. package/dist/policy/policed-agent-nodes.d.ts +2 -1
  1540. package/dist/policy/policed-agent-nodes.js +45 -7
  1541. package/dist/policy/policed-agent-nodes.js.map +1 -1
  1542. package/dist/policy/policy-enforcement.service.d.ts +2 -0
  1543. package/dist/policy/policy-enforcement.service.js +6 -3
  1544. package/dist/policy/policy-enforcement.service.js.map +1 -1
  1545. package/dist/posthog/index.d.ts +1 -0
  1546. package/dist/posthog/index.js +11 -5
  1547. package/dist/posthog/index.js.map +1 -1
  1548. package/dist/public-api/index.js +2 -0
  1549. package/dist/public-api/index.js.map +1 -1
  1550. package/dist/public-api/media-types/binary-response.js +2 -35
  1551. package/dist/public-api/media-types/binary-response.js.map +1 -1
  1552. package/dist/public-api/public-api-controller.registry.js +10 -3
  1553. package/dist/public-api/public-api-controller.registry.js.map +1 -1
  1554. package/dist/public-api/public-api-rate-limit-settings.service.d.ts +25 -0
  1555. package/dist/public-api/public-api-rate-limit-settings.service.js +133 -0
  1556. package/dist/public-api/public-api-rate-limit-settings.service.js.map +1 -0
  1557. package/dist/public-api/public-api-rate-limit-store.factory.d.ts +16 -0
  1558. package/dist/public-api/public-api-rate-limit-store.factory.js +100 -0
  1559. package/dist/public-api/public-api-rate-limit-store.factory.js.map +1 -0
  1560. package/dist/public-api/public-api-rate-limit.service.d.ts +6 -4
  1561. package/dist/public-api/public-api-rate-limit.service.js +15 -13
  1562. package/dist/public-api/public-api-rate-limit.service.js.map +1 -1
  1563. package/dist/public-api/types.d.ts +2 -3
  1564. package/dist/public-api/v1/controllers/community-packages.public.controller.d.ts +2 -2
  1565. package/dist/public-api/v1/controllers/community-packages.public.controller.js +4 -2
  1566. package/dist/public-api/v1/controllers/community-packages.public.controller.js.map +1 -1
  1567. package/dist/public-api/v1/controllers/credentials.public.controller.d.ts +5 -2
  1568. package/dist/public-api/v1/controllers/credentials.public.controller.js +28 -2
  1569. package/dist/public-api/v1/controllers/credentials.public.controller.js.map +1 -1
  1570. package/dist/public-api/v1/controllers/data-tables.public.controller.d.ts +5 -2
  1571. package/dist/public-api/v1/controllers/data-tables.public.controller.js +31 -2
  1572. package/dist/public-api/v1/controllers/data-tables.public.controller.js.map +1 -1
  1573. package/dist/public-api/v1/controllers/executions.public.controller.js.map +1 -1
  1574. package/dist/public-api/v1/controllers/promotions.public.controller.d.ts +15 -18
  1575. package/dist/public-api/v1/controllers/promotions.public.controller.js +105 -174
  1576. package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -1
  1577. package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +5 -2
  1578. package/dist/public-api/v1/controllers/workflows.public.controller.js +30 -2
  1579. package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
  1580. package/dist/public-api/v1/handlers/credentials/credentials.utils.js +6 -0
  1581. package/dist/public-api/v1/handlers/credentials/credentials.utils.js.map +1 -1
  1582. package/dist/public-api/v1/openapi.yml +1150 -881
  1583. package/dist/public-api/v1/shared/dependency.mapper.d.ts +5 -0
  1584. package/dist/public-api/v1/shared/dependency.mapper.js +28 -0
  1585. package/dist/public-api/v1/shared/dependency.mapper.js.map +1 -0
  1586. package/dist/response-helper.d.ts +2 -0
  1587. package/dist/response-helper.js +43 -1
  1588. package/dist/response-helper.js.map +1 -1
  1589. package/dist/scaling/constants.d.ts +2 -2
  1590. package/dist/scaling/constants.js +2 -0
  1591. package/dist/scaling/constants.js.map +1 -1
  1592. package/dist/scaling/job-processor.js +0 -1
  1593. package/dist/scaling/job-processor.js.map +1 -1
  1594. package/dist/scaling/pubsub/pubsub.event-map.d.ts +5 -0
  1595. package/dist/scaling/pubsub/pubsub.types.d.ts +3 -1
  1596. package/dist/scaling/scaling.service.js +0 -1
  1597. package/dist/scaling/scaling.service.js.map +1 -1
  1598. package/dist/scaling/scaling.types.d.ts +0 -1
  1599. package/dist/scheduling/durable-job-provisioner.js.map +1 -1
  1600. package/dist/server.d.ts +1 -0
  1601. package/dist/server.js +1 -0
  1602. package/dist/server.js.map +1 -1
  1603. package/dist/services/ai-gateway-eligibility.d.ts +1 -1
  1604. package/dist/services/ai-gateway-eligibility.js +3 -0
  1605. package/dist/services/ai-gateway-eligibility.js.map +1 -1
  1606. package/dist/services/ai-gateway.service.d.ts +7 -1
  1607. package/dist/services/ai-gateway.service.js +90 -12
  1608. package/dist/services/ai-gateway.service.js.map +1 -1
  1609. package/dist/services/ai-preference-write.d.ts +1 -1
  1610. package/dist/services/ai-preference-write.js +2 -2
  1611. package/dist/services/ai-preference-write.js.map +1 -1
  1612. package/dist/services/api-key-auth.strategy.d.ts +2 -2
  1613. package/dist/services/api-key-auth.strategy.js +8 -5
  1614. package/dist/services/api-key-auth.strategy.js.map +1 -1
  1615. package/dist/services/engine-data-plane-proxy.service.d.ts +3 -1
  1616. package/dist/services/engine-data-plane-proxy.service.js +5 -0
  1617. package/dist/services/engine-data-plane-proxy.service.js.map +1 -1
  1618. package/dist/services/engine-v2-dispatcher.service.d.ts +5 -1
  1619. package/dist/services/engine-v2-dispatcher.service.js +37 -23
  1620. package/dist/services/engine-v2-dispatcher.service.js.map +1 -1
  1621. package/dist/services/engine-v2-manual-run-planner.d.ts +25 -0
  1622. package/dist/services/engine-v2-manual-run-planner.js +190 -0
  1623. package/dist/services/engine-v2-manual-run-planner.js.map +1 -0
  1624. package/dist/services/export.service.js +3 -1
  1625. package/dist/services/export.service.js.map +1 -1
  1626. package/dist/services/frontend.service.js +0 -2
  1627. package/dist/services/frontend.service.js.map +1 -1
  1628. package/dist/services/node-resource-explorer.service.d.ts +8 -1
  1629. package/dist/services/node-resource-explorer.service.js +155 -1
  1630. package/dist/services/node-resource-explorer.service.js.map +1 -1
  1631. package/dist/services/ownership-transfer/ownership-transfer.manifest.json +25 -5
  1632. package/dist/services/ownership-transfer/ownership-transfer.service.d.ts +1 -0
  1633. package/dist/services/ownership-transfer/ownership-transfer.service.js +7 -0
  1634. package/dist/services/ownership-transfer/ownership-transfer.service.js.map +1 -1
  1635. package/dist/services/ownership.service.js +3 -1
  1636. package/dist/services/ownership.service.js.map +1 -1
  1637. package/dist/services/project.service.ee.d.ts +2 -2
  1638. package/dist/services/project.service.ee.js +16 -72
  1639. package/dist/services/project.service.ee.js.map +1 -1
  1640. package/dist/services/rate-limit.service.js +2 -2
  1641. package/dist/services/rate-limit.service.js.map +1 -1
  1642. package/dist/services/sandbox-settings.service.d.ts +7 -1
  1643. package/dist/services/sandbox-settings.service.js +32 -2
  1644. package/dist/services/sandbox-settings.service.js.map +1 -1
  1645. package/dist/services/session-cookie-auth.strategy.d.ts +2 -2
  1646. package/dist/services/session-cookie-auth.strategy.js +3 -3
  1647. package/dist/services/session-cookie-auth.strategy.js.map +1 -1
  1648. package/dist/services/user.service.js +2 -2
  1649. package/dist/services/user.service.js.map +1 -1
  1650. package/dist/sso.ee/scim-switch-reader.d.ts +16 -0
  1651. package/dist/sso.ee/scim-switch-reader.js +56 -0
  1652. package/dist/sso.ee/scim-switch-reader.js.map +1 -0
  1653. package/dist/sso.ee/sso-helpers.d.ts +4 -0
  1654. package/dist/sso.ee/sso-helpers.js +29 -0
  1655. package/dist/sso.ee/sso-helpers.js.map +1 -1
  1656. package/dist/task-runners/task-broker/task-broker-server.js +3 -5
  1657. package/dist/task-runners/task-broker/task-broker-server.js.map +1 -1
  1658. package/dist/task-runners/task-broker/task-broker.service.js +25 -7
  1659. package/dist/task-runners/task-broker/task-broker.service.js.map +1 -1
  1660. package/dist/task-runners/task-managers/task-requester.js +17 -1
  1661. package/dist/task-runners/task-managers/task-requester.js.map +1 -1
  1662. package/dist/task-runners/task-runner-module.js +3 -0
  1663. package/dist/task-runners/task-runner-module.js.map +1 -1
  1664. package/dist/task-runners/task-runner-process-js.js +5 -1
  1665. package/dist/task-runners/task-runner-process-js.js.map +1 -1
  1666. package/dist/telemetry/cluster-footprint.d.ts +12 -0
  1667. package/dist/telemetry/cluster-footprint.js +20 -0
  1668. package/dist/telemetry/cluster-footprint.js.map +1 -0
  1669. package/dist/telemetry/index.d.ts +3 -0
  1670. package/dist/telemetry/index.js +16 -0
  1671. package/dist/telemetry/index.js.map +1 -1
  1672. package/dist/user-management/email/templates/workflow-deactivated.handlebars +2 -2
  1673. package/dist/user-management/email/user-management-mailer.d.ts +2 -1
  1674. package/dist/user-management/email/user-management-mailer.js +12 -1
  1675. package/dist/user-management/email/user-management-mailer.js.map +1 -1
  1676. package/dist/utils/detect-managed-services.d.ts +5 -0
  1677. package/dist/utils/detect-managed-services.js +33 -0
  1678. package/dist/utils/detect-managed-services.js.map +1 -0
  1679. package/dist/utils/model-stream-stall-options.js.map +1 -0
  1680. package/dist/utils.d.ts +0 -1
  1681. package/dist/utils.js +2 -18
  1682. package/dist/utils.js.map +1 -1
  1683. package/dist/wait-tracker.js +1 -0
  1684. package/dist/wait-tracker.js.map +1 -1
  1685. package/dist/webhooks/hitl-interaction-webhooks.d.ts +2 -0
  1686. package/dist/webhooks/hitl-interaction-webhooks.js +3 -0
  1687. package/dist/webhooks/hitl-interaction-webhooks.js.map +1 -1
  1688. package/dist/webhooks/waiting-webhooks.d.ts +2 -0
  1689. package/dist/webhooks/waiting-webhooks.js +25 -2
  1690. package/dist/webhooks/waiting-webhooks.js.map +1 -1
  1691. package/dist/webhooks/webhook-helpers.js +6 -4
  1692. package/dist/webhooks/webhook-helpers.js.map +1 -1
  1693. package/dist/webhooks/webhook-request-handler.js +8 -10
  1694. package/dist/webhooks/webhook-request-handler.js.map +1 -1
  1695. package/dist/workflow-execute-additional-data.d.ts +1 -1
  1696. package/dist/workflow-execute-additional-data.js +8 -10
  1697. package/dist/workflow-execute-additional-data.js.map +1 -1
  1698. package/dist/workflow-helpers.js +7 -3
  1699. package/dist/workflow-helpers.js.map +1 -1
  1700. package/dist/workflow-runner.js +4 -3
  1701. package/dist/workflow-runner.js.map +1 -1
  1702. package/dist/workflows/deprecated-nodes-validation.service.d.ts +1 -0
  1703. package/dist/workflows/deprecated-nodes-validation.service.js +43 -12
  1704. package/dist/workflows/deprecated-nodes-validation.service.js.map +1 -1
  1705. package/dist/workflows/error-workflow-id.d.ts +3 -0
  1706. package/dist/workflows/error-workflow-id.js +17 -0
  1707. package/dist/workflows/error-workflow-id.js.map +1 -0
  1708. package/dist/workflows/error-workflow-validation.service.d.ts +0 -3
  1709. package/dist/workflows/error-workflow-validation.service.js +0 -14
  1710. package/dist/workflows/error-workflow-validation.service.js.map +1 -1
  1711. package/dist/workflows/publication/publication-status-reporter.js +10 -1
  1712. package/dist/workflows/publication/publication-status-reporter.js.map +1 -1
  1713. package/dist/workflows/publication/trigger-node-id-too-long.error.d.ts +5 -0
  1714. package/dist/workflows/publication/trigger-node-id-too-long.error.js +18 -0
  1715. package/dist/workflows/publication/trigger-node-id-too-long.error.js.map +1 -0
  1716. package/dist/workflows/publication/workflow-publication-applier.d.ts +1 -0
  1717. package/dist/workflows/publication/workflow-publication-applier.js +27 -0
  1718. package/dist/workflows/publication/workflow-publication-applier.js.map +1 -1
  1719. package/dist/workflows/workflow-creation.service.js +4 -3
  1720. package/dist/workflows/workflow-creation.service.js.map +1 -1
  1721. package/dist/workflows/workflow-finder.service.d.ts +1 -1
  1722. package/dist/workflows/workflow-finder.service.js +2 -2
  1723. package/dist/workflows/workflow-finder.service.js.map +1 -1
  1724. package/dist/workflows/workflow-publisher.service.js +0 -3
  1725. package/dist/workflows/workflow-publisher.service.js.map +1 -1
  1726. package/dist/workflows/workflow-validation.service.js +6 -2
  1727. package/dist/workflows/workflow-validation.service.js.map +1 -1
  1728. package/dist/workflows/workflow.service.ee.d.ts +10 -22
  1729. package/dist/workflows/workflow.service.ee.js +119 -57
  1730. package/dist/workflows/workflow.service.ee.js.map +1 -1
  1731. package/dist/workflows/workflow.service.js +15 -2
  1732. package/dist/workflows/workflow.service.js.map +1 -1
  1733. package/dist/workflows/workflows.controller.d.ts +3 -18
  1734. package/dist/workflows/workflows.controller.js +12 -0
  1735. package/dist/workflows/workflows.controller.js.map +1 -1
  1736. package/package.json +52 -48
  1737. package/templates/form-trigger.handlebars +1 -0
  1738. package/dist/constants/credential-sharing.d.ts +0 -1
  1739. package/dist/constants/credential-sharing.js +0 -8
  1740. package/dist/constants/credential-sharing.js.map +0 -1
  1741. package/dist/errors/response-errors/ai-preference-scope-full.error.d.ts +0 -12
  1742. package/dist/errors/response-errors/ai-preference-scope-full.error.js +0 -13
  1743. package/dist/errors/response-errors/ai-preference-scope-full.error.js.map +0 -1
  1744. package/dist/modules/agents/agent-runtime-instrumentation.js.map +0 -1
  1745. package/dist/modules/agents/agent-vector-stores.service.d.ts +0 -11
  1746. package/dist/modules/agents/agent-vector-stores.service.js.map +0 -1
  1747. package/dist/modules/agents/builder/format-preview-context.js.map +0 -1
  1748. package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +0 -107
  1749. package/dist/modules/agents/builder/get-resource-locator-options.tool.js +0 -152
  1750. package/dist/modules/agents/builder/get-resource-locator-options.tool.js.map +0 -1
  1751. package/dist/modules/agents/builder/interactive/ask-credential.tool.d.ts +0 -7
  1752. package/dist/modules/agents/builder/interactive/ask-credential.tool.js +0 -122
  1753. package/dist/modules/agents/builder/interactive/ask-credential.tool.js.map +0 -1
  1754. package/dist/modules/agents/entities/skill-file.entity.js.map +0 -1
  1755. package/dist/modules/agents/entities/skill-version.entity.js.map +0 -1
  1756. package/dist/modules/agents/entities/skill.entity.js.map +0 -1
  1757. package/dist/modules/agents/instance-ai-agent-context.adapter.d.ts +0 -27
  1758. package/dist/modules/agents/instance-ai-agent-context.adapter.js.map +0 -1
  1759. package/dist/modules/agents/instance-ai-builder-delegate.adapter.d.ts +0 -28
  1760. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +0 -137
  1761. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +0 -1
  1762. package/dist/modules/agents/integrations/platforms/discord-gateway.js.map +0 -1
  1763. package/dist/modules/agents/integrations/platforms/discord-integration.js.map +0 -1
  1764. package/dist/modules/agents/integrations/platforms/discord-operations.js.map +0 -1
  1765. package/dist/modules/agents/integrations/platforms/linear-integration.d.ts +0 -27
  1766. package/dist/modules/agents/integrations/platforms/linear-integration.js.map +0 -1
  1767. package/dist/modules/agents/integrations/platforms/linear-operations.js.map +0 -1
  1768. package/dist/modules/agents/integrations/platforms/linear-tool-definitions.js.map +0 -1
  1769. package/dist/modules/agents/integrations/platforms/n8n-chat-flag.service.js.map +0 -1
  1770. package/dist/modules/agents/integrations/platforms/n8n-chat-integration.js.map +0 -1
  1771. package/dist/modules/agents/integrations/platforms/telegram-bridge-behavior.js.map +0 -1
  1772. package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +0 -1
  1773. package/dist/modules/agents/json-config/credential-field-mapping.js.map +0 -1
  1774. package/dist/modules/agents/json-config/embedding-credential.js.map +0 -1
  1775. package/dist/modules/agents/json-config/vector-store-factory.js.map +0 -1
  1776. package/dist/modules/agents/model-stream-stall-options.js.map +0 -1
  1777. package/dist/modules/agents/repositories/skill.repository.js +0 -569
  1778. package/dist/modules/agents/repositories/skill.repository.js.map +0 -1
  1779. package/dist/modules/agents/skills/skill-content-hash.js.map +0 -1
  1780. package/dist/modules/agents/skills/skill-name-taken.error.js.map +0 -1
  1781. package/dist/modules/agents/skills/skill-names.js.map +0 -1
  1782. package/dist/modules/agents/skills/skill.service.js.map +0 -1
  1783. package/dist/modules/agents/skills/skills-api.service.js.map +0 -1
  1784. package/dist/modules/agents/skills/skills-hub-rollout.d.ts +0 -10
  1785. package/dist/modules/agents/skills/skills-hub-rollout.js.map +0 -1
  1786. package/dist/modules/agents/skills/skills-hub-startup-copy.d.ts +0 -40
  1787. package/dist/modules/agents/skills/skills-hub-startup-copy.js +0 -402
  1788. package/dist/modules/agents/skills/skills-hub-startup-copy.js.map +0 -1
  1789. package/dist/modules/agents/skills/skills-telemetry.js.map +0 -1
  1790. package/dist/modules/agents/skills.controller.js.map +0 -1
  1791. package/dist/modules/instance-ai/browser/composite-local-mcp-server.d.ts +0 -16
  1792. package/dist/modules/instance-ai/browser/composite-local-mcp-server.js +0 -57
  1793. package/dist/modules/instance-ai/browser/composite-local-mcp-server.js.map +0 -1
  1794. package/dist/modules/instance-ai/computer-use-availability.d.ts +0 -14
  1795. package/dist/modules/instance-ai/computer-use-availability.js +0 -42
  1796. package/dist/modules/instance-ai/computer-use-availability.js.map +0 -1
  1797. package/dist/modules/instance-ai/eval/data-table-pin-filter.d.ts +0 -7
  1798. package/dist/modules/instance-ai/eval/data-table-pin-filter.js +0 -171
  1799. package/dist/modules/instance-ai/eval/data-table-pin-filter.js.map +0 -1
  1800. package/dist/modules/instance-ai/filesystem/index.d.ts +0 -3
  1801. package/dist/modules/instance-ai/filesystem/index.js +0 -8
  1802. package/dist/modules/instance-ai/filesystem/index.js.map +0 -1
  1803. package/dist/modules/instance-ai/filesystem/local-gateway-registry.d.ts +0 -31
  1804. package/dist/modules/instance-ai/filesystem/local-gateway-registry.js +0 -160
  1805. package/dist/modules/instance-ai/filesystem/local-gateway-registry.js.map +0 -1
  1806. package/dist/modules/instance-ai/filesystem/local-gateway.d.ts +0 -45
  1807. package/dist/modules/instance-ai/filesystem/local-gateway.js +0 -163
  1808. package/dist/modules/instance-ai/filesystem/local-gateway.js.map +0 -1
  1809. package/dist/modules/instance-ai/instance-ai-gateway.service.d.ts +0 -35
  1810. package/dist/modules/instance-ai/instance-ai-gateway.service.js +0 -90
  1811. package/dist/modules/instance-ai/instance-ai-gateway.service.js.map +0 -1
  1812. package/dist/modules/instance-ai/planned-task-action-runner.d.ts +0 -91
  1813. package/dist/modules/instance-ai/planned-task-action-runner.js +0 -138
  1814. package/dist/modules/instance-ai/planned-task-action-runner.js.map +0 -1
  1815. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.d.ts +0 -4
  1816. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.js +0 -12
  1817. package/dist/modules/n8n-packages/entities/workflow/workflow-conflict-policy.js.map +0 -1
  1818. package/dist/modules/n8n-packages/entities/workflow/workflow-id-policy.d.ts +0 -2
  1819. package/dist/modules/n8n-packages/entities/workflow/workflow-id-policy.js +0 -12
  1820. package/dist/modules/n8n-packages/entities/workflow/workflow-id-policy.js.map +0 -1
  1821. package/dist/modules/n8n-packages/spec/serialized/credential.schema.d.ts +0 -26
  1822. package/dist/modules/n8n-packages/spec/serialized/credential.schema.js +0 -24
  1823. package/dist/modules/n8n-packages/spec/serialized/credential.schema.js.map +0 -1
  1824. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.d.ts +0 -75
  1825. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js +0 -43
  1826. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js.map +0 -1
  1827. package/dist/modules/n8n-packages/spec/serialized/folder.schema.d.ts +0 -15
  1828. package/dist/modules/n8n-packages/spec/serialized/folder.schema.js +0 -12
  1829. package/dist/modules/n8n-packages/spec/serialized/folder.schema.js.map +0 -1
  1830. package/dist/modules/n8n-packages/spec/serialized/project.schema.d.ts +0 -51
  1831. package/dist/modules/n8n-packages/spec/serialized/project.schema.js +0 -20
  1832. package/dist/modules/n8n-packages/spec/serialized/project.schema.js.map +0 -1
  1833. package/dist/modules/n8n-packages/spec/serialized/tag.schema.d.ts +0 -12
  1834. package/dist/modules/n8n-packages/spec/serialized/tag.schema.js +0 -11
  1835. package/dist/modules/n8n-packages/spec/serialized/tag.schema.js.map +0 -1
  1836. package/dist/modules/n8n-packages/spec/serialized/variable.schema.d.ts +0 -15
  1837. package/dist/modules/n8n-packages/spec/serialized/variable.schema.js +0 -13
  1838. package/dist/modules/n8n-packages/spec/serialized/variable.schema.js.map +0 -1
  1839. package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.d.ts +0 -12
  1840. package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js +0 -9
  1841. package/dist/modules/n8n-packages/spec/serialized/workflow-metadata.schema.js.map +0 -1
  1842. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.d.ts +0 -201
  1843. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js +0 -53
  1844. package/dist/modules/n8n-packages/spec/serialized/workflow.schema.js.map +0 -1
  1845. package/dist/modules/promotions.ee/database/entities/promotion-config.entity.d.ts +0 -11
  1846. package/dist/modules/promotions.ee/database/entities/promotion-config.entity.js +0 -44
  1847. package/dist/modules/promotions.ee/database/entities/promotion-config.entity.js.map +0 -1
  1848. package/dist/modules/promotions.ee/database/entities/promotion-connection-project.entity.d.ts +0 -8
  1849. package/dist/modules/promotions.ee/database/entities/promotion-connection-project.entity.js.map +0 -1
  1850. package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.d.ts +0 -12
  1851. package/dist/modules/promotions.ee/database/entities/promotion-connection.entity.js.map +0 -1
  1852. package/dist/modules/promotions.ee/database/repositories/promotion-config.repository.d.ts +0 -19
  1853. package/dist/modules/promotions.ee/database/repositories/promotion-config.repository.js +0 -67
  1854. package/dist/modules/promotions.ee/database/repositories/promotion-config.repository.js.map +0 -1
  1855. package/dist/modules/promotions.ee/database/repositories/promotion-connection-project.repository.d.ts +0 -10
  1856. package/dist/modules/promotions.ee/database/repositories/promotion-connection-project.repository.js.map +0 -1
  1857. package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.d.ts +0 -28
  1858. package/dist/modules/promotions.ee/database/repositories/promotion-connection.repository.js.map +0 -1
  1859. package/dist/modules/promotions.ee/git-hosts/git-host-target.js.map +0 -1
  1860. package/dist/modules/promotions.ee/promotion-config.resolver.d.ts +0 -16
  1861. package/dist/modules/promotions.ee/promotion-config.resolver.js +0 -94
  1862. package/dist/modules/promotions.ee/promotion-config.resolver.js.map +0 -1
  1863. package/dist/modules/promotions.ee/promotion-connections.service.d.ts +0 -117
  1864. package/dist/modules/promotions.ee/promotion-connections.service.js +0 -350
  1865. package/dist/modules/promotions.ee/promotion-connections.service.js.map +0 -1
  1866. package/dist/modules/scim/database/scim-api-key.repository.d.ts +0 -11
  1867. package/dist/modules/scim/database/scim-api-key.repository.js +0 -51
  1868. package/dist/modules/scim/database/scim-api-key.repository.js.map +0 -1
  1869. package/dist/services/ai-preference.service.d.ts +0 -86
  1870. package/dist/services/ai-preference.service.js +0 -507
  1871. package/dist/services/ai-preference.service.js.map +0 -1
  1872. /package/dist/{modules/agents/json-config → credentials}/credential-field-mapping.d.ts +0 -0
  1873. /package/dist/{modules/agents/json-config → credentials}/credential-field-mapping.js +0 -0
  1874. /package/dist/modules/agents/integrations/platforms/{discord-gateway.d.ts → discord/discord-gateway.d.ts} +0 -0
  1875. /package/dist/modules/agents/integrations/platforms/{discord-gateway.js → discord/discord-gateway.js} +0 -0
  1876. /package/dist/modules/agents/integrations/platforms/{discord-operations.d.ts → discord/discord-operations.d.ts} +0 -0
  1877. /package/dist/modules/agents/integrations/platforms/{linear-tool-definitions.d.ts → linear/linear-tool-definitions.d.ts} +0 -0
  1878. /package/dist/modules/{agents/json-config → knowledge/vector-stores}/embedding-credential.d.ts +0 -0
  1879. /package/dist/modules/{agents/json-config/vector-store-factory.d.ts → knowledge/vector-stores/factory.d.ts} +0 -0
  1880. /package/dist/modules/{agents/skills → skills}/skill-content-hash.js +0 -0
  1881. /package/dist/modules/{agents/entities → skills}/skill-file.entity.d.ts +0 -0
  1882. /package/dist/modules/{agents/entities → skills}/skill-file.entity.js +0 -0
  1883. /package/dist/modules/{agents/skills → skills}/skill-name-taken.error.d.ts +0 -0
  1884. /package/dist/modules/{agents/skills → skills}/skill-name-taken.error.js +0 -0
  1885. /package/dist/modules/{agents/skills → skills}/skill-names.d.ts +0 -0
  1886. /package/dist/modules/{agents/skills → skills}/skill-names.js +0 -0
  1887. /package/dist/modules/{agents/entities → skills}/skill-version.entity.d.ts +0 -0
  1888. /package/dist/modules/{agents/entities → skills}/skill-version.entity.js +0 -0
  1889. /package/dist/{modules/agents → utils}/model-stream-stall-options.d.ts +0 -0
  1890. /package/dist/{modules/agents → utils}/model-stream-stall-options.js +0 -0
@@ -8,7 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
8
  var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
- var AgentChatExecutionService_1;
12
11
  Object.defineProperty(exports, "__esModule", { value: true });
13
12
  exports.AgentChatExecutionService = exports.AgentTurnAlreadyRunningError = void 0;
14
13
  const backend_common_1 = require("@n8n/backend-common");
@@ -24,13 +23,14 @@ const agent_background_job_service_1 = require("./background/agent-background-jo
24
23
  const sub_agent_background_state_1 = require("./background/sub-agent-background-state");
25
24
  const n8n_checkpoint_storage_1 = require("./integrations/n8n-checkpoint-storage");
26
25
  const agent_execution_repository_1 = require("./repositories/agent-execution.repository");
26
+ const system_agent_registry_1 = require("./system-agents/system-agent-registry");
27
27
  const agent_memory_scope_1 = require("./utils/agent-memory-scope");
28
28
  const agent_thread_access_1 = require("./utils/agent-thread-access");
29
29
  const delegated_child_checkpoints_1 = require("./utils/delegated-child-checkpoints");
30
30
  var agent_turn_already_running_error_1 = require("./agent-turn-already-running.error");
31
31
  Object.defineProperty(exports, "AgentTurnAlreadyRunningError", { enumerable: true, get: function () { return agent_turn_already_running_error_1.AgentTurnAlreadyRunningError; } });
32
- let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExecutionService {
33
- constructor(lockService, executionRepository, executionService, checkpointStorage, publisher, instanceSettings, executionUpdates, steering, backgroundJobService) {
32
+ let AgentChatExecutionService = class AgentChatExecutionService {
33
+ constructor(lockService, executionRepository, executionService, checkpointStorage, publisher, instanceSettings, executionUpdates, steering, backgroundJobService, systemAgents) {
34
34
  this.lockService = lockService;
35
35
  this.executionRepository = executionRepository;
36
36
  this.executionService = executionService;
@@ -40,17 +40,14 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
40
40
  this.executionUpdates = executionUpdates;
41
41
  this.steering = steering;
42
42
  this.backgroundJobService = backgroundJobService;
43
- this.pendingCancellations = new Map();
43
+ this.systemAgents = systemAgents;
44
44
  this.executions = new Map();
45
45
  }
46
+ async withTurnLock(threadId, action) {
47
+ return await this.lockService.withLease(backend_common_1.LockNamespace.KNOWN_LOCKS, `agent-preview-turn:${threadId}`, action);
48
+ }
46
49
  register(context, controller) {
47
50
  this.executions.set(context.executionId, { context, controller });
48
- const pending = this.pendingCancellations.get(context.executionId);
49
- if (pending) {
50
- clearTimeout(pending.timer);
51
- this.pendingCancellations.delete(context.executionId);
52
- this.cancelLocal(pending.context);
53
- }
54
51
  }
55
52
  async settle(executionId, finalize, suspendedRunId) {
56
53
  try {
@@ -66,7 +63,7 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
66
63
  if (!execution?.controller.signal.aborted || !suspendedRunId)
67
64
  return;
68
65
  const { context } = execution;
69
- await this.lockService.withLease(backend_common_1.LockNamespace.KNOWN_LOCKS, `agent-preview-turn:${context.threadId}`, async () => {
66
+ await this.withTurnLock(context.threadId, async () => {
70
67
  const latest = await this.executionRepository.findLatestByThreadId(context.threadId);
71
68
  if (latest?.id !== executionId)
72
69
  return;
@@ -83,7 +80,7 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
83
80
  }
84
81
  }
85
82
  async requestCancel(context) {
86
- return await this.lockService.withLease(backend_common_1.LockNamespace.KNOWN_LOCKS, `agent-preview-turn:${context.threadId}`, async () => {
83
+ return await this.withTurnLock(context.threadId, async () => {
87
84
  const execution = await this.getOwnedExecution(context);
88
85
  if (!execution)
89
86
  throw new errors_1.NotFoundError('Execution not found');
@@ -96,55 +93,64 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
96
93
  await this.steering.close(context.threadId, context.executionId);
97
94
  if (this.cancelLocal(context))
98
95
  return true;
99
- if (execution.status !== 'running')
100
- return await this.cancelRecordedSuspension(context);
101
- this.cancelOrRemember(context);
102
- if (!this.instanceSettings.isMultiMain)
103
- return true;
104
- const { surface, ...rest } = context;
105
- await this.publisher.publishCommand({
106
- command: 'cancel-agent-chat-execution',
107
- payload: { ...rest, surface, productionN8nChat: surface === 'n8n-chat' },
108
- });
109
- return true;
96
+ const running = execution.status === 'running';
97
+ if (this.instanceSettings.isMultiMain && (running || context.scope !== 'foreground')) {
98
+ const { surface, scope, ...rest } = context;
99
+ await this.publisher.publishCommand({
100
+ command: scope === 'foreground'
101
+ ? 'cancel-agent-chat-foreground'
102
+ : 'cancel-agent-chat-execution',
103
+ payload: { ...rest, surface, productionN8nChat: surface === 'n8n-chat' },
104
+ });
105
+ }
106
+ return running || (await this.cancelRecordedSuspension(context));
110
107
  }
111
108
  finally {
112
- await this.backgroundJobService.cancelForParent(context.agentId, context.threadId, (0, agent_thread_access_1.chatSurfaceMemoryResourceId)(context.surface, context.userId));
109
+ if (context.scope !== 'foreground')
110
+ await this.backgroundJobService.cancelForParent(context.agentId, context.threadId, (0, agent_thread_access_1.chatSurfaceMemoryResourceId)(context.surface, context.userId));
113
111
  }
114
112
  });
115
113
  }
116
- async handleCancel(payload) {
114
+ async onCancelExecution(payload) {
115
+ await this.cancelExecution(payload, 'all');
116
+ }
117
+ async onCancelForegroundExecution(payload) {
118
+ await this.cancelExecution(payload, 'foreground');
119
+ }
120
+ async cancelExecution(payload, scope) {
117
121
  const { productionN8nChat, surface, ...rest } = payload;
118
122
  const context = {
119
123
  ...rest,
124
+ scope,
120
125
  surface: surface ?? (productionN8nChat ? 'n8n-chat' : 'preview'),
121
126
  };
122
127
  if (await this.cancelLocalWithChildren(context))
123
128
  return;
124
- await this.lockService.withLease(backend_common_1.LockNamespace.KNOWN_LOCKS, `agent-preview-turn:${context.threadId}`, async () => {
129
+ await this.withTurnLock(context.threadId, async () => {
125
130
  if (await this.cancelLocalWithChildren(context))
126
131
  return;
127
132
  const execution = await this.getOwnedExecution(context);
128
133
  if (!execution)
129
134
  return;
130
- if (execution.status === 'running')
131
- this.cancelOrRemember(context);
135
+ if (execution.status !== 'running') {
136
+ const latest = await this.executionRepository.findLatestByThreadId(context.threadId);
137
+ if (latest?.id !== context.executionId)
138
+ return;
139
+ }
140
+ if (context.scope !== 'foreground') {
141
+ await this.backgroundJobService.cancelForParent(context.agentId, context.threadId, (0, agent_thread_access_1.chatSurfaceMemoryResourceId)(context.surface, context.userId));
142
+ }
132
143
  await this.cancelRecordedSuspension(context);
133
144
  });
134
145
  }
135
146
  async cancelLocalWithChildren(context) {
136
147
  if (!this.cancelLocal(context))
137
148
  return false;
149
+ if (context.scope === 'foreground')
150
+ return true;
138
151
  await this.backgroundJobService.cancelForParent(context.agentId, context.threadId, (0, agent_thread_access_1.chatSurfaceMemoryResourceId)(context.surface, context.userId));
139
152
  return true;
140
153
  }
141
- cancelOrRemember(context) {
142
- if (this.cancelLocal(context) || this.pendingCancellations.has(context.executionId))
143
- return;
144
- const timer = setTimeout(() => this.pendingCancellations.delete(context.executionId), AgentChatExecutionService_1.PENDING_CANCEL_TTL_MS);
145
- timer.unref();
146
- this.pendingCancellations.set(context.executionId, { context, timer });
147
- }
148
154
  cancelLocal(context) {
149
155
  const execution = this.executions.get(context.executionId);
150
156
  if (!execution ||
@@ -153,7 +159,9 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
153
159
  execution.context.threadId !== context.threadId ||
154
160
  execution.context.userId !== context.userId)
155
161
  return false;
156
- execution.controller.abort(sub_agent_background_state_1.PARENT_TASK_CANCELLED_REASON);
162
+ execution.controller.abort(context.scope === 'foreground'
163
+ ? new DOMException('Response stopped', 'AbortError')
164
+ : sub_agent_background_state_1.PARENT_TASK_CANCELLED_REASON);
157
165
  return true;
158
166
  }
159
167
  async getOwnedExecution(context) {
@@ -167,16 +175,14 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
167
175
  return execution;
168
176
  }
169
177
  canAccessExecution(context, thread, source) {
170
- switch (context.surface) {
171
- case 'n8n-chat':
172
- return (thread.accessScope === 'user' &&
173
- thread.ownerId === context.userId &&
174
- source === agent_thread_access_1.N8N_CHAT_PRODUCTION_SOURCE);
175
- case 'system':
176
- return (0, agent_thread_access_1.canContinueSystemThread)(thread, context.userId, source);
177
- case 'preview':
178
- return (0, agent_thread_access_1.canContinueThreadInPreview)(thread, context.userId, source);
178
+ const isSystemAgent = this.systemAgents.has(thread.agentId);
179
+ if (context.surface === 'n8n-chat') {
180
+ return (!isSystemAgent &&
181
+ thread.accessScope === 'user' &&
182
+ thread.ownerId === context.userId &&
183
+ source === agent_thread_access_1.N8N_CHAT_PRODUCTION_SOURCE);
179
184
  }
185
+ return (0, agent_thread_access_1.canContinueThreadOnSurface)(context.surface, thread, context.userId, source, isSystemAgent);
180
186
  }
181
187
  async cancelRecordedSuspension(context) {
182
188
  const latest = await this.executionRepository.findLatestByThreadId(context.threadId);
@@ -189,6 +195,7 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
189
195
  return await this.cancelSuspended({
190
196
  agentId: context.agentId,
191
197
  runId: pending.runId,
198
+ cancelBackgroundJobs: context.scope !== 'foreground',
192
199
  resourceId: (0, agent_thread_access_1.chatSurfaceMemoryResourceId)(context.surface, context.userId),
193
200
  });
194
201
  }
@@ -236,15 +243,20 @@ let AgentChatExecutionService = AgentChatExecutionService_1 = class AgentChatExe
236
243
  }
237
244
  };
238
245
  exports.AgentChatExecutionService = AgentChatExecutionService;
239
- AgentChatExecutionService.PENDING_CANCEL_TTL_MS = 5 * 60 * 1000;
240
246
  __decorate([
241
247
  (0, decorators_1.OnPubSubEvent)('cancel-agent-chat-execution', { instanceType: 'main' }),
242
248
  __metadata("design:type", Function),
243
249
  __metadata("design:paramtypes", [Object]),
244
250
  __metadata("design:returntype", Promise)
245
- ], AgentChatExecutionService.prototype, "handleCancel", null);
246
- exports.AgentChatExecutionService = AgentChatExecutionService = AgentChatExecutionService_1 = __decorate([
251
+ ], AgentChatExecutionService.prototype, "onCancelExecution", null);
252
+ __decorate([
253
+ (0, decorators_1.OnPubSubEvent)('cancel-agent-chat-foreground', { instanceType: 'main' }),
254
+ __metadata("design:type", Function),
255
+ __metadata("design:paramtypes", [Object]),
256
+ __metadata("design:returntype", Promise)
257
+ ], AgentChatExecutionService.prototype, "onCancelForegroundExecution", null);
258
+ exports.AgentChatExecutionService = AgentChatExecutionService = __decorate([
247
259
  (0, di_1.Service)(),
248
- __metadata("design:paramtypes", [backend_common_1.LockService, agent_execution_repository_1.AgentExecutionRepository, agent_execution_service_1.AgentExecutionService, n8n_checkpoint_storage_1.N8NCheckpointStorage, publisher_service_1.Publisher, n8n_core_1.InstanceSettings, agent_execution_update_broadcaster_1.AgentExecutionUpdateBroadcaster, agent_message_steering_service_1.AgentMessageSteeringService, agent_background_job_service_1.AgentBackgroundJobService])
260
+ __metadata("design:paramtypes", [backend_common_1.LockService, agent_execution_repository_1.AgentExecutionRepository, agent_execution_service_1.AgentExecutionService, n8n_checkpoint_storage_1.N8NCheckpointStorage, publisher_service_1.Publisher, n8n_core_1.InstanceSettings, agent_execution_update_broadcaster_1.AgentExecutionUpdateBroadcaster, agent_message_steering_service_1.AgentMessageSteeringService, agent_background_job_service_1.AgentBackgroundJobService, system_agent_registry_1.SystemAgentRegistry])
249
261
  ], AgentChatExecutionService);
250
262
  //# sourceMappingURL=agent-chat-execution.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat-execution.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-chat-execution.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,wDAAiE;AACjE,gDAAgD;AAChD,gCAAkC;AAClC,uCAA4C;AAE5C,wCAA4C;AAE5C,0EAA+D;AAE/D,uEAAkE;AAClE,qFAA+E;AAC/E,6FAAuF;AACvF,4FAAsF;AACtF,wFAAuF;AAEvF,kFAA6E;AAC7E,0FAAqF;AACrF,mEAIoC;AACpC,qEAOqC;AACrC,qFAAmF;AAkBnF,uFAAkF;AAAzE,gJAAA,4BAA4B,OAAA;AAG9B,IAAM,yBAAyB,iCAA/B,MAAM,yBAAyB;IAYrC,YACkB,WAAwB,EACxB,mBAA6C,EAC7C,gBAAuC,EACvC,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,CACD,CAAC;QACF,MAAM,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;QAClE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAC7F,IAAI,MAAM,IAAI,SAAS,EAAE,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;gBAC5B,SAAS,EAAE,MAAM,CAAC,SAAS;gBAC3B,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,QAAQ,EAAE,MAAM,CAAC,EAAE;gBACnB,WAAW,EAAE,SAAS,CAAC,EAAE;aACzB,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;;AA7QwB,+CAAqB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,AAAhB,CAAiB;AAwGxD;IADL,IAAA,0BAAa,EAAC,6BAA6B,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;;;;6DAmBtE;oCA5HW,yBAAyB;IADrC,IAAA,YAAO,GAAE;qCAcsB,4BAAW,EACH,qDAAwB,EAC3B,+CAAqB,EACpB,6CAAoB,EAC5B,6BAAS,EACF,2BAAgB,EAChB,oEAA+B,EACvC,4DAA2B,EACf,wDAAyB;GArBrD,yBAAyB,CA+QrC"}
1
+ {"version":3,"file":"agent-chat-execution.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-chat-execution.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAAiE;AACjE,gDAAgD;AAChD,gCAAkC;AAClC,uCAA4C;AAE5C,wCAA4C;AAE5C,0EAA+D;AAE/D,uEAAkE;AAClE,qFAA+E;AAC/E,6FAAuF;AACvF,4FAAsF;AACtF,wFAAuF;AAEvF,kFAA6E;AAC7E,0FAAqF;AACrF,iFAA4E;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EAGvE;oCAhHW,yBAAyB;IADrC,IAAA,YAAO,GAAE;qCAQsB,4BAAW,EACH,qDAAwB,EAC3B,+CAAqB,EACpB,6CAAoB,EAC5B,6BAAS,EACF,2BAAgB,EAChB,oEAA+B,EACvC,4DAA2B,EACf,wDAAyB,EACjC,2CAAmB;GAhBvC,yBAAyB,CAuTrC"}
@@ -6,18 +6,19 @@ import { AgentQueuedPreviewStreamService } from './agent-queued-preview-stream.s
6
6
  import { type FlushableResponse } from './agent-sse-stream';
7
7
  import type { AgentChatAttachment } from './entities/agent-chat-attachment.entity';
8
8
  import type { StoredAttachmentRef } from './types/agent-chat-attachment';
9
+ export type AgentChatStream = ReturnType<AgentChatRelayService['createChatStream']>;
9
10
  export declare class AgentChatRelayService {
10
11
  private readonly messageQueue;
11
12
  private readonly queuedPreviewStreams;
12
13
  private readonly agentChatAttachmentService;
13
14
  constructor(messageQueue: AgentMessageQueueService, queuedPreviewStreams: AgentQueuedPreviewStreamService, agentChatAttachmentService: AgentChatAttachmentService);
14
- createChatExecution(res: FlushableResponse): {
15
+ createChatStream(res: FlushableResponse): {
15
16
  send: (event: AgentSseEvent) => void;
16
- abortSignal: AbortSignal;
17
17
  onExecutionStarted: (id: string, sessionId: string, inputMessageIds: string[]) => void;
18
18
  onChunk: (chunk: import("./types/agent-steering").AgentExecutionStreamChunk) => void;
19
19
  close: () => void;
20
20
  };
21
+ relayResume(res: FlushableResponse, resume: (stream: AgentChatStream) => Promise<void>): Promise<void>;
21
22
  storeChatAttachments(params: {
22
23
  attachments: AgentChatAttachmentPayload[] | undefined;
23
24
  agentId: string;
@@ -15,7 +15,7 @@ const di_1 = require("@n8n/di");
15
15
  const errors_1 = require("@n8n/errors");
16
16
  const sanitize_filename_1 = require("@n8n/utils/files/sanitize-filename");
17
17
  const n8n_core_1 = require("n8n-core");
18
- const promises_1 = require("node:stream/promises");
18
+ const response_helper_1 = require("../../response-helper");
19
19
  const agent_chat_attachment_service_1 = require("./agent-chat-attachment.service");
20
20
  const agent_message_queue_service_1 = require("./agent-message-queue.service");
21
21
  const agent_queued_preview_stream_service_1 = require("./agent-queued-preview-stream.service");
@@ -27,27 +27,29 @@ let AgentChatRelayService = class AgentChatRelayService {
27
27
  this.queuedPreviewStreams = queuedPreviewStreams;
28
28
  this.agentChatAttachmentService = agentChatAttachmentService;
29
29
  }
30
- createChatExecution(res) {
30
+ createChatStream(res) {
31
31
  const delivery = (0, agent_sse_stream_1.initSseStream)(res);
32
- const requestController = new AbortController();
33
- const abandon = () => requestController.abort();
34
- delivery.abortSignal.addEventListener('abort', abandon, { once: true });
35
- if (delivery.abortSignal.aborted)
36
- abandon();
37
32
  return {
38
33
  send: delivery.send,
39
- abortSignal: requestController.signal,
40
34
  onExecutionStarted: (id, sessionId, inputMessageIds) => {
41
- delivery.abortSignal.removeEventListener('abort', abandon);
42
35
  delivery.send({ type: 'execution-started', executionId: id, sessionId, inputMessageIds });
43
36
  },
44
37
  onChunk: delivery.onChunk,
45
- close: () => {
46
- delivery.abortSignal.removeEventListener('abort', abandon);
47
- delivery.close();
48
- },
38
+ close: delivery.close,
49
39
  };
50
40
  }
41
+ async relayResume(res, resume) {
42
+ const stream = this.createChatStream(res);
43
+ try {
44
+ await resume(stream);
45
+ }
46
+ catch (error) {
47
+ stream.send((0, agent_sse_stream_1.toChatErrorEvent)(error, 'Resume failed'));
48
+ }
49
+ finally {
50
+ stream.close();
51
+ }
52
+ }
51
53
  async storeChatAttachments(params) {
52
54
  const { attachments, agentId, projectId, threadId, resourceId, source = 'chat' } = params;
53
55
  if (!attachments?.length)
@@ -136,24 +138,15 @@ let AgentChatRelayService = class AgentChatRelayService {
136
138
  }
137
139
  throw error;
138
140
  }
139
- res.setHeader('Content-Type', attachment.mimeType);
140
- res.setHeader('Content-Length', attachment.fileSizeBytes);
141
- res.setHeader('X-Content-Type-Options', 'nosniff');
142
- res.setHeader('Content-Security-Policy', (0, n8n_core_1.getHtmlSandboxCSP)());
143
- if (!api_types_1.ViewableMimeTypes.includes(attachment.mimeType.toLowerCase())) {
144
- res.setHeader('Content-Disposition', `attachment; filename="${(0, sanitize_filename_1.sanitizeFilename)(attachment.fileName)}"`);
145
- }
146
- try {
147
- await (0, promises_1.pipeline)(stream, res);
148
- }
149
- catch (error) {
150
- if (error instanceof Error &&
151
- 'code' in error &&
152
- error.code === 'ERR_STREAM_PREMATURE_CLOSE') {
153
- return;
141
+ await (0, response_helper_1.sendStreamToResponse)(res, stream, () => {
142
+ res.setHeader('Content-Type', attachment.mimeType);
143
+ res.setHeader('Content-Length', attachment.fileSizeBytes);
144
+ res.setHeader('X-Content-Type-Options', 'nosniff');
145
+ res.setHeader('Content-Security-Policy', (0, n8n_core_1.getHtmlSandboxCSP)());
146
+ if (!api_types_1.ViewableMimeTypes.includes(attachment.mimeType.toLowerCase())) {
147
+ res.setHeader('Content-Disposition', `attachment; filename="${(0, sanitize_filename_1.sanitizeFilename)(attachment.fileName)}"`);
154
148
  }
155
- throw error;
156
- }
149
+ });
157
150
  }
158
151
  };
159
152
  exports.AgentChatRelayService = AgentChatRelayService;
@@ -1 +1 @@
1
- {"version":3,"file":"agent-chat-relay.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-chat-relay.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAMwB;AACxB,gCAAkC;AAClC,wCAA6D;AAC7D,0EAAsE;AAEtE,uCAAgE;AAChE,mDAAgD;AAEhD,mFAA6E;AAC7E,+EAAyE;AACzE,+FAAwF;AACxF,yDAA6F;AAG7F,qEAAqE;AAO9D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YACkB,YAAsC,EACtC,oBAAqD,EACrD,0BAAsD;4BAFtD,YAAY;oCACZ,oBAAoB;0CACpB,0BAA0B;IACzC,CAAC;IAEJ,mBAAmB,CAAC,GAAsB;QACzC,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,GAAG,CAAC,CAAC;QACpC,MAAM,iBAAiB,GAAG,IAAI,eAAe,EAAE,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A,mBAAQ,EAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IACC,KAAK,YAAY,KAAK;gBACtB,MAAM,IAAI,KAAK;gBACf,KAAK,CAAC,IAAI,KAAK,4BAA4B,EAC1C,CAAC;gBACF,OAAO;YACR,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;IACF,CAAC;CACD,CAAA;;gCA1KY,qBAAqB;IADjC,IAAA,YAAO,GAAE;qCAGuB,sDAAwB,EAChB,qEAA+B,EACzB,0DAA0B;GAJ5D,qBAAqB,CA0KjC"}
1
+ {"version":3,"file":"agent-chat-relay.service.js","sourceRoot":"","sources":["../../../src/modules/agents/agent-chat-relay.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,8CAMwB;AACxB,gCAAkC;AAClC,wCAA6D;AAC7D,0EAAsE;AAEtE,uCAAgE;AAEhE,uDAAyD;AAEzD,mFAA6E;AAC7E,+EAAyE;AACzE,+FAAwF;AACxF,yDAA6F;AAG7F,qEAAqE;AAU9D,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACjC,YACkB,YAAsC,EACtC,oBAAqD,EACrD,0BAAsD;4BAFtD,YAAY;oCACZ,oBAAoB;0CACpB,0BAA0B;IACzC,CAAC;IAEJ,gBAAgB,CAAC,GAAsB;QACtC,MAAM,QAAQ,GAAG,IAAA,gCAAa,EAAC,GAAG,CAAC,CAAC;QACpC,OAAO;YACN,IAAI,EAAE,QAAQ,CAAC,IAAI;YACnB,kBAAkB,EAAE,CAAC,EAAU,EAAE,SAAiB,EAAE,eAAyB,EAAE,EAAE;gBAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,EAAE,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC,CAAC;YAC3F,CAAC;YACD,OAAO,EAAE,QAAQ,CAAC,OAAO;YACzB,KAAK,EAAE,QAAQ,CAAC,KAAK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CAAC,0BAA0B,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACtE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,KAAK,YAAY,4BAAiB,EAAE,CAAC;gBACxC,MAAM,IAAI,sBAAa,CAAC,eAAe,YAAY,0BAA0B,CAAC,CAAC;YAChF,CAAC;YACD,MAAM,KAAK,CAAC;QACb,CAAC;QAED,MAAM,IAAA,sCAAoB,EAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;YAC5C,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;YACnD,GAAG,CAAC,SAAS,CAAC,gBAAgB,EAAE,UAAU,CAAC,aAAa,CAAC,CAAC;YAC1D,GAAG,CAAC,SAAS,CAAC,wBAAwB,EAAE,SAAS,CAAC,CAAC;YAInD,GAAG,CAAC,SAAS,CAAC,yBAAyB,EAAE,IAAA,4BAAiB,GAAE,CAAC,CAAC;YAE9D,IAAI,CAAC,6BAAiB,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;gBACpE,GAAG,CAAC,SAAS,CACZ,qBAAqB,EACrB,yBAAyB,IAAA,oCAAgB,EAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CACjE,CAAC;YACH,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD,CAAA;;gCAnKY,qBAAqB;IADjC,IAAA,YAAO,GAAE;qCAGuB,sDAAwB,EAChB,qEAA+B,EACzB,0DAA0B;GAJ5D,qBAAqB,CAmKjC"}
@@ -1,4 +1,4 @@
1
- import { type AgentBackgroundJobsResponse, AgentChatMessageDto, AgentChatQueueUpdateDto, AgentChatQueueSteerDto, AgentChatQueueReorderDto, type AgentChatMessagesResponse, type AgentChatQueueResponse, AgentChatResumeDto } from '@n8n/api-types';
1
+ import { type AgentBackgroundJobsResponse, AgentChatMessageDto, AgentChatCancelDto, AgentChatQueueUpdateDto, AgentChatQueueSteerDto, AgentChatQueueReorderDto, type AgentChatMessagesResponse, type AgentChatQueueResponse, AgentChatResumeDto } from '@n8n/api-types';
2
2
  import { AgentsConfig } from '@n8n/config';
3
3
  import type { AuthenticatedRequest } from '@n8n/db';
4
4
  import type { Response } from 'express';
@@ -9,7 +9,7 @@ import { AgentExecutionOrchestratorService } from './agent-execution-orchestrato
9
9
  import { AgentMessageQueueService } from './agent-message-queue.service';
10
10
  import { AgentChatExecutionService } from './agent-chat-execution.service';
11
11
  import { AgentExecutionService } from './agent-execution.service';
12
- import { type FlushableResponse } from './agent-sse-stream';
12
+ import type { FlushableResponse } from './agent-sse-stream';
13
13
  import { AgentTestChatService } from './agent-test-chat.service';
14
14
  import { AgentTestRunService } from './agent-test-run.service';
15
15
  import { AgentsService } from './agents.service';
@@ -48,12 +48,12 @@ export declare class AgentChatController {
48
48
  }>, res: FlushableResponse, agentId: string, payload: AgentChatResumeDto): Promise<void>;
49
49
  cancelChatExecution(req: AuthenticatedRequest<{
50
50
  projectId: string;
51
- }>, _res: Response, agentId: string, threadId: string, executionId: string): Promise<{
51
+ }>, _res: Response, agentId: string, threadId: string, executionId: string, payload?: AgentChatCancelDto): Promise<{
52
52
  cancelRequested: boolean;
53
53
  }>;
54
54
  cancelChatRun(req: AuthenticatedRequest<{
55
55
  projectId: string;
56
- }>, _res: Response, agentId: string, runId: string): Promise<{
56
+ }>, _res: Response, agentId: string, runId: string, payload?: AgentChatCancelDto): Promise<{
57
57
  cancelled: boolean;
58
58
  }>;
59
59
  cancelProductionChatExecution(req: AuthenticatedRequest<{
@@ -31,7 +31,6 @@ const agent_chat_execution_service_1 = require("./agent-chat-execution.service")
31
31
  const agent_execution_service_1 = require("./agent-execution.service");
32
32
  const agent_thread_access_1 = require("./utils/agent-thread-access");
33
33
  const agent_message_mapper_1 = require("./agent-message-mapper");
34
- const agent_sse_stream_1 = require("./agent-sse-stream");
35
34
  const agent_test_chat_service_1 = require("./agent-test-chat.service");
36
35
  const agent_test_run_service_1 = require("./agent-test-run.service");
37
36
  const agents_service_1 = require("./agents.service");
@@ -111,11 +110,8 @@ let AgentChatController = class AgentChatController {
111
110
  });
112
111
  }
113
112
  async productionChatResume(req, res, agentId, payload) {
114
- const execution = this.chatRelay.createChatExecution(res);
115
- const { send, onChunk, abortSignal, onExecutionStarted } = execution;
116
- let executionId;
117
- try {
118
- abortSignal.throwIfAborted();
113
+ await this.chatRelay.relayResume(res, async ({ send, onChunk, onExecutionStarted }) => {
114
+ let executionId;
119
115
  const stream = this.agentExecutionOrchestratorService.resumeForChat({
120
116
  agentId,
121
117
  projectId: req.params.projectId,
@@ -131,7 +127,6 @@ let AgentChatController = class AgentChatController {
131
127
  onExecutionRecorded: (id) => {
132
128
  executionId = id;
133
129
  },
134
- abortSignal,
135
130
  });
136
131
  let suspended = false;
137
132
  let failed = false;
@@ -145,13 +140,7 @@ let AgentChatController = class AgentChatController {
145
140
  if (!suspended && !failed) {
146
141
  send({ type: 'done', ...(executionId ? { executionId } : {}) });
147
142
  }
148
- }
149
- catch (error) {
150
- send((0, agent_sse_stream_1.toChatErrorEvent)(error, 'Resume failed'));
151
- }
152
- finally {
153
- execution.close();
154
- }
143
+ });
155
144
  }
156
145
  async chat(req, res, agentId, payload) {
157
146
  const { projectId } = req.params;
@@ -177,7 +166,7 @@ let AgentChatController = class AgentChatController {
177
166
  send({
178
167
  type: 'error',
179
168
  message: 'This agent is not ready to run yet.',
180
- errorCode: 'agent_misconfigured',
169
+ errorCode: api_types_1.AGENT_CHAT_ERROR_CODES.agentMisconfigured,
181
170
  missing: prepared.missing,
182
171
  });
183
172
  return undefined;
@@ -210,10 +199,7 @@ let AgentChatController = class AgentChatController {
210
199
  async chatResume(req, res, agentId, payload) {
211
200
  const { projectId } = req.params;
212
201
  const { runId, toolCallId, resumeData } = payload;
213
- const execution = this.chatRelay.createChatExecution(res);
214
- const { send, onChunk, abortSignal, onExecutionStarted } = execution;
215
- try {
216
- abortSignal.throwIfAborted();
202
+ await this.chatRelay.relayResume(res, async ({ send, onChunk, onExecutionStarted }) => {
217
203
  const result = await this.agentTestRunService.resumePreparedDraftRun({
218
204
  agentId,
219
205
  projectId,
@@ -226,7 +212,6 @@ let AgentChatController = class AgentChatController {
226
212
  onChunk,
227
213
  onBudgetNotice: (notice) => send({ type: 'budget-notice', ...notice }),
228
214
  onExecutionStarted,
229
- abortSignal,
230
215
  });
231
216
  if (result.status === 'completed') {
232
217
  send({
@@ -234,15 +219,9 @@ let AgentChatController = class AgentChatController {
234
219
  ...(result.executionId ? { executionId: result.executionId } : {}),
235
220
  });
236
221
  }
237
- }
238
- catch (error) {
239
- send((0, agent_sse_stream_1.toChatErrorEvent)(error, 'Resume failed'));
240
- }
241
- finally {
242
- execution.close();
243
- }
222
+ });
244
223
  }
245
- async cancelChatExecution(req, _res, agentId, threadId, executionId) {
224
+ async cancelChatExecution(req, _res, agentId, threadId, executionId, payload = {}) {
246
225
  const cancelRequested = await this.chatExecutionService.requestCancel({
247
226
  projectId: req.params.projectId,
248
227
  agentId,
@@ -250,10 +229,11 @@ let AgentChatController = class AgentChatController {
250
229
  executionId,
251
230
  userId: req.user.id,
252
231
  surface: 'preview',
232
+ ...(payload.scope ? { scope: payload.scope } : {}),
253
233
  });
254
234
  return { cancelRequested };
255
235
  }
256
- async cancelChatRun(req, _res, agentId, runId) {
236
+ async cancelChatRun(req, _res, agentId, runId, payload = {}) {
257
237
  const { projectId } = req.params;
258
238
  const agent = await this.agentsService.findById(agentId, projectId);
259
239
  if (!agent)
@@ -262,6 +242,7 @@ let AgentChatController = class AgentChatController {
262
242
  agentId,
263
243
  runId,
264
244
  resourceId: (0, agent_memory_scope_1.draftChatMemoryResourceId)(req.user.id),
245
+ ...(payload.scope === 'foreground' ? { cancelBackgroundJobs: false } : {}),
265
246
  });
266
247
  return { cancelled };
267
248
  }
@@ -302,12 +283,7 @@ let AgentChatController = class AgentChatController {
302
283
  if (!history)
303
284
  throw new errors_1.NotFoundError('Session not found');
304
285
  const checkpoint = await this.checkpointStorage.findSuspendedForThread(agentId, threadId);
305
- return {
306
- ...(0, messages_envelope_1.withOpenSuspensions)(history.messages, checkpoint?.persistence?.resourceId === (0, agent_memory_scope_1.productionChatMemoryResourceId)(req.user.id)
307
- ? checkpoint
308
- : null, { appendInactiveCheckpointMessages: false }),
309
- activeExecutionId: history.activeExecutionId,
310
- };
286
+ return (0, messages_envelope_1.threadMessagesResponse)(history, (0, messages_envelope_1.ownCheckpoint)(checkpoint, (0, agent_memory_scope_1.productionChatMemoryResourceId)(req.user.id)));
311
287
  }
312
288
  async getProductionChatAttachment(req, res) {
313
289
  const { projectId, agentId, attachmentId } = req.params;
@@ -573,17 +549,9 @@ let AgentChatController = class AgentChatController {
573
549
  !(await this.agentExecutionService.canUseDraftThread(threadId, projectId, agentId, req.user.id))))) {
574
550
  throw new errors_1.NotFoundError(`Thread "${threadId}" not found`);
575
551
  }
576
- if (!history) {
577
- if (checkpoint)
578
- return { ...(0, messages_envelope_1.withOpenSuspensions)([], checkpoint), activeExecutionId: null };
552
+ if (!history && !checkpoint)
579
553
  throw new errors_1.NotFoundError(`Thread "${threadId}" not found`);
580
- }
581
- return {
582
- ...(0, messages_envelope_1.withOpenSuspensions)(history.messages, checkpoint, {
583
- appendInactiveCheckpointMessages: false,
584
- }),
585
- activeExecutionId: history.activeExecutionId,
586
- };
554
+ return (0, messages_envelope_1.threadMessagesResponse)(history, checkpoint);
587
555
  }
588
556
  async getTestChatMessages(req) {
589
557
  const { projectId, agentId } = req.params;
@@ -595,9 +563,7 @@ let AgentChatController = class AgentChatController {
595
563
  }
596
564
  const messages = await this.agentTestChatService.getTestChatMessages(agentId, req.user.id);
597
565
  const checkpoint = await this.checkpointStorage.findSuspendedForThread(agentId, (0, agent_test_chat_service_1.chatThreadId)(agentId, req.user.id));
598
- return (0, messages_envelope_1.withOpenSuspensions)((0, agent_message_mapper_1.messagesToDto)(messages), checkpoint?.persistence?.resourceId === (0, agent_memory_scope_1.draftChatMemoryResourceId)(req.user.id)
599
- ? checkpoint
600
- : null);
566
+ return (0, messages_envelope_1.withOpenSuspensions)((0, agent_message_mapper_1.messagesToDto)(messages), (0, messages_envelope_1.ownCheckpoint)(checkpoint, (0, agent_memory_scope_1.draftChatMemoryResourceId)(req.user.id)));
601
567
  }
602
568
  async getChatAttachment(req, res) {
603
569
  const { projectId, agentId, attachmentId } = req.params;
@@ -671,8 +637,9 @@ __decorate([
671
637
  __param(2, (0, decorators_1.Param)('agentId')),
672
638
  __param(3, (0, decorators_1.Param)('threadId')),
673
639
  __param(4, (0, decorators_1.Param)('executionId')),
640
+ __param(5, decorators_1.Query),
674
641
  __metadata("design:type", Function),
675
- __metadata("design:paramtypes", [Object, Object, String, String, String]),
642
+ __metadata("design:paramtypes", [Object, Object, String, String, String, api_types_1.AgentChatCancelDto]),
676
643
  __metadata("design:returntype", Promise)
677
644
  ], AgentChatController.prototype, "cancelChatExecution", null);
678
645
  __decorate([
@@ -680,8 +647,9 @@ __decorate([
680
647
  (0, decorators_1.ProjectScope)('agent:execute'),
681
648
  __param(2, (0, decorators_1.Param)('agentId')),
682
649
  __param(3, (0, decorators_1.Param)('runId')),
650
+ __param(4, decorators_1.Query),
683
651
  __metadata("design:type", Function),
684
- __metadata("design:paramtypes", [Object, Object, String, String]),
652
+ __metadata("design:paramtypes", [Object, Object, String, String, api_types_1.AgentChatCancelDto]),
685
653
  __metadata("design:returntype", Promise)
686
654
  ], AgentChatController.prototype, "cancelChatRun", null);
687
655
  __decorate([