@adonis-agora/durable 1.0.0-rc.2 → 1.0.0-rc.21

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 (398) hide show
  1. package/CHANGELOG.md +204 -0
  2. package/dist/assets/spa/assets/index-BgoNV3TR.css +1 -0
  3. package/dist/assets/spa/assets/index-DzXygyDm.js +57 -0
  4. package/dist/assets/spa/assets/index-DzXygyDm.js.map +1 -0
  5. package/dist/assets/spa/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  6. package/dist/assets/spa/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  7. package/dist/assets/spa/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  8. package/dist/assets/spa/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  9. package/dist/assets/spa/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
  10. package/dist/assets/spa/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
  11. package/dist/assets/spa/assets/sora-latin-400-normal-CRt88UEn.woff2 +0 -0
  12. package/dist/assets/spa/assets/sora-latin-400-normal-OW7qkl5a.woff +0 -0
  13. package/dist/assets/spa/assets/sora-latin-500-normal-01eiPEn0.woff2 +0 -0
  14. package/dist/assets/spa/assets/sora-latin-500-normal-w58xtEt9.woff +0 -0
  15. package/dist/assets/spa/assets/sora-latin-600-normal-1_7fyUAY.woff +0 -0
  16. package/dist/assets/spa/assets/sora-latin-600-normal-Cdg4DaK0.woff2 +0 -0
  17. package/dist/assets/spa/assets/sora-latin-700-normal-9waGdLWo.woff2 +0 -0
  18. package/dist/assets/spa/assets/sora-latin-700-normal-BKPfQAnC.woff +0 -0
  19. package/dist/assets/spa/index.html +2 -8
  20. package/dist/commands/agora_doctor.d.ts +23 -0
  21. package/dist/commands/agora_doctor.d.ts.map +1 -0
  22. package/dist/commands/agora_doctor.js +110 -0
  23. package/dist/commands/agora_doctor.js.map +1 -0
  24. package/dist/commands/durable_doctor.d.ts +8 -0
  25. package/dist/commands/durable_doctor.d.ts.map +1 -0
  26. package/dist/commands/durable_doctor.js +8 -0
  27. package/dist/commands/durable_doctor.js.map +1 -0
  28. package/dist/commands/durable_worker.d.ts +3 -3
  29. package/dist/commands/durable_worker.js +7 -7
  30. package/dist/commands/durable_worker.js.map +1 -1
  31. package/dist/commands/health.d.ts +12 -0
  32. package/dist/commands/health.d.ts.map +1 -0
  33. package/dist/commands/health.js +34 -0
  34. package/dist/commands/health.js.map +1 -0
  35. package/dist/commands/lifecycle_republish.d.ts +8 -9
  36. package/dist/commands/lifecycle_republish.d.ts.map +1 -1
  37. package/dist/commands/lifecycle_republish.js +29 -16
  38. package/dist/commands/lifecycle_republish.js.map +1 -1
  39. package/dist/commands/main.d.ts +25 -5
  40. package/dist/commands/main.d.ts.map +1 -1
  41. package/dist/commands/main.js +54 -7
  42. package/dist/commands/main.js.map +1 -1
  43. package/dist/commands/runs.d.ts +9 -16
  44. package/dist/commands/runs.d.ts.map +1 -1
  45. package/dist/commands/runs.js +60 -47
  46. package/dist/commands/runs.js.map +1 -1
  47. package/dist/commands/runs_bulk.d.ts +17 -0
  48. package/dist/commands/runs_bulk.d.ts.map +1 -0
  49. package/dist/commands/runs_bulk.js +76 -0
  50. package/dist/commands/runs_bulk.js.map +1 -0
  51. package/dist/commands/runs_cancel.d.ts +15 -0
  52. package/dist/commands/runs_cancel.d.ts.map +1 -0
  53. package/dist/commands/runs_cancel.js +39 -0
  54. package/dist/commands/runs_cancel.js.map +1 -0
  55. package/dist/commands/runs_continue.d.ts +12 -0
  56. package/dist/commands/runs_continue.d.ts.map +1 -0
  57. package/dist/commands/runs_continue.js +28 -0
  58. package/dist/commands/runs_continue.js.map +1 -0
  59. package/dist/commands/runs_event.d.ts +13 -0
  60. package/dist/commands/runs_event.d.ts.map +1 -0
  61. package/dist/commands/runs_event.js +28 -0
  62. package/dist/commands/runs_event.js.map +1 -0
  63. package/dist/commands/runs_fan.d.ts +16 -0
  64. package/dist/commands/runs_fan.d.ts.map +1 -0
  65. package/dist/commands/runs_fan.js +58 -0
  66. package/dist/commands/runs_fan.js.map +1 -0
  67. package/dist/commands/runs_redispatch.d.ts +14 -0
  68. package/dist/commands/runs_redispatch.d.ts.map +1 -0
  69. package/dist/commands/runs_redispatch.js +35 -0
  70. package/dist/commands/runs_redispatch.js.map +1 -0
  71. package/dist/commands/runs_replay.d.ts +14 -0
  72. package/dist/commands/runs_replay.d.ts.map +1 -0
  73. package/dist/commands/runs_replay.js +38 -0
  74. package/dist/commands/runs_replay.js.map +1 -0
  75. package/dist/commands/runs_retry.d.ts +13 -0
  76. package/dist/commands/runs_retry.d.ts.map +1 -0
  77. package/dist/commands/runs_retry.js +29 -0
  78. package/dist/commands/runs_retry.js.map +1 -0
  79. package/dist/commands/runs_show.d.ts +14 -0
  80. package/dist/commands/runs_show.d.ts.map +1 -0
  81. package/dist/commands/runs_show.js +96 -0
  82. package/dist/commands/runs_show.js.map +1 -0
  83. package/dist/commands/runs_signal.d.ts +17 -0
  84. package/dist/commands/runs_signal.d.ts.map +1 -0
  85. package/dist/commands/runs_signal.js +49 -0
  86. package/dist/commands/runs_signal.js.map +1 -0
  87. package/dist/commands/runs_update.d.ts +15 -0
  88. package/dist/commands/runs_update.d.ts.map +1 -0
  89. package/dist/commands/runs_update.js +39 -0
  90. package/dist/commands/runs_update.js.map +1 -0
  91. package/dist/commands/runs_values.d.ts +15 -0
  92. package/dist/commands/runs_values.d.ts.map +1 -0
  93. package/dist/commands/runs_values.js +45 -0
  94. package/dist/commands/runs_values.js.map +1 -0
  95. package/dist/commands/schedules.d.ts +18 -0
  96. package/dist/commands/schedules.d.ts.map +1 -0
  97. package/dist/commands/schedules.js +70 -0
  98. package/dist/commands/schedules.js.map +1 -0
  99. package/dist/commands/schedules_pause.d.ts +16 -0
  100. package/dist/commands/schedules_pause.d.ts.map +1 -0
  101. package/dist/commands/schedules_pause.js +40 -0
  102. package/dist/commands/schedules_pause.js.map +1 -0
  103. package/dist/commands/schedules_resume.d.ts +8 -0
  104. package/dist/commands/schedules_resume.d.ts.map +1 -0
  105. package/dist/commands/schedules_resume.js +8 -0
  106. package/dist/commands/schedules_resume.js.map +1 -0
  107. package/dist/commands/schedules_trigger.d.ts +13 -0
  108. package/dist/commands/schedules_trigger.d.ts.map +1 -0
  109. package/dist/commands/schedules_trigger.js +32 -0
  110. package/dist/commands/schedules_trigger.js.map +1 -0
  111. package/dist/commands/tasks_complete.d.ts +15 -0
  112. package/dist/commands/tasks_complete.d.ts.map +1 -0
  113. package/dist/commands/tasks_complete.js +41 -0
  114. package/dist/commands/tasks_complete.js.map +1 -0
  115. package/dist/commands/tasks_fail.d.ts +16 -0
  116. package/dist/commands/tasks_fail.d.ts.map +1 -0
  117. package/dist/commands/tasks_fail.js +47 -0
  118. package/dist/commands/tasks_fail.js.map +1 -0
  119. package/dist/commands/workers.d.ts +11 -0
  120. package/dist/commands/workers.d.ts.map +1 -0
  121. package/dist/commands/workers.js +35 -0
  122. package/dist/commands/workers.js.map +1 -0
  123. package/dist/commands/workflows_lifecycle.d.ts +12 -0
  124. package/dist/commands/workflows_lifecycle.d.ts.map +1 -0
  125. package/dist/commands/workflows_lifecycle.js +37 -0
  126. package/dist/commands/workflows_lifecycle.js.map +1 -0
  127. package/dist/configure.d.ts +2 -2
  128. package/dist/configure.js +2 -2
  129. package/dist/providers/dashboard_provider.d.ts +57 -54
  130. package/dist/providers/dashboard_provider.d.ts.map +1 -1
  131. package/dist/providers/dashboard_provider.js +399 -288
  132. package/dist/providers/dashboard_provider.js.map +1 -1
  133. package/dist/providers/durable_provider.d.ts.map +1 -1
  134. package/dist/providers/durable_provider.js +67 -37
  135. package/dist/providers/durable_provider.js.map +1 -1
  136. package/dist/src/commands/console_command.d.ts +82 -0
  137. package/dist/src/commands/console_command.d.ts.map +1 -0
  138. package/dist/src/commands/console_command.js +238 -0
  139. package/dist/src/commands/console_command.js.map +1 -0
  140. package/dist/src/commands/runs.js +2 -2
  141. package/dist/src/commands/runs.js.map +1 -1
  142. package/dist/src/concurrency.d.ts.map +1 -1
  143. package/dist/src/concurrency.js +1 -0
  144. package/dist/src/concurrency.js.map +1 -1
  145. package/dist/src/config_types.d.ts +79 -26
  146. package/dist/src/config_types.d.ts.map +1 -1
  147. package/dist/src/dashboard/access_denied_page.d.ts +5 -7
  148. package/dist/src/dashboard/access_denied_page.d.ts.map +1 -1
  149. package/dist/src/dashboard/access_denied_page.js +2 -6
  150. package/dist/src/dashboard/access_denied_page.js.map +1 -1
  151. package/dist/src/dashboard/audit.d.ts +14 -0
  152. package/dist/src/dashboard/audit.d.ts.map +1 -0
  153. package/dist/src/dashboard/audit.js +36 -0
  154. package/dist/src/dashboard/audit.js.map +1 -0
  155. package/dist/src/dashboard/console_authorize.d.ts +98 -0
  156. package/dist/src/dashboard/console_authorize.d.ts.map +1 -0
  157. package/dist/src/dashboard/console_authorize.js +163 -0
  158. package/dist/src/dashboard/console_authorize.js.map +1 -0
  159. package/dist/src/dashboard/console_shell.d.ts +45 -0
  160. package/dist/src/dashboard/console_shell.d.ts.map +1 -0
  161. package/dist/src/dashboard/console_shell.js +125 -0
  162. package/dist/src/dashboard/console_shell.js.map +1 -0
  163. package/dist/src/dashboard/console_switcher.d.ts +132 -0
  164. package/dist/src/dashboard/console_switcher.d.ts.map +1 -0
  165. package/dist/src/dashboard/console_switcher.js +201 -0
  166. package/dist/src/dashboard/console_switcher.js.map +1 -0
  167. package/dist/src/dashboard/define_config.d.ts +68 -81
  168. package/dist/src/dashboard/define_config.d.ts.map +1 -1
  169. package/dist/src/dashboard/define_config.js +18 -112
  170. package/dist/src/dashboard/define_config.js.map +1 -1
  171. package/dist/src/dashboard/dev_tools.d.ts +102 -0
  172. package/dist/src/dashboard/dev_tools.d.ts.map +1 -0
  173. package/dist/src/dashboard/dev_tools.js +502 -0
  174. package/dist/src/dashboard/dev_tools.js.map +1 -0
  175. package/dist/src/dashboard/diagnostics-recorder.d.ts +1 -1
  176. package/dist/src/dashboard/diagnostics-recorder.js +1 -1
  177. package/dist/src/dashboard/gateway-adapter.d.ts +6 -6
  178. package/dist/src/dashboard/gateway-adapter.d.ts.map +1 -1
  179. package/dist/src/dashboard/gateway-adapter.js +5 -5
  180. package/dist/src/dashboard/gateway-adapter.js.map +1 -1
  181. package/dist/src/dashboard/handlers.d.ts +48 -39
  182. package/dist/src/dashboard/handlers.d.ts.map +1 -1
  183. package/dist/src/dashboard/handlers.js +181 -83
  184. package/dist/src/dashboard/handlers.js.map +1 -1
  185. package/dist/src/dashboard/index.d.ts +12 -9
  186. package/dist/src/dashboard/index.d.ts.map +1 -1
  187. package/dist/src/dashboard/index.js +10 -7
  188. package/dist/src/dashboard/index.js.map +1 -1
  189. package/dist/src/dashboard/list-filters.d.ts +27 -0
  190. package/dist/src/dashboard/list-filters.d.ts.map +1 -0
  191. package/dist/src/dashboard/list-filters.js +69 -0
  192. package/dist/src/dashboard/list-filters.js.map +1 -0
  193. package/dist/src/dashboard/openapi.d.ts.map +1 -1
  194. package/dist/src/dashboard/openapi.js +127 -52
  195. package/dist/src/dashboard/openapi.js.map +1 -1
  196. package/dist/src/dashboard/run-filter.d.ts +18 -15
  197. package/dist/src/dashboard/run-filter.d.ts.map +1 -1
  198. package/dist/src/dashboard/run-filter.js +30 -22
  199. package/dist/src/dashboard/run-filter.js.map +1 -1
  200. package/dist/src/dashboard/spa.d.ts +26 -1
  201. package/dist/src/dashboard/spa.d.ts.map +1 -1
  202. package/dist/src/dashboard/spa.js +9 -2
  203. package/dist/src/dashboard/spa.js.map +1 -1
  204. package/dist/src/dashboard/tenant_scope.d.ts +38 -0
  205. package/dist/src/dashboard/tenant_scope.d.ts.map +1 -0
  206. package/dist/src/dashboard/tenant_scope.js +166 -0
  207. package/dist/src/dashboard/tenant_scope.js.map +1 -0
  208. package/dist/src/define_config.d.ts +27 -12
  209. package/dist/src/define_config.d.ts.map +1 -1
  210. package/dist/src/define_config.js +9 -4
  211. package/dist/src/define_config.js.map +1 -1
  212. package/dist/src/diagnostics/index.d.ts +11 -0
  213. package/dist/src/diagnostics/index.d.ts.map +1 -0
  214. package/dist/src/diagnostics/index.js +6 -0
  215. package/dist/src/diagnostics/index.js.map +1 -0
  216. package/dist/src/diagnostics/transport.d.ts +71 -0
  217. package/dist/src/diagnostics/transport.d.ts.map +1 -0
  218. package/dist/src/diagnostics/transport.js +188 -0
  219. package/dist/src/diagnostics/transport.js.map +1 -0
  220. package/dist/src/diagnostics-bridge.d.ts +2 -1
  221. package/dist/src/diagnostics-bridge.d.ts.map +1 -1
  222. package/dist/src/diagnostics-bridge.js +7 -1
  223. package/dist/src/diagnostics-bridge.js.map +1 -1
  224. package/dist/src/doctor/agora_doctor.d.ts +116 -0
  225. package/dist/src/doctor/agora_doctor.d.ts.map +1 -0
  226. package/dist/src/doctor/agora_doctor.js +685 -0
  227. package/dist/src/doctor/agora_doctor.js.map +1 -0
  228. package/dist/src/doctor/checks.d.ts +28 -0
  229. package/dist/src/doctor/checks.d.ts.map +1 -0
  230. package/dist/src/doctor/checks.js +288 -0
  231. package/dist/src/doctor/checks.js.map +1 -0
  232. package/dist/src/doctor/index.d.ts +9 -0
  233. package/dist/src/doctor/index.d.ts.map +1 -0
  234. package/dist/src/doctor/index.js +16 -0
  235. package/dist/src/doctor/index.js.map +1 -0
  236. package/dist/src/engine.d.ts +55 -9
  237. package/dist/src/engine.d.ts.map +1 -1
  238. package/dist/src/engine.js +333 -84
  239. package/dist/src/engine.js.map +1 -1
  240. package/dist/src/errors.d.ts +9 -0
  241. package/dist/src/errors.d.ts.map +1 -1
  242. package/dist/src/errors.js +13 -0
  243. package/dist/src/errors.js.map +1 -1
  244. package/dist/src/event-trigger-bridge.d.ts +5 -14
  245. package/dist/src/event-trigger-bridge.d.ts.map +1 -1
  246. package/dist/src/event-trigger-bridge.js +11 -99
  247. package/dist/src/event-trigger-bridge.js.map +1 -1
  248. package/dist/src/index.d.ts +8 -5
  249. package/dist/src/index.d.ts.map +1 -1
  250. package/dist/src/index.js +6 -4
  251. package/dist/src/index.js.map +1 -1
  252. package/dist/src/interfaces.d.ts +53 -9
  253. package/dist/src/interfaces.d.ts.map +1 -1
  254. package/dist/src/interfaces.js +8 -0
  255. package/dist/src/interfaces.js.map +1 -1
  256. package/dist/src/origin.js +3 -3
  257. package/dist/src/role_bindings.d.ts +8 -8
  258. package/dist/src/role_bindings.js +8 -8
  259. package/dist/src/run-gateway/interface.d.ts +4 -3
  260. package/dist/src/run-gateway/interface.d.ts.map +1 -1
  261. package/dist/src/run-gateway/proxy-run-gateway.d.ts +4 -2
  262. package/dist/src/run-gateway/proxy-run-gateway.d.ts.map +1 -1
  263. package/dist/src/run-gateway/proxy-run-gateway.js +21 -6
  264. package/dist/src/run-gateway/proxy-run-gateway.js.map +1 -1
  265. package/dist/src/run-gateway/run-request-responder.d.ts +6 -1
  266. package/dist/src/run-gateway/run-request-responder.d.ts.map +1 -1
  267. package/dist/src/run-gateway/run-request-responder.js +30 -3
  268. package/dist/src/run-gateway/run-request-responder.js.map +1 -1
  269. package/dist/src/run-gateway/store-run-gateway.d.ts +4 -4
  270. package/dist/src/run-gateway/store-run-gateway.d.ts.map +1 -1
  271. package/dist/src/run-gateway/store-run-gateway.js +4 -4
  272. package/dist/src/run-gateway/store-run-gateway.js.map +1 -1
  273. package/dist/src/run-gateway/tenant-auth.d.ts +19 -1
  274. package/dist/src/run-gateway/tenant-auth.d.ts.map +1 -1
  275. package/dist/src/run-gateway/tenant-auth.js +133 -0
  276. package/dist/src/run-gateway/tenant-auth.js.map +1 -1
  277. package/dist/src/run-gateway/tenant-scoped-gateway.d.ts +10 -0
  278. package/dist/src/run-gateway/tenant-scoped-gateway.d.ts.map +1 -0
  279. package/dist/src/run-gateway/tenant-scoped-gateway.js +107 -0
  280. package/dist/src/run-gateway/tenant-scoped-gateway.js.map +1 -0
  281. package/dist/src/run-value-facets.d.ts +1 -1
  282. package/dist/src/run-value-facets.d.ts.map +1 -1
  283. package/dist/src/run-value-facets.js +5 -1
  284. package/dist/src/run-value-facets.js.map +1 -1
  285. package/dist/src/scheduler.d.ts.map +1 -1
  286. package/dist/src/scheduler.js +2 -1
  287. package/dist/src/scheduler.js.map +1 -1
  288. package/dist/src/schedules.d.ts +16 -1
  289. package/dist/src/schedules.d.ts.map +1 -1
  290. package/dist/src/schedules.js +29 -4
  291. package/dist/src/schedules.js.map +1 -1
  292. package/dist/src/services/main.d.ts +3 -3
  293. package/dist/src/services/main.js +6 -6
  294. package/dist/src/services/main.js.map +1 -1
  295. package/dist/src/singleton-admission.d.ts.map +1 -1
  296. package/dist/src/singleton-admission.js +2 -0
  297. package/dist/src/singleton-admission.js.map +1 -1
  298. package/dist/src/singleton-gate.d.ts +1 -1
  299. package/dist/src/singleton-gate.d.ts.map +1 -1
  300. package/dist/src/singleton-gate.js +4 -3
  301. package/dist/src/singleton-gate.js.map +1 -1
  302. package/dist/src/sql-schema.d.ts +54 -0
  303. package/dist/src/sql-schema.d.ts.map +1 -0
  304. package/dist/src/sql-schema.js +145 -0
  305. package/dist/src/sql-schema.js.map +1 -0
  306. package/dist/src/stores/factory.d.ts +6 -0
  307. package/dist/src/stores/factory.d.ts.map +1 -1
  308. package/dist/src/stores/factory.js +3 -0
  309. package/dist/src/stores/factory.js.map +1 -1
  310. package/dist/src/stores/lucid-mappers.d.ts +3 -0
  311. package/dist/src/stores/lucid-mappers.d.ts.map +1 -1
  312. package/dist/src/stores/lucid-mappers.js +12 -0
  313. package/dist/src/stores/lucid-mappers.js.map +1 -1
  314. package/dist/src/stores/lucid-pg-hot-path.d.ts +6 -2
  315. package/dist/src/stores/lucid-pg-hot-path.d.ts.map +1 -1
  316. package/dist/src/stores/lucid-pg-hot-path.js +7 -3
  317. package/dist/src/stores/lucid-pg-hot-path.js.map +1 -1
  318. package/dist/src/stores/lucid-schema.d.ts +18 -4
  319. package/dist/src/stores/lucid-schema.d.ts.map +1 -1
  320. package/dist/src/stores/lucid-schema.js +106 -61
  321. package/dist/src/stores/lucid-schema.js.map +1 -1
  322. package/dist/src/stores/lucid.d.ts +42 -2
  323. package/dist/src/stores/lucid.d.ts.map +1 -1
  324. package/dist/src/stores/lucid.js +450 -231
  325. package/dist/src/stores/lucid.js.map +1 -1
  326. package/dist/src/tenancy.d.ts +104 -0
  327. package/dist/src/tenancy.d.ts.map +1 -0
  328. package/dist/src/tenancy.js +91 -0
  329. package/dist/src/tenancy.js.map +1 -0
  330. package/dist/src/testing/in-memory-state-store.d.ts.map +1 -1
  331. package/dist/src/testing/in-memory-state-store.js +9 -3
  332. package/dist/src/testing/in-memory-state-store.js.map +1 -1
  333. package/dist/src/testing-kit/state-store-conformance.d.ts.map +1 -1
  334. package/dist/src/testing-kit/state-store-conformance.js +59 -0
  335. package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
  336. package/dist/src/testing-kit/transport-conformance.d.ts.map +1 -1
  337. package/dist/src/testing-kit/transport-conformance.js +5 -1
  338. package/dist/src/testing-kit/transport-conformance.js.map +1 -1
  339. package/dist/src/transports/bullmq/bullmq-transport.d.ts +1 -1
  340. package/dist/src/transports/bullmq/bullmq-transport.d.ts.map +1 -1
  341. package/dist/src/transports/bullmq/bullmq-transport.js +14 -3
  342. package/dist/src/transports/bullmq/bullmq-transport.js.map +1 -1
  343. package/dist/src/transports/db-schema.d.ts +13 -5
  344. package/dist/src/transports/db-schema.d.ts.map +1 -1
  345. package/dist/src/transports/db-schema.js +52 -27
  346. package/dist/src/transports/db-schema.js.map +1 -1
  347. package/dist/src/transports/db.d.ts +6 -0
  348. package/dist/src/transports/db.d.ts.map +1 -1
  349. package/dist/src/transports/db.js +91 -42
  350. package/dist/src/transports/db.js.map +1 -1
  351. package/dist/src/transports/factory.d.ts +16 -0
  352. package/dist/src/transports/factory.d.ts.map +1 -1
  353. package/dist/src/transports/factory.js +6 -1
  354. package/dist/src/transports/factory.js.map +1 -1
  355. package/dist/src/transports/queue.d.ts +2 -2
  356. package/dist/src/transports/queue.d.ts.map +1 -1
  357. package/dist/src/transports/queue.js +49 -8
  358. package/dist/src/transports/queue.js.map +1 -1
  359. package/dist/src/transports/worker-keys-db.d.ts +5 -0
  360. package/dist/src/transports/worker-keys-db.d.ts.map +1 -1
  361. package/dist/src/transports/worker-keys-db.js +10 -8
  362. package/dist/src/transports/worker-keys-db.js.map +1 -1
  363. package/dist/src/workflow-discovery.d.ts +1 -1
  364. package/dist/src/workflow-discovery.d.ts.map +1 -1
  365. package/dist/src/workflow-discovery.js +4 -7
  366. package/dist/src/workflow-discovery.js.map +1 -1
  367. package/dist/src/workflow-events.d.ts +20 -51
  368. package/dist/src/workflow-events.d.ts.map +1 -1
  369. package/dist/src/workflow-events.js +12 -30
  370. package/dist/src/workflow-events.js.map +1 -1
  371. package/dist/src/workflow-ref.d.ts +1 -1
  372. package/dist/stubs/config/durable_dashboard.stub +9 -29
  373. package/dist/stubs/database/migrations/create_durable_tables.stub +12 -2
  374. package/dist/stubs/database/migrations/create_durable_transport_messages.stub +34 -5
  375. package/dist/stubs/database/migrations/create_durable_transport_tables.stub +30 -8
  376. package/dist/stubs/database/migrations/create_durable_transport_worker_keys.stub +24 -2
  377. package/package.json +25 -7
  378. package/skills/durable-cluster/SKILL.md +43 -23
  379. package/skills/durable-reliability/SKILL.md +13 -7
  380. package/dist/assets/spa/assets/index-70hGzOnT.css +0 -1
  381. package/dist/assets/spa/assets/index-CJjMAUau.js +0 -16
  382. package/dist/assets/spa/assets/index-CJjMAUau.js.map +0 -1
  383. package/dist/commands/retry.d.ts +0 -16
  384. package/dist/commands/retry.d.ts.map +0 -1
  385. package/dist/commands/retry.js +0 -34
  386. package/dist/commands/retry.js.map +0 -1
  387. package/dist/src/dashboard/auth.d.ts +0 -134
  388. package/dist/src/dashboard/auth.d.ts.map +0 -1
  389. package/dist/src/dashboard/auth.js +0 -156
  390. package/dist/src/dashboard/auth.js.map +0 -1
  391. package/dist/src/dashboard/login_page.d.ts +0 -36
  392. package/dist/src/dashboard/login_page.d.ts.map +0 -1
  393. package/dist/src/dashboard/login_page.js +0 -158
  394. package/dist/src/dashboard/login_page.js.map +0 -1
  395. package/dist/src/dashboard/session_cookie.d.ts +0 -45
  396. package/dist/src/dashboard/session_cookie.d.ts.map +0 -1
  397. package/dist/src/dashboard/session_cookie.js +0 -97
  398. package/dist/src/dashboard/session_cookie.js.map +0 -1
