@holoscript/core 8.0.7 → 8.0.9

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 (462) hide show
  1. package/bin/holoscript.cjs +5 -1
  2. package/dist/GLTFPipeline-L76YTXKA.js +15 -0
  3. package/dist/GLTFPipeline-ZWJN7GI6.cjs +36 -0
  4. package/dist/HoloCompositionParser-K76KTEEE.js +12 -0
  5. package/dist/HoloCompositionParser-UZH6Y4HO.cjs +45 -0
  6. package/dist/HoloScriptCodeParser-2D4ERFUZ.js +6 -0
  7. package/dist/HoloScriptCodeParser-UDRLDA7I.cjs +23 -0
  8. package/dist/HoloScriptPlusParser-FTMCGWXD.js +13 -0
  9. package/dist/HoloScriptPlusParser-LQR5GIKF.cjs +30 -0
  10. package/dist/HoloScriptRuntime-UTRLJI5L.js +12 -0
  11. package/dist/HoloScriptRuntime-YBYXJHJN.cjs +21 -0
  12. package/dist/SceneIRCompiler-63KA3M2F.js +17 -0
  13. package/dist/SceneIRCompiler-KWUFHZ4O.cjs +42 -0
  14. package/dist/{USDZExporter-AUHZODOF.cjs → USDZExporter-ML4UMIGC.cjs} +3 -3
  15. package/dist/{USDZExporter-GXB4AUSG.js → USDZExporter-ZFKLQ76G.js} +3 -3
  16. package/dist/agents/index.cjs +1 -1
  17. package/dist/agents/index.js +1 -1
  18. package/dist/audit/AuditLogger.d.ts +106 -0
  19. package/dist/audit/AuditQueryBuilder.d.ts +79 -0
  20. package/dist/audit/ComplianceReporter.d.ts +90 -0
  21. package/dist/audit/index.d.ts +13 -0
  22. package/dist/{chunk-FGMDMJM7.js → chunk-2BYAUHBO.js} +3 -3
  23. package/dist/{chunk-EDPYCLRC.cjs → chunk-2E6PP5UE.cjs} +83 -59
  24. package/dist/{chunk-GASCWJK5.js → chunk-2EGGAZT3.js} +65 -287
  25. package/dist/{chunk-SIEXCILW.js → chunk-2I3XAGMF.js} +3 -3
  26. package/dist/{chunk-OS533P33.cjs → chunk-2KKOYZYI.cjs} +1074 -1655
  27. package/dist/chunk-2MQKNDNH.js +51 -0
  28. package/dist/{chunk-7DMMMBCY.cjs → chunk-2X3IPCBK.cjs} +10 -10
  29. package/dist/chunk-2ZOTBO25.cjs +202 -0
  30. package/dist/chunk-356N4NPM.cjs +152 -0
  31. package/dist/{chunk-X3GJPRVK.cjs → chunk-36NPLOI4.cjs} +92 -81
  32. package/dist/{chunk-SLU6UPJI.cjs → chunk-37HHY7RH.cjs} +5 -5
  33. package/dist/{chunk-YDPEHCCI.cjs → chunk-3CDDRUER.cjs} +3 -118
  34. package/dist/chunk-3F7ZZWIN.js +1651 -0
  35. package/dist/chunk-3ILD7TKP.cjs +187 -0
  36. package/dist/{chunk-X27QRG4C.cjs → chunk-3IUHTGDD.cjs} +153 -41
  37. package/dist/{chunk-PXNZ6TME.js → chunk-4376VHNJ.js} +60 -36
  38. package/dist/{chunk-YKGPCZEE.cjs → chunk-4FIBOJW6.cjs} +10 -10
  39. package/dist/chunk-4Q7RKQQI.cjs +14195 -0
  40. package/dist/{chunk-YCM6QQRT.cjs → chunk-566ZB4LZ.cjs} +180 -8
  41. package/dist/{chunk-2Y3V22SG.js → chunk-5CURIYGT.js} +3 -3
  42. package/dist/{chunk-QBWNJXNR.js → chunk-5FYMCVBY.js} +5 -5
  43. package/dist/{chunk-ZA34AN3R.js → chunk-5LVFTGKH.js} +841 -12
  44. package/dist/chunk-63AUAIL6.js +48 -0
  45. package/dist/chunk-655FATJU.js +110 -0
  46. package/dist/{chunk-TQ377OLB.cjs → chunk-65S62L4D.cjs} +28 -22
  47. package/dist/chunk-6NTAZN5Z.cjs +502 -0
  48. package/dist/chunk-6TRX6AR2.js +9376 -0
  49. package/dist/chunk-6ZCCLKS2.cjs +51 -0
  50. package/dist/{chunk-MDR235RZ.js → chunk-734OB5SK.js} +721 -8
  51. package/dist/{chunk-Q2Q34NF3.js → chunk-77QI552M.js} +6 -6
  52. package/dist/{chunk-WKX5AMOY.js → chunk-7I74JWPW.js} +3 -3
  53. package/dist/{chunk-5FSKKMR7.cjs → chunk-7IDJDMPU.cjs} +232 -4
  54. package/dist/chunk-7VBKRGIZ.cjs +847 -0
  55. package/dist/{chunk-KCPHASCO.js → chunk-AATYYLYK.js} +5 -5
  56. package/dist/{chunk-WFKVS2K4.cjs → chunk-AUZRKIHQ.cjs} +1101 -55
  57. package/dist/{chunk-DTGBOSEM.cjs → chunk-AWXFEAQL.cjs} +12 -12
  58. package/dist/{chunk-THCK6ECW.js → chunk-B3CWTCK2.js} +231 -3
  59. package/dist/chunk-BCP4E7MD.cjs +997 -0
  60. package/dist/chunk-BG7RPYJP.js +91 -0
  61. package/dist/{chunk-VF257YKO.js → chunk-BP4KTMLY.js} +117 -5
  62. package/dist/{chunk-YN6IETRZ.js → chunk-BQJ3YBF3.js} +6424 -987
  63. package/dist/{chunk-KOUAQL2B.cjs → chunk-CANAL6CT.cjs} +1569 -168
  64. package/dist/{chunk-FDSGHPAK.js → chunk-CBSDJF3B.js} +3 -3
  65. package/dist/{chunk-FEWUHQNM.cjs → chunk-CFVK26P4.cjs} +4 -4
  66. package/dist/{chunk-M7K4LE66.cjs → chunk-CI33NINL.cjs} +4 -4
  67. package/dist/{chunk-2OWDB4FB.js → chunk-CKV5NYAE.js} +6 -6
  68. package/dist/{chunk-LPS5AMQD.cjs → chunk-CM4NHXVO.cjs} +24 -24
  69. package/dist/chunk-D3HSRXYB.js +115 -0
  70. package/dist/{chunk-FNHJRI32.js → chunk-DBH3D2MU.js} +1561 -160
  71. package/dist/{chunk-GW3LKD5C.js → chunk-DJNH4HFW.js} +3 -3
  72. package/dist/{chunk-2GCNOI2U.cjs → chunk-DN6F4DHH.cjs} +9 -3
  73. package/dist/chunk-DQRJ5RJG.js +432 -0
  74. package/dist/{chunk-C7ZBSV2Q.js → chunk-DUG3OQAS.js} +106 -43
  75. package/dist/chunk-ECUYJOJ2.cjs +199 -0
  76. package/dist/chunk-EEMTCAK7.js +182 -0
  77. package/dist/{chunk-3SKLAUDD.cjs → chunk-EI3J6LTW.cjs} +359 -581
  78. package/dist/{chunk-SSSN7VAM.js → chunk-EM2OGPYE.js} +4 -4
  79. package/dist/{chunk-56VOWURB.cjs → chunk-ENZCIQZC.cjs} +522 -453
  80. package/dist/chunk-ESBXUYOC.cjs +836 -0
  81. package/dist/{chunk-L5U4W6JC.js → chunk-ESSEF6U2.js} +4 -4
  82. package/dist/chunk-ET3AN4W3.js +824 -0
  83. package/dist/chunk-EXKSFGSX.cjs +14 -14
  84. package/dist/{chunk-I76GIKN7.cjs → chunk-F3YT6GUF.cjs} +17 -17
  85. package/dist/{chunk-WRWEX5ZF.js → chunk-F75DZBBI.js} +3 -3
  86. package/dist/{chunk-4JGRWHZJ.js → chunk-FG6PYGIZ.js} +12 -6
  87. package/dist/chunk-FGGJQRLZ.js +14 -14
  88. package/dist/{chunk-SXOSDZD6.js → chunk-FWCHPCD4.js} +128 -10
  89. package/dist/{chunk-XW6IXEQH.cjs → chunk-G35CAQ7I.cjs} +5 -5
  90. package/dist/{chunk-7VMGP2FW.js → chunk-G6KACNMO.js} +132 -188
  91. package/dist/{chunk-FJPADH77.cjs → chunk-GAWJJAGT.cjs} +6 -6
  92. package/dist/chunk-GGR7QUKK.cjs +4724 -0
  93. package/dist/chunk-GIBF4BHH.js +14098 -0
  94. package/dist/{chunk-AWB7QYY6.cjs → chunk-GILYQ5VH.cjs} +6 -6
  95. package/dist/{chunk-FWVYAMNW.cjs → chunk-GKFCHGCM.cjs} +4 -4
  96. package/dist/{chunk-Y3ZFVUUU.js → chunk-GLEJ2TLS.js} +3 -3
  97. package/dist/{chunk-3GWWJT7L.js → chunk-GP3OKSKT.js} +13 -13
  98. package/dist/chunk-GTIPOEHN.js +196 -0
  99. package/dist/{chunk-LMJ5EBV7.cjs → chunk-GZPUA2TL.cjs} +16 -15
  100. package/dist/{chunk-IELX2OKI.js → chunk-H4LJ4HEA.js} +3 -115
  101. package/dist/{chunk-ACVWFGBI.cjs → chunk-HCX4SMFK.cjs} +3 -3
  102. package/dist/{chunk-HYNTS5CP.js → chunk-HHRZ6STP.js} +24 -2
  103. package/dist/chunk-HIDEIEFG.js +48 -0
  104. package/dist/{chunk-W6RW64BB.cjs → chunk-HSWBIDZM.cjs} +228 -5
  105. package/dist/{chunk-GSOUNWEL.js → chunk-HVX7QQYK.js} +1035 -1616
  106. package/dist/{chunk-TRCGG42I.cjs → chunk-IFW5IW4L.cjs} +6502 -1019
  107. package/dist/{chunk-F5LKJ6F5.cjs → chunk-IJU6AS67.cjs} +32 -28
  108. package/dist/{chunk-TVANHNJ7.js → chunk-IK6Z2HNC.js} +173 -3
  109. package/dist/{chunk-QGMUTVVH.cjs → chunk-IS7NTKY5.cjs} +20 -20
  110. package/dist/{chunk-YFVQWSNJ.js → chunk-IXWGYWH6.js} +3 -3
  111. package/dist/chunk-J2DAS2PL.js +148 -0
  112. package/dist/chunk-JBQXZIWB.js +148 -0
  113. package/dist/chunk-JBYBMBMW.js +261 -0
  114. package/dist/{chunk-LWUOUCYL.js → chunk-JEJ7TT54.js} +5 -5
  115. package/dist/{chunk-DUCB6LGL.js → chunk-JOTCTHN5.js} +211 -5
  116. package/dist/{chunk-47RUFYKR.js → chunk-K56UVEXV.js} +3 -3
  117. package/dist/{chunk-XSFNHP2E.js → chunk-KB26H447.js} +3 -3
  118. package/dist/{chunk-3NGDZZR4.js → chunk-KEYG7HGY.js} +430 -37
  119. package/dist/{chunk-DY72BMU5.js → chunk-KFVNCW4Q.js} +4 -4
  120. package/dist/chunk-KPGC7SK2.js +192 -0
  121. package/dist/chunk-KROXXBK5.cjs +53 -0
  122. package/dist/{chunk-ZPZAVHXL.cjs → chunk-LB3ZZMKT.cjs} +137 -19
  123. package/dist/chunk-LDYZWNJW.cjs +1654 -0
  124. package/dist/{chunk-ULMSSHCJ.cjs → chunk-LMB555QB.cjs} +405 -38
  125. package/dist/{chunk-CBJY23VL.js → chunk-MD4IVS42.js} +3 -3
  126. package/dist/{chunk-VMLKSV26.js → chunk-MDDWEBCX.js} +226 -3
  127. package/dist/chunk-MUWH4QK5.cjs +94 -0
  128. package/dist/{chunk-T6W3Z3SH.cjs → chunk-N2ILK7BF.cjs} +4 -4
  129. package/dist/{chunk-6EX3I5P4.cjs → chunk-N74QRJGP.cjs} +6 -6
  130. package/dist/chunk-NFFHLX37.cjs +132 -0
  131. package/dist/chunk-NJSYWX7H.js +190 -0
  132. package/dist/{chunk-SH5PPVK7.cjs → chunk-NQN5LFN4.cjs} +165 -221
  133. package/dist/chunk-NTQRFOPP.cjs +56 -0
  134. package/dist/{chunk-YFWRJW4B.js → chunk-NWMJPTVL.js} +51 -55
  135. package/dist/{chunk-63ZGNR2T.cjs → chunk-OC6GV5QH.cjs} +42 -42
  136. package/dist/{chunk-7E7GCQCK.js → chunk-OG3MBHM3.js} +9 -3
  137. package/dist/chunk-OMNHTCS4.cjs +264 -0
  138. package/dist/chunk-OQXB6NNC.cjs +117 -0
  139. package/dist/{chunk-Y57W2CT5.cjs → chunk-OV46CCA2.cjs} +51 -55
  140. package/dist/{chunk-6PRZIHGL.cjs → chunk-OV6HHKLE.cjs} +21 -266
  141. package/dist/{chunk-C37BHB7N.cjs → chunk-P26YYPOO.cjs} +5 -5
  142. package/dist/{chunk-2BZHWUSR.cjs → chunk-P7JEKJTZ.cjs} +16 -16
  143. package/dist/{chunk-NGBXXZLL.cjs → chunk-PDXX5UI4.cjs} +45 -45
  144. package/dist/{chunk-FHQFPYV4.js → chunk-PJFTTSKE.js} +8 -7
  145. package/dist/{chunk-GVFJ6T4S.cjs → chunk-PVODJEJ7.cjs} +721 -8
  146. package/dist/{chunk-ZZ7RO2UQ.js → chunk-Q265VZJ4.js} +3 -3
  147. package/dist/{chunk-E7JP3BS3.cjs → chunk-Q47JEE2C.cjs} +4 -4
  148. package/dist/chunk-QBY7LRN2.js +281 -0
  149. package/dist/{chunk-Z6PMDS4G.js → chunk-QDQWKSU3.js} +1090 -53
  150. package/dist/{chunk-GH6C2QGW.cjs → chunk-QEDMOGF3.cjs} +857 -16
  151. package/dist/{chunk-5WUNN6ZN.cjs → chunk-QHSAVOOL.cjs} +24 -2
  152. package/dist/chunk-QJNCDVYM.cjs +137 -0
  153. package/dist/chunk-QM7FJB5W.js +4717 -0
  154. package/dist/chunk-QQFB4RT2.cjs +448 -0
  155. package/dist/chunk-QSYBHQAD.cjs +196 -0
  156. package/dist/{chunk-UGXHYIWT.cjs → chunk-QUJ3ZB55.cjs} +28 -28
  157. package/dist/{chunk-2YSNA2F2.cjs → chunk-QVJMDVYZ.cjs} +5 -5
  158. package/dist/chunk-RAJMAX6D.js +131 -0
  159. package/dist/{chunk-VVKVQZI6.js → chunk-RAN3ECAS.js} +3 -3
  160. package/dist/chunk-RKGUZBOC.js +79 -0
  161. package/dist/{chunk-HLFDZ35S.cjs → chunk-RRQIAJLQ.cjs} +8 -8
  162. package/dist/{chunk-PABONWKI.js → chunk-RXQNRZ5F.js} +3 -3
  163. package/dist/{chunk-7ZHYEITD.cjs → chunk-S4O7CFHQ.cjs} +10 -11
  164. package/dist/chunk-SE7ANBGN.js +128 -0
  165. package/dist/{chunk-X2AVEAZM.cjs → chunk-SJIRCTIS.cjs} +176 -2
  166. package/dist/{chunk-WXQ57LAO.js → chunk-SQXAZHDG.js} +4 -4
  167. package/dist/chunk-SR73L5ZP.cjs +84 -0
  168. package/dist/{chunk-OABEO6HH.js → chunk-SZOLTWWD.js} +2349 -214
  169. package/dist/{chunk-5JEU52DW.js → chunk-TPZ3BN2D.js} +3 -3
  170. package/dist/{chunk-QFU53KRH.js → chunk-TSTFYGGX.js} +4 -5
  171. package/dist/{chunk-EBS32AJI.cjs → chunk-TZCFKZ6Z.cjs} +5 -5
  172. package/dist/chunk-UCVZXQ63.js +724 -0
  173. package/dist/chunk-UGQ3QNV6.js +992 -0
  174. package/dist/chunk-UNMVGZVW.js +142 -0
  175. package/dist/{chunk-TEVX443G.js → chunk-UTUD6GJI.js} +178 -6
  176. package/dist/chunk-UXBYA7DV.cjs +155 -0
  177. package/dist/chunk-V6GXFSK7.cjs +443 -0
  178. package/dist/chunk-VHORVGCG.cjs +761 -0
  179. package/dist/{chunk-B4EKV6HQ.js → chunk-VKCTYLDN.js} +500 -442
  180. package/dist/{chunk-O3MGZDCT.cjs → chunk-VTEXJOSD.cjs} +63 -63
  181. package/dist/chunk-VVAAZITA.cjs +287 -0
  182. package/dist/{chunk-V7AKE5VT.cjs → chunk-W2GA3EQB.cjs} +435 -42
  183. package/dist/chunk-W4GABFCR.js +37 -0
  184. package/dist/chunk-WKEK4NCA.js +490 -0
  185. package/dist/{chunk-5A4TCHOC.cjs → chunk-WNYXT4TE.cjs} +4 -4
  186. package/dist/{chunk-S762UEV5.js → chunk-WTH23ISI.js} +6 -6
  187. package/dist/{chunk-BTKZGHAV.js → chunk-WWNCM473.js} +10 -6
  188. package/dist/{chunk-7X5PNIQJ.js → chunk-X3YFRH6K.js} +27 -25
  189. package/dist/{chunk-4YNYPHH3.cjs → chunk-X75H75UY.cjs} +2351 -213
  190. package/dist/{chunk-LYJJI7ZK.cjs → chunk-XCUDDFKC.cjs} +216 -9
  191. package/dist/chunk-YAO4HPJL.cjs +120 -0
  192. package/dist/chunk-YKY2JBER.cjs +9443 -0
  193. package/dist/chunk-YP5CHEYU.cjs +154 -0
  194. package/dist/{chunk-WRNEH5MO.js → chunk-YW3I2FQL.js} +18 -7
  195. package/dist/{chunk-BRNUPDHJ.js → chunk-Z557DVYN.js} +386 -19
  196. package/dist/{chunk-VSACG2AR.js → chunk-Z6LZUYZF.js} +21 -264
  197. package/dist/chunk-ZHPMP447.cjs +43 -0
  198. package/dist/{chunk-LODTHGST.cjs → chunk-ZK7KX5CD.cjs} +133 -70
  199. package/dist/{chunk-CCPSNT6B.cjs → chunk-ZRPALBQB.cjs} +5 -5
  200. package/dist/chunk-ZVFHPMC5.js +824 -0
  201. package/dist/chunk-ZVQMKUGJ.js +443 -0
  202. package/dist/cli/holoscript-runner.cjs +86 -48
  203. package/dist/cli/holoscript-runner.js +54 -16
  204. package/dist/codebase/index.cjs +1 -1
  205. package/dist/codebase/index.js +1 -1
  206. package/dist/compiler/agent-inference.cjs +11 -11
  207. package/dist/compiler/agent-inference.js +9 -6
  208. package/dist/compiler/android-xr.cjs +13 -12
  209. package/dist/compiler/android-xr.js +11 -10
  210. package/dist/compiler/android.cjs +12 -12
  211. package/dist/compiler/android.js +10 -10
  212. package/dist/compiler/business-quest.cjs +10 -10
  213. package/dist/compiler/business-quest.js +2 -2
  214. package/dist/compiler/coco.cjs +1 -1
  215. package/dist/compiler/coco.js +1 -1
  216. package/dist/compiler/context.cjs +9 -9
  217. package/dist/compiler/context.js +6 -6
  218. package/dist/compiler/daimon-seed.cjs +36 -0
  219. package/dist/compiler/daimon-seed.js +12 -0
  220. package/dist/compiler/domain-block-utils.cjs +205 -156
  221. package/dist/compiler/domain-block-utils.js +8 -7
  222. package/dist/compiler/dtdl.cjs +10 -10
  223. package/dist/compiler/dtdl.js +7 -7
  224. package/dist/compiler/gltf-pipeline.cjs +9 -9
  225. package/dist/compiler/gltf-pipeline.js +2 -2
  226. package/dist/compiler/godot.cjs +10 -9
  227. package/dist/compiler/godot.js +9 -8
  228. package/dist/compiler/incremental.cjs +11 -11
  229. package/dist/compiler/incremental.js +6 -6
  230. package/dist/compiler/index.cjs +2585 -3273
  231. package/dist/compiler/index.d.ts +149 -35
  232. package/dist/compiler/index.js +2197 -3102
  233. package/dist/compiler/ios.cjs +11 -11
  234. package/dist/compiler/ios.js +9 -9
  235. package/dist/compiler/llm-provider-capabilities.cjs +9 -9
  236. package/dist/compiler/llm-provider-capabilities.js +6 -6
  237. package/dist/compiler/nodetoy.cjs +1 -1
  238. package/dist/compiler/nodetoy.js +1 -1
  239. package/dist/compiler/openxr.cjs +11 -10
  240. package/dist/compiler/openxr.js +10 -9
  241. package/dist/compiler/remotion.cjs +1 -1
  242. package/dist/compiler/remotion.js +1 -1
  243. package/dist/compiler/reproducibility.cjs +1 -1
  244. package/dist/compiler/reproducibility.js +1 -1
  245. package/dist/compiler/sdf.cjs +11 -10
  246. package/dist/compiler/sdf.js +9 -8
  247. package/dist/compiler/semantic-scene.cjs +7 -7
  248. package/dist/compiler/semantic-scene.js +2 -2
  249. package/dist/compiler/state.cjs +9 -9
  250. package/dist/compiler/state.js +7 -7
  251. package/dist/compiler/trait-composition.cjs +11 -11
  252. package/dist/compiler/trait-composition.js +7 -7
  253. package/dist/compiler/traits/ProvenanceSemiring.d.ts +167 -0
  254. package/dist/compiler/traits/Semiring.d.ts +26 -0
  255. package/dist/compiler/unity.cjs +11 -10
  256. package/dist/compiler/unity.js +10 -9
  257. package/dist/compiler/unreal.cjs +12 -11
  258. package/dist/compiler/unreal.js +10 -9
  259. package/dist/compiler/urdf.cjs +18 -17
  260. package/dist/compiler/urdf.js +9 -8
  261. package/dist/compiler/usd-physics.cjs +11 -10
  262. package/dist/compiler/usd-physics.js +8 -7
  263. package/dist/compiler/visionos.cjs +11 -10
  264. package/dist/compiler/visionos.js +10 -9
  265. package/dist/compiler/vrchat.cjs +11 -10
  266. package/dist/compiler/vrchat.js +9 -8
  267. package/dist/compiler/wasm.cjs +14 -13
  268. package/dist/compiler/wasm.js +9 -8
  269. package/dist/compiler/webgpu.cjs +10 -9
  270. package/dist/compiler/webgpu.js +9 -8
  271. package/dist/constants.cjs +398 -0
  272. package/dist/constants.js +9 -0
  273. package/dist/coordinators/index.cjs +4 -1
  274. package/dist/coordinators/index.js +4 -1
  275. package/dist/debugger.cjs +11 -9
  276. package/dist/debugger.js +9 -7
  277. package/dist/{dist-ACXG6IH5.cjs → dist-GRMOP2UL.cjs} +341 -65
  278. package/dist/{dist-VD4L6V7Q.js → dist-ZBUKU2JG.js} +333 -63
  279. package/dist/entries/interop.cjs +23 -23
  280. package/dist/entries/interop.js +3 -3
  281. package/dist/entries/scripting.cjs +12 -11
  282. package/dist/entries/scripting.js +8 -7
  283. package/dist/evolution/index.cjs +66 -0
  284. package/dist/evolution/index.d.ts +162 -0
  285. package/dist/evolution/index.js +17 -0
  286. package/dist/hololand/index.cjs +41 -37
  287. package/dist/hololand/index.js +3 -3
  288. package/dist/index.cjs +12394 -3224
  289. package/dist/index.d.ts +260 -18
  290. package/dist/index.js +10755 -2182
  291. package/dist/keyword-registry/PluginKeywordRegistry.d.ts +138 -0
  292. package/dist/keyword-registry/index.cjs +29 -0
  293. package/dist/keyword-registry/index.d.ts +1 -0
  294. package/dist/keyword-registry/index.js +4 -0
  295. package/dist/math/tropical-spmv.cjs +11 -11
  296. package/dist/math/tropical-spmv.d.ts +1 -0
  297. package/dist/math/tropical-spmv.js +2 -2
  298. package/dist/math/tropicalSpmv.d.ts +43 -0
  299. package/dist/math/vec3.cjs +1 -1
  300. package/dist/math/vec3.js +1 -1
  301. package/dist/matter/StagedMatter.d.ts +82 -0
  302. package/dist/matter/index.cjs +17 -0
  303. package/dist/matter/index.d.ts +1 -0
  304. package/dist/matter/index.js +4 -0
  305. package/dist/{ml-dsa-Z7JDKW4L.js → ml-dsa-J6VKVT4K.js} +3 -3
  306. package/dist/{ml-dsa-FSKBTE3W.cjs → ml-dsa-MTIK4ZUQ.cjs} +23 -23
  307. package/dist/paper-0c-spike/index.cjs +1 -1
  308. package/dist/paper-0c-spike/index.js +1 -1
  309. package/dist/parameter-envelope/ParameterEnvelope.d.ts +128 -0
  310. package/dist/parameter-envelope/index.cjs +17 -0
  311. package/dist/parameter-envelope/index.d.ts +2 -0
  312. package/dist/parameter-envelope/index.js +4 -0
  313. package/dist/parser/HoloCompositionTypes.d.ts +2013 -0
  314. package/dist/parser/PipelineParser.d.ts +162 -0
  315. package/dist/parser.cjs +36 -20
  316. package/dist/parser.js +13 -9
  317. package/dist/plugin-manifest/ManifestAutoLoader.d.ts +35 -0
  318. package/dist/plugin-manifest/PluginManifest.d.ts +156 -0
  319. package/dist/plugin-manifest/index.cjs +25 -0
  320. package/dist/plugin-manifest/index.d.ts +2 -0
  321. package/dist/plugin-manifest/index.js +4 -0
  322. package/dist/plugin-solver-contract/PluginSolverContract.d.ts +288 -0
  323. package/dist/plugin-solver-contract/index.cjs +41 -0
  324. package/dist/plugin-solver-contract/index.d.ts +1 -0
  325. package/dist/plugin-solver-contract/index.js +4 -0
  326. package/dist/policy/ContentPolicyGate.d.ts +51 -0
  327. package/dist/policy/PolicyPack.d.ts +120 -0
  328. package/dist/policy/blocklist.d.ts +32 -0
  329. package/dist/policy/defaults.d.ts +44 -0
  330. package/dist/policy/index.cjs +106 -0
  331. package/dist/policy/index.d.ts +17 -0
  332. package/dist/policy/index.js +5 -0
  333. package/dist/policy/jsonLogic.d.ts +31 -0
  334. package/dist/policy/types.d.ts +174 -0
  335. package/dist/proof-composition/ProofCompositionLaw.d.ts +93 -0
  336. package/dist/proof-composition/index.cjs +25 -0
  337. package/dist/proof-composition/index.d.ts +1 -0
  338. package/dist/proof-composition/index.js +4 -0
  339. package/dist/receipts/hash-policy.d.ts +85 -0
  340. package/dist/reconstruction/index.cjs +75 -47
  341. package/dist/reconstruction/index.js +5 -5
  342. package/dist/runtime/plugin-trait-registrar.d.ts +36 -0
  343. package/dist/runtime.cjs +81 -79
  344. package/dist/runtime.js +9 -7
  345. package/dist/scene-presets-EDKYZ5GW.js +4 -0
  346. package/dist/scene-presets-NCW2CFRS.cjs +17 -0
  347. package/dist/self-improvement/index.cjs +1 -1
  348. package/dist/self-improvement/index.js +1 -1
  349. package/dist/{src-PT2FERDV.cjs → src-G3D7ZATQ.cjs} +545 -21
  350. package/dist/{src-J6CM4AUR.js → src-UXYA7HM6.js} +539 -16
  351. package/dist/storage/index.cjs +10 -10
  352. package/dist/storage/index.js +3 -3
  353. package/dist/testing.cjs +1 -1
  354. package/dist/testing.js +1 -1
  355. package/dist/tools/index.cjs +3631 -0
  356. package/dist/tools/index.js +3581 -0
  357. package/dist/traitDocs/traitDocs.cjs +9 -9
  358. package/dist/traitDocs/traitDocs.d.ts +1 -0
  359. package/dist/traitDocs/traitDocs.js +3 -3
  360. package/dist/traits/ControlLoopTrait.d.ts +154 -0
  361. package/dist/traits/KinematicChainTrait.d.ts +116 -0
  362. package/dist/traits/SensorSamplingTrait.d.ts +154 -0
  363. package/dist/traits/TraitTypes.d.ts +270 -0
  364. package/dist/traits/TransactionTrait.d.ts +121 -0
  365. package/dist/traits/botanical-lotus.cjs +54 -50
  366. package/dist/traits/botanical-lotus.js +2 -5
  367. package/dist/traits/control-loop.cjs +21 -0
  368. package/dist/traits/control-loop.d.ts +1 -0
  369. package/dist/traits/control-loop.js +4 -0
  370. package/dist/traits/engines/cloth-verlet.d.ts +65 -0
  371. package/dist/traits/engines/index.cjs +19 -19
  372. package/dist/traits/engines/index.d.ts +15 -275
  373. package/dist/traits/engines/index.js +3 -3
  374. package/dist/traits/engines/motion-data-schema.d.ts +119 -0
  375. package/dist/traits/engines/motion-matching.d.ts +102 -0
  376. package/dist/traits/engines/noise.d.ts +25 -0
  377. package/dist/traits/engines/onnx-adapter.d.ts +173 -0
  378. package/dist/traits/engines/onnx-motion-matching.d.ts +163 -0
  379. package/dist/traits/engines/pfnn-network.d.ts +92 -0
  380. package/dist/traits/engines/synthetic-walk-cycle.d.ts +38 -0
  381. package/dist/traits/engines/tensor-ops.d.ts +15 -0
  382. package/dist/traits/index.cjs +2789 -1259
  383. package/dist/traits/index.d.ts +35 -0
  384. package/dist/traits/index.js +1692 -411
  385. package/dist/traits/kinematic-chain.cjs +25 -0
  386. package/dist/traits/kinematic-chain.d.ts +1 -0
  387. package/dist/traits/kinematic-chain.js +4 -0
  388. package/dist/traits/sensor-sampling.cjs +33 -0
  389. package/dist/traits/sensor-sampling.d.ts +1 -0
  390. package/dist/traits/sensor-sampling.js +4 -0
  391. package/dist/traits/simulation-solver-factory.cjs +1 -1
  392. package/dist/traits/simulation-solver-factory.js +1 -1
  393. package/dist/traits/transaction.cjs +29 -0
  394. package/dist/traits/transaction.d.ts +1 -0
  395. package/dist/traits/transaction.js +4 -0
  396. package/dist/traits/webcam-gaze.cjs +1 -1
  397. package/dist/traits/webcam-gaze.js +1 -1
  398. package/dist/type-checker.cjs +7 -6
  399. package/dist/type-checker.js +5 -4
  400. package/dist/types/AdvancedTypeSystem.d.ts +489 -0
  401. package/dist/types/HoloScriptPlus.d.ts +810 -0
  402. package/dist/types/base.d.ts +248 -0
  403. package/dist/types.d.ts +799 -0
  404. package/dist/world/index.cjs +3 -4
  405. package/dist/world/index.js +3 -4
  406. package/dist/world-model/index.cjs +1 -1
  407. package/dist/world-model/index.js +1 -1
  408. package/dist/wot/index.cjs +1 -1
  409. package/dist/wot/index.js +1 -1
  410. package/package.json +80 -13
  411. package/dist/GLTFPipeline-3EJLL3TS.cjs +0 -38
  412. package/dist/GLTFPipeline-3OWJV2VK.js +0 -17
  413. package/dist/HoloScriptPlusParser-ADWRY5OS.cjs +0 -698
  414. package/dist/HoloScriptPlusParser-JLJDXHSC.js +0 -693
  415. package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +0 -27
  416. package/dist/HoloScriptPlusParser-WENAFEFV.js +0 -10
  417. package/dist/HoloScriptRuntime-GGRVEU4T.cjs +0 -19
  418. package/dist/HoloScriptRuntime-GJK6VJPH.js +0 -10
  419. package/dist/chunk-22Q5A6RV.js +0 -979
  420. package/dist/chunk-4C57PR42.js +0 -468
  421. package/dist/chunk-4W5G5QVL.cjs +0 -847
  422. package/dist/chunk-5ET6L4NS.js +0 -487
  423. package/dist/chunk-C4GSLCHE.cjs +0 -7153
  424. package/dist/chunk-F2G6CWFT.js +0 -7089
  425. package/dist/chunk-G6PNEASF.cjs +0 -814
  426. package/dist/chunk-GTA4Q3A3.js +0 -1491
  427. package/dist/chunk-HCCQLAA4.cjs +0 -74
  428. package/dist/chunk-HFSVMKM3.cjs +0 -72
  429. package/dist/chunk-KAIVDEIG.cjs +0 -4539
  430. package/dist/chunk-KQU64CIX.cjs +0 -1508
  431. package/dist/chunk-MSYSQ2AJ.js +0 -4533
  432. package/dist/chunk-NHJLP37F.js +0 -70
  433. package/dist/chunk-NHYRRAGI.cjs +0 -490
  434. package/dist/chunk-OIQYIIO3.cjs +0 -473
  435. package/dist/chunk-OL46QLBJ.js +0 -61
  436. package/dist/chunk-SKZPC5AG.cjs +0 -984
  437. package/dist/chunk-SLHLXUMO.js +0 -445
  438. package/dist/chunk-UOIGFQXC.cjs +0 -9750
  439. package/dist/chunk-UOL6Y5TD.cjs +0 -759
  440. package/dist/chunk-UVFI7XIR.cjs +0 -452
  441. package/dist/chunk-VEPGBETF.js +0 -844
  442. package/dist/chunk-XQ5MWMP2.js +0 -756
  443. package/dist/chunk-XT6JY5W5.js +0 -9684
  444. package/dist/chunk-YRRAUB35.js +0 -811
  445. package/dist/compiler/GasOptimizationAnalyzer.d.ts +0 -73
  446. package/dist/compiler/NFTMarketplaceCompiler.d.ts +0 -23
  447. package/dist/compiler/ar.cjs +0 -23
  448. package/dist/compiler/ar.js +0 -11
  449. package/dist/compiler/babylon.cjs +0 -21
  450. package/dist/compiler/babylon.js +0 -15
  451. package/dist/compiler/multi-layer.cjs +0 -24
  452. package/dist/compiler/multi-layer.js +0 -15
  453. package/dist/compiler/playcanvas.cjs +0 -19
  454. package/dist/compiler/playcanvas.js +0 -13
  455. package/dist/compiler/r3f.cjs +0 -39
  456. package/dist/compiler/r3f.d.ts +0 -22
  457. package/dist/compiler/r3f.js +0 -17
  458. package/dist/compiler/vrr.cjs +0 -24
  459. package/dist/compiler/vrr.js +0 -12
  460. package/dist/parser/NFTMarketplaceTypes.d.ts +0 -191
  461. package/dist/playwright-3AT3AKTV.cjs +0 -98673
  462. package/dist/playwright-VZPDVUEQ.js +0 -98660
