n8n 2.43.4 → 2.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1362) hide show
  1. package/dist/abstract-server.d.ts +2 -0
  2. package/dist/abstract-server.js +12 -1
  3. package/dist/abstract-server.js.map +1 -1
  4. package/dist/agent-library-bundle.js +8 -0
  5. package/dist/auth/auth.service.js +1 -1
  6. package/dist/auth/auth.service.js.map +1 -1
  7. package/dist/binary-data/binary-data-access.service.d.ts +4 -1
  8. package/dist/binary-data/binary-data-access.service.js +20 -6
  9. package/dist/binary-data/binary-data-access.service.js.map +1 -1
  10. package/dist/build.tsbuildinfo +1 -1
  11. package/dist/chat/chat-execution-manager.js +1 -0
  12. package/dist/chat/chat-execution-manager.js.map +1 -1
  13. package/dist/commands/base-command.d.ts +4 -0
  14. package/dist/commands/base-command.js +10 -3
  15. package/dist/commands/base-command.js.map +1 -1
  16. package/dist/commands/engine.d.ts +1 -0
  17. package/dist/commands/engine.js +16 -0
  18. package/dist/commands/engine.js.map +1 -1
  19. package/dist/commands/start.js +0 -4
  20. package/dist/commands/start.js.map +1 -1
  21. package/dist/commands/webhook.js +1 -0
  22. package/dist/commands/webhook.js.map +1 -1
  23. package/dist/controllers/e2e.controller.js +1 -0
  24. package/dist/controllers/e2e.controller.js.map +1 -1
  25. package/dist/crash-journal.js +1 -1
  26. package/dist/crash-journal.js.map +1 -1
  27. package/dist/credentials/credential-options.controller.d.ts +10 -0
  28. package/dist/credentials/credential-options.controller.js +64 -0
  29. package/dist/credentials/credential-options.controller.js.map +1 -0
  30. package/dist/credentials/credential-options.service.d.ts +21 -0
  31. package/dist/credentials/credential-options.service.js +105 -0
  32. package/dist/credentials/credential-options.service.js.map +1 -0
  33. package/dist/credentials/credentials.service.d.ts +12 -2
  34. package/dist/credentials/credentials.service.ee.d.ts +3 -1
  35. package/dist/credentials/credentials.service.ee.js +8 -2
  36. package/dist/credentials/credentials.service.ee.js.map +1 -1
  37. package/dist/credentials/credentials.service.js +44 -18
  38. package/dist/credentials/credentials.service.js.map +1 -1
  39. package/dist/credentials/pending-authorization-cleanup.task.js +5 -1
  40. package/dist/credentials/pending-authorization-cleanup.task.js.map +1 -1
  41. package/dist/errors/job-returned-to-queue.error.d.ts +5 -0
  42. package/dist/errors/job-returned-to-queue.error.js +12 -0
  43. package/dist/errors/job-returned-to-queue.error.js.map +1 -0
  44. package/dist/events/maps/relay.event-map.d.ts +24 -2
  45. package/dist/events/maps/system-task-metrics.event-map.d.ts +1 -1
  46. package/dist/events/maps/system-task-metrics.event-map.js.map +1 -1
  47. package/dist/events/relays/telemetry.event-relay.d.ts +2 -0
  48. package/dist/events/relays/telemetry.event-relay.js +66 -2
  49. package/dist/events/relays/telemetry.event-relay.js.map +1 -1
  50. package/dist/executions/engine-v2-execution-reader.service.d.ts +4 -0
  51. package/dist/executions/engine-v2-execution-reader.service.js +11 -0
  52. package/dist/executions/engine-v2-execution-reader.service.js.map +1 -1
  53. package/dist/executions/enqueued-execution-recovery.service.js +5 -1
  54. package/dist/executions/enqueued-execution-recovery.service.js.map +1 -1
  55. package/dist/executions/execution-crash.service.d.ts +3 -1
  56. package/dist/executions/execution-crash.service.js +4 -4
  57. package/dist/executions/execution-crash.service.js.map +1 -1
  58. package/dist/executions/execution-id.d.ts +1 -0
  59. package/dist/executions/execution-id.js +4 -1
  60. package/dist/executions/execution-id.js.map +1 -1
  61. package/dist/executions/execution-persistence.js +1 -1
  62. package/dist/executions/execution-persistence.js.map +1 -1
  63. package/dist/executions/execution-recovery.service.d.ts +1 -0
  64. package/dist/executions/execution-recovery.service.js +17 -5
  65. package/dist/executions/execution-recovery.service.js.map +1 -1
  66. package/dist/executions/pre-execution-checks/credentials-permission-checker.d.ts +3 -1
  67. package/dist/executions/pre-execution-checks/credentials-permission-checker.js +32 -3
  68. package/dist/executions/pre-execution-checks/credentials-permission-checker.js.map +1 -1
  69. package/dist/interfaces.d.ts +4 -1
  70. package/dist/license/license-renewal.task.d.ts +3 -0
  71. package/dist/license/license-renewal.task.js +4 -1
  72. package/dist/license/license-renewal.task.js.map +1 -1
  73. package/dist/license.js +14 -3
  74. package/dist/license.js.map +1 -1
  75. package/dist/load-nodes-and-credentials.d.ts +6 -0
  76. package/dist/load-nodes-and-credentials.js +28 -12
  77. package/dist/load-nodes-and-credentials.js.map +1 -1
  78. package/dist/manual-execution.service.d.ts +5 -3
  79. package/dist/manual-execution.service.js +7 -6
  80. package/dist/manual-execution.service.js.map +1 -1
  81. package/dist/metrics/prometheus/active-workflow-metrics.service.d.ts +3 -5
  82. package/dist/metrics/prometheus/active-workflow-metrics.service.js +6 -13
  83. package/dist/metrics/prometheus/active-workflow-metrics.service.js.map +1 -1
  84. package/dist/metrics/prometheus/cached-metric-query.d.ts +14 -3
  85. package/dist/metrics/prometheus/cached-metric-query.js +59 -7
  86. package/dist/metrics/prometheus/cached-metric-query.js.map +1 -1
  87. package/dist/metrics/prometheus/constant.d.ts +1 -0
  88. package/dist/metrics/prometheus/constant.js +2 -1
  89. package/dist/metrics/prometheus/constant.js.map +1 -1
  90. package/dist/metrics/prometheus/database-metric-query.service.d.ts +39 -0
  91. package/dist/metrics/prometheus/database-metric-query.service.js +88 -0
  92. package/dist/metrics/prometheus/database-metric-query.service.js.map +1 -0
  93. package/dist/metrics/prometheus/db-pool-metrics.service.js +21 -0
  94. package/dist/metrics/prometheus/db-pool-metrics.service.js.map +1 -1
  95. package/dist/metrics/prometheus/prometheus.service.d.ts +3 -1
  96. package/dist/metrics/prometheus/prometheus.service.js +7 -3
  97. package/dist/metrics/prometheus/prometheus.service.js.map +1 -1
  98. package/dist/metrics/prometheus/scheduler-metrics.service.d.ts +7 -5
  99. package/dist/metrics/prometheus/scheduler-metrics.service.js +30 -23
  100. package/dist/metrics/prometheus/scheduler-metrics.service.js.map +1 -1
  101. package/dist/metrics/prometheus/system-task-metrics.service.d.ts +4 -6
  102. package/dist/metrics/prometheus/system-task-metrics.service.js +9 -22
  103. package/dist/metrics/prometheus/system-task-metrics.service.js.map +1 -1
  104. package/dist/metrics/prometheus/workflow-info-metrics.service.d.ts +3 -5
  105. package/dist/metrics/prometheus/workflow-info-metrics.service.js +14 -20
  106. package/dist/metrics/prometheus/workflow-info-metrics.service.js.map +1 -1
  107. package/dist/metrics/prometheus/workflow-publication-metrics.service.d.ts +4 -5
  108. package/dist/metrics/prometheus/workflow-publication-metrics.service.js +10 -22
  109. package/dist/metrics/prometheus/workflow-publication-metrics.service.js.map +1 -1
  110. package/dist/metrics/prometheus/workflow-statistics-metrics.service.d.ts +3 -5
  111. package/dist/metrics/prometheus/workflow-statistics-metrics.service.js +6 -13
  112. package/dist/metrics/prometheus/workflow-statistics-metrics.service.js.map +1 -1
  113. package/dist/middlewares/content-security-policy.js +45 -10
  114. package/dist/middlewares/content-security-policy.js.map +1 -1
  115. package/dist/middlewares/list-query/dtos/workflow.filter.dto.d.ts +2 -0
  116. package/dist/middlewares/list-query/dtos/workflow.filter.dto.js +9 -0
  117. package/dist/middlewares/list-query/dtos/workflow.filter.dto.js.map +1 -1
  118. package/dist/modules/agent-evals/agent-eval-case-generation.service.d.ts +8 -2
  119. package/dist/modules/agent-evals/agent-eval-case-generation.service.js +113 -14
  120. package/dist/modules/agent-evals/agent-eval-case-generation.service.js.map +1 -1
  121. package/dist/modules/agent-evals/agent-eval-fix-suggestion.d.ts +21 -0
  122. package/dist/modules/agent-evals/agent-eval-fix-suggestion.js +55 -0
  123. package/dist/modules/agent-evals/agent-eval-fix-suggestion.js.map +1 -0
  124. package/dist/modules/agent-evals/agent-eval-instructions-rewrite.d.ts +22 -0
  125. package/dist/modules/agent-evals/agent-eval-instructions-rewrite.js +108 -0
  126. package/dist/modules/agent-evals/agent-eval-instructions-rewrite.js.map +1 -0
  127. package/dist/modules/agent-evals/agent-eval-judge.d.ts +22 -0
  128. package/dist/modules/agent-evals/agent-eval-judge.js +36 -0
  129. package/dist/modules/agent-evals/agent-eval-judge.js.map +1 -0
  130. package/dist/modules/agent-evals/agent-eval-record-mappers.js +8 -0
  131. package/dist/modules/agent-evals/agent-eval-record-mappers.js.map +1 -1
  132. package/dist/modules/agent-evals/agent-eval-runner.service.d.ts +12 -2
  133. package/dist/modules/agent-evals/agent-eval-runner.service.js +102 -2
  134. package/dist/modules/agent-evals/agent-eval-runner.service.js.map +1 -1
  135. package/dist/modules/agent-evals/agent-eval.service.d.ts +17 -3
  136. package/dist/modules/agent-evals/agent-eval.service.js +185 -2
  137. package/dist/modules/agent-evals/agent-eval.service.js.map +1 -1
  138. package/dist/modules/agent-evals/agent-evals.controller.d.ts +16 -2
  139. package/dist/modules/agent-evals/agent-evals.controller.js +111 -2
  140. package/dist/modules/agent-evals/agent-evals.controller.js.map +1 -1
  141. package/dist/modules/agent-evals/case-generation/case-generation-prompt.d.ts +18 -1
  142. package/dist/modules/agent-evals/case-generation/case-generation-prompt.js +47 -9
  143. package/dist/modules/agent-evals/case-generation/case-generation-prompt.js.map +1 -1
  144. package/dist/modules/agents/agent-budget-alert.service.d.ts +21 -0
  145. package/dist/modules/agents/agent-budget-alert.service.js +82 -0
  146. package/dist/modules/agents/agent-budget-alert.service.js.map +1 -0
  147. package/dist/modules/agents/agent-chat-execution.service.d.ts +6 -2
  148. package/dist/modules/agents/agent-chat-execution.service.js +13 -15
  149. package/dist/modules/agents/agent-chat-execution.service.js.map +1 -1
  150. package/dist/modules/agents/agent-chat.controller.d.ts +36 -0
  151. package/dist/modules/agents/agent-chat.controller.js +149 -54
  152. package/dist/modules/agents/agent-chat.controller.js.map +1 -1
  153. package/dist/modules/agents/agent-checkpoint-pruning.task.d.ts +5 -2
  154. package/dist/modules/agents/agent-checkpoint-pruning.task.js +7 -4
  155. package/dist/modules/agents/agent-checkpoint-pruning.task.js.map +1 -1
  156. package/dist/modules/agents/agent-config-preparation.service.d.ts +325 -0
  157. package/dist/modules/agents/agent-config-preparation.service.js +100 -0
  158. package/dist/modules/agents/agent-config-preparation.service.js.map +1 -0
  159. package/dist/modules/agents/agent-config.service.d.ts +15 -18
  160. package/dist/modules/agents/agent-config.service.js +58 -129
  161. package/dist/modules/agents/agent-config.service.js.map +1 -1
  162. package/dist/modules/agents/agent-context-readers.js +1 -2
  163. package/dist/modules/agents/agent-context-readers.js.map +1 -1
  164. package/dist/modules/agents/agent-custom-tools.service.d.ts +8 -9
  165. package/dist/modules/agents/agent-custom-tools.service.js +14 -19
  166. package/dist/modules/agents/agent-custom-tools.service.js.map +1 -1
  167. package/dist/modules/agents/agent-definition.service.d.ts +19 -0
  168. package/dist/modules/agents/agent-definition.service.js +75 -0
  169. package/dist/modules/agents/agent-definition.service.js.map +1 -0
  170. package/dist/modules/agents/agent-execution-orchestrator.service.d.ts +10 -8
  171. package/dist/modules/agents/agent-execution-orchestrator.service.js +250 -146
  172. package/dist/modules/agents/agent-execution-orchestrator.service.js.map +1 -1
  173. package/dist/modules/agents/agent-execution-update-broadcaster.js +2 -1
  174. package/dist/modules/agents/agent-execution-update-broadcaster.js.map +1 -1
  175. package/dist/modules/agents/agent-execution.service.d.ts +9 -1
  176. package/dist/modules/agents/agent-execution.service.js +22 -1
  177. package/dist/modules/agents/agent-execution.service.js.map +1 -1
  178. package/dist/modules/agents/agent-integration-persistence.service.d.ts +3 -1
  179. package/dist/modules/agents/agent-integration-persistence.service.js +23 -15
  180. package/dist/modules/agents/agent-integration-persistence.service.js.map +1 -1
  181. package/dist/modules/agents/agent-integrations.controller.d.ts +12 -2
  182. package/dist/modules/agents/agent-integrations.controller.js +49 -4
  183. package/dist/modules/agents/agent-integrations.controller.js.map +1 -1
  184. package/dist/modules/agents/agent-interrupted-execution-sweep.task.d.ts +12 -0
  185. package/dist/modules/agents/agent-interrupted-execution-sweep.task.js +36 -0
  186. package/dist/modules/agents/agent-interrupted-execution-sweep.task.js.map +1 -0
  187. package/dist/modules/agents/agent-interrupted-execution-sweeper.d.ts +3 -2
  188. package/dist/modules/agents/agent-interrupted-execution-sweeper.js +20 -7
  189. package/dist/modules/agents/agent-interrupted-execution-sweeper.js.map +1 -1
  190. package/dist/modules/agents/agent-message-queue-consumer.service.js +2 -5
  191. package/dist/modules/agents/agent-message-queue-consumer.service.js.map +1 -1
  192. package/dist/modules/agents/agent-message-queue.service.d.ts +3 -1
  193. package/dist/modules/agents/agent-message-queue.service.js +7 -5
  194. package/dist/modules/agents/agent-message-queue.service.js.map +1 -1
  195. package/dist/modules/agents/agent-message-steering.service.d.ts +2 -1
  196. package/dist/modules/agents/agent-message-steering.service.js +17 -9
  197. package/dist/modules/agents/agent-message-steering.service.js.map +1 -1
  198. package/dist/modules/agents/agent-modification-telemetry.service.d.ts +33 -3
  199. package/dist/modules/agents/agent-modification-telemetry.service.js +11 -8
  200. package/dist/modules/agents/agent-modification-telemetry.service.js.map +1 -1
  201. package/dist/modules/agents/agent-n8n-chat-unavailable.error.d.ts +4 -0
  202. package/dist/modules/agents/agent-n8n-chat-unavailable.error.js +11 -0
  203. package/dist/modules/agents/agent-n8n-chat-unavailable.error.js.map +1 -0
  204. package/dist/modules/agents/agent-policy.service.d.ts +10 -0
  205. package/dist/modules/agents/agent-policy.service.js +44 -0
  206. package/dist/modules/agents/agent-policy.service.js.map +1 -0
  207. package/dist/modules/agents/agent-publish.service.d.ts +17 -8
  208. package/dist/modules/agents/agent-publish.service.js +95 -113
  209. package/dist/modules/agents/agent-publish.service.js.map +1 -1
  210. package/dist/modules/agents/agent-push-recipients.service.d.ts +1 -0
  211. package/dist/modules/agents/agent-push-recipients.service.js +5 -2
  212. package/dist/modules/agents/agent-push-recipients.service.js.map +1 -1
  213. package/dist/modules/agents/agent-runnable-state.service.d.ts +3 -1
  214. package/dist/modules/agents/agent-runnable-state.service.js +5 -3
  215. package/dist/modules/agents/agent-runnable-state.service.js.map +1 -1
  216. package/dist/modules/agents/agent-runtime-cache.service.d.ts +3 -1
  217. package/dist/modules/agents/agent-runtime-cache.service.js +7 -7
  218. package/dist/modules/agents/agent-runtime-cache.service.js.map +1 -1
  219. package/dist/modules/agents/agent-runtime-instrumentation.d.ts +6 -0
  220. package/dist/modules/agents/agent-runtime-reconstruction.service.d.ts +2 -2
  221. package/dist/modules/agents/agent-runtime-reconstruction.service.js +23 -16
  222. package/dist/modules/agents/agent-runtime-reconstruction.service.js.map +1 -1
  223. package/dist/modules/agents/agent-save-completion.service.d.ts +14 -0
  224. package/dist/modules/agents/agent-save-completion.service.js +51 -0
  225. package/dist/modules/agents/agent-save-completion.service.js.map +1 -0
  226. package/dist/modules/agents/agent-setup-completion.service.d.ts +2 -1
  227. package/dist/modules/agents/agent-setup-completion.service.js +5 -3
  228. package/dist/modules/agents/agent-setup-completion.service.js.map +1 -1
  229. package/dist/modules/agents/agent-skill-refs.service.d.ts +12 -0
  230. package/dist/modules/agents/agent-skill-refs.service.js +52 -0
  231. package/dist/modules/agents/agent-skill-refs.service.js.map +1 -0
  232. package/dist/modules/agents/agent-skills.service.d.ts +14 -8
  233. package/dist/modules/agents/agent-skills.service.js +64 -41
  234. package/dist/modules/agents/agent-skills.service.js.map +1 -1
  235. package/dist/modules/agents/agent-sse-stream.d.ts +1 -0
  236. package/dist/modules/agents/agent-sse-stream.js +15 -0
  237. package/dist/modules/agents/agent-sse-stream.js.map +1 -1
  238. package/dist/modules/agents/agent-task.service.d.ts +12 -7
  239. package/dist/modules/agents/agent-task.service.js +35 -31
  240. package/dist/modules/agents/agent-task.service.js.map +1 -1
  241. package/dist/modules/agents/agent-telemetry.d.ts +2 -2
  242. package/dist/modules/agents/agent-telemetry.js +3 -2
  243. package/dist/modules/agents/agent-telemetry.js.map +1 -1
  244. package/dist/modules/agents/agent-test-run.service.d.ts +4 -2
  245. package/dist/modules/agents/agent-test-run.service.js +2 -2
  246. package/dist/modules/agents/agent-test-run.service.js.map +1 -1
  247. package/dist/modules/agents/agent-threads.controller.js +2 -1
  248. package/dist/modules/agents/agent-threads.controller.js.map +1 -1
  249. package/dist/modules/agents/agent-tool-approval.service.d.ts +1 -1
  250. package/dist/modules/agents/agent-tool-approval.service.js +2 -1
  251. package/dist/modules/agents/agent-tool-approval.service.js.map +1 -1
  252. package/dist/modules/agents/agent-turn-execution.service.d.ts +4 -4
  253. package/dist/modules/agents/agent-turn-execution.service.js +27 -25
  254. package/dist/modules/agents/agent-turn-execution.service.js.map +1 -1
  255. package/dist/modules/agents/agent-validation.service.d.ts +11 -7
  256. package/dist/modules/agents/agent-validation.service.js +60 -30
  257. package/dist/modules/agents/agent-validation.service.js.map +1 -1
  258. package/dist/modules/agents/agent-workflow-execution.service.d.ts +13 -5
  259. package/dist/modules/agents/agent-workflow-execution.service.js +44 -20
  260. package/dist/modules/agents/agent-workflow-execution.service.js.map +1 -1
  261. package/dist/modules/agents/agent-workflow-tool-resume.service.js +2 -3
  262. package/dist/modules/agents/agent-workflow-tool-resume.service.js.map +1 -1
  263. package/dist/modules/agents/agents-config.controller.d.ts +16 -0
  264. package/dist/modules/agents/agents-list.controller.d.ts +4 -1
  265. package/dist/modules/agents/agents-list.controller.js +44 -0
  266. package/dist/modules/agents/agents-list.controller.js.map +1 -1
  267. package/dist/modules/agents/agents.controller.js +1 -0
  268. package/dist/modules/agents/agents.controller.js.map +1 -1
  269. package/dist/modules/agents/agents.module.d.ts +1 -3
  270. package/dist/modules/agents/agents.module.js +9 -25
  271. package/dist/modules/agents/agents.module.js.map +1 -1
  272. package/dist/modules/agents/agents.service.d.ts +21 -5
  273. package/dist/modules/agents/agents.service.js +63 -12
  274. package/dist/modules/agents/agents.service.js.map +1 -1
  275. package/dist/modules/agents/background/agent-background-job.service.d.ts +3 -3
  276. package/dist/modules/agents/background/agent-background-job.service.js +39 -10
  277. package/dist/modules/agents/background/agent-background-job.service.js.map +1 -1
  278. package/dist/modules/agents/background/agent-wake.service.js +13 -5
  279. package/dist/modules/agents/background/agent-wake.service.js.map +1 -1
  280. package/dist/modules/agents/background/background-job-tools.d.ts +2 -2
  281. package/dist/modules/agents/background/background-job-tools.js +9 -58
  282. package/dist/modules/agents/background/background-job-tools.js.map +1 -1
  283. package/dist/modules/agents/budget-guardrail.d.ts +1 -0
  284. package/dist/modules/agents/budget-guardrail.js +42 -1
  285. package/dist/modules/agents/budget-guardrail.js.map +1 -1
  286. package/dist/modules/agents/builder/agents-builder-prompts.d.ts +5 -5
  287. package/dist/modules/agents/builder/agents-builder-prompts.js +52 -31
  288. package/dist/modules/agents/builder/agents-builder-prompts.js.map +1 -1
  289. package/dist/modules/agents/builder/agents-builder-tools.service.d.ts +4 -1
  290. package/dist/modules/agents/builder/agents-builder-tools.service.js +189 -89
  291. package/dist/modules/agents/builder/agents-builder-tools.service.js.map +1 -1
  292. package/dist/modules/agents/builder/get-resource-locator-options.tool.d.ts +2 -2
  293. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js +25 -12
  294. package/dist/modules/agents/builder/prompts/config-mutation.prompt.js.map +1 -1
  295. package/dist/modules/agents/builder/prompts/llm-selection.prompt.d.ts +1 -1
  296. package/dist/modules/agents/builder/prompts/llm-selection.prompt.js +1 -1
  297. package/dist/modules/agents/builder/skills/external-services.skill.js +4 -4
  298. package/dist/modules/agents/builder/skills/node-tools.skill.js +4 -4
  299. package/dist/modules/agents/builder/skills/node-tools.skill.js.map +1 -1
  300. package/dist/modules/agents/builder/skills/target-skills.skill.js +14 -8
  301. package/dist/modules/agents/builder/skills/target-skills.skill.js.map +1 -1
  302. package/dist/modules/agents/builder/verify-mcp-server.tool.d.ts +9 -3
  303. package/dist/modules/agents/builder/verify-mcp-server.tool.js +16 -3
  304. package/dist/modules/agents/builder/verify-mcp-server.tool.js.map +1 -1
  305. package/dist/modules/agents/entities/agent-history.entity.d.ts +2 -2
  306. package/dist/modules/agents/entities/agent-history.entity.js.map +1 -1
  307. package/dist/modules/agents/entities/agent.entity.d.ts +2 -2
  308. package/dist/modules/agents/entities/agent.entity.js.map +1 -1
  309. package/dist/modules/agents/instance-ai-agent-context.adapter.d.ts +3 -1
  310. package/dist/modules/agents/instance-ai-agent-context.adapter.js +5 -3
  311. package/dist/modules/agents/instance-ai-agent-context.adapter.js.map +1 -1
  312. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js +4 -1
  313. package/dist/modules/agents/instance-ai-builder-delegate.adapter.js.map +1 -1
  314. package/dist/modules/agents/integrations/agent-chat-bridge.d.ts +1 -0
  315. package/dist/modules/agents/integrations/agent-chat-bridge.js +67 -20
  316. package/dist/modules/agents/integrations/agent-chat-bridge.js.map +1 -1
  317. package/dist/modules/agents/integrations/agent-chat-integration.d.ts +18 -3
  318. package/dist/modules/agents/integrations/agent-chat-integration.js +1 -0
  319. package/dist/modules/agents/integrations/agent-chat-integration.js.map +1 -1
  320. package/dist/modules/agents/integrations/agent-chat-stream-consumer.d.ts +4 -0
  321. package/dist/modules/agents/integrations/agent-chat-stream-consumer.js +81 -24
  322. package/dist/modules/agents/integrations/agent-chat-stream-consumer.js.map +1 -1
  323. package/dist/modules/agents/integrations/channel-rate-limit.d.ts +6 -0
  324. package/dist/modules/agents/integrations/channel-rate-limit.js +11 -1
  325. package/dist/modules/agents/integrations/channel-rate-limit.js.map +1 -1
  326. package/dist/modules/agents/integrations/component-mapper.d.ts +6 -0
  327. package/dist/modules/agents/integrations/component-mapper.js +16 -3
  328. package/dist/modules/agents/integrations/component-mapper.js.map +1 -1
  329. package/dist/modules/agents/integrations/esm-loader.d.ts +1 -0
  330. package/dist/modules/agents/integrations/esm-loader.js +4 -0
  331. package/dist/modules/agents/integrations/esm-loader.js.map +1 -1
  332. package/dist/modules/agents/integrations/integration-helpers.d.ts +1 -0
  333. package/dist/modules/agents/integrations/integration-helpers.js +7 -0
  334. package/dist/modules/agents/integrations/integration-helpers.js.map +1 -1
  335. package/dist/modules/agents/integrations/integration-tool-execution.d.ts +1 -0
  336. package/dist/modules/agents/integrations/integration-tool-execution.js +13 -0
  337. package/dist/modules/agents/integrations/integration-tool-execution.js.map +1 -1
  338. package/dist/modules/agents/integrations/integration-tool-factory.js +1 -0
  339. package/dist/modules/agents/integrations/integration-tool-factory.js.map +1 -1
  340. package/dist/modules/agents/integrations/n8n-memory.d.ts +7 -0
  341. package/dist/modules/agents/integrations/n8n-memory.js +24 -10
  342. package/dist/modules/agents/integrations/n8n-memory.js.map +1 -1
  343. package/dist/modules/agents/integrations/platforms/slack/slack-integration.d.ts +2 -2
  344. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js +2 -1
  345. package/dist/modules/agents/integrations/platforms/slack/slack-integration.js.map +1 -1
  346. package/dist/modules/agents/integrations/platforms/teams/teams-integration.d.ts +15 -1
  347. package/dist/modules/agents/integrations/platforms/teams/teams-integration.js +63 -2
  348. package/dist/modules/agents/integrations/platforms/teams/teams-integration.js.map +1 -1
  349. package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.d.ts +11 -0
  350. package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js +5 -3
  351. package/dist/modules/agents/integrations/platforms/teams/teams-manifest.service.js.map +1 -1
  352. package/dist/modules/agents/integrations/platforms/telegram-integration.js.map +1 -1
  353. package/dist/modules/agents/integrations/platforms/whatsapp-integration.d.ts +43 -0
  354. package/dist/modules/agents/integrations/platforms/whatsapp-integration.js +337 -0
  355. package/dist/modules/agents/integrations/platforms/whatsapp-integration.js.map +1 -0
  356. package/dist/modules/agents/json-config/agent-config-composition.d.ts +2 -1
  357. package/dist/modules/agents/json-config/agent-config-composition.js +3 -2
  358. package/dist/modules/agents/json-config/agent-config-composition.js.map +1 -1
  359. package/dist/modules/agents/json-config/agent-document.d.ts +7 -0
  360. package/dist/modules/agents/json-config/agent-document.js +13 -0
  361. package/dist/modules/agents/json-config/agent-document.js.map +1 -0
  362. package/dist/modules/agents/json-config/credential-field-mapping.d.ts +1 -1
  363. package/dist/modules/agents/json-config/credential-field-mapping.js +33 -8
  364. package/dist/modules/agents/json-config/credential-field-mapping.js.map +1 -1
  365. package/dist/modules/agents/json-config/mcp-client-factory.js +6 -0
  366. package/dist/modules/agents/json-config/mcp-client-factory.js.map +1 -1
  367. package/dist/modules/agents/json-config/model-config.js +13 -1
  368. package/dist/modules/agents/json-config/model-config.js.map +1 -1
  369. package/dist/modules/agents/json-config/prune-missing-config-references.d.ts +5 -0
  370. package/dist/modules/agents/json-config/prune-missing-config-references.js +20 -0
  371. package/dist/modules/agents/json-config/prune-missing-config-references.js.map +1 -0
  372. package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js +8 -94
  373. package/dist/modules/agents/json-config/sanitize-unknown-agent-credentials.js.map +1 -1
  374. package/dist/modules/agents/plans/agent-plan-tools.js +3 -3
  375. package/dist/modules/agents/plans/agent-plan-tools.js.map +1 -1
  376. package/dist/modules/agents/register-favorite-resolver.js +2 -2
  377. package/dist/modules/agents/register-favorite-resolver.js.map +1 -1
  378. package/dist/modules/agents/repositories/agent-credential-dependency.repository.js +4 -1
  379. package/dist/modules/agents/repositories/agent-credential-dependency.repository.js.map +1 -1
  380. package/dist/modules/agents/repositories/agent-execution-thread.repository.d.ts +10 -0
  381. package/dist/modules/agents/repositories/agent-execution-thread.repository.js +67 -8
  382. package/dist/modules/agents/repositories/agent-execution-thread.repository.js.map +1 -1
  383. package/dist/modules/agents/repositories/agent-history.repository.d.ts +8 -9
  384. package/dist/modules/agents/repositories/agent-history.repository.js +9 -8
  385. package/dist/modules/agents/repositories/agent-history.repository.js.map +1 -1
  386. package/dist/modules/agents/repositories/agent-message-queue.repository.d.ts +15 -2
  387. package/dist/modules/agents/repositories/agent-message-queue.repository.js +9 -2
  388. package/dist/modules/agents/repositories/agent-message-queue.repository.js.map +1 -1
  389. package/dist/modules/agents/repositories/agent-task-snapshot.repository.d.ts +6 -5
  390. package/dist/modules/agents/repositories/agent-task-snapshot.repository.js +9 -8
  391. package/dist/modules/agents/repositories/agent-task-snapshot.repository.js.map +1 -1
  392. package/dist/modules/agents/repositories/agent-task.repository.d.ts +9 -4
  393. package/dist/modules/agents/repositories/agent-task.repository.js +40 -6
  394. package/dist/modules/agents/repositories/agent-task.repository.js.map +1 -1
  395. package/dist/modules/agents/repositories/agent-thread.repository.d.ts +6 -0
  396. package/dist/modules/agents/repositories/agent-thread.repository.js +20 -0
  397. package/dist/modules/agents/repositories/agent-thread.repository.js.map +1 -1
  398. package/dist/modules/agents/repositories/agent.repository.d.ts +23 -9
  399. package/dist/modules/agents/repositories/agent.repository.js +118 -15
  400. package/dist/modules/agents/repositories/agent.repository.js.map +1 -1
  401. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.d.ts +1 -0
  402. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js +2 -1
  403. package/dist/modules/agents/sub-agents/delegate-sub-agent-tool.js.map +1 -1
  404. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.d.ts +3 -1
  405. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js +8 -5
  406. package/dist/modules/agents/sub-agents/sub-agent-source-resolver.js.map +1 -1
  407. package/dist/modules/agents/tools/node-tool-factory.d.ts +1 -1
  408. package/dist/modules/agents/tools/node-tool-factory.js +3 -14
  409. package/dist/modules/agents/tools/node-tool-factory.js.map +1 -1
  410. package/dist/modules/agents/tools/workflow-tool-factory.d.ts +4 -2
  411. package/dist/modules/agents/tools/workflow-tool-factory.js +39 -13
  412. package/dist/modules/agents/tools/workflow-tool-factory.js.map +1 -1
  413. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js +5 -1
  414. package/dist/modules/agents/tools/workflow-tool-workflow-loader.service.js.map +1 -1
  415. package/dist/modules/agents/types/agent-queued-message.d.ts +1 -0
  416. package/dist/modules/agents/types/agent-queued-message.js +3 -1
  417. package/dist/modules/agents/types/agent-queued-message.js.map +1 -1
  418. package/dist/modules/agents/utils/agent-config-hash.d.ts +1 -0
  419. package/dist/modules/agents/utils/agent-config-hash.js +4 -0
  420. package/dist/modules/agents/utils/agent-config-hash.js.map +1 -1
  421. package/dist/modules/agents/utils/agent-definition.d.ts +329 -0
  422. package/dist/modules/agents/utils/agent-definition.js +17 -0
  423. package/dist/modules/agents/utils/agent-definition.js.map +1 -0
  424. package/dist/modules/agents/utils/agent-draft.utils.d.ts +2 -3
  425. package/dist/modules/agents/utils/agent-draft.utils.js +2 -2
  426. package/dist/modules/agents/utils/agent-draft.utils.js.map +1 -1
  427. package/dist/modules/agents/utils/agent-execution-counter.d.ts +2 -1
  428. package/dist/modules/agents/utils/agent-execution-counter.js +4 -1
  429. package/dist/modules/agents/utils/agent-execution-counter.js.map +1 -1
  430. package/dist/modules/agents/utils/agent-missing-skill-ids.d.ts +3 -2
  431. package/dist/modules/agents/utils/agent-missing-skill-ids.js +2 -2
  432. package/dist/modules/agents/utils/agent-missing-skill-ids.js.map +1 -1
  433. package/dist/modules/agents/utils/agent-published-snapshot.d.ts +8 -1
  434. package/dist/modules/agents/utils/agent-published-snapshot.js +21 -7
  435. package/dist/modules/agents/utils/agent-published-snapshot.js.map +1 -1
  436. package/dist/modules/agents/utils/agent-ref.d.ts +8 -0
  437. package/dist/modules/agents/utils/agent-ref.js +12 -0
  438. package/dist/modules/agents/utils/agent-ref.js.map +1 -0
  439. package/dist/modules/agents/utils/agent-thread-access.d.ts +3 -1
  440. package/dist/modules/agents/utils/agent-thread-access.js +7 -0
  441. package/dist/modules/agents/utils/agent-thread-access.js.map +1 -1
  442. package/dist/modules/agents/utils/extract-agent-credential-ids.d.ts +1 -2
  443. package/dist/modules/agents/utils/extract-agent-credential-ids.js +6 -33
  444. package/dist/modules/agents/utils/extract-agent-credential-ids.js.map +1 -1
  445. package/dist/modules/agents/utils/extract-agent-workflow-refs.d.ts +1 -1
  446. package/dist/modules/agents/utils/extract-agent-workflow-refs.js.map +1 -1
  447. package/dist/modules/agents/utils/parse-thread-list-limit.d.ts +1 -0
  448. package/dist/modules/agents/utils/parse-thread-list-limit.js +7 -0
  449. package/dist/modules/agents/utils/parse-thread-list-limit.js.map +1 -0
  450. package/dist/modules/agents/utils/skill-instruction-edits.d.ts +5 -0
  451. package/dist/modules/agents/utils/skill-instruction-edits.js +15 -0
  452. package/dist/modules/agents/utils/skill-instruction-edits.js.map +1 -0
  453. package/dist/modules/agents/utils/visit-agent-credential-references.d.ts +8 -0
  454. package/dist/modules/agents/utils/visit-agent-credential-references.js +67 -0
  455. package/dist/modules/agents/utils/visit-agent-credential-references.js.map +1 -0
  456. package/dist/modules/breaking-changes/breaking-changes.controller.d.ts +17 -5
  457. package/dist/modules/breaking-changes/breaking-changes.controller.js +94 -8
  458. package/dist/modules/breaking-changes/breaking-changes.controller.js.map +1 -1
  459. package/dist/modules/breaking-changes/breaking-changes.module.d.ts +1 -1
  460. package/dist/modules/breaking-changes/breaking-changes.module.js +2 -1
  461. package/dist/modules/breaking-changes/breaking-changes.module.js.map +1 -1
  462. package/dist/modules/breaking-changes/database/entities/migration-workflow-owner.entity.d.ts +14 -0
  463. package/dist/modules/breaking-changes/database/entities/migration-workflow-owner.entity.js +57 -0
  464. package/dist/modules/breaking-changes/database/entities/migration-workflow-owner.entity.js.map +1 -0
  465. package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.d.ts +12 -6
  466. package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.js +104 -30
  467. package/dist/modules/breaking-changes/database/repositories/migration-finding.repository.js.map +1 -1
  468. package/dist/modules/breaking-changes/database/repositories/migration-workflow-owner.repository.d.ts +14 -0
  469. package/dist/modules/breaking-changes/database/repositories/migration-workflow-owner.repository.js +79 -0
  470. package/dist/modules/breaking-changes/database/repositories/migration-workflow-owner.repository.js.map +1 -0
  471. package/dist/modules/breaking-changes/migrations/index.js +1 -2
  472. package/dist/modules/breaking-changes/migrations/index.js.map +1 -1
  473. package/dist/modules/breaking-changes/owners/migration-owner-assignment.service.d.ts +17 -0
  474. package/dist/modules/breaking-changes/owners/migration-owner-assignment.service.js +64 -0
  475. package/dist/modules/breaking-changes/owners/migration-owner-assignment.service.js.map +1 -0
  476. package/dist/modules/breaking-changes/owners/migration-owner-suggestion.service.d.ts +16 -0
  477. package/dist/modules/breaking-changes/owners/migration-owner-suggestion.service.js +113 -0
  478. package/dist/modules/breaking-changes/owners/migration-owner-suggestion.service.js.map +1 -0
  479. package/dist/modules/breaking-changes/owners/workflow-owner.d.ts +3 -0
  480. package/dist/modules/breaking-changes/owners/workflow-owner.js +13 -0
  481. package/dist/modules/breaking-changes/owners/workflow-owner.js.map +1 -0
  482. package/dist/modules/breaking-changes/query/migration-finding-query.service.d.ts +16 -5
  483. package/dist/modules/breaking-changes/query/migration-finding-query.service.js +51 -16
  484. package/dist/modules/breaking-changes/query/migration-finding-query.service.js.map +1 -1
  485. package/dist/modules/breaking-changes/rules/index.d.ts +0 -1
  486. package/dist/modules/breaking-changes/rules/index.js +0 -1
  487. package/dist/modules/breaking-changes/rules/index.js.map +1 -1
  488. package/dist/modules/breaking-changes/sync/migration-finding-diff.js +2 -1
  489. package/dist/modules/breaking-changes/sync/migration-finding-diff.js.map +1 -1
  490. package/dist/modules/breaking-changes/sync/migration-finding-sync.service.d.ts +7 -3
  491. package/dist/modules/breaking-changes/sync/migration-finding-sync.service.js +22 -15
  492. package/dist/modules/breaking-changes/sync/migration-finding-sync.service.js.map +1 -1
  493. package/dist/modules/breaking-changes/triage/migration-finding-triage.service.d.ts +11 -0
  494. package/dist/modules/breaking-changes/triage/migration-finding-triage.service.js +47 -0
  495. package/dist/modules/breaking-changes/triage/migration-finding-triage.service.js.map +1 -0
  496. package/dist/modules/chat-hub/chat-hub-execution.service.js +1 -0
  497. package/dist/modules/chat-hub/chat-hub-execution.service.js.map +1 -1
  498. package/dist/modules/community-packages/community-node.command.d.ts +1 -1
  499. package/dist/modules/data-table/data-table-column.repository.d.ts +12 -4
  500. package/dist/modules/data-table/data-table-column.repository.js +51 -6
  501. package/dist/modules/data-table/data-table-column.repository.js.map +1 -1
  502. package/dist/modules/data-table/data-table-file-cleanup.service.d.ts +5 -7
  503. package/dist/modules/data-table/data-table-file-cleanup.service.js +35 -37
  504. package/dist/modules/data-table/data-table-file-cleanup.service.js.map +1 -1
  505. package/dist/modules/data-table/data-table-file-cleanup.task.d.ts +14 -0
  506. package/dist/modules/data-table/data-table-file-cleanup.task.js +37 -0
  507. package/dist/modules/data-table/data-table-file-cleanup.task.js.map +1 -0
  508. package/dist/modules/data-table/data-table.module.d.ts +2 -1
  509. package/dist/modules/data-table/data-table.module.js +4 -4
  510. package/dist/modules/data-table/data-table.module.js.map +1 -1
  511. package/dist/modules/data-table/data-table.repository.d.ts +1 -1
  512. package/dist/modules/data-table/data-table.repository.js +2 -1
  513. package/dist/modules/data-table/data-table.repository.js.map +1 -1
  514. package/dist/modules/data-table/data-table.service.d.ts +8 -1
  515. package/dist/modules/data-table/data-table.service.js +11 -2
  516. package/dist/modules/data-table/data-table.service.js.map +1 -1
  517. package/dist/modules/data-table/register-favorite-resolver.js +2 -2
  518. package/dist/modules/data-table/register-favorite-resolver.js.map +1 -1
  519. package/dist/modules/data-table/utils/pair-columns.d.ts +27 -0
  520. package/dist/modules/data-table/utils/pair-columns.js +48 -0
  521. package/dist/modules/data-table/utils/pair-columns.js.map +1 -0
  522. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.d.ts +40 -52
  523. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js +55 -40
  524. package/dist/modules/dynamic-credentials.ee/credential-resolvers/identifiers/n8n-identifier.js.map +1 -1
  525. package/dist/modules/external-secrets.ee/external-secrets-manager.ee.d.ts +1 -4
  526. package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js +2 -15
  527. package/dist/modules/external-secrets.ee/external-secrets-manager.ee.js.map +1 -1
  528. package/dist/modules/external-secrets.ee/external-secrets-refresh.task.d.ts +13 -0
  529. package/dist/modules/external-secrets.ee/external-secrets-refresh.task.js +36 -0
  530. package/dist/modules/external-secrets.ee/external-secrets-refresh.task.js.map +1 -0
  531. package/dist/modules/external-secrets.ee/external-secrets.config.js +1 -1
  532. package/dist/modules/external-secrets.ee/external-secrets.config.js.map +1 -1
  533. package/dist/modules/external-secrets.ee/external-secrets.module.d.ts +1 -0
  534. package/dist/modules/external-secrets.ee/external-secrets.module.js +4 -0
  535. package/dist/modules/external-secrets.ee/external-secrets.module.js.map +1 -1
  536. package/dist/modules/external-secrets.ee/providers/one-password.js +1 -1
  537. package/dist/modules/external-secrets.ee/providers/one-password.js.map +1 -1
  538. package/dist/modules/external-secrets.ee/secrets-cache.service.d.ts +4 -2
  539. package/dist/modules/external-secrets.ee/secrets-cache.service.js +25 -8
  540. package/dist/modules/external-secrets.ee/secrets-cache.service.js.map +1 -1
  541. package/dist/modules/favorites/favorites.service.d.ts +1 -1
  542. package/dist/modules/favorites/favorites.service.js +2 -2
  543. package/dist/modules/favorites/favorites.service.js.map +1 -1
  544. package/dist/modules/inbound-auth-core/authentication-pipeline.d.ts +11 -0
  545. package/dist/modules/inbound-auth-core/authentication-pipeline.js +50 -0
  546. package/dist/modules/inbound-auth-core/authentication-pipeline.js.map +1 -0
  547. package/dist/modules/inbound-auth-core/authentication.service.d.ts +12 -0
  548. package/dist/modules/inbound-auth-core/authentication.service.js +86 -0
  549. package/dist/modules/inbound-auth-core/authentication.service.js.map +1 -0
  550. package/dist/modules/inbound-auth-core/database/entities/trusted-source.entity.d.ts +3 -0
  551. package/dist/modules/inbound-auth-core/database/entities/trusted-source.entity.js +12 -0
  552. package/dist/modules/inbound-auth-core/database/entities/trusted-source.entity.js.map +1 -1
  553. package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.d.ts +20 -3
  554. package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.js +70 -2
  555. package/dist/modules/inbound-auth-core/database/repositories/trusted-source-identity.repository.js.map +1 -1
  556. package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.d.ts +15 -3
  557. package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.js +58 -2
  558. package/dist/modules/inbound-auth-core/database/repositories/trusted-source.repository.js.map +1 -1
  559. package/dist/modules/inbound-auth-core/grant-authorization.d.ts +4 -0
  560. package/dist/modules/inbound-auth-core/grant-authorization.js +10 -0
  561. package/dist/modules/inbound-auth-core/grant-authorization.js.map +1 -0
  562. package/dist/modules/inbound-auth-core/identity/external-identity.d.ts +3 -0
  563. package/dist/modules/inbound-auth-core/identity/external-identity.js +86 -0
  564. package/dist/modules/inbound-auth-core/identity/external-identity.js.map +1 -0
  565. package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.d.ts +27 -0
  566. package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.js +287 -0
  567. package/dist/modules/inbound-auth-core/identity/trusted-source-identity.service.js.map +1 -0
  568. package/dist/modules/inbound-auth-core/inbound-auth-core.module.d.ts +1 -0
  569. package/dist/modules/inbound-auth-core/inbound-auth-core.module.js +30 -20
  570. package/dist/modules/inbound-auth-core/inbound-auth-core.module.js.map +1 -1
  571. package/dist/modules/inbound-auth-core/key.utils.d.ts +2 -0
  572. package/dist/modules/inbound-auth-core/key.utils.js +18 -0
  573. package/dist/modules/inbound-auth-core/key.utils.js.map +1 -0
  574. package/dist/modules/inbound-auth-core/oauth2-bearer.driver.d.ts +16 -0
  575. package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js +171 -0
  576. package/dist/modules/inbound-auth-core/oauth2-bearer.driver.js.map +1 -0
  577. package/dist/modules/inbound-auth-core/system-trusted-source.seeder.d.ts +52 -0
  578. package/dist/modules/inbound-auth-core/system-trusted-source.seeder.js +74 -0
  579. package/dist/modules/inbound-auth-core/system-trusted-source.seeder.js.map +1 -0
  580. package/dist/modules/inbound-auth-core/trusted-source-discovery.service.d.ts +19 -0
  581. package/dist/modules/inbound-auth-core/trusted-source-discovery.service.js +141 -0
  582. package/dist/modules/inbound-auth-core/trusted-source-discovery.service.js.map +1 -0
  583. package/dist/modules/inbound-auth-core/trusted-source-discovery.task.d.ts +12 -0
  584. package/dist/modules/{insights/insights-compaction.task.js → inbound-auth-core/trusted-source-discovery.task.js} +14 -16
  585. package/dist/modules/inbound-auth-core/trusted-source-discovery.task.js.map +1 -0
  586. package/dist/modules/inbound-auth-core/trusted-source.gate.d.ts +13 -0
  587. package/dist/modules/inbound-auth-core/trusted-source.gate.js +53 -0
  588. package/dist/modules/inbound-auth-core/trusted-source.gate.js.map +1 -0
  589. package/dist/modules/inbound-auth-core/trusted-source.store.d.ts +18 -16
  590. package/dist/modules/inbound-auth-core/trusted-source.store.js +107 -7
  591. package/dist/modules/inbound-auth-core/trusted-source.store.js.map +1 -1
  592. package/dist/modules/instance-ai/eval/agent-execution.service.d.ts +2 -1
  593. package/dist/modules/instance-ai/eval/agent-execution.service.js +42 -37
  594. package/dist/modules/instance-ai/eval/agent-execution.service.js.map +1 -1
  595. package/dist/modules/instance-ai/eval/execution.service.d.ts +7 -2
  596. package/dist/modules/instance-ai/eval/execution.service.js +150 -22
  597. package/dist/modules/instance-ai/eval/execution.service.js.map +1 -1
  598. package/dist/modules/instance-ai/eval/mock-handler.js +6 -3
  599. package/dist/modules/instance-ai/eval/mock-handler.js.map +1 -1
  600. package/dist/modules/instance-ai/eval/pin-data-generator.js +2 -1
  601. package/dist/modules/instance-ai/eval/pin-data-generator.js.map +1 -1
  602. package/dist/modules/instance-ai/eval/thread-restore.service.d.ts +1 -1
  603. package/dist/modules/instance-ai/eval/thread-restore.service.js +2 -1
  604. package/dist/modules/instance-ai/eval/thread-restore.service.js.map +1 -1
  605. package/dist/modules/instance-ai/eval/workflow-analysis.d.ts +1 -0
  606. package/dist/modules/instance-ai/eval/workflow-analysis.js +25 -9
  607. package/dist/modules/instance-ai/eval/workflow-analysis.js.map +1 -1
  608. package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.d.ts +4 -2
  609. package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js +5 -2
  610. package/dist/modules/instance-ai/instance-ai-checkpoint-pruning.task.js.map +1 -1
  611. package/dist/modules/instance-ai/instance-ai-credit.service.d.ts +3 -0
  612. package/dist/modules/instance-ai/instance-ai-credit.service.js +18 -0
  613. package/dist/modules/instance-ai/instance-ai-credit.service.js.map +1 -1
  614. package/dist/modules/instance-ai/instance-ai-pending-agent.service.js +1 -0
  615. package/dist/modules/instance-ai/instance-ai-pending-agent.service.js.map +1 -1
  616. package/dist/modules/instance-ai/instance-ai-thread-tabs.service.d.ts +10 -1
  617. package/dist/modules/instance-ai/instance-ai-thread-tabs.service.js +74 -5
  618. package/dist/modules/instance-ai/instance-ai-thread-tabs.service.js.map +1 -1
  619. package/dist/modules/instance-ai/instance-ai.adapter.service.js +29 -7
  620. package/dist/modules/instance-ai/instance-ai.adapter.service.js.map +1 -1
  621. package/dist/modules/instance-ai/instance-ai.controller.d.ts +28 -2
  622. package/dist/modules/instance-ai/instance-ai.controller.js +5 -3
  623. package/dist/modules/instance-ai/instance-ai.controller.js.map +1 -1
  624. package/dist/modules/instance-ai/instance-ai.module.d.ts +1 -1
  625. package/dist/modules/instance-ai/instance-ai.module.js +8 -0
  626. package/dist/modules/instance-ai/instance-ai.module.js.map +1 -1
  627. package/dist/modules/instance-ai/instance-ai.service.d.ts +10 -1
  628. package/dist/modules/instance-ai/instance-ai.service.js +164 -24
  629. package/dist/modules/instance-ai/instance-ai.service.js.map +1 -1
  630. package/dist/modules/instance-ai/instance-context.service.js +4 -5
  631. package/dist/modules/instance-ai/instance-context.service.js.map +1 -1
  632. package/dist/modules/instance-ai/repositories/instance-ai-thread-tabs.repository.d.ts +5 -3
  633. package/dist/modules/instance-ai/repositories/instance-ai-thread-tabs.repository.js +24 -4
  634. package/dist/modules/instance-ai/repositories/instance-ai-thread-tabs.repository.js.map +1 -1
  635. package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.d.ts +23 -0
  636. package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.js +100 -0
  637. package/dist/modules/instance-ai/self-healing/database/self-healing-result.entity.js.map +1 -0
  638. package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.d.ts +10 -0
  639. package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js +50 -0
  640. package/dist/modules/instance-ai/self-healing/database/self-healing-result.repository.js.map +1 -0
  641. package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.d.ts +16 -0
  642. package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.js +77 -0
  643. package/dist/modules/instance-ai/self-healing/self-healing-execution-reference.service.js.map +1 -0
  644. package/dist/modules/instance-ai/self-healing/self-healing-result.service.d.ts +33 -0
  645. package/dist/modules/instance-ai/self-healing/self-healing-result.service.js +178 -0
  646. package/dist/modules/instance-ai/self-healing/self-healing-result.service.js.map +1 -0
  647. package/dist/modules/instance-ai/self-healing/self-healing-results.controller.d.ts +16 -0
  648. package/dist/modules/instance-ai/self-healing/self-healing-results.controller.js +69 -0
  649. package/dist/modules/instance-ai/self-healing/self-healing-results.controller.js.map +1 -0
  650. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion-activity.entity.d.ts +3 -1
  651. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion-activity.entity.js +10 -0
  652. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion-activity.entity.js.map +1 -1
  653. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.entity.d.ts +6 -1
  654. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.entity.js +20 -0
  655. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.entity.js.map +1 -1
  656. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.repository.d.ts +5 -2
  657. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.repository.js +45 -1
  658. package/dist/modules/instance-ai/workflow-suggestions/database/workflow-suggestion.repository.js.map +1 -1
  659. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.d.ts +26 -0
  660. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.js +173 -0
  661. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.js.map +1 -0
  662. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.d.ts +6 -0
  663. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.js +57 -0
  664. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.js.map +1 -0
  665. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.d.ts +29 -5
  666. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.js +86 -25
  667. package/dist/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.js.map +1 -1
  668. package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.d.ts +1 -1
  669. package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.js +2 -2
  670. package/dist/modules/instance-reporting.ee/instance-reporting-settings.service.js.map +1 -1
  671. package/dist/modules/instance-reporting.ee/instance-reporting.service.d.ts +3 -2
  672. package/dist/modules/instance-reporting.ee/instance-reporting.service.js +23 -9
  673. package/dist/modules/instance-reporting.ee/instance-reporting.service.js.map +1 -1
  674. package/dist/modules/mcp/tools/agents/agent-reference.js +4 -3
  675. package/dist/modules/mcp/tools/agents/agent-reference.js.map +1 -1
  676. package/dist/modules/mcp/tools/agents/agent-slack-setup.d.ts +1 -1
  677. package/dist/modules/mcp/tools/agents/agent-tools.service.d.ts +3 -1
  678. package/dist/modules/mcp/tools/agents/agent-tools.service.js +72 -43
  679. package/dist/modules/mcp/tools/agents/agent-tools.service.js.map +1 -1
  680. package/dist/modules/mcp/tools/execute-workflow.tool.js +1 -1
  681. package/dist/modules/mcp/tools/execute-workflow.tool.js.map +1 -1
  682. package/dist/modules/mcp/tools/get-workflow-details.tool.js +6 -1
  683. package/dist/modules/mcp/tools/get-workflow-details.tool.js.map +1 -1
  684. package/dist/modules/mcp/tools/publish-workflow.tool.js +1 -0
  685. package/dist/modules/mcp/tools/publish-workflow.tool.js.map +1 -1
  686. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js +2 -9
  687. package/dist/modules/mcp/tools/workflow-builder/update-workflow.tool.js.map +1 -1
  688. package/dist/modules/mcp/tools/workflow-history.utils.js +1 -1
  689. package/dist/modules/mcp/tools/workflow-history.utils.js.map +1 -1
  690. package/dist/modules/mcp/tools/workflow-validation.utils.d.ts +2 -1
  691. package/dist/modules/mcp/tools/workflow-validation.utils.js.map +1 -1
  692. package/dist/modules/modules.manifest.js +3 -1
  693. package/dist/modules/modules.manifest.js.map +1 -1
  694. package/dist/modules/n8n-packages/engine/credential-save-policy.d.ts +11 -0
  695. package/dist/modules/n8n-packages/engine/credential-save-policy.js +56 -0
  696. package/dist/modules/n8n-packages/engine/credential-save-policy.js.map +1 -0
  697. package/dist/modules/n8n-packages/engine/import-gates.d.ts +2 -0
  698. package/dist/modules/n8n-packages/engine/import-gates.js +9 -0
  699. package/dist/modules/n8n-packages/engine/import-gates.js.map +1 -1
  700. package/dist/modules/n8n-packages/engine/import-orchestrator.d.ts +4 -1
  701. package/dist/modules/n8n-packages/engine/import-orchestrator.js +106 -32
  702. package/dist/modules/n8n-packages/engine/import-orchestrator.js.map +1 -1
  703. package/dist/modules/n8n-packages/engine/import-result.d.ts +2 -2
  704. package/dist/modules/n8n-packages/engine/import-result.js +2 -2
  705. package/dist/modules/n8n-packages/engine/import-result.js.map +1 -1
  706. package/dist/modules/n8n-packages/engine/import-telemetry.js +2 -0
  707. package/dist/modules/n8n-packages/engine/import-telemetry.js.map +1 -1
  708. package/dist/modules/n8n-packages/engine/n8n-package-parser.d.ts +6 -0
  709. package/dist/modules/n8n-packages/engine/n8n-package-parser.js +72 -1
  710. package/dist/modules/n8n-packages/engine/n8n-package-parser.js.map +1 -1
  711. package/dist/modules/n8n-packages/engine/project-package-importer.js +7 -1
  712. package/dist/modules/n8n-packages/engine/project-package-importer.js.map +1 -1
  713. package/dist/modules/n8n-packages/engine/workflow-package-importer.js +1 -0
  714. package/dist/modules/n8n-packages/engine/workflow-package-importer.js.map +1 -1
  715. package/dist/modules/n8n-packages/entities/agent/agent-export.types.d.ts +39 -0
  716. package/dist/modules/n8n-packages/entities/agent/agent-export.types.js +3 -0
  717. package/dist/modules/n8n-packages/entities/agent/agent-export.types.js.map +1 -0
  718. package/dist/modules/n8n-packages/entities/agent/agent-import.types.d.ts +5 -0
  719. package/dist/modules/n8n-packages/entities/agent/agent-import.types.js +3 -0
  720. package/dist/modules/n8n-packages/entities/agent/agent-import.types.js.map +1 -0
  721. package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.d.ts +12 -0
  722. package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.js +75 -0
  723. package/dist/modules/n8n-packages/entities/agent/agent-requirements.extractor.js.map +1 -0
  724. package/dist/modules/n8n-packages/entities/agent/agent-selection.exporter.d.ts +20 -0
  725. package/dist/modules/n8n-packages/entities/agent/agent-selection.exporter.js +173 -0
  726. package/dist/modules/n8n-packages/entities/agent/agent-selection.exporter.js.map +1 -0
  727. package/dist/modules/n8n-packages/entities/agent/agent.exporter.d.ts +14 -0
  728. package/dist/modules/n8n-packages/entities/agent/agent.exporter.js +76 -0
  729. package/dist/modules/n8n-packages/entities/agent/agent.exporter.js.map +1 -0
  730. package/dist/modules/n8n-packages/entities/agent/agent.serializer.d.ts +8 -0
  731. package/dist/modules/n8n-packages/entities/agent/agent.serializer.js +50 -0
  732. package/dist/modules/n8n-packages/entities/agent/agent.serializer.js.map +1 -0
  733. package/dist/modules/n8n-packages/entities/credential/credential-importer.js +1 -12
  734. package/dist/modules/n8n-packages/entities/credential/credential-importer.js.map +1 -1
  735. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js +1 -2
  736. package/dist/modules/n8n-packages/entities/credential/credential-matcher.js.map +1 -1
  737. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.d.ts +1 -0
  738. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js +12 -1
  739. package/dist/modules/n8n-packages/entities/credential/credential-missing-mode.js.map +1 -1
  740. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.d.ts +5 -4
  741. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js +18 -1
  742. package/dist/modules/n8n-packages/entities/credential/credential-requirements.extractor.js.map +1 -1
  743. package/dist/modules/n8n-packages/entities/credential/credential.exporter.d.ts +2 -2
  744. package/dist/modules/n8n-packages/entities/credential/credential.exporter.js +19 -14
  745. package/dist/modules/n8n-packages/entities/credential/credential.exporter.js.map +1 -1
  746. package/dist/modules/n8n-packages/entities/credential/credential.types.d.ts +8 -5
  747. package/dist/modules/n8n-packages/entities/credential/credential.types.js +0 -1
  748. package/dist/modules/n8n-packages/entities/credential/credential.types.js.map +1 -1
  749. package/dist/modules/n8n-packages/entities/data-table/data-table-compat.d.ts +14 -2
  750. package/dist/modules/n8n-packages/entities/data-table/data-table-compat.js +52 -0
  751. package/dist/modules/n8n-packages/entities/data-table/data-table-compat.js.map +1 -1
  752. package/dist/modules/n8n-packages/entities/data-table/data-table-importer.d.ts +10 -2
  753. package/dist/modules/n8n-packages/entities/data-table/data-table-importer.js +136 -30
  754. package/dist/modules/n8n-packages/entities/data-table/data-table-importer.js.map +1 -1
  755. package/dist/modules/n8n-packages/entities/data-table/data-table-matching-mode.d.ts +1 -1
  756. package/dist/modules/n8n-packages/entities/data-table/data-table-matching-mode.js.map +1 -1
  757. package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.d.ts +9 -2
  758. package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js +11 -8
  759. package/dist/modules/n8n-packages/entities/data-table/data-table-requirements.extractor.js.map +1 -1
  760. package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.d.ts +2 -7
  761. package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.js +16 -1
  762. package/dist/modules/n8n-packages/entities/data-table/data-table-schema-conflict-policy.js.map +1 -1
  763. package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.d.ts +2 -3
  764. package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js +5 -19
  765. package/dist/modules/n8n-packages/entities/data-table/data-table.exporter.js.map +1 -1
  766. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js +1 -0
  767. package/dist/modules/n8n-packages/entities/data-table/data-table.serializer.js.map +1 -1
  768. package/dist/modules/n8n-packages/entities/data-table/data-table.types.d.ts +46 -2
  769. package/dist/modules/n8n-packages/entities/data-table/data-table.types.js +0 -1
  770. package/dist/modules/n8n-packages/entities/data-table/data-table.types.js.map +1 -1
  771. package/dist/modules/n8n-packages/entities/folder/folder.exporter.d.ts +4 -4
  772. package/dist/modules/n8n-packages/entities/folder/folder.exporter.js +1 -1
  773. package/dist/modules/n8n-packages/entities/folder/folder.exporter.js.map +1 -1
  774. package/dist/modules/n8n-packages/entities/project/project-export-access.d.ts +3 -0
  775. package/dist/modules/n8n-packages/entities/project/project-export-access.js +14 -0
  776. package/dist/modules/n8n-packages/entities/project/project-export-access.js.map +1 -0
  777. package/dist/modules/n8n-packages/entities/project/project-shell.exporter.d.ts +14 -0
  778. package/dist/modules/n8n-packages/entities/project/project-shell.exporter.js +35 -0
  779. package/dist/modules/n8n-packages/entities/project/project-shell.exporter.js.map +1 -0
  780. package/dist/modules/n8n-packages/entities/project/project.exporter.d.ts +7 -7
  781. package/dist/modules/n8n-packages/entities/project/project.exporter.js +20 -17
  782. package/dist/modules/n8n-packages/entities/project/project.exporter.js.map +1 -1
  783. package/dist/modules/n8n-packages/entities/requirement-source.d.ts +13 -0
  784. package/dist/modules/n8n-packages/entities/requirement-source.js +23 -0
  785. package/dist/modules/n8n-packages/entities/requirement-source.js.map +1 -0
  786. package/dist/modules/n8n-packages/entities/requirements.types.d.ts +10 -10
  787. package/dist/modules/n8n-packages/entities/requirements.types.js.map +1 -1
  788. package/dist/modules/n8n-packages/entities/tag/tag-import-decision.d.ts +1 -1
  789. package/dist/modules/n8n-packages/entities/tag/tag-import-decision.js.map +1 -1
  790. package/dist/modules/n8n-packages/entities/tag/tag-importer.js +5 -19
  791. package/dist/modules/n8n-packages/entities/tag/tag-importer.js.map +1 -1
  792. package/dist/modules/n8n-packages/entities/tag/tag.exporter.js +3 -3
  793. package/dist/modules/n8n-packages/entities/tag/tag.exporter.js.map +1 -1
  794. package/dist/modules/n8n-packages/entities/tag/tag.types.d.ts +1 -6
  795. package/dist/modules/n8n-packages/entities/tag/tag.types.js +3 -11
  796. package/dist/modules/n8n-packages/entities/tag/tag.types.js.map +1 -1
  797. package/dist/modules/n8n-packages/entities/variable/variable-importer.js +7 -6
  798. package/dist/modules/n8n-packages/entities/variable/variable-importer.js.map +1 -1
  799. package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.d.ts +1 -0
  800. package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.js +9 -3
  801. package/dist/modules/n8n-packages/entities/variable/variable-requirements.extractor.js.map +1 -1
  802. package/dist/modules/n8n-packages/entities/variable/variable.exporter.d.ts +0 -1
  803. package/dist/modules/n8n-packages/entities/variable/variable.exporter.js +25 -28
  804. package/dist/modules/n8n-packages/entities/variable/variable.exporter.js.map +1 -1
  805. package/dist/modules/n8n-packages/entities/variable/variable.types.d.ts +6 -9
  806. package/dist/modules/n8n-packages/entities/variable/variable.types.js +1 -27
  807. package/dist/modules/n8n-packages/entities/variable/variable.types.js.map +1 -1
  808. package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.d.ts +9 -7
  809. package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js +17 -31
  810. package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow-resolver.js.map +1 -1
  811. package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.d.ts +5 -6
  812. package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js +6 -17
  813. package/dist/modules/n8n-packages/entities/workflow/auto-included-workflow.exporter.js.map +1 -1
  814. package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js +2 -1
  815. package/dist/modules/n8n-packages/entities/workflow/missing-node-type-mode.js.map +1 -1
  816. package/dist/modules/n8n-packages/entities/workflow/node-type-usage.d.ts +7 -10
  817. package/dist/modules/n8n-packages/entities/workflow/node-type-usage.js +17 -13
  818. package/dist/modules/n8n-packages/entities/workflow/node-type-usage.js.map +1 -1
  819. package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.d.ts +4 -1
  820. package/dist/modules/n8n-packages/entities/workflow/references/sub-workflow-node.reference.js.map +1 -1
  821. package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-requirements.d.ts +2 -2
  822. package/dist/modules/n8n-packages/entities/workflow/static-sub-workflow-requirements.js.map +1 -1
  823. package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.js +2 -1
  824. package/dist/modules/n8n-packages/entities/workflow/sub-workflow-ordering.js.map +1 -1
  825. package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.d.ts +2 -2
  826. package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.js +1 -1
  827. package/dist/modules/n8n-packages/entities/workflow/workflow-dependency-resolver.js.map +1 -1
  828. package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.d.ts +2 -2
  829. package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.js +5 -11
  830. package/dist/modules/n8n-packages/entities/workflow/workflow-requirement.exporter.js.map +1 -1
  831. package/dist/modules/n8n-packages/entities/workflow/workflow-version-policy.d.ts +3 -3
  832. package/dist/modules/n8n-packages/entities/workflow/workflow-version-policy.js +5 -5
  833. package/dist/modules/n8n-packages/entities/workflow/workflow-version-policy.js.map +1 -1
  834. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.d.ts +4 -4
  835. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js +3 -3
  836. package/dist/modules/n8n-packages/entities/workflow/workflow.exporter.js.map +1 -1
  837. package/dist/modules/n8n-packages/entities/workflow/workflow.types.d.ts +6 -0
  838. package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.d.ts +8 -0
  839. package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js +23 -0
  840. package/dist/modules/n8n-packages/io/directory/package-directory-inventory-reader.js.map +1 -1
  841. package/dist/modules/n8n-packages/io/manifest-entry.d.ts +5 -0
  842. package/dist/modules/n8n-packages/io/manifest-entry.js +6 -0
  843. package/dist/modules/n8n-packages/io/manifest-entry.js.map +1 -1
  844. package/dist/modules/n8n-packages/n8n-packages.service.d.ts +5 -1
  845. package/dist/modules/n8n-packages/n8n-packages.service.js +124 -59
  846. package/dist/modules/n8n-packages/n8n-packages.service.js.map +1 -1
  847. package/dist/modules/n8n-packages/n8n-packages.types.d.ts +29 -8
  848. package/dist/modules/n8n-packages/n8n-packages.types.js +5 -3
  849. package/dist/modules/n8n-packages/n8n-packages.types.js.map +1 -1
  850. package/dist/modules/n8n-packages/spec/manifest.schema.d.ts +471 -97
  851. package/dist/modules/n8n-packages/spec/manifest.schema.js +12 -1
  852. package/dist/modules/n8n-packages/spec/manifest.schema.js.map +1 -1
  853. package/dist/modules/n8n-packages/spec/requirement-consumers.d.ts +5 -0
  854. package/dist/modules/n8n-packages/spec/requirement-consumers.js +16 -0
  855. package/dist/modules/n8n-packages/spec/requirement-consumers.js.map +1 -0
  856. package/dist/modules/n8n-packages/spec/requirements.schema.d.ts +457 -82
  857. package/dist/modules/n8n-packages/spec/requirements.schema.js +37 -10
  858. package/dist/modules/n8n-packages/spec/requirements.schema.js.map +1 -1
  859. package/dist/modules/n8n-packages/spec/serialized/agent.schema.d.ts +3860 -0
  860. package/dist/modules/n8n-packages/spec/serialized/agent.schema.js +55 -0
  861. package/dist/modules/n8n-packages/spec/serialized/agent.schema.js.map +1 -0
  862. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.d.ts +10 -0
  863. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js +1 -0
  864. package/dist/modules/n8n-packages/spec/serialized/data-table.schema.js.map +1 -1
  865. package/dist/modules/n8n-packages/utils/import-package-upload.d.ts +3 -15
  866. package/dist/modules/n8n-packages/utils/import-package-upload.js +4 -60
  867. package/dist/modules/n8n-packages/utils/import-package-upload.js.map +1 -1
  868. package/dist/modules/oauth-server/oauth-local-authorization-server.d.ts +14 -0
  869. package/dist/modules/oauth-server/oauth-local-authorization-server.js +55 -0
  870. package/dist/modules/oauth-server/oauth-local-authorization-server.js.map +1 -0
  871. package/dist/modules/oauth-server/oauth-server.module.js +3 -0
  872. package/dist/modules/oauth-server/oauth-server.module.js.map +1 -1
  873. package/dist/modules/oauth-server/oauth-signing-key.constants.d.ts +3 -1
  874. package/dist/modules/oauth-server/oauth-signing-key.constants.js +4 -2
  875. package/dist/modules/oauth-server/oauth-signing-key.constants.js.map +1 -1
  876. package/dist/modules/oauth-server/oauth-signing-key.service.d.ts +16 -4
  877. package/dist/modules/oauth-server/oauth-signing-key.service.js +95 -19
  878. package/dist/modules/oauth-server/oauth-signing-key.service.js.map +1 -1
  879. package/dist/modules/oauth-server/oauth-token.service.d.ts +5 -3
  880. package/dist/modules/oauth-server/oauth-token.service.js +30 -21
  881. package/dist/modules/oauth-server/oauth-token.service.js.map +1 -1
  882. package/dist/modules/oauth-server/oauth.controller.d.ts +4 -2
  883. package/dist/modules/oauth-server/oauth.controller.js +17 -26
  884. package/dist/modules/oauth-server/oauth.controller.js.map +1 -1
  885. package/dist/modules/oauth-server/resource-gate.d.ts +0 -2
  886. package/dist/modules/oauth-server/resource-gate.js +2 -8
  887. package/dist/modules/oauth-server/resource-gate.js.map +1 -1
  888. package/dist/modules/otel/execution-identity.d.ts +27 -0
  889. package/dist/modules/otel/execution-identity.js +43 -0
  890. package/dist/modules/otel/execution-identity.js.map +1 -0
  891. package/dist/modules/otel/execution-level-tracer.d.ts +1 -0
  892. package/dist/modules/otel/execution-level-tracer.js +75 -37
  893. package/dist/modules/otel/execution-level-tracer.js.map +1 -1
  894. package/dist/modules/otel/execution-level-tracer.types.d.ts +5 -0
  895. package/dist/modules/otel/execution-level-tracer.types.js.map +1 -1
  896. package/dist/modules/otel/otel-lifecycle-handler.d.ts +5 -1
  897. package/dist/modules/otel/otel-lifecycle-handler.js +44 -16
  898. package/dist/modules/otel/otel-lifecycle-handler.js.map +1 -1
  899. package/dist/modules/otel/otel-settings.service.js +2 -0
  900. package/dist/modules/otel/otel-settings.service.js.map +1 -1
  901. package/dist/modules/otel/otel.config.d.ts +2 -0
  902. package/dist/modules/otel/otel.config.js +10 -0
  903. package/dist/modules/otel/otel.config.js.map +1 -1
  904. package/dist/modules/otel/otel.constants.d.ts +3 -0
  905. package/dist/modules/otel/otel.constants.js +3 -0
  906. package/dist/modules/otel/otel.constants.js.map +1 -1
  907. package/dist/modules/otel/otel.service.js +2 -1
  908. package/dist/modules/otel/otel.service.js.map +1 -1
  909. package/dist/modules/otel/tracing-context.d.ts +1 -0
  910. package/dist/modules/otel/tracing-context.js.map +1 -1
  911. package/dist/modules/policy-infrastructure/policy-decision-audit.d.ts +2 -0
  912. package/dist/modules/policy-infrastructure/policy-decision-audit.js +15 -11
  913. package/dist/modules/policy-infrastructure/policy-decision-audit.js.map +1 -1
  914. package/dist/modules/policy-infrastructure/policy-decision.service.js +1 -0
  915. package/dist/modules/policy-infrastructure/policy-decision.service.js.map +1 -1
  916. package/dist/modules/promotions.ee/base-branch-files.d.ts +3 -3
  917. package/dist/modules/promotions.ee/base-branch-files.js.map +1 -1
  918. package/dist/modules/promotions.ee/branch-placement.d.ts +6 -7
  919. package/dist/modules/promotions.ee/branch-placement.js +19 -18
  920. package/dist/modules/promotions.ee/branch-placement.js.map +1 -1
  921. package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.d.ts +1 -0
  922. package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js +13 -0
  923. package/dist/modules/promotions.ee/database/repositories/promotion-provider.repository.js.map +1 -1
  924. package/dist/modules/promotions.ee/git-hosts/git-host-clients.d.ts +8 -0
  925. package/dist/modules/promotions.ee/git-hosts/git-host-clients.js +28 -0
  926. package/dist/modules/promotions.ee/git-hosts/git-host-clients.js.map +1 -0
  927. package/dist/modules/promotions.ee/git-hosts/git-host.types.d.ts +7 -0
  928. package/dist/modules/promotions.ee/git-hosts/git-host.types.js +3 -0
  929. package/dist/modules/promotions.ee/git-hosts/git-host.types.js.map +1 -0
  930. package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.d.ts +10 -0
  931. package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js +151 -0
  932. package/dist/modules/promotions.ee/git-hosts/gitlab-host.client.js.map +1 -0
  933. package/dist/modules/promotions.ee/import-manifest-bridge.d.ts +2 -0
  934. package/dist/modules/promotions.ee/import-manifest-bridge.js +20 -14
  935. package/dist/modules/promotions.ee/import-manifest-bridge.js.map +1 -1
  936. package/dist/modules/promotions.ee/promotion-binding-preflight.service.d.ts +6 -1
  937. package/dist/modules/promotions.ee/promotion-binding-preflight.service.js +35 -3
  938. package/dist/modules/promotions.ee/promotion-binding-preflight.service.js.map +1 -1
  939. package/dist/modules/promotions.ee/promotion-change.service.js +12 -6
  940. package/dist/modules/promotions.ee/promotion-change.service.js.map +1 -1
  941. package/dist/modules/promotions.ee/promotion-connections.service.d.ts +1 -1
  942. package/dist/modules/promotions.ee/promotion-providers.service.d.ts +10 -4
  943. package/dist/modules/promotions.ee/promotion-providers.service.js +100 -29
  944. package/dist/modules/promotions.ee/promotion-providers.service.js.map +1 -1
  945. package/dist/modules/promotions.ee/promotions.service.js +41 -14
  946. package/dist/modules/promotions.ee/promotions.service.js.map +1 -1
  947. package/dist/modules/promotions.ee/promotions.types.d.ts +2 -0
  948. package/dist/modules/promotions.ee/working-copy-updater.d.ts +3 -1
  949. package/dist/modules/promotions.ee/working-copy-updater.js +51 -29
  950. package/dist/modules/promotions.ee/working-copy-updater.js.map +1 -1
  951. package/dist/modules/provisioning.ee/provisioning.module.js +9 -3
  952. package/dist/modules/provisioning.ee/provisioning.module.js.map +1 -1
  953. package/dist/modules/provisioning.ee/provisioning.service.ee.d.ts +5 -2
  954. package/dist/modules/provisioning.ee/provisioning.service.ee.js +2 -2
  955. package/dist/modules/provisioning.ee/provisioning.service.ee.js.map +1 -1
  956. package/dist/modules/provisioning.ee/role-mapping-provider.ee.d.ts +14 -0
  957. package/dist/modules/provisioning.ee/role-mapping-provider.ee.js +33 -0
  958. package/dist/modules/provisioning.ee/role-mapping-provider.ee.js.map +1 -0
  959. package/dist/modules/provisioning.ee/role-resolver-types.d.ts +2 -41
  960. package/dist/modules/provisioning.ee/role-resolver.service.ee.d.ts +2 -2
  961. package/dist/modules/provisioning.ee/role-resolver.service.ee.js +5 -9
  962. package/dist/modules/provisioning.ee/role-resolver.service.ee.js.map +1 -1
  963. package/dist/modules/scim/database/scim-api-key.repository.d.ts +11 -0
  964. package/dist/modules/scim/database/scim-api-key.repository.js +51 -0
  965. package/dist/modules/scim/database/scim-api-key.repository.js.map +1 -0
  966. package/dist/modules/scim/scim-auth.middleware.d.ts +14 -0
  967. package/dist/modules/scim/scim-auth.middleware.js +80 -0
  968. package/dist/modules/scim/scim-auth.middleware.js.map +1 -0
  969. package/dist/modules/scim/scim-discovery.controller.d.ts +7 -0
  970. package/dist/modules/scim/scim-discovery.controller.js +90 -0
  971. package/dist/modules/scim/scim-discovery.controller.js.map +1 -0
  972. package/dist/modules/scim/scim-route.d.ts +9 -0
  973. package/dist/modules/scim/scim-route.js +17 -0
  974. package/dist/modules/scim/scim-route.js.map +1 -0
  975. package/dist/modules/scim/scim-settings.service.d.ts +9 -0
  976. package/dist/modules/scim/scim-settings.service.js +41 -0
  977. package/dist/modules/scim/scim-settings.service.js.map +1 -0
  978. package/dist/modules/scim/scim-token.controller.d.ts +17 -0
  979. package/dist/modules/scim/scim-token.controller.js +115 -0
  980. package/dist/modules/scim/scim-token.controller.js.map +1 -0
  981. package/dist/modules/scim/scim-token.service.d.ts +23 -0
  982. package/dist/modules/scim/scim-token.service.js +83 -0
  983. package/dist/modules/scim/scim-token.service.js.map +1 -0
  984. package/dist/modules/scim/scim.config.d.ts +3 -0
  985. package/dist/modules/scim/scim.config.js +28 -0
  986. package/dist/modules/scim/scim.config.js.map +1 -0
  987. package/dist/modules/scim/scim.module.d.ts +8 -0
  988. package/dist/modules/scim/scim.module.js +36 -0
  989. package/dist/modules/scim/scim.module.js.map +1 -0
  990. package/dist/modules/source-control.ee/source-control-import.service.ee.d.ts +1 -1
  991. package/dist/modules/source-control.ee/source-control-import.service.ee.js +13 -2
  992. package/dist/modules/source-control.ee/source-control-import.service.ee.js.map +1 -1
  993. package/dist/modules/source-control.ee/source-control.service.ee.js +1 -1
  994. package/dist/modules/source-control.ee/source-control.service.ee.js.map +1 -1
  995. package/dist/modules/sso-oidc/oidc.service.ee.js +12 -7
  996. package/dist/modules/sso-oidc/oidc.service.ee.js.map +1 -1
  997. package/dist/modules/token-exchange/services/jwks-resolver.js +1 -3
  998. package/dist/modules/token-exchange/services/jwks-resolver.js.map +1 -1
  999. package/dist/modules/token-exchange/services/token-exchange.service.js.map +1 -1
  1000. package/dist/modules/token-exchange/services/trusted-key.service.js +0 -2
  1001. package/dist/modules/token-exchange/services/trusted-key.service.js.map +1 -1
  1002. package/dist/modules/token-exchange/token-exchange.schemas.d.ts +6 -6
  1003. package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.d.ts +4 -4
  1004. package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.js +3 -3
  1005. package/dist/modules/type-availability-policies/credential-type-policy-instance.controller.js.map +1 -1
  1006. package/dist/modules/type-availability-policies/credential-type-policy-project.controller.d.ts +2 -2
  1007. package/dist/modules/type-availability-policies/credential-type-policy-project.controller.js +1 -1
  1008. package/dist/modules/type-availability-policies/credential-type-policy-project.controller.js.map +1 -1
  1009. package/dist/modules/type-availability-policies/credential-type-policy.check.d.ts +2 -1
  1010. package/dist/modules/type-availability-policies/credential-type-policy.check.js +5 -0
  1011. package/dist/modules/type-availability-policies/credential-type-policy.check.js.map +1 -1
  1012. package/dist/modules/type-availability-policies/database/repositories/restricted-node-type-match.d.ts +25 -0
  1013. package/dist/modules/type-availability-policies/database/repositories/restricted-node-type-match.js +43 -0
  1014. package/dist/modules/type-availability-policies/database/repositories/restricted-node-type-match.js.map +1 -0
  1015. package/dist/modules/type-availability-policies/database/repositories/restricted-workflow.repository.d.ts +8 -0
  1016. package/dist/modules/type-availability-policies/database/repositories/restricted-workflow.repository.js +49 -0
  1017. package/dist/modules/type-availability-policies/database/repositories/restricted-workflow.repository.js.map +1 -0
  1018. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.d.ts +1 -0
  1019. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js +23 -19
  1020. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-attachment.repository.js.map +1 -1
  1021. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.d.ts +4 -0
  1022. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js +8 -0
  1023. package/dist/modules/type-availability-policies/database/repositories/type-availability-policy-scope.repository.js.map +1 -1
  1024. package/dist/modules/type-availability-policies/package-resolver.d.ts +2 -1
  1025. package/dist/modules/type-availability-policies/package-resolver.js +28 -4
  1026. package/dist/modules/type-availability-policies/package-resolver.js.map +1 -1
  1027. package/dist/modules/type-availability-policies/policy-evaluator.d.ts +1 -0
  1028. package/dist/modules/type-availability-policies/policy-evaluator.js +2 -0
  1029. package/dist/modules/type-availability-policies/policy-evaluator.js.map +1 -1
  1030. package/dist/modules/type-availability-policies/policy-shadow-lint.js +28 -6
  1031. package/dist/modules/type-availability-policies/policy-shadow-lint.js.map +1 -1
  1032. package/dist/modules/type-availability-policies/restricted-node-types.provider.d.ts +15 -0
  1033. package/dist/modules/type-availability-policies/restricted-node-types.provider.js +64 -0
  1034. package/dist/modules/type-availability-policies/restricted-node-types.provider.js.map +1 -0
  1035. package/dist/modules/type-availability-policies/type-availability-policies.module.js +4 -0
  1036. package/dist/modules/type-availability-policies/type-availability-policies.module.js.map +1 -1
  1037. package/dist/modules/type-availability-policies/type-availability-policy.service.d.ts +8 -0
  1038. package/dist/modules/type-availability-policies/type-availability-policy.service.js +75 -21
  1039. package/dist/modules/type-availability-policies/type-availability-policy.service.js.map +1 -1
  1040. package/dist/modules/workflow-index/workflow-dependency-query.service.d.ts +3 -1
  1041. package/dist/modules/workflow-index/workflow-dependency-query.service.js +16 -2
  1042. package/dist/modules/workflow-index/workflow-dependency-query.service.js.map +1 -1
  1043. package/dist/modules/workflow-index/workflow-dependency.controller.js +1 -1
  1044. package/dist/modules/workflow-index/workflow-dependency.controller.js.map +1 -1
  1045. package/dist/node-catalog/index.d.ts +1 -0
  1046. package/dist/node-catalog/index.js +4 -1
  1047. package/dist/node-catalog/index.js.map +1 -1
  1048. package/dist/node-catalog/module-gated-node-types.d.ts +3 -0
  1049. package/dist/node-catalog/module-gated-node-types.js +26 -0
  1050. package/dist/node-catalog/module-gated-node-types.js.map +1 -0
  1051. package/dist/node-catalog/node-catalog.service.d.ts +3 -2
  1052. package/dist/node-catalog/node-catalog.service.js +15 -6
  1053. package/dist/node-catalog/node-catalog.service.js.map +1 -1
  1054. package/dist/node-execution/ephemeral-node-executor.d.ts +5 -1
  1055. package/dist/node-execution/ephemeral-node-executor.js +37 -12
  1056. package/dist/node-execution/ephemeral-node-executor.js.map +1 -1
  1057. package/dist/node-execution/index.d.ts +1 -0
  1058. package/dist/node-execution/index.js +3 -1
  1059. package/dist/node-execution/index.js.map +1 -1
  1060. package/dist/node-execution/resolve-tool-node-type.d.ts +1 -0
  1061. package/dist/node-execution/resolve-tool-node-type.js +19 -0
  1062. package/dist/node-execution/resolve-tool-node-type.js.map +1 -0
  1063. package/dist/policy/policed-agent-nodes.d.ts +3 -0
  1064. package/dist/policy/policed-agent-nodes.js +91 -0
  1065. package/dist/policy/policed-agent-nodes.js.map +1 -0
  1066. package/dist/policy/policy-enforcement-backend.d.ts +2 -1
  1067. package/dist/policy/policy-enforcement.service.d.ts +3 -1
  1068. package/dist/policy/policy-enforcement.service.js +35 -10
  1069. package/dist/policy/policy-enforcement.service.js.map +1 -1
  1070. package/dist/policy/policy-violation.error.js +1 -6
  1071. package/dist/policy/policy-violation.error.js.map +1 -1
  1072. package/dist/posthog/index.js +1 -1
  1073. package/dist/posthog/index.js.map +1 -1
  1074. package/dist/public-api/idempotency-key-cleanup.task.d.ts +14 -0
  1075. package/dist/public-api/idempotency-key-cleanup.task.js +45 -0
  1076. package/dist/public-api/idempotency-key-cleanup.task.js.map +1 -0
  1077. package/dist/public-api/idempotency-key.service.d.ts +7 -0
  1078. package/dist/public-api/idempotency-key.service.js +35 -0
  1079. package/dist/public-api/idempotency-key.service.js.map +1 -0
  1080. package/dist/public-api/index.js +1 -3
  1081. package/dist/public-api/index.js.map +1 -1
  1082. package/dist/public-api/media-types/binary-response.d.ts +3 -0
  1083. package/dist/public-api/media-types/binary-response.js +79 -0
  1084. package/dist/public-api/media-types/binary-response.js.map +1 -0
  1085. package/dist/public-api/public-api-controller.registry.js +6 -0
  1086. package/dist/public-api/public-api-controller.registry.js.map +1 -1
  1087. package/dist/public-api/public-api-route-resolver.d.ts +2 -1
  1088. package/dist/public-api/public-api-route-resolver.js +1 -0
  1089. package/dist/public-api/public-api-route-resolver.js.map +1 -1
  1090. package/dist/public-api/types.d.ts +1 -43
  1091. package/dist/public-api/v1/controllers/credential-type-policies.public.controller.d.ts +10 -10
  1092. package/dist/public-api/v1/controllers/credential-type-policies.public.controller.js +13 -13
  1093. package/dist/public-api/v1/controllers/credential-type-policies.public.controller.js.map +1 -1
  1094. package/dist/public-api/v1/controllers/index.d.ts +1 -0
  1095. package/dist/public-api/v1/controllers/index.js +1 -0
  1096. package/dist/public-api/v1/controllers/index.js.map +1 -1
  1097. package/dist/public-api/v1/controllers/insights.public.controller.d.ts +1 -1
  1098. package/dist/public-api/v1/controllers/insights.public.controller.js +2 -2
  1099. package/dist/public-api/v1/controllers/insights.public.controller.js.map +1 -1
  1100. package/dist/public-api/v1/{handlers/log-streaming → controllers}/log-streaming.mapper.d.ts +20 -20
  1101. package/dist/public-api/v1/{handlers/log-streaming → controllers}/log-streaming.mapper.js +10 -10
  1102. package/dist/public-api/v1/controllers/log-streaming.mapper.js.map +1 -0
  1103. package/dist/public-api/v1/controllers/log-streaming.public.controller.d.ts +23 -1
  1104. package/dist/public-api/v1/controllers/log-streaming.public.controller.js +161 -1
  1105. package/dist/public-api/v1/controllers/log-streaming.public.controller.js.map +1 -1
  1106. package/dist/public-api/v1/controllers/n8n-packages.public.controller.d.ts +13 -0
  1107. package/dist/public-api/v1/controllers/n8n-packages.public.controller.js +134 -0
  1108. package/dist/public-api/v1/controllers/n8n-packages.public.controller.js.map +1 -0
  1109. package/dist/public-api/v1/controllers/node-type-policies.public.controller.js +13 -6
  1110. package/dist/public-api/v1/controllers/node-type-policies.public.controller.js.map +1 -1
  1111. package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.d.ts +9 -0
  1112. package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.js +55 -0
  1113. package/dist/public-api/v1/controllers/openapi/n8n-packages.openapi.js.map +1 -0
  1114. package/dist/public-api/v1/controllers/otel.public.controller.js +1 -1
  1115. package/dist/public-api/v1/controllers/otel.public.controller.js.map +1 -1
  1116. package/dist/public-api/v1/controllers/promotions.public.controller.js +6 -5
  1117. package/dist/public-api/v1/controllers/promotions.public.controller.js.map +1 -1
  1118. package/dist/public-api/v1/controllers/workflows.public.controller.d.ts +2 -1
  1119. package/dist/public-api/v1/controllers/workflows.public.controller.js +35 -4
  1120. package/dist/public-api/v1/controllers/workflows.public.controller.js.map +1 -1
  1121. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.d.ts +2 -20
  1122. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js +17 -105
  1123. package/dist/public-api/v1/handlers/n8n-packages/n8n-packages.handler.js.map +1 -1
  1124. package/dist/public-api/v1/openapi-gen/decorator-routes.d.ts +27 -1
  1125. package/dist/public-api/v1/openapi-gen/decorator-routes.js +37 -14
  1126. package/dist/public-api/v1/openapi-gen/decorator-routes.js.map +1 -1
  1127. package/dist/public-api/v1/openapi-gen/generate.js +2 -2
  1128. package/dist/public-api/v1/openapi-gen/generate.js.map +1 -1
  1129. package/dist/public-api/v1/openapi-gen/object-union-type.d.ts +1 -0
  1130. package/dist/public-api/v1/openapi-gen/object-union-type.js +33 -0
  1131. package/dist/public-api/v1/openapi-gen/object-union-type.js.map +1 -0
  1132. package/dist/public-api/v1/openapi-gen/schema-modifiers.d.ts +1 -0
  1133. package/dist/public-api/v1/openapi-gen/schema-modifiers.js +12 -0
  1134. package/dist/public-api/v1/openapi-gen/schema-modifiers.js.map +1 -0
  1135. package/dist/public-api/v1/openapi.yml +10389 -8020
  1136. package/dist/public-api/v1/shared/otel.mapper.js +2 -0
  1137. package/dist/public-api/v1/shared/otel.mapper.js.map +1 -1
  1138. package/dist/public-api/v1/shared/services/pagination.service.js +1 -1
  1139. package/dist/public-api/v1/shared/services/pagination.service.js.map +1 -1
  1140. package/dist/scaling/constants.d.ts +2 -2
  1141. package/dist/scaling/job-processor.d.ts +7 -1
  1142. package/dist/scaling/job-processor.js +32 -26
  1143. package/dist/scaling/job-processor.js.map +1 -1
  1144. package/dist/scaling/job-return.d.ts +3 -0
  1145. package/dist/scaling/job-return.js +33 -0
  1146. package/dist/scaling/job-return.js.map +1 -0
  1147. package/dist/scaling/pubsub/pubsub.event-map.d.ts +1 -0
  1148. package/dist/scaling/pubsub/pubsub.types.d.ts +2 -1
  1149. package/dist/scaling/scaling.service.d.ts +2 -0
  1150. package/dist/scaling/scaling.service.js +37 -3
  1151. package/dist/scaling/scaling.service.js.map +1 -1
  1152. package/dist/scheduling/durable-job-provisioner.d.ts +3 -2
  1153. package/dist/scheduling/durable-job-provisioner.js +34 -71
  1154. package/dist/scheduling/durable-job-provisioner.js.map +1 -1
  1155. package/dist/scheduling/durable-scheduler.js +0 -9
  1156. package/dist/scheduling/durable-scheduler.js.map +1 -1
  1157. package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.d.ts +1 -0
  1158. package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js +2 -0
  1159. package/dist/scheduling/poll-trigger-node/poll-trigger-job-registrar.js.map +1 -1
  1160. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.d.ts +5 -5
  1161. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js +59 -95
  1162. package/dist/scheduling/poll-trigger-node/poll-trigger-task-handler.js.map +1 -1
  1163. package/dist/scheduling/system-tasks/main-system-tasks.js +17 -5
  1164. package/dist/scheduling/system-tasks/main-system-tasks.js.map +1 -1
  1165. package/dist/scheduling/system-tasks/system-task-handler.d.ts +2 -2
  1166. package/dist/scheduling/system-tasks/system-task-handler.js +4 -4
  1167. package/dist/scheduling/system-tasks/system-task-handler.js.map +1 -1
  1168. package/dist/scheduling/system-tasks/system-task-job-registrar.js +2 -1
  1169. package/dist/scheduling/system-tasks/system-task-job-registrar.js.map +1 -1
  1170. package/dist/scheduling/system-tasks/system-task-run-observer.d.ts +3 -3
  1171. package/dist/scheduling/system-tasks/system-task-run-observer.js +14 -6
  1172. package/dist/scheduling/system-tasks/system-task-run-observer.js.map +1 -1
  1173. package/dist/server.d.ts +1 -0
  1174. package/dist/server.js +1 -0
  1175. package/dist/server.js.map +1 -1
  1176. package/dist/services/ai-preference.service.d.ts +2 -1
  1177. package/dist/services/ai-preference.service.js +10 -0
  1178. package/dist/services/ai-preference.service.js.map +1 -1
  1179. package/dist/services/database-independent-routes.service.d.ts +5 -0
  1180. package/dist/services/database-independent-routes.service.js +29 -0
  1181. package/dist/services/database-independent-routes.service.js.map +1 -0
  1182. package/dist/services/frontend.service.d.ts +3 -0
  1183. package/dist/services/frontend.service.js +12 -1
  1184. package/dist/services/frontend.service.js.map +1 -1
  1185. package/dist/services/jwt.service.d.ts +4 -3
  1186. package/dist/services/jwt.service.js +9 -6
  1187. package/dist/services/jwt.service.js.map +1 -1
  1188. package/dist/services/oauth-token-verifier-proxy.service.d.ts +0 -2
  1189. package/dist/services/oauth-token-verifier-proxy.service.js +0 -6
  1190. package/dist/services/oauth-token-verifier-proxy.service.js.map +1 -1
  1191. package/dist/services/ownership-transfer/ownership-transfer.manifest.json +6 -1
  1192. package/dist/services/ownership-transfer/ownership-transfer.service.d.ts +9 -2
  1193. package/dist/services/ownership-transfer/ownership-transfer.service.js +27 -2
  1194. package/dist/services/ownership-transfer/ownership-transfer.service.js.map +1 -1
  1195. package/dist/services/ownership.service.d.ts +4 -6
  1196. package/dist/services/ownership.service.js +7 -38
  1197. package/dist/services/ownership.service.js.map +1 -1
  1198. package/dist/services/project.service.ee.d.ts +2 -0
  1199. package/dist/services/project.service.ee.js +13 -0
  1200. package/dist/services/project.service.ee.js.map +1 -1
  1201. package/dist/services/pruning/execution-pruning-hard-delete.task.d.ts +17 -0
  1202. package/dist/{modules/insights/insights-pruning.task.js → services/pruning/execution-pruning-hard-delete.task.js} +17 -15
  1203. package/dist/services/pruning/execution-pruning-hard-delete.task.js.map +1 -0
  1204. package/dist/services/pruning/execution-pruning-soft-delete.task.d.ts +4 -2
  1205. package/dist/services/pruning/execution-pruning-soft-delete.task.js +4 -2
  1206. package/dist/services/pruning/execution-pruning-soft-delete.task.js.map +1 -1
  1207. package/dist/services/pruning/executions-pruning.service.d.ts +6 -18
  1208. package/dist/services/pruning/executions-pruning.service.js +54 -88
  1209. package/dist/services/pruning/executions-pruning.service.js.map +1 -1
  1210. package/dist/services/pruning/workflow-history-compaction-optimize.task.d.ts +1 -0
  1211. package/dist/services/pruning/workflow-history-compaction-optimize.task.js +1 -0
  1212. package/dist/services/pruning/workflow-history-compaction-optimize.task.js.map +1 -1
  1213. package/dist/services/pruning/workflow-history-compaction-trim.task.d.ts +2 -0
  1214. package/dist/services/pruning/workflow-history-compaction-trim.task.js +8 -6
  1215. package/dist/services/pruning/workflow-history-compaction-trim.task.js.map +1 -1
  1216. package/dist/services/pruning/workflow-history-compaction.service.d.ts +1 -5
  1217. package/dist/services/pruning/workflow-history-compaction.service.js +14 -19
  1218. package/dist/services/pruning/workflow-history-compaction.service.js.map +1 -1
  1219. package/dist/services/pruning/workflow-history-compaction.utils.d.ts +6 -0
  1220. package/dist/services/pruning/workflow-history-compaction.utils.js +14 -0
  1221. package/dist/services/pruning/workflow-history-compaction.utils.js.map +1 -0
  1222. package/dist/services/pruning/workflow-history-pruning.task.d.ts +4 -1
  1223. package/dist/services/pruning/workflow-history-pruning.task.js +5 -2
  1224. package/dist/services/pruning/workflow-history-pruning.task.js.map +1 -1
  1225. package/dist/services/role-mapping-proxy.service.d.ts +53 -0
  1226. package/dist/{modules/favorites/favorite-resource-resolver.registry.js → services/role-mapping-proxy.service.js} +11 -11
  1227. package/dist/services/role-mapping-proxy.service.js.map +1 -0
  1228. package/dist/services/token-purposes.d.ts +2 -0
  1229. package/dist/services/token-purposes.js +2 -0
  1230. package/dist/services/token-purposes.js.map +1 -1
  1231. package/dist/services/user.service.js +1 -0
  1232. package/dist/services/user.service.js.map +1 -1
  1233. package/dist/services/workflow-statistics-rollup.service.d.ts +6 -17
  1234. package/dist/services/workflow-statistics-rollup.service.js +26 -77
  1235. package/dist/services/workflow-statistics-rollup.service.js.map +1 -1
  1236. package/dist/services/workflow-statistics-rollup.task.d.ts +14 -0
  1237. package/dist/services/workflow-statistics-rollup.task.js +43 -0
  1238. package/dist/services/workflow-statistics-rollup.task.js.map +1 -0
  1239. package/dist/services/workflow-statistics.service.js +10 -18
  1240. package/dist/services/workflow-statistics.service.js.map +1 -1
  1241. package/dist/telemetry/index.d.ts +10 -4
  1242. package/dist/telemetry/index.js +51 -30
  1243. package/dist/telemetry/index.js.map +1 -1
  1244. package/dist/tool-generation/hitl-tools.js +5 -0
  1245. package/dist/tool-generation/hitl-tools.js.map +1 -1
  1246. package/dist/user-management/email/templates/agent-budget-alert.handlebars +196 -0
  1247. package/dist/user-management/email/user-management-mailer.d.ts +8 -1
  1248. package/dist/user-management/email/user-management-mailer.js +16 -0
  1249. package/dist/user-management/email/user-management-mailer.js.map +1 -1
  1250. package/dist/wait-tracker.js +1 -0
  1251. package/dist/wait-tracker.js.map +1 -1
  1252. package/dist/webhooks/waiting-webhooks.js +7 -6
  1253. package/dist/webhooks/waiting-webhooks.js.map +1 -1
  1254. package/dist/webhooks/webhook-helpers.d.ts +4 -1
  1255. package/dist/webhooks/webhook-helpers.js +14 -3
  1256. package/dist/webhooks/webhook-helpers.js.map +1 -1
  1257. package/dist/workflow-execute-additional-data.d.ts +2 -1
  1258. package/dist/workflow-execute-additional-data.js +17 -8
  1259. package/dist/workflow-execute-additional-data.js.map +1 -1
  1260. package/dist/workflow-runner.d.ts +2 -2
  1261. package/dist/workflow-runner.js +9 -12
  1262. package/dist/workflow-runner.js.map +1 -1
  1263. package/dist/workflows/execution-timeout-validation.d.ts +2 -0
  1264. package/dist/workflows/execution-timeout-validation.js +16 -0
  1265. package/dist/workflows/execution-timeout-validation.js.map +1 -0
  1266. package/dist/workflows/restricted-node-types-provider-proxy.service.d.ts +9 -0
  1267. package/dist/workflows/restricted-node-types-provider-proxy.service.js +26 -0
  1268. package/dist/workflows/restricted-node-types-provider-proxy.service.js.map +1 -0
  1269. package/dist/workflows/triggers/trigger-execution-context.factory.d.ts +8 -5
  1270. package/dist/workflows/triggers/trigger-execution-context.factory.js +9 -10
  1271. package/dist/workflows/triggers/trigger-execution-context.factory.js.map +1 -1
  1272. package/dist/workflows/workflow-finder.service.d.ts +9 -3
  1273. package/dist/workflows/workflow-finder.service.js +6 -5
  1274. package/dist/workflows/workflow-finder.service.js.map +1 -1
  1275. package/dist/workflows/workflow-history/workflow-history.controller.d.ts +2 -2
  1276. package/dist/workflows/workflow-history/workflow-history.controller.js +9 -6
  1277. package/dist/workflows/workflow-history/workflow-history.controller.js.map +1 -1
  1278. package/dist/workflows/workflow-history/workflow-history.service.d.ts +27 -11
  1279. package/dist/workflows/workflow-history/workflow-history.service.js +56 -34
  1280. package/dist/workflows/workflow-history/workflow-history.service.js.map +1 -1
  1281. package/dist/workflows/workflow-validation.service.d.ts +1 -1
  1282. package/dist/workflows/workflow-validation.service.js +2 -2
  1283. package/dist/workflows/workflow-validation.service.js.map +1 -1
  1284. package/dist/workflows/workflow.service.d.ts +44 -17
  1285. package/dist/workflows/workflow.service.ee.d.ts +5 -3
  1286. package/dist/workflows/workflow.service.ee.js +35 -9
  1287. package/dist/workflows/workflow.service.ee.js.map +1 -1
  1288. package/dist/workflows/workflow.service.js +81 -24
  1289. package/dist/workflows/workflow.service.js.map +1 -1
  1290. package/dist/workflows/workflows.controller.js +5 -1
  1291. package/dist/workflows/workflows.controller.js.map +1 -1
  1292. package/package.json +42 -40
  1293. package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.d.ts +0 -2
  1294. package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js +0 -159
  1295. package/dist/modules/breaking-changes/migrations/execute-workflow-each-to-loop.migration.js.map +0 -1
  1296. package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.d.ts +0 -10
  1297. package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js +0 -47
  1298. package/dist/modules/breaking-changes/rules/v3/execute-workflow-each-mode.rule.js.map +0 -1
  1299. package/dist/modules/favorites/favorite-resource-resolver.registry.d.ts +0 -17
  1300. package/dist/modules/favorites/favorite-resource-resolver.registry.js.map +0 -1
  1301. package/dist/modules/insights/database/entities/insights-by-period.d.ts +0 -17
  1302. package/dist/modules/insights/database/entities/insights-by-period.js +0 -73
  1303. package/dist/modules/insights/database/entities/insights-by-period.js.map +0 -1
  1304. package/dist/modules/insights/database/entities/insights-metadata.d.ts +0 -8
  1305. package/dist/modules/insights/database/entities/insights-metadata.js +0 -40
  1306. package/dist/modules/insights/database/entities/insights-metadata.js.map +0 -1
  1307. package/dist/modules/insights/database/entities/insights-raw.d.ts +0 -13
  1308. package/dist/modules/insights/database/entities/insights-raw.js +0 -61
  1309. package/dist/modules/insights/database/entities/insights-raw.js.map +0 -1
  1310. package/dist/modules/insights/database/entities/insights-shared.d.ts +0 -21
  1311. package/dist/modules/insights/database/entities/insights-shared.js +0 -30
  1312. package/dist/modules/insights/database/entities/insights-shared.js.map +0 -1
  1313. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.d.ts +0 -15
  1314. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js +0 -45
  1315. package/dist/modules/insights/database/repositories/insights-by-period-query.helper.js.map +0 -1
  1316. package/dist/modules/insights/database/repositories/insights-by-period.repository.d.ts +0 -100
  1317. package/dist/modules/insights/database/repositories/insights-by-period.repository.js +0 -347
  1318. package/dist/modules/insights/database/repositories/insights-by-period.repository.js.map +0 -1
  1319. package/dist/modules/insights/database/repositories/insights-metadata.repository.d.ts +0 -7
  1320. package/dist/modules/insights/database/repositories/insights-metadata.repository.js +0 -36
  1321. package/dist/modules/insights/database/repositories/insights-metadata.repository.js.map +0 -1
  1322. package/dist/modules/insights/database/repositories/insights-raw.repository.d.ts +0 -12
  1323. package/dist/modules/insights/database/repositories/insights-raw.repository.js +0 -36
  1324. package/dist/modules/insights/database/repositories/insights-raw.repository.js.map +0 -1
  1325. package/dist/modules/insights/insights-collection.service.d.ts +0 -30
  1326. package/dist/modules/insights/insights-collection.service.js +0 -280
  1327. package/dist/modules/insights/insights-collection.service.js.map +0 -1
  1328. package/dist/modules/insights/insights-compaction.service.d.ts +0 -19
  1329. package/dist/modules/insights/insights-compaction.service.js +0 -161
  1330. package/dist/modules/insights/insights-compaction.service.js.map +0 -1
  1331. package/dist/modules/insights/insights-compaction.task.d.ts +0 -14
  1332. package/dist/modules/insights/insights-compaction.task.js.map +0 -1
  1333. package/dist/modules/insights/insights-pruning.service.d.ts +0 -11
  1334. package/dist/modules/insights/insights-pruning.service.js +0 -49
  1335. package/dist/modules/insights/insights-pruning.service.js.map +0 -1
  1336. package/dist/modules/insights/insights-pruning.task.d.ts +0 -15
  1337. package/dist/modules/insights/insights-pruning.task.js.map +0 -1
  1338. package/dist/modules/insights/insights.config.d.ts +0 -13
  1339. package/dist/modules/insights/insights.config.js +0 -80
  1340. package/dist/modules/insights/insights.config.js.map +0 -1
  1341. package/dist/modules/insights/insights.constants.d.ts +0 -4
  1342. package/dist/modules/insights/insights.constants.js +0 -24
  1343. package/dist/modules/insights/insights.constants.js.map +0 -1
  1344. package/dist/modules/insights/insights.controller.d.ts +0 -16
  1345. package/dist/modules/insights/insights.controller.js +0 -159
  1346. package/dist/modules/insights/insights.controller.js.map +0 -1
  1347. package/dist/modules/insights/insights.module.d.ts +0 -17
  1348. package/dist/modules/insights/insights.module.js +0 -51
  1349. package/dist/modules/insights/insights.module.js.map +0 -1
  1350. package/dist/modules/insights/insights.service.d.ts +0 -73
  1351. package/dist/modules/insights/insights.service.js +0 -257
  1352. package/dist/modules/insights/insights.service.js.map +0 -1
  1353. package/dist/modules/insights/insights.settings.d.ts +0 -20
  1354. package/dist/modules/insights/insights.settings.js +0 -48
  1355. package/dist/modules/insights/insights.settings.js.map +0 -1
  1356. package/dist/public-api/v1/handlers/log-streaming/log-streaming.handler.d.ts +0 -12
  1357. package/dist/public-api/v1/handlers/log-streaming/log-streaming.handler.js +0 -107
  1358. package/dist/public-api/v1/handlers/log-streaming/log-streaming.handler.js.map +0 -1
  1359. package/dist/public-api/v1/handlers/log-streaming/log-streaming.mapper.js.map +0 -1
  1360. package/dist/public-api/v1/handlers/workflows/workflows.handler.d.ts +0 -7
  1361. package/dist/public-api/v1/handlers/workflows/workflows.handler.js +0 -31
  1362. package/dist/public-api/v1/handlers/workflows/workflows.handler.js.map +0 -1
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.WorkflowSuggestionActionsService = void 0;
16
+ const backend_common_1 = require("@n8n/backend-common");
17
+ const db_1 = require("@n8n/db");
18
+ const di_1 = require("@n8n/di");
19
+ const errors_1 = require("@n8n/errors");
20
+ const ensure_error_1 = require("@n8n/utils/errors/ensure-error");
21
+ const isEqual_1 = __importDefault(require("lodash/isEqual"));
22
+ const n8n_workflow_1 = require("n8n-workflow");
23
+ const collaboration_service_1 = require("../../../collaboration/collaboration.service");
24
+ const check_access_1 = require("../../../permissions.ee/check-access");
25
+ const workflow_publication_status_service_1 = require("../../../workflows/publication/workflow-publication-status.service");
26
+ const workflow_service_1 = require("../../../workflows/workflow.service");
27
+ const workflow_suggestion_repository_1 = require("./database/workflow-suggestion.repository");
28
+ const workflow_suggestion_service_1 = require("./workflow-suggestion.service");
29
+ let WorkflowSuggestionActionsService = class WorkflowSuggestionActionsService {
30
+ constructor(service, suggestions, workflows, collaboration, publication, txRunner, logger) {
31
+ this.service = service;
32
+ this.suggestions = suggestions;
33
+ this.workflows = workflows;
34
+ this.collaboration = collaboration;
35
+ this.publication = publication;
36
+ this.txRunner = txRunner;
37
+ this.logger = logger;
38
+ }
39
+ async apply(actor, projectId, workflowId, suggestionId, clientId) {
40
+ const user = await this.service.requireEditor(actor.id, workflowId);
41
+ const newlyAppliedVersion = await this.applySuggestion(user, { workflowId, projectId }, suggestionId, 'apply', clientId);
42
+ if (newlyAppliedVersion)
43
+ await this.notifyEditors(workflowId, user.id);
44
+ return await this.service.getProposal(user, projectId, workflowId, suggestionId);
45
+ }
46
+ async approveAndPublish(actor, projectId, workflowId, suggestionId, clientId) {
47
+ const user = await this.service.requireEditor(actor.id, workflowId);
48
+ if (!(await (0, check_access_1.userHasScopes)(user, ['workflow:publish'], false, { workflowId }))) {
49
+ throw new errors_1.ForbiddenError('Workflow publish access is required.');
50
+ }
51
+ const newlyAppliedVersion = await this.applySuggestion(user, { workflowId, projectId }, suggestionId, 'approve-and-publish', clientId);
52
+ let publishError;
53
+ if (newlyAppliedVersion) {
54
+ try {
55
+ await this.publishAppliedVersion(user, workflowId, newlyAppliedVersion, clientId ?? suggestionId);
56
+ }
57
+ catch (error) {
58
+ publishError = (0, ensure_error_1.ensureError)(error).message;
59
+ }
60
+ await this.notifyEditors(workflowId, user.id);
61
+ }
62
+ return {
63
+ ...(await this.service.getProposal(user, projectId, workflowId, suggestionId)),
64
+ ...(publishError !== undefined ? { publishError } : {}),
65
+ };
66
+ }
67
+ async discard(actor, projectId, workflowId, suggestionId) {
68
+ const outcome = await this.discardPending(actor, projectId, workflowId, suggestionId);
69
+ if (outcome === 'unavailable')
70
+ throw new errors_1.NotFoundError('Suggestion not found.');
71
+ return await this.service.getProposal(actor, projectId, workflowId, suggestionId);
72
+ }
73
+ async discardPending(actor, projectId, workflowId, suggestionId, ctx = {}) {
74
+ return await this.txRunner.run(ctx, async (ctx) => {
75
+ const user = await this.service.requireEditor(actor.id, workflowId, ctx);
76
+ const { suggestion, target } = await this.service.reconcilePending(suggestionId, { workflowId, projectId }, ctx);
77
+ if (!target.workflow || target.projectId !== projectId)
78
+ return 'unavailable';
79
+ if (suggestion.state === 'pending') {
80
+ const closed = await this.suggestions.closePending(suggestion, 'discarded', { author: 'human', actorId: user.id }, ctx);
81
+ return closed ? 'discarded' : 'already_closed';
82
+ }
83
+ return 'already_closed';
84
+ });
85
+ }
86
+ async applySuggestion(user, scope, suggestionId, action, clientId) {
87
+ const { workflowId, projectId } = scope;
88
+ const { suggestion, target } = await this.service.reconcilePending(suggestionId, scope);
89
+ if (!target.workflow || target.projectId !== projectId)
90
+ throw new errors_1.NotFoundError('Suggestion not found.');
91
+ if (suggestion.state !== 'pending')
92
+ return undefined;
93
+ if (suggestion.resultKind !== 'fix_ready') {
94
+ throw new errors_1.ConflictError('Only a Fix ready suggestion can be applied.');
95
+ }
96
+ await this.collaboration.validateWriteLock(user.id, clientId ?? suggestion.id, workflowId, 'update');
97
+ const prepared = await this.workflows.prepareUpdate(user, Object.assign(new db_1.WorkflowEntity(), structuredClone(suggestion.payload.candidate)), workflowId, { expectedChecksum: suggestion.expectedBaseline.checksum, source: 'n8n-ai' });
98
+ const { saved, appliedVersion } = await this.txRunner.run({}, async (ctx) => {
99
+ await this.validatePreparedWorkflow(suggestion, prepared.workflow, ctx);
100
+ await this.service.requireEditor(user.id, workflowId, ctx);
101
+ const saved = await this.workflows.savePreparedUpdate(prepared, ctx, {
102
+ propagateVersionHistoryErrors: true,
103
+ });
104
+ const appliedVersion = {
105
+ versionId: saved.versionId,
106
+ checksum: await (0, n8n_workflow_1.calculateWorkflowChecksum)(saved),
107
+ action,
108
+ actorId: user.id,
109
+ };
110
+ const closed = await this.suggestions.closePending(suggestion, 'applied', { author: 'human', actorId: user.id }, ctx, appliedVersion);
111
+ if (!closed)
112
+ throw new errors_1.ConflictError('The suggestion has already closed.');
113
+ return { saved, appliedVersion };
114
+ });
115
+ try {
116
+ await this.workflows.finishUpdate(prepared, saved);
117
+ }
118
+ catch (error) {
119
+ this.logger.warn('Could not finish the workflow update after Apply committed', {
120
+ suggestionId,
121
+ error,
122
+ });
123
+ }
124
+ return appliedVersion;
125
+ }
126
+ async validatePreparedWorkflow(suggestion, prepared, ctx) {
127
+ const { workflowId, projectId } = suggestion;
128
+ const target = await this.service.readWorkflowTargetForApply(workflowId, ctx);
129
+ const current = await this.suggestions.getSuggestion(suggestion.id, { workflowId, projectId }, ctx);
130
+ if (current.state !== 'pending' ||
131
+ !target.workflow ||
132
+ !(await this.service.matchesBaseline(current, target))) {
133
+ throw new errors_1.ConflictError('The suggestion no longer matches the workflow.');
134
+ }
135
+ const status = await this.publication.getStatus(workflowId, ctx);
136
+ if (status.status !== 'published' ||
137
+ status.liveVersionId !== current.expectedBaseline.publishedVersionId) {
138
+ throw new errors_1.ConflictError('The original workflow is no longer fully published.');
139
+ }
140
+ const reviewed = { ...current.payload.original, ...current.payload.candidate };
141
+ if ((await (0, n8n_workflow_1.calculateWorkflowChecksum)(prepared)) !== (await (0, n8n_workflow_1.calculateWorkflowChecksum)(reviewed)) ||
142
+ !(0, isEqual_1.default)(prepared.staticData, target.workflow.staticData) ||
143
+ prepared.versionId === target.workflow.versionId) {
144
+ throw new errors_1.ConflictError('Workflow save preparation changed the reviewed fix.');
145
+ }
146
+ }
147
+ async publishAppliedVersion(user, workflowId, version, clientId) {
148
+ const publisher = await this.service.requireEditor(user.id, workflowId);
149
+ await this.collaboration.validateWriteLock(publisher.id, clientId, workflowId, 'publish');
150
+ await this.workflows.activateWorkflow(publisher, workflowId, {
151
+ versionId: version.versionId,
152
+ expectedChecksum: version.checksum,
153
+ source: 'n8n-ai',
154
+ });
155
+ }
156
+ async notifyEditors(workflowId, userId) {
157
+ try {
158
+ await this.collaboration.broadcastWorkflowUpdate(workflowId, userId);
159
+ }
160
+ catch (error) {
161
+ this.logger.warn('Could not notify editors about the applied suggestion', {
162
+ workflowId,
163
+ error,
164
+ });
165
+ }
166
+ }
167
+ };
168
+ exports.WorkflowSuggestionActionsService = WorkflowSuggestionActionsService;
169
+ exports.WorkflowSuggestionActionsService = WorkflowSuggestionActionsService = __decorate([
170
+ (0, di_1.Service)(),
171
+ __metadata("design:paramtypes", [workflow_suggestion_service_1.WorkflowSuggestionService, workflow_suggestion_repository_1.WorkflowSuggestionRepository, workflow_service_1.WorkflowService, collaboration_service_1.CollaborationService, workflow_publication_status_service_1.WorkflowPublicationStatusService, db_1.TransactionRunner, backend_common_1.Logger])
172
+ ], WorkflowSuggestionActionsService);
173
+ //# sourceMappingURL=workflow-suggestion-actions.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-suggestion-actions.service.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/workflow-suggestions/workflow-suggestion-actions.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAIA,wDAA6C;AAC7C,gCAA8F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CAAC,aAAa,CAAC,iBAAiB,CAAC,SAAS,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC;QAC1F,MAAM,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS,EAAE,UAAU,EAAE;YAC5D,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,gBAAgB,EAAE,OAAO,CAAC,QAAQ;YAClC,MAAM,EAAE,QAAQ;SAChB,CAAC,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,aAAa,CAAC,UAAkB,EAAE,MAAc;QAC7D,IAAI,CAAC;YACJ,MAAM,IAAI,CAAC,aAAa,CAAC,uBAAuB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QACtE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,uDAAuD,EAAE;gBACzE,UAAU;gBACV,KAAK;aACL,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;CACD,CAAA;;2CAxOY,gCAAgC;IAD5C,IAAA,YAAO,GAAE;qCAGkB,uDAAyB,EACrB,6DAA4B,EAC9B,kCAAe,EACX,4CAAoB,EACtB,sEAAgC,EACnC,sBAAiB,EACnB,uBAAM;GARpB,gCAAgC,CAwO5C"}
@@ -0,0 +1,6 @@
1
+ import { Logger } from '@n8n/backend-common';
2
+ import { EventService } from '@n8n/backend-services';
3
+ import { WorkflowSuggestionService } from './workflow-suggestion.service';
4
+ export declare class WorkflowSuggestionEventRelay {
5
+ constructor(events: EventService, suggestions: WorkflowSuggestionService, logger: Logger);
6
+ }
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.WorkflowSuggestionEventRelay = void 0;
16
+ const backend_common_1 = require("@n8n/backend-common");
17
+ const backend_services_1 = require("@n8n/backend-services");
18
+ const di_1 = require("@n8n/di");
19
+ const debounce_1 = __importDefault(require("lodash/debounce"));
20
+ const workflow_suggestion_service_1 = require("./workflow-suggestion.service");
21
+ const SAVE_DEBOUNCE_MS = 30_000;
22
+ const MAX_SAVE_WAIT_MS = 60_000;
23
+ let WorkflowSuggestionEventRelay = class WorkflowSuggestionEventRelay {
24
+ constructor(events, suggestions, logger) {
25
+ const pendingSaves = new Map();
26
+ const reconcile = async (workflowId) => {
27
+ pendingSaves.get(workflowId)?.cancel();
28
+ pendingSaves.delete(workflowId);
29
+ try {
30
+ await suggestions.reconcileWorkflow(workflowId);
31
+ }
32
+ catch (error) {
33
+ logger.warn('Could not reconcile workflow suggestions', { workflowId, error });
34
+ }
35
+ };
36
+ events.on('workflow-saved', ({ workflow }) => {
37
+ const workflowId = workflow.id;
38
+ let pending = pendingSaves.get(workflowId);
39
+ if (!pending) {
40
+ pending = (0, debounce_1.default)(async () => await reconcile(workflowId), SAVE_DEBOUNCE_MS, {
41
+ maxWait: MAX_SAVE_WAIT_MS,
42
+ });
43
+ pendingSaves.set(workflowId, pending);
44
+ }
45
+ void pending();
46
+ });
47
+ events.on('workflow-activated', async ({ workflowId }) => await reconcile(workflowId));
48
+ events.on('workflow-deactivated', async ({ workflowId }) => await reconcile(workflowId));
49
+ events.on('workflow-archived', async ({ workflowId }) => await reconcile(workflowId));
50
+ }
51
+ };
52
+ exports.WorkflowSuggestionEventRelay = WorkflowSuggestionEventRelay;
53
+ exports.WorkflowSuggestionEventRelay = WorkflowSuggestionEventRelay = __decorate([
54
+ (0, di_1.Service)(),
55
+ __metadata("design:paramtypes", [backend_services_1.EventService, workflow_suggestion_service_1.WorkflowSuggestionService, backend_common_1.Logger])
56
+ ], WorkflowSuggestionEventRelay);
57
+ //# sourceMappingURL=workflow-suggestion-event-relay.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-suggestion-event-relay.service.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/workflow-suggestions/workflow-suggestion-event-relay.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,wDAA6C;AAC7C,4DAAqD;AACrD,gCAAkC;AAClC,+DAAuC;AAEvC,+EAA0E;AAE1E,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAGzB,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACxC,YAAY,MAAoB,EAAE,WAAsC,EAAE,MAAc;QACvF,MAAM,YAAY,GAAG,IAAI,GAAG,EAAuC,CAAC;QACpE,MAAM,SAAS,GAAG,KAAK,EAAE,UAAkB,EAAE,EAAE;YAC9C,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;YACvC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YAChC,IAAI,CAAC;gBACJ,MAAM,WAAW,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC;YACjD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAEhB,MAAM,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;YAChF,CAAC;QACF,CAAC,CAAC;QACF,MAAM,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YAC5C,MAAM,UAAU,GAAG,QAAQ,CAAC,EAAE,CAAC;YAC/B,IAAI,OAAO,GAAG,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAC3C,IAAI,CAAC,OAAO,EAAE,CAAC;gBACd,OAAO,GAAG,IAAA,kBAAQ,EAAC,KAAK,IAAI,EAAE,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE;oBAC7E,OAAO,EAAE,gBAAgB;iBACzB,CAAC,CAAC;gBACH,YAAY,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;YACvC,CAAC;YACD,KAAK,OAAO,EAAE,CAAC;QAChB,CAAC,CAAC,CAAC;QACH,MAAM,CAAC,EAAE,CAAC,oBAAoB,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QACvF,MAAM,CAAC,EAAE,CAAC,sBAAsB,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;QACzF,MAAM,CAAC,EAAE,CAAC,mBAAmB,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,MAAM,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IACvF,CAAC;CACD,CAAA;;uCA5BY,4BAA4B;IADxC,IAAA,YAAO,GAAE;qCAEW,+BAAY,EAAe,uDAAyB,EAAU,uBAAM;GAD5E,4BAA4B,CA4BxC"}
@@ -1,12 +1,19 @@
1
1
  import type { WorkflowSuggestionBaseline, WorkflowSuggestionContent, WorkflowSuggestionGraph, WorkflowSuggestionProposalDetail } from '@n8n/api-types';
