@logixjs/core 0.0.1 → 1.0.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 (398) hide show
  1. package/LICENSE +201 -0
  2. package/dist/{Action-mqVvtEHt.d.ts → Action-DYl88bwj.d.ts} +1 -1
  3. package/dist/{Action-BkRHy2vg.d.cts → Action-DkxsI_DK.d.cts} +1 -1
  4. package/dist/Action.cjs.map +1 -1
  5. package/dist/Action.d.cts +1 -1
  6. package/dist/Action.d.ts +1 -1
  7. package/dist/Action.js +2 -2
  8. package/dist/{Actions-AsQ07yTP.d.cts → Actions-Dicm7jdc.d.cts} +2 -2
  9. package/dist/{Actions-AsQ07yTP.d.ts → Actions-Dicm7jdc.d.ts} +2 -2
  10. package/dist/Actions.cjs.map +1 -1
  11. package/dist/Actions.d.cts +1 -1
  12. package/dist/Actions.d.ts +1 -1
  13. package/dist/Actions.js +1 -1
  14. package/dist/{Bound-BN1DQ_lM.d.ts → Bound-1OJLzVIS.d.ts} +2 -2
  15. package/dist/{Bound-BPIfH9SS.d.cts → Bound-BMLrtQ1V.d.cts} +2 -2
  16. package/dist/Bound.cjs +1737 -399
  17. package/dist/Bound.cjs.map +1 -1
  18. package/dist/Bound.d.cts +5 -5
  19. package/dist/Bound.d.ts +5 -5
  20. package/dist/Bound.js +19 -17
  21. package/dist/{Debug-B5q5Bkzx.d.ts → Debug-DKrWP5H1.d.ts} +40 -22
  22. package/dist/{Debug-Bq8Sqjcr.d.cts → Debug-hIT44XsY.d.cts} +40 -22
  23. package/dist/Debug.cjs +1348 -318
  24. package/dist/Debug.cjs.map +1 -1
  25. package/dist/Debug.d.cts +12 -11
  26. package/dist/Debug.d.ts +12 -11
  27. package/dist/Debug.js +20 -11
  28. package/dist/EffectOp.cjs +15 -6
  29. package/dist/EffectOp.cjs.map +1 -1
  30. package/dist/EffectOp.js +3 -3
  31. package/dist/Env.cjs +772 -6
  32. package/dist/Env.cjs.map +1 -1
  33. package/dist/Env.js +5 -2
  34. package/dist/ExternalStore-DqJKKRJ4.d.ts +61 -0
  35. package/dist/ExternalStore-JC-gAgEI.d.cts +61 -0
  36. package/dist/ExternalStore.cjs +774 -0
  37. package/dist/ExternalStore.cjs.map +1 -0
  38. package/dist/ExternalStore.d.cts +8 -0
  39. package/dist/ExternalStore.d.ts +8 -0
  40. package/dist/ExternalStore.js +19 -0
  41. package/dist/ExternalStore.js.map +1 -0
  42. package/dist/{Flow-BhpjE22E.d.ts → Flow-CZmXRDqp.d.cts} +13 -4
  43. package/dist/{Flow-1fZT8MpX.d.cts → Flow-DIVDxz7R.d.ts} +13 -4
  44. package/dist/Flow.cjs +765 -148
  45. package/dist/Flow.cjs.map +1 -1
  46. package/dist/Flow.d.cts +6 -6
  47. package/dist/Flow.d.ts +6 -6
  48. package/dist/Flow.js +9 -8
  49. package/dist/{Handle-D_cLW1Z3.d.ts → Handle-Bo6cAFut.d.ts} +1 -1
  50. package/dist/{Handle-D8D1zPb_.d.cts → Handle-CfDvSqN7.d.cts} +1 -1
  51. package/dist/Handle.d.cts +5 -5
  52. package/dist/Handle.d.ts +5 -5
  53. package/dist/{Kernel-8kC-jOda.d.cts → Kernel-CuXBF9S_.d.cts} +16 -7
  54. package/dist/{Kernel-CnGE1Fyk.d.ts → Kernel-D9guNwRL.d.ts} +16 -7
  55. package/dist/Kernel.cjs +814 -26
  56. package/dist/Kernel.cjs.map +1 -1
  57. package/dist/Kernel.d.cts +13 -12
  58. package/dist/Kernel.d.ts +13 -12
  59. package/dist/Kernel.js +7 -4
  60. package/dist/{Link-Db7975nU.d.ts → Link-CUM0yUCH.d.ts} +10 -3
  61. package/dist/{Link-fX8x1eCK.d.cts → Link-NAfR6uGD.d.cts} +10 -3
  62. package/dist/Link.cjs +1294 -121
  63. package/dist/Link.cjs.map +1 -1
  64. package/dist/Link.d.cts +5 -5
  65. package/dist/Link.d.ts +5 -5
  66. package/dist/Link.js +37 -29
  67. package/dist/{Logic-DRh4sDZj.d.cts → Logic-09VQpIj3.d.cts} +7 -4
  68. package/dist/{Logic-BRjEMr-W.d.ts → Logic-DKg7ghGy.d.ts} +7 -4
  69. package/dist/Logic.cjs +2 -1
  70. package/dist/Logic.cjs.map +1 -1
  71. package/dist/Logic.d.cts +5 -5
  72. package/dist/Logic.d.ts +5 -5
  73. package/dist/Logic.js +1 -1
  74. package/dist/{MatchBuilder-CJk5oCkR.d.cts → MatchBuilder-CsW5jgrL.d.ts} +1 -1
  75. package/dist/{MatchBuilder-0QOc-nlU.d.ts → MatchBuilder-Dksk07F4.d.cts} +1 -1
  76. package/dist/MatchBuilder.cjs +2 -2
  77. package/dist/MatchBuilder.cjs.map +1 -1
  78. package/dist/MatchBuilder.d.cts +6 -6
  79. package/dist/MatchBuilder.d.ts +6 -6
  80. package/dist/MatchBuilder.js +2 -2
  81. package/dist/Middleware-D8tUDLv_.d.cts +100 -0
  82. package/dist/Middleware-DS7CbTTN.d.ts +100 -0
  83. package/dist/Middleware.cjs +678 -58
  84. package/dist/Middleware.cjs.map +1 -1
  85. package/dist/Middleware.d.cts +2 -86
  86. package/dist/Middleware.d.ts +2 -86
  87. package/dist/Middleware.js +15 -12
  88. package/dist/{Module-DnzluX2J.d.ts → Module-B_Cntyms.d.ts} +54 -25
  89. package/dist/{Module-B_0xRDMR.d.cts → Module-CmNOVXzf.d.cts} +54 -25
  90. package/dist/Module.cjs +9331 -3317
  91. package/dist/Module.cjs.map +1 -1
  92. package/dist/Module.d.cts +7 -6
  93. package/dist/Module.d.ts +7 -6
  94. package/dist/Module.js +39 -31
  95. package/dist/ModuleTag-CGho_InD.d.ts +113 -0
  96. package/dist/ModuleTag-CITb8L_G.d.cts +113 -0
  97. package/dist/ModuleTag.cjs +7248 -2847
  98. package/dist/ModuleTag.cjs.map +1 -1
  99. package/dist/ModuleTag.d.cts +6 -6
  100. package/dist/ModuleTag.d.ts +6 -6
  101. package/dist/ModuleTag.js +35 -29
  102. package/dist/Observability-Bdhnx2Dv.d.ts +385 -0
  103. package/dist/Observability-DXGAFBIT.d.cts +385 -0
  104. package/dist/Observability.cjs +5093 -1556
  105. package/dist/Observability.cjs.map +1 -1
  106. package/dist/Observability.d.cts +6 -7
  107. package/dist/Observability.d.ts +6 -7
  108. package/dist/Observability.js +28 -23
  109. package/dist/{Platform-CHX8o-U4.d.ts → Platform-B4s8tg6C.d.cts} +4 -5
  110. package/dist/{Platform-C49Pv956.d.cts → Platform-BV_0MW7g.d.cts} +5 -2
  111. package/dist/{Platform-C49Pv956.d.ts → Platform-BV_0MW7g.d.ts} +5 -2
  112. package/dist/{Platform-CVlv0xLQ.d.cts → Platform-W0Mefy_e.d.ts} +4 -5
  113. package/dist/Platform.cjs +2 -1
  114. package/dist/Platform.cjs.map +1 -1
  115. package/dist/Platform.d.cts +2 -3
  116. package/dist/Platform.d.ts +2 -3
  117. package/dist/Platform.js +2 -2
  118. package/dist/{Process-CM9xbMdP.d.ts → Process-CO8G7HO9.d.cts} +30 -5
  119. package/dist/{Process-mL8fHDSB.d.cts → Process-Cyf6VNDR.d.ts} +30 -5
  120. package/dist/Process.cjs +1288 -120
  121. package/dist/Process.cjs.map +1 -1
  122. package/dist/Process.d.cts +6 -6
  123. package/dist/Process.d.ts +6 -6
  124. package/dist/Process.js +34 -26
  125. package/dist/ReadQuery-C_or5nLC.d.ts +128 -0
  126. package/dist/ReadQuery-DXLzCE0E.d.cts +614 -0
  127. package/dist/ReadQuery-DXLzCE0E.d.ts +614 -0
  128. package/dist/ReadQuery-Yve1lmUo.d.cts +128 -0
  129. package/dist/ReadQuery.cjs +290 -5
  130. package/dist/ReadQuery.cjs.map +1 -1
  131. package/dist/ReadQuery.d.cts +3 -2
  132. package/dist/ReadQuery.d.ts +3 -2
  133. package/dist/ReadQuery.js +23 -5
  134. package/dist/{Reflection-CQnKwPXj.d.ts → Reflection-B2Xi1e4Q.d.ts} +89 -7
  135. package/dist/{Reflection-Kabo1mlU.d.cts → Reflection-DNB4V4_e.d.cts} +89 -7
  136. package/dist/Reflection.cjs +3227 -1617
  137. package/dist/Reflection.cjs.map +1 -1
  138. package/dist/Reflection.d.cts +17 -15
  139. package/dist/Reflection.d.ts +17 -15
  140. package/dist/Reflection.js +33 -25
  141. package/dist/{Resource-Dy1xD_DG.d.cts → Resource-pKvQQ4x5.d.cts} +3 -3
  142. package/dist/{Resource-Dy1xD_DG.d.ts → Resource-pKvQQ4x5.d.ts} +3 -3
  143. package/dist/Resource.cjs +781 -15
  144. package/dist/Resource.cjs.map +1 -1
  145. package/dist/Resource.d.cts +1 -1
  146. package/dist/Resource.d.ts +1 -1
  147. package/dist/Resource.js +6 -3
  148. package/dist/{Root-7ADUMk4t.d.cts → Root-CCVuFHB6.d.cts} +3 -3
  149. package/dist/{Root-7ADUMk4t.d.ts → Root-CCVuFHB6.d.ts} +3 -3
  150. package/dist/Root.cjs +786 -20
  151. package/dist/Root.cjs.map +1 -1
  152. package/dist/Root.d.cts +2 -2
  153. package/dist/Root.d.ts +2 -2
  154. package/dist/Root.js +7 -3
  155. package/dist/{Runtime-CtyzZG4i.d.ts → Runtime-CRmvwK4I.d.ts} +70 -14
  156. package/dist/{Runtime-B-aL-f29.d.cts → Runtime-C_wJM9mN.d.cts} +70 -14
  157. package/dist/Runtime.cjs +4942 -1601
  158. package/dist/Runtime.cjs.map +1 -1
  159. package/dist/Runtime.d.cts +17 -15
  160. package/dist/Runtime.d.ts +17 -15
  161. package/dist/Runtime.js +44 -32
  162. package/dist/{ScopeRegistry-D1owDNSm.d.cts → ScopeRegistry-BhYzqWri.d.cts} +6 -6
  163. package/dist/{ScopeRegistry-D1owDNSm.d.ts → ScopeRegistry-BhYzqWri.d.ts} +6 -6
  164. package/dist/ScopeRegistry.cjs +776 -10
  165. package/dist/ScopeRegistry.cjs.map +1 -1
  166. package/dist/ScopeRegistry.d.cts +1 -1
  167. package/dist/ScopeRegistry.d.ts +1 -1
  168. package/dist/ScopeRegistry.js +6 -3
  169. package/dist/{State-CU50R26M.d.cts → State-rNFsFPTl.d.cts} +2 -2
  170. package/dist/{State-CU50R26M.d.ts → State-rNFsFPTl.d.ts} +2 -2
  171. package/dist/State.cjs.map +1 -1
  172. package/dist/State.d.cts +1 -1
  173. package/dist/State.d.ts +1 -1
  174. package/dist/State.js +1 -1
  175. package/dist/{StateTrait-BGsZghTz.d.ts → StateTrait-CijdwNb6.d.ts} +25 -8
  176. package/dist/{StateTrait-OWhbj12c.d.cts → StateTrait-Dltto6PU.d.cts} +25 -8
  177. package/dist/StateTrait.cjs +1890 -528
  178. package/dist/StateTrait.cjs.map +1 -1
  179. package/dist/StateTrait.d.cts +9 -7
  180. package/dist/StateTrait.d.ts +9 -7
  181. package/dist/StateTrait.js +18 -14
  182. package/dist/{TraitLifecycle-CwV5WPFX.d.cts → TraitLifecycle-BKzDqzLu.d.cts} +2 -2
  183. package/dist/{TraitLifecycle-LdIWmKlg.d.ts → TraitLifecycle-Cvo94uDB.d.ts} +2 -2
  184. package/dist/TraitLifecycle.cjs +630 -67
  185. package/dist/TraitLifecycle.cjs.map +1 -1
  186. package/dist/TraitLifecycle.d.cts +6 -6
  187. package/dist/TraitLifecycle.d.ts +6 -6
  188. package/dist/TraitLifecycle.js +8 -7
  189. package/dist/Workflow-C_OWr4dV.d.ts +415 -0
  190. package/dist/Workflow-DmydkHO8.d.cts +415 -0
  191. package/dist/Workflow.cjs +3150 -0
  192. package/dist/Workflow.cjs.map +1 -0
  193. package/dist/Workflow.d.cts +7 -0
  194. package/dist/Workflow.d.ts +7 -0
  195. package/dist/Workflow.js +58 -0
  196. package/dist/Workflow.js.map +1 -0
  197. package/dist/{action-DiMDD_0v.d.cts → action-BQxjPFEw.d.cts} +5 -5
  198. package/dist/{action-DiMDD_0v.d.ts → action-BQxjPFEw.d.ts} +5 -5
  199. package/dist/chunk-2XRLXDWR.js +276 -0
  200. package/dist/chunk-2XRLXDWR.js.map +1 -0
  201. package/dist/chunk-3L6QGFMM.js +701 -0
  202. package/dist/chunk-3L6QGFMM.js.map +1 -0
  203. package/dist/{chunk-GMPEOUP2.js → chunk-4MZ7BT3R.js} +2 -2
  204. package/dist/chunk-4MZ7BT3R.js.map +1 -0
  205. package/dist/{chunk-3IYZ5IGG.js → chunk-5WKUGEBY.js} +2 -2
  206. package/dist/{chunk-3RMKLXHX.js → chunk-63ZQ5RIN.js} +2 -2
  207. package/dist/{chunk-M3WTHJHJ.js → chunk-67DIEA53.js} +385 -148
  208. package/dist/chunk-67DIEA53.js.map +1 -0
  209. package/dist/{chunk-YS3AZQ2G.js → chunk-6HFAW2MH.js} +1 -1
  210. package/dist/chunk-6HFAW2MH.js.map +1 -0
  211. package/dist/{chunk-EY4NZKDR.js → chunk-6Y2TKCNY.js} +2 -2
  212. package/dist/{chunk-76WT3HOR.js → chunk-6YZOXFPQ.js} +25 -24
  213. package/dist/chunk-6YZOXFPQ.js.map +1 -0
  214. package/dist/{chunk-G5ZBFPNU.js → chunk-A2RQOJC7.js} +2 -2
  215. package/dist/{chunk-AUIR5O6W.js → chunk-AFSB6NKM.js} +13 -19
  216. package/dist/chunk-AFSB6NKM.js.map +1 -0
  217. package/dist/{chunk-JCXGZRMU.js → chunk-AO4JEOKD.js} +22 -23
  218. package/dist/chunk-AO4JEOKD.js.map +1 -0
  219. package/dist/{chunk-TAAPQVZN.js → chunk-AYELIQXR.js} +2 -2
  220. package/dist/{chunk-QMM6O4CD.js → chunk-BLHZW7DG.js} +15 -3
  221. package/dist/{chunk-QMM6O4CD.js.map → chunk-BLHZW7DG.js.map} +1 -1
  222. package/dist/{chunk-TQOBJYDP.js → chunk-CD4N74YC.js} +1 -1
  223. package/dist/chunk-CD4N74YC.js.map +1 -0
  224. package/dist/{chunk-ANLBCBDC.js → chunk-CGE2HBTH.js} +11 -11
  225. package/dist/chunk-CGE2HBTH.js.map +1 -0
  226. package/dist/{chunk-OFADUJWJ.js → chunk-CYYSQMLO.js} +5 -5
  227. package/dist/chunk-CYYSQMLO.js.map +1 -0
  228. package/dist/{chunk-66ALHVEX.js → chunk-EB46EYI7.js} +3 -3
  229. package/dist/{chunk-NZJKFF45.js → chunk-EKCDHWRK.js} +4 -4
  230. package/dist/chunk-EKCDHWRK.js.map +1 -0
  231. package/dist/{chunk-BABLDP24.js → chunk-EPQFNJU3.js} +152 -7
  232. package/dist/chunk-EPQFNJU3.js.map +1 -0
  233. package/dist/{chunk-OGWBVHB3.js → chunk-ESR6HGOY.js} +73 -14
  234. package/dist/chunk-ESR6HGOY.js.map +1 -0
  235. package/dist/{chunk-NBD3KUOZ.js → chunk-F6RP62H3.js} +150 -98
  236. package/dist/chunk-F6RP62H3.js.map +1 -0
  237. package/dist/chunk-FBYW3QDI.js +252 -0
  238. package/dist/chunk-FBYW3QDI.js.map +1 -0
  239. package/dist/{chunk-IPF7E66P.js → chunk-FYAODKVP.js} +2 -2
  240. package/dist/chunk-GNEN7NKO.js +908 -0
  241. package/dist/chunk-GNEN7NKO.js.map +1 -0
  242. package/dist/chunk-GWSM4KLB.js +763 -0
  243. package/dist/chunk-GWSM4KLB.js.map +1 -0
  244. package/dist/{chunk-4SO6JMZL.js → chunk-HDMXCUZL.js} +1 -1
  245. package/dist/chunk-HDMXCUZL.js.map +1 -0
  246. package/dist/{chunk-ZFY7U2FR.js → chunk-HJM5Y5NU.js} +43 -3
  247. package/dist/chunk-HJM5Y5NU.js.map +1 -0
  248. package/dist/{chunk-ZGDVUPTM.js → chunk-IOZ3VKPK.js} +129 -68
  249. package/dist/chunk-IOZ3VKPK.js.map +1 -0
  250. package/dist/{chunk-PYOE4VSI.js → chunk-IVXSVHO4.js} +303 -247
  251. package/dist/chunk-IVXSVHO4.js.map +1 -0
  252. package/dist/chunk-J3CWXIPV.js +242 -0
  253. package/dist/chunk-J3CWXIPV.js.map +1 -0
  254. package/dist/chunk-K6JQW266.js +42 -0
  255. package/dist/chunk-K6JQW266.js.map +1 -0
  256. package/dist/chunk-KMZYQF6Q.js +202 -0
  257. package/dist/chunk-KMZYQF6Q.js.map +1 -0
  258. package/dist/{chunk-JWOYLO27.js → chunk-LPPZDFTD.js} +22 -12
  259. package/dist/chunk-LPPZDFTD.js.map +1 -0
  260. package/dist/{chunk-PAYXCY6A.js → chunk-MYB2B5WX.js} +997 -576
  261. package/dist/chunk-MYB2B5WX.js.map +1 -0
  262. package/dist/chunk-MYKNINNN.js +228 -0
  263. package/dist/chunk-MYKNINNN.js.map +1 -0
  264. package/dist/chunk-NSQIRMVF.js +27 -0
  265. package/dist/{chunk-QCHIQWAJ.js.map → chunk-NSQIRMVF.js.map} +1 -1
  266. package/dist/chunk-NUDBM4MM.js +30 -0
  267. package/dist/chunk-NUDBM4MM.js.map +1 -0
  268. package/dist/chunk-NZMWWDAY.js +23 -0
  269. package/dist/chunk-NZMWWDAY.js.map +1 -0
  270. package/dist/{chunk-RNFE3ML2.js → chunk-OCUV2Y25.js} +4 -3
  271. package/dist/chunk-OCUV2Y25.js.map +1 -0
  272. package/dist/chunk-P4ZJOQA7.js +271 -0
  273. package/dist/chunk-P4ZJOQA7.js.map +1 -0
  274. package/dist/chunk-P6C5EZ3D.js +342 -0
  275. package/dist/chunk-P6C5EZ3D.js.map +1 -0
  276. package/dist/{chunk-CW6T36TN.js → chunk-PBD7BJUN.js} +62 -4
  277. package/dist/chunk-PBD7BJUN.js.map +1 -0
  278. package/dist/chunk-PBIUCQY3.js +696 -0
  279. package/dist/chunk-PBIUCQY3.js.map +1 -0
  280. package/dist/chunk-PD6YECQH.js +845 -0
  281. package/dist/chunk-PD6YECQH.js.map +1 -0
  282. package/dist/{chunk-M7IYCTJV.js → chunk-R4LFQGP3.js} +2 -2
  283. package/dist/chunk-RHJIGDUE.js +21 -0
  284. package/dist/chunk-RHJIGDUE.js.map +1 -0
  285. package/dist/{chunk-KP7MUZNX.js → chunk-RLXO27MW.js} +30 -8
  286. package/dist/chunk-RLXO27MW.js.map +1 -0
  287. package/dist/{chunk-DFNM3WX2.js → chunk-S44BEV4B.js} +168 -45
  288. package/dist/chunk-S44BEV4B.js.map +1 -0
  289. package/dist/chunk-S4S5N4BJ.js +1461 -0
  290. package/dist/chunk-S4S5N4BJ.js.map +1 -0
  291. package/dist/{chunk-BZ2SHDN2.js → chunk-SGTRAXXX.js} +3 -3
  292. package/dist/chunk-SGTRAXXX.js.map +1 -0
  293. package/dist/{chunk-M2RGJPXX.js → chunk-SJAE5PB5.js} +3 -3
  294. package/dist/{chunk-JGIWG6SR.js → chunk-SNPNHU3H.js} +3937 -1776
  295. package/dist/chunk-SNPNHU3H.js.map +1 -0
  296. package/dist/{chunk-IHVBV5C2.js → chunk-SOOBFXRR.js} +94 -71
  297. package/dist/chunk-SOOBFXRR.js.map +1 -0
  298. package/dist/{chunk-ZDTRWK5F.js → chunk-TAHFWKS6.js} +2 -2
  299. package/dist/chunk-UEFFTVPY.js +9 -0
  300. package/dist/chunk-UEFFTVPY.js.map +1 -0
  301. package/dist/{chunk-24VULZ7A.js → chunk-UR5BXLBP.js} +3 -3
  302. package/dist/chunk-UR5BXLBP.js.map +1 -0
  303. package/dist/{chunk-DMBALCE2.js → chunk-V2SBGVDO.js} +471 -186
  304. package/dist/chunk-V2SBGVDO.js.map +1 -0
  305. package/dist/chunk-VJLWD47W.js +23 -0
  306. package/dist/chunk-VJLWD47W.js.map +1 -0
  307. package/dist/{chunk-4CQAV7YB.js → chunk-W647DX5Z.js} +2 -2
  308. package/dist/{chunk-THATMZXD.js → chunk-WFIIU3YZ.js} +2 -2
  309. package/dist/{chunk-THATMZXD.js.map → chunk-WFIIU3YZ.js.map} +1 -1
  310. package/dist/chunk-YZDJMAKL.js +82 -0
  311. package/dist/chunk-YZDJMAKL.js.map +1 -0
  312. package/dist/{chunk-3TMODYZV.js → chunk-Z5XH6VHY.js} +5 -5
  313. package/dist/chunk-Z5XH6VHY.js.map +1 -0
  314. package/dist/{chunk-BE3HW4FY.js → chunk-ZBBMZMA6.js} +377 -170
  315. package/dist/chunk-ZBBMZMA6.js.map +1 -0
  316. package/dist/index.cjs +21224 -11714
  317. package/dist/index.cjs.map +1 -1
  318. package/dist/index.d.cts +195 -49
  319. package/dist/index.d.ts +195 -49
  320. package/dist/index.js +150 -74
  321. package/dist/index.js.map +1 -1
  322. package/dist/{ir-BMP7yxJJ.d.cts → ir-BSosEwc8.d.cts} +1 -1
  323. package/dist/{ir-DUOz6H-5.d.ts → ir-D-uqwL_4.d.ts} +1 -1
  324. package/dist/{module-B8CBqIZ_.d.cts → module-Ds4tarcI.d.cts} +230 -140
  325. package/dist/{module-k7m3txak.d.ts → module-Zd1Gn-Nj.d.ts} +230 -140
  326. package/package.json +20 -4
  327. package/dist/ModuleTag-C8FHY_sY.d.ts +0 -93
  328. package/dist/ModuleTag-EGbgBMpZ.d.cts +0 -93
  329. package/dist/Observability-COqEvp2C.d.cts +0 -713
  330. package/dist/Observability-cY4kLn0S.d.ts +0 -713
  331. package/dist/ReadQuery-BlMwhe-F.d.ts +0 -30
  332. package/dist/ReadQuery-CL5XlXts.d.cts +0 -30
  333. package/dist/ReadQuery-SinbStGF.d.cts +0 -38
  334. package/dist/ReadQuery-SinbStGF.d.ts +0 -38
  335. package/dist/chunk-24VULZ7A.js.map +0 -1
  336. package/dist/chunk-3QMIVH35.js +0 -43
  337. package/dist/chunk-3QMIVH35.js.map +0 -1
  338. package/dist/chunk-3TMODYZV.js.map +0 -1
  339. package/dist/chunk-4SO6JMZL.js.map +0 -1
  340. package/dist/chunk-76WT3HOR.js.map +0 -1
  341. package/dist/chunk-ANLBCBDC.js.map +0 -1
  342. package/dist/chunk-AUIR5O6W.js.map +0 -1
  343. package/dist/chunk-BABLDP24.js.map +0 -1
  344. package/dist/chunk-BE3HW4FY.js.map +0 -1
  345. package/dist/chunk-BZ2SHDN2.js.map +0 -1
  346. package/dist/chunk-CW6T36TN.js.map +0 -1
  347. package/dist/chunk-DFNM3WX2.js.map +0 -1
  348. package/dist/chunk-DMBALCE2.js.map +0 -1
  349. package/dist/chunk-EGK3KN7B.js +0 -406
  350. package/dist/chunk-EGK3KN7B.js.map +0 -1
  351. package/dist/chunk-GMPEOUP2.js.map +0 -1
  352. package/dist/chunk-IHVBV5C2.js.map +0 -1
  353. package/dist/chunk-JCXGZRMU.js.map +0 -1
  354. package/dist/chunk-JGIWG6SR.js.map +0 -1
  355. package/dist/chunk-JWOYLO27.js.map +0 -1
  356. package/dist/chunk-KIXAU3GM.js +0 -137
  357. package/dist/chunk-KIXAU3GM.js.map +0 -1
  358. package/dist/chunk-KL5ACTCT.js +0 -8
  359. package/dist/chunk-KL5ACTCT.js.map +0 -1
  360. package/dist/chunk-KP7MUZNX.js.map +0 -1
  361. package/dist/chunk-M3BFQ7HK.js +0 -13
  362. package/dist/chunk-M3BFQ7HK.js.map +0 -1
  363. package/dist/chunk-M3WTHJHJ.js.map +0 -1
  364. package/dist/chunk-NBD3KUOZ.js.map +0 -1
  365. package/dist/chunk-NQZ2OSGR.js +0 -151
  366. package/dist/chunk-NQZ2OSGR.js.map +0 -1
  367. package/dist/chunk-NZJKFF45.js.map +0 -1
  368. package/dist/chunk-OFADUJWJ.js.map +0 -1
  369. package/dist/chunk-OGWBVHB3.js.map +0 -1
  370. package/dist/chunk-PAYXCY6A.js.map +0 -1
  371. package/dist/chunk-PYOE4VSI.js.map +0 -1
  372. package/dist/chunk-QCHIQWAJ.js +0 -21
  373. package/dist/chunk-RNFE3ML2.js.map +0 -1
  374. package/dist/chunk-TKZ7MEIA.js +0 -27
  375. package/dist/chunk-TKZ7MEIA.js.map +0 -1
  376. package/dist/chunk-TQOBJYDP.js.map +0 -1
  377. package/dist/chunk-VZB726PE.js +0 -93
  378. package/dist/chunk-VZB726PE.js.map +0 -1
  379. package/dist/chunk-W3TEWHLO.js +0 -568
  380. package/dist/chunk-W3TEWHLO.js.map +0 -1
  381. package/dist/chunk-YS3AZQ2G.js.map +0 -1
  382. package/dist/chunk-ZFLHVFUC.js +0 -192
  383. package/dist/chunk-ZFLHVFUC.js.map +0 -1
  384. package/dist/chunk-ZFY7U2FR.js.map +0 -1
  385. package/dist/chunk-ZGDVUPTM.js.map +0 -1
  386. package/dist/protocol-g_1897M2.d.cts +0 -127
  387. package/dist/protocol-g_1897M2.d.ts +0 -127
  388. /package/dist/{chunk-3IYZ5IGG.js.map → chunk-5WKUGEBY.js.map} +0 -0
  389. /package/dist/{chunk-3RMKLXHX.js.map → chunk-63ZQ5RIN.js.map} +0 -0
  390. /package/dist/{chunk-EY4NZKDR.js.map → chunk-6Y2TKCNY.js.map} +0 -0
  391. /package/dist/{chunk-G5ZBFPNU.js.map → chunk-A2RQOJC7.js.map} +0 -0
  392. /package/dist/{chunk-TAAPQVZN.js.map → chunk-AYELIQXR.js.map} +0 -0
  393. /package/dist/{chunk-66ALHVEX.js.map → chunk-EB46EYI7.js.map} +0 -0
  394. /package/dist/{chunk-IPF7E66P.js.map → chunk-FYAODKVP.js.map} +0 -0
  395. /package/dist/{chunk-M7IYCTJV.js.map → chunk-R4LFQGP3.js.map} +0 -0
  396. /package/dist/{chunk-M2RGJPXX.js.map → chunk-SJAE5PB5.js.map} +0 -0
  397. /package/dist/{chunk-ZDTRWK5F.js.map → chunk-TAHFWKS6.js.map} +0 -0
  398. /package/dist/{chunk-4CQAV7YB.js.map → chunk-W647DX5Z.js.map} +0 -0