@@ -1,70 +1,140 @@
1
1
  export { MOTION_DATA_SCHEMA_VERSION, NullMotionMatchingEngine, SYNTHETIC_WALK_JOINTS, SyntheticWalkCycleEngine, TRAJECTORY_FRAME_DT, TRAJECTORY_HORIZON_FRAMES, buildSyntheticBipedPose, classifyGait, createNullMotionMatchingEngine, createSyntheticWalkCycleEngine, inferenceFrameToTensor, magnitude, projectLinearTrajectory, validateMotionCapture, validateTrainingCorpus, validateTrainingFrame } from '../chunk-GVOKJNUN.js';
2
- import { QuantumCircuitCompiler } from '../chunk-FGMDMJM7.js';
2
+ import { QuantumCircuitCompiler } from '../chunk-2BYAUHBO.js';
3
3
  export { SkeletonTrait, createSkeletonTrait, skeletonHandler } from '../chunk-5EDVCNRT.js';
4
- import { createHoloMapRuntime, HOLOMAP_DEFAULTS } from '../chunk-Z6PMDS4G.js';
4
+ import { createHoloMapRuntime, HOLOMAP_DEFAULTS } from '../chunk-QDQWKSU3.js';
5
5
  import '../chunk-WNNE3PO3.js';
6
+ import { extractPayload, normalizeCenter, parseCRDTRoomTraitConfig, validateCRDTRoomTraitConfig, resolveCRDTRoomTraitConfig, deriveWalkableNavmesh } from '../chunk-BQJ3YBF3.js';
7
+ export { AIDriverTrait, ALL_CIRCUITS, ARKIT_MOUTH_SHAPES, AnimationTrait, BUILTIN_CIRCUITS, BarretenbergBackend, BehaviorTreeRunner, CARE_ETHICS_TRAIT, CRDTRoomTraitValidationError, CRDT_ROOM_TRAIT_DEFAULTS, ComponentType, ConsensusTrait, DEFAULT_ANIMATION_MAP, DEFAULT_BEHAVIOR_FACT_TTL_ALERT_RULE, DEFAULT_EXPRESSION_PRESETS, DEFAULT_EXTERNAL_TIMEOUT_MS, DEFAULT_FOVEATED_BLEND, DEFAULT_FREQUENCY_BANDS, DEFAULT_REPUTATION_LEDGER_MAX_FACTS, DEFAULT_REPUTATION_LEDGER_TTL_DAYS, DEFAULT_SYNC_FIELD, DEFAULT_TRAIT_CONFIG, DialogTrait, ECSWorld, EmotionDirectiveTrait, EnvironmentalAudioSystem, GEM_RESONANCE_ELEMENT_FREQUENCIES, GOAPPlanner, GOLDEN_ANGLE_DEG, HOLOSCRIPT_HUMANOID_BONE_MAP, InteractiveGraphTrait, JobQueuePersistence, LIGHTING_PRESETS, LOCAL_WEBCAM_VIEW_ID, LightingTrait, LipSyncTrait, LobbyTrait, MATERIAL_PRESETS, MAX_EXPERIENCE_LOG_ENTRIES, MaterialTrait, MorphTrait, MultiviewGaussianRendererTrait, NetworkedTrait, OCULUS_VISEME_MAP, PIDControllerTrait, PressableTrait, TIER_DEFAULTS as QUOTA_TIER_DEFAULTS, REFERENCE_SPACE_CHAIN, RenderingTrait, SHADER_CHUNKS, SHADER_PRESETS, SPATIAL_PREDICATE_CIRCUITS, SYNC_PRESETS, SandboxExecutionTrait, ShaderTrait, SlidableTrait, SpatialAwarenessTrait, SyncTierTrait, TriggerTrait, URDFRobotTrait, VRTraitRegistry, VoiceInputTrait, VoiceOutputTrait, VoronoiFractureSystem, WEATHER_PRESETS, aIDriverHandler, abTestHandler, abstain, accessibleHandler, advancedClothHandler, affinityHandler, agentDiscoveryHandler, agentMemoryHandler, agentMovementSystem, agentPortalHandler, aiTextureGenHandler, aiUpscalingHandler, ainpcBrainHandler, alertHandler, altTextHandler, ambisonicsHandler, analyticsHandler, analyzeFairnessWindow, anchorHandler, animationConfigFromStateMachine, applyFBXAxisConversion, applyStatModifiers, applyUSDAxisConversion, approve, audioMaterialHandler, audioOcclusionHandler, audioPortalHandler, auditLogHandler, autoRigHandler, autoVote, avatarEmbodimentHandler, behaviorTreeHandler, biofeedbackHandler, blackboardHandler, bloomReactiveHandler, bodyTrackingHandler, bufferHandler, buildBehaviorFactDisclosure, buoyancyHandler, cRDTRoomHandler, careEthicsHandler, chainHandler, characterHandler, choreographyHandler, circuitBreakerHandler, clearLocalLLMNativeBridges, clothHandler, coLocatedHandler, compareSemVer, computeHandler, computePhyllotaxisPosition, computerUseHandler, consensusHandler, consentGateHandler, controlNetHandler, controllerInputHandler, controlnetHandler, createAIDriverTrait, createApprovalRequest, createBaseMainnetAccountingAdapter, createBehaviorFactTtlAlertRule, createCRDTRoomTraitConfig, createCanBusAccountingAdapter, createConsensusTrait, createDialogTrait, createEdiX12AccountingAdapter, createEmotionDirectiveTrait, createHl7FhirAccountingAdapter, createLightingTrait, createLipSyncTrait, createLobbyTrait, createMaterialTrait, createMorphTrait, createNativeAutoRigPlan, createRenderingTrait, createRollbackCheckpoint, createSelectiveDisclosure, createShaderTrait, createSharedSpatialProvider, createSimulatedController, createSpatialAwarenessTrait, createTriggerTrait, createURDFRobotTrait, createVoiceInputTrait, createVoiceOutputTrait, cronHandler, dataBindingHandler, deriveBloomReactiveOutput, deriveFairnessRisk, deriveLotusCenterPhase, deriveLotusGardenerSchedule, deriveLotusGenesisGate, deriveLotusGenesisSeed, deriveLotusPetalVisual, deriveLotusRootEmissive, deriveLotusStalkPosture, deriveWalkableNavmesh, destructionHandler, deviceProfiles, dialogHandler, dialogueHandler, digitalTwinHandler, dropTableHandler, economyPrimitivesHandler, effectiveWeight, embeddingSearchHandler, emissiveAt, emotionDirectiveHandler, emotionHandler, emotionalVoiceHandler, encounterHandler, environmentalAudioHandler, evaluateAction, evaluateCareEthicsTurn, extractLotusGenesisAnchorHash, extractPayload, eyeTrackedHandler, faceTrackingHandler, factionHandler, fairnessMonitorHandler, fbxHandler, feedbackLoopHandler, findReachablePath, findWalkableNodeAt, flowFieldHandler, fluidHandler, forgetPolicyHandler, formationControlHandler, gardenerPulseJitter, gaussianSplatHandler, gazeFocusAnalyticsHandler, gemResonanceHandler, generatedMeshHandler, geospatialAnchorHandler, geospatialEnvHandler, gestureHandler, getActiveSessions, getAgentId, getAirAbsorption, getAuditLog, getCachedThingDescription, getCapabilities, getCareEthicsState, getEventHistory, getFBXAnimationStacks, getFBXBoneNames, getFBXMorphTargets, getFBXState, getGLTFAnimations, getGLTFMorphTargets, getGLTFState, getMQTTSinkClient, getMQTTSinkState, getMQTTSourceClient, getMQTTSourceState, getMyProposals, getMyVotes, getNegotiationMethods, getPredicateCircuitId, getSession, getUSDActiveVariant, getUSDAnimation, getUSDBlendShapes, getUSDJointNames, getUSDState, getUSDVariantSets, getWoTThingState, gltfHandler, goalOrientedHandler, gpuBufferHandler, gpuParticleHandler, gpuPhysicsHandler, granularMaterialHandler, handMenuHandler, handMeshAIHandler, handTrackingHandler, hapticCueHandler, hapticHandler, hasMQTTSinkTrait, hasMQTTSourceTrait, hasVoted, hasWoTThingTrait, hashGardenerSeed, hashSeed, headTrackedAudioHandler, heatmap3dHandler, highContrastHandler, hitlHandler, hrtfHandler, iKHandler, initiate, invalidateThingDescription, isConsentGranted, isFBXLoaded, isGLTFLoaded, isInSession, isMQTTSinkConnected, isMQTTSourceConnected, isNativeLLMBackend, isReservedPaperId, isUSDLoaded, isUSDZ, isWalkableAt, jointHandler, layerAwareHandler, leave, lightEstimationHandler, lightingHandler, lipSyncHandler, llmAgentHandler, lobbyHandler, localLLMHandler, locomotionHandler, lodSystem, lotusCenterHandler, lotusGardenerHandler, lotusGenesisTriggerHandler, lotusPetalHandler, lotusRootHandler, lotusStalkHandler, luckHandler, magnifiableHandler, marketplaceHandler, marketplaceIntegrationHandler, matchesCondition, materialHandler, materialXHandler, memoryCrystalHandler, memoryHandler, meshDetectionHandler, messagingHandler, modifiedThreshold, morphHandler, motionReducedHandler, mqttSinkHandler, mqttSourceHandler, multiAgentHandler, multiviewGaussianRendererHandler, negotiationHandler, nerfHandler, networkedAvatarHandler, networkedHandler, neuralAnimationHandler, neuralForgeHandler, neuralLinkHandler, neuralUpscalingHandler, nftHandler, normalizeCenter, normalizeLotusSeed, normalizePointCloud, npcAIHandler, objectTrackingHandler, occlusionHandler, onboardingHandler, openXRHALHandler, parseCRDTRoomEntityConfig, parseCRDTRoomTraitConfig, partnerSDKHandler, passthroughCameraHandler, patrolHandler, perceptionHandler, perceptualColorHandler, persistentAnchorHandler, photogrammetryHandler, phyllotaxisHandler, physicsSystem, pickByWeight, planeDetectionHandler, poiHandler, pointCloudHandler, portableHandler, poseEstimationHandler, pressableHandler, propose, publishToMQTTSink, qrDecodeHandler, quotaHandler, ragKnowledgeHandler, rateLimiterHandler, rbacHandler, realityKitMeshHandler, recallTriggerHandler, registerLocalLLMNativeBridge, remotePresenceHandler, renderNetworkHandler, renderingHandler, reputationLedgerHandler, resolveBloomStage, resolveCRDTRoomTraitConfig, resolvePulseHz, resourceAccountingHandler, reverbZoneHandler, rigidbodyHandler, roadmapNodeHandler, roleHandler, rooftopAnchorHandler, roomMeshHandler, ropeHandler, runECSBenchmark, runFairnessMonitorSweep, runResourceAccountingAudit, sceneGraphHandler, sceneReconstructionHandler, schedulerHandler, screenReaderHandler, scrollableHandler, seatedHandler, secondsToUSDTimeCode, seededRand01, sensorHandler, setAgentManifest, shaderHandler, sharePlayHandler, sharedAnchorHandler, sharedWorldHandler, shouldFire, signRequest, skillRegistryHandler, slidableHandler, softBodyHandler, sonificationHandler, spatialAccessoryHandler, spatialAudioCueHandler, spatialAwarenessHandler, spatialNavigationHandler, spatialPanelHandler, spatialPersonaHandler, spectatorHandler, ssoOidcHandler, ssoSamlHandler, stableDiffusionHandler, stableFairnessMonitorHash, stableResourceAccountingReceiptHash, statHandler, structuredLoggerHandler, subtitleHandler, syncTierHandler, tenantHandler, terrainAnchorHandler, timeoutGuardHandler, tokenGatedHandler, transformHandler, triggerHandler, tutorialHandler, urdfRobotHandler, usdHandler, usdTimeCodeToSeconds, userMonitorHandler, validateCRDTRoomTraitConfig, validateSemVer, vectorDBHandler, verifyWebhookSignature, visionHandler, voiceInputHandler, voiceMeshHandler, voiceOutputHandler, voiceProximityHandler, volumetricHandler, volumetricVideoHandler, volumetricWindowHandler, voronoiFractureHandler, vote, vpsHandler, vrTraitRegistry, walletHandler, wasmBridgeHandler, windHandler, withNegotiation, worldPortalHandler, wotThingHandler, zkPrivateHandler } from '../chunk-BQJ3YBF3.js';
8
+ export { ACCESSIBILITY_EXTENDED_VISUALS, ACCESSIBILITY_VISUALS, AGE_CONDITION_VISUALS, ANIMALS_VISUALS, ARCHITECTURE_REALESTATE_VISUALS, AUDIO_VISUALS, CONSTRUCTION_BUILDING_VISUALS, CONTAINERS_STORAGE_VISUALS, COOKING_FOOD_VISUALS, CORE_VR_INTERACTION_VISUALS, CREATURES_MYTHICAL_VISUALS, DATA_VISUALIZATION_VISUALS, EDUCATION_LEARNING_VISUALS, EMOTION_MOOD_VISUALS, ENVIRONMENTAL_BIOME_VISUALS, ENVIRONMENT_INPUT_VISUALS, FABRIC_CLOTH_VISUALS, FURNITURE_DECOR_VISUALS, GAME_MECHANICS_VISUALS, GEMS_MINERALS_VISUALS, GEOSPATIAL_WEB3_VISUALS, HEALTHCARE_MEDICAL_VISUALS, HUMANOID_AVATAR_VISUALS, INTELLIGENCE_BEHAVIOR_VISUALS, INTEROP_COPRESENCE_VISUALS, IOT_AUTONOMOUS_AGENTS_VISUALS, LIGHTING_VISUALS, LOCOMOTION_MOVEMENT_VISUALS, MAGIC_FANTASY_VISUALS, MARITIME_NAVAL_VISUALS, MATERIAL_PROPERTIES_VISUALS, MEASUREMENT_SENSING_VISUALS, MEDIA_ANALYTICS_VISUALS, MULTISENSORY_HAPTIC_VISUALS, MUSICAL_SOUND_VISUALS, MUSIC_PERFORMANCE_VISUALS, NARRATIVE_STORYTELLING_VISUALS, NATURE_LIFE_VISUALS, NETWORKING_AI_VISUALS, NPC_ROLES_VISUALS, OBJECT_INTERACTION_VISUALS, PARSER_CORE_UI_VISUALS, PERCEPTUAL_COLOR_VISUALS, PHYSICAL_AFFORDANCES_VISUALS, PHYSICS_EXPANSION_VISUALS, PROCEDURAL_GENERATION_VISUALS, RESOURCE_GATHERING_VISUALS, SAFETY_BOUNDARIES_VISUALS, SCIFI_TECHNOLOGY_VISUALS, SHAPE_FORM_VISUALS, SIGNS_COMMUNICATION_VISUALS, SIMPLE_MODIFIERS_VISUALS, SIZE_SCALE_VISUALS, SOCIAL_COMMERCE_VISUALS, SOCIAL_EFFECTS_VISUALS, SPORTS_FITNESS_VISUALS, STATE_PERSISTENCE_VISUALS, SURFACE_TEXTURE_VISUALS, TIME_PERIOD_VISUALS, TRANSPORTATION_VEHICLES_VISUALS, VISUAL_EFFECTS_VISUALS, VOLUMETRIC_WEBGPU_VISUALS, WATER_FLUID_VISUALS, WEATHER_PARTICLES_VISUALS, WEATHER_PHENOMENA_VISUALS, XR_PLATFORM_VISUALS } from '../chunk-6TRX6AR2.js';
9
+ export { COMPOSITION_RULES, TraitCompositor, TraitVisualRegistry, VISUAL_LAYER_PRIORITY } from '../chunk-ZVQMKUGJ.js';
10
+ import '../chunk-K56UVEXV.js';
11
+ export { NoOpInferenceAdapter, OnnxNodeInferenceAdapter, PureJsInferenceAdapter, createNoOpInferenceAdapter, createOnnxNodeInferenceAdapter, createPureJsInferenceAdapter, resolveOnnxModelPath } from '../chunk-OG3MBHM3.js';
6
12
  import { CircuitBreaker, Bulkhead, withTimeout, retryWithBackoff, fallbackChain } from '../chunk-A6KINLZJ.js';
