@graphrefly/graphrefly 0.47.1 → 0.48.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 (303) hide show
  1. package/dist/base/composition/index.cjs +28 -19
  2. package/dist/base/composition/index.cjs.map +1 -1
  3. package/dist/base/composition/index.d.cts +14 -5
  4. package/dist/base/composition/index.d.ts +14 -5
  5. package/dist/base/composition/index.js +9 -9
  6. package/dist/base/index.cjs +294 -164
  7. package/dist/base/index.cjs.map +1 -1
  8. package/dist/base/index.d.cts +2 -2
  9. package/dist/base/index.d.ts +2 -2
  10. package/dist/base/index.js +77 -72
  11. package/dist/base/io/index.cjs +145 -85
  12. package/dist/base/io/index.cjs.map +1 -1
  13. package/dist/base/io/index.d.cts +32 -5
  14. package/dist/base/io/index.d.ts +32 -5
  15. package/dist/base/io/index.js +5 -5
  16. package/dist/base/mutation/index.cjs +21 -0
  17. package/dist/base/mutation/index.cjs.map +1 -1
  18. package/dist/base/mutation/index.d.cts +23 -1
  19. package/dist/base/mutation/index.d.ts +23 -1
  20. package/dist/base/mutation/index.js +3 -1
  21. package/dist/base/sources/browser/index.cjs +18 -12
  22. package/dist/base/sources/browser/index.cjs.map +1 -1
  23. package/dist/base/sources/browser/index.d.cts +20 -2
  24. package/dist/base/sources/browser/index.d.ts +20 -2
  25. package/dist/base/sources/browser/index.js +18 -12
  26. package/dist/base/sources/browser/index.js.map +1 -1
  27. package/dist/base/sources/event/index.cjs +29 -1
  28. package/dist/base/sources/event/index.cjs.map +1 -1
  29. package/dist/base/sources/event/index.d.cts +67 -3
  30. package/dist/base/sources/event/index.d.ts +67 -3
  31. package/dist/base/sources/event/index.js +5 -2
  32. package/dist/base/sources/index.cjs +96 -50
  33. package/dist/base/sources/index.cjs.map +1 -1
  34. package/dist/base/sources/index.d.cts +1 -1
  35. package/dist/base/sources/index.d.ts +1 -1
  36. package/dist/base/sources/index.js +7 -4
  37. package/dist/base/sources/node/index.cjs +43 -37
  38. package/dist/base/sources/node/index.cjs.map +1 -1
  39. package/dist/base/sources/node/index.js +43 -37
  40. package/dist/base/sources/node/index.js.map +1 -1
  41. package/dist/{chunk-J5WFUEO4.js → chunk-23MAWVOJ.js} +3 -3
  42. package/dist/{chunk-YXCPV26R.js → chunk-3REMCHSS.js} +39 -27
  43. package/dist/chunk-3REMCHSS.js.map +1 -0
  44. package/dist/{chunk-CEVNQ74M.js → chunk-3YGXPUHW.js} +2 -2
  45. package/dist/{chunk-CEVNQ74M.js.map → chunk-3YGXPUHW.js.map} +1 -1
  46. package/dist/{chunk-EVYY4X5A.js → chunk-46X2EFQH.js} +16 -5
  47. package/dist/chunk-46X2EFQH.js.map +1 -0
  48. package/dist/{chunk-NY2PYHNC.js → chunk-5UY3PNFY.js} +12 -5
  49. package/dist/chunk-5UY3PNFY.js.map +1 -0
  50. package/dist/{chunk-RGMTUZCL.js → chunk-65OM4XLQ.js} +50 -4
  51. package/dist/chunk-65OM4XLQ.js.map +1 -0
  52. package/dist/{chunk-3PSLNJDU.js → chunk-6DQYBIHW.js} +314 -49
  53. package/dist/chunk-6DQYBIHW.js.map +1 -0
  54. package/dist/{chunk-LDCSZ72P.js → chunk-6YBER5UP.js} +3 -3
  55. package/dist/{chunk-LDCSZ72P.js.map → chunk-6YBER5UP.js.map} +1 -1
  56. package/dist/{chunk-7EGRP2VX.js → chunk-7BULJTL6.js} +2 -2
  57. package/dist/{chunk-7EGRP2VX.js.map → chunk-7BULJTL6.js.map} +1 -1
  58. package/dist/{chunk-VLAGJZSL.js → chunk-7T7WLEPM.js} +25 -4
  59. package/dist/chunk-7T7WLEPM.js.map +1 -0
  60. package/dist/{chunk-PKPO3JTZ.js → chunk-AQAKDE7F.js} +29 -11
  61. package/dist/chunk-AQAKDE7F.js.map +1 -0
  62. package/dist/{chunk-2OB3CEJS.js → chunk-B5Y5GPD5.js} +2 -2
  63. package/dist/{chunk-BXGZFGZ4.js → chunk-C5QD5DQX.js} +22 -1
  64. package/dist/chunk-C5QD5DQX.js.map +1 -0
  65. package/dist/{chunk-4XCHZRUJ.js → chunk-D5YGR4TP.js} +58 -7
  66. package/dist/chunk-D5YGR4TP.js.map +1 -0
  67. package/dist/{chunk-NPRP3MCV.js → chunk-DHDCOOJU.js} +2 -2
  68. package/dist/chunk-DHDCOOJU.js.map +1 -0
  69. package/dist/{chunk-MTTRCEJT.js → chunk-DVTDF5OI.js} +2 -2
  70. package/dist/{chunk-SOOKUYVM.js → chunk-F7EKHR32.js} +13 -9
  71. package/dist/chunk-F7EKHR32.js.map +1 -0
  72. package/dist/{chunk-A7KV5UK4.js → chunk-G7H6PN7P.js} +2 -2
  73. package/dist/{chunk-OCUDSN63.js → chunk-GGKHHG5Y.js} +110 -64
  74. package/dist/chunk-GGKHHG5Y.js.map +1 -0
  75. package/dist/{chunk-RAGGHLCV.js → chunk-GUNIRPEJ.js} +8 -6
  76. package/dist/{chunk-RAGGHLCV.js.map → chunk-GUNIRPEJ.js.map} +1 -1
  77. package/dist/{chunk-YJ4U2D2C.js → chunk-J5TBZFBD.js} +9 -7
  78. package/dist/chunk-J5TBZFBD.js.map +1 -0
  79. package/dist/{chunk-Y52CS6YA.js → chunk-JA67ZQG2.js} +2 -2
  80. package/dist/{chunk-Y52CS6YA.js.map → chunk-JA67ZQG2.js.map} +1 -1
  81. package/dist/{chunk-U225SKB4.js → chunk-K4ZYJ4EM.js} +569 -424
  82. package/dist/chunk-K4ZYJ4EM.js.map +1 -0
  83. package/dist/{chunk-Z4YXAUDN.js → chunk-KUFXLAEY.js} +11 -7
  84. package/dist/{chunk-Z4YXAUDN.js.map → chunk-KUFXLAEY.js.map} +1 -1
  85. package/dist/{chunk-IHTWQEDR.js → chunk-LTSI7ULC.js} +3 -3
  86. package/dist/{chunk-IHTWQEDR.js.map → chunk-LTSI7ULC.js.map} +1 -1
  87. package/dist/{chunk-DKNHAICT.js → chunk-MMHGYX44.js} +25 -9
  88. package/dist/chunk-MMHGYX44.js.map +1 -0
  89. package/dist/{chunk-K7PDZYQE.js → chunk-MQMTRKY3.js} +129 -50
  90. package/dist/chunk-MQMTRKY3.js.map +1 -0
  91. package/dist/{chunk-42FQ27MQ.js → chunk-MTODGQBR.js} +44 -179
  92. package/dist/chunk-MTODGQBR.js.map +1 -0
  93. package/dist/{chunk-O3MT7DYI.js → chunk-N6MNJNHB.js} +2 -2
  94. package/dist/{chunk-FVINAAKA.js → chunk-NBK6QQMG.js} +14 -13
  95. package/dist/{chunk-FVINAAKA.js.map → chunk-NBK6QQMG.js.map} +1 -1
  96. package/dist/{chunk-DM4OMPWK.js → chunk-NSA5K5G2.js} +2 -2
  97. package/dist/{chunk-MLTPJMH6.js → chunk-QQYULEZL.js} +2 -2
  98. package/dist/chunk-QSW4DFKE.js +31 -0
  99. package/dist/chunk-QSW4DFKE.js.map +1 -0
  100. package/dist/{chunk-PZWISPIQ.js → chunk-S7HN5FHL.js} +17 -11
  101. package/dist/chunk-S7HN5FHL.js.map +1 -0
  102. package/dist/{chunk-4S53H2KR.js → chunk-SUNCHMML.js} +2 -2
  103. package/dist/{chunk-4GYMCUDZ.js → chunk-T2U6N3FV.js} +7 -7
  104. package/dist/{chunk-RJOG4IJU.js → chunk-T5URUIIY.js} +50 -35
  105. package/dist/chunk-T5URUIIY.js.map +1 -0
  106. package/dist/{chunk-B4AKFXGE.js → chunk-TPTZZV25.js} +6 -6
  107. package/dist/chunk-TPTZZV25.js.map +1 -0
  108. package/dist/{chunk-BU3SEFA5.js → chunk-V46JWFGV.js} +7 -6
  109. package/dist/chunk-V46JWFGV.js.map +1 -0
  110. package/dist/{chunk-IJRR6YAI.js → chunk-VLDRAMP7.js} +18 -12
  111. package/dist/chunk-VLDRAMP7.js.map +1 -0
  112. package/dist/{chunk-6XZYT4SW.js → chunk-X6ESZDR6.js} +8 -9
  113. package/dist/chunk-X6ESZDR6.js.map +1 -0
  114. package/dist/{chunk-E5OZPDIW.js → chunk-X7BA5PWG.js} +7 -5
  115. package/dist/chunk-X7BA5PWG.js.map +1 -0
  116. package/dist/{chunk-CXANAIZU.js → chunk-XEWV254I.js} +3 -3
  117. package/dist/{chunk-CXANAIZU.js.map → chunk-XEWV254I.js.map} +1 -1
  118. package/dist/{chunk-V4Y3TM7U.js → chunk-YBJVKMTM.js} +38 -16
  119. package/dist/chunk-YBJVKMTM.js.map +1 -0
  120. package/dist/{chunk-7ADWWI2T.js → chunk-ZW32BPXV.js} +17 -6
  121. package/dist/chunk-ZW32BPXV.js.map +1 -0
  122. package/dist/compat/index.cjs +52 -5
  123. package/dist/compat/index.cjs.map +1 -1
  124. package/dist/compat/index.d.cts +1 -1
  125. package/dist/compat/index.d.ts +1 -1
  126. package/dist/compat/index.js +7 -7
  127. package/dist/compat/nestjs/index.cjs +52 -5
  128. package/dist/compat/nestjs/index.cjs.map +1 -1
  129. package/dist/compat/nestjs/index.d.cts +1 -1
  130. package/dist/compat/nestjs/index.d.ts +1 -1
  131. package/dist/compat/nestjs/index.js +4 -4
  132. package/dist/{fallback-Bx46zqky.d.cts → fallback-BROR6ZhO.d.cts} +1 -1
  133. package/dist/{fallback-pIWW8A2d.d.ts → fallback-DO80aM_3.d.ts} +1 -1
  134. package/dist/{index-B_p8tnvf.d.cts → index-D1z3XcF9.d.cts} +1 -0
  135. package/dist/{index-_HDSmPyp.d.ts → index-DZ6yua0Q.d.ts} +1 -0
  136. package/dist/index.cjs +2387 -1707
  137. package/dist/index.cjs.map +1 -1
  138. package/dist/index.d.cts +10 -10
  139. package/dist/index.d.ts +10 -10
  140. package/dist/index.js +173 -150
  141. package/dist/index.js.map +1 -1
  142. package/dist/presets/ai/index.cjs +88 -26
  143. package/dist/presets/ai/index.cjs.map +1 -1
  144. package/dist/presets/ai/index.js +14 -14
  145. package/dist/presets/harness/index.cjs +183 -51
  146. package/dist/presets/harness/index.cjs.map +1 -1
  147. package/dist/presets/harness/index.d.cts +15 -5
  148. package/dist/presets/harness/index.d.ts +15 -5
  149. package/dist/presets/harness/index.js +26 -26
  150. package/dist/presets/index.cjs +298 -101
  151. package/dist/presets/index.cjs.map +1 -1
  152. package/dist/presets/index.d.cts +2 -2
  153. package/dist/presets/index.d.ts +2 -2
  154. package/dist/presets/index.js +49 -49
  155. package/dist/presets/inspect/index.cjs +63 -14
  156. package/dist/presets/inspect/index.cjs.map +1 -1
  157. package/dist/presets/inspect/index.d.cts +1 -1
  158. package/dist/presets/inspect/index.d.ts +1 -1
  159. package/dist/presets/inspect/index.js +6 -6
  160. package/dist/presets/resilience/index.cjs +64 -44
  161. package/dist/presets/resilience/index.cjs.map +1 -1
  162. package/dist/presets/resilience/index.d.cts +12 -8
  163. package/dist/presets/resilience/index.d.ts +12 -8
  164. package/dist/presets/resilience/index.js +6 -6
  165. package/dist/{rate-limiter-DpVbSYdH.d.cts → rate-limiter-DC26FM8J.d.cts} +10 -1
  166. package/dist/{rate-limiter-CEALq4N1.d.ts → rate-limiter-DyWpwpQP.d.ts} +10 -1
  167. package/dist/{reactive-layout-fswlBUvX.d.ts → reactive-layout-BBBWH0V_.d.cts} +85 -4
  168. package/dist/{reactive-layout-fswlBUvX.d.cts → reactive-layout-BBBWH0V_.d.ts} +85 -4
  169. package/dist/solutions/index.cjs +239 -92
  170. package/dist/solutions/index.cjs.map +1 -1
  171. package/dist/solutions/index.d.cts +2 -2
  172. package/dist/solutions/index.d.ts +2 -2
  173. package/dist/solutions/index.js +32 -32
  174. package/dist/{spawnable-5mDY501F.d.cts → spawnable-B2IlW60f.d.cts} +23 -2
  175. package/dist/{spawnable-D3lR0oQu.d.ts → spawnable-tttFz2Nh.d.ts} +23 -2
  176. package/dist/testing/index.cjs +94 -0
  177. package/dist/testing/index.cjs.map +1 -0
  178. package/dist/testing/index.d.cts +59 -0
  179. package/dist/testing/index.d.ts +59 -0
  180. package/dist/testing/index.js +73 -0
  181. package/dist/testing/index.js.map +1 -0
  182. package/dist/{timeout-U5O4ESK3.js → timeout-BEABACRP.js} +2 -2
  183. package/dist/utils/ai/browser.cjs.map +1 -1
  184. package/dist/utils/ai/browser.d.cts +2 -2
  185. package/dist/utils/ai/browser.d.ts +2 -2
  186. package/dist/utils/ai/browser.js +10 -10
  187. package/dist/utils/ai/browser.js.map +1 -1
  188. package/dist/utils/ai/index.cjs +291 -191
  189. package/dist/utils/ai/index.cjs.map +1 -1
  190. package/dist/utils/ai/index.d.cts +108 -12
  191. package/dist/utils/ai/index.d.ts +108 -12
  192. package/dist/utils/ai/index.js +23 -21
  193. package/dist/utils/ai/node.cjs.map +1 -1
  194. package/dist/utils/ai/node.d.cts +5 -5
  195. package/dist/utils/ai/node.d.ts +5 -5
  196. package/dist/utils/ai/node.js +3 -3
  197. package/dist/utils/ai/node.js.map +1 -1
  198. package/dist/utils/cqrs/index.cjs +29 -3
  199. package/dist/utils/cqrs/index.cjs.map +1 -1
  200. package/dist/utils/cqrs/index.d.cts +12 -7
  201. package/dist/utils/cqrs/index.d.ts +12 -7
  202. package/dist/utils/cqrs/index.js +2 -2
  203. package/dist/utils/demo-shell/index.cjs +45 -19
  204. package/dist/utils/demo-shell/index.cjs.map +1 -1
  205. package/dist/utils/demo-shell/index.d.cts +1 -1
  206. package/dist/utils/demo-shell/index.d.ts +1 -1
  207. package/dist/utils/demo-shell/index.js +2 -2
  208. package/dist/utils/domain-templates/index.cjs +1 -1
  209. package/dist/utils/domain-templates/index.cjs.map +1 -1
  210. package/dist/utils/domain-templates/index.js +3 -3
  211. package/dist/utils/graphspec/index.cjs +1 -1
  212. package/dist/utils/graphspec/index.cjs.map +1 -1
  213. package/dist/utils/graphspec/index.js +3 -3
  214. package/dist/utils/harness/index.cjs +16 -10
  215. package/dist/utils/harness/index.cjs.map +1 -1
  216. package/dist/utils/harness/index.js +1 -1
  217. package/dist/utils/index.cjs +1692 -1192
  218. package/dist/utils/index.cjs.map +1 -1
  219. package/dist/utils/index.d.cts +7 -7
  220. package/dist/utils/index.d.ts +7 -7
  221. package/dist/utils/index.js +77 -59
  222. package/dist/utils/inspect/index.cjs +52 -4
  223. package/dist/utils/inspect/index.cjs.map +1 -1
  224. package/dist/utils/inspect/index.d.cts +32 -3
  225. package/dist/utils/inspect/index.d.ts +32 -3
  226. package/dist/utils/inspect/index.js +4 -4
  227. package/dist/utils/job-queue/index.cjs +46 -9
  228. package/dist/utils/job-queue/index.cjs.map +1 -1
  229. package/dist/utils/job-queue/index.d.cts +33 -3
  230. package/dist/utils/job-queue/index.d.ts +33 -3
  231. package/dist/utils/job-queue/index.js +2 -2
  232. package/dist/utils/memory/index.cjs +570 -425
  233. package/dist/utils/memory/index.cjs.map +1 -1
  234. package/dist/utils/memory/index.d.cts +261 -33
  235. package/dist/utils/memory/index.d.ts +261 -33
  236. package/dist/utils/memory/index.js +10 -2
  237. package/dist/utils/messaging/index.cjs.map +1 -1
  238. package/dist/utils/messaging/index.d.cts +4 -3
  239. package/dist/utils/messaging/index.d.ts +4 -3
  240. package/dist/utils/messaging/index.js +2 -2
  241. package/dist/utils/orchestration/index.cjs +14 -3
  242. package/dist/utils/orchestration/index.cjs.map +1 -1
  243. package/dist/utils/orchestration/index.js +3 -3
  244. package/dist/utils/process/index.cjs +32 -2
  245. package/dist/utils/process/index.cjs.map +1 -1
  246. package/dist/utils/process/index.d.cts +4 -3
  247. package/dist/utils/process/index.d.ts +4 -3
  248. package/dist/utils/process/index.js +3 -3
  249. package/dist/utils/reactive-layout/index.cjs +184 -55
  250. package/dist/utils/reactive-layout/index.cjs.map +1 -1
  251. package/dist/utils/reactive-layout/index.d.cts +128 -3
  252. package/dist/utils/reactive-layout/index.d.ts +128 -3
  253. package/dist/utils/reactive-layout/index.js +16 -8
  254. package/dist/utils/reduction/index.cjs +1 -1
  255. package/dist/utils/reduction/index.cjs.map +1 -1
  256. package/dist/utils/reduction/index.js +2 -2
  257. package/dist/utils/resilience/index.cjs +64 -43
  258. package/dist/utils/resilience/index.cjs.map +1 -1
  259. package/dist/utils/resilience/index.d.cts +1 -1
  260. package/dist/utils/resilience/index.d.ts +1 -1
  261. package/dist/utils/resilience/index.js +5 -5
  262. package/dist/utils/surface/index.cjs +1 -1
  263. package/dist/utils/surface/index.cjs.map +1 -1
  264. package/dist/utils/surface/index.js +4 -4
  265. package/package.json +15 -3
  266. package/dist/chunk-3PSLNJDU.js.map +0 -1
  267. package/dist/chunk-42FQ27MQ.js.map +0 -1
  268. package/dist/chunk-4XCHZRUJ.js.map +0 -1
  269. package/dist/chunk-6XZYT4SW.js.map +0 -1
  270. package/dist/chunk-7ADWWI2T.js.map +0 -1
  271. package/dist/chunk-B4AKFXGE.js.map +0 -1
  272. package/dist/chunk-BU3SEFA5.js.map +0 -1
  273. package/dist/chunk-BXGZFGZ4.js.map +0 -1
  274. package/dist/chunk-DKNHAICT.js.map +0 -1
  275. package/dist/chunk-E5OZPDIW.js.map +0 -1
  276. package/dist/chunk-EVYY4X5A.js.map +0 -1
  277. package/dist/chunk-IJRR6YAI.js.map +0 -1
  278. package/dist/chunk-K7PDZYQE.js.map +0 -1
  279. package/dist/chunk-NPRP3MCV.js.map +0 -1
  280. package/dist/chunk-NY2PYHNC.js.map +0 -1
  281. package/dist/chunk-OCUDSN63.js.map +0 -1
  282. package/dist/chunk-PKPO3JTZ.js.map +0 -1
  283. package/dist/chunk-PZWISPIQ.js.map +0 -1
  284. package/dist/chunk-RGMTUZCL.js.map +0 -1
  285. package/dist/chunk-RJOG4IJU.js.map +0 -1
  286. package/dist/chunk-SOOKUYVM.js.map +0 -1
  287. package/dist/chunk-U225SKB4.js.map +0 -1
  288. package/dist/chunk-V4Y3TM7U.js.map +0 -1
  289. package/dist/chunk-VLAGJZSL.js.map +0 -1
  290. package/dist/chunk-W2BOPXTI.js +0 -1
  291. package/dist/chunk-YJ4U2D2C.js.map +0 -1
  292. package/dist/chunk-YXCPV26R.js.map +0 -1
  293. package/dist/timeout-U5O4ESK3.js.map +0 -1
  294. /package/dist/{chunk-J5WFUEO4.js.map → chunk-23MAWVOJ.js.map} +0 -0
  295. /package/dist/{chunk-2OB3CEJS.js.map → chunk-B5Y5GPD5.js.map} +0 -0
  296. /package/dist/{chunk-MTTRCEJT.js.map → chunk-DVTDF5OI.js.map} +0 -0
  297. /package/dist/{chunk-A7KV5UK4.js.map → chunk-G7H6PN7P.js.map} +0 -0
  298. /package/dist/{chunk-O3MT7DYI.js.map → chunk-N6MNJNHB.js.map} +0 -0
  299. /package/dist/{chunk-DM4OMPWK.js.map → chunk-NSA5K5G2.js.map} +0 -0
  300. /package/dist/{chunk-MLTPJMH6.js.map → chunk-QQYULEZL.js.map} +0 -0
  301. /package/dist/{chunk-4S53H2KR.js.map → chunk-SUNCHMML.js.map} +0 -0
  302. /package/dist/{chunk-4GYMCUDZ.js.map → chunk-T2U6N3FV.js.map} +0 -0
  303. /package/dist/{chunk-W2BOPXTI.js.map → timeout-BEABACRP.js.map} +0 -0
