@holoscript/core 8.0.14 → 8.0.16

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 (187) hide show
  1. package/README.md +6 -13
  2. package/bin/holo-decision.mjs +0 -0
  3. package/bin/holoscript.cjs +0 -0
  4. package/dist/{GLTFPipeline-6LS3UDYX.js → GLTFPipeline-FRBZIATS.js} +6 -6
  5. package/dist/{GLTFPipeline-VTI6PRRQ.cjs → GLTFPipeline-MTPP444P.cjs} +10 -10
  6. package/dist/{HoloCompositionParser-GILABNN3.js → HoloCompositionParser-2GVQAZ2X.js} +7 -7
  7. package/dist/HoloCompositionParser-3NDF6BMX.cjs +45 -0
  8. package/dist/HoloScriptPlusParser-URSIBEAW.cjs +30 -0
  9. package/dist/HoloScriptPlusParser-YCV6L7GI.js +13 -0
  10. package/dist/{HoloScriptRuntime-YBYXJHJN.cjs → HoloScriptRuntime-CRWI6C3P.cjs} +5 -5
  11. package/dist/{HoloScriptRuntime-UTRLJI5L.js → HoloScriptRuntime-IAZGHPFP.js} +4 -4
  12. package/dist/{SceneIRCompiler-VX75RB6H.js → SceneIRCompiler-BJQMKLWL.js} +6 -6
  13. package/dist/{SceneIRCompiler-7KQ5NKAU.cjs → SceneIRCompiler-RTPPDQAV.cjs} +11 -11
  14. package/dist/{chunk-Y2OCKXVD.js → chunk-22AULOAL.js} +5 -5
  15. package/dist/{chunk-D44CEFY4.cjs → chunk-2DJIS7TH.cjs} +5 -5
  16. package/dist/{chunk-LHUDAJQT.cjs → chunk-2PVEXEOL.cjs} +5 -5
  17. package/dist/{chunk-M7XR3F53.js → chunk-2UP2J3OK.js} +4 -4
  18. package/dist/{chunk-3KHRZTNW.js → chunk-3AUYBQ5I.js} +3 -3
  19. package/dist/{chunk-UKEK2NZJ.js → chunk-3MQAOMKD.js} +3 -3
  20. package/dist/{chunk-FWKEY4LD.js → chunk-4AGNARX6.js} +3 -3
  21. package/dist/{chunk-7ITJP33Q.cjs → chunk-4CQ7ULXZ.cjs} +3 -3
  22. package/dist/{chunk-47XZ62KM.js → chunk-4UA5OBWR.js} +5 -5
  23. package/dist/{chunk-ORBVCOTC.js → chunk-5LCJDX5A.js} +3 -3
  24. package/dist/{chunk-IK6Z2HNC.js → chunk-6OQHLNTT.js} +2 -2
  25. package/dist/{chunk-EI3J6LTW.cjs → chunk-6RDHWSZM.cjs} +217 -217
  26. package/dist/{chunk-73EDVY5D.js → chunk-7AY66PZP.js} +3 -3
  27. package/dist/{chunk-6FCNMTL5.js → chunk-7HDRN5BW.js} +4 -4
  28. package/dist/{chunk-N7MIIDLI.cjs → chunk-7IBXTJP7.cjs} +8 -8
  29. package/dist/{chunk-R5VKLUMR.js → chunk-AAUQTR7I.js} +4 -4
  30. package/dist/{chunk-HCONR4J6.cjs → chunk-AN3ZH7M7.cjs} +38 -38
  31. package/dist/{chunk-YW3I2FQL.js → chunk-ANMME7XT.js} +4 -2
  32. package/dist/{chunk-W4AJMMQR.js → chunk-AUF7HFOO.js} +60 -22
  33. package/dist/{chunk-SKVBUGMC.cjs → chunk-AUMTQV64.cjs} +7 -7
  34. package/dist/{chunk-7ZKQ32XK.js → chunk-B5K3WHJ4.js} +4 -4
  35. package/dist/{chunk-QQFB4RT2.cjs → chunk-BTVHY3UB.cjs} +2 -2
  36. package/dist/{chunk-SE2Y5BSL.cjs → chunk-CMEINO5I.cjs} +186 -70
  37. package/dist/{chunk-YMI3ED3B.cjs → chunk-CRUIGXF7.cjs} +5 -5
  38. package/dist/chunk-DDBYJJZK.js +1571 -0
  39. package/dist/{chunk-2E6PP5UE.cjs → chunk-E2SNPMBO.cjs} +11 -11
  40. package/dist/{chunk-GI5YYZH6.js → chunk-E4YS5SIZ.js} +90 -25
  41. package/dist/{chunk-62OYZT6Q.js → chunk-EKNWUSGW.js} +3 -3
  42. package/dist/{chunk-RVN7OPCP.js → chunk-ETIJOUIO.js} +4 -4
  43. package/dist/chunk-EUNELE7Y.cjs +1605 -0
  44. package/dist/{chunk-C73GVAYC.js → chunk-F33KLYOS.js} +5 -5
  45. package/dist/{chunk-4CRMVEON.cjs → chunk-F47FEV4X.cjs} +40 -40
  46. package/dist/{chunk-FGXJPJ3W.cjs → chunk-FCGTI7FO.cjs} +4 -4
  47. package/dist/{chunk-OSKGCXAQ.cjs → chunk-FGTXAVKG.cjs} +5 -5
  48. package/dist/{chunk-XZC75AJ4.cjs → chunk-FPGYWNNA.cjs} +5 -5
  49. package/dist/{chunk-5B2AJKA5.cjs → chunk-FQ4MYZYU.cjs} +20 -20
  50. package/dist/{chunk-KOGPVAP6.js → chunk-FT4FGTR6.js} +3 -3
  51. package/dist/{chunk-N7IYRAFG.cjs → chunk-FVNV4WHQ.cjs} +14 -14
  52. package/dist/{chunk-SJIRCTIS.cjs → chunk-HSGJFCVJ.cjs} +2 -2
  53. package/dist/{chunk-TKDDIE3T.cjs → chunk-ILO2KMER.cjs} +4 -4
  54. package/dist/{chunk-GGH3ZYDB.cjs → chunk-IPBSNGAN.cjs} +92 -27
  55. package/dist/{chunk-JQCXLKAU.js → chunk-IX2U3RQT.js} +3 -3
  56. package/dist/{chunk-P65OIMJT.cjs → chunk-IYK6LMQ7.cjs} +7 -7
  57. package/dist/{chunk-NWKARJM2.js → chunk-J3VVM6GV.js} +4 -4
  58. package/dist/{chunk-FOM36K5I.cjs → chunk-J74S4ZMF.cjs} +18 -18
  59. package/dist/{chunk-36NPLOI4.cjs → chunk-JERWCCEJ.cjs} +4 -2
  60. package/dist/{chunk-VXHB6ZHY.js → chunk-JTDDLCSP.js} +4 -4
  61. package/dist/{chunk-GYJLP4BO.cjs → chunk-K53L47NH.cjs} +30 -30
  62. package/dist/{chunk-FHR2AVMA.cjs → chunk-LJTM5ONX.cjs} +23 -23
  63. package/dist/{chunk-JCVSCKUH.js → chunk-LJVVOVA6.js} +4 -4
  64. package/dist/{chunk-LQNL3IYV.cjs → chunk-LNJKBQ2B.cjs} +38 -38
  65. package/dist/{chunk-2GKF7JQ6.js → chunk-M2GDE3NV.js} +3 -3
  66. package/dist/{chunk-Z7NUL73U.js → chunk-MSZNGI5P.js} +3 -3
  67. package/dist/{chunk-B6JHTTMR.cjs → chunk-N2BOTBPG.cjs} +15 -15
  68. package/dist/{chunk-L4DBUX3N.cjs → chunk-NFALJJCH.cjs} +12 -12
  69. package/dist/{chunk-YBM34FUJ.cjs → chunk-NRZRBK25.cjs} +6 -6
  70. package/dist/{chunk-SNMQUWIO.cjs → chunk-NTSLNIY7.cjs} +10 -10
  71. package/dist/{chunk-645EWDZW.cjs → chunk-NZJOAWJM.cjs} +4 -4
  72. package/dist/{chunk-LGRKBTPM.js → chunk-OG7RKWWX.js} +3 -3
  73. package/dist/{chunk-OOP4S3GU.cjs → chunk-OQVHCYY4.cjs} +5 -5
  74. package/dist/{chunk-TMNAKNV2.cjs → chunk-PEBNX3VM.cjs} +5 -5
  75. package/dist/{chunk-5T6BWIB7.js → chunk-PFZ5WLIP.js} +4 -4
  76. package/dist/{chunk-CESMPUEZ.cjs → chunk-PHLNABJD.cjs} +159 -145
  77. package/dist/{chunk-CHIZSMWD.js → chunk-PLK3DLTF.js} +3 -3
  78. package/dist/{chunk-4NEPHK2K.js → chunk-PMACVMHL.js} +3 -3
  79. package/dist/{chunk-EYHPTJ3F.js → chunk-PV2OXNP5.js} +40 -26
  80. package/dist/{chunk-KLM6QD6D.cjs → chunk-Q6VW7MGX.cjs} +14 -14
  81. package/dist/{chunk-YDSNDCV3.js → chunk-QC3CAVFN.js} +186 -69
  82. package/dist/{chunk-REN3LHO6.cjs → chunk-QKLEDRHN.cjs} +19 -19
  83. package/dist/{chunk-2EGGAZT3.js → chunk-QS27OYBU.js} +3 -3
  84. package/dist/{chunk-4376VHNJ.js → chunk-RUB7WL6C.js} +3 -3
  85. package/dist/chunk-S2BSXG3B.js +3308 -0
  86. package/dist/{chunk-TZQKJOPC.js → chunk-TW2AH2ZS.js} +3 -3
  87. package/dist/{chunk-Q4J2K7FI.js → chunk-TZM6DKSJ.js} +6 -6
  88. package/dist/{chunk-ESSEF6U2.js → chunk-U227RWXB.js} +3 -3
  89. package/dist/{chunk-ERYKKPHW.cjs → chunk-U6CQOM5Q.cjs} +13 -13
  90. package/dist/{chunk-VMCR5QVI.js → chunk-ULT2QAV5.js} +4 -4
  91. package/dist/chunk-VQOTDNFL.cjs +3337 -0
  92. package/dist/{chunk-VZI7S7P6.cjs → chunk-VSO6HPDZ.cjs} +7 -7
  93. package/dist/{chunk-QLPRI3QW.js → chunk-WQJMSSJT.js} +4 -4
  94. package/dist/{chunk-GILYQ5VH.cjs → chunk-WXSDBWGM.cjs} +4 -4
  95. package/dist/{chunk-42Z3SVHQ.js → chunk-X5PMMK7H.js} +3 -3
  96. package/dist/{chunk-ML4V5PVU.cjs → chunk-X5ZLSPU2.cjs} +74 -32
  97. package/dist/{chunk-PSWCJQS4.js → chunk-X727CQ7X.js} +5 -5
  98. package/dist/{chunk-YM7UUYR5.cjs → chunk-XHZYS4QO.cjs} +5 -5
  99. package/dist/{chunk-PZ46WRHX.cjs → chunk-XRQCTTDC.cjs} +8 -8
  100. package/dist/{chunk-IXFNA5TT.js → chunk-YBIHSN55.js} +4 -4
  101. package/dist/{chunk-BLCWQ225.js → chunk-Z574GVI3.js} +4 -4
  102. package/dist/{chunk-ZVQMKUGJ.js → chunk-Z5V3KA7L.js} +2 -2
  103. package/dist/{chunk-VTFLKSJL.cjs → chunk-ZHW6TDZ6.cjs} +14 -14
  104. package/dist/{chunk-KYJD2UMV.js → chunk-ZPHCTPR6.js} +4 -4
  105. package/dist/{chunk-VA7THINF.cjs → chunk-ZXXC2GXB.cjs} +38 -38
  106. package/dist/cli/holoscript-runner.cjs +168 -19
  107. package/dist/cli/holoscript-runner.js +162 -13
  108. package/dist/compiler/agent-inference.cjs +7 -7
  109. package/dist/compiler/agent-inference.js +3 -3
  110. package/dist/compiler/android-xr.cjs +6 -6
  111. package/dist/compiler/android-xr.js +4 -4
  112. package/dist/compiler/android.cjs +5 -5
  113. package/dist/compiler/android.js +3 -3
  114. package/dist/compiler/context.cjs +5 -5
  115. package/dist/compiler/context.js +2 -2
  116. package/dist/compiler/daimon-seed.cjs +8 -8
  117. package/dist/compiler/daimon-seed.js +3 -3
  118. package/dist/compiler/domain-block-utils.cjs +164 -164
  119. package/dist/compiler/domain-block-utils.js +3 -3
  120. package/dist/compiler/dtdl.cjs +6 -6
  121. package/dist/compiler/dtdl.js +3 -3
  122. package/dist/compiler/gltf-pipeline.cjs +8 -8
  123. package/dist/compiler/gltf-pipeline.js +1 -1
  124. package/dist/compiler/godot.cjs +5 -5
  125. package/dist/compiler/godot.js +4 -4
  126. package/dist/compiler/incremental.cjs +7 -7
  127. package/dist/compiler/incremental.js +2 -2
  128. package/dist/compiler/index.cjs +1603 -204
  129. package/dist/compiler/index.d.ts +8 -0
  130. package/dist/compiler/index.js +1431 -55
  131. package/dist/compiler/ios.cjs +5 -5
  132. package/dist/compiler/ios.js +3 -3
  133. package/dist/compiler/llm-provider-capabilities.cjs +5 -5
  134. package/dist/compiler/llm-provider-capabilities.js +2 -2
  135. package/dist/compiler/openxr.cjs +5 -5
  136. package/dist/compiler/openxr.js +4 -4
  137. package/dist/compiler/sdf.cjs +6 -6
  138. package/dist/compiler/sdf.js +4 -4
  139. package/dist/compiler/state.cjs +5 -5
  140. package/dist/compiler/state.js +3 -3
  141. package/dist/compiler/trait-composition.cjs +6 -6
  142. package/dist/compiler/trait-composition.js +2 -2
  143. package/dist/compiler/unity.cjs +5 -5
  144. package/dist/compiler/unity.js +4 -4
  145. package/dist/compiler/unreal.cjs +6 -6
  146. package/dist/compiler/unreal.js +4 -4
  147. package/dist/compiler/urdf.cjs +13 -13
  148. package/dist/compiler/urdf.js +4 -4
  149. package/dist/compiler/usd-physics.cjs +6 -6
  150. package/dist/compiler/usd-physics.js +3 -3
  151. package/dist/compiler/visionos.cjs +5 -5
  152. package/dist/compiler/visionos.js +4 -4
  153. package/dist/compiler/vrchat.cjs +6 -6
  154. package/dist/compiler/vrchat.js +4 -4
  155. package/dist/compiler/wasm.cjs +9 -9
  156. package/dist/compiler/wasm.js +4 -4
  157. package/dist/compiler/webgpu.cjs +5 -5
  158. package/dist/compiler/webgpu.js +4 -4
  159. package/dist/constants.cjs +99 -99
  160. package/dist/constants.js +3 -3
  161. package/dist/debugger.cjs +5 -5
  162. package/dist/debugger.js +3 -3
  163. package/dist/{dist-GRMOP2UL.cjs → dist-YGATNURH.cjs} +705 -9
  164. package/dist/{dist-ZBUKU2JG.js → dist-ZEZXRCBG.js} +701 -10
  165. package/dist/entries/scripting.cjs +8 -8
  166. package/dist/entries/scripting.js +4 -4
  167. package/dist/evolution/index.cjs +20 -20
  168. package/dist/evolution/index.js +8 -8
  169. package/dist/index.cjs +871 -809
  170. package/dist/index.d.ts +8 -0
  171. package/dist/index.js +132 -70
  172. package/dist/parser/HoloCompositionTypes.d.ts +1 -1
  173. package/dist/parser.cjs +21 -21
  174. package/dist/parser.js +7 -7
  175. package/dist/reconstruction/index.cjs +63 -63
  176. package/dist/reconstruction/index.js +7 -7
  177. package/dist/runtime.cjs +9 -9
  178. package/dist/runtime.js +3 -3
  179. package/dist/traits/botanical-lotus.d.ts +61 -0
  180. package/dist/traits/index.cjs +664 -671
  181. package/dist/traits/index.d.ts +65 -0
  182. package/dist/traits/index.js +14 -21
  183. package/dist/types/HoloScriptPlus.d.ts +1 -1
  184. package/package.json +65 -63
  185. package/dist/HoloCompositionParser-ZVRYVEA5.cjs +0 -45
  186. package/dist/HoloScriptPlusParser-WTPRPRPR.cjs +0 -30
  187. package/dist/HoloScriptPlusParser-ZP53ECSL.js +0 -13
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkP65OIMJT_cjs = require('./chunk-P65OIMJT.cjs');
4
- var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
3
+ var chunkIYK6LMQ7_cjs = require('./chunk-IYK6LMQ7.cjs');
4
+ var chunkCMEINO5I_cjs = require('./chunk-CMEINO5I.cjs');
5
5
  var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
