@holoscript/core 8.0.14 → 8.0.15

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 (183) 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-ORBVCOTC.js → chunk-5LCJDX5A.js} +3 -3
  23. package/dist/{chunk-IK6Z2HNC.js → chunk-6OQHLNTT.js} +2 -2
  24. package/dist/{chunk-EI3J6LTW.cjs → chunk-6RDHWSZM.cjs} +217 -217
  25. package/dist/{chunk-73EDVY5D.js → chunk-7AY66PZP.js} +3 -3
  26. package/dist/{chunk-6FCNMTL5.js → chunk-7HDRN5BW.js} +4 -4
  27. package/dist/{chunk-TMNAKNV2.cjs → chunk-7YKNV2BE.cjs} +5 -5
  28. package/dist/{chunk-R5VKLUMR.js → chunk-AAUQTR7I.js} +4 -4
  29. package/dist/{chunk-HCONR4J6.cjs → chunk-AN3ZH7M7.cjs} +38 -38
  30. package/dist/{chunk-YW3I2FQL.js → chunk-ANMME7XT.js} +4 -2
  31. package/dist/{chunk-47XZ62KM.js → chunk-ATRAK4RC.js} +5 -5
  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-N7MIIDLI.cjs → chunk-AUU4ACJP.cjs} +8 -8
  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-2E6PP5UE.cjs → chunk-E2SNPMBO.cjs} +11 -11
  39. package/dist/{chunk-GI5YYZH6.js → chunk-E4YS5SIZ.js} +90 -25
  40. package/dist/{chunk-62OYZT6Q.js → chunk-EKNWUSGW.js} +3 -3
  41. package/dist/{chunk-RVN7OPCP.js → chunk-ETIJOUIO.js} +4 -4
  42. package/dist/{chunk-C73GVAYC.js → chunk-F33KLYOS.js} +5 -5
  43. package/dist/{chunk-4CRMVEON.cjs → chunk-F47FEV4X.cjs} +40 -40
  44. package/dist/{chunk-FGXJPJ3W.cjs → chunk-FCGTI7FO.cjs} +4 -4
  45. package/dist/{chunk-OSKGCXAQ.cjs → chunk-FGTXAVKG.cjs} +5 -5
  46. package/dist/{chunk-XZC75AJ4.cjs → chunk-FPGYWNNA.cjs} +5 -5
  47. package/dist/{chunk-5B2AJKA5.cjs → chunk-FQ4MYZYU.cjs} +20 -20
  48. package/dist/{chunk-KOGPVAP6.js → chunk-FT4FGTR6.js} +3 -3
  49. package/dist/{chunk-N7IYRAFG.cjs → chunk-FVNV4WHQ.cjs} +14 -14
  50. package/dist/{chunk-SJIRCTIS.cjs → chunk-HSGJFCVJ.cjs} +2 -2
  51. package/dist/{chunk-TKDDIE3T.cjs → chunk-ILO2KMER.cjs} +4 -4
  52. package/dist/{chunk-GGH3ZYDB.cjs → chunk-IPBSNGAN.cjs} +92 -27
  53. package/dist/{chunk-JQCXLKAU.js → chunk-IX2U3RQT.js} +3 -3
  54. package/dist/{chunk-P65OIMJT.cjs → chunk-IYK6LMQ7.cjs} +7 -7
  55. package/dist/{chunk-NWKARJM2.js → chunk-J3VVM6GV.js} +4 -4
  56. package/dist/{chunk-FOM36K5I.cjs → chunk-J74S4ZMF.cjs} +18 -18
  57. package/dist/{chunk-36NPLOI4.cjs → chunk-JERWCCEJ.cjs} +4 -2
  58. package/dist/{chunk-VXHB6ZHY.js → chunk-JTDDLCSP.js} +4 -4
  59. package/dist/{chunk-GYJLP4BO.cjs → chunk-K53L47NH.cjs} +30 -30
  60. package/dist/{chunk-FHR2AVMA.cjs → chunk-LJTM5ONX.cjs} +23 -23
  61. package/dist/{chunk-JCVSCKUH.js → chunk-LJVVOVA6.js} +4 -4
  62. package/dist/{chunk-LQNL3IYV.cjs → chunk-LNJKBQ2B.cjs} +38 -38
  63. package/dist/{chunk-2GKF7JQ6.js → chunk-M2GDE3NV.js} +3 -3
  64. package/dist/{chunk-Z7NUL73U.js → chunk-MSZNGI5P.js} +3 -3
  65. package/dist/{chunk-B6JHTTMR.cjs → chunk-N2BOTBPG.cjs} +15 -15
  66. package/dist/{chunk-L4DBUX3N.cjs → chunk-NFALJJCH.cjs} +12 -12
  67. package/dist/{chunk-YBM34FUJ.cjs → chunk-NRZRBK25.cjs} +6 -6
  68. package/dist/{chunk-SNMQUWIO.cjs → chunk-NTSLNIY7.cjs} +10 -10
  69. package/dist/{chunk-645EWDZW.cjs → chunk-NZJOAWJM.cjs} +4 -4
  70. package/dist/{chunk-LGRKBTPM.js → chunk-OG7RKWWX.js} +3 -3
  71. package/dist/{chunk-OOP4S3GU.cjs → chunk-OQVHCYY4.cjs} +5 -5
  72. package/dist/{chunk-5T6BWIB7.js → chunk-PFZ5WLIP.js} +4 -4
  73. package/dist/{chunk-CESMPUEZ.cjs → chunk-PHLNABJD.cjs} +159 -145
  74. package/dist/{chunk-CHIZSMWD.js → chunk-PLK3DLTF.js} +3 -3
  75. package/dist/{chunk-4NEPHK2K.js → chunk-PMACVMHL.js} +3 -3
  76. package/dist/{chunk-EYHPTJ3F.js → chunk-PV2OXNP5.js} +40 -26
  77. package/dist/{chunk-KLM6QD6D.cjs → chunk-Q6VW7MGX.cjs} +14 -14
  78. package/dist/{chunk-YDSNDCV3.js → chunk-QC3CAVFN.js} +186 -69
  79. package/dist/{chunk-REN3LHO6.cjs → chunk-QKLEDRHN.cjs} +19 -19
  80. package/dist/{chunk-2EGGAZT3.js → chunk-QS27OYBU.js} +3 -3
  81. package/dist/{chunk-4376VHNJ.js → chunk-RUB7WL6C.js} +3 -3
  82. package/dist/{chunk-TZQKJOPC.js → chunk-TW2AH2ZS.js} +3 -3
  83. package/dist/{chunk-Q4J2K7FI.js → chunk-TZM6DKSJ.js} +6 -6
  84. package/dist/{chunk-ESSEF6U2.js → chunk-U227RWXB.js} +3 -3
  85. package/dist/{chunk-ERYKKPHW.cjs → chunk-U6CQOM5Q.cjs} +13 -13
  86. package/dist/{chunk-VMCR5QVI.js → chunk-ULT2QAV5.js} +4 -4
  87. package/dist/{chunk-VZI7S7P6.cjs → chunk-VSO6HPDZ.cjs} +7 -7
  88. package/dist/{chunk-QLPRI3QW.js → chunk-WQJMSSJT.js} +4 -4
  89. package/dist/{chunk-GILYQ5VH.cjs → chunk-WXSDBWGM.cjs} +4 -4
  90. package/dist/{chunk-42Z3SVHQ.js → chunk-X5PMMK7H.js} +3 -3
  91. package/dist/{chunk-ML4V5PVU.cjs → chunk-X5ZLSPU2.cjs} +74 -32
  92. package/dist/{chunk-PSWCJQS4.js → chunk-X727CQ7X.js} +5 -5
  93. package/dist/{chunk-YM7UUYR5.cjs → chunk-XHZYS4QO.cjs} +5 -5
  94. package/dist/{chunk-PZ46WRHX.cjs → chunk-XRQCTTDC.cjs} +8 -8
  95. package/dist/{chunk-IXFNA5TT.js → chunk-YBIHSN55.js} +4 -4
  96. package/dist/{chunk-BLCWQ225.js → chunk-Z574GVI3.js} +4 -4
  97. package/dist/{chunk-ZVQMKUGJ.js → chunk-Z5V3KA7L.js} +2 -2
  98. package/dist/{chunk-7ZKQ32XK.js → chunk-ZGDEOXGU.js} +4 -4
  99. package/dist/{chunk-VTFLKSJL.cjs → chunk-ZHW6TDZ6.cjs} +14 -14
  100. package/dist/{chunk-KYJD2UMV.js → chunk-ZPHCTPR6.js} +4 -4
  101. package/dist/{chunk-VA7THINF.cjs → chunk-ZXXC2GXB.cjs} +38 -38
  102. package/dist/cli/holoscript-runner.cjs +168 -19
  103. package/dist/cli/holoscript-runner.js +162 -13
  104. package/dist/compiler/agent-inference.cjs +7 -7
  105. package/dist/compiler/agent-inference.js +3 -3
  106. package/dist/compiler/android-xr.cjs +6 -6
  107. package/dist/compiler/android-xr.js +4 -4
  108. package/dist/compiler/android.cjs +5 -5
  109. package/dist/compiler/android.js +3 -3
  110. package/dist/compiler/context.cjs +5 -5
  111. package/dist/compiler/context.js +2 -2
  112. package/dist/compiler/daimon-seed.cjs +8 -8
  113. package/dist/compiler/daimon-seed.js +3 -3
  114. package/dist/compiler/domain-block-utils.cjs +164 -164
  115. package/dist/compiler/domain-block-utils.js +3 -3
  116. package/dist/compiler/dtdl.cjs +6 -6
  117. package/dist/compiler/dtdl.js +3 -3
  118. package/dist/compiler/gltf-pipeline.cjs +8 -8
  119. package/dist/compiler/gltf-pipeline.js +1 -1
  120. package/dist/compiler/godot.cjs +5 -5
  121. package/dist/compiler/godot.js +4 -4
  122. package/dist/compiler/incremental.cjs +7 -7
  123. package/dist/compiler/incremental.js +2 -2
  124. package/dist/compiler/index.cjs +1603 -204
  125. package/dist/compiler/index.d.ts +8 -0
  126. package/dist/compiler/index.js +1431 -55
  127. package/dist/compiler/ios.cjs +5 -5
  128. package/dist/compiler/ios.js +3 -3
  129. package/dist/compiler/llm-provider-capabilities.cjs +5 -5
  130. package/dist/compiler/llm-provider-capabilities.js +2 -2
  131. package/dist/compiler/openxr.cjs +5 -5
  132. package/dist/compiler/openxr.js +4 -4
  133. package/dist/compiler/sdf.cjs +6 -6
  134. package/dist/compiler/sdf.js +4 -4
  135. package/dist/compiler/state.cjs +5 -5
  136. package/dist/compiler/state.js +3 -3
  137. package/dist/compiler/trait-composition.cjs +6 -6
  138. package/dist/compiler/trait-composition.js +2 -2
  139. package/dist/compiler/unity.cjs +5 -5
  140. package/dist/compiler/unity.js +4 -4
  141. package/dist/compiler/unreal.cjs +6 -6
  142. package/dist/compiler/unreal.js +4 -4
  143. package/dist/compiler/urdf.cjs +13 -13
  144. package/dist/compiler/urdf.js +4 -4
  145. package/dist/compiler/usd-physics.cjs +6 -6
  146. package/dist/compiler/usd-physics.js +3 -3
  147. package/dist/compiler/visionos.cjs +5 -5
  148. package/dist/compiler/visionos.js +4 -4
  149. package/dist/compiler/vrchat.cjs +6 -6
  150. package/dist/compiler/vrchat.js +4 -4
  151. package/dist/compiler/wasm.cjs +9 -9
  152. package/dist/compiler/wasm.js +4 -4
  153. package/dist/compiler/webgpu.cjs +5 -5
  154. package/dist/compiler/webgpu.js +4 -4
  155. package/dist/constants.cjs +99 -99
  156. package/dist/constants.js +3 -3
  157. package/dist/debugger.cjs +5 -5
  158. package/dist/debugger.js +3 -3
  159. package/dist/{dist-GRMOP2UL.cjs → dist-YGATNURH.cjs} +705 -9
  160. package/dist/{dist-ZBUKU2JG.js → dist-ZEZXRCBG.js} +701 -10
  161. package/dist/entries/scripting.cjs +8 -8
  162. package/dist/entries/scripting.js +4 -4
  163. package/dist/evolution/index.cjs +20 -20
  164. package/dist/evolution/index.js +8 -8
  165. package/dist/index.cjs +871 -809
  166. package/dist/index.d.ts +8 -0
  167. package/dist/index.js +132 -70
  168. package/dist/parser/HoloCompositionTypes.d.ts +1 -1
  169. package/dist/parser.cjs +21 -21
  170. package/dist/parser.js +7 -7
  171. package/dist/reconstruction/index.cjs +63 -63
  172. package/dist/reconstruction/index.js +7 -7
  173. package/dist/runtime.cjs +9 -9
  174. package/dist/runtime.js +3 -3
  175. package/dist/traits/botanical-lotus.d.ts +61 -0
  176. package/dist/traits/index.cjs +664 -671
  177. package/dist/traits/index.d.ts +65 -0
  178. package/dist/traits/index.js +14 -21
  179. package/dist/types/HoloScriptPlus.d.ts +1 -1
  180. package/package.json +66 -64
  181. package/dist/HoloCompositionParser-ZVRYVEA5.cjs +0 -45
  182. package/dist/HoloScriptPlusParser-WTPRPRPR.cjs +0 -30
  183. package/dist/HoloScriptPlusParser-ZP53ECSL.js +0 -13
