@holoscript/core 8.0.5 → 8.0.7

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 (248) hide show
  1. package/README.md +34 -34
  2. package/bin/holoscript.cjs +1 -1
  3. package/dist/GLTFPipeline-3EJLL3TS.cjs +38 -0
  4. package/dist/GLTFPipeline-3OWJV2VK.js +17 -0
  5. package/dist/{HoloScriptPlusParser-A2W7OCN2.cjs → HoloScriptPlusParser-ADWRY5OS.cjs} +15 -15
  6. package/dist/{HoloScriptPlusParser-7FBIFUFC.js → HoloScriptPlusParser-JLJDXHSC.js} +4 -4
  7. package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +27 -0
  8. package/dist/{HoloScriptPlusParser-F2Z56FJR.js → HoloScriptPlusParser-WENAFEFV.js} +5 -5
  9. package/dist/HoloScriptRuntime-GGRVEU4T.cjs +19 -0
  10. package/dist/HoloScriptRuntime-GJK6VJPH.js +10 -0
  11. package/dist/{USDZExporter-3FWJ25JI.cjs → USDZExporter-AUHZODOF.cjs} +15 -4
  12. package/dist/{USDZExporter-D2HQLQYK.js → USDZExporter-GXB4AUSG.js} +15 -4
  13. package/dist/{chunk-V6MKC2FZ.js → chunk-22Q5A6RV.js} +3 -3
  14. package/dist/{chunk-IUDGEUDO.cjs → chunk-2BZHWUSR.cjs} +27 -15
  15. package/dist/{chunk-XJAN7CZG.cjs → chunk-2GCNOI2U.cjs} +2 -2
  16. package/dist/{chunk-CCATWPXM.js → chunk-2OWDB4FB.js} +13 -25
  17. package/dist/{chunk-N75IH2HY.js → chunk-2Y3V22SG.js} +5 -14
  18. package/dist/{chunk-MXFUTKCO.js → chunk-33YHE7HX.js} +3 -7
  19. package/dist/{chunk-GYZE55MO.js → chunk-3GWWJT7L.js} +4 -4
  20. package/dist/{chunk-CMT5NMMS.js → chunk-3NGDZZR4.js} +4 -4
  21. package/dist/{chunk-WRLUBRKS.cjs → chunk-3SKLAUDD.cjs} +2 -2
  22. package/dist/{chunk-KKFZ3B6J.cjs → chunk-3VBO3IYQ.cjs} +2 -2
  23. package/dist/{chunk-YF2I3MV3.js → chunk-47RUFYKR.js} +2 -2
  24. package/dist/{chunk-LHAXPADA.js → chunk-4JGRWHZJ.js} +7 -5
  25. package/dist/{chunk-ROHLEP2W.cjs → chunk-4W5G5QVL.cjs} +26 -26
  26. package/dist/{chunk-GQHQOPXZ.cjs → chunk-4YNYPHH3.cjs} +186 -17
  27. package/dist/{chunk-ZMCVKFXI.cjs → chunk-56VOWURB.cjs} +154 -47
  28. package/dist/{chunk-FXKAW7ZO.cjs → chunk-5A4TCHOC.cjs} +3 -3
  29. package/dist/{chunk-M56JSP4A.js → chunk-5EDVCNRT.js} +2 -2
  30. package/dist/{chunk-UJXISJBN.js → chunk-5ET6L4NS.js} +3 -3
  31. package/dist/{chunk-5NWINHR5.cjs → chunk-63ZGNR2T.cjs} +43 -39
  32. package/dist/{chunk-NG77ATEW.cjs → chunk-6PRZIHGL.cjs} +6 -6
  33. package/dist/{chunk-3WZEJHUQ.cjs → chunk-7DMMMBCY.cjs} +7 -7
  34. package/dist/{chunk-FHP6LXJS.js → chunk-7E7GCQCK.js} +2 -2
  35. package/dist/{chunk-YN2YWTXW.js → chunk-7VMGP2FW.js} +44 -28
  36. package/dist/{chunk-OJXHYNXN.js → chunk-7X5PNIQJ.js} +3 -3
  37. package/dist/{chunk-FYSPZT4V.cjs → chunk-7ZHYEITD.cjs} +11 -11
  38. package/dist/{chunk-KPJL34Y7.cjs → chunk-ACVWFGBI.cjs} +2 -2
  39. package/dist/{chunk-UWXE23BT.cjs → chunk-AWB7QYY6.cjs} +6 -6
  40. package/dist/{chunk-UO4WPSGQ.js → chunk-B4EKV6HQ.js} +154 -48
  41. package/dist/{chunk-2X7NGX3M.js → chunk-BRNUPDHJ.js} +5 -5
  42. package/dist/{chunk-D3STJ56J.js → chunk-BTKZGHAV.js} +23 -11
  43. package/dist/{chunk-I5CDNPPE.cjs → chunk-C4GSLCHE.cjs} +331 -125
  44. package/dist/{chunk-QPSKHBJP.js → chunk-C7ZBSV2Q.js} +13 -7
  45. package/dist/{chunk-YN6V7R3L.cjs → chunk-CCPSNT6B.cjs} +12 -7
  46. package/dist/{chunk-NW5G5FBQ.js → chunk-DD2JQ7TS.js} +4 -3
  47. package/dist/{chunk-JD7CIZ33.js → chunk-DUCB6LGL.js} +8 -10
  48. package/dist/{chunk-ANXZFVY2.js → chunk-DY72BMU5.js} +3 -3
  49. package/dist/{chunk-AIA52I7T.cjs → chunk-EBS32AJI.cjs} +6 -4
  50. package/dist/{chunk-6DO5IZ5N.cjs → chunk-EDPYCLRC.cjs} +85 -65
  51. package/dist/{chunk-WQKJSGVS.js → chunk-F2G6CWFT.js} +271 -66
  52. package/dist/{chunk-AVJHHUC5.cjs → chunk-F5LKJ6F5.cjs} +43 -31
  53. package/dist/{chunk-ZU7NIRT6.js → chunk-FGMDMJM7.js} +10 -5
  54. package/dist/{chunk-YVD3CSO3.js → chunk-FHQFPYV4.js} +4 -4
  55. package/dist/{chunk-YIMN575O.js → chunk-FNHJRI32.js} +8 -5
  56. package/dist/{chunk-EXUP2BUM.cjs → chunk-FT6TDR2O.cjs} +27 -27
  57. package/dist/{chunk-BRQJKJGT.cjs → chunk-FWVYAMNW.cjs} +4 -4
  58. package/dist/{chunk-PGANYCAG.cjs → chunk-G25QVBA5.cjs} +4 -3
  59. package/dist/{chunk-XB274MW5.cjs → chunk-G6PNEASF.cjs} +13 -13
  60. package/dist/{chunk-2BSMSUCE.js → chunk-GASCWJK5.js} +2 -2
  61. package/dist/{chunk-HKEXJUWS.cjs → chunk-GH6C2QGW.cjs} +12 -21
  62. package/dist/{chunk-WRKUDAZJ.js → chunk-GSOUNWEL.js} +35 -27
  63. package/dist/{chunk-QPOQ7VPI.js → chunk-GTA4Q3A3.js} +2 -2
  64. package/dist/{chunk-JIYN45TV.cjs → chunk-GVFJ6T4S.cjs} +3 -7
  65. package/dist/{chunk-IVY74O6C.js → chunk-GVOKJNUN.js} +50 -11
  66. package/dist/{chunk-GZG4KA4E.js → chunk-GW3LKD5C.js} +6 -4
  67. package/dist/{chunk-NCWCUZNS.cjs → chunk-HFSVMKM3.cjs} +14 -14
  68. package/dist/{chunk-IUTY5WQ2.cjs → chunk-HLFDZ35S.cjs} +5 -5
  69. package/dist/{chunk-IWC5DM2M.cjs → chunk-I76GIKN7.cjs} +20 -16
  70. package/dist/{chunk-ON5QSY35.cjs → chunk-KAIVDEIG.cjs} +175 -59
  71. package/dist/{chunk-R24NNAEG.js → chunk-KCPHASCO.js} +18 -6
  72. package/dist/{chunk-T5J7ZKP3.cjs → chunk-KOUAQL2B.cjs} +16 -13
  73. package/dist/{chunk-GMP623FG.cjs → chunk-KQU64CIX.cjs} +2 -2
  74. package/dist/{chunk-MVPBWHAC.js → chunk-L5U4W6JC.js} +4 -4
  75. package/dist/{chunk-2IWC4FP7.cjs → chunk-LMJ5EBV7.cjs} +10 -10
  76. package/dist/{chunk-KKP7JKN4.cjs → chunk-LODTHGST.cjs} +18 -12
  77. package/dist/{chunk-4V2E7U7Q.cjs → chunk-LPS5AMQD.cjs} +8 -8
  78. package/dist/{chunk-PY37LNDP.js → chunk-LWUOUCYL.js} +9 -5
  79. package/dist/{chunk-6CTRH7HT.cjs → chunk-LYJJI7ZK.cjs} +12 -14
  80. package/dist/{chunk-GTU2Z2WW.cjs → chunk-M7K4LE66.cjs} +5 -14
  81. package/dist/{chunk-URG2SJLK.js → chunk-MDR235RZ.js} +3 -7
  82. package/dist/{chunk-E4M5OAYO.js → chunk-MSYSQ2AJ.js} +132 -16
  83. package/dist/{chunk-TWUXUCEW.cjs → chunk-NGBXXZLL.cjs} +50 -62
  84. package/dist/{chunk-FFAOS5HQ.js → chunk-NHJLP37F.js} +6 -6
  85. package/dist/{chunk-S3MDHNKB.cjs → chunk-NHYRRAGI.cjs} +5 -5
  86. package/dist/{chunk-U44IKGG7.cjs → chunk-O3MGZDCT.cjs} +89 -52
  87. package/dist/{chunk-GIOYPNTH.js → chunk-OABEO6HH.js} +185 -16
  88. package/dist/{chunk-KQCN6AKJ.cjs → chunk-OS533P33.cjs} +37 -29
  89. package/dist/{chunk-DAJXW4KX.js → chunk-PABONWKI.js} +24 -11
  90. package/dist/{chunk-QACVP4PM.js → chunk-PXNZ6TME.js} +77 -59
  91. package/dist/{chunk-OMXII44L.js → chunk-Q2Q34NF3.js} +63 -26
  92. package/dist/{chunk-OH2FAIVU.js → chunk-QBWNJXNR.js} +10 -6
  93. package/dist/{chunk-XKTPFXGA.js → chunk-QFU53KRH.js} +4 -4
  94. package/dist/{chunk-CR4FMIWL.cjs → chunk-QGMUTVVH.cjs} +17 -17
  95. package/dist/{chunk-MYY4PMWX.cjs → chunk-RUVBFAF7.cjs} +50 -11
  96. package/dist/{chunk-QD32ADK6.js → chunk-S762UEV5.js} +5 -5
  97. package/dist/{chunk-HNDK4IQU.cjs → chunk-SH5PPVK7.cjs} +61 -45
  98. package/dist/{chunk-JC5YBPSF.cjs → chunk-SKZPC5AG.cjs} +5 -5
  99. package/dist/{chunk-TJHVSBP2.js → chunk-SLHLXUMO.js} +10 -4
  100. package/dist/{chunk-5KVXXUD4.js → chunk-SSSN7VAM.js} +3 -3
  101. package/dist/{chunk-KMC6CQH3.js → chunk-SXOSDZD6.js} +6 -6
  102. package/dist/{chunk-J32ZJZJH.js → chunk-SYTRBGDS.js} +2 -2
  103. package/dist/{chunk-CIWWXYHZ.cjs → chunk-T6W3Z3SH.cjs} +2 -2
  104. package/dist/{chunk-QXH7QDSZ.js → chunk-TEVX443G.js} +44 -51
  105. package/dist/{chunk-UFZZ7TSN.cjs → chunk-TQ377OLB.cjs} +23 -21
  106. package/dist/{chunk-PJGFU5DN.cjs → chunk-TRCGG42I.cjs} +195 -152
  107. package/dist/{chunk-H652NHX5.js → chunk-TVANHNJ7.js} +30 -23
  108. package/dist/{chunk-EKBKLK7P.js → chunk-UDE4OZMR.js} +3 -3
  109. package/dist/{chunk-LKWQNUE6.cjs → chunk-UGXHYIWT.cjs} +5 -5
  110. package/dist/{chunk-JBNDTXXV.cjs → chunk-ULMSSHCJ.cjs} +21 -21
  111. package/dist/{chunk-YWOBW2PV.cjs → chunk-UOL6Y5TD.cjs} +18 -18
  112. package/dist/{chunk-5S7RKFGR.cjs → chunk-UVFI7XIR.cjs} +10 -4
  113. package/dist/{chunk-7M3PNU2M.cjs → chunk-V7AKE5VT.cjs} +10 -10
  114. package/dist/{chunk-J7XZV333.js → chunk-VEPGBETF.js} +6 -6
  115. package/dist/{chunk-UWJHCOH2.js → chunk-VF257YKO.js} +4 -4
  116. package/dist/{chunk-4N4SXXWF.js → chunk-VSACG2AR.js} +3 -3
  117. package/dist/{chunk-ZDSYWBIE.cjs → chunk-VW5CRJBE.cjs} +3 -7
  118. package/dist/{chunk-YT5L3B57.cjs → chunk-WFKVS2K4.cjs} +65 -27
  119. package/dist/{chunk-J6M4FPK5.js → chunk-WXQ57LAO.js} +3 -3
  120. package/dist/{chunk-5H2G27PK.cjs → chunk-X27QRG4C.cjs} +38 -38
  121. package/dist/{chunk-TVHSPJ4N.cjs → chunk-X2AVEAZM.cjs} +30 -23
  122. package/dist/{chunk-DHO2YRIM.js → chunk-XQ5MWMP2.js} +4 -4
  123. package/dist/{chunk-XIVIE43A.cjs → chunk-XW6IXEQH.cjs} +26 -13
  124. package/dist/{chunk-YIVFJNYV.js → chunk-Y3ZFVUUU.js} +2 -2
  125. package/dist/{chunk-7H33U5SM.cjs → chunk-Y57W2CT5.cjs} +2 -2
  126. package/dist/{chunk-OBIYPYYS.cjs → chunk-YCM6QQRT.cjs} +46 -53
  127. package/dist/{chunk-MBOOR7X4.js → chunk-YFVQWSNJ.js} +3 -3
  128. package/dist/{chunk-ADADVMXY.js → chunk-YFWRJW4B.js} +2 -2
  129. package/dist/{chunk-ONDAWTW4.js → chunk-YN6IETRZ.js} +179 -136
  130. package/dist/{chunk-4SDKXQ4C.js → chunk-YRRAUB35.js} +4 -4
  131. package/dist/{chunk-OBP5REIV.js → chunk-Z6PMDS4G.js} +62 -24
  132. package/dist/{chunk-BOVPWH4H.js → chunk-ZA34AN3R.js} +8 -17
  133. package/dist/{chunk-EKYL4PE3.cjs → chunk-ZLF4YF3U.cjs} +2 -2
  134. package/dist/{chunk-6FH72EB2.cjs → chunk-ZPZAVHXL.cjs} +20 -20
  135. package/dist/cli/holoscript-runner.cjs +39 -22
  136. package/dist/cli/holoscript-runner.js +32 -15
  137. package/dist/compiler/GasOptimizationAnalyzer.d.ts +73 -0
  138. package/dist/compiler/NFTMarketplaceCompiler.d.ts +23 -0
  139. package/dist/compiler/agent-inference.cjs +7 -7
  140. package/dist/compiler/agent-inference.js +3 -3
  141. package/dist/compiler/android-xr.cjs +8 -8
  142. package/dist/compiler/android-xr.js +6 -6
  143. package/dist/compiler/android.cjs +6 -6
  144. package/dist/compiler/android.js +4 -4
  145. package/dist/compiler/ar.cjs +6 -6
  146. package/dist/compiler/ar.js +4 -4
  147. package/dist/compiler/babylon.cjs +8 -8
  148. package/dist/compiler/babylon.js +7 -7
  149. package/dist/compiler/business-quest.cjs +9 -9
  150. package/dist/compiler/business-quest.js +1 -1
  151. package/dist/compiler/context.cjs +6 -6
  152. package/dist/compiler/context.js +3 -3
  153. package/dist/compiler/domain-block-utils.cjs +153 -153
  154. package/dist/compiler/domain-block-utils.js +4 -4
  155. package/dist/compiler/dtdl.cjs +7 -7
  156. package/dist/compiler/dtdl.js +4 -4
  157. package/dist/compiler/gltf-pipeline.cjs +8 -8
  158. package/dist/compiler/gltf-pipeline.js +1 -1
  159. package/dist/compiler/godot.cjs +6 -6
  160. package/dist/compiler/godot.js +5 -5
  161. package/dist/compiler/incremental.cjs +8 -8
  162. package/dist/compiler/incremental.js +3 -3
  163. package/dist/compiler/index.cjs +530 -355
  164. package/dist/compiler/index.d.ts +20 -0
  165. package/dist/compiler/index.js +374 -210
  166. package/dist/compiler/ios.cjs +6 -6
  167. package/dist/compiler/ios.js +4 -4
  168. package/dist/compiler/llm-provider-capabilities.cjs +6 -6
  169. package/dist/compiler/llm-provider-capabilities.js +3 -3
  170. package/dist/compiler/multi-layer.cjs +10 -10
  171. package/dist/compiler/multi-layer.js +9 -9
  172. package/dist/compiler/openxr.cjs +7 -7
  173. package/dist/compiler/openxr.js +6 -6
  174. package/dist/compiler/playcanvas.cjs +6 -6
  175. package/dist/compiler/playcanvas.js +5 -5
  176. package/dist/compiler/r3f.cjs +13 -13
  177. package/dist/compiler/r3f.js +8 -8
  178. package/dist/compiler/sdf.cjs +7 -7
  179. package/dist/compiler/sdf.js +5 -5
  180. package/dist/compiler/state.cjs +6 -6
  181. package/dist/compiler/state.js +4 -4
  182. package/dist/compiler/trait-composition.cjs +8 -8
  183. package/dist/compiler/trait-composition.js +4 -4
  184. package/dist/compiler/unity.cjs +7 -7
  185. package/dist/compiler/unity.js +6 -6
  186. package/dist/compiler/unreal.cjs +8 -8
  187. package/dist/compiler/unreal.js +6 -6
  188. package/dist/compiler/urdf.cjs +14 -14
  189. package/dist/compiler/urdf.js +5 -5
  190. package/dist/compiler/usd-physics.cjs +7 -7
  191. package/dist/compiler/usd-physics.js +4 -4
  192. package/dist/compiler/visionos.cjs +7 -7
  193. package/dist/compiler/visionos.js +6 -6
  194. package/dist/compiler/vrchat.cjs +7 -7
  195. package/dist/compiler/vrchat.js +5 -5
  196. package/dist/compiler/vrr.cjs +7 -7
  197. package/dist/compiler/vrr.js +5 -5
  198. package/dist/compiler/wasm.cjs +10 -10
  199. package/dist/compiler/wasm.js +5 -5
  200. package/dist/compiler/webgpu.cjs +6 -6
  201. package/dist/compiler/webgpu.js +5 -5
  202. package/dist/coordinators/index.cjs +27 -10
  203. package/dist/coordinators/index.js +27 -10
  204. package/dist/debugger.cjs +6 -6
  205. package/dist/debugger.js +4 -4
  206. package/dist/entries/scripting.cjs +6 -6
  207. package/dist/entries/scripting.js +2 -2
  208. package/dist/hololand/index.cjs +36 -36
  209. package/dist/hololand/index.js +2 -2
  210. package/dist/index.cjs +1080 -2190
  211. package/dist/index.js +467 -1577
  212. package/dist/math/tropical-spmv.cjs +10 -10
  213. package/dist/math/tropical-spmv.js +1 -1
  214. package/dist/math/vec3.cjs +13 -13
  215. package/dist/math/vec3.js +1 -1
  216. package/dist/parser/NFTMarketplaceTypes.d.ts +191 -0
  217. package/dist/parser.cjs +16 -16
  218. package/dist/parser.js +5 -5
  219. package/dist/reconstruction/index.cjs +37 -37
  220. package/dist/reconstruction/index.js +4 -4
  221. package/dist/runtime.cjs +280 -74
  222. package/dist/runtime.d.ts +10 -1
  223. package/dist/runtime.js +268 -70
  224. package/dist/self-improvement/index.cjs +12 -4
  225. package/dist/self-improvement/index.js +12 -4
  226. package/dist/{src-HCCCSYP7.js → src-J6CM4AUR.js} +91 -33
  227. package/dist/{src-4ROC227P.cjs → src-PT2FERDV.cjs} +93 -35
  228. package/dist/testing.cjs +5 -5
  229. package/dist/testing.js +1 -1
  230. package/dist/traits/botanical-lotus.cjs +52 -48
  231. package/dist/traits/botanical-lotus.js +2 -2
  232. package/dist/traits/engines/index.cjs +39 -39
  233. package/dist/traits/engines/index.d.ts +279 -0
  234. package/dist/traits/engines/index.js +4 -4
  235. package/dist/traits/index.cjs +889 -773
  236. package/dist/traits/index.js +371 -259
  237. package/dist/world/index.cjs +21 -18
  238. package/dist/world/index.js +21 -18
  239. package/dist/world-model/index.cjs +11 -5
  240. package/dist/world-model/index.d.ts +8 -0
  241. package/dist/world-model/index.js +11 -5
  242. package/package.json +75 -69
  243. package/LICENSE +0 -21
  244. package/dist/GLTFPipeline-37FPRVPH.js +0 -17
  245. package/dist/GLTFPipeline-EK3LFJKW.cjs +0 -38
  246. package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +0 -27
  247. package/dist/HoloScriptRuntime-ACDFKVVH.js +0 -10
  248. package/dist/HoloScriptRuntime-ON2OQVEF.cjs +0 -19
