@holoscript/core 6.0.3 → 6.0.4

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 (229) hide show
  1. package/README.md +38 -38
  2. package/dist/GLTFPipeline-DEN36VNK.js +12 -0
  3. package/dist/GLTFPipeline-YPCAK236.cjs +33 -0
  4. package/dist/{HoloScriptPlusParser-BZR5DELQ.js → HoloScriptPlusParser-BN6KVRCM.js} +5 -5
  5. package/dist/{HoloScriptPlusParser-SBMYDNXO.cjs → HoloScriptPlusParser-NC5FE6AL.cjs} +16 -16
  6. package/dist/{USDZExporter-YA55ZS35.js → USDZExporter-NTMBNTDB.js} +3 -3
  7. package/dist/{USDZExporter-MHEHXZB4.cjs → USDZExporter-UWGWNMMD.cjs} +3 -3
  8. package/dist/{chunk-32TWR3HE.js → chunk-2CWOLHTE.js} +3 -4
  9. package/dist/{chunk-2UX5LRAP.cjs → chunk-33LSUQDD.cjs} +33 -31
  10. package/dist/{chunk-LBPEZQAF.js → chunk-3FJCK5XA.js} +7 -7
  11. package/dist/{chunk-EGIZHYJP.cjs → chunk-3SAK5KFL.cjs} +2 -4
  12. package/dist/{chunk-PJMOXFPR.cjs → chunk-4XSNJCLC.cjs} +25 -27
  13. package/dist/{chunk-HKCVM6OK.cjs → chunk-5BGSECRJ.cjs} +21 -21
  14. package/dist/{chunk-EMO7HAKJ.cjs → chunk-5O6TQC6M.cjs} +26 -30
  15. package/dist/{chunk-XSUZMPVQ.cjs → chunk-5OEOHAAW.cjs} +26 -26
  16. package/dist/{chunk-EJA7G2C4.cjs → chunk-5WUNN6ZN.cjs} +2 -2
  17. package/dist/{chunk-CQDOF3G7.cjs → chunk-6TZPZCOJ.cjs} +18 -18
  18. package/dist/{chunk-NRUB55IT.cjs → chunk-6UEHYZ7V.cjs} +18 -16
  19. package/dist/{chunk-V42NTCFH.js → chunk-6XSERL6L.js} +4230 -2197
  20. package/dist/{chunk-X4YVN7H3.cjs → chunk-72EQECGT.cjs} +37 -17
  21. package/dist/{chunk-4KJ2R7VP.cjs → chunk-7AGYRWKW.cjs} +19 -19
  22. package/dist/{chunk-UQW6SLM5.js → chunk-A7PIMZGU.js} +110 -19
  23. package/dist/{chunk-RT7LJRSF.cjs → chunk-ATSKSYVE.cjs} +1013 -6708
  24. package/dist/{chunk-WN3YF33G.cjs → chunk-B5TCIAPQ.cjs} +9 -10
  25. package/dist/{chunk-AIUXRS74.cjs → chunk-BF2235SI.cjs} +4275 -2242
  26. package/dist/{chunk-DIEDKX5B.cjs → chunk-BND3ST2K.cjs} +18 -16
  27. package/dist/{chunk-EPWRXL6S.js → chunk-BU7VWW2K.js} +29 -29
  28. package/dist/{chunk-6OQBLABR.js → chunk-BWFJEM5A.js} +368 -189
  29. package/dist/{chunk-ARNKA274.cjs → chunk-CAUCGUEA.cjs} +6 -6
  30. package/dist/{chunk-YCMQQQ5U.cjs → chunk-CBJSLA2E.cjs} +398 -219
  31. package/dist/{chunk-BU5ZAFMC.js → chunk-CDPGV4DN.js} +6 -7
  32. package/dist/{chunk-CO2VM2DK.js → chunk-CS2EMTGF.js} +10 -9
  33. package/dist/{chunk-AW7WAELW.js → chunk-DMG7C4H2.js} +4 -4
  34. package/dist/{chunk-XSF76QRU.js → chunk-DXJQDCFL.js} +3 -3
  35. package/dist/{chunk-4FCZDTD5.js → chunk-E3FWRT3Z.js} +7 -9
  36. package/dist/{chunk-KYM4XRFG.js → chunk-E3UALNFA.js} +4 -4
  37. package/dist/{chunk-GC3YU46J.js → chunk-EONILVMF.js} +2 -2
  38. package/dist/{chunk-VJVCD5T5.cjs → chunk-EQV4R3EV.cjs} +22 -22
  39. package/dist/{chunk-FEFHPUEM.cjs → chunk-F3HH56EB.cjs} +74 -658
  40. package/dist/{chunk-WYH4GVZ5.js → chunk-F4IULT7N.js} +2 -2
  41. package/dist/{chunk-XDXZM3ZP.cjs → chunk-FFKU7BTK.cjs} +19 -19
  42. package/dist/{chunk-NKRKT6V2.js → chunk-FHQVYCH2.js} +11 -10
  43. package/dist/{chunk-7H5UNJZD.cjs → chunk-FSF7EQVA.cjs} +11 -10
  44. package/dist/{chunk-KUJRR4FJ.js → chunk-G4VZTCIB.js} +9 -7
  45. package/dist/{chunk-A6GO3DPZ.cjs → chunk-G7CT3EMP.cjs} +4 -4
  46. package/dist/{chunk-EUFLX2PI.js → chunk-GGHSW2NN.js} +989 -6611
  47. package/dist/chunk-GVUR45UF.cjs +777 -0
  48. package/dist/{chunk-ODGMVILH.js → chunk-H5Z7NASB.js} +3 -3
  49. package/dist/{chunk-7KPI4EKH.cjs → chunk-HE7ULERA.cjs} +45 -49
  50. package/dist/{chunk-26TLYBFD.js → chunk-HPS76H7Q.js} +3 -3
  51. package/dist/{chunk-RE3OKSYF.cjs → chunk-HQUEA5R6.cjs} +6 -6
  52. package/dist/{chunk-ZGTGVSTZ.js → chunk-HYNTS5CP.js} +2 -2
  53. package/dist/{chunk-PBA6NXCT.cjs → chunk-IBDG74G2.cjs} +6 -3
  54. package/dist/chunk-IFNQFCTM.js +3098 -0
  55. package/dist/{chunk-ZL6VJ6SN.js → chunk-IWI6J7FX.js} +5 -5
  56. package/dist/{chunk-3KEU5QYY.cjs → chunk-K3JDKWGI.cjs} +118 -23
  57. package/dist/{chunk-NLPSZT4C.js → chunk-K6EKD26I.js} +6 -6
  58. package/dist/chunk-KCQ5NDYC.cjs +3172 -0
  59. package/dist/{chunk-ELLQPFAF.js → chunk-KED34ILP.js} +11 -9
  60. package/dist/{chunk-BY3B7ZYV.cjs → chunk-KSGXLT74.cjs} +3 -3
  61. package/dist/{chunk-65RFOWZI.js → chunk-L4G4RLXX.js} +9 -7
  62. package/dist/{chunk-4SMUJFHL.js → chunk-LDP5OK6G.js} +6 -3
  63. package/dist/{chunk-VZNKJZTT.cjs → chunk-LGGRPKTV.cjs} +82 -96
  64. package/dist/{chunk-C2QHVHZF.js → chunk-LSW7P7ML.js} +23 -414
  65. package/dist/{chunk-HHS6FMOU.cjs → chunk-LXJ4667L.cjs} +83 -22
  66. package/dist/{chunk-H6WMMLQK.cjs → chunk-LZ266PCM.cjs} +20 -13
  67. package/dist/{chunk-V2ILLPHK.cjs → chunk-MD6KDHVE.cjs} +10 -10
  68. package/dist/{chunk-6WNCRE6F.js → chunk-MEASWI2Y.js} +5 -5
  69. package/dist/chunk-MPXBVFHQ.js +768 -0
  70. package/dist/{chunk-WUXIRGZP.cjs → chunk-NCUKG4SK.cjs} +304 -144
  71. package/dist/chunk-NDQNIJEH.js +1715 -0
  72. package/dist/{chunk-Y5MUAYTO.js → chunk-NOZZ46QU.js} +9 -8
  73. package/dist/{chunk-F5LVGHNT.js → chunk-OFKWH2IP.js} +3 -3
  74. package/dist/{chunk-SPDELRRV.cjs → chunk-PMGODDJA.cjs} +12 -12
  75. package/dist/{chunk-I3XGTIHM.cjs → chunk-Q4QX3AET.cjs} +2 -2
  76. package/dist/{chunk-Y7VK5TH3.cjs → chunk-Q5JT3YML.cjs} +10 -10
  77. package/dist/{chunk-TSWTWZ42.cjs → chunk-Q5SJOGHQ.cjs} +247 -205
  78. package/dist/{chunk-M6FU6S22.js → chunk-QGKNANZ3.js} +251 -91
  79. package/dist/{chunk-WFJIDI2N.cjs → chunk-QLEAOI3Q.cjs} +10 -10
  80. package/dist/{chunk-VK5AXKO3.js → chunk-R7MA7QWV.js} +70 -84
  81. package/dist/{chunk-W76ETJTI.js → chunk-RVYPEYPX.js} +6 -6
  82. package/dist/{chunk-MWEFR6YQ.js → chunk-S2N5TNMA.js} +7 -9
  83. package/dist/{chunk-NCUHGRTZ.js → chunk-S565K7NK.js} +7 -7
  84. package/dist/{chunk-AC4BSHFV.js → chunk-SDAMZIRE.js} +5 -5
  85. package/dist/{chunk-HBZYCASG.js → chunk-T36DDXSF.js} +75 -33
  86. package/dist/{chunk-BO2OKHIY.js → chunk-T4NKMBDL.js} +30 -611
  87. package/dist/{chunk-7X2IEJIE.cjs → chunk-T7LEXZUZ.cjs} +29 -29
  88. package/dist/{chunk-HUFNKFA6.js → chunk-TEWCN33Y.js} +8 -12
  89. package/dist/{chunk-L3Z2HIWJ.cjs → chunk-TQSZUOW5.cjs} +2 -2
  90. package/dist/chunk-TSH3MSQU.cjs +129 -0
  91. package/dist/{chunk-PLMYCCA4.js → chunk-UERJ3YJV.js} +6 -6
  92. package/dist/{chunk-7N3JIJMT.js → chunk-UPJBDCVF.js} +6 -6
  93. package/dist/{chunk-CMYAWUX3.js → chunk-V3NN3HPP.js} +12 -5
  94. package/dist/{chunk-SUCBB66F.js → chunk-WB4Z63GG.js} +3 -3
  95. package/dist/{chunk-PPULB4GG.cjs → chunk-WDW67DZB.cjs} +68 -68
  96. package/dist/chunk-WGMEAYBG.js +126 -0
  97. package/dist/{chunk-VSXOIUCF.cjs → chunk-X4ZF6CNE.cjs} +7 -7
  98. package/dist/{chunk-HF4OFY25.cjs → chunk-X6SEAXAX.cjs} +29 -445
  99. package/dist/{chunk-C7BNX4XJ.js → chunk-XCWFGZAA.js} +6 -6
  100. package/dist/{chunk-CNVM7J3M.js → chunk-XD6IYDUX.js} +34 -14
  101. package/dist/chunk-XG23EUQX.cjs +1717 -0
  102. package/dist/{chunk-DN7UFU63.cjs → chunk-XRKWN5PL.cjs} +12 -11
  103. package/dist/{chunk-XNMEH2BI.js → chunk-XUTX5CBW.js} +3 -3
  104. package/dist/{chunk-PQLGZKMC.cjs → chunk-XWPNTWDN.cjs} +26 -26
  105. package/dist/{chunk-NTMZSDXM.cjs → chunk-XXINBTZK.cjs} +43 -43
  106. package/dist/{chunk-74YCHHTE.js → chunk-YCXFCXDS.js} +8 -12
  107. package/dist/{chunk-KDB6BUMB.js → chunk-YQK5JNFK.js} +77 -18
  108. package/dist/{chunk-DH5G2JUA.cjs → chunk-Z34RLXRA.cjs} +44 -46
  109. package/dist/{chunk-XH7SE4HH.cjs → chunk-ZP4D3CSX.cjs} +19 -19
  110. package/dist/cli/holoscript-runner.cjs +33 -32
  111. package/dist/cli/holoscript-runner.js +13 -12
  112. package/dist/codebase/index.cjs +1 -1
  113. package/dist/codebase/index.d.ts +25 -0
  114. package/dist/codebase/index.js +1 -1
  115. package/dist/compiler/agent-inference.cjs +7 -8
  116. package/dist/compiler/agent-inference.js +3 -4
  117. package/dist/compiler/android-xr.cjs +7 -8
  118. package/dist/compiler/android-xr.js +5 -6
  119. package/dist/compiler/android.cjs +8 -9
  120. package/dist/compiler/android.js +6 -7
  121. package/dist/compiler/ar.cjs +6 -7
  122. package/dist/compiler/ar.js +4 -5
  123. package/dist/compiler/babylon.cjs +8 -9
  124. package/dist/compiler/babylon.js +7 -8
  125. package/dist/compiler/coco.cjs +1 -1
  126. package/dist/compiler/coco.js +1 -1
  127. package/dist/compiler/domain-block-utils.cjs +158 -151
  128. package/dist/compiler/domain-block-utils.js +4 -5
  129. package/dist/compiler/dtdl.cjs +7 -8
  130. package/dist/compiler/dtdl.js +4 -5
  131. package/dist/compiler/gltf-pipeline.cjs +9 -9
  132. package/dist/compiler/gltf-pipeline.js +2 -2
  133. package/dist/compiler/godot.cjs +6 -7
  134. package/dist/compiler/godot.js +5 -6
  135. package/dist/compiler/incremental.cjs +7 -8
  136. package/dist/compiler/incremental.js +2 -3
  137. package/dist/compiler/index.cjs +1934 -878
  138. package/dist/compiler/index.js +1904 -842
  139. package/dist/compiler/ios.cjs +8 -9
  140. package/dist/compiler/ios.js +6 -7
  141. package/dist/compiler/multi-layer.cjs +10 -17
  142. package/dist/compiler/multi-layer.js +9 -10
  143. package/dist/compiler/nodetoy.cjs +1 -1
  144. package/dist/compiler/nodetoy.js +1 -1
  145. package/dist/compiler/openxr.cjs +6 -7
  146. package/dist/compiler/openxr.js +5 -6
  147. package/dist/compiler/playcanvas.cjs +7 -8
  148. package/dist/compiler/playcanvas.js +6 -7
  149. package/dist/compiler/r3f.cjs +13 -14
  150. package/dist/compiler/r3f.js +8 -9
  151. package/dist/compiler/remotion.cjs +1 -1
  152. package/dist/compiler/remotion.js +1 -1
  153. package/dist/compiler/reproducibility.cjs +1 -1
  154. package/dist/compiler/reproducibility.js +1 -1
  155. package/dist/compiler/sdf.cjs +7 -8
  156. package/dist/compiler/sdf.js +5 -6
  157. package/dist/compiler/semantic-scene.cjs +7 -7
  158. package/dist/compiler/semantic-scene.js +2 -2
  159. package/dist/compiler/state.cjs +5 -6
  160. package/dist/compiler/state.js +3 -4
  161. package/dist/compiler/trait-composition.cjs +7 -8
  162. package/dist/compiler/trait-composition.js +3 -4
  163. package/dist/compiler/unity.cjs +6 -7
  164. package/dist/compiler/unity.js +5 -6
  165. package/dist/compiler/unreal.cjs +7 -8
  166. package/dist/compiler/unreal.js +5 -6
  167. package/dist/compiler/urdf.cjs +13 -14
  168. package/dist/compiler/urdf.js +5 -6
  169. package/dist/compiler/usd-physics.cjs +7 -8
  170. package/dist/compiler/usd-physics.js +4 -5
  171. package/dist/compiler/visionos.cjs +6 -7
  172. package/dist/compiler/visionos.js +5 -6
  173. package/dist/compiler/vrchat.cjs +7 -8
  174. package/dist/compiler/vrchat.js +5 -6
  175. package/dist/compiler/vrr.cjs +7 -8
  176. package/dist/compiler/vrr.js +5 -6
  177. package/dist/compiler/wasm.cjs +10 -11
  178. package/dist/compiler/wasm.js +5 -6
  179. package/dist/compiler/webgpu.cjs +6 -7
  180. package/dist/compiler/webgpu.js +5 -6
  181. package/dist/constants.d.ts +3 -0
  182. package/dist/debugger.cjs +7 -7
  183. package/dist/debugger.js +5 -5
  184. package/dist/entries/interop.cjs +1 -1
  185. package/dist/entries/interop.d.ts +9 -0
  186. package/dist/entries/interop.js +1 -1
  187. package/dist/entries/scripting.cjs +18 -17
  188. package/dist/entries/scripting.d.ts +7 -0
  189. package/dist/entries/scripting.js +8 -7
  190. package/dist/index.cjs +6773 -27555
  191. package/dist/index.d.ts +19 -0
  192. package/dist/index.js +5212 -26101
  193. package/dist/math/vec3.cjs +1 -1
  194. package/dist/math/vec3.js +1 -1
  195. package/dist/ml-dsa-PHCWUBPX.cjs +1178 -0
  196. package/dist/ml-dsa-WYLJHJO6.js +1178 -0
  197. package/dist/parser.cjs +11 -10
  198. package/dist/parser.js +8 -7
  199. package/dist/{playwright-BIZXMLD2.js → playwright-5OSAPTNH.js} +3 -3
  200. package/dist/{playwright-7DTEQCBD.cjs → playwright-RL6GY4F7.cjs} +1985 -1985
  201. package/dist/runtime.cjs +5 -5
  202. package/dist/runtime.js +4 -4
  203. package/dist/self-improvement/index.d.ts +0 -48
  204. package/dist/storage/index.cjs +1 -1
  205. package/dist/storage/index.d.ts +24 -0
  206. package/dist/storage/index.js +1 -1
  207. package/dist/tools/index.d.ts +12 -0
  208. package/dist/traits/index.cjs +925 -607
  209. package/dist/traits/index.js +137 -20
  210. package/dist/type-checker.cjs +4 -4
  211. package/dist/type-checker.js +2 -2
  212. package/package.json +56 -21
  213. package/LICENSE +0 -21
  214. package/dist/GLTFPipeline-3KLWWUQO.cjs +0 -34
  215. package/dist/GLTFPipeline-LYII2ZVQ.js +0 -13
  216. package/dist/chunk-CN4NOESF.cjs +0 -416
  217. package/dist/chunk-DXVCEFZB.js +0 -2027
  218. package/dist/chunk-ENV7K6XA.js +0 -282
  219. package/dist/chunk-H7XMORZI.js +0 -2731
  220. package/dist/chunk-HAN4V3PF.cjs +0 -2037
  221. package/dist/chunk-LER4WXW5.cjs +0 -286
  222. package/dist/chunk-QHVVVN47.cjs +0 -2033
  223. package/dist/chunk-QWKUKVRE.js +0 -2026
  224. package/dist/chunk-UITWA6DV.cjs +0 -2829
  225. package/dist/chunk-X67XRI2T.js +0 -410
  226. package/dist/post-quantum-JTTAAGO3.cjs +0 -6
  227. package/dist/post-quantum-RVPVDEPI.js +0 -4
  228. package/dist/wot/index.cjs +0 -29
  229. package/dist/wot/index.js +0 -4
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkQHVVVN47_cjs = require('./chunk-QHVVVN47.cjs');
3
+ var chunkBF2235SI_cjs = require('./chunk-BF2235SI.cjs');
4
+ var platform = require('@holoscript/platform');
4
5
 
