@logixjs/core 0.0.1 → 0.0.2

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 (300) hide show
  1. package/LICENSE +201 -0
  2. package/dist/{Bound-BN1DQ_lM.d.ts → Bound-CEa1ihvH.d.ts} +2 -2
  3. package/dist/{Bound-BPIfH9SS.d.cts → Bound-CNLNkC7c.d.cts} +2 -2
  4. package/dist/Bound.cjs +620 -163
  5. package/dist/Bound.cjs.map +1 -1
  6. package/dist/Bound.d.cts +3 -3
  7. package/dist/Bound.d.ts +3 -3
  8. package/dist/Bound.js +14 -14
  9. package/dist/{Debug-Bq8Sqjcr.d.cts → Debug-BhMYr-1i.d.cts} +3 -3
  10. package/dist/{Debug-B5q5Bkzx.d.ts → Debug-ByM7m4Ft.d.ts} +3 -3
  11. package/dist/Debug.cjs +553 -32
  12. package/dist/Debug.cjs.map +1 -1
  13. package/dist/Debug.d.cts +10 -8
  14. package/dist/Debug.d.ts +10 -8
  15. package/dist/Debug.js +12 -10
  16. package/dist/EffectOp.cjs.map +1 -1
  17. package/dist/EffectOp.js +2 -3
  18. package/dist/EffectOp.js.map +1 -1
  19. package/dist/Env.cjs +664 -6
  20. package/dist/Env.cjs.map +1 -1
  21. package/dist/Env.js +5 -2
  22. package/dist/ExternalStore-BAz83PVq.d.cts +60 -0
  23. package/dist/ExternalStore-BYWPbYs8.d.ts +60 -0
  24. package/dist/ExternalStore.cjs +746 -0
  25. package/dist/ExternalStore.cjs.map +1 -0
  26. package/dist/ExternalStore.d.cts +4 -0
  27. package/dist/ExternalStore.d.ts +4 -0
  28. package/dist/ExternalStore.js +19 -0
  29. package/dist/ExternalStore.js.map +1 -0
  30. package/dist/{Flow-1fZT8MpX.d.cts → Flow-BlSoMmhV.d.cts} +2 -2
  31. package/dist/{Flow-BhpjE22E.d.ts → Flow-CQSGve5c.d.ts} +2 -2
  32. package/dist/Flow.cjs +2 -2
  33. package/dist/Flow.cjs.map +1 -1
  34. package/dist/Flow.d.cts +4 -4
  35. package/dist/Flow.d.ts +4 -4
  36. package/dist/Flow.js +7 -8
  37. package/dist/{Handle-D_cLW1Z3.d.ts → Handle-B7PSmsrY.d.ts} +1 -1
  38. package/dist/{Handle-D8D1zPb_.d.cts → Handle-ByovhL-c.d.cts} +1 -1
  39. package/dist/Handle.d.cts +3 -3
  40. package/dist/Handle.d.ts +3 -3
  41. package/dist/{Kernel-CnGE1Fyk.d.ts → Kernel-DGSpS4GM.d.ts} +2 -2
  42. package/dist/{Kernel-8kC-jOda.d.cts → Kernel-DZAk-Mrn.d.cts} +2 -2
  43. package/dist/Kernel.cjs +680 -22
  44. package/dist/Kernel.cjs.map +1 -1
  45. package/dist/Kernel.d.cts +10 -8
  46. package/dist/Kernel.d.ts +10 -8
  47. package/dist/Kernel.js +7 -4
  48. package/dist/{Link-Db7975nU.d.ts → Link-Cm4eR9n0.d.ts} +10 -3
  49. package/dist/{Link-fX8x1eCK.d.cts → Link-DF8i8iWR.d.cts} +10 -3
  50. package/dist/Link.cjs +1128 -86
  51. package/dist/Link.cjs.map +1 -1
  52. package/dist/Link.d.cts +3 -3
  53. package/dist/Link.d.ts +3 -3
  54. package/dist/Link.js +30 -25
  55. package/dist/{Logic-DRh4sDZj.d.cts → Logic-BcQA0AvE.d.cts} +1 -1
  56. package/dist/{Logic-BRjEMr-W.d.ts → Logic-OotSE1xw.d.ts} +1 -1
  57. package/dist/Logic.d.cts +3 -3
  58. package/dist/Logic.d.ts +3 -3
  59. package/dist/{MatchBuilder-CJk5oCkR.d.cts → MatchBuilder-BNDJ8waF.d.ts} +1 -1
  60. package/dist/{MatchBuilder-0QOc-nlU.d.ts → MatchBuilder-CvZ5WY1B.d.cts} +1 -1
  61. package/dist/MatchBuilder.d.cts +4 -4
  62. package/dist/MatchBuilder.d.ts +4 -4
  63. package/dist/Middleware-D8tUDLv_.d.cts +100 -0
  64. package/dist/Middleware-DS7CbTTN.d.ts +100 -0
  65. package/dist/Middleware.cjs +461 -13
  66. package/dist/Middleware.cjs.map +1 -1
  67. package/dist/Middleware.d.cts +2 -86
  68. package/dist/Middleware.d.ts +2 -86
  69. package/dist/Middleware.js +13 -11
  70. package/dist/{Module-DnzluX2J.d.ts → Module-CFj0I2yE.d.ts} +45 -18
  71. package/dist/{Module-B_0xRDMR.d.cts → Module-DpXPW9EQ.d.cts} +45 -18
  72. package/dist/Module.cjs +8583 -5741
  73. package/dist/Module.cjs.map +1 -1
  74. package/dist/Module.d.cts +5 -4
  75. package/dist/Module.d.ts +5 -4
  76. package/dist/Module.js +32 -27
  77. package/dist/ModuleTag-BcVF6z7B.d.ts +113 -0
  78. package/dist/ModuleTag-DuZXo_NS.d.cts +113 -0
  79. package/dist/ModuleTag.cjs +2609 -1232
  80. package/dist/ModuleTag.cjs.map +1 -1
  81. package/dist/ModuleTag.d.cts +4 -4
  82. package/dist/ModuleTag.d.ts +4 -4
  83. package/dist/ModuleTag.js +28 -25
  84. package/dist/{Observability-cY4kLn0S.d.ts → Observability-D-ZWeEVb.d.ts} +22 -15
  85. package/dist/{Observability-COqEvp2C.d.cts → Observability-V7sRMYTh.d.cts} +22 -15
  86. package/dist/Observability.cjs +1938 -640
  87. package/dist/Observability.cjs.map +1 -1
  88. package/dist/Observability.d.cts +4 -4
  89. package/dist/Observability.d.ts +4 -4
  90. package/dist/Observability.js +21 -19
  91. package/dist/{Process-mL8fHDSB.d.cts → Process-B55aJMFk.d.cts} +29 -4
  92. package/dist/{Process-CM9xbMdP.d.ts → Process-DvhFEwUS.d.ts} +29 -4
  93. package/dist/Process.cjs +1122 -85
  94. package/dist/Process.cjs.map +1 -1
  95. package/dist/Process.d.cts +4 -3
  96. package/dist/Process.d.ts +4 -3
  97. package/dist/Process.js +27 -22
  98. package/dist/{ReadQuery-BlMwhe-F.d.ts → ReadQuery-C4vZ8Prc.d.ts} +2 -2
  99. package/dist/{ReadQuery-SinbStGF.d.ts → ReadQuery-CafjlJQo.d.cts} +1 -1
  100. package/dist/{ReadQuery-SinbStGF.d.cts → ReadQuery-CafjlJQo.d.ts} +1 -1
  101. package/dist/{ReadQuery-CL5XlXts.d.cts → ReadQuery-mc0NgrFV.d.cts} +2 -2
  102. package/dist/ReadQuery.cjs +3 -3
  103. package/dist/ReadQuery.cjs.map +1 -1
  104. package/dist/ReadQuery.d.cts +2 -2
  105. package/dist/ReadQuery.d.ts +2 -2
  106. package/dist/ReadQuery.js +3 -3
  107. package/dist/{Reflection-CQnKwPXj.d.ts → Reflection-C8xZ267q.d.ts} +88 -7
  108. package/dist/{Reflection-Kabo1mlU.d.cts → Reflection-DP7Vsv3f.d.cts} +88 -7
  109. package/dist/Reflection.cjs +2934 -1553
  110. package/dist/Reflection.cjs.map +1 -1
  111. package/dist/Reflection.d.cts +14 -11
  112. package/dist/Reflection.d.ts +14 -11
  113. package/dist/Reflection.js +26 -21
  114. package/dist/Resource.cjs +670 -12
  115. package/dist/Resource.cjs.map +1 -1
  116. package/dist/Resource.js +6 -3
  117. package/dist/Root.cjs +675 -17
  118. package/dist/Root.cjs.map +1 -1
  119. package/dist/Root.js +7 -3
  120. package/dist/{Runtime-CtyzZG4i.d.ts → Runtime-BWc9YfUB.d.ts} +37 -7
  121. package/dist/{Runtime-B-aL-f29.d.cts → Runtime-PShIC4DW.d.cts} +37 -7
  122. package/dist/Runtime.cjs +1899 -809
  123. package/dist/Runtime.cjs.map +1 -1
  124. package/dist/Runtime.d.cts +14 -11
  125. package/dist/Runtime.d.ts +14 -11
  126. package/dist/Runtime.js +33 -28
  127. package/dist/ScopeRegistry.cjs +668 -10
  128. package/dist/ScopeRegistry.cjs.map +1 -1
  129. package/dist/ScopeRegistry.js +6 -3
  130. package/dist/{StateTrait-OWhbj12c.d.cts → StateTrait-CQsDlXJm.d.cts} +23 -6
  131. package/dist/{StateTrait-BGsZghTz.d.ts → StateTrait-YvJzVDKl.d.ts} +23 -6
  132. package/dist/StateTrait.cjs +1475 -370
  133. package/dist/StateTrait.cjs.map +1 -1
  134. package/dist/StateTrait.d.cts +7 -5
  135. package/dist/StateTrait.d.ts +7 -5
  136. package/dist/StateTrait.js +17 -14
  137. package/dist/{TraitLifecycle-LdIWmKlg.d.ts → TraitLifecycle-CjIBICAA.d.ts} +2 -2
  138. package/dist/{TraitLifecycle-CwV5WPFX.d.cts → TraitLifecycle-NmqGiXPC.d.cts} +2 -2
  139. package/dist/TraitLifecycle.cjs +489 -32
  140. package/dist/TraitLifecycle.cjs.map +1 -1
  141. package/dist/TraitLifecycle.d.cts +4 -4
  142. package/dist/TraitLifecycle.d.ts +4 -4
  143. package/dist/TraitLifecycle.js +7 -7
  144. package/dist/Workflow-BlFG_20_.d.cts +414 -0
  145. package/dist/Workflow-CW9S_aAP.d.ts +414 -0
  146. package/dist/Workflow.cjs +2977 -0
  147. package/dist/Workflow.cjs.map +1 -0
  148. package/dist/Workflow.d.cts +7 -0
  149. package/dist/Workflow.d.ts +7 -0
  150. package/dist/Workflow.js +55 -0
  151. package/dist/Workflow.js.map +1 -0
  152. package/dist/{chunk-G5ZBFPNU.js → chunk-2A4UKO2D.js} +2 -2
  153. package/dist/chunk-2DE6D42I.js +248 -0
  154. package/dist/chunk-2DE6D42I.js.map +1 -0
  155. package/dist/{chunk-ANLBCBDC.js → chunk-2DVLMSOE.js} +6 -6
  156. package/dist/{chunk-BE3HW4FY.js → chunk-34CF6OGE.js} +14 -16
  157. package/dist/chunk-34CF6OGE.js.map +1 -0
  158. package/dist/{chunk-ZFY7U2FR.js → chunk-3LPIXG56.js} +43 -3
  159. package/dist/chunk-3LPIXG56.js.map +1 -0
  160. package/dist/chunk-3VZYDNXZ.js +10 -0
  161. package/dist/chunk-3VZYDNXZ.js.map +1 -0
  162. package/dist/{chunk-3TMODYZV.js → chunk-3XO4HR6V.js} +2 -2
  163. package/dist/chunk-46FGVWRF.js +817 -0
  164. package/dist/chunk-46FGVWRF.js.map +1 -0
  165. package/dist/chunk-4LODUXFI.js +288 -0
  166. package/dist/chunk-4LODUXFI.js.map +1 -0
  167. package/dist/{chunk-GMPEOUP2.js → chunk-4MZ7BT3R.js} +2 -2
  168. package/dist/chunk-4MZ7BT3R.js.map +1 -0
  169. package/dist/{chunk-TKZ7MEIA.js → chunk-53GVPGSM.js} +2 -2
  170. package/dist/{chunk-KP7MUZNX.js → chunk-5W2V2NVJ.js} +2 -2
  171. package/dist/chunk-5W2V2NVJ.js.map +1 -0
  172. package/dist/chunk-6DACKW3D.js +613 -0
  173. package/dist/chunk-6DACKW3D.js.map +1 -0
  174. package/dist/chunk-AQ7L2QZ5.js +1395 -0
  175. package/dist/chunk-AQ7L2QZ5.js.map +1 -0
  176. package/dist/{chunk-NZJKFF45.js → chunk-C2UZZQ76.js} +2 -2
  177. package/dist/chunk-CCKP5Z6F.js +701 -0
  178. package/dist/chunk-CCKP5Z6F.js.map +1 -0
  179. package/dist/chunk-CUKM2XUW.js +27 -0
  180. package/dist/{chunk-QCHIQWAJ.js.map → chunk-CUKM2XUW.js.map} +1 -1
  181. package/dist/{chunk-M2RGJPXX.js → chunk-DBD6Q6JH.js} +3 -3
  182. package/dist/{chunk-ZGDVUPTM.js → chunk-EB4RGQO3.js} +2 -2
  183. package/dist/{chunk-PAYXCY6A.js → chunk-G7ESIQTI.js} +12 -14
  184. package/dist/chunk-G7ESIQTI.js.map +1 -0
  185. package/dist/chunk-GPBAZQ23.js +348 -0
  186. package/dist/chunk-GPBAZQ23.js.map +1 -0
  187. package/dist/{chunk-OFADUJWJ.js → chunk-I4LCE5OY.js} +3 -5
  188. package/dist/{chunk-OFADUJWJ.js.map → chunk-I4LCE5OY.js.map} +1 -1
  189. package/dist/{chunk-DFNM3WX2.js → chunk-IMCC6TBN.js} +158 -39
  190. package/dist/chunk-IMCC6TBN.js.map +1 -0
  191. package/dist/{chunk-76WT3HOR.js → chunk-IROZNQAF.js} +22 -21
  192. package/dist/chunk-IROZNQAF.js.map +1 -0
  193. package/dist/{chunk-TAAPQVZN.js → chunk-ISKNULNH.js} +2 -2
  194. package/dist/chunk-J3CWXIPV.js +242 -0
  195. package/dist/chunk-J3CWXIPV.js.map +1 -0
  196. package/dist/{chunk-PYOE4VSI.js → chunk-JBKYRTCS.js} +224 -161
  197. package/dist/chunk-JBKYRTCS.js.map +1 -0
  198. package/dist/{chunk-66ALHVEX.js → chunk-KKIAYH4X.js} +3 -3
  199. package/dist/{chunk-3RMKLXHX.js → chunk-KLDVG3SY.js} +2 -2
  200. package/dist/{chunk-BABLDP24.js → chunk-KSZQYSEH.js} +3 -3
  201. package/dist/chunk-KSZQYSEH.js.map +1 -0
  202. package/dist/{chunk-CW6T36TN.js → chunk-M3M7JFAH.js} +4 -4
  203. package/dist/chunk-M3M7JFAH.js.map +1 -0
  204. package/dist/{chunk-THATMZXD.js → chunk-MLB253V2.js} +2 -2
  205. package/dist/{chunk-THATMZXD.js.map → chunk-MLB253V2.js.map} +1 -1
  206. package/dist/{chunk-JGIWG6SR.js → chunk-MS77U77X.js} +664 -550
  207. package/dist/chunk-MS77U77X.js.map +1 -0
  208. package/dist/chunk-MW4FA3MW.js +23 -0
  209. package/dist/chunk-MW4FA3MW.js.map +1 -0
  210. package/dist/chunk-MYKNINNN.js +228 -0
  211. package/dist/chunk-MYKNINNN.js.map +1 -0
  212. package/dist/{chunk-4CQAV7YB.js → chunk-O6TTQXTY.js} +2 -2
  213. package/dist/{chunk-NBD3KUOZ.js → chunk-OJDJ4VDQ.js} +35 -24
  214. package/dist/chunk-OJDJ4VDQ.js.map +1 -0
  215. package/dist/{chunk-NQZ2OSGR.js → chunk-PVZEMNJY.js} +9 -9
  216. package/dist/chunk-PVZEMNJY.js.map +1 -0
  217. package/dist/chunk-RN26DV2M.js +271 -0
  218. package/dist/chunk-RN26DV2M.js.map +1 -0
  219. package/dist/{chunk-JCXGZRMU.js → chunk-RQQW3IQC.js} +3 -3
  220. package/dist/chunk-RQQW3IQC.js.map +1 -0
  221. package/dist/{chunk-24VULZ7A.js → chunk-TKOGZDD6.js} +3 -3
  222. package/dist/{chunk-EGK3KN7B.js → chunk-TQYLVXGY.js} +70 -39
  223. package/dist/chunk-TQYLVXGY.js.map +1 -0
  224. package/dist/{chunk-QMM6O4CD.js → chunk-UACD2CL2.js} +15 -3
  225. package/dist/{chunk-QMM6O4CD.js.map → chunk-UACD2CL2.js.map} +1 -1
  226. package/dist/{chunk-M3WTHJHJ.js → chunk-VH575UTV.js} +30 -34
  227. package/dist/chunk-VH575UTV.js.map +1 -0
  228. package/dist/{chunk-AUIR5O6W.js → chunk-WWBMC24F.js} +9 -15
  229. package/dist/chunk-WWBMC24F.js.map +1 -0
  230. package/dist/{chunk-JWOYLO27.js → chunk-WYJUJV4L.js} +80 -7
  231. package/dist/chunk-WYJUJV4L.js.map +1 -0
  232. package/dist/{chunk-EY4NZKDR.js → chunk-XFMMPYNU.js} +2 -2
  233. package/dist/chunk-Y4VRBIS6.js +35 -0
  234. package/dist/chunk-Y4VRBIS6.js.map +1 -0
  235. package/dist/{chunk-DMBALCE2.js → chunk-ZC7MSQ5U.js} +77 -4
  236. package/dist/chunk-ZC7MSQ5U.js.map +1 -0
  237. package/dist/{chunk-OGWBVHB3.js → chunk-ZCK6SCOE.js} +67 -8
  238. package/dist/chunk-ZCK6SCOE.js.map +1 -0
  239. package/dist/{chunk-IHVBV5C2.js → chunk-ZTFTABXV.js} +2 -1
  240. package/dist/chunk-ZTFTABXV.js.map +1 -0
  241. package/dist/index.cjs +9532 -5017
  242. package/dist/index.cjs.map +1 -1
  243. package/dist/index.d.cts +163 -27
  244. package/dist/index.d.ts +163 -27
  245. package/dist/index.js +119 -56
  246. package/dist/index.js.map +1 -1
  247. package/dist/{ir-BMP7yxJJ.d.cts → ir-C-Zm_GlZ.d.cts} +1 -1
  248. package/dist/{ir-DUOz6H-5.d.ts → ir-DGyGiwVe.d.ts} +1 -1
  249. package/dist/{module-k7m3txak.d.ts → module-DqQ1U-Me.d.ts} +129 -100
  250. package/dist/{module-B8CBqIZ_.d.cts → module-doenaCsZ.d.cts} +129 -100
  251. package/package.json +12 -1
  252. package/dist/ModuleTag-C8FHY_sY.d.ts +0 -93
  253. package/dist/ModuleTag-EGbgBMpZ.d.cts +0 -93
  254. package/dist/chunk-3QMIVH35.js +0 -43
  255. package/dist/chunk-3QMIVH35.js.map +0 -1
  256. package/dist/chunk-76WT3HOR.js.map +0 -1
  257. package/dist/chunk-AUIR5O6W.js.map +0 -1
  258. package/dist/chunk-BABLDP24.js.map +0 -1
  259. package/dist/chunk-BE3HW4FY.js.map +0 -1
  260. package/dist/chunk-CW6T36TN.js.map +0 -1
  261. package/dist/chunk-DFNM3WX2.js.map +0 -1
  262. package/dist/chunk-DMBALCE2.js.map +0 -1
  263. package/dist/chunk-EGK3KN7B.js.map +0 -1
  264. package/dist/chunk-GMPEOUP2.js.map +0 -1
  265. package/dist/chunk-IHVBV5C2.js.map +0 -1
  266. package/dist/chunk-JCXGZRMU.js.map +0 -1
  267. package/dist/chunk-JGIWG6SR.js.map +0 -1
  268. package/dist/chunk-JWOYLO27.js.map +0 -1
  269. package/dist/chunk-KIXAU3GM.js +0 -137
  270. package/dist/chunk-KIXAU3GM.js.map +0 -1
  271. package/dist/chunk-KP7MUZNX.js.map +0 -1
  272. package/dist/chunk-M3WTHJHJ.js.map +0 -1
  273. package/dist/chunk-M7IYCTJV.js +0 -79
  274. package/dist/chunk-M7IYCTJV.js.map +0 -1
  275. package/dist/chunk-NBD3KUOZ.js.map +0 -1
  276. package/dist/chunk-NQZ2OSGR.js.map +0 -1
  277. package/dist/chunk-OGWBVHB3.js.map +0 -1
  278. package/dist/chunk-PAYXCY6A.js.map +0 -1
  279. package/dist/chunk-PYOE4VSI.js.map +0 -1
  280. package/dist/chunk-QCHIQWAJ.js +0 -21
  281. package/dist/chunk-VZB726PE.js +0 -93
  282. package/dist/chunk-VZB726PE.js.map +0 -1
  283. package/dist/chunk-W3TEWHLO.js +0 -568
  284. package/dist/chunk-W3TEWHLO.js.map +0 -1
  285. package/dist/chunk-ZFLHVFUC.js +0 -192
  286. package/dist/chunk-ZFLHVFUC.js.map +0 -1
  287. package/dist/chunk-ZFY7U2FR.js.map +0 -1
  288. /package/dist/{chunk-G5ZBFPNU.js.map → chunk-2A4UKO2D.js.map} +0 -0
  289. /package/dist/{chunk-ANLBCBDC.js.map → chunk-2DVLMSOE.js.map} +0 -0
  290. /package/dist/{chunk-3TMODYZV.js.map → chunk-3XO4HR6V.js.map} +0 -0
  291. /package/dist/{chunk-TKZ7MEIA.js.map → chunk-53GVPGSM.js.map} +0 -0
  292. /package/dist/{chunk-NZJKFF45.js.map → chunk-C2UZZQ76.js.map} +0 -0
  293. /package/dist/{chunk-M2RGJPXX.js.map → chunk-DBD6Q6JH.js.map} +0 -0
  294. /package/dist/{chunk-ZGDVUPTM.js.map → chunk-EB4RGQO3.js.map} +0 -0
  295. /package/dist/{chunk-TAAPQVZN.js.map → chunk-ISKNULNH.js.map} +0 -0
  296. /package/dist/{chunk-66ALHVEX.js.map → chunk-KKIAYH4X.js.map} +0 -0
  297. /package/dist/{chunk-3RMKLXHX.js.map → chunk-KLDVG3SY.js.map} +0 -0
  298. /package/dist/{chunk-4CQAV7YB.js.map → chunk-O6TTQXTY.js.map} +0 -0
  299. /package/dist/{chunk-24VULZ7A.js.map → chunk-TKOGZDD6.js.map} +0 -0
  300. /package/dist/{chunk-EY4NZKDR.js.map → chunk-XFMMPYNU.js.map} +0 -0
