@holoscript/core 8.0.13 → 8.0.14

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 (159) hide show
  1. package/README.md +14 -0
  2. package/bin/holo-decision.mjs +133 -0
  3. package/dist/{GLTFPipeline-L76YTXKA.js → GLTFPipeline-6LS3UDYX.js} +6 -6
  4. package/dist/{GLTFPipeline-ZWJN7GI6.cjs → GLTFPipeline-VTI6PRRQ.cjs} +10 -10
  5. package/dist/{HoloCompositionParser-P4Y3CXKQ.js → HoloCompositionParser-GILABNN3.js} +4 -4
  6. package/dist/{HoloCompositionParser-6GW2BZID.cjs → HoloCompositionParser-ZVRYVEA5.cjs} +11 -11
  7. package/dist/{HoloScriptPlusParser-RFNHRMPE.cjs → HoloScriptPlusParser-WTPRPRPR.cjs} +7 -7
  8. package/dist/{HoloScriptPlusParser-HQV6IJAH.js → HoloScriptPlusParser-ZP53ECSL.js} +4 -4
  9. package/dist/{SceneIRCompiler-KWUFHZ4O.cjs → SceneIRCompiler-7KQ5NKAU.cjs} +11 -11
  10. package/dist/{SceneIRCompiler-63KA3M2F.js → SceneIRCompiler-VX75RB6H.js} +6 -6
  11. package/dist/{chunk-EM2OGPYE.js → chunk-2GKF7JQ6.js} +3 -3
  12. package/dist/{chunk-HVX7QQYK.js → chunk-3KHRZTNW.js} +3 -3
  13. package/dist/{chunk-UTUD6GJI.js → chunk-42Z3SVHQ.js} +3 -3
  14. package/dist/{chunk-A4OOLBZD.js → chunk-47XZ62KM.js} +5 -5
  15. package/dist/{chunk-GGR7QUKK.cjs → chunk-4CRMVEON.cjs} +37 -37
  16. package/dist/{chunk-QBY7LRN2.js → chunk-4NEPHK2K.js} +3 -3
  17. package/dist/{chunk-65S62L4D.cjs → chunk-5B2AJKA5.cjs} +20 -20
  18. package/dist/{chunk-PJFTTSKE.js → chunk-5T6BWIB7.js} +4 -4
  19. package/dist/{chunk-KFVNCW4Q.js → chunk-62OYZT6Q.js} +3 -3
  20. package/dist/{chunk-Y57AVOM2.cjs → chunk-645EWDZW.cjs} +4 -4
  21. package/dist/{chunk-BP4KTMLY.js → chunk-6FCNMTL5.js} +4 -4
  22. package/dist/{chunk-77QI552M.js → chunk-73EDVY5D.js} +3 -3
  23. package/dist/{chunk-7IDJDMPU.cjs → chunk-7FYSSI3C.cjs} +27 -2
  24. package/dist/{chunk-WNYXT4TE.cjs → chunk-7ITJP33Q.cjs} +3 -3
  25. package/dist/chunk-7ZKQ32XK.js +1571 -0
  26. package/dist/{chunk-P7JEKJTZ.cjs → chunk-B6JHTTMR.cjs} +25 -14
  27. package/dist/{chunk-FG6PYGIZ.js → chunk-BLCWQ225.js} +4 -4
  28. package/dist/{chunk-FRSKLX6I.js → chunk-C73GVAYC.js} +10 -7
  29. package/dist/{chunk-PXVAPGTR.cjs → chunk-CESMPUEZ.cjs} +3774 -1138
  30. package/dist/{chunk-SQXAZHDG.js → chunk-CHIZSMWD.js} +3 -3
  31. package/dist/{chunk-G35CAQ7I.cjs → chunk-D44CEFY4.cjs} +5 -5
  32. package/dist/{chunk-TC7JEO6R.cjs → chunk-ERYKKPHW.cjs} +711 -52
  33. package/dist/{chunk-DJ5BNRIS.js → chunk-EYHPTJ3F.js} +3675 -1046
  34. package/dist/{chunk-J3UHV5T4.cjs → chunk-FGXJPJ3W.cjs} +4 -4
  35. package/dist/{chunk-IJU6AS67.cjs → chunk-FHR2AVMA.cjs} +23 -23
  36. package/dist/{chunk-LMB555QB.cjs → chunk-FOM36K5I.cjs} +18 -18
  37. package/dist/{chunk-ZRPALBQB.cjs → chunk-GGH3ZYDB.cjs} +5 -5
  38. package/dist/{chunk-2BYAUHBO.js → chunk-GI5YYZH6.js} +3 -3
  39. package/dist/{chunk-VTEXJOSD.cjs → chunk-GYJLP4BO.cjs} +30 -30
  40. package/dist/{chunk-OC6GV5QH.cjs → chunk-HCONR4J6.cjs} +38 -38
  41. package/dist/{chunk-B3CWTCK2.js → chunk-IA7FCSRY.js} +27 -2
  42. package/dist/{chunk-5FYMCVBY.js → chunk-IXFNA5TT.js} +4 -4
  43. package/dist/{chunk-G6KACNMO.js → chunk-JCVSCKUH.js} +4 -4
  44. package/dist/{chunk-FHVPN7BN.js → chunk-JQCXLKAU.js} +3 -3
  45. package/dist/{chunk-F3YT6GUF.cjs → chunk-KLM6QD6D.cjs} +14 -14
  46. package/dist/{chunk-UGQ3QNV6.js → chunk-KOGPVAP6.js} +24 -8
  47. package/dist/{chunk-CKV5NYAE.js → chunk-KYJD2UMV.js} +4 -4
  48. package/dist/{chunk-LB3ZZMKT.cjs → chunk-L4DBUX3N.cjs} +10 -10
  49. package/dist/{chunk-RXQNRZ5F.js → chunk-LGRKBTPM.js} +3 -3
  50. package/dist/{chunk-PDXX5UI4.cjs → chunk-LQNL3IYV.cjs} +38 -38
  51. package/dist/{chunk-WWNCM473.js → chunk-M7XR3F53.js} +4 -4
  52. package/dist/{chunk-IFW5IW4L.cjs → chunk-ML4V5PVU.cjs} +670 -627
  53. package/dist/{chunk-Q4K2GEMW.cjs → chunk-N7IYRAFG.cjs} +13 -10
  54. package/dist/chunk-N7MIIDLI.cjs +1605 -0
  55. package/dist/{chunk-G6EKZHXY.js → chunk-NWKARJM2.js} +4 -4
  56. package/dist/{chunk-VVAAZITA.cjs → chunk-OOP4S3GU.cjs} +5 -5
  57. package/dist/{chunk-U3D4SYQ5.js → chunk-ORBVCOTC.js} +3 -3
  58. package/dist/{chunk-RRQIAJLQ.cjs → chunk-OSKGCXAQ.cjs} +5 -5
  59. package/dist/{chunk-QEDMOGF3.cjs → chunk-P65OIMJT.cjs} +7 -7
  60. package/dist/{chunk-QM7FJB5W.js → chunk-PSWCJQS4.js} +4 -4
  61. package/dist/{chunk-RZ2EPXO3.cjs → chunk-PZ46WRHX.cjs} +8 -8
  62. package/dist/{chunk-AATYYLYK.js → chunk-Q4J2K7FI.js} +16 -5
  63. package/dist/{chunk-ONPVM4IV.js → chunk-QLPRI3QW.js} +698 -45
  64. package/dist/{chunk-WTH23ISI.js → chunk-R5VKLUMR.js} +4 -4
  65. package/dist/{chunk-NQN5LFN4.cjs → chunk-REN3LHO6.cjs} +19 -19
  66. package/dist/{chunk-JEJ7TT54.js → chunk-RVN7OPCP.js} +4 -4
  67. package/dist/{chunk-ZK7KX5CD.cjs → chunk-SE2Y5BSL.cjs} +6 -6
  68. package/dist/{chunk-2X3IPCBK.cjs → chunk-SKVBUGMC.cjs} +7 -7
  69. package/dist/{chunk-GZPUA2TL.cjs → chunk-SNMQUWIO.cjs} +10 -10
  70. package/dist/{chunk-OIBRWLPY.cjs → chunk-TKDDIE3T.cjs} +54 -3
  71. package/dist/{chunk-SQAAWO4V.cjs → chunk-TMNAKNV2.cjs} +5 -5
  72. package/dist/{chunk-5LVFTGKH.js → chunk-TZQKJOPC.js} +3 -3
  73. package/dist/{chunk-TSTFYGGX.js → chunk-UKEK2NZJ.js} +3 -3
  74. package/dist/{chunk-3IUHTGDD.cjs → chunk-VA7THINF.cjs} +38 -38
  75. package/dist/{chunk-Z557DVYN.js → chunk-VMCR5QVI.js} +4 -4
  76. package/dist/{chunk-IS7NTKY5.cjs → chunk-VTFLKSJL.cjs} +14 -14
  77. package/dist/{chunk-RVNXBF2M.js → chunk-VXHB6ZHY.js} +4 -4
  78. package/dist/{chunk-S4O7CFHQ.cjs → chunk-VZI7S7P6.cjs} +7 -7
  79. package/dist/{chunk-BQJ3YBF3.js → chunk-W4AJMMQR.js} +667 -628
  80. package/dist/{chunk-2KKOYZYI.cjs → chunk-XZC75AJ4.cjs} +5 -5
  81. package/dist/{chunk-FWCHPCD4.js → chunk-Y2OCKXVD.js} +4 -4
  82. package/dist/{chunk-XF63CZ7E.cjs → chunk-YBM34FUJ.cjs} +6 -6
  83. package/dist/{chunk-DUG3OQAS.js → chunk-YDSNDCV3.js} +3 -3
  84. package/dist/{chunk-566ZB4LZ.cjs → chunk-YM7UUYR5.cjs} +5 -5
  85. package/dist/{chunk-BCP4E7MD.cjs → chunk-YMI3ED3B.cjs} +26 -10
  86. package/dist/{chunk-CP7V3ATL.js → chunk-Z7NUL73U.js} +51 -4
  87. package/dist/cli/holoscript-runner.cjs +10 -10
  88. package/dist/cli/holoscript-runner.js +3 -3
  89. package/dist/compiler/agent-inference.cjs +8 -8
  90. package/dist/compiler/agent-inference.js +4 -4
  91. package/dist/compiler/android-xr.cjs +7 -7
  92. package/dist/compiler/android-xr.js +5 -5
  93. package/dist/compiler/android.cjs +6 -6
  94. package/dist/compiler/android.js +4 -4
  95. package/dist/compiler/context.cjs +6 -6
  96. package/dist/compiler/context.js +3 -3
  97. package/dist/compiler/daimon-seed.cjs +9 -9
  98. package/dist/compiler/daimon-seed.js +4 -4
  99. package/dist/compiler/domain-block-utils.cjs +165 -165
  100. package/dist/compiler/domain-block-utils.js +4 -4
  101. package/dist/compiler/dtdl.cjs +7 -7
  102. package/dist/compiler/dtdl.js +4 -4
  103. package/dist/compiler/gltf-pipeline.cjs +8 -8
  104. package/dist/compiler/gltf-pipeline.js +1 -1
  105. package/dist/compiler/godot.cjs +6 -6
  106. package/dist/compiler/godot.js +5 -5
  107. package/dist/compiler/incremental.cjs +8 -8
  108. package/dist/compiler/incremental.js +3 -3
  109. package/dist/compiler/index.cjs +871 -207
  110. package/dist/compiler/index.d.ts +21 -1
  111. package/dist/compiler/index.js +696 -60
  112. package/dist/compiler/ios.cjs +6 -6
  113. package/dist/compiler/ios.js +4 -4
  114. package/dist/compiler/llm-provider-capabilities.cjs +6 -6
  115. package/dist/compiler/llm-provider-capabilities.js +3 -3
  116. package/dist/compiler/openxr.cjs +6 -6
  117. package/dist/compiler/openxr.js +5 -5
  118. package/dist/compiler/sdf.cjs +7 -7
  119. package/dist/compiler/sdf.js +5 -5
  120. package/dist/compiler/state.cjs +6 -6
  121. package/dist/compiler/state.js +4 -4
  122. package/dist/compiler/trait-composition.cjs +7 -7
  123. package/dist/compiler/trait-composition.js +3 -3
  124. package/dist/compiler/unity.cjs +6 -6
  125. package/dist/compiler/unity.js +5 -5
  126. package/dist/compiler/unreal.cjs +7 -7
  127. package/dist/compiler/unreal.js +5 -5
  128. package/dist/compiler/urdf.cjs +14 -14
  129. package/dist/compiler/urdf.js +5 -5
  130. package/dist/compiler/usd-physics.cjs +7 -7
  131. package/dist/compiler/usd-physics.js +4 -4
  132. package/dist/compiler/visionos.cjs +6 -6
  133. package/dist/compiler/visionos.js +5 -5
  134. package/dist/compiler/vrchat.cjs +7 -7
  135. package/dist/compiler/vrchat.js +5 -5
  136. package/dist/compiler/wasm.cjs +10 -10
  137. package/dist/compiler/wasm.js +5 -5
  138. package/dist/compiler/webgpu.cjs +6 -6
  139. package/dist/compiler/webgpu.js +5 -5
  140. package/dist/entries/scripting.cjs +5 -5
  141. package/dist/entries/scripting.js +1 -1
  142. package/dist/evolution/index.cjs +17 -17
  143. package/dist/evolution/index.js +5 -5
  144. package/dist/index.cjs +915 -704
  145. package/dist/index.d.ts +70 -5
  146. package/dist/index.js +191 -108
  147. package/dist/parser.cjs +18 -18
  148. package/dist/parser.js +4 -4
  149. package/dist/reconstruction/index.cjs +127 -38
  150. package/dist/reconstruction/index.d.ts +159 -0
  151. package/dist/reconstruction/index.js +11 -2
  152. package/dist/runtime.d.ts +1 -0
  153. package/dist/traitDocs/traitDocs.cjs +8 -8
  154. package/dist/traitDocs/traitDocs.js +2 -2
  155. package/dist/traits/index.cjs +566 -471
  156. package/dist/traits/index.js +93 -11
  157. package/package.json +20 -16
  158. package/dist/chunk-DVHZD5HV.cjs +0 -639
  159. package/dist/chunk-G72754QB.js +0 -625
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkQEDMOGF3_cjs = require('./chunk-QEDMOGF3.cjs');
4
- var chunkZK7KX5CD_cjs = require('./chunk-ZK7KX5CD.cjs');
3
+ var chunkP65OIMJT_cjs = require('./chunk-P65OIMJT.cjs');
4
+ var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
5
5
  var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