@@ -2,44 +2,44 @@ import {
2
2
  makeApp,
3
3
  makeProgramRunnerKernel,
4
4
  provide
5
- } from "./chunk-EGK3KN7B.js";
5
+ } from "./chunk-PBIUCQY3.js";
6
6
  import {
7
7
  evidenceCollectorLayer,
8
8
  makeEvidenceCollector
9
- } from "./chunk-PAYXCY6A.js";
9
+ } from "./chunk-MYB2B5WX.js";
10
10
  import {
11
11
  RuntimeServicesInstanceOverridesTag,
12
12
  getKernelImplementationRef,
13
13
  getRuntimeServicesEvidence
14
- } from "./chunk-ZGDVUPTM.js";
14
+ } from "./chunk-IOZ3VKPK.js";
15
15
  import {
16
16
  isActionToken
17
- } from "./chunk-YS3AZQ2G.js";
17
+ } from "./chunk-6HFAW2MH.js";
18
18
  import {
19
19
  exportStaticIr
20
- } from "./chunk-ZFY7U2FR.js";
20
+ } from "./chunk-HJM5Y5NU.js";
21
21
  import {
22
22
  appendConvergeStaticIrCollectors
23
- } from "./chunk-M3BFQ7HK.js";
23
+ } from "./chunk-RHJIGDUE.js";
24
24
  import {
25
25
  getModuleTraitsProgram
26
- } from "./chunk-3RMKLXHX.js";
26
+ } from "./chunk-63ZQ5RIN.js";
27
+ import {
28
+ makeRunSession,
29
+ runSessionLayer
30
+ } from "./chunk-CYYSQMLO.js";
27
31
  import {
28
32
  appendSinks,
29
33
  diagnosticsLevel,
30
34
  toSerializableErrorSummary
31
- } from "./chunk-DMBALCE2.js";
35
+ } from "./chunk-V2SBGVDO.js";
36
+ import {
37
+ isJsonValue
38
+ } from "./chunk-LPPZDFTD.js";
32
39
  import {
33
40
  fnv1a32,
34
41
  stableStringify
35
- } from "./chunk-GMPEOUP2.js";
36
- import {
37
- makeRunSession,
38
- runSessionLayer
39
- } from "./chunk-OFADUJWJ.js";
40
- import {
41
- isJsonValue
42
- } from "./chunk-JWOYLO27.js";
42
+ } from "./chunk-4MZ7BT3R.js";
43
43
  import {
44
44
  __export
45
45
  } from "./chunk-PZ5AY32C.js";