@@ -30,12 +30,12 @@ __export(TraitLifecycle_exports, {
30
30
  module.exports = __toCommonJS(TraitLifecycle_exports);
31
31
 
32
32
  // src/internal/trait-lifecycle/index.ts
33
- var import_effect7 = require("effect");
33
+ var import_effect10 = require("effect");
34
34
 
35
35
  // src/internal/runtime/core/TaskRunner.ts
36
- var import_effect5 = require("effect");
36
+ var import_effect8 = require("effect");
37
37
 
38
- // src/internal/runtime/core/DebugSink.ts
38
+ // src/internal/runtime/core/DebugSink.record.ts
39
39
  var import_effect3 = require("effect");
40
40
 
41
41
  // src/internal/observability/jsonValue.ts
@@ -57,7 +57,7 @@ var currentLinkId = import_effect2.FiberRef.unsafeMake(void 0);
57
57
  var EffectOpMiddlewareTag = class extends import_effect2.Context.Tag("Logix/EffectOpMiddleware")() {
58
58
  };
59
59
 
60
- // src/internal/runtime/core/DebugSink.ts
60
+ // src/internal/runtime/core/DebugSink.record.ts
61
61
  var currentDebugSinks = import_effect3.FiberRef.unsafeMake([]);
62
62
  var currentRuntimeLabel = import_effect3.FiberRef.unsafeMake(void 0);
63
63
  var currentTxnId = import_effect3.FiberRef.unsafeMake(void 0);
@@ -232,7 +232,441 @@ var browserPrettyLoggerLayer = import_effect3.Logger.replace(
232
232
  );
233
233
 
234
234
  // src/internal/runtime/core/env.ts
235
+ var import_effect7 = require("effect");
236
+
237
+ // src/internal/runtime/core/HostScheduler.ts
238
+ var noopCancel = () => {
239
+ };
240
+ var safeNowMs = () => {
241
+ const perf = globalThis.performance;
242
+ if (perf && typeof perf.now === "function") {
243
+ try {
244
+ const v = perf.now();
245
+ if (typeof v === "number" && Number.isFinite(v)) return v;
246
+ } catch {
247
+ }
248
+ }
249
+ return Date.now();
250
+ };
251
+ var safeQueueMicrotask = (cb) => {
252
+ const qm = globalThis.queueMicrotask;
253
+ if (typeof qm === "function") {
254
+ try {
255
+ qm(cb);
256
+ return;
257
+ } catch {
258
+ }
259
+ }
260
+ try {
261
+ Promise.resolve().then(cb);
262
+ } catch {
263
+ setTimeout(cb, 0);
264
+ }
265
+ };
266
+ var safeSetTimeout = (ms, cb) => {
267
+ const id = setTimeout(cb, ms);
268
+ return () => {
269
+ try {
270
+ clearTimeout(id);
271
+ } catch {
272
+ }
273
+ };
274
+ };
275
+ var makeMessageChannelMacrotask = () => {
276
+ const MC = globalThis.MessageChannel;
277
+ if (typeof MC !== "function") return void 0;
278
+ let channel;
279
+ try {
280
+ channel = new MC();
281
+ } catch {
282
+ return void 0;
283
+ }
284
+ const queue = [];
285
+ let scheduled = false;
286
+ const flush = () => {
287
+ scheduled = false;
288
+ const tasks = queue.splice(0, queue.length);
289
+ for (const t of tasks) {
290
+ if (t.canceled) continue;
291
+ try {
292
+ t.cb();
293
+ } catch {
294
+ }
295
+ }
296
+ };
297
+ try {
298
+ channel.port1.onmessage = flush;
299
+ } catch {
300
+ return void 0;
301
+ }
302
+ const schedule = (cb) => {
303
+ const task = { canceled: false, cb };
304
+ queue.push(task);
305
+ if (!scheduled) {
306
+ scheduled = true;
307
+ try {
308
+ channel.port2.postMessage(void 0);
309
+ } catch {
310
+ scheduled = false;
311
+ return safeSetTimeout(0, cb);
312
+ }
313
+ }
314
+ return () => {
315
+ task.canceled = true;
316
+ };
317
+ };
318
+ return schedule;
319
+ };
320
+ var makeSetImmediateMacrotask = () => {
321
+ const si = globalThis.setImmediate;
322
+ const ci = globalThis.clearImmediate;
323
+ if (typeof si !== "function") return void 0;
324
+ return (cb) => {
325
+ let id;
326
+ try {
327
+ id = si(cb);
328
+ } catch {
329
+ return safeSetTimeout(0, cb);
330
+ }
331
+ return () => {
332
+ if (typeof ci !== "function") return;
333
+ try {
334
+ ci(id);
335
+ } catch {
336
+ }
337
+ };
338
+ };
339
+ };
340
+ var makeRaf = () => {
341
+ const raf = globalThis.requestAnimationFrame;
342
+ const cancel = globalThis.cancelAnimationFrame;
343
+ if (typeof raf !== "function") return void 0;
344
+ return (cb) => {
345
+ let id;
346
+ try {
347
+ id = raf(cb);
348
+ } catch {
349
+ return noopCancel;
350
+ }
351
+ return () => {
352
+ if (typeof cancel !== "function") return;
353
+ try {
354
+ cancel(id);
355
+ } catch {
356
+ }
357
+ };
358
+ };
359
+ };
360
+ var makeDefaultHostScheduler = () => {
361
+ const macrotask = makeSetImmediateMacrotask() ?? makeMessageChannelMacrotask() ?? ((cb) => safeSetTimeout(0, cb));
362
+ const raf = makeRaf();
363
+ return {
364
+ nowMs: safeNowMs,
365
+ scheduleMicrotask: safeQueueMicrotask,
366
+ scheduleMacrotask: macrotask,
367
+ scheduleAnimationFrame: (cb) => raf?.(cb) ?? macrotask(cb),
368
+ scheduleTimeout: safeSetTimeout
369
+ };
370
+ };
371
+ var globalHostScheduler;
372
+ var getGlobalHostScheduler = () => {
373
+ globalHostScheduler ?? (globalHostScheduler = makeDefaultHostScheduler());
374
+ return globalHostScheduler;
375
+ };
376
+
377
+ // src/internal/runtime/core/RuntimeStore.ts
378
+ var parseTopicKey = (topicKey) => {
379
+ const idx = topicKey.indexOf("::");
380
+ if (idx <= 0) return void 0;
381
+ const moduleId = topicKey.slice(0, idx);
382
+ const rest = topicKey.slice(idx + 2);
383
+ if (rest.length === 0) return void 0;
384
+ const idx2 = rest.indexOf("::");
385
+ if (idx2 < 0) {
386
+ return { kind: "module", moduleInstanceKey: `${moduleId}::${rest}` };
387
+ }
388
+ const instanceId = rest.slice(0, idx2);
389
+ const suffix = rest.slice(idx2 + 2);
390
+ if (suffix.startsWith("rq:")) {
391
+ const selectorId = suffix.slice("rq:".length);
392
+ if (selectorId.length === 0) return void 0;
393
+ return {
394
+ kind: "readQuery",
395
+ moduleInstanceKey: `${moduleId}::${instanceId}`,
396
+ selectorId
397
+ };
398
+ }
399
+ return { kind: "module", moduleInstanceKey: `${moduleId}::${instanceId}` };
400
+ };
401
+ var makeRuntimeStore = () => {
402
+ let tickSeq = 0;
403
+ const moduleStates = /* @__PURE__ */ new Map();
404
+ const topicVersions = /* @__PURE__ */ new Map();
405
+ const topicPriorities = /* @__PURE__ */ new Map();
406
+ const listenersByTopic = /* @__PURE__ */ new Map();
407
+ const subscriberCountByModule = /* @__PURE__ */ new Map();
408
+ const getTopicVersion = (topicKey) => topicVersions.get(topicKey) ?? 0;
409
+ const getTopicPriority = (topicKey) => topicPriorities.get(topicKey) ?? "normal";
410
+ const commitTopicBump = (topicKey, priority) => {
411
+ const prev = topicVersions.get(topicKey) ?? 0;
412
+ topicVersions.set(topicKey, prev + 1);
413
+ topicPriorities.set(topicKey, priority);
414
+ };
415
+ const subscribeTopic = (topicKey, listener) => {
416
+ const info = parseTopicKey(topicKey);
417
+ const existing = listenersByTopic.get(topicKey);
418
+ const set = existing ?? /* @__PURE__ */ new Set();
419
+ const alreadyHas = set.has(listener);
420
+ if (!alreadyHas) {
421
+ set.add(listener);
422
+ }
423
+ if (!existing) {
424
+ listenersByTopic.set(topicKey, set);
425
+ }
426
+ if (!alreadyHas && info) {
427
+ const prev = subscriberCountByModule.get(info.moduleInstanceKey) ?? 0;
428
+ subscriberCountByModule.set(info.moduleInstanceKey, prev + 1);
429
+ }
430
+ return () => {
431
+ const current = listenersByTopic.get(topicKey);
432
+ if (!current) return;
433
+ const deleted = current.delete(listener);
434
+ if (deleted && info) {
435
+ const prev = subscriberCountByModule.get(info.moduleInstanceKey) ?? 0;
436
+ const next = prev - 1;
437
+ if (next <= 0) {
438
+ subscriberCountByModule.delete(info.moduleInstanceKey);
439
+ } else {
440
+ subscriberCountByModule.set(info.moduleInstanceKey, next);
441
+ }
442
+ }
443
+ if (current.size === 0) {
444
+ listenersByTopic.delete(topicKey);
445
+ }
446
+ };
447
+ };
448
+ const getTopicSubscriberCount = (topicKey) => listenersByTopic.get(topicKey)?.size ?? 0;
449
+ const getModuleSubscriberCount = (moduleInstanceKey) => subscriberCountByModule.get(moduleInstanceKey) ?? 0;
450
+ const registerModuleInstance = (args) => {
451
+ moduleStates.set(args.moduleInstanceKey, args.initialState);
452
+ if (!topicVersions.has(args.moduleInstanceKey)) {
453
+ topicVersions.set(args.moduleInstanceKey, 0);
454
+ topicPriorities.set(args.moduleInstanceKey, "normal");
455
+ }
456
+ };
457
+ const unregisterModuleInstance = (moduleInstanceKey) => {
458
+ moduleStates.delete(moduleInstanceKey);
459
+ };
460
+ const commitTick = (args) => {
461
+ tickSeq = args.tickSeq;
462
+ for (const [key, commit] of args.accepted.modules) {
463
+ moduleStates.set(key, commit.state);
464
+ }
465
+ const changedTopics = /* @__PURE__ */ new Map();
466
+ for (const [topicKey, priority] of args.accepted.dirtyTopics) {
467
+ commitTopicBump(topicKey, priority);
468
+ const listeners = Array.from(listenersByTopic.get(topicKey) ?? []);
469
+ if (listeners.length > 0) {
470
+ changedTopics.set(topicKey, { priority, listeners });
471
+ }
472
+ }
473
+ return { changedTopics };
474
+ };
475
+ const getModuleState = (moduleInstanceKey) => moduleStates.get(moduleInstanceKey);
476
+ const dispose = () => {
477
+ moduleStates.clear();
478
+ topicVersions.clear();
479
+ topicPriorities.clear();
480
+ listenersByTopic.clear();
481
+ subscriberCountByModule.clear();
482
+ };
483
+ return {
484
+ getTickSeq: () => tickSeq,
485
+ getModuleState,
486
+ getTopicVersion,
487
+ getTopicPriority,
488
+ subscribeTopic,
489
+ getTopicSubscriberCount,
490
+ getModuleSubscriberCount,
491
+ registerModuleInstance,
492
+ unregisterModuleInstance,
493
+ commitTick,
494
+ dispose
495
+ };
496
+ };
497
+
498
+ // src/internal/runtime/core/TickScheduler.ts
499
+ var import_effect5 = require("effect");
500
+
501
+ // src/internal/runtime/core/DevtoolsHub.ts
235
502
  var import_effect4 = require("effect");
503
+ var lastRunTs = 0;
504
+ var lastRunTsSeq = 0;
505
+ var nextRunId = () => {
506
+ const ts = Date.now();
507
+ if (ts === lastRunTs) {
508
+ lastRunTsSeq += 1;
509
+ } else {
510
+ lastRunTs = ts;
511
+ lastRunTsSeq = 0;
512
+ }
513
+ return lastRunTsSeq === 0 ? `run-${ts}` : `run-${ts}.${lastRunTsSeq}`;
514
+ };
515
+ var currentRunId = nextRunId();
516
+
517
+ // src/internal/runtime/core/DeclarativeLinkRuntime.ts
518
+ var import_effect6 = require("effect");
519
+ var makeDeclarativeLinkRuntime = () => {
520
+ const moduleAsSourceById = /* @__PURE__ */ new Map();
521
+ const moduleAsSourceIdsBySource = /* @__PURE__ */ new Map();
522
+ const declarativeById = /* @__PURE__ */ new Map();
523
+ const declarativeReadNodesBySource = /* @__PURE__ */ new Map();
524
+ const registerModuleAsSourceLink = (link) => {
525
+ const stored = {
526
+ ...link,
527
+ hasValue: false,
528
+ lastValue: void 0
529
+ };
530
+ moduleAsSourceById.set(link.id, stored);
531
+ const set = moduleAsSourceIdsBySource.get(link.sourceModuleInstanceKey) ?? /* @__PURE__ */ new Set();
532
+ set.add(link.id);
533
+ moduleAsSourceIdsBySource.set(link.sourceModuleInstanceKey, set);
534
+ return () => {
535
+ moduleAsSourceById.delete(link.id);
536
+ const current = moduleAsSourceIdsBySource.get(link.sourceModuleInstanceKey);
537
+ if (!current) return;
538
+ current.delete(link.id);
539
+ if (current.size === 0) {
540
+ moduleAsSourceIdsBySource.delete(link.sourceModuleInstanceKey);
541
+ }
542
+ };
543
+ };
544
+ const registerDeclarativeLink = (link) => {
545
+ const readNodeById = /* @__PURE__ */ new Map();
546
+ for (const n of link.readNodes) {
547
+ readNodeById.set(n.nodeId, n);
548
+ }
549
+ const dispatchNodeById = /* @__PURE__ */ new Map();
550
+ for (const n of link.dispatchNodes) {
551
+ dispatchNodeById.set(n.nodeId, n);
552
+ }
553
+ const incomingByDispatch = /* @__PURE__ */ new Map();
554
+ for (const e of link.ir.edges) {
555
+ const to = e.to;
556
+ const isDispatch = dispatchNodeById.has(to);
557
+ if (!isDispatch) continue;
558
+ incomingByDispatch.set(to, (incomingByDispatch.get(to) ?? 0) + 1);
559
+ const count = incomingByDispatch.get(to) ?? 0;
560
+ if (count > 1) {
561
+ throw new Error(
562
+ `[DeclarativeLinkRuntime] Invalid DeclarativeLinkIR: dispatch node has multiple incoming edges (linkId=${link.linkId}, nodeId=${to}).`
563
+ );
564
+ }
565
+ }
566
+ const dispatchTargetsByReadNode = /* @__PURE__ */ new Map();
567
+ for (const e of link.ir.edges) {
568
+ const from = e.from;
569
+ const to = e.to;
570
+ if (!readNodeById.has(from)) continue;
571
+ if (!dispatchNodeById.has(to)) continue;
572
+ const list = dispatchTargetsByReadNode.get(from) ?? [];
573
+ list.push(to);
574
+ dispatchTargetsByReadNode.set(from, list);
575
+ }
576
+ const stored = {
577
+ ...link,
578
+ readNodeById,
579
+ dispatchNodeById,
580
+ dispatchTargetsByReadNode,
581
+ readNodeState: /* @__PURE__ */ new Map()
582
+ };
583
+ declarativeById.set(link.linkId, stored);
584
+ for (const n of link.readNodes) {
585
+ const list = declarativeReadNodesBySource.get(n.moduleInstanceKey) ?? [];
586
+ list.push({ linkId: link.linkId, nodeId: n.nodeId });
587
+ declarativeReadNodesBySource.set(n.moduleInstanceKey, list);
588
+ }
589
+ return () => {
590
+ declarativeById.delete(link.linkId);
591
+ for (const n of link.readNodes) {
592
+ const list = declarativeReadNodesBySource.get(n.moduleInstanceKey);
593
+ if (!list) continue;
594
+ const next = list.filter((x) => !(x.linkId === link.linkId && x.nodeId === n.nodeId));
595
+ if (next.length === 0) {
596
+ declarativeReadNodesBySource.delete(n.moduleInstanceKey);
597
+ } else {
598
+ declarativeReadNodesBySource.set(n.moduleInstanceKey, next);
599
+ }
600
+ }
601
+ };
602
+ };
603
+ const applyForSources = (args) => import_effect6.Effect.gen(function* () {
604
+ let scheduled = false;
605
+ for (const sourceKey of args.changedModuleInstanceKeys) {
606
+ const ids = moduleAsSourceIdsBySource.get(sourceKey);
607
+ if (!ids || ids.size === 0) continue;
608
+ const commit = args.acceptedModules.get(sourceKey);
609
+ if (!commit) continue;
610
+ for (const id of ids) {
611
+ const link = moduleAsSourceById.get(id);
612
+ if (!link) continue;
613
+ let selected;
614
+ try {
615
+ selected = link.readQuery.select(commit.state);
616
+ } catch {
617
+ continue;
618
+ }
619
+ const nextValue = link.computeValue(selected);
620
+ if (link.hasValue && link.equalsValue(link.lastValue, nextValue)) {
621
+ continue;
622
+ }
623
+ link.hasValue = true;
624
+ link.lastValue = nextValue;
625
+ scheduled = true;
626
+ yield* link.applyValue(nextValue);
627
+ }
628
+ }
629
+ for (const sourceKey of args.changedModuleInstanceKeys) {
630
+ const refs = declarativeReadNodesBySource.get(sourceKey);
631
+ if (!refs || refs.length === 0) continue;
632
+ const commit = args.acceptedModules.get(sourceKey);
633
+ if (!commit) continue;
634
+ for (const ref of refs) {
635
+ const link = declarativeById.get(ref.linkId);
636
+ if (!link) continue;
637
+ const readNode = link.readNodeById.get(ref.nodeId);
638
+ if (!readNode) continue;
639
+ let value;
640
+ try {
641
+ value = readNode.readQuery.select(commit.state);
642
+ } catch {
643
+ continue;
644
+ }
645
+ const state = link.readNodeState.get(ref.nodeId) ?? { hasValue: false, lastValue: void 0 };
646
+ const changed = !state.hasValue || !Object.is(state.lastValue, value);
647
+ if (!changed) continue;
648
+ state.hasValue = true;
649
+ state.lastValue = value;
650
+ link.readNodeState.set(ref.nodeId, state);
651
+ const targets = link.dispatchTargetsByReadNode.get(ref.nodeId) ?? [];
652
+ for (const dispatchNodeId of targets) {
653
+ const node = link.dispatchNodeById.get(dispatchNodeId);
654
+ if (!node) continue;
655
+ scheduled = true;
656
+ yield* node.dispatch(value);
657
+ }
658
+ }
659
+ }
660
+ return { scheduled };
661
+ });
662
+ return {
663
+ registerModuleAsSourceLink,
664
+ registerDeclarativeLink,
665
+ applyForSources
666
+ };
667
+ };
668
+
669
+ // src/internal/runtime/core/env.ts
236
670
  var getNodeEnv = () => {
237
671
  try {
238
672
  const env = globalThis?.process?.env;
@@ -242,32 +676,55 @@ var getNodeEnv = () => {
242
676
  }
243
677
  };
244
678
  var isDevEnv = () => getNodeEnv() !== "production";
245
- var StateTransactionConfigTagImpl = class extends import_effect4.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
679
+ var StateTransactionConfigTagImpl = class extends import_effect7.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
246
680
  };
247
- var ReadQueryStrictGateConfigTagImpl = class extends import_effect4.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
681
+ var ReadQueryStrictGateConfigTagImpl = class extends import_effect7.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
248
682
  };
249
- var ReplayModeConfigTagImpl = class extends import_effect4.Context.Tag("@logixjs/core/ReplayModeConfig")() {
683
+ var ReplayModeConfigTagImpl = class extends import_effect7.Context.Tag("@logixjs/core/ReplayModeConfig")() {
250
684
  };
251
- var StateTransactionOverridesTagImpl = class extends import_effect4.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
685
+ var StateTransactionOverridesTagImpl = class extends import_effect7.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
252
686
  };
253
- var ConcurrencyPolicyTagImpl = class extends import_effect4.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
687
+ var ConcurrencyPolicyTagImpl = class extends import_effect7.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
254
688
  };
