@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.
- package/dist/{GLTFPipeline-SFIORFJU.js → GLTFPipeline-276GE64O.js} +6 -6
- package/dist/{GLTFPipeline-VNNDPONV.cjs → GLTFPipeline-M7WSSJED.cjs} +10 -10
- package/dist/HoloScriptRuntime-3URVTKPJ.js +10 -0
- package/dist/HoloScriptRuntime-SXEAEU2N.cjs +19 -0
- package/dist/{chunk-2B7WVIDZ.js → chunk-23J755AR.js} +4 -4
- package/dist/{chunk-HANL7K2Q.cjs → chunk-253GBQZY.cjs} +38 -38
- package/dist/{chunk-KQTPCYTG.cjs → chunk-25IQCHTO.cjs} +38 -38
- package/dist/{chunk-V73NPPTM.cjs → chunk-3AO425MZ.cjs} +20 -20
- package/dist/{chunk-6S6TKNEA.cjs → chunk-3HYYMEXI.cjs} +279 -124
- package/dist/{chunk-IHESJZSW.js → chunk-3NFFOWGG.js} +6 -209
- package/dist/{chunk-AO4I2Z7M.cjs → chunk-3WZEJHUQ.cjs} +7 -7
- package/dist/{chunk-IRWWS72C.cjs → chunk-4V2E7U7Q.cjs} +7 -7
- package/dist/{chunk-ER4GATIU.js → chunk-62FBK3B7.js} +6 -6
- package/dist/{chunk-L63H3SQ4.cjs → chunk-6DPSFNJB.cjs} +19 -19
- package/dist/{chunk-XFXGA5IW.cjs → chunk-73FELZVJ.cjs} +14 -14
- package/dist/{chunk-QWNQ523V.cjs → chunk-7CUEMLDZ.cjs} +47 -47
- package/dist/{chunk-52ULD552.cjs → chunk-7HIASF7S.cjs} +13 -13
- package/dist/{chunk-U4NBQJBY.js → chunk-ANXZFVY2.js} +3 -3
- package/dist/{chunk-NHHVLKV3.js → chunk-AYBXB26F.js} +5 -5
- package/dist/{chunk-KX76JUQY.js → chunk-B4TFTDG4.js} +3 -3
- package/dist/{chunk-OEFY723R.js → chunk-BE4UJCQT.js} +4 -4
- package/dist/{chunk-DIL6DDDN.cjs → chunk-C2A5DUMF.cjs} +38 -38
- package/dist/{chunk-H3MGK7TX.cjs → chunk-CXFDRBQU.cjs} +10 -10
- package/dist/{chunk-4SY77NA4.cjs → chunk-D54CNIAJ.cjs} +2 -2
- package/dist/{chunk-22W6NGYN.js → chunk-DAJXW4KX.js} +3 -3
- package/dist/{chunk-RUXGBKPS.cjs → chunk-EUDQTK7N.cjs} +15 -222
- package/dist/{chunk-SXYLMIGP.js → chunk-F43YAA34.js} +3 -3
- package/dist/{chunk-H5DZIHJP.cjs → chunk-FYSPZT4V.cjs} +7 -7
- package/dist/{chunk-TK74TR4H.js → chunk-GIOYPNTH.js} +36 -2
- package/dist/{chunk-2HLIGOKU.cjs → chunk-GQHQOPXZ.cjs} +36 -2
- package/dist/{chunk-BPICAGBV.cjs → chunk-GQT4TYKY.cjs} +35 -35
- package/dist/{chunk-QAVXL2IH.js → chunk-GYZE55MO.js} +3 -3
- package/dist/{chunk-77V4GTCA.js → chunk-H652NHX5.js} +78 -74
- package/dist/{chunk-KHPCJRI3.cjs → chunk-HINXWAOD.cjs} +14 -14
- package/dist/{chunk-W6P2GBHH.cjs → chunk-HZSPDCXV.cjs} +3 -3
- package/dist/{chunk-EMMC5CSQ.js → chunk-HZTDET3N.js} +4 -4
- package/dist/{chunk-5CKA5SXU.js → chunk-IPWSXCCN.js} +4 -4
- package/dist/{chunk-GQYKQSTC.cjs → chunk-IUTY5WQ2.cjs} +5 -5
- package/dist/{chunk-MSMIFMBL.js → chunk-IVSZDECV.js} +4 -4
- package/dist/{chunk-2A7FURVO.js → chunk-IZM5VQZD.js} +4 -4
- package/dist/{chunk-33XCOVE3.js → chunk-J6M4FPK5.js} +3 -3
- package/dist/{chunk-6KMK2UXT.cjs → chunk-JC5YBPSF.cjs} +5 -5
- package/dist/{chunk-W55Z7QIX.js → chunk-JCLBKPMX.js} +3 -3
- package/dist/{chunk-MXJ5SS53.cjs → chunk-JJBE3TIH.cjs} +10 -10
- package/dist/{chunk-HRODTEEO.js → chunk-JX7YL6ZE.js} +5 -5
- package/dist/{chunk-IVIA7K75.cjs → chunk-K4VVR7CN.cjs} +18 -18
- package/dist/{chunk-VSK7W3O5.cjs → chunk-KEFNV2WM.cjs} +16 -16
- package/dist/{chunk-HZCQO4JM.cjs → chunk-KH4CNH66.cjs} +4 -4
- package/dist/{chunk-6FGQNDR4.js → chunk-KJLB4OPV.js} +4 -4
- package/dist/{chunk-RMHC2VG7.cjs → chunk-KKP7JKN4.cjs} +6 -2
- package/dist/{chunk-OEV5RMZO.cjs → chunk-KQCN6AKJ.cjs} +5 -5
- package/dist/{chunk-7AD52FRS.cjs → chunk-KVRSTFNH.cjs} +14 -14
- package/dist/{chunk-ZKSS47EV.cjs → chunk-LICPB5HZ.cjs} +13 -13
- package/dist/{chunk-S5IFXW6E.js → chunk-MGE5Z4GS.js} +4 -4
- package/dist/{chunk-6L4VE27M.js → chunk-NBMHU6SW.js} +4 -4
- package/dist/{chunk-QCCBXSCE.js → chunk-NGKREZ36.js} +5 -5
- package/dist/{chunk-27MPVJVZ.cjs → chunk-NHWSN2SD.cjs} +21 -21
- package/dist/{chunk-XMWZG36H.js → chunk-NV4VMVXU.js} +3 -3
- package/dist/{chunk-Y3MWXQSB.cjs → chunk-NXZFOPVD.cjs} +19 -19
- package/dist/{chunk-ZUL5AVTX.cjs → chunk-OBIYPYYS.cjs} +5 -5
- package/dist/{chunk-ZXBZVXDW.js → chunk-OMXII44L.js} +3 -3
- package/dist/{chunk-MJVIRCUV.cjs → chunk-OR4Q2BGL.cjs} +18 -18
- package/dist/{chunk-6ASWLXXN.js → chunk-PHVRG4I2.js} +4 -4
- package/dist/{chunk-QTPMJRGS.js → chunk-QPSKHBJP.js} +6 -2
- package/dist/{chunk-VEXPG4WN.js → chunk-QXH7QDSZ.js} +3 -3
- package/dist/chunk-RARB3MBR.js +207 -0
- package/dist/{chunk-EOBB6A4B.js → chunk-RVBHAXFG.js} +231 -76
- package/dist/{chunk-XXZJEFKW.cjs → chunk-S3MDHNKB.cjs} +5 -5
- package/dist/{chunk-4UUKPCY4.js → chunk-S4W6Z2MN.js} +4 -4
- package/dist/{chunk-BVLP6D3Q.cjs → chunk-SJBGLS25.cjs} +5 -5
- package/dist/chunk-SMIWS6DE.cjs +212 -0
- package/dist/{chunk-R3IVNY6P.js → chunk-T2QCTZMO.js} +4 -4
- package/dist/{chunk-AIX25INK.cjs → chunk-TVHSPJ4N.cjs} +79 -75
- package/dist/{chunk-Z5XMPRNC.cjs → chunk-U44IKGG7.cjs} +30 -30
- package/dist/{chunk-OPZ7XDDI.js → chunk-UJXISJBN.js} +3 -3
- package/dist/{chunk-FXKTYFYA.js → chunk-UM6C3CGK.js} +4 -4
- package/dist/{chunk-LAOCQJ2M.js → chunk-UMABK6SI.js} +4 -4
- package/dist/{chunk-GN3KDX4W.js → chunk-V6MKC2FZ.js} +3 -3
- package/dist/{chunk-EDPQSGB3.cjs → chunk-W7VDOASB.cjs} +5 -5
- package/dist/{chunk-DMXC24WV.js → chunk-WJIHFLMJ.js} +2 -2
- package/dist/{chunk-UDMYRFDZ.js → chunk-WRKUDAZJ.js} +3 -3
- package/dist/{chunk-GCMWDSBZ.cjs → chunk-XIVIE43A.cjs} +5 -5
- package/dist/{chunk-UD3DSHZM.js → chunk-XKTPFXGA.js} +3 -3
- package/dist/{chunk-HGVXZDSK.cjs → chunk-XUUVDHIF.cjs} +7 -7
- package/dist/{chunk-5N54COB6.cjs → chunk-YN6V7R3L.cjs} +13 -13
- package/dist/{chunk-I2O7TW6B.js → chunk-ZBQXLH2L.js} +4 -4
- package/dist/{chunk-EOFNVCM6.js → chunk-ZU7NIRT6.js} +11 -11
- package/dist/{chunk-P7YIA5LN.js → chunk-ZZEI7MV4.js} +4 -4
- package/dist/compiler/agent-inference.cjs +6 -6
- package/dist/compiler/agent-inference.js +2 -2
- package/dist/compiler/android-xr.cjs +6 -6
- package/dist/compiler/android-xr.js +4 -4
- package/dist/compiler/android.cjs +5 -5
- package/dist/compiler/android.js +3 -3
- package/dist/compiler/ar.cjs +5 -5
- package/dist/compiler/ar.js +3 -3
- package/dist/compiler/babylon.cjs +5 -5
- package/dist/compiler/babylon.js +4 -4
- package/dist/compiler/business-quest.cjs +9 -9
- package/dist/compiler/business-quest.js +1 -1
- package/dist/compiler/context.cjs +5 -5
- package/dist/compiler/context.js +2 -2
- package/dist/compiler/domain-block-utils.cjs +151 -151
- package/dist/compiler/domain-block-utils.js +3 -3
- package/dist/compiler/dtdl.cjs +6 -6
- package/dist/compiler/dtdl.js +3 -3
- package/dist/compiler/gltf-pipeline.cjs +8 -8
- package/dist/compiler/gltf-pipeline.js +1 -1
- package/dist/compiler/godot.cjs +5 -5
- package/dist/compiler/godot.js +4 -4
- package/dist/compiler/incremental.cjs +7 -7
- package/dist/compiler/incremental.js +2 -2
- package/dist/compiler/index.cjs +182 -182
- package/dist/compiler/index.js +56 -56
- package/dist/compiler/ios.cjs +5 -5
- package/dist/compiler/ios.js +3 -3
- package/dist/compiler/llm-provider-capabilities.cjs +5 -5
- package/dist/compiler/llm-provider-capabilities.js +2 -2
- package/dist/compiler/multi-layer.cjs +7 -7
- package/dist/compiler/multi-layer.js +6 -6
- package/dist/compiler/openxr.cjs +5 -5
- package/dist/compiler/openxr.js +4 -4
- package/dist/compiler/playcanvas.cjs +5 -5
- package/dist/compiler/playcanvas.js +4 -4
- package/dist/compiler/r3f.cjs +9 -9
- package/dist/compiler/r3f.js +4 -4
- package/dist/compiler/sdf.cjs +6 -6
- package/dist/compiler/sdf.js +4 -4
- package/dist/compiler/state.cjs +5 -5
- package/dist/compiler/state.js +3 -3
- package/dist/compiler/trait-composition.cjs +6 -6
- package/dist/compiler/trait-composition.js +2 -2
- package/dist/compiler/unity.cjs +5 -5
- package/dist/compiler/unity.js +4 -4
- package/dist/compiler/unreal.cjs +6 -6
- package/dist/compiler/unreal.js +4 -4
- package/dist/compiler/urdf.cjs +13 -13
- package/dist/compiler/urdf.js +4 -4
- package/dist/compiler/usd-physics.cjs +6 -6
- package/dist/compiler/usd-physics.js +3 -3
- package/dist/compiler/visionos.cjs +5 -5
- package/dist/compiler/visionos.js +4 -4
- package/dist/compiler/vrchat.cjs +6 -6
- package/dist/compiler/vrchat.js +4 -4
- package/dist/compiler/vrr.cjs +6 -6
- package/dist/compiler/vrr.js +4 -4
- package/dist/compiler/wasm.cjs +9 -9
- package/dist/compiler/wasm.js +4 -4
- package/dist/compiler/webgpu.cjs +5 -5
- package/dist/compiler/webgpu.js +4 -4
- package/dist/debugger.cjs +7 -6
- package/dist/debugger.js +5 -4
- package/dist/entries/scripting.cjs +0 -13
- package/dist/entries/scripting.js +0 -1
- package/dist/index.cjs +1002 -881
- package/dist/index.js +506 -87
- package/dist/parser.cjs +5 -5
- package/dist/parser.js +1 -1
- package/dist/reconstruction/index.cjs +31 -31
- package/dist/reconstruction/index.js +2 -2
- package/dist/runtime.cjs +302 -4
- package/dist/runtime.d.ts +61 -0
- package/dist/runtime.js +25 -3
- package/dist/traits/index.cjs +450 -439
- package/dist/traits/index.js +24 -13
- 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
|
|
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
|
|
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
|
-
|
|
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 =
|
|
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
|
-
|
|
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",
|
|
3298
|
-
this.traitHandlers.set("orbital",
|
|
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
|
-
|
|
4514
|
-
|
|
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-
|
|
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-
|
|
623
|
-
//# sourceMappingURL=chunk-
|
|
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
|
|
4
|
+
var chunkKKP7JKN4_cjs = require('./chunk-KKP7JKN4.cjs');
|
|
5
5
|
|
|
6
6
|
// src/compiler/TraitCompositionCompiler.ts
|
|
7
|
-
|
|
8
|
-
|
|
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 =
|
|
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
|
|
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-
|
|
169
|
-
//# sourceMappingURL=chunk-
|
|
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-
|
|
5541
|
-
//# sourceMappingURL=chunk-
|
|
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-
|
|
5546
|
-
//# sourceMappingURL=chunk-
|
|
5579
|
+
//# sourceMappingURL=chunk-GQHQOPXZ.cjs.map
|
|
5580
|
+
//# sourceMappingURL=chunk-GQHQOPXZ.cjs.map
|