@holoscript/core 6.1.3 → 8.0.0

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 (166) hide show
  1. package/dist/{GLTFPipeline-SFIORFJU.js → GLTFPipeline-276GE64O.js} +6 -6
  2. package/dist/{GLTFPipeline-VNNDPONV.cjs → GLTFPipeline-M7WSSJED.cjs} +10 -10
  3. package/dist/HoloScriptRuntime-3URVTKPJ.js +10 -0
  4. package/dist/HoloScriptRuntime-SXEAEU2N.cjs +19 -0
  5. package/dist/{chunk-2B7WVIDZ.js → chunk-23J755AR.js} +4 -4
  6. package/dist/{chunk-HANL7K2Q.cjs → chunk-253GBQZY.cjs} +38 -38
  7. package/dist/{chunk-KQTPCYTG.cjs → chunk-25IQCHTO.cjs} +38 -38
  8. package/dist/{chunk-V73NPPTM.cjs → chunk-3AO425MZ.cjs} +20 -20
  9. package/dist/{chunk-6S6TKNEA.cjs → chunk-3HYYMEXI.cjs} +279 -124
  10. package/dist/{chunk-IHESJZSW.js → chunk-3NFFOWGG.js} +6 -209
  11. package/dist/{chunk-AO4I2Z7M.cjs → chunk-3WZEJHUQ.cjs} +7 -7
  12. package/dist/{chunk-IRWWS72C.cjs → chunk-4V2E7U7Q.cjs} +7 -7
  13. package/dist/{chunk-ER4GATIU.js → chunk-62FBK3B7.js} +6 -6
  14. package/dist/{chunk-L63H3SQ4.cjs → chunk-6DPSFNJB.cjs} +19 -19
  15. package/dist/{chunk-XFXGA5IW.cjs → chunk-73FELZVJ.cjs} +14 -14
  16. package/dist/{chunk-QWNQ523V.cjs → chunk-7CUEMLDZ.cjs} +47 -47
  17. package/dist/{chunk-52ULD552.cjs → chunk-7HIASF7S.cjs} +13 -13
  18. package/dist/{chunk-U4NBQJBY.js → chunk-ANXZFVY2.js} +3 -3
  19. package/dist/{chunk-NHHVLKV3.js → chunk-AYBXB26F.js} +5 -5
  20. package/dist/{chunk-KX76JUQY.js → chunk-B4TFTDG4.js} +3 -3
  21. package/dist/{chunk-OEFY723R.js → chunk-BE4UJCQT.js} +4 -4
  22. package/dist/{chunk-DIL6DDDN.cjs → chunk-C2A5DUMF.cjs} +38 -38
  23. package/dist/{chunk-H3MGK7TX.cjs → chunk-CXFDRBQU.cjs} +10 -10
  24. package/dist/{chunk-4SY77NA4.cjs → chunk-D54CNIAJ.cjs} +2 -2
  25. package/dist/{chunk-22W6NGYN.js → chunk-DAJXW4KX.js} +3 -3
  26. package/dist/{chunk-RUXGBKPS.cjs → chunk-EUDQTK7N.cjs} +15 -222
  27. package/dist/{chunk-SXYLMIGP.js → chunk-F43YAA34.js} +3 -3
  28. package/dist/{chunk-H5DZIHJP.cjs → chunk-FYSPZT4V.cjs} +7 -7
  29. package/dist/{chunk-TK74TR4H.js → chunk-GIOYPNTH.js} +36 -2
  30. package/dist/{chunk-2HLIGOKU.cjs → chunk-GQHQOPXZ.cjs} +36 -2
  31. package/dist/{chunk-BPICAGBV.cjs → chunk-GQT4TYKY.cjs} +35 -35
  32. package/dist/{chunk-QAVXL2IH.js → chunk-GYZE55MO.js} +3 -3
  33. package/dist/{chunk-77V4GTCA.js → chunk-H652NHX5.js} +78 -74
  34. package/dist/{chunk-KHPCJRI3.cjs → chunk-HINXWAOD.cjs} +14 -14
  35. package/dist/{chunk-W6P2GBHH.cjs → chunk-HZSPDCXV.cjs} +3 -3
  36. package/dist/{chunk-EMMC5CSQ.js → chunk-HZTDET3N.js} +4 -4
  37. package/dist/{chunk-5CKA5SXU.js → chunk-IPWSXCCN.js} +4 -4
  38. package/dist/{chunk-GQYKQSTC.cjs → chunk-IUTY5WQ2.cjs} +5 -5
  39. package/dist/{chunk-MSMIFMBL.js → chunk-IVSZDECV.js} +4 -4
  40. package/dist/{chunk-2A7FURVO.js → chunk-IZM5VQZD.js} +4 -4
  41. package/dist/{chunk-33XCOVE3.js → chunk-J6M4FPK5.js} +3 -3
  42. package/dist/{chunk-6KMK2UXT.cjs → chunk-JC5YBPSF.cjs} +5 -5
  43. package/dist/{chunk-W55Z7QIX.js → chunk-JCLBKPMX.js} +3 -3
  44. package/dist/{chunk-MXJ5SS53.cjs → chunk-JJBE3TIH.cjs} +10 -10
  45. package/dist/{chunk-HRODTEEO.js → chunk-JX7YL6ZE.js} +5 -5
  46. package/dist/{chunk-IVIA7K75.cjs → chunk-K4VVR7CN.cjs} +18 -18
  47. package/dist/{chunk-VSK7W3O5.cjs → chunk-KEFNV2WM.cjs} +16 -16
  48. package/dist/{chunk-HZCQO4JM.cjs → chunk-KH4CNH66.cjs} +4 -4
  49. package/dist/{chunk-6FGQNDR4.js → chunk-KJLB4OPV.js} +4 -4
  50. package/dist/{chunk-RMHC2VG7.cjs → chunk-KKP7JKN4.cjs} +6 -2
  51. package/dist/{chunk-OEV5RMZO.cjs → chunk-KQCN6AKJ.cjs} +5 -5
  52. package/dist/{chunk-7AD52FRS.cjs → chunk-KVRSTFNH.cjs} +14 -14
  53. package/dist/{chunk-ZKSS47EV.cjs → chunk-LICPB5HZ.cjs} +13 -13
  54. package/dist/{chunk-S5IFXW6E.js → chunk-MGE5Z4GS.js} +4 -4
  55. package/dist/{chunk-6L4VE27M.js → chunk-NBMHU6SW.js} +4 -4
  56. package/dist/{chunk-QCCBXSCE.js → chunk-NGKREZ36.js} +5 -5
  57. package/dist/{chunk-27MPVJVZ.cjs → chunk-NHWSN2SD.cjs} +21 -21
  58. package/dist/{chunk-XMWZG36H.js → chunk-NV4VMVXU.js} +3 -3
  59. package/dist/{chunk-Y3MWXQSB.cjs → chunk-NXZFOPVD.cjs} +19 -19
  60. package/dist/{chunk-ZUL5AVTX.cjs → chunk-OBIYPYYS.cjs} +5 -5
  61. package/dist/{chunk-ZXBZVXDW.js → chunk-OMXII44L.js} +3 -3
  62. package/dist/{chunk-MJVIRCUV.cjs → chunk-OR4Q2BGL.cjs} +18 -18
  63. package/dist/{chunk-6ASWLXXN.js → chunk-PHVRG4I2.js} +4 -4
  64. package/dist/{chunk-QTPMJRGS.js → chunk-QPSKHBJP.js} +6 -2
  65. package/dist/{chunk-VEXPG4WN.js → chunk-QXH7QDSZ.js} +3 -3
  66. package/dist/chunk-RARB3MBR.js +207 -0
  67. package/dist/{chunk-EOBB6A4B.js → chunk-RVBHAXFG.js} +231 -76
  68. package/dist/{chunk-XXZJEFKW.cjs → chunk-S3MDHNKB.cjs} +5 -5
  69. package/dist/{chunk-4UUKPCY4.js → chunk-S4W6Z2MN.js} +4 -4
  70. package/dist/{chunk-BVLP6D3Q.cjs → chunk-SJBGLS25.cjs} +5 -5
  71. package/dist/chunk-SMIWS6DE.cjs +212 -0
  72. package/dist/{chunk-R3IVNY6P.js → chunk-T2QCTZMO.js} +4 -4
  73. package/dist/{chunk-AIX25INK.cjs → chunk-TVHSPJ4N.cjs} +79 -75
  74. package/dist/{chunk-Z5XMPRNC.cjs → chunk-U44IKGG7.cjs} +30 -30
  75. package/dist/{chunk-OPZ7XDDI.js → chunk-UJXISJBN.js} +3 -3
  76. package/dist/{chunk-FXKTYFYA.js → chunk-UM6C3CGK.js} +4 -4
  77. package/dist/{chunk-LAOCQJ2M.js → chunk-UMABK6SI.js} +4 -4
  78. package/dist/{chunk-GN3KDX4W.js → chunk-V6MKC2FZ.js} +3 -3
  79. package/dist/{chunk-EDPQSGB3.cjs → chunk-W7VDOASB.cjs} +5 -5
  80. package/dist/{chunk-DMXC24WV.js → chunk-WJIHFLMJ.js} +2 -2
  81. package/dist/{chunk-UDMYRFDZ.js → chunk-WRKUDAZJ.js} +3 -3
  82. package/dist/{chunk-GCMWDSBZ.cjs → chunk-XIVIE43A.cjs} +5 -5
  83. package/dist/{chunk-UD3DSHZM.js → chunk-XKTPFXGA.js} +3 -3
  84. package/dist/{chunk-HGVXZDSK.cjs → chunk-XUUVDHIF.cjs} +7 -7
  85. package/dist/{chunk-5N54COB6.cjs → chunk-YN6V7R3L.cjs} +13 -13
  86. package/dist/{chunk-I2O7TW6B.js → chunk-ZBQXLH2L.js} +4 -4
  87. package/dist/{chunk-EOFNVCM6.js → chunk-ZU7NIRT6.js} +11 -11
  88. package/dist/{chunk-P7YIA5LN.js → chunk-ZZEI7MV4.js} +4 -4
  89. package/dist/compiler/agent-inference.cjs +6 -6
  90. package/dist/compiler/agent-inference.js +2 -2
  91. package/dist/compiler/android-xr.cjs +6 -6
  92. package/dist/compiler/android-xr.js +4 -4
  93. package/dist/compiler/android.cjs +5 -5
  94. package/dist/compiler/android.js +3 -3
  95. package/dist/compiler/ar.cjs +5 -5
  96. package/dist/compiler/ar.js +3 -3
  97. package/dist/compiler/babylon.cjs +5 -5
  98. package/dist/compiler/babylon.js +4 -4
  99. package/dist/compiler/business-quest.cjs +9 -9
  100. package/dist/compiler/business-quest.js +1 -1
  101. package/dist/compiler/context.cjs +5 -5
  102. package/dist/compiler/context.js +2 -2
  103. package/dist/compiler/domain-block-utils.cjs +151 -151
  104. package/dist/compiler/domain-block-utils.js +3 -3
  105. package/dist/compiler/dtdl.cjs +6 -6
  106. package/dist/compiler/dtdl.js +3 -3
  107. package/dist/compiler/gltf-pipeline.cjs +8 -8
  108. package/dist/compiler/gltf-pipeline.js +1 -1
  109. package/dist/compiler/godot.cjs +5 -5
  110. package/dist/compiler/godot.js +4 -4
  111. package/dist/compiler/incremental.cjs +7 -7
  112. package/dist/compiler/incremental.js +2 -2
  113. package/dist/compiler/index.cjs +182 -182
  114. package/dist/compiler/index.js +56 -56
  115. package/dist/compiler/ios.cjs +5 -5
  116. package/dist/compiler/ios.js +3 -3
  117. package/dist/compiler/llm-provider-capabilities.cjs +5 -5
  118. package/dist/compiler/llm-provider-capabilities.js +2 -2
  119. package/dist/compiler/multi-layer.cjs +7 -7
  120. package/dist/compiler/multi-layer.js +6 -6
  121. package/dist/compiler/openxr.cjs +5 -5
  122. package/dist/compiler/openxr.js +4 -4
  123. package/dist/compiler/playcanvas.cjs +5 -5
  124. package/dist/compiler/playcanvas.js +4 -4
  125. package/dist/compiler/r3f.cjs +9 -9
  126. package/dist/compiler/r3f.js +4 -4
  127. package/dist/compiler/sdf.cjs +6 -6
  128. package/dist/compiler/sdf.js +4 -4
  129. package/dist/compiler/state.cjs +5 -5
  130. package/dist/compiler/state.js +3 -3
  131. package/dist/compiler/trait-composition.cjs +6 -6
  132. package/dist/compiler/trait-composition.js +2 -2
  133. package/dist/compiler/unity.cjs +5 -5
  134. package/dist/compiler/unity.js +4 -4
  135. package/dist/compiler/unreal.cjs +6 -6
  136. package/dist/compiler/unreal.js +4 -4
  137. package/dist/compiler/urdf.cjs +13 -13
  138. package/dist/compiler/urdf.js +4 -4
  139. package/dist/compiler/usd-physics.cjs +6 -6
  140. package/dist/compiler/usd-physics.js +3 -3
  141. package/dist/compiler/visionos.cjs +5 -5
  142. package/dist/compiler/visionos.js +4 -4
  143. package/dist/compiler/vrchat.cjs +6 -6
  144. package/dist/compiler/vrchat.js +4 -4
  145. package/dist/compiler/vrr.cjs +6 -6
  146. package/dist/compiler/vrr.js +4 -4
  147. package/dist/compiler/wasm.cjs +9 -9
  148. package/dist/compiler/wasm.js +4 -4
  149. package/dist/compiler/webgpu.cjs +5 -5
  150. package/dist/compiler/webgpu.js +4 -4
  151. package/dist/debugger.cjs +7 -6
  152. package/dist/debugger.js +5 -4
  153. package/dist/entries/scripting.cjs +0 -13
  154. package/dist/entries/scripting.js +0 -1
  155. package/dist/index.cjs +1002 -881
  156. package/dist/index.js +506 -87
  157. package/dist/parser.cjs +5 -5
  158. package/dist/parser.js +1 -1
  159. package/dist/reconstruction/index.cjs +31 -31
  160. package/dist/reconstruction/index.js +2 -2
  161. package/dist/runtime.cjs +302 -4
  162. package/dist/runtime.d.ts +61 -0
  163. package/dist/runtime.js +25 -3
  164. package/dist/traits/index.cjs +450 -439
  165. package/dist/traits/index.js +24 -13
  166. package/package.json +20 -20