@@ -1,4 +1,4 @@
1
- import { init_CompilerBase, CompilerBase } from './chunk-YDSNDCV3.js';
1
+ import { init_CompilerBase, CompilerBase } from './chunk-QC3CAVFN.js';
2
2
  import { __export, __esm } from './chunk-W4GABFCR.js';
3
3
  import { ANSCapabilityPath } from '@holoscript/core-types/ans';
4
4
 
@@ -417,5 +417,5 @@ var init_DTDLCompiler = __esm({
417
417
  });
418
418
 
419
419
  export { DTDLCompiler, DTDLCompiler_default, DTDLCompiler_exports, DTDL_TRAIT_COMPONENTS, init_DTDLCompiler };
420
- //# sourceMappingURL=chunk-CHIZSMWD.js.map
421
- //# sourceMappingURL=chunk-CHIZSMWD.js.map
420
+ //# sourceMappingURL=chunk-PLK3DLTF.js.map
421
+ //# sourceMappingURL=chunk-PLK3DLTF.js.map
@@ -1,5 +1,5 @@
1
1
  import { init_jsonLogic, matchesRule, evaluateJsonLogic } from './chunk-JBQXZIWB.js';
2
- import { init_CompilerBase, CompilerBase } from './chunk-YDSNDCV3.js';
2
+ import { init_CompilerBase, CompilerBase } from './chunk-QC3CAVFN.js';
3
3
  import { __export, __esm } from './chunk-W4GABFCR.js';