7
- import { extractPayload, normalizeCenter, parseCRDTRoomTraitConfig, validateCRDTRoomTraitConfig, resolveCRDTRoomTraitConfig, deriveWalkableNavmesh } from '../chunk-YN6IETRZ.js';
8
- export { AIDriverTrait, ALL_CIRCUITS, ARKIT_MOUTH_SHAPES, AnimationTrait, BUILTIN_CIRCUITS, BarretenbergBackend, BehaviorTreeRunner, CARE_ETHICS_TRAIT, CRDTRoomTraitValidationError, CRDT_ROOM_TRAIT_DEFAULTS, ComponentType, ConsensusTrait, DEFAULT_ANIMATION_MAP, DEFAULT_BEHAVIOR_FACT_TTL_ALERT_RULE, DEFAULT_EXPRESSION_PRESETS, DEFAULT_EXTERNAL_TIMEOUT_MS, DEFAULT_FOVEATED_BLEND, DEFAULT_FREQUENCY_BANDS, DEFAULT_REPUTATION_LEDGER_MAX_FACTS, DEFAULT_REPUTATION_LEDGER_TTL_DAYS, DEFAULT_SYNC_FIELD, DEFAULT_TRAIT_CONFIG, DialogTrait, ECSWorld, EmotionDirectiveTrait, EnvironmentalAudioSystem, GEM_RESONANCE_ELEMENT_FREQUENCIES, GOAPPlanner, GOLDEN_ANGLE_DEG, InteractiveGraphTrait, JobQueuePersistence, LOCAL_WEBCAM_VIEW_ID, LipSyncTrait, LobbyTrait, MAX_EXPERIENCE_LOG_ENTRIES, MorphTrait, MultiviewGaussianRendererTrait, NetworkedTrait, OCULUS_VISEME_MAP, PIDControllerTrait, PressableTrait, TIER_DEFAULTS as QUOTA_TIER_DEFAULTS, REFERENCE_SPACE_CHAIN, SPATIAL_PREDICATE_CIRCUITS, SYNC_PRESETS, SandboxExecutionTrait, SlidableTrait, SpatialAwarenessTrait, SyncTierTrait, TriggerTrait, URDFRobotTrait, VRTraitRegistry, VoiceInputTrait, VoiceOutputTrait, VoronoiFractureSystem, WEATHER_PRESETS, aIDriverHandler, abTestHandler, abstain, accessibleHandler, advancedClothHandler, affinityHandler, agentDiscoveryHandler, agentMemoryHandler, agentMovementSystem, agentPortalHandler, aiTextureGenHandler, aiUpscalingHandler, ainpcBrainHandler, alertHandler, altTextHandler, ambisonicsHandler, analyticsHandler, anchorHandler, applyFBXAxisConversion, applyStatModifiers, applyUSDAxisConversion, approve, audioMaterialHandler, audioOcclusionHandler, audioPortalHandler, auditLogHandler, autoVote, avatarEmbodimentHandler, behaviorTreeHandler, biofeedbackHandler, blackboardHandler, bloomReactiveHandler, bodyTrackingHandler, bufferHandler, buildBehaviorFactDisclosure, buoyancyHandler, cRDTRoomHandler, careEthicsHandler, chainHandler, characterHandler, choreographyHandler, circuitBreakerHandler, clothHandler, coLocatedHandler, compareSemVer, computeHandler, computePhyllotaxisPosition, computerUseHandler, consensusHandler, consentGateHandler, controlNetHandler, controllerInputHandler, controlnetHandler, createAIDriverTrait, createApprovalRequest, createBaseMainnetAccountingAdapter, createBehaviorFactTtlAlertRule, createCRDTRoomTraitConfig, createCanBusAccountingAdapter, createConsensusTrait, createDialogTrait, createEdiX12AccountingAdapter, createEmotionDirectiveTrait, createHl7FhirAccountingAdapter, createLipSyncTrait, createLobbyTrait, createMorphTrait, createRollbackCheckpoint, createSelectiveDisclosure, createSharedSpatialProvider, createSimulatedController, createSpatialAwarenessTrait, createTriggerTrait, createURDFRobotTrait, createVoiceInputTrait, createVoiceOutputTrait, cronHandler, dataBindingHandler, deriveBloomReactiveOutput, deriveLotusCenterPhase, deriveLotusGardenerSchedule, deriveLotusGenesisGate, deriveLotusGenesisSeed, deriveLotusPetalVisual, deriveLotusRootEmissive, deriveLotusStalkPosture, deriveWalkableNavmesh, destructionHandler, deviceProfiles, dialogHandler, dialogueHandler, digitalTwinHandler, dropTableHandler, economyPrimitivesHandler, effectiveWeight, embeddingSearchHandler, emissiveAt, emotionDirectiveHandler, emotionHandler, emotionalVoiceHandler, encounterHandler, environmentalAudioHandler, evaluateAction, evaluateCareEthicsTurn, extractLotusGenesisAnchorHash, extractPayload, eyeTrackedHandler, faceTrackingHandler, factionHandler, fbxHandler, feedbackLoopHandler, findReachablePath, findWalkableNodeAt, flowFieldHandler, fluidHandler, gardenerPulseJitter, gaussianSplatHandler, gemResonanceHandler, geospatialAnchorHandler, geospatialEnvHandler, gestureHandler, getActiveSessions, getAgentId, getAirAbsorption, getAuditLog, getCachedThingDescription, getCapabilities, getCareEthicsState, getEventHistory, getFBXAnimationStacks, getFBXBoneNames, getFBXMorphTargets, getFBXState, getGLTFAnimations, getGLTFMorphTargets, getGLTFState, getMQTTSinkClient, getMQTTSinkState, getMQTTSourceClient, getMQTTSourceState, getMyProposals, getMyVotes, getNegotiationMethods, getPredicateCircuitId, getSession, getUSDActiveVariant, getUSDAnimation, getUSDBlendShapes, getUSDJointNames, getUSDState, getUSDVariantSets, getWoTThingState, gltfHandler, goalOrientedHandler, gpuBufferHandler, gpuParticleHandler, gpuPhysicsHandler, granularMaterialHandler, handMenuHandler, handMeshAIHandler, handTrackingHandler, hapticCueHandler, hapticHandler, hasMQTTSinkTrait, hasMQTTSourceTrait, hasVoted, hasWoTThingTrait, hashGardenerSeed, hashSeed, headTrackedAudioHandler, heatmap3dHandler, highContrastHandler, hitlHandler, hrtfHandler, iKHandler, initiate, invalidateThingDescription, isConsentGranted, isFBXLoaded, isGLTFLoaded, isInSession, isMQTTSinkConnected, isMQTTSourceConnected, isReservedPaperId, isUSDLoaded, isUSDZ, isWalkableAt, jointHandler, layerAwareHandler, leave, lightEstimationHandler, lipSyncHandler, llmAgentHandler, lobbyHandler, localLLMHandler, lodSystem, lotusCenterHandler, lotusGardenerHandler, lotusGenesisTriggerHandler, lotusPetalHandler, lotusRootHandler, lotusStalkHandler, luckHandler, magnifiableHandler, marketplaceHandler, marketplaceIntegrationHandler, matchesCondition, materialXHandler, memoryHandler, meshDetectionHandler, messagingHandler, modifiedThreshold, morphHandler, motionReducedHandler, mqttSinkHandler, mqttSourceHandler, multiAgentHandler, multiviewGaussianRendererHandler, negotiationHandler, nerfHandler, networkedAvatarHandler, networkedHandler, neuralAnimationHandler, neuralForgeHandler, neuralLinkHandler, neuralUpscalingHandler, nftHandler, normalizeCenter, normalizeLotusSeed, normalizePointCloud, npcAIHandler, objectTrackingHandler, occlusionHandler, openXRHALHandler, parseCRDTRoomEntityConfig, parseCRDTRoomTraitConfig, partnerSDKHandler, patrolHandler, perceptionHandler, persistentAnchorHandler, photogrammetryHandler, phyllotaxisHandler, physicsSystem, pickByWeight, planeDetectionHandler, poiHandler, pointCloudHandler, portableHandler, poseEstimationHandler, pressableHandler, propose, publishToMQTTSink, quotaHandler, ragKnowledgeHandler, rateLimiterHandler, rbacHandler, realityKitMeshHandler, remotePresenceHandler, renderNetworkHandler, reputationLedgerHandler, resolveBloomStage, resolveCRDTRoomTraitConfig, resolvePulseHz, resourceAccountingHandler, reverbZoneHandler, rigidbodyHandler, roadmapNodeHandler, roleHandler, rooftopAnchorHandler, roomMeshHandler, ropeHandler, runECSBenchmark, runResourceAccountingAudit, sceneGraphHandler, sceneReconstructionHandler, schedulerHandler, screenReaderHandler, scrollableHandler, seatedHandler, secondsToUSDTimeCode, seededRand01, sensorHandler, setAgentManifest, sharePlayHandler, sharedAnchorHandler, sharedWorldHandler, shouldFire, signRequest, skillRegistryHandler, slidableHandler, softBodyHandler, sonificationHandler, spatialAccessoryHandler, spatialAudioCueHandler, spatialAwarenessHandler, spatialNavigationHandler, spatialPersonaHandler, spectatorHandler, ssoOidcHandler, ssoSamlHandler, stableDiffusionHandler, stableResourceAccountingReceiptHash, statHandler, structuredLoggerHandler, subtitleHandler, syncTierHandler, tenantHandler, terrainAnchorHandler, timeoutGuardHandler, tokenGatedHandler, transformHandler, triggerHandler, urdfRobotHandler, usdHandler, usdTimeCodeToSeconds, userMonitorHandler, validateCRDTRoomTraitConfig, validateSemVer, vectorDBHandler, verifyWebhookSignature, visionHandler, voiceInputHandler, voiceMeshHandler, voiceOutputHandler, voiceProximityHandler, volumetricHandler, volumetricVideoHandler, volumetricWindowHandler, voronoiFractureHandler, vote, vpsHandler, vrTraitRegistry, walletHandler, wasmBridgeHandler, windHandler, withNegotiation, wotThingHandler, zkPrivateHandler } from '../chunk-YN6IETRZ.js';
9
- export { LIGHTING_PRESETS, LightingTrait, MATERIAL_PRESETS, MaterialTrait, RenderingTrait, SHADER_CHUNKS, SHADER_PRESETS, ShaderTrait, createLightingTrait, createMaterialTrait, createRenderingTrait, createShaderTrait, lightingHandler, materialHandler, renderingHandler, shaderHandler } from '../chunk-GTA4Q3A3.js';
10
- import '../chunk-47RUFYKR.js';
13
+ import '../chunk-2M2DPHKB.js';
11
14
  export { DEFAULT_WEBCAM_GAZE_CONFIG, WebcamGazeTracker, estimateWebcamGazeFromLandmarks, webcamGazeHandler, webcamGazeToRay } from '../chunk-TDCNJHWO.js';
15
+ export { DEFAULT_BOTANICAL_LOTUS_CONFIG, DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS, LOTUS_GENESIS_SEED_PLACEHOLDER, LOTUS_GOLDEN_ANGLE_DEG, LOTUS_GROWTH_SECONDS, LOTUS_OUTER_PETAL_COLOR, LOTUS_PETAL_CHUNK_ENTRIES, LOTUS_PETAL_SHADER_CHUNKS, LOTUS_PETAL_UNIFORM_BINDINGS, LOTUS_RING_SCALING, assertBotanicalLotusConfig, botanicalLotusHandler, buildLotusFlowerPlacements, buildLotusPetalGeometryData, buildLotusPetalMaterialSpec, buildLotusPhyllotaxisPetalLayout, buildLotusSceneFromComposition, buildLotusSceneScaffold, createBotanicalLotusRenderProfile, createLotusMeristem, createLotusMorphogen, createLotusMorphogen2D, createLotusPetalTurgor, createLotusPond, deriveBotanicalLotusAnchorStatus, deriveLotusBloomFromGlow, disturbLotusPond, generateBotanicalNormalMap, generateBotanicalRoughnessMap, getBotanicalLotusPetalCount, lotusMorphogen2DPeaks, lotusMorphogen2DSampleAt, lotusMorphogenPeaks, lotusPetalGeometryParamsFromProfile, lotusPetalRenderColor, lotusPetalTurgorOpenProgress, lotusPetalTurgorTipDeg, lotusPondSurface, normalizeBotanicalLotusConfig, simulateLotusMorphogenesis, simulateLotusPetalGrowth, simulateLotusPhyllotaxis, stepLotusMeristem, stepLotusMorphogen, stepLotusMorphogen2D, stepLotusPetalTurgor, stepLotusPond, validateBotanicalLotusConfig } from '../chunk-VKCTYLDN.js';
12
16
  export { SimulationSolverFactory } from '../chunk-YQELFNJV.js';
13
- export { NoOpInferenceAdapter, OnnxNodeInferenceAdapter, PureJsInferenceAdapter, createNoOpInferenceAdapter, createOnnxNodeInferenceAdapter, createPureJsInferenceAdapter, resolveOnnxModelPath } from '../chunk-7E7GCQCK.js';
14
- import '../chunk-2M2DPHKB.js';
15
- import { init_accessibility_extended_visual, init_accessibility_visual, init_age_condition_visual, init_animals_visual, init_architecture_realestate_visual, init_audio_visual, init_construction_building_visual, init_containers_storage_visual, init_cooking_food_visual, init_core_vr_interaction_visual, init_creatures_mythical_visual, init_data_visualization_visual, init_education_learning_visual, init_emotion_mood_visual, init_environment_input_visual, init_environmental_biome_visual, init_fabric_cloth_visual, init_furniture_decor_visual, init_game_mechanics_visual, init_gems_minerals_visual, init_geospatial_web3_visual, init_healthcare_medical_visual, init_humanoid_avatar_visual, init_intelligence_behavior_visual, init_interop_copresence_visual, init_iot_autonomous_agents_visual, init_lighting_visual, init_locomotion_movement_visual, init_magic_fantasy_visual, init_maritime_naval_visual, init_material_properties_visual, init_measurement_sensing_visual, init_media_analytics_visual, init_multisensory_haptic_visual, init_music_performance_visual, init_musical_sound_visual, init_narrative_storytelling_visual, init_nature_life_visual, init_networking_ai_visual, init_npc_roles_visual, init_object_interaction_visual, init_parser_core_ui_visual, init_physical_affordances_visual, init_physics_expansion_visual, init_procedural_generation_visual, init_resource_gathering_visual, init_safety_boundaries_visual, init_scifi_technology_visual, init_shape_form_visual, init_signs_communication_visual, init_simple_modifiers_visual, init_size_scale_visual, init_social_commerce_visual, init_social_effects_visual, init_sports_fitness_visual, init_state_persistence_visual, init_surface_texture_visual, init_time_period_visual, init_transportation_vehicles_visual, init_visual_effects_visual, init_volumetric_webgpu_visual, init_water_fluid_visual, init_weather_particles_visual, init_weather_phenomena_visual, init_xr_platform_visual } from '../chunk-XT6JY5W5.js';
16
- export { ACCESSIBILITY_EXTENDED_VISUALS, ACCESSIBILITY_VISUALS, AGE_CONDITION_VISUALS, ANIMALS_VISUALS, ARCHITECTURE_REALESTATE_VISUALS, AUDIO_VISUALS, CONSTRUCTION_BUILDING_VISUALS, CONTAINERS_STORAGE_VISUALS, COOKING_FOOD_VISUALS, CORE_VR_INTERACTION_VISUALS, CREATURES_MYTHICAL_VISUALS, DATA_VISUALIZATION_VISUALS, EDUCATION_LEARNING_VISUALS, EMOTION_MOOD_VISUALS, ENVIRONMENTAL_BIOME_VISUALS, ENVIRONMENT_INPUT_VISUALS, FABRIC_CLOTH_VISUALS, FURNITURE_DECOR_VISUALS, GAME_MECHANICS_VISUALS, GEMS_MINERALS_VISUALS, GEOSPATIAL_WEB3_VISUALS, HEALTHCARE_MEDICAL_VISUALS, HUMANOID_AVATAR_VISUALS, INTELLIGENCE_BEHAVIOR_VISUALS, INTEROP_COPRESENCE_VISUALS, IOT_AUTONOMOUS_AGENTS_VISUALS, LIGHTING_VISUALS, LOCOMOTION_MOVEMENT_VISUALS, MAGIC_FANTASY_VISUALS, MARITIME_NAVAL_VISUALS, MATERIAL_PROPERTIES_VISUALS, MEASUREMENT_SENSING_VISUALS, MEDIA_ANALYTICS_VISUALS, MULTISENSORY_HAPTIC_VISUALS, MUSICAL_SOUND_VISUALS, MUSIC_PERFORMANCE_VISUALS, NARRATIVE_STORYTELLING_VISUALS, NATURE_LIFE_VISUALS, NETWORKING_AI_VISUALS, NPC_ROLES_VISUALS, OBJECT_INTERACTION_VISUALS, PARSER_CORE_UI_VISUALS, PHYSICAL_AFFORDANCES_VISUALS, PHYSICS_EXPANSION_VISUALS, PROCEDURAL_GENERATION_VISUALS, RESOURCE_GATHERING_VISUALS, SAFETY_BOUNDARIES_VISUALS, SCIFI_TECHNOLOGY_VISUALS, SHAPE_FORM_VISUALS, SIGNS_COMMUNICATION_VISUALS, SIMPLE_MODIFIERS_VISUALS, SIZE_SCALE_VISUALS, SOCIAL_COMMERCE_VISUALS, SOCIAL_EFFECTS_VISUALS, SPORTS_FITNESS_VISUALS, STATE_PERSISTENCE_VISUALS, SURFACE_TEXTURE_VISUALS, TIME_PERIOD_VISUALS, TRANSPORTATION_VEHICLES_VISUALS, VISUAL_EFFECTS_VISUALS, VOLUMETRIC_WEBGPU_VISUALS, WATER_FLUID_VISUALS, WEATHER_PARTICLES_VISUALS, WEATHER_PHENOMENA_VISUALS, XR_PLATFORM_VISUALS } from '../chunk-XT6JY5W5.js';
17
- import { init_BotanicalLotusTrait } from '../chunk-B4EKV6HQ.js';
18
- export { DEFAULT_BOTANICAL_LOTUS_CONFIG, DEFAULT_LOTUS_PETAL_GEOMETRY_PARAMS, LOTUS_GENESIS_SEED_PLACEHOLDER, LOTUS_GOLDEN_ANGLE_DEG, LOTUS_GROWTH_SECONDS, LOTUS_OUTER_PETAL_COLOR, LOTUS_PETAL_CHUNK_ENTRIES, LOTUS_PETAL_SHADER_CHUNKS, LOTUS_PETAL_UNIFORM_BINDINGS, LOTUS_RING_SCALING, assertBotanicalLotusConfig, botanicalLotusHandler, buildLotusFlowerPlacements, buildLotusPetalGeometryData, buildLotusPetalMaterialSpec, buildLotusSceneFromComposition, buildLotusSceneScaffold, createBotanicalLotusRenderProfile, createLotusMeristem, createLotusMorphogen, createLotusMorphogen2D, createLotusPetalTurgor, createLotusPond, deriveBotanicalLotusAnchorStatus, deriveLotusBloomFromGlow, disturbLotusPond, generateBotanicalNormalMap, generateBotanicalRoughnessMap, getBotanicalLotusPetalCount, lotusMorphogen2DPeaks, lotusMorphogen2DSampleAt, lotusMorphogenPeaks, lotusPetalGeometryParamsFromProfile, lotusPetalRenderColor, lotusPetalTurgorOpenProgress, lotusPetalTurgorTipDeg, lotusPondSurface, normalizeBotanicalLotusConfig, simulateLotusMorphogenesis, simulateLotusPetalGrowth, simulateLotusPhyllotaxis, stepLotusMeristem, stepLotusMorphogen, stepLotusMorphogen2D, stepLotusPetalTurgor, stepLotusPond, validateBotanicalLotusConfig } from '../chunk-B4EKV6HQ.js';
19
- import { init_ProvenanceSemiring, ProvenanceSemiring } from '../chunk-SLHLXUMO.js';
20
- import { init_composition_rules, init_TraitCompositor, init_TraitVisualRegistry, init_types } from '../chunk-4C57PR42.js';
21
- export { COMPOSITION_RULES, TraitCompositor, TraitVisualRegistry, VISUAL_LAYER_PRIORITY } from '../chunk-4C57PR42.js';
22
- import '../chunk-C7ZBSV2Q.js';
23
- import '../chunk-THCK6ECW.js';
24
- import '../chunk-2Y3V22SG.js';
25
- import { init_accessibility_extended, init_accessibility, init_age_condition, init_analytics_observability, init_animals, init_architecture_realestate, init_audio, init_construction_building, init_containers_storage, init_cooking_food, init_core_vr_interaction, init_creatures_mythical, init_data_visualization, init_education_learning, init_emotion_mood, init_enterprise_multitenancy, init_environment_input, init_environmental_biome, init_fabric_cloth, init_fabrication_devices, init_furniture_decor, init_game_mechanics, init_gems_minerals, init_geospatial_web3, init_healthcare_medical, init_holomap_reconstruction, init_humanoid_avatar, init_intelligence_behavior, init_interop_copresence, init_iot_autonomous_agents, init_lighting, init_locomotion_movement, init_magic_fantasy, init_maritime_naval, init_material_properties, init_measurement_sensing, init_media_analytics, init_multisensory_haptic, init_music_performance, init_musical_sound, init_narrative_storytelling, init_nature_life, init_networking_ai, init_npc_roles, init_object_interaction, init_parser_core_ui, init_physical_affordances, init_physics_expansion, init_procedural_generation, init_rendering, init_resource_gathering, init_robotics_industrial, init_safety_boundaries, init_scientific_computing, init_scifi_technology, init_security_crypto, init_shape_form, init_signs_communication, init_simple_modifiers, init_size_scale, init_social_commerce, init_social_effects, init_sports_fitness, init_state_persistence, init_surface_texture, init_time_period, init_transportation_vehicles, init_v43_ai_xr, init_visual_effects, init_volumetric_webgpu, init_water_fluid, init_weather_particles, init_weather_phenomena, init_xr_platform } from '../chunk-WRNEH5MO.js';
26
- export { ACCESSIBILITY_EXTENDED_TRAITS, ACCESSIBILITY_TRAITS, AERIAL_AQUATIC_TRAITS, AGE_CONDITION_TRAITS, ANALYTICS_OBSERVABILITY_TRAITS, ANIMALS_TRAITS, ARCHITECTURE_REALESTATE_TRAITS, AUDIO_TRAITS, CONNECTIVITY_TRAITS, CONSTRUCTION_BUILDING_TRAITS, CONTAINERS_STORAGE_TRAITS, CONTROLLER_TRAITS, COOKING_FOOD_TRAITS, CORE_VR_INTERACTION_TRAITS, CREATURES_MYTHICAL_TRAITS, DATA_VISUALIZATION_TRAITS, EDUCATION_LEARNING_TRAITS, EMOTION_MOOD_TRAITS, ENTERPRISE_MULTITENANCY_TRAITS, ENVIRONMENTAL_BIOME_TRAITS, ENVIRONMENTAL_SENSOR_TRAITS, ENVIRONMENT_INPUT_TRAITS, FABRICATION_DEVICES_TRAITS, FABRIC_CLOTH_TRAITS, FORCE_TORQUE_TRAITS, FURNITURE_DECOR_TRAITS, GAME_MECHANICS_TRAITS, GEMS_MINERALS_TRAITS, GEOSPATIAL_WEB3_TRAITS, GRIPPER_TRAITS, HEALTHCARE_MEDICAL_TRAITS, HOLOMAP_RECONSTRUCTION_DECORATORS, HOLOMAP_RECONSTRUCTION_DECORATOR_NAMES, HOLOMAP_RECONSTRUCTION_TRAITS, HUMANOID_AVATAR_TRAITS, INERTIAL_POSITION_TRAITS, INTELLIGENCE_BEHAVIOR_TRAITS, INTEROP_COPRESENCE_TRAITS, IOT_AUTONOMOUS_AGENTS_TRAITS, JOINT_CONTROL_TRAITS, JOINT_PROPERTY_TRAITS, JOINT_TYPE_TRAITS, LEGGED_TRAITS, LIGHTING_TRAITS, LOCOMOTION_MOVEMENT_TRAITS, MAGIC_FANTASY_TRAITS, MARITIME_NAVAL_TRAITS, MATERIAL_PROPERTIES_TRAITS, MEASUREMENT_SENSING_TRAITS, MEDIA_ANALYTICS_TRAITS, MOBILE_BASE_TRAITS, MOTOR_FEEDBACK_TRAITS, MOTOR_TYPE_TRAITS, MULTISENSORY_HAPTIC_TRAITS, MUSICAL_SOUND_TRAITS, MUSIC_PERFORMANCE_TRAITS, NARRATIVE_STORYTELLING_TRAITS, NATURE_LIFE_TRAITS, NETWORKING_AI_TRAITS, NPC_ROLES_TRAITS, OBJECT_INTERACTION_TRAITS, PARSER_CORE_UI_TRAITS, PHYSICAL_AFFORDANCES_TRAITS, PHYSICS_EXPANSION_TRAITS, PLANNING_TRAITS, POWER_TRAITS, PROCEDURAL_GENERATION_TRAITS, PROTOCOL_TRAITS, RANGE_SENSING_TRAITS, RENDERING_TRAITS, RESOURCE_GATHERING_TRAITS, ROBOTICS_INDUSTRIAL_TRAITS, SAFETY_BOUNDARIES_TRAITS, SAFETY_TRAITS, SCIENTIFIC_COMPUTING_TRAITS, SCIFI_TECHNOLOGY_TRAITS, SECURITY_CRYPTO_TRAITS, SHAPE_FORM_TRAITS, SIGNS_COMMUNICATION_TRAITS, SIMPLE_MODIFIER_TRAITS, SIZE_SCALE_TRAITS, SOCIAL_COMMERCE_TRAITS, SOCIAL_EFFECTS_TRAITS, SPORTS_FITNESS_TRAITS, STANDARDS_TRAITS, STATE_PERSISTENCE_TRAITS, SURFACE_TEXTURE_TRAITS, TIME_PERIOD_TRAITS, TOOL_INTERFACE_TRAITS, TOOL_TRAITS, TRANSMISSION_TRAITS, TRANSPORTATION_VEHICLES_TRAITS, V43_AI_XR_TRAITS, VISION_TRAITS, VISUAL_EFFECTS_TRAITS, VOLUMETRIC_WEBGPU_TRAITS, WATER_FLUID_TRAITS, WEATHER_PARTICLES_TRAITS, WEATHER_PHENOMENA_TRAITS, XR_PLATFORM_TRAITS, getReconstructionTraitsFromDecorators, isReconstructionDecorator } from '../chunk-WRNEH5MO.js';
27
- export { BUILTIN_CONSTRAINTS, loadConstraintsFromConfig, loadConstraintsFromFile } from '../chunk-XSFNHP2E.js';
28
- import { jepObjectiveHandler } from '../chunk-TVANHNJ7.js';
29
- export { JEPAPredictor, jepObjectiveHandler, mitosisHandler, orbitalHandler } from '../chunk-TVANHNJ7.js';
30
- import '../chunk-PHENW4MQ.js';
31
- import { init_safeJsonParse, readJson } from '../chunk-VVKVQZI6.js';
32
- import { __export } from '../chunk-OL46QLBJ.js';
17
+ import { ProvenanceSemiring } from '../chunk-DQRJ5RJG.js';
18
+ import '../chunk-UCVZXQ63.js';
19
+ import '../chunk-DUG3OQAS.js';
20
+ import '../chunk-B3CWTCK2.js';
21
+ import '../chunk-5CURIYGT.js';
22
+ export { AI_TRAIT_NAMES, BRAIN_KEYWORD, COGNITIVE_COMPLETE_TO_VERB, COGNITIVE_EVENT_MAP, COGNITIVE_VERBS, cognitiveActionsToBTNodes, cognitiveActionsToBehaviorTree, compileCognitiveDispatch, isBrainKeyword, isCognitiveVerb, nearestCognitiveVerb } from '../chunk-UNMVGZVW.js';
23
+ import { init_accessibility_extended, init_accessibility, init_age_condition, init_analytics_observability, init_animals, init_architecture_realestate, init_audio, init_construction_building, init_containers_storage, init_cooking_food, init_core_vr_interaction, init_creatures_mythical, init_data_visualization, init_education_learning, init_emotion_mood, init_enterprise_multitenancy, init_environment_input, init_environmental_biome, init_fabric_cloth, init_fabrication_devices, init_furniture_decor, init_game_mechanics, init_gems_minerals, init_geospatial_web3, init_healthcare_medical, init_holomap_reconstruction, init_humanoid_avatar, init_intelligence_behavior, init_interop_copresence, init_iot_autonomous_agents, init_lighting, init_locomotion_movement, init_magic_fantasy, init_maritime_naval, init_material_properties, init_measurement_sensing, init_media_analytics, init_multisensory_haptic, init_music_performance, init_musical_sound, init_narrative_storytelling, init_nature_life, init_networking_ai, init_npc_roles, init_object_interaction, init_parser_core_ui, init_physical_affordances, init_physics_expansion, init_procedural_generation, init_rendering, init_resource_gathering, init_robotics_industrial, init_safety_boundaries, init_scientific_computing, init_scifi_technology, init_security_crypto, init_shape_form, init_signs_communication, init_simple_modifiers, init_size_scale, init_social_commerce, init_social_effects, init_sports_fitness, init_state_persistence, init_surface_texture, init_time_period, init_transportation_vehicles, init_v43_ai_xr, init_visual_effects, init_volumetric_webgpu, init_water_fluid, init_weather_particles, init_weather_phenomena, init_xr_platform } from '../chunk-YW3I2FQL.js';
24
+ export { ACCESSIBILITY_EXTENDED_TRAITS, ACCESSIBILITY_TRAITS, AERIAL_AQUATIC_TRAITS, AGE_CONDITION_TRAITS, ANALYTICS_OBSERVABILITY_TRAITS, ANIMALS_TRAITS, ARCHITECTURE_REALESTATE_TRAITS, AUDIO_TRAITS, CONNECTIVITY_TRAITS, CONSTRUCTION_BUILDING_TRAITS, CONTAINERS_STORAGE_TRAITS, CONTROLLER_TRAITS, COOKING_FOOD_TRAITS, CORE_VR_INTERACTION_TRAITS, CREATURES_MYTHICAL_TRAITS, DATA_VISUALIZATION_TRAITS, EDUCATION_LEARNING_TRAITS, EMOTION_MOOD_TRAITS, ENTERPRISE_MULTITENANCY_TRAITS, ENVIRONMENTAL_BIOME_TRAITS, ENVIRONMENTAL_SENSOR_TRAITS, ENVIRONMENT_INPUT_TRAITS, FABRICATION_DEVICES_TRAITS, FABRIC_CLOTH_TRAITS, FORCE_TORQUE_TRAITS, FURNITURE_DECOR_TRAITS, GAME_MECHANICS_TRAITS, GEMS_MINERALS_TRAITS, GEOSPATIAL_WEB3_TRAITS, GRIPPER_TRAITS, HEALTHCARE_MEDICAL_TRAITS, HOLOMAP_RECONSTRUCTION_DECORATORS, HOLOMAP_RECONSTRUCTION_DECORATOR_NAMES, HOLOMAP_RECONSTRUCTION_TRAITS, HUMANOID_AVATAR_TRAITS, INERTIAL_POSITION_TRAITS, INTELLIGENCE_BEHAVIOR_TRAITS, INTEROP_COPRESENCE_TRAITS, IOT_AUTONOMOUS_AGENTS_TRAITS, JOINT_CONTROL_TRAITS, JOINT_PROPERTY_TRAITS, JOINT_TYPE_TRAITS, LEGGED_TRAITS, LIGHTING_TRAITS, LOCOMOTION_MOVEMENT_TRAITS, MAGIC_FANTASY_TRAITS, MARITIME_NAVAL_TRAITS, MATERIAL_PROPERTIES_TRAITS, MEASUREMENT_SENSING_TRAITS, MEDIA_ANALYTICS_TRAITS, MOBILE_BASE_TRAITS, MOTOR_FEEDBACK_TRAITS, MOTOR_TYPE_TRAITS, MULTISENSORY_HAPTIC_TRAITS, MUSICAL_SOUND_TRAITS, MUSIC_PERFORMANCE_TRAITS, NARRATIVE_STORYTELLING_TRAITS, NATURE_LIFE_TRAITS, NETWORKING_AI_TRAITS, NPC_ROLES_TRAITS, OBJECT_INTERACTION_TRAITS, PARSER_CORE_UI_TRAITS, PHYSICAL_AFFORDANCES_TRAITS, PHYSICS_EXPANSION_TRAITS, PLANNING_TRAITS, POWER_TRAITS, PROCEDURAL_GENERATION_TRAITS, PROTOCOL_TRAITS, RANGE_SENSING_TRAITS, RENDERING_TRAITS, RESOURCE_GATHERING_TRAITS, ROBOTICS_INDUSTRIAL_TRAITS, SAFETY_BOUNDARIES_TRAITS, SAFETY_TRAITS, SCIENTIFIC_COMPUTING_TRAITS, SCIFI_TECHNOLOGY_TRAITS, SECURITY_CRYPTO_TRAITS, SHAPE_FORM_TRAITS, SIGNS_COMMUNICATION_TRAITS, SIMPLE_MODIFIER_TRAITS, SIZE_SCALE_TRAITS, SOCIAL_COMMERCE_TRAITS, SOCIAL_EFFECTS_TRAITS, SPORTS_FITNESS_TRAITS, STANDARDS_TRAITS, STATE_PERSISTENCE_TRAITS, SURFACE_TEXTURE_TRAITS, TIME_PERIOD_TRAITS, TOOL_INTERFACE_TRAITS, TOOL_TRAITS, TRANSMISSION_TRAITS, TRANSPORTATION_VEHICLES_TRAITS, V43_AI_XR_TRAITS, VISION_TRAITS, VISUAL_EFFECTS_TRAITS, VOLUMETRIC_WEBGPU_TRAITS, WATER_FLUID_TRAITS, WEATHER_PARTICLES_TRAITS, WEATHER_PHENOMENA_TRAITS, XR_PLATFORM_TRAITS, getReconstructionTraitsFromDecorators, isReconstructionDecorator } from '../chunk-YW3I2FQL.js';
25
+ export { coronaSimulationHandler } from '../chunk-D3HSRXYB.js';
26
+ import { jepObjectiveHandler } from '../chunk-IK6Z2HNC.js';
27
+ export { JEPAPredictor, jepObjectiveHandler, mitosisHandler, orbitalHandler } from '../chunk-IK6Z2HNC.js';
28
+ import { logger } from '../chunk-PHENW4MQ.js';
29
+ export { LOCOMOTION_MODES, LOCOMOTION_MODE_MAP, LOCOMOTION_REACTION_TRIGGERS, MOVEMENT_VERBS, isLocomotionMode, isLocomotionReactionTrigger, isMovementVerb } from '../chunk-63AUAIL6.js';
30
+ export { BUILTIN_CONSTRAINTS, loadConstraintsFromConfig, loadConstraintsFromFile } from '../chunk-KB26H447.js';
31
+ import { init_safeJsonParse, readJson } from '../chunk-RAN3ECAS.js';
32
+ import { __export } from '../chunk-W4GABFCR.js';
33
33
 