255
- var ConcurrencyPolicyOverridesTagImpl = class extends import_effect4.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
689
+ var ConcurrencyPolicyOverridesTagImpl = class extends import_effect7.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
690
+ };
691
+ var RuntimeStoreTag = class extends import_effect7.Context.Tag("@logixjs/core/RuntimeStore")() {
692
+ };
693
+ var runtimeStoreLayer = import_effect7.Layer.scoped(
694
+ RuntimeStoreTag,
695
+ import_effect7.Effect.acquireRelease(
696
+ import_effect7.Effect.sync(() => makeRuntimeStore()),
697
+ (store) => import_effect7.Effect.sync(() => store.dispose())
698
+ )
699
+ );
700
+ var HostSchedulerTag = class extends import_effect7.Context.Tag("@logixjs/core/HostScheduler")() {
701
+ };
702
+ var hostSchedulerLayer = import_effect7.Layer.succeed(
703
+ HostSchedulerTag,
704
+ getGlobalHostScheduler()
705
+ );
706
+ var DeclarativeLinkRuntimeTag = class extends import_effect7.Context.Tag("@logixjs/core/DeclarativeLinkRuntime")() {
707
+ };
708
+ var declarativeLinkRuntimeLayer = import_effect7.Layer.succeed(
709
+ DeclarativeLinkRuntimeTag,
710
+ makeDeclarativeLinkRuntime()
711
+ );
712
+ var TickSchedulerTag = class extends import_effect7.Context.Tag("@logixjs/core/TickScheduler")() {
256
713
  };