@@ -1,27 +1,74 @@
1
1
  import { ListLoader } from '@adonisjs/core/ace';
2
+ import AgoraDoctor from './agora_doctor.js';
3
+ import DurableDoctor from './durable_doctor.js';
2
4
  import DurableWorker from './durable_worker.js';
3
5
  import DurableExport from './export_run.js';
6
+ import DurableHealth from './health.js';
4
7
  import DurableLifecycleRepublish from './lifecycle_republish.js';
5
8
  import MakeWorkflow from './make_workflow.js';
6
- import DurableRetry from './retry.js';
7
9
  import DurableRuns from './runs.js';
10
+ import DurableRunsBulk from './runs_bulk.js';
11
+ import DurableRunsCancel from './runs_cancel.js';
12
+ import DurableRunsContinue from './runs_continue.js';
13
+ import DurableRunsEvent from './runs_event.js';
14
+ import DurableRunsFan from './runs_fan.js';
15
+ import DurableRunsRedispatch from './runs_redispatch.js';
16
+ import DurableRunsReplay from './runs_replay.js';
17
+ import DurableRunsRetry from './runs_retry.js';
18
+ import DurableRunsShow from './runs_show.js';
19
+ import DurableRunsSignal from './runs_signal.js';
20
+ import DurableRunsUpdate from './runs_update.js';
21
+ import DurableRunsValues from './runs_values.js';
22
+ import DurableSchedules from './schedules.js';
23
+ import DurableSchedulesPause from './schedules_pause.js';
24
+ import DurableSchedulesResume from './schedules_resume.js';
25
+ import DurableSchedulesTrigger from './schedules_trigger.js';
26
+ import DurableTasksComplete from './tasks_complete.js';
27
+ import DurableTasksFail from './tasks_fail.js';
8
28
  import DurableWork from './work.js';