@@ -27,11 +27,11 @@ function operatorOpts(opts) {
27
27
  function isNode(x) {
28
28
  return x != null && typeof x === "object" && "cache" in x && typeof x.subscribe === "function";
29
29
  }
30
- var import_core3;
30
+ var import_core4;
31
31
  var init_internal = __esm({
32
32
  "src/base/resilience/_internal.ts"() {
33
33
  "use strict";
34
- import_core3 = require("@graphrefly/pure-ts/core");
34
+ import_core4 = require("@graphrefly/pure-ts/core");
35
35
  }
36
36
  });
37
37
 
@@ -180,21 +180,21 @@ function withTimeout(source, opts, extraOpts) {
180
180
  }
181
181
  const callerMeta = extraOpts?.meta;
182
182
  const factoryArgs = isReactive ? { ns: "Node<Partial<TimeoutOptions>>" } : { ns: latestOpts.ns };
183
- const timeoutState = (0, import_core4.node)([], {
183
+ const timeoutState = (0, import_core5.node)([], {
184
184
  name: "timeoutState",
185
185
  describeKind: "state",
186
186
  initial: { status: "pending" },
187
187
  equals: (a, b) => a === b || a != null && b != null && typeof a === "object" && typeof b === "object" && a.status === b.status && JSON.stringify(a) === JSON.stringify(b)
188
188
  });
189
- const out = (0, import_core4.node)(
189
+ const out = (0, import_core5.node)(
190
190
  (_data, a) => {
191
191
  let stopped = false;
192
192
  let lastDeadlineNs = 0;
193
- const timer = new import_core4.ResettableTimer();
193
+ const timer = new import_core5.ResettableTimer();
194
194
  let optsUnsub = null;
195
195
  let srcUnsub = null;
196
196
  function emitState(next) {
197
- timeoutState.down([[import_core4.DIRTY], [import_core4.DATA, next]]);
197
+ timeoutState.down([[import_core5.DIRTY], [import_core5.DATA, next]]);
198
198
  }
199
199
  function startTimer() {
200
200
  if (stopped) return;
@@ -203,7 +203,7 @@ function withTimeout(source, opts, extraOpts) {
203
203
  }
204
204
  const ns = latestOpts.ns;
205
205
  lastDeadlineNs = ns;
206
- const startedAt = (0, import_core4.monotonicNs)();
206
+ const startedAt = (0, import_core5.monotonicNs)();
207
207
  const delayMs = ns / NS_PER_MS;
208
208
  emitState({
209
209
  status: "running",
@@ -216,10 +216,10 @@ function withTimeout(source, opts, extraOpts) {
216
216
  srcUnsub?.();
217
217
  emitState({
218
218
  status: "errored",
219
- firedAt_ns: (0, import_core4.monotonicNs)(),
219
+ firedAt_ns: (0, import_core5.monotonicNs)(),
220
220
  deadline_ns: ns
221
221
  });
222
- a.down([[import_core4.ERROR, new TimeoutError(ns)]]);
222
+ a.down([[import_core5.ERROR, new TimeoutError(ns)]]);
223
223
  });
224
224
  }
225
225
  function attachSource() {
@@ -228,31 +228,31 @@ function withTimeout(source, opts, extraOpts) {
228
228
  for (const m of msgs) {
229
229
  if (stopped) return;
230
230
  const t = m[0];
231
- if (t === import_core4.DIRTY) a.down([[import_core4.DIRTY]]);
232
- else if (t === import_core4.DATA) {
231
+ if (t === import_core5.DIRTY) a.down([[import_core5.DIRTY]]);
232
+ else if (t === import_core5.DATA) {
233
233
  startTimer();
234
234
  a.emit(m[1]);
235
- } else if (t === import_core4.RESOLVED) a.down([[import_core4.RESOLVED]]);
236
- else if (t === import_core4.COMPLETE) {
235
+ } else if (t === import_core5.RESOLVED) a.down([[import_core5.RESOLVED]]);
236
+ else if (t === import_core5.COMPLETE) {
237
237
  timer.cancel();
238
238
  stopped = true;
239
239
  emitState({
240
240
  status: "completed",
241
- settledAt_ns: (0, import_core4.monotonicNs)()
241
+ settledAt_ns: (0, import_core5.monotonicNs)()
242
242
  });
243
- a.down([[import_core4.COMPLETE]]);
243
+ a.down([[import_core5.COMPLETE]]);
244
244
  return;
245
- } else if (t === import_core4.ERROR) {
245
+ } else if (t === import_core5.ERROR) {
246
246
  timer.cancel();
247
247
  stopped = true;
248
248
  emitState({
249
249
  status: "errored",
250
- firedAt_ns: (0, import_core4.monotonicNs)(),
250
+ firedAt_ns: (0, import_core5.monotonicNs)(),
251
251
  deadline_ns: lastDeadlineNs
252
252
  });
253
253
  a.down([m]);
254
254
  return;
255
- } else if (t === import_core4.TEARDOWN) {
255
+ } else if (t === import_core5.TEARDOWN) {
256
256
  timer.cancel();
257
257
  stopped = true;
258
258
  a.down([m]);
@@ -268,7 +268,7 @@ function withTimeout(source, opts, extraOpts) {
268
268
  const optsNode = opts;
269
269
  optsUnsub = optsNode.subscribe((msgs) => {
270
270
  for (const m of msgs) {
271
- if (m[0] !== import_core4.DATA) continue;
271
+ if (m[0] !== import_core5.DATA) continue;
272
272
  const next = m[1];
273
273
  if (next == null || typeof next !== "object") continue;
274
274
  const keys = Object.keys(next);
@@ -279,7 +279,7 @@ function withTimeout(source, opts, extraOpts) {
279
279
  stopped = true;
280
280
  a.down([
281
281
  [
282
- import_core4.ERROR,
282
+ import_core5.ERROR,
283
283
  new RangeError(
284
284
  "withTimeout: opts.ns must be a positive finite number on first settle"
285
285
  )
@@ -304,26 +304,28 @@ function withTimeout(source, opts, extraOpts) {
304
304
  if (latestOpts != null) {
305
305
  attachSource();
306
306
  }
307
- return () => {
308
- stopped = true;
309
- timer.cancel();
310
- if (srcUnsub) srcUnsub();
311
- if (optsUnsub) optsUnsub();
307
+ return {
308
+ onDeactivation: () => {
309
+ stopped = true;
310
+ timer.cancel();
311
+ if (srcUnsub) srcUnsub();
312
+ if (optsUnsub) optsUnsub();
313
+ }
312
314
  };
313
315
  },
314
316
  {
315
317
  ...operatorOpts(),
316
318
  initial: source.cache,
317
- meta: { ...callerMeta ?? {}, ...(0, import_core4.factoryTag)("withTimeout", factoryArgs) }
319
+ meta: { ...callerMeta ?? {}, ...(0, import_core5.factoryTag)("withTimeout", factoryArgs) }
318
320
  }
319
321
  );
320
322
  return { node: out, timeoutState };
321
323
  }
322
- var import_core4, TimeoutError;
324
+ var import_core5, TimeoutError;
323
325
  var init_timeout = __esm({
324
326
  "src/base/resilience/timeout.ts"() {
325
327
  "use strict";
326
- import_core4 = require("@graphrefly/pure-ts/core");
328
+ import_core5 = require("@graphrefly/pure-ts/core");
327
329
  init_internal();
328
330
  init_backoff();
329
331
  TimeoutError = class extends Error {
@@ -345,6 +347,7 @@ __export(sources_exports, {
345
347
  firstWhere: () => firstWhere,
346
348
  forEach: () => forEach,
347
349
  fromCron: () => fromCron,
350
+ fromPushNotification: () => fromPushNotification,
348
351
  matchesCron: () => matchesCron,
349
352
  nodeSignal: () => nodeSignal,
350
353
  parseCron: () => parseCron,
@@ -394,9 +397,11 @@ function defer(thunk, opts) {
394
397
  const safe = err === void 0 ? new Error("defer: thunk threw undefined") : err;
395
398
  a.down([[import_core.ERROR, safe]]);
396
399
  }
397
- return () => {
398
- stopped = true;
399
- unsub?.();
400
+ return {
401
+ onDeactivation: () => {
402
+ stopped = true;
403
+ unsub?.();
404
+ }
400
405
  };
401
406
  }, merged);
402
407
  }
@@ -445,15 +450,27 @@ function toArray(source, opts) {
445
450
  },
446
451
  {
447
452
  describeKind: "derived",
453
+ ...opts,
454
+ // Operator-required flags spread AFTER user `opts` so a caller
455
+ // cannot accidentally override them (QA F2 spread-order fix,
456
+ // DS-2.7.A `/qa` 2026-05-20 — matches the
457
+ // `reduce`/`scan`/`take`/`last` substrate pattern). Spec §2.7
458
+ // R2.7.1 (DS-2.7.A): Reduce-class shape — fn must fire on
459
+ // upstream COMPLETE to emit the accumulated array (or `[]` for an
460
+ // empty source) followed by its own `[[COMPLETE]]`. Required
461
+ // because `completeWhenDepsComplete: false` means auto-COMPLETE
462
+ // is OFF; without the opt-in `toArray(empty())` never completes.
448
463
  completeWhenDepsComplete: false,
449
- ...opts
464
+ terminalAsRealInput: true
450
465
  }
451
466
  );
452
467
  }
453
468
  function share(source, opts) {
454
469
  return (0, import_core.node)(
455
- (_data, a) => source.subscribe((msgs) => {
456
- a.down(msgs);
470
+ (_data, a) => ({
471
+ onDeactivation: source.subscribe((msgs) => {
472
+ a.down(msgs);
473
+ })
457
474
  }),
458
475
  { ...(0, import_extra.sourceOpts)(opts), initial: source.cache }
459
476
  );
@@ -461,8 +478,10 @@ function share(source, opts) {
461
478
  function replay(source, bufferSize, opts) {
462
479
  if (bufferSize < 1) throw new RangeError("replay expects bufferSize >= 1");
463
480
  return (0, import_core.node)(
464
- (_data, a) => source.subscribe((msgs) => {
465
- a.down(msgs);
481
+ (_data, a) => ({
482
+ onDeactivation: source.subscribe((msgs) => {
483
+ a.down(msgs);
484
+ })
466
485
  }),
467
486
  { ...(0, import_extra.sourceOpts)(opts), initial: source.cache, replayBuffer: bufferSize }
468
487
  );
@@ -536,14 +555,41 @@ function fromCron(expr, opts) {
536
555
  };
537
556
  check();
538
557
  const id = setInterval(check, tickMs);
539
- return () => clearInterval(id);
558
+ return { onDeactivation: () => clearInterval(id) };
540
559
  },
541
560
  { ...sourceOpts2(rest), name: rest.name ?? `cron:${expr}` }
542
561
  );
543
562
  }
544
563
 
564
+ // src/base/sources/event/push.ts
565
+ var import_core3 = require("@graphrefly/pure-ts/core");
566
+ function sourceOpts3(opts) {
567
+ return { describeKind: "producer", ...opts };
568
+ }
569
+ function fromPushNotification(register, opts) {
570
+ if (typeof register !== "function") {
571
+ throw new TypeError(
572
+ "fromPushNotification: a (deliver) => unsubscribe registration function is required"
573
+ );
574
+ }
575
+ return (0, import_core3.node)((_data, a) => {
576
+ let done = false;
577
+ const deliver = (payload) => {
578
+ if (done) return;
579
+ a.emit(payload);
580
+ };
581
+ const unsubscribe = register(deliver);
582
+ return {
583
+ onDeactivation: () => {
584
+ done = true;
585
+ if (typeof unsubscribe === "function") unsubscribe();
586
+ }
587
+ };
588
+ }, sourceOpts3(opts));
589
+ }
590
+
545
591
  // src/base/sources/settled.ts
546
- var import_core5 = require("@graphrefly/pure-ts/core");
592
+ var import_core6 = require("@graphrefly/pure-ts/core");
547
593
  function firstValueFrom(source) {
548
594
  return new Promise((resolve, reject) => {
549
595
  let settled = false;
@@ -552,7 +598,7 @@ function firstValueFrom(source) {
552
598
  unsub = source.subscribe((msgs) => {
553
599
  for (const m of msgs) {
554
600
  if (settled) return;
555
- if (m[0] === import_core5.DATA) {
601
+ if (m[0] === import_core6.DATA) {
556
602
  settled = true;
557
603
  resolve(m[1]);
558
604
  if (unsub) {
@@ -561,7 +607,7 @@ function firstValueFrom(source) {
561
607
  } else shouldUnsub = true;
562
608
  return;
563
609
  }
564
- if (m[0] === import_core5.ERROR) {
610
+ if (m[0] === import_core6.ERROR) {
565
611
  settled = true;
566
612
  reject(m[1]);
567
613
  if (unsub) {
@@ -570,7 +616,7 @@ function firstValueFrom(source) {
570
616
  } else shouldUnsub = true;
571
617
  return;
572
618
  }
573
- if (m[0] === import_core5.COMPLETE) {
619
+ if (m[0] === import_core6.COMPLETE) {
574
620
  settled = true;
575
621
  reject(new Error("completed without DATA"));
576
622
  if (unsub) {
@@ -624,8 +670,8 @@ function firstWhere(source, predicate, opts) {
624
670
  if (settled) return;
625
671
  for (const m of msgs) {
626
672
  if (settled) return;
627
- if (inInitialSyncPhase && m[0] === import_core5.DATA) continue;
628
- if (m[0] === import_core5.DATA) {
673
+ if (inInitialSyncPhase && m[0] === import_core6.DATA) continue;
674
+ if (m[0] === import_core6.DATA) {
629
675
  const v = m[1];
630
676
  if (predicate(v)) {
631
677
  settleData(v);
@@ -633,12 +679,12 @@ function firstWhere(source, predicate, opts) {
633
679
  return;
634
680
  }
635
681
  }
636
- if (m[0] === import_core5.ERROR) {
682
+ if (m[0] === import_core6.ERROR) {
637
683
  settleError(m[1]);
638
684
  detach();
639
685
  return;
640
686
  }
641
- if (m[0] === import_core5.COMPLETE) {
687
+ if (m[0] === import_core6.COMPLETE) {
642
688
  settleComplete();
643
689
  detach();
644
690
  return;
@@ -704,17 +750,17 @@ function nodeSignal(source, opts) {
704
750
  unsub = source.subscribe((msgs) => {
705
751
  if (ctrl.signal.aborted) return;
706
752
  for (const m of msgs) {
707
- if (m[0] === import_core5.DATA && m[1] === true) {
753
+ if (m[0] === import_core6.DATA && m[1] === true) {
708
754
  ctrl.abort(reason);
709
755
  done();
710
756
  return;
711
757
  }
712
- if (m[0] === import_core5.ERROR) {
758
+ if (m[0] === import_core6.ERROR) {
713
759
  ctrl.abort(m[1]);
714
760
  done();
715
761
  return;
716
762
  }
717
- if (m[0] === import_core5.COMPLETE) {
763
+ if (m[0] === import_core6.COMPLETE) {
718
764
  done();
719
765
  return;
720
766
  }
@@ -735,13 +781,13 @@ function nodeSignal(source, opts) {
735
781
  };
736
782
  }
737
783
  function reactiveCounter(cap) {
738
- const counter = (0, import_core5.node)([], { initial: 0 });
784
+ const counter = (0, import_core6.node)([], { initial: 0 });
739
785
  return {
740
786
  node: counter,
741
787
  increment() {
742
788
  const current = counter.cache ?? 0;
743
789
  if (current >= cap) return false;
744
- counter.down([[import_core5.DIRTY], [import_core5.DATA, current + 1]]);
790
+ counter.down([[import_core6.DIRTY], [import_core6.DATA, current + 1]]);
745
791
  return true;
746
792
  },
747
793
  get() {