4
4
  import { createHash } from 'crypto';
5
5
  import { ANSCapabilityPath } from '@holoscript/core-types/ans';
@@ -277,5 +277,5 @@ var init_DaimonSeedCompiler = __esm({
277
277
  });
278
278
 
279
279
  export { DaimonSeedCompiler, DaimonSeedCompiler_default, DaimonSeedCompiler_exports, computeExportFidelity, createDaimonSeedCompiler, init_DaimonSeedCompiler, runHysteresisExp2 };
280
- //# sourceMappingURL=chunk-4NEPHK2K.js.map
281
- //# sourceMappingURL=chunk-4NEPHK2K.js.map
280
+ //# sourceMappingURL=chunk-PMACVMHL.js.map
281
+ //# sourceMappingURL=chunk-PMACVMHL.js.map
@@ -1,26 +1,26 @@
1
1
  import { MATERIAL_PRESETS } from './chunk-3F7ZZWIN.js';
2
- import { init_DaimonSeedCompiler, DaimonSeedCompiler_exports } from './chunk-4NEPHK2K.js';
3
- import { init_AgentInferenceExportTarget, AgentInferenceExportTarget_exports } from './chunk-KOGPVAP6.js';
4
- import { init_SDFCompiler, SDFCompiler_exports } from './chunk-IXFNA5TT.js';
5
- import { init_StateCompiler, StateCompiler_exports } from './chunk-62OYZT6Q.js';
6
- import { init_AndroidCompiler, AndroidCompiler_exports } from './chunk-3KHRZTNW.js';
7
- import { init_AndroidXRCompiler, AndroidXRCompiler_exports } from './chunk-JCVSCKUH.js';
8
- import { init_IOSCompiler, IOSCompiler_exports } from './chunk-73EDVY5D.js';
9
- import { init_VisionOSCompiler, VisionOSCompiler_exports } from './chunk-VMCR5QVI.js';
10
- import { init_WASMCompiler, WASMCompiler_exports } from './chunk-5T6BWIB7.js';
11
- import { init_geometry_registry, init_geometry_purpose, init_skybox_registry, init_WebGPUCompiler, WebGPUCompiler_exports, resolveGeometryRole, resolveGeometry, resolveSkyboxColor } from './chunk-QLPRI3QW.js';
12
- import { init_DTDLCompiler, DTDLCompiler_exports } from './chunk-CHIZSMWD.js';
13
- import { init_URDFCompiler, URDFCompiler_exports } from './chunk-Q4J2K7FI.js';
14
- import { init_OpenXRCompiler, OpenXRCompiler_exports } from './chunk-R5VKLUMR.js';
15
- import { init_VRChatCompiler, VRChatCompiler_exports } from './chunk-6FCNMTL5.js';
16
- import { init_UnityCompiler, UnityCompiler_exports } from './chunk-KYJD2UMV.js';
17
- import { init_UnrealCompiler, UnrealCompiler_exports } from './chunk-M7XR3F53.js';
2
+ import { init_DaimonSeedCompiler, DaimonSeedCompiler_exports } from './chunk-PMACVMHL.js';
3
+ import { init_AgentInferenceExportTarget, AgentInferenceExportTarget_exports } from './chunk-FT4FGTR6.js';
4
+ import { init_SDFCompiler, SDFCompiler_exports } from './chunk-YBIHSN55.js';
5
+ import { init_StateCompiler, StateCompiler_exports } from './chunk-EKNWUSGW.js';
6
+ import { init_AndroidCompiler, AndroidCompiler_exports } from './chunk-3AUYBQ5I.js';
7
+ import { init_AndroidXRCompiler, AndroidXRCompiler_exports } from './chunk-LJVVOVA6.js';
8
+ import { init_IOSCompiler, IOSCompiler_exports } from './chunk-7AY66PZP.js';
9
+ import { init_VisionOSCompiler, VisionOSCompiler_exports } from './chunk-ULT2QAV5.js';
10
+ import { init_WASMCompiler, WASMCompiler_exports } from './chunk-PFZ5WLIP.js';
11
+ import { init_geometry_registry, init_geometry_purpose, init_skybox_registry, init_WebGPUCompiler, WebGPUCompiler_exports, resolveGeometryRole, resolveGeometry, resolveSkyboxColor } from './chunk-WQJMSSJT.js';
12
+ import { init_DTDLCompiler, DTDLCompiler_exports } from './chunk-PLK3DLTF.js';
13
+ import { init_URDFCompiler, URDFCompiler_exports } from './chunk-TZM6DKSJ.js';
14
+ import { init_OpenXRCompiler, OpenXRCompiler_exports } from './chunk-AAUQTR7I.js';
15
+ import { init_VRChatCompiler, VRChatCompiler_exports } from './chunk-7HDRN5BW.js';
16
+ import { init_UnityCompiler, UnityCompiler_exports } from './chunk-ZPHCTPR6.js';
17
+ import { init_UnrealCompiler, UnrealCompiler_exports } from './chunk-2UP2J3OK.js';
18
18
  import { init_PlatformConditional, platformCategory, PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES } from './chunk-DJNH4HFW.js';
19
- import { init_GodotCompiler, GodotCompiler_exports } from './chunk-RVN7OPCP.js';
20
- import { init_DomainBlockCompilerMixin, compileDomainBlocks, inputToUSDA, compileInputBlock, navigationToUSDA, compileNavigationBlock, renderingToUSDA, compileRenderingBlock, proceduralToUSDA, compileProceduralBlock, web3ToUSDA, compileWeb3Block, architectureToUSDA, compileArchitectureBlock, musicToUSDA, compileMusicBlock, educationToUSDA, compileEducationBlock, datavizToUSDA, compileDataVizBlock, iotToUSDA, compileIoTBlock, compileRoboticsBlock, roboticsToUSDA, compileHealthcareBlock, healthcareToUSDA, compilePaymentBlock, paymentToUSDA, compileNarrativeBlock, narrativeToUSDA, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, compileMaterialBlock, materialToUSD } from './chunk-TZQKJOPC.js';
21
- import { init_CompilerBase, CompilerBase, createTestCompilerToken, init_ANSNamespace, ANSCapabilityPath as ANSCapabilityPath$1 } from './chunk-YDSNDCV3.js';
19
+ import { init_GodotCompiler, GodotCompiler_exports } from './chunk-ETIJOUIO.js';
20
+ import { init_DomainBlockCompilerMixin, compileDomainBlocks, inputToUSDA, compileInputBlock, navigationToUSDA, compileNavigationBlock, renderingToUSDA, compileRenderingBlock, proceduralToUSDA, compileProceduralBlock, web3ToUSDA, compileWeb3Block, architectureToUSDA, compileArchitectureBlock, musicToUSDA, compileMusicBlock, educationToUSDA, compileEducationBlock, datavizToUSDA, compileDataVizBlock, iotToUSDA, compileIoTBlock, compileRoboticsBlock, roboticsToUSDA, compileHealthcareBlock, healthcareToUSDA, compilePaymentBlock, paymentToUSDA, compileNarrativeBlock, narrativeToUSDA, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, compileMaterialBlock, materialToUSD } from './chunk-TW2AH2ZS.js';
21
+ import { init_CompilerBase, CompilerBase, createTestCompilerToken, init_ANSNamespace, ANSCapabilityPath as ANSCapabilityPath$1 } from './chunk-QC3CAVFN.js';
22
22
  import { parsePipeline } from './chunk-SYTRBGDS.js';