29
+ import DurableWorkers from './workers.js';
30
+ import DurableWorkflowsLifecycle from './workflows_lifecycle.js';
9
31
  /**
10
32
  * The commands barrel for `@adonis-agora/durable`. Registered in an app's `adonisrc` via
11
33
  * `rcFile.addCommand('@adonis-agora/durable/commands')` (done by this package's `configure`). The ace
12
34
  * kernel imports this module and treats it as a commands loader: a {@link ListLoader} over the durable
13
- * commands (`durable:work`, `durable:worker`, `durable:runs`, `durable:retry`, `durable:export`, `durable:lifecycle:republish`, `make:workflow`)
14
- * provides their metadata and constructors.
35
+ * commands — the workers (`durable:work`, `durable:worker`), the operator commands that mirror the
36
+ * console (`durable:runs*`, `durable:tasks:*`, `durable:schedules*`, `durable:workers`,
37
+ * `durable:health`, `durable:workflows:lifecycle`, `durable:lifecycle:republish`), `durable:export`,
38
+ * `make:workflow`, `agora:doctor` and `durable:doctor`.
15
39
  */
16
- const loader = new ListLoader([
40
+ export const DURABLE_COMMANDS = [
17
41
  DurableWork,
18
42
  DurableWorker,
19
43
  DurableRuns,
20
- DurableRetry,
21
- DurableExport,
44
+ DurableRunsShow,
45
+ DurableRunsFan,
46
+ DurableRunsValues,
47
+ DurableRunsEvent,
48
+ DurableRunsRetry,
49
+ DurableRunsReplay,
50
+ DurableRunsRedispatch,
51
+ DurableRunsCancel,
52
+ DurableRunsContinue,
53
+ DurableRunsSignal,
54
+ DurableRunsUpdate,
55
+ DurableRunsBulk,
56
+ DurableTasksComplete,
57
+ DurableTasksFail,
58
+ DurableSchedules,
59
+ DurableSchedulesPause,
60
+ DurableSchedulesResume,
61
+ DurableSchedulesTrigger,
62
+ DurableWorkers,
63
+ DurableHealth,
64
+ DurableWorkflowsLifecycle,
22
65
  DurableLifecycleRepublish,
66
+ DurableExport,
23
67
  MakeWorkflow,
24
- ]);
68
+ AgoraDoctor,
69
+ DurableDoctor,
70
+ ];
71
+ const loader = new ListLoader(DURABLE_COMMANDS);
25
72
  export const getMetaData = loader.getMetaData.bind(loader);