@@ -183,7 +183,7 @@ var resolveEffects = (input) => {
183
183
  deduped.push(item);
184
184
  }
185
185
  deduped.sort(
186
- (a, b) => a.actionTag < b.actionTag ? -1 : a.actionTag > b.actionTag ? 1 : a.sourceKey.localeCompare(b.sourceKey)
186
+ (a, b) => a.actionTag < b.actionTag ? -1 : a.actionTag > b.actionTag ? 1 : a.sourceKey < b.sourceKey ? -1 : a.sourceKey > b.sourceKey ? 1 : 0
187
187
  );
188
188
  return deduped.length > 0 ? deduped : void 0;
189
189
  };
@@ -228,7 +228,7 @@ var resolveLogicUnits = (input) => {
228
228
  const name = typeof unit.name === "string" ? unit.name : void 0;
229
229
  out.push({ kind, id, derived, name });
230
230
  }
231
- out.sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : a.kind.localeCompare(b.kind));
231
+ out.sort((a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : a.kind < b.kind ? -1 : a.kind > b.kind ? 1 : 0);
232
232
  return out.length > 0 ? out : void 0;
233
233
  };
234
234
  var digestOf = (base) => `manifest:067:${fnv1a32(stableStringify(base))}`;
@@ -406,7 +406,7 @@ var makeConstructionGuardError = (options) => Object.assign(new Error(options.me
406
406
  hint: options.hint
407
407
  });