2
- import { SharedWorkflowRepository, TransactionRunner, UserRepository, WorkflowRepository } from '@n8n/db';
3
- import type { OperationContext, User } from '@n8n/db';
2
+ import { SharedWorkflowRepository, TransactionRunner, UserRepository, WorkflowRepository, WorkflowPublishHistoryRepository } from '@n8n/db';
3
+ import type { OperationContext, User, WorkflowEntity } from '@n8n/db';
4
4
  import { WorkflowPublicationStatusService } from '../../../workflows/publication/workflow-publication-status.service';
5
5
  import { WorkflowFinderService } from '../../../workflows/workflow-finder.service';
6
6
  import { WorkflowSuggestionRepository } from './database/workflow-suggestion.repository';
7
+ import type { WorkflowSuggestion } from './database/workflow-suggestion.entity';
7
8
  export type PreparedWorkflowSuggestion = {
8
9
  baseline: WorkflowSuggestionBaseline;
9
10
  payload: WorkflowSuggestionContent;
11
+ resultKind: WorkflowSuggestion['resultKind'];
12
+ };
13
+ type WorkflowSuggestionTarget = {
14
+ workflow: WorkflowEntity | null;
15
+ projectId: string | undefined;
16
+ latestPublishHistoryEventId: number | null;
10
17
  };
