@solidxai/core 0.1.19-beta.2 → 0.1.19-beta.5

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 (533) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/dist/commands/run-tests.command.d.ts +3 -3
  3. package/dist/commands/run-tests.command.d.ts.map +1 -1
  4. package/dist/commands/run-tests.command.js +5 -5
  5. package/dist/commands/run-tests.command.js.map +1 -1
  6. package/dist/controllers/agent-embed.controller.d.ts +6 -0
  7. package/dist/controllers/agent-embed.controller.d.ts.map +1 -0
  8. package/dist/controllers/agent-embed.controller.js +69 -0
  9. package/dist/controllers/agent-embed.controller.js.map +1 -0
  10. package/dist/controllers/agent-event.controller.d.ts +2 -0
  11. package/dist/controllers/agent-event.controller.d.ts.map +1 -1
  12. package/dist/controllers/agent-event.controller.js +16 -0
  13. package/dist/controllers/agent-event.controller.js.map +1 -1
  14. package/dist/controllers/agent-human-request.controller.d.ts +24 -0
  15. package/dist/controllers/agent-human-request.controller.d.ts.map +1 -0
  16. package/dist/controllers/agent-human-request.controller.js +175 -0
  17. package/dist/controllers/agent-human-request.controller.js.map +1 -0
  18. package/dist/controllers/agent-job.controller.d.ts +24 -0
  19. package/dist/controllers/agent-job.controller.d.ts.map +1 -0
  20. package/dist/controllers/agent-job.controller.js +175 -0
  21. package/dist/controllers/agent-job.controller.js.map +1 -0
  22. package/dist/controllers/agent-process.controller.d.ts +33 -0
  23. package/dist/controllers/agent-process.controller.d.ts.map +1 -0
  24. package/dist/controllers/agent-process.controller.js +219 -0
  25. package/dist/controllers/agent-process.controller.js.map +1 -0
  26. package/dist/controllers/agent-registry.controller.d.ts +24 -0
  27. package/dist/controllers/agent-registry.controller.d.ts.map +1 -0
  28. package/dist/controllers/agent-registry.controller.js +175 -0
  29. package/dist/controllers/agent-registry.controller.js.map +1 -0
  30. package/dist/controllers/agent-role.controller.d.ts +24 -0
  31. package/dist/controllers/agent-role.controller.d.ts.map +1 -0
  32. package/dist/controllers/agent-role.controller.js +175 -0
  33. package/dist/controllers/agent-role.controller.js.map +1 -0
  34. package/dist/controllers/agent-secret.controller.d.ts +24 -0
  35. package/dist/controllers/agent-secret.controller.d.ts.map +1 -0
  36. package/dist/controllers/agent-secret.controller.js +175 -0
  37. package/dist/controllers/agent-secret.controller.js.map +1 -0
  38. package/dist/controllers/agent-session-checkpoint.controller.d.ts +24 -0
  39. package/dist/controllers/agent-session-checkpoint.controller.d.ts.map +1 -0
  40. package/dist/controllers/agent-session-checkpoint.controller.js +175 -0
  41. package/dist/controllers/agent-session-checkpoint.controller.js.map +1 -0
  42. package/dist/controllers/agent-session.controller.d.ts +9 -1
  43. package/dist/controllers/agent-session.controller.d.ts.map +1 -1
  44. package/dist/controllers/agent-session.controller.js +46 -18
  45. package/dist/controllers/agent-session.controller.js.map +1 -1
  46. package/dist/controllers/agent-skill-registry.controller.d.ts +24 -0
  47. package/dist/controllers/agent-skill-registry.controller.d.ts.map +1 -0
  48. package/dist/controllers/agent-skill-registry.controller.js +175 -0
  49. package/dist/controllers/agent-skill-registry.controller.js.map +1 -0
  50. package/dist/controllers/agent-skill.controller.d.ts +24 -0
  51. package/dist/controllers/agent-skill.controller.d.ts.map +1 -0
  52. package/dist/controllers/agent-skill.controller.js +175 -0
  53. package/dist/controllers/agent-skill.controller.js.map +1 -0
  54. package/dist/controllers/agent-tool-registry.controller.d.ts +24 -0
  55. package/dist/controllers/agent-tool-registry.controller.d.ts.map +1 -0
  56. package/dist/controllers/agent-tool-registry.controller.js +175 -0
  57. package/dist/controllers/agent-tool-registry.controller.js.map +1 -0
  58. package/dist/controllers/agent-tool.controller.d.ts +24 -0
  59. package/dist/controllers/agent-tool.controller.d.ts.map +1 -0
  60. package/dist/controllers/agent-tool.controller.js +175 -0
  61. package/dist/controllers/agent-tool.controller.js.map +1 -0
  62. package/dist/controllers/authentication.controller.d.ts +1 -0
  63. package/dist/controllers/authentication.controller.d.ts.map +1 -1
  64. package/dist/controllers/authentication.controller.js +0 -1
  65. package/dist/controllers/authentication.controller.js.map +1 -1
  66. package/dist/controllers/model-metadata.controller.d.ts +19 -2
  67. package/dist/controllers/model-metadata.controller.d.ts.map +1 -1
  68. package/dist/controllers/model-metadata.controller.js +32 -10
  69. package/dist/controllers/model-metadata.controller.js.map +1 -1
  70. package/dist/controllers/secret.controller.d.ts +24 -0
  71. package/dist/controllers/secret.controller.d.ts.map +1 -0
  72. package/dist/controllers/{workflow-secret.controller.js → secret.controller.js} +30 -30
  73. package/dist/controllers/secret.controller.js.map +1 -0
  74. package/dist/dtos/create-agent-event.dto.d.ts +5 -2
  75. package/dist/dtos/create-agent-event.dto.d.ts.map +1 -1
  76. package/dist/dtos/create-agent-event.dto.js +22 -4
  77. package/dist/dtos/create-agent-event.dto.js.map +1 -1
  78. package/dist/dtos/create-agent-human-request.dto.d.ts +18 -0
  79. package/dist/dtos/create-agent-human-request.dto.d.ts.map +1 -0
  80. package/dist/dtos/create-agent-human-request.dto.js +117 -0
  81. package/dist/dtos/create-agent-human-request.dto.js.map +1 -0
  82. package/dist/dtos/create-agent-job.dto.d.ts +27 -0
  83. package/dist/dtos/create-agent-job.dto.d.ts.map +1 -0
  84. package/dist/dtos/create-agent-job.dto.js +171 -0
  85. package/dist/dtos/create-agent-job.dto.js.map +1 -0
  86. package/dist/dtos/create-agent-process.dto.d.ts +22 -0
  87. package/dist/dtos/create-agent-process.dto.d.ts.map +1 -0
  88. package/dist/dtos/create-agent-process.dto.js +140 -0
  89. package/dist/dtos/create-agent-process.dto.js.map +1 -0
  90. package/dist/dtos/create-agent-registry.dto.d.ts +44 -0
  91. package/dist/dtos/create-agent-registry.dto.d.ts.map +1 -0
  92. package/dist/dtos/create-agent-registry.dto.js +254 -0
  93. package/dist/dtos/create-agent-registry.dto.js.map +1 -0
  94. package/dist/dtos/create-agent-role.dto.d.ts +7 -0
  95. package/dist/dtos/create-agent-role.dto.d.ts.map +1 -0
  96. package/dist/dtos/create-agent-role.dto.js +48 -0
  97. package/dist/dtos/create-agent-role.dto.js.map +1 -0
  98. package/dist/dtos/create-agent-secret.dto.d.ts +8 -0
  99. package/dist/dtos/create-agent-secret.dto.d.ts.map +1 -0
  100. package/dist/dtos/create-agent-secret.dto.js +54 -0
  101. package/dist/dtos/create-agent-secret.dto.js.map +1 -0
  102. package/dist/dtos/create-agent-session-checkpoint.dto.d.ts +11 -0
  103. package/dist/dtos/create-agent-session-checkpoint.dto.d.ts.map +1 -0
  104. package/dist/dtos/create-agent-session-checkpoint.dto.js +75 -0
  105. package/dist/dtos/create-agent-session-checkpoint.dto.js.map +1 -0
  106. package/dist/dtos/create-agent-session.dto.d.ts +31 -7
  107. package/dist/dtos/create-agent-session.dto.d.ts.map +1 -1
  108. package/dist/dtos/create-agent-session.dto.js +174 -30
  109. package/dist/dtos/create-agent-session.dto.js.map +1 -1
  110. package/dist/dtos/create-agent-skill-registry.dto.d.ts +13 -0
  111. package/dist/dtos/create-agent-skill-registry.dto.d.ts.map +1 -0
  112. package/dist/dtos/create-agent-skill-registry.dto.js +85 -0
  113. package/dist/dtos/create-agent-skill-registry.dto.js.map +1 -0
  114. package/dist/dtos/create-agent-skill.dto.d.ts +8 -0
  115. package/dist/dtos/create-agent-skill.dto.d.ts.map +1 -0
  116. package/dist/dtos/create-agent-skill.dto.js +57 -0
  117. package/dist/dtos/create-agent-skill.dto.js.map +1 -0
  118. package/dist/dtos/create-agent-tool-registry.dto.d.ts +16 -0
  119. package/dist/dtos/create-agent-tool-registry.dto.d.ts.map +1 -0
  120. package/dist/dtos/create-agent-tool-registry.dto.js +103 -0
  121. package/dist/dtos/create-agent-tool-registry.dto.js.map +1 -0
  122. package/dist/dtos/create-agent-tool.dto.d.ts +8 -0
  123. package/dist/dtos/create-agent-tool.dto.d.ts.map +1 -0
  124. package/dist/dtos/create-agent-tool.dto.js +57 -0
  125. package/dist/dtos/create-agent-tool.dto.js.map +1 -0
  126. package/dist/dtos/create-media.dto.d.ts.map +1 -1
  127. package/dist/dtos/create-media.dto.js.map +1 -1
  128. package/dist/dtos/{create-workflow-secret.dto.d.ts → create-secret.dto.d.ts} +3 -2
  129. package/dist/dtos/create-secret.dto.d.ts.map +1 -0
  130. package/dist/dtos/{create-workflow-secret.dto.js → create-secret.dto.js} +20 -13
  131. package/dist/dtos/create-secret.dto.js.map +1 -0
  132. package/dist/dtos/update-agent-event.dto.d.ts +5 -2
  133. package/dist/dtos/update-agent-event.dto.d.ts.map +1 -1
  134. package/dist/dtos/update-agent-event.dto.js +21 -3
  135. package/dist/dtos/update-agent-event.dto.js.map +1 -1
  136. package/dist/dtos/update-agent-human-request.dto.d.ts +19 -0
  137. package/dist/dtos/update-agent-human-request.dto.d.ts.map +1 -0
  138. package/dist/dtos/update-agent-human-request.dto.js +123 -0
  139. package/dist/dtos/update-agent-human-request.dto.js.map +1 -0
  140. package/dist/dtos/update-agent-job.dto.d.ts +28 -0
  141. package/dist/dtos/update-agent-job.dto.d.ts.map +1 -0
  142. package/dist/dtos/update-agent-job.dto.js +173 -0
  143. package/dist/dtos/update-agent-job.dto.js.map +1 -0
  144. package/dist/dtos/update-agent-process.dto.d.ts +23 -0
  145. package/dist/dtos/update-agent-process.dto.d.ts.map +1 -0
  146. package/dist/dtos/update-agent-process.dto.js +149 -0
  147. package/dist/dtos/update-agent-process.dto.js.map +1 -0
  148. package/dist/dtos/update-agent-registry.dto.d.ts +45 -0
  149. package/dist/dtos/update-agent-registry.dto.d.ts.map +1 -0
  150. package/dist/dtos/update-agent-registry.dto.js +263 -0
  151. package/dist/dtos/update-agent-registry.dto.js.map +1 -0
  152. package/dist/dtos/update-agent-role.dto.d.ts +8 -0
  153. package/dist/dtos/update-agent-role.dto.d.ts.map +1 -0
  154. package/dist/dtos/update-agent-role.dto.js +51 -0
  155. package/dist/dtos/update-agent-role.dto.js.map +1 -0
  156. package/dist/dtos/update-agent-secret.dto.d.ts +9 -0
  157. package/dist/dtos/update-agent-secret.dto.d.ts.map +1 -0
  158. package/dist/dtos/update-agent-secret.dto.js +57 -0
  159. package/dist/dtos/update-agent-secret.dto.js.map +1 -0
  160. package/dist/dtos/update-agent-session-checkpoint.dto.d.ts +12 -0
  161. package/dist/dtos/update-agent-session-checkpoint.dto.d.ts.map +1 -0
  162. package/dist/dtos/update-agent-session-checkpoint.dto.js +80 -0
  163. package/dist/dtos/update-agent-session-checkpoint.dto.js.map +1 -0
  164. package/dist/dtos/update-agent-session.dto.d.ts +31 -6
  165. package/dist/dtos/update-agent-session.dto.d.ts.map +1 -1
  166. package/dist/dtos/update-agent-session.dto.js +160 -11
  167. package/dist/dtos/update-agent-session.dto.js.map +1 -1
  168. package/dist/dtos/update-agent-skill-registry.dto.d.ts +14 -0
  169. package/dist/dtos/update-agent-skill-registry.dto.d.ts.map +1 -0
  170. package/dist/dtos/update-agent-skill-registry.dto.js +90 -0
  171. package/dist/dtos/update-agent-skill-registry.dto.js.map +1 -0
  172. package/dist/dtos/update-agent-skill.dto.d.ts +9 -0
  173. package/dist/dtos/update-agent-skill.dto.d.ts.map +1 -0
  174. package/dist/dtos/update-agent-skill.dto.js +58 -0
  175. package/dist/dtos/update-agent-skill.dto.js.map +1 -0
  176. package/dist/dtos/update-agent-tool-registry.dto.d.ts +17 -0
  177. package/dist/dtos/update-agent-tool-registry.dto.d.ts.map +1 -0
  178. package/dist/dtos/update-agent-tool-registry.dto.js +109 -0
  179. package/dist/dtos/update-agent-tool-registry.dto.js.map +1 -0
  180. package/dist/dtos/update-agent-tool.dto.d.ts +9 -0
  181. package/dist/dtos/update-agent-tool.dto.d.ts.map +1 -0
  182. package/dist/dtos/update-agent-tool.dto.js +58 -0
  183. package/dist/dtos/update-agent-tool.dto.js.map +1 -0
  184. package/dist/dtos/update-media.dto.d.ts.map +1 -1
  185. package/dist/dtos/update-media.dto.js.map +1 -1
  186. package/dist/dtos/{update-workflow-secret.dto.d.ts → update-secret.dto.d.ts} +3 -2
  187. package/dist/dtos/update-secret.dto.d.ts.map +1 -0
  188. package/dist/dtos/{update-workflow-secret.dto.js → update-secret.dto.js} +20 -14
  189. package/dist/dtos/update-secret.dto.js.map +1 -0
  190. package/dist/entities/agent-event.entity.d.ts +6 -3
  191. package/dist/entities/agent-event.entity.d.ts.map +1 -1
  192. package/dist/entities/agent-event.entity.js +21 -13
  193. package/dist/entities/agent-event.entity.js.map +1 -1
  194. package/dist/entities/agent-human-request.entity.d.ts +19 -0
  195. package/dist/entities/agent-human-request.entity.d.ts.map +1 -0
  196. package/dist/entities/agent-human-request.entity.js +85 -0
  197. package/dist/entities/agent-human-request.entity.js.map +1 -0
  198. package/dist/entities/agent-job.entity.d.ts +27 -0
  199. package/dist/entities/agent-job.entity.d.ts.map +1 -0
  200. package/dist/entities/agent-job.entity.js +117 -0
  201. package/dist/entities/agent-job.entity.js.map +1 -0
  202. package/dist/entities/agent-process.entity.d.ts +23 -0
  203. package/dist/entities/agent-process.entity.d.ts.map +1 -0
  204. package/dist/entities/agent-process.entity.js +109 -0
  205. package/dist/entities/agent-process.entity.js.map +1 -0
  206. package/dist/entities/agent-registry.entity.d.ts +31 -0
  207. package/dist/entities/agent-registry.entity.d.ts.map +1 -0
  208. package/dist/entities/agent-registry.entity.js +122 -0
  209. package/dist/entities/agent-registry.entity.js.map +1 -0
  210. package/dist/entities/agent-role.entity.d.ts +9 -0
  211. package/dist/entities/agent-role.entity.d.ts.map +1 -0
  212. package/dist/entities/agent-role.entity.js +42 -0
  213. package/dist/entities/agent-role.entity.js.map +1 -0
  214. package/dist/entities/agent-secret.entity.d.ts +10 -0
  215. package/dist/entities/agent-secret.entity.d.ts.map +1 -0
  216. package/dist/entities/agent-secret.entity.js +46 -0
  217. package/dist/entities/agent-secret.entity.js.map +1 -0
  218. package/dist/entities/agent-session-checkpoint.entity.d.ts +12 -0
  219. package/dist/entities/agent-session-checkpoint.entity.d.ts.map +1 -0
  220. package/dist/entities/agent-session-checkpoint.entity.js +59 -0
  221. package/dist/entities/agent-session-checkpoint.entity.js.map +1 -0
  222. package/dist/entities/agent-session.entity.d.ts +26 -5
  223. package/dist/entities/agent-session.entity.d.ts.map +1 -1
  224. package/dist/entities/agent-session.entity.js +97 -23
  225. package/dist/entities/agent-session.entity.js.map +1 -1
  226. package/dist/entities/agent-skill-registry.entity.d.ts +12 -0
  227. package/dist/entities/agent-skill-registry.entity.d.ts.map +1 -0
  228. package/dist/entities/agent-skill-registry.entity.js +60 -0
  229. package/dist/entities/agent-skill-registry.entity.js.map +1 -0
  230. package/dist/entities/agent-skill.entity.d.ts +10 -0
  231. package/dist/entities/agent-skill.entity.d.ts.map +1 -0
  232. package/dist/entities/agent-skill.entity.js +50 -0
  233. package/dist/entities/agent-skill.entity.js.map +1 -0
  234. package/dist/entities/agent-tool-registry.entity.d.ts +15 -0
  235. package/dist/entities/agent-tool-registry.entity.d.ts.map +1 -0
  236. package/dist/entities/agent-tool-registry.entity.js +73 -0
  237. package/dist/entities/agent-tool-registry.entity.js.map +1 -0
  238. package/dist/entities/agent-tool.entity.d.ts +10 -0
  239. package/dist/entities/agent-tool.entity.d.ts.map +1 -0
  240. package/dist/entities/agent-tool.entity.js +50 -0
  241. package/dist/entities/agent-tool.entity.js.map +1 -0
  242. package/dist/entities/{workflow-secret.entity.d.ts → secret.entity.d.ts} +3 -2
  243. package/dist/entities/secret.entity.d.ts.map +1 -0
  244. package/dist/entities/{workflow-secret.entity.js → secret.entity.js} +21 -16
  245. package/dist/entities/secret.entity.js.map +1 -0
  246. package/dist/helpers/agent-required-inputs.d.ts +2 -0
  247. package/dist/helpers/agent-required-inputs.d.ts.map +1 -0
  248. package/dist/helpers/agent-required-inputs.js +36 -0
  249. package/dist/helpers/agent-required-inputs.js.map +1 -0
  250. package/dist/helpers/field-crud-managers/PasswordFieldCrudManager.js +1 -1
  251. package/dist/helpers/field-crud-managers/PasswordFieldCrudManager.js.map +1 -1
  252. package/dist/index.d.ts +78 -7
  253. package/dist/index.d.ts.map +1 -1
  254. package/dist/index.js +78 -7
  255. package/dist/index.js.map +1 -1
  256. package/dist/jobs/database/test-run-queue-subscriber-database.service.d.ts +3 -3
  257. package/dist/jobs/database/test-run-queue-subscriber-database.service.d.ts.map +1 -1
  258. package/dist/jobs/database/test-run-queue-subscriber-database.service.js +5 -5
  259. package/dist/jobs/database/test-run-queue-subscriber-database.service.js.map +1 -1
  260. package/dist/repository/agent-human-request.repository.d.ts +12 -0
  261. package/dist/repository/agent-human-request.repository.d.ts.map +1 -0
  262. package/dist/repository/agent-human-request.repository.js +39 -0
  263. package/dist/repository/agent-human-request.repository.js.map +1 -0
  264. package/dist/repository/{workflow-secret.repository.d.ts → agent-job.repository.d.ts} +3 -3
  265. package/dist/repository/agent-job.repository.d.ts.map +1 -0
  266. package/dist/repository/{workflow-secret.repository.js → agent-job.repository.js} +8 -8
  267. package/dist/repository/agent-job.repository.js.map +1 -0
  268. package/dist/repository/agent-process.repository.d.ts +12 -0
  269. package/dist/repository/agent-process.repository.d.ts.map +1 -0
  270. package/dist/repository/agent-process.repository.js +39 -0
  271. package/dist/repository/agent-process.repository.js.map +1 -0
  272. package/dist/repository/agent-registry.repository.d.ts +13 -0
  273. package/dist/repository/agent-registry.repository.d.ts.map +1 -0
  274. package/dist/repository/agent-registry.repository.js +44 -0
  275. package/dist/repository/agent-registry.repository.js.map +1 -0
  276. package/dist/repository/agent-role.repository.d.ts +12 -0
  277. package/dist/repository/agent-role.repository.d.ts.map +1 -0
  278. package/dist/repository/agent-role.repository.js +39 -0
  279. package/dist/repository/agent-role.repository.js.map +1 -0
  280. package/dist/repository/agent-secret.repository.d.ts +12 -0
  281. package/dist/repository/agent-secret.repository.d.ts.map +1 -0
  282. package/dist/repository/agent-secret.repository.js +39 -0
  283. package/dist/repository/agent-secret.repository.js.map +1 -0
  284. package/dist/repository/agent-session-checkpoint.repository.d.ts +12 -0
  285. package/dist/repository/agent-session-checkpoint.repository.d.ts.map +1 -0
  286. package/dist/repository/agent-session-checkpoint.repository.js +39 -0
  287. package/dist/repository/agent-session-checkpoint.repository.js.map +1 -0
  288. package/dist/repository/agent-session.repository.d.ts +3 -3
  289. package/dist/repository/agent-session.repository.d.ts.map +1 -1
  290. package/dist/repository/agent-session.repository.js +8 -3
  291. package/dist/repository/agent-session.repository.js.map +1 -1
  292. package/dist/repository/agent-skill-registry.repository.d.ts +12 -0
  293. package/dist/repository/agent-skill-registry.repository.d.ts.map +1 -0
  294. package/dist/repository/agent-skill-registry.repository.js +39 -0
  295. package/dist/repository/agent-skill-registry.repository.js.map +1 -0
  296. package/dist/repository/agent-skill.repository.d.ts +12 -0
  297. package/dist/repository/agent-skill.repository.d.ts.map +1 -0
  298. package/dist/repository/agent-skill.repository.js +39 -0
  299. package/dist/repository/agent-skill.repository.js.map +1 -0
  300. package/dist/repository/agent-tool-registry.repository.d.ts +12 -0
  301. package/dist/repository/agent-tool-registry.repository.d.ts.map +1 -0
  302. package/dist/repository/agent-tool-registry.repository.js +39 -0
  303. package/dist/repository/agent-tool-registry.repository.js.map +1 -0
  304. package/dist/repository/agent-tool.repository.d.ts +12 -0
  305. package/dist/repository/agent-tool.repository.d.ts.map +1 -0
  306. package/dist/repository/agent-tool.repository.js +39 -0
  307. package/dist/repository/agent-tool.repository.js.map +1 -0
  308. package/dist/repository/secret.repository.d.ts +12 -0
  309. package/dist/repository/secret.repository.d.ts.map +1 -0
  310. package/dist/repository/secret.repository.js +39 -0
  311. package/dist/repository/secret.repository.js.map +1 -0
  312. package/dist/resources/agent-embed/solid-agent-embed.js +242 -0
  313. package/dist/seeders/seed-data/solid-core-metadata.json +14270 -6971
  314. package/dist/services/agent-config-version.service.d.ts +32 -0
  315. package/dist/services/agent-config-version.service.d.ts.map +1 -0
  316. package/dist/services/agent-config-version.service.js +126 -0
  317. package/dist/services/agent-config-version.service.js.map +1 -0
  318. package/dist/services/agent-event.service.d.ts +3 -0
  319. package/dist/services/agent-event.service.d.ts.map +1 -1
  320. package/dist/services/agent-event.service.js +23 -1
  321. package/dist/services/agent-event.service.js.map +1 -1
  322. package/dist/services/agent-hub-process-manager.service.d.ts +22 -0
  323. package/dist/services/agent-hub-process-manager.service.d.ts.map +1 -0
  324. package/dist/services/agent-hub-process-manager.service.js +86 -0
  325. package/dist/services/agent-hub-process-manager.service.js.map +1 -0
  326. package/dist/services/agent-human-request.service.d.ts +12 -0
  327. package/dist/services/agent-human-request.service.d.ts.map +1 -0
  328. package/dist/services/agent-human-request.service.js +38 -0
  329. package/dist/services/agent-human-request.service.js.map +1 -0
  330. package/dist/services/agent-job.service.d.ts +12 -0
  331. package/dist/services/agent-job.service.d.ts.map +1 -0
  332. package/dist/services/agent-job.service.js +38 -0
  333. package/dist/services/agent-job.service.js.map +1 -0
  334. package/dist/services/agent-process.service.d.ts +22 -0
  335. package/dist/services/agent-process.service.d.ts.map +1 -0
  336. package/dist/services/agent-process.service.js +58 -0
  337. package/dist/services/agent-process.service.js.map +1 -0
  338. package/dist/services/agent-registry.service.d.ts +15 -0
  339. package/dist/services/agent-registry.service.d.ts.map +1 -0
  340. package/dist/services/agent-registry.service.js +54 -0
  341. package/dist/services/agent-registry.service.js.map +1 -0
  342. package/dist/services/agent-role.service.d.ts +12 -0
  343. package/dist/services/agent-role.service.d.ts.map +1 -0
  344. package/dist/services/agent-role.service.js +39 -0
  345. package/dist/services/agent-role.service.js.map +1 -0
  346. package/dist/services/agent-secret.service.d.ts +12 -0
  347. package/dist/services/agent-secret.service.d.ts.map +1 -0
  348. package/dist/services/agent-secret.service.js +39 -0
  349. package/dist/services/agent-secret.service.js.map +1 -0
  350. package/dist/services/agent-session-checkpoint.service.d.ts +12 -0
  351. package/dist/services/agent-session-checkpoint.service.d.ts.map +1 -0
  352. package/dist/services/agent-session-checkpoint.service.js +38 -0
  353. package/dist/services/agent-session-checkpoint.service.js.map +1 -0
  354. package/dist/services/agent-session.service.d.ts +3 -3
  355. package/dist/services/agent-session.service.d.ts.map +1 -1
  356. package/dist/services/agent-session.service.js +4 -4
  357. package/dist/services/agent-session.service.js.map +1 -1
  358. package/dist/services/agent-skill-registry.service.d.ts +12 -0
  359. package/dist/services/agent-skill-registry.service.d.ts.map +1 -0
  360. package/dist/services/agent-skill-registry.service.js +39 -0
  361. package/dist/services/agent-skill-registry.service.js.map +1 -0
  362. package/dist/services/agent-skill.service.d.ts +12 -0
  363. package/dist/services/agent-skill.service.d.ts.map +1 -0
  364. package/dist/services/agent-skill.service.js +39 -0
  365. package/dist/services/agent-skill.service.js.map +1 -0
  366. package/dist/services/agent-tool-registry.service.d.ts +19 -0
  367. package/dist/services/agent-tool-registry.service.d.ts.map +1 -0
  368. package/dist/services/agent-tool-registry.service.js +73 -0
  369. package/dist/services/agent-tool-registry.service.js.map +1 -0
  370. package/dist/services/agent-tool-registry.service.spec.d.ts +2 -0
  371. package/dist/services/agent-tool-registry.service.spec.d.ts.map +1 -0
  372. package/dist/services/agent-tool-registry.service.spec.js +58 -0
  373. package/dist/services/agent-tool-registry.service.spec.js.map +1 -0
  374. package/dist/services/agent-tool.service.d.ts +12 -0
  375. package/dist/services/agent-tool.service.d.ts.map +1 -0
  376. package/dist/services/agent-tool.service.js +39 -0
  377. package/dist/services/agent-tool.service.js.map +1 -0
  378. package/dist/services/authentication.service.d.ts +1 -0
  379. package/dist/services/authentication.service.d.ts.map +1 -1
  380. package/dist/services/authentication.service.js +1 -0
  381. package/dist/services/authentication.service.js.map +1 -1
  382. package/dist/services/crud.service.d.ts +1 -0
  383. package/dist/services/crud.service.d.ts.map +1 -1
  384. package/dist/services/crud.service.js +13 -1
  385. package/dist/services/crud.service.js.map +1 -1
  386. package/dist/services/draft-publish-helper.service.d.ts.map +1 -1
  387. package/dist/services/draft-publish-helper.service.js +8 -6
  388. package/dist/services/draft-publish-helper.service.js.map +1 -1
  389. package/dist/services/model-metadata.service.d.ts +19 -3
  390. package/dist/services/model-metadata.service.d.ts.map +1 -1
  391. package/dist/services/model-metadata.service.js +287 -51
  392. package/dist/services/model-metadata.service.js.map +1 -1
  393. package/dist/services/{workflow-secret.service.d.ts → secret.service.d.ts} +13 -11
  394. package/dist/services/secret.service.d.ts.map +1 -0
  395. package/dist/services/{workflow-secret.service.js → secret.service.js} +32 -17
  396. package/dist/services/secret.service.js.map +1 -0
  397. package/dist/services/settings/default-settings-provider.service.d.ts +60 -0
  398. package/dist/services/settings/default-settings-provider.service.d.ts.map +1 -1
  399. package/dist/services/settings/default-settings-provider.service.js +33 -0
  400. package/dist/services/settings/default-settings-provider.service.js.map +1 -1
  401. package/dist/services/solid-ts-morph.service.d.ts +9 -0
  402. package/dist/services/solid-ts-morph.service.d.ts.map +1 -1
  403. package/dist/services/solid-ts-morph.service.js +87 -5
  404. package/dist/services/solid-ts-morph.service.js.map +1 -1
  405. package/dist/services/workflow/workflow-runtime.service.d.ts +3 -3
  406. package/dist/services/workflow/workflow-runtime.service.d.ts.map +1 -1
  407. package/dist/services/workflow/workflow-runtime.service.js +5 -5
  408. package/dist/services/workflow/workflow-runtime.service.js.map +1 -1
  409. package/dist/solid-core.module.d.ts.map +1 -1
  410. package/dist/solid-core.module.js +108 -16
  411. package/dist/solid-core.module.js.map +1 -1
  412. package/package.json +1 -1
  413. package/resources/agent-embed/solid-agent-embed.js +242 -0
  414. package/sql/cleanup-old-workflow-secret-metadata.mssql.sql +57 -0
  415. package/sql/cleanup-old-workflow-secret-metadata.postgres.sql +59 -0
  416. package/src/commands/run-tests.command.ts +3 -3
  417. package/src/controllers/agent-embed.controller.ts +43 -0
  418. package/src/controllers/agent-event.controller.ts +15 -0
  419. package/src/controllers/agent-human-request.controller.ts +91 -0
  420. package/src/controllers/agent-job.controller.ts +91 -0
  421. package/src/controllers/agent-process.controller.ts +117 -0
  422. package/src/controllers/agent-registry.controller.ts +91 -0
  423. package/src/controllers/agent-role.controller.ts +91 -0
  424. package/src/controllers/agent-secret.controller.ts +91 -0
  425. package/src/controllers/agent-session-checkpoint.controller.ts +91 -0
  426. package/src/controllers/agent-session.controller.ts +41 -20
  427. package/src/controllers/agent-skill-registry.controller.ts +91 -0
  428. package/src/controllers/agent-skill.controller.ts +91 -0
  429. package/src/controllers/agent-tool-registry.controller.ts +91 -0
  430. package/src/controllers/agent-tool.controller.ts +91 -0
  431. package/src/controllers/authentication.controller.ts +1 -1
  432. package/src/controllers/model-metadata.controller.ts +16 -5
  433. package/src/controllers/{workflow-secret.controller.ts → secret.controller.ts} +10 -10
  434. package/src/dtos/create-agent-event.dto.ts +18 -3
  435. package/src/dtos/create-agent-human-request.dto.ts +81 -0
  436. package/src/dtos/create-agent-job.dto.ts +125 -0
  437. package/src/dtos/create-agent-process.dto.ts +100 -0
  438. package/src/dtos/create-agent-registry.dto.ts +197 -0
  439. package/src/dtos/create-agent-role.dto.ts +26 -0
  440. package/src/dtos/create-agent-secret.dto.ts +31 -0
  441. package/src/dtos/create-agent-session-checkpoint.dto.ts +46 -0
  442. package/src/dtos/create-agent-session.dto.ts +176 -60
  443. package/src/dtos/create-agent-skill-registry.dto.ts +54 -0
  444. package/src/dtos/create-agent-skill.dto.ts +31 -0
  445. package/src/dtos/create-agent-tool-registry.dto.ts +69 -0
  446. package/src/dtos/create-agent-tool.dto.ts +31 -0
  447. package/src/dtos/create-media.dto.ts +49 -48
  448. package/src/dtos/{create-workflow-secret.dto.ts → create-secret.dto.ts} +7 -2
  449. package/src/dtos/update-agent-event.dto.ts +17 -2
  450. package/src/dtos/update-agent-human-request.dto.ts +89 -0
  451. package/src/dtos/update-agent-job.dto.ts +131 -0
  452. package/src/dtos/update-agent-process.dto.ts +112 -0
  453. package/src/dtos/update-agent-registry.dto.ts +210 -0
  454. package/src/dtos/update-agent-role.dto.ts +28 -0
  455. package/src/dtos/update-agent-secret.dto.ts +33 -0
  456. package/src/dtos/update-agent-session-checkpoint.dto.ts +53 -0
  457. package/src/dtos/update-agent-session.dto.ts +187 -59
  458. package/src/dtos/update-agent-skill-registry.dto.ts +62 -0
  459. package/src/dtos/update-agent-skill.dto.ts +34 -0
  460. package/src/dtos/update-agent-tool-registry.dto.ts +78 -0
  461. package/src/dtos/update-agent-tool.dto.ts +34 -0
  462. package/src/dtos/update-media.dto.ts +51 -50
  463. package/src/dtos/{update-workflow-secret.dto.ts → update-secret.dto.ts} +7 -2
  464. package/src/entities/agent-event.entity.ts +19 -11
  465. package/src/entities/agent-human-request.entity.ts +48 -0
  466. package/src/entities/agent-job.entity.ts +70 -0
  467. package/src/entities/agent-process.entity.ts +60 -0
  468. package/src/entities/agent-registry.entity.ts +74 -0
  469. package/src/entities/agent-role.entity.ts +19 -0
  470. package/src/entities/agent-secret.entity.ts +22 -0
  471. package/src/entities/agent-session-checkpoint.entity.ts +28 -0
  472. package/src/entities/agent-session.entity.ts +77 -27
  473. package/src/entities/agent-skill-registry.entity.ts +28 -0
  474. package/src/entities/agent-skill.entity.ts +22 -0
  475. package/src/entities/agent-tool-registry.entity.ts +37 -0
  476. package/src/entities/agent-tool.entity.ts +22 -0
  477. package/src/entities/{workflow-secret.entity.ts → secret.entity.ts} +5 -2
  478. package/src/helpers/agent-required-inputs.ts +30 -0
  479. package/src/helpers/field-crud-managers/PasswordFieldCrudManager.ts +1 -1
  480. package/src/index.ts +84 -7
  481. package/src/jobs/database/test-run-queue-subscriber-database.service.ts +3 -3
  482. package/src/repository/agent-human-request.repository.ts +19 -0
  483. package/src/repository/agent-job.repository.ts +19 -0
  484. package/src/repository/agent-process.repository.ts +19 -0
  485. package/src/repository/agent-registry.repository.ts +27 -0
  486. package/src/repository/agent-role.repository.ts +19 -0
  487. package/src/repository/agent-secret.repository.ts +19 -0
  488. package/src/repository/agent-session-checkpoint.repository.ts +19 -0
  489. package/src/repository/agent-session.repository.ts +13 -11
  490. package/src/repository/agent-skill-registry.repository.ts +19 -0
  491. package/src/repository/agent-skill.repository.ts +19 -0
  492. package/src/repository/agent-tool-registry.repository.ts +19 -0
  493. package/src/repository/agent-tool.repository.ts +19 -0
  494. package/src/repository/{workflow-secret.repository.ts → secret.repository.ts} +3 -3
  495. package/src/seeders/seed-data/solid-core-metadata.json +14270 -6971
  496. package/src/services/agent-config-version.service.ts +151 -0
  497. package/src/services/agent-event.service.ts +37 -1
  498. package/src/services/agent-hub-process-manager.service.ts +72 -0
  499. package/src/services/agent-human-request.service.ts +20 -0
  500. package/src/services/agent-job.service.ts +20 -0
  501. package/src/services/agent-process.service.ts +41 -0
  502. package/src/services/agent-registry.service.ts +38 -0
  503. package/src/services/agent-role.service.ts +20 -0
  504. package/src/services/agent-secret.service.ts +20 -0
  505. package/src/services/agent-session-checkpoint.service.ts +20 -0
  506. package/src/services/agent-session.service.ts +10 -9
  507. package/src/services/agent-skill-registry.service.ts +21 -0
  508. package/src/services/agent-skill.service.ts +20 -0
  509. package/src/services/agent-tool-registry.service.spec.ts +62 -0
  510. package/src/services/agent-tool-registry.service.ts +72 -0
  511. package/src/services/agent-tool.service.ts +20 -0
  512. package/src/services/authentication.service.ts +3 -0
  513. package/src/services/crud.service.ts +18 -1
  514. package/src/services/draft-publish-helper.service.ts +14 -9
  515. package/src/services/model-metadata.service.ts +260 -61
  516. package/src/services/{workflow-secret.service.ts → secret.service.ts} +35 -18
  517. package/src/services/settings/default-settings-provider.service.ts +33 -0
  518. package/src/services/solid-ts-morph.service.ts +84 -6
  519. package/src/services/workflow/workflow-runtime.service.ts +3 -3
  520. package/src/solid-core.module.ts +117 -18
  521. package/dist/controllers/workflow-secret.controller.d.ts +0 -24
  522. package/dist/controllers/workflow-secret.controller.d.ts.map +0 -1
  523. package/dist/controllers/workflow-secret.controller.js.map +0 -1
  524. package/dist/dtos/create-workflow-secret.dto.d.ts.map +0 -1
  525. package/dist/dtos/create-workflow-secret.dto.js.map +0 -1
  526. package/dist/dtos/update-workflow-secret.dto.d.ts.map +0 -1
  527. package/dist/dtos/update-workflow-secret.dto.js.map +0 -1
  528. package/dist/entities/workflow-secret.entity.d.ts.map +0 -1
  529. package/dist/entities/workflow-secret.entity.js.map +0 -1
  530. package/dist/repository/workflow-secret.repository.d.ts.map +0 -1
  531. package/dist/repository/workflow-secret.repository.js.map +0 -1
  532. package/dist/services/workflow-secret.service.d.ts.map +0 -1
  533. package/dist/services/workflow-secret.service.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-runtime.service.js","sourceRoot":"","sources":["../../../src/services/workflow/workflow-runtime.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,2CAA4F;AAC5F,6CAAsD;AACtD,qCAAwC;AACxC,0FAA+E;AAC/E,wFAA6E;AAC7E,kGAAsF;AAQtF,2FAAqF;AACrF,+EAA0E;AAC1E,mGAA6F;AAC7F,qFAA+E;AAC/E,wEAAmE;AACnE,mFAAuE;AAEvE,gDAAwB;AAGjB,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YAEE,aAA6C,EAC5B,QAAqC,EACrC,UAAqC,EACrC,MAAsC,EACtC,SAA6C,EAC7C,qBAA4C,EAC5C,iCAAkF;QANlF,kBAAa,GAAb,aAAa,CAAe;QAC5B,aAAQ,GAAR,QAAQ,CAA6B;QACrC,eAAU,GAAV,UAAU,CAA2B;QACrC,WAAM,GAAN,MAAM,CAAgC;QACtC,cAAS,GAAT,SAAS,CAAoC;QAC7C,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,sCAAiC,GAAjC,iCAAiC,CAAiD;QAVpF,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAW/D,CAAC;IAEJ,KAAK,CAAC,qBAAqB,CACzB,EAAU,EACV,OAAiC;QAEjC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,+CAAkB,EAAE;YACtE,KAAK,EAAE,EAAE,EAAE,EAAS;SACrB,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,iBAAiB,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,KAAK,CAAC,0BAA0B,CAC9B,EAAU,EACV,UAAoC,EAAE;QAEtC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,+CAAkB,EAAE;YACtE,KAAK,EAAE,EAAE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AAC,KAAK,CAAC;aACzB,CAAC;QACJ,CAAC;QAED,OAAO;YACL,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK;YAC5C,KAAK,EAAE,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;SAC7D,CAAC;IACJ,CAAC;IAEO,YAAY,CAAC,KAAc;QACjC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAEO,cAAc,CAAC,KAAc;QACnC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF,CAAA;AA94BY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,6BAAmB,EAAC,SAAS,CAAC,CAAA;qCACC,uBAAa;QAClB,4DAA2B;QACzB,uDAAyB;QAC7B,kEAA8B;QAC3B,0EAAkC;QACtB,+CAAqB;QACT,4CAAgB;GAX3D,sBAAsB,CA84BlC","sourcesContent":["import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common';\nimport { InjectEntityManager } from '@nestjs/typeorm';\nimport { EntityManager } from 'typeorm';\nimport { WorkflowDefinition } from '../../entities/workflow-definition.entity';\nimport { WorkflowExecution } from '../../entities/workflow-execution.entity';\nimport { WorkflowStepExecution } from '../../entities/workflow-step-execution.entity';\nimport {\n WorkflowDefinitionDsl,\n WorkflowExecutionRequest,\n WorkflowExecutionResponse,\n WorkflowNodeDefinition,\n WorkflowRuntimeContext,\n} from '../../types/workflow-dsl.types';\nimport { WorkflowExecutionWriterService } from './workflow-execution-writer.service';\nimport { WorkflowExpressionService } from './workflow-expression.service';\nimport { WorkflowDefinitionValidatorService } from './workflow-definition-validator.service';\nimport { WorkflowNodeRegistryService } from './workflow-node-registry.service';\nimport { WorkflowSecretService } from '../workflow-secret.service';\nimport { PublisherFactory } from '../queues/publisher-factory.service';\nimport { WorkflowExecutionQueuePayload } from '../../types/workflow-execution-queue.types';\nimport YAML from 'yaml';\n\n@Injectable()\nexport class WorkflowRuntimeService {\n private readonly logger = new Logger(WorkflowRuntimeService.name);\n\n constructor(\n @InjectEntityManager('default')\n private readonly entityManager: EntityManager,\n private readonly registry: WorkflowNodeRegistryService,\n private readonly expression: WorkflowExpressionService,\n private readonly writer: WorkflowExecutionWriterService,\n private readonly validator: WorkflowDefinitionValidatorService,\n private readonly workflowSecretService: WorkflowSecretService,\n private readonly workflowExecutionPublisherFactory: PublisherFactory<WorkflowExecutionQueuePayload>,\n ) {}\n\n async executeDefinitionById(\n id: number,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n });\n\n return this.executeDefinition(definition, request);\n }\n\n async executeDefinitionByIdAsync(\n id: number,\n request: WorkflowExecutionRequest = {},\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n });\n\n return this.enqueueDefinition(definition, request);\n }\n\n async executeDefinitionByKey(\n key: string,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { key } as any,\n });\n\n return this.executeDefinition(definition, request);\n }\n\n async executeDefinitionByKeyAsync(\n key: string,\n request: WorkflowExecutionRequest = {},\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { key } as any,\n });\n\n return this.enqueueDefinition(definition, request);\n }\n\n private async queueWorkflowExecution(\n payload: WorkflowExecutionQueuePayload,\n ): Promise<string> {\n const messageId = await this.workflowExecutionPublisherFactory.publish(\n {\n payload,\n parentEntityId: payload.executionId,\n parentEntity: 'workflowExecution',\n retryCount: 0,\n retryInterval: 1000,\n },\n 'WorkflowExecutionPublisher',\n );\n\n this.logger.log(\n `Queued workflow execution message ${messageId} for execution id ${payload.executionId}.`,\n );\n\n return messageId;\n }\n\n private async enqueueDefinition(\n definition: WorkflowDefinition | null,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n this.validator.validate(this.assertDefinitionYaml(definition.definitionYaml));\n const execution = await this.writer.createEnqueuedExecution(definition, request);\n await this.queueWorkflowExecution({\n executionId: execution.id,\n });\n\n return this.toResponse(execution);\n }\n\n async executeEnqueuedExecution(\n executionId: number,\n ): Promise<WorkflowExecutionResponse> {\n const execution = await this.entityManager.findOne(WorkflowExecution, {\n where: { id: executionId } as any,\n relations: ['workflowDefinition'],\n });\n\n if (!execution) {\n throw new NotFoundException(`Workflow execution ${executionId} not found.`);\n }\n\n if (execution.status !== 'enqueued') {\n throw new BadRequestException(\n `Workflow execution ${executionId} is ${execution.status}; expected enqueued.`,\n );\n }\n\n const request = this.readEnqueuedExecutionRequest(execution);\n return this.executeDefinition(execution.workflowDefinition, request, execution);\n }\n\n private async executeDefinition(\n definition: WorkflowDefinition | null,\n request: WorkflowExecutionRequest,\n existingExecution?: WorkflowExecution,\n ): Promise<WorkflowExecutionResponse> {\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n const definitionDsl = this.assertDefinitionYaml(definition.definitionYaml);\n this.validator.validate(definitionDsl);\n const secrets = await this.workflowSecretService.getWorkflowSecretsContext();\n const input = this.resolveWorkflowInput(definitionDsl, request, secrets);\n const variables = this.resolveWorkflowVariables(definitionDsl, request, input, secrets);\n const effectiveRequest: WorkflowExecutionRequest = {\n ...request,\n input,\n variables,\n };\n const execution = existingExecution\n ? await this.writer.startExecution(existingExecution, effectiveRequest)\n : await this.writer.createExecution(definition, effectiveRequest);\n const nodeCount = this.countNodes([\n ...(definitionDsl.nodes ?? []),\n ...(definitionDsl.errors ?? []),\n ...(definitionDsl.finally ?? []),\n ]);\n const outputs: Record<string, any> = {};\n const runtimeContext: WorkflowRuntimeContext = {\n execution,\n input,\n variables,\n secrets,\n outputs,\n counters: {\n step: 0,\n log: 0,\n },\n };\n\n this.logger.log(\n `Starting workflow execution ${execution.executionIdentifier} for ${definition.key} with ${nodeCount} node(s).`,\n );\n await this.writer.writeLog(execution, undefined, {\n level: 'info',\n eventType: 'execution.started',\n message: `Workflow execution started for ${definition.key}.`,\n metadata: {\n executionIdentifier: execution.executionIdentifier,\n workflowKey: definition.key,\n triggerType: execution.triggerType,\n nodeCount,\n inputKeys: Object.keys(runtimeContext.input ?? {}),\n variableKeys: Object.keys(runtimeContext.variables ?? {}),\n },\n }, this.nextLogSequence(runtimeContext));\n\n let executionError: unknown;\n\n try {\n await this.runNodes(definitionDsl.nodes, runtimeContext);\n } catch (error) {\n executionError = error;\n await this.runGlobalErrorHandlers(definitionDsl, runtimeContext, error);\n }\n\n try {\n await this.runFinallyHandlers(definitionDsl, runtimeContext);\n } catch (finallyError) {\n await this.writer.writeLog(execution, undefined, {\n level: 'error',\n eventType: 'finally.failed',\n message: `Finally handler failed: ${this.errorMessage(finallyError)}.`,\n context: this.summarizeError(finallyError),\n metadata: {\n originalError: executionError\n ? this.summarizeError(executionError)\n : undefined,\n },\n }, this.nextLogSequence(runtimeContext));\n if (!executionError) {\n executionError = finallyError;\n }\n }\n\n if (!executionError) {\n const completed = await this.writer.completeExecution(execution, outputs);\n\n this.logger.log(\n `Completed workflow execution ${completed.executionIdentifier} for ${definition.key} in ${completed.durationMs ?? 0} ms.`,\n );\n await this.writer.writeLog(completed, undefined, {\n level: 'info',\n eventType: 'execution.completed',\n message: `Workflow execution completed for ${definition.key}.`,\n metadata: {\n executionIdentifier: completed.executionIdentifier,\n durationMs: completed.durationMs,\n outputNodeIds: Object.keys(outputs),\n },\n }, this.nextLogSequence(runtimeContext));\n\n return this.toResponse(completed);\n }\n\n const failed = await this.writer.failExecution(execution, executionError);\n\n this.logger.error(\n `Failed workflow execution ${failed.executionIdentifier} for ${definition.key}: ${failed.errorSummary}`,\n executionError instanceof Error ? executionError.stack : undefined,\n );\n await this.writer.writeLog(failed, undefined, {\n level: 'error',\n eventType: 'execution.failed',\n message: failed.errorSummary,\n context: this.summarizeError(executionError),\n metadata: {\n executionIdentifier: failed.executionIdentifier,\n durationMs: failed.durationMs,\n },\n }, this.nextLogSequence(runtimeContext));\n\n return this.toResponse(failed);\n }\n\n async getExecutionStatus(executionId: number): Promise<WorkflowExecutionResponse> {\n const execution = await this.findExecutionOrThrow(executionId);\n return this.toResponse(execution);\n }\n\n async getLastStepOutput(executionId: number): Promise<any> {\n await this.findExecutionOrThrow(executionId);\n const step = await this.entityManager.findOne(WorkflowStepExecution, {\n where: { workflowExecution: { id: executionId } } as any,\n order: {\n sequenceNumber: 'DESC',\n id: 'DESC',\n } as any,\n });\n\n if (!step) {\n throw new NotFoundException(`No step executions found for workflow execution ${executionId}.`);\n }\n\n return this.toStepOutputResponse(step);\n }\n\n async getStepOutput(\n executionId: number,\n stepNameOrId: string,\n options: { latest?: boolean; limit?: number; offset?: number } = {},\n ): Promise<any> {\n await this.findExecutionOrThrow(executionId);\n\n const qb = this.entityManager\n .createQueryBuilder(WorkflowStepExecution, 'step')\n .innerJoin('step.workflowExecution', 'execution')\n .where('execution.id = :executionId', { executionId })\n .andWhere(\n '(step.nodeId = :stepNameOrId OR step.nodeName = :stepNameOrId OR step.stepExecutionKey = :stepNameOrId)',\n { stepNameOrId },\n )\n .orderBy('step.sequenceNumber', options.latest === false ? 'ASC' : 'DESC')\n .addOrderBy('step.id', options.latest === false ? 'ASC' : 'DESC');\n\n if (options.latest !== false && options.limit === undefined && options.offset === undefined) {\n const step = await qb.getOne();\n if (!step) {\n throw new NotFoundException(\n `No step output found for '${stepNameOrId}' in workflow execution ${executionId}.`,\n );\n }\n return this.toStepOutputResponse(step);\n }\n\n const limit = Math.max(1, Math.min(Number(options.limit ?? 50), 200));\n const offset = Math.max(0, Number(options.offset ?? 0));\n const [steps, totalRecords] = await qb.limit(limit).offset(offset).getManyAndCount();\n\n return {\n meta: this.buildPagedMeta(offset, limit, totalRecords),\n records: steps.map((step) => this.toStepOutputResponse(step)),\n };\n }\n\n private resolveWorkflowInput(\n definitionDsl: WorkflowDefinitionDsl,\n request: WorkflowExecutionRequest,\n secrets: Record<string, any>,\n ): Record<string, any> {\n const requestedInput = request.input ?? {};\n const defaultInput = Object.entries(definitionDsl.inputs ?? {}).reduce(\n (acc, [key, inputDefinition]) => {\n if (\n inputDefinition &&\n typeof inputDefinition === 'object' &&\n !Array.isArray(inputDefinition) &&\n Object.prototype.hasOwnProperty.call(inputDefinition, 'default')\n ) {\n acc[key] = inputDefinition.default;\n return acc;\n }\n\n if (\n inputDefinition === null ||\n inputDefinition === undefined ||\n (typeof inputDefinition === 'object' && !Array.isArray(inputDefinition))\n ) {\n return acc;\n }\n\n acc[key] = inputDefinition;\n return acc;\n },\n {} as Record<string, any>,\n );\n const rawInput = {\n ...defaultInput,\n ...requestedInput,\n };\n\n return this.expression.interpolate(rawInput, {\n execution: undefined as any,\n input: rawInput,\n variables: definitionDsl.variables ?? {},\n secrets,\n outputs: {},\n });\n }\n\n private resolveWorkflowVariables(\n definitionDsl: WorkflowDefinitionDsl,\n request: WorkflowExecutionRequest,\n input: Record<string, any>,\n secrets: Record<string, any>,\n ): Record<string, any> {\n const rawVariables = {\n ...(definitionDsl.variables ?? {}),\n ...(request.variables ?? {}),\n };\n\n return this.expression.interpolate(rawVariables, {\n execution: undefined as any,\n input,\n variables: rawVariables,\n secrets,\n outputs: {},\n });\n }\n\n private async runNodes(\n nodes: WorkflowNodeDefinition[],\n context: WorkflowRuntimeContext,\n ): Promise<Record<string, any>> {\n const nodeOutputs: Record<string, any> = {};\n\n for (const node of nodes ?? []) {\n nodeOutputs[node.id] = await this.runNode(node, context);\n }\n\n return nodeOutputs;\n }\n\n private async runNode(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n ): Promise<Record<string, any>> {\n const inputPayload = {\n configuration: node.configuration,\n input: context.input,\n variables: context.variables,\n item: context.item,\n index: context.index,\n };\n\n const step = await this.writer.createStep(\n context.execution,\n node,\n this.nextStepSequence(context),\n inputPayload,\n context.parentNodeId,\n context.parentStepExecutionKey,\n );\n\n if (node.disabled) {\n context.outputs[node.id] = { skipped: true };\n await this.writer.completeStep(step, 'skipped', context.outputs[node.id]);\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.skipped',\n message: `Skipped disabled node ${node.id}.`,\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n return context.outputs[node.id];\n }\n\n try {\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.started',\n message: `Starting node ${node.id} (${node.type}).`,\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n\n this.logger.debug(\n `Starting workflow node ${node.id} (${node.type}) for execution ${context.execution.executionIdentifier}.`,\n );\n const startedAtMs = Date.now();\n const handler = this.registry.get(node.type);\n const result = await handler.execute({\n ...context,\n node,\n stepExecution: step,\n expression: this.expression,\n runNodes: async (childNodes, options = {}) =>\n this.runNodes(childNodes, {\n ...context,\n ...options,\n execution: context.execution,\n outputs: options.outputs ?? context.outputs,\n parentNodeId: node.id,\n parentStepExecutionKey: step.stepExecutionKey,\n }),\n emitLog: async (entry) => {\n await this.writer.writeLog(\n context.execution,\n step,\n entry,\n this.nextLogSequence(context),\n );\n },\n emitArtifact: async (entry) => {\n await this.writer.writeArtifact(context.execution, step, entry);\n },\n });\n\n const output = result.output ?? {};\n context.outputs[node.id] = this.getRuntimeContextOutput(node, output);\n\n for (const artifact of result.artifacts ?? []) {\n await this.writer.writeArtifact(context.execution, step, artifact);\n }\n\n await this.writer.completeStep(\n step,\n result.status ?? 'success',\n output,\n {\n item: context.item,\n index: context.index,\n },\n );\n\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.completed',\n message: `Completed node ${node.id} (${node.type}).`,\n metadata: {\n ...this.nodeLogMetadata(node, context, step),\n status: result.status ?? 'success',\n durationMs: Date.now() - startedAtMs,\n outputSummary: this.summarizeValue(output),\n artifactCount: result.artifacts?.length ?? 0,\n },\n }, this.nextLogSequence(context));\n\n return output;\n } catch (error) {\n await this.writer.failStep(step, error);\n\n if (node.onError === 'continue') {\n context.outputs[node.id] = {\n error: error instanceof Error ? error.message : String(error),\n };\n await this.writer.writeLog(context.execution, step, {\n level: 'warn',\n eventType: 'node.failed.continued',\n message: `Node ${node.id} failed but workflow continued: ${this.errorMessage(error)}.`,\n context: this.summarizeError(error),\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n return context.outputs[node.id];\n }\n\n await this.writer.writeLog(context.execution, step, {\n level: 'error',\n eventType: 'node.failed',\n message: `Node ${node.id} failed: ${this.errorMessage(error)}.`,\n context: this.summarizeError(error),\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n await this.runLocalErrorHandlers(node, context, error);\n throw error;\n }\n }\n\n private async runGlobalErrorHandlers(\n definitionDsl: WorkflowDefinitionDsl,\n context: WorkflowRuntimeContext,\n error: unknown,\n ): Promise<void> {\n const errorNodes = definitionDsl.errors ?? [];\n if (!errorNodes.length) {\n return;\n }\n\n await this.runErrorHandlers(\n errorNodes,\n context,\n error,\n 'global',\n undefined,\n undefined,\n );\n }\n\n private async runFinallyHandlers(\n definitionDsl: WorkflowDefinitionDsl,\n context: WorkflowRuntimeContext,\n ): Promise<void> {\n const finallyNodes = definitionDsl.finally ?? [];\n if (!finallyNodes.length) {\n return;\n }\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'info',\n eventType: 'finally.started',\n message: 'Running workflow finally handlers.',\n metadata: {\n handlerNodeCount: finallyNodes.length,\n },\n }, this.nextLogSequence(context));\n\n await this.runNodes(finallyNodes, context);\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'info',\n eventType: 'finally.completed',\n message: 'Workflow finally handlers completed.',\n metadata: {\n handlerNodeCount: finallyNodes.length,\n },\n }, this.nextLogSequence(context));\n }\n\n private async runLocalErrorHandlers(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n error: unknown,\n ): Promise<void> {\n const errorNodes = node.errors ?? [];\n if (!errorNodes.length) {\n return;\n }\n\n await this.runErrorHandlers(\n errorNodes,\n context,\n error,\n 'local',\n node.id,\n context.stepExecution?.stepExecutionKey,\n );\n }\n\n private async runErrorHandlers(\n errorNodes: WorkflowNodeDefinition[],\n context: WorkflowRuntimeContext,\n error: unknown,\n scope: 'global' | 'local',\n sourceNodeId?: string,\n sourceStepExecutionKey?: string,\n ): Promise<void> {\n const errorContext = this.buildErrorContext(error, sourceNodeId, sourceStepExecutionKey);\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'warn',\n eventType: `error-handler.${scope}.started`,\n message:\n scope === 'global'\n ? 'Running workflow-level error handlers.'\n : `Running local error handlers for node ${sourceNodeId}.`,\n context: errorContext,\n metadata: {\n sourceNodeId,\n sourceStepExecutionKey,\n handlerNodeCount: errorNodes.length,\n },\n }, this.nextLogSequence(context));\n\n try {\n await this.runNodes(errorNodes, {\n ...context,\n error: errorContext,\n parentNodeId: sourceNodeId ?? context.parentNodeId,\n parentStepExecutionKey:\n sourceStepExecutionKey ?? context.parentStepExecutionKey,\n });\n } catch (handlerError) {\n await this.writer.writeLog(context.execution, undefined, {\n level: 'error',\n eventType: `error-handler.${scope}.failed`,\n message: `Error handler failed: ${this.errorMessage(handlerError)}.`,\n context: this.summarizeError(handlerError),\n metadata: {\n originalError: errorContext,\n sourceNodeId,\n sourceStepExecutionKey,\n },\n }, this.nextLogSequence(context));\n return;\n }\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'info',\n eventType: `error-handler.${scope}.completed`,\n message:\n scope === 'global'\n ? 'Workflow-level error handlers completed.'\n : `Local error handlers completed for node ${sourceNodeId}.`,\n context: errorContext,\n metadata: {\n sourceNodeId,\n sourceStepExecutionKey,\n },\n }, this.nextLogSequence(context));\n }\n\n private buildErrorContext(\n error: unknown,\n nodeId?: string,\n stepExecutionKey?: string,\n ): Record<string, any> {\n const summary = this.summarizeError(error);\n return {\n ...summary,\n message: this.errorMessage(error),\n nodeId,\n stepExecutionKey,\n };\n }\n\n private assertDefinitionYaml(value: any): WorkflowDefinitionDsl {\n if (!value || typeof value !== 'string') {\n throw new BadRequestException(\n 'Workflow definition YAML must be stored as a string.',\n );\n }\n\n let parsed: unknown;\n try {\n parsed = YAML.parse(value);\n } catch (error: any) {\n throw new BadRequestException(\n error?.message ?? 'Workflow definition YAML could not be parsed.',\n );\n }\n\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n throw new BadRequestException(\n 'Workflow definition YAML must resolve to an object with a nodes array.',\n );\n }\n\n if (!Array.isArray((parsed as WorkflowDefinitionDsl).nodes)) {\n throw new BadRequestException(\n 'Workflow definition YAML must include a nodes array.',\n );\n }\n\n return parsed as WorkflowDefinitionDsl;\n }\n\n private readEnqueuedExecutionRequest(execution: WorkflowExecution): WorkflowExecutionRequest {\n const payload = execution.inputPayload;\n if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {\n return {\n triggerType: execution.triggerType,\n requestedByUserId: execution.requestedByUserId as any,\n };\n }\n\n return {\n ...(payload as WorkflowExecutionRequest),\n triggerType: (payload as WorkflowExecutionRequest).triggerType ?? execution.triggerType,\n requestedByUserId:\n (payload as WorkflowExecutionRequest).requestedByUserId ??\n (execution.requestedByUserId as any),\n };\n }\n\n private async findExecutionOrThrow(executionId: number): Promise<WorkflowExecution> {\n const execution = await this.entityManager.findOne(WorkflowExecution, {\n where: { id: executionId } as any,\n });\n\n if (!execution) {\n throw new NotFoundException(`Workflow execution ${executionId} not found.`);\n }\n\n return execution;\n }\n\n private toStepOutputResponse(step: WorkflowStepExecution) {\n return {\n id: step.id,\n stepExecutionKey: step.stepExecutionKey,\n nodeId: step.nodeId,\n nodeName: step.nodeName,\n nodeType: step.nodeType,\n nodeKind: step.nodeKind,\n sequenceNumber: step.sequenceNumber,\n attemptNumber: step.attemptNumber,\n status: step.status,\n startedAt: step.startedAt,\n finishedAt: step.finishedAt,\n durationMs: step.durationMs as any,\n runtimeContext: step.runtimeContext,\n outputPayload: step.outputPayload,\n errorSummary: step.errorSummary,\n };\n }\n\n private buildPagedMeta(offset: number, limit: number, totalRecords: number) {\n const currentPage = limit ? Math.floor(offset / limit) + 1 : 1;\n const totalPages = limit ? Math.max(1, Math.ceil(totalRecords / limit)) : 1;\n return {\n totalRecords,\n currentPage,\n nextPage: currentPage < totalPages ? currentPage + 1 : null,\n prevPage: currentPage > 1 ? currentPage - 1 : null,\n totalPages,\n perPage: limit,\n };\n }\n\n private toResponse(execution: WorkflowExecution): WorkflowExecutionResponse {\n return {\n id: execution.id,\n executionIdentifier: execution.executionIdentifier,\n workflowKey: execution.workflowKey,\n status: execution.status as any,\n startedAt: execution.startedAt,\n finishedAt: execution.finishedAt,\n durationMs: execution.durationMs as any,\n outputPayload: execution.outputPayload,\n errorSummary: execution.errorSummary,\n };\n }\n\n private nextStepSequence(context: WorkflowRuntimeContext): number {\n context.counters = context.counters ?? { step: 0, log: 0 };\n context.counters.step += 1;\n return context.counters.step;\n }\n\n private nextLogSequence(context: WorkflowRuntimeContext): number {\n context.counters = context.counters ?? { step: 0, log: 0 };\n context.counters.log += 1;\n return context.counters.log;\n }\n\n private countNodes(nodes: WorkflowNodeDefinition[] = []): number {\n return nodes.reduce((count, node) => {\n const nestedNodes = [\n ...(node.tasks ?? []),\n ...(node.then ?? []),\n ...(node.else ?? []),\n ...(node.defaults ?? []),\n ...(node.errors ?? []),\n ...Object.values(node.cases ?? {}).flat(),\n ];\n\n return count + 1 + this.countNodes(nestedNodes);\n }, 0);\n }\n\n private nodeLogMetadata(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n step?: WorkflowStepExecution,\n ) {\n return {\n executionIdentifier: context.execution.executionIdentifier,\n stepExecutionKey: step?.stepExecutionKey,\n nodeId: node.id,\n nodeName: node.name,\n nodeType: node.type,\n nodeKind: node.kind,\n parentNodeId: context.parentNodeId,\n parentStepExecutionKey: context.parentStepExecutionKey,\n index: context.index,\n hasItem: context.item !== undefined,\n configurationKeys:\n node.configuration && typeof node.configuration === 'object'\n ? Object.keys(node.configuration)\n : [],\n availableInputKeys: Object.keys(context.input ?? {}),\n availableVariableKeys: Object.keys(context.variables ?? {}),\n availableOutputNodeIds: Object.keys(context.outputs ?? {}),\n };\n }\n\n private getRuntimeContextOutput(\n node: WorkflowNodeDefinition,\n output: Record<string, any>,\n ): Record<string, any> {\n const hiddenOutputPaths =\n this.registry\n .getMetadata(node.type)\n .authoring?.outputs?.filter(\n (definition) => definition.includeInRuntimeContext === false,\n )\n .map((definition) => definition.path ?? definition.key)\n .filter(Boolean) ?? [];\n\n if (!hiddenOutputPaths.length || !output || typeof output !== 'object') {\n return output;\n }\n\n const runtimeOutput = this.cloneOutput(output);\n hiddenOutputPaths.forEach((path) => {\n this.deletePath(runtimeOutput, path);\n });\n\n return runtimeOutput;\n }\n\n private cloneOutput(output: Record<string, any>): Record<string, any> {\n if (typeof structuredClone === 'function') {\n return structuredClone(output);\n }\n\n return JSON.parse(JSON.stringify(output));\n }\n\n private deletePath(target: Record<string, any>, path: string) {\n const parts = path.split('.').filter(Boolean);\n if (!parts.length) {\n return;\n }\n\n let cursor: any = target;\n for (let index = 0; index < parts.length - 1; index += 1) {\n cursor = cursor?.[parts[index]];\n if (!cursor || typeof cursor !== 'object') {\n return;\n }\n }\n\n if (cursor && typeof cursor === 'object') {\n delete cursor[parts[parts.length - 1]];\n }\n }\n\n private summarizeValue(value: any): any {\n if (Array.isArray(value)) {\n return {\n type: 'array',\n length: value.length,\n };\n }\n\n if (value && typeof value === 'object') {\n return {\n type: 'object',\n keys: Object.keys(value),\n };\n }\n\n return {\n type: value === null ? 'null' : typeof value,\n empty: value === undefined || value === null || value === '',\n };\n }\n\n private errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n }\n\n private summarizeError(error: unknown): any {\n if (error instanceof Error) {\n return {\n name: error.name,\n message: error.message,\n stack: error.stack,\n };\n }\n\n return { error };\n }\n}\n"]}