26
73
  export const getCommand = loader.getCommand.bind(loader);
27
74
  export default loader;
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../commands/main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,o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AW,GAAG,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAe,MAAM,CAAC"}
@@ -1,23 +1,16 @@
1
- import { BaseCommand } from '@adonisjs/core/ace';
2
- import type { CommandOptions } from '@adonisjs/core/types/ace';
1
+ import { RunFilterCommand } from '../src/commands/console_command.js';
3
2
  /**
4
- * `node ace durable:runs` — list recent workflow runs, optionally filtered by status and workflow.
5
- * Reads through the engine's read API (`engine.listRuns`/`engine.listCheckpoints`); for the listing to
6
- * show runs across processes the engine must be backed by a persistent store (config/durable.ts).
7
- *
8
- * Every row also carries liveness signals (UPDATED age, RECOVERY attempts, PENDING remote-step age) —
9
- * `suspended` alone can't tell a run mid-step apart from one whose dispatch was lost (see
10
- * `src/commands/runs.ts`'s module doc). `--stale` narrows the listing to exactly the runs that look
11
- * stranded by that signal.
3
+ * `node ace durable:runs` — list runs, newest first, through the console's `GET /runs` handler (same
4
+ * filters, paging, tenant scope and redaction). Every row carries liveness signals (UPDATED age,
5
+ * RECOVERY attempts, PENDING remote-step age); `--stale` narrows the page to the runs that look
6
+ * stranded by them.
12
7
  */