257
714
 
258
715
  // src/internal/runtime/core/TaskRunner.ts
259
- var inSyncTransactionFiber = import_effect5.FiberRef.unsafeMake(false);
260
- var forceSourceRefresh = import_effect5.FiberRef.unsafeMake(false);
716
+ var inSyncTransactionFiber = import_effect8.FiberRef.unsafeMake(false);
717
+ var forceSourceRefresh = import_effect8.FiberRef.unsafeMake(false);
261
718
 
262
719
  // src/internal/runtime/core/ReplayLog.ts
263
- var import_effect6 = require("effect");
264
- var ReplayLog = class extends import_effect6.Context.Tag("@logixjs/core/ReplayLog")() {
720
+ var import_effect9 = require("effect");
721
+ var ReplayLog = class extends import_effect9.Context.Tag("@logixjs/core/ReplayLog")() {
265
722
  };
266
- var snapshot = import_effect6.Effect.gen(function* () {
723
+ var snapshot = import_effect9.Effect.gen(function* () {
267
724
  const log = yield* ReplayLog;
268
725
  return yield* log.snapshot;
269
726
  });
270
- var resetCursor = import_effect6.Effect.gen(function* () {
727
+ var resetCursor = import_effect9.Effect.gen(function* () {
271
728
  const log = yield* ReplayLog;
272
729
  yield* log.resetCursor;
273
730
  });
@@ -385,7 +842,7 @@ var Ref2 = {
385
842
  },
386
843
  root: () => ({ kind: "root" })
387
844
  };
388
- var scopedValidate = (bound, request) => import_effect7.Effect.gen(function* () {
845
+ var scopedValidate = (bound, request) => import_effect10.Effect.gen(function* () {
389
846
  let internals;
390
847
  try {
391
848
  internals = getBoundInternals(bound);
@@ -416,19 +873,19 @@ var scopedValidate = (bound, request) => import_effect7.Effect.gen(function* ()
416
873
  mode: request.mode,
417
874
  target: toTarget(request.target)
418
875
  };
419
- const inTxn = yield* import_effect7.FiberRef.get(inSyncTransactionFiber);
876
+ const inTxn = yield* import_effect10.FiberRef.get(inSyncTransactionFiber);
420
877
  if (inTxn) {
421
878
  enqueue(internal);
422
879
  return;
423
880
  }
424
881
  yield* internals.txn.runWithStateTransaction(
425
882
  { kind: "trait", name: "scopedValidate", details: request },
426
- () => import_effect7.Effect.sync(() => {
883
+ () => import_effect10.Effect.sync(() => {
427
884
  enqueue(internal);
428
885
  })
429
886
  );
430
887
  });
431
- var scopedExecute = (bound, request) => import_effect7.Effect.gen(function* () {
888
+ var scopedExecute = (bound, request) => import_effect10.Effect.gen(function* () {
432
889
  if (request.kind === "source:refresh") {
433
890
  const toFieldPath = (ref) => {
434
891
  if (ref.kind === "root") return void 0;
@@ -446,8 +903,8 @@ var scopedExecute = (bound, request) => import_effect7.Effect.gen(function* () {
446
903
  if (request.kind !== "query:invalidate") {
447
904
  return;
448
905
  }
449
- const replayLogOpt = yield* import_effect7.Effect.serviceOption(ReplayLog);
450
- if (import_effect7.Option.isNone(replayLogOpt)) {
906
+ const replayLogOpt = yield* import_effect10.Effect.serviceOption(ReplayLog);
907
+ if (import_effect10.Option.isNone(replayLogOpt)) {
451
908
  return;
452
909
  }
453
910
  let moduleId;
@@ -470,7 +927,7 @@ var scopedExecute = (bound, request) => import_effect7.Effect.gen(function* () {
470
927
  meta: request.request
471
928
  });
472
929
  });
473
- var cleanup = (bound, request) => import_effect7.Effect.gen(function* () {
930
+ var cleanup = (bound, request) => import_effect10.Effect.gen(function* () {
474
931
  const apply = () => bound.state.mutate((draft) => {
475
932
  const clearAt = (root, path) => {
476
933
  if (!path) return;
@@ -496,7 +953,7 @@ var cleanup = (bound, request) => import_effect7.Effect.gen(function* () {
496
953
  return;
497
954
  }
498
955
  });
499
- const inTxn = yield* import_effect7.FiberRef.get(inSyncTransactionFiber);
956
+ const inTxn = yield* import_effect10.FiberRef.get(inSyncTransactionFiber);
500
957
  if (inTxn) {
501
958
  return yield* apply();
502
959
  }
@@ -535,32 +992,32 @@ var makeSourceWiring = (bound, module2) => {
535
992
  const sourceOnKeyChange = sources.filter(
536
993
  (e) => Array.isArray(e?.meta?.triggers) ? e.meta.triggers.includes("onKeyChange") : false
537
994
  );
538
- const setup = import_effect7.Effect.sync(() => {
995
+ const setup = import_effect10.Effect.sync(() => {
539
996
  if (sourceOnMount.length === 0) return;
540
997
  bound.lifecycle.onStart(
541
- import_effect7.Effect.forEach(sourceOnMount, (entry) => bound.traits.source.refresh(entry.fieldPath), {
998
+ import_effect10.Effect.forEach(sourceOnMount, (entry) => bound.traits.source.refresh(entry.fieldPath), {
542
999
  concurrency: "unbounded"
543
- }).pipe(import_effect7.Effect.asVoid)
1000
+ }).pipe(import_effect10.Effect.asVoid)
544
1001
  );
545
1002
  });
546
- const refreshOnKeyChange = (changedPath) => import_effect7.Effect.gen(function* () {
1003
+ const refreshOnKeyChange = (changedPath) => import_effect10.Effect.gen(function* () {
547
1004
  if (!changedPath || isAuxRootPath(changedPath)) return;
548
1005
  if (sourceOnKeyChange.length === 0) return;
549
1006
  const changedPattern = toPatternPath(changedPath);
550
- yield* import_effect7.Effect.forEach(
1007
+ yield* import_effect10.Effect.forEach(
551
1008
  sourceOnKeyChange,
552
1009
  (entry) => {
553
1010
  const deps = entry?.meta?.deps ?? [];
554
1011
  const affected = deps.some((dep) => isDepAffectedByChange(dep, changedPattern));
555
- if (!affected) return import_effect7.Effect.void;
1012
+ if (!affected) return import_effect10.Effect.void;
556
1013
  return bound.traits.source.refresh(entry.fieldPath);
557
1014
  },
558
1015
  { concurrency: "unbounded" }
559
1016
  );
560
- }).pipe(import_effect7.Effect.asVoid);
1017
+ }).pipe(import_effect10.Effect.asVoid);
561
1018
  return { setup, refreshOnKeyChange };
562
1019
  };
563
- var install = (_bound) => import_effect7.Effect.void;
1020
+ var install = (_bound) => import_effect10.Effect.void;
564
1021
 
565
1022
  // src/TraitLifecycle.ts
566
1023
  var Ref3 = Ref2;