5
6
  // src/compiler/AgentInferenceExportTarget.ts
6
- chunkQHVVVN47_cjs.init_CompilerBase();
7
- chunkQHVVVN47_cjs.init_ANSNamespace();
7
+ chunkBF2235SI_cjs.init_CompilerBase();
8
8
  var DEFAULT_MODEL_CONFIG = {
9
9
  provider: "anthropic",
10
10
  name: "claude-sonnet-4-20250514",
@@ -30,7 +30,7 @@ var AGENT_TRAIT_NAMES = /* @__PURE__ */ new Set([
30
30
  "memory",
31
31
  "persona"
32
32
  ]);
33
- var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
33
+ var AgentInferenceCompiler = class extends chunkBF2235SI_cjs.CompilerBase {
34
34
  constructor(options = {}) {
35
35
  super();
36
36
  this.compilerName = "AgentInferenceCompiler";
@@ -48,7 +48,7 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
48
48
  };
49
49
  }
50
50
  getRequiredCapability() {
51
- return chunkQHVVVN47_cjs.ANSCapabilityPath.AGENT_INFERENCE;
51
+ return platform.ANSCapabilityPath.AGENT_INFERENCE;
52
52
  }
53
53
  /**
54
54
  * Compile a HoloScript composition to runnable agent inference scripts.
@@ -390,7 +390,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
390
390
  lines.push("");
391
391
  }
392
392
  lines.push(" constructor(apiKey?: string) {");
393
- lines.push(" this.client = new Anthropic({ apiKey: apiKey ?? process.env['ANTHROPIC_API_KEY'] });");
393
+ lines.push(
394
+ " this.client = new Anthropic({ apiKey: apiKey ?? process.env['ANTHROPIC_API_KEY'] });"
395
+ );
394
396
  lines.push(` this.systemPrompt = ${JSON.stringify(agent.modelConfig.systemPrompt)};`);
395
397
  lines.push(" }");
396
398
  lines.push("");
@@ -426,11 +428,15 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
426
428
  lines.push(" toolResults.push({");
427
429
  lines.push(" type: 'tool_result',");
428
430
  lines.push(" tool_use_id: toolUse.id,");
429
- lines.push(" content: typeof result === 'string' ? result : JSON.stringify(result),");
431
+ lines.push(
432
+ " content: typeof result === 'string' ? result : JSON.stringify(result),"
433
+ );
430
434
  lines.push(" });");
431
435
  lines.push(" }");
432
436
  lines.push("");
433
- lines.push(" this.messages.push({ role: 'assistant', content: currentResponse.content });");
437
+ lines.push(
438
+ " this.messages.push({ role: 'assistant', content: currentResponse.content });"
439
+ );
434
440
  lines.push(" this.messages.push({ role: 'user', content: toolResults });");
435
441
  lines.push("");
436
442
  lines.push(" currentResponse = await this.client.messages.create({");
@@ -443,7 +449,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
443
449
  lines.push(" });");
444
450
  lines.push(" }");
445
451
  lines.push("");
446
- lines.push(" this.messages.push({ role: 'assistant', content: currentResponse.content });");
452
+ lines.push(
453
+ " this.messages.push({ role: 'assistant', content: currentResponse.content });"
454
+ );
447
455
  lines.push(" const textBlocks = currentResponse.content.filter(");
448
456
  lines.push(" (block): block is Anthropic.TextBlock => block.type === 'text'");
449
457
  lines.push(" );");
@@ -476,7 +484,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
476
484
  lines.push(" output: process.stdout,");
477
485
  lines.push(" });");
478
486
  lines.push("");
479
- lines.push(` console.log('${this.escapeStringValue(compositionName, "TypeScript")} agent ready. Type a message or "quit" to exit.');`);
487
+ lines.push(
488
+ ` console.log('${this.escapeStringValue(compositionName, "TypeScript")} agent ready. Type a message or "quit" to exit.');`
489
+ );
480
490
  lines.push("");
481
491
  lines.push(" const ask = (): void => {");
482
492
  lines.push(" rl.question('> ', async (input: string) => {");
@@ -554,7 +564,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
554
564
  lines.push(" 'content': str(result),");
555
565
  lines.push(" })");
556
566
  lines.push("");
557
- lines.push(" self.messages.append({'role': 'assistant', 'content': response.content})");
567
+ lines.push(
568
+ " self.messages.append({'role': 'assistant', 'content': response.content})"
569
+ );
558
570
  lines.push(" self.messages.append({'role': 'user', 'content': tool_results})");
559
571
  lines.push("");
560
572
  lines.push(" response = self.client.messages.create(");
@@ -567,7 +579,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
567
579
  lines.push(" )");
568
580
  lines.push("");
569
581
  }
570
- lines.push(" self.messages.append({'role': 'assistant', 'content': response.content})");
582
+ lines.push(
583
+ " self.messages.append({'role': 'assistant', 'content': response.content})"
584
+ );
571
585
  lines.push(" text_blocks = [b.text for b in response.content if b.type == 'text']");
572
586
  lines.push(" return '\\n'.join(text_blocks)");
573
587
  lines.push("");
@@ -579,7 +593,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
579
593
  lines.push("");
580
594
  lines.push("if __name__ == '__main__':");
581
595
  lines.push(` agent = ${this.toPascalCase(primaryAgent.name)}Agent()`);
582
- lines.push(` print('${this.escapeStringValue(compositionName, "Python")} agent ready. Type a message or "quit" to exit.')`);
596
+ lines.push(
597
+ ` print('${this.escapeStringValue(compositionName, "Python")} agent ready. Type a message or "quit" to exit.')`
598
+ );
583
599
  lines.push(" while True:");
584
600
  lines.push(" user_input = input('> ')");
585
601
  lines.push(" if user_input.strip().lower() == 'quit':");
@@ -667,7 +683,9 @@ var AgentInferenceCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
667
683
  lines.push(' "properties": {');
668
684
  for (const param of tool.parameters) {
669
685
  lines.push(` ${JSON.stringify(param.name)}: {`);
670
- lines.push(` "type": ${JSON.stringify(this.toJsonSchemaType(param.type))},`);
686
+ lines.push(
687
+ ` "type": ${JSON.stringify(this.toJsonSchemaType(param.type))},`
688
+ );
671
689
  lines.push(` "description": ${JSON.stringify(param.description)},`);
672
690
  lines.push(" },");
673
691
  }
@@ -824,7 +842,9 @@ export interface ToolResult {
824
842
  lines.push(`### ${agent.name}`);
825
843
  lines.push(`- **Role**: ${agent.role}`);
826
844
  lines.push(`- **Model**: ${agent.modelConfig.name}`);
827
- lines.push(`- **Tools**: ${agent.tools.length > 0 ? agent.tools.map((t) => t.name).join(", ") : "none"}`);
845
+ lines.push(
846
+ `- **Tools**: ${agent.tools.length > 0 ? agent.tools.map((t) => t.name).join(", ") : "none"}`
847
+ );
828
848
  lines.push("");
829
849
  }
830
850
  return lines.join("\n");
@@ -884,5 +904,5 @@ exports.AgentInferenceCompiler = AgentInferenceCompiler;
884
904
  exports.AgentInferenceExportTarget_default = AgentInferenceExportTarget_default;
885
905
  exports.createAgentInferenceCompiler = createAgentInferenceCompiler;
886
906
  exports.createPythonAgentInferenceCompiler = createPythonAgentInferenceCompiler;
887
- //# sourceMappingURL=chunk-X4YVN7H3.cjs.map
888
- //# sourceMappingURL=chunk-X4YVN7H3.cjs.map
907
+ //# sourceMappingURL=chunk-72EQECGT.cjs.map
908
+ //# sourceMappingURL=chunk-72EQECGT.cjs.map
@@ -1,22 +1,22 @@
1
1
  'use strict';
2
2
 
3
- var chunkHHS6FMOU_cjs = require('./chunk-HHS6FMOU.cjs');
4
- var chunkQHVVVN47_cjs = require('./chunk-QHVVVN47.cjs');
5
- var chunkEGIZHYJP_cjs = require('./chunk-EGIZHYJP.cjs');
3
+ var chunkLXJ4667L_cjs = require('./chunk-LXJ4667L.cjs');
4
+ var chunkBF2235SI_cjs = require('./chunk-BF2235SI.cjs');
5
+ var chunk3SAK5KFL_cjs = require('./chunk-3SAK5KFL.cjs');
6
+ var platform = require('@holoscript/platform');
6
7
 
7
8
  // src/compiler/SDFCompiler.ts
8
9
  var SDFCompiler_exports = {};
9
- chunkEGIZHYJP_cjs.__export(SDFCompiler_exports, {
10
+ chunk3SAK5KFL_cjs.__export(SDFCompiler_exports, {
10
11
  SDFCompiler: () => exports.SDFCompiler,
11
12
  default: () => exports.SDFCompiler_default
12
13
  });
13
14
  exports.SDFCompiler = void 0; exports.SDFCompiler_default = void 0;
14
- var init_SDFCompiler = chunkEGIZHYJP_cjs.__esm({
15
+ var init_SDFCompiler = chunk3SAK5KFL_cjs.__esm({
15
16
  "src/compiler/SDFCompiler.ts"() {
16
- chunkQHVVVN47_cjs.init_CompilerBase();
17
- chunkQHVVVN47_cjs.init_ANSNamespace();
18
- chunkHHS6FMOU_cjs.init_DomainBlockCompilerMixin();
19
- exports.SDFCompiler = class extends chunkQHVVVN47_cjs.CompilerBase {
17
+ chunkBF2235SI_cjs.init_CompilerBase();
18
+ chunkLXJ4667L_cjs.init_DomainBlockCompilerMixin();
19
+ exports.SDFCompiler = class extends chunkBF2235SI_cjs.CompilerBase {
20
20
  constructor(options = {}) {
21
21
  super();
22
22
  this.compilerName = "SDFCompiler";
@@ -33,7 +33,7 @@ var init_SDFCompiler = chunkEGIZHYJP_cjs.__esm({
33
33
  };
34
34
  }
35
35
  getRequiredCapability() {
36
- return chunkQHVVVN47_cjs.ANSCapabilityPath.SDF;
36
+ return platform.ANSCapabilityPath.SDF;
37
37
  }
38
38
  compile(composition, agentToken, outputPath) {
39
39
  this.validateCompilerAccess(agentToken, outputPath);
@@ -84,23 +84,23 @@ var init_SDFCompiler = chunkEGIZHYJP_cjs.__esm({
84
84
  if (domainBlocks.length === 0) return;
85
85
  this.emit("");
86
86
  this.emit("<!-- v4.2 Domain Blocks -->");
87
- const compiled = chunkHHS6FMOU_cjs.compileDomainBlocks(
87
+ const compiled = chunkLXJ4667L_cjs.compileDomainBlocks(
88
88
  domainBlocks,
89
89
  {
90
90
  material: (block) => {
91
- const mat = chunkHHS6FMOU_cjs.compileMaterialBlock(block);
92
- return chunkHHS6FMOU_cjs.materialToSDF(mat);
91
+ const mat = chunkLXJ4667L_cjs.compileMaterialBlock(block);
92
+ return chunkLXJ4667L_cjs.materialToSDF(mat);
93
93
  },
94
94
  physics: (block) => {
95
- const phys = chunkHHS6FMOU_cjs.compilePhysicsBlock(block);
96
- return chunkHHS6FMOU_cjs.physicsToSDF(phys);
95
+ const phys = chunkLXJ4667L_cjs.compilePhysicsBlock(block);
96
+ return chunkLXJ4667L_cjs.physicsToSDF(phys);
97
97
  },
98
98
  audio: (block) => {
99
- const audio = chunkHHS6FMOU_cjs.compileAudioSourceBlock(block);
99
+ const audio = chunkLXJ4667L_cjs.compileAudioSourceBlock(block);
100
100
  return `<!-- Audio: ${this.escapeStringValue(audio.name, "TypeScript")} (${audio.keyword}) clip="${audio.properties.clip || ""}" -->`;
101
101
  },
102
102
  weather: (block) => {
103
- const weather = chunkHHS6FMOU_cjs.compileWeatherBlock(block);
103
+ const weather = chunkLXJ4667L_cjs.compileWeatherBlock(block);
104
104
  const layers = weather.layers.map((l) => `<!-- ${l.type}: ${JSON.stringify(l.properties)} -->`).join("\n");
105
105
  return `<!-- Weather: ${weather.keyword} "${weather.name || ""}" -->
106
106
  ${layers}`;
@@ -503,5 +503,5 @@ ${layers}`;
503
503
 
504
504
  exports.SDFCompiler_exports = SDFCompiler_exports;
505
505
  exports.init_SDFCompiler = init_SDFCompiler;
506
- //# sourceMappingURL=chunk-4KJ2R7VP.cjs.map
507
- //# sourceMappingURL=chunk-4KJ2R7VP.cjs.map
506
+ //# sourceMappingURL=chunk-7AGYRWKW.cjs.map
507
+ //# sourceMappingURL=chunk-7AGYRWKW.cjs.map
@@ -1,6 +1,53 @@
1
- import { __esm } from './chunk-32TWR3HE.js';
1
+ import { __esm } from './chunk-2CWOLHTE.js';
2
+
3
+ // src/compiler/traits/Semiring.ts
4
+ function minPlusMul(a, b) {
5
+ return !Number.isFinite(a) || !Number.isFinite(b) ? Number.POSITIVE_INFINITY : a + b;
6
+ }
7
+ function maxPlusMul(a, b) {
8
+ return !Number.isFinite(a) || !Number.isFinite(b) ? Number.NEGATIVE_INFINITY : a + b;
9
+ }
10
+ function strategyToSemiring(strategy) {
11
+ switch (strategy) {
12
+ case "sum":
13
+ case "multiply":
14
+ return SumProductSemiring;
15
+ case "tropical-min-plus":
16
+ return MinPlusSemiring;
17
+ case "tropical-max-plus":
18
+ return MaxPlusSemiring;
19
+ default:
20
+ return null;
21
+ }
22
+ }
23
+ var MinPlusSemiring, MaxPlusSemiring, SumProductSemiring;
24
+ var init_Semiring = __esm({
25
+ "src/compiler/traits/Semiring.ts"() {
26
+ MinPlusSemiring = {
27
+ zero: Number.POSITIVE_INFINITY,
28
+ one: 0,
29
+ add: (a, b) => Math.min(a, b),
30
+ mul: minPlusMul
31
+ };
32
+ MaxPlusSemiring = {
33
+ zero: Number.NEGATIVE_INFINITY,
34
+ one: 0,
35
+ add: (a, b) => Math.max(a, b),
36
+ mul: maxPlusMul
37
+ };
38
+ SumProductSemiring = {
39
+ zero: 0,
40
+ one: 1,
41
+ add: (a, b) => a + b,
42
+ mul: (a, b) => a * b
43
+ };
44
+ }
45
+ });
2
46
 
3
47
  // src/compiler/traits/ProvenanceSemiring.ts
48
+ function isDeadElement(value) {
49
+ return value === TRAIT_ZERO;
50
+ }
4
51
  function createDeadElement(subsystem, elementId, reason, originalValue) {
5
52
  return {
6
53
  subsystem,
@@ -14,16 +61,27 @@ function authorityWeight(level, reputationScore) {
14
61
  const clamped = Math.max(0, Math.min(100, level));
15
62
  let baseWeight = 0.5 + clamped / 100 * 1.5;
16
63
  if (reputationScore !== void 0 && reputationScore > 0) {
17
- if (reputationScore >= 100) baseWeight *= 3;
18
- else if (reputationScore >= 30) baseWeight *= 2;
64
+ if (reputationScore >= 100)
65
+ baseWeight *= 3;
66
+ else if (reputationScore >= 30)
67
+ baseWeight *= 2;
19
68
  else if (reputationScore >= 5) baseWeight *= 1.5;
20
69
  }
21
70
  return baseWeight;
22
71
  }
23
- var TRAIT_ZERO, ProvenanceSemiring;
72
+ var TRAIT_ZERO, AuthorityTier, ProvenanceSemiring;
24
73
  var init_ProvenanceSemiring = __esm({
25
74
  "src/compiler/traits/ProvenanceSemiring.ts"() {
75
+ init_Semiring();
26
76
  TRAIT_ZERO = /* @__PURE__ */ Symbol.for("HoloScript::TraitZero");
77
+ AuthorityTier = /* @__PURE__ */ ((AuthorityTier2) => {
78
+ AuthorityTier2[AuthorityTier2["GUEST"] = 0] = "GUEST";
79
+ AuthorityTier2[AuthorityTier2["AGENT"] = 25] = "AGENT";
80
+ AuthorityTier2[AuthorityTier2["MEMBER"] = 50] = "MEMBER";
81
+ AuthorityTier2[AuthorityTier2["ADMIN"] = 75] = "ADMIN";
82
+ AuthorityTier2[AuthorityTier2["FOUNDER"] = 100] = "FOUNDER";
83
+ return AuthorityTier2;
84
+ })(AuthorityTier || {});
27
85
  ProvenanceSemiring = class {
28
86
  constructor(rules) {
29
87
  this.rules = /* @__PURE__ */ new Map();
@@ -36,11 +94,19 @@ var init_ProvenanceSemiring = __esm({
36
94
  }
37
95
  }
38
96
  loadDefaultRules() {
39
- this.rules.set("type", { property: "type", strategy: "domain-override", precedence: ["kinematic", "physics", "collidable", "static"] });
97
+ this.rules.set("type", {
98
+ property: "type",
99
+ strategy: "domain-override",
100
+ precedence: ["kinematic", "physics", "collidable", "static"]
101
+ });
40
102
  this.rules.set("mass", { property: "mass", strategy: "authority-weighted" });
41
103
  this.rules.set("friction", { property: "friction", strategy: "max" });
42
104
  this.rules.set("restitution", { property: "restitution", strategy: "min" });
43
- this.rules.set("color", { property: "color", strategy: "domain-override", precedence: ["material", "color", "hoverable", "glowing"] });
105
+ this.rules.set("color", {
106
+ property: "color",
107
+ strategy: "domain-override",
108
+ precedence: ["material", "color", "hoverable", "glowing"]
109
+ });
44
110
  this.rules.set("opacity", { property: "opacity", strategy: "min" });
45
111
  }
46
112
  /**
@@ -55,11 +121,13 @@ var init_ProvenanceSemiring = __esm({
55
121
  for (const trait of traits) {
56
122
  for (const [key, value] of Object.entries(trait.config)) {
57
123
  if (value === TRAIT_ZERO) {
58
- deadElements.push(createDeadElement(
59
- "semiring",
60
- `${trait.name}.${key}`,
61
- `TRAIT_ZERO encountered during addition: property '${key}' from @${trait.name}`
62
- ));
124
+ deadElements.push(
125
+ createDeadElement(
126
+ "semiring",
127
+ `${trait.name}.${key}`,
128
+ `TRAIT_ZERO encountered during addition: property '${key}' from @${trait.name}`
129
+ )
130
+ );
63
131
  continue;
64
132
  }
65
133
  if (!(key in acc)) {
@@ -67,8 +135,14 @@ var init_ProvenanceSemiring = __esm({
67
135
  } else {
68
136
  const existing = acc[key];
69
137
  try {
70
- acc[key] = this.multiply(existing, { value, source: trait.name, context: trait.context }, key);
71
- conflicts.push(`Resolved conflict on property '${key}' between @${existing.source} and @${trait.name}`);
138
+ acc[key] = this.multiply(
139
+ existing,
140
+ { value, source: trait.name, context: trait.context },
141
+ key
142
+ );
143
+ conflicts.push(
144
+ `Resolved conflict on property '${key}' between @${existing.source} and @${trait.name}`
145
+ );
72
146
  } catch (err) {
73
147
  errors.push(err instanceof Error ? err.message : String(err));
74
148
  }
@@ -108,10 +182,23 @@ var init_ProvenanceSemiring = __esm({
108
182
  if (authA !== authB) {
109
183
  return authA > authB ? a : b;
110
184
  }
111
- throw new Error(`Unresolved conflict on '${property}': @${a.source} (${a.value}) vs @${b.source} (${b.value})`);
185
+ throw new Error(
186
+ `Unresolved conflict on '${property}': @${a.source} (${a.value}) vs @${b.source} (${b.value})`
187
+ );
112
188
  }
113
189
  const weightA = authorityWeight(a.context?.authorityLevel ?? 0, a.context?.reputationScore);
114
190
  const weightB = authorityWeight(b.context?.authorityLevel ?? 0, b.context?.reputationScore);
191
+ if (rule && (rule.strategy === "tropical-min-plus" || rule.strategy === "tropical-max-plus")) {
192
+ const semiring = strategyToSemiring(rule.strategy);
193
+ if (!semiring) {
194
+ throw new Error(`No semiring adapter available for strategy '${rule.strategy}'`);
195
+ }
196
+ return {
197
+ value: semiring.mul(a.value, b.value),
198
+ source: `${a.source}\u2297${b.source}`,
199
+ context: weightA >= weightB ? a.context : b.context
200
+ };
201
+ }
115
202
  switch (rule.strategy) {
116
203
  case "max":
117
204
  return {
@@ -155,18 +242,22 @@ var init_ProvenanceSemiring = __esm({
155
242
  if (weightA !== weightB) {
156
243
  return weightA > weightB ? a : b;
157
244
  }
158
- throw new Error(`Unresolved domain override on '${property}': @${a.source} vs @${b.source}`);
245
+ throw new Error(
246
+ `Unresolved domain override on '${property}': @${a.source} vs @${b.source}`
247
+ );
159
248
  }
160
249
  }
161
250
  case "strict-error":
162
251
  default:
163
- throw new Error(`Composition conflict: @${a.source} and @${b.source} both supply '${property}' = ${a.value} vs ${b.value}`);
252
+ throw new Error(
253
+ `Composition conflict: @${a.source} and @${b.source} both supply '${property}' = ${a.value} vs ${b.value}`
254
+ );
164
255
  }
165
256
  }
166
257
  };
167
258
  }
168
259
  });
169
260
 
170
- export { ProvenanceSemiring, authorityWeight, init_ProvenanceSemiring };
171
- //# sourceMappingURL=chunk-UQW6SLM5.js.map
172
- //# sourceMappingURL=chunk-UQW6SLM5.js.map
261
+ export { AuthorityTier, MaxPlusSemiring, MinPlusSemiring, ProvenanceSemiring, SumProductSemiring, TRAIT_ZERO, authorityWeight, createDeadElement, init_ProvenanceSemiring, init_Semiring, isDeadElement, strategyToSemiring };
262
+ //# sourceMappingURL=chunk-A7PIMZGU.js.map
263
+ //# sourceMappingURL=chunk-A7PIMZGU.js.map