13
- export default class DurableRuns extends BaseCommand {
8
+ export default class DurableRuns extends RunFilterCommand {
14
9
  static commandName: string;
15
10
  static description: string;
16
- static options: CommandOptions;
17
- status?: string;
18
- workflow?: string;
19
- limit: number;
11
+ page?: number;
12
+ size?: number;
20
13
  stale?: string;
21
- run(): Promise<void>;
14
+ protected perform(): Promise<void>;
22
15
  }
23
16
  //# sourceMappingURL=runs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAS,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAY/D;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,WAAW,SAAuC;IAClE,OAAgB,OAAO,EAAE,cAAc,CAAsB;IAKrD,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,KAAK,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAER,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CA0BlC;CACF"}
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAsBlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,gBAAgB;IACvD,OAAgB,WAAW,SAAkB;IAC7C,OAAgB,WAAW,SAA2D;IAG9E,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAQd,KAAK,CAAC,EAAE,MAAM,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDvC;CACF"}
@@ -4,65 +4,78 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { BaseCommand, flags } from '@adonisjs/core/ace';
8
- import { attachLiveness, DEFAULT_STALE_MS, filterStale, listRuns, parseDurationMs, renderRunsTable, staleHint, } from '../src/commands/runs.js';
9
- import { WorkflowEngine } from '../src/index.js';
7
+ import { flags } from '@adonisjs/core/ace';
8
+ import { pageFooter, RunFilterCommand } from '../src/commands/console_command.js';
9
+ import { attachLiveness, DEFAULT_STALE_MS, filterStale, parseDurationMs, renderRunsTable, staleHint, } from '../src/commands/runs.js';
10
+ import { listRuns } from '../src/dashboard/handlers.js';
10
11
  /**
11
- * `node ace durable:runs` — list recent workflow runs, optionally filtered by status and workflow.
12
- * Reads through the engine's read API (`engine.listRuns`/`engine.listCheckpoints`); for the listing to
13
- * show runs across processes the engine must be backed by a persistent store (config/durable.ts).
14
- *
15
- * Every row also carries liveness signals (UPDATED age, RECOVERY attempts, PENDING remote-step age) —
16
- * `suspended` alone can't tell a run mid-step apart from one whose dispatch was lost (see
17
- * `src/commands/runs.ts`'s module doc). `--stale` narrows the listing to exactly the runs that look
18
- * stranded by that signal.
12
+ * `node ace durable:runs` — list runs, newest first, through the console's `GET /runs` handler (same
13
+ * filters, paging, tenant scope and redaction). Every row carries liveness signals (UPDATED age,
14
+ * RECOVERY attempts, PENDING remote-step age); `--stale` narrows the page to the runs that look
15
+ * stranded by them.
19
16
  */
20
- export default class DurableRuns extends BaseCommand {
17
+ export default class DurableRuns extends RunFilterCommand {
21
18
  static commandName = 'durable:runs';
22
- static description = 'List recent durable workflow runs';
23
- static options = { startApp: true };
24
- async run() {
25
- const engine = await this.app.container.make(WorkflowEngine);
19
+ static description = 'List durable workflow runs (filters, paging, --stale)';
20
+ async perform() {
26
21
  const wantsStale = this.stale !== undefined;
27
- const runs = await listRuns(engine, {
28
- ...(this.status ? { status: this.status } : {}),
29
- // No explicit --status: scope the query to running/suspended, the only statuses a stranded
30
- // dispatch can show up in, so a stale candidate isn't pushed out of the window by newer
31
- // terminal runs.
32
- ...(!this.status && wantsStale ? { statuses: ['running', 'suspended'] } : {}),
33
- ...(this.workflow ? { workflow: this.workflow } : {}),
34
- limit: this.limit,
35
- });
36
- const liveRuns = await attachLiveness(engine, runs);
37
- if (!wantsStale) {
38
- this.logger.log(renderRunsTable(liveRuns));
22
+ const query = this.runFilter();
23
+ // No explicit --status: `--stale` reads the only statuses a stranded dispatch shows up in, so
24
+ // newer terminal runs don't push a stale candidate off the page.
25
+ if (wantsStale && !query.filter?.status) {
26
+ query.filter = { ...query.filter, status: ['running', 'suspended', 'cancelling'] };
27
+ }
28
+ const deps = await this.deps();
29
+ const body = await this.call(listRuns, {
30
+ query: {
31
+ ...query,
32
+ ...(this.page !== undefined ? { page: String(this.page) } : {}),
33
+ ...(this.size !== undefined ? { size: String(this.size) } : {}),
34
+ },
35
+ }, deps);
36
+ // The liveness columns read each in-flight run's checkpoints through the same port.
37
+ const runs = body.data.map((row) => ({ ...row, updatedAt: new Date(row.updatedAt) }));
38
+ const lister = {
39
+ listRuns: async () => runs,
40
+ listCheckpoints: (id) => deps.engine.listCheckpoints(id),
41
+ };
42
+ let live = await attachLiveness(lister, runs);
43
+ if (wantsStale) {
44
+ const threshold = this.stale === ''
45
+ ? DEFAULT_STALE_MS
46
+ : (parseDurationMs(this.stale ?? '') ?? DEFAULT_STALE_MS);
47
+ live = filterStale(live, threshold);
48
+ }
49
+ if (this.json) {
50
+ const kept = new Set(live.map((l) => l.run.id));
51
+ const liveness = new Map(live.map((l) => [l.run.id, l.stalePending]));
52
+ this.printJson({
53
+ data: body.data
54
+ .filter((row) => kept.has(row.id))
55
+ .map((row) => ({ ...row, pending: liveness.get(row.id) ?? null })),
56
+ meta: body.meta,
57
+ });
39
58
  return;
40
59
  }
41
- const thresholdMs = this.stale === ''
42
- ? DEFAULT_STALE_MS
43
- : (parseDurationMs(this.stale ?? '') ?? DEFAULT_STALE_MS);
44
- const stale = filterStale(liveRuns, thresholdMs);
45
- this.logger.log(renderRunsTable(stale));
46
- for (const { run } of stale)
47
- this.logger.warning(staleHint(run.id));
60
+ this.logger.log(renderRunsTable(live));
61
+ if (live.length > 0 || body.meta.total > 0)
62
+ this.logger.log(pageFooter(body.meta));
63
+ if (wantsStale)
64
+ for (const { run } of live)
65
+ this.logger.warning(staleHint(run.id));
48
66
  }
49
67
  }
50
68
  __decorate([
51
- flags.string({
52
- description: 'Filter by status (pending|running|suspended|completed|failed|cancelled|dead)',
53
- })
54
- ], DurableRuns.prototype, "status", void 0);
55
- __decorate([
56
- flags.string({ description: 'Filter by workflow name' })
57
- ], DurableRuns.prototype, "workflow", void 0);
69
+ flags.number({ description: 'Page, 1-based (default 1)' })
70
+ ], DurableRuns.prototype, "page", void 0);
58
71
  __decorate([
59
- flags.number({ description: 'Max runs to list', default: 50 })
60
- ], DurableRuns.prototype, "limit", void 0);
72
+ flags.number({ description: 'Rows per page (default 50, at most 200)' })
73
+ ], DurableRuns.prototype, "size", void 0);
61
74
  __decorate([
62
75
  flags.string({
63
- description: 'List only running/suspended runs whose oldest pending remote step exceeds this age — the ' +
64
- '"probably stranded" view. Pass bare --stale for the default threshold (15m), or a duration ' +
65
- 'like --stale=1h / --stale=90s for a custom one.',
76
+ allowEmptyValue: true,
77
+ description: 'Only running/suspended/cancelling runs whose oldest pending remote step exceeds this age (the ' +
78
+ '"probably stranded" view). Bare --stale uses 15m; --stale=1h / --stale=90s set your own.',
66
79
  })
67
80
  ], DurableRuns.prototype, "stale", void 0);