1
+ {"version":3,"file":"workflow-runtime.service.js","sourceRoot":"","sources":["../../../src/services/workflow/workflow-runtime.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,2CAA4F;AAC5F,6CAAsD;AACtD,qCAAwC;AACxC,0FAA+E;AAC/E,wFAA6E;AAC7E,kGAAsF;AAQtF,2FAAqF;AACrF,+EAA0E;AAC1E,mGAA6F;AAC7F,qFAA+E;AAC/E,sDAAkD;AAClD,mFAAuE;AAEvE,gDAAwB;AAGjB,IAAM,sBAAsB,8BAA5B,MAAM,sBAAsB;IAGjC,YAEE,aAA6C,EAC5B,QAAqC,EACrC,UAAqC,EACrC,MAAsC,EACtC,SAA6C,EAC7C,aAA4B,EAC5B,iCAAkF;QANlF,kBAAa,GAAb,aAAa,CAAe;QAC5B,aAAQ,GAAR,QAAQ,CAA6B;QACrC,eAAU,GAAV,UAAU,CAA2B;QACrC,WAAM,GAAN,MAAM,CAAgC;QACtC,cAAS,GAAT,SAAS,CAAoC;QAC7C,kBAAa,GAAb,aAAa,CAAe;QAC5B,sCAAiC,GAAjC,iCAAiC,CAAiD;QAVpF,WAAM,GAAG,IAAI,eAAM,CAAC,wBAAsB,CAAC,IAAI,CAAC,CAAC;IAW/D,CAAC;IAEJ,KAAK,CAAC,qBAAqB,CACzB,EAAU,EACV,OAAiC;QAEjC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,+CAAkB,EAAE;YACtE,KAAK,EAAE,EAAE,EAAE,EAAS;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C,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO;gBACL,IAAI,EAAE,OAAO;gBACb,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC;QACJ,CAAC;QAED,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvC,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;aACzB,CAAC;QACJ,CAAC;QAED,OAAO;YACL,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK;YAC5C,KAAK,EAAE,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,EAAE;SAC7D,CAAC;IACJ,CAAC;IAEO,YAAY,CAAC,KAAc;QACjC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC;IAEO,cAAc,CAAC,KAAc;QACnC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO;gBACL,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,KAAK,EAAE,KAAK,CAAC,KAAK;aACnB,CAAC;QACJ,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;CACF,CAAA;AA94BY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAKR,WAAA,IAAA,6BAAmB,EAAC,SAAS,CAAC,CAAA;qCACC,uBAAa;QAClB,4DAA2B;QACzB,uDAAyB;QAC7B,kEAA8B;QAC3B,0EAAkC;QAC9B,8BAAa;QACO,4CAAgB;GAX3D,sBAAsB,CA84BlC","sourcesContent":["import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common';\nimport { InjectEntityManager } from '@nestjs/typeorm';\nimport { EntityManager } from 'typeorm';\nimport { WorkflowDefinition } from '../../entities/workflow-definition.entity';\nimport { WorkflowExecution } from '../../entities/workflow-execution.entity';\nimport { WorkflowStepExecution } from '../../entities/workflow-step-execution.entity';\nimport {\n WorkflowDefinitionDsl,\n WorkflowExecutionRequest,\n WorkflowExecutionResponse,\n WorkflowNodeDefinition,\n WorkflowRuntimeContext,\n} from '../../types/workflow-dsl.types';\nimport { WorkflowExecutionWriterService } from './workflow-execution-writer.service';\nimport { WorkflowExpressionService } from './workflow-expression.service';\nimport { WorkflowDefinitionValidatorService } from './workflow-definition-validator.service';\nimport { WorkflowNodeRegistryService } from './workflow-node-registry.service';\nimport { SecretService } from '../secret.service';\nimport { PublisherFactory } from '../queues/publisher-factory.service';\nimport { WorkflowExecutionQueuePayload } from '../../types/workflow-execution-queue.types';\nimport YAML from 'yaml';\n\n@Injectable()\nexport class WorkflowRuntimeService {\n private readonly logger = new Logger(WorkflowRuntimeService.name);\n\n constructor(\n @InjectEntityManager('default')\n private readonly entityManager: EntityManager,\n private readonly registry: WorkflowNodeRegistryService,\n private readonly expression: WorkflowExpressionService,\n private readonly writer: WorkflowExecutionWriterService,\n private readonly validator: WorkflowDefinitionValidatorService,\n private readonly secretService: SecretService,\n private readonly workflowExecutionPublisherFactory: PublisherFactory<WorkflowExecutionQueuePayload>,\n ) {}\n\n async executeDefinitionById(\n id: number,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n });\n\n return this.executeDefinition(definition, request);\n }\n\n async executeDefinitionByIdAsync(\n id: number,\n request: WorkflowExecutionRequest = {},\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { id } as any,\n });\n\n return this.enqueueDefinition(definition, request);\n }\n\n async executeDefinitionByKey(\n key: string,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { key } as any,\n });\n\n return this.executeDefinition(definition, request);\n }\n\n async executeDefinitionByKeyAsync(\n key: string,\n request: WorkflowExecutionRequest = {},\n ): Promise<WorkflowExecutionResponse> {\n const definition = await this.entityManager.findOne(WorkflowDefinition, {\n where: { key } as any,\n });\n\n return this.enqueueDefinition(definition, request);\n }\n\n private async queueWorkflowExecution(\n payload: WorkflowExecutionQueuePayload,\n ): Promise<string> {\n const messageId = await this.workflowExecutionPublisherFactory.publish(\n {\n payload,\n parentEntityId: payload.executionId,\n parentEntity: 'workflowExecution',\n retryCount: 0,\n retryInterval: 1000,\n },\n 'WorkflowExecutionPublisher',\n );\n\n this.logger.log(\n `Queued workflow execution message ${messageId} for execution id ${payload.executionId}.`,\n );\n\n return messageId;\n }\n\n private async enqueueDefinition(\n definition: WorkflowDefinition | null,\n request: WorkflowExecutionRequest,\n ): Promise<WorkflowExecutionResponse> {\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n this.validator.validate(this.assertDefinitionYaml(definition.definitionYaml));\n const execution = await this.writer.createEnqueuedExecution(definition, request);\n await this.queueWorkflowExecution({\n executionId: execution.id,\n });\n\n return this.toResponse(execution);\n }\n\n async executeEnqueuedExecution(\n executionId: number,\n ): Promise<WorkflowExecutionResponse> {\n const execution = await this.entityManager.findOne(WorkflowExecution, {\n where: { id: executionId } as any,\n relations: ['workflowDefinition'],\n });\n\n if (!execution) {\n throw new NotFoundException(`Workflow execution ${executionId} not found.`);\n }\n\n if (execution.status !== 'enqueued') {\n throw new BadRequestException(\n `Workflow execution ${executionId} is ${execution.status}; expected enqueued.`,\n );\n }\n\n const request = this.readEnqueuedExecutionRequest(execution);\n return this.executeDefinition(execution.workflowDefinition, request, execution);\n }\n\n private async executeDefinition(\n definition: WorkflowDefinition | null,\n request: WorkflowExecutionRequest,\n existingExecution?: WorkflowExecution,\n ): Promise<WorkflowExecutionResponse> {\n if (!definition) {\n throw new BadRequestException('Workflow definition not found.');\n }\n\n const definitionDsl = this.assertDefinitionYaml(definition.definitionYaml);\n this.validator.validate(definitionDsl);\n const secrets = await this.secretService.getSecretsContext();\n const input = this.resolveWorkflowInput(definitionDsl, request, secrets);\n const variables = this.resolveWorkflowVariables(definitionDsl, request, input, secrets);\n const effectiveRequest: WorkflowExecutionRequest = {\n ...request,\n input,\n variables,\n };\n const execution = existingExecution\n ? await this.writer.startExecution(existingExecution, effectiveRequest)\n : await this.writer.createExecution(definition, effectiveRequest);\n const nodeCount = this.countNodes([\n ...(definitionDsl.nodes ?? []),\n ...(definitionDsl.errors ?? []),\n ...(definitionDsl.finally ?? []),\n ]);\n const outputs: Record<string, any> = {};\n const runtimeContext: WorkflowRuntimeContext = {\n execution,\n input,\n variables,\n secrets,\n outputs,\n counters: {\n step: 0,\n log: 0,\n },\n };\n\n this.logger.log(\n `Starting workflow execution ${execution.executionIdentifier} for ${definition.key} with ${nodeCount} node(s).`,\n );\n await this.writer.writeLog(execution, undefined, {\n level: 'info',\n eventType: 'execution.started',\n message: `Workflow execution started for ${definition.key}.`,\n metadata: {\n executionIdentifier: execution.executionIdentifier,\n workflowKey: definition.key,\n triggerType: execution.triggerType,\n nodeCount,\n inputKeys: Object.keys(runtimeContext.input ?? {}),\n variableKeys: Object.keys(runtimeContext.variables ?? {}),\n },\n }, this.nextLogSequence(runtimeContext));\n\n let executionError: unknown;\n\n try {\n await this.runNodes(definitionDsl.nodes, runtimeContext);\n } catch (error) {\n executionError = error;\n await this.runGlobalErrorHandlers(definitionDsl, runtimeContext, error);\n }\n\n try {\n await this.runFinallyHandlers(definitionDsl, runtimeContext);\n } catch (finallyError) {\n await this.writer.writeLog(execution, undefined, {\n level: 'error',\n eventType: 'finally.failed',\n message: `Finally handler failed: ${this.errorMessage(finallyError)}.`,\n context: this.summarizeError(finallyError),\n metadata: {\n originalError: executionError\n ? this.summarizeError(executionError)\n : undefined,\n },\n }, this.nextLogSequence(runtimeContext));\n if (!executionError) {\n executionError = finallyError;\n }\n }\n\n if (!executionError) {\n const completed = await this.writer.completeExecution(execution, outputs);\n\n this.logger.log(\n `Completed workflow execution ${completed.executionIdentifier} for ${definition.key} in ${completed.durationMs ?? 0} ms.`,\n );\n await this.writer.writeLog(completed, undefined, {\n level: 'info',\n eventType: 'execution.completed',\n message: `Workflow execution completed for ${definition.key}.`,\n metadata: {\n executionIdentifier: completed.executionIdentifier,\n durationMs: completed.durationMs,\n outputNodeIds: Object.keys(outputs),\n },\n }, this.nextLogSequence(runtimeContext));\n\n return this.toResponse(completed);\n }\n\n const failed = await this.writer.failExecution(execution, executionError);\n\n this.logger.error(\n `Failed workflow execution ${failed.executionIdentifier} for ${definition.key}: ${failed.errorSummary}`,\n executionError instanceof Error ? executionError.stack : undefined,\n );\n await this.writer.writeLog(failed, undefined, {\n level: 'error',\n eventType: 'execution.failed',\n message: failed.errorSummary,\n context: this.summarizeError(executionError),\n metadata: {\n executionIdentifier: failed.executionIdentifier,\n durationMs: failed.durationMs,\n },\n }, this.nextLogSequence(runtimeContext));\n\n return this.toResponse(failed);\n }\n\n async getExecutionStatus(executionId: number): Promise<WorkflowExecutionResponse> {\n const execution = await this.findExecutionOrThrow(executionId);\n return this.toResponse(execution);\n }\n\n async getLastStepOutput(executionId: number): Promise<any> {\n await this.findExecutionOrThrow(executionId);\n const step = await this.entityManager.findOne(WorkflowStepExecution, {\n where: { workflowExecution: { id: executionId } } as any,\n order: {\n sequenceNumber: 'DESC',\n id: 'DESC',\n } as any,\n });\n\n if (!step) {\n throw new NotFoundException(`No step executions found for workflow execution ${executionId}.`);\n }\n\n return this.toStepOutputResponse(step);\n }\n\n async getStepOutput(\n executionId: number,\n stepNameOrId: string,\n options: { latest?: boolean; limit?: number; offset?: number } = {},\n ): Promise<any> {\n await this.findExecutionOrThrow(executionId);\n\n const qb = this.entityManager\n .createQueryBuilder(WorkflowStepExecution, 'step')\n .innerJoin('step.workflowExecution', 'execution')\n .where('execution.id = :executionId', { executionId })\n .andWhere(\n '(step.nodeId = :stepNameOrId OR step.nodeName = :stepNameOrId OR step.stepExecutionKey = :stepNameOrId)',\n { stepNameOrId },\n )\n .orderBy('step.sequenceNumber', options.latest === false ? 'ASC' : 'DESC')\n .addOrderBy('step.id', options.latest === false ? 'ASC' : 'DESC');\n\n if (options.latest !== false && options.limit === undefined && options.offset === undefined) {\n const step = await qb.getOne();\n if (!step) {\n throw new NotFoundException(\n `No step output found for '${stepNameOrId}' in workflow execution ${executionId}.`,\n );\n }\n return this.toStepOutputResponse(step);\n }\n\n const limit = Math.max(1, Math.min(Number(options.limit ?? 50), 200));\n const offset = Math.max(0, Number(options.offset ?? 0));\n const [steps, totalRecords] = await qb.limit(limit).offset(offset).getManyAndCount();\n\n return {\n meta: this.buildPagedMeta(offset, limit, totalRecords),\n records: steps.map((step) => this.toStepOutputResponse(step)),\n };\n }\n\n private resolveWorkflowInput(\n definitionDsl: WorkflowDefinitionDsl,\n request: WorkflowExecutionRequest,\n secrets: Record<string, any>,\n ): Record<string, any> {\n const requestedInput = request.input ?? {};\n const defaultInput = Object.entries(definitionDsl.inputs ?? {}).reduce(\n (acc, [key, inputDefinition]) => {\n if (\n inputDefinition &&\n typeof inputDefinition === 'object' &&\n !Array.isArray(inputDefinition) &&\n Object.prototype.hasOwnProperty.call(inputDefinition, 'default')\n ) {\n acc[key] = inputDefinition.default;\n return acc;\n }\n\n if (\n inputDefinition === null ||\n inputDefinition === undefined ||\n (typeof inputDefinition === 'object' && !Array.isArray(inputDefinition))\n ) {\n return acc;\n }\n\n acc[key] = inputDefinition;\n return acc;\n },\n {} as Record<string, any>,\n );\n const rawInput = {\n ...defaultInput,\n ...requestedInput,\n };\n\n return this.expression.interpolate(rawInput, {\n execution: undefined as any,\n input: rawInput,\n variables: definitionDsl.variables ?? {},\n secrets,\n outputs: {},\n });\n }\n\n private resolveWorkflowVariables(\n definitionDsl: WorkflowDefinitionDsl,\n request: WorkflowExecutionRequest,\n input: Record<string, any>,\n secrets: Record<string, any>,\n ): Record<string, any> {\n const rawVariables = {\n ...(definitionDsl.variables ?? {}),\n ...(request.variables ?? {}),\n };\n\n return this.expression.interpolate(rawVariables, {\n execution: undefined as any,\n input,\n variables: rawVariables,\n secrets,\n outputs: {},\n });\n }\n\n private async runNodes(\n nodes: WorkflowNodeDefinition[],\n context: WorkflowRuntimeContext,\n ): Promise<Record<string, any>> {\n const nodeOutputs: Record<string, any> = {};\n\n for (const node of nodes ?? []) {\n nodeOutputs[node.id] = await this.runNode(node, context);\n }\n\n return nodeOutputs;\n }\n\n private async runNode(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n ): Promise<Record<string, any>> {\n const inputPayload = {\n configuration: node.configuration,\n input: context.input,\n variables: context.variables,\n item: context.item,\n index: context.index,\n };\n\n const step = await this.writer.createStep(\n context.execution,\n node,\n this.nextStepSequence(context),\n inputPayload,\n context.parentNodeId,\n context.parentStepExecutionKey,\n );\n\n if (node.disabled) {\n context.outputs[node.id] = { skipped: true };\n await this.writer.completeStep(step, 'skipped', context.outputs[node.id]);\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.skipped',\n message: `Skipped disabled node ${node.id}.`,\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n return context.outputs[node.id];\n }\n\n try {\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.started',\n message: `Starting node ${node.id} (${node.type}).`,\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n\n this.logger.debug(\n `Starting workflow node ${node.id} (${node.type}) for execution ${context.execution.executionIdentifier}.`,\n );\n const startedAtMs = Date.now();\n const handler = this.registry.get(node.type);\n const result = await handler.execute({\n ...context,\n node,\n stepExecution: step,\n expression: this.expression,\n runNodes: async (childNodes, options = {}) =>\n this.runNodes(childNodes, {\n ...context,\n ...options,\n execution: context.execution,\n outputs: options.outputs ?? context.outputs,\n parentNodeId: node.id,\n parentStepExecutionKey: step.stepExecutionKey,\n }),\n emitLog: async (entry) => {\n await this.writer.writeLog(\n context.execution,\n step,\n entry,\n this.nextLogSequence(context),\n );\n },\n emitArtifact: async (entry) => {\n await this.writer.writeArtifact(context.execution, step, entry);\n },\n });\n\n const output = result.output ?? {};\n context.outputs[node.id] = this.getRuntimeContextOutput(node, output);\n\n for (const artifact of result.artifacts ?? []) {\n await this.writer.writeArtifact(context.execution, step, artifact);\n }\n\n await this.writer.completeStep(\n step,\n result.status ?? 'success',\n output,\n {\n item: context.item,\n index: context.index,\n },\n );\n\n await this.writer.writeLog(context.execution, step, {\n level: 'debug',\n eventType: 'node.completed',\n message: `Completed node ${node.id} (${node.type}).`,\n metadata: {\n ...this.nodeLogMetadata(node, context, step),\n status: result.status ?? 'success',\n durationMs: Date.now() - startedAtMs,\n outputSummary: this.summarizeValue(output),\n artifactCount: result.artifacts?.length ?? 0,\n },\n }, this.nextLogSequence(context));\n\n return output;\n } catch (error) {\n await this.writer.failStep(step, error);\n\n if (node.onError === 'continue') {\n context.outputs[node.id] = {\n error: error instanceof Error ? error.message : String(error),\n };\n await this.writer.writeLog(context.execution, step, {\n level: 'warn',\n eventType: 'node.failed.continued',\n message: `Node ${node.id} failed but workflow continued: ${this.errorMessage(error)}.`,\n context: this.summarizeError(error),\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n return context.outputs[node.id];\n }\n\n await this.writer.writeLog(context.execution, step, {\n level: 'error',\n eventType: 'node.failed',\n message: `Node ${node.id} failed: ${this.errorMessage(error)}.`,\n context: this.summarizeError(error),\n metadata: this.nodeLogMetadata(node, context, step),\n }, this.nextLogSequence(context));\n await this.runLocalErrorHandlers(node, context, error);\n throw error;\n }\n }\n\n private async runGlobalErrorHandlers(\n definitionDsl: WorkflowDefinitionDsl,\n context: WorkflowRuntimeContext,\n error: unknown,\n ): Promise<void> {\n const errorNodes = definitionDsl.errors ?? [];\n if (!errorNodes.length) {\n return;\n }\n\n await this.runErrorHandlers(\n errorNodes,\n context,\n error,\n 'global',\n undefined,\n undefined,\n );\n }\n\n private async runFinallyHandlers(\n definitionDsl: WorkflowDefinitionDsl,\n context: WorkflowRuntimeContext,\n ): Promise<void> {\n const finallyNodes = definitionDsl.finally ?? [];\n if (!finallyNodes.length) {\n return;\n }\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'info',\n eventType: 'finally.started',\n message: 'Running workflow finally handlers.',\n metadata: {\n handlerNodeCount: finallyNodes.length,\n },\n }, this.nextLogSequence(context));\n\n await this.runNodes(finallyNodes, context);\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'info',\n eventType: 'finally.completed',\n message: 'Workflow finally handlers completed.',\n metadata: {\n handlerNodeCount: finallyNodes.length,\n },\n }, this.nextLogSequence(context));\n }\n\n private async runLocalErrorHandlers(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n error: unknown,\n ): Promise<void> {\n const errorNodes = node.errors ?? [];\n if (!errorNodes.length) {\n return;\n }\n\n await this.runErrorHandlers(\n errorNodes,\n context,\n error,\n 'local',\n node.id,\n context.stepExecution?.stepExecutionKey,\n );\n }\n\n private async runErrorHandlers(\n errorNodes: WorkflowNodeDefinition[],\n context: WorkflowRuntimeContext,\n error: unknown,\n scope: 'global' | 'local',\n sourceNodeId?: string,\n sourceStepExecutionKey?: string,\n ): Promise<void> {\n const errorContext = this.buildErrorContext(error, sourceNodeId, sourceStepExecutionKey);\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'warn',\n eventType: `error-handler.${scope}.started`,\n message:\n scope === 'global'\n ? 'Running workflow-level error handlers.'\n : `Running local error handlers for node ${sourceNodeId}.`,\n context: errorContext,\n metadata: {\n sourceNodeId,\n sourceStepExecutionKey,\n handlerNodeCount: errorNodes.length,\n },\n }, this.nextLogSequence(context));\n\n try {\n await this.runNodes(errorNodes, {\n ...context,\n error: errorContext,\n parentNodeId: sourceNodeId ?? context.parentNodeId,\n parentStepExecutionKey:\n sourceStepExecutionKey ?? context.parentStepExecutionKey,\n });\n } catch (handlerError) {\n await this.writer.writeLog(context.execution, undefined, {\n level: 'error',\n eventType: `error-handler.${scope}.failed`,\n message: `Error handler failed: ${this.errorMessage(handlerError)}.`,\n context: this.summarizeError(handlerError),\n metadata: {\n originalError: errorContext,\n sourceNodeId,\n sourceStepExecutionKey,\n },\n }, this.nextLogSequence(context));\n return;\n }\n\n await this.writer.writeLog(context.execution, undefined, {\n level: 'info',\n eventType: `error-handler.${scope}.completed`,\n message:\n scope === 'global'\n ? 'Workflow-level error handlers completed.'\n : `Local error handlers completed for node ${sourceNodeId}.`,\n context: errorContext,\n metadata: {\n sourceNodeId,\n sourceStepExecutionKey,\n },\n }, this.nextLogSequence(context));\n }\n\n private buildErrorContext(\n error: unknown,\n nodeId?: string,\n stepExecutionKey?: string,\n ): Record<string, any> {\n const summary = this.summarizeError(error);\n return {\n ...summary,\n message: this.errorMessage(error),\n nodeId,\n stepExecutionKey,\n };\n }\n\n private assertDefinitionYaml(value: any): WorkflowDefinitionDsl {\n if (!value || typeof value !== 'string') {\n throw new BadRequestException(\n 'Workflow definition YAML must be stored as a string.',\n );\n }\n\n let parsed: unknown;\n try {\n parsed = YAML.parse(value);\n } catch (error: any) {\n throw new BadRequestException(\n error?.message ?? 'Workflow definition YAML could not be parsed.',\n );\n }\n\n if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {\n throw new BadRequestException(\n 'Workflow definition YAML must resolve to an object with a nodes array.',\n );\n }\n\n if (!Array.isArray((parsed as WorkflowDefinitionDsl).nodes)) {\n throw new BadRequestException(\n 'Workflow definition YAML must include a nodes array.',\n );\n }\n\n return parsed as WorkflowDefinitionDsl;\n }\n\n private readEnqueuedExecutionRequest(execution: WorkflowExecution): WorkflowExecutionRequest {\n const payload = execution.inputPayload;\n if (!payload || typeof payload !== 'object' || Array.isArray(payload)) {\n return {\n triggerType: execution.triggerType,\n requestedByUserId: execution.requestedByUserId as any,\n };\n }\n\n return {\n ...(payload as WorkflowExecutionRequest),\n triggerType: (payload as WorkflowExecutionRequest).triggerType ?? execution.triggerType,\n requestedByUserId:\n (payload as WorkflowExecutionRequest).requestedByUserId ??\n (execution.requestedByUserId as any),\n };\n }\n\n private async findExecutionOrThrow(executionId: number): Promise<WorkflowExecution> {\n const execution = await this.entityManager.findOne(WorkflowExecution, {\n where: { id: executionId } as any,\n });\n\n if (!execution) {\n throw new NotFoundException(`Workflow execution ${executionId} not found.`);\n }\n\n return execution;\n }\n\n private toStepOutputResponse(step: WorkflowStepExecution) {\n return {\n id: step.id,\n stepExecutionKey: step.stepExecutionKey,\n nodeId: step.nodeId,\n nodeName: step.nodeName,\n nodeType: step.nodeType,\n nodeKind: step.nodeKind,\n sequenceNumber: step.sequenceNumber,\n attemptNumber: step.attemptNumber,\n status: step.status,\n startedAt: step.startedAt,\n finishedAt: step.finishedAt,\n durationMs: step.durationMs as any,\n runtimeContext: step.runtimeContext,\n outputPayload: step.outputPayload,\n errorSummary: step.errorSummary,\n };\n }\n\n private buildPagedMeta(offset: number, limit: number, totalRecords: number) {\n const currentPage = limit ? Math.floor(offset / limit) + 1 : 1;\n const totalPages = limit ? Math.max(1, Math.ceil(totalRecords / limit)) : 1;\n return {\n totalRecords,\n currentPage,\n nextPage: currentPage < totalPages ? currentPage + 1 : null,\n prevPage: currentPage > 1 ? currentPage - 1 : null,\n totalPages,\n perPage: limit,\n };\n }\n\n private toResponse(execution: WorkflowExecution): WorkflowExecutionResponse {\n return {\n id: execution.id,\n executionIdentifier: execution.executionIdentifier,\n workflowKey: execution.workflowKey,\n status: execution.status as any,\n startedAt: execution.startedAt,\n finishedAt: execution.finishedAt,\n durationMs: execution.durationMs as any,\n outputPayload: execution.outputPayload,\n errorSummary: execution.errorSummary,\n };\n }\n\n private nextStepSequence(context: WorkflowRuntimeContext): number {\n context.counters = context.counters ?? { step: 0, log: 0 };\n context.counters.step += 1;\n return context.counters.step;\n }\n\n private nextLogSequence(context: WorkflowRuntimeContext): number {\n context.counters = context.counters ?? { step: 0, log: 0 };\n context.counters.log += 1;\n return context.counters.log;\n }\n\n private countNodes(nodes: WorkflowNodeDefinition[] = []): number {\n return nodes.reduce((count, node) => {\n const nestedNodes = [\n ...(node.tasks ?? []),\n ...(node.then ?? []),\n ...(node.else ?? []),\n ...(node.defaults ?? []),\n ...(node.errors ?? []),\n ...Object.values(node.cases ?? {}).flat(),\n ];\n\n return count + 1 + this.countNodes(nestedNodes);\n }, 0);\n }\n\n private nodeLogMetadata(\n node: WorkflowNodeDefinition,\n context: WorkflowRuntimeContext,\n step?: WorkflowStepExecution,\n ) {\n return {\n executionIdentifier: context.execution.executionIdentifier,\n stepExecutionKey: step?.stepExecutionKey,\n nodeId: node.id,\n nodeName: node.name,\n nodeType: node.type,\n nodeKind: node.kind,\n parentNodeId: context.parentNodeId,\n parentStepExecutionKey: context.parentStepExecutionKey,\n index: context.index,\n hasItem: context.item !== undefined,\n configurationKeys:\n node.configuration && typeof node.configuration === 'object'\n ? Object.keys(node.configuration)\n : [],\n availableInputKeys: Object.keys(context.input ?? {}),\n availableVariableKeys: Object.keys(context.variables ?? {}),\n availableOutputNodeIds: Object.keys(context.outputs ?? {}),\n };\n }\n\n private getRuntimeContextOutput(\n node: WorkflowNodeDefinition,\n output: Record<string, any>,\n ): Record<string, any> {\n const hiddenOutputPaths =\n this.registry\n .getMetadata(node.type)\n .authoring?.outputs?.filter(\n (definition) => definition.includeInRuntimeContext === false,\n )\n .map((definition) => definition.path ?? definition.key)\n .filter(Boolean) ?? [];\n\n if (!hiddenOutputPaths.length || !output || typeof output !== 'object') {\n return output;\n }\n\n const runtimeOutput = this.cloneOutput(output);\n hiddenOutputPaths.forEach((path) => {\n this.deletePath(runtimeOutput, path);\n });\n\n return runtimeOutput;\n }\n\n private cloneOutput(output: Record<string, any>): Record<string, any> {\n if (typeof structuredClone === 'function') {\n return structuredClone(output);\n }\n\n return JSON.parse(JSON.stringify(output));\n }\n\n private deletePath(target: Record<string, any>, path: string) {\n const parts = path.split('.').filter(Boolean);\n if (!parts.length) {\n return;\n }\n\n let cursor: any = target;\n for (let index = 0; index < parts.length - 1; index += 1) {\n cursor = cursor?.[parts[index]];\n if (!cursor || typeof cursor !== 'object') {\n return;\n }\n }\n\n if (cursor && typeof cursor === 'object') {\n delete cursor[parts[parts.length - 1]];\n }\n }\n\n private summarizeValue(value: any): any {\n if (Array.isArray(value)) {\n return {\n type: 'array',\n length: value.length,\n };\n }\n\n if (value && typeof value === 'object') {\n return {\n type: 'object',\n keys: Object.keys(value),\n };\n }\n\n return {\n type: value === null ? 'null' : typeof value,\n empty: value === undefined || value === null || value === '',\n };\n }\n\n private errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n }\n\n private summarizeError(error: unknown): any {\n if (error instanceof Error) {\n return {\n name: error.name,\n message: error.message,\n stack: error.stack,\n };\n }\n\n return { error };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"solid-core.module.d.ts","sourceRoot":"","sources":["../src/solid-core.module.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,CAAC;AAydhB,qBA2mBa,eAAe;CAAG"}
1
+ {"version":3,"file":"solid-core.module.d.ts","sourceRoot":"","sources":["../src/solid-core.module.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,CAAC;AA0gBhB,qBA6pBa,eAAe;CAAI"}
@@ -204,7 +204,6 @@ const locale_controller_1 = require("./controllers/locale.controller");
204
204
  const role_metadata_controller_1 = require("./controllers/role-metadata.controller");
205
205
  const saved_filters_controller_1 = require("./controllers/saved-filters.controller");
206
206
  const scheduled_job_controller_1 = require("./controllers/scheduled-job.controller");
207
- const agent_session_controller_1 = require("./controllers/agent-session.controller");
208
207
  const agent_event_controller_1 = require("./controllers/agent-event.controller");
209
208
  const mcp_audit_log_controller_1 = require("./controllers/mcp-audit-log.controller");
210
209
  const security_rule_controller_1 = require("./controllers/security-rule.controller");
@@ -224,7 +223,6 @@ const locale_entity_1 = require("./entities/locale.entity");
224
223
  const role_metadata_entity_1 = require("./entities/role-metadata.entity");
225
224
  const saved_filters_entity_1 = require("./entities/saved-filters.entity");
226
225
  const scheduled_job_entity_1 = require("./entities/scheduled-job.entity");
227
- const agent_session_entity_1 = require("./entities/agent-session.entity");
228
226
  const agent_event_entity_1 = require("./entities/agent-event.entity");
229
227
  const mcp_audit_log_entity_1 = require("./entities/mcp-audit-log.entity");
230
228
  const security_rule_entity_1 = require("./entities/security-rule.entity");
@@ -292,7 +290,6 @@ const permission_metadata_repository_1 = require("./repository/permission-metada
292
290
  const role_metadata_repository_1 = require("./repository/role-metadata.repository");
293
291
  const saved_filters_repository_1 = require("./repository/saved-filters.repository");
294
292
  const scheduled_job_repository_1 = require("./repository/scheduled-job.repository");
295
- const agent_session_repository_1 = require("./repository/agent-session.repository");
296
293
  const agent_event_repository_1 = require("./repository/agent-event.repository");
297
294
  const mcp_audit_log_repository_1 = require("./repository/mcp-audit-log.repository");
298
295
  const security_rule_repository_1 = require("./repository/security-rule.repository");
@@ -341,7 +338,6 @@ const request_context_service_1 = require("./services/request-context.service");
341
338
  const role_metadata_service_1 = require("./services/role-metadata.service");
342
339
  const saved_filters_service_1 = require("./services/saved-filters.service");
343
340
  const scheduled_job_service_1 = require("./services/scheduled-job.service");
344
- const agent_session_service_1 = require("./services/agent-session.service");
345
341
  const agent_event_service_1 = require("./services/agent-event.service");
346
342
  const mcp_audit_log_service_1 = require("./services/mcp-audit-log.service");
347
343
  const scheduler_service_1 = require("./services/scheduled-jobs/scheduler.service");
@@ -395,14 +391,14 @@ const workflow_step_execution_entity_1 = require("./entities/workflow-step-execu
395
391
  const workflow_execution_log_entity_1 = require("./entities/workflow-execution-log.entity");
396
392
  const workflow_execution_artifact_entity_1 = require("./entities/workflow-execution-artifact.entity");
397
393
  const workflow_trigger_execution_entity_1 = require("./entities/workflow-trigger-execution.entity");
398
- const workflow_secret_entity_1 = require("./entities/workflow-secret.entity");
394
+ const secret_entity_1 = require("./entities/secret.entity");
399
395
  const workflow_definition_controller_1 = require("./controllers/workflow-definition.controller");
400
396
  const workflow_execution_controller_1 = require("./controllers/workflow-execution.controller");
401
397
  const workflow_step_execution_controller_1 = require("./controllers/workflow-step-execution.controller");
402
398
  const workflow_execution_log_controller_1 = require("./controllers/workflow-execution-log.controller");
403
399
  const workflow_execution_artifact_controller_1 = require("./controllers/workflow-execution-artifact.controller");
404
400
  const workflow_trigger_execution_controller_1 = require("./controllers/workflow-trigger-execution.controller");
405
- const workflow_secret_controller_1 = require("./controllers/workflow-secret.controller");
401
+ const secret_controller_1 = require("./controllers/secret.controller");
406
402
  const workflow_definition_service_1 = require("./services/workflow-definition.service");
407
403
  const workflow_definition_metadata_sync_service_1 = require("./services/workflow/workflow-definition-metadata-sync.service");
408
404
  const workflow_execution_service_1 = require("./services/workflow-execution.service");
@@ -410,14 +406,14 @@ const workflow_step_execution_service_1 = require("./services/workflow-step-exec
410
406
  const workflow_execution_log_service_1 = require("./services/workflow-execution-log.service");
411
407
  const workflow_execution_artifact_service_1 = require("./services/workflow-execution-artifact.service");
412
408
  const workflow_trigger_execution_service_1 = require("./services/workflow-trigger-execution.service");
413
- const workflow_secret_service_1 = require("./services/workflow-secret.service");
409
+ const secret_service_1 = require("./services/secret.service");
414
410
  const workflow_definition_repository_1 = require("./repository/workflow-definition.repository");
415
411
  const workflow_execution_repository_1 = require("./repository/workflow-execution.repository");
416
412
  const workflow_step_execution_repository_1 = require("./repository/workflow-step-execution.repository");
417
413
  const workflow_execution_log_repository_1 = require("./repository/workflow-execution-log.repository");
418
414
  const workflow_execution_artifact_repository_1 = require("./repository/workflow-execution-artifact.repository");
419
415
  const workflow_trigger_execution_repository_1 = require("./repository/workflow-trigger-execution.repository");
420
- const workflow_secret_repository_1 = require("./repository/workflow-secret.repository");
416
+ const secret_repository_1 = require("./repository/secret.repository");
421
417
  const workflow_definition_validator_service_1 = require("./services/workflow/workflow-definition-validator.service");
422
418
  const workflow_execution_writer_service_1 = require("./services/workflow/workflow-execution-writer.service");
423
419
  const workflow_expression_service_1 = require("./services/workflow/workflow-expression.service");
@@ -439,6 +435,56 @@ const solidx_login_node_1 = require("./services/workflow/nodes/solidx-login.node
439
435
  const solidx_send_email_node_1 = require("./services/workflow/nodes/solidx-send-email.node");
440
436
  const solidx_send_sms_node_1 = require("./services/workflow/nodes/solidx-send-sms.node");
441
437
  const switch_node_1 = require("./services/workflow/nodes/switch.node");
438
+ const agent_registry_entity_1 = require("./entities/agent-registry.entity");
439
+ const agent_tool_registry_entity_1 = require("./entities/agent-tool-registry.entity");
440
+ const agent_skill_registry_entity_1 = require("./entities/agent-skill-registry.entity");
441
+ const agent_tool_entity_1 = require("./entities/agent-tool.entity");
442
+ const agent_skill_entity_1 = require("./entities/agent-skill.entity");
443
+ const agent_secret_entity_1 = require("./entities/agent-secret.entity");
444
+ const agent_process_entity_1 = require("./entities/agent-process.entity");
445
+ const agent_session_entity_1 = require("./entities/agent-session.entity");
446
+ const agent_job_entity_1 = require("./entities/agent-job.entity");
447
+ const agent_role_entity_1 = require("./entities/agent-role.entity");
448
+ const agent_session_checkpoint_entity_1 = require("./entities/agent-session-checkpoint.entity");
449
+ const agent_human_request_entity_1 = require("./entities/agent-human-request.entity");
450
+ const agent_registry_controller_1 = require("./controllers/agent-registry.controller");
451
+ const agent_embed_controller_1 = require("./controllers/agent-embed.controller");
452
+ const agent_tool_registry_controller_1 = require("./controllers/agent-tool-registry.controller");
453
+ const agent_skill_registry_controller_1 = require("./controllers/agent-skill-registry.controller");
454
+ const agent_tool_controller_1 = require("./controllers/agent-tool.controller");
455
+ const agent_skill_controller_1 = require("./controllers/agent-skill.controller");
456
+ const agent_role_controller_1 = require("./controllers/agent-role.controller");
457
+ const agent_secret_controller_1 = require("./controllers/agent-secret.controller");
458
+ const agent_process_controller_1 = require("./controllers/agent-process.controller");
459
+ const agent_session_controller_1 = require("./controllers/agent-session.controller");
460
+ const agent_job_controller_1 = require("./controllers/agent-job.controller");
461
+ const agent_session_checkpoint_controller_1 = require("./controllers/agent-session-checkpoint.controller");
462
+ const agent_human_request_controller_1 = require("./controllers/agent-human-request.controller");
463
+ const agent_human_request_repository_1 = require("./repository/agent-human-request.repository");
464
+ const agent_human_request_service_1 = require("./services/agent-human-request.service");
465
+ const agent_session_checkpoint_repository_1 = require("./repository/agent-session-checkpoint.repository");
466
+ const agent_session_checkpoint_service_1 = require("./services/agent-session-checkpoint.service");
467
+ const agent_session_repository_1 = require("./repository/agent-session.repository");
468
+ const agent_job_repository_1 = require("./repository/agent-job.repository");
469
+ const agent_process_repository_1 = require("./repository/agent-process.repository");
470
+ const agent_registry_repository_1 = require("./repository/agent-registry.repository");
471
+ const agent_role_repository_1 = require("./repository/agent-role.repository");
472
+ const agent_secret_repository_1 = require("./repository/agent-secret.repository");
473
+ const agent_skill_repository_1 = require("./repository/agent-skill.repository");
474
+ const agent_tool_repository_1 = require("./repository/agent-tool.repository");
475
+ const agent_skill_registry_repository_1 = require("./repository/agent-skill-registry.repository");
476
+ const agent_tool_registry_repository_1 = require("./repository/agent-tool-registry.repository");
477
+ const agent_session_service_1 = require("./services/agent-session.service");
478
+ const agent_job_service_1 = require("./services/agent-job.service");
479
+ const agent_process_service_1 = require("./services/agent-process.service");
480
+ const agent_hub_process_manager_service_1 = require("./services/agent-hub-process-manager.service");
481
+ const agent_registry_service_1 = require("./services/agent-registry.service");
482
+ const agent_role_service_1 = require("./services/agent-role.service");
483
+ const agent_secret_service_1 = require("./services/agent-secret.service");
484
+ const agent_skill_service_1 = require("./services/agent-skill.service");
485
+ const agent_tool_service_1 = require("./services/agent-tool.service");
486
+ const agent_skill_registry_service_1 = require("./services/agent-skill-registry.service");
487
+ const agent_tool_registry_service_1 = require("./services/agent-tool-registry.service");
442
488
  let SolidCoreModule = class SolidCoreModule {
443
489
  };
444
490
  exports.SolidCoreModule = SolidCoreModule;
@@ -470,7 +516,6 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
470
516
  role_metadata_entity_1.RoleMetadata,
471
517
  saved_filters_entity_1.SavedFilters,
472
518
  scheduled_job_entity_1.ScheduledJob,
473
- agent_session_entity_1.AgentSession,
474
519
  agent_event_entity_1.AgentEvent,
475
520
  mcp_audit_log_entity_1.McpAuditLog,
476
521
  security_rule_entity_1.SecurityRule,
@@ -489,7 +534,19 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
489
534
  workflow_execution_log_entity_1.WorkflowExecutionLog,
490
535
  workflow_execution_artifact_entity_1.WorkflowExecutionArtifact,
491
536
  workflow_trigger_execution_entity_1.WorkflowTriggerExecution,
492
- workflow_secret_entity_1.WorkflowSecret,
537
+ secret_entity_1.Secret,
538
+ agent_registry_entity_1.AgentRegistry,
539
+ agent_tool_registry_entity_1.AgentToolRegistry,
540
+ agent_skill_registry_entity_1.AgentSkillRegistry,
541
+ agent_tool_entity_1.AgentTool,
542
+ agent_skill_entity_1.AgentSkill,
543
+ agent_role_entity_1.AgentRole,
544
+ agent_secret_entity_1.AgentSecret,
545
+ agent_process_entity_1.AgentProcess,
546
+ agent_session_entity_1.AgentSession,
547
+ agent_job_entity_1.AgentJob,
548
+ agent_session_checkpoint_entity_1.AgentSessionCheckpoint,
549
+ agent_human_request_entity_1.AgentHumanRequest
493
550
  ]),
494
551
  cache_manager_1.CacheModule.registerAsync(cache_options_1.CacheManagerOptions),
495
552
  schedule_1.ScheduleModule.forRoot(),
@@ -569,7 +626,6 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
569
626
  role_metadata_controller_1.RoleMetadataController,
570
627
  saved_filters_controller_1.SavedFiltersController,
571
628
  scheduled_job_controller_1.ScheduledJobController,
572
- agent_session_controller_1.AgentSessionController,
573
629
  agent_event_controller_1.AgentEventController,
574
630
  mcp_audit_log_controller_1.McpAuditLogController,
575
631
  security_rule_controller_1.SecurityRuleController,
@@ -592,7 +648,20 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
592
648
  workflow_execution_log_controller_1.WorkflowExecutionLogController,
593
649
  workflow_execution_artifact_controller_1.WorkflowExecutionArtifactController,
594
650
  workflow_trigger_execution_controller_1.WorkflowTriggerExecutionController,
595
- workflow_secret_controller_1.WorkflowSecretController,
651
+ secret_controller_1.SecretController,
652
+ agent_registry_controller_1.AgentRegistryController,
653
+ agent_embed_controller_1.AgentEmbedController,
654
+ agent_tool_registry_controller_1.AgentToolRegistryController,
655
+ agent_skill_registry_controller_1.AgentSkillRegistryController,
656
+ agent_tool_controller_1.AgentToolController,
657
+ agent_skill_controller_1.AgentSkillController,
658
+ agent_role_controller_1.AgentRoleController,
659
+ agent_secret_controller_1.AgentSecretController,
660
+ agent_process_controller_1.AgentProcessController,
661
+ agent_session_controller_1.AgentSessionController,
662
+ agent_job_controller_1.AgentJobController,
663
+ agent_session_checkpoint_controller_1.AgentSessionCheckpointController,
664
+ agent_human_request_controller_1.AgentHumanRequestController
596
665
  ],
597
666
  providers: [
598
667
  {
@@ -856,10 +925,8 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
856
925
  solid_ts_morph_service_1.SolidTsMorphService,
857
926
  view_metadata_repository_1.ViewMetadataRepository,
858
927
  scheduled_job_repository_1.ScheduledJobRepository,
859
- agent_session_repository_1.AgentSessionRepository,
860
928
  agent_event_repository_1.AgentEventRepository,
861
929
  mcp_audit_log_repository_1.McpAuditLogRepository,
862
- agent_session_service_1.AgentSessionService,
863
930
  agent_event_service_1.AgentEventService,
864
931
  mcp_audit_log_service_1.McpAuditLogService,
865
932
  scheduled_job_subscriber_1.ScheduledJobSubscriber,
@@ -917,8 +984,8 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
917
984
  workflow_execution_artifact_repository_1.WorkflowExecutionArtifactRepository,
918
985
  workflow_trigger_execution_service_1.WorkflowTriggerExecutionService,
919
986
  workflow_trigger_execution_repository_1.WorkflowTriggerExecutionRepository,
920
- workflow_secret_service_1.WorkflowSecretService,
921
- workflow_secret_repository_1.WorkflowSecretRepository,
987
+ secret_service_1.SecretService,
988
+ secret_repository_1.SecretRepository,
922
989
  workflow_invocation_service_1.WorkflowInvocationService,
923
990
  workflow_runtime_service_1.WorkflowRuntimeService,
924
991
  workflow_execution_writer_service_1.WorkflowExecutionWriterService,
@@ -945,6 +1012,31 @@ exports.SolidCoreModule = SolidCoreModule = __decorate([
945
1012
  solidx_crud_nodes_1.SolidXDeleteNode,
946
1013
  solidx_send_email_node_1.SolidXSendEmailNode,
947
1014
  solidx_send_sms_node_1.SolidXSendSmsNode,
1015
+ agent_registry_service_1.AgentRegistryService,
1016
+ agent_registry_repository_1.AgentRegistryRepository,
1017
+ agent_tool_registry_service_1.AgentToolRegistryService,
1018
+ agent_tool_registry_repository_1.AgentToolRegistryRepository,
1019
+ agent_skill_registry_service_1.AgentSkillRegistryService,
1020
+ agent_skill_registry_repository_1.AgentSkillRegistryRepository,
1021
+ agent_tool_service_1.AgentToolService,
1022
+ agent_tool_repository_1.AgentToolRepository,
1023
+ agent_skill_service_1.AgentSkillService,
1024
+ agent_skill_repository_1.AgentSkillRepository,
1025
+ agent_role_service_1.AgentRoleService,
1026
+ agent_role_repository_1.AgentRoleRepository,
1027
+ agent_secret_service_1.AgentSecretService,
1028
+ agent_secret_repository_1.AgentSecretRepository,
1029
+ agent_process_service_1.AgentProcessService,
1030
+ agent_hub_process_manager_service_1.AgentHubProcessManagerService,
1031
+ agent_process_repository_1.AgentProcessRepository,
1032
+ agent_session_service_1.AgentSessionService,
1033
+ agent_session_repository_1.AgentSessionRepository,
1034
+ agent_job_service_1.AgentJobService,
1035
+ agent_job_repository_1.AgentJobRepository,
1036
+ agent_session_checkpoint_service_1.AgentSessionCheckpointService,
1037
+ agent_session_checkpoint_repository_1.AgentSessionCheckpointRepository,
1038
+ agent_human_request_service_1.AgentHumanRequestService,
1039
+ agent_human_request_repository_1.AgentHumanRequestRepository
948
1040
  ],
949
1041
  exports: [
950
1042
  access_token_denylist_service_1.AccessTokenDenylistService,