11
18
  export declare class WorkflowSuggestionService {
12
19
  private readonly suggestions;
@@ -16,15 +23,32 @@ export declare class WorkflowSuggestionService {
16
23
  private readonly workflowFinder;
17
24
  private readonly workflowRepository;
18
25
  private readonly sharedWorkflowRepository;
19
- constructor(suggestions: WorkflowSuggestionRepository, users: UserRepository, publication: WorkflowPublicationStatusService, txRunner: TransactionRunner, workflowFinder: WorkflowFinderService, workflowRepository: WorkflowRepository, sharedWorkflowRepository: SharedWorkflowRepository);
20
- private getWorkflowForEditor;
26
+ private readonly workflowPublishHistoryRepository;
27
+ constructor(suggestions: WorkflowSuggestionRepository, users: UserRepository, publication: WorkflowPublicationStatusService, txRunner: TransactionRunner, workflowFinder: WorkflowFinderService, workflowRepository: WorkflowRepository, sharedWorkflowRepository: SharedWorkflowRepository, workflowPublishHistoryRepository: WorkflowPublishHistoryRepository);
28
+ requireEditor(userId: string, workflowId: string, ctx?: OperationContext): Promise<User>;
29
+ private getEditorContext;
21
30
  private isPublished;
22
31
  captureBaseline(workflowId: string, backgroundUserId: string): Promise<WorkflowSuggestionBaseline>;
23
32
  prepareSuggestion(baseline: WorkflowSuggestionBaseline, input: {
24
33
  graph: WorkflowSuggestionGraph;
25
34
  explanation: string;
26
35
  errorContext?: WorkflowSuggestionContent['errorContext'];
36
+ resultKind: 'fix_ready' | 'needs_you';
27
37
  }): Promise<PreparedWorkflowSuggestion>;
28
- createSuggestion(prepared: PreparedWorkflowSuggestion, ctx?: OperationContext): Promise<import("./database/workflow-suggestion.entity").WorkflowSuggestion>;
38
+ private readWorkflowTarget;
39
+ readWorkflowTargetForApply(workflowId: string, ctx: OperationContext): Promise<WorkflowSuggestionTarget>;
40
+ createSuggestion(prepared: PreparedWorkflowSuggestion, ctx?: OperationContext): Promise<WorkflowSuggestion>;
41
+ matchesBaseline(baseline: Pick<WorkflowSuggestionBaseline, 'projectId' | 'expectedBaseline'>, { workflow, projectId, latestPublishHistoryEventId }: WorkflowSuggestionTarget): Promise<boolean>;
42
+ reconcilePending(suggestionId: string, scope: {
43
+ workflowId: string;
44
+ projectId: string;
45
+ }, ctx?: OperationContext): Promise<{
46
+ suggestion: WorkflowSuggestion;
47
+ target: WorkflowSuggestionTarget;
48
+ }>;
49
+ private closeIfOutdated;
50
+ reconcileWorkflow(workflowId: string): Promise<void>;
51
+ private requireProposalAccess;
29
52
  getProposal(viewer: User, projectId: string, workflowId: string, suggestionId: string): Promise<WorkflowSuggestionProposalDetail>;
30
53
  }
54
+ export {};
@@ -28,6 +28,7 @@ const suggestionInputSchema = zod_1.z
28
28
  .object({
29
29
  graph: zod_1.z.object({ nodes: zod_1.z.array(zod_1.z.unknown()), connections: zod_1.z.record(zod_1.z.unknown()) }).strict(),
30
30
  explanation: zod_1.z.string().trim().min(1).max(20_000),
31
+ resultKind: zod_1.z.enum(['fix_ready', 'needs_you']),
31
32
  errorContext: zod_1.z
32
33
  .object({
33
34
  summary: zod_1.z.string().max(4000),
@@ -39,7 +40,7 @@ const suggestionInputSchema = zod_1.z
39
40
  })
40
41
  .strict();
41
42
  let WorkflowSuggestionService = class WorkflowSuggestionService {
42
- constructor(suggestions, users, publication, txRunner, workflowFinder, workflowRepository, sharedWorkflowRepository) {
43
+ constructor(suggestions, users, publication, txRunner, workflowFinder, workflowRepository, sharedWorkflowRepository, workflowPublishHistoryRepository) {
43
44
  this.suggestions = suggestions;
44
45
  this.users = users;
45
46
  this.publication = publication;
@@ -47,19 +48,21 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
47
48
  this.workflowFinder = workflowFinder;
48
49
  this.workflowRepository = workflowRepository;
49
50
  this.sharedWorkflowRepository = sharedWorkflowRepository;
51
+ this.workflowPublishHistoryRepository = workflowPublishHistoryRepository;
50
52
  }
51
- async getWorkflowForEditor(userId, workflowId) {
52
- const user = await this.users.findByIdWithRole(userId);
53
+ async requireEditor(userId, workflowId, ctx = {}) {
54
+ const { user } = await this.getEditorContext(userId, workflowId, ctx);
55
+ return user;
56
+ }
57
+ async getEditorContext(userId, workflowId, ctx = {}) {
58
+ const user = await this.users.findByIdWithRole(userId, ctx);
53
59
  if (!user || user.disabled) {
54
60
  throw new errors_1.ForbiddenError('Workflow edit access is required.');
55
61
  }
56
- const workflow = await this.workflowFinder.findWorkflowForUser(workflowId, user, [
57
- 'workflow:read',
58
- 'workflow:update',
59
- ]);
62
+ const workflow = await this.workflowFinder.findWorkflowForUser(workflowId, user, ['workflow:read', 'workflow:update'], { ctx });
60
63
  if (!workflow)
61
64
  throw new errors_1.ForbiddenError('Workflow edit access is required.');
62
- return workflow;
65
+ return { user, workflow };
63
66
  }
64
67
  async isPublished(workflow, ctx) {
65
68
  if (workflow.isArchived ||
@@ -70,7 +73,7 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
70
73
  return status.status === 'published' && status.liveVersionId === workflow.activeVersionId;
71
74
  }
72
75
  async captureBaseline(workflowId, backgroundUserId) {
73
- const workflow = await this.getWorkflowForEditor(backgroundUserId, workflowId);
76
+ const { workflow } = await this.getEditorContext(backgroundUserId, workflowId);
74
77
  const projectId = workflow.shared.find(({ role }) => role === 'workflow:owner')?.projectId;
75
78
  if (!projectId || !(await this.isPublished(workflow, {}))) {
76
79
  throw new errors_1.ConflictError('The workflow must be fully published without saved changes.');
@@ -83,15 +86,17 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
83
86
  savedVersionId: workflow.versionId,
84
87
  publishedVersionId: workflow.versionId,
85
88
  checksum: await (0, n8n_workflow_1.calculateWorkflowChecksum)(workflow),
89
+ versionCounter: workflow.versionCounter,
90
+ latestPublishHistoryEventId: await this.workflowPublishHistoryRepository.getLatestPublishHistoryEventId(workflowId),
86
91
  },
87
92
  original: structuredClone((0, pick_1.default)(workflow, n8n_workflow_1.WORKFLOW_CHECKSUM_FIELDS)),
88
93
  };
89
94
  }
90
95
  async prepareSuggestion(baseline, input) {
91
- const { explanation, errorContext } = suggestionInputSchema.parse(input);
96
+ const { explanation, errorContext, resultKind } = suggestionInputSchema.parse(input);
92
97
  baseline = structuredClone(baseline);
93
98
  const { workflowId, backgroundUserId, expectedBaseline, original } = baseline;
94
- await this.getWorkflowForEditor(backgroundUserId, workflowId);
99
+ await this.requireEditor(backgroundUserId, workflowId);
95
100
  if ((await (0, n8n_workflow_1.calculateWorkflowChecksum)(original)) !== expectedBaseline.checksum) {
96
101
  throw new errors_1.ConflictError('The captured workflow baseline has changed.');
97
102
  }
@@ -102,6 +107,7 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
102
107
  }
103
108
  return {
104
109
  baseline,
110
+ resultKind,
105
111
  payload: {
106
112
  original,
107
113
  candidate: graph,
@@ -110,35 +116,80 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
110
116
  },
111
117
  };
112
118
  }
119
+ async readWorkflowTarget(workflowId, ctx) {
120
+ const workflow = await this.workflowRepository.findByIdInContext(workflowId, ctx);
121
+ const ownerProject = await this.sharedWorkflowRepository.getWorkflowOwningProject(workflowId, ctx);
122
+ const latestPublishHistoryEventId = await this.workflowPublishHistoryRepository.getLatestPublishHistoryEventId(workflowId, ctx);
123
+ return { workflow, projectId: ownerProject?.id, latestPublishHistoryEventId };
124
+ }
125
+ async readWorkflowTargetForApply(workflowId, ctx) {
126
+ const workflow = await this.workflowRepository.findForContentUpdate(workflowId, ctx);
127
+ const ownerProject = await this.sharedWorkflowRepository.getWorkflowOwningProject(workflowId, ctx);
128
+ const latestPublishHistoryEventId = await this.workflowPublishHistoryRepository.getLatestPublishHistoryEventId(workflowId, ctx);
129
+ return { workflow, projectId: ownerProject?.id, latestPublishHistoryEventId };
130
+ }
113
131
  async createSuggestion(prepared, ctx = {}) {
114
132
  const { baseline, payload } = prepared;
115
- const { workflowId, projectId, expectedBaseline } = baseline;
133
+ const { workflowId } = baseline;
116
134
  return await this.txRunner.run(ctx, async (ctx) => {
117
- const workflow = await this.workflowRepository.findByIdInContext(workflowId, ctx);
118
- const ownerProject = await this.sharedWorkflowRepository.getWorkflowOwningProject(workflowId, ctx);
119
- if (!workflow ||
120
- ownerProject?.id !== projectId ||
121
- workflow.versionId !== expectedBaseline.savedVersionId ||
122
- workflow.activeVersionId !== expectedBaseline.publishedVersionId ||
123
- (await (0, n8n_workflow_1.calculateWorkflowChecksum)(workflow)) !== expectedBaseline.checksum ||
124
- !(await this.isPublished(workflow, ctx))) {
135
+ const target = await this.readWorkflowTarget(workflowId, ctx);
136
+ if (!target.workflow ||
137
+ !(await this.matchesBaseline(baseline, target)) ||
138
+ !(await this.isPublished(target.workflow, ctx))) {
125
139
  throw new errors_1.ConflictError('The workflow no longer matches the published baseline.');
126
140
  }
127
- const suggestion = await this.suggestions.createPending(baseline, payload, ctx);
141
+ const previous = await this.suggestions.getPendingForWorkflow(workflowId, ctx);
142
+ if (previous)
143
+ await this.closeIfOutdated(previous, target, ctx);
144
+ const suggestion = await this.suggestions.createPending(baseline, payload, ctx, prepared.resultKind);
128
145
  await this.suggestions.appendSubmittedActivity(suggestion.id, ctx);
129
146
  return suggestion;
130
147
  });
131
148
  }
132
- async getProposal(viewer, projectId, workflowId, suggestionId) {
133
- const workflow = await this.getWorkflowForEditor(viewer.id, workflowId);
149
+ async matchesBaseline(baseline, { workflow, projectId, latestPublishHistoryEventId }) {
150
+ const expected = baseline.expectedBaseline;
151
+ return (!!workflow &&
152
+ projectId === baseline.projectId &&
153
+ !workflow.isArchived &&
154
+ workflow.versionId === expected.savedVersionId &&
155
+ workflow.activeVersionId === expected.publishedVersionId &&
156
+ expected.latestPublishHistoryEventId === latestPublishHistoryEventId &&
157
+ workflow.versionCounter === expected.versionCounter &&
158
+ (await (0, n8n_workflow_1.calculateWorkflowChecksum)(workflow)) === expected.checksum);
159
+ }
160
+ async reconcilePending(suggestionId, scope, ctx = {}) {
161
+ return await this.txRunner.run(ctx, async (ctx) => {
162
+ const target = await this.readWorkflowTarget(scope.workflowId, ctx);
163
+ const suggestion = await this.suggestions.getSuggestion(suggestionId, scope, ctx);
164
+ return { suggestion: await this.closeIfOutdated(suggestion, target, ctx), target };
165
+ });
166
+ }
167
+ async closeIfOutdated(suggestion, target, ctx) {
168
+ if (suggestion.state !== 'pending' || (await this.matchesBaseline(suggestion, target))) {
169
+ return suggestion;
170
+ }
171
+ await this.suggestions.closePending(suggestion, 'outdated', { author: 'system', actorId: null }, ctx);
172
+ return await this.suggestions.getSuggestion(suggestion.id, suggestion, ctx);
173
+ }
174
+ async reconcileWorkflow(workflowId) {
175
+ const pending = await this.suggestions.getPendingForWorkflow(workflowId);
176
+ if (pending)
177
+ await this.reconcilePending(pending.id, { workflowId, projectId: pending.projectId });
178
+ }
179
+ async requireProposalAccess(viewer, projectId, workflowId) {
180
+ const { workflow } = await this.getEditorContext(viewer.id, workflowId);
134
181
  if (workflow.shared.find(({ role }) => role === 'workflow:owner')?.projectId !== projectId) {
135
182
  throw new errors_1.NotFoundError('Proposal not found.');
136
183
  }
184
+ }
185
+ async getProposal(viewer, projectId, workflowId, suggestionId) {
186
+ await this.requireProposalAccess(viewer, projectId, workflowId);
137
187
  const suggestion = await this.suggestions.getSuggestion(suggestionId, {
138
188
  workflowId,
139
189
  projectId,
140
190
  });
141
191
  const activity = await this.suggestions.getActivity(suggestionId);
192
+ const { appliedVersionId, appliedChecksum, appliedAction, appliedActorId } = suggestion;
142
193
  return {
143
194
  suggestionId,
144
195
  workflowId: suggestion.workflowId,
@@ -147,15 +198,25 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
147
198
  expectedBaseline: suggestion.expectedBaseline,
148
199
  state: suggestion.state,
149
200
  closedReason: suggestion.closedReason,
201
+ resultKind: suggestion.resultKind,
202
+ appliedVersion: appliedVersionId && appliedChecksum && appliedAction && appliedActorId
203
+ ? {
204
+ versionId: appliedVersionId,
205
+ checksum: appliedChecksum,
206
+ action: appliedAction,
207
+ actorId: appliedActorId,
208
+ }
209
+ : null,
150
210
  author: 'assistant',
151
211
  payload: {
152
212
  ...suggestion.payload,
153
213
  proposed: { ...suggestion.payload.original, ...suggestion.payload.candidate },
154
214
  },
155
- activity: activity.map(({ id, action, author, createdAt }) => ({
215
+ activity: activity.map(({ id, action, author, actorId, createdAt }) => ({
156
216
  id,
157
217
  action,
158
218
  author,
219
+ actorId: actorId ?? null,
159
220
  createdAt: createdAt.toISOString(),
160
221
  })),
161
222
  };
@@ -164,6 +225,6 @@ let WorkflowSuggestionService = class WorkflowSuggestionService {
164
225
  exports.WorkflowSuggestionService = WorkflowSuggestionService;
165
226
  exports.WorkflowSuggestionService = WorkflowSuggestionService = __decorate([
166
227
  (0, di_1.Service)(),
167
- __metadata("design:paramtypes", [workflow_suggestion_repository_1.WorkflowSuggestionRepository, db_1.UserRepository, workflow_publication_status_service_1.WorkflowPublicationStatusService, db_1.TransactionRunner, workflow_finder_service_1.WorkflowFinderService, db_1.WorkflowRepository, db_1.SharedWorkflowRepository])
228
+ __metadata("design:paramtypes", [workflow_suggestion_repository_1.WorkflowSuggestionRepository, db_1.UserRepository, workflow_publication_status_service_1.WorkflowPublicationStatusService, db_1.TransactionRunner, workflow_finder_service_1.WorkflowFinderService, db_1.WorkflowRepository, db_1.SharedWorkflowRepository, db_1.WorkflowPublishHistoryRepository])
168
229
  ], WorkflowSuggestionService);
169
230
  //# sourceMappingURL=workflow-suggestion.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-suggestion.service.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,gCAKiB;AAEjB,gCAAkC;AAClC,wCAA2E;AAC3E,6DAAqC;AACrC,uDAA+B;AAC/B,+CAAmF;AACnF,6BAAwB;AAExB,yDAA+D;AAC/D,qHAA+G;AAC/G,iFAA4E;AAE5E,8FAAyF;AAEzF,MAAM,qBAAqB,GAAG,OAAC;KAC7B,MAAM,CAAC;IACP,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7F,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACjD,YAAY,EAAE,OAAC;SACb,MAAM,CAAC;QACP,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC;QAC7B,iBAAiB,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;KACjD,CAAC;SACD,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,IAAI,CAAC;CACf,CAAC;KACD,MAAM,EAAE,CAAC;AAQJ,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IACrC,YACkB,WAAyC,EACzC,KAAqB,EACrB,WAA6C,EAC7C,QAA2B,EAC3B,cAAqC,EACrC,kBAAsC,EACtC,wBAAkD;2BANlD,WAAW;qBACX,KAAK;2BACL,WAAW;wBACX,QAAQ;8BACR,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AAO,CAAC,SAAS,EAAE;aAC7E;YACD,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;gBAC9D,EAAE;gBACF,MAAM;gBACN,MAAM;gBACN,SAAS,EAAE,SAAS,CAAC,WAAW,EAAE;aAClC,CAAC,CAAC;SACH,CAAC;IACH,CAAC;CACD,CAAA;;oCAtJY,yBAAyB;IADrC,IAAA,YAAO,GAAE;qCAGsB,6DAA4B,EAClC,mBAAc,EACR,sEAAgC,EACnC,sBAAiB,EACX,+CAAqB,EACjB,uBAAkB,EACZ,6BAAwB;GARxD,yBAAyB,CAsJrC"}
1
+ {"version":3,"file":"workflow-suggestion.service.js","sourceRoot":"","sources":["../../../../src/modules/instance-ai/workflow-suggestions/workflow-suggestion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAMA,gCAMiB;AAEjB,gCAAkC;AAClC,wCAA2E;AAC3E,6DAAqC;AACrC,uDAA+B;AAC/B,+CAAmF;AACnF,6BAAwB;AAExB,yDAA+D;AAC/D,qHAA+G;AAC/G,iFAA4E;AAE5E,8FAAyF;AAGzF,MAAM,qBAAqB,GAAG,OAAC;KAC7B,MAAM,CAAC;IACP,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,EAAE,WAAW,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;IAC7F,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;IACjD,UAAU,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IAC9C,YAAY,EAA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,EAAE,UAAU,CAAC,gBAAgB;YAC7C,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;YAC7C,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,YAAY,EAAE,UAAU,CAAC,YAAY;YACrC,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,cAAc,EACb,gBAAgB,IAAI,eAAe,IAAI,aAAa,IAAI,cAAc;gBACrE,CAAC,CAAC;oBACA,SAAS,EAAE,gBAAgB;oBAC3B,QAAQ,EAAE,eAAe;oBACzB,MAAM,EAAE,aAAa;oBACrB,OAAO,EAAE,cAAc;iBACvB;gBACF,CAAC,CAAC,IAAI;YACR,MAAM,EAAE,WAAW;YACnB,OAAO,EAAE;gBACR,GAAG,UAAU,CAAC,OAAO;gBACrB,QAAQ,EAAE,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,EAAE;aAC7E;YACD,QAAQ,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC;gBACvE,EAAE;gBACF,MAAM;gBACN,MAAM;gBACN,OAAO,EAAE,OAAO,IAAI,IAAI;gBACxB,SAAS,EAAE,SAAS,CAAC,WAAW,EAAE;aAClC,CAAC,CAAC;SACH,CAAC;IACH,CAAC;CACD,CAAA;;oCAnQY,yBAAyB;IADrC,IAAA,YAAO,GAAE;qCAGsB,6DAA4B,EAClC,mBAAc,EACR,sEAAgC,EACnC,sBAAiB,EACX,+CAAqB,EACjB,uBAAkB,EACZ,6BAAwB,EAChB,qCAAgC;GATxE,yBAAyB,CAmQrC"}
@@ -1,6 +1,6 @@
1
1
  import { Logger } from '@n8n/backend-common';
2
2
  import { SettingsRepository } from '@n8n/db';
3
- import { InsightsConfig } from '../../modules/insights/insights.config';
3
+ import { InsightsConfig } from '@n8n/backend-module-insights/config';
4
4
  export declare class InstanceReportingSettingsService {
5
5
  private readonly settingsRepository;
6
6
  private readonly insightsConfig;
@@ -15,7 +15,7 @@ const db_1 = require("@n8n/db");
15
15
  const di_1 = require("@n8n/di");
16
16
  const node_crypto_1 = require("node:crypto");
17
17
  const n8n_workflow_1 = require("n8n-workflow");
18
- const insights_config_1 = require("../../modules/insights/insights.config");
18
+ const config_1 = require("@n8n/backend-module-insights/config");
19
19
  const instance_reporting_constants_1 = require("./instance-reporting.constants");
20
20
  const REPORT_TIME_PATTERN = /^([01]\d|2[0-3]):([0-5]\d)$/;
21
21
  const MINUTES_PER_DAY = 24 * 60;
@@ -83,7 +83,7 @@ let InstanceReportingSettingsService = class InstanceReportingSettingsService {
83
83
  exports.InstanceReportingSettingsService = InstanceReportingSettingsService;
84
84
  exports.InstanceReportingSettingsService = InstanceReportingSettingsService = __decorate([
85
85
  (0, di_1.Service)(),
86
- __metadata("design:paramtypes", [db_1.SettingsRepository, insights_config_1.InsightsConfig, backend_common_1.Logger])
86
+ __metadata("design:paramtypes", [db_1.SettingsRepository, config_1.InsightsConfig, backend_common_1.Logger])
87
87
  ], InstanceReportingSettingsService);
88
88
  function toMinutes(reportTime) {
89
89
  const [hour, minute] = reportTime.split(':');
@@ -1 +1 @@
1
- {"version":3,"file":"instance-reporting-settings.service.js","sourceRoot":"","sources":["../../../src/modules/instance-reporting.ee/instance-reporting-settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,gCAA6C;AAC7C,gCAAkC;AAClC,6CAAwC;AACxC,+CAAyC;AAEzC,wEAAoE;AACpE,iFAA0F;AAG1F,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAE1D,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,CAAC;AAWhC,MAAM,uBAAuB,GAAG,CAAC,GAAG,EAAE,CAAC;AAkBhC,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAC5C,YACkB,kBAAsC,EACtC,cAA8B,EAC9B,MAAc;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,CAAC,KAAK,EAAE;YACnF,aAAa,EAAE,EAAE;SACjB,CAAC,CAAC;QACH,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;QAE9B,OAAO,OAAO,UAAU,KAAK,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC;YAC5E,CAAC,CAAC,UAAU;YACZ,CAAC,CAAC,SAAS,CAAC;IACd,CAAC;CACD,CAAA;;2CA3HY,gCAAgC;IAD5C,IAAA,YAAO,GAAE;qCAG6B,uBAAkB,EACtB,gCAAc,EACtB,uBAAM;GAJpB,gCAAgC,CA2H5C;AAGD,SAAS,SAAS,CAAC,UAAkB;IACpC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAE7C,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AAGD,SAAS,YAAY,CAAC,OAAe;IACpC,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC;AAChE,CAAC;AAED,SAAS,GAAG,CAAC,KAAa;IACzB,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACvC,CAAC"}
1
+ {"version":3,"file":"instance-reporting-settings.service.js","sourceRoot":"","sources":["../../../src/modules/instance-reporting.ee/instance-reporting-settings.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,wDAA6C;AAC7C,gCAA6C;AAC7C,gCAAkC;AAClC,6CAAwC;AACxC,+CAAyC;AAEzC,gEAAqE;AACrE,iFAA0F;AAG1F,MAAM,mBAAmB,GAAG,6BAA6B,CAAC;AAE1D,MAAM,eAAe,GAAG,EAAE,GAAG,EAAE,CAAC;AAWhC,MAA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