@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
@@ -27,12 +27,12 @@ __export(Middleware_exports, {
27
27
  withDebug: () => withDebug
28
28
  });
29
29
  module.exports = __toCommonJS(Middleware_exports);
30
- var import_effect8 = require("effect");
30
+ var import_effect11 = require("effect");
31
31
 
32
32
  // src/Debug.ts
33
- var import_effect7 = require("effect");
33
+ var import_effect10 = require("effect");
34
34
 
35
- // src/internal/runtime/core/DebugSink.ts
35
+ // src/internal/runtime/core/DebugSink.record.ts
36
36
  var import_effect3 = require("effect");
37
37
 
38
38
  // src/internal/observability/jsonValue.ts
@@ -54,7 +54,7 @@ var currentLinkId = import_effect2.FiberRef.unsafeMake(void 0);
54
54
  var EffectOpMiddlewareTag = class extends import_effect2.Context.Tag("Logix/EffectOpMiddleware")() {
55
55
  };
56
56
 
57
- // src/internal/runtime/core/DebugSink.ts
57
+ // src/internal/runtime/core/DebugSink.record.ts
58
58
  var currentDebugSinks = import_effect3.FiberRef.unsafeMake([]);
59
59
  var currentRuntimeLabel = import_effect3.FiberRef.unsafeMake(void 0);
60
60
  var currentTxnId = import_effect3.FiberRef.unsafeMake(void 0);