23
- import { init_constants, CONNECTOR_PACKAGES, CONNECTOR_ENV_REQUIREMENTS, KNOWN_CONNECTORS } from './chunk-2EGGAZT3.js';
23
+ import { init_constants, CONNECTOR_PACKAGES, CONNECTOR_ENV_REQUIREMENTS, KNOWN_CONNECTORS } from './chunk-QS27OYBU.js';
24
24
  import { init_effects, init_EffectChecker, EFFECTS_BY_CATEGORY, EffectChecker, EffectRow, createEffectChecker, dangerLevel } from './chunk-ZVFHPMC5.js';
25
25
  import { __export, __esm, __toCommonJS } from './chunk-W4GABFCR.js';
26
26
  import { createHash } from 'crypto';
@@ -1487,8 +1487,15 @@ var init_LlamaServerCompiler = __esm({
1487
1487
  if (grammarFile) files.unshift(grammarFile);
1488
1488
  if (cfg.traceCapture) {
1489
1489
  files.push(
1490
- { path: "holo-inference-proxy.mjs", content: this.genInferenceProxyScript(cfg), executable: true },
1491
- { path: `holo-inference-proxy-${this.slug(cfg.registerAs)}.service`, content: this.genInferenceProxyUnit(cfg) }
1490
+ {
1491
+ path: "holo-inference-proxy.mjs",
1492
+ content: this.genInferenceProxyScript(cfg),
1493
+ executable: true
1494
+ },
1495
+ {
1496
+ path: `holo-inference-proxy-${this.slug(cfg.registerAs)}.service`,
1497
+ content: this.genInferenceProxyUnit(cfg)
1498
+ }
1492
1499
  );
1493
1500
  }
1494
1501
  const warnings = foundTrait ? [] : ["No @llama_serve trait found; used compiler options/defaults."];
@@ -1502,6 +1509,11 @@ var init_LlamaServerCompiler = __esm({
1502
1509
  `trace_capture requires trace_upstream_port (${cfg.traceUpstreamPort}) to differ from the public port (${cfg.port}).`
1503
1510
  );
1504
1511
  }
1512
+ if (cfg.cacheRamMiB !== void 0 && (!Number.isFinite(cfg.cacheRamMiB) || !Number.isInteger(cfg.cacheRamMiB) || cfg.cacheRamMiB < 0)) {
1513
+ throw new Error(
1514
+ `cache_ram must be a non-negative integer MiB value; received ${cfg.cacheRamMiB}.`
1515
+ );
1516
+ }
1505
1517
  if (cfg.grammarPath && cfg.grammar) {
1506
1518
  warnings.push(
1507
1519
  "Both a grammar file and an inline grammar were supplied; using --grammar-file and ignoring the inline grammar."
@@ -1592,6 +1604,7 @@ var init_LlamaServerCompiler = __esm({
1592
1604
  imageMinTokens: this.opts.imageMinTokens ?? this.numberValue(raw, DEFAULTS.imageMinTokens, "imageMinTokens", "image_min_tokens"),
1593
1605
  imageMaxTokens: this.opts.imageMaxTokens ?? this.numberValue(raw, DEFAULTS.imageMaxTokens, "imageMaxTokens", "image_max_tokens"),
1594
1606
  parallel: this.opts.parallel ?? this.numberValue(raw, DEFAULTS.parallel, "parallel"),
1607
+ cacheRamMiB: this.opts.cacheRamMiB ?? this.optionalNumberValue(raw, "cacheRamMiB", "cache_ram", "cache-ram"),
1595
1608
  metrics: this.opts.metrics ?? this.booleanValue(raw, DEFAULTS.metrics, "metrics"),
1596
1609
  traceCapture: this.booleanValue(raw, false, "traceCapture", "trace_capture"),
1597
1610
  traceUpstreamPort: this.numberValue(
@@ -1683,6 +1696,7 @@ var init_LlamaServerCompiler = __esm({
1683
1696
  );
1684
1697
  }
1685
1698
  argv.push("--parallel", String(cfg.parallel));
1699
+ if (cfg.cacheRamMiB !== void 0) argv.push("--cache-ram", String(cfg.cacheRamMiB));
1686
1700
  if (cfg.metrics) argv.push("--metrics");
1687
1701
  if (cfg.grammarPath) argv.push("--grammar-file", cfg.grammarPath);
1688
1702
  else if (cfg.grammar) argv.push("--grammar", cfg.grammar);
@@ -16120,8 +16134,8 @@ var CompilerBridge = class {
16120
16134
  if (this.initialized) return;
16121
16135
  try {
16122
16136
  const [parserModule, compilerModule] = await Promise.all([
16123
- import('./HoloScriptPlusParser-ZP53ECSL.js'),
16124
- import('./SceneIRCompiler-VX75RB6H.js')
16137
+ import('./HoloScriptPlusParser-YCV6L7GI.js'),
16138
+ import('./SceneIRCompiler-BJQMKLWL.js')
16125
16139
  ]);
16126
16140
  this.modules = {
16127
16141
  Parser: parserModule.HoloScriptPlusParser,
@@ -16744,5 +16758,5 @@ function compilePipelineSource(source, options = {}) {
16744
16758
  }
16745
16759
 
16746
16760
  export { A2AAgentCardCompiler, BUILTIN_RESOURCES, CAPABILITY_HIERARCHY, CATEGORY_DEFAULT_EMBODIMENT, CodeEditorCompiler, CompileTimeAuthorityEffectError, CompilerBridge, ComputePhysicsCompiler, CpuPathTracer, CrossRealityTraitRegistry, DEFAULT_MATERIAL_KEYWORDS, DEFAULT_OBJECT_KEYWORDS, DEFAULT_PRIMITIVE_SHAPES, DesktopGPUCompiler, DialectRegistry, EFFECT_TO_CAPABILITY, EdgeCompiler, EmbodiedDatasetCompiler, FMUCompiler, GaussianSplattingCompiler, GaussianTrainCompiler, GaussianTrainConfigError, HANDOFF_PATH_RULES, HOLOMAP_CAPTURE_DEFAULT_PROVENANCE, HOLOSCRIPT_GRAMMAR_PRESETS, HoloMCPCompiler, LinearTypeChecker, LlamaServerCompiler, MJCFCompiler, MJXCompiler, MVC_BUDGET_CONSTRAINTS, MediaPipelineCompiler, NIRCompiler, NextJSAPICompiler, NodeServiceCompiler, OmnigentAgentYamlCompiler, PCGGraphCompiler, PCG_GRAPH_SCHEMA, PLATFORM_BUDGETS, PLATFORM_EMBODIMENT_OVERRIDES, POINT_PROVENANCE_CLASS_BY_CODE, POINT_PROVENANCE_CODE, PROVENANCE_RECEIPT_VERSION, PathTracerCompiler, PhysicsColliderCompiler, REMOTE_TRAIN_EXECUTOR, REQUIRED_SANDBOX_AUTHORITY_EFFECT, ResourceBudgetAnalyzer, SANDBOX_AUTHORITY_TRAIT, SCMCompiler, SDKCompiler, SHARED_SORT_SHADER_PATH, SOVEREIGN_TRAIN_EXECUTOR, SVGCompiler, SpatialAudioCompiler, SpatialPartitionPass, TRAIT_RESOURCE_COSTS, TRAIT_RESOURCE_MAP, TRUST_LEVEL_CAPABILITIES, ThreeDTilesCompiler, USDZPipeline, absorbFMU, assertAuthorityEffects, bestCategoryForTraits, buildProvenanceReceipt, buildSafetyReport, checkAuthorityEffects, checkCapabilities, collectAuthorityEffectNodes, compileAllToNextJSAPI, compilePCGGraphFromBlocks, compilePipelineSource, compilePipelineSourceToNode, compilePipelineSourceToPython, compilePipelineToNode, compilePipelineToPython, compileTo3DTiles, compileToFMU, compileToNextJSAPI, compileToPCGGraph, createCrossRealityTraitRegistry, createGaussianSplattingCompiler, createGaussianTrainCompiler, createOmnigentAgentYamlCompiler, createThreeDTilesCompiler, densifyByInterpolation, deriveRequirements, detectMultiUserSharedSort, ensureDialectsBooted, expandCapabilities, formatReport, generateCertificate, generateHoloScriptGbnf, getCompilerBridge, getCrossRealityTraitRegistry, init_A2AAgentCardCompiler, init_DialectRegistry, init_EmbodiedDatasetCompiler, init_HoloMCPCompiler, init_LlamaServerCompiler, init_MJCFCompiler, init_MJXCompiler, init_NIRCompiler, init_NextJSAPICompiler, init_NodeServiceCompiler, init_OmnigentAgentYamlCompiler, init_PCGGraphCompiler, init_SDKCompiler, init_holoscript_gbnf, init_registerBuiltinDialects, isHoloScriptGrammarPreset, pcgGraphToUnrealXml, provenanceClassToCode, provenanceCodeToClass, provenanceHistogram, quickSafetyCheck, registerBuiltinDialects, resetCrossRealityTraitRegistry, runSafetyPass, selectModality, selectModalityForAll, spatialPartition, streamWorldTiles, uniformProvenance };
16747
- //# sourceMappingURL=chunk-EYHPTJ3F.js.map
16748
- //# sourceMappingURL=chunk-EYHPTJ3F.js.map
16761
+ //# sourceMappingURL=chunk-PV2OXNP5.js.map
16762
+ //# sourceMappingURL=chunk-PV2OXNP5.js.map
@@ -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
 
@@ -14,9 +14,9 @@ chunkZHPMP447_cjs.__export(SDFCompiler_exports, {
14
14
  exports.SDFCompiler = void 0; exports.SDFCompiler_default = void 0;
15
15
  var init_SDFCompiler = chunkZHPMP447_cjs.__esm({
16
16
  "src/compiler/SDFCompiler.ts"() {
17
- chunkSE2Y5BSL_cjs.init_CompilerBase();
18
- chunkP65OIMJT_cjs.init_DomainBlockCompilerMixin();
19
- exports.SDFCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
17
+ chunkCMEINO5I_cjs.init_CompilerBase();
18
+ chunkIYK6LMQ7_cjs.init_DomainBlockCompilerMixin();
19
+ exports.SDFCompiler = class extends chunkCMEINO5I_cjs.CompilerBase {
20
20
  constructor(options = {}) {
21
21
  super();
22
22
  this.compilerName = "SDFCompiler";
@@ -96,23 +96,23 @@ var init_SDFCompiler = chunkZHPMP447_cjs.__esm({
96
96
  if (domainBlocks.length === 0) return;
97
97
  this.emit("");
98
98
  this.emit("<!-- v4.2 Domain Blocks -->");
99
- const compiled = chunkP65OIMJT_cjs.compileDomainBlocks(
99
+ const compiled = chunkIYK6LMQ7_cjs.compileDomainBlocks(
100
100
  domainBlocks,
101
101
  {
102
102
  material: (block) => {
103
- const mat = chunkP65OIMJT_cjs.compileMaterialBlock(block);
104
- return chunkP65OIMJT_cjs.materialToSDF(mat);
103
+ const mat = chunkIYK6LMQ7_cjs.compileMaterialBlock(block);
104
+ return chunkIYK6LMQ7_cjs.materialToSDF(mat);
105
105
  },
106
106
  physics: (block) => {
107
- const phys = chunkP65OIMJT_cjs.compilePhysicsBlock(block);
108
- return chunkP65OIMJT_cjs.physicsToSDF(phys);
107
+ const phys = chunkIYK6LMQ7_cjs.compilePhysicsBlock(block);
108
+ return chunkIYK6LMQ7_cjs.physicsToSDF(phys);
109
109
  },
110
110
  audio: (block) => {
111
- const audio = chunkP65OIMJT_cjs.compileAudioSourceBlock(block);
111
+ const audio = chunkIYK6LMQ7_cjs.compileAudioSourceBlock(block);
112
112
  return `<!-- Audio: ${this.escapeStringValue(audio.name, "TypeScript")} (${audio.keyword}) clip="${audio.properties.clip || ""}" -->`;
113
113
  },
114
114
  weather: (block) => {
115
- const weather = chunkP65OIMJT_cjs.compileWeatherBlock(block);
115
+ const weather = chunkIYK6LMQ7_cjs.compileWeatherBlock(block);
116
116
  const layers = weather.layers.map((l) => `<!-- ${l.type}: ${JSON.stringify(l.properties)} -->`).join("\n");
117
117
  return `<!-- Weather: ${weather.keyword} "${weather.name || ""}" -->
118
118
  ${layers}`;
@@ -611,5 +611,5 @@ ${layers}`;
611
611
 
612
612
  exports.SDFCompiler_exports = SDFCompiler_exports;
613
613
  exports.init_SDFCompiler = init_SDFCompiler;
614
- //# sourceMappingURL=chunk-KLM6QD6D.cjs.map
615
- //# sourceMappingURL=chunk-KLM6QD6D.cjs.map
614
+ //# sourceMappingURL=chunk-Q6VW7MGX.cjs.map
615
+ //# sourceMappingURL=chunk-Q6VW7MGX.cjs.map
@@ -6,7 +6,6 @@ import * as crypto3 from 'crypto';
6
6
  import { createHash } from 'crypto';
7
7
  import { promisify } from 'util';
8
8
  import { z } from 'zod';
9
- import jwt from 'jsonwebtoken';
10
9
  import path from 'path';
11
10
 
12
11
  function calculateJwkThumbprint(publicKeyPem) {
@@ -1237,16 +1236,42 @@ var init_CapabilityTokenIssuer = __esm({
1237
1236
  globalCapabilityIssuer = null;
1238
1237
  }
1239
1238
  });
1239
+ function sha256Hex(value) {
1240
+ return crypto3.createHash("sha256").update(value, "utf8").digest("hex");
1241
+ }
1242
+ function decodeJsonSegment(segment) {
1243
+ try {
1244
+ const parsed = JSON.parse(Buffer.from(segment, "base64url").toString("utf8"));
1245
+ if (parsed !== null && typeof parsed === "object" && !Array.isArray(parsed)) {
1246
+ return parsed;
1247
+ }
1248
+ return void 0;
1249
+ } catch {
1250
+ return void 0;
1251
+ }
1252
+ }
1253
+ function asRecord(value) {
1254
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
1255
+ return value;
1256
+ }
1257
+ return void 0;
1258
+ }
1259
+ function asString(value) {
1260
+ return typeof value === "string" && value.length > 0 ? value : void 0;
1261
+ }
1262
+ function isIntentTokenPayload(value) {
1263
+ const record = asRecord(value);
1264
+ if (!record) return false;
1265
+ const intent = asRecord(record.intent);
1266
+ return typeof record.iss === "string" && typeof record.sub === "string" && typeof record.aud === "string" && typeof record.exp === "number" && typeof record.agent_role === "string" && asRecord(record.agent_checksum) !== void 0 && Array.isArray(record.permissions) && intent !== void 0 && typeof intent.workflow_id === "string" && typeof intent.workflow_step === "string";
1267
+ }
1240
1268
  function getTokenIssuer(config) {
1241
1269
  if (!globalIssuer) {
1242
- globalIssuer = new AgentTokenIssuer({
1243
- ...config,
1244
- jwtSecret: process.env.AGENT_JWT_SECRET
1245
- });
1270
+ globalIssuer = new AgentTokenIssuer(config);
1246
1271
  }
1247
1272
  return globalIssuer;
1248
1273
  }
1249
- var DEFAULT_ISSUER, DEFAULT_JWT_SECRET, DEFAULT_TOKEN_EXPIRATION, AgentTokenIssuer, globalIssuer;
1274
+ var DEFAULT_ISSUER, DEFAULT_TOKEN_EXPIRATION, LEGACY_AUDIENCE, intentPresentationCache, AgentTokenIssuer, globalIssuer;
1250
1275
  var init_AgentTokenIssuer = __esm({
1251
1276
  "src/compiler/identity/AgentTokenIssuer.ts"() {
1252
1277
  init_AgentIdentity();
@@ -1254,31 +1279,25 @@ var init_AgentTokenIssuer = __esm({
1254
1279
  init_CapabilityToken();
1255
1280
  init_CapabilityTokenIssuer();
1256
1281
  DEFAULT_ISSUER = "holoscript-orchestrator";
1257
- DEFAULT_JWT_SECRET = process.env.AGENT_JWT_SECRET || "dev-secret-change-in-production";
1258
1282
  DEFAULT_TOKEN_EXPIRATION = "24h";
1283
+ LEGACY_AUDIENCE = "holoscript-compiler";
1284
+ intentPresentationCache = /* @__PURE__ */ new Map();
1259
1285
  AgentTokenIssuer = class {
1260
1286
  constructor(config = {}) {
1261
1287
  /** Active workflow state (for validation) */
1262
1288
  this.workflowState = /* @__PURE__ */ new Map();
1263
1289
  this.issuer = config.issuer || DEFAULT_ISSUER;
1264
- this.jwtSecret = config.jwtSecret || DEFAULT_JWT_SECRET;
1265
1290
  this.tokenExpiration = config.tokenExpiration || DEFAULT_TOKEN_EXPIRATION;
1266
1291
  this.strictWorkflowValidation = config.strictWorkflowValidation ?? true;
1267
- if (this.jwtSecret === DEFAULT_JWT_SECRET && process.env.NODE_ENV === "production") {
1268
- console.error(
1269
- "[TOKEN_ISSUER] Using default JWT secret in production! Set AGENT_JWT_SECRET environment variable."
1270
- );
1271
- }
1272
1292
  }
1273
1293
  /**
1274
- * Issue intent token for agent
1294
+ * Issue an intent token for an agent.
1275
1295
  *
1276
- * Creates a signed JWT with:
1277
- * - Standard claims (iss, sub, aud, exp, iat, jti)
1278
- * - Agent identity (role, checksum)
1279
- * - Permissions (RBAC)
1280
- * - Intent metadata (workflow context)
1281
- * - PoP binding (JWK thumbprint)
1296
+ * SOVEREIGN PATH: the token on the wire is an EdDSA UCAN capability token
1297
+ * signed with the request's Ed25519 key pair via `CapabilityTokenIssuer`.
1298
+ * The full legacy `IntentTokenPayload` view (standard claims, agent
1299
+ * identity/checksum, permissions, intent metadata, PoP binding) travels in
1300
+ * the token facts and is reconstructed verbatim by `verifyToken`.
1282
1301
  */
1283
1302
  async issueToken(request) {
1284
1303
  const {
@@ -1302,12 +1321,13 @@ var init_AgentTokenIssuer = __esm({
1302
1321
  const permissions = getDefaultPermissions(agentConfig.role);
1303
1322
  const updatedDelegationChain = [...delegationChain, agentConfig.role];
1304
1323
  const now = Math.floor(Date.now() / 1e3);
1324
+ const lifetimeSec = typeof this.tokenExpiration === "string" ? this.parseExpiration(this.tokenExpiration) : this.tokenExpiration;
1305
1325
  const payload = {
1306
- // Standard JWT claims
1326
+ // Standard claims
1307
1327
  iss: this.issuer,
1308
1328
  sub: `agent:${agentConfig.role}:${agentConfig.name}`,
1309
- aud: "holoscript-compiler",
1310
- exp: typeof this.tokenExpiration === "string" ? now + this.parseExpiration(this.tokenExpiration) : now + this.tokenExpiration,
1329
+ aud: LEGACY_AUDIENCE,
1330
+ exp: now + lifetimeSec,
1311
1331
  iat: now,
1312
1332
  jti: crypto3.randomUUID(),
1313
1333
  // Agent-specific claims
@@ -1331,70 +1351,131 @@ var init_AgentTokenIssuer = __esm({
1331
1351
  // Ed25519 public key for HTTP Message Signature verification
1332
1352
  publicKey: keyPair.publicKey
1333
1353
  };
1334
- const token = jwt.sign(payload, this.jwtSecret, {
1335
- algorithm: "HS256"
1336
- });
1354
+ const resource = agentConfig.scope ? `${HOLOSCRIPT_RESOURCE_SCHEME}${agentConfig.scope}` : HOLOSCRIPT_RESOURCE_ALL;
1355
+ const capabilities = permissions.map((perm) => ({
1356
+ with: resource,
1357
+ can: PERMISSION_TO_ACTION[perm] || perm
1358
+ }));
1359
+ const capToken = await this.getCapabilityTokenIssuer().issueRoot(
1360
+ {
1361
+ issuer: payload.sub,
1362
+ audience: LEGACY_AUDIENCE,
1363
+ capabilities,
1364
+ lifetimeSec,
1365
+ facts: {
1366
+ intent_payload: payload,
1367
+ publicKey: keyPair.publicKey
1368
+ }
1369
+ },
1370
+ keyPair
1371
+ );
1337
1372
  this.workflowState.set(workflowId, workflowStep);
1338
1373
  const keystore = getKeystore();
1339
1374
  await keystore.storeCredential({
1340
1375
  role: agentConfig.role,
1341
- token,
1376
+ token: capToken.raw,
1342
1377
  keyPair,
1343
1378
  createdAt: new Date(now * 1e3),
1344
- expiresAt: new Date(payload.exp * 1e3)
1379
+ expiresAt: new Date(capToken.payload.exp * 1e3)
1345
1380
  });
1346
- return token;
1381
+ return capToken.raw;
1347
1382
  }
1348
1383
  /**
1349
- * Verify agent token
1384
+ * Verify an agent token — FAIL CLOSED.
1350
1385
  *
1351
1386
  * Validates:
1352
- * - Signature authenticity
1353
- * - Token expiration
1354
- * - Claims structure
1387
+ * - EdDSA capability-token structure (legacy HS256 jsonwebtoken envelopes
1388
+ * are rejected with `LEGACY_JWT_REJECTED`, never verified)
1389
+ * - Ed25519 signature against the embedded verification key
1390
+ * - Expiration
1391
+ * - Issuer / audience claims
1392
+ * - Required legacy claims structure
1355
1393
  * - Workflow step sequence (if strict mode)
1394
+ *
1395
+ * Never throws — every failure mode maps to a rejected result.
1356
1396
  */
1357
1397
  verifyToken(token) {
1358
1398
  try {
1359
- const decoded = jwt.verify(token, this.jwtSecret, {
1360
- issuer: this.issuer,
1361
- audience: "holoscript-compiler"
1362
- });
1363
- if (!decoded.agent_role || !decoded.agent_checksum || !decoded.intent) {
1399
+ if (typeof token !== "string" || token.length === 0) {
1364
1400
  return {
1365
1401
  valid: false,
1366
- error: "Missing required claims",
1367
- errorCode: "INVALID_CLAIMS"
1402
+ error: "Invalid signature or malformed token",
1403
+ errorCode: "INVALID_SIGNATURE"
1368
1404
  };
1369
1405
  }
1370
- if (this.strictWorkflowValidation) {
1371
- const currentStep = this.workflowState.get(decoded.intent.workflow_id);
1372
- if (currentStep && currentStep !== decoded.intent.workflow_step) {
1373
- return {
1374
- valid: false,
1375
- error: `Workflow step mismatch: expected ${currentStep}, got ${decoded.intent.workflow_step}`,
1376
- errorCode: "WORKFLOW_VIOLATION"
1377
- };
1406
+ const tokenSha256 = sha256Hex(token);
1407
+ const cached = intentPresentationCache.get(tokenSha256);
1408
+ if (cached) {
1409
+ const now = Math.floor(Date.now() / 1e3);
1410
+ if (cached.exp <= now) {
1411
+ intentPresentationCache.delete(tokenSha256);
1412
+ return { valid: false, error: "Token expired", errorCode: "EXPIRED" };
1378
1413
  }
1414
+ return this.checkClaimsAndWorkflow(structuredClone(cached));
1379
1415
  }
1380
- return {
1381
- valid: true,
1382
- payload: decoded
1383
- };
1384
- } catch (error) {
1385
- if (error instanceof Error && error.name === "TokenExpiredError") {
1416
+ const parts = token.split(".");
1417
+ if (parts.length !== 3 || parts.some((part) => part.length === 0)) {
1386
1418
  return {
1387
1419
  valid: false,
1388
- error: "Token expired",
1389
- errorCode: "EXPIRED"
1420
+ error: "Invalid signature or malformed token",
1421
+ errorCode: "INVALID_SIGNATURE"
1390
1422
  };
1391
- } else if (error instanceof Error && error.name === "JsonWebTokenError") {
1423
+ }
1424
+ const header = decodeJsonSegment(parts[0]);
1425
+ if (!header || typeof header.alg !== "string") {
1392
1426
  return {
1393
1427
  valid: false,
1394
- error: "Invalid signature or malformed token",
1428
+ error: "Malformed token: header segment is not decodable JSON with an alg claim.",
1429
+ errorCode: "INVALID_SIGNATURE"
1430
+ };
1431
+ }
1432
+ if (header.alg !== "EdDSA") {
1433
+ return {
1434
+ valid: false,
1435
+ error: `Legacy ${header.alg} jsonwebtoken envelope is no longer accepted. Reissue a sovereign capability token via issueToken.`,
1436
+ errorCode: "LEGACY_JWT_REJECTED"
1437
+ };
1438
+ }
1439
+ const rawPayload = decodeJsonSegment(parts[1]);
1440
+ if (!rawPayload) {
1441
+ return {
1442
+ valid: false,
1443
+ error: "Malformed token: payload segment is not decodable JSON.",
1444
+ errorCode: "INVALID_SIGNATURE"
1445
+ };
1446
+ }
1447
+ const facts = asRecord(rawPayload.fct);
1448
+ const verificationKey = asString(facts?.publicKey);
1449
+ if (!verificationKey) {
1450
+ return {
1451
+ valid: false,
1452
+ error: "Capability token does not embed its Ed25519 verification key (fct.publicKey). Fail closed.",
1453
+ errorCode: "INVALID_CLAIMS"
1454
+ };
1455
+ }
1456
+ const verification = this.getCapabilityTokenIssuer().verify(token, verificationKey);
1457
+ if (!verification.valid || !verification.payload) {
1458
+ if (verification.errorCode === "EXPIRED") {
1459
+ return { valid: false, error: "Token expired", errorCode: "EXPIRED" };
1460
+ }
1461
+ return {
1462
+ valid: false,
1463
+ error: verification.error ?? "Invalid signature or malformed token",
1395
1464
  errorCode: "INVALID_SIGNATURE"
1396
1465
  };
1397
1466
  }
1467
+ const verifiedFacts = asRecord(verification.payload.fct);
1468
+ const intentPayload = verifiedFacts?.intent_payload;
1469
+ if (!isIntentTokenPayload(intentPayload)) {
1470
+ return {
1471
+ valid: false,
1472
+ error: "Missing required claims",
1473
+ errorCode: "INVALID_CLAIMS"
1474
+ };
1475
+ }
1476
+ intentPresentationCache.set(tokenSha256, intentPayload);
1477
+ return this.checkClaimsAndWorkflow(structuredClone(intentPayload));
1478
+ } catch (error) {
1398
1479
  return {
1399
1480
  valid: false,
1400
1481
  error: error instanceof Error ? error.message : String(error),
@@ -1402,6 +1483,37 @@ var init_AgentTokenIssuer = __esm({
1402
1483
  };
1403
1484
  }
1404
1485
  }
1486
+ /**
1487
+ * Issuer/audience claim checks + strict workflow sequencing — run on both
1488
+ * the fresh-verification and presentation-cache paths.
1489
+ */
1490
+ checkClaimsAndWorkflow(payload) {
1491
+ if (payload.iss !== this.issuer || payload.aud !== LEGACY_AUDIENCE) {
1492
+ return {
1493
+ valid: false,
1494
+ error: `Token issuer/audience mismatch: expected ${this.issuer}/${LEGACY_AUDIENCE}`,
1495
+ errorCode: "INVALID_CLAIMS"
1496
+ };
1497
+ }
1498
+ if (!payload.agent_role || !payload.agent_checksum || !payload.intent) {
1499
+ return {
1500
+ valid: false,
1501
+ error: "Missing required claims",
1502
+ errorCode: "INVALID_CLAIMS"
1503
+ };
1504
+ }
1505
+ if (this.strictWorkflowValidation) {
1506
+ const currentStep = this.workflowState.get(payload.intent.workflow_id);
1507
+ if (currentStep && currentStep !== payload.intent.workflow_step) {
1508
+ return {
1509
+ valid: false,
1510
+ error: `Workflow step mismatch: expected ${currentStep}, got ${payload.intent.workflow_step}`,
1511
+ errorCode: "WORKFLOW_VIOLATION"
1512
+ };
1513
+ }
1514
+ }
1515
+ return { valid: true, payload };
1516
+ }
1405
1517
  /**
1406
1518
  * Extract token from Authorization header
1407
1519
  */
@@ -1442,8 +1554,8 @@ var init_AgentTokenIssuer = __esm({
1442
1554
  *
1443
1555
  * Maps the agent's role to capabilities using the PERMISSION_TO_ACTION bridge
1444
1556
  * constants defined in CapabilityToken.ts. This enables agents that currently
1445
- * use JWT tokens to obtain equivalent UCAN capability tokens for the gradual
1446
- * migration to capability-based authorization.
1557
+ * use legacy tokens to obtain equivalent UCAN capability tokens for the
1558
+ * gradual migration to capability-based authorization.
1447
1559
  *
1448
1560
  * @param options Capability token issuance options
1449
1561
  * @returns Signed UCAN CapabilityToken
@@ -1474,21 +1586,22 @@ var init_AgentTokenIssuer = __esm({
1474
1586
  );
1475
1587
  }
1476
1588
  /**
1477
- * Issue both a JWT token and a UCAN capability token for the same agent
1478
- * and intent context.
1589
+ * Issue both a legacy-view token and a UCAN capability token for the same
1590
+ * agent and intent context.
1479
1591
  *
1480
- * This method enables gradual migration from JWT-only authorization to
1481
- * UCAN capability-based authorization. Consuming services can validate
1482
- * either token during the transition period.
1592
+ * This method enables gradual migration from `IntentTokenPayload`-view
1593
+ * authorization to UCAN capability-based authorization. Consuming services
1594
+ * can validate either token during the transition period. Both members are
1595
+ * EdDSA-signed on the sovereign path.
1483
1596
  *
1484
- * @param request Standard JWT token request parameters
1597
+ * @param request Standard token request parameters
1485
1598
  * @param capabilityOptions Additional options for the capability token
1486
1599
  * (audience defaults to 'holoscript-compiler')
1487
1600
  * @returns HybridTokenResult with both tokens
1488
1601
  */
1489
1602
  async issueHybridToken(request, capabilityOptions) {
1490
1603
  const jwtToken = await this.issueToken(request);
1491
- const audience = capabilityOptions?.audience ?? "holoscript-compiler";
1604
+ const audience = capabilityOptions?.audience ?? LEGACY_AUDIENCE;
1492
1605
  const capabilityToken = await this.issueCapabilityToken({
1493
1606
  agentConfig: request.agentConfig,
1494
1607
  audience,
@@ -3953,6 +4066,7 @@ var init_ANSNamespace = __esm({
3953
4066
  AGENT_INFERENCE: "/compile/ai/agent-inference",
3954
4067
  OMNIGENT_AGENT_YAML: "/compile/ai/omnigent-agent-yaml",
3955
4068
  DAIMON_SEED: "/compile/ai/daimon-seed",
4069
+ HSI_IR: "/compile/ai/hsi-ir",
3956
4070
  MCP_CONFIG: "/compile/ai/mcp-config",
3957
4071
  MCP_SERVER: "/compile/ai/mcp-server",
3958
4072
  // ── neuromorphic ─────────────────────────────────────────────────────
@@ -4017,6 +4131,7 @@ var init_ANSNamespace = __esm({
4017
4131
  "agent-inference": ANSDomain.AI,
4018
4132
  "omnigent-agent-yaml": ANSDomain.AI,
4019
4133
  "daimon-seed": ANSDomain.AI,
4134
+ "hsi-ir": ANSDomain.AI,
4020
4135
  "mcp-config": ANSDomain.AI,
4021
4136
  "mcp-server": ANSDomain.AI,
4022
4137
  // neuromorphic
@@ -4072,6 +4187,7 @@ var init_ANSNamespace = __esm({
4072
4187
  "agent-inference": ANSCapabilityPath.AGENT_INFERENCE,
4073
4188
  "omnigent-agent-yaml": ANSCapabilityPath.OMNIGENT_AGENT_YAML,
4074
4189
  "daimon-seed": ANSCapabilityPath.DAIMON_SEED,
4190
+ "hsi-ir": ANSCapabilityPath.HSI_IR,
4075
4191
  "mcp-config": ANSCapabilityPath.MCP_CONFIG,
4076
4192
  "mcp-server": ANSCapabilityPath.MCP_SERVER,
4077
4193
  nir: ANSCapabilityPath.NIR,
@@ -5530,6 +5646,7 @@ var init_CompilerBase = __esm({
5530
5646
  AgentInferenceCompiler: "agent-inference",
5531
5647
  OmnigentAgentYamlCompiler: "omnigent-agent-yaml",
5532
5648
  DaimonSeedCompiler: "daimon-seed",
5649
+ HSIIRCompiler: "hsi-ir",
5533
5650
  CodeEditorCompiler: "code-editor",
5534
5651
  SVGCompiler: "svg"
5535
5652
  };
@@ -6028,5 +6145,5 @@ Required Permission: ${decision.requiredPermission || "unknown"}`
6028
6145
  });
6029
6146
 
6030
6147
  export { ANSCapabilityPath, BUILTIN_NORMS, BUILTIN_NORM_PROVENANCE, CompilerBase, CompilerDocumentationGenerator, UNKNOWN_NORM_PROVENANCE, UnauthorizedCompilerAccessError, createTestCompilerToken, criticalMassForChange, deserializeNormProvenance, escapeStringValue, getBuiltinNorm, getRBAC, init_ANSNamespace, init_AgentRBAC, init_CompilerBase, init_CompilerDocumentationGenerator, init_CultureTraits, isCapabilityTokenCredential, normalizeNormProvenance, normsByCategory, serializeNormProvenance };
6031
- //# sourceMappingURL=chunk-YDSNDCV3.js.map
6032
- //# sourceMappingURL=chunk-YDSNDCV3.js.map
6148
+ //# sourceMappingURL=chunk-QC3CAVFN.js.map
6149
+ //# sourceMappingURL=chunk-QC3CAVFN.js.map