package/dist/index.js CHANGED
@@ -1,103 +1,103 @@
1
- export { GLTFPipeline, createGLTFPipeline, generateScaleNormalMap, generateScaleTexture } from './chunk-KMC6CQH3.js';
2
- export { ANCHOR_DEFAULTS, ARCORE_DEPTH_RECOMMENDED_RANGE_MILLIMETERS, HOLOMAP_MOBILE_SENSOR_BUNDLE_VERSION, TRAJECTORY_DEFAULTS, arCoreDepthFrameToMobileSensorFrame, cameraPoseFromColumnMajorTransform, createAnchorContext, createArCoreDepthMobileSensorBundle, createFusedAttentionBackend, createPagedKVCache, createTrajectoryMemory, mergeAnchoredProvenance, mobileSensorBundleToFrames, replayMobileSensorBundle, validateMobileSensorBundle } from './chunk-OJXHYNXN.js';
1
+ export { GLTFPipeline, createGLTFPipeline, generateScaleNormalMap, generateScaleTexture } from './chunk-SXOSDZD6.js';
2
+ export { ANCHOR_DEFAULTS, ARCORE_DEPTH_RECOMMENDED_RANGE_MILLIMETERS, HOLOMAP_MOBILE_SENSOR_BUNDLE_VERSION, TRAJECTORY_DEFAULTS, arCoreDepthFrameToMobileSensorFrame, cameraPoseFromColumnMajorTransform, createAnchorContext, createArCoreDepthMobileSensorBundle, createFusedAttentionBackend, createPagedKVCache, createTrajectoryMemory, mergeAnchoredProvenance, mobileSensorBundleToFrames, replayMobileSensorBundle, validateMobileSensorBundle } from './chunk-7X5PNIQJ.js';
3
3
  export { InteropBindingGenerator, MCPCircuitBreaker, getMCPCircuitBreaker } from './chunk-FGGJQRLZ.js';
4
- export { SkeletonTrait as SkeletonAnimationTrait, createSkeletonTrait } from './chunk-M56JSP4A.js';
5
- export { BUILD_TIMESTAMP, GIT_COMMIT_SHA, HOLOMAP_DEFAULTS, HOLOSCRIPT_VERSION, assertWeightCid, createHoloMapMicroEncoder, createHoloMapRunId, createHoloMapRuntime, frameToMicroImage, getCachedWeightBlob, getVersionInfo, getVersionString, loadHoloMapWeightBlob, logHoloMapEvent, normalizeWeightCidDigest, putCachedWeightBlob, resetHoloMapTelemetryForTests, runHoloMapMicroEncoderCpu, tryCreateHoloMapEncoderDevice } from './chunk-OBP5REIV.js';
4
+ export { SkeletonTrait as SkeletonAnimationTrait, createSkeletonTrait } from './chunk-5EDVCNRT.js';
5
+ export { BUILD_TIMESTAMP, GIT_COMMIT_SHA, HOLOMAP_DEFAULTS, HOLOSCRIPT_VERSION, assertWeightCid, createHoloMapMicroEncoder, createHoloMapRunId, createHoloMapRuntime, frameToMicroImage, getCachedWeightBlob, getVersionInfo, getVersionString, loadHoloMapWeightBlob, logHoloMapEvent, normalizeWeightCidDigest, putCachedWeightBlob, resetHoloMapTelemetryForTests, runHoloMapMicroEncoderCpu, tryCreateHoloMapEncoderDevice } from './chunk-Z6PMDS4G.js';
6
6
  export { computeHoloMapReplayFingerprint, fnv1a32Hex } from './chunk-WNNE3PO3.js';
7
7
  export { CircuitBreakerState, CircuitBreaker as ResilienceCircuitBreaker, retryWithBackoff, withTimeout } from './chunk-A6KINLZJ.js';
8
- import { init_ThreeJSCompiler, init_Native2DCompiler, init_A2AAgentCardCompiler, init_NIRCompiler, Native2DCompiler, GaussianSplattingCompiler, NIRCompiler, A2AAgentCardCompiler, USDZPipeline } from './chunk-WQKJSGVS.js';
9
- export { BUILTIN_RESOURCES, CAPABILITY_HIERARCHY, CATEGORY_DEFAULT_EMBODIMENT, CompilerBridge, CrossRealityTraitRegistry, EFFECTS_BY_CATEGORY, EFFECT_TO_CAPABILITY, EffectChecker, EffectRow, HANDOFF_PATH_RULES, LinearTypeChecker, MVC_BUDGET_CONSTRAINTS, PLATFORM_BUDGETS, PLATFORM_EMBODIMENT_OVERRIDES, ResourceBudgetAnalyzer, SpatialPartitionPass, TRAIT_EFFECTS, TRAIT_RESOURCE_COSTS, TRAIT_RESOURCE_MAP, TRUST_LEVEL_CAPABILITIES, ThreeJSCompiler, USDZPipeline, bestCategoryForTraits, buildSafetyReport, checkCapabilities, compilePipelineSource, compilePipelineSourceToNode, compilePipelineSourceToPython, compilePipelineToNode, compilePipelineToPython, createCrossRealityTraitRegistry, createEffectChecker, dangerLevel, deriveRequirements, effectCategory, expandCapabilities, formatReport, generateCertificate, getCompilerBridge, getCrossRealityTraitRegistry, inferFromBuiltins, inferFromTraits, isSafeTraitSet, knownBuiltins, knownTraits, quickSafetyCheck, resetCrossRealityTraitRegistry, runSafetyPass, selectModality, selectModalityForAll, spatialPartition } from './chunk-WQKJSGVS.js';
10
- export { generateHullGeometry, generateMembraneGeometry, generateSplineGeometry } from './chunk-EKBKLK7P.js';
8
+ import { init_ThreeJSCompiler, init_Native2DCompiler, init_A2AAgentCardCompiler, init_NIRCompiler, Native2DCompiler, CodeEditorCompiler, GaussianSplattingCompiler, NIRCompiler, A2AAgentCardCompiler, USDZPipeline } from './chunk-F2G6CWFT.js';
9
+ export { BUILTIN_RESOURCES, CAPABILITY_HIERARCHY, CATEGORY_DEFAULT_EMBODIMENT, CompilerBridge, CrossRealityTraitRegistry, EFFECTS_BY_CATEGORY, EFFECT_TO_CAPABILITY, EffectChecker, EffectRow, HANDOFF_PATH_RULES, LinearTypeChecker, MVC_BUDGET_CONSTRAINTS, PLATFORM_BUDGETS, PLATFORM_EMBODIMENT_OVERRIDES, ResourceBudgetAnalyzer, SpatialPartitionPass, TRAIT_EFFECTS, TRAIT_RESOURCE_COSTS, TRAIT_RESOURCE_MAP, TRUST_LEVEL_CAPABILITIES, ThreeJSCompiler, USDZPipeline, bestCategoryForTraits, buildSafetyReport, checkCapabilities, compilePipelineSource, compilePipelineSourceToNode, compilePipelineSourceToPython, compilePipelineToNode, compilePipelineToPython, createCrossRealityTraitRegistry, createEffectChecker, dangerLevel, deriveRequirements, effectCategory, expandCapabilities, formatReport, generateCertificate, getCompilerBridge, getCrossRealityTraitRegistry, inferFromBuiltins, inferFromTraits, isSafeTraitSet, knownBuiltins, knownTraits, quickSafetyCheck, resetCrossRealityTraitRegistry, runSafetyPass, selectModality, selectModalityForAll, spatialPartition } from './chunk-F2G6CWFT.js';
10
+ export { generateHullGeometry, generateMembraneGeometry, generateSplineGeometry } from './chunk-UDE4OZMR.js';
11
11
  import { generateSemanticSceneGraphObject } from './chunk-HYNTS5CP.js';
12
12
  export { SemanticSceneGraph } from './chunk-HYNTS5CP.js';
13
- export { AgentInferenceExportTarget_default as AgentInferenceExportTarget } from './chunk-V6MKC2FZ.js';
14
- export { assertHoloMapManifestContract } from './chunk-MBOOR7X4.js';
13
+ export { AgentInferenceExportTarget_default as AgentInferenceExportTarget } from './chunk-22Q5A6RV.js';
14
+ export { assertHoloMapManifestContract } from './chunk-YFVQWSNJ.js';
15
15
  export { COCOExporterImpl as COCOExporter } from './chunk-Q56TT7IL.js';
16
16
  export { RemotionBridgeImpl as RemotionBridge } from './chunk-YYXH45E2.js';
17
- export { AIDriverTrait, ARKIT_MOUTH_SHAPES, AnimationTrait, BehaviorTreeRunner, MorphTrait as BlendShapeTrait, CharacterTrait, ComponentType, DEFAULT_ANIMATION_MAP, DEFAULT_AUTONOMY_GUARD_POLICY, DEFAULT_EXPRESSION_PRESETS, DEFAULT_FREQUENCY_BANDS, DRAFT_DEFAULTS, DRAFT_TRAIT, DialogTrait, DraftManager, ECSWorld, EmotionDirectiveTrait, GOAPPlanner, IKTrait, JointTrait, LipSyncTrait, LobbyTrait, NetworkedTrait, OCULUS_VISEME_MAP, REFUSED_CARE_OPTIMIZATION_TARGETS, RigidbodyTrait, TriggerTrait, VRTraitRegistry, VoiceInputTrait, VoiceOutputTrait, accessibleHandler, aiInpaintingHandler, aiTextureGenHandler, alertHandler, altTextHandler, ambisonicsHandler, anchorHandler, audioMaterialHandler, audioOcclusionHandler, audioPortalHandler, avatarEmbodimentHandler, behaviorTreeHandler, bodyTrackingHandler, buoyancyHandler, chainHandler, clothHandler, coLocatedHandler, computeHandler, controlNetHandler, controllerInputHandler, createAIDriverTrait, createAnimationTrait, createMorphTrait as createBlendShapeTrait, createCareField, createCharacterTrait, createDialogTrait, createEmotionDirectiveTrait, createIKTrait, createJointTrait, createLipSyncTrait, createLobbyTrait, createNetworkedTrait, createRepairLoop, createRigidbodyTrait, createTriggerTrait, createVoiceInputTrait, createVoiceOutputTrait, dataBindingHandler, destructionHandler, dialogueHandler, diffusionRealtimeHandler, digitalTwinHandler, dropTableHandler, effectiveWeight, emotionHandler, emotionalVoiceHandler, encounterHandler, evaluateAutonomyGuard, extractPayload, faceTrackingHandler, factionHandler, fbxHandler, flowFieldHandler, fluidHandler, gaussianSplatHandler, geospatialAnchorHandler, geospatialEnvHandler, getCachedThingDescription, getMQTTSinkClient, getMQTTSinkState, getMQTTSourceClient, getMQTTSourceState, getWoTThingState, gltfHandler, goalOrientedHandler, gpuBufferHandler, gpuParticleHandler, gpuPhysicsHandler, handTrackingHandler, hapticCueHandler, hasMQTTSinkTrait, hasMQTTSourceTrait, hasWoTThingTrait, headTrackedAudioHandler, heatmap3dHandler, highContrastHandler, hrtfHandler, invalidateThingDescription, isMQTTSinkConnected, isMQTTSourceConnected, layerAwareHandler, lightEstimationHandler, llmAgentHandler, luckHandler, magnifiableHandler, marketplaceHandler, materialXHandler, memoryHandler, meshDetectionHandler, motionReducedHandler, mqttSinkHandler, mqttSourceHandler, multiAgentHandler, nerfHandler, neuralLinkHandler, nftHandler, occlusionHandler, patrolHandler, perceptionHandler, persistentAnchorHandler, photogrammetryHandler, pickByWeight, planeDetectionHandler, poiHandler, pointCloudHandler, portableHandler, publishToMQTTSink, rbacHandler, recordGratitude, rememberRelationalContext, remotePresenceHandler, reverbZoneHandler, roleHandler, rooftopAnchorHandler, ropeHandler, sceneGraphHandler, screenReaderHandler, sensorHandler, sharePlayHandler, sharedAnchorHandler, sharedWorldHandler, shouldFire, softBodyHandler, sonificationHandler, spatialAccessoryHandler, spatialAudioCueHandler, spatialPersonaHandler, spectatorHandler, statHandler, subtitleHandler, terrainAnchorHandler, tokenGatedHandler, usdHandler, userMonitorHandler, validateCareField, voiceProximityHandler, volumetricVideoHandler, vpsHandler, vrTraitRegistry, walletHandler, windHandler, wotThingHandler } from './chunk-ONDAWTW4.js';
18
- export { LIGHTING_PRESETS, LightingTrait, MATERIAL_PRESETS, MaterialTrait, RenderingTrait, SHADER_CHUNKS, SHADER_PRESETS, ShaderTrait, createLightingTrait, createMaterialTrait, createRenderingTrait, createShaderTrait } from './chunk-QPOQ7VPI.js';
19
- export { HOLOMAP_SIMULATION_CONTRACT_KIND, ensureNodeWebGpuSync, isWebGpuEnvironmentPresent } from './chunk-YF2I3MV3.js';
17
+ export { AIDriverTrait, ARKIT_MOUTH_SHAPES, AnimationTrait, BehaviorTreeRunner, MorphTrait as BlendShapeTrait, CharacterTrait, ComponentType, DEFAULT_ANIMATION_MAP, DEFAULT_AUTONOMY_GUARD_POLICY, DEFAULT_EXPRESSION_PRESETS, DEFAULT_FREQUENCY_BANDS, DRAFT_DEFAULTS, DRAFT_TRAIT, DialogTrait, DraftManager, ECSWorld, EmotionDirectiveTrait, GOAPPlanner, IKTrait, JointTrait, LipSyncTrait, LobbyTrait, NetworkedTrait, OCULUS_VISEME_MAP, REFUSED_CARE_OPTIMIZATION_TARGETS, RigidbodyTrait, TriggerTrait, VRTraitRegistry, VoiceInputTrait, VoiceOutputTrait, accessibleHandler, aiInpaintingHandler, aiTextureGenHandler, alertHandler, altTextHandler, ambisonicsHandler, anchorHandler, audioMaterialHandler, audioOcclusionHandler, audioPortalHandler, avatarEmbodimentHandler, behaviorTreeHandler, bodyTrackingHandler, buoyancyHandler, chainHandler, clothHandler, coLocatedHandler, computeHandler, controlNetHandler, controllerInputHandler, createAIDriverTrait, createAnimationTrait, createMorphTrait as createBlendShapeTrait, createCareField, createCharacterTrait, createDialogTrait, createEmotionDirectiveTrait, createIKTrait, createJointTrait, createLipSyncTrait, createLobbyTrait, createNetworkedTrait, createRepairLoop, createRigidbodyTrait, createTriggerTrait, createVoiceInputTrait, createVoiceOutputTrait, dataBindingHandler, destructionHandler, dialogueHandler, diffusionRealtimeHandler, digitalTwinHandler, dropTableHandler, effectiveWeight, emotionHandler, emotionalVoiceHandler, encounterHandler, evaluateAutonomyGuard, extractPayload, faceTrackingHandler, factionHandler, fbxHandler, flowFieldHandler, fluidHandler, gaussianSplatHandler, geospatialAnchorHandler, geospatialEnvHandler, getCachedThingDescription, getMQTTSinkClient, getMQTTSinkState, getMQTTSourceClient, getMQTTSourceState, getWoTThingState, gltfHandler, goalOrientedHandler, gpuBufferHandler, gpuParticleHandler, gpuPhysicsHandler, handTrackingHandler, hapticCueHandler, hasMQTTSinkTrait, hasMQTTSourceTrait, hasWoTThingTrait, headTrackedAudioHandler, heatmap3dHandler, highContrastHandler, hrtfHandler, invalidateThingDescription, isMQTTSinkConnected, isMQTTSourceConnected, layerAwareHandler, lightEstimationHandler, llmAgentHandler, luckHandler, magnifiableHandler, marketplaceHandler, materialXHandler, memoryHandler, meshDetectionHandler, motionReducedHandler, mqttSinkHandler, mqttSourceHandler, multiAgentHandler, nerfHandler, neuralLinkHandler, nftHandler, occlusionHandler, patrolHandler, perceptionHandler, persistentAnchorHandler, photogrammetryHandler, pickByWeight, planeDetectionHandler, poiHandler, pointCloudHandler, portableHandler, publishToMQTTSink, rbacHandler, recordGratitude, rememberRelationalContext, remotePresenceHandler, reverbZoneHandler, roleHandler, rooftopAnchorHandler, ropeHandler, sceneGraphHandler, screenReaderHandler, sensorHandler, sharePlayHandler, sharedAnchorHandler, sharedWorldHandler, shouldFire, softBodyHandler, sonificationHandler, spatialAccessoryHandler, spatialAudioCueHandler, spatialPersonaHandler, spectatorHandler, statHandler, subtitleHandler, terrainAnchorHandler, tokenGatedHandler, usdHandler, userMonitorHandler, validateCareField, voiceProximityHandler, volumetricVideoHandler, vpsHandler, vrTraitRegistry, walletHandler, windHandler, wotThingHandler } from './chunk-YN6IETRZ.js';
18
+ export { LIGHTING_PRESETS, LightingTrait, MATERIAL_PRESETS, MaterialTrait, RenderingTrait, SHADER_CHUNKS, SHADER_PRESETS, ShaderTrait, createLightingTrait, createMaterialTrait, createRenderingTrait, createShaderTrait } from './chunk-GTA4Q3A3.js';
19
+ export { HOLOMAP_SIMULATION_CONTRACT_KIND, ensureNodeWebGpuSync, isWebGpuEnvironmentPresent } from './chunk-47RUFYKR.js';
20
20
  import './chunk-TDCNJHWO.js';
21
21
  import './chunk-YQELFNJV.js';
22
- import './chunk-FHP6LXJS.js';
23
- import { IncrementalCompiler } from './chunk-GYZE55MO.js';
24
- export { IncrementalCompiler, TraitDependencyGraph, createIncrementalCompiler, globalTraitGraph } from './chunk-GYZE55MO.js';
25
- export { hololand_exports as hololand } from './chunk-JD7CIZ33.js';
22
+ import './chunk-7E7GCQCK.js';
23
+ import { IncrementalCompiler } from './chunk-3GWWJT7L.js';
24
+ export { IncrementalCompiler, TraitDependencyGraph, createIncrementalCompiler, globalTraitGraph } from './chunk-3GWWJT7L.js';
25
+ export { hololand_exports as hololand } from './chunk-DUCB6LGL.js';
26
26
  export { CompositionTestRunner, DEFAULT_STDLIB_POLICY, PROTOCOL_CONSTANTS, TEST_TRAIT, buildStdlibPermissionScopeDiff, calculateRevenueDistribution, checkLicenseCompatibility, createStdlibActions, ethToWei, evaluateStdlibPermissionScopePolicy, findExtraPermissionScopes, findMissingRequiredPermissionScopes, formatRevenueDistribution, isPathAllowed, isValidPermissionScopeName, normalizePermissionScopeName, parseHostFromUrl, redactStdlibPermissionPreview, registerStdlib, resolveImportChain, resolveRepoRelativePath, stdlibPermissionPreviewHasPublicLeak, testHandler, toStringArray, truncateText, weiToEth } from './chunk-ZZ7RO2UQ.js';
27
27
  export { AsyncFunctionHandler, ErrorBoundary, ExportImportHandler, InteropContext, TypeScriptTypeLoader } from './chunk-5JEU52DW.js';
28
28
  export { ABSORB_TRAIT, AbsorbProcessor, HOT_RELOAD_TRAIT, HotReloadWatcher, SCRIPT_TEST_TRAIT, ScriptTestRunner } from './chunk-2M2DPHKB.js';
29
29
  import { computeContentHash } from './chunk-4R6SBXDB.js';
30
30
  export { classifyPublishMode, computeContentHash, extractImports, generateProvenance } from './chunk-4R6SBXDB.js';