@@ -1,8 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkJIYN45TV_cjs = require('./chunk-JIYN45TV.cjs');
4
3
  var chunkGJNCFRJU_cjs = require('./chunk-GJNCFRJU.cjs');
5
- var chunkAIX25INK_cjs = require('./chunk-AIX25INK.cjs');
4
+ var chunkSMIWS6DE_cjs = require('./chunk-SMIWS6DE.cjs');
5
+ var chunkJIYN45TV_cjs = require('./chunk-JIYN45TV.cjs');
6
+ var chunkTVHSPJ4N_cjs = require('./chunk-TVHSPJ4N.cjs');
6
7
  var chunkILRBGFVD_cjs = require('./chunk-ILRBGFVD.cjs');
7
8
  var chunkE7JP3BS3_cjs = require('./chunk-E7JP3BS3.cjs');
8
9
  var ws = require('ws');
@@ -2412,210 +2413,6 @@ async function evaluateHoloExpression(expr, scopeOverride, ctx) {
2412
2413
  return void 0;
2413
2414
  }
2414
2415
  }
2415
-
2416
- // src/events/EventBus.ts
2417
- var EventBus = class {
2418
- constructor() {
2419
- this.listeners = /* @__PURE__ */ new Map();
2420
- this.history = [];
2421
- this.maxHistory = 100;
2422
- this.nextId = 0;
2423
- this.paused = false;
2424
- }
2425
- /**
2426
- * Subscribe to an event.
2427
- */
2428
- on(event, callback, priority = 0) {
2429
- const id = this.nextId++;
2430
- const list = this.listeners.get(event) || [];
2431
- list.push({ callback, priority, once: false, id });
2432
- list.sort((a, b) => b.priority - a.priority);
2433
- this.listeners.set(event, list);
2434
- return id;
2435
- }
2436
- /**
2437
- * Subscribe to an event once (auto-removes after first fire).
2438
- */
2439
- once(event, callback, priority = 0) {
2440
- const id = this.nextId++;
2441
- const list = this.listeners.get(event) || [];
2442
- list.push({ callback, priority, once: true, id });
2443
- list.sort((a, b) => b.priority - a.priority);
2444
- this.listeners.set(event, list);
2445
- return id;
2446
- }
2447
- /**
2448
- * Unsubscribe by listener ID.
2449
- */
2450
- off(listenerId) {
2451
- for (const [event, list] of this.listeners) {
2452
- const idx = list.findIndex((l) => l.id === listenerId);
2453
- if (idx !== -1) {
2454
- list.splice(idx, 1);
2455
- return;
2456
- }
2457
- }
2458
- }
2459
- /**
2460
- * Unsubscribe all listeners for an event.
2461
- */
2462
- offAll(event) {
2463
- this.listeners.delete(event);
2464
- }
2465
- /**
2466
- * Emit an event to all subscribers.
2467
- */
2468
- emit(event, data) {
2469
- if (this.paused) return;
2470
- this.history.push({ event, data, timestamp: Date.now() });
2471
- if (this.history.length > this.maxHistory) this.history.shift();
2472
- const list = this.listeners.get(event);
2473
- if (list) {
2474
- const toRemove = [];
2475
- for (const listener of list) {
2476
- listener.callback(data);
2477
- if (listener.once) toRemove.push(listener.id);
2478
- }
2479
- for (const id of toRemove) {
2480
- const idx = list.findIndex((l) => l.id === id);
2481
- if (idx !== -1) list.splice(idx, 1);
2482
- }
2483
- }
2484
- if (event !== "*") {
2485
- const wildcardList = this.listeners.get("*");
2486
- if (wildcardList) {
2487
- for (const listener of wildcardList) {
2488
- listener.callback({ event, data });
2489
- }
2490
- }
2491
- }
2492
- }
2493
- /**
2494
- * Get event history.
2495
- */
2496
- getHistory() {
2497
- return [...this.history];
2498
- }
2499
- /**
2500
- * Get listener count for an event.
2501
- */
2502
- listenerCount(event) {
2503
- return this.listeners.get(event)?.length || 0;
2504
- }
2505
- /**
2506
- * Pause/resume event emission.
2507
- */
2508
- setPaused(paused) {
2509
- this.paused = paused;
2510
- }
2511
- /**
2512
- * Clear all listeners and history.
2513
- */
2514
- clear() {
2515
- this.listeners.clear();
2516
- this.history = [];
2517
- }
2518
- };
2519
- var sharedBus = null;
2520
- function getSharedEventBus() {
2521
- if (!sharedBus) sharedBus = new EventBus();
2522
- return sharedBus;
2523
- }
2524
- function setSharedEventBus(bus) {
2525
- sharedBus = bus;
2526
- }
2527
-
2528
- // src/monitoring/telemetry.ts
2529
- var TelemetryRegistry = class {
2530
- constructor() {
2531
- this.measurements = [];
2532
- this.maxHistory = 1e4;
2533
- }
2534
- /**
2535
- * Increments a monotonic counter (e.g., total_nodes_executed)
2536
- */
2537
- incrementCounter(name, value = 1, labels) {
2538
- this.measurements.push({
2539
- name,
2540
- type: "counter",
2541
- value,
2542
- labels,
2543
- timestamp: Date.now()
2544
- });
2545
- if (this.measurements.length > this.maxHistory) this.measurements.shift();
2546
- }
2547
- /**
2548
- * Records an instantaneous value (e.g., active_agents)
2549
- */
2550
- setGauge(name, value, labels) {
2551
- this.measurements.push({
2552
- name,
2553
- type: "gauge",
2554
- value,
2555
- labels,
2556
- timestamp: Date.now()
2557
- });
2558
- if (this.measurements.length > this.maxHistory) this.measurements.shift();
2559
- }
2560
- /**
2561
- * Wraps an async function and records its execution latency into a histogram.
2562
- */
2563
- async measureLatency(name, fn, labels) {
2564
- const start = performance.now();
2565
- try {
2566
- return await fn();
2567
- } finally {
2568
- const duration = performance.now() - start;
2569
- this.measurements.push({
2570
- name,
2571
- type: "histogram",
2572
- value: duration,
2573
- labels,
2574
- timestamp: Date.now()
2575
- });
2576
- if (this.measurements.length > this.maxHistory) this.measurements.shift();
2577
- if (duration > 500) {
2578
- this.measurements.push({
2579
- name: "slo_violation_count",
2580
- type: "counter",
2581
- value: 1,
2582
- labels: { ...labels, metric_name: name, threshold: "500ms" },
2583
- timestamp: Date.now()
2584
- });
2585
- }
2586
- }
2587
- }
2588
- /**
2589
- * Snapshots current aggregations for dashboard export.
2590
- */
2591
- getSnapshot() {
2592
- const snapshot = { counters: {}, histograms: {}, gauges: {} };
2593
- const histAggregations = {};
2594
- for (const m of this.measurements) {
2595
- const key = m.labels ? `${m.name}{${JSON.stringify(m.labels)}}` : m.name;
2596
- if (m.type === "counter") {
2597
- snapshot.counters[key] = (snapshot.counters[key] || 0) + m.value;
2598
- } else if (m.type === "gauge") {
2599
- snapshot.gauges[key] = m.value;
2600
- } else if (m.type === "histogram") {
2601
- if (!histAggregations[key]) histAggregations[key] = { count: 0, sum: 0, max: 0 };
2602
- histAggregations[key].count++;
2603
- histAggregations[key].sum += m.value;
2604
- if (m.value > histAggregations[key].max) histAggregations[key].max = m.value;
2605
- }
2606
- }
2607
- for (const [key, agg] of Object.entries(histAggregations)) {
2608
- snapshot.histograms[key] = {
2609
- count: agg.count,
2610
- sum: agg.sum,
2611
- avg: agg.count > 0 ? agg.sum / agg.count : 0,
2612
- max: agg.max
2613
- };
2614
- }
2615
- return snapshot;
2616
- }
2617
- };
2618
- var telemetry = new TelemetryRegistry();
2619
2416
  function stringProperty(value) {
2620
2417
  return typeof value === "string" ? value : void 0;
2621
2418
  }