@@ -307,6 +307,148 @@ var record = (event) => import_effect3.Effect.gen(function* () {
307
307
 
308
308
  // src/internal/runtime/core/DevtoolsHub.ts
309
309
  var import_effect4 = require("effect");
310
+
311
+ // src/internal/runtime/core/HostScheduler.ts
312
+ var noopCancel = () => {
313
+ };
314
+ var safeNowMs = () => {
315
+ const perf = globalThis.performance;
316
+ if (perf && typeof perf.now === "function") {
317
+ try {
318
+ const v = perf.now();
319
+ if (typeof v === "number" && Number.isFinite(v)) return v;
320
+ } catch {
321
+ }
322
+ }
323
+ return Date.now();
324
+ };
325
+ var safeQueueMicrotask = (cb) => {
326
+ const qm = globalThis.queueMicrotask;
327
+ if (typeof qm === "function") {
328
+ try {
329
+ qm(cb);
330
+ return;
331
+ } catch {
332
+ }
333
+ }
334
+ try {
335
+ Promise.resolve().then(cb);
336
+ } catch {
337
+ setTimeout(cb, 0);
338
+ }
339
+ };
340
+ var safeSetTimeout = (ms, cb) => {
341
+ const id = setTimeout(cb, ms);
342
+ return () => {
343
+ try {
344
+ clearTimeout(id);
345
+ } catch {
346
+ }
347
+ };
348
+ };
349
+ var makeMessageChannelMacrotask = () => {
350
+ const MC = globalThis.MessageChannel;
351
+ if (typeof MC !== "function") return void 0;
352
+ let channel;
353
+ try {
354
+ channel = new MC();
355
+ } catch {
356
+ return void 0;
357
+ }
358
+ const queue = [];
359
+ let scheduled = false;
360
+ const flush = () => {
361
+ scheduled = false;
362
+ const tasks = queue.splice(0, queue.length);
363
+ for (const t of tasks) {
364
+ if (t.canceled) continue;
365
+ try {
366
+ t.cb();
367
+ } catch {
368
+ }
369
+ }
370
+ };
371
+ try {
372
+ channel.port1.onmessage = flush;
373
+ } catch {
374
+ return void 0;
375
+ }
376
+ const schedule = (cb) => {
377
+ const task = { canceled: false, cb };
378
+ queue.push(task);
379
+ if (!scheduled) {
380
+ scheduled = true;
381
+ try {
382
+ channel.port2.postMessage(void 0);
383
+ } catch {
384
+ scheduled = false;
385
+ return safeSetTimeout(0, cb);
386
+ }
387
+ }
388
+ return () => {
389
+ task.canceled = true;
390
+ };
391
+ };
392
+ return schedule;
393
+ };
394
+ var makeSetImmediateMacrotask = () => {
395
+ const si = globalThis.setImmediate;
396
+ const ci = globalThis.clearImmediate;
397
+ if (typeof si !== "function") return void 0;
398
+ return (cb) => {
399
+ let id;
400
+ try {
401
+ id = si(cb);
402
+ } catch {
403
+ return safeSetTimeout(0, cb);
404
+ }
405
+ return () => {
406
+ if (typeof ci !== "function") return;
407
+ try {
408
+ ci(id);
409
+ } catch {
410
+ }
411
+ };
412
+ };
413
+ };
414
+ var makeRaf = () => {
415
+ const raf = globalThis.requestAnimationFrame;
416
+ const cancel = globalThis.cancelAnimationFrame;
417
+ if (typeof raf !== "function") return void 0;
418
+ return (cb) => {
419
+ let id;
420
+ try {
421
+ id = raf(cb);
422
+ } catch {
423
+ return noopCancel;
424
+ }
425
+ return () => {
426
+ if (typeof cancel !== "function") return;
427
+ try {
428
+ cancel(id);
429
+ } catch {
430
+ }
431
+ };
432
+ };
433
+ };
434
+ var makeDefaultHostScheduler = () => {
435
+ const macrotask = makeSetImmediateMacrotask() ?? makeMessageChannelMacrotask() ?? ((cb) => safeSetTimeout(0, cb));
436
+ const raf = makeRaf();
437
+ return {
438
+ nowMs: safeNowMs,
439
+ scheduleMicrotask: safeQueueMicrotask,
440
+ scheduleMacrotask: macrotask,
441
+ scheduleAnimationFrame: (cb) => raf?.(cb) ?? macrotask(cb),
442
+ scheduleTimeout: safeSetTimeout
443
+ };
444
+ };
445
+ var globalHostScheduler;
446
+ var getGlobalHostScheduler = () => {
447
+ globalHostScheduler ?? (globalHostScheduler = makeDefaultHostScheduler());
448
+ return globalHostScheduler;
449
+ };
450
+
451
+ // src/internal/runtime/core/DevtoolsHub.ts
310
452
  var lastRunTs = 0;
311
453
  var lastRunTsSeq = 0;
312
454
  var nextRunId = () => {
@@ -326,32 +468,338 @@ var import_effect5 = require("effect");
326
468
  var currentConvergeStaticIrCollectors = import_effect5.FiberRef.unsafeMake([]);
327
469
 
328
470
  // src/internal/runtime/core/env.ts
471
+ var import_effect9 = require("effect");
472
+
473
+ // src/internal/runtime/core/RuntimeStore.ts
474
+ var parseTopicKey = (topicKey) => {
475
+ const idx = topicKey.indexOf("::");
476
+ if (idx <= 0) return void 0;
477
+ const moduleId = topicKey.slice(0, idx);
478
+ const rest = topicKey.slice(idx + 2);
479
+ if (rest.length === 0) return void 0;
480
+ const idx2 = rest.indexOf("::");
481
+ if (idx2 < 0) {
482
+ return { kind: "module", moduleInstanceKey: `${moduleId}::${rest}` };
483
+ }
484
+ const instanceId = rest.slice(0, idx2);
485
+ const suffix = rest.slice(idx2 + 2);
486
+ if (suffix.startsWith("rq:")) {
487
+ const selectorId = suffix.slice("rq:".length);
488
+ if (selectorId.length === 0) return void 0;
489
+ return {
490
+ kind: "readQuery",
491
+ moduleInstanceKey: `${moduleId}::${instanceId}`,
492
+ selectorId
493
+ };
494
+ }
495
+ return { kind: "module", moduleInstanceKey: `${moduleId}::${instanceId}` };
496
+ };
497
+ var makeRuntimeStore = () => {
498
+ let tickSeq = 0;
499
+ const moduleStates = /* @__PURE__ */ new Map();
500
+ const topicVersions = /* @__PURE__ */ new Map();
501
+ const topicPriorities = /* @__PURE__ */ new Map();
502
+ const listenersByTopic = /* @__PURE__ */ new Map();
503
+ const subscriberCountByModule = /* @__PURE__ */ new Map();
504
+ const getTopicVersion = (topicKey) => topicVersions.get(topicKey) ?? 0;
505
+ const getTopicPriority = (topicKey) => topicPriorities.get(topicKey) ?? "normal";
506
+ const commitTopicBump = (topicKey, priority) => {
507
+ const prev = topicVersions.get(topicKey) ?? 0;
508
+ topicVersions.set(topicKey, prev + 1);
509
+ topicPriorities.set(topicKey, priority);
510
+ };
511
+ const subscribeTopic = (topicKey, listener) => {
512
+ const info = parseTopicKey(topicKey);
513
+ const existing = listenersByTopic.get(topicKey);
514
+ const set = existing ?? /* @__PURE__ */ new Set();
515
+ const alreadyHas = set.has(listener);
516
+ if (!alreadyHas) {
517
+ set.add(listener);
518
+ }
519
+ if (!existing) {
520
+ listenersByTopic.set(topicKey, set);
521
+ }
522
+ if (!alreadyHas && info) {
523
+ const prev = subscriberCountByModule.get(info.moduleInstanceKey) ?? 0;
524
+ subscriberCountByModule.set(info.moduleInstanceKey, prev + 1);
525
+ }
526
+ return () => {
527
+ const current = listenersByTopic.get(topicKey);
528
+ if (!current) return;
529
+ const deleted = current.delete(listener);
530
+ if (deleted && info) {
531
+ const prev = subscriberCountByModule.get(info.moduleInstanceKey) ?? 0;
532
+ const next = prev - 1;
533
+ if (next <= 0) {
534
+ subscriberCountByModule.delete(info.moduleInstanceKey);
535
+ } else {
536
+ subscriberCountByModule.set(info.moduleInstanceKey, next);
537
+ }
538
+ }
539
+ if (current.size === 0) {
540
+ listenersByTopic.delete(topicKey);
541
+ }
542
+ };
543
+ };
544
+ const getTopicSubscriberCount = (topicKey) => listenersByTopic.get(topicKey)?.size ?? 0;
545
+ const getModuleSubscriberCount = (moduleInstanceKey) => subscriberCountByModule.get(moduleInstanceKey) ?? 0;
546
+ const registerModuleInstance = (args) => {
547
+ moduleStates.set(args.moduleInstanceKey, args.initialState);
548
+ if (!topicVersions.has(args.moduleInstanceKey)) {
549
+ topicVersions.set(args.moduleInstanceKey, 0);
550
+ topicPriorities.set(args.moduleInstanceKey, "normal");
551
+ }
552
+ };
553
+ const unregisterModuleInstance = (moduleInstanceKey) => {
554
+ moduleStates.delete(moduleInstanceKey);
555
+ };
556
+ const commitTick = (args) => {
557
+ tickSeq = args.tickSeq;
558
+ for (const [key, commit] of args.accepted.modules) {
559
+ moduleStates.set(key, commit.state);
560
+ }
561
+ const changedTopics = /* @__PURE__ */ new Map();
562
+ for (const [topicKey, priority] of args.accepted.dirtyTopics) {
563
+ commitTopicBump(topicKey, priority);
564
+ const listeners = Array.from(listenersByTopic.get(topicKey) ?? []);
565
+ if (listeners.length > 0) {
566
+ changedTopics.set(topicKey, { priority, listeners });
567
+ }
568
+ }
569
+ return { changedTopics };
570
+ };
571
+ const getModuleState = (moduleInstanceKey) => moduleStates.get(moduleInstanceKey);
572
+ const dispose = () => {
573
+ moduleStates.clear();
574
+ topicVersions.clear();
575
+ topicPriorities.clear();
576
+ listenersByTopic.clear();
577
+ subscriberCountByModule.clear();
578
+ };
579
+ return {
580
+ getTickSeq: () => tickSeq,
581
+ getModuleState,
582
+ getTopicVersion,
583
+ getTopicPriority,
584
+ subscribeTopic,
585
+ getTopicSubscriberCount,
586
+ getModuleSubscriberCount,
587
+ registerModuleInstance,
588
+ unregisterModuleInstance,
589
+ commitTick,
590
+ dispose
591
+ };
592
+ };
593
+
594
+ // src/internal/runtime/core/TickScheduler.ts
595
+ var import_effect7 = require("effect");
596
+
597
+ // src/internal/runtime/core/TaskRunner.ts
329
598
  var import_effect6 = require("effect");
330
- var StateTransactionConfigTagImpl = class extends import_effect6.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
599
+ var inSyncTransactionFiber = import_effect6.FiberRef.unsafeMake(false);
600
+ var forceSourceRefresh = import_effect6.FiberRef.unsafeMake(false);
601
+
602
+ // src/internal/runtime/core/DeclarativeLinkRuntime.ts
603
+ var import_effect8 = require("effect");
604
+ var makeDeclarativeLinkRuntime = () => {
605
+ const moduleAsSourceById = /* @__PURE__ */ new Map();
606
+ const moduleAsSourceIdsBySource = /* @__PURE__ */ new Map();
607
+ const declarativeById = /* @__PURE__ */ new Map();
608
+ const declarativeReadNodesBySource = /* @__PURE__ */ new Map();
609
+ const registerModuleAsSourceLink = (link) => {
610
+ const stored = {
611
+ ...link,
612
+ hasValue: false,
613
+ lastValue: void 0
614
+ };
615
+ moduleAsSourceById.set(link.id, stored);
616
+ const set = moduleAsSourceIdsBySource.get(link.sourceModuleInstanceKey) ?? /* @__PURE__ */ new Set();
617
+ set.add(link.id);
618
+ moduleAsSourceIdsBySource.set(link.sourceModuleInstanceKey, set);
619
+ return () => {
620
+ moduleAsSourceById.delete(link.id);
621
+ const current = moduleAsSourceIdsBySource.get(link.sourceModuleInstanceKey);
622
+ if (!current) return;
623
+ current.delete(link.id);
624
+ if (current.size === 0) {
625
+ moduleAsSourceIdsBySource.delete(link.sourceModuleInstanceKey);
626
+ }
627
+ };
628
+ };
629
+ const registerDeclarativeLink = (link) => {
630
+ const readNodeById = /* @__PURE__ */ new Map();
631
+ for (const n of link.readNodes) {
632
+ readNodeById.set(n.nodeId, n);
633
+ }
634
+ const dispatchNodeById = /* @__PURE__ */ new Map();
635
+ for (const n of link.dispatchNodes) {
636
+ dispatchNodeById.set(n.nodeId, n);
637
+ }
638
+ const incomingByDispatch = /* @__PURE__ */ new Map();
639
+ for (const e of link.ir.edges) {
640
+ const to = e.to;
641
+ const isDispatch = dispatchNodeById.has(to);
642
+ if (!isDispatch) continue;
643
+ incomingByDispatch.set(to, (incomingByDispatch.get(to) ?? 0) + 1);
644
+ const count = incomingByDispatch.get(to) ?? 0;
645
+ if (count > 1) {
646
+ throw new Error(
647
+ `[DeclarativeLinkRuntime] Invalid DeclarativeLinkIR: dispatch node has multiple incoming edges (linkId=${link.linkId}, nodeId=${to}).`
648
+ );
649
+ }
650
+ }
651
+ const dispatchTargetsByReadNode = /* @__PURE__ */ new Map();
652
+ for (const e of link.ir.edges) {
653
+ const from = e.from;
654
+ const to = e.to;
655
+ if (!readNodeById.has(from)) continue;
656
+ if (!dispatchNodeById.has(to)) continue;
657
+ const list = dispatchTargetsByReadNode.get(from) ?? [];
658
+ list.push(to);
659
+ dispatchTargetsByReadNode.set(from, list);
660
+ }
661
+ const stored = {
662
+ ...link,
663
+ readNodeById,
664
+ dispatchNodeById,
665
+ dispatchTargetsByReadNode,
666
+ readNodeState: /* @__PURE__ */ new Map()
667
+ };
668
+ declarativeById.set(link.linkId, stored);
669
+ for (const n of link.readNodes) {
670
+ const list = declarativeReadNodesBySource.get(n.moduleInstanceKey) ?? [];
671
+ list.push({ linkId: link.linkId, nodeId: n.nodeId });
672
+ declarativeReadNodesBySource.set(n.moduleInstanceKey, list);
673
+ }
674
+ return () => {
675
+ declarativeById.delete(link.linkId);
676
+ for (const n of link.readNodes) {
677
+ const list = declarativeReadNodesBySource.get(n.moduleInstanceKey);
678
+ if (!list) continue;
679
+ const next = list.filter((x) => !(x.linkId === link.linkId && x.nodeId === n.nodeId));
680
+ if (next.length === 0) {
681
+ declarativeReadNodesBySource.delete(n.moduleInstanceKey);
682
+ } else {
683
+ declarativeReadNodesBySource.set(n.moduleInstanceKey, next);
684
+ }
685
+ }
686
+ };
687
+ };
688
+ const applyForSources = (args) => import_effect8.Effect.gen(function* () {
689
+ let scheduled = false;
690
+ for (const sourceKey of args.changedModuleInstanceKeys) {
691
+ const ids = moduleAsSourceIdsBySource.get(sourceKey);
692
+ if (!ids || ids.size === 0) continue;
693
+ const commit = args.acceptedModules.get(sourceKey);
694
+ if (!commit) continue;
695
+ for (const id of ids) {
696
+ const link = moduleAsSourceById.get(id);
697
+ if (!link) continue;
698
+ let selected;
699
+ try {
700
+ selected = link.readQuery.select(commit.state);
701
+ } catch {
702
+ continue;
703
+ }
704
+ const nextValue = link.computeValue(selected);
705
+ if (link.hasValue && link.equalsValue(link.lastValue, nextValue)) {
706
+ continue;
707
+ }
708
+ link.hasValue = true;
709
+ link.lastValue = nextValue;
710
+ scheduled = true;
711
+ yield* link.applyValue(nextValue);
712
+ }
713
+ }
714
+ for (const sourceKey of args.changedModuleInstanceKeys) {
715
+ const refs = declarativeReadNodesBySource.get(sourceKey);
716
+ if (!refs || refs.length === 0) continue;
717
+ const commit = args.acceptedModules.get(sourceKey);
718
+ if (!commit) continue;
719
+ for (const ref of refs) {
720
+ const link = declarativeById.get(ref.linkId);
721
+ if (!link) continue;
722
+ const readNode = link.readNodeById.get(ref.nodeId);
723
+ if (!readNode) continue;
724
+ let value;
725
+ try {
726
+ value = readNode.readQuery.select(commit.state);
727
+ } catch {
728
+ continue;
729
+ }
730
+ const state = link.readNodeState.get(ref.nodeId) ?? { hasValue: false, lastValue: void 0 };
731
+ const changed = !state.hasValue || !Object.is(state.lastValue, value);
732
+ if (!changed) continue;
733
+ state.hasValue = true;
734
+ state.lastValue = value;
735
+ link.readNodeState.set(ref.nodeId, state);
736
+ const targets = link.dispatchTargetsByReadNode.get(ref.nodeId) ?? [];
737
+ for (const dispatchNodeId of targets) {
738
+ const node = link.dispatchNodeById.get(dispatchNodeId);
739
+ if (!node) continue;
740
+ scheduled = true;
741
+ yield* node.dispatch(value);
742
+ }
743
+ }
744
+ }
745
+ return { scheduled };
746
+ });
747
+ return {
748
+ registerModuleAsSourceLink,
749
+ registerDeclarativeLink,
750
+ applyForSources
751
+ };
752
+ };
753
+
754
+ // src/internal/runtime/core/env.ts
755
+ var StateTransactionConfigTagImpl = class extends import_effect9.Context.Tag("@logixjs/core/StateTransactionRuntimeConfig")() {
331
756
  };
332
- var ReadQueryStrictGateConfigTagImpl = class extends import_effect6.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
757
+ var ReadQueryStrictGateConfigTagImpl = class extends import_effect9.Context.Tag("@logixjs/core/ReadQueryStrictGateRuntimeConfig")() {
333
758
  };
334
- var ReplayModeConfigTagImpl = class extends import_effect6.Context.Tag("@logixjs/core/ReplayModeConfig")() {
759
+ var ReplayModeConfigTagImpl = class extends import_effect9.Context.Tag("@logixjs/core/ReplayModeConfig")() {
335
760
  };
336
- var StateTransactionOverridesTagImpl = class extends import_effect6.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
761
+ var StateTransactionOverridesTagImpl = class extends import_effect9.Context.Tag("@logixjs/core/StateTransactionOverrides")() {
337
762
  };
338
- var ConcurrencyPolicyTagImpl = class extends import_effect6.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
763
+ var ConcurrencyPolicyTagImpl = class extends import_effect9.Context.Tag("@logixjs/core/ConcurrencyPolicy")() {
339
764
  };
340
- var ConcurrencyPolicyOverridesTagImpl = class extends import_effect6.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
765
+ var ConcurrencyPolicyOverridesTagImpl = class extends import_effect9.Context.Tag("@logixjs/core/ConcurrencyPolicyOverrides")() {
766
+ };
767
+ var RuntimeStoreTag = class extends import_effect9.Context.Tag("@logixjs/core/RuntimeStore")() {
768
+ };
769
+ var runtimeStoreLayer = import_effect9.Layer.scoped(
770
+ RuntimeStoreTag,
771
+ import_effect9.Effect.acquireRelease(
772
+ import_effect9.Effect.sync(() => makeRuntimeStore()),
773
+ (store) => import_effect9.Effect.sync(() => store.dispose())
774
+ )
775
+ );
776
+ var HostSchedulerTag = class extends import_effect9.Context.Tag("@logixjs/core/HostScheduler")() {
777
+ };
778
+ var hostSchedulerLayer = import_effect9.Layer.succeed(
779
+ HostSchedulerTag,
780
+ getGlobalHostScheduler()
781
+ );
782
+ var DeclarativeLinkRuntimeTag = class extends import_effect9.Context.Tag("@logixjs/core/DeclarativeLinkRuntime")() {
783
+ };
784
+ var declarativeLinkRuntimeLayer = import_effect9.Layer.succeed(
785
+ DeclarativeLinkRuntimeTag,
786
+ makeDeclarativeLinkRuntime()
787
+ );
788
+ var TickSchedulerTag = class extends import_effect9.Context.Tag("@logixjs/core/TickScheduler")() {
341
789
  };
342
790
 
343
791
  // src/Debug.ts
344
792
  var record2 = record;
345
793
 
346
794
  // src/Middleware.ts
347
- var makeDebugLogger = (config) => (op) => import_effect8.Effect.gen(function* () {
795
+ var makeDebugLogger = (config) => (op) => import_effect11.Effect.gen(function* () {
348
796
  if (op.meta?.policy?.disableObservers) {
349
797
  return yield* op.effect;
350
798
  }
351
799
  if (config?.logger) {
352
800
  config.logger(op);
353
801
  } else {
354
- yield* import_effect8.Effect.logDebug(`[EffectOp] kind=${op.kind} name=${op.name}`);
802
+ yield* import_effect11.Effect.logDebug(`[EffectOp] kind=${op.kind} name=${op.name}`);
355
803
  }
356
804
  return yield* op.effect;
357
805
  });
@@ -359,7 +807,7 @@ var applyDebug = (stack, config) => [
359
807
  ...stack,
360
808
  makeDebugLogger(config)
361
809
  ];
362
- var makeDebugObserver = (config) => (op) => import_effect8.Effect.gen(function* () {
810
+ var makeDebugObserver = (config) => (op) => import_effect11.Effect.gen(function* () {
363
811
  if (op.meta?.policy?.disableObservers) {
364
812
  return yield* op.effect;
365
813
  }