31
- import { init_WASMCompiler, WASMCompiler } from './chunk-YVD3CSO3.js';
32
- export { WASMCompiler, compileASTToWASM, compileToWASM, createWASMCompiler } from './chunk-YVD3CSO3.js';
33
- import { init_WebGPUCompiler, WebGPUCompiler } from './chunk-CMT5NMMS.js';
34
- export { WebGPUCompiler } from './chunk-CMT5NMMS.js';
35
- import { init_DTDLCompiler, DTDLCompiler } from './chunk-J6M4FPK5.js';
36
- export { DTDLCompiler, DTDL_TRAIT_COMPONENTS } from './chunk-J6M4FPK5.js';
37
- import { init_URDFCompiler, URDFCompiler } from './chunk-R24NNAEG.js';
38
- export { URDFCompiler, compileForGazebo, compileForROS2, compileToURDF, createURDFCompiler, generateControllersYaml, generateROS2LaunchFile } from './chunk-R24NNAEG.js';
39
- import { USDPhysicsCompiler } from './chunk-LHAXPADA.js';
40
- export { USDPhysicsCompiler, compileForIsaacSim, compileToUSDPhysics } from './chunk-LHAXPADA.js';
41
- import { init_SDFCompiler, SDFCompiler } from './chunk-OH2FAIVU.js';
42
- export { SDFCompiler } from './chunk-OH2FAIVU.js';
43
- import { init_StateCompiler, StateCompiler } from './chunk-ANXZFVY2.js';
44
- import { TraitCompositionCompiler } from './chunk-XKTPFXGA.js';
45
- export { TraitCompositionCompiler } from './chunk-XKTPFXGA.js';
46
- import { init_UnrealCompiler, UnrealCompiler } from './chunk-D3STJ56J.js';
47
- export { UnrealCompiler, compileToUnreal } from './chunk-D3STJ56J.js';
48
- import { init_GodotCompiler, GodotCompiler } from './chunk-PY37LNDP.js';
49
- export { GodotCompiler } from './chunk-PY37LNDP.js';
50
- import { init_R3FCompiler, init_visual, MATERIAL_PRESETS, ENVIRONMENT_PRESETS, R3FCompiler } from './chunk-E4M5OAYO.js';
51
- export { ENVIRONMENT_PRESETS, R3FCompiler, registerAllPresets } from './chunk-E4M5OAYO.js';
31
+ import { init_WASMCompiler, WASMCompiler } from './chunk-FHQFPYV4.js';
32
+ export { WASMCompiler, compileASTToWASM, compileToWASM, createWASMCompiler } from './chunk-FHQFPYV4.js';
33
+ import { init_WebGPUCompiler, WebGPUCompiler } from './chunk-3NGDZZR4.js';
34
+ export { WebGPUCompiler } from './chunk-3NGDZZR4.js';
35
+ import { init_DTDLCompiler, DTDLCompiler } from './chunk-WXQ57LAO.js';
36
+ export { DTDLCompiler, DTDL_TRAIT_COMPONENTS } from './chunk-WXQ57LAO.js';
37
+ import { init_URDFCompiler, URDFCompiler } from './chunk-KCPHASCO.js';
38
+ export { URDFCompiler, compileForGazebo, compileForROS2, compileToURDF, createURDFCompiler, generateControllersYaml, generateROS2LaunchFile } from './chunk-KCPHASCO.js';
39
+ import { USDPhysicsCompiler } from './chunk-4JGRWHZJ.js';
40
+ export { USDPhysicsCompiler, compileForIsaacSim, compileToUSDPhysics } from './chunk-4JGRWHZJ.js';
41
+ import { init_SDFCompiler, SDFCompiler } from './chunk-QBWNJXNR.js';
42
+ export { SDFCompiler } from './chunk-QBWNJXNR.js';
43
+ import { init_StateCompiler, StateCompiler } from './chunk-DY72BMU5.js';
44
+ import { TraitCompositionCompiler } from './chunk-QFU53KRH.js';
45
+ export { TraitCompositionCompiler } from './chunk-QFU53KRH.js';
46
+ import { init_UnrealCompiler, UnrealCompiler } from './chunk-BTKZGHAV.js';
47
+ export { UnrealCompiler, compileToUnreal } from './chunk-BTKZGHAV.js';
48
+ import { init_GodotCompiler, GodotCompiler } from './chunk-LWUOUCYL.js';
49
+ export { GodotCompiler } from './chunk-LWUOUCYL.js';
50
+ import { init_R3FCompiler, init_visual, MATERIAL_PRESETS, ENVIRONMENT_PRESETS, R3FCompiler } from './chunk-MSYSQ2AJ.js';
51
+ export { ENVIRONMENT_PRESETS, R3FCompiler, registerAllPresets } from './chunk-MSYSQ2AJ.js';
52
52
  import './chunk-XT6JY5W5.js';
53
- import './chunk-UO4WPSGQ.js';
54
- import { init_PlayCanvasCompiler, PlayCanvasCompiler } from './chunk-DHO2YRIM.js';
55
- import { init_AndroidCompiler, AndroidCompiler } from './chunk-WRKUDAZJ.js';
56
- export { AndroidCompiler, compileToAndroid } from './chunk-WRKUDAZJ.js';
57
- import { init_AndroidXRCompiler, AndroidXRCompiler } from './chunk-YN2YWTXW.js';
58
- export { AndroidXRCompiler, compileToAndroidXR } from './chunk-YN2YWTXW.js';
53
+ import './chunk-B4EKV6HQ.js';
54
+ import { init_PlayCanvasCompiler, PlayCanvasCompiler } from './chunk-XQ5MWMP2.js';
55
+ import { init_AndroidCompiler, AndroidCompiler } from './chunk-GSOUNWEL.js';
56
+ export { AndroidCompiler, compileToAndroid } from './chunk-GSOUNWEL.js';
57
+ import { init_AndroidXRCompiler, AndroidXRCompiler } from './chunk-7VMGP2FW.js';
58
+ export { AndroidXRCompiler, compileToAndroidXR } from './chunk-7VMGP2FW.js';
59
59
  import './chunk-FDSGHPAK.js';
60
- import { init_IOSCompiler, IOSCompiler } from './chunk-OMXII44L.js';
61
- export { IOSCompiler, compileToIOS } from './chunk-OMXII44L.js';
62
- import { init_VisionOSCompiler, VisionOSCompiler } from './chunk-2X7NGX3M.js';
63
- export { VisionOSCompiler } from './chunk-2X7NGX3M.js';
60
+ import { init_IOSCompiler, IOSCompiler } from './chunk-Q2Q34NF3.js';
61
+ export { IOSCompiler, compileToIOS } from './chunk-Q2Q34NF3.js';
62
+ import { init_VisionOSCompiler, VisionOSCompiler } from './chunk-BRNUPDHJ.js';
63
+ export { VisionOSCompiler } from './chunk-BRNUPDHJ.js';
64
64
  export { FileSizeExceededError, IPFSPinError, IPFSService, IPFSUploadError, InfuraProvider, NFTStorageProvider, PinataProvider } from './chunk-WRWEX5ZF.js';
65
- import { MultiLayerCompiler } from './chunk-FFAOS5HQ.js';
66
- export { MultiLayerCompiler } from './chunk-FFAOS5HQ.js';
67
- import { init_VRRCompiler, VRRCompiler } from './chunk-4SDKXQ4C.js';
68
- export { VRRCompiler } from './chunk-4SDKXQ4C.js';
69
- import { init_ARCompiler, ARCompiler } from './chunk-UJXISJBN.js';
70
- export { ARCompiler } from './chunk-UJXISJBN.js';
71
- import { init_OpenXRCompiler, OpenXRCompiler } from './chunk-QD32ADK6.js';
72
- export { OpenXRCompiler } from './chunk-QD32ADK6.js';
73
- import { init_VRChatCompiler, VRChatCompiler } from './chunk-UWJHCOH2.js';
74
- export { VRChatCompiler, compileToVRChat } from './chunk-UWJHCOH2.js';
75
- import { init_BabylonCompiler, BabylonCompiler } from './chunk-J7XZV333.js';
76
- export { BabylonCompiler } from './chunk-J7XZV333.js';
77
- import { init_Semiring, init_ProvenanceSemiring } from './chunk-TJHVSBP2.js';
78
- export { AuthorityTier, MaxPlusSemiring, MinPlusSemiring, ProvenanceSemiring, SumProductSemiring, TRAIT_ZERO, authorityWeight, createDeadElement, isDeadElement, strategyToSemiring } from './chunk-TJHVSBP2.js';
65
+ import { MultiLayerCompiler } from './chunk-NHJLP37F.js';
66
+ export { MultiLayerCompiler } from './chunk-NHJLP37F.js';
67
+ import { init_VRRCompiler, VRRCompiler } from './chunk-YRRAUB35.js';
68
+ export { VRRCompiler } from './chunk-YRRAUB35.js';
69
+ import { init_ARCompiler, ARCompiler } from './chunk-5ET6L4NS.js';
70
+ export { ARCompiler } from './chunk-5ET6L4NS.js';
71
+ import { init_OpenXRCompiler, OpenXRCompiler } from './chunk-S762UEV5.js';
72
+ export { OpenXRCompiler } from './chunk-S762UEV5.js';
73
+ import { init_VRChatCompiler, VRChatCompiler } from './chunk-VF257YKO.js';
74
+ export { VRChatCompiler, compileToVRChat } from './chunk-VF257YKO.js';
75
+ import { init_BabylonCompiler, BabylonCompiler } from './chunk-VEPGBETF.js';
76
+ export { BabylonCompiler } from './chunk-VEPGBETF.js';
77
+ import { init_Semiring, init_ProvenanceSemiring } from './chunk-SLHLXUMO.js';
78
+ export { AuthorityTier, MaxPlusSemiring, MinPlusSemiring, ProvenanceSemiring, SumProductSemiring, TRAIT_ZERO, authorityWeight, createDeadElement, isDeadElement, strategyToSemiring } from './chunk-SLHLXUMO.js';
79
79
  import { init_TraitCompositor, init_composition_rules } from './chunk-4C57PR42.js';
80
80
  export { COMPOSITION_RULES, TraitCompositor, TraitVisualRegistry, VISUAL_LAYER_PRIORITY } from './chunk-4C57PR42.js';
81
- import { init_UnityCompiler, UnityCompiler } from './chunk-CCATWPXM.js';
82
- export { UnityCompiler } from './chunk-CCATWPXM.js';
83
- import { init_PlatformConditional, init_PlatformConditionalCompilerMixin, PLATFORM_CATEGORIES, DEFAULT_EMBODIMENT, platformCategory, ALL_PLATFORMS } from './chunk-GZG4KA4E.js';
84
- export { ALL_PLATFORMS, DEFAULT_EMBODIMENT, PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES, PlatformConditionalCompilerMixin, ALL_PLATFORMS as XR_ALL_PLATFORMS, PLATFORM_CAPABILITIES as XR_PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES as XR_PLATFORM_CATEGORIES, agentBudgetFor, createPlatformTarget, embodimentFor, filterCompositionForPlatform, hasCapability, matchesPlatform, matchesPlatformConstraint, normalizePlatformName, platformCategory, resolvePlatforms, selectBlock } from './chunk-GZG4KA4E.js';
85
- import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compilePostProcessingBlock, compileParticleBlock, compilePhysicsBlock, compileMaterialBlock } from './chunk-BOVPWH4H.js';
86
- export { architectureToGodot, architectureToR3F, architectureToUSDA, architectureToUnity, architectureToVRChat, compileArchitectureBlock, compileDataVizBlock, compileDomainBlocks, compileEducationBlock, compileHealthcareBlock, compileInputBlock, compileIoTBlock, compileMaterialBlock, compileMusicBlock, compileNarrativeBlock, compileNavigationBlock, compilePaymentBlock, compilePhysicsBlock, compileProceduralBlock, compileRenderingBlock, compileRoboticsBlock, compileWeb3Block, datavizToGodot, datavizToR3F, datavizToUSDA, datavizToUnity, datavizToVRChat, educationToGodot, educationToR3F, educationToUSDA, educationToUnity, educationToVRChat, healthcareToGodot, healthcareToR3F, healthcareToUSDA, healthcareToUnity, healthcareToVRChat, inputToGodot, inputToR3F, inputToUSDA, inputToUnity, inputToVRChat, iotToGodot, iotToR3F, iotToUSDA, iotToUnity, iotToVRChat, materialToGLTF, materialToR3F, materialToUSD, musicToGodot, musicToR3F, musicToUSDA, musicToUnity, musicToVRChat, narrativeToGodot, narrativeToR3F, narrativeToUSDA, narrativeToUnity, narrativeToVRChat, navigationToGodot, navigationToR3F, navigationToUSDA, navigationToUnity, navigationToVRChat, paymentToGodot, paymentToR3F, paymentToUSDA, paymentToUnity, paymentToVRChat, physicsToURDF, proceduralToGodot, proceduralToR3F, proceduralToUSDA, proceduralToUnity, proceduralToVRChat, renderingToGodot, renderingToR3F, renderingToUSDA, renderingToUnity, renderingToVRChat, roboticsToGodot, roboticsToR3F, roboticsToUSDA, roboticsToUnity, roboticsToVRChat, web3ToGodot, web3ToR3F, web3ToUSDA, web3ToUnity, web3ToVRChat } from './chunk-BOVPWH4H.js';
87
- import { init_CompilerBase, init_CompilerDocumentationGenerator, init_CultureTraits, CompilerBase, CompilerDocumentationGenerator } from './chunk-QPSKHBJP.js';
88
- export { BUILTIN_NORMS, BUILTIN_NORM_PROVENANCE, CompilerBase, UNKNOWN_NORM_PROVENANCE, criticalMassForChange, deserializeNormProvenance, getBuiltinNorm, normalizeNormProvenance, normsByCategory, serializeNormProvenance } from './chunk-QPSKHBJP.js';
81
+ import { init_UnityCompiler, UnityCompiler } from './chunk-2OWDB4FB.js';
82
+ export { UnityCompiler } from './chunk-2OWDB4FB.js';
83
+ import { init_PlatformConditional, init_PlatformConditionalCompilerMixin, PLATFORM_CATEGORIES, DEFAULT_EMBODIMENT, platformCategory, ALL_PLATFORMS } from './chunk-GW3LKD5C.js';
84
+ export { ALL_PLATFORMS, DEFAULT_EMBODIMENT, PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES, PlatformConditionalCompilerMixin, ALL_PLATFORMS as XR_ALL_PLATFORMS, PLATFORM_CAPABILITIES as XR_PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES as XR_PLATFORM_CATEGORIES, agentBudgetFor, createPlatformTarget, embodimentFor, filterCompositionForPlatform, hasCapability, matchesPlatform, matchesPlatformConstraint, normalizePlatformName, platformCategory, resolvePlatforms, selectBlock } from './chunk-GW3LKD5C.js';
85
+ import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compilePostProcessingBlock, compileParticleBlock, compilePhysicsBlock, compileMaterialBlock } from './chunk-ZA34AN3R.js';
86
+ export { architectureToGodot, architectureToR3F, architectureToUSDA, architectureToUnity, architectureToVRChat, compileArchitectureBlock, compileDataVizBlock, compileDomainBlocks, compileEducationBlock, compileHealthcareBlock, compileInputBlock, compileIoTBlock, compileMaterialBlock, compileMusicBlock, compileNarrativeBlock, compileNavigationBlock, compilePaymentBlock, compilePhysicsBlock, compileProceduralBlock, compileRenderingBlock, compileRoboticsBlock, compileWeb3Block, datavizToGodot, datavizToR3F, datavizToUSDA, datavizToUnity, datavizToVRChat, educationToGodot, educationToR3F, educationToUSDA, educationToUnity, educationToVRChat, healthcareToGodot, healthcareToR3F, healthcareToUSDA, healthcareToUnity, healthcareToVRChat, inputToGodot, inputToR3F, inputToUSDA, inputToUnity, inputToVRChat, iotToGodot, iotToR3F, iotToUSDA, iotToUnity, iotToVRChat, materialToGLTF, materialToR3F, materialToUSD, musicToGodot, musicToR3F, musicToUSDA, musicToUnity, musicToVRChat, narrativeToGodot, narrativeToR3F, narrativeToUSDA, narrativeToUnity, narrativeToVRChat, navigationToGodot, navigationToR3F, navigationToUSDA, navigationToUnity, navigationToVRChat, paymentToGodot, paymentToR3F, paymentToUSDA, paymentToUnity, paymentToVRChat, physicsToURDF, proceduralToGodot, proceduralToR3F, proceduralToUSDA, proceduralToUnity, proceduralToVRChat, renderingToGodot, renderingToR3F, renderingToUSDA, renderingToUnity, renderingToVRChat, roboticsToGodot, roboticsToR3F, roboticsToUSDA, roboticsToUnity, roboticsToVRChat, web3ToGodot, web3ToR3F, web3ToUSDA, web3ToUnity, web3ToVRChat } from './chunk-ZA34AN3R.js';
87
+ import { init_CompilerBase, init_CompilerDocumentationGenerator, init_CultureTraits, CompilerBase, CompilerDocumentationGenerator } from './chunk-C7ZBSV2Q.js';
88
+ export { BUILTIN_NORMS, BUILTIN_NORM_PROVENANCE, CompilerBase, UNKNOWN_NORM_PROVENANCE, criticalMassForChange, deserializeNormProvenance, getBuiltinNorm, normalizeNormProvenance, normsByCategory, serializeNormProvenance } from './chunk-C7ZBSV2Q.js';
89
89
  import './chunk-THCK6ECW.js';
90
- import './chunk-N75IH2HY.js';
91
- export { DeterminismHarness, captureEnvironment, describeEnvironment, hashBytes } from './chunk-NW5G5FBQ.js';
92
- export { vec3Add, vec3Cross, vec3CrossArray, vec3Distance, vec3Dot, vec3Length, vec3Normalize, vec3NormalizeInPlace, vec3Scale, vec3ScaleArray, vec3Sub, vec3SubArray } from './chunk-MXFUTKCO.js';
93
- export { TROPICAL_INF, barabasiAlbertCsr, csrFromDense, erdosRenyiCsr, layeredNeuralCsr, maxAbsDiff, mulberry32, tropicalMinPlusSpmv, tropicalMinPlusSpmvDense } from './chunk-YIVFJNYV.js';
94
- import { parseHolo, HoloCompositionParser } from './chunk-GIOYPNTH.js';
95
- export { HoloCompositionParser, parseHolo, parseHoloPartial, parseHoloStrict } from './chunk-GIOYPNTH.js';
96
- export { isPipelineSource, parsePipeline } from './chunk-J32ZJZJH.js';
97
- import { parse } from './chunk-YIMN575O.js';
98
- export { ChunkBasedIncrementalParser, HSPLUS_ERROR_CODES, HoloScriptPlusParser, ParseCache, createKeywordError, createParser, createRichError, createTraitError, findSimilarKeyword, findSimilarTrait, formatRichError, formatRichErrors, getErrorCodeDocumentation, getSourceContext, globalParseCache, parse, parse as parseHoloScriptPlus, parseIncrementalChunks } from './chunk-YIMN575O.js';
99
- export { ErrorRecovery, HOLOSCHEMA_GEOMETRIES, HOLOSCHEMA_KEYWORDS, HOLOSCHEMA_PROPERTIES, LIFECYCLE_HOOKS, STRUCTURAL_DIRECTIVES } from './chunk-4N4SXXWF.js';
100
- export { SPATIAL_AUDIO_EXTENSION_TRAITS, VFX_AUDIO_TRAITS, VFX_PARTICLE_TRAITS, VR_TRAITS } from './chunk-2BSMSUCE.js';
90
+ import './chunk-2Y3V22SG.js';
91
+ export { DeterminismHarness, captureEnvironment, describeEnvironment, hashBytes } from './chunk-DD2JQ7TS.js';
92
+ export { vec3Add, vec3Cross, vec3CrossArray, vec3Distance, vec3Dot, vec3Length, vec3Normalize, vec3NormalizeInPlace, vec3Scale, vec3ScaleArray, vec3Sub, vec3SubArray } from './chunk-33YHE7HX.js';
93
+ export { TROPICAL_INF, barabasiAlbertCsr, csrFromDense, erdosRenyiCsr, layeredNeuralCsr, maxAbsDiff, mulberry32, tropicalMinPlusSpmv, tropicalMinPlusSpmvDense } from './chunk-Y3ZFVUUU.js';
94
+ import { parseHolo, HoloCompositionParser } from './chunk-OABEO6HH.js';
95
+ export { HoloCompositionParser, parseHolo, parseHoloPartial, parseHoloStrict } from './chunk-OABEO6HH.js';
96
+ export { isPipelineSource, parsePipeline } from './chunk-SYTRBGDS.js';
97
+ import { parse } from './chunk-FNHJRI32.js';
98
+ export { ChunkBasedIncrementalParser, HSPLUS_ERROR_CODES, HoloScriptPlusParser, ParseCache, createKeywordError, createParser, createRichError, createTraitError, findSimilarKeyword, findSimilarTrait, formatRichError, formatRichErrors, getErrorCodeDocumentation, getSourceContext, globalParseCache, parse, parse as parseHoloScriptPlus, parseIncrementalChunks } from './chunk-FNHJRI32.js';
99
+ export { ErrorRecovery, HOLOSCHEMA_GEOMETRIES, HOLOSCHEMA_KEYWORDS, HOLOSCHEMA_PROPERTIES, LIFECYCLE_HOOKS, STRUCTURAL_DIRECTIVES } from './chunk-VSACG2AR.js';
100
+ export { SPATIAL_AUDIO_EXTENSION_TRAITS, VFX_AUDIO_TRAITS, VFX_PARTICLE_TRAITS, VR_TRAITS } from './chunk-GASCWJK5.js';
101
101
  import { init_holomap_reconstruction } from './chunk-WRNEH5MO.js';