6
6
  var ans = require('@holoscript/core-types/ans');
7
7
 
@@ -50,11 +50,11 @@ function compileToVRChat(composition, options) {
50
50
  exports.VRChatCompiler = void 0;
51
51
  var init_VRChatCompiler = chunkZHPMP447_cjs.__esm({
52
52
  "src/compiler/VRChatCompiler.ts"() {
53
- chunkSE2Y5BSL_cjs.init_CompilerBase();
53
+ chunkCMEINO5I_cjs.init_CompilerBase();
54
54
  init_udon_assembly();
55
55
  init_udon_extern_manifest();
56
- chunkP65OIMJT_cjs.init_DomainBlockCompilerMixin();
57
- exports.VRChatCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
56
+ chunkIYK6LMQ7_cjs.init_DomainBlockCompilerMixin();
57
+ exports.VRChatCompiler = class extends chunkCMEINO5I_cjs.CompilerBase {
58
58
  constructor(options = {}) {
59
59
  super();
60
60
  this.compilerName = "VRChatCompiler";
@@ -297,59 +297,59 @@ var init_VRChatCompiler = chunkZHPMP447_cjs.__esm({
297
297
  this.emit("");
298
298
  this.emit("// === v4.2 Domain Blocks (VRChat/Unity) ===");
299
299
  let blockIdx = 0;
300
- const compiled = chunkP65OIMJT_cjs.compileDomainBlocks(
300
+ const compiled = chunkIYK6LMQ7_cjs.compileDomainBlocks(
301
301
  domainBlocks,
302
302
  {
303
303
  material: (block) => {
304
- const mat = chunkP65OIMJT_cjs.compileMaterialBlock(block);
305
- return chunkP65OIMJT_cjs.materialToVRChat(mat, `db${blockIdx++}`);
304
+ const mat = chunkIYK6LMQ7_cjs.compileMaterialBlock(block);
305
+ return chunkIYK6LMQ7_cjs.materialToVRChat(mat, `db${blockIdx++}`);
306
306
  },
307
307
  physics: (block) => {
308
- const phys = chunkP65OIMJT_cjs.compilePhysicsBlock(block);
309
- return chunkP65OIMJT_cjs.physicsToUnity(phys, `db${blockIdx++}`);
308
+ const phys = chunkIYK6LMQ7_cjs.compilePhysicsBlock(block);
309
+ return chunkIYK6LMQ7_cjs.physicsToUnity(phys, `db${blockIdx++}`);
310
310
  },
311
311
  vfx: (block) => {
312
- const ps = chunkP65OIMJT_cjs.compileParticleBlock(block);
313
- return chunkP65OIMJT_cjs.particlesToUnity(ps, `db${blockIdx++}`);
312
+ const ps = chunkIYK6LMQ7_cjs.compileParticleBlock(block);
313
+ return chunkIYK6LMQ7_cjs.particlesToUnity(ps, `db${blockIdx++}`);
314
314
  },
315
315
  postfx: (block) => {
316
- const pp = chunkP65OIMJT_cjs.compilePostProcessingBlock(block);
317
- return chunkP65OIMJT_cjs.postProcessingToUnity(pp);
316
+ const pp = chunkIYK6LMQ7_cjs.compilePostProcessingBlock(block);
317
+ return chunkIYK6LMQ7_cjs.postProcessingToUnity(pp);
318
318
  },
319
319
  audio: (block) => {
320
- const audio = chunkP65OIMJT_cjs.compileAudioSourceBlock(block);
321
- return chunkP65OIMJT_cjs.audioSourceToUnity(audio, `db${blockIdx++}`);
320
+ const audio = chunkIYK6LMQ7_cjs.compileAudioSourceBlock(block);
321
+ return chunkIYK6LMQ7_cjs.audioSourceToUnity(audio, `db${blockIdx++}`);
322
322
  },
323
323
  weather: (block) => {
324
- const weather = chunkP65OIMJT_cjs.compileWeatherBlock(block);
325
- return chunkP65OIMJT_cjs.weatherToUnity(weather);
324
+ const weather = chunkIYK6LMQ7_cjs.compileWeatherBlock(block);
325
+ return chunkIYK6LMQ7_cjs.weatherToUnity(weather);
326
326
  },
327
327
  narrative: (block) => {
328
- const narr = chunkP65OIMJT_cjs.compileNarrativeBlock(block);
329
- return chunkP65OIMJT_cjs.narrativeToVRChat(narr);
328
+ const narr = chunkIYK6LMQ7_cjs.compileNarrativeBlock(block);
329
+ return chunkIYK6LMQ7_cjs.narrativeToVRChat(narr);
330
330
  },
331
331
  payment: (block) => {
332
- const pay = chunkP65OIMJT_cjs.compilePaymentBlock(block);
333
- return chunkP65OIMJT_cjs.paymentToVRChat(pay);
332
+ const pay = chunkIYK6LMQ7_cjs.compilePaymentBlock(block);
333
+ return chunkIYK6LMQ7_cjs.paymentToVRChat(pay);
334
334
  },
335
335
  healthcare: (block) => {
336
- const h = chunkP65OIMJT_cjs.compileHealthcareBlock(block);
337
- return chunkP65OIMJT_cjs.healthcareToVRChat(h);
336
+ const h = chunkIYK6LMQ7_cjs.compileHealthcareBlock(block);
337
+ return chunkIYK6LMQ7_cjs.healthcareToVRChat(h);
338
338
  },
339
339
  robotics: (block) => {
340
- const r = chunkP65OIMJT_cjs.compileRoboticsBlock(block);
341
- return chunkP65OIMJT_cjs.roboticsToVRChat(r);
340
+ const r = chunkIYK6LMQ7_cjs.compileRoboticsBlock(block);
341
+ return chunkIYK6LMQ7_cjs.roboticsToVRChat(r);
342
342
  },
343
- iot: (block) => chunkP65OIMJT_cjs.iotToVRChat(chunkP65OIMJT_cjs.compileIoTBlock(block)),
344
- dataviz: (block) => chunkP65OIMJT_cjs.datavizToVRChat(chunkP65OIMJT_cjs.compileDataVizBlock(block)),
345
- education: (block) => chunkP65OIMJT_cjs.educationToVRChat(chunkP65OIMJT_cjs.compileEducationBlock(block)),
346
- music: (block) => chunkP65OIMJT_cjs.musicToVRChat(chunkP65OIMJT_cjs.compileMusicBlock(block)),
347
- architecture: (block) => chunkP65OIMJT_cjs.architectureToVRChat(chunkP65OIMJT_cjs.compileArchitectureBlock(block)),
348
- web3: (block) => chunkP65OIMJT_cjs.web3ToVRChat(chunkP65OIMJT_cjs.compileWeb3Block(block)),
349
- procedural: (block) => chunkP65OIMJT_cjs.proceduralToVRChat(chunkP65OIMJT_cjs.compileProceduralBlock(block)),
350
- rendering: (block) => chunkP65OIMJT_cjs.renderingToVRChat(chunkP65OIMJT_cjs.compileRenderingBlock(block)),
351
- navigation: (block) => chunkP65OIMJT_cjs.navigationToVRChat(chunkP65OIMJT_cjs.compileNavigationBlock(block)),
352
- input: (block) => chunkP65OIMJT_cjs.inputToVRChat(chunkP65OIMJT_cjs.compileInputBlock(block))
343
+ iot: (block) => chunkIYK6LMQ7_cjs.iotToVRChat(chunkIYK6LMQ7_cjs.compileIoTBlock(block)),
344
+ dataviz: (block) => chunkIYK6LMQ7_cjs.datavizToVRChat(chunkIYK6LMQ7_cjs.compileDataVizBlock(block)),
345
+ education: (block) => chunkIYK6LMQ7_cjs.educationToVRChat(chunkIYK6LMQ7_cjs.compileEducationBlock(block)),
346
+ music: (block) => chunkIYK6LMQ7_cjs.musicToVRChat(chunkIYK6LMQ7_cjs.compileMusicBlock(block)),
347
+ architecture: (block) => chunkIYK6LMQ7_cjs.architectureToVRChat(chunkIYK6LMQ7_cjs.compileArchitectureBlock(block)),
348
+ web3: (block) => chunkIYK6LMQ7_cjs.web3ToVRChat(chunkIYK6LMQ7_cjs.compileWeb3Block(block)),
349
+ procedural: (block) => chunkIYK6LMQ7_cjs.proceduralToVRChat(chunkIYK6LMQ7_cjs.compileProceduralBlock(block)),
350
+ rendering: (block) => chunkIYK6LMQ7_cjs.renderingToVRChat(chunkIYK6LMQ7_cjs.compileRenderingBlock(block)),
351
+ navigation: (block) => chunkIYK6LMQ7_cjs.navigationToVRChat(chunkIYK6LMQ7_cjs.compileNavigationBlock(block)),
352
+ input: (block) => chunkIYK6LMQ7_cjs.inputToVRChat(chunkIYK6LMQ7_cjs.compileInputBlock(block))
353
353
  },
354
354
  (block) => `// Domain block: ${block.domain}/${block.keyword} "${this.escapeStringValue(block.name, "CSharp")}"`
355
355
  );
@@ -735,5 +735,5 @@ var init_VRChatCompiler = chunkZHPMP447_cjs.__esm({
735
735
  exports.VRChatCompiler_exports = VRChatCompiler_exports;
736
736
  exports.compileToVRChat = compileToVRChat;
737
737
  exports.init_VRChatCompiler = init_VRChatCompiler;
738
- //# sourceMappingURL=chunk-VA7THINF.cjs.map
739
- //# sourceMappingURL=chunk-VA7THINF.cjs.map
738
+ //# sourceMappingURL=chunk-ZXXC2GXB.cjs.map
739
+ //# sourceMappingURL=chunk-ZXXC2GXB.cjs.map
@@ -5,12 +5,12 @@ var chunkQVJMDVYZ_cjs = require('../chunk-QVJMDVYZ.cjs');
5
5
  var chunk37HHY7RH_cjs = require('../chunk-37HHY7RH.cjs');
6
6
  var chunkXHIV6326_cjs = require('../chunk-XHIV6326.cjs');
7
7
  var chunkR75BSDH7_cjs = require('../chunk-R75BSDH7.cjs');
8
- var chunkN7IYRAFG_cjs = require('../chunk-N7IYRAFG.cjs');
9
- require('../chunk-TKDDIE3T.cjs');
8
+ var chunkFVNV4WHQ_cjs = require('../chunk-FVNV4WHQ.cjs');
9
+ require('../chunk-ILO2KMER.cjs');
10
10
  require('../chunk-YP5CHEYU.cjs');
11
- require('../chunk-LHUDAJQT.cjs');
12
- require('../chunk-EI3J6LTW.cjs');
13
- require('../chunk-36NPLOI4.cjs');
11
+ require('../chunk-2PVEXEOL.cjs');
12
+ require('../chunk-6RDHWSZM.cjs');
13
+ require('../chunk-JERWCCEJ.cjs');
14
14
  require('../chunk-AWXFEAQL.cjs');
15
15
  require('../chunk-4FIBOJW6.cjs');
16
16
  require('../chunk-N74QRJGP.cjs');
@@ -704,6 +704,65 @@ async function runDaemon(runtime, opts) {
704
704
  rl.once("close", () => resolve2());
705
705
  });
706
706
  }
707
+ var RUN_RECEIPT_SCHEMA = "holoscript.cli.run-receipt.v1";
708
+ var RUN_SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".holo", ".hs", ".hsplus"]);
709
+ function sha256(value) {
710
+ return `sha256:${crypto.createHash("sha256").update(value).digest("hex")}`;
711
+ }
712
+ function summarizeRunParseErrors(errors) {
713
+ if (!Array.isArray(errors)) return [];
714
+ return errors.slice(0, 8).map((error) => {
715
+ const item = error && typeof error === "object" ? error : {};
716
+ const summary = {
717
+ message: typeof item.message === "string" ? item.message : "HoloScript parse failed"
718
+ };
719
+ if (typeof item.code === "string") summary.code = item.code;
720
+ if (Number.isInteger(item.line)) summary.line = item.line;
721
+ if (Number.isInteger(item.column)) summary.column = item.column;
722
+ return summary;
723
+ });
724
+ }
725
+ function integerStat(stats, key) {
726
+ const value = stats[key];
727
+ return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : null;
728
+ }
729
+ function normalizeRuntimeCounters(stats) {
730
+ return {
731
+ tickCount: integerStat(stats, "tickCount") ?? integerStat(stats, "updateCount"),
732
+ nodesProcessed: integerStat(stats, "nodesProcessed"),
733
+ instanceCount: integerStat(stats, "instanceCount"),
734
+ peakInstanceCount: integerStat(stats, "peakInstanceCount"),
735
+ eventCount: integerStat(stats, "eventCount")
736
+ };
737
+ }
738
+ function resolvePortableRunOutput(output) {
739
+ if (!output) return void 0;
740
+ const portable = output.replace(/\\/gu, "/");
741
+ const segments = portable.split("/");
742
+ if (path__namespace.isAbsolute(output) || /^[a-z]:/iu.test(portable) || portable.startsWith("//") || segments.some((segment) => segment === "..") || path__namespace.extname(portable).toLowerCase() !== ".json") {
743
+ throw new Error("Run receipt output must be a portable, relative .json path");
744
+ }
745
+ const resolved = path__namespace.resolve(process.cwd(), output);
746
+ const relative2 = path__namespace.relative(process.cwd(), resolved);
747
+ if (relative2.startsWith("..") || path__namespace.isAbsolute(relative2)) {
748
+ throw new Error("Run receipt output must stay within the working directory");
749
+ }
750
+ return resolved;
751
+ }
752
+ function emitRunReceipt(opts, outputPath, stableReceipt) {
753
+ const receipt = {
754
+ ...stableReceipt,
755
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
756
+ receiptHash: sha256(JSON.stringify(stableReceipt))
757
+ };
758
+ if (outputPath) {
759
+ fs__namespace.mkdirSync(path__namespace.dirname(outputPath), { recursive: true });
760
+ fs__namespace.writeFileSync(outputPath, `${JSON.stringify(receipt, null, 2)}
761
+ `, "utf-8");
762
+ }
763
+ if (opts.json) console.log(JSON.stringify(receipt));
764
+ return receipt;
765
+ }
707
766
  async function runScript(opts) {
708
767
  if (!opts.file) {
709
768
  console.error("Error: No input file specified");
@@ -716,8 +775,57 @@ async function runScript(opts) {
716
775
  }
717
776
  const source = fs__namespace.readFileSync(filePath, "utf-8");
718
777
  const ext = path__namespace.extname(filePath);
719
- console.log(`[holoscript] Running ${path__namespace.basename(filePath)} (target: ${opts.target})`);
720
- const parseResult = chunkN7IYRAFG_cjs.parse(source);
778
+ const outputPath = resolvePortableRunOutput(opts.output);
779
+ if (opts.watch && (opts.json || outputPath)) {
780
+ throw new Error("Run receipts cannot be combined with --watch");
781
+ }
782
+ if (!opts.json) {
783
+ console.log(`[holoscript] Running ${path__namespace.basename(filePath)} (target: ${opts.target})`);
784
+ }
785
+ if (!RUN_SOURCE_EXTENSIONS.has(ext.toLowerCase())) {
786
+ const errors = [
787
+ {
788
+ code: "CLI001",
789
+ message: "HoloScript run accepts only .holo, .hs, or .hsplus source"
790
+ }
791
+ ];
792
+ emitRunReceipt(opts, outputPath, {
793
+ schema: RUN_RECEIPT_SCHEMA,
794
+ ok: false,
795
+ source: {
796
+ file: path__namespace.basename(filePath),
797
+ extension: ext.toLowerCase(),
798
+ digest: sha256(source),
799
+ parsePassed: false,
800
+ errors
801
+ },
802
+ execution: null
803
+ });
804
+ if (!opts.json) console.error(`[holoscript] Admission failed \u2014 ${errors[0].message}`);
805
+ process.exitCode = 2;
806
+ return;
807
+ }
808
+ const parseResult = chunkFVNV4WHQ_cjs.parse(source);
809
+ if (!parseResult.success || !parseResult.ast) {
810
+ const errors = summarizeRunParseErrors(parseResult.errors);
811
+ emitRunReceipt(opts, outputPath, {
812
+ schema: RUN_RECEIPT_SCHEMA,
813
+ ok: false,
814
+ source: {
815
+ file: path__namespace.basename(filePath),
816
+ extension: ext.toLowerCase(),
817
+ digest: sha256(source),
818
+ parsePassed: false,
819
+ errors
820
+ },
821
+ execution: null
822
+ });
823
+ if (!opts.json) {
824
+ console.error(`[holoscript] Parse failed \u2014 ${errors[0]?.message ?? "invalid HoloScript"}`);
825
+ }
826
+ process.exitCode = 2;
827
+ return;
828
+ }
721
829
  const ast = parseResult.ast;
722
830
  if (opts.debug) {
723
831
  console.log(`[holoscript] Parsed ${ast.body?.length || 0} top-level nodes`);
@@ -764,9 +872,44 @@ async function runScript(opts) {
764
872
  runTicks(runtime, opts.ticks);
765
873
  runtime.stop();
766
874
  const stats = runtime.getStats();
767
- console.log(
768
- `[holoscript] Complete \u2014 ${stats.tickCount} ticks, ${stats.nodesProcessed} nodes processed`
769
- );
875
+ const counters = normalizeRuntimeCounters(stats);
876
+ const sceneRuntime = runtime;
877
+ const scene = sceneRuntime.getSceneReceipt?.() ?? {
878
+ schema: "holoscript-headless-scene-receipt-unavailable-v1",
879
+ rootId: null,
880
+ objectCount: 0,
881
+ objects: []
882
+ };
883
+ const stableReceipt = {
884
+ schema: RUN_RECEIPT_SCHEMA,
885
+ ok: true,
886
+ source: {
887
+ file: path__namespace.basename(filePath),
888
+ extension: ext.toLowerCase(),
889
+ digest: sha256(source),
890
+ parsePassed: true,
891
+ topLevelNodes: ast.body?.length ?? 0
892
+ },
893
+ execution: {
894
+ target: opts.target,
895
+ profile: profile.name,
896
+ requestedTicks: opts.ticks,
897
+ counters,
898
+ scene,
899
+ policy: {
900
+ shellAllowed: opts.allowShell,
901
+ networkAllowed: opts.allowedHosts.length > 0,
902
+ allowedPathCount: opts.allowedPaths.length
903
+ }
904
+ }
905
+ };
906
+ emitRunReceipt(opts, outputPath, stableReceipt);
907
+ if (!opts.json) {
908
+ const objectCount = integerStat(scene, "objectCount") ?? 0;
909
+ console.log(
910
+ `[holoscript] Complete \u2014 ${counters.tickCount ?? "unknown"} ticks, ${objectCount} scene objects`
911
+ );
912
+ }
770
913
  if (opts.watch) {
771
914
  console.log(`[holoscript] Watching for changes... (Ctrl+C to stop)`);
772
915
  const watcher = new chunkXHIV6326_cjs.HotReloadWatcher({
@@ -781,7 +924,11 @@ async function runScript(opts) {
781
924
  console.log(`[holoscript] Re-running ${path__namespace.basename(filePath)}...`);
782
925
  try {
783
926
  const newSource = fs__namespace.readFileSync(filePath, "utf-8");
784
- const newParseResult = chunkN7IYRAFG_cjs.parse(newSource);
927
+ const newParseResult = chunkFVNV4WHQ_cjs.parse(newSource);
928
+ if (!newParseResult.success || !newParseResult.ast) {
929
+ const parseError = summarizeRunParseErrors(newParseResult.errors)[0];
930
+ throw new Error(parseError?.message ?? "invalid HoloScript");
931
+ }
785
932
  const newAst = newParseResult.ast;
786
933
  const newRuntime = createHeadlessRuntime(newAst, {
787
934
  profile: opts.profile === "headless" ? HEADLESS_PROFILE : getProfile(opts.profile),
@@ -792,9 +939,11 @@ async function runScript(opts) {
792
939
  newRuntime.start();
793
940
  runTicks(newRuntime, opts.ticks);
794
941
  newRuntime.stop();
795
- const newStats = newRuntime.getStats();
942
+ const newStats = normalizeRuntimeCounters(
943
+ newRuntime.getStats()
944
+ );
796
945
  console.log(
797
- `[holoscript] Complete \u2014 ${newStats.tickCount} ticks, ${newStats.nodesProcessed} nodes`
946
+ `[holoscript] Complete \u2014 ${newStats.tickCount ?? "unknown"} ticks, ${newStats.nodesProcessed ?? "unknown"} nodes`
798
947
  );
799
948
  } catch (err) {
800
949
  console.error(`[holoscript] Error:`, err.message);
@@ -817,7 +966,7 @@ async function testScript(opts) {
817
966
  }
818
967
  const source = fs__namespace.readFileSync(filePath, "utf-8");
819
968
  console.log(`[holoscript test] Running tests in ${path__namespace.basename(filePath)}`);
820
- const parseResult = chunkN7IYRAFG_cjs.parse(source);
969
+ const parseResult = chunkFVNV4WHQ_cjs.parse(source);
821
970
  const ast = parseResult.ast;
822
971
  const { createHeadlessRuntime, HEADLESS_PROFILE } = await loadEngineRuntime();
823
972
  const profile = HEADLESS_PROFILE;
@@ -900,7 +1049,7 @@ function compileScript(opts) {
900
1049
  }
901
1050
  console.log(`[holoscript compile] @gotcha check passed (no critical violations)`);
902
1051
  }
903
- const compileResult = chunkN7IYRAFG_cjs.parse(source);
1052
+ const compileResult = chunkFVNV4WHQ_cjs.parse(source);
904
1053
  if (!compileResult.success) {
905
1054
  console.error(`[holoscript compile] Failed to parse: ${compileResult.errors?.[0]?.message}`);
906
1055
  process.exit(1);
@@ -979,7 +1128,7 @@ async function deployScript(opts) {
979
1128
  const fileName = path__namespace.basename(filePath);
980
1129
  const title = path__namespace.basename(filePath, path__namespace.extname(filePath));
981
1130
  console.log(`Parsing ${fileName}...`);
982
- const ast = chunkN7IYRAFG_cjs.parse(source);
1131
+ const ast = chunkFVNV4WHQ_cjs.parse(source);
983
1132
  if (ast.errors && ast.errors.length > 0) {
984
1133
  console.error("Parse errors:");
985
1134
  for (const err of ast.errors) {
@@ -1344,7 +1493,7 @@ async function daemonScript(opts) {
1344
1493
  const { createDaemonActions, getDaemonFileState } = await import('@holoscript/absorb-service/daemon');
1345
1494
  const repoRoot = findGitRoot(path__namespace.dirname(filePath));
1346
1495
  const source = fs__namespace.readFileSync(filePath, "utf-8");
1347
- const parseResult = chunkN7IYRAFG_cjs.parse(source);
1496
+ const parseResult = chunkFVNV4WHQ_cjs.parse(source);
1348
1497
  if (!parseResult.success || !parseResult.ast) {
1349
1498
  const errors = parseResult.errors?.map((e) => e.message).join(", ") || "unknown";
1350
1499
  console.error(`[daemon] Parse failed: ${errors}`);
@@ -1911,7 +2060,7 @@ async function holoMeshDaemonScript(opts) {
1911
2060
  }
1912
2061
  const rawSource = fs__namespace.readFileSync(filePath, "utf-8");
1913
2062
  const source = rawSource.replace(/^#(version|target|mode)\s+.*/gm, "");
1914
- const parseResult = chunkN7IYRAFG_cjs.parse(source);
2063
+ const parseResult = chunkFVNV4WHQ_cjs.parse(source);
1915
2064
  if (!parseResult.success || !parseResult.ast) {
1916
2065
  const errors = parseResult.errors?.map((e) => e.message).join(", ") || "unknown";
1917
2066
  console.error(`[holomesh-daemon] Parse failed: ${errors}`);
@@ -2234,7 +2383,7 @@ function showHelp() {
2234
2383
  HoloScript CLI \u2014 Headless Runner v5.0
2235
2384
 
2236
2385
  Usage:
2237
- holoscript run <file> [--target node|python|ros2] [--profile headless|minimal|full] [--ticks <n>] [--daemon] [--debug]
2386
+ holoscript run <file> [--target node|python|ros2] [--profile headless|minimal|full] [--ticks <n>] [--output <receipt.json>] [--json] [--daemon] [--debug]
2238
2387
  holoscript test <file> [--debug]
2239
2388
  holoscript compile <file> [--target node|python] [--output <path>] [--enforce-gotchas]
2240
2389
  holoscript deploy <file> [--share] [--publish] [--price <eth>] [--mint-nft] [--wallet-key <key>] [--author <name>] [--license <type>] [--server <url>]
@@ -3,12 +3,12 @@ import { checkLicenseCompatibility, ethToWei, calculateRevenueDistribution, form
3
3
  import { InteropContext } from '../chunk-TPZ3BN2D.js';
4
4
  import { AbsorbProcessor, ScriptTestRunner, HotReloadWatcher } from '../chunk-2M2DPHKB.js';
5
5
  import { generateProvenance } from '../chunk-4R6SBXDB.js';
6
- import { parse } from '../chunk-C73GVAYC.js';
7
- import '../chunk-Z7NUL73U.js';
6
+ import { parse } from '../chunk-F33KLYOS.js';
7
+ import '../chunk-MSZNGI5P.js';
8
8
  import '../chunk-UNMVGZVW.js';
9
- import '../chunk-FWKEY4LD.js';
10
- import '../chunk-2EGGAZT3.js';
11
- import '../chunk-YW3I2FQL.js';
9
+ import '../chunk-4AGNARX6.js';
10
+ import '../chunk-QS27OYBU.js';
11
+ import '../chunk-ANMME7XT.js';
12
12
  import '../chunk-7I74JWPW.js';
13
13
  import '../chunk-2I3XAGMF.js';
14
14
  import '../chunk-MD4IVS42.js';
@@ -20,7 +20,7 @@ import * as fs from 'fs';
20
20
  import * as path from 'path';
21
21
  import * as readline from 'readline';
22
22
  import { spawn } from 'child_process';
23
- import { randomUUID } from 'crypto';
23
+ import { randomUUID, createHash } from 'crypto';
24
24
 
25
25
  init_safeJsonParse();
26
26
  var engineRuntimeModule;
@@ -680,6 +680,65 @@ async function runDaemon(runtime, opts) {
680
680
  rl.once("close", () => resolve2());
681
681
  });
682
682
  }
683
+ var RUN_RECEIPT_SCHEMA = "holoscript.cli.run-receipt.v1";
684
+ var RUN_SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([".holo", ".hs", ".hsplus"]);
685
+ function sha256(value) {
686
+ return `sha256:${createHash("sha256").update(value).digest("hex")}`;
687
+ }
688
+ function summarizeRunParseErrors(errors) {
689
+ if (!Array.isArray(errors)) return [];
690
+ return errors.slice(0, 8).map((error) => {
691
+ const item = error && typeof error === "object" ? error : {};
692
+ const summary = {
693
+ message: typeof item.message === "string" ? item.message : "HoloScript parse failed"
694
+ };
695
+ if (typeof item.code === "string") summary.code = item.code;
696
+ if (Number.isInteger(item.line)) summary.line = item.line;
697
+ if (Number.isInteger(item.column)) summary.column = item.column;
698
+ return summary;
699
+ });
700
+ }
701
+ function integerStat(stats, key) {
702
+ const value = stats[key];
703
+ return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : null;
704
+ }
705
+ function normalizeRuntimeCounters(stats) {
706
+ return {
707
+ tickCount: integerStat(stats, "tickCount") ?? integerStat(stats, "updateCount"),
708
+ nodesProcessed: integerStat(stats, "nodesProcessed"),
709
+ instanceCount: integerStat(stats, "instanceCount"),
710
+ peakInstanceCount: integerStat(stats, "peakInstanceCount"),
711
+ eventCount: integerStat(stats, "eventCount")
712
+ };
713
+ }
714
+ function resolvePortableRunOutput(output) {
715
+ if (!output) return void 0;
716
+ const portable = output.replace(/\\/gu, "/");
717
+ const segments = portable.split("/");
718
+ if (path.isAbsolute(output) || /^[a-z]:/iu.test(portable) || portable.startsWith("//") || segments.some((segment) => segment === "..") || path.extname(portable).toLowerCase() !== ".json") {
719
+ throw new Error("Run receipt output must be a portable, relative .json path");
720
+ }
721
+ const resolved = path.resolve(process.cwd(), output);
722
+ const relative2 = path.relative(process.cwd(), resolved);
723
+ if (relative2.startsWith("..") || path.isAbsolute(relative2)) {
724
+ throw new Error("Run receipt output must stay within the working directory");
725
+ }
726
+ return resolved;
727
+ }
728
+ function emitRunReceipt(opts, outputPath, stableReceipt) {
729
+ const receipt = {
730
+ ...stableReceipt,
731
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
732
+ receiptHash: sha256(JSON.stringify(stableReceipt))
733
+ };
734
+ if (outputPath) {
735
+ fs.mkdirSync(path.dirname(outputPath), { recursive: true });
736
+ fs.writeFileSync(outputPath, `${JSON.stringify(receipt, null, 2)}
737
+ `, "utf-8");
738
+ }
739
+ if (opts.json) console.log(JSON.stringify(receipt));
740
+ return receipt;
741
+ }
683
742
  async function runScript(opts) {
684
743
  if (!opts.file) {
685
744
  console.error("Error: No input file specified");
@@ -692,8 +751,57 @@ async function runScript(opts) {
692
751
  }
693
752
  const source = fs.readFileSync(filePath, "utf-8");
694
753
  const ext = path.extname(filePath);
695
- console.log(`[holoscript] Running ${path.basename(filePath)} (target: ${opts.target})`);
754
+ const outputPath = resolvePortableRunOutput(opts.output);
755
+ if (opts.watch && (opts.json || outputPath)) {
756
+ throw new Error("Run receipts cannot be combined with --watch");
757
+ }
758
+ if (!opts.json) {
759
+ console.log(`[holoscript] Running ${path.basename(filePath)} (target: ${opts.target})`);
760
+ }
761
+ if (!RUN_SOURCE_EXTENSIONS.has(ext.toLowerCase())) {
762
+ const errors = [
763
+ {
764
+ code: "CLI001",
765
+ message: "HoloScript run accepts only .holo, .hs, or .hsplus source"
766
+ }
767
+ ];
768
+ emitRunReceipt(opts, outputPath, {
769
+ schema: RUN_RECEIPT_SCHEMA,
770
+ ok: false,
771
+ source: {
772
+ file: path.basename(filePath),
773
+ extension: ext.toLowerCase(),
774
+ digest: sha256(source),
775
+ parsePassed: false,
776
+ errors
777
+ },
778
+ execution: null
779
+ });
780
+ if (!opts.json) console.error(`[holoscript] Admission failed \u2014 ${errors[0].message}`);
781
+ process.exitCode = 2;
782
+ return;
783
+ }
696
784
  const parseResult = parse(source);
785
+ if (!parseResult.success || !parseResult.ast) {
786
+ const errors = summarizeRunParseErrors(parseResult.errors);
787
+ emitRunReceipt(opts, outputPath, {
788
+ schema: RUN_RECEIPT_SCHEMA,
789
+ ok: false,
790
+ source: {
791
+ file: path.basename(filePath),
792
+ extension: ext.toLowerCase(),
793
+ digest: sha256(source),
794
+ parsePassed: false,
795
+ errors
796
+ },
797
+ execution: null
798
+ });
799
+ if (!opts.json) {
800
+ console.error(`[holoscript] Parse failed \u2014 ${errors[0]?.message ?? "invalid HoloScript"}`);
801
+ }
802
+ process.exitCode = 2;
803
+ return;
804
+ }
697
805
  const ast = parseResult.ast;
698
806
  if (opts.debug) {
699
807
  console.log(`[holoscript] Parsed ${ast.body?.length || 0} top-level nodes`);
@@ -740,9 +848,44 @@ async function runScript(opts) {
740
848
  runTicks(runtime, opts.ticks);
741
849
  runtime.stop();
742
850
  const stats = runtime.getStats();
743
- console.log(
744
- `[holoscript] Complete \u2014 ${stats.tickCount} ticks, ${stats.nodesProcessed} nodes processed`
745
- );
851
+ const counters = normalizeRuntimeCounters(stats);
852
+ const sceneRuntime = runtime;
853
+ const scene = sceneRuntime.getSceneReceipt?.() ?? {
854
+ schema: "holoscript-headless-scene-receipt-unavailable-v1",
855
+ rootId: null,
856
+ objectCount: 0,
857
+ objects: []
858
+ };
859
+ const stableReceipt = {
860
+ schema: RUN_RECEIPT_SCHEMA,
861
+ ok: true,
862
+ source: {
863
+ file: path.basename(filePath),
864
+ extension: ext.toLowerCase(),
865
+ digest: sha256(source),
866
+ parsePassed: true,
867
+ topLevelNodes: ast.body?.length ?? 0
868
+ },
869
+ execution: {
870
+ target: opts.target,
871
+ profile: profile.name,
872
+ requestedTicks: opts.ticks,
873
+ counters,
874
+ scene,
875
+ policy: {
876
+ shellAllowed: opts.allowShell,
877
+ networkAllowed: opts.allowedHosts.length > 0,
878
+ allowedPathCount: opts.allowedPaths.length
879
+ }
880
+ }
881
+ };
882
+ emitRunReceipt(opts, outputPath, stableReceipt);
883
+ if (!opts.json) {
884
+ const objectCount = integerStat(scene, "objectCount") ?? 0;
885
+ console.log(
886
+ `[holoscript] Complete \u2014 ${counters.tickCount ?? "unknown"} ticks, ${objectCount} scene objects`
887
+ );
888
+ }
746
889
  if (opts.watch) {
747
890
  console.log(`[holoscript] Watching for changes... (Ctrl+C to stop)`);
748
891
  const watcher = new HotReloadWatcher({
@@ -758,6 +901,10 @@ async function runScript(opts) {
758
901
  try {
759
902
  const newSource = fs.readFileSync(filePath, "utf-8");
760
903
  const newParseResult = parse(newSource);
904
+ if (!newParseResult.success || !newParseResult.ast) {
905
+ const parseError = summarizeRunParseErrors(newParseResult.errors)[0];
906
+ throw new Error(parseError?.message ?? "invalid HoloScript");
907
+ }
761
908
  const newAst = newParseResult.ast;
762
909
  const newRuntime = createHeadlessRuntime(newAst, {
763
910
  profile: opts.profile === "headless" ? HEADLESS_PROFILE : getProfile(opts.profile),
@@ -768,9 +915,11 @@ async function runScript(opts) {
768
915
  newRuntime.start();
769
916
  runTicks(newRuntime, opts.ticks);
770
917
  newRuntime.stop();
771
- const newStats = newRuntime.getStats();
918
+ const newStats = normalizeRuntimeCounters(
919
+ newRuntime.getStats()
920
+ );
772
921
  console.log(
773
- `[holoscript] Complete \u2014 ${newStats.tickCount} ticks, ${newStats.nodesProcessed} nodes`
922
+ `[holoscript] Complete \u2014 ${newStats.tickCount ?? "unknown"} ticks, ${newStats.nodesProcessed ?? "unknown"} nodes`
774
923
  );
775
924
  } catch (err) {
776
925
  console.error(`[holoscript] Error:`, err.message);
@@ -2210,7 +2359,7 @@ function showHelp() {
2210
2359
  HoloScript CLI \u2014 Headless Runner v5.0
2211
2360
 
2212
2361
  Usage:
2213
- holoscript run <file> [--target node|python|ros2] [--profile headless|minimal|full] [--ticks <n>] [--daemon] [--debug]
2362
+ holoscript run <file> [--target node|python|ros2] [--profile headless|minimal|full] [--ticks <n>] [--output <receipt.json>] [--json] [--daemon] [--debug]
2214
2363
  holoscript test <file> [--debug]
2215
2364
  holoscript compile <file> [--target node|python] [--output <path>] [--enforce-gotchas]
2216
2365
  holoscript deploy <file> [--share] [--publish] [--price <eth>] [--mint-nft] [--wallet-key <key>] [--author <name>] [--license <type>] [--server <url>]
@@ -2,30 +2,30 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkYMI3ED3B_cjs = require('../chunk-YMI3ED3B.cjs');
6
- require('../chunk-SE2Y5BSL.cjs');
5
+ var chunkCRUIGXF7_cjs = require('../chunk-CRUIGXF7.cjs');
6
+ require('../chunk-CMEINO5I.cjs');
7
7
  require('../chunk-7FYSSI3C.cjs');
8
8
  require('../chunk-CI33NINL.cjs');
9
9
  require('../chunk-Q47JEE2C.cjs');
10
10
  require('../chunk-ZHPMP447.cjs');
11
11
 
12
- chunkYMI3ED3B_cjs.init_AgentInferenceExportTarget();
12
+ chunkCRUIGXF7_cjs.init_AgentInferenceExportTarget();
13
13
 
14
14
  Object.defineProperty(exports, "AgentInferenceCompiler", {
15
15
  enumerable: true,
16
- get: function () { return chunkYMI3ED3B_cjs.AgentInferenceCompiler; }
16
+ get: function () { return chunkCRUIGXF7_cjs.AgentInferenceCompiler; }
17
17
  });
18
18
  Object.defineProperty(exports, "createAgentInferenceCompiler", {
19
19
  enumerable: true,
20
- get: function () { return chunkYMI3ED3B_cjs.createAgentInferenceCompiler; }
20
+ get: function () { return chunkCRUIGXF7_cjs.createAgentInferenceCompiler; }
21
21
  });
22
22
  Object.defineProperty(exports, "createPythonAgentInferenceCompiler", {
23
23
  enumerable: true,
24
- get: function () { return chunkYMI3ED3B_cjs.createPythonAgentInferenceCompiler; }
24
+ get: function () { return chunkCRUIGXF7_cjs.createPythonAgentInferenceCompiler; }
25
25
  });
26
26
  Object.defineProperty(exports, "default", {
27
27
  enumerable: true,
28
- get: function () { return chunkYMI3ED3B_cjs.AgentInferenceExportTarget_default; }
28
+ get: function () { return chunkCRUIGXF7_cjs.AgentInferenceExportTarget_default; }
29
29
  });
30
30
  //# sourceMappingURL=agent-inference.cjs.map
31
31
  //# sourceMappingURL=agent-inference.cjs.map