6
6
  var ans = require('@holoscript/core-types/ans');
7
7
 
@@ -205,9 +205,9 @@ function generateControllersYaml(robotName, jointNames, options) {
205
205
  exports.URDFCompiler = void 0; exports.URDFCompiler_default = void 0;
206
206
  var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
207
207
  "src/compiler/URDFCompiler.ts"() {
208
- chunkZK7KX5CD_cjs.init_CompilerBase();
209
- chunkQEDMOGF3_cjs.init_DomainBlockCompilerMixin();
210
- exports.URDFCompiler = class extends chunkZK7KX5CD_cjs.CompilerBase {
208
+ chunkSE2Y5BSL_cjs.init_CompilerBase();
209
+ chunkP65OIMJT_cjs.init_DomainBlockCompilerMixin();
210
+ exports.URDFCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
211
211
  constructor(options = {}) {
212
212
  super();
213
213
  this.compilerName = "URDFCompiler";
@@ -572,11 +572,11 @@ var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
572
572
  if (domainBlocks.length === 0) return;
573
573
  this.emitBlank();
574
574
  this.emit("<!-- v4.2 Domain Blocks -->");
575
- const compiled = chunkQEDMOGF3_cjs.compileDomainBlocks(
575
+ const compiled = chunkP65OIMJT_cjs.compileDomainBlocks(
576
576
  domainBlocks,
577
577
  {
578
578
  material: (block) => {
579
- const mat = chunkQEDMOGF3_cjs.compileMaterialBlock(block);
579
+ const mat = chunkP65OIMJT_cjs.compileMaterialBlock(block);
580
580
  const lines = [];
581
581
  lines.push(
582
582
  `<material name="${this.escapeStringValue(mat.name, "TypeScript")}">`
@@ -597,15 +597,15 @@ var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
597
597
  return lines.join("\n");
598
598
  },
599
599
  physics: (block) => {
600
- const phys = chunkQEDMOGF3_cjs.compilePhysicsBlock(block);
601
- return chunkQEDMOGF3_cjs.physicsToURDF(phys);
600
+ const phys = chunkP65OIMJT_cjs.compilePhysicsBlock(block);
601
+ return chunkP65OIMJT_cjs.physicsToURDF(phys);
602
602
  },
603
603
  audio: (block) => {
604
- const audio = chunkQEDMOGF3_cjs.compileAudioSourceBlock(block);
604
+ const audio = chunkP65OIMJT_cjs.compileAudioSourceBlock(block);
605
605
  return `<!-- Audio: ${this.escapeStringValue(audio.name, "TypeScript")} (${audio.keyword}) clip="${audio.properties.clip || ""}" volume="${audio.properties.volume ?? 1}" -->`;
606
606
  },
607
607
  weather: (block) => {
608
- const weather = chunkQEDMOGF3_cjs.compileWeatherBlock(block);
608
+ const weather = chunkP65OIMJT_cjs.compileWeatherBlock(block);
609
609
  return `<!-- Weather: ${weather.keyword} "${weather.name || ""}" layers: ${weather.layers.map((l) => l.type).join(", ")} -->`;
610
610
  }
611
611
  },
@@ -777,17 +777,28 @@ var init_URDFCompiler = chunkZHPMP447_cjs.__esm({
777
777
  inertia: { ixx: 1e-3, ixy: 0, ixz: 0, iyy: 1e-3, iyz: 0, izz: 1e-3 }
778
778
  }
779
779
  });
780
+ const groupPos = group.properties?.find((p) => p.key === "position")?.value;
781
+ const [gx, gy, gz] = Array.isArray(groupPos) ? groupPos : [0, 0, 0];
780
782
  this.joints.push({
781
783
  name: `${parentLink}_to_${groupLinkName}_joint`,
782
784
  type: "fixed",
783
785
  parent: parentLink,
784
- child: groupLinkName
786
+ child: groupLinkName,
787
+ origin: {
788
+ xyz: [gx, gy, gz],
789
+ rpy: [0, 0, 0]
790
+ }
785
791
  });
786
792
  if (group.objects) {
787
793
  for (const obj of group.objects) {
788
794
  this.processObject(obj, groupLinkName, actuatedJoints);
789
795
  }
790
796
  }
797
+ if (group.groups) {
798
+ for (const sub of group.groups) {
799
+ this.processSpatialGroup(sub, groupLinkName, actuatedJoints);
800
+ }
801
+ }
791
802
  }
792
803
  /** Process @sensor trait into sensor definition */
793
804
  processSensorTrait(config, parentLink) {
@@ -1417,5 +1428,5 @@ exports.createURDFCompiler = createURDFCompiler;
1417
1428
  exports.generateControllersYaml = generateControllersYaml;
1418
1429
  exports.generateROS2LaunchFile = generateROS2LaunchFile;
1419
1430
  exports.init_URDFCompiler = init_URDFCompiler;
1420
- //# sourceMappingURL=chunk-P7JEKJTZ.cjs.map
1421
- //# sourceMappingURL=chunk-P7JEKJTZ.cjs.map
1431
+ //# sourceMappingURL=chunk-B6JHTTMR.cjs.map
1432
+ //# sourceMappingURL=chunk-B6JHTTMR.cjs.map
@@ -1,5 +1,5 @@
1
- import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, physicsToURDF, compileMaterialBlock, materialToUSD } from './chunk-5LVFTGKH.js';
2
- import { init_CompilerBase, CompilerBase } from './chunk-DUG3OQAS.js';
1
+ import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, physicsToURDF, compileMaterialBlock, materialToUSD } from './chunk-TZQKJOPC.js';
2
+ import { init_CompilerBase, CompilerBase } from './chunk-YDSNDCV3.js';
3
3
  import { ANSCapabilityPath } from '@holoscript/core-types/ans';
4
4
 
5
5
  // src/compiler/USDPhysicsCompiler.ts
@@ -886,5 +886,5 @@ function compileForIsaacSim(composition, options) {
886
886
  }
887
887
 
888
888
  export { USDPhysicsCompiler, compileForIsaacSim, compileToUSDPhysics };
889
- //# sourceMappingURL=chunk-FG6PYGIZ.js.map
890
- //# sourceMappingURL=chunk-FG6PYGIZ.js.map
889
+ //# sourceMappingURL=chunk-BLCWQ225.js.map
890
+ //# sourceMappingURL=chunk-BLCWQ225.js.map
@@ -1,4 +1,4 @@
1
- import { ErrorRecovery, generateQuickFixes, enrichErrorWithSuggestions } from './chunk-CP7V3ATL.js';
1
+ import { ErrorRecovery, generateQuickFixes, enrichErrorWithSuggestions, RUNTIME_DIRECTIVE_TRAITS } from './chunk-Z7NUL73U.js';
2
2
  import { isBrainKeyword, isCognitiveVerb, nearestCognitiveVerb } from './chunk-UNMVGZVW.js';
3
3
  import { LIFECYCLE_HOOKS, STRUCTURAL_DIRECTIVES } from './chunk-FWKEY4LD.js';
4
4
  import { VR_TRAITS } from './chunk-2EGGAZT3.js';
@@ -3271,10 +3271,13 @@ var HoloScriptPlusParser = class _HoloScriptPlusParser {
3271
3271
  const config2 = this.check("LBRACE") ? this.parseBlockContent() : this.parseTraitConfig();
3272
3272
  return { ...config2, type: name, name: nodeName };
3273
3273
  }
3274
- if (this.options.strict) {
3275
- this.traitError(name);
3276
- } else {
3277
- this.warn(`Unknown directive @${name}`);
3274
+ const isKnownRuntimeDirective = RUNTIME_DIRECTIVE_TRAITS.includes(name);
3275
+ if (!isKnownRuntimeDirective) {
3276
+ if (this.options.strict) {
3277
+ this.traitError(name);
3278
+ } else {
3279
+ this.warn(`Unknown directive @${name}`);
3280
+ }
3278
3281
  }
3279
3282
  let config = {};
3280
3283
  let configStyle = "none";
@@ -6251,5 +6254,5 @@ function parse(source, options) {
6251
6254
  }
6252
6255
 
6253
6256
  export { ChunkBasedIncrementalParser, HSPLUS_ERROR_CODES, HoloScriptPlusParser, ParseCache, createKeywordError, createParser, createRichError, createTraitError, findSimilarKeyword, findSimilarTrait, formatRichError, formatRichErrors, getErrorCodeDocumentation, getSourceContext, globalParseCache, parse, parseIncrementalChunks };
6254
- //# sourceMappingURL=chunk-FRSKLX6I.js.map
6255
- //# sourceMappingURL=chunk-FRSKLX6I.js.map
6257
+ //# sourceMappingURL=chunk-C73GVAYC.js.map
6258
+ //# sourceMappingURL=chunk-C73GVAYC.js.map