@@ -2676,7 +2473,7 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
2676
2473
  // JEPA action-planning loop (Phase 8)
2677
2474
  // Default latentDim=64, condDim=16 (action conditioning). Caller can swap
2678
2475
  // weights externally via this.jepaPredictor.setWeights() after training.
2679
- this.jepaPredictor = new chunkAIX25INK_cjs.JEPAPredictor({ latentDim: 64, condDim: 16 });
2476
+ this.jepaPredictor = new chunkTVHSPJ4N_cjs.JEPAPredictor({ latentDim: 64, condDim: 16 });
2680
2477
  this.jepaObjectiveNode = {};
2681
2478
  this.jepaObjectiveAttached = false;
2682
2479
  if (!agentNode || !parentRuntime) {
@@ -2820,7 +2617,7 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
2820
2617
  ensureJepaObjectiveAttached() {
2821
2618
  if (!this.jepaObjectiveAttached) {
2822
2619
  const config = this.getJepaObjectiveConfig();
2823
- chunkAIX25INK_cjs.jepObjectiveHandler.onAttach?.(
2620
+ chunkTVHSPJ4N_cjs.jepObjectiveHandler.onAttach?.(
2824
2621
  this.jepaObjectiveNode,
2825
2622
  config,
2826
2623
  this.buildJepaTraitContext()
@@ -2829,7 +2626,7 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
2829
2626
  }
2830
2627
  }
2831
2628
  getJepaObjectiveConfig() {
2832
- const config = chunkAIX25INK_cjs.jepObjectiveHandler.defaultConfig;
2629
+ const config = chunkTVHSPJ4N_cjs.jepObjectiveHandler.defaultConfig;
2833
2630
  if (!config) {
2834
2631
  throw new Error("JEPAObjective handler defaultConfig is required for offline training");
2835
2632
  }
@@ -2879,7 +2676,7 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
2879
2676
  const latentDim = config.latentDim;
2880
2677
  const outcomeStr = outcome.success ? `success:${String(outcome.output ?? "")}` : `failure:${String(outcome.error ?? "")}`;
2881
2678
  const targetVec = textToEmbeddingFloat32(outcomeStr, latentDim);
2882
- chunkAIX25INK_cjs.jepObjectiveHandler.onEvent?.(
2679
+ chunkTVHSPJ4N_cjs.jepObjectiveHandler.onEvent?.(
2883
2680
  this.jepaObjectiveNode,
2884
2681
  config,
2885
2682
  this.buildJepaTraitContext(),
@@ -3294,8 +3091,8 @@ var HoloScriptRuntime = class {
3294
3091
  topK
3295
3092
  );
3296
3093
  });
3297
- this.traitHandlers.set("mitosis", chunkAIX25INK_cjs.mitosisHandler);
3298
- this.traitHandlers.set("orbital", chunkAIX25INK_cjs.orbitalHandler);
3094
+ this.traitHandlers.set("mitosis", chunkTVHSPJ4N_cjs.mitosisHandler);
3095
+ this.traitHandlers.set("orbital", chunkTVHSPJ4N_cjs.orbitalHandler);
3299
3096
  this.extensionRegistry = new ExtensionRegistry(this);
3300
3097
  engineRuntime__namespace.stateMachineInterpreter.setHookExecutor((code) => this.evaluateExpression(code));
3301
3098
  engineRuntime__namespace.stateMachineInterpreter.setGuardEvaluator((expr) => this.evaluateExpression(expr));
@@ -3760,7 +3557,7 @@ var HoloScriptRuntime = class {
3760
3557
  // contract requires Promise<void> so trait-side emits can `await`
3761
3558
  // through a unified interface. Wrap with Promise.resolve.
3762
3559
  globalBusEmit: (event, data) => {
3763
- getSharedEventBus().emit(event, data);
3560
+ chunkSMIWS6DE_cjs.getSharedEventBus().emit(event, data);
3764
3561
  return Promise.resolve();
3765
3562
  },
3766
3563
  sendStateMachineEvent: (id, event) => engineRuntime__namespace.stateMachineInterpreter.sendEvent(id, event)
@@ -4064,12 +3861,12 @@ var HoloScriptRuntime = class {
4064
3861
  evaluateHoloExpression: (expr, scopeOverride) => this.evaluateHoloExpression(expr, scopeOverride),
4065
3862
  telemetry: {
4066
3863
  setGauge: (name, value) => {
4067
- telemetry.setGauge(name, value);
3864
+ chunkSMIWS6DE_cjs.telemetry.setGauge(name, value);
4068
3865
  },
4069
3866
  incrementCounter: (name, value, labels) => {
4070
- telemetry.incrementCounter(name, value, labels);
3867
+ chunkSMIWS6DE_cjs.telemetry.incrementCounter(name, value, labels);
4071
3868
  },
4072
- measureLatency: (name, fn) => telemetry.measureLatency(name, fn),
3869
+ measureLatency: (name, fn) => chunkSMIWS6DE_cjs.telemetry.measureLatency(name, fn),
4073
3870
  executionDepth: () => this.context.executionStack.length
4074
3871
  }
4075
3872
  };
@@ -4507,11 +4304,7 @@ var HoloScriptRuntime = class {
4507
4304
  }
4508
4305
  };
4509
4306
 
4510
- exports.EventBus = EventBus;
4511
4307
  exports.HoloScriptAgentRuntime = HoloScriptAgentRuntime;
4512
4308
  exports.HoloScriptRuntime = HoloScriptRuntime;
4513
- exports.getSharedEventBus = getSharedEventBus;
4514
- exports.setSharedEventBus = setSharedEventBus;
4515
- exports.telemetry = telemetry;
4516
- //# sourceMappingURL=chunk-RUXGBKPS.cjs.map
4517
- //# sourceMappingURL=chunk-RUXGBKPS.cjs.map
4309
+ //# sourceMappingURL=chunk-EUDQTK7N.cjs.map
4310
+ //# sourceMappingURL=chunk-EUDQTK7N.cjs.map
@@ -1,4 +1,4 @@
1
- import { createHoloMapRuntime, HOLOMAP_DEFAULTS } from './chunk-NHHVLKV3.js';
1
+ import { createHoloMapRuntime, HOLOMAP_DEFAULTS } from './chunk-AYBXB26F.js';
2
2
 
3
3
  // src/reconstruction/FusedAttentionKernel.ts
4
4
  var FUSED_ATTENTION_WGSL = `
@@ -619,5 +619,5 @@ async function replayMobileSensorBundle(bundle, config = {}) {
619
619
  }
620
620
 
621
621
  export { ANCHOR_DEFAULTS, ARCORE_DEPTH_RECOMMENDED_RANGE_MILLIMETERS, HOLOMAP_MOBILE_SENSOR_BUNDLE_VERSION, TRAJECTORY_DEFAULTS, arCoreDepthFrameToMobileSensorFrame, cameraPoseFromColumnMajorTransform, createAnchorContext, createArCoreDepthMobileSensorBundle, createFusedAttentionBackend, createPagedKVCache, createTrajectoryMemory, mergeAnchoredProvenance, mobileSensorBundleToFrames, replayMobileSensorBundle, validateMobileSensorBundle };
622
- //# sourceMappingURL=chunk-SXYLMIGP.js.map
623
- //# sourceMappingURL=chunk-SXYLMIGP.js.map
622
+ //# sourceMappingURL=chunk-F43YAA34.js.map
623
+ //# sourceMappingURL=chunk-F43YAA34.js.map
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
3
  var chunk5S7RKFGR_cjs = require('./chunk-5S7RKFGR.cjs');
4
- var chunkRMHC2VG7_cjs = require('./chunk-RMHC2VG7.cjs');
4
+ var chunkKKP7JKN4_cjs = require('./chunk-KKP7JKN4.cjs');
5
5
 
6
6
  // src/compiler/TraitCompositionCompiler.ts
7
- chunkRMHC2VG7_cjs.init_AgentRBAC();
8
- chunkRMHC2VG7_cjs.init_CompilerBase();
7
+ chunkKKP7JKN4_cjs.init_AgentRBAC();
8
+ chunkKKP7JKN4_cjs.init_CompilerBase();
9
9
  chunk5S7RKFGR_cjs.init_ProvenanceSemiring();
10
10
  var CompositionConflictError = class extends Error {
11
11
  constructor(traitA, traitB, conflictKey) {
@@ -63,7 +63,7 @@ var TraitCompositionCompiler = class {
63
63
  */
64
64
  validateAccess(agentToken) {
65
65
  if (!agentToken) return;
66
- const rbac = chunkRMHC2VG7_cjs.getRBAC();
66
+ const rbac = chunkKKP7JKN4_cjs.getRBAC();
67
67
  const decision = rbac.checkAccess({
68
68
  token: agentToken,
69
69
  resourceType: "ast" /* AST */,
@@ -154,7 +154,7 @@ var TraitCompositionCompiler = class {
154
154
  }
155
155
  }
156
156
  };
157
- var UnauthorizedTraitCompositionAccessError = class extends chunkRMHC2VG7_cjs.UnauthorizedCompilerAccessError {
157
+ var UnauthorizedTraitCompositionAccessError = class extends chunkKKP7JKN4_cjs.UnauthorizedCompilerAccessError {
158
158
  constructor(decision, compilerName) {
159
159
  super(decision, "trait composition", compilerName);
160
160
  this.name = "UnauthorizedTraitCompositionAccessError";
@@ -165,5 +165,5 @@ exports.CompositionConflictError = CompositionConflictError;
165
165
  exports.MissingComponentError = MissingComponentError;
166
166
  exports.TraitCompositionCompiler = TraitCompositionCompiler;
167
167
  exports.UnauthorizedTraitCompositionAccessError = UnauthorizedTraitCompositionAccessError;
168
- //# sourceMappingURL=chunk-H5DZIHJP.cjs.map
169
- //# sourceMappingURL=chunk-H5DZIHJP.cjs.map
168
+ //# sourceMappingURL=chunk-FYSPZT4V.cjs.map
169
+ //# sourceMappingURL=chunk-FYSPZT4V.cjs.map
@@ -1182,6 +1182,8 @@ var _HoloCompositionParser = class _HoloCompositionParser {
1182
1182
  composition.traits.push({ type: "ObjectTrait", name: decoratorName, config });
1183
1183
  }
1184
1184
  }
1185
+ } else if (this.check("COMPOSITION")) {
1186
+ this.absorbComposition(composition, this.parseComposition());
1185
1187
  } else if (this.check("TEMPLATE")) {
1186
1188
  composition.templates.push(this.parseTemplate());
1187
1189
  } else if (this.check("OBJECT")) {
@@ -1260,6 +1262,30 @@ var _HoloCompositionParser = class _HoloCompositionParser {
1260
1262
  composition.loc = { start: startLoc, end: this.currentLocation() };
1261
1263
  return composition;
1262
1264
  }
1265
+ /**
1266
+ * Merge a parsed `composition "X" { ... }` (inner) into the implicit root that
1267
+ * collected the file-level statements before it (typically imports). Preserves
1268
+ * the declared name and folds inner's contents into the root so nothing is
1269
+ * dropped. Generic over HoloComposition fields so new array/scalar members are
1270
+ * handled without touching this method.
1271
+ */
1272
+ absorbComposition(root, inner) {
1273
+ if (root.name === "implicit" && inner.name) root.name = inner.name;
1274
+ const skip = /* @__PURE__ */ new Set(["type", "name", "loc"]);
1275
+ const rootRec = root;
1276
+ for (const key of Object.keys(inner)) {
1277
+ if (skip.has(key)) continue;
1278
+ const innerVal = inner[key];
1279
+ if (innerVal === void 0) continue;
1280
+ if (Array.isArray(innerVal)) {
1281
+ const rootArr = root[key];
1282
+ if (Array.isArray(rootArr)) rootArr.push(...innerVal);
1283
+ else rootRec[key] = [...innerVal];
1284
+ } else if (rootRec[key] === void 0) {
1285
+ rootRec[key] = innerVal;
1286
+ }
1287
+ }
1288
+ }
1263
1289
  /**
1264
1290
  * Parse environment body (after @world or @environment decorator)
1265
1291
  */
@@ -2662,6 +2688,14 @@ var _HoloCompositionParser = class _HoloCompositionParser {
2662
2688
  parsedBody = this.parseBlockTraitConfig();
2663
2689
  }
2664
2690
  directives.push({ type: key, name: blockName, parameters: [], body: parsedBody });
2691
+ } else if (this.check("LBRACE")) {
2692
+ const isCodeBlock = key.startsWith("on_") || /^on[A-Z]/.test(key) || key === "lifecycle";
2693
+ if (isCodeBlock) {
2694
+ this.skipBlock();
2695
+ properties.push({ type: "ObjectProperty", key, value: [] });
2696
+ } else {
2697
+ properties.push({ type: "ObjectProperty", key, value: this.parseValue() });
2698
+ }
2665
2699
  } else {
2666
2700
  properties.push({ type: "ObjectProperty", key, value: true });
2667
2701
  }
@@ -5537,5 +5571,5 @@ function parseHoloPartial(source, options) {
5537
5571
  }
5538
5572
 
5539
5573
  export { HoloCompositionParser, parseHolo, parseHoloPartial, parseHoloStrict };
5540
- //# sourceMappingURL=chunk-TK74TR4H.js.map
5541
- //# sourceMappingURL=chunk-TK74TR4H.js.map
5574
+ //# sourceMappingURL=chunk-GIOYPNTH.js.map
5575
+ //# sourceMappingURL=chunk-GIOYPNTH.js.map
@@ -1184,6 +1184,8 @@ var _HoloCompositionParser = class _HoloCompositionParser {
1184
1184
  composition.traits.push({ type: "ObjectTrait", name: decoratorName, config });
1185
1185
  }
1186
1186
  }
1187
+ } else if (this.check("COMPOSITION")) {
1188
+ this.absorbComposition(composition, this.parseComposition());
1187
1189
  } else if (this.check("TEMPLATE")) {
1188
1190
  composition.templates.push(this.parseTemplate());
1189
1191
  } else if (this.check("OBJECT")) {
@@ -1262,6 +1264,30 @@ var _HoloCompositionParser = class _HoloCompositionParser {
1262
1264
  composition.loc = { start: startLoc, end: this.currentLocation() };
1263
1265
  return composition;
1264
1266
  }
1267
+ /**
1268
+ * Merge a parsed `composition "X" { ... }` (inner) into the implicit root that
1269
+ * collected the file-level statements before it (typically imports). Preserves
1270
+ * the declared name and folds inner's contents into the root so nothing is
1271
+ * dropped. Generic over HoloComposition fields so new array/scalar members are
1272
+ * handled without touching this method.
1273
+ */
1274
+ absorbComposition(root, inner) {
1275
+ if (root.name === "implicit" && inner.name) root.name = inner.name;
1276
+ const skip = /* @__PURE__ */ new Set(["type", "name", "loc"]);
1277
+ const rootRec = root;
1278
+ for (const key of Object.keys(inner)) {
1279
+ if (skip.has(key)) continue;
1280
+ const innerVal = inner[key];
1281
+ if (innerVal === void 0) continue;
1282
+ if (Array.isArray(innerVal)) {
1283
+ const rootArr = root[key];
1284
+ if (Array.isArray(rootArr)) rootArr.push(...innerVal);
1285
+ else rootRec[key] = [...innerVal];
1286
+ } else if (rootRec[key] === void 0) {
1287
+ rootRec[key] = innerVal;
1288
+ }
1289
+ }
1290
+ }
1265
1291
  /**
1266
1292
  * Parse environment body (after @world or @environment decorator)
1267
1293
  */
@@ -2664,6 +2690,14 @@ var _HoloCompositionParser = class _HoloCompositionParser {
2664
2690
  parsedBody = this.parseBlockTraitConfig();
2665
2691
  }
2666
2692
  directives.push({ type: key, name: blockName, parameters: [], body: parsedBody });
2693
+ } else if (this.check("LBRACE")) {
2694
+ const isCodeBlock = key.startsWith("on_") || /^on[A-Z]/.test(key) || key === "lifecycle";
2695
+ if (isCodeBlock) {
2696
+ this.skipBlock();
2697
+ properties.push({ type: "ObjectProperty", key, value: [] });
2698
+ } else {
2699
+ properties.push({ type: "ObjectProperty", key, value: this.parseValue() });
2700
+ }
2667
2701
  } else {
2668
2702
  properties.push({ type: "ObjectProperty", key, value: true });
2669
2703
  }
@@ -5542,5 +5576,5 @@ exports.HoloCompositionParser = HoloCompositionParser;
5542
5576
  exports.parseHolo = parseHolo;
5543
5577
  exports.parseHoloPartial = parseHoloPartial;
5544
5578
  exports.parseHoloStrict = parseHoloStrict;
5545
- //# sourceMappingURL=chunk-2HLIGOKU.cjs.map
5546
- //# sourceMappingURL=chunk-2HLIGOKU.cjs.map
5579
+ //# sourceMappingURL=chunk-GQHQOPXZ.cjs.map
5580
+ //# sourceMappingURL=chunk-GQHQOPXZ.cjs.map