102
102
  export { ACCESSIBILITY_EXTENDED_TRAITS, ACCESSIBILITY_TRAITS, AERIAL_AQUATIC_TRAITS, AGE_CONDITION_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, ENVIRONMENTAL_BIOME_TRAITS, ENVIRONMENTAL_SENSOR_TRAITS, ENVIRONMENT_INPUT_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, RESOURCE_GATHERING_TRAITS, ROBOTICS_INDUSTRIAL_TRAITS, SAFETY_BOUNDARIES_TRAITS, SAFETY_TRAITS, SCIFI_TECHNOLOGY_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, 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';
103
103
  import { init_webxr, WEBXR_TRAITS } from './chunk-WKX5AMOY.js';
@@ -107,14 +107,14 @@ export { HoloScriptTypeChecker, createTypeChecker } from './chunk-VMLKSV26.js';
107
107
  export { BUILTIN_CONSTRAINTS } from './chunk-XSFNHP2E.js';
108
108
  import { lazyPeerSymbol, getSharedEventBus } from './chunk-IELX2OKI.js';
109
109
  export { EventBus, getSharedEventBus, setSharedEventBus, telemetry } from './chunk-IELX2OKI.js';
110
- import { HoloScriptCodeParser } from './chunk-URG2SJLK.js';
111
- export { ERROR_CODES, HoloScriptCodeParser, ParserPools } from './chunk-URG2SJLK.js';
112
- import './chunk-H652NHX5.js';
110
+ import { HoloScriptCodeParser } from './chunk-MDR235RZ.js';
111
+ export { ERROR_CODES, HoloScriptCodeParser, ParserPools } from './chunk-MDR235RZ.js';
112
+ import './chunk-TVANHNJ7.js';
113
113
  import { logger } from './chunk-PHENW4MQ.js';
114
114
  export { ConsoleLogger, NoOpLogger, enableConsoleLogging, logger, resetLogger, setHoloScriptLogger } from './chunk-PHENW4MQ.js';
115
115
  import { init_safeJsonParse, readJson, jsonClone } from './chunk-VVKVQZI6.js';
116
116
  export { jsonClone, readJson, safeJsonParse, safeJsonParseSchema, tryParseJson } from './chunk-VVKVQZI6.js';
117
- import { __commonJS, __export, __publicField, __require } from './chunk-OL46QLBJ.js';
117
+ import { __export, __require } from './chunk-OL46QLBJ.js';
118
118
  import * as fs2 from 'fs';
119
119
  import { existsSync, mkdirSync, readFileSync, writeFileSync, unlinkSync, readdirSync, statSync } from 'fs';
120
120
  import * as path3 from 'path';
@@ -127,1391 +127,6 @@ import { canonicalizeManifest, verifySignature } from '@holoscript/platform';
127
127
  export { canonicalizeManifest, checkRateLimit, createDefaultPolicy, createPackageManifest, createSandbox, createStrictPolicy, decrypt, deriveKey, destroy as destroySandbox, encrypt, execute as executeSandbox, exportKey, generateEncryptionKey, generateKeyPair, hmacSha256, importKey, randomBytes, randomHex, randomUUID, resetRateLimit, sanitizeInput, sha256, sha512, signPackage, validateApiKey, validateUrl, validateWalletAddress, verifyHmacSha256, verifySignature } from '@holoscript/platform';
128
128
  import { Worker } from 'worker_threads';
129
129
 
130
- // ../holo-vm/dist/index.cjs
131
- var require_dist = __commonJS({
132
- "../holo-vm/dist/index.cjs"(exports$1) {
133
- var HoloOpCode = /* @__PURE__ */ ((HoloOpCode2) => {
134
- HoloOpCode2[HoloOpCode2["SPAWN"] = 1] = "SPAWN";
135
- HoloOpCode2[HoloOpCode2["DESPAWN"] = 2] = "DESPAWN";
136
- HoloOpCode2[HoloOpCode2["CLONE"] = 3] = "CLONE";
137
- HoloOpCode2[HoloOpCode2["SET_COMPONENT"] = 4] = "SET_COMPONENT";
138
- HoloOpCode2[HoloOpCode2["GET_COMPONENT"] = 5] = "GET_COMPONENT";
139
- HoloOpCode2[HoloOpCode2["REMOVE_COMPONENT"] = 6] = "REMOVE_COMPONENT";
140
- HoloOpCode2[HoloOpCode2["SET_PARENT"] = 7] = "SET_PARENT";
141
- HoloOpCode2[HoloOpCode2["QUERY"] = 8] = "QUERY";
142
- HoloOpCode2[HoloOpCode2["TRANSFORM"] = 16] = "TRANSFORM";
143
- HoloOpCode2[HoloOpCode2["TRANSLATE"] = 17] = "TRANSLATE";
144
- HoloOpCode2[HoloOpCode2["ROTATE"] = 18] = "ROTATE";
145
- HoloOpCode2[HoloOpCode2["LOOK_AT"] = 19] = "LOOK_AT";
146
- HoloOpCode2[HoloOpCode2["RAYCAST"] = 20] = "RAYCAST";
147
- HoloOpCode2[HoloOpCode2["QUERY_BOX"] = 21] = "QUERY_BOX";
148
- HoloOpCode2[HoloOpCode2["QUERY_SPHERE"] = 22] = "QUERY_SPHERE";
149
- HoloOpCode2[HoloOpCode2["FIND_PATH"] = 23] = "FIND_PATH";
150
- HoloOpCode2[HoloOpCode2["GET_ZONE"] = 24] = "GET_ZONE";
151
- HoloOpCode2[HoloOpCode2["ADD_RIGIDBODY"] = 32] = "ADD_RIGIDBODY";
152
- HoloOpCode2[HoloOpCode2["APPLY_FORCE"] = 33] = "APPLY_FORCE";
153
- HoloOpCode2[HoloOpCode2["APPLY_IMPULSE"] = 34] = "APPLY_IMPULSE";
154
- HoloOpCode2[HoloOpCode2["SET_VELOCITY"] = 35] = "SET_VELOCITY";
155
- HoloOpCode2[HoloOpCode2["ADD_COLLIDER"] = 36] = "ADD_COLLIDER";
156
- HoloOpCode2[HoloOpCode2["ADD_JOINT"] = 37] = "ADD_JOINT";
157
- HoloOpCode2[HoloOpCode2["SET_GRAVITY"] = 38] = "SET_GRAVITY";
158
- HoloOpCode2[HoloOpCode2["PHYSICS_STEP"] = 39] = "PHYSICS_STEP";
159
- HoloOpCode2[HoloOpCode2["SET_GEOMETRY"] = 48] = "SET_GEOMETRY";
160
- HoloOpCode2[HoloOpCode2["SET_MATERIAL"] = 49] = "SET_MATERIAL";
161
- HoloOpCode2[HoloOpCode2["SET_VISIBLE"] = 50] = "SET_VISIBLE";
162
- HoloOpCode2[HoloOpCode2["SET_LOD"] = 51] = "SET_LOD";
163
- HoloOpCode2[HoloOpCode2["SET_LIGHT"] = 52] = "SET_LIGHT";
164
- HoloOpCode2[HoloOpCode2["SET_ANIMATION"] = 53] = "SET_ANIMATION";
165
- HoloOpCode2[HoloOpCode2["SET_GAUSSIAN_SPLAT"] = 54] = "SET_GAUSSIAN_SPLAT";
166
- HoloOpCode2[HoloOpCode2["SET_PARTICLE_SYSTEM"] = 55] = "SET_PARTICLE_SYSTEM";
167
- HoloOpCode2[HoloOpCode2["APPLY_TRAIT"] = 64] = "APPLY_TRAIT";
168
- HoloOpCode2[HoloOpCode2["REMOVE_TRAIT"] = 65] = "REMOVE_TRAIT";
169
- HoloOpCode2[HoloOpCode2["RESOLVE_TRAITS"] = 66] = "RESOLVE_TRAITS";
170
- HoloOpCode2[HoloOpCode2["EMIT_EVENT"] = 67] = "EMIT_EVENT";
171
- HoloOpCode2[HoloOpCode2["ON_EVENT"] = 68] = "ON_EVENT";
172
- HoloOpCode2[HoloOpCode2["EVAL_CONDITION"] = 69] = "EVAL_CONDITION";
173
- HoloOpCode2[HoloOpCode2["LOAD_ASSET"] = 80] = "LOAD_ASSET";
174
- HoloOpCode2[HoloOpCode2["PLAY_AUDIO"] = 81] = "PLAY_AUDIO";
175
- HoloOpCode2[HoloOpCode2["NET_SYNC"] = 82] = "NET_SYNC";
176
- HoloOpCode2[HoloOpCode2["NET_SEND"] = 83] = "NET_SEND";
177
- HoloOpCode2[HoloOpCode2["NET_RECV"] = 84] = "NET_RECV";
178
- HoloOpCode2[HoloOpCode2["XR_INPUT"] = 85] = "XR_INPUT";
179
- HoloOpCode2[HoloOpCode2["HAPTIC"] = 86] = "HAPTIC";
180
- HoloOpCode2[HoloOpCode2["NOP"] = 96] = "NOP";
181
- HoloOpCode2[HoloOpCode2["JUMP"] = 97] = "JUMP";
182
- HoloOpCode2[HoloOpCode2["JUMP_IF"] = 98] = "JUMP_IF";
183
- HoloOpCode2[HoloOpCode2["CALL"] = 99] = "CALL";
184
- HoloOpCode2[HoloOpCode2["RETURN"] = 100] = "RETURN";
185
- HoloOpCode2[HoloOpCode2["PUSH"] = 101] = "PUSH";
186
- HoloOpCode2[HoloOpCode2["POP"] = 102] = "POP";
187
- HoloOpCode2[HoloOpCode2["STORE"] = 103] = "STORE";
188
- HoloOpCode2[HoloOpCode2["LOAD"] = 104] = "LOAD";
189
- HoloOpCode2[HoloOpCode2["HALT"] = 105] = "HALT";
190
- HoloOpCode2[HoloOpCode2["YIELD"] = 106] = "YIELD";
191
- HoloOpCode2[HoloOpCode2["TIMER"] = 107] = "TIMER";
192
- HoloOpCode2[HoloOpCode2["ADD"] = 108] = "ADD";
193
- HoloOpCode2[HoloOpCode2["SUB"] = 109] = "SUB";
194
- HoloOpCode2[HoloOpCode2["MUL"] = 110] = "MUL";
195
- HoloOpCode2[HoloOpCode2["DIV"] = 111] = "DIV";
196
- HoloOpCode2[HoloOpCode2["AGENT_INVOKE"] = 112] = "AGENT_INVOKE";
197
- HoloOpCode2[HoloOpCode2["AGENT_READ"] = 113] = "AGENT_READ";
198
- HoloOpCode2[HoloOpCode2["AGENT_SUBSCRIBE"] = 114] = "AGENT_SUBSCRIBE";
199
- HoloOpCode2[HoloOpCode2["DIALOG_SHOW"] = 115] = "DIALOG_SHOW";
200
- HoloOpCode2[HoloOpCode2["QUEST_UPDATE"] = 116] = "QUEST_UPDATE";
201
- HoloOpCode2[HoloOpCode2["CMP_EQ"] = 128] = "CMP_EQ";
202
- HoloOpCode2[HoloOpCode2["CMP_LT"] = 129] = "CMP_LT";
203
- HoloOpCode2[HoloOpCode2["CMP_GT"] = 130] = "CMP_GT";
204
- HoloOpCode2[HoloOpCode2["NOT"] = 131] = "NOT";
205
- return HoloOpCode2;
206
- })(HoloOpCode || {});
207
- var ComponentType3 = /* @__PURE__ */ ((ComponentType22) => {
208
- ComponentType22[ComponentType22["Transform"] = 1] = "Transform";
209
- ComponentType22[ComponentType22["Geometry"] = 2] = "Geometry";
210
- ComponentType22[ComponentType22["Material"] = 3] = "Material";
211
- ComponentType22[ComponentType22["RigidBody"] = 4] = "RigidBody";
212
- ComponentType22[ComponentType22["Collider"] = 5] = "Collider";
213
- ComponentType22[ComponentType22["Light"] = 6] = "Light";
214
- ComponentType22[ComponentType22["Animation"] = 7] = "Animation";
215
- ComponentType22[ComponentType22["Audio"] = 8] = "Audio";
216
- ComponentType22[ComponentType22["Network"] = 9] = "Network";
217
- ComponentType22[ComponentType22["Trait"] = 10] = "Trait";
218
- ComponentType22[ComponentType22["ParticleSystem"] = 11] = "ParticleSystem";
219
- ComponentType22[ComponentType22["GaussianSplat"] = 12] = "GaussianSplat";
220
- ComponentType22[ComponentType22["LOD"] = 13] = "LOD";
221
- ComponentType22[ComponentType22["Custom"] = 255] = "Custom";
222
- return ComponentType22;
223
- })(ComponentType3 || {});
224
- var GeometryType2 = /* @__PURE__ */ ((GeometryType3) => {
225
- GeometryType3[GeometryType3["Cube"] = 1] = "Cube";
226
- GeometryType3[GeometryType3["Sphere"] = 2] = "Sphere";
227
- GeometryType3[GeometryType3["Cylinder"] = 3] = "Cylinder";
228
- GeometryType3[GeometryType3["Plane"] = 4] = "Plane";
229
- GeometryType3[GeometryType3["Cone"] = 5] = "Cone";
230
- GeometryType3[GeometryType3["Torus"] = 6] = "Torus";
231
- GeometryType3[GeometryType3["Capsule"] = 7] = "Capsule";
232
- GeometryType3[GeometryType3["Mesh"] = 8] = "Mesh";
233
- GeometryType3[GeometryType3["Text3D"] = 9] = "Text3D";
234
- GeometryType3[GeometryType3["Portal"] = 10] = "Portal";
235
- GeometryType3[GeometryType3["Terrain"] = 11] = "Terrain";
236
- GeometryType3[GeometryType3["Skybox"] = 12] = "Skybox";
237
- GeometryType3[GeometryType3["Billboard"] = 13] = "Billboard";
238
- GeometryType3[GeometryType3["Line"] = 14] = "Line";
239
- return GeometryType3;
240
- })(GeometryType2 || {});
241
- var BodyType2 = /* @__PURE__ */ ((BodyType22) => {
242
- BodyType22[BodyType22["Static"] = 0] = "Static";
243
- BodyType22[BodyType22["Dynamic"] = 1] = "Dynamic";
244
- BodyType22[BodyType22["Kinematic"] = 2] = "Kinematic";
245
- return BodyType22;
246
- })(BodyType2 || {});
247
- var ColliderShape = /* @__PURE__ */ ((ColliderShape2) => {
248
- ColliderShape2[ColliderShape2["Box"] = 1] = "Box";
249
- ColliderShape2[ColliderShape2["Sphere"] = 2] = "Sphere";
250
- ColliderShape2[ColliderShape2["Capsule"] = 3] = "Capsule";
251
- ColliderShape2[ColliderShape2["Cylinder"] = 4] = "Cylinder";
252
- ColliderShape2[ColliderShape2["ConvexHull"] = 5] = "ConvexHull";
253
- ColliderShape2[ColliderShape2["TriMesh"] = 6] = "TriMesh";
254
- return ColliderShape2;
255
- })(ColliderShape || {});
256
- var LightType2 = /* @__PURE__ */ ((LightType22) => {
257
- LightType22[LightType22["Directional"] = 1] = "Directional";
258
- LightType22[LightType22["Point"] = 2] = "Point";
259
- LightType22[LightType22["Spot"] = 3] = "Spot";
260
- LightType22[LightType22["Ambient"] = 4] = "Ambient";
261
- LightType22[LightType22["Area"] = 5] = "Area";
262
- return LightType22;
263
- })(LightType2 || {});
264
- var SyncTier = /* @__PURE__ */ ((SyncTier2) => {
265
- SyncTier2[SyncTier2["Physics"] = 0] = "Physics";
266
- SyncTier2[SyncTier2["Movement"] = 1] = "Movement";
267
- SyncTier2[SyncTier2["AIAgent"] = 2] = "AIAgent";
268
- SyncTier2[SyncTier2["Cosmetic"] = 3] = "Cosmetic";
269
- return SyncTier2;
270
- })(SyncTier || {});
271
- var ValueType = /* @__PURE__ */ ((ValueType2) => {
272
- ValueType2[ValueType2["Null"] = 0] = "Null";
273
- ValueType2[ValueType2["Bool"] = 1] = "Bool";
274
- ValueType2[ValueType2["I32"] = 2] = "I32";
275
- ValueType2[ValueType2["F32"] = 3] = "F32";
276
- ValueType2[ValueType2["F64"] = 4] = "F64";
277
- ValueType2[ValueType2["String"] = 5] = "String";
278
- ValueType2[ValueType2["Vec3"] = 6] = "Vec3";
279
- ValueType2[ValueType2["Quat"] = 7] = "Quat";
280
- ValueType2[ValueType2["EntityRef"] = 8] = "EntityRef";
281
- ValueType2[ValueType2["Array"] = 9] = "Array";
282
- return ValueType2;
283
- })(ValueType || {});
284
- var FAMILY_NAMES = {
285
- 0: "Entity",
286
- 1: "Spatial",
287
- 2: "Physics",
288
- 3: "Rendering",
289
- 4: "Trait",
290
- 5: "I/O",
291
- 6: "Control",
292
- 7: "Agent",
293
- 8: "Comparison"
294
- };
295
- function getOpcodeFamily(opcode) {
296
- const familyByte = opcode >> 4 & 15;
297
- return FAMILY_NAMES[familyByte] ?? "Unknown";
298
- }
299
- function getOpcodeName(opcode) {
300
- return HoloOpCode[opcode] ?? `UNKNOWN_0x${opcode.toString(16).padStart(2, "0")}`;
301
- }
302
- function isControlFlow(opcode) {
303
- return opcode === 97 || opcode === 98 || opcode === 99 || opcode === 100 || opcode === 105 || opcode === 106;
304
- }
305
- var HOLOB_MAGIC = 1213156418;
306
- var HOLOB_VERSION = 1;
307
- var HolobFlags = /* @__PURE__ */ ((HolobFlags2) => {
308
- HolobFlags2[HolobFlags2["None"] = 0] = "None";
309
- HolobFlags2[HolobFlags2["Debug"] = 1] = "Debug";
310
- HolobFlags2[HolobFlags2["SIMD"] = 2] = "SIMD";
311
- HolobFlags2[HolobFlags2["Threads"] = 4] = "Threads";
312
- HolobFlags2[HolobFlags2["Networking"] = 8] = "Networking";
313
- HolobFlags2[HolobFlags2["Physics"] = 16] = "Physics";
314
- return HolobFlags2;
315
- })(HolobFlags || {});
316
- var AssetType = /* @__PURE__ */ ((AssetType2) => {
317
- AssetType2[AssetType2["Mesh"] = 1] = "Mesh";
318
- AssetType2[AssetType2["Texture"] = 2] = "Texture";
319
- AssetType2[AssetType2["Audio"] = 3] = "Audio";
320
- AssetType2[AssetType2["Animation"] = 4] = "Animation";
321
- AssetType2[AssetType2["GaussianSplat"] = 5] = "GaussianSplat";
322
- AssetType2[AssetType2["Font"] = 6] = "Font";
323
- AssetType2[AssetType2["Script"] = 7] = "Script";
324
- return AssetType2;
325
- })(AssetType || {});
326
- var HoloBytecodeBuilder2 = class {
327
- constructor() {
328
- __publicField(this, "strings", /* @__PURE__ */ new Map());
329
- __publicField(this, "stringList", []);
330
- __publicField(this, "assets", []);
331
- __publicField(this, "traits", []);
332
- __publicField(this, "functions", []);
333
- __publicField(this, "entities", []);
334
- __publicField(this, "events", []);
335
- __publicField(this, "flags", 0);
336
- }
337
- /**
338
- * Intern a string and return its index
339
- */
340
- internString(str) {
341
- const existing = this.strings.get(str);
342
- if (existing !== void 0) return existing;
343
- const idx = this.stringList.length;
344
- this.stringList.push(str);
345
- this.strings.set(str, idx);
346
- return idx;
347
- }
348
- /**
349
- * Add a feature flag
350
- */
351
- addFlag(flag) {
352
- this.flags |= flag;
353
- return this;
354
- }
355
- /**
356
- * Add an asset reference
357
- */
358
- addAsset(uri, type) {
359
- const idx = this.assets.length;
360
- this.assets.push({ uriIndex: this.internString(uri), type });
361
- return idx;
362
- }
363
- /**
364
- * Add a trait definition
365
- */
366
- addTrait(name, deps = [], initFunc = -1) {
367
- const idx = this.traits.length;
368
- this.traits.push({
369
- nameIndex: this.internString(name),
370
- dependencies: deps,
371
- initFunctionIndex: initFunc,
372
- eventHandlers: /* @__PURE__ */ new Map()
373
- });
374
- return idx;
375
- }
376
- /**
377
- * Begin building a function
378
- */
379
- addFunction(name, paramCount = 0) {
380
- const idx = this.functions.length;
381
- const fn = {
382
- nameIndex: this.internString(name),
383
- instructions: [],
384
- registerCount: 0,
385
- paramCount
386
- };
387
- this.functions.push(fn);
388
- return new HoloFunctionBuilder(fn, this, idx);
389
- }
390
- /**
391
- * Add an entity definition
392
- */
393
- addEntity(name, archetype = 0, parentIndex = -1) {
394
- const idx = this.entities.length;
395
- this.entities.push({
396
- nameIndex: this.internString(name),
397
- archetype,
398
- components: [],
399
- parentIndex
400
- });
401
- return idx;
402
- }
403
- /**
404
- * Add component data to an entity
405
- */
406
- addComponentToEntity(entityIdx, componentType, values) {
407
- this.entities[entityIdx].components.push({ componentType, values });
408
- return this;
409
- }
410
- /**
411
- * Add an event binding
412
- */
413
- addEvent(eventType, handlerFunctionIndex, entityFilter = -1) {
414
- this.events.push({ eventType, handlerFunctionIndex, entityFilter });
415
- return this;
416
- }
417
- /**
418
- * Build the final bytecode module
419
- */
420
- build() {
421
- return {
422
- magic: HOLOB_MAGIC,
423
- version: HOLOB_VERSION,
424
- flags: this.flags,
425
- strings: [...this.stringList],
426
- assets: [...this.assets],
427
- traits: [...this.traits],
428
- functions: [...this.functions],
429
- entities: [...this.entities],
430
- events: [...this.events]
431
- };
432
- }
433
- };
434
- var HoloFunctionBuilder = class {
435
- constructor(func, parent, index) {
436
- this.func = func;
437
- this.parent = parent;
438
- this.index = index;
439
- }
440
- emit(opcode, ...operands) {
441
- this.func.instructions.push({ opcode, operands });
442
- return this;
443
- }
444
- // ── Entity ────────────────────────────────────────────────────────────────
445
- spawn(entityType, name) {
446
- return this.emit(1, entityType, this.parent.internString(name));
447
- }
448
- despawn(entityId) {
449
- return this.emit(2, entityId);
450
- }
451
- setComponent(entityId, compType, ...data) {
452
- return this.emit(4, entityId, compType, ...data);
453
- }
454
- getComponent(entityId, compType) {
455
- return this.emit(5, entityId, compType);
456
- }
457
- setParent(childId, parentId) {
458
- return this.emit(7, childId, parentId);
459
- }
460
- query(archetypeMask) {
461
- return this.emit(8, archetypeMask);
462
- }
463
- // ── Spatial ───────────────────────────────────────────────────────────────
464
- transform(entityId, x, y, z) {
465
- return this.emit(16, entityId, x, y, z, 0, 0, 0, 1, 1, 1, 1);
466
- }
467
- translate(entityId, dx, dy, dz) {
468
- return this.emit(17, entityId, dx, dy, dz);
469
- }
470
- rotate(entityId, qx, qy, qz, qw) {
471
- return this.emit(18, entityId, qx, qy, qz, qw);
472
- }
473
- lookAt(entityId, tx, ty, tz) {
474
- return this.emit(19, entityId, tx, ty, tz);
475
- }
476
- raycast(ox, oy, oz, dx, dy, dz, maxDist) {
477
- return this.emit(20, ox, oy, oz, dx, dy, dz, maxDist);
478
- }
479
- // ── Physics ───────────────────────────────────────────────────────────────
480
- addRigidbody(entityId, mass, bodyType) {
481
- return this.emit(32, entityId, mass, bodyType);
482
- }
483
- applyForce(entityId, fx, fy, fz) {
484
- return this.emit(33, entityId, fx, fy, fz);
485
- }
486
- applyImpulse(entityId, ix, iy, iz) {
487
- return this.emit(34, entityId, ix, iy, iz);
488
- }
489
- setGravity(gx, gy, gz) {
490
- return this.emit(38, gx, gy, gz);
491
- }
492
- physicsStep(dt) {
493
- return this.emit(39, dt);
494
- }
495
- // ── Rendering Hints ───────────────────────────────────────────────────────
496
- setGeometry(entityId, geoType) {
497
- return this.emit(48, entityId, geoType);
498
- }
499
- setMaterial(entityId, ...desc) {
500
- return this.emit(49, entityId, ...desc);
501
- }
502
- setVisible(entityId, visible) {
503
- return this.emit(50, entityId, visible ? 1 : 0);
504
- }
505
- setLight(entityId, lightType, ...params) {
506
- return this.emit(52, entityId, lightType, ...params);
507
- }
508
- setAnimation(entityId, animId) {
509
- return this.emit(53, entityId, animId);
510
- }
511
- // ── Trait ─────────────────────────────────────────────────────────────────
512
- applyTrait(entityId, traitId) {
513
- return this.emit(64, entityId, traitId);
514
- }
515
- removeTrait(entityId, traitId) {
516
- return this.emit(65, entityId, traitId);
517
- }
518
- emitEvent(eventType, ...payload) {
519
- return this.emit(67, eventType, ...payload);
520
- }
521
- onEvent(eventType, handlerOffset) {
522
- return this.emit(68, eventType, handlerOffset);
523
- }
524
- // ── I/O ───────────────────────────────────────────────────────────────────
525
- loadAsset(uri, assetType) {
526
- return this.emit(80, this.parent.internString(uri), assetType);
527
- }
528
- playAudio(soundId, x, y, z) {
529
- return this.emit(81, soundId, x, y, z);
530
- }
531
- netSync(entityId, syncTier) {
532
- return this.emit(82, entityId, syncTier);
533
- }
534
- // ── Control Flow ──────────────────────────────────────────────────────────
535
- nop() {
536
- return this.emit(
537
- 96
538
- /* NOP */
539
- );
540
- }
541
- jump(offset) {
542
- return this.emit(97, offset);
543
- }
544
- jumpIf(offset) {
545
- return this.emit(98, offset);
546
- }
547
- call(funcIdx) {
548
- return this.emit(99, funcIdx);
549
- }
550
- ret() {
551
- return this.emit(
552
- 100
553
- /* RETURN */
554
- );
555
- }
556
- push(value) {
557
- return this.emit(101, value);
558
- }
559
- pop() {
560
- return this.emit(
561
- 102
562
- /* POP */
563
- );
564
- }
565
- store(registerIdx) {
566
- this.func.registerCount = Math.max(this.func.registerCount, registerIdx + 1);
567
- return this.emit(103, registerIdx);
568
- }
569
- load(registerIdx) {
570
- return this.emit(104, registerIdx);
571
- }
572
- halt() {
573
- return this.emit(
574
- 105
575
- /* HALT */
576
- );
577
- }
578
- yieldTick() {
579
- return this.emit(
580
- 106
581
- /* YIELD */
582
- );
583
- }
584
- timer(delayMs, handlerOffset) {
585
- return this.emit(107, delayMs, handlerOffset);
586
- }
587
- // ── Arithmetic ────────────────────────────────────────────────────────────
588
- add() {
589
- return this.emit(
590
- 108
591
- /* ADD */
592
- );
593
- }
594
- sub() {
595
- return this.emit(
596
- 109
597
- /* SUB */
598
- );
599
- }
600
- mul() {
601
- return this.emit(
602
- 110
603
- /* MUL */
604
- );
605
- }
606
- div() {
607
- return this.emit(
608
- 111
609
- /* DIV */
610
- );
611
- }
612
- // ── Comparison ────────────────────────────────────────────────────────────
613
- cmpEq() {
614
- return this.emit(
615
- 128
616
- /* CMP_EQ */
617
- );
618
- }
619
- cmpLt() {
620
- return this.emit(
621
- 129
622
- /* CMP_LT */
623
- );
624
- }
625
- cmpGt() {
626
- return this.emit(
627
- 130
628
- /* CMP_GT */
629
- );
630
- }
631
- not() {
632
- return this.emit(
633
- 131
634
- /* NOT */
635
- );
636
- }
637
- // ── Agent Bridge ──────────────────────────────────────────────────────────
638
- agentInvoke(agentId, actionIdx) {
639
- return this.emit(112, agentId, actionIdx);
640
- }
641
- agentRead(agentId, fieldIdx) {
642
- return this.emit(113, agentId, fieldIdx);
643
- }
644
- dialogShow(npcId, dialogTreeId) {
645
- return this.emit(115, npcId, dialogTreeId);
646
- }
647
- questUpdate(questId, state) {
648
- return this.emit(116, questId, state);
649
- }
650
- /** Get the current instruction count (useful for jump targets) */
651
- get instructionCount() {
652
- return this.func.instructions.length;
653
- }
654
- };
655
- var ECSWorld2 = class {
656
- constructor() {
657
- __publicField(this, "entities", /* @__PURE__ */ new Map());
658
- __publicField(this, "nextEntityId", 1);
659
- __publicField(this, "archetypeIndex", /* @__PURE__ */ new Map());
660
- }
661
- /**
662
- * Spawn a new entity
663
- */
664
- spawn(name, archetype = 0) {
665
- const id = this.nextEntityId++;
666
- const entity = {
667
- id,
668
- name,
669
- parentId: -1,
670
- childIds: [],
671
- components: /* @__PURE__ */ new Map(),
672
- traits: /* @__PURE__ */ new Set(),
673
- alive: true,
674
- dirty: true
675
- };
676
- this.entities.set(id, entity);
677
- if (!this.archetypeIndex.has(archetype)) {
678
- this.archetypeIndex.set(archetype, /* @__PURE__ */ new Set());
679
- }
680
- this.archetypeIndex.get(archetype).add(id);
681
- return id;
682
- }
683
- /**
684
- * Despawn an entity and its children
685
- */
686
- despawn(entityId) {
687
- const entity = this.entities.get(entityId);
688
- if (!entity) return false;
689
- for (const childId of [...entity.childIds]) {
690
- this.despawn(childId);
691
- }
692
- if (entity.parentId !== -1) {
693
- const parent = this.entities.get(entity.parentId);
694
- if (parent) {
695
- parent.childIds = parent.childIds.filter((id) => id !== entityId);
696
- }
697
- }
698
- entity.alive = false;
699
- this.entities.delete(entityId);
700
- return true;
701
- }
702
- /**
703
- * Set a component on an entity
704
- */
705
- setComponent(entityId, componentType, data) {
706
- const entity = this.entities.get(entityId);
707
- if (!entity) return false;
708
- entity.components.set(componentType, data);
709
- entity.dirty = true;
710
- return true;
711
- }
712
- /**
713
- * Get a component from an entity
714
- */
715
- getComponent(entityId, componentType) {
716
- const entity = this.entities.get(entityId);
717
- if (!entity) return void 0;
718
- return entity.components.get(componentType);
719
- }
720
- /**
721
- * Remove a component from an entity
722
- */
723
- removeComponent(entityId, componentType) {
724
- const entity = this.entities.get(entityId);
725
- if (!entity) return false;
726
- entity.dirty = true;
727
- return entity.components.delete(componentType);
728
- }
729
- /**
730
- * Set parent-child relationship
731
- */
732
- setParent(childId, parentId) {
733
- const child = this.entities.get(childId);
734
- const parent = this.entities.get(parentId);
735
- if (!child || !parent) return false;
736
- if (child.parentId !== -1) {
737
- const oldParent = this.entities.get(child.parentId);
738
- if (oldParent) {
739
- oldParent.childIds = oldParent.childIds.filter((id) => id !== childId);
740
- }
741
- }
742
- child.parentId = parentId;
743
- parent.childIds.push(childId);
744
- child.dirty = true;
745
- return true;
746
- }
747
- /**
748
- * Query entities by archetype mask
749
- */
750
- queryArchetype(mask) {
751
- const set = this.archetypeIndex.get(mask);
752
- return set ? [...set] : [];
753
- }
754
- /**
755
- * Get entity by ID
756
- */
757
- getEntity(entityId) {
758
- return this.entities.get(entityId);
759
- }
760
- /**
761
- * Get all dirty entities and clear dirty flags
762
- */
763
- flushDirty() {
764
- const dirty = [];
765
- for (const entity of this.entities.values()) {
766
- if (entity.dirty) {
767
- dirty.push(entity);
768
- entity.dirty = false;
769
- }
770
- }
771
- return dirty;
772
- }
773
- /**
774
- * Get all living entities
775
- */
776
- getAllEntities() {
777
- return [...this.entities.values()];
778
- }
779
- /**
780
- * Get entity count
781
- */
782
- get entityCount() {
783
- return this.entities.size;
784
- }
785
- };
786
- var VMStatus = /* @__PURE__ */ ((VMStatus2) => {
787
- VMStatus2["Idle"] = "IDLE";
788
- VMStatus2["Running"] = "RUNNING";
789
- VMStatus2["Yielded"] = "YIELDED";
790
- VMStatus2["Halted"] = "HALTED";
791
- VMStatus2["Error"] = "ERROR";
792
- return VMStatus2;
793
- })(VMStatus || {});
794
- var UnsupportedHostOpcodeError = class extends Error {
795
- constructor(opcode, operands) {
796
- const opcodeName = getOpcodeName(opcode);
797
- const opcodeGroup = getHostOpcodeGroup(opcode);
798
- super(
799
- `Unsupported host opcode ${opcodeName} (${opcodeGroup}) requires a registered host callback`
800
- );
801
- __publicField(this, "opcode");
802
- __publicField(this, "opcodeName");
803
- __publicField(this, "opcodeGroup");
804
- __publicField(this, "operands");
805
- this.name = "UnsupportedHostOpcodeError";
806
- this.opcode = opcode;
807
- this.opcodeName = opcodeName;
808
- this.opcodeGroup = opcodeGroup;
809
- this.operands = [...operands];
810
- }
811
- };
812
- var HoloVM = class {
813
- constructor(hostCallbacks = {}) {
814
- // Core state
815
- __publicField(this, "bytecode", null);
816
- __publicField(this, "world", new ECSWorld2());
817
- // Execution state
818
- __publicField(this, "stack", []);
819
- __publicField(this, "callStack", []);
820
- __publicField(this, "status", "IDLE");
821
- __publicField(this, "tickCount", 0);
822
- // Timer system
823
- __publicField(this, "timers", []);
824
- __publicField(this, "currentTimeMs", 0);
825
- // Event queue
826
- __publicField(this, "eventQueue", []);
827
- // Limits
828
- __publicField(this, "maxStackSize", 4096);
829
- __publicField(this, "maxCallDepth", 256);
830
- __publicField(this, "maxInstructionsPerTick", 1e4);
831
- __publicField(this, "hostCallbacks", /* @__PURE__ */ new Map());
832
- __publicField(this, "lastError");
833
- this.registerHostCallbacks(hostCallbacks);
834
- }
835
- /**
836
- * Load a bytecode module into the VM
837
- */
838
- load(bytecode) {
839
- this.bytecode = bytecode;
840
- this.reset();
841
- this.initializeEntities();
842
- }
843
- /**
844
- * Reset VM state without unloading bytecode
845
- */
846
- reset() {
847
- this.stack = [];
848
- this.callStack = [];
849
- this.status = "IDLE";
850
- this.tickCount = 0;
851
- this.timers = [];
852
- this.currentTimeMs = 0;
853
- this.eventQueue = [];
854
- this.lastError = void 0;
855
- }
856
- registerHostCallback(opcode, callback) {
857
- if (!isHostOpcode(opcode)) {
858
- throw new Error(`Opcode ${getOpcodeName(opcode)} is not a host-integration opcode`);
859
- }
860
- this.hostCallbacks.set(opcode, callback);
861
- }
862
- registerHostCallbacks(callbacks) {
863
- for (const [opcode, callback] of Object.entries(callbacks)) {
864
- if (callback) {
865
- this.registerHostCallback(Number(opcode), callback);
866
- }
867
- }
868
- }
869
- /**
870
- * Initialize entities from the bytecode's init section
871
- */
872
- initializeEntities() {
873
- if (!this.bytecode) return;
874
- for (const entityDef of this.bytecode.entities) {
875
- const name = this.bytecode.strings[entityDef.nameIndex] ?? `entity_${entityDef.nameIndex}`;
876
- const entityId = this.world.spawn(name, entityDef.archetype);
877
- for (const comp of entityDef.components) {
878
- this.world.setComponent(entityId, comp.componentType, comp.values);
879
- }
880
- if (entityDef.parentIndex >= 0) {
881
- this.world.setParent(entityId, entityDef.parentIndex + 1);
882
- }
883
- }
884
- }
885
- /**
886
- * Execute one tick of the VM (called at ~90fps)
887
- *
888
- * Each tick:
889
- * 1. Process expired timers
890
- * 2. Dispatch queued events
891
- * 3. Resume execution from yield point (or run init)
892
- * 4. Return dirty entities for rendering
893
- */
894
- tick(deltaMs) {
895
- if (!this.bytecode) {
896
- this.lastError = new Error("No bytecode loaded");
897
- return {
898
- status: "ERROR",
899
- stackTop: null,
900
- tickCount: this.tickCount,
901
- entityCount: 0,
902
- error: "No bytecode loaded"
903
- };
904
- }
905
- this.tickCount++;
906
- this.currentTimeMs += deltaMs;
907
- this.processTimers();
908
- this.dispatchEvents();
909
- if (this.status === "YIELDED") {
910
- this.status = "RUNNING";
911
- this.executeInstructions();
912
- } else if (this.status === "IDLE" && this.bytecode.functions.length > 0) {
913
- this.callFunction(0);
914
- this.executeInstructions();
915
- }
916
- return {
917
- status: this.status,
918
- stackTop: this.stack.length > 0 ? this.stack[this.stack.length - 1] : null,
919
- tickCount: this.tickCount,
920
- entityCount: this.world.entityCount,
921
- error: this.status === "ERROR" ? this.lastError?.message : void 0
922
- };
923
- }
924
- /**
925
- * Main execution loop — runs until YIELD, HALT, or instruction limit
926
- */
927
- executeInstructions() {
928
- if (!this.bytecode) return;
929
- let instructionsExecuted = 0;
930
- while (this.status === "RUNNING" && instructionsExecuted < this.maxInstructionsPerTick) {
931
- const frame = this.currentFrame;
932
- if (!frame) {
933
- this.status = "HALTED";
934
- break;
935
- }
936
- const func = this.bytecode.functions[frame.functionIndex];
937
- if (!func || frame.pc >= func.instructions.length) {
938
- this.callStack.pop();
939
- if (this.callStack.length === 0) {
940
- this.status = "HALTED";
941
- }
942
- break;
943
- }
944
- const instr = func.instructions[frame.pc];
945
- frame.pc++;
946
- instructionsExecuted++;
947
- try {
948
- this.executeInstruction(instr, frame);
949
- } catch (err) {
950
- this.status = "ERROR";
951
- this.lastError = err instanceof Error ? err : new Error(String(err));
952
- break;
953
- }
954
- if (this.status !== "RUNNING") break;
955
- }
956
- }
957
- /**
958
- * Execute a single instruction
959
- */
960
- executeInstruction(instr, frame) {
961
- const op = instr.opcode;
962
- const operands = instr.operands;
963
- switch (op) {
964
- // ── Entity Operations ───────────────────────────────────────────────
965
- case 1: {
966
- const entityType = operands[0];
967
- const nameIdx = operands[1];
968
- const name = this.getString(nameIdx);
969
- const id = this.world.spawn(name, entityType);
970
- this.push(id);
971
- break;
972
- }
973
- case 2: {
974
- const entityId = operands[0];
975
- this.world.despawn(entityId);
976
- break;
977
- }
978
- case 4: {
979
- const entityId = operands[0];
980
- const compType = operands[1];
981
- const data = operands.slice(2);
982
- this.world.setComponent(entityId, compType, data);
983
- break;
984
- }
985
- case 5: {
986
- const entityId = operands[0];
987
- const compType = operands[1];
988
- const data = this.world.getComponent(entityId, compType);
989
- this.push(data ?? null);
990
- break;
991
- }
992
- case 6: {
993
- const entityId = operands[0];
994
- const compType = operands[1];
995
- this.world.removeComponent(entityId, compType);
996
- break;
997
- }
998
- case 7: {
999
- const childId = operands[0];
1000
- const parentId = operands[1];
1001
- this.world.setParent(childId, parentId);
1002
- break;
1003
- }
1004
- case 8: {
1005
- const mask = operands[0];
1006
- const entities = this.world.queryArchetype(mask);
1007
- this.push(entities);
1008
- break;
1009
- }
1010
- // ── Spatial Operations ──────────────────────────────────────────────
1011
- case 16: {
1012
- const entityId = operands[0];
1013
- const transform = {
1014
- position: { x: operands[1], y: operands[2], z: operands[3] },
1015
- rotation: {
1016
- x: operands[4],
1017
- y: operands[5],
1018
- z: operands[6],
1019
- w: operands[7]
1020
- },
1021
- scale: { x: operands[8], y: operands[9], z: operands[10] }
1022
- };
1023
- this.world.setComponent(entityId, 1, transform);
1024
- break;
1025
- }
1026
- case 17: {
1027
- const entityId = operands[0];
1028
- const existing = this.world.getComponent(
1029
- entityId,
1030
- 1
1031
- /* Transform */
1032
- );
1033
- if (existing) {
1034
- existing.position.x += operands[1];
1035
- existing.position.y += operands[2];
1036
- existing.position.z += operands[3];
1037
- this.world.setComponent(entityId, 1, existing);
1038
- }
1039
- break;
1040
- }
1041
- case 18: {
1042
- const entityId = operands[0];
1043
- this.world.setComponent(entityId, 1, {
1044
- position: { x: 0, y: 0, z: 0 },
1045
- rotation: {
1046
- x: operands[1],
1047
- y: operands[2],
1048
- z: operands[3],
1049
- w: operands[4]
1050
- },
1051
- scale: { x: 1, y: 1, z: 1 }
1052
- });
1053
- break;
1054
- }
1055
- case 48: {
1056
- const entityId = operands[0];
1057
- const geoType = operands[1];
1058
- this.world.setComponent(entityId, 2, { type: geoType, params: {} });
1059
- break;
1060
- }
1061
- case 49: {
1062
- const entityId = operands[0];
1063
- const material = {
1064
- color: operands[1] ?? 16777215,
1065
- metalness: operands[2] ?? 0,
1066
- roughness: operands[3] ?? 0.5,
1067
- emissive: operands[4] ?? 0,
1068
- opacity: operands[5] ?? 1
1069
- };
1070
- this.world.setComponent(entityId, 3, material);
1071
- break;
1072
- }
1073
- case 50: {
1074
- const entityId = operands[0];
1075
- operands[1] !== 0;
1076
- const entity = this.world.getEntity(entityId);
1077
- if (entity) entity.dirty = true;
1078
- break;
1079
- }
1080
- case 52: {
1081
- const entityId = operands[0];
1082
- const lightType = operands[1];
1083
- this.world.setComponent(entityId, 6, {
1084
- type: lightType,
1085
- params: operands.slice(2)
1086
- });
1087
- break;
1088
- }
1089
- // ── Physics Operations ──────────────────────────────────────────────
1090
- case 32: {
1091
- const entityId = operands[0];
1092
- const rb = {
1093
- mass: operands[1],
1094
- bodyType: operands[2],
1095
- velocity: { x: 0, y: 0, z: 0 },
1096
- angularVelocity: { x: 0, y: 0, z: 0 }
1097
- };
1098
- this.world.setComponent(entityId, 4, rb);
1099
- break;
1100
- }
1101
- case 33: {
1102
- const entityId = operands[0];
1103
- const rb = this.world.getComponent(
1104
- entityId,
1105
- 4
1106
- /* RigidBody */
1107
- );
1108
- if (rb && rb.mass > 0) {
1109
- const dt = 1 / 90;
1110
- rb.velocity.x += operands[1] / rb.mass * dt;
1111
- rb.velocity.y += operands[2] / rb.mass * dt;
1112
- rb.velocity.z += operands[3] / rb.mass * dt;
1113
- this.world.setComponent(entityId, 4, rb);
1114
- }
1115
- break;
1116
- }
1117
- case 34: {
1118
- const entityId = operands[0];
1119
- const rb = this.world.getComponent(
1120
- entityId,
1121
- 4
1122
- /* RigidBody */
1123
- );
1124
- if (rb && rb.mass > 0) {
1125
- rb.velocity.x += operands[1] / rb.mass;
1126
- rb.velocity.y += operands[2] / rb.mass;
1127
- rb.velocity.z += operands[3] / rb.mass;
1128
- this.world.setComponent(entityId, 4, rb);
1129
- }
1130
- break;
1131
- }
1132
- case 35: {
1133
- const entityId = operands[0];
1134
- const rb = this.world.getComponent(
1135
- entityId,
1136
- 4
1137
- /* RigidBody */
1138
- );
1139
- if (rb) {
1140
- rb.velocity = {
1141
- x: operands[1],
1142
- y: operands[2],
1143
- z: operands[3]
1144
- };
1145
- this.world.setComponent(entityId, 4, rb);
1146
- }
1147
- break;
1148
- }
1149
- case 38: {
1150
- this.world.setComponent(0, 255, { x: operands[0], y: operands[1], z: operands[2] });
1151
- break;
1152
- }
1153
- // ── Trait Operations ────────────────────────────────────────────────
1154
- case 64: {
1155
- const entityId = operands[0];
1156
- const traitId = operands[1];
1157
- const entity = this.world.getEntity(entityId);
1158
- if (entity) {
1159
- entity.traits.add(traitId);
1160
- entity.dirty = true;
1161
- }
1162
- break;
1163
- }
1164
- case 65: {
1165
- const entityId = operands[0];
1166
- const traitId = operands[1];
1167
- const entity = this.world.getEntity(entityId);
1168
- if (entity) {
1169
- entity.traits.delete(traitId);
1170
- entity.dirty = true;
1171
- }
1172
- break;
1173
- }
1174
- case 67: {
1175
- const eventType = operands[0];
1176
- const payload = operands.slice(1);
1177
- this.eventQueue.push({ eventType, payload });
1178
- break;
1179
- }
1180
- // ── Control Flow ────────────────────────────────────────────────────
1181
- case 96:
1182
- break;
1183
- case 97: {
1184
- frame.pc = operands[0];
1185
- break;
1186
- }
1187
- case 98: {
1188
- const condition = this.pop();
1189
- if (condition) {
1190
- frame.pc = operands[0];
1191
- }
1192
- break;
1193
- }
1194
- case 99: {
1195
- const funcIdx = operands[0];
1196
- this.callFunction(funcIdx);
1197
- break;
1198
- }
1199
- case 100: {
1200
- this.callStack.pop();
1201
- if (this.callStack.length === 0) {
1202
- this.status = "HALTED";
1203
- }
1204
- break;
1205
- }
1206
- case 101: {
1207
- this.push(operands[0]);
1208
- break;
1209
- }
1210
- case 102: {
1211
- this.pop();
1212
- break;
1213
- }
1214
- case 103: {
1215
- const regIdx = operands[0];
1216
- const value = this.pop();
1217
- if (regIdx < frame.registers.length) {
1218
- frame.registers[regIdx] = value;
1219
- }
1220
- break;
1221
- }
1222
- case 104: {
1223
- const regIdx = operands[0];
1224
- if (regIdx < frame.registers.length) {
1225
- this.push(frame.registers[regIdx]);
1226
- } else {
1227
- this.push(null);
1228
- }
1229
- break;
1230
- }
1231
- case 105: {
1232
- this.status = "HALTED";
1233
- break;
1234
- }
1235
- case 106: {
1236
- this.status = "YIELDED";
1237
- break;
1238
- }
1239
- case 107: {
1240
- const delayMs = operands[0];
1241
- const handlerFunc = operands[1];
1242
- this.timers.push({
1243
- triggerTimeMs: this.currentTimeMs + delayMs,
1244
- handlerFunctionIndex: handlerFunc
1245
- });
1246
- break;
1247
- }
1248
- // ── Arithmetic ──────────────────────────────────────────────────────
1249
- case 108: {
1250
- const b = this.pop();
1251
- const a = this.pop();
1252
- this.push((a ?? 0) + (b ?? 0));
1253
- break;
1254
- }
1255
- case 109: {
1256
- const b = this.pop();
1257
- const a = this.pop();
1258
- this.push((a ?? 0) - (b ?? 0));
1259
- break;
1260
- }
1261
- case 110: {
1262
- const b = this.pop();
1263
- const a = this.pop();
1264
- this.push((a ?? 0) * (b ?? 0));
1265
- break;
1266
- }
1267
- case 111: {
1268
- const b = this.pop();
1269
- const a = this.pop();
1270
- this.push(b !== 0 ? (a ?? 0) / b : 0);
1271
- break;
1272
- }
1273
- // ── Comparison ──────────────────────────────────────────────────────
1274
- case 128: {
1275
- const b = this.pop();
1276
- const a = this.pop();
1277
- this.push(a === b ? 1 : 0);
1278
- break;
1279
- }
1280
- case 129: {
1281
- const b = this.pop();
1282
- const a = this.pop();
1283
- this.push(a < b ? 1 : 0);
1284
- break;
1285
- }
1286
- case 130: {
1287
- const b = this.pop();
1288
- const a = this.pop();
1289
- this.push(a > b ? 1 : 0);
1290
- break;
1291
- }
1292
- case 131: {
1293
- const val = this.pop();
1294
- this.push(val ? 0 : 1);
1295
- break;
1296
- }
1297
- // ── Agent Bridge (stubs — filled in by host integration) ────────────
1298
- case 112:
1299
- case 113:
1300
- case 114:
1301
- case 115:
1302
- case 116:
1303
- this.executeHostOpcode(op, operands);
1304
- break;
1305
- // ── I/O & Networking (host integration) ─────────────────────────────
1306
- case 80:
1307
- case 81:
1308
- case 82:
1309
- case 83:
1310
- case 84:
1311
- case 85:
1312
- case 86:
1313
- this.executeHostOpcode(op, operands);
1314
- break;
1315
- // ── Spatial queries (host integration) ───────────────────────────────
1316
- case 20:
1317
- case 21:
1318
- case 22:
1319
- case 23:
1320
- case 24:
1321
- this.executeHostOpcode(op, operands);
1322
- break;
1323
- }
1324
- }
1325
- // ── Stack operations ──────────────────────────────────────────────────────
1326
- push(value) {
1327
- if (this.stack.length >= this.maxStackSize) {
1328
- this.status = "ERROR";
1329
- return;
1330
- }
1331
- this.stack.push(value);
1332
- }
1333
- pop() {
1334
- return this.stack.pop() ?? null;
1335
- }
1336
- // ── Call frame management ─────────────────────────────────────────────────
1337
- get currentFrame() {
1338
- return this.callStack[this.callStack.length - 1];
1339
- }
1340
- callFunction(funcIdx) {
1341
- if (!this.bytecode) return;
1342
- if (this.callStack.length >= this.maxCallDepth) {
1343
- this.status = "ERROR";
1344
- return;
1345
- }
1346
- const func = this.bytecode.functions[funcIdx];
1347
- if (!func) {
1348
- this.status = "ERROR";
1349
- return;
1350
- }
1351
- const frame = {
1352
- functionIndex: funcIdx,
1353
- pc: 0,
1354
- registers: new Array(func.registerCount).fill(null),
1355
- stackBase: this.stack.length
1356
- };
1357
- this.callStack.push(frame);
1358
- this.status = "RUNNING";
1359
- }
1360
- executeHostOpcode(opcode, operands) {
1361
- const callback = this.hostCallbacks.get(opcode);
1362
- if (!callback) {
1363
- throw new UnsupportedHostOpcodeError(opcode, operands);
1364
- }
1365
- const result = callback({
1366
- opcode,
1367
- opcodeName: getOpcodeName(opcode),
1368
- opcodeGroup: getHostOpcodeGroup(opcode),
1369
- operands: [...operands],
1370
- tickCount: this.tickCount,
1371
- currentTimeMs: this.currentTimeMs,
1372
- world: this.world,
1373
- vm: this,
1374
- resolveString: (index) => this.getString(index)
1375
- });
1376
- if (!HOST_OUTPUT_OPCODES.has(opcode)) {
1377
- return;
1378
- }
1379
- if (result === void 0) {
1380
- throw new Error(`Host callback for ${getOpcodeName(opcode)} must return a VM operand`);
1381
- }
1382
- this.push(result);
1383
- }
1384
- // ── Timer processing ──────────────────────────────────────────────────────
1385
- processTimers() {
1386
- const expired = [];
1387
- this.timers = this.timers.filter((t) => {
1388
- if (t.triggerTimeMs <= this.currentTimeMs) {
1389
- expired.push(t);
1390
- return false;
1391
- }
1392
- return true;
1393
- });
1394
- for (const timer of expired) {
1395
- this.callFunction(timer.handlerFunctionIndex);
1396
- this.executeInstructions();
1397
- }
1398
- }
1399
- // ── Event dispatch ────────────────────────────────────────────────────────
1400
- dispatchEvents() {
1401
- if (!this.bytecode) return;
1402
- const events = [...this.eventQueue];
1403
- this.eventQueue = [];
1404
- for (const event of events) {
1405
- for (const binding of this.bytecode.events) {
1406
- if (binding.eventType === event.eventType) {
1407
- for (const p of event.payload) {
1408
- this.push(p);
1409
- }
1410
- this.callFunction(binding.handlerFunctionIndex);
1411
- this.executeInstructions();
1412
- }
1413
- }
1414
- }
1415
- }
1416
- // ── Utility ───────────────────────────────────────────────────────────────
1417
- getString(index) {
1418
- if (!this.bytecode) return "";
1419
- return this.bytecode.strings[index] ?? `str_${index}`;
1420
- }
1421
- /**
1422
- * Get current VM status
1423
- */
1424
- getStatus() {
1425
- return this.status;
1426
- }
1427
- /**
1428
- * Get current stack snapshot (for debugging)
1429
- */
1430
- getStack() {
1431
- return [...this.stack];
1432
- }
1433
- /**
1434
- * Get the tick count
1435
- */
1436
- getTickCount() {
1437
- return this.tickCount;
1438
- }
1439
- /**
1440
- * Get the last execution error, preserving typed host-integration failures.
1441
- */
1442
- getLastError() {
1443
- return this.lastError;
1444
- }
1445
- /**
1446
- * Queue an external event (e.g., from user input or network)
1447
- */
1448
- queueEvent(eventType, ...payload) {
1449
- this.eventQueue.push({ eventType, payload });
1450
- }
1451
- };
1452
- var HOST_OPCODE_GROUPS = /* @__PURE__ */ new Map([
1453
- [112, "agent"],
1454
- [113, "agent"],
1455
- [114, "agent"],
1456
- [115, "agent"],
1457
- [116, "agent"],
1458
- [80, "io"],
1459
- [81, "io"],
1460
- [82, "io"],
1461
- [83, "io"],
1462
- [84, "io"],
1463
- [85, "io"],
1464
- [86, "io"],
1465
- [20, "spatial"],
1466
- [21, "spatial"],
1467
- [22, "spatial"],
1468
- [23, "spatial"],
1469
- [24, "spatial"]
1470
- ]);
1471
- var HOST_OUTPUT_OPCODES = /* @__PURE__ */ new Set([
1472
- 112,
1473
- 113,
1474
- 80,
1475
- 84,
1476
- 85,
1477
- 20,
1478
- 21,
1479
- 22,
1480
- 23,
1481
- 24
1482
- /* GET_ZONE */
1483
- ]);
1484
- function isHostOpcode(opcode) {
1485
- return HOST_OPCODE_GROUPS.has(opcode);
1486
- }
1487
- function getHostOpcodeGroup(opcode) {
1488
- return HOST_OPCODE_GROUPS.get(opcode) ?? "io";
1489
- }
1490
- exports$1.AssetType = AssetType;
1491
- exports$1.BodyType = BodyType2;
1492
- exports$1.ColliderShape = ColliderShape;
1493
- exports$1.ComponentType = ComponentType3;
1494
- exports$1.ECSWorld = ECSWorld2;
1495
- exports$1.GeometryType = GeometryType2;
1496
- exports$1.HOLOB_MAGIC = HOLOB_MAGIC;
1497
- exports$1.HOLOB_VERSION = HOLOB_VERSION;
1498
- exports$1.HoloBytecodeBuilder = HoloBytecodeBuilder2;
1499
- exports$1.HoloFunctionBuilder = HoloFunctionBuilder;
1500
- exports$1.HoloOpCode = HoloOpCode;
1501
- exports$1.HoloVM = HoloVM;
1502
- exports$1.HolobFlags = HolobFlags;
1503
- exports$1.LightType = LightType2;
1504
- exports$1.SyncTier = SyncTier;
1505
- exports$1.UnsupportedHostOpcodeError = UnsupportedHostOpcodeError;
1506
- exports$1.VMStatus = VMStatus;
1507
- exports$1.ValueType = ValueType;
1508
- exports$1.getOpcodeFamily = getOpcodeFamily;
1509
- exports$1.getOpcodeName = getOpcodeName;
1510
- exports$1.isControlFlow = isControlFlow;
1511
- exports$1.isHostOpcode = isHostOpcode;
1512
- }
1513
- });
1514
-
1515
130
  // src/composition/CompositionParser.ts
1516
131
  function getProp(props, key2) {
1517
132
  if (!props) return void 0;
@@ -1750,8 +365,7 @@ function parseScale(scale) {
1750
365
  if (!scale) return { x: 1, y: 1, z: 1 };
1751
366
  if (typeof scale === "number") return { x: scale, y: scale, z: scale };
1752
367
  if (Array.isArray(scale)) {
1753
- if (scale.length === 2)
1754
- return { x: Number(scale[0]) || 1, y: Number(scale[1]) || 1, z: 1 };
368
+ if (scale.length === 2) return { x: Number(scale[0]) || 1, y: Number(scale[1]) || 1, z: 1 };
1755
369
  return { x: Number(scale[0]) || 1, y: Number(scale[1]) || 1, z: Number(scale[2]) || 1 };
1756
370
  }
1757
371
  if (typeof scale === "object" && scale !== null) {
@@ -2568,7 +1182,14 @@ var Profiler = class {
2568
1182
  scope.duration = scope.endTime - scope.startTime;
2569
1183
  let summary = this.frameSummaries.get(scope.name);
2570
1184
  if (!summary) {
2571
- summary = { name: scope.name, avgTime: 0, minTime: Infinity, maxTime: 0, totalTime: 0, callCount: 0 };
1185
+ summary = {
1186
+ name: scope.name,
1187
+ avgTime: 0,
1188
+ minTime: Infinity,
1189
+ maxTime: 0,
1190
+ totalTime: 0,
1191
+ callCount: 0
1192
+ };
2572
1193
  this.frameSummaries.set(scope.name, summary);
2573
1194
  }
2574
1195
  summary.callCount++;
@@ -4022,7 +2643,9 @@ function generateHoloSource(ast) {
4022
2643
  if (ast.logic && ast.logic.handlers.length > 0) {
4023
2644
  lines.push(` logic {`);
4024
2645
  for (const handler of ast.logic.handlers) {
4025
- lines.push(` ${handler.event}(${handler.parameters.map((p) => escapeString(p.name)).join(", ")}) {`);
2646
+ lines.push(
2647
+ ` ${handler.event}(${handler.parameters.map((p) => escapeString(p.name)).join(", ")}) {`
2648
+ );
4026
2649
  for (const stmt of handler.body) {
4027
2650
  if (stmt.type === "ExpressionStatement" && stmt.expression.type === "CallExpression") {
4028
2651
  const callee = stmt.expression.callee.type === "Identifier" ? stmt.expression.callee.name : "call";
@@ -8238,6 +6861,18 @@ var WASMReferenceExporter = class extends ReferenceExporter {
8238
6861
  };
8239
6862
  }
8240
6863
  };
6864
+ var CodeEditorReferenceExporter = class extends ReferenceExporter {
6865
+ export(composition) {
6866
+ const output = new CodeEditorCompiler().compile(composition);
6867
+ return {
6868
+ target: "code-editor",
6869
+ output,
6870
+ format: "json",
6871
+ warnings: [],
6872
+ usedFallback: true
6873
+ };
6874
+ }
6875
+ };
8241
6876
  var Native2DReferenceExporter = class extends ReferenceExporter {
8242
6877
  export(composition) {
8243
6878
  const output = new Native2DCompiler().compile(composition, "", void 0, {
@@ -8264,6 +6899,7 @@ var ReferenceExporterRegistry = class {
8264
6899
  this.exporters.set("r3f", new R3FReferenceExporter());
8265
6900
  this.exporters.set("babylon", new BabylonReferenceExporter());
8266
6901
  this.exporters.set("native-2d", new Native2DReferenceExporter());
6902
+ this.exporters.set("code-editor", new CodeEditorReferenceExporter());
8267
6903
  this.exporters.set("openxr", new OpenXRReferenceExporter());
8268
6904
  this.exporters.set("vrchat", new VRChatReferenceExporter());
8269
6905
  this.exporters.set("ios", new IOSReferenceExporter());
@@ -11079,6 +9715,8 @@ var CompilerFactory = class {
11079
9715
  return new GaussianSplattingCompiler(options);
11080
9716
  case "canvas2d-game":
11081
9717
  return new Canvas2DGameCompiler(options);
9718
+ case "code-editor":
9719
+ return new CodeEditorCompiler();
11082
9720
  default:
11083
9721
  throw new Error(`Unknown export target: ${target}`);
11084
9722
  }
@@ -24776,7 +23414,7 @@ button refreshBtn {
24776
23414
 
24777
23415
  // src/barrel/runtime-env.ts
24778
23416
  async function createHoloScriptEnvironment() {
24779
- const { HoloScriptRuntime } = await import('./HoloScriptRuntime-ACDFKVVH.js');
23417
+ const { HoloScriptRuntime } = await import('./HoloScriptRuntime-GJK6VJPH.js');
24780
23418
  return {
24781
23419
  parser: new HoloScriptParser(),
24782
23420
  runtime: new HoloScriptRuntime(),
@@ -25026,9 +23664,13 @@ var _AssetRegistry = class _AssetRegistry {
25026
23664
  async preloadAssets(assetIds) {
25027
23665
  const chunks = this.chunkArray(assetIds, this.config.concurrentLoadLimit);
25028
23666
  for (const chunk of chunks) {
25029
- await Promise.all(chunk.map((id) => this.loadAsset(id).catch((err) => {
25030
- console.error(`[AssetRegistry] preloadAssets: failed to load asset ${id}:`, err);
25031
- })));
23667
+ await Promise.all(
23668
+ chunk.map(
23669
+ (id) => this.loadAsset(id).catch((err) => {
23670
+ console.error(`[AssetRegistry] preloadAssets: failed to load asset ${id}:`, err);
23671
+ })
23672
+ )
23673
+ );
25032
23674
  }
25033
23675
  }
25034
23676
  /**
@@ -27073,7 +25715,12 @@ function makeDefaultConversationDaemon(daemonId, ownerId, displayName, careProfi
27073
25715
  appearanceProfile: { characterClass: "companion", scale: "small" },
27074
25716
  voiceProfile: { enabled: false },
27075
25717
  careProfile,
27076
- toneProfile: { formality: "balanced", verbosity: "balanced", humor: "light", patience: "patient" },
25718
+ toneProfile: {
25719
+ formality: "balanced",
25720
+ verbosity: "balanced",
25721
+ humor: "light",
25722
+ patience: "patient"
25723
+ },
27077
25724
  permissionProfile: {
27078
25725
  readOnly: true,
27079
25726
  proposeMutations: true,
@@ -27297,11 +25944,7 @@ function makeDefaultPermissionConfig(ownerId, daemonId) {
27297
25944
  absorb: true,
27298
25945
  holomesh: false
27299
25946
  },
27300
- contextSources: [
27301
- "operator_brief",
27302
- "holoscript_surface_map",
27303
- "recent_receipts"
27304
- ],
25947
+ contextSources: ["operator_brief", "holoscript_surface_map", "recent_receipts"],
27305
25948
  brittneyChannel: {
27306
25949
  enabled: true,
27307
25950
  channelId: `${ownerId}:${daemonId}`,
@@ -27418,7 +26061,12 @@ function makePresetProfile(preset, profileId, ownerId) {
27418
26061
  ...base.style,
27419
26062
  displayName: "Kai",
27420
26063
  appearance: { characterClass: "creative", scale: "medium" },
27421
- tone: { formality: "casual", verbosity: "detailed", humor: "moderate", patience: "patient" },
26064
+ tone: {
26065
+ formality: "casual",
26066
+ verbosity: "detailed",
26067
+ humor: "moderate",
26068
+ patience: "patient"
26069
+ },
27422
26070
  careProfile: "attentive",
27423
26071
  visualTheme: "warm-sunset"
27424
26072
  };
@@ -29867,7 +28515,7 @@ var WasmParserBridge = class {
29867
28515
  async fallbackParse(source) {
29868
28516
  const startTime = performance.now();
29869
28517
  try {
29870
- const { HoloScriptPlusParser: HoloScriptPlusParser2 } = await import('./HoloScriptPlusParser-7FBIFUFC.js');
28518
+ const { HoloScriptPlusParser: HoloScriptPlusParser2 } = await import('./HoloScriptPlusParser-JLJDXHSC.js');
29871
28519
  const parser = new HoloScriptPlusParser2();
29872
28520
  const ast = parser.parse(source);
29873
28521
  return {
@@ -30728,7 +29376,7 @@ var _GLTFExporter = class _GLTFExporter {
30728
29376
  * Converts to GLTF first, then to USD
30729
29377
  */
30730
29378
  async exportToUSDZ(sceneGraph, options) {
30731
- const { USDZExporter } = await import('./USDZExporter-D2HQLQYK.js');
29379
+ const { USDZExporter } = await import('./USDZExporter-GXB4AUSG.js');
30732
29380
  const usdzExporter = new USDZExporter(options);
30733
29381
  return usdzExporter.export(sceneGraph);
30734
29382
  }
@@ -34906,7 +33554,7 @@ var GeometryType;
34906
33554
  var BodyType;
34907
33555
  var LightType;
34908
33556
  try {
34909
- const holoVm = require_dist();
33557
+ const holoVm = __require("@holoscript/holo-vm");
34910
33558
  HoloBytecodeBuilder = holoVm.HoloBytecodeBuilder;
34911
33559
  ComponentType2 = holoVm.ComponentType;
34912
33560
  GeometryType = holoVm.GeometryType;
@@ -34965,14 +33613,14 @@ var HolobCompiler = class {
34965
33613
  const builder = new HoloBytecodeBuilder();
34966
33614
  this.stringTable.clear();
34967
33615
  this.entityCount = 0;
34968
- const entityIds = this.defineEntities(builder, composition);
33616
+ const { ids: entityIds, lightIds } = this.defineEntities(builder, composition);
34969
33617
  const main = builder.addFunction("main");
34970
33618
  if (composition.environment) {
34971
33619
  this.compileEnvironment(main, composition.environment);
34972
33620
  }
34973
33621
  if (composition.lights) {
34974
- for (const light of composition.lights) {
34975
- this.compileLight(main, builder, light);
33622
+ for (let i = 0; i < composition.lights.length; i++) {
33623
+ this.compileLight(main, composition.lights[i], lightIds[i]);
34976
33624
  }
34977
33625
  }
34978
33626
  if (composition.objects) {
@@ -35004,6 +33652,7 @@ var HolobCompiler = class {
35004
33652
  // ─── Entity Definition ──────────────────────────────────────────────
35005
33653
  defineEntities(builder, composition) {
35006
33654
  const ids = /* @__PURE__ */ new Map();
33655
+ const lightIds = [];
35007
33656
  if (composition.objects) {
35008
33657
  for (const obj of composition.objects) {
35009
33658
  this.entityCount++;
@@ -35014,11 +33663,13 @@ var HolobCompiler = class {
35014
33663
  if (composition.lights) {
35015
33664
  for (const light of composition.lights) {
35016
33665
  this.entityCount++;
35017
- builder.addEntity(light.name || `light_${this.entityCount}`, 0);
35018
- ids.set(light.name || `light_${this.entityCount}`, this.entityCount);
33666
+ const key2 = light.name || `light_${this.entityCount}`;
33667
+ builder.addEntity(key2, 0);
33668
+ ids.set(key2, this.entityCount);
33669
+ lightIds.push(this.entityCount);
35019
33670
  }
35020
33671
  }
35021
- return ids;
33672
+ return { ids, lightIds };
35022
33673
  }
35023
33674
  // ─── Object Compilation ─────────────────────────────────────────────
35024
33675
  compileObject(fn, builder, obj, entityId) {
@@ -35098,10 +33749,7 @@ var HolobCompiler = class {
35098
33749
  }
35099
33750
  }
35100
33751
  // ─── Light Compilation ──────────────────────────────────────────────
35101
- compileLight(fn, builder, light) {
35102
- this.entityCount++;
35103
- const entityId = this.entityCount;
35104
- builder.addEntity(light.name || `light_${entityId}`, 0);
33752
+ compileLight(fn, light, entityId) {
35105
33753
  const lightType = LIGHT_MAP[light.lightType || "directional"] ?? 0;
35106
33754
  const lightExt = light;
35107
33755
  const intensity = lightExt.intensity ?? 1;
@@ -38394,8 +37042,7 @@ function interpolateKeyframes(keyframes, t) {
38394
37042
  if (keyframes.length === 0) return 0;
38395
37043
  if (keyframes.length === 1) return keyframes[0].value;
38396
37044
  if (t <= keyframes[0].time) return keyframes[0].value;
38397
- if (t >= keyframes[keyframes.length - 1].time)
38398
- return keyframes[keyframes.length - 1].value;
37045
+ if (t >= keyframes[keyframes.length - 1].time) return keyframes[keyframes.length - 1].value;
38399
37046
  for (let i = 0; i < keyframes.length - 1; i++) {
38400
37047
  const a = keyframes[i];
38401
37048
  const b = keyframes[i + 1];
@@ -38440,7 +37087,10 @@ var AnimationEngine = class {
38440
37087
  } else {
38441
37088
  if (t >= dur) {
38442
37089
  entry.callback(
38443
- interpolateKeyframes(clip.keyframes, clip.keyframes[clip.keyframes.length - 1]?.time ?? dur)
37090
+ interpolateKeyframes(
37091
+ clip.keyframes,
37092
+ clip.keyframes[clip.keyframes.length - 1]?.time ?? dur
37093
+ )
38444
37094
  );
38445
37095
  this.active.delete(id);
38446
37096
  continue;
@@ -38853,11 +37503,7 @@ function pickPlacement(ctx) {
38853
37503
  };
38854
37504
  }
38855
37505
  return {
38856
- position: [
38857
- origin[0] + direction[0],
38858
- origin[1] + direction[1],
38859
- origin[2] + direction[2]
38860
- ],
37506
+ position: [origin[0] + direction[0], origin[1] + direction[1], origin[2] + direction[2]],
38861
37507
  source: "gaze-ray"
38862
37508
  };
38863
37509
  }
@@ -39696,7 +38342,8 @@ function validateTrustReceipt(r) {
39696
38342
  }
39697
38343
  const rec = r;
39698
38344
  if (!rec.receiptId || typeof rec.receiptId !== "string") errors.push("Missing receiptId");
39699
- if (!rec.schemaVersion || typeof rec.schemaVersion !== "string") errors.push("Missing schemaVersion");
38345
+ if (!rec.schemaVersion || typeof rec.schemaVersion !== "string")
38346
+ errors.push("Missing schemaVersion");
39700
38347
  if (!rec.recordedAt || typeof rec.recordedAt !== "string") errors.push("Missing recordedAt");
39701
38348
  if (!rec.actor || typeof rec.actor !== "object") {
39702
38349
  errors.push("Missing actor");
@@ -39728,8 +38375,10 @@ function validateTrustReceipt(r) {
39728
38375
  } else {
39729
38376
  const action = rec.action;
39730
38377
  if (!action.name || typeof action.name !== "string") errors.push("Missing action.name");
39731
- if (!action.resource || typeof action.resource !== "string") errors.push("Missing action.resource");
39732
- if (!action.outcome || typeof action.outcome !== "string") errors.push("Missing action.outcome");
38378
+ if (!action.resource || typeof action.resource !== "string")
38379
+ errors.push("Missing action.resource");
38380
+ if (!action.outcome || typeof action.outcome !== "string")
38381
+ errors.push("Missing action.outcome");
39733
38382
  }
39734
38383
  if (!rec.evidence || typeof rec.evidence !== "object") {
39735
38384
  errors.push("Missing evidence");
@@ -39741,8 +38390,10 @@ function validateTrustReceipt(r) {
39741
38390
  errors.push("Missing algebraicTrust");
39742
38391
  } else {
39743
38392
  const at = rec.algebraicTrust;
39744
- if (!at.layer1Strategy || typeof at.layer1Strategy !== "string") errors.push("Missing algebraicTrust.layer1Strategy");
39745
- if (!at.layer2HistoryRef || typeof at.layer2HistoryRef !== "string") errors.push("Missing algebraicTrust.layer2HistoryRef");
38393
+ if (!at.layer1Strategy || typeof at.layer1Strategy !== "string")
38394
+ errors.push("Missing algebraicTrust.layer1Strategy");
38395
+ if (!at.layer2HistoryRef || typeof at.layer2HistoryRef !== "string")
38396
+ errors.push("Missing algebraicTrust.layer2HistoryRef");
39746
38397
  const action = rec.action ?? {};
39747
38398
  if (isSimulationRelated(action) && (!at.layer3OracleRef || typeof at.layer3OracleRef !== "string")) {
39748
38399
  errors.push("Missing algebraicTrust.layer3OracleRef for simulation/digital-twin receipts");
@@ -39752,7 +38403,8 @@ function validateTrustReceipt(r) {
39752
38403
  errors.push("Missing storage");
39753
38404
  } else {
39754
38405
  const storage = rec.storage;
39755
- if (!storage.syncState || typeof storage.syncState !== "string") errors.push("Missing storage.syncState");
38406
+ if (!storage.syncState || typeof storage.syncState !== "string")
38407
+ errors.push("Missing storage.syncState");
39756
38408
  const syncState = storage.syncState;
39757
38409
  if ((syncState === "synced" || syncState === "redacted_sync") && !Array.isArray(storage.redactedFields)) {
39758
38410
  errors.push("Missing storage.redactedFields for synced receipts");
@@ -40282,7 +38934,9 @@ function validateProviderExportCustody(payload) {
40282
38934
  errors.push(`Invalid phase: ${payload.phase}`);
40283
38935
  }
40284
38936
  if (payload.accountMutationPerformed) {
40285
- errors.push("accountMutationPerformed must be false \u2014 account mutation is not allowed without explicit approval");
38937
+ errors.push(
38938
+ "accountMutationPerformed must be false \u2014 account mutation is not allowed without explicit approval"
38939
+ );
40286
38940
  }
40287
38941
  if (payload.sourceFileMutationPerformed) {
40288
38942
  errors.push("sourceFileMutationPerformed must be false \u2014 source file mutation is not allowed");
@@ -40291,7 +38945,9 @@ function validateProviderExportCustody(payload) {
40291
38945
  errors.push("rawPrivateDataPublished must be false \u2014 raw private data must not be published");
40292
38946
  }
40293
38947
  if (payload.privatePathLeakedToPublicReceipt) {
40294
- errors.push("privatePathLeakedToPublicReceipt must be false \u2014 private paths must not leak into public receipts");
38948
+ errors.push(
38949
+ "privatePathLeakedToPublicReceipt must be false \u2014 private paths must not leak into public receipts"
38950
+ );
40295
38951
  }
40296
38952
  if (payload.managedAccount && !payload.managedAccountType) {
40297
38953
  errors.push("managedAccountType is required when managedAccount is true");
@@ -40300,7 +38956,9 @@ function validateProviderExportCustody(payload) {
40300
38956
  warnings.push("cloudHandoffDestination is recommended when cloudHandoff is true");
40301
38957
  }
40302
38958
  if ((payload.waitState === "expired" || payload.waitState === "blocked") && payload.blockers.length === 0) {
40303
- warnings.push(`waitState is ${payload.waitState} but no blockers are recorded \u2014 expected at least one blocker`);
38959
+ warnings.push(
38960
+ `waitState is ${payload.waitState} but no blockers are recorded \u2014 expected at least one blocker`
38961
+ );
40304
38962
  }
40305
38963
  if ((payload.deliveryMethod === "email_link" || payload.deliveryMethod === "cloud_drive") && !payload.linkExpiry) {
40306
38964
  warnings.push("linkExpiry is recommended for link-based delivery methods");
@@ -40312,7 +38970,9 @@ function validateProviderExportCustody(payload) {
40312
38970
  warnings.push("fileCount is 0 but archiveSizeBytes is non-zero \u2014 possible data inconsistency");
40313
38971
  }
40314
38972
  if ((payload.phase === "intent_classification" || payload.phase === "boundary_check") && payload.selectedProducts.length === 0) {
40315
- warnings.push("selectedProducts is empty for classification phase \u2014 provider export scope is unspecified");
38973
+ warnings.push(
38974
+ "selectedProducts is empty for classification phase \u2014 provider export scope is unspecified"
38975
+ );
40316
38976
  }
40317
38977
  return {
40318
38978
  valid: errors.length === 0,
@@ -40365,51 +39025,226 @@ var EXECUTABLE_EXTENSIONS = /* @__PURE__ */ new Set([
40365
39025
  ]);
40366
39026
  var DEFAULT_SENSITIVITY_PATTERNS = [
40367
39027
  // Credentials
40368
- { pattern: "password", level: "restricted", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
40369
- { pattern: "secret", level: "restricted", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
40370
- { pattern: "token", level: "restricted", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
40371
- { pattern: "api_key", level: "restricted", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
40372
- { pattern: "credential", level: "restricted", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
40373
- { pattern: "oauth", level: "sensitive", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
40374
- { pattern: "cookie", level: "sensitive", categories: ["credentials", "browsing_history"], flags: ["contains_credentials", "auto_detected"] },
40375
- { pattern: "session", level: "sensitive", categories: ["credentials"], flags: ["contains_credentials", "auto_detected"] },
39028
+ {
39029
+ pattern: "password",
39030
+ level: "restricted",
39031
+ categories: ["credentials"],
39032
+ flags: ["contains_credentials", "auto_detected"]
39033
+ },
39034
+ {
39035
+ pattern: "secret",
39036
+ level: "restricted",
39037
+ categories: ["credentials"],
39038
+ flags: ["contains_credentials", "auto_detected"]
39039
+ },
39040
+ {
39041
+ pattern: "token",
39042
+ level: "restricted",
39043
+ categories: ["credentials"],
39044
+ flags: ["contains_credentials", "auto_detected"]
39045
+ },
39046
+ {
39047
+ pattern: "api_key",
39048
+ level: "restricted",
39049
+ categories: ["credentials"],
39050
+ flags: ["contains_credentials", "auto_detected"]
39051
+ },
39052
+ {
39053
+ pattern: "credential",
39054
+ level: "restricted",
39055
+ categories: ["credentials"],
39056
+ flags: ["contains_credentials", "auto_detected"]
39057
+ },
39058
+ {
39059
+ pattern: "oauth",
39060
+ level: "sensitive",
39061
+ categories: ["credentials"],
39062
+ flags: ["contains_credentials", "auto_detected"]
39063
+ },
39064
+ {
39065
+ pattern: "cookie",
39066
+ level: "sensitive",
39067
+ categories: ["credentials", "browsing_history"],
39068
+ flags: ["contains_credentials", "auto_detected"]
39069
+ },
39070
+ {
39071
+ pattern: "session",
39072
+ level: "sensitive",
39073
+ categories: ["credentials"],
39074
+ flags: ["contains_credentials", "auto_detected"]
39075
+ },
40376
39076
  // Financial
40377
- { pattern: "bank", level: "restricted", categories: ["financial"], flags: ["contains_financial", "auto_detected"] },
40378
- { pattern: "credit", level: "restricted", categories: ["financial"], flags: ["contains_financial", "auto_detected"] },
40379
- { pattern: "payment", level: "restricted", categories: ["financial"], flags: ["contains_financial", "auto_detected"] },
40380
- { pattern: "invoice", level: "sensitive", categories: ["financial"], flags: ["contains_financial", "auto_detected"] },
40381
- { pattern: "transaction", level: "sensitive", categories: ["financial"], flags: ["contains_financial", "auto_detected"] },
40382
- { pattern: "financial", level: "sensitive", categories: ["financial"], flags: ["contains_financial", "auto_detected"] },
39077
+ {
39078
+ pattern: "bank",
39079
+ level: "restricted",
39080
+ categories: ["financial"],
39081
+ flags: ["contains_financial", "auto_detected"]
39082
+ },
39083
+ {
39084
+ pattern: "credit",
39085
+ level: "restricted",
39086
+ categories: ["financial"],
39087
+ flags: ["contains_financial", "auto_detected"]
39088
+ },
39089
+ {
39090
+ pattern: "payment",
39091
+ level: "restricted",
39092
+ categories: ["financial"],
39093
+ flags: ["contains_financial", "auto_detected"]
39094
+ },
39095
+ {
39096
+ pattern: "invoice",
39097
+ level: "sensitive",
39098
+ categories: ["financial"],
39099
+ flags: ["contains_financial", "auto_detected"]
39100
+ },
39101
+ {
39102
+ pattern: "transaction",
39103
+ level: "sensitive",
39104
+ categories: ["financial"],
39105
+ flags: ["contains_financial", "auto_detected"]
39106
+ },
39107
+ {
39108
+ pattern: "financial",
39109
+ level: "sensitive",
39110
+ categories: ["financial"],
39111
+ flags: ["contains_financial", "auto_detected"]
39112
+ },
40383
39113
  // Health
40384
- { pattern: "health", level: "restricted", categories: ["health"], flags: ["contains_health", "auto_detected"] },
40385
- { pattern: "medical", level: "restricted", categories: ["health"], flags: ["contains_health", "auto_detected"] },
40386
- { pattern: "prescription", level: "restricted", categories: ["health"], flags: ["contains_health", "auto_detected"] },
40387
- { pattern: "diagnosis", level: "restricted", categories: ["health"], flags: ["contains_health", "auto_detected"] },
39114
+ {
39115
+ pattern: "health",
39116
+ level: "restricted",
39117
+ categories: ["health"],
39118
+ flags: ["contains_health", "auto_detected"]
39119
+ },
39120
+ {
39121
+ pattern: "medical",
39122
+ level: "restricted",
39123
+ categories: ["health"],
39124
+ flags: ["contains_health", "auto_detected"]
39125
+ },
39126
+ {
39127
+ pattern: "prescription",
39128
+ level: "restricted",
39129
+ categories: ["health"],
39130
+ flags: ["contains_health", "auto_detected"]
39131
+ },
39132
+ {
39133
+ pattern: "diagnosis",
39134
+ level: "restricted",
39135
+ categories: ["health"],
39136
+ flags: ["contains_health", "auto_detected"]
39137
+ },
40388
39138
  // Communications
40389
- { pattern: "mail", level: "sensitive", categories: ["communications"], flags: ["contains_communications", "auto_detected"] },
40390
- { pattern: "message", level: "sensitive", categories: ["communications"], flags: ["contains_communications", "auto_detected"] },
40391
- { pattern: "chat", level: "sensitive", categories: ["communications"], flags: ["contains_communications", "auto_detected"] },
40392
- { pattern: "inbox", level: "sensitive", categories: ["communications"], flags: ["contains_communications", "auto_detected"] },
39139
+ {
39140
+ pattern: "mail",
39141
+ level: "sensitive",
39142
+ categories: ["communications"],
39143
+ flags: ["contains_communications", "auto_detected"]
39144
+ },
39145
+ {
39146
+ pattern: "message",
39147
+ level: "sensitive",
39148
+ categories: ["communications"],
39149
+ flags: ["contains_communications", "auto_detected"]
39150
+ },
39151
+ {
39152
+ pattern: "chat",
39153
+ level: "sensitive",
39154
+ categories: ["communications"],
39155
+ flags: ["contains_communications", "auto_detected"]
39156
+ },
39157
+ {
39158
+ pattern: "inbox",
39159
+ level: "sensitive",
39160
+ categories: ["communications"],
39161
+ flags: ["contains_communications", "auto_detected"]
39162
+ },
40393
39163
  // Location
40394
- { pattern: "location", level: "sensitive", categories: ["location"], flags: ["contains_location", "auto_detected"] },
40395
- { pattern: "gps", level: "sensitive", categories: ["location"], flags: ["contains_location", "auto_detected"] },
40396
- { pattern: "geolocation", level: "sensitive", categories: ["location"], flags: ["contains_location", "auto_detected"] },
39164
+ {
39165
+ pattern: "location",
39166
+ level: "sensitive",
39167
+ categories: ["location"],
39168
+ flags: ["contains_location", "auto_detected"]
39169
+ },
39170
+ {
39171
+ pattern: "gps",
39172
+ level: "sensitive",
39173
+ categories: ["location"],
39174
+ flags: ["contains_location", "auto_detected"]
39175
+ },
39176
+ {
39177
+ pattern: "geolocation",
39178
+ level: "sensitive",
39179
+ categories: ["location"],
39180
+ flags: ["contains_location", "auto_detected"]
39181
+ },
40397
39182
  // Identity
40398
- { pattern: "profile", level: "personal", categories: ["identity"], flags: ["contains_pii", "auto_detected"] },
40399
- { pattern: "contact", level: "personal", categories: ["identity"], flags: ["contains_pii", "auto_detected"] },
40400
- { pattern: "address", level: "sensitive", categories: ["identity"], flags: ["contains_pii", "auto_detected"] },
40401
- { pattern: "ssn", level: "restricted", categories: ["identity"], flags: ["contains_pii", "auto_detected"] },
39183
+ {
39184
+ pattern: "profile",
39185
+ level: "personal",
39186
+ categories: ["identity"],
39187
+ flags: ["contains_pii", "auto_detected"]
39188
+ },
39189
+ {
39190
+ pattern: "contact",
39191
+ level: "personal",
39192
+ categories: ["identity"],
39193
+ flags: ["contains_pii", "auto_detected"]
39194
+ },
39195
+ {
39196
+ pattern: "address",
39197
+ level: "sensitive",
39198
+ categories: ["identity"],
39199
+ flags: ["contains_pii", "auto_detected"]
39200
+ },
39201
+ {
39202
+ pattern: "ssn",
39203
+ level: "restricted",
39204
+ categories: ["identity"],
39205
+ flags: ["contains_pii", "auto_detected"]
39206
+ },
40402
39207
  // Browsing
40403
- { pattern: "history", level: "personal", categories: ["browsing_history"], flags: ["auto_detected"] },
40404
- { pattern: "bookmark", level: "personal", categories: ["browsing_history"], flags: ["auto_detected"] },
40405
- { pattern: "cache", level: "personal", categories: ["browsing_history"], flags: ["auto_detected"] },
39208
+ {
39209
+ pattern: "history",
39210
+ level: "personal",
39211
+ categories: ["browsing_history"],
39212
+ flags: ["auto_detected"]
39213
+ },
39214
+ {
39215
+ pattern: "bookmark",
39216
+ level: "personal",
39217
+ categories: ["browsing_history"],
39218
+ flags: ["auto_detected"]
39219
+ },
39220
+ {
39221
+ pattern: "cache",
39222
+ level: "personal",
39223
+ categories: ["browsing_history"],
39224
+ flags: ["auto_detected"]
39225
+ },
40406
39226
  // Media
40407
39227
  { pattern: "photo", level: "personal", categories: ["media_personal"], flags: ["auto_detected"] },
40408
39228
  { pattern: "video", level: "personal", categories: ["media_personal"], flags: ["auto_detected"] },
40409
- { pattern: "camera", level: "personal", categories: ["media_personal"], flags: ["auto_detected"] },
39229
+ {
39230
+ pattern: "camera",
39231
+ level: "personal",
39232
+ categories: ["media_personal"],
39233
+ flags: ["auto_detected"]
39234
+ },
40410
39235
  // Device
40411
- { pattern: "device", level: "internal", categories: ["device_metadata"], flags: ["auto_detected"] },
40412
- { pattern: "system", level: "internal", categories: ["device_metadata"], flags: ["auto_detected"] }
39236
+ {
39237
+ pattern: "device",
39238
+ level: "internal",
39239
+ categories: ["device_metadata"],
39240
+ flags: ["auto_detected"]
39241
+ },
39242
+ {
39243
+ pattern: "system",
39244
+ level: "internal",
39245
+ categories: ["device_metadata"],
39246
+ flags: ["auto_detected"]
39247
+ }
40413
39248
  ];
40414
39249
  var MIME_MAP = {
40415
39250
  ".json": "application/json",
@@ -40451,7 +39286,14 @@ function classifyFileSensitivity(filePath, patterns = DEFAULT_SENSITIVITY_PATTER
40451
39286
  let highestLevel = "general";
40452
39287
  const categories = /* @__PURE__ */ new Set();
40453
39288
  const flags = /* @__PURE__ */ new Set();
40454
- const levelOrder = ["general", "public", "internal", "personal", "sensitive", "restricted"];
39289
+ const levelOrder = [
39290
+ "general",
39291
+ "public",
39292
+ "internal",
39293
+ "personal",
39294
+ "sensitive",
39295
+ "restricted"
39296
+ ];
40455
39297
  const levelIndex = (l) => levelOrder.indexOf(l);
40456
39298
  for (const pattern of patterns) {
40457
39299
  if (lowerPath.includes(pattern.pattern)) {
@@ -40508,10 +39350,7 @@ function archiveVerificationToReceiptInput(payload, options) {
40508
39350
  hashes: [payloadHash],
40509
39351
  nonce: `archive_verify_${payload.workflow}_${payload.provider}_${Date.now()}`,
40510
39352
  commandHash: payload.archiveHash || void 0,
40511
- witnessRefs: [
40512
- ...payload.errors,
40513
- ...payload.warnings
40514
- ]
39353
+ witnessRefs: [...payload.errors, ...payload.warnings]
40515
39354
  },
40516
39355
  algebraicTrust: {
40517
39356
  layer1Strategy: "strict_error",
@@ -40578,13 +39417,17 @@ function validateArchiveVerification(payload) {
40578
39417
  if (!payload.archiveFormat) errors.push("Missing archiveFormat");
40579
39418
  if (!payload.archiveHash) errors.push("Missing archiveHash");
40580
39419
  if (payload.sourceFileMutationPerformed) {
40581
- errors.push("sourceFileMutationPerformed must be false \u2014 verification must not mutate source files");
39420
+ errors.push(
39421
+ "sourceFileMutationPerformed must be false \u2014 verification must not mutate source files"
39422
+ );
40582
39423
  }
40583
39424
  if (payload.rawPrivateDataPublished) {
40584
39425
  errors.push("rawPrivateDataPublished must be false \u2014 raw private data must not be published");
40585
39426
  }
40586
39427
  if (payload.privatePathLeakedToPublicReceipt) {
40587
- errors.push("privatePathLeakedToPublicReceipt must be false \u2014 private paths must not leak into public receipts");
39428
+ errors.push(
39429
+ "privatePathLeakedToPublicReceipt must be false \u2014 private paths must not leak into public receipts"
39430
+ );
40588
39431
  }
40589
39432
  if (payload.totalParts < 1) {
40590
39433
  errors.push("totalParts must be at least 1");
@@ -40593,7 +39436,9 @@ function validateArchiveVerification(payload) {
40593
39436
  errors.push("totalSizeBytes must be non-negative");
40594
39437
  }
40595
39438
  if (payload.parts.length !== payload.totalParts) {
40596
- errors.push(`parts.length (${payload.parts.length}) does not match totalParts (${payload.totalParts})`);
39439
+ errors.push(
39440
+ `parts.length (${payload.parts.length}) does not match totalParts (${payload.totalParts})`
39441
+ );
40597
39442
  }
40598
39443
  const missingParts = payload.parts.filter((p) => p.status === "missing");
40599
39444
  const corruptParts = payload.parts.filter((p) => p.status === "present_corrupt");
@@ -40602,24 +39447,36 @@ function validateArchiveVerification(payload) {
40602
39447
  errors.push('partsComplete is true but some parts have status "missing"');
40603
39448
  }
40604
39449
  if (corruptParts.length > 0) {
40605
- errors.push(`${corruptParts.length} part(s) have status "present_corrupt" \u2014 archive is corrupt`);
39450
+ errors.push(
39451
+ `${corruptParts.length} part(s) have status "present_corrupt" \u2014 archive is corrupt`
39452
+ );
40606
39453
  }
40607
39454
  if (sizeMismatchParts.length > 0) {
40608
- warnings.push(`${sizeMismatchParts.length} part(s) have status "present_size_mismatch" \u2014 sizes don't match expected`);
39455
+ warnings.push(
39456
+ `${sizeMismatchParts.length} part(s) have status "present_size_mismatch" \u2014 sizes don't match expected`
39457
+ );
40609
39458
  }
40610
39459
  if (payload.manifestExtracted && payload.fileManifest.length !== payload.fileCount) {
40611
- warnings.push(`fileManifest has ${payload.fileManifest.length} entries but fileCount is ${payload.fileCount}`);
39460
+ warnings.push(
39461
+ `fileManifest has ${payload.fileManifest.length} entries but fileCount is ${payload.fileCount}`
39462
+ );
40612
39463
  }
40613
39464
  if (payload.executablesDetected && !payload.executableBlockImport) {
40614
- errors.push("executablesDetected is true but executableBlockImport is false \u2014 executables must block imports");
39465
+ errors.push(
39466
+ "executablesDetected is true but executableBlockImport is false \u2014 executables must block imports"
39467
+ );
40615
39468
  }
40616
39469
  const hasRestrictedFiles = payload.restrictedFiles.length > 0;
40617
39470
  const hasSensitiveFiles = payload.sensitiveFiles.length > 0;
40618
39471
  if ((hasRestrictedFiles || hasSensitiveFiles) && !payload.sensitivityBlockShare) {
40619
- warnings.push("restricted or sensitive files detected but sensitivityBlockShare is false \u2014 sharing may leak sensitive data");
39472
+ warnings.push(
39473
+ "restricted or sensitive files detected but sensitivityBlockShare is false \u2014 sharing may leak sensitive data"
39474
+ );
40620
39475
  }
40621
39476
  if (payload.verificationResult === "verified" && errors.length > 0) {
40622
- warnings.push('verificationResult is "verified" but payload has validation errors \u2014 consider verificationResult "verified_with_warnings" or "failed_*"');
39477
+ warnings.push(
39478
+ 'verificationResult is "verified" but payload has validation errors \u2014 consider verificationResult "verified_with_warnings" or "failed_*"'
39479
+ );
40623
39480
  }
40624
39481
  for (const entry of payload.fileManifest) {
40625
39482
  if (!entry.contentHash) {
@@ -40758,10 +39615,14 @@ function validateReplayVerification(payload) {
40758
39615
  errors.push("sourceFileMutationPerformed must be false \u2014 replay must not mutate source files");
40759
39616
  }
40760
39617
  if (payload.rawPrivateDataPublished) {
40761
- errors.push("rawPrivateDataPublished must be false \u2014 raw private data must not be published during replay");
39618
+ errors.push(
39619
+ "rawPrivateDataPublished must be false \u2014 raw private data must not be published during replay"
39620
+ );
40762
39621
  }
40763
39622
  if (payload.privatePathLeakedToPublicReceipt) {
40764
- errors.push("privatePathLeakedToPublicReceipt must be false \u2014 private paths must not leak into replay receipts");
39623
+ errors.push(
39624
+ "privatePathLeakedToPublicReceipt must be false \u2014 private paths must not leak into replay receipts"
39625
+ );
40765
39626
  }
40766
39627
  if (payload.replayOutcome === "match" && payload.diffEntries.length > 0) {
40767
39628
  errors.push('replayOutcome is "match" but diffEntries is non-empty');
@@ -40770,7 +39631,9 @@ function validateReplayVerification(payload) {
40770
39631
  errors.push('replayOutcome is "match" but filesDiffered is non-zero');
40771
39632
  }
40772
39633
  if (payload.replayOutcome.startsWith("mismatch") && payload.archiveHashMatch && payload.fileContentMatch) {
40773
- warnings.push("replayOutcome indicates mismatch but archiveHashMatch and fileContentMatch are both true");
39634
+ warnings.push(
39635
+ "replayOutcome indicates mismatch but archiveHashMatch and fileContentMatch are both true"
39636
+ );
40774
39637
  }
40775
39638
  if (payload.replayOutcome === "replay_failed" && payload.replayDurationMs > 0) ;
40776
39639
  if (payload.replayDurationMs < 0) {
@@ -40832,7 +39695,9 @@ var AccountExportArchiveVerifier = class {
40832
39695
  };
40833
39696
  });
40834
39697
  const totalParts = parts.length > 0 ? parts[0].totalParts : 1;
40835
- const partsComplete = verifiedParts.every((p) => p.status === "present_intact" || p.status === "present_size_mismatch");
39698
+ const partsComplete = verifiedParts.every(
39699
+ (p) => p.status === "present_intact" || p.status === "present_size_mismatch"
39700
+ );
40836
39701
  const totalSizeBytes = verifiedParts.reduce((sum, p) => sum + p.partSizeBytes, 0);
40837
39702
  const fileManifest = files.map((file) => {
40838
39703
  const contentBuf = typeof file.content === "string" ? Buffer.from(file.content, "utf-8") : file.content;
@@ -40871,7 +39736,13 @@ var AccountExportArchiveVerifier = class {
40871
39736
  const executableFiles = fileManifest.filter((entry) => entry.isExecutable).map((entry) => entry.path);
40872
39737
  const allCategories = /* @__PURE__ */ new Set();
40873
39738
  let aggregateSensitivity = "public";
40874
- const sensitivityOrder = ["public", "internal", "personal", "sensitive", "restricted"];
39739
+ const sensitivityOrder = [
39740
+ "public",
39741
+ "internal",
39742
+ "personal",
39743
+ "sensitive",
39744
+ "restricted"
39745
+ ];
40875
39746
  const sensitivityIndex = (l) => sensitivityOrder.indexOf(l);
40876
39747
  for (const entry of fileManifest) {
40877
39748
  for (const cat of entry.sensitivityCategories) {
@@ -40947,7 +39818,14 @@ var AccountExportArchiveVerifier = class {
40947
39818
  sensitiveFiles,
40948
39819
  sensitivityBlockShare: (restrictedFiles.length > 0 || sensitiveFiles.length > 0) && this.config.blockOnSensitivity,
40949
39820
  verificationResult,
40950
- verificationSummary: this.buildVerificationSummary(verificationResult, executableFiles, restrictedFiles, sensitiveFiles, errors, warnings),
39821
+ verificationSummary: this.buildVerificationSummary(
39822
+ verificationResult,
39823
+ executableFiles,
39824
+ restrictedFiles,
39825
+ sensitiveFiles,
39826
+ errors,
39827
+ warnings
39828
+ ),
40951
39829
  warnings,
40952
39830
  errors,
40953
39831
  credentialAdjacent: false,
@@ -40985,9 +39863,7 @@ var AccountExportArchiveVerifier = class {
40985
39863
  * @param originalTimestamp The timestamp from the original verification receipt.
40986
39864
  */
40987
39865
  replay(originalPayload, currentFiles, trigger2 = "integrity_check", originalReceiptId = "", originalTimestamp = "") {
40988
- const originalManifest = new Map(
40989
- originalPayload.fileManifest.map((e) => [e.path, e])
40990
- );
39866
+ const originalManifest = new Map(originalPayload.fileManifest.map((e) => [e.path, e]));
40991
39867
  const currentHashes = /* @__PURE__ */ new Map();
40992
39868
  const diffEntries = [];
40993
39869
  let filesMatched = 0;
@@ -41105,7 +39981,15 @@ var AccountExportArchiveVerifier = class {
41105
39981
  sensitivityMatch,
41106
39982
  executableMatch,
41107
39983
  replayOutcome,
41108
- replaySummary: this.buildReplaySummary(replayOutcome, filesMatched, filesDiffered, filesMissing, filesExtra, sensitivityMatch, executableMatch),
39984
+ replaySummary: this.buildReplaySummary(
39985
+ replayOutcome,
39986
+ filesMatched,
39987
+ filesDiffered,
39988
+ filesMissing,
39989
+ filesExtra,
39990
+ sensitivityMatch,
39991
+ executableMatch
39992
+ ),
41109
39993
  diffEntries,
41110
39994
  warnings,
41111
39995
  errors,
@@ -41284,7 +40168,9 @@ function canonicalizeDomainReceiptPayload(payload) {
41284
40168
  }
41285
40169
  function toDomainReceiptJson(value, depth) {
41286
40170
  if (depth > MAX_RECEIPT_DEPTH) {
41287
- throw new Error(`[domain-receipt] Receipt payload exceeds max depth (${MAX_RECEIPT_DEPTH}). Possible circular reference or excessively nested structure.`);
40171
+ throw new Error(
40172
+ `[domain-receipt] Receipt payload exceeds max depth (${MAX_RECEIPT_DEPTH}). Possible circular reference or excessively nested structure.`
40173
+ );
41288
40174
  }
41289
40175
  if (value === null) return null;
41290
40176
  if (value === void 0) return null;
@@ -41296,10 +40182,14 @@ function toDomainReceiptJson(value, depth) {
41296
40182
  return value;
41297
40183
  }
41298
40184
  if (typeof value === "bigint") {
41299
- throw new Error("[domain-receipt] BigInt values are not receipt-safe; convert to string or number before hashing");
40185
+ throw new Error(
40186
+ "[domain-receipt] BigInt values are not receipt-safe; convert to string or number before hashing"
40187
+ );
41300
40188
  }
41301
40189
  if (value instanceof Date) {
41302
- throw new Error(`[domain-receipt] Date objects are not receipt-safe; serialize to ISO string before hashing (got ${value.toISOString()})`);
40190
+ throw new Error(
40191
+ `[domain-receipt] Date objects are not receipt-safe; serialize to ISO string before hashing (got ${value.toISOString()})`
40192
+ );
41303
40193
  }
41304
40194
  if (Array.isArray(value)) {
41305
40195
  return value.map((item) => toDomainReceiptJson(item, depth + 1));