@adonis-agora/durable 0.49.1 → 0.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/CHANGELOG.md +279 -0
  2. package/README.md +53 -22
  3. package/dist/assets/spa/assets/index-DupjrK7N.js +16 -0
  4. package/dist/assets/spa/assets/index-DupjrK7N.js.map +1 -0
  5. package/dist/assets/spa/index.html +1 -1
  6. package/dist/commands/durable_worker.d.ts.map +1 -1
  7. package/dist/commands/durable_worker.js +9 -8
  8. package/dist/commands/durable_worker.js.map +1 -1
  9. package/dist/commands/work.d.ts.map +1 -1
  10. package/dist/commands/work.js +3 -1
  11. package/dist/commands/work.js.map +1 -1
  12. package/dist/configure.d.ts.map +1 -1
  13. package/dist/configure.js +1 -0
  14. package/dist/configure.js.map +1 -1
  15. package/dist/providers/dashboard_provider.d.ts +2 -0
  16. package/dist/providers/dashboard_provider.d.ts.map +1 -1
  17. package/dist/providers/dashboard_provider.js +50 -6
  18. package/dist/providers/dashboard_provider.js.map +1 -1
  19. package/dist/providers/durable_provider.d.ts.map +1 -1
  20. package/dist/providers/durable_provider.js +146 -35
  21. package/dist/providers/durable_provider.js.map +1 -1
  22. package/dist/src/admission-redis/redis-admission-backend.d.ts.map +1 -1
  23. package/dist/src/admission-redis/redis-admission-backend.js +3 -1
  24. package/dist/src/admission-redis/redis-admission-backend.js.map +1 -1
  25. package/dist/src/ambient-step.d.ts +24 -0
  26. package/dist/src/ambient-step.d.ts.map +1 -0
  27. package/dist/src/ambient-step.js +42 -0
  28. package/dist/src/ambient-step.js.map +1 -0
  29. package/dist/src/base-workflow.d.ts +10 -1
  30. package/dist/src/base-workflow.d.ts.map +1 -1
  31. package/dist/src/base-workflow.js.map +1 -1
  32. package/dist/src/codec-state-store.d.ts +28 -2
  33. package/dist/src/codec-state-store.d.ts.map +1 -1
  34. package/dist/src/codec-state-store.js +61 -3
  35. package/dist/src/codec-state-store.js.map +1 -1
  36. package/dist/src/commands/worker.d.ts +8 -3
  37. package/dist/src/commands/worker.d.ts.map +1 -1
  38. package/dist/src/commands/worker.js +35 -8
  39. package/dist/src/commands/worker.js.map +1 -1
  40. package/dist/src/config_types.d.ts +6 -0
  41. package/dist/src/config_types.d.ts.map +1 -1
  42. package/dist/src/control-plane-redis/redis-control-plane.d.ts.map +1 -1
  43. package/dist/src/control-plane-redis/redis-control-plane.js +22 -6
  44. package/dist/src/control-plane-redis/redis-control-plane.js.map +1 -1
  45. package/dist/src/control-planes/factory.d.ts +6 -0
  46. package/dist/src/control-planes/factory.d.ts.map +1 -1
  47. package/dist/src/control-planes/factory.js +1 -0
  48. package/dist/src/control-planes/factory.js.map +1 -1
  49. package/dist/src/dashboard/gateway-adapter.d.ts +15 -5
  50. package/dist/src/dashboard/gateway-adapter.d.ts.map +1 -1
  51. package/dist/src/dashboard/gateway-adapter.js +71 -7
  52. package/dist/src/dashboard/gateway-adapter.js.map +1 -1
  53. package/dist/src/dashboard/handlers.d.ts +53 -1
  54. package/dist/src/dashboard/handlers.d.ts.map +1 -1
  55. package/dist/src/dashboard/handlers.js +200 -20
  56. package/dist/src/dashboard/handlers.js.map +1 -1
  57. package/dist/src/dashboard/index.d.ts +2 -2
  58. package/dist/src/dashboard/index.d.ts.map +1 -1
  59. package/dist/src/dashboard/index.js +2 -2
  60. package/dist/src/dashboard/index.js.map +1 -1
  61. package/dist/src/dashboard/openapi.d.ts.map +1 -1
  62. package/dist/src/dashboard/openapi.js +71 -1
  63. package/dist/src/dashboard/openapi.js.map +1 -1
  64. package/dist/src/define_config.d.ts +122 -8
  65. package/dist/src/define_config.d.ts.map +1 -1
  66. package/dist/src/define_config.js.map +1 -1
  67. package/dist/src/diagnostics-bridge.d.ts +16 -3
  68. package/dist/src/diagnostics-bridge.d.ts.map +1 -1
  69. package/dist/src/diagnostics-bridge.js +9 -3
  70. package/dist/src/diagnostics-bridge.js.map +1 -1
  71. package/dist/src/discovery-roots.d.ts +92 -0
  72. package/dist/src/discovery-roots.d.ts.map +1 -0
  73. package/dist/src/discovery-roots.js +150 -0
  74. package/dist/src/discovery-roots.js.map +1 -0
  75. package/dist/src/engine.d.ts +428 -21
  76. package/dist/src/engine.d.ts.map +1 -1
  77. package/dist/src/engine.js +1566 -164
  78. package/dist/src/engine.js.map +1 -1
  79. package/dist/src/entities.d.ts +36 -1
  80. package/dist/src/entities.d.ts.map +1 -1
  81. package/dist/src/entities.js +65 -4
  82. package/dist/src/entities.js.map +1 -1
  83. package/dist/src/errors.d.ts +46 -0
  84. package/dist/src/errors.d.ts.map +1 -1
  85. package/dist/src/errors.js +48 -0
  86. package/dist/src/errors.js.map +1 -1
  87. package/dist/src/event-trigger-bridge.d.ts +8 -0
  88. package/dist/src/event-trigger-bridge.d.ts.map +1 -1
  89. package/dist/src/event-trigger-bridge.js +24 -3
  90. package/dist/src/event-trigger-bridge.js.map +1 -1
  91. package/dist/src/handshake/announced.d.ts +27 -0
  92. package/dist/src/handshake/announced.d.ts.map +1 -1
  93. package/dist/src/handshake/announced.js +62 -0
  94. package/dist/src/handshake/announced.js.map +1 -1
  95. package/dist/src/handshake/directory.d.ts +92 -0
  96. package/dist/src/handshake/directory.d.ts.map +1 -0
  97. package/dist/src/handshake/directory.js +139 -0
  98. package/dist/src/handshake/directory.js.map +1 -0
  99. package/dist/src/hooks/barrel-sources.d.ts +28 -0
  100. package/dist/src/hooks/barrel-sources.d.ts.map +1 -0
  101. package/dist/src/hooks/barrel-sources.js +92 -0
  102. package/dist/src/hooks/barrel-sources.js.map +1 -0
  103. package/dist/src/hooks/steps.d.ts +12 -3
  104. package/dist/src/hooks/steps.d.ts.map +1 -1
  105. package/dist/src/hooks/steps.js +7 -11
  106. package/dist/src/hooks/steps.js.map +1 -1
  107. package/dist/src/hooks/workflows.d.ts +12 -3
  108. package/dist/src/hooks/workflows.d.ts.map +1 -1
  109. package/dist/src/hooks/workflows.js +7 -13
  110. package/dist/src/hooks/workflows.js.map +1 -1
  111. package/dist/src/index.d.ts +12 -3
  112. package/dist/src/index.d.ts.map +1 -1
  113. package/dist/src/index.js +12 -3
  114. package/dist/src/index.js.map +1 -1
  115. package/dist/src/interfaces.d.ts +309 -21
  116. package/dist/src/interfaces.d.ts.map +1 -1
  117. package/dist/src/interfaces.js +10 -0
  118. package/dist/src/interfaces.js.map +1 -1
  119. package/dist/src/metrics.d.ts.map +1 -1
  120. package/dist/src/metrics.js +5 -0
  121. package/dist/src/metrics.js.map +1 -1
  122. package/dist/src/namespaces.d.ts +17 -0
  123. package/dist/src/namespaces.d.ts.map +1 -0
  124. package/dist/src/namespaces.js +24 -0
  125. package/dist/src/namespaces.js.map +1 -0
  126. package/dist/src/on-error.d.ts +4 -1
  127. package/dist/src/on-error.d.ts.map +1 -1
  128. package/dist/src/on-error.js +15 -2
  129. package/dist/src/on-error.js.map +1 -1
  130. package/dist/src/otel/durable-metrics.d.ts.map +1 -1
  131. package/dist/src/otel/durable-metrics.js +5 -0
  132. package/dist/src/otel/durable-metrics.js.map +1 -1
  133. package/dist/src/otel/durable-otel.d.ts.map +1 -1
  134. package/dist/src/otel/durable-otel.js +5 -0
  135. package/dist/src/otel/durable-otel.js.map +1 -1
  136. package/dist/src/pollers.d.ts +10 -1
  137. package/dist/src/pollers.d.ts.map +1 -1
  138. package/dist/src/pollers.js +15 -5
  139. package/dist/src/pollers.js.map +1 -1
  140. package/dist/src/protocol.d.ts +12 -0
  141. package/dist/src/protocol.d.ts.map +1 -1
  142. package/dist/src/protocol.js +27 -1
  143. package/dist/src/protocol.js.map +1 -1
  144. package/dist/src/remote-event.d.ts +6 -0
  145. package/dist/src/remote-event.d.ts.map +1 -0
  146. package/dist/src/remote-event.js +19 -0
  147. package/dist/src/remote-event.js.map +1 -0
  148. package/dist/src/remote-workflow-executor.d.ts +34 -12
  149. package/dist/src/remote-workflow-executor.d.ts.map +1 -1
  150. package/dist/src/remote-workflow-executor.js +42 -40
  151. package/dist/src/remote-workflow-executor.js.map +1 -1
  152. package/dist/src/run-detail-summary.d.ts +90 -3
  153. package/dist/src/run-detail-summary.d.ts.map +1 -1
  154. package/dist/src/run-detail-summary.js +360 -2
  155. package/dist/src/run-detail-summary.js.map +1 -1
  156. package/dist/src/run-facets.d.ts +48 -0
  157. package/dist/src/run-facets.d.ts.map +1 -0
  158. package/dist/src/run-facets.js +100 -0
  159. package/dist/src/run-facets.js.map +1 -0
  160. package/dist/src/run-gateway/interface.d.ts +27 -1
  161. package/dist/src/run-gateway/interface.d.ts.map +1 -1
  162. package/dist/src/run-gateway/proxy-run-gateway.d.ts +32 -4
  163. package/dist/src/run-gateway/proxy-run-gateway.d.ts.map +1 -1
  164. package/dist/src/run-gateway/proxy-run-gateway.js +101 -5
  165. package/dist/src/run-gateway/proxy-run-gateway.js.map +1 -1
  166. package/dist/src/run-gateway/run-request-responder.d.ts +18 -5
  167. package/dist/src/run-gateway/run-request-responder.d.ts.map +1 -1
  168. package/dist/src/run-gateway/run-request-responder.js +155 -32
  169. package/dist/src/run-gateway/run-request-responder.js.map +1 -1
  170. package/dist/src/run-gateway/store-run-gateway.d.ts +23 -1
  171. package/dist/src/run-gateway/store-run-gateway.d.ts.map +1 -1
  172. package/dist/src/run-gateway/store-run-gateway.js +38 -0
  173. package/dist/src/run-gateway/store-run-gateway.js.map +1 -1
  174. package/dist/src/scheduler.d.ts +44 -3
  175. package/dist/src/scheduler.d.ts.map +1 -1
  176. package/dist/src/scheduler.js +36 -1
  177. package/dist/src/scheduler.js.map +1 -1
  178. package/dist/src/search-attributes-schema.d.ts +44 -0
  179. package/dist/src/search-attributes-schema.d.ts.map +1 -0
  180. package/dist/src/search-attributes-schema.js +51 -0
  181. package/dist/src/search-attributes-schema.js.map +1 -0
  182. package/dist/src/singleton-admission.d.ts +75 -0
  183. package/dist/src/singleton-admission.d.ts.map +1 -0
  184. package/dist/src/singleton-admission.js +156 -0
  185. package/dist/src/singleton-admission.js.map +1 -0
  186. package/dist/src/singleton-gate.d.ts +23 -8
  187. package/dist/src/singleton-gate.d.ts.map +1 -1
  188. package/dist/src/singleton-gate.js +59 -12
  189. package/dist/src/singleton-gate.js.map +1 -1
  190. package/dist/src/standard-schema.d.ts +86 -0
  191. package/dist/src/standard-schema.d.ts.map +1 -0
  192. package/dist/src/standard-schema.js +33 -0
  193. package/dist/src/standard-schema.js.map +1 -0
  194. package/dist/src/step-discovery.d.ts +21 -11
  195. package/dist/src/step-discovery.d.ts.map +1 -1
  196. package/dist/src/step-discovery.js +86 -45
  197. package/dist/src/step-discovery.js.map +1 -1
  198. package/dist/src/step-ref.d.ts +38 -12
  199. package/dist/src/step-ref.d.ts.map +1 -1
  200. package/dist/src/step-ref.js +5 -13
  201. package/dist/src/step-ref.js.map +1 -1
  202. package/dist/src/stores/factory.d.ts +6 -0
  203. package/dist/src/stores/factory.d.ts.map +1 -1
  204. package/dist/src/stores/factory.js +4 -1
  205. package/dist/src/stores/factory.js.map +1 -1
  206. package/dist/src/stores/lucid-helpers.d.ts +2 -0
  207. package/dist/src/stores/lucid-helpers.d.ts.map +1 -1
  208. package/dist/src/stores/lucid-helpers.js +7 -0
  209. package/dist/src/stores/lucid-helpers.js.map +1 -1
  210. package/dist/src/stores/lucid-mappers.d.ts +25 -0
  211. package/dist/src/stores/lucid-mappers.d.ts.map +1 -1
  212. package/dist/src/stores/lucid-mappers.js +81 -18
  213. package/dist/src/stores/lucid-mappers.js.map +1 -1
  214. package/dist/src/stores/lucid-schema.d.ts +59 -1
  215. package/dist/src/stores/lucid-schema.d.ts.map +1 -1
  216. package/dist/src/stores/lucid-schema.js +271 -25
  217. package/dist/src/stores/lucid-schema.js.map +1 -1
  218. package/dist/src/stores/lucid.d.ts +61 -2
  219. package/dist/src/stores/lucid.d.ts.map +1 -1
  220. package/dist/src/stores/lucid.js +346 -41
  221. package/dist/src/stores/lucid.js.map +1 -1
  222. package/dist/src/telescope/dashboard.d.ts.map +1 -1
  223. package/dist/src/telescope/dashboard.js +30 -1
  224. package/dist/src/telescope/dashboard.js.map +1 -1
  225. package/dist/src/telescope/data-providers.d.ts +19 -1
  226. package/dist/src/telescope/data-providers.d.ts.map +1 -1
  227. package/dist/src/telescope/data-providers.js +119 -3
  228. package/dist/src/telescope/data-providers.js.map +1 -1
  229. package/dist/src/telescope/extension.d.ts.map +1 -1
  230. package/dist/src/telescope/extension.js +2 -1
  231. package/dist/src/telescope/extension.js.map +1 -1
  232. package/dist/src/telescope/index.d.ts +1 -1
  233. package/dist/src/telescope/index.d.ts.map +1 -1
  234. package/dist/src/telescope/index.js +1 -1
  235. package/dist/src/telescope/index.js.map +1 -1
  236. package/dist/src/testing/in-memory-state-store.d.ts +44 -15
  237. package/dist/src/testing/in-memory-state-store.d.ts.map +1 -1
  238. package/dist/src/testing/in-memory-state-store.js +204 -41
  239. package/dist/src/testing/in-memory-state-store.js.map +1 -1
  240. package/dist/src/testing-kit/checkpoint-aggregation-contract.d.ts +16 -0
  241. package/dist/src/testing-kit/checkpoint-aggregation-contract.d.ts.map +1 -0
  242. package/dist/src/testing-kit/checkpoint-aggregation-contract.js +228 -0
  243. package/dist/src/testing-kit/checkpoint-aggregation-contract.js.map +1 -0
  244. package/dist/src/testing-kit/state-store-conformance.d.ts.map +1 -1
  245. package/dist/src/testing-kit/state-store-conformance.js +355 -3
  246. package/dist/src/testing-kit/state-store-conformance.js.map +1 -1
  247. package/dist/src/transport-pool.d.ts +15 -1
  248. package/dist/src/transport-pool.d.ts.map +1 -1
  249. package/dist/src/transport-pool.js +50 -4
  250. package/dist/src/transport-pool.js.map +1 -1
  251. package/dist/src/transports/adaptive-concurrency.d.ts +168 -0
  252. package/dist/src/transports/adaptive-concurrency.d.ts.map +1 -0
  253. package/dist/src/transports/adaptive-concurrency.js +353 -0
  254. package/dist/src/transports/adaptive-concurrency.js.map +1 -0
  255. package/dist/src/transports/bullmq/adaptive-concurrency.d.ts +1 -165
  256. package/dist/src/transports/bullmq/adaptive-concurrency.d.ts.map +1 -1
  257. package/dist/src/transports/bullmq/adaptive-concurrency.js +3 -351
  258. package/dist/src/transports/bullmq/adaptive-concurrency.js.map +1 -1
  259. package/dist/src/transports/bullmq/bullmq-transport.d.ts +49 -1
  260. package/dist/src/transports/bullmq/bullmq-transport.d.ts.map +1 -1
  261. package/dist/src/transports/bullmq/bullmq-transport.js +330 -38
  262. package/dist/src/transports/bullmq/bullmq-transport.js.map +1 -1
  263. package/dist/src/transports/bullmq/deps.d.ts +18 -2
  264. package/dist/src/transports/bullmq/deps.d.ts.map +1 -1
  265. package/dist/src/transports/bullmq/deps.js +44 -2
  266. package/dist/src/transports/bullmq/deps.js.map +1 -1
  267. package/dist/src/transports/db-helpers.d.ts +39 -0
  268. package/dist/src/transports/db-helpers.d.ts.map +1 -1
  269. package/dist/src/transports/db-helpers.js +73 -0
  270. package/dist/src/transports/db-helpers.js.map +1 -1
  271. package/dist/src/transports/db-remote.d.ts +53 -0
  272. package/dist/src/transports/db-remote.d.ts.map +1 -0
  273. package/dist/src/transports/db-remote.js +147 -0
  274. package/dist/src/transports/db-remote.js.map +1 -0
  275. package/dist/src/transports/db-schema.d.ts +44 -1
  276. package/dist/src/transports/db-schema.d.ts.map +1 -1
  277. package/dist/src/transports/db-schema.js +227 -88
  278. package/dist/src/transports/db-schema.js.map +1 -1
  279. package/dist/src/transports/db.d.ts +189 -6
  280. package/dist/src/transports/db.d.ts.map +1 -1
  281. package/dist/src/transports/db.js +1291 -137
  282. package/dist/src/transports/db.js.map +1 -1
  283. package/dist/src/transports/event-emitter.d.ts +8 -0
  284. package/dist/src/transports/event-emitter.d.ts.map +1 -1
  285. package/dist/src/transports/event-emitter.js +36 -3
  286. package/dist/src/transports/event-emitter.js.map +1 -1
  287. package/dist/src/transports/factory.d.ts +110 -5
  288. package/dist/src/transports/factory.d.ts.map +1 -1
  289. package/dist/src/transports/factory.js +56 -9
  290. package/dist/src/transports/factory.js.map +1 -1
  291. package/dist/src/transports/queue-mock-adapter.d.ts +7 -2
  292. package/dist/src/transports/queue-mock-adapter.d.ts.map +1 -1
  293. package/dist/src/transports/queue-mock-adapter.js +18 -2
  294. package/dist/src/transports/queue-mock-adapter.js.map +1 -1
  295. package/dist/src/transports/queue-remote.d.ts +146 -0
  296. package/dist/src/transports/queue-remote.d.ts.map +1 -0
  297. package/dist/src/transports/queue-remote.js +398 -0
  298. package/dist/src/transports/queue-remote.js.map +1 -0
  299. package/dist/src/transports/queue.d.ts +159 -6
  300. package/dist/src/transports/queue.d.ts.map +1 -1
  301. package/dist/src/transports/queue.js +747 -37
  302. package/dist/src/transports/queue.js.map +1 -1
  303. package/dist/src/transports/task-failure.d.ts +31 -0
  304. package/dist/src/transports/task-failure.d.ts.map +1 -0
  305. package/dist/src/transports/task-failure.js +50 -0
  306. package/dist/src/transports/task-failure.js.map +1 -0
  307. package/dist/src/workflow-als.d.ts +1 -1
  308. package/dist/src/workflow-als.d.ts.map +1 -1
  309. package/dist/src/workflow-ctx.d.ts +10 -0
  310. package/dist/src/workflow-ctx.d.ts.map +1 -1
  311. package/dist/src/workflow-ctx.js +97 -15
  312. package/dist/src/workflow-ctx.js.map +1 -1
  313. package/dist/src/workflow-discovery.d.ts +32 -41
  314. package/dist/src/workflow-discovery.d.ts.map +1 -1
  315. package/dist/src/workflow-discovery.js +65 -88
  316. package/dist/src/workflow-discovery.js.map +1 -1
  317. package/dist/src/workflow-ref.d.ts +26 -0
  318. package/dist/src/workflow-ref.d.ts.map +1 -1
  319. package/dist/src/workflow-ref.js.map +1 -1
  320. package/dist/stubs/config/durable.stub +6 -0
  321. package/dist/stubs/config/durable_dashboard.stub +7 -3
  322. package/dist/stubs/database/migrations/create_durable_tables.stub +2 -1
  323. package/dist/stubs/database/migrations/create_durable_transport_messages.stub +43 -0
  324. package/dist/stubs/database/migrations/create_durable_transport_tables.stub +12 -9
  325. package/dist/stubs/database/migrations/create_durable_transport_worker_keys.stub +1 -1
  326. package/dist/stubs/make/workflow/main.stub +1 -1
  327. package/package.json +6 -4
  328. package/skills/durable-cluster/SKILL.md +80 -11
  329. package/skills/durable-determinism/SKILL.md +11 -5
  330. package/skills/durable-reliability/SKILL.md +77 -37
  331. package/skills/durable-setup/SKILL.md +51 -22
  332. package/skills/durable-transports-stores/SKILL.md +128 -18
  333. package/skills/durable-workflows/SKILL.md +83 -18
  334. package/dist/assets/spa/assets/index-DdB9zxuX.js +0 -16
  335. package/dist/assets/spa/assets/index-DdB9zxuX.js.map +0 -1