68
81
  //# sourceMappingURL=runs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runs.js","sourceRoot":"","sources":["../../commands/runs.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,QAAQ,EACR,eAAe,EACf,eAAe,EACf,SAAS,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAkB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjE;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,WAAW;IAClD,MAAM,CAAU,WAAW,GAAG,cAAc,CAAC;IAC7C,MAAM,CAAU,WAAW,GAAG,mCAAmC,CAAC;IAClE,MAAM,CAAU,OAAO,GAAmB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAqBpD,KAAK,CAAC,GAAG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,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACnF,IAAI,UAAU;YAAE,KAAK,MAAM,EAAE,GAAG,EAAE,IAAI,IAAI;gBAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACrF,CAAC;CACF;AArES;IADP,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;yCACrC;AAGd;IADP,KAAK,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,yCAAyC,EAAE,CAAC;yCACnD;AAQd;IANP,KAAK,CAAC,MAAM,CAAC;QACZ,eAAe,EAAE,IAAI;QACrB,WAAW,EACT,gGAAgG;YAChG,0FAA0F;KAC7F,CAAC;0CACqB"}
@@ -0,0 +1,17 @@
1
+ import { RunFilterCommand } from '../src/commands/console_command.js';
2
+ /**
3
+ * `node ace durable:runs:bulk <retry|cancel> [filters]` — retry or cancel every run matching the
4
+ * filters (at most 500), through the console's `POST /bulk/:action`. A run that cannot take the
5
+ * action is skipped. `--dry-run` lists what would be acted on; otherwise it asks first (`--force`
6
+ * skips).
7
+ */
8
+ export default class DurableRunsBulk extends RunFilterCommand {
9
+ static commandName: string;
10
+ static description: string;
11
+ action: string;
12
+ compensate: boolean;
13
+ dryRun: boolean;
14
+ force: boolean;
15
+ protected perform(): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=runs_bulk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_bulk.d.ts","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAQlF;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,gBAAgB;IAC3D,OAAgB,WAAW,SAAuB;IAClD,OAAgB,WAAW,SAA+D;IAGlF,MAAM,EAAE,MAAM,CAAC;IAGf,UAAU,EAAE,OAAO,CAAC;IAGpB,MAAM,EAAE,OAAO,CAAC;IAGhB,KAAK,EAAE,OAAO,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAmEvC;CACF"}
@@ -0,0 +1,76 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { args, flags } from '@adonisjs/core/ace';
8
+ import { CliRefusal, RunFilterCommand } from '../src/commands/console_command.js';
9
+ import { attachLiveness, renderRunsTable } from '../src/commands/runs.js';
10
+ import { bulkAction, listRuns } from '../src/dashboard/handlers.js';
11
+ /** The bulk action acts on at most this many matching runs (the console's cap). */
12
+ const BULK_CAP = 500;
13
+ /**
14
+ * `node ace durable:runs:bulk <retry|cancel> [filters]` — retry or cancel every run matching the
15
+ * filters (at most 500), through the console's `POST /bulk/:action`. A run that cannot take the
16
+ * action is skipped. `--dry-run` lists what would be acted on; otherwise it asks first (`--force`
17
+ * skips).
18
+ */
19
+ export default class DurableRunsBulk extends RunFilterCommand {
20
+ static commandName = 'durable:runs:bulk';
21
+ static description = 'Retry or cancel every run matching a filter (at most 500)';
22
+ async perform() {
23
+ if (this.action !== 'retry' && this.action !== 'cancel') {
24
+ throw new CliRefusal('action must be retry or cancel.');
25
+ }
26
+ if (this.compensate && this.action !== 'cancel') {
27
+ throw new CliRefusal('--compensate goes with cancel.');
28
+ }
29
+ const query = this.runFilter();
30
+ const deps = await this.deps();
31
+ const first = await this.call(listRuns, { query: { ...query, size: '200' } }, deps);
32
+ const matched = first.meta.total;
33
+ const acting = Math.min(matched, BULK_CAP);
34
+ const scope = Object.keys(query).length > 0 ? 'matching the filter' : 'of every run (no filter)';
35
+ if (this.dryRun) {
36
+ const rows = [...first.data];
37
+ for (let page = 2; rows.length < acting && page <= first.meta.lastPage; page += 1) {
38
+ const next = await this.call(listRuns, { query: { ...query, size: '200', page: String(page) } }, deps);
39
+ rows.push(...next.data);
40
+ }
41
+ const affected = rows.slice(0, acting);
42
+ if (this.json) {
43
+ this.printJson({ action: this.action, matched, wouldApply: acting, data: affected });
44
+ return;
45
+ }
46
+ const runs = affected.map((row) => ({ ...row, updatedAt: new Date(row.updatedAt) }));
47
+ const live = await attachLiveness({ listRuns: async () => runs, listCheckpoints: (id) => deps.engine.listCheckpoints(id) }, runs);
48
+ this.logger.log(renderRunsTable(live));
49
+ this.logger.info(`Dry run: ${this.action} would act on these ${acting} run(s) ${scope} (${matched} matched${matched > BULK_CAP ? `, capped at the newest ${BULK_CAP}` : ''}).`);
50
+ return;
51
+ }
52
+ await this.confirm(this.force, `${this.action === 'retry' ? 'Retry' : 'Cancel'} up to ${acting} run(s) ${scope}${this.compensate ? ' and run their compensations' : ''}?`);
53
+ this.audit(`${this.action} ${JSON.stringify(query.filter ?? {})}`);
54
+ const body = await this.call(bulkAction, {
55
+ params: { action: this.action },
56
+ query,
57
+ ...(this.compensate ? { body: { compensate: true } } : {}),
58
+ }, deps);
59
+ if (this.json)
60
+ return this.printJson(body);
61
+ this.logger.success(`${this.action}: applied to ${body.applied} of ${body.matched} matching run(s).`);
62
+ }
63
+ }
64
+ __decorate([
65
+ args.string({ description: 'retry | cancel' })
66
+ ], DurableRunsBulk.prototype, "action", void 0);
67
+ __decorate([
68
+ flags.boolean({ description: 'With cancel: also run each run’s compensations (saga undo)' })
69
+ ], DurableRunsBulk.prototype, "compensate", void 0);
70
+ __decorate([
71
+ flags.boolean({ description: 'List the matching runs and stop' })
72
+ ], DurableRunsBulk.prototype, "dryRun", void 0);
73
+ __decorate([
74
+ flags.boolean({ description: 'Do not ask for confirmation' })
75
+ ], DurableRunsBulk.prototype, "force", void 0);
76
+ //# sourceMappingURL=runs_bulk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_bulk.js","sourceRoot":"","sources":["../../commands/runs_bulk.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGpE,mFAAmF;AACnF,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,gBAAgB;IAC3D,MAAM,CAAU,WAAW,GAAG,mBAAmB,CAAC;IAClD,MAAM,CAAU,WAAW,GAAG,2DAA2D,CAAC;IAchF,KAAK,CAAC,OAAO;QACrB,IAAI,IAAI,CAAC,MAAM,KAAK,OAAO,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACxD,MAAM,IAAI,UAAU,CAAC,iCAAiC,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YAChD,MAAM,IAAI,UAAU,CAAC,gCAAgC,CAAC,CAAC;QACzD,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAC/B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QAM/B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAO,QAAQ,EAAE,EAAE,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,IAAI,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C,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3D,EACD,IAAI,CACL,CAAC;QACF,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CACjB,GAAG,IAAI,CAAC,MAAM,gBAAgB,IAAI,CAAC,OAAO,OAAO,IAAI,CAAC,OAAO,mBAAmB,CACjF,CAAC;IACJ,CAAC;CACF;AA/ES;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;+CACxB;AAGf;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,4DAA4D,EAAE,CAAC;mDACjE;AAGpB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;+CAC1C;AAGhB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;8CACvC"}
@@ -0,0 +1,15 @@
1
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
2
+ /**
3
+ * `node ace durable:runs:cancel <id> [--compensate]` — cancel a run through the console's
4
+ * `POST /runs/:id/cancel`; `--compensate` also runs the saga undo of its completed steps. Asks first
5
+ * (`--force` skips).
6
+ */
7
+ export default class DurableRunsCancel extends DurableConsoleCommand {
8
+ static commandName: string;
9
+ static description: string;
10
+ id: string;
11
+ compensate: boolean;
12
+ force: boolean;
13
+ protected perform(): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=runs_cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_cancel.d.ts","sourceRoot":"","sources":["../../commands/runs_cancel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAI3E;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,qBAAqB;IAClE,OAAgB,WAAW,SAAyB;IACpD,OAAgB,WAAW,SAAyD;IAG5E,EAAE,EAAE,MAAM,CAAC;IAGX,UAAU,EAAE,OAAO,CAAC;IAGpB,KAAK,EAAE,OAAO,CAAC;IAEvB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAYvC;CACF"}
@@ -0,0 +1,39 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { args, flags } from '@adonisjs/core/ace';
8
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
9
+ import { cancelRun } from '../src/dashboard/handlers.js';
10
+ /**
11
+ * `node ace durable:runs:cancel <id> [--compensate]` — cancel a run through the console's
12
+ * `POST /runs/:id/cancel`; `--compensate` also runs the saga undo of its completed steps. Asks first
13
+ * (`--force` skips).
14
+ */
15
+ export default class DurableRunsCancel extends DurableConsoleCommand {
16
+ static commandName = 'durable:runs:cancel';
17
+ static description = 'Cancel a run (--compensate also runs its saga undo)';
18
+ async perform() {
19
+ await this.confirm(this.force, this.compensate ? `Cancel ${this.id} and run its compensations?` : `Cancel ${this.id}?`);
20
+ this.audit(this.id);
21
+ const body = await this.call(cancelRun, {
22
+ params: { id: this.id },
23
+ body: { compensate: this.compensate === true },
24
+ });
25
+ if (this.json)
26
+ return this.printJson(body);
27
+ this.logger.success(`Run ${this.id} cancelled (status: ${body.result.status}).`);
28
+ }
29
+ }
30
+ __decorate([
31
+ args.string({ description: 'Run id' })
32
+ ], DurableRunsCancel.prototype, "id", void 0);
33
+ __decorate([
34
+ flags.boolean({ description: 'Also run the compensations of its completed steps (saga undo)' })
35
+ ], DurableRunsCancel.prototype, "compensate", void 0);
36
+ __decorate([
37
+ flags.boolean({ description: 'Do not ask for confirmation' })
38
+ ], DurableRunsCancel.prototype, "force", void 0);
39
+ //# sourceMappingURL=runs_cancel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_cancel.js","sourceRoot":"","sources":["../../commands/runs_cancel.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,qBAAqB;IAClE,MAAM,CAAU,WAAW,GAAG,qBAAqB,CAAC;IACpD,MAAM,CAAU,WAAW,GAAG,qDAAqD,CAAC;IAW1E,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,CAAC,OAAO,CAChB,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,UAAU,IAAI,CAAC,EAAE,GAAG,CACxF,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAwB,SAAS,EAAE;YAC7D,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE;YACvB,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,KAAK,IAAI,EAAE;SAC/C,CAAC,CAAC;QACH,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,EAAE,uBAAuB,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IACnF,CAAC;CACF;AArBS;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;6CACpB;AAGX;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,+DAA+D,EAAE,CAAC;qDACpE;AAGpB;IADP,KAAK,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;gDACvC"}
@@ -0,0 +1,12 @@
1
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
2
+ /**
3
+ * `node ace durable:runs:continue <id>` — resume a run paused at a `ctx.breakpoint()`, through the
4
+ * console's `POST /runs/:id/continue`. Fails when the run is not paused at one.
5
+ */
6
+ export default class DurableRunsContinue extends DurableConsoleCommand {
7
+ static commandName: string;
8
+ static description: string;
9
+ id: string;
10
+ protected perform(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=runs_continue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_continue.d.ts","sourceRoot":"","sources":["../../commands/runs_continue.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAI3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,qBAAqB;IACpE,OAAgB,WAAW,SAA2B;IACtD,OAAgB,WAAW,SAA+C;IAGlE,EAAE,EAAE,MAAM,CAAC;IAEnB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAKvC;CACF"}
@@ -0,0 +1,28 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { args } from '@adonisjs/core/ace';
8
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
9
+ import { continueRun } from '../src/dashboard/handlers.js';
10
+ /**
11
+ * `node ace durable:runs:continue <id>` — resume a run paused at a `ctx.breakpoint()`, through the
12
+ * console's `POST /runs/:id/continue`. Fails when the run is not paused at one.
13
+ */
14
+ export default class DurableRunsContinue extends DurableConsoleCommand {
15
+ static commandName = 'durable:runs:continue';
16
+ static description = 'Resume a run paused at a ctx.breakpoint()';
17
+ async perform() {
18
+ this.audit(this.id);
19
+ const body = await this.call(continueRun, { params: { id: this.id } });
20
+ if (this.json)
21
+ return this.printJson(body);
22
+ this.logger.success(`Run ${this.id} continued (status: ${body.result.status}).`);
23
+ }
24
+ }
25
+ __decorate([
26
+ args.string({ description: 'Run id' })
27
+ ], DurableRunsContinue.prototype, "id", void 0);
28
+ //# sourceMappingURL=runs_continue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_continue.js","sourceRoot":"","sources":["../../commands/runs_continue.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,qBAAqB;IACpE,MAAM,CAAU,WAAW,GAAG,uBAAuB,CAAC;IACtD,MAAM,CAAU,WAAW,GAAG,2CAA2C,CAAC;IAKhE,KAAK,CAAC,OAAO;QACrB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAwB,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9F,IAAI,IAAI,CAAC,IAAI;YAAE,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,EAAE,uBAAuB,IAAI,CAAC,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;IACnF,CAAC;CACF;AARS;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;+CACpB"}
@@ -0,0 +1,13 @@
1
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
2
+ /**
3
+ * `node ace durable:runs:event <id> <key>` — the latest value a run published for `key` with
4
+ * `ctx.setEvent`, through the console's `GET /runs/:id/events/:key` (a live query, no side effect).
5
+ */
6
+ export default class DurableRunsEvent extends DurableConsoleCommand {
7
+ static commandName: string;
8
+ static description: string;
9
+ id: string;
10
+ key: string;
11
+ protected perform(): Promise<void>;
12
+ }
13
+ //# sourceMappingURL=runs_event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_event.d.ts","sourceRoot":"","sources":["../../commands/runs_event.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAG3E;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,qBAAqB;IACjE,OAAgB,WAAW,SAAwB;IACnD,OAAgB,WAAW,SAA6D;IAGhF,EAAE,EAAE,MAAM,CAAC;IAGX,GAAG,EAAE,MAAM,CAAC;IAEpB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAGvC;CACF"}
@@ -0,0 +1,28 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { args } from '@adonisjs/core/ace';
8
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
9
+ import { getRunEvent } from '../src/dashboard/handlers.js';
10
+ /**
11
+ * `node ace durable:runs:event <id> <key>` — the latest value a run published for `key` with
12
+ * `ctx.setEvent`, through the console's `GET /runs/:id/events/:key` (a live query, no side effect).
13
+ */
14
+ export default class DurableRunsEvent extends DurableConsoleCommand {
15
+ static commandName = 'durable:runs:event';
16
+ static description = 'Read the latest value a run published with ctx.setEvent';
17
+ async perform() {
18
+ const body = await this.call(getRunEvent, { params: { id: this.id, key: this.key } });
19
+ this.printJson(this.json ? body : body.value);
20
+ }
21
+ }
22
+ __decorate([
23
+ args.string({ description: 'Run id' })
24
+ ], DurableRunsEvent.prototype, "id", void 0);
25
+ __decorate([
26
+ args.string({ description: 'Event key' })
27
+ ], DurableRunsEvent.prototype, "key", void 0);
28
+ //# sourceMappingURL=runs_event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_event.js","sourceRoot":"","sources":["../../commands/runs_event.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,qBAAqB;IACjE,MAAM,CAAU,WAAW,GAAG,oBAAoB,CAAC;IACnD,MAAM,CAAU,WAAW,GAAG,yDAAyD,CAAC;IAQ9E,KAAK,CAAC,OAAO;QACrB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACtF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;CACF;AATS;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC;4CACpB;AAGX;IADP,IAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;6CACtB"}
@@ -0,0 +1,16 @@
1
+ import { DurableConsoleCommand } from '../src/commands/console_command.js';
2
+ /**
3
+ * `node ace durable:runs:fan <id> <group>` — one page of a wide fan's member steps (a fan
4
+ * `durable:runs:show` summarized), through the console's `GET /runs/:id/fans/:group`.
5
+ */
6
+ export default class DurableRunsFan extends DurableConsoleCommand {
7
+ static commandName: string;
8
+ static description: string;
9
+ id: string;
10
+ group: string;
11
+ failed: boolean;
12
+ page?: number;
13
+ size?: number;
14
+ protected perform(): Promise<void>;
15
+ }
16
+ //# sourceMappingURL=runs_fan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runs_fan.d.ts","sourceRoot":"","sources":["../../commands/runs_fan.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,qBAAqB,EAGtB,MAAM,oCAAoC,CAAC;AAG5C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,qBAAqB;IAC/D,OAAgB,WAAW,SAAsB;IACjD,OAAgB,WAAW,SAAkD;IAGrE,EAAE,EAAE,MAAM,CAAC;IAGX,KAAK,EAAE,MAAM,CAAC;IAGd,MAAM,EAAE,OAAO,CAAC;IAGhB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,IAAI,CAAC,EAAE,MAAM,CAAC;IAEtB,UAAgB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAgCvC;CACF"}