408
408
  var extractMissingService = (cause) => {
409
- const candidates = [...Array.from(Cause.defects(cause)), ...Array.from(Cause.failures(cause))];
409
+ const candidates = cause.reasons.filter((reason) => Cause.isDieReason(reason) || Cause.isFailReason(reason)).map((reason) => Cause.isDieReason(reason) ? reason.defect : reason.error);
410
410
  for (const candidate of candidates) {
411
411
  const message = candidate instanceof Error ? candidate.message : typeof candidate === "string" ? candidate : void 0;
412
412
  if (!message) continue;
@@ -416,7 +416,7 @@ var extractMissingService = (cause) => {
416
416
  return void 0;
417
417
  };
418
418
  var guardBuildTime = (self) => self.pipe(
419
- Effect.catchAllCause((cause) => {
419
+ Effect.catchCause((cause) => {
420
420
  const missing = extractMissingService(cause);
421
421
  if (missing) {
422
422
  return Effect.fail(
@@ -441,7 +441,7 @@ __export(RuntimeHost_exports, {
441
441
  make: () => make,
442
442
  mock: () => mock
443
443
  });
444
- import { Context, Layer } from "effect";
444
+ import { Layer, ServiceMap } from "effect";
445
445
  var detectKind = () => {
446
446
  const isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
447
447
  if (isBrowser) return "browser";
@@ -454,7 +454,7 @@ var make = (kind) => ({
454
454
  isNode: kind === "node",
455
455
  isBrowser: kind === "browser"
456
456
  });
457
- var RuntimeHost = class extends Context.Tag("@logixjs/RuntimeHost")() {
457
+ var RuntimeHost = class extends ServiceMap.Service()("@logixjs/RuntimeHost") {
458
458
  };
459
459
  var layer = (service) => Layer.succeed(RuntimeHost, service);
460
460
  var mock = (kind) => layer(make(kind));
@@ -462,18 +462,18 @@ var defaultLayer = layer(make(detectKind()));
462
462
 
463
463
  // src/internal/platform/BuildEnv.ts
464
464
  var toConfigProviderFromRecord = (record) => {
465
- const map = /* @__PURE__ */ new Map();
466
- for (const [k, v] of Object.entries(record ?? {})) {
467
- if (!k) continue;
468
- if (v === void 0) continue;
469
- map.set(k, String(v));
470
- }
471
- return ConfigProvider.fromMap(map);
465
+ const entries = Object.entries(record ?? {}).flatMap(([k, v]) => {
466
+ if (!k || v === void 0) {
467
+ return [];
468
+ }
469
+ return [[k, String(v)]];
470
+ });
471
+ return ConfigProvider.fromUnknown(Object.fromEntries(entries));
472
472
  };
473
473
  var layer2 = (options = {}) => {
474
474
  const runtimeHost = options.runtimeHost ? layer(options.runtimeHost) : options.runtimeHostKind ? layer(make(options.runtimeHostKind)) : defaultLayer;
475
475
  const configProvider = options.configProvider ? options.configProvider : toConfigProviderFromRecord(options.config);
476
- const config = Layer2.setConfigProvider(configProvider);
476
+ const config = ConfigProvider.layer(configProvider);
477
477
  return Layer2.mergeAll(runtimeHost, config);
478
478
  };
479
479
  var run = (builder, options = {}) => builder.pipe(Effect2.provide(layer2(options)), guardBuildTime);
@@ -524,9 +524,7 @@ var toErrorSummaryWithCode = (cause, code, hint) => {
524
524
  var defaultArtifactBudgetBytes = 50 * 1024;
525
525
  var budgetOf = (budgets) => typeof budgets?.maxBytes === "number" && Number.isFinite(budgets.maxBytes) && budgets.maxBytes > 0 ? budgets.maxBytes : defaultArtifactBudgetBytes;
526
526
  var makeConflictEnvelope = (artifactKey, exporterIds) => {
527
- const ids = Array.from(new Set(exporterIds.map((s) => String(s)).filter((s) => s.length > 0))).sort(
528
- (a, b) => a.localeCompare(b)
529
- );
527
+ const ids = Array.from(new Set(exporterIds.map((s) => String(s)).filter((s) => s.length > 0))).sort();
530
528
  return {
531
529
  artifactKey,
532
530
  envelope: {
@@ -568,7 +566,7 @@ var collectTrialRunArtifacts = (options) => {
568
566
  if (ka > kb) return 1;
569
567
  const ia = String(a?.exporterId ?? "");
570
568
  const ib = String(b?.exporterId ?? "");
571
- return ia.localeCompare(ib);
569
+ return ia < ib ? -1 : ia > ib ? 1 : 0;
572
570
  });
573
571
  const conflicts = /* @__PURE__ */ new Map();
574
572
  for (const ex of exportersSorted) {
@@ -647,35 +645,305 @@ var collectTrialRunArtifacts = (options) => {
647
645
  });
648
646
  }
649
647
  }
650
- for (const conflictKey of Array.from(conflictKeys).sort((a, b) => a.localeCompare(b))) {
648
+ for (const conflictKey of Array.from(conflictKeys).sort()) {
651
649
  collected.push(makeConflictEnvelope(conflictKey, conflicts.get(conflictKey) ?? []));
652
650
  }
653
651
  if (collected.length === 0) return void 0;
654
- collected.sort((a, b) => a.artifactKey.localeCompare(b.artifactKey));
652
+ collected.sort((a, b) => a.artifactKey < b.artifactKey ? -1 : a.artifactKey > b.artifactKey ? 1 : 0);
655
653
  return Object.fromEntries(collected.map((c) => [c.artifactKey, c.envelope]));
656
654
  };
657
655
 
658
- // src/internal/observability/trialRunModule.ts
659
- var defaultHost = () => {
660
- if (typeof window !== "undefined" && typeof document !== "undefined") return "browser";
661
- return "node";
662
- };
656
+ // src/internal/observability/trialRunReportPipeline.ts
657
+ var dropOrder = ["evidence", "artifacts", "staticIr", "manifest"];
663
658
  var isRecord3 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
664
- var resolveRootImpl = (root) => root?._tag === "ModuleImpl" ? root : root?.impl;
659
+ var asPositiveInt = (value) => {
660
+ if (typeof value !== "number" || !Number.isFinite(value)) return void 0;
661
+ const n = Math.floor(value);
662
+ return n > 0 ? n : void 0;
663
+ };
665
664
  var utf8ByteLength2 = (value) => {
666
- const json = JSON.stringify(value);
665
+ const json = JSON.stringify(value) ?? "null";
667
666
  if (typeof TextEncoder !== "undefined") {
668
667
  return new TextEncoder().encode(json).length;
669
668
  }
670
669
  return json.length;
671
670
  };
671
+ var issueFromCause = (args) => {
672
+ const err = toSerializableErrorSummary(args.cause).errorSummary;
673
+ return {
674
+ stage: args.stage,
675
+ code: args.code,
676
+ message: err.message,
677
+ hint: args.hint ?? err.hint,
678
+ recoverable: true
679
+ };
680
+ };
681
+ var collectSafely = (args) => {
682
+ try {
683
+ return args.collect();
684
+ } catch (cause) {
685
+ args.issues.push(
686
+ issueFromCause({
687
+ stage: args.stage,
688
+ code: args.code,
689
+ cause,
690
+ hint: args.hint
691
+ })
692
+ );
693
+ return void 0;
694
+ }
695
+ };
696
+ var collectTrialRunReExport = (args) => {
697
+ const issues = [];
698
+ const evidence = collectSafely({
699
+ stage: "evidence",
700
+ code: "EvidenceExportFailed",
701
+ hint: "Evidence export failed; report keeps runtime status and drops evidence payload.",
702
+ issues,
703
+ collect: args.collectEvidence
704
+ });
705
+ const manifest = collectSafely({
706
+ stage: "manifest",
707
+ code: "ManifestExportFailed",
708
+ hint: "Manifest export failed; report keeps runtime status and continues with remaining artifacts.",
709
+ issues,
710
+ collect: args.collectManifest
711
+ });
712
+ const staticIr = collectSafely({
713
+ stage: "staticIr",
714
+ code: "StaticIrExportFailed",
715
+ hint: "Static IR export failed; report keeps runtime status and continues with remaining artifacts.",
716
+ issues,
717
+ collect: args.collectStaticIr
718
+ });
719
+ const artifacts = collectSafely({
720
+ stage: "artifacts",
721
+ code: "ArtifactExportFailed",
722
+ hint: "Artifact export failed; report keeps runtime status and falls back to base summary/evidence.",
723
+ issues,
724
+ collect: () => args.collectArtifacts({
725
+ manifest,
726
+ staticIr
727
+ })
728
+ });
729
+ issues.sort((a, b) => a.stage < b.stage ? -1 : a.stage > b.stage ? 1 : a.code < b.code ? -1 : a.code > b.code ? 1 : 0);
730
+ return {
731
+ manifest,
732
+ staticIr,
733
+ artifacts,
734
+ evidence,
735
+ issues
736
+ };
737
+ };
738
+ var mergeSummaryWithReExport = (args) => {
739
+ const reExport = {
740
+ status: args.status,
741
+ budgets: {
742
+ ...typeof args.maxEvents === "number" && Number.isFinite(args.maxEvents) ? { maxEvents: Math.floor(args.maxEvents) } : {},
743
+ ...typeof args.maxBytes === "number" && Number.isFinite(args.maxBytes) ? { maxBytes: Math.floor(args.maxBytes) } : {}
744
+ },
745
+ issues: args.issues,
746
+ ...args.dropped && args.dropped.length > 0 ? { dropped: Array.from(args.dropped) } : {},
747
+ ...typeof args.originalBytes === "number" ? { originalBytes: args.originalBytes } : {},
748
+ ...typeof args.finalBytes === "number" ? { finalBytes: args.finalBytes } : {}
749
+ };
750
+ if (isRecord3(args.baseSummary)) {
751
+ const prevLogix = isRecord3(args.baseSummary.__logix) ? args.baseSummary.__logix : {};
752
+ return {
753
+ ...args.baseSummary,
754
+ __logix: {
755
+ ...prevLogix,
756
+ reExport
757
+ }
758
+ };
759
+ }
760
+ return {
761
+ __logix: {
762
+ reExport
763
+ }
764
+ };
765
+ };
766
+ var fitReportByBudget = (report, maxBytes) => {
767
+ if (maxBytes === void 0) {
768
+ return {
769
+ adjusted: report,
770
+ dropped: [],
771
+ recovered: false,
772
+ failed: false
773
+ };
774
+ }
775
+ const originalBytes = utf8ByteLength2(report);
776
+ if (originalBytes <= maxBytes) {
777
+ return {
778
+ adjusted: report,
779
+ dropped: [],
780
+ originalBytes,
781
+ finalBytes: originalBytes,
782
+ recovered: false,
783
+ failed: false
784
+ };
785
+ }
786
+ const dropped = [];
787
+ const working = { ...report };
788
+ for (const field of dropOrder) {
789
+ if (working[field] === void 0) continue;
790
+ delete working[field];
791
+ dropped.push(field);
792
+ const bytes = utf8ByteLength2(working);
793
+ if (bytes <= maxBytes) {
794
+ return {
795
+ adjusted: working,
796
+ dropped,
797
+ originalBytes,
798
+ finalBytes: bytes,
799
+ recovered: true,
800
+ failed: false
801
+ };
802
+ }
803
+ }
804
+ const finalBytes = utf8ByteLength2(working);
805
+ return {
806
+ adjusted: working,
807
+ dropped,
808
+ originalBytes,
809
+ finalBytes,
810
+ recovered: false,
811
+ failed: true
812
+ };
813
+ };
814
+ var dedupeIssues = (issues) => {
815
+ const out = [];
816
+ const seen = /* @__PURE__ */ new Set();
817
+ for (const issue of issues) {
818
+ const key = `${issue.stage}:${issue.code}`;
819
+ if (seen.has(key)) continue;
820
+ seen.add(key);
821
+ out.push(issue);
822
+ }
823
+ out.sort((a, b) => a.stage < b.stage ? -1 : a.stage > b.stage ? 1 : a.code < b.code ? -1 : a.code > b.code ? 1 : 0);
824
+ return out;
825
+ };
826
+ var summarizeTrialRunReExport = (args) => mergeSummaryWithReExport({
827
+ baseSummary: args.baseSummary,
828
+ status: args.status,
829
+ issues: args.issues,
830
+ maxEvents: args.maxEvents,
831
+ maxBytes: args.maxBytes,
832
+ dropped: args.dropped,
833
+ originalBytes: args.originalBytes,
834
+ finalBytes: args.finalBytes
835
+ });
836
+ var reExportTrialRunReport = (args) => {
837
+ const maxBytes = asPositiveInt(args.budgets?.maxBytes);
838
+ const draft = {
839
+ runId: args.base.runId,
840
+ ok: args.base.ok,
841
+ manifest: args.collection.manifest,
842
+ staticIr: args.collection.staticIr,
843
+ artifacts: args.collection.artifacts,
844
+ environment: args.base.environment,
845
+ evidence: args.collection.evidence,
846
+ summary: args.base.summary,
847
+ error: args.base.error
848
+ };
849
+ const budgetFit = fitReportByBudget(draft, maxBytes);
850
+ const issues = [...args.collection.issues];
851
+ if (maxBytes !== void 0 && typeof budgetFit.originalBytes === "number" && budgetFit.originalBytes > maxBytes) {
852
+ issues.push(
853
+ budgetFit.failed ? {
854
+ stage: "budget",
855
+ code: "Oversized",
856
+ message: `[Logix] TrialRunReport exceeded maxBytes (${budgetFit.originalBytes} > ${maxBytes})`,
857
+ hint: "Reduce maxEvents or budgets.maxBytes, or split manifest/evidence artifacts in CI.",
858
+ recoverable: false
859
+ } : {
860
+ stage: "budget",
861
+ code: "ReExportBudgetRecovered",
862
+ message: `[Logix] TrialRunReport exceeded maxBytes (${budgetFit.originalBytes} > ${maxBytes}) and was slimmed by dropping heavy exports.`,
863
+ hint: "Increase budgets.maxBytes to retain more reflection/evidence payloads.",
864
+ recoverable: true
865
+ }
866
+ );
867
+ }
868
+ const issuesDeduped = dedupeIssues(issues);
869
+ const status = budgetFit.failed ? "failed" : budgetFit.recovered ? "recovered" : issuesDeduped.length > 0 ? "partial" : "ok";
870
+ const summary = summarizeTrialRunReExport({
871
+ baseSummary: args.base.summary,
872
+ issues: issuesDeduped,
873
+ maxEvents: args.maxEvents,
874
+ maxBytes,
875
+ dropped: budgetFit.dropped,
876
+ originalBytes: budgetFit.originalBytes,
877
+ finalBytes: budgetFit.finalBytes,
878
+ status
879
+ });
880
+ let error = args.base.error;
881
+ if (budgetFit.failed && !error) {
882
+ error = {
883
+ message: `[Logix] TrialRunReport exceeded maxBytes (${budgetFit.originalBytes ?? "unknown"} > ${maxBytes})`,
884
+ code: "Oversized",
885
+ hint: "Reduce maxEvents or budgets.maxBytes, or split manifest/evidence artifacts in CI."
886
+ };
887
+ }
888
+ const report = {
889
+ ...budgetFit.adjusted,
890
+ ok: budgetFit.failed ? false : args.base.ok,
891
+ summary,
892
+ ...error ? { error } : {}
893
+ };
894
+ if (maxBytes !== void 0) {
895
+ const serializedBytes = utf8ByteLength2(report);
896
+ if (serializedBytes > maxBytes) {
897
+ const overflowIssue = {
898
+ stage: "budget",
899
+ code: "Oversized",
900
+ message: `[Logix] TrialRunReport exceeded maxBytes (${serializedBytes} > ${maxBytes})`,
901
+ hint: "Reduce maxEvents or budgets.maxBytes, or split manifest/evidence artifacts in CI.",
902
+ recoverable: false
903
+ };
904
+ const fallbackIssues = dedupeIssues([...issuesDeduped, overflowIssue]);
905
+ const fallbackSummary = summarizeTrialRunReExport({
906
+ baseSummary: void 0,
907
+ issues: fallbackIssues,
908
+ maxEvents: args.maxEvents,
909
+ maxBytes,
910
+ dropped: ["manifest", "staticIr", "artifacts", "evidence"],
911
+ originalBytes: budgetFit.originalBytes ?? serializedBytes,
912
+ finalBytes: serializedBytes,
913
+ status: "failed"
914
+ });
915
+ const fallbackError = error ?? {
916
+ message: `[Logix] TrialRunReport exceeded maxBytes (${serializedBytes} > ${maxBytes})`,
917
+ code: "Oversized",
918
+ hint: "Reduce maxEvents or budgets.maxBytes, or split manifest/evidence artifacts in CI."
919
+ };
920
+ return {
921
+ runId: args.base.runId,
922
+ ok: false,
923
+ environment: args.base.environment,
924
+ summary: fallbackSummary,
925
+ error: fallbackError
926
+ };
927
+ }
928
+ }
929
+ return report;
930
+ };
931
+
932
+ // src/internal/observability/trialRunModule.ts
933
+ var defaultHost = () => {
934
+ if (typeof window !== "undefined" && typeof document !== "undefined") return "browser";
935
+ return "node";
936
+ };
937
+ var isRecord4 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
938
+ var resolveRootImpl = (root) => root?._tag === "ModuleImpl" ? root : root?.impl;
672
939
  var parseMissingConfigKeys = (message) => {
673
940
  const out = [];
674
941
  const patterns = [
675
942
  /\bMissing (?:data|value) for (?:key|path) "?([A-Z0-9_./:-]+)"?/g,
676
943
  /\bMissing (?:data|value) at ([A-Z0-9_./:-]+)\b/g,
677
944
  /\bMissing configuration:? "?([A-Z0-9_./:-]+)"?/g,
678
- /\bConfig\b.*\bmissing\b.*"?([A-Z0-9_./:-]+)"?/gi
945
+ /\bConfig\b.*\bmissing\b.*"?([A-Z0-9_./:-]+)"?/gi,
946
+ /\bat\s*\["([A-Z0-9_./:-]+)"\]/g
679
947
  ];
680
948
  for (const re of patterns) {
681
949
  let match;
@@ -684,7 +952,7 @@ var parseMissingConfigKeys = (message) => {
684
952
  if (typeof key === "string" && key.length > 0) out.push(key);
685
953
  }
686
954
  }
687
- return Array.from(new Set(out)).sort((a, b) => a.localeCompare(b));
955
+ return Array.from(new Set(out)).sort();
688
956
  };
689
957
  var parseMissingServiceIds = (message) => {
690
958
  const out = [];
@@ -694,20 +962,20 @@ var parseMissingServiceIds = (message) => {
694
962
  const id = match[1]?.replace(/[,:.;]+$/, "");
695
963
  if (typeof id === "string" && id.length > 0) out.push(id);
696
964
  }
697
- return Array.from(new Set(out)).sort((a, b) => a.localeCompare(b));
965
+ return Array.from(new Set(out)).sort();
698
966
  };
699
967
  var parseMissingDependencyFromCause = (cause) => {
700
968
  const missingServices = [];
701
969
  const missingConfigKeys = [];
702
- const candidates = [...Array.from(Cause2.failures(cause)), ...Array.from(Cause2.defects(cause))];
970
+ const candidates = cause.reasons.filter((reason) => Cause2.isFailReason(reason) || Cause2.isDieReason(reason)).map((reason) => Cause2.isFailReason(reason) ? reason.error : reason.defect);
703
971
  for (const candidate of candidates) {
704
- if (isRecord3(candidate) && candidate._tag === "ConstructionGuardError") {
972
+ if (isRecord4(candidate) && candidate._tag === "ConstructionGuardError") {
705
973
  const missingService = candidate.missingService;
706
974
  if (typeof missingService === "string" && missingService.length > 0) {
707
975
  missingServices.push(missingService);
708
976
  }
709
977
  }
710
- if (isRecord3(candidate) && candidate._tag === "ConfigError" && candidate._op === "MissingData" && Array.isArray(candidate.path) && candidate.path.every((k) => typeof k === "string" && k.length > 0)) {
978
+ if (isRecord4(candidate) && candidate._tag === "ConfigError" && candidate._op === "MissingData" && Array.isArray(candidate.path) && candidate.path.every((k) => typeof k === "string" && k.length > 0)) {
711
979
  const key = candidate.path.join(".");
712
980
  if (key.length > 0) missingConfigKeys.push(key);
713
981
  }
@@ -722,12 +990,12 @@ var parseMissingDependencyFromCause = (cause) => {
722
990
  messages.push(candidate);
723
991
  continue;
724
992
  }
725
- if (isRecord3(candidate) && typeof candidate.message === "string") {
993
+ if (isRecord4(candidate) && typeof candidate.message === "string") {
726
994
  messages.push(String(candidate.message));
727
995
  }
728
996
  }
729
997
  try {
730
- messages.push(Cause2.pretty(cause, { renderErrorCause: true }));
998
+ messages.push(Cause2.pretty(cause));
731
999
  } catch {
732
1000
  }
733
1001
  const merged = messages.filter((s) => s.length > 0).join("\n");
@@ -736,19 +1004,17 @@ var parseMissingDependencyFromCause = (cause) => {
736
1004
  missingConfigKeys.push(...parseMissingConfigKeys(merged));
737
1005
  }
738
1006
  return {
739
- missingServices: Array.from(new Set(missingServices)).sort((a, b) => a.localeCompare(b)),
740
- missingConfigKeys: Array.from(new Set(missingConfigKeys)).sort((a, b) => a.localeCompare(b))
1007
+ missingServices: Array.from(new Set(missingServices)).sort(),
1008
+ missingConfigKeys: Array.from(new Set(missingConfigKeys)).sort()
741
1009
  };
742
1010
  };
743
1011
  var buildEnvironmentIr = (params) => {
744
- const providedConfigKeys = Object.keys(params.buildEnvConfig ?? {}).filter((k) => k.length > 0 && params.buildEnvConfig[k] !== void 0).sort((a, b) => a.localeCompare(b));
745
- const missingServices = Array.from(new Set(params.missingServices ?? [])).sort((a, b) => a.localeCompare(b));
746
- const missingConfigKeys = Array.from(new Set(params.missingConfigKeys ?? [])).sort((a, b) => a.localeCompare(b));
1012
+ const providedConfigKeys = Object.keys(params.buildEnvConfig ?? {}).filter((k) => k.length > 0 && params.buildEnvConfig[k] !== void 0).sort();
1013
+ const missingServices = Array.from(new Set(params.missingServices ?? [])).sort();
1014
+ const missingConfigKeys = Array.from(new Set(params.missingConfigKeys ?? [])).sort();
747
1015
  const runtimeServiceIds = params.runtimeServicesEvidence?.bindings?.map((b) => b.serviceId).filter((s) => typeof s === "string") ?? [];
748
- const tagIds = Array.from(/* @__PURE__ */ new Set([...runtimeServiceIds, ...missingServices])).sort((a, b) => a.localeCompare(b));
749
- const configKeys = Array.from(/* @__PURE__ */ new Set([...providedConfigKeys, ...missingConfigKeys])).sort(
750
- (a, b) => a.localeCompare(b)
751
- );
1016
+ const tagIds = Array.from(/* @__PURE__ */ new Set([...runtimeServiceIds, ...missingServices])).sort();
1017
+ const configKeys = Array.from(/* @__PURE__ */ new Set([...providedConfigKeys, ...missingConfigKeys])).sort();
752
1018
  return {
753
1019
  tagIds,
754
1020
  configKeys,
@@ -772,21 +1038,23 @@ var makeTrialRunTimeoutError = () => Object.assign(new Error("[Logix] trialRunMo
772
1038
  });
773
1039
  var awaitFiberExitWithTimeout = (fiber, timeoutMs) => Effect4.gen(function* () {
774
1040
  const hasTimeout = typeof timeoutMs === "number" && Number.isFinite(timeoutMs) && timeoutMs > 0;
775
- const start = hasTimeout ? Date.now() : 0;
776
- while (true) {
777
- const exitOpt = yield* Fiber.poll(fiber);
778
- if (Option.isSome(exitOpt)) {
779
- return exitOpt.value;
780
- }
781
- if (hasTimeout) {
782
- const elapsedMs = Date.now() - start;
783
- if (elapsedMs >= timeoutMs) {
784
- yield* Fiber.interruptFork(fiber);
785
- return Exit.fail(makeTrialRunTimeoutError());
786
- }
787
- }
788
- yield* Effect4.promise(() => new Promise((r) => setTimeout(r, 1)));
1041
+ if (!hasTimeout) {
1042
+ return yield* Fiber.await(fiber);
1043
+ }
1044
+ const raced = yield* Effect4.promise(
1045
+ () => new Promise((resolve) => {
1046
+ const timer = setTimeout(() => resolve({ _tag: "Timeout" }), timeoutMs);
1047
+ void Effect4.runPromise(Fiber.await(fiber)).then((exit) => {
1048
+ clearTimeout(timer);
1049
+ resolve(exit);
1050
+ });
1051
+ })
1052
+ );
1053
+ if (raced._tag !== "Timeout") {
1054
+ return raced;
789
1055
  }
1056
+ yield* Fiber.interrupt(fiber).pipe(Effect4.asVoid, Effect4.forkDetach({ startImmediately: true }));
1057
+ return Exit.fail(makeTrialRunTimeoutError());
790
1058
  });
791
1059
  var trialRunModule = (root, options) => Effect4.gen(function* () {
792
1060
  const rootImpl = resolveRootImpl(root);
@@ -830,7 +1098,7 @@ var trialRunModule = (root, options) => Effect4.gen(function* () {
830
1098
  rootImpl
831
1099
  );
832
1100
  const identity = kernel.identity;
833
- const bootFiber = kernel.runtime.runFork(rootImpl.module);
1101
+ const bootFiber = kernel.runtime.runFork(Effect4.service(rootImpl.module).pipe(Effect4.orDie));
834
1102
  const bootExit = yield* awaitFiberExitWithTimeout(bootFiber, options?.trialRunTimeoutMs);
835
1103
  let kernelImplementationRef;
836
1104
  let runtimeServicesEvidence;
@@ -852,7 +1120,7 @@ var trialRunModule = (root, options) => Effect4.gen(function* () {
852
1120
  }
853
1121
  }
854
1122
  } else {
855
- const failure = Cause2.failureOption(bootExit.cause);
1123
+ const failure = Cause2.findErrorOption(bootExit.cause);
856
1124
  if (Option.isSome(failure)) {
857
1125
  const err = failure.value;
858
1126
  const instanceIdFromErr = typeof err?.instanceId === "string" ? err.instanceId : void 0;
@@ -866,36 +1134,16 @@ var trialRunModule = (root, options) => Effect4.gen(function* () {
866
1134
  timeoutMs: typeof options?.closeScopeTimeout === "number" && Number.isFinite(options.closeScopeTimeout) && options.closeScopeTimeout > 0 ? options.closeScopeTimeout : 1e3
867
1135
  })
868
1136
  );
869
- const evidence = collector.exportEvidencePackage({
870
- maxEvents: options?.maxEvents ?? 1e3
871
- });
872
- const manifest = (() => {
873
- try {
874
- return extractManifest(root, {
875
- includeStaticIr: true,
876
- budgets: { maxBytes: 2e5 }
877
- });
878
- } catch {
879
- return void 0;
880
- }
881
- })();
882
- const staticIr = (() => {
883
- try {
884
- return exportStaticIr2(root);
885
- } catch {
886
- return void 0;
887
- }
888
- })();
889
1137
  let ok = Exit.isSuccess(bootExit) && Exit.isSuccess(closeExit);
890
1138
  let error;
891
1139
  let summary;
892
1140
  const depsFromBootFailure = Exit.isFailure(bootExit) ? parseMissingDependencyFromCause(bootExit.cause) : { missingServices: [], missingConfigKeys: [] };
893
1141
  const missingServices = depsFromBootFailure.missingServices;
894
1142
  const missingConfigKeys = depsFromBootFailure.missingConfigKeys;
895
- const closeError = Exit.isFailure(closeExit) ? Option.getOrUndefined(Cause2.dieOption(closeExit.cause)) : void 0;
1143
+ const closeError = Exit.isFailure(closeExit) ? closeExit.cause.reasons.filter(Cause2.isDieReason).map((reason) => reason.defect)[0] : void 0;
896
1144
  if (!Exit.isSuccess(bootExit)) {
897
- const failure = Option.getOrUndefined(Cause2.failureOption(bootExit.cause));
898
- const defect = Option.getOrUndefined(Cause2.dieOption(bootExit.cause));
1145
+ const failure = Option.getOrUndefined(Cause2.findErrorOption(bootExit.cause));
1146
+ const defect = bootExit.cause.reasons.filter(Cause2.isDieReason).map((reason) => reason.defect)[0];
899
1147
  const base = failure ?? defect ?? bootExit.cause;
900
1148
  if (missingServices.length > 0 || missingConfigKeys.length > 0) {
901
1149
  ok = false;
@@ -904,7 +1152,7 @@ var trialRunModule = (root, options) => Effect4.gen(function* () {
904
1152
  "MissingDependency",
905
1153
  missingServices.length > 0 ? "Build-time missing service: provide a Layer mock/implementation via options.layer, or move the dependency access to runtime." : "Build-time missing config: provide the missing key(s) in buildEnv.config, or add a default value to Config."
906
1154
  );
907
- } else if (isRecord3(base) && (base.name === "TrialRunTimeoutError" || base._tag === "TrialRunTimeout")) {
1155
+ } else if (isRecord4(base) && (base.name === "TrialRunTimeoutError" || base._tag === "TrialRunTimeout")) {
908
1156
  ok = false;
909
1157
  error = toErrorSummaryWithCode2(
910
1158
  base,
@@ -917,11 +1165,11 @@ var trialRunModule = (root, options) => Effect4.gen(function* () {
917
1165
  }
918
1166
  }
919
1167
  if (Exit.isFailure(closeExit)) {
920
- const died = Option.getOrUndefined(Cause2.dieOption(closeExit.cause));
921
- const failure = Option.getOrUndefined(Cause2.failureOption(closeExit.cause));
1168
+ const died = closeExit.cause.reasons.filter(Cause2.isDieReason).map((reason) => reason.defect)[0];
1169
+ const failure = Option.getOrUndefined(Cause2.findErrorOption(closeExit.cause));
922
1170
  const base = died ?? failure ?? closeExit.cause;
923
1171
  const closeErrorSummary = (() => {
924
- const tag = isRecord3(base) ? base._tag : void 0;
1172
+ const tag = isRecord4(base) ? base._tag : void 0;
925
1173
  if (tag === "DisposeTimeout") {
926
1174
  return toErrorSummaryWithCode2(
927
1175
  base,
@@ -945,51 +1193,40 @@ var trialRunModule = (root, options) => Effect4.gen(function* () {
945
1193
  missingServices,
946
1194
  missingConfigKeys
947
1195
  });
948
- const moduleId = typeof rootImpl.module?.id === "string" && rootImpl.module.id.length > 0 ? String(rootImpl.module.id) : manifest?.moduleId ?? "unknown";
949
- const artifacts = collectTrialRunArtifacts({
950
- exporters: getTrialRunArtifactExporters(rootImpl.module),
951
- ctx: {
952
- moduleId,
953
- manifest,
954
- staticIr,
955
- environment
956
- }
957
- });
958
- let report = {
959
- runId: session.runId,
960
- ok,
961
- manifest,
962
- staticIr,
963
- artifacts,
964
- environment,
965
- evidence,
966
- summary,
967
- error
968
- };
969
- const maxBytes = options?.budgets?.maxBytes;
970
- if (typeof maxBytes === "number" && Number.isFinite(maxBytes) && maxBytes > 0) {
971
- const originalBytes = utf8ByteLength2(report);
972
- if (originalBytes > maxBytes) {
973
- report = {
974
- runId: session.runId,
975
- ok: false,
976
- environment,
977
- error: {
978
- message: `[Logix] TrialRunReport exceeded maxBytes (${originalBytes} > ${maxBytes})`,
979
- code: "Oversized",
980
- hint: "Reduce maxEvents or budgets.maxBytes, or split manifest/evidence artifacts in CI."
981
- },
982
- summary: {
983
- __logix: {
984
- truncated: true,
985
- maxBytes,
986
- originalBytes,
987
- dropped: ["manifest", "staticIr", "artifacts", "evidence"]
988
- }
1196
+ const moduleIdFromRoot = typeof rootImpl.module?.id === "string" && rootImpl.module.id.length > 0 ? String(rootImpl.module.id) : void 0;
1197
+ const reExportCollection = yield* Effect4.promise(
1198
+ async () => collectTrialRunReExport({
1199
+ collectEvidence: () => collector.exportEvidencePackage({
1200
+ maxEvents: options?.maxEvents ?? 1e3
1201
+ }),
1202
+ collectManifest: () => extractManifest(root, {
1203
+ includeStaticIr: true,
1204
+ budgets: { maxBytes: 2e5 }
1205
+ }),
1206
+ collectStaticIr: () => exportStaticIr2(root),
1207
+ collectArtifacts: ({ manifest, staticIr }) => collectTrialRunArtifacts({
1208
+ exporters: getTrialRunArtifactExporters(rootImpl.module),
1209
+ ctx: {
1210
+ moduleId: moduleIdFromRoot ?? manifest?.moduleId ?? "unknown",
1211
+ manifest,
1212
+ staticIr,
1213
+ environment
989
1214
  }
990
- };
991
- }
992
- }
1215
+ })
1216
+ })
1217
+ );
1218
+ const report = reExportTrialRunReport({
1219
+ base: {
1220
+ runId: session.runId,
1221
+ ok,
1222
+ environment,
1223
+ summary,
1224
+ error
1225
+ },
1226
+ collection: reExportCollection,
1227
+ maxEvents: options?.maxEvents ?? 1e3,
1228
+ budgets: options?.budgets
1229
+ });
993
1230
  return report;
994
1231
  });
995
1232
 
@@ -1048,4 +1285,4 @@ export {
1048
1285
  trialRunModule,
1049
1286
  trialRun
1050
1287
  };
1051
- //# sourceMappingURL=chunk-M3WTHJHJ.js.map
1288
+ //# sourceMappingURL=chunk-67DIEA53.js.map