@@ -0,0 +1,92 @@
1
+ /**
2
+ * The workflow directory — {@link ./announced}'s registry plus the thing an empty registry could
3
+ * never say: WHY it is empty.
4
+ *
5
+ * ## The three states an empty list used to collapse
6
+ *
7
+ * "What workflows can I call?" has three honest answers, and returning `[]` for all of them is the
8
+ * bug this module exists to fix. They are not shades of the same answer; they call for three
9
+ * different actions from whoever asked.
10
+ *
11
+ * 1. **This process cannot ask.** No transport here can introspect the advertisement or liveness
12
+ * keyspace — a pure in-process pool advertises nothing and scans nothing. Workers may well be
13
+ * running; nobody looked. ({@link WorkflowDirectory.supported} is `false`.) The action is to
14
+ * configure a transport, or to stop treating this pod's answer as the deployment's answer.
15
+ * 2. **Nothing is live.** The fleet WAS asked and the fleet is empty. ({@link WorkflowDirectory.supported}
16
+ * is `true`, `workflows` is `[]`.) The action is to start a worker.
17
+ * 3. **Here it is.** ({@link WorkflowDirectory.supported} is `true`, `workflows` is populated.)
18
+ *
19
+ * There is a fourth that hides inside the second and is the most expensive to debug, because it
20
+ * looks exactly like "nobody is running" from the caller's side: **a worker is live on a partition
21
+ * this engine does not serve.** A worker started with a partition consumes `<token>@<partition>`,
22
+ * convention resolution computes the token for THIS engine's namespace, misses, and reports absence.
23
+ * The heartbeat keyspace is shared, so the evidence is right there — and
24
+ * {@link WorkflowDirectory.otherPartitions} reports it instead of letting the caller conclude that
25
+ * nothing exists.
26
+ *
27
+ * ## Why a sentence rides along
28
+ *
29
+ * Every field here is structured and a caller can branch on all of it. {@link WorkflowDirectory.detail}
30
+ * exists anyway because the three states are only useful if the human reading the picker learns which
31
+ * one they are in, and a UI that has to re-derive that prose from booleans will re-derive it
32
+ * differently in each place it is shown. The sentence is written once, next to the logic that decides
33
+ * which state it is.
34
+ */
35
+ import type { AnnouncedWorkflow, HeartbeatSighting } from './announced.js';
36
+ import type { RawWorkerDescriptor, WorkerDescriptor } from './descriptor.js';
37
+ /** The namespace a descriptor or a bare routing token belongs to when it states none. Mirrors
38
+ * `tenantGroup`'s default-is-bare rule, so a single-tenant deployment reads as `'default'`
39
+ * everywhere rather than as a special case. */
40
+ export declare const DEFAULT_PARTITION = "default";
41
+ /** Live workers seen on a partition the asking engine does not serve — the case that otherwise reads
42
+ * identically to "nothing is running". */
43
+ export interface PartitionSighting {
44
+ /** The partition suffix carried by the tokens (never this engine's own). */
45
+ partition: string;
46
+ /** The routing tokens live on it, as published (sorted). */
47
+ groups: string[];
48
+ /** The instance ids beating there (sorted). */
49
+ instances: string[];
50
+ }
51
+ /** What the live fleet can be asked, and what it answered. See the module docblock for the states. */
52
+ export interface WorkflowDirectory {
53
+ /**
54
+ * Could this process ask the fleet at all?
55
+ *
56
+ * `false` means no transport here can read the advertisement or liveness keyspace, so `workflows`
57
+ * is empty because nothing was asked — NOT because nothing is running. `true` means the read
58
+ * happened and `workflows` is the answer, including when it is empty.
59
+ */
60
+ supported: boolean;
61
+ /** Everything callable in this engine's partition, declared and observed alike. */
62
+ workflows: AnnouncedWorkflow[];
63
+ /** Live workers on OTHER partitions (empty for an operator engine, which serves them all). */
64
+ otherPartitions: PartitionSighting[];
65
+ /** One sentence saying which state this is and what it implies. Written for a human. */
66
+ detail: string;
67
+ }
68
+ /** The partition a routing token belongs to: the suffix after the LAST `@`, or {@link DEFAULT_PARTITION}
69
+ * for a bare token. Matches how `tenantGroup` builds the token and how `workerHealth` takes it apart. */
70
+ export declare function partitionOfToken(token: string): string;
71
+ /**
72
+ * Fold live descriptors and live heartbeats into the directory for one engine.
73
+ *
74
+ * `namespace` is the asking engine's, and `undefined` means an operator that serves every partition:
75
+ * it filters nothing and reports no foreign partitions, because
76
+ * none of them are foreign to it. A namespaced engine sees only its own partition's workers, and
77
+ * everything else it can see is reported as a sighting rather than silently dropped — dropping is
78
+ * what made a misconfigured partition indistinguishable from an empty fleet.
79
+ *
80
+ * Pure and holds nothing: the caller does the two live reads it already knows how to do, folds them
81
+ * here, and drops the result.
82
+ */
83
+ export declare function buildWorkflowDirectory(input: {
84
+ descriptors: readonly (RawWorkerDescriptor | WorkerDescriptor)[];
85
+ heartbeats: readonly HeartbeatSighting[];
86
+ namespace: string | undefined;
87
+ /** Whether ANY transport in the pool could perform the reads above. */
88
+ supported: boolean;
89
+ /** The queue-token form of a workflow name — injected so this module needs no queue dependency. */
90
+ sanitize: (name: string) => string;
91
+ }): WorkflowDirectory;
92
+ //# sourceMappingURL=directory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory.d.ts","sourceRoot":"","sources":["../../../src/handshake/directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;gDAEgD;AAChD,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C;2CAC2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,sGAAsG;AACtG,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,8FAA8F;IAC9F,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;0GAC0G;AAC1G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,WAAW,EAAE,SAAS,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,EAAE,CAAC;IACjE,UAAU,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACzC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,uEAAuE;IACvE,SAAS,EAAE,OAAO,CAAC;IACnB,mGAAmG;IACnG,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,GAAG,iBAAiB,CA0DpB"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * The workflow directory — {@link ./announced}'s registry plus the thing an empty registry could
3
+ * never say: WHY it is empty.
4
+ *
5
+ * ## The three states an empty list used to collapse
6
+ *
7
+ * "What workflows can I call?" has three honest answers, and returning `[]` for all of them is the
8
+ * bug this module exists to fix. They are not shades of the same answer; they call for three
9
+ * different actions from whoever asked.
10
+ *
11
+ * 1. **This process cannot ask.** No transport here can introspect the advertisement or liveness
12
+ * keyspace — a pure in-process pool advertises nothing and scans nothing. Workers may well be
13
+ * running; nobody looked. ({@link WorkflowDirectory.supported} is `false`.) The action is to
14
+ * configure a transport, or to stop treating this pod's answer as the deployment's answer.
15
+ * 2. **Nothing is live.** The fleet WAS asked and the fleet is empty. ({@link WorkflowDirectory.supported}
16
+ * is `true`, `workflows` is `[]`.) The action is to start a worker.
17
+ * 3. **Here it is.** ({@link WorkflowDirectory.supported} is `true`, `workflows` is populated.)
18
+ *
19
+ * There is a fourth that hides inside the second and is the most expensive to debug, because it
20
+ * looks exactly like "nobody is running" from the caller's side: **a worker is live on a partition
21
+ * this engine does not serve.** A worker started with a partition consumes `<token>@<partition>`,
22
+ * convention resolution computes the token for THIS engine's namespace, misses, and reports absence.
23
+ * The heartbeat keyspace is shared, so the evidence is right there — and
24
+ * {@link WorkflowDirectory.otherPartitions} reports it instead of letting the caller conclude that
25
+ * nothing exists.
26
+ *
27
+ * ## Why a sentence rides along
28
+ *
29
+ * Every field here is structured and a caller can branch on all of it. {@link WorkflowDirectory.detail}
30
+ * exists anyway because the three states are only useful if the human reading the picker learns which
31
+ * one they are in, and a UI that has to re-derive that prose from booleans will re-derive it
32
+ * differently in each place it is shown. The sentence is written once, next to the logic that decides
33
+ * which state it is.
34
+ */
35
+ import { aggregateAnnouncements, coveredTokens, observedAnnouncements } from './announced.js';
36
+ /** The namespace a descriptor or a bare routing token belongs to when it states none. Mirrors
37
+ * `tenantGroup`'s default-is-bare rule, so a single-tenant deployment reads as `'default'`
38
+ * everywhere rather than as a special case. */
39
+ export const DEFAULT_PARTITION = 'default';
40
+ /** The partition a routing token belongs to: the suffix after the LAST `@`, or {@link DEFAULT_PARTITION}
41
+ * for a bare token. Matches how `tenantGroup` builds the token and how `workerHealth` takes it apart. */
42
+ export function partitionOfToken(token) {
43
+ const at = token.lastIndexOf('@');
44
+ return at === -1 ? DEFAULT_PARTITION : token.slice(at + 1);
45
+ }
46
+ /**
47
+ * Fold live descriptors and live heartbeats into the directory for one engine.
48
+ *
49
+ * `namespace` is the asking engine's, and `undefined` means an operator that serves every partition:
50
+ * it filters nothing and reports no foreign partitions, because
51
+ * none of them are foreign to it. A namespaced engine sees only its own partition's workers, and
52
+ * everything else it can see is reported as a sighting rather than silently dropped — dropping is
53
+ * what made a misconfigured partition indistinguishable from an empty fleet.
54
+ *
55
+ * Pure and holds nothing: the caller does the two live reads it already knows how to do, folds them
56
+ * here, and drops the result.
57
+ */
58
+ export function buildWorkflowDirectory(input) {
59
+ const { descriptors, heartbeats, namespace, supported, sanitize } = input;
60
+ if (!supported) {
61
+ return {
62
+ supported: false,
63
+ workflows: [],
64
+ otherPartitions: [],
65
+ detail: 'No transport in this process can read what the fleet advertises, so nothing here was asked and this list is empty for that reason alone. Workers may well be running. A workflow can still be called by name.',
66
+ };
67
+ }
68
+ const mine = namespace === undefined ? undefined : namespace;
69
+ const ownDescriptors = mine === undefined
70
+ ? descriptors
71
+ : descriptors.filter((d) => (d.namespace ?? DEFAULT_PARTITION) === mine);
72
+ const ownBeats = [];
73
+ const foreign = new Map();
74
+ for (const beat of heartbeats) {
75
+ if (!beat.group)
76
+ continue;
77
+ const partition = partitionOfToken(beat.group);
78
+ if (mine === undefined || partition === mine) {
79
+ ownBeats.push(beat);
80
+ continue;
81
+ }
82
+ const seen = foreign.get(partition);
83
+ if (seen) {
84
+ seen.groups.add(beat.group);
85
+ seen.instances.add(beat.instanceId);
86
+ }
87
+ else {
88
+ foreign.set(partition, {
89
+ groups: new Set([beat.group]),
90
+ instances: new Set([beat.instanceId]),
91
+ });
92
+ }
93
+ }
94
+ const declared = aggregateAnnouncements(ownDescriptors);
95
+ const observed = observedAnnouncements(ownBeats, coveredTokens(declared, ownDescriptors, sanitize));
96
+ const workflows = [...declared, ...observed].sort((a, b) => a.key.localeCompare(b.key));
97
+ const otherPartitions = [...foreign.entries()]
98
+ .map(([partition, seen]) => ({
99
+ partition,
100
+ groups: [...seen.groups].sort(),
101
+ instances: [...seen.instances].sort(),
102
+ }))
103
+ .sort((a, b) => a.partition.localeCompare(b.partition));
104
+ return {
105
+ supported: true,
106
+ workflows,
107
+ otherPartitions,
108
+ detail: describeDirectory(workflows, otherPartitions, mine),
109
+ };
110
+ }
111
+ /** A few names plus a count, for prose. Route-by-handler gives every step its own queue, so one
112
+ * partitioned worker can be beating on dozens of tokens and inlining them all makes the sentence
113
+ * unreadable — measured at 17 on a single live worker. The complete list stays on
114
+ * {@link PartitionSighting.groups}, where a caller that wants it can read it in full. */
115
+ function summarize(names, limit = 3) {
116
+ if (names.length <= limit)
117
+ return names.join(', ');
118
+ return `${names.slice(0, limit).join(', ')} and ${names.length - limit} more`;
119
+ }
120
+ /** The one sentence a picker shows. Says which of the states the reader is in, and — when nothing is
121
+ * callable but something IS beating elsewhere — names the partition, because that is the difference
122
+ * between "start a worker" and "the worker you started is on the wrong partition". */
123
+ function describeDirectory(workflows, otherPartitions, namespace) {
124
+ const here = namespace === undefined ? 'this deployment' : `partition "${namespace}"`;
125
+ const elsewhere = otherPartitions.length === 0
126
+ ? ''
127
+ : ` Live workers were seen on ${otherPartitions
128
+ .map((p) => `"${p.partition}" (${summarize(p.groups)})`)
129
+ .join(', ')}, which ${here} does not route to — a worker on the wrong partition looks exactly like no worker at all, so it is named here rather than left out.`;
130
+ if (workflows.length === 0) {
131
+ return `The fleet was asked just now and nothing is live in ${here}, so this list is empty because the deployment is empty — not because the question could not be put.${elsewhere}`;
132
+ }
133
+ const observed = workflows.filter((w) => w.evidence === 'observed').length;
134
+ const declaredNote = observed === 0
135
+ ? ''
136
+ : ` ${observed} of them ${observed === 1 ? 'is' : 'are'} known only from a live queue: the worker serving ${observed === 1 ? 'it' : 'them'} publishes no description, so ${observed === 1 ? 'its' : 'their'} version, origin and runtime are genuinely unknown and a version pinned against ${observed === 1 ? 'it' : 'them'} cannot be checked.`;
137
+ return `Every workflow a live worker in ${here} can execute, read just now. A worker that stops beating drops off this list within about half a minute.${declaredNote}${elsewhere}`;
138
+ }
139
+ //# sourceMappingURL=directory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"directory.js","sourceRoot":"","sources":["../../../src/handshake/directory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAGH,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAG9F;;gDAEgD;AAChD,MAAM,CAAC,MAAM,iBAAiB,GAAG,SAAS,CAAC;AA+B3C;0GAC0G;AAC1G,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,MAAM,EAAE,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CA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Z,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,IAAI,QAAQ,YAAY,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,qDAAqD,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,iCAAiC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,mFAAmF,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,qBAAqB,CAAC;IACtV,OAAO,mCAAmC,IAAI,2GAA2G,YAAY,GAAG,SAAS,EAAE,CAAC;AACtL,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { IndexGenerator } from '@adonisjs/assembler/index_generator';
2
+ /** What the workflows/steps hooks share: the knobs that differ between the two barrels. */
3
+ export interface BarrelSourcesSpec {
4
+ /** The `IndexGenerator` source name and the barrel's export name (`workflows` / `steps`). */
5
+ name: 'workflows' | 'steps';
6
+ /** One directory, or several, relative to the app root. */
7
+ source: string | readonly string[];
8
+ /** Alias for the single-directory barrel. `undefined` means "the hook default". */
9
+ importAlias: string | undefined;
10
+ defaultImportAlias: string;
11
+ output: string;
12
+ removeSuffix: string;
13
+ }
14
+ /**
15
+ * Register the barrel source(s) for one hook on the assembler's `IndexGenerator`.
16
+ *
17
+ * - **One directory** (a string, or a one-element array): exactly the historical single source — a
18
+ * stock `barrelFile` through `importAlias`, so its output is unchanged byte for byte.
19
+ * - **Several directories**: one generator source PER ROOT, all writing the same `output`. Each
20
+ * source owns its root's file list (the watcher's `addFile`/`removeFile` reach every source, so a
21
+ * change in any root regenerates), and every source renders the whole barrel from the shared,
22
+ * per-root state. The result is a single array export — `[{ root, modules: { file: () => import() } }]`
23
+ * — that the provider's barrel loader registers root by root. Entries import through paths
24
+ * relative to the barrel (`../../app/orders/flows/charge_workflow.js`), so no per-root
25
+ * `package.json` alias is needed.
26
+ */
27
+ export declare function addBarrelSources(indexGenerator: IndexGenerator, spec: BarrelSourcesSpec): void;
28
+ //# sourceMappingURL=barrel-sources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barrel-sources.d.ts","sourceRoot":"","sources":["../../../src/hooks/barrel-sources.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E,2FAA2F;AAC3F,MAAM,WAAW,iBAAiB;IAChC,6FAA6F;IAC7F,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC;IAC5B,2DAA2D;IAC3D,MAAM,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACnC,mFAAmF;IACnF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB;AASD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAmF9F"}
@@ -0,0 +1,92 @@
1
+ import { dirname, join, relative } from 'node:path/posix';
2
+ const toUnix = (path) => path.replace(/\\/g, '/');
3
+ const quote = (value) => `'${value.replace(/\\/g, '\\\\').replace(/'/g, "\\'")}'`;
4
+ /**
5
+ * Register the barrel source(s) for one hook on the assembler's `IndexGenerator`.
6
+ *
7
+ * - **One directory** (a string, or a one-element array): exactly the historical single source — a
8
+ * stock `barrelFile` through `importAlias`, so its output is unchanged byte for byte.
9
+ * - **Several directories**: one generator source PER ROOT, all writing the same `output`. Each
10
+ * source owns its root's file list (the watcher's `addFile`/`removeFile` reach every source, so a
11
+ * change in any root regenerates), and every source renders the whole barrel from the shared,
12
+ * per-root state. The result is a single array export — `[{ root, modules: { file: () => import() } }]`
13
+ * — that the provider's barrel loader registers root by root. Entries import through paths
14
+ * relative to the barrel (`../../app/orders/flows/charge_workflow.js`), so no per-root
15
+ * `package.json` alias is needed.
16
+ */
17
+ export function addBarrelSources(indexGenerator, spec) {
18
+ const roots = [...new Set(typeof spec.source === 'string' ? [spec.source] : spec.source)];
19
+ if (roots.length === 0) {
20
+ throw new Error(`@agora/durable: the ${spec.name} hook needs at least one \`source\` directory; to turn the barrel off, remove the hook from adonisrc.ts.`);
21
+ }
22
+ if (roots.length === 1) {
23
+ indexGenerator.add(spec.name, {
24
+ source: roots[0],
25
+ as: 'barrelFile',
26
+ exportName: spec.name,
27
+ importAlias: spec.importAlias ?? spec.defaultImportAlias,
28
+ // `app/workflows/billing/charge_workflow.ts` → key `Billing/Charge`; the suffix is dropped so a
29
+ // barrel key reads as the class, mirroring controllers' `removeSuffix: 'controller'`.
30
+ removeSuffix: spec.removeSuffix,
31
+ skipSegments: [spec.name],
32
+ output: spec.output,
33
+ comment: true,
34
+ });
35
+ return;
36
+ }
37
+ if (spec.importAlias !== undefined) {
38
+ throw new Error(`@agora/durable: the ${spec.name} hook's \`importAlias\` applies to a single \`source\`; with several directories the barrel imports each module through a relative path, so drop \`importAlias\`.`);
39
+ }
40
+ const appRoot = toUnix(indexGenerator.appRoot);
41
+ const outputDir = dirname(join(appRoot, toUnix(spec.output)));
42
+ // root → that root's modules as [app-relative file, import specifier], refreshed by its own source.
43
+ const state = new Map(roots.map((root) => [root, []]));
44
+ const render = (buffer) => {
45
+ buffer.write(`export const ${spec.name} = [`).indent();
46
+ for (const root of roots) {
47
+ buffer.write('{').indent();
48
+ buffer.write(`root: ${quote(root)},`);
49
+ const modules = state.get(root) ?? [];
50
+ if (modules.length === 0) {
51
+ buffer.write('modules: {},');
52
+ }
53
+ else {
54
+ buffer.write('modules: {').indent();
55
+ for (const [file, specifier] of modules) {
56
+ buffer.write(`${quote(file)}: () => import(${quote(specifier)}),`);
57
+ }
58
+ buffer.dedent().write('},');
59
+ }
60
+ buffer.dedent().write('},');
61
+ }
62
+ buffer.dedent().write(']');
63
+ };
64
+ for (const root of roots) {
65
+ indexGenerator.add(`${spec.name}:${root}`, {
66
+ source: root,
67
+ output: spec.output,
68
+ comment: true,
69
+ as: (vfs, buffer) => {
70
+ const files = Object.values(vfs.asList()).map((file) => toUnix(file));
71
+ files.sort();
72
+ // A built `foo.js` next to its `foo.ts` source is ONE module: keep a single entry per
73
+ // specifier, keyed by the `.ts` file when both are present.
74
+ const bySpecifier = new Map();
75
+ for (const file of files) {
76
+ let specifier = relative(outputDir, file).replace(/\.tsx?$/, '.js');
77
+ if (!specifier.startsWith('.'))
78
+ specifier = `./${specifier}`;
79
+ const known = bySpecifier.get(specifier);
80
+ if (known === undefined || !/\.tsx?$/.test(known))
81
+ bySpecifier.set(specifier, file);
82
+ }
83
+ state.set(root, [...bySpecifier].map(([specifier, file]) => [
84
+ relative(appRoot, file),
85
+ specifier,
86
+ ]));
87
+ render(buffer);
88
+ },
89
+ });
90
+ }
91
+ }
92
+ //# sourceMappingURL=barrel-sources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"barrel-sources.js","sourceRoot":"","sources":["../../../src/hooks/barrel-sources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAoB1D,MAAM,MAAM,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC1D,MAAM,KAAK,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC;AAE1F;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,cAA8B,EAAE,IAAuB;IACtF,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,IA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** Options for {@link stepsHook} — mirror the relevant `IndexGenerator.add` knobs. */
9
9
  export interface StepsHookOptions {
10
- /** Directory the generator scans for step modules, relative to the app root. Default `app/steps`. */
11
- source?: string;
12
- /** Import alias the generated barrel uses for each step module. Default `#steps`. */
10
+ /**
11
+ * Directory the generator scans for step modules, relative to the app root. Default `app/steps`.
12
+ * Pass several directories (a modular app: one per bounded context) to get ONE barrel covering
13
+ * all of them; list the same directories in `config/durable.ts` (`stepsPath`) so the
14
+ * runtime-scan fallback agrees with the barrel.
15
+ */
16
+ source?: string | readonly string[];
17
+ /**
18
+ * Import alias the generated barrel uses for each step module. Default `#steps`. Single
19
+ * `source` only: a multi-directory barrel imports through relative paths, and passing an alias
20
+ * with several directories throws.
21
+ */
13
22
  importAlias?: string;
14
23
  /** Output path for the generated barrel, relative to the app root. Default `.adonisjs/durable/steps.ts`. */
15
24
  output?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B,qGAAqG;IACrG,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4GAA4G;IAC5G,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,aAY3C,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI,CAYR;AAED;8EAC8E;kCAlBjE,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI"}
1
+ {"version":3,"file":"steps.d.ts","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAG1E;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AAEnE,sFAAsF;AACtF,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4GAA4G;IAC5G,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,aAQ3C,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI,CAUR;AAED;8EAC8E;kCAhBjE,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI"}
@@ -1,3 +1,4 @@
1
+ import { addBarrelSources } from './barrel-sources.js';
1
2
  /**
2
3
  * Where the generated steps barrel is written, relative to the app root. The durable provider imports
3
4
  * THIS path at boot (build-time codegen) instead of scanning `app/steps` with `readdir` at runtime.
@@ -22,9 +23,6 @@ export const GENERATED_STEPS_OUTPUT = '.adonisjs/durable/steps.ts';
22
23
  * ```
23
24
  */
24
25
  export function stepsHook(options = {}) {
25
- const source = options.source ?? 'app/steps';
26
- const importAlias = options.importAlias ?? '#steps';
27
- const output = options.output ?? GENERATED_STEPS_OUTPUT;
28
26
  // A FUNCTION, not an object with a `run` method. `@poppinss/hooks` — the runner the
29
27
  // assembler drives its `init` hooks with — invokes a handler as
30
28
  // `typeof handler === 'function' ? handler(...data) : handler.handle(action, ...data)`
@@ -32,15 +30,13 @@ export function stepsHook(options = {}) {
32
30
  // ran `node ace configure` fail its build with `handler.handle is not a function`, and it
33
31
  // also mismatched the assembler's own `DefineHook` type, which is a plain function.
34
32
  return function generateStepsBarrel(_parent, _hooks, indexGenerator) {
35
- indexGenerator.add('steps', {
36
- source,
37
- as: 'barrelFile',
38
- exportName: 'steps',
39
- importAlias,
33
+ addBarrelSources(indexGenerator, {
34
+ name: 'steps',
35
+ source: options.source ?? 'app/steps',
36
+ importAlias: options.importAlias,
37
+ defaultImportAlias: '#steps',
38
+ output: options.output ?? GENERATED_STEPS_OUTPUT,
40
39
  removeSuffix: 'step',
41
- skipSegments: ['steps'],
42
- output,
43
- comment: true,
44
40
  });
45
41
  };
46
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAYnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO,GAAqB,EAAE;IACtD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,WAAW,CAAC;IAC7C,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,QAAQ,CAAC;IACpD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,sBAAsB,CAAC;IAExD,oFAAoF;IACpF,gEAAgE;IAChE,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,oFAAoF;IACpF,OAAO,SAAS,mBAAmB,CACjC,OAAgB,EAChB,MAAe,EACf,cAA8B;QAE9B,cAAc,CAAC,GAAG,CAAC,OAAO,EAAE;YAC1B,MAAM;YACN,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,OAAO;YACnB,WAAW;YACX,YAAY,EAAE,MAAM;YACpB,YAAY,EAAE,CAAC,OAAO,CAAC;YACvB,MAAM;YACN,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;8EAC8E;AAC9E,eAAe,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"steps.js","sourceRoot":"","sources":["../../../src/hooks/steps.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,4BAA4B,CAAC;AAqBnE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO,GAAqB,EAAE;IACtD,oFAAoF;IACpF,gEAAgE;IAChE,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,oFAAoF;IACpF,OAAO,SAAS,mBAAmB,CACjC,OAAgB,EAChB,MAAe,EACf,cAA8B;QAE9B,gBAAgB,CAAC,cAAc,EAAE;YAC/B,IAAI,EAAE,OAAO;YACb,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,WAAW;YACrC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,kBAAkB,EAAE,QAAQ;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,sBAAsB;YAChD,YAAY,EAAE,MAAM;SACrB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;8EAC8E;AAC9E,eAAe,SAAS,EAAE,CAAC"}
@@ -10,9 +10,18 @@ export declare const GENERATED_WORKFLOWS_OUTPUT = ".adonisjs/durable/workflows.t
10
10
  * point the generator at a non-default workflows directory or import alias.
11
11
  */
12
12
  export interface WorkflowsHookOptions {
13
- /** Directory the generator scans for workflow modules, relative to the app root. Default `app/workflows`. */
14
- source?: string;
15
- /** Import alias the generated barrel uses for each workflow module. Default `#workflows`. */
13
+ /**
14
+ * Directory the generator scans for workflow modules, relative to the app root. Default `app/workflows`.
15
+ * Pass several directories (a modular app: one per bounded context) to get ONE barrel covering
16
+ * all of them; list the same directories in `config/durable.ts` (`workflowsPath`) so the
17
+ * runtime-scan fallback agrees with the barrel.
18
+ */
19
+ source?: string | readonly string[];
20
+ /**
21
+ * Import alias the generated barrel uses for each workflow module. Default `#workflows`. Single
22
+ * `source` only: a multi-directory barrel imports through relative paths, and passing an alias
23
+ * with several directories throws.
24
+ */
16
25
  importAlias?: string;
17
26
  /** Output path for the generated barrel, relative to the app root. Default `.adonisjs/durable/workflows.ts`. */
18
27
  output?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAE1E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,6GAA6G;IAC7G,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,aAYnD,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI,CAcR;AAED;8EAC8E;kCApBjE,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI"}
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAG1E;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,mCAAmC,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;IACpC;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gHAAgH;IAChH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,aAAa,CAAC,OAAO,GAAE,oBAAyB,aAQnD,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI,CAUR;AAED;8EAC8E;kCAhBjE,OAAO,UACR,OAAO,kBACC,cAAc,KAC7B,IAAI"}
@@ -1,3 +1,4 @@
1
+ import { addBarrelSources } from './barrel-sources.js';
1
2
  /**
2
3
  * Where the generated workflows barrel is written, relative to the app root. The durable provider
3
4
  * imports THIS path at boot (build-time codegen) instead of scanning `app/workflows` with `readdir`
@@ -30,9 +31,6 @@ export const GENERATED_WORKFLOWS_OUTPUT = '.adonisjs/durable/workflows.ts';
30
31
  * The default export is the hook object the assembler expects (`{ run(parent, hooks, indexGenerator) }`).
31
32
  */
32
33
  export function workflowsHook(options = {}) {
33
- const source = options.source ?? 'app/workflows';
34
- const importAlias = options.importAlias ?? '#workflows';
35
- const output = options.output ?? GENERATED_WORKFLOWS_OUTPUT;
36
34
  // A FUNCTION, not an object with a `run` method. `@poppinss/hooks` — the runner the
37
35
  // assembler drives its `init` hooks with — invokes a handler as
38
36
  // `typeof handler === 'function' ? handler(...data) : handler.handle(action, ...data)`
@@ -40,17 +38,13 @@ export function workflowsHook(options = {}) {
40
38
  // ran `node ace configure` fail its build with `handler.handle is not a function`, and it
41
39
  // also mismatched the assembler's own `DefineHook` type, which is a plain function.
42
40
  return function generateWorkflowsBarrel(_parent, _hooks, indexGenerator) {
43
- indexGenerator.add('workflows', {
44
- source,
45
- as: 'barrelFile',
46
- exportName: 'workflows',
47
- importAlias,
48
- // `app/workflows/billing/charge_workflow.ts` → key `Billing/Charge`; the `Workflow` suffix is
49
- // dropped so a barrel key reads as the class, mirroring controllers' `removeSuffix: 'controller'`.
41
+ addBarrelSources(indexGenerator, {
42
+ name: 'workflows',
43
+ source: options.source ?? 'app/workflows',
44
+ importAlias: options.importAlias,
45
+ defaultImportAlias: '#workflows',
46
+ output: options.output ?? GENERATED_WORKFLOWS_OUTPUT,
50
47
  removeSuffix: 'workflow',
51
- skipSegments: ['workflows'],
52
- output,
53
- comment: true,
54
48
  });
55
49
  };
56
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAe3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAAC,OAAO,GAAyB,EAAE;IAC9D,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,eAAe,CAAC;IACjD,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,YAAY,CAAC;IACxD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,0BAA0B,CAAC;IAE5D,oFAAoF;IACpF,gEAAgE;IAChE,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,oFAAoF;IACpF,OAAO,SAAS,uBAAuB,CACrC,OAAgB,EAChB,MAAe,EACf,cAA8B;QAE9B,cAAc,CAAC,GAAG,CAAC,WAAW,EAAE;YAC9B,MAAM;YACN,EAAE,EAAE,YAAY;YAChB,UAAU,EAAE,WAAW;YACvB,WAAW;YACX,8FAA8F;YAC9F,mGAAmG;YACnG,YAAY,EAAE,UAAU;YACxB,YAAY,EAAE,CAAC,WAAW,CAAC;YAC3B,MAAM;YACN,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;8EAC8E;AAC9E,eAAe,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"workflows.js","sourceRoot":"","sources":["../../../src/hooks/workflows.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,gCAAgC,CAAC;AAwB3E;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,aAAa,CAAC,OAAO,GAAyB,EAAE;IAC9D,oFAAoF;IACpF,gEAAgE;IAChE,yFAAyF;IACzF,0FAA0F;IAC1F,0FAA0F;IAC1F,oFAAoF;IACpF,OAAO,SAAS,uBAAuB,CACrC,OAAgB,EAChB,MAAe,EACf,cAA8B;QAE9B,gBAAgB,CAAC,cAAc,EAAE;YAC/B,IAAI,EAAE,WAAW;YACjB,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,eAAe;YACzC,WAAW,EAAE,OAAO,CAAC,WAAW;YAChC,kBAAkB,EAAE,YAAY;YAChC,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,0BAA0B;YACpD,YAAY,EAAE,UAAU;SACzB,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAED;8EAC8E;AAC9E,eAAe,aAAa,EAAE,CAAC"}
@@ -1,9 +1,10 @@
1
1
  /** Keep in sync with this package's `version` in package.json. */
2
- export declare const VERSION = "0.49.1";
2
+ export declare const VERSION = "0.51.0";
3
3
  export { configure } from '../configure.js';
4
4
  export * from './admission.js';
5
5
  export type { AdmissionContext, AdmissionFactory, RedisAdmissionConfig, } from './admissions/factory.js';
6
6
  export { admissions } from './admissions/factory.js';
7
+ export { currentStep } from './ambient-step.js';
7
8
  export { BaseWorkflow, setWorkflowEngineResolver, type WorkflowDispatchOptions, type WorkflowEngineResolver, } from './base-workflow.js';
8
9
  export * from './codec-state-store.js';
9
10
  export { attachLiveness, DEFAULT_STALE_MS, filterStale, type ListRunsOptions, listRuns, parseDurationMs, type RunLister, type RunLiveness, renderRunsTable, retryRun, runTick, runWorkerLoop, type StalePendingStep, staleHint, type TickOptions, type TickResult, type WorkerLogger, type WorkerLoopOptions, } from './commands/index.js';
@@ -16,6 +17,7 @@ export { controlPlanes } from './control-planes/factory.js';
16
17
  export type { DurableConfig } from './define_config.js';
17
18
  export { defineConfig } from './define_config.js';
18
19
  export * from './diagnostics-bridge.js';
20
+ export { type BarrelModuleLoader, type BarrelTree, DuplicateDiscoveryError, type RootedBarrel, } from './discovery-roots.js';
19
21
  export * from './dispatch-routing.js';
20
22
  export * from './duration.js';
21
23
  export * from './engine.js';
@@ -27,6 +29,7 @@ export * from './events.js';
27
29
  export { childIdsOf, parentRunIdOf } from './fan-join.js';
28
30
  export * from './handshake/announced.js';
29
31
  export * from './handshake/descriptor.js';
32
+ export * from './handshake/directory.js';
30
33
  export * from './handshake/negotiate.js';
31
34
  export * from './handshake/routing.js';
32
35
  export * from './interfaces.js';
@@ -36,11 +39,13 @@ export * from './on-error.js';
36
39
  export * from './pollers.js';
37
40
  export * from './protocol.js';
38
41
  export * from './queue.js';
42
+ export { isRemoteEvent } from './remote-event.js';
39
43
  export * from './remote-workflow-executor.js';
40
44
  export * from './run-detail-summary.js';
45
+ export * from './run-facets.js';
41
46
  export type { DurableTopology, RunGateway, StartRunOptions } from './run-gateway/interface.js';
42
47
  export { ProxyRunGateway, type ProxyRunGatewayOptions, type ProxyTransport, } from './run-gateway/proxy-run-gateway.js';
43
- export { type ResponderTransport, RunRequestResponder, type RunRequestResponderOptions, } from './run-gateway/run-request-responder.js';
48
+ export { type ResponderTransport, RunRequestResponder, type RunRequestResponderOptions, UNSUPPORTED_RUN_REQUEST, } from './run-gateway/run-request-responder.js';
44
49
  export { type RunGatewayEngine, StoreRunGateway, type StoreRunGatewayOptions, } from './run-gateway/store-run-gateway.js';
45
50
  export { hmacTenantVerifier, signTenantToken } from './run-gateway/tenant-auth.js';
46
51
  export * from './run-pagination.js';
@@ -49,13 +54,17 @@ export * from './run-waiting.js';
49
54
  export * from './scheduler.js';
50
55
  export * from './schedules.js';
51
56
  export * from './search-attributes.js';
57
+ export * from './search-attributes-schema.js';
58
+ export * from './singleton-admission.js';
59
+ export * from './standard-schema.js';
52
60
  export * from './step-discovery.js';
53
61
  export { DURABLE_STEP_CONFIG, DURABLE_STEP_NAME, type StepConfig, type StepRef, stepConfigOf, stepNameOf, } from './step-name-symbol.js';
54
62
  export * from './step-ref.js';
55
63
  export type { LucidStoreConfig, StoreContext, StoreFactory } from './stores/factory.js';
56
64
  export { stores } from './stores/factory.js';
57
65
  export { LucidStateStore, type LucidStateStoreOptions } from './stores/lucid.js';
58
- export { type CreateDurableTablesOptions, createDurableTables, DURABLE_TABLES, type DurableSchemaLogger, dropDurableTables, } from './stores/lucid-schema.js';
66
+ export { type CorruptJsonColumn, onCorruptJsonColumn, } from './stores/lucid-mappers.js';
67
+ export { type CreateDurableTablesOptions, createDurableTables, DURABLE_JSON_COLUMNS, DURABLE_SCHEMA_META_TABLE, DURABLE_SCHEMA_REVISION, DURABLE_TABLES, type DurableSchemaLogger, dropDurableTables, } from './stores/lucid-schema.js';
59
68
  export * from './tenant-group.js';
60
69
  export { InMemoryStateStore } from './testing/in-memory-state-store.js';
61
70
  export { InMemoryTransport } from './testing/in-memory-transport.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,eAAO,MAAM,OAAO,WAAW,CAAC;AAKhC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,cAAc,gBAAgB,CAAC;AAC/B,YAAY,EACV,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EACL,YAAY,EACZ,yBAAyB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,GAC5B,MAAM,oBAAoB,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AAIvC,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,KAAK,eAAe,EACpB,QAAQ,EACR,eAAe,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,eAAe,EACf,QAAQ,EACR,OAAO,EACP,aAAa,EACb,KAAK,gBAAgB,EACrB,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,YAAY,EACV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