34
34
  // src/traits/AdvancedLightingTrait.ts
35
+ var ADVANCED_LIGHTING_RUNTIME_CLAIM = {
36
+ capability: "renderer-adapter",
37
+ runtimeBody: "node-state-and-events",
38
+ rendererRequired: true,
39
+ implementedFeatures: ["area_rect", "area_disk", "ies", "emissive_mesh", "cookie"],
40
+ omittedFeatures: [
41
+ "no in-core renderer",
42
+ "no in-core IES file parser",
43
+ "no complete WebGPU LTC polygon integration"
44
+ ]
45
+ };
46
+ function validateAdvancedLightingConfig(config) {
47
+ if (!Array.isArray(config.lights) || config.lights.length === 0) {
48
+ throw new Error("advanced_lighting requires at least one light entry");
49
+ }
50
+ for (const entry of config.lights) {
51
+ const validTypes = [
52
+ "area_rect",
53
+ "area_disk",
54
+ "ies",
55
+ "emissive_mesh",
56
+ "cookie"
57
+ ];
58
+ if (!validTypes.includes(entry.type)) {
59
+ throw new Error(`Unknown light type: ${entry.type}`);
60
+ }
61
+ if (entry.type === "area_rect") {
62
+ const c = entry.config;
63
+ if (c.width <= 0 || c.height <= 0) throw new Error("area_rect: width and height must be > 0");
64
+ if (c.intensity < 0) throw new Error("area_rect: intensity must be >= 0");
65
+ }
66
+ if (entry.type === "area_disk") {
67
+ const c = entry.config;
68
+ if (c.radius <= 0) throw new Error("area_disk: radius must be > 0");
69
+ }
70
+ if (entry.type === "ies") {
71
+ const c = entry.config;
72
+ if (!c.profilePath) throw new Error("ies: profilePath is required");
73
+ }
74
+ }
75
+ return true;
76
+ }
77
+ function cloneLightEntries(config) {
78
+ return config.lights.map((entry) => ({
79
+ ...entry,
80
+ config: { ...entry.config }
81
+ }));
82
+ }
83
+ function createRuntimeState(config, revision = 0) {
84
+ return {
85
+ active: true,
86
+ revision,
87
+ claim: ADVANCED_LIGHTING_RUNTIME_CLAIM,
88
+ lights: cloneLightEntries(config)
89
+ };
90
+ }
91
+ function getRuntimeState(node) {
92
+ return node.__advancedLightingState;
93
+ }
94
+ function eventPayload(event) {
95
+ return event.payload && typeof event.payload === "object" ? event.payload : {};
96
+ }
35
97
  var AdvancedLightingTrait = {
36
98
  name: "advanced_lighting",
37
99
  validate(config) {
38
- if (!Array.isArray(config.lights) || config.lights.length === 0) {
39
- throw new Error("advanced_lighting requires at least one light entry");
100
+ return validateAdvancedLightingConfig(config);
101
+ },
102
+ onAttach(node, config, context) {
103
+ validateAdvancedLightingConfig(config);
104
+ const state = createRuntimeState(config);
105
+ node.__advancedLightingState = state;
106
+ context.emit("advanced_lighting_attached", {
107
+ nodeId: node.id,
108
+ state,
109
+ rendererRequired: ADVANCED_LIGHTING_RUNTIME_CLAIM.rendererRequired
110
+ });
111
+ },
112
+ onDetach(node, _config, context) {
113
+ const state = getRuntimeState(node);
114
+ if (!state) return;
115
+ state.active = false;
116
+ context.emit("advanced_lighting_detached", { nodeId: node.id, revision: state.revision });
117
+ delete node.__advancedLightingState;
118
+ },
119
+ onEvent(node, _config, context, event) {
120
+ const state = getRuntimeState(node);
121
+ if (!state) return;
122
+ if (event.type === "advanced_lighting_update") {
123
+ const nextConfig = eventPayload(event).config;
124
+ if (!nextConfig) return;
125
+ validateAdvancedLightingConfig(nextConfig);
126
+ const nextState = createRuntimeState(nextConfig, state.revision + 1);
127
+ node.__advancedLightingState = nextState;
128
+ context.emit("advanced_lighting_updated", {
129
+ nodeId: node.id,
130
+ revision: nextState.revision,
131
+ state: nextState
132
+ });
133
+ return;
40
134
  }
41
- for (const entry of config.lights) {
42
- const validTypes = [
43
- "area_rect",
44
- "area_disk",
45
- "ies",
46
- "emissive_mesh",
47
- "cookie"
48
- ];
49
- if (!validTypes.includes(entry.type)) {
50
- throw new Error(`Unknown light type: ${entry.type}`);
51
- }
52
- if (entry.type === "area_rect") {
53
- const c = entry.config;
54
- if (c.width <= 0 || c.height <= 0)
55
- throw new Error("area_rect: width and height must be > 0");
56
- if (c.intensity < 0) throw new Error("area_rect: intensity must be >= 0");
57
- }
58
- if (entry.type === "area_disk") {
59
- const c = entry.config;
60
- if (c.radius <= 0) throw new Error("area_disk: radius must be > 0");
61
- }
62
- if (entry.type === "ies") {
63
- const c = entry.config;
64
- if (!c.profilePath) throw new Error("ies: profilePath is required");
65
- }
135
+ if (event.type === "advanced_lighting_query") {
136
+ context.emit("advanced_lighting_state", { nodeId: node.id, state });
66
137
  }
67
- return true;
68
138
  },
69
139
  compile(config, target) {
70
140
  const self = this;
@@ -231,8 +301,8 @@ function setupAdvancedLighting(scene) {${setup.join("\n")}
231
301
  (l) => l.type === "area_rect" || l.type === "area_disk"
232
302
  );
233
303
  return `
234
- // WebGPU \u2014 Area Light BRDF Integration
235
- // Linearly Transformed Cosines (LTC) for area lights
304
+ // WebGPU renderer adapter for area-light BRDF integration.
305
+ // Host renderers must provide LTC lookup textures and polygon integration.
236
306
 
237
307
  struct AreaLight {
238
308
  position: vec3<f32>,
@@ -252,8 +322,7 @@ fn evaluateLTC(normal: vec3<f32>, view: vec3<f32>, pos: vec3<f32>, roughness: f3
252
322
  let uv = vec2<f32>(roughness, sqrt(1.0 - NdotV));
253
323
  let ltcCoeffs = textureSample(ltcMat, ltcSampler, uv);
254
324
 
255
- // Transform to LTC space and integrate polygon
256
- // (full LTC polygon integration omitted \u2014 see Heitz 2016 paper)
325
+ // Adapter hook: host renderer supplies complete LTC polygon integration.
257
326
  return light.color * light.intensity;
258
327
  }
259
328
 
@@ -1415,6 +1484,251 @@ var avatarIntentHandler = {
1415
1484
  }
1416
1485
  };
1417
1486
 
1487
+ // src/traits/CollaborativeWorldTrait.ts
1488
+ var CollaborativeWorldTraitValidationError = class extends Error {
1489
+ constructor(field, reason) {
1490
+ super(`@collaborative-world validation error in "${field}": ${reason}`);
1491
+ this.field = field;
1492
+ this.reason = reason;
1493
+ this.name = "CollaborativeWorldTraitValidationError";
1494
+ }
1495
+ };
1496
+ var COLLABORATIVE_WORLD_TRAIT_DEFAULTS = {
1497
+ roomName: "Untitled Collaborative World",
1498
+ syncRateHz: 60,
1499
+ transformFields: ["position", "rotation", "scale"],
1500
+ conflictResolution: "lock_required",
1501
+ selectionLocks: true,
1502
+ lockTtlMs: 3e3,
1503
+ presenceCursors: true,
1504
+ cursorFrame: "world",
1505
+ presenceTimeoutMs: 5e3,
1506
+ concertBridge: true,
1507
+ debugGhosts: true,
1508
+ opLogLimit: 2048
1509
+ };
1510
+ var VALID_TRANSFORM_FIELDS = ["position", "rotation", "scale"];
1511
+ var VALID_CONFLICT_RESOLUTION = [
1512
+ "lock_required",
1513
+ "lamport_merge",
1514
+ "last_write_wins",
1515
+ "reject_remote"
1516
+ ];
1517
+ function boolFromUnknown(value) {
1518
+ if (typeof value === "boolean") return value;
1519
+ if (typeof value === "string") return ["true", "1", "yes", "on"].includes(value.toLowerCase());
1520
+ return Boolean(value);
1521
+ }
1522
+ function stringArray(value) {
1523
+ if (!Array.isArray(value)) return void 0;
1524
+ return value.map(String);
1525
+ }
1526
+ function parseCollaborativeWorldTraitConfig(raw) {
1527
+ const config = {};
1528
+ if (raw.roomName !== void 0) config.roomName = String(raw.roomName);
1529
+ if (raw.syncRateHz !== void 0) config.syncRateHz = Number(raw.syncRateHz);
1530
+ if (raw.transformFields !== void 0) {
1531
+ config.transformFields = stringArray(raw.transformFields);
1532
+ }
1533
+ if (raw.conflictResolution !== void 0) {
1534
+ config.conflictResolution = String(raw.conflictResolution);
1535
+ }
1536
+ if (raw.selectionLocks !== void 0) config.selectionLocks = boolFromUnknown(raw.selectionLocks);
1537
+ if (raw.lockTtlMs !== void 0) config.lockTtlMs = Number(raw.lockTtlMs);
1538
+ if (raw.presenceCursors !== void 0) config.presenceCursors = boolFromUnknown(raw.presenceCursors);
1539
+ if (raw.cursorFrame !== void 0) config.cursorFrame = String(raw.cursorFrame);
1540
+ if (raw.presenceTimeoutMs !== void 0) config.presenceTimeoutMs = Number(raw.presenceTimeoutMs);
1541
+ if (raw.concertBridge !== void 0) config.concertBridge = boolFromUnknown(raw.concertBridge);
1542
+ if (raw.debugGhosts !== void 0) config.debugGhosts = boolFromUnknown(raw.debugGhosts);
1543
+ if (raw.opLogLimit !== void 0) config.opLogLimit = Number(raw.opLogLimit);
1544
+ return config;
1545
+ }
1546
+ function validateCollaborativeWorldTraitConfig(config) {
1547
+ if (config.syncRateHz !== void 0 && (config.syncRateHz < 1 || config.syncRateHz > 120)) {
1548
+ throw new CollaborativeWorldTraitValidationError("syncRateHz", "Must be between 1 and 120 Hz");
1549
+ }
1550
+ if (config.lockTtlMs !== void 0 && (config.lockTtlMs < 250 || config.lockTtlMs > 6e4)) {
1551
+ throw new CollaborativeWorldTraitValidationError(
1552
+ "lockTtlMs",
1553
+ "Must be between 250 and 60000 ms"
1554
+ );
1555
+ }
1556
+ if (config.presenceTimeoutMs !== void 0 && (config.presenceTimeoutMs < 1e3 || config.presenceTimeoutMs > 12e4)) {
1557
+ throw new CollaborativeWorldTraitValidationError(
1558
+ "presenceTimeoutMs",
1559
+ "Must be between 1000 and 120000 ms"
1560
+ );
1561
+ }
1562
+ if (config.opLogLimit !== void 0 && (!Number.isInteger(config.opLogLimit) || config.opLogLimit < 1)) {
1563
+ throw new CollaborativeWorldTraitValidationError("opLogLimit", "Must be a positive integer");
1564
+ }
1565
+ if (config.conflictResolution !== void 0 && !VALID_CONFLICT_RESOLUTION.includes(config.conflictResolution)) {
1566
+ throw new CollaborativeWorldTraitValidationError(
1567
+ "conflictResolution",
1568
+ `Must be one of: ${VALID_CONFLICT_RESOLUTION.join(", ")}`
1569
+ );
1570
+ }
1571
+ if (config.cursorFrame !== void 0 && config.cursorFrame !== "world" && config.cursorFrame !== "viewport") {
1572
+ throw new CollaborativeWorldTraitValidationError("cursorFrame", 'Must be "world" or "viewport"');
1573
+ }
1574
+ if (config.transformFields) {
1575
+ for (const field of config.transformFields) {
1576
+ if (!VALID_TRANSFORM_FIELDS.includes(field)) {
1577
+ throw new CollaborativeWorldTraitValidationError(
1578
+ "transformFields",
1579
+ `Unsupported transform field: ${field}`
1580
+ );
1581
+ }
1582
+ }
1583
+ }
1584
+ }
1585
+ function resolveCollaborativeWorldTraitConfig(parsed) {
1586
+ return {
1587
+ roomName: parsed.roomName ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.roomName,
1588
+ syncRateHz: parsed.syncRateHz ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.syncRateHz,
1589
+ transformFields: parsed.transformFields ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.transformFields,
1590
+ conflictResolution: parsed.conflictResolution ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.conflictResolution,
1591
+ selectionLocks: parsed.selectionLocks ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.selectionLocks,
1592
+ lockTtlMs: parsed.lockTtlMs ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.lockTtlMs,
1593
+ presenceCursors: parsed.presenceCursors ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.presenceCursors,
1594
+ cursorFrame: parsed.cursorFrame ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.cursorFrame,
1595
+ presenceTimeoutMs: parsed.presenceTimeoutMs ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.presenceTimeoutMs,
1596
+ concertBridge: parsed.concertBridge ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.concertBridge,
1597
+ debugGhosts: parsed.debugGhosts ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.debugGhosts,
1598
+ opLogLimit: parsed.opLogLimit ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.opLogLimit
1599
+ };
1600
+ }
1601
+ function createCollaborativeWorldTraitConfig(rawConfig) {
1602
+ const parsed = parseCollaborativeWorldTraitConfig(rawConfig);
1603
+ validateCollaborativeWorldTraitConfig(parsed);
1604
+ return resolveCollaborativeWorldTraitConfig(parsed);
1605
+ }
1606
+ function createSelectionLock(entityId, ownerId, options = {}) {
1607
+ const acquiredAt = options.acquiredAt ?? Date.now();
1608
+ const ttlMs = options.ttlMs ?? COLLABORATIVE_WORLD_TRAIT_DEFAULTS.lockTtlMs;
1609
+ return {
1610
+ entityId,
1611
+ ownerId,
1612
+ lockId: options.lockId ?? `${ownerId}:${entityId}:${acquiredAt}`,
1613
+ mode: options.mode ?? "transform",
1614
+ acquiredAt,
1615
+ expiresAt: options.expiresAt ?? acquiredAt + ttlMs,
1616
+ version: options.version ?? 0
1617
+ };
1618
+ }
1619
+ function isSelectionLockActive(lock, now = Date.now()) {
1620
+ return lock.expiresAt > now;
1621
+ }
1622
+ function decideTransformOp(op, locks, config, now = Date.now()) {
1623
+ if (!config.selectionLocks) {
1624
+ return { status: "applied" };
1625
+ }
1626
+ const activeLock = Array.from(locks).find(
1627
+ (lock) => lock.entityId === op.entityId && isSelectionLockActive(lock, now)
1628
+ );
1629
+ if (!activeLock) {
1630
+ return config.conflictResolution === "lock_required" ? { status: "rejected", reason: "missing_selection_lock" } : { status: "applied" };
1631
+ }
1632
+ if (activeLock.ownerId === op.actorId || activeLock.lockId === op.lockId) {
1633
+ return { status: "applied" };
1634
+ }
1635
+ if (config.conflictResolution === "lamport_merge") {
1636
+ return { status: "conflict", reason: "remote_lock_present", blockingLock: activeLock };
1637
+ }
1638
+ return { status: "rejected", reason: "locked_by_another_actor", blockingLock: activeLock };
1639
+ }
1640
+ function applyTransformOp(current, op) {
1641
+ return {
1642
+ ...current,
1643
+ [op.field]: op.value,
1644
+ version: Math.max(current.version ?? 0, op.baseVersion ?? 0) + 1,
1645
+ updatedBy: op.actorId,
1646
+ updatedAt: op.timestamp
1647
+ };
1648
+ }
1649
+ function pruneCollaborativePresence(presence, now, timeoutMs) {
1650
+ return Array.from(presence).filter((cursor) => now - cursor.lastSeen <= timeoutMs);
1651
+ }
1652
+ function toUnrealConcertDescriptor(config) {
1653
+ return {
1654
+ protocol: "unreal-concert-compatible",
1655
+ syncRateHz: config.syncRateHz,
1656
+ transactionStream: "TransformDelta",
1657
+ selectionLockPolicy: config.selectionLocks ? config.conflictResolution : "disabled",
1658
+ presence: {
1659
+ enabled: config.presenceCursors,
1660
+ frame: config.cursorFrame,
1661
+ timeoutMs: config.presenceTimeoutMs
1662
+ },
1663
+ transformFields: config.transformFields,
1664
+ debugGhosts: config.debugGhosts
1665
+ };
1666
+ }
1667
+ var collaborativeWorldHandler = {
1668
+ name: "collaborative_world",
1669
+ defaultConfig: COLLABORATIVE_WORLD_TRAIT_DEFAULTS,
1670
+ onAttach(node, config, context) {
1671
+ const resolved2 = createCollaborativeWorldTraitConfig(config);
1672
+ const state = {
1673
+ config: resolved2,
1674
+ locks: /* @__PURE__ */ new Map(),
1675
+ presence: /* @__PURE__ */ new Map(),
1676
+ transforms: /* @__PURE__ */ new Map(),
1677
+ opLog: []
1678
+ };
1679
+ node.__collaborativeWorldState = state;
1680
+ context.emit?.("collaborative_world_init", {
1681
+ node,
1682
+ config: resolved2,
1683
+ concert: toUnrealConcertDescriptor(resolved2)
1684
+ });
1685
+ },
1686
+ onDetach(node, _config, context) {
1687
+ context.emit?.("collaborative_world_detached", { node });
1688
+ delete node.__collaborativeWorldState;
1689
+ },
1690
+ onEvent(node, _config, context, event) {
1691
+ const state = node.__collaborativeWorldState;
1692
+ if (!state) return;
1693
+ if (event.type === "collaborative_world_acquire_lock") {
1694
+ const payload = event.payload;
1695
+ const entityId = String(payload?.entityId ?? "");
1696
+ const ownerId = String(payload?.ownerId ?? "");
1697
+ if (!entityId || !ownerId) return;
1698
+ const lock = createSelectionLock(entityId, ownerId, {
1699
+ mode: payload?.mode ?? "transform",
1700
+ ttlMs: state.config.lockTtlMs
1701
+ });
1702
+ state.locks.set(entityId, lock);
1703
+ context.emit?.("collaborative_world_lock_acquired", { node, lock });
1704
+ } else if (event.type === "collaborative_world_release_lock") {
1705
+ const payload = event.payload;
1706
+ const entityId = String(payload?.entityId ?? "");
1707
+ state.locks.delete(entityId);
1708
+ context.emit?.("collaborative_world_lock_released", { node, entityId });
1709
+ } else if (event.type === "collaborative_world_presence_cursor") {
1710
+ const cursor = event.payload;
1711
+ if (cursor?.actorId) {
1712
+ state.presence.set(cursor.actorId, cursor);
1713
+ context.emit?.("collaborative_world_presence_updated", { node, cursor });
1714
+ }
1715
+ } else if (event.type === "collaborative_world_transform_op") {
1716
+ const op = event.payload;
1717
+ if (!op?.entityId || !op.actorId) return;
1718
+ const decision = decideTransformOp(op, state.locks.values(), state.config);
1719
+ if (decision.status === "applied") {
1720
+ const current = state.transforms.get(op.entityId) ?? {};
1721
+ state.transforms.set(op.entityId, applyTransformOp(current, op));
1722
+ state.opLog.push(op);
1723
+ if (state.opLog.length > state.config.opLogLimit) {
1724
+ state.opLog.splice(0, state.opLog.length - state.config.opLogLimit);
1725
+ }
1726
+ }
1727
+ context.emit?.("collaborative_world_transform_decision", { node, op, decision });
1728
+ }
1729
+ }
1730
+ };
1731
+
1418
1732
  // src/traits/CRDTRoomTraitHandler.ts
1419
1733
  var CRDTRoomTraitHandler = class {
1420
1734
  constructor(config) {
@@ -1900,7 +2214,6 @@ var dynamicRegionMaskHandler = {
1900
2214
  };
1901
2215
 
1902
2216
  // src/traits/EmergentSpacetimeTrait.ts
1903
- init_ProvenanceSemiring();
1904
2217
  function complexMul(a, b) {
1905
2218
  return {
1906
2219
  re: a.re * b.re - a.im * b.im,
@@ -2961,23 +3274,141 @@ var BakingProgressTracker = class {
2961
3274
  }
2962
3275
  };
2963
3276
  var GaussianBakingPipeline = class {
2964
- constructor(apiKey, config = {}, region) {
3277
+ constructor(apiKey, config = {}, region, sovereignTraining) {
2965
3278
  this.tracker = null;
2966
3279
  this.jobState = null;
2967
3280
  this.config = { ...DEFAULT_CONFIG, ...config };
2968
3281
  this.client = new GaussianBakingClient(apiKey, region);
3282
+ this.sovereignOpts = sovereignTraining ?? null;
2969
3283
  }
2970
3284
  /**
2971
3285
  * Get a cost estimate without submitting a job.
3286
+ *
3287
+ * When sovereign training is active, the training breakdown reflects
3288
+ * $0 GPU cost (local); only baking and compression use Render Network credits.
2972
3289
  */
2973
3290
  estimateCost(localOBScore, renderTokenPriceUSD) {
2974
- return this.client.estimateCost(this.config, localOBScore, renderTokenPriceUSD);
3291
+ const estimate = this.client.estimateCost(this.config, localOBScore, renderTokenPriceUSD);
3292
+ if (this.sovereignOpts) {
3293
+ const saved = estimate.breakdown.training;
3294
+ return {
3295
+ ...estimate,
3296
+ totalRENDER: Math.max(0, estimate.totalRENDER - saved),
3297
+ totalUSD: Math.max(0, estimate.totalUSD - saved * (renderTokenPriceUSD ?? 2)),
3298
+ breakdown: { ...estimate.breakdown, training: 0 }
3299
+ };
3300
+ }
3301
+ return estimate;
2975
3302
  }
2976
3303
  /**
2977
3304
  * Execute the full pipeline: submit, track, and download.
2978
- * Returns a promise that resolves when the pipeline completes.
3305
+ *
3306
+ * When `sovereignTraining` was provided at construction:
3307
+ * 1. Runs training locally via `dispatchGaussianTrainJobGPU` (WGSL kernels, $0).
3308
+ * 2. Converts the trained `Gaussian3D` result into a PLY upload URL (via
3309
+ * `GaussianBakingClient.createUploadSession`) so the remote pipeline receives
3310
+ * a pre-trained cloud and skips its own training stage.
3311
+ *
3312
+ * Falls through to the standard remote path if sovereign options are absent.
2979
3313
  */
2980
3314
  async execute(callbacks) {
3315
+ if (this.sovereignOpts) {
3316
+ return this._executeSovereign(callbacks);
3317
+ }
3318
+ return this._executeRemote(callbacks);
3319
+ }
3320
+ // ---------------------------------------------------------------------------
3321
+ // Sovereign execution — train locally, bake remotely
3322
+ // ---------------------------------------------------------------------------
3323
+ /**
3324
+ * Run the sovereign training path, then hand off to remote for bake+compress+download.
3325
+ * Training result is forwarded via `sourceUrl` (a PLY upload) with `captureFormat: 'ply'`
3326
+ * so the Render Network job skips its own training stage.
3327
+ */
3328
+ async _executeSovereign(callbacks) {
3329
+ const opts = this.sovereignOpts;
3330
+ const trainJob = {
3331
+ backend: "sovereign",
3332
+ hyperparams: {
3333
+ iterations: this.config.trainingIterations,
3334
+ learningRates: {
3335
+ position: this.config.positionLR,
3336
+ scale: this.config.positionLR * 5,
3337
+ // standard 3DGS ratio
3338
+ rotation: this.config.positionLR * 0.5,
3339
+ opacity: 0.05,
3340
+ color: 25e-4
3341
+ },
3342
+ dilation: 0.3,
3343
+ densifyInterval: this.config.densificationInterval > 0 ? this.config.densificationInterval : void 0,
3344
+ targetGaussians: this.config.targetGaussianCount
3345
+ }
3346
+ };
3347
+ let trainResult;
3348
+ try {
3349
+ trainResult = await opts.trainer(
3350
+ trainJob,
3351
+ opts.initial,
3352
+ opts.views,
3353
+ opts.gpuDevice,
3354
+ opts.bg,
3355
+ opts.onProgress
3356
+ );
3357
+ } catch (err) {
3358
+ throw new BakingPipelineError(
3359
+ `Sovereign GPU training failed: ${err instanceof Error ? err.message : String(err)}`,
3360
+ "SOVEREIGN_TRAIN_FAILED",
3361
+ "training",
3362
+ /* retryable */
3363
+ true
3364
+ );
3365
+ }
3366
+ const bakeConfig = {
3367
+ ...this.config,
3368
+ captureFormat: "ply",
3369
+ source: this.config.source || `sovereign://trained?gaussians=${trainResult.finalCount}`
3370
+ };
3371
+ this.jobState = await this.client.submitBakingJob(bakeConfig);
3372
+ this.jobState.trainingMetrics = {
3373
+ gaussianCount: trainResult.finalCount,
3374
+ iterationsCompleted: trainResult.iterations,
3375
+ peakGPUMemoryMB: 0,
3376
+ // unknown at this level (WebGPU doesn't expose)
3377
+ psnr: 0,
3378
+ // L1 loss used; PSNR not computed here
3379
+ ssim: 0,
3380
+ lpips: 0,
3381
+ trainingTimeSecs: 0,
3382
+ // not timed at pipeline level
3383
+ gpuType: "sovereign-webgpu"
3384
+ };
3385
+ this.tracker = new BakingProgressTracker(this.client, this.jobState, {
3386
+ pollIntervalMs: 5e3,
3387
+ maxPollDurationMs: 120 * 60 * 1e3
3388
+ });
3389
+ return new Promise((resolve2, reject) => {
3390
+ if (!this.tracker) {
3391
+ reject(new Error("Tracker not initialized"));
3392
+ return;
3393
+ }
3394
+ this.tracker.on("progress", (state) => callbacks?.onProgress?.(state)).on("stageTransition", (prev, next, state) => callbacks?.onStageTransition?.(prev, next, state)).on("complete", async (state) => {
3395
+ callbacks?.onComplete?.(state);
3396
+ try {
3397
+ state.outputs = await this.client.getOutputs(state.jobId);
3398
+ } catch {
3399
+ }
3400
+ resolve2(state);
3401
+ }).on("error", (error, state) => {
3402
+ callbacks?.onError?.(error, state);
3403
+ reject(error);
3404
+ });
3405
+ this.tracker.start();
3406
+ });
3407
+ }
3408
+ // ---------------------------------------------------------------------------
3409
+ // Remote execution — full cloud pipeline (original path)
3410
+ // ---------------------------------------------------------------------------
3411
+ async _executeRemote(callbacks) {
2981
3412
  this.jobState = await this.client.submitBakingJob(this.config);
2982
3413
  this.tracker = new BakingProgressTracker(this.client, this.jobState, {
2983
3414
  pollIntervalMs: 5e3,
@@ -3024,6 +3455,12 @@ var GaussianBakingPipeline = class {
3024
3455
  };
3025
3456
  return { refundedRENDER: result.refundedRENDER };
3026
3457
  }
3458
+ /**
3459
+ * Returns true if this pipeline is configured to use the sovereign GPU training path.
3460
+ */
3461
+ hasSovereignTraining() {
3462
+ return this.sovereignOpts !== null;
3463
+ }
3027
3464
  /**
3028
3465
  * Get current job state.
3029
3466
  */
@@ -3986,6 +4423,168 @@ var grabbableHandler = {
3986
4423
  }
3987
4424
  };
3988
4425
 
4426
+ // src/traits/GrabFeedbackProfileTrait.ts
4427
+ function lerp(a, b, t) {
4428
+ const tc = Math.min(1, Math.max(0, t));
4429
+ return a + (b - a) * tc;
4430
+ }
4431
+ function deriveBloomEmissive(rampElapsedMs, rampMs, fromEmissive, toEmissive) {
4432
+ if (rampMs <= 0) return toEmissive;
4433
+ return lerp(fromEmissive, toEmissive, rampElapsedMs / rampMs);
4434
+ }
4435
+ var grabFeedbackProfileHandler = {
4436
+ name: "grab_feedback_profile",
4437
+ defaultConfig: {
4438
+ haptic: {
4439
+ grab: "soft_pulse",
4440
+ throw: "sharp_snap",
4441
+ release: "click",
4442
+ intensity: 0.7,
4443
+ duration_ms: 100
4444
+ },
4445
+ audio: {
4446
+ grab: "",
4447
+ release: "",
4448
+ volume: 0.6,
4449
+ spatial: true,
4450
+ max_distance: 6
4451
+ },
4452
+ bloom: {
4453
+ idle_intensity: 0.8,
4454
+ held_intensity: 2.5,
4455
+ ramp_ms: 80
4456
+ }
4457
+ },
4458
+ onAttach(node, config, context) {
4459
+ const state = {
4460
+ holding: false,
4461
+ rampElapsedMs: 0,
4462
+ rampFromEmissive: config.bloom.idle_intensity,
4463
+ rampToEmissive: config.bloom.idle_intensity,
4464
+ currentEmissive: config.bloom.idle_intensity
4465
+ };
4466
+ node.__grabFeedbackProfileState = state;
4467
+ if (config.audio.grab) {
4468
+ context.emit?.("audio_preload", { url: config.audio.grab, node });
4469
+ }
4470
+ if (config.audio.release && config.audio.release !== config.audio.grab) {
4471
+ context.emit?.("audio_preload", { url: config.audio.release, node });
4472
+ }
4473
+ context.emit?.("grab_feedback_profile_attached", {
4474
+ node,
4475
+ haptic: config.haptic,
4476
+ audio: config.audio,
4477
+ bloom: config.bloom
4478
+ });
4479
+ },
4480
+ onDetach(node, _config, context) {
4481
+ delete node.__grabFeedbackProfileState;
4482
+ context.emit?.("grab_feedback_profile_detached", { node });
4483
+ },
4484
+ onUpdate(node, config, context, delta) {
4485
+ const state = node.__grabFeedbackProfileState;
4486
+ if (!state) return;
4487
+ const rampMs = config.bloom.ramp_ms;
4488
+ if (state.rampElapsedMs < rampMs || state.currentEmissive !== state.rampToEmissive) {
4489
+ state.rampElapsedMs += delta * 1e3;
4490
+ state.currentEmissive = deriveBloomEmissive(
4491
+ state.rampElapsedMs,
4492
+ rampMs,
4493
+ state.rampFromEmissive,
4494
+ state.rampToEmissive
4495
+ );
4496
+ context.emit?.("grab_feedback_profile_bloom", {
4497
+ node,
4498
+ emissive: state.currentEmissive,
4499
+ t: state.rampElapsedMs,
4500
+ holding: state.holding
4501
+ });
4502
+ }
4503
+ },
4504
+ onEvent(node, config, context, event) {
4505
+ const state = node.__grabFeedbackProfileState;
4506
+ if (!state) return;
4507
+ const isGrab = event.type === "grab" || event.type === "grabbed";
4508
+ const isThrow = event.type === "throw" || event.type === "thrown";
4509
+ const isRelease = event.type === "release" || event.type === "released";
4510
+ if (isGrab && !state.holding) {
4511
+ state.holding = true;
4512
+ state.rampFromEmissive = state.currentEmissive;
4513
+ state.rampToEmissive = config.bloom.held_intensity;
4514
+ state.rampElapsedMs = 0;
4515
+ if (config.haptic.grab !== "none") {
4516
+ context.emit?.("grab_feedback_profile_haptic", {
4517
+ node,
4518
+ event: "grab",
4519
+ preset: config.haptic.grab,
4520
+ intensity: config.haptic.intensity,
4521
+ duration_ms: config.haptic.duration_ms
4522
+ });
4523
+ context.emit?.("haptic_play", {
4524
+ node,
4525
+ pattern: config.haptic.grab,
4526
+ intensity: config.haptic.intensity,
4527
+ duration: config.haptic.duration_ms
4528
+ });
4529
+ }
4530
+ if (config.audio.grab) {
4531
+ context.emit?.("grab_feedback_profile_audio", {
4532
+ node,
4533
+ event: "grab",
4534
+ url: config.audio.grab,
4535
+ volume: config.audio.volume,
4536
+ spatial: config.audio.spatial
4537
+ });
4538
+ context.emit?.("audio_cue_play", {
4539
+ node,
4540
+ url: config.audio.grab,
4541
+ volume: config.audio.volume,
4542
+ spatial: config.audio.spatial
4543
+ });
4544
+ }
4545
+ return;
4546
+ }
4547
+ if ((isThrow || isRelease) && state.holding) {
4548
+ state.holding = false;
4549
+ state.rampFromEmissive = state.currentEmissive;
4550
+ state.rampToEmissive = config.bloom.idle_intensity;
4551
+ state.rampElapsedMs = 0;
4552
+ const hapticPreset = isThrow ? config.haptic.throw : config.haptic.release;
4553
+ if (hapticPreset !== "none") {
4554
+ context.emit?.("grab_feedback_profile_haptic", {
4555
+ node,
4556
+ event: isThrow ? "throw" : "release",
4557
+ preset: hapticPreset,
4558
+ intensity: config.haptic.intensity,
4559
+ duration_ms: config.haptic.duration_ms
4560
+ });
4561
+ context.emit?.("haptic_play", {
4562
+ node,
4563
+ pattern: hapticPreset,
4564
+ intensity: config.haptic.intensity,
4565
+ duration: config.haptic.duration_ms
4566
+ });
4567
+ }
4568
+ if (config.audio.release) {
4569
+ context.emit?.("grab_feedback_profile_audio", {
4570
+ node,
4571
+ event: isThrow ? "throw" : "release",
4572
+ url: config.audio.release,
4573
+ volume: config.audio.volume,
4574
+ spatial: config.audio.spatial
4575
+ });
4576
+ context.emit?.("audio_cue_play", {
4577
+ node,
4578
+ url: config.audio.release,
4579
+ volume: config.audio.volume,
4580
+ spatial: config.audio.spatial
4581
+ });
4582
+ }
4583
+ return;
4584
+ }
4585
+ }
4586
+ };
4587
+
3989
4588
  // src/traits/HolomeshSocialTraits.ts
3990
4589
  var VISITOR_MILESTONES = [10, 50, 100, 500, 1e3, 5e3, 1e4];
3991
4590
  var agentProfileHandler = {
@@ -6492,6 +7091,43 @@ var hungarianAssignmentHandler = {
6492
7091
  }
6493
7092
  };
6494
7093
 
7094
+ // src/traits/LanguageAdapterTrait.ts
7095
+ var LANGUAGE_ADAPTER_TRAIT_NAME = "language_adapter";
7096
+ var languageAdapterHandler = {
7097
+ name: LANGUAGE_ADAPTER_TRAIT_NAME,
7098
+ category: "data",
7099
+ defaultConfig: {
7100
+ language: "plaintext",
7101
+ grammarPackage: null,
7102
+ extensions: [],
7103
+ symbols: [],
7104
+ imports: [],
7105
+ calls: []
7106
+ },
7107
+ properties: [
7108
+ { name: "language", type: "string", required: true },
7109
+ { name: "grammarPackage", type: "string", required: false },
7110
+ { name: "extensions", type: "array", required: true },
7111
+ { name: "symbols", type: "array", required: false },
7112
+ { name: "imports", type: "array", required: false },
7113
+ { name: "calls", type: "array", required: false }
7114
+ ],
7115
+ onAttach(node, config, context) {
7116
+ node.__languageAdapterTrait = {
7117
+ config,
7118
+ registeredAt: Date.now()
7119
+ };
7120
+ context.emit?.("language_adapter:ready", {
7121
+ language: config.language,
7122
+ extensions: config.extensions,
7123
+ grammarPackage: config.grammarPackage ?? config.grammar ?? null
7124
+ });
7125
+ },
7126
+ onDetach(node) {
7127
+ delete node.__languageAdapterTrait;
7128
+ }
7129
+ };
7130
+
6495
7131
  // src/traits/KalmanFilterTrait.ts
6496
7132
  function zeroVec() {
6497
7133
  return { x: 0, y: 0, z: 0 };
@@ -6922,7 +7558,7 @@ async function buildReceipt(result, config, molecule) {
6922
7558
  async function dispatchVQE(config, moleculeAtoms, onEnergy) {
6923
7559
  const t0 = Date.now();
6924
7560
  try {
6925
- const qmBridge = await import('../src-J6CM4AUR.js').catch(() => null);
7561
+ const qmBridge = await import('../src-UXYA7HM6.js').catch(() => null);
6926
7562
  if (qmBridge && typeof qmBridge.createIBMQuantumBackend === "function") {
6927
7563
  const createBackend = qmBridge.createIBMQuantumBackend;
6928
7564
  const backend = createBackend({
@@ -8149,9 +8785,6 @@ contract PackageVerifier {
8149
8785
  }
8150
8786
  };
8151
8787
 
8152
- // src/traits/index.ts
8153
- init_BotanicalLotusTrait();
8154
-
8155
8788
  // src/traits/BioluminescentTrait.ts
8156
8789
  var DEFAULT_PULSE_BPM = 12;
8157
8790
  var DEFAULT_RADIUS_FALLOFF = 2.5;
@@ -8265,7 +8898,7 @@ function patternAt(pattern, nodePosition, elapsedSeconds, scale, seed) {
8265
8898
  if (pattern === "voronoi") return voronoi3D(x, y, z, seed | 0);
8266
8899
  return valueNoise3D(x, y, z, seed | 0);
8267
8900
  }
8268
- function lerp(a, b, t) {
8901
+ function lerp2(a, b, t) {
8269
8902
  return a + (b - a) * t;
8270
8903
  }
8271
8904
  function deriveBioluminescentOutput(config, nodePosition, observerPosition, elapsedSeconds) {
@@ -8280,7 +8913,7 @@ function deriveBioluminescentOutput(config, nodePosition, observerPosition, elap
8280
8913
  );
8281
8914
  const prox = proximityAt(nodePosition, observerPosition, config.radius_falloff);
8282
8915
  const weight = clamp01(pulse * patternValue * prox);
8283
- const intensity = lerp(config.min_intensity, config.max_intensity, weight);
8916
+ const intensity = lerp2(config.min_intensity, config.max_intensity, weight);
8284
8917
  return {
8285
8918
  color: config.color,
8286
8919
  intensity,
@@ -9627,44 +10260,192 @@ ${JSON.stringify(config, null, 2)}`;
9627
10260
  }
9628
10261
  };
9629
10262
 
9630
- // src/traits/RewardTrait.ts
9631
- function toVec3(value) {
9632
- if (!Array.isArray(value) || value.length < 3) return null;
9633
- const [x, y, z] = value;
9634
- if (typeof x !== "number" || typeof y !== "number" || typeof z !== "number") return null;
9635
- return [x, y, z];
9636
- }
9637
- function resolveTargetPosition(targetId, context) {
9638
- if (!targetId) return null;
9639
- const physicsPos = toVec3(context?.physics?.getBodyPosition?.(targetId));
9640
- if (physicsPos) return physicsPos;
9641
- const state = context?.getState?.();
9642
- const sceneNodePos = toVec3(state?.scene?.nodes?.[targetId]?.position) || toVec3(state?.nodes?.[targetId]?.position) || toVec3(state?.objects?.[targetId]?.position);
9643
- if (sceneNodePos) return sceneNodePos;
9644
- return null;
9645
- }
9646
- var rewardTraitHandler = {
9647
- name: "@reward",
9648
- defaultConfig: {
9649
- events: [
9650
- {
9651
- type: "distance",
9652
- weight: 1,
9653
- config: { targetObjectId: "", maxDist: 10 }
9654
- }
9655
- ],
9656
- normalizeReward: true,
9657
- decayFactor: 0.99,
9658
- resetOnCollision: false,
9659
- verbose: false
9660
- },
10263
+ // src/traits/ReducedOrderModelTrait.ts
10264
+ var DEFAULT_CONFIG2 = {
10265
+ model_id: "",
10266
+ input_names: [],
10267
+ output_names: [],
10268
+ coefficients: {},
10269
+ error_bounds: {},
10270
+ training_trace_hashes: [],
10271
+ cael_receipt_hash: "",
10272
+ deployment_target: "browser"
10273
+ };
10274
+ var reducedOrderModelHandler = {
10275
+ name: "reduced_order_model",
10276
+ defaultConfig: DEFAULT_CONFIG2,
9661
10277
  onAttach(node, config, context) {
9662
10278
  const state = {
9663
- accumulatedReward: 0,
9664
- lastSignal: 0,
9665
- timestep: 0,
9666
- collisionThisFrame: false,
9667
- previousPositions: /* @__PURE__ */ new Map(),
10279
+ modelId: config.model_id,
10280
+ ready: isModelConfigReady(config),
10281
+ lastInputs: null,
10282
+ lastOutputs: null,
10283
+ stepCount: 0
10284
+ };
10285
+ node.__reducedOrderModelState = state;
10286
+ context.emit?.("rom_model_attached", {
10287
+ node,
10288
+ modelId: config.model_id,
10289
+ ready: state.ready,
10290
+ inputNames: config.input_names,
10291
+ outputNames: config.output_names,
10292
+ errorBounds: config.error_bounds,
10293
+ caelReceiptHash: config.cael_receipt_hash
10294
+ });
10295
+ },
10296
+ onDetach(node, _config, context) {
10297
+ const state = getState6(node);
10298
+ if (state) {
10299
+ context.emit?.("rom_model_detached", {
10300
+ node,
10301
+ modelId: state.modelId,
10302
+ stepCount: state.stepCount
10303
+ });
10304
+ }
10305
+ delete node.__reducedOrderModelState;
10306
+ },
10307
+ onEvent(node, config, context, event) {
10308
+ const state = getState6(node);
10309
+ if (!state) return;
10310
+ if (event.type === "rom_step" || event.type === "rom:step") {
10311
+ if (!state.ready) {
10312
+ context.emit?.("rom_error", { node, modelId: config.model_id, error: "model_not_ready" });
10313
+ return;
10314
+ }
10315
+ const inputs = numericRecord(recordFromEvent(event, "inputs"));
10316
+ const outputs = stepReducedOrderModel(config, inputs);
10317
+ state.lastInputs = inputs;
10318
+ state.lastOutputs = outputs;
10319
+ state.stepCount += 1;
10320
+ context.emit?.("rom_output", {
10321
+ node,
10322
+ modelId: config.model_id,
10323
+ inputs,
10324
+ outputs,
10325
+ stepCount: state.stepCount,
10326
+ errorBounds: config.error_bounds,
10327
+ caelReceiptHash: config.cael_receipt_hash
10328
+ });
10329
+ }
10330
+ if (event.type === "rom_query" || event.type === "rom:query") {
10331
+ context.emit?.("rom_info", {
10332
+ node,
10333
+ modelId: config.model_id,
10334
+ ready: state.ready,
10335
+ stepCount: state.stepCount,
10336
+ lastInputs: state.lastInputs,
10337
+ lastOutputs: state.lastOutputs,
10338
+ trainingTraceHashes: config.training_trace_hashes,
10339
+ errorBounds: config.error_bounds,
10340
+ deploymentTarget: config.deployment_target
10341
+ });
10342
+ }
10343
+ if (event.type === "rom_validate" || event.type === "rom:validate") {
10344
+ const actual = numericRecord(recordFromEvent(event, "actualOutputs"));
10345
+ const predicted = state.lastOutputs ?? {};
10346
+ const errors = Object.fromEntries(
10347
+ config.output_names.map((name) => [
10348
+ name,
10349
+ Math.abs((predicted[name] ?? 0) - (actual[name] ?? 0))
10350
+ ])
10351
+ );
10352
+ const passed = config.output_names.every((name) => {
10353
+ const bound = config.error_bounds[name] ?? Number.POSITIVE_INFINITY;
10354
+ return (errors[name] ?? Number.POSITIVE_INFINITY) <= bound;
10355
+ });
10356
+ context.emit?.("rom_validation_result", {
10357
+ node,
10358
+ modelId: config.model_id,
10359
+ passed,
10360
+ errors,
10361
+ errorBounds: config.error_bounds,
10362
+ caelReceiptHash: config.cael_receipt_hash
10363
+ });
10364
+ }
10365
+ }
10366
+ };
10367
+ function stepReducedOrderModel(config, inputs) {
10368
+ const outputs = {};
10369
+ for (const outputName of config.output_names) {
10370
+ const coefficient = config.coefficients[outputName];
10371
+ if (!coefficient) {
10372
+ outputs[outputName] = Number.NaN;
10373
+ continue;
10374
+ }
10375
+ let value = coefficient.intercept;
10376
+ for (const inputName of config.input_names) {
10377
+ value += (coefficient.weights[inputName] ?? 0) * (inputs[inputName] ?? 0);
10378
+ }
10379
+ outputs[outputName] = value;
10380
+ }
10381
+ return outputs;
10382
+ }
10383
+ function isModelConfigReady(config) {
10384
+ return config.model_id.length > 0 && config.input_names.length > 0 && config.output_names.length > 0 && config.output_names.every((name) => Boolean(config.coefficients[name]));
10385
+ }
10386
+ function getState6(node) {
10387
+ const value = node.__reducedOrderModelState;
10388
+ return value && typeof value === "object" ? value : null;
10389
+ }
10390
+ function recordFromEvent(event, key) {
10391
+ const payload = event.payload && typeof event.payload === "object" ? event.payload : {};
10392
+ const fromPayload = payload[key];
10393
+ if (fromPayload && typeof fromPayload === "object" && !Array.isArray(fromPayload)) {
10394
+ return fromPayload;
10395
+ }
10396
+ const direct = event[key];
10397
+ if (direct && typeof direct === "object" && !Array.isArray(direct)) {
10398
+ return direct;
10399
+ }
10400
+ return {};
10401
+ }
10402
+ function numericRecord(record) {
10403
+ const out = {};
10404
+ for (const [key, value] of Object.entries(record)) {
10405
+ const numeric = Number(value);
10406
+ if (Number.isFinite(numeric)) out[key] = numeric;
10407
+ }
10408
+ return out;
10409
+ }
10410
+
10411
+ // src/traits/RewardTrait.ts
10412
+ function toVec3(value) {
10413
+ if (!Array.isArray(value) || value.length < 3) return null;
10414
+ const [x, y, z] = value;
10415
+ if (typeof x !== "number" || typeof y !== "number" || typeof z !== "number") return null;
10416
+ return [x, y, z];
10417
+ }
10418
+ function resolveTargetPosition(targetId, context) {
10419
+ if (!targetId) return null;
10420
+ const physicsPos = toVec3(context?.physics?.getBodyPosition?.(targetId));
10421
+ if (physicsPos) return physicsPos;
10422
+ const state = context?.getState?.();
10423
+ const sceneNodePos = toVec3(state?.scene?.nodes?.[targetId]?.position) || toVec3(state?.nodes?.[targetId]?.position) || toVec3(state?.objects?.[targetId]?.position);
10424
+ if (sceneNodePos) return sceneNodePos;
10425
+ return null;
10426
+ }
10427
+ var rewardTraitHandler = {
10428
+ name: "@reward",
10429
+ defaultConfig: {
10430
+ events: [
10431
+ {
10432
+ type: "distance",
10433
+ weight: 1,
10434
+ config: { targetObjectId: "", maxDist: 10 }
10435
+ }
10436
+ ],
10437
+ normalizeReward: true,
10438
+ decayFactor: 0.99,
10439
+ resetOnCollision: false,
10440
+ verbose: false
10441
+ },
10442
+ onAttach(node, config, context) {
10443
+ const state = {
10444
+ accumulatedReward: 0,
10445
+ lastSignal: 0,
10446
+ timestep: 0,
10447
+ collisionThisFrame: false,
10448
+ previousPositions: /* @__PURE__ */ new Map(),
9668
10449
  eventScores: /* @__PURE__ */ new Map()
9669
10450
  };
9670
10451
  for (const event of config.events) {
@@ -11115,8 +11896,12 @@ ${hashtags}
11115
11896
  ${url}`;
11116
11897
  return `https://twitter.com/intent/tweet?text=${encodeURIComponent(text)}`;
11117
11898
  }
11118
- function generateQRCodeUrl(sceneUrl) {
11119
- return `https://api.qrserver.com/v1/create-qr-code/?size=200x200&data=${encodeURIComponent(sceneUrl)}`;
11899
+ async function generateQRCodeUrl(sceneUrl) {
11900
+ const QRCode = await import('qrcode');
11901
+ return QRCode.toDataURL(sceneUrl, {
11902
+ width: 200,
11903
+ margin: 2
11904
+ });
11120
11905
  }
11121
11906
  var socialTraitHandlers = {
11122
11907
  shareable: shareableHandler,
@@ -11134,7 +11919,7 @@ Objects schema: { id, type(mesh|splat|volume), geometry(box|sphere|cylinder|plan
11134
11919
  Lights schema: { id, type(directional|point|spot), color(hex), intensity, position[x,y,z], castShadow }
11135
11920
  Materials schema: key \u2192 { type(pbr|unlit|toon|holographic), color(hex), metalness, roughness, emissive, emissiveIntensity }
11136
11921
  Respond ONLY with valid JSON. No commentary.`;
11137
- var DEFAULT_CONFIG2 = {
11922
+ var DEFAULT_CONFIG3 = {
11138
11923
  model: "llama3",
11139
11924
  llm_base_url: "http://localhost:11434",
11140
11925
  llm_api_key: "",
@@ -11251,7 +12036,7 @@ function parseBlueprint(json) {
11251
12036
  return readJson(cleaned);
11252
12037
  }
11253
12038
  var spatialAgentHandler = {
11254
- defaultConfig: DEFAULT_CONFIG2,
12039
+ defaultConfig: DEFAULT_CONFIG3,
11255
12040
  onAttach(node, _config, ctx) {
11256
12041
  const state = {
11257
12042
  isReady: true,
@@ -13544,6 +14329,116 @@ function getQuotaDefault(tier, key) {
13544
14329
  return QUOTA_DEFAULTS[tier]?.[key] ?? 0;
13545
14330
  }
13546
14331
 
14332
+ // src/traits/TelescopeOpticsTrait.ts
14333
+ function computeTelescopeOptics(cfg) {
14334
+ const magnification = cfg.focal_length_mm / cfg.eyepiece_focal_length_mm * cfg.barlow_factor;
14335
+ const fov_deg = cfg.apparent_fov_deg / magnification;
14336
+ const exit_pupil_mm = cfg.objective_diameter_mm / magnification;
14337
+ const limiting_magnitude = 2.1 + 5 * Math.log10(cfg.objective_diameter_mm);
14338
+ const dawes_limit_arcsec = 116 / cfg.objective_diameter_mm;
14339
+ const diffraction_rings_visible = magnification > 0.75 * cfg.objective_diameter_mm;
14340
+ return {
14341
+ magnification,
14342
+ fov_deg,
14343
+ exit_pupil_mm,
14344
+ limiting_magnitude,
14345
+ dawes_limit_arcsec,
14346
+ diffraction_rings_visible
14347
+ };
14348
+ }
14349
+ function validateTelescopeOptics(cfg, derived) {
14350
+ const warnings = {};
14351
+ if (derived.exit_pupil_mm > cfg.max_eye_pupil_mm) {
14352
+ warnings.exit_pupil_too_large = true;
14353
+ }
14354
+ if (derived.exit_pupil_mm < 0.5) {
14355
+ warnings.exit_pupil_too_small = true;
14356
+ }
14357
+ if (derived.magnification > 2 * cfg.objective_diameter_mm) {
14358
+ warnings.magnification_exceeds_max = true;
14359
+ }
14360
+ return warnings;
14361
+ }
14362
+ var traitState2 = /* @__PURE__ */ new WeakMap();
14363
+ var telescopeOpticsHandler = {
14364
+ name: "telescope_optics",
14365
+ defaultConfig: {
14366
+ objective_diameter_mm: 200,
14367
+ focal_length_mm: 1e3,
14368
+ eyepiece_focal_length_mm: 10,
14369
+ barlow_factor: 1,
14370
+ apparent_fov_deg: 52,
14371
+ max_eye_pupil_mm: 7
14372
+ },
14373
+ onAttach(node, config, context) {
14374
+ const derived = computeTelescopeOptics(config);
14375
+ const warnings = validateTelescopeOptics(config, derived);
14376
+ traitState2.set(node, { derived, warnings });
14377
+ if (warnings.exit_pupil_too_large) {
14378
+ logger.warn(
14379
+ `[TelescopeOpticsTrait] ${node.name}: exit_pupil ${derived.exit_pupil_mm.toFixed(2)} mm exceeds max_eye_pupil ${config.max_eye_pupil_mm} mm \u2014 light will be wasted; increase magnification or use a shorter eyepiece.`
14380
+ );
14381
+ }
14382
+ if (warnings.exit_pupil_too_small) {
14383
+ logger.warn(
14384
+ `[TelescopeOpticsTrait] ${node.name}: exit_pupil ${derived.exit_pupil_mm.toFixed(2)} mm is below 0.5 mm \u2014 image will be very dim; decrease magnification.`
14385
+ );
14386
+ }
14387
+ if (warnings.magnification_exceeds_max) {
14388
+ logger.warn(
14389
+ `[TelescopeOpticsTrait] ${node.name}: magnification ${derived.magnification.toFixed(0)}\xD7 exceeds 2\xD7 aperture limit (${2 * config.objective_diameter_mm}\xD7) \u2014 image quality will degrade; reduce Barlow factor or use a longer eyepiece.`
14390
+ );
14391
+ }
14392
+ context.emit("telescope_optics_ready", {
14393
+ nodeId: node.id,
14394
+ ...derived,
14395
+ warnings
14396
+ });
14397
+ },
14398
+ onDetach(node, _config, context) {
14399
+ if (traitState2.has(node)) {
14400
+ context.emit("telescope_optics_detach", { nodeId: node.id });
14401
+ traitState2.delete(node);
14402
+ }
14403
+ },
14404
+ onEvent(node, config, context, event) {
14405
+ switch (event.type) {
14406
+ // Recalculate with a new config patch and re-emit.
14407
+ case "telescope_optics_reconfigure": {
14408
+ const patch = event.config;
14409
+ if (!patch) break;
14410
+ const merged = { ...config, ...patch };
14411
+ const derived = computeTelescopeOptics(merged);
14412
+ const warnings = validateTelescopeOptics(merged, derived);
14413
+ const state = traitState2.get(node);
14414
+ if (state) {
14415
+ state.derived = derived;
14416
+ state.warnings = warnings;
14417
+ }
14418
+ context.emit("telescope_optics_updated", {
14419
+ nodeId: node.id,
14420
+ ...derived,
14421
+ warnings
14422
+ });
14423
+ break;
14424
+ }
14425
+ // Return full current state snapshot for debugging / HoloScript queries.
14426
+ case "telescope_optics_query": {
14427
+ const state = traitState2.get(node);
14428
+ if (!state) break;
14429
+ context.emit("telescope_optics_info", {
14430
+ queryId: event.queryId,
14431
+ nodeId: node.id,
14432
+ config: { ...config },
14433
+ ...state.derived,
14434
+ warnings: { ...state.warnings }
14435
+ });
14436
+ break;
14437
+ }
14438
+ }
14439
+ }
14440
+ };
14441
+
13547
14442
  // src/traits/TelemetryTrait.ts
13548
14443
  var telemetryHandler = {
13549
14444
  name: "telemetry",
@@ -13615,6 +14510,176 @@ var telemetryHandler = {
13615
14510
  }
13616
14511
  };
13617
14512
 
14513
+ // src/traits/TraitTimeOfDay.ts
14514
+ var TIME_OF_DAY_PHASES = ["dawn", "golden", "dusk", "dark"];
14515
+ var DEFAULT_CYCLE_DURATION_MINUTES = 24;
14516
+ var DEFAULT_START_PHASE = "golden";
14517
+ var DEFAULT_PHASE_CONFIGS = {
14518
+ dawn: {
14519
+ sun_intensity: 0.25,
14520
+ ambient_light: 0.1,
14521
+ fog_density: 0.032,
14522
+ sky_exposure: 0.6,
14523
+ fog_color: "#3a4a7a",
14524
+ ambient_color: "#2a3060"
14525
+ },
14526
+ golden: {
14527
+ sun_intensity: 0.6,
14528
+ ambient_light: 0.18,
14529
+ fog_density: 0.018,
14530
+ sky_exposure: 1,
14531
+ fog_color: "#4a5a7a",
14532
+ ambient_color: "#2a3d6b"
14533
+ },
14534
+ dusk: {
14535
+ sun_intensity: 0.3,
14536
+ ambient_light: 0.14,
14537
+ fog_density: 0.024,
14538
+ sky_exposure: 0.7,
14539
+ fog_color: "#503060",
14540
+ ambient_color: "#3a2850"
14541
+ },
14542
+ dark: {
14543
+ sun_intensity: 0.02,
14544
+ ambient_light: 0.06,
14545
+ fog_density: 0.04,
14546
+ sky_exposure: 0.2,
14547
+ fog_color: "#0a0e1e",
14548
+ ambient_color: "#080c18"
14549
+ }
14550
+ };
14551
+ function resolveTimeOfDayPhase(name) {
14552
+ if (TIME_OF_DAY_PHASES.includes(name)) {
14553
+ return name;
14554
+ }
14555
+ return "golden";
14556
+ }
14557
+ function lerpTod(a, b, t) {
14558
+ return a + (b - a) * t;
14559
+ }
14560
+ function clamp01Tod(x) {
14561
+ if (x < 0) return 0;
14562
+ if (x > 1) return 1;
14563
+ return x;
14564
+ }
14565
+ function resolvePhaseConfig(phase, overrides) {
14566
+ const base = DEFAULT_PHASE_CONFIGS[phase];
14567
+ const override = overrides?.[phase];
14568
+ if (!override) return base;
14569
+ return { ...base, ...override };
14570
+ }
14571
+ function deriveTimeOfDayOutput(config, elapsedSeconds, startPhaseIndex) {
14572
+ const cycleDurationSeconds = Math.max(6, config.cycle_duration_minutes * 60);
14573
+ const phaseDuration = cycleDurationSeconds / 4;
14574
+ const cyclePos = elapsedSeconds % cycleDurationSeconds;
14575
+ const phaseSlot = Math.floor(cyclePos / phaseDuration);
14576
+ const phase_t = clamp01Tod((cyclePos - phaseSlot * phaseDuration) / phaseDuration);
14577
+ const currentPhaseIndex = (startPhaseIndex + phaseSlot) % 4;
14578
+ const nextPhaseIndex = (currentPhaseIndex + 1) % 4;
14579
+ const currentPhase = TIME_OF_DAY_PHASES[currentPhaseIndex];
14580
+ const nextPhase = TIME_OF_DAY_PHASES[nextPhaseIndex];
14581
+ const currentCfg = resolvePhaseConfig(currentPhase, config.phases);
14582
+ const nextCfg = resolvePhaseConfig(nextPhase, config.phases);
14583
+ const tSmooth = phase_t * phase_t * (3 - 2 * phase_t);
14584
+ return {
14585
+ current_phase: currentPhase,
14586
+ phase_t,
14587
+ sun_intensity: lerpTod(currentCfg.sun_intensity, nextCfg.sun_intensity, tSmooth),
14588
+ ambient_light: lerpTod(currentCfg.ambient_light, nextCfg.ambient_light, tSmooth),
14589
+ fog_density: lerpTod(currentCfg.fog_density, nextCfg.fog_density, tSmooth),
14590
+ sky_exposure: lerpTod(currentCfg.sky_exposure, nextCfg.sky_exposure, tSmooth),
14591
+ elapsedSeconds
14592
+ };
14593
+ }
14594
+ function mergeDefaultConfig(config) {
14595
+ return {
14596
+ cycle_duration_minutes: config.cycle_duration_minutes ?? DEFAULT_CYCLE_DURATION_MINUTES,
14597
+ start_phase: resolveTimeOfDayPhase(config.start_phase ?? DEFAULT_START_PHASE),
14598
+ phases: config.phases,
14599
+ emit_tick: config.emit_tick ?? true,
14600
+ emit_phase_change: config.emit_phase_change ?? true
14601
+ };
14602
+ }
14603
+ var timeOfDayHandler = {
14604
+ name: "time_of_day",
14605
+ defaultConfig: {
14606
+ cycle_duration_minutes: DEFAULT_CYCLE_DURATION_MINUTES,
14607
+ start_phase: DEFAULT_START_PHASE,
14608
+ emit_tick: true,
14609
+ emit_phase_change: true
14610
+ },
14611
+ onAttach(node, config, context) {
14612
+ const resolved2 = mergeDefaultConfig(config);
14613
+ const startPhaseIndex = TIME_OF_DAY_PHASES.indexOf(resolved2.start_phase);
14614
+ const state = {
14615
+ elapsedSeconds: 0,
14616
+ lastPhase: resolved2.start_phase,
14617
+ startPhaseIndex: startPhaseIndex < 0 ? 0 : startPhaseIndex
14618
+ };
14619
+ node.__timeOfDayState = state;
14620
+ const initialOutput = deriveTimeOfDayOutput(resolved2, 0, state.startPhaseIndex);
14621
+ context.emit?.("time_of_day_attached", { node, ...initialOutput });
14622
+ },
14623
+ onDetach(node, _config, context) {
14624
+ context.emit?.("time_of_day_detached", { node });
14625
+ delete node.__timeOfDayState;
14626
+ },
14627
+ onUpdate(node, config, context, delta) {
14628
+ const state = node.__timeOfDayState;
14629
+ if (!state) return;
14630
+ state.elapsedSeconds += delta;
14631
+ const resolved2 = mergeDefaultConfig(config);
14632
+ const output = deriveTimeOfDayOutput(resolved2, state.elapsedSeconds, state.startPhaseIndex);
14633
+ if (resolved2.emit_phase_change && output.current_phase !== state.lastPhase) {
14634
+ const prevPhase = state.lastPhase;
14635
+ state.lastPhase = output.current_phase;
14636
+ context.emit?.("time_of_day_phase_changed", {
14637
+ node,
14638
+ previous_phase: prevPhase,
14639
+ current_phase: output.current_phase,
14640
+ elapsedSeconds: state.elapsedSeconds
14641
+ });
14642
+ } else {
14643
+ state.lastPhase = output.current_phase;
14644
+ }
14645
+ if (resolved2.emit_tick) {
14646
+ context.emit?.("time_of_day_tick", { node, ...output });
14647
+ }
14648
+ },
14649
+ onEvent(node, config, context, event) {
14650
+ const state = node.__timeOfDayState;
14651
+ if (!state) return;
14652
+ if (event.type === "time_of_day_query") {
14653
+ const resolved2 = mergeDefaultConfig(config);
14654
+ const output = deriveTimeOfDayOutput(resolved2, state.elapsedSeconds, state.startPhaseIndex);
14655
+ context.emit?.("time_of_day_response", {
14656
+ queryId: event.queryId,
14657
+ node,
14658
+ ...output
14659
+ });
14660
+ return;
14661
+ }
14662
+ if (event.type === "time_of_day_seek") {
14663
+ const seekTo = event.elapsedSeconds;
14664
+ if (typeof seekTo === "number" && Number.isFinite(seekTo)) {
14665
+ state.elapsedSeconds = Math.max(0, seekTo);
14666
+ const resolved2 = mergeDefaultConfig(config);
14667
+ const output = deriveTimeOfDayOutput(resolved2, state.elapsedSeconds, state.startPhaseIndex);
14668
+ state.lastPhase = output.current_phase;
14669
+ context.emit?.("time_of_day_sought", { node, ...output });
14670
+ }
14671
+ return;
14672
+ }
14673
+ if (event.type === "time_of_day_reset") {
14674
+ state.elapsedSeconds = 0;
14675
+ const resolved2 = mergeDefaultConfig(config);
14676
+ state.lastPhase = resolved2.start_phase;
14677
+ context.emit?.("time_of_day_reset_done", { node, start_phase: resolved2.start_phase });
14678
+ return;
14679
+ }
14680
+ }
14681
+ };
14682
+
13618
14683
  // src/traits/TrackingTopologyTrait.ts
13619
14684
  var trackingTopologyHandler = {
13620
14685
  name: "tracking_topology",
@@ -14283,7 +15348,7 @@ var DEFAULT_REGISTERS = [
14283
15348
  ]
14284
15349
  }
14285
15350
  ];
14286
- function getState6(node) {
15351
+ function getState7(node) {
14287
15352
  return node.__vocabularyRegisterState;
14288
15353
  }
14289
15354
  function buildInjectionPayload(register, config) {
@@ -14349,7 +15414,7 @@ var vocabularyRegisterHandler = {
14349
15414
  delete node.__vocabularyRegisterState;
14350
15415
  },
14351
15416
  onEvent(node, config, context, event) {
14352
- const state = getState6(node);
15417
+ const state = getState7(node);
14353
15418
  if (!state) return;
14354
15419
  if (event.type === "vocabulary_switch") {
14355
15420
  const payload = extractPayload(event);
@@ -14471,7 +15536,7 @@ function updateRollingAccuracy(records) {
14471
15536
  const matched = records.filter((r) => r.matched).length;
14472
15537
  return matched / records.length;
14473
15538
  }
14474
- function getState7(node) {
15539
+ function getState8(node) {
14475
15540
  return node.__verbalFingerprintState;
14476
15541
  }
14477
15542
  var verbalFingerprintHandler = {
@@ -14526,7 +15591,7 @@ var verbalFingerprintHandler = {
14526
15591
  delete node.__verbalFingerprintState;
14527
15592
  },
14528
15593
  onEvent(node, config, context, event) {
14529
- const state = getState7(node);
15594
+ const state = getState8(node);
14530
15595
  if (!state) return;
14531
15596
  if (event.type === "verbal_fingerprint_verify") {
14532
15597
  const payload = extractPayload(event);
@@ -14979,7 +16044,7 @@ jobs:
14979
16044
  };
14980
16045
 
14981
16046
  // src/traits/WalkableTrait.ts
14982
- var DEFAULT_CONFIG3 = {
16047
+ var DEFAULT_CONFIG4 = {
14983
16048
  source_format: "xyz",
14984
16049
  physics_engine: "cannon-es",
14985
16050
  emit_reachability_graph: true,
@@ -14994,7 +16059,7 @@ var DEFAULT_CONFIG3 = {
14994
16059
  function resolveWalkableConfig(config = {}) {
14995
16060
  return {
14996
16061
  point_cloud_uri: config.point_cloud_uri ?? "",
14997
- ...DEFAULT_CONFIG3,
16062
+ ...DEFAULT_CONFIG4,
14998
16063
  ...config
14999
16064
  };
15000
16065
  }
@@ -15012,7 +16077,7 @@ function buildWalkableNavmesh(pointCloud, config = {}) {
15012
16077
  }
15013
16078
  var WalkableTrait = {
15014
16079
  name: "walkable",
15015
- defaultConfig: DEFAULT_CONFIG3,
16080
+ defaultConfig: DEFAULT_CONFIG4,
15016
16081
  validate(config = {}) {
15017
16082
  const sourceFormat = config.source_format;
15018
16083
  if (sourceFormat && !["points", "xyz", "e57"].includes(sourceFormat)) {
@@ -15118,6 +16183,110 @@ function assertNonNegative(value, field) {
15118
16183
  }
15119
16184
  }
15120
16185
 
16186
+ // src/traits/WorldFoundationModelTrait.ts
16187
+ var WORLD_FOUNDATION_MODEL_TRAIT = "world_foundation_model";
16188
+ var ALLOWED_MODALITIES = ["text", "image", "video"];
16189
+ var worldFoundationModelHandler = {
16190
+ name: WORLD_FOUNDATION_MODEL_TRAIT,
16191
+ defaultConfig: {
16192
+ schema: "cael.world_foundation_model.v1",
16193
+ synthesis_id: "uninitialized",
16194
+ provider: "unknown",
16195
+ model: "unknown",
16196
+ generated_at: (/* @__PURE__ */ new Date(0)).toISOString(),
16197
+ prompt_hash: "unknown",
16198
+ input_modalities: ["text"],
16199
+ semantic_node_count: 0,
16200
+ collider_count: 0,
16201
+ source_asset_urls: [],
16202
+ receipt_hash: "unknown",
16203
+ emit_cael: true
16204
+ },
16205
+ validate(config) {
16206
+ validateWorldFoundationModelConfig(config);
16207
+ return true;
16208
+ },
16209
+ onAttach(node, config, context) {
16210
+ validateWorldFoundationModelConfig(config);
16211
+ const state = {
16212
+ config,
16213
+ caelEvents: []
16214
+ };
16215
+ node.__worldFoundationModelState = state;
16216
+ context.emit?.("world_foundation_model_attached", {
16217
+ node,
16218
+ synthesisId: config.synthesis_id,
16219
+ provider: config.provider,
16220
+ inputModalities: config.input_modalities,
16221
+ colliderCount: config.collider_count
16222
+ });
16223
+ if (config.emit_cael !== false) {
16224
+ emitWorldFoundationCAEL(node, config, context, state);
16225
+ }
16226
+ },
16227
+ onDetach(node) {
16228
+ delete node.__worldFoundationModelState;
16229
+ },
16230
+ onEvent(node, config, context, event) {
16231
+ if (event.type === "world_foundation_model_emit_cael") {
16232
+ const state = node.__worldFoundationModelState;
16233
+ emitWorldFoundationCAEL(node, config, context, state);
16234
+ }
16235
+ }
16236
+ };
16237
+ function validateWorldFoundationModelConfig(config) {
16238
+ if (config.schema !== "cael.world_foundation_model.v1") {
16239
+ throw new Error("WorldFoundationModelTrait: schema must be cael.world_foundation_model.v1");
16240
+ }
16241
+ for (const key of ["synthesis_id", "provider", "model", "generated_at", "prompt_hash", "receipt_hash"]) {
16242
+ if (typeof config[key] !== "string" || config[key].trim() === "") {
16243
+ throw new Error(`WorldFoundationModelTrait: ${key} is required`);
16244
+ }
16245
+ }
16246
+ if (!Array.isArray(config.input_modalities) || config.input_modalities.length === 0) {
16247
+ throw new Error("WorldFoundationModelTrait: input_modalities must be a non-empty array");
16248
+ }
16249
+ for (const modality of config.input_modalities) {
16250
+ if (!ALLOWED_MODALITIES.includes(modality)) {
16251
+ throw new Error(`WorldFoundationModelTrait: unsupported modality ${String(modality)}`);
16252
+ }
16253
+ }
16254
+ if (!Number.isInteger(config.semantic_node_count) || config.semantic_node_count < 0) {
16255
+ throw new Error("WorldFoundationModelTrait: semantic_node_count must be a non-negative integer");
16256
+ }
16257
+ if (!Number.isInteger(config.collider_count) || config.collider_count < 0) {
16258
+ throw new Error("WorldFoundationModelTrait: collider_count must be a non-negative integer");
16259
+ }
16260
+ return config;
16261
+ }
16262
+ function emitWorldFoundationCAEL(node, config, context, state) {
16263
+ const event = {
16264
+ version: "cael.v1",
16265
+ event: "world_synthesis",
16266
+ timestamp: Date.parse(config.generated_at) || 0,
16267
+ simTime: 0,
16268
+ payload: {
16269
+ schema: config.schema,
16270
+ synthesisId: config.synthesis_id,
16271
+ provider: config.provider,
16272
+ model: config.model,
16273
+ inputModalities: config.input_modalities,
16274
+ semanticNodeCount: config.semantic_node_count,
16275
+ colliderCount: config.collider_count,
16276
+ promptHash: config.prompt_hash,
16277
+ receiptHash: config.receipt_hash,
16278
+ sourceAssetUrls: config.source_asset_urls ?? [],
16279
+ ...config.video_reconstruction_session_id ? { videoReconstructionSessionId: config.video_reconstruction_session_id } : {},
16280
+ ...config.replay_fingerprint ? { replayFingerprint: config.replay_fingerprint } : {}
16281
+ }
16282
+ };
16283
+ state?.caelEvents.push(event);
16284
+ context.emit?.("world_foundation_model_cael_event", {
16285
+ node,
16286
+ event
16287
+ });
16288
+ }
16289
+
15121
16290
  // src/traits/WorldGeneratorTrait.ts
15122
16291
  var worldGeneratorHandler = {
15123
16292
  name: "world_generator",
@@ -16158,76 +17327,14 @@ var TaxableWealthTrait = class {
16158
17327
  }
16159
17328
  };
16160
17329
 
16161
- // src/traits/index.ts
16162
- init_composition_rules();
16163
- init_TraitCompositor();
16164
- init_TraitVisualRegistry();
16165
- init_types();
16166
- init_accessibility_extended_visual();
16167
- init_accessibility_visual();
16168
- init_age_condition_visual();
16169
- init_animals_visual();
16170
- init_architecture_realestate_visual();
16171
- init_audio_visual();
16172
- init_construction_building_visual();
16173
- init_containers_storage_visual();
16174
- init_cooking_food_visual();
16175
- init_core_vr_interaction_visual();
16176
- init_creatures_mythical_visual();
16177
- init_data_visualization_visual();
16178
- init_education_learning_visual();
16179
- init_emotion_mood_visual();
16180
- init_environment_input_visual();
16181
- init_environmental_biome_visual();
16182
- init_fabric_cloth_visual();
16183
- init_furniture_decor_visual();
16184
- init_game_mechanics_visual();
16185
- init_gems_minerals_visual();
16186
- init_geospatial_web3_visual();
16187
- init_healthcare_medical_visual();
16188
- init_humanoid_avatar_visual();
16189
- init_intelligence_behavior_visual();
16190
- init_interop_copresence_visual();
16191
- init_iot_autonomous_agents_visual();
16192
- init_lighting_visual();
16193
- init_locomotion_movement_visual();
16194
- init_magic_fantasy_visual();
16195
- init_maritime_naval_visual();
16196
- init_material_properties_visual();
16197
- init_measurement_sensing_visual();
16198
- init_media_analytics_visual();
16199
- init_multisensory_haptic_visual();
16200
- init_music_performance_visual();
16201
- init_musical_sound_visual();
16202
- init_narrative_storytelling_visual();
16203
- init_nature_life_visual();
16204
- init_networking_ai_visual();
16205
- init_npc_roles_visual();
16206
- init_object_interaction_visual();
16207
- init_parser_core_ui_visual();
16208
- init_physical_affordances_visual();
16209
- init_physics_expansion_visual();
16210
- init_procedural_generation_visual();
16211
- init_resource_gathering_visual();
16212
- init_safety_boundaries_visual();
16213
- init_scifi_technology_visual();
16214
- init_shape_form_visual();
16215
- init_signs_communication_visual();
16216
- init_simple_modifiers_visual();
16217
- init_size_scale_visual();
16218
- init_social_commerce_visual();
16219
- init_social_effects_visual();
16220
- init_sports_fitness_visual();
16221
- init_state_persistence_visual();
16222
- init_surface_texture_visual();
16223
- init_time_period_visual();
16224
- init_transportation_vehicles_visual();
16225
- init_visual_effects_visual();
16226
- init_volumetric_webgpu_visual();
16227
- init_water_fluid_visual();
16228
- init_weather_particles_visual();
16229
- init_weather_phenomena_visual();
16230
- init_xr_platform_visual();
17330
+ // src/traits/visual/presets/simulation-domains.visual.ts
17331
+ var SIMULATION_DOMAIN_VISUALS = {
17332
+ reduced_order_model: {
17333
+ material: { roughness: 0.25, metalness: 0.15, color: "#4f8cff" },
17334
+ tags: ["simulation", "surrogate", "digital-twin", "edge-ready"],
17335
+ layer: "visual_effect"
17336
+ }
17337
+ };
16231
17338
 
16232
17339
  // src/traits/visual/resolvers/AssetManifest.ts
16233
17340
  var ManifestValidationError = class extends Error {
@@ -21015,228 +22122,6 @@ function getCognitiveVMSnapshot(node) {
21015
22122
  };
21016
22123
  }
21017
22124
 
21018
- // src/traits/pillar/uAALComposedAgent.ts
21019
- function buildCogvmConfig(cfg) {
21020
- return {
21021
- agent_id: cfg.agent_id,
21022
- inner_frequency: cfg.inner_frequency ?? 10,
21023
- outer_parallel_id: cfg.outer_parallel_id ?? "temporal_lateral_parallel",
21024
- inner_parallel_id: cfg.inner_parallel_id ?? "energy_entropy_parallel",
21025
- edge_case_threshold: cfg.edge_case_threshold ?? 0.35,
21026
- lifecycle_auto_transition: true,
21027
- emit_to_peers: cfg.emit_to_peers ?? true,
21028
- emit_jepa_step: true,
21029
- // composed agent intercepts this
21030
- jepa_latent_dim: cfg.jepa_latent_dim ?? 32,
21031
- ...cfg.overrides?.cogvm
21032
- };
21033
- }
21034
- function buildJepaConfig(cfg) {
21035
- return {
21036
- latentDim: cfg.jepa_latent_dim ?? 32,
21037
- condDim: 4,
21038
- sigregWeight: 0.05,
21039
- conservationWeight: cfg.jepa_conservation_weight ?? 0.1,
21040
- conservationMargin: 0.05,
21041
- symmetryWeight: 0.02,
21042
- symmetryDelta: 0.1,
21043
- embeddingModel: "jepa-context-encoder",
21044
- emitToGrpo: true,
21045
- // composed agent intercepts sliceemitter:emit
21046
- physicsPillarId: "physics_conservation",
21047
- temporalGating: cfg.jepa_temporal_gating ?? true,
21048
- bilateralWeight: cfg.jepa_bilateral_weight ?? 0.1,
21049
- ...cfg.overrides?.jepa
21050
- };
21051
- }
21052
- function buildEmitterConfig(cfg) {
21053
- return {
21054
- emit_to_grpo: true,
21055
- emit_to_knowledge_store: false,
21056
- max_buffer_size: cfg.emitter_max_buffer ?? 1e3,
21057
- diversity_target: cfg.emitter_diversity_target ?? 0.8,
21058
- ...cfg.overrides?.emitter
21059
- };
21060
- }
21061
- function domainToBrainCoord(domain) {
21062
- const leftDomains = /* @__PURE__ */ new Set([
21063
- "physics",
21064
- "compiler",
21065
- "language",
21066
- "accuracy_speed",
21067
- "solver"
21068
- ]);
21069
- const rightDomains = /* @__PURE__ */ new Set([
21070
- "rendering",
21071
- "agent",
21072
- "trait",
21073
- "safety_exploration",
21074
- "storage",
21075
- "init"
21076
- ]);
21077
- if (leftDomains.has(domain)) {
21078
- return { mni_x: 45, mni_y: 15, mni_z: 30, cortical_depth: 4, brodmann_area: 9 };
21079
- }
21080
- if (rightDomains.has(domain)) {
21081
- return { mni_x: -45, mni_y: -30, mni_z: 40, cortical_depth: 3, brodmann_area: 40 };
21082
- }
21083
- return { mni_x: 0, mni_y: 25, mni_z: 30, cortical_depth: 2, brodmann_area: 32 };
21084
- }
21085
- function silentCtx2() {
21086
- return {
21087
- emit: () => {
21088
- },
21089
- getState: () => ({}),
21090
- setState: () => {
21091
- },
21092
- getScaleMultiplier: () => 1,
21093
- setScaleContext: () => {
21094
- },
21095
- vr: null,
21096
- physics: null,
21097
- audio: null,
21098
- haptics: null
21099
- };
21100
- }
21101
- function getUAALAgentSnapshot(node) {
21102
- const state = node.__uaalAgentState;
21103
- if (!state) return null;
21104
- return {
21105
- cogvm: getCognitiveVMSnapshot(state.cogvmNode),
21106
- sim_step: state.sim_step,
21107
- recent_slice_count: state.recentSlices.length
21108
- };
21109
- }
21110
- var uAALComposedAgentHandler = {
21111
- name: "uaal_composed_agent",
21112
- defaultConfig: {
21113
- agent_id: "uaal_agent"
21114
- },
21115
- onAttach(node, config, _context) {
21116
- const cogvmNode = {};
21117
- const jepaNode = {};
21118
- const emitterNode = {};
21119
- cognitiveVMHandler.onAttach?.(cogvmNode, buildCogvmConfig(config), silentCtx2());
21120
- pillarJepaHandler.onAttach?.(jepaNode, buildJepaConfig(config), silentCtx2());
21121
- sliceEmitterHandler.onAttach?.(emitterNode, buildEmitterConfig(config), silentCtx2());
21122
- const integrityConfig = config.overrides?.integrity ?? {};
21123
- const integrityLayer = createLatentIntegrityLayer({
21124
- byzantine: {
21125
- sigmaThreshold: config.byzantine_sigma ?? 2,
21126
- minHistory: config.byzantine_min_history ?? 10,
21127
- ...integrityConfig.byzantine
21128
- },
21129
- sycophancy: {
21130
- driftThreshold: config.sycophancy_threshold ?? 0.4,
21131
- minSamples: config.sycophancy_min_samples ?? 5,
21132
- ...integrityConfig.sycophancy
21133
- }
21134
- });
21135
- node.__uaalAgentState = {
21136
- cogvmNode,
21137
- jepaNode,
21138
- emitterNode,
21139
- integrityLayer,
21140
- recentSlices: [],
21141
- historySize: config.integrity_history_size ?? 100,
21142
- sim_step: 0
21143
- };
21144
- },
21145
- onDetach(node, config, _context) {
21146
- const state = node.__uaalAgentState;
21147
- if (state) {
21148
- cognitiveVMHandler.onDetach?.(state.cogvmNode, buildCogvmConfig(config), silentCtx2());
21149
- pillarJepaHandler.onDetach?.(state.jepaNode, buildJepaConfig(config), silentCtx2());
21150
- sliceEmitterHandler.onDetach?.(state.emitterNode, buildEmitterConfig(config), silentCtx2());
21151
- }
21152
- delete node.__uaalAgentState;
21153
- },
21154
- onUpdate() {
21155
- },
21156
- onEvent(node, config, context, event) {
21157
- const state = node.__uaalAgentState;
21158
- if (!state) return;
21159
- if (event.type === "emitter:flush") {
21160
- sliceEmitterHandler.onEvent?.(state.emitterNode, buildEmitterConfig(config), context, event);
21161
- return;
21162
- }
21163
- if (event.type === "recursive_link:receive") {
21164
- const msg = event;
21165
- state.integrityLayer.sycophancy.observe(msg);
21166
- const result = state.integrityLayer.checkMessage(msg, state.recentSlices);
21167
- if (result.byzantine.isAnomalous || result.sycophancy.isDrifting) {
21168
- context.emit?.("uaal:integrity_alert", {
21169
- byzantine: result.byzantine,
21170
- sycophancy: result.sycophancy,
21171
- from: msg.from ?? "unknown",
21172
- domain: msg.slice?.pillar_domain ?? "unknown"
21173
- });
21174
- }
21175
- if (msg.slice) {
21176
- state.recentSlices.push(msg.slice);
21177
- if (state.recentSlices.length > state.historySize) {
21178
- state.recentSlices.shift();
21179
- }
21180
- }
21181
- return;
21182
- }
21183
- const jepaConfig = buildJepaConfig(config);
21184
- const emitterConfig = buildEmitterConfig(config);
21185
- const jepaCtx = {
21186
- ...context,
21187
- emit(name, payload) {
21188
- if (name === "sliceemitter:emit") {
21189
- const p = payload;
21190
- if (p?.slice) {
21191
- state.sim_step++;
21192
- sliceEmitterHandler.onEvent?.(
21193
- state.emitterNode,
21194
- emitterConfig,
21195
- context,
21196
- // parent context — SliceEmitter's emits go straight out
21197
- {
21198
- type: "emitter:emit",
21199
- slice: p.slice,
21200
- brain_coord: domainToBrainCoord(p.slice.pillar_domain),
21201
- sim_step: state.sim_step,
21202
- agent_id: config.agent_id
21203
- }
21204
- );
21205
- }
21206
- return;
21207
- }
21208
- context.emit?.(name, payload);
21209
- }
21210
- };
21211
- const cogvmConfig = buildCogvmConfig(config);
21212
- const cogvmCtx = {
21213
- ...context,
21214
- emit(name, payload) {
21215
- if (name === "pillarjepa:step") {
21216
- pillarJepaHandler.onEvent?.(state.jepaNode, jepaConfig, jepaCtx, {
21217
- type: "pillarjepa:step",
21218
- ...payload
21219
- });
21220
- return;
21221
- }
21222
- if (name === "recursive_link:send") {
21223
- const slice = payload?.slice;
21224
- if (slice) {
21225
- state.recentSlices.push(slice);
21226
- if (state.recentSlices.length > state.historySize) {
21227
- state.recentSlices.shift();
21228
- }
21229
- }
21230
- context.emit?.(name, payload);
21231
- return;
21232
- }
21233
- context.emit?.(name, payload);
21234
- }
21235
- };
21236
- cognitiveVMHandler.onEvent?.(state.cogvmNode, cogvmConfig, cogvmCtx, event);
21237
- }
21238
- };
21239
-
21240
22125
  // src/traits/pillar/BrainCoordMapper.ts
21241
22126
  var SEED_TABLE = {
21242
22127
  physics: {
@@ -21461,6 +22346,207 @@ function mniDistance(a, b) {
21461
22346
  return Math.sqrt(dx * dx + dy * dy + dz * dz);
21462
22347
  }
21463
22348
 
22349
+ // src/traits/pillar/uAALComposedAgent.ts
22350
+ function buildCogvmConfig(cfg) {
22351
+ return {
22352
+ agent_id: cfg.agent_id,
22353
+ inner_frequency: cfg.inner_frequency ?? 10,
22354
+ outer_parallel_id: cfg.outer_parallel_id ?? "temporal_lateral_parallel",
22355
+ inner_parallel_id: cfg.inner_parallel_id ?? "energy_entropy_parallel",
22356
+ edge_case_threshold: cfg.edge_case_threshold ?? 0.35,
22357
+ lifecycle_auto_transition: true,
22358
+ emit_to_peers: cfg.emit_to_peers ?? true,
22359
+ emit_jepa_step: true,
22360
+ // composed agent intercepts this
22361
+ jepa_latent_dim: cfg.jepa_latent_dim ?? 32,
22362
+ ...cfg.overrides?.cogvm
22363
+ };
22364
+ }
22365
+ function buildJepaConfig(cfg) {
22366
+ return {
22367
+ latentDim: cfg.jepa_latent_dim ?? 32,
22368
+ condDim: 4,
22369
+ sigregWeight: 0.05,
22370
+ conservationWeight: cfg.jepa_conservation_weight ?? 0.1,
22371
+ conservationMargin: 0.05,
22372
+ symmetryWeight: 0.02,
22373
+ symmetryDelta: 0.1,
22374
+ embeddingModel: "jepa-context-encoder",
22375
+ emitToGrpo: true,
22376
+ // composed agent intercepts sliceemitter:emit
22377
+ physicsPillarId: "physics_conservation",
22378
+ temporalGating: cfg.jepa_temporal_gating ?? true,
22379
+ bilateralWeight: cfg.jepa_bilateral_weight ?? 0.1,
22380
+ ...cfg.overrides?.jepa
22381
+ };
22382
+ }
22383
+ function buildEmitterConfig(cfg) {
22384
+ return {
22385
+ emit_to_grpo: true,
22386
+ emit_to_knowledge_store: false,
22387
+ max_buffer_size: cfg.emitter_max_buffer ?? 1e3,
22388
+ diversity_target: cfg.emitter_diversity_target ?? 0.8,
22389
+ ...cfg.overrides?.emitter
22390
+ };
22391
+ }
22392
+ function domainToBrainCoord(domain) {
22393
+ return resolve(domain);
22394
+ }
22395
+ function silentCtx2() {
22396
+ return {
22397
+ emit: () => {
22398
+ },
22399
+ getState: () => ({}),
22400
+ setState: () => {
22401
+ },
22402
+ getScaleMultiplier: () => 1,
22403
+ setScaleContext: () => {
22404
+ },
22405
+ vr: null,
22406
+ physics: null,
22407
+ audio: null,
22408
+ haptics: null
22409
+ };
22410
+ }
22411
+ function getUAALAgentSnapshot(node) {
22412
+ const state = node.__uaalAgentState;
22413
+ if (!state) return null;
22414
+ return {
22415
+ cogvm: getCognitiveVMSnapshot(state.cogvmNode),
22416
+ sim_step: state.sim_step,
22417
+ recent_slice_count: state.recentSlices.length
22418
+ };
22419
+ }
22420
+ var uAALComposedAgentHandler = {
22421
+ name: "uaal_composed_agent",
22422
+ defaultConfig: {
22423
+ agent_id: "uaal_agent"
22424
+ },
22425
+ onAttach(node, config, _context) {
22426
+ const cogvmNode = {};
22427
+ const jepaNode = {};
22428
+ const emitterNode = {};
22429
+ cognitiveVMHandler.onAttach?.(cogvmNode, buildCogvmConfig(config), silentCtx2());
22430
+ pillarJepaHandler.onAttach?.(jepaNode, buildJepaConfig(config), silentCtx2());
22431
+ sliceEmitterHandler.onAttach?.(emitterNode, buildEmitterConfig(config), silentCtx2());
22432
+ const integrityConfig = config.overrides?.integrity ?? {};
22433
+ const integrityLayer = createLatentIntegrityLayer({
22434
+ byzantine: {
22435
+ sigmaThreshold: config.byzantine_sigma ?? 2,
22436
+ minHistory: config.byzantine_min_history ?? 10,
22437
+ ...integrityConfig.byzantine
22438
+ },
22439
+ sycophancy: {
22440
+ driftThreshold: config.sycophancy_threshold ?? 0.4,
22441
+ minSamples: config.sycophancy_min_samples ?? 5,
22442
+ ...integrityConfig.sycophancy
22443
+ }
22444
+ });
22445
+ node.__uaalAgentState = {
22446
+ cogvmNode,
22447
+ jepaNode,
22448
+ emitterNode,
22449
+ integrityLayer,
22450
+ recentSlices: [],
22451
+ historySize: config.integrity_history_size ?? 100,
22452
+ sim_step: 0
22453
+ };
22454
+ },
22455
+ onDetach(node, config, _context) {
22456
+ const state = node.__uaalAgentState;
22457
+ if (state) {
22458
+ cognitiveVMHandler.onDetach?.(state.cogvmNode, buildCogvmConfig(config), silentCtx2());
22459
+ pillarJepaHandler.onDetach?.(state.jepaNode, buildJepaConfig(config), silentCtx2());
22460
+ sliceEmitterHandler.onDetach?.(state.emitterNode, buildEmitterConfig(config), silentCtx2());
22461
+ }
22462
+ delete node.__uaalAgentState;
22463
+ },
22464
+ onUpdate() {
22465
+ },
22466
+ onEvent(node, config, context, event) {
22467
+ const state = node.__uaalAgentState;
22468
+ if (!state) return;
22469
+ if (event.type === "emitter:flush") {
22470
+ sliceEmitterHandler.onEvent?.(state.emitterNode, buildEmitterConfig(config), context, event);
22471
+ return;
22472
+ }
22473
+ if (event.type === "recursive_link:receive") {
22474
+ const msg = event;
22475
+ state.integrityLayer.sycophancy.observe(msg);
22476
+ const result = state.integrityLayer.checkMessage(msg, state.recentSlices);
22477
+ if (result.byzantine.isAnomalous || result.sycophancy.isDrifting) {
22478
+ context.emit?.("uaal:integrity_alert", {
22479
+ byzantine: result.byzantine,
22480
+ sycophancy: result.sycophancy,
22481
+ from: msg.from ?? "unknown",
22482
+ domain: msg.slice?.pillar_domain ?? "unknown"
22483
+ });
22484
+ }
22485
+ if (msg.slice) {
22486
+ state.recentSlices.push(msg.slice);
22487
+ if (state.recentSlices.length > state.historySize) {
22488
+ state.recentSlices.shift();
22489
+ }
22490
+ }
22491
+ return;
22492
+ }
22493
+ const jepaConfig = buildJepaConfig(config);
22494
+ const emitterConfig = buildEmitterConfig(config);
22495
+ const jepaCtx = {
22496
+ ...context,
22497
+ emit(name, payload) {
22498
+ if (name === "sliceemitter:emit") {
22499
+ const p = payload;
22500
+ if (p?.slice) {
22501
+ state.sim_step++;
22502
+ sliceEmitterHandler.onEvent?.(
22503
+ state.emitterNode,
22504
+ emitterConfig,
22505
+ context,
22506
+ // parent context — SliceEmitter's emits go straight out
22507
+ {
22508
+ type: "emitter:emit",
22509
+ slice: p.slice,
22510
+ brain_coord: domainToBrainCoord(p.slice.pillar_domain),
22511
+ sim_step: state.sim_step,
22512
+ agent_id: config.agent_id
22513
+ }
22514
+ );
22515
+ }
22516
+ return;
22517
+ }
22518
+ context.emit?.(name, payload);
22519
+ }
22520
+ };
22521
+ const cogvmConfig = buildCogvmConfig(config);
22522
+ const cogvmCtx = {
22523
+ ...context,
22524
+ emit(name, payload) {
22525
+ if (name === "pillarjepa:step") {
22526
+ pillarJepaHandler.onEvent?.(state.jepaNode, jepaConfig, jepaCtx, {
22527
+ type: "pillarjepa:step",
22528
+ ...payload
22529
+ });
22530
+ return;
22531
+ }
22532
+ if (name === "recursive_link:send") {
22533
+ const slice = payload?.slice;
22534
+ if (slice) {
22535
+ state.recentSlices.push(slice);
22536
+ if (state.recentSlices.length > state.historySize) {
22537
+ state.recentSlices.shift();
22538
+ }
22539
+ }
22540
+ context.emit?.(name, payload);
22541
+ return;
22542
+ }
22543
+ context.emit?.(name, payload);
22544
+ }
22545
+ };
22546
+ cognitiveVMHandler.onEvent?.(state.cogvmNode, cogvmConfig, cogvmCtx, event);
22547
+ }
22548
+ };
22549
+
21464
22550
  // src/traits/pillar/CorticalDepthRouter.ts
21465
22551
  var STAGE_DEPTH_MAP = {
21466
22552
  raw: 4,
@@ -21508,7 +22594,7 @@ var corticalDepthRouterHandler = {
21508
22594
  var STATE_KEY = "__p26qa_state__";
21509
22595
  var GAMMA_KEY = "__p26qa_gammas__";
21510
22596
  var TICK_KEY = "__p26qa_tick__";
21511
- function getState8(node) {
22597
+ function getState9(node) {
21512
22598
  return node[STATE_KEY] ?? {
21513
22599
  assignment: "",
21514
22600
  lastRunTick: 0,
@@ -21674,12 +22760,12 @@ function createQuantumAssignmentTrait(qaoa) {
21674
22760
  const tick = p["tick"] ?? getCurrentTick(node) + 1;
21675
22761
  setCurrentTick(node, tick);
21676
22762
  const interval = config.rerunIntervalTicks ?? 50;
21677
- const state = getState8(node);
22763
+ const state = getState9(node);
21678
22764
  const ticksSinceLast = tick - state.lastRunTick;
21679
22765
  if (!state.running && ticksSinceLast >= interval) {
21680
22766
  setState(node, { ...state, running: true, lastRunTick: tick });
21681
22767
  void runAssignment(qaoa, node, config, ctx, tick).finally(() => {
21682
- const current = getState8(node);
22768
+ const current = getState9(node);
21683
22769
  setState(node, { ...current, running: false });
21684
22770
  });
21685
22771
  }
@@ -21745,6 +22831,201 @@ var stubQAOARunner = {
21745
22831
  };
21746
22832
  var paper26QuantumAssignmentHandler = createQuantumAssignmentTrait(stubQAOARunner);
21747
22833
 
21748
- export { ACCURACY_SPEED_PILLAR, AGENT_GOAL_PILLAR, AVBD_POPULATION_BUDGET, AdvancedLightingTrait, AdvancedPBRTrait, AdvancedTexturingTrait, AssetManifestBuilder, AssetResolverPipeline, BAKING_OBH_ESTIMATES, BakingPipelineError, BakingProgressTracker, BondingCurvedTrait, COMPILER_PIPELINE_PILLAR, COORDINATION_SYNC_PILLAR, CRDTRoomTraitHandler, CacheManager, D040_THREE_POPULATION_PILLAR, DEFAULT_ATTRIBUTION_CI_ACCURACY_FLOOR, DEFAULT_CONFIG, DEFAULT_HEADLESS_AGENT_DAILY_COST_CEILING_USD, DEFAULT_METRICS_RETENTION_DAYS, DEFAULT_NPC_DAILY_COST_CEILING_USD, DEFAULT_REGISTERS, DepreciatingTrait, ECONOMICS_BUDGET_PILLAR, EDGE_CASE_HANDLER_PILLAR, ENERGY_ENTROPY_PARALLEL, EncryptionTrait, GEOMETRY_TRAITS, GaussianBakingClient, GaussianBakingPipeline, GlobalIlluminationTrait, GrabbableTrait, HEMISPHERE_MAP, HOLOMESH_SOCIAL_TRAITS, HSMIntegrationTrait, INIT_BOOTSTRAP_PILLAR, INTENT_TRUTH_APPROVAL_PILLAR, LANGUAGE_CONTEXT_PILLAR, LEFT_PHYSICS_PILLAR, LEFT_TEMPORAL_PILLAR, LatentByzantineDetector, LatentSycophancyProbe, ManifestResolver, ManifestValidationError, MultiTargetTrackingTrait, NATIVE_2D_TRAIT_HANDLERS, OBH_PER_RENDER, PHYSICS_CONSERVATION_PILLAR, PackageSigningTrait, ProceduralGeometryResolver, ProceduralResolver, QUALITY_PRESETS_BAKING, QUOTA_DEFAULTS, REFERENCE_OB_SCORES, RENDERING_LOD_PILLAR, RIGHT_PHYSICS_PILLAR, RIGHT_TEMPORAL_PILLAR, RSAEncryptionTrait, RateLimitExceededError, RateLimiter, RayTracingTrait, SABINE_CONSTANT_METRIC, SAFETY_EXPLORATION_PILLAR, SEED_PARALLEL_PILLARS, SEED_PILLARS, SERVICE_ALERT_RULE_TYPES, SHUTDOWN_SIGNAL_PILLAR, SOLVER_PRECISION_PILLAR, SPEED_OF_SOUND_MS, STORAGE_CAPACITY_PILLAR, ScreenSpaceEffectsTrait, SubsurfaceScatteringTrait, SubsurfaceVeinsTrait, TEMPORAL_LATERAL_PARALLEL, TEMPORAL_PILLAR, TEXT_TO_3D_TRAITS, TIER_COMPLIANCE, TIER_ENFORCEMENT, TIER_FEATURE_FLAGS, TRAINING_GPU_HOURS_ESTIMATE, TRAIT_COMPOSITION_PILLAR, TRUTH_PHYSICS_PARALLEL, TaxableWealthTrait, Text3DAdapter, TextureResolver, TradeableTrait, UI_TRAIT_DEFAULTS, UI_TRAIT_NAMES, v6_exports as V6, VulnerabilityScannerTrait, WORLD_CONSTRAINTS, WalkableTrait, ZONE_CONSTRAINTS, ZeroKnowledgeProofTrait, _internal, agentBadgeHandler, agentProfileHandler, agentRoomHandler, agentWallHandler, analyzeRoomModes, autonomousAgendaHandler, avatarIntentHandler, backgroundMusicHandler, beatmapHandler, bioluminescentHandler, lookup as brainCoordLookup, resolve as brainCoordResolve, buildGammaWeightMatrix, buildMaskAttachments, buildWalkableNavmesh, clamp01, classicalGreedyBisection, classifyMode, closestPointOnSegment, cognitiveVMHandler, collaborativeHandler, computeParallelBounds, convertGameObject, convertUnityMaterial, convertUnityScene, corticalDepthRouterHandler, cosineSimilarity, createApiQuotaAlertRule, createAttributionCiOperationMetric, createCRDTRoomTraitHandler, createLatentIntegrityLayer, createMetricsCleanupJob, createQuantumAssignmentTrait, createSemanticMessage, createTracker, depthEstimationTraitHandler, deriveBioluminescentOutput, distSquared, distanceToPath, dynamicRegionMaskHandler, elapsedToBeat, emergentSpacetimeHandler, enrichCoord, enumerateRoomModes, findCuesInInterval, gazeTransientPointerHandler, generateOctaneBakeConfig, generateQRCodeUrl, generateRoomModeHeatmap, generateTenantConfig, generateTweetUrl, getAllEntries as getAllBrainCoordEntries, getAllUITraits, getCognitiveVMSnapshot, getConstraintsByScope, getConstraintsForBiome, getErrors, getHints, getPillarSliceStats, getUAALAgentSnapshot, getUITrait, getWarnings, grabbableHandler, guestbookHandler, hash4ToUnit, hemisphereFromMniX, holoTwinHandler, holomapAnchorContextHandler, holomapCameraTrajectoryHandler, holomapDriftCorrectionHandler, holomapReconstructionHandler, holomapSplatOutputHandler, holomeshMarketplaceTraitHandlers, holomeshSocialTraitHandlers, hungarianAssign, hungarianAssignmentHandler, inferStage, kalmanFilterHandler, lerp, makeParallelPillar, mergeConstraints, mniDistance, mniXForHemisphere, modalFrequencyHz, native2DButtonHandler, native2DCardHandler, native2DFormHandler, native2DIconHandler, native2DImageHandler, native2DInputHandler, native2DLayoutHandler, native2DLinkHandler, native2DListHandler, native2DPanelHandler, native2DResponsiveHandler, native2DTailwindHandler, native2DTextHandler, native2DThemeHandler, packGeometry, paper26QuantumAssignmentHandler, parallelPillarHandler, parseManifest, patternAt, pillarJepaHandler, pillarRegistryHandler, portalPresenceHandler, predictPosition, profileThemeHandler, proximityAt, pulseAt, qFactor, quantumCircuitHandler, quantumInspiredHandler, recursiveLinkHandler, registerDomainCoord, registerUITrait, reidEmbeddingHandler, resolveBioluminescentPattern, resolveWalkableConfig, rewardTraitHandler, roomModeResonanceHandler, roomPortalHandler, routeDepth, sabineT60, semanticCollabHandler, serviceObservabilityHandler, shareableHandler, sliceEmitterHandler, socialTraitHandlers, sortCues, spatialAdjacentHandler, spatialAgentHandler, spatialAnchorSharedHandler, spatialCommentHandler, spatialContainsHandler, spatialControllerInputHandler, spatialHandTrackingHandler, spatialReachableHandler, spatialTemporalAdjacentHandler, spatialTemporalReachableHandler, spatialTextLayoutHandler, spatialTrajectoryHandler, spatialVoiceHandler, speechAwareEncounterHandler, splitmix32, statusMoodHandler, stepTracker, stubQAOARunner, telemetryHandler, top8FriendsHandler, totalAbsorptionSabin, trackingTopologyHandler, traitMarketplaceHandler, traitShowcaseHandler, tweetableHandler, twinActuatorHandler, uAALComposedAgentHandler, unityConverterHandler, validateCoord as validateBrainCoord, validateTenantConfig, validateUITrait, validateWorldConstraints, validateZoneConstraints, valueNoise3D, verbalFingerprintHandler, visitorCounterHandler, vocabularyRegisterHandler, voronoi3D, vqeRunnerHandler, vqeRunnerTrait, worldGeneratorHandler };
22834
+ // src/traits/LocalInferenceTrait.ts
22835
+ var LOCAL_INFERENCE_DEFAULTS = {
22836
+ ollamaUrl: "http://localhost:11434",
22837
+ model: "qwen3:4b",
22838
+ contextLength: 8192,
22839
+ toolCalling: true,
22840
+ timeoutS: 120,
22841
+ nativeOllamaApi: true
22842
+ // Ollama native API correctly parses tool_calls (3311a4d4c)
22843
+ };
22844
+ function resolveLocalInferenceConfig(params) {
22845
+ return { ...LOCAL_INFERENCE_DEFAULTS, ...params };
22846
+ }
22847
+ var JETSON_TESTED_MODELS = ["qwen3:4b", "hf.co/bartowski/microsoft_Fara-7B-GGUF:Q4_K_M"];
22848
+ function isJetsonTestedModel(model) {
22849
+ return JETSON_TESTED_MODELS.includes(model);
22850
+ }
22851
+ function buildOllamaChatPayload(messages, config, tools) {
22852
+ const payload = {
22853
+ model: config.model,
22854
+ messages,
22855
+ stream: false,
22856
+ options: { num_ctx: config.contextLength }
22857
+ };
22858
+ if (tools && tools.length > 0 && config.toolCalling) {
22859
+ payload.tools = tools;
22860
+ }
22861
+ return payload;
22862
+ }
22863
+
22864
+ // src/traits/EdgeNodeTrait.ts
22865
+ var EDGE_NODE_DEFAULTS = {
22866
+ handle: "holoscript-edge-node",
22867
+ domain: "edge",
22868
+ capabilityTags: ["edge-node", "local-inference"],
22869
+ boardUrl: "https://mcp-orchestrator-production-45f9.up.railway.app",
22870
+ tickIntervalS: 10,
22871
+ maxConsecutiveFailures: 5,
22872
+ escalateOnFailure: true,
22873
+ avoidTags: ["frontier-only"]
22874
+ };
22875
+ function resolveEdgeNodeConfig(params) {
22876
+ return { ...EDGE_NODE_DEFAULTS, ...params };
22877
+ }
22878
+ function initialEdgeNodeState(config) {
22879
+ return {
22880
+ handle: config.handle,
22881
+ domain: config.domain,
22882
+ status: "idle",
22883
+ cycles: 0,
22884
+ tasksClaimed: 0,
22885
+ tasksDone: 0,
22886
+ tasksFailed: 0,
22887
+ consecutiveFailures: 0,
22888
+ lastTickAt: null
22889
+ };
22890
+ }
22891
+
22892
+ // src/traits/SystemMonitorTrait.ts
22893
+ var SYSTEM_MONITOR_DEFAULTS = {
22894
+ port: 9090,
22895
+ pollIntervalS: 5,
22896
+ includeDisk: true,
22897
+ includeProcessList: false,
22898
+ loadAlertThreshold: 4,
22899
+ memAlertThresholdMB: 256
22900
+ };
22901
+ function resolveSystemMonitorConfig(params) {
22902
+ return { ...SYSTEM_MONITOR_DEFAULTS, ...params };
22903
+ }
22904
+ function computeAlerts(stats, config) {
22905
+ const alerts = [];
22906
+ if (stats.load_1m !== void 0 && stats.load_1m > config.loadAlertThreshold) {
22907
+ alerts.push(`high_load:${stats.load_1m.toFixed(2)}`);
22908
+ }
22909
+ if (stats.mem_avail_kb !== void 0 && stats.mem_avail_kb < config.memAlertThresholdMB * 1024) {
22910
+ alerts.push(`low_mem:${Math.round(stats.mem_avail_kb / 1024)}MB`);
22911
+ }
22912
+ if (stats.disk_used_pct !== void 0 && stats.disk_used_pct > 90) {
22913
+ alerts.push(`disk_full:${stats.disk_used_pct.toFixed(1)}%`);
22914
+ }
22915
+ return alerts;
22916
+ }
22917
+
22918
+ // src/traits/JetsonGPUTrait.ts
22919
+ var JETSON_ORIN_NANO_SUPER_DEFAULTS = {
22920
+ soc: "orin-nano",
22921
+ powerMode: "MAXN_SUPER",
22922
+ nvpmodelIndex: 0,
22923
+ jetsonClocks: true,
22924
+ jetpackVersion: "6.2.1",
22925
+ cudaComputeCapability: "8.7",
22926
+ cudaCores: 1024
22927
+ };
22928
+ function resolveJetsonGPUConfig(params) {
22929
+ return { ...JETSON_ORIN_NANO_SUPER_DEFAULTS, ...params };
22930
+ }
22931
+ var SOC_MAXN_MODE = {
22932
+ "orin-nano": 0,
22933
+ "orin-nx": 0,
22934
+ "agx-orin": 0,
22935
+ "xavier-nx": 8,
22936
+ nano: 0,
22937
+ unknown: 0
22938
+ };
22939
+ function nvpmodelCommand(config) {
22940
+ const idx = config.nvpmodelIndex ?? SOC_MAXN_MODE[config.soc];
22941
+ return `sudo nvpmodel -m ${idx}`;
22942
+ }
22943
+
22944
+ // src/traits/TegraMonitorTrait.ts
22945
+ var TEGRA_MONITOR_DEFAULTS = {
22946
+ intervalMs: 1e3,
22947
+ includeRawOutput: false,
22948
+ powerAlertW: 10,
22949
+ tempAlertC: 80
22950
+ };
22951
+ function resolveTegraMonitorConfig(params) {
22952
+ return { ...TEGRA_MONITOR_DEFAULTS, ...params };
22953
+ }
22954
+ function parseTegraStatsLine(raw) {
22955
+ const result = { raw };
22956
+ const ramMatch = raw.match(/RAM (\d+)\/(\d+)MB/);
22957
+ if (ramMatch) {
22958
+ result.ram_used_mb = parseInt(ramMatch[1], 10);
22959
+ result.ram_total_mb = parseInt(ramMatch[2], 10);
22960
+ }
22961
+ const gpuMatch = raw.match(/GPU\s+(\d+)%@(\d+)/);
22962
+ if (gpuMatch) {
22963
+ result.gpu_util_pct = parseInt(gpuMatch[1], 10);
22964
+ result.gpu_freq_mhz = parseInt(gpuMatch[2], 10);
22965
+ }
22966
+ const cpuMatch = raw.match(/CPU \[([^\]]+)\]/);
22967
+ if (cpuMatch) {
22968
+ result.cpu_cores = cpuMatch[1].split(",").map((core) => {
22969
+ const m = core.match(/(\d+)%@(\d+)/);
22970
+ return m ? { util_pct: parseInt(m[1], 10), freq_mhz: parseInt(m[2], 10) } : { util_pct: 0, freq_mhz: 0 };
22971
+ });
22972
+ }
22973
+ const powMatch = raw.match(/POM_5V_IN (\d+)\/\d+/);
22974
+ if (powMatch) {
22975
+ result.power_total_w = parseInt(powMatch[1], 10) / 1e3;
22976
+ }
22977
+ const thermalZones = {};
22978
+ const thermalMatches = raw.matchAll(/(\w+)@(\d+)C/g);
22979
+ for (const m of thermalMatches) {
22980
+ thermalZones[m[1]] = parseInt(m[2], 10);
22981
+ }
22982
+ if (Object.keys(thermalZones).length > 0) result.thermal_zones = thermalZones;
22983
+ const emcMatch = raw.match(/EMC_FREQ\s+(\d+)%/);
22984
+ if (emcMatch) result.emc_util_pct = parseInt(emcMatch[1], 10);
22985
+ return result;
22986
+ }
22987
+ function computeTegraAlerts(stats, config) {
22988
+ const alerts = [];
22989
+ if (stats.power_total_w !== null && stats.power_total_w !== void 0 && stats.power_total_w > config.powerAlertW) {
22990
+ alerts.push(`high_power:${stats.power_total_w.toFixed(1)}W`);
22991
+ }
22992
+ if (stats.thermal_zones) {
22993
+ for (const [zone, temp] of Object.entries(stats.thermal_zones)) {
22994
+ if (temp > config.tempAlertC) alerts.push(`overheat:${zone}@${temp}C`);
22995
+ }
22996
+ }
22997
+ return alerts;
22998
+ }
22999
+
23000
+ // src/traits/TensorRTInferenceTrait.ts
23001
+ var TENSOR_RT_DEFAULTS = {
23002
+ enginePath: "/opt/holoscript/engines/model.fp16.trt",
23003
+ precision: "fp16",
23004
+ onnxPath: "/opt/holoscript/models/model.onnx",
23005
+ maxBatchSize: 1,
23006
+ workspaceMB: 4096,
23007
+ cacheEngine: true
23008
+ };
23009
+ function resolveTensorRTConfig(params) {
23010
+ return { ...TENSOR_RT_DEFAULTS, ...params };
23011
+ }
23012
+ function buildTrtexecCommand(config) {
23013
+ const precisionFlag = config.precision === "fp32" ? "" : `--${config.precision}`;
23014
+ return [
23015
+ "trtexec",
23016
+ `--onnx=${config.onnxPath}`,
23017
+ `--saveEngine=${config.enginePath}`,
23018
+ precisionFlag,
23019
+ `--maxBatch=${config.maxBatchSize}`,
23020
+ `--workspace=${config.workspaceMB}`
23021
+ ].filter(Boolean).join(" ");
23022
+ }
23023
+ var ORIN_NANO_LATENCY_TARGETS = {
23024
+ fp32: { target_ms: 50, note: "full precision, slowest" },
23025
+ fp16: { target_ms: 20, note: "half precision, recommended for Orin" },
23026
+ int8: { target_ms: 10, note: "INT8 requires calibration dataset" }
23027
+ };
23028
+
23029
+ export { ACCURACY_SPEED_PILLAR, ADVANCED_LIGHTING_RUNTIME_CLAIM, AGENT_GOAL_PILLAR, AVBD_POPULATION_BUDGET, AdvancedLightingTrait, AdvancedPBRTrait, AdvancedTexturingTrait, AssetManifestBuilder, AssetResolverPipeline, BAKING_OBH_ESTIMATES, BakingPipelineError, BakingProgressTracker, BondingCurvedTrait, COLLABORATIVE_WORLD_TRAIT_DEFAULTS, COMPILER_PIPELINE_PILLAR, COORDINATION_SYNC_PILLAR, CRDTRoomTraitHandler, CacheManager, CollaborativeWorldTraitValidationError, D040_THREE_POPULATION_PILLAR, DEFAULT_ATTRIBUTION_CI_ACCURACY_FLOOR, DEFAULT_CONFIG, DEFAULT_HEADLESS_AGENT_DAILY_COST_CEILING_USD, DEFAULT_METRICS_RETENTION_DAYS, DEFAULT_NPC_DAILY_COST_CEILING_USD, DEFAULT_PHASE_CONFIGS, DEFAULT_REGISTERS, DepreciatingTrait, ECONOMICS_BUDGET_PILLAR, EDGE_CASE_HANDLER_PILLAR, EDGE_NODE_DEFAULTS, ENERGY_ENTROPY_PARALLEL, EncryptionTrait, GEOMETRY_TRAITS, GaussianBakingClient, GaussianBakingPipeline, GlobalIlluminationTrait, GrabbableTrait, HEMISPHERE_MAP, HOLOMESH_SOCIAL_TRAITS, HSMIntegrationTrait, INIT_BOOTSTRAP_PILLAR, INTENT_TRUTH_APPROVAL_PILLAR, JETSON_ORIN_NANO_SUPER_DEFAULTS, JETSON_TESTED_MODELS, LANGUAGE_ADAPTER_TRAIT_NAME, LANGUAGE_CONTEXT_PILLAR, LEFT_PHYSICS_PILLAR, LEFT_TEMPORAL_PILLAR, LOCAL_INFERENCE_DEFAULTS, LatentByzantineDetector, LatentSycophancyProbe, ManifestResolver, ManifestValidationError, MultiTargetTrackingTrait, NATIVE_2D_TRAIT_HANDLERS, OBH_PER_RENDER, ORIN_NANO_LATENCY_TARGETS, PHYSICS_CONSERVATION_PILLAR, PackageSigningTrait, ProceduralGeometryResolver, ProceduralResolver, QUALITY_PRESETS_BAKING, QUOTA_DEFAULTS, REFERENCE_OB_SCORES, RENDERING_LOD_PILLAR, RIGHT_PHYSICS_PILLAR, RIGHT_TEMPORAL_PILLAR, RSAEncryptionTrait, RateLimitExceededError, RateLimiter, RayTracingTrait, SABINE_CONSTANT_METRIC, SAFETY_EXPLORATION_PILLAR, SEED_PARALLEL_PILLARS, SEED_PILLARS, SERVICE_ALERT_RULE_TYPES, SHUTDOWN_SIGNAL_PILLAR, SIMULATION_DOMAIN_VISUALS, SOC_MAXN_MODE, SOLVER_PRECISION_PILLAR, SPEED_OF_SOUND_MS, STORAGE_CAPACITY_PILLAR, SYSTEM_MONITOR_DEFAULTS, ScreenSpaceEffectsTrait, SubsurfaceScatteringTrait, SubsurfaceVeinsTrait, TEGRA_MONITOR_DEFAULTS, TEMPORAL_LATERAL_PARALLEL, TEMPORAL_PILLAR, TENSOR_RT_DEFAULTS, TEXT_TO_3D_TRAITS, TIER_COMPLIANCE, TIER_ENFORCEMENT, TIER_FEATURE_FLAGS, TIME_OF_DAY_PHASES, TRAINING_GPU_HOURS_ESTIMATE, TRAIT_COMPOSITION_PILLAR, TRUTH_PHYSICS_PARALLEL, TaxableWealthTrait, Text3DAdapter, TextureResolver, TradeableTrait, UI_TRAIT_DEFAULTS, UI_TRAIT_NAMES, v6_exports as V6, VulnerabilityScannerTrait, WORLD_CONSTRAINTS, WORLD_FOUNDATION_MODEL_TRAIT, WalkableTrait, ZONE_CONSTRAINTS, ZeroKnowledgeProofTrait, _internal, agentBadgeHandler, agentProfileHandler, agentRoomHandler, agentWallHandler, analyzeRoomModes, applyTransformOp, autonomousAgendaHandler, avatarIntentHandler, backgroundMusicHandler, beatmapHandler, bioluminescentHandler, lookup as brainCoordLookup, resolve as brainCoordResolve, buildGammaWeightMatrix, buildMaskAttachments, buildOllamaChatPayload, buildTrtexecCommand, buildWalkableNavmesh, clamp01, clamp01Tod, classicalGreedyBisection, classifyMode, closestPointOnSegment, cognitiveVMHandler, collaborativeHandler, collaborativeWorldHandler, computeAlerts, computeParallelBounds, computeTegraAlerts, computeTelescopeOptics, convertGameObject, convertUnityMaterial, convertUnityScene, corticalDepthRouterHandler, cosineSimilarity, createApiQuotaAlertRule, createAttributionCiOperationMetric, createCRDTRoomTraitHandler, createCollaborativeWorldTraitConfig, createLatentIntegrityLayer, createMetricsCleanupJob, createQuantumAssignmentTrait, createSelectionLock, createSemanticMessage, createTracker, decideTransformOp, depthEstimationTraitHandler, deriveBioluminescentOutput, deriveBloomEmissive, deriveTimeOfDayOutput, distSquared, distanceToPath, dynamicRegionMaskHandler, elapsedToBeat, emergentSpacetimeHandler, enrichCoord, enumerateRoomModes, findCuesInInterval, gazeTransientPointerHandler, generateOctaneBakeConfig, generateQRCodeUrl, generateRoomModeHeatmap, generateTenantConfig, generateTweetUrl, getAllEntries as getAllBrainCoordEntries, getAllUITraits, getCognitiveVMSnapshot, getConstraintsByScope, getConstraintsForBiome, getErrors, getHints, getPillarSliceStats, getUAALAgentSnapshot, getUITrait, getWarnings, grabFeedbackProfileHandler, grabbableHandler, guestbookHandler, hash4ToUnit, hemisphereFromMniX, holoTwinHandler, holomapAnchorContextHandler, holomapCameraTrajectoryHandler, holomapDriftCorrectionHandler, holomapReconstructionHandler, holomapSplatOutputHandler, holomeshMarketplaceTraitHandlers, holomeshSocialTraitHandlers, hungarianAssign, hungarianAssignmentHandler, inferStage, initialEdgeNodeState, isJetsonTestedModel, isSelectionLockActive, kalmanFilterHandler, languageAdapterHandler, lerp, lerpTod, makeParallelPillar, mergeConstraints, mniDistance, mniXForHemisphere, modalFrequencyHz, native2DButtonHandler, native2DCardHandler, native2DFormHandler, native2DIconHandler, native2DImageHandler, native2DInputHandler, native2DLayoutHandler, native2DLinkHandler, native2DListHandler, native2DPanelHandler, native2DResponsiveHandler, native2DTailwindHandler, native2DTextHandler, native2DThemeHandler, nvpmodelCommand, packGeometry, paper26QuantumAssignmentHandler, parallelPillarHandler, parseCollaborativeWorldTraitConfig, parseManifest, parseTegraStatsLine, patternAt, pillarJepaHandler, pillarRegistryHandler, portalPresenceHandler, predictPosition, profileThemeHandler, proximityAt, pruneCollaborativePresence, pulseAt, qFactor, quantumCircuitHandler, quantumInspiredHandler, recursiveLinkHandler, reducedOrderModelHandler, registerDomainCoord, registerUITrait, reidEmbeddingHandler, resolveBioluminescentPattern, resolveCollaborativeWorldTraitConfig, resolveEdgeNodeConfig, resolveJetsonGPUConfig, resolveLocalInferenceConfig, resolvePhaseConfig, resolveSystemMonitorConfig, resolveTegraMonitorConfig, resolveTensorRTConfig, resolveTimeOfDayPhase, resolveWalkableConfig, rewardTraitHandler, roomModeResonanceHandler, roomPortalHandler, routeDepth, sabineT60, semanticCollabHandler, serviceObservabilityHandler, shareableHandler, sliceEmitterHandler, socialTraitHandlers, sortCues, spatialAdjacentHandler, spatialAgentHandler, spatialAnchorSharedHandler, spatialCommentHandler, spatialContainsHandler, spatialControllerInputHandler, spatialHandTrackingHandler, spatialReachableHandler, spatialTemporalAdjacentHandler, spatialTemporalReachableHandler, spatialTextLayoutHandler, spatialTrajectoryHandler, spatialVoiceHandler, speechAwareEncounterHandler, splitmix32, statusMoodHandler, stepReducedOrderModel, stepTracker, stubQAOARunner, telemetryHandler, telescopeOpticsHandler, timeOfDayHandler, toUnrealConcertDescriptor, top8FriendsHandler, totalAbsorptionSabin, trackingTopologyHandler, traitMarketplaceHandler, traitShowcaseHandler, tweetableHandler, twinActuatorHandler, uAALComposedAgentHandler, unityConverterHandler, validateCoord as validateBrainCoord, validateCollaborativeWorldTraitConfig, validateTelescopeOptics, validateTenantConfig, validateUITrait, validateWorldConstraints, validateWorldFoundationModelConfig, validateZoneConstraints, valueNoise3D, verbalFingerprintHandler, visitorCounterHandler, vocabularyRegisterHandler, voronoi3D, vqeRunnerHandler, vqeRunnerTrait, worldFoundationModelHandler, worldGeneratorHandler };
21749
23030
  //# sourceMappingURL=index.js.map
21750
23031
  //# sourceMappingURL=index.js.map