@holoscript/core 8.0.5 → 8.0.7
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/README.md +34 -34
- package/bin/holoscript.cjs +1 -1
- package/dist/GLTFPipeline-3EJLL3TS.cjs +38 -0
- package/dist/GLTFPipeline-3OWJV2VK.js +17 -0
- package/dist/{HoloScriptPlusParser-A2W7OCN2.cjs → HoloScriptPlusParser-ADWRY5OS.cjs} +15 -15
- package/dist/{HoloScriptPlusParser-7FBIFUFC.js → HoloScriptPlusParser-JLJDXHSC.js} +4 -4
- package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +27 -0
- package/dist/{HoloScriptPlusParser-F2Z56FJR.js → HoloScriptPlusParser-WENAFEFV.js} +5 -5
- package/dist/HoloScriptRuntime-GGRVEU4T.cjs +19 -0
- package/dist/HoloScriptRuntime-GJK6VJPH.js +10 -0
- package/dist/{USDZExporter-3FWJ25JI.cjs → USDZExporter-AUHZODOF.cjs} +15 -4
- package/dist/{USDZExporter-D2HQLQYK.js → USDZExporter-GXB4AUSG.js} +15 -4
- package/dist/{chunk-V6MKC2FZ.js → chunk-22Q5A6RV.js} +3 -3
- package/dist/{chunk-IUDGEUDO.cjs → chunk-2BZHWUSR.cjs} +27 -15
- package/dist/{chunk-XJAN7CZG.cjs → chunk-2GCNOI2U.cjs} +2 -2
- package/dist/{chunk-CCATWPXM.js → chunk-2OWDB4FB.js} +13 -25
- package/dist/{chunk-N75IH2HY.js → chunk-2Y3V22SG.js} +5 -14
- package/dist/{chunk-MXFUTKCO.js → chunk-33YHE7HX.js} +3 -7
- package/dist/{chunk-GYZE55MO.js → chunk-3GWWJT7L.js} +4 -4
- package/dist/{chunk-CMT5NMMS.js → chunk-3NGDZZR4.js} +4 -4
- package/dist/{chunk-WRLUBRKS.cjs → chunk-3SKLAUDD.cjs} +2 -2
- package/dist/{chunk-KKFZ3B6J.cjs → chunk-3VBO3IYQ.cjs} +2 -2
- package/dist/{chunk-YF2I3MV3.js → chunk-47RUFYKR.js} +2 -2
- package/dist/{chunk-LHAXPADA.js → chunk-4JGRWHZJ.js} +7 -5
- package/dist/{chunk-ROHLEP2W.cjs → chunk-4W5G5QVL.cjs} +26 -26
- package/dist/{chunk-GQHQOPXZ.cjs → chunk-4YNYPHH3.cjs} +186 -17
- package/dist/{chunk-ZMCVKFXI.cjs → chunk-56VOWURB.cjs} +154 -47
- package/dist/{chunk-FXKAW7ZO.cjs → chunk-5A4TCHOC.cjs} +3 -3
- package/dist/{chunk-M56JSP4A.js → chunk-5EDVCNRT.js} +2 -2
- package/dist/{chunk-UJXISJBN.js → chunk-5ET6L4NS.js} +3 -3
- package/dist/{chunk-5NWINHR5.cjs → chunk-63ZGNR2T.cjs} +43 -39
- package/dist/{chunk-NG77ATEW.cjs → chunk-6PRZIHGL.cjs} +6 -6
- package/dist/{chunk-3WZEJHUQ.cjs → chunk-7DMMMBCY.cjs} +7 -7
- package/dist/{chunk-FHP6LXJS.js → chunk-7E7GCQCK.js} +2 -2
- package/dist/{chunk-YN2YWTXW.js → chunk-7VMGP2FW.js} +44 -28
- package/dist/{chunk-OJXHYNXN.js → chunk-7X5PNIQJ.js} +3 -3
- package/dist/{chunk-FYSPZT4V.cjs → chunk-7ZHYEITD.cjs} +11 -11
- package/dist/{chunk-KPJL34Y7.cjs → chunk-ACVWFGBI.cjs} +2 -2
- package/dist/{chunk-UWXE23BT.cjs → chunk-AWB7QYY6.cjs} +6 -6
- package/dist/{chunk-UO4WPSGQ.js → chunk-B4EKV6HQ.js} +154 -48
- package/dist/{chunk-2X7NGX3M.js → chunk-BRNUPDHJ.js} +5 -5
- package/dist/{chunk-D3STJ56J.js → chunk-BTKZGHAV.js} +23 -11
- package/dist/{chunk-I5CDNPPE.cjs → chunk-C4GSLCHE.cjs} +331 -125
- package/dist/{chunk-QPSKHBJP.js → chunk-C7ZBSV2Q.js} +13 -7
- package/dist/{chunk-YN6V7R3L.cjs → chunk-CCPSNT6B.cjs} +12 -7
- package/dist/{chunk-NW5G5FBQ.js → chunk-DD2JQ7TS.js} +4 -3
- package/dist/{chunk-JD7CIZ33.js → chunk-DUCB6LGL.js} +8 -10
- package/dist/{chunk-ANXZFVY2.js → chunk-DY72BMU5.js} +3 -3
- package/dist/{chunk-AIA52I7T.cjs → chunk-EBS32AJI.cjs} +6 -4
- package/dist/{chunk-6DO5IZ5N.cjs → chunk-EDPYCLRC.cjs} +85 -65
- package/dist/{chunk-WQKJSGVS.js → chunk-F2G6CWFT.js} +271 -66
- package/dist/{chunk-AVJHHUC5.cjs → chunk-F5LKJ6F5.cjs} +43 -31
- package/dist/{chunk-ZU7NIRT6.js → chunk-FGMDMJM7.js} +10 -5
- package/dist/{chunk-YVD3CSO3.js → chunk-FHQFPYV4.js} +4 -4
- package/dist/{chunk-YIMN575O.js → chunk-FNHJRI32.js} +8 -5
- package/dist/{chunk-EXUP2BUM.cjs → chunk-FT6TDR2O.cjs} +27 -27
- package/dist/{chunk-BRQJKJGT.cjs → chunk-FWVYAMNW.cjs} +4 -4
- package/dist/{chunk-PGANYCAG.cjs → chunk-G25QVBA5.cjs} +4 -3
- package/dist/{chunk-XB274MW5.cjs → chunk-G6PNEASF.cjs} +13 -13
- package/dist/{chunk-2BSMSUCE.js → chunk-GASCWJK5.js} +2 -2
- package/dist/{chunk-HKEXJUWS.cjs → chunk-GH6C2QGW.cjs} +12 -21
- package/dist/{chunk-WRKUDAZJ.js → chunk-GSOUNWEL.js} +35 -27
- package/dist/{chunk-QPOQ7VPI.js → chunk-GTA4Q3A3.js} +2 -2
- package/dist/{chunk-JIYN45TV.cjs → chunk-GVFJ6T4S.cjs} +3 -7
- package/dist/{chunk-IVY74O6C.js → chunk-GVOKJNUN.js} +50 -11
- package/dist/{chunk-GZG4KA4E.js → chunk-GW3LKD5C.js} +6 -4
- package/dist/{chunk-NCWCUZNS.cjs → chunk-HFSVMKM3.cjs} +14 -14
- package/dist/{chunk-IUTY5WQ2.cjs → chunk-HLFDZ35S.cjs} +5 -5
- package/dist/{chunk-IWC5DM2M.cjs → chunk-I76GIKN7.cjs} +20 -16
- package/dist/{chunk-ON5QSY35.cjs → chunk-KAIVDEIG.cjs} +175 -59
- package/dist/{chunk-R24NNAEG.js → chunk-KCPHASCO.js} +18 -6
- package/dist/{chunk-T5J7ZKP3.cjs → chunk-KOUAQL2B.cjs} +16 -13
- package/dist/{chunk-GMP623FG.cjs → chunk-KQU64CIX.cjs} +2 -2
- package/dist/{chunk-MVPBWHAC.js → chunk-L5U4W6JC.js} +4 -4
- package/dist/{chunk-2IWC4FP7.cjs → chunk-LMJ5EBV7.cjs} +10 -10
- package/dist/{chunk-KKP7JKN4.cjs → chunk-LODTHGST.cjs} +18 -12
- package/dist/{chunk-4V2E7U7Q.cjs → chunk-LPS5AMQD.cjs} +8 -8
- package/dist/{chunk-PY37LNDP.js → chunk-LWUOUCYL.js} +9 -5
- package/dist/{chunk-6CTRH7HT.cjs → chunk-LYJJI7ZK.cjs} +12 -14
- package/dist/{chunk-GTU2Z2WW.cjs → chunk-M7K4LE66.cjs} +5 -14
- package/dist/{chunk-URG2SJLK.js → chunk-MDR235RZ.js} +3 -7
- package/dist/{chunk-E4M5OAYO.js → chunk-MSYSQ2AJ.js} +132 -16
- package/dist/{chunk-TWUXUCEW.cjs → chunk-NGBXXZLL.cjs} +50 -62
- package/dist/{chunk-FFAOS5HQ.js → chunk-NHJLP37F.js} +6 -6
- package/dist/{chunk-S3MDHNKB.cjs → chunk-NHYRRAGI.cjs} +5 -5
- package/dist/{chunk-U44IKGG7.cjs → chunk-O3MGZDCT.cjs} +89 -52
- package/dist/{chunk-GIOYPNTH.js → chunk-OABEO6HH.js} +185 -16
- package/dist/{chunk-KQCN6AKJ.cjs → chunk-OS533P33.cjs} +37 -29
- package/dist/{chunk-DAJXW4KX.js → chunk-PABONWKI.js} +24 -11
- package/dist/{chunk-QACVP4PM.js → chunk-PXNZ6TME.js} +77 -59
- package/dist/{chunk-OMXII44L.js → chunk-Q2Q34NF3.js} +63 -26
- package/dist/{chunk-OH2FAIVU.js → chunk-QBWNJXNR.js} +10 -6
- package/dist/{chunk-XKTPFXGA.js → chunk-QFU53KRH.js} +4 -4
- package/dist/{chunk-CR4FMIWL.cjs → chunk-QGMUTVVH.cjs} +17 -17
- package/dist/{chunk-MYY4PMWX.cjs → chunk-RUVBFAF7.cjs} +50 -11
- package/dist/{chunk-QD32ADK6.js → chunk-S762UEV5.js} +5 -5
- package/dist/{chunk-HNDK4IQU.cjs → chunk-SH5PPVK7.cjs} +61 -45
- package/dist/{chunk-JC5YBPSF.cjs → chunk-SKZPC5AG.cjs} +5 -5
- package/dist/{chunk-TJHVSBP2.js → chunk-SLHLXUMO.js} +10 -4
- package/dist/{chunk-5KVXXUD4.js → chunk-SSSN7VAM.js} +3 -3
- package/dist/{chunk-KMC6CQH3.js → chunk-SXOSDZD6.js} +6 -6
- package/dist/{chunk-J32ZJZJH.js → chunk-SYTRBGDS.js} +2 -2
- package/dist/{chunk-CIWWXYHZ.cjs → chunk-T6W3Z3SH.cjs} +2 -2
- package/dist/{chunk-QXH7QDSZ.js → chunk-TEVX443G.js} +44 -51
- package/dist/{chunk-UFZZ7TSN.cjs → chunk-TQ377OLB.cjs} +23 -21
- package/dist/{chunk-PJGFU5DN.cjs → chunk-TRCGG42I.cjs} +195 -152
- package/dist/{chunk-H652NHX5.js → chunk-TVANHNJ7.js} +30 -23
- package/dist/{chunk-EKBKLK7P.js → chunk-UDE4OZMR.js} +3 -3
- package/dist/{chunk-LKWQNUE6.cjs → chunk-UGXHYIWT.cjs} +5 -5
- package/dist/{chunk-JBNDTXXV.cjs → chunk-ULMSSHCJ.cjs} +21 -21
- package/dist/{chunk-YWOBW2PV.cjs → chunk-UOL6Y5TD.cjs} +18 -18
- package/dist/{chunk-5S7RKFGR.cjs → chunk-UVFI7XIR.cjs} +10 -4
- package/dist/{chunk-7M3PNU2M.cjs → chunk-V7AKE5VT.cjs} +10 -10
- package/dist/{chunk-J7XZV333.js → chunk-VEPGBETF.js} +6 -6
- package/dist/{chunk-UWJHCOH2.js → chunk-VF257YKO.js} +4 -4
- package/dist/{chunk-4N4SXXWF.js → chunk-VSACG2AR.js} +3 -3
- package/dist/{chunk-ZDSYWBIE.cjs → chunk-VW5CRJBE.cjs} +3 -7
- package/dist/{chunk-YT5L3B57.cjs → chunk-WFKVS2K4.cjs} +65 -27
- package/dist/{chunk-J6M4FPK5.js → chunk-WXQ57LAO.js} +3 -3
- package/dist/{chunk-5H2G27PK.cjs → chunk-X27QRG4C.cjs} +38 -38
- package/dist/{chunk-TVHSPJ4N.cjs → chunk-X2AVEAZM.cjs} +30 -23
- package/dist/{chunk-DHO2YRIM.js → chunk-XQ5MWMP2.js} +4 -4
- package/dist/{chunk-XIVIE43A.cjs → chunk-XW6IXEQH.cjs} +26 -13
- package/dist/{chunk-YIVFJNYV.js → chunk-Y3ZFVUUU.js} +2 -2
- package/dist/{chunk-7H33U5SM.cjs → chunk-Y57W2CT5.cjs} +2 -2
- package/dist/{chunk-OBIYPYYS.cjs → chunk-YCM6QQRT.cjs} +46 -53
- package/dist/{chunk-MBOOR7X4.js → chunk-YFVQWSNJ.js} +3 -3
- package/dist/{chunk-ADADVMXY.js → chunk-YFWRJW4B.js} +2 -2
- package/dist/{chunk-ONDAWTW4.js → chunk-YN6IETRZ.js} +179 -136
- package/dist/{chunk-4SDKXQ4C.js → chunk-YRRAUB35.js} +4 -4
- package/dist/{chunk-OBP5REIV.js → chunk-Z6PMDS4G.js} +62 -24
- package/dist/{chunk-BOVPWH4H.js → chunk-ZA34AN3R.js} +8 -17
- package/dist/{chunk-EKYL4PE3.cjs → chunk-ZLF4YF3U.cjs} +2 -2
- package/dist/{chunk-6FH72EB2.cjs → chunk-ZPZAVHXL.cjs} +20 -20
- package/dist/cli/holoscript-runner.cjs +39 -22
- package/dist/cli/holoscript-runner.js +32 -15
- package/dist/compiler/GasOptimizationAnalyzer.d.ts +73 -0
- package/dist/compiler/NFTMarketplaceCompiler.d.ts +23 -0
- package/dist/compiler/agent-inference.cjs +7 -7
- package/dist/compiler/agent-inference.js +3 -3
- package/dist/compiler/android-xr.cjs +8 -8
- package/dist/compiler/android-xr.js +6 -6
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/ar.cjs +6 -6
- package/dist/compiler/ar.js +4 -4
- package/dist/compiler/babylon.cjs +8 -8
- package/dist/compiler/babylon.js +7 -7
- package/dist/compiler/business-quest.cjs +9 -9
- package/dist/compiler/business-quest.js +1 -1
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/domain-block-utils.cjs +153 -153
- package/dist/compiler/domain-block-utils.js +4 -4
- package/dist/compiler/dtdl.cjs +7 -7
- package/dist/compiler/dtdl.js +4 -4
- package/dist/compiler/gltf-pipeline.cjs +8 -8
- package/dist/compiler/gltf-pipeline.js +1 -1
- package/dist/compiler/godot.cjs +6 -6
- package/dist/compiler/godot.js +5 -5
- package/dist/compiler/incremental.cjs +8 -8
- package/dist/compiler/incremental.js +3 -3
- package/dist/compiler/index.cjs +530 -355
- package/dist/compiler/index.d.ts +20 -0
- package/dist/compiler/index.js +374 -210
- package/dist/compiler/ios.cjs +6 -6
- package/dist/compiler/ios.js +4 -4
- package/dist/compiler/llm-provider-capabilities.cjs +6 -6
- package/dist/compiler/llm-provider-capabilities.js +3 -3
- package/dist/compiler/multi-layer.cjs +10 -10
- package/dist/compiler/multi-layer.js +9 -9
- package/dist/compiler/openxr.cjs +7 -7
- package/dist/compiler/openxr.js +6 -6
- package/dist/compiler/playcanvas.cjs +6 -6
- package/dist/compiler/playcanvas.js +5 -5
- package/dist/compiler/r3f.cjs +13 -13
- package/dist/compiler/r3f.js +8 -8
- package/dist/compiler/sdf.cjs +7 -7
- package/dist/compiler/sdf.js +5 -5
- package/dist/compiler/state.cjs +6 -6
- package/dist/compiler/state.js +4 -4
- package/dist/compiler/trait-composition.cjs +8 -8
- package/dist/compiler/trait-composition.js +4 -4
- package/dist/compiler/unity.cjs +7 -7
- package/dist/compiler/unity.js +6 -6
- package/dist/compiler/unreal.cjs +8 -8
- package/dist/compiler/unreal.js +6 -6
- package/dist/compiler/urdf.cjs +14 -14
- package/dist/compiler/urdf.js +5 -5
- package/dist/compiler/usd-physics.cjs +7 -7
- package/dist/compiler/usd-physics.js +4 -4
- package/dist/compiler/visionos.cjs +7 -7
- package/dist/compiler/visionos.js +6 -6
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.js +5 -5
- package/dist/compiler/vrr.cjs +7 -7
- package/dist/compiler/vrr.js +5 -5
- package/dist/compiler/wasm.cjs +10 -10
- package/dist/compiler/wasm.js +5 -5
- package/dist/compiler/webgpu.cjs +6 -6
- package/dist/compiler/webgpu.js +5 -5
- package/dist/coordinators/index.cjs +27 -10
- package/dist/coordinators/index.js +27 -10
- package/dist/debugger.cjs +6 -6
- package/dist/debugger.js +4 -4
- package/dist/entries/scripting.cjs +6 -6
- package/dist/entries/scripting.js +2 -2
- package/dist/hololand/index.cjs +36 -36
- package/dist/hololand/index.js +2 -2
- package/dist/index.cjs +1080 -2190
- package/dist/index.js +467 -1577
- package/dist/math/tropical-spmv.cjs +10 -10
- package/dist/math/tropical-spmv.js +1 -1
- package/dist/math/vec3.cjs +13 -13
- package/dist/math/vec3.js +1 -1
- package/dist/parser/NFTMarketplaceTypes.d.ts +191 -0
- package/dist/parser.cjs +16 -16
- package/dist/parser.js +5 -5
- package/dist/reconstruction/index.cjs +37 -37
- package/dist/reconstruction/index.js +4 -4
- package/dist/runtime.cjs +280 -74
- package/dist/runtime.d.ts +10 -1
- package/dist/runtime.js +268 -70
- package/dist/self-improvement/index.cjs +12 -4
- package/dist/self-improvement/index.js +12 -4
- package/dist/{src-HCCCSYP7.js → src-J6CM4AUR.js} +91 -33
- package/dist/{src-4ROC227P.cjs → src-PT2FERDV.cjs} +93 -35
- package/dist/testing.cjs +5 -5
- package/dist/testing.js +1 -1
- package/dist/traits/botanical-lotus.cjs +52 -48
- package/dist/traits/botanical-lotus.js +2 -2
- package/dist/traits/engines/index.cjs +39 -39
- package/dist/traits/engines/index.d.ts +279 -0
- package/dist/traits/engines/index.js +4 -4
- package/dist/traits/index.cjs +889 -773
- package/dist/traits/index.js +371 -259
- package/dist/world/index.cjs +21 -18
- package/dist/world/index.js +21 -18
- package/dist/world-model/index.cjs +11 -5
- package/dist/world-model/index.d.ts +8 -0
- package/dist/world-model/index.js +11 -5
- package/package.json +75 -69
- package/LICENSE +0 -21
- package/dist/GLTFPipeline-37FPRVPH.js +0 -17
- package/dist/GLTFPipeline-EK3LFJKW.cjs +0 -38
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +0 -27
- package/dist/HoloScriptRuntime-ACDFKVVH.js +0 -10
- package/dist/HoloScriptRuntime-ON2OQVEF.cjs +0 -19
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { ReactiveState, ExpressionEvaluator, createState } from './chunk-XL6INWKT.js';
|
|
2
2
|
import { lazyPeerSymbol, definePeerNamespace, getSharedEventBus, telemetry } from './chunk-IELX2OKI.js';
|
|
3
|
-
import { HoloScriptCodeParser } from './chunk-
|
|
4
|
-
import { JEPAPredictor, jepObjectiveHandler, mitosisHandler, orbitalHandler } from './chunk-
|
|
3
|
+
import { HoloScriptCodeParser } from './chunk-MDR235RZ.js';
|
|
4
|
+
import { JEPAPredictor, jepObjectiveHandler, mitosisHandler, orbitalHandler } from './chunk-TVANHNJ7.js';
|
|
5
5
|
import { logger } from './chunk-PHENW4MQ.js';
|
|
6
6
|
import { init_safeJsonParse, readJson } from './chunk-VVKVQZI6.js';
|
|
7
|
-
import { WebSocketServer, WebSocket } from 'ws';
|
|
8
7
|
|
|
9
8
|
// src/HoloScriptRuntime.ts
|
|
10
9
|
init_safeJsonParse();
|
|
@@ -26,13 +25,7 @@ function calculateArc(start, end, speed) {
|
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
// src/runtime/condition-evaluator.ts
|
|
29
|
-
var SUSPICIOUS_KEYWORDS = [
|
|
30
|
-
"eval",
|
|
31
|
-
"process",
|
|
32
|
-
"require",
|
|
33
|
-
"__proto__",
|
|
34
|
-
"constructor"
|
|
35
|
-
];
|
|
28
|
+
var SUSPICIOUS_KEYWORDS = ["eval", "process", "require", "__proto__", "constructor"];
|
|
36
29
|
function evaluateCondition(condition, evaluate) {
|
|
37
30
|
if (!condition) return false;
|
|
38
31
|
const condStr = String(condition);
|
|
@@ -228,7 +221,10 @@ async function applyTransformation(data, transform, ctx) {
|
|
|
228
221
|
return ctx.evaluateExpression(mapper);
|
|
229
222
|
});
|
|
230
223
|
}
|
|
231
|
-
return data.map((item) => ({
|
|
224
|
+
return data.map((item) => ({
|
|
225
|
+
value: item,
|
|
226
|
+
processed: true
|
|
227
|
+
}));
|
|
232
228
|
}
|
|
233
229
|
case "reduce": {
|
|
234
230
|
if (!Array.isArray(data)) return data;
|
|
@@ -322,6 +318,9 @@ function updateAnimations(animations, setVariable, now) {
|
|
|
322
318
|
}
|
|
323
319
|
}
|
|
324
320
|
}
|
|
321
|
+
|
|
322
|
+
// src/runtime/visualizer-server.ts
|
|
323
|
+
var WebSocket = lazyPeerSymbol("ws", "WebSocket");
|
|
325
324
|
function broadcast(wss, type, payload) {
|
|
326
325
|
if (!wss) return;
|
|
327
326
|
const message = JSON.stringify({ type, payload });
|
|
@@ -583,11 +582,7 @@ var CREATION_PUFF_COUNT = 20;
|
|
|
583
582
|
function normalizePosition(position) {
|
|
584
583
|
if (!position) return [0, 0, 0];
|
|
585
584
|
if (Array.isArray(position)) {
|
|
586
|
-
return [
|
|
587
|
-
Number(position[0]) || 0,
|
|
588
|
-
Number(position[1]) || 0,
|
|
589
|
-
Number(position[2]) || 0
|
|
590
|
-
];
|
|
585
|
+
return [Number(position[0]) || 0, Number(position[1]) || 0, Number(position[2]) || 0];
|
|
591
586
|
}
|
|
592
587
|
const p = position;
|
|
593
588
|
return [Number(p[0]) || 0, Number(p[1]) || 0, Number(p[2]) || 0];
|
|
@@ -693,7 +688,12 @@ async function executeOrb(node, ctx) {
|
|
|
693
688
|
ctx.applyDirectives(orbData);
|
|
694
689
|
}
|
|
695
690
|
if (!isUpdate) {
|
|
696
|
-
ctx.createParticleEffect(
|
|
691
|
+
ctx.createParticleEffect(
|
|
692
|
+
`${node.name}_creation`,
|
|
693
|
+
adjustedPos,
|
|
694
|
+
CREATION_PUFF_COLOR,
|
|
695
|
+
CREATION_PUFF_COUNT
|
|
696
|
+
);
|
|
697
697
|
}
|
|
698
698
|
if (ctx.isAgent(node)) {
|
|
699
699
|
if (!isUpdate || !ctx.getAgentRuntime(node.name)) {
|
|
@@ -1189,10 +1189,7 @@ var NODE_TYPE_HANDLERS = {
|
|
|
1189
1189
|
building: (node) => executeStructure(node),
|
|
1190
1190
|
// Capitalization-sensitive branches (composition vs Composition, template vs Template)
|
|
1191
1191
|
composition: (node, r) => executeComposition(node, r.buildSimpleExecutorContext()),
|
|
1192
|
-
Composition: (node, r) => executeHoloComposition(
|
|
1193
|
-
node,
|
|
1194
|
-
r.buildHoloCompositionContext()
|
|
1195
|
-
),
|
|
1192
|
+
Composition: (node, r) => executeHoloComposition(node, r.buildHoloCompositionContext()),
|
|
1196
1193
|
template: (node, r) => r.executeTemplate(node),
|
|
1197
1194
|
Template: (node, r) => executeHoloTemplate(
|
|
1198
1195
|
node,
|
|
@@ -1237,9 +1234,7 @@ var NODE_TYPE_HANDLERS = {
|
|
|
1237
1234
|
forEach: (node, r) => r.executeForEachLoop(
|
|
1238
1235
|
node
|
|
1239
1236
|
),
|
|
1240
|
-
while: (node, r) => r.executeWhileLoop(
|
|
1241
|
-
node
|
|
1242
|
-
),
|
|
1237
|
+
while: (node, r) => r.executeWhileLoop(node),
|
|
1243
1238
|
if: (node, r) => r.executeIfStatement(
|
|
1244
1239
|
node
|
|
1245
1240
|
),
|
|
@@ -1402,9 +1397,7 @@ async function executeHoloObject(node, ctx) {
|
|
|
1402
1397
|
})),
|
|
1403
1398
|
...template?.directives || []
|
|
1404
1399
|
],
|
|
1405
|
-
traits: new Map(
|
|
1406
|
-
(node.traits || []).map((t) => [t.name, t.config])
|
|
1407
|
-
),
|
|
1400
|
+
traits: new Map((node.traits || []).map((t) => [t.name, t.config])),
|
|
1408
1401
|
children: node.children || []
|
|
1409
1402
|
};
|
|
1410
1403
|
if (template) {
|
|
@@ -1452,7 +1445,14 @@ function applyDirectives(node, ctx) {
|
|
|
1452
1445
|
if (handler) {
|
|
1453
1446
|
handler.onAttach?.(node, d.config || {}, {
|
|
1454
1447
|
emit: (event, payload) => ctx.emit(event, payload),
|
|
1455
|
-
getScaleMultiplier: () => ctx.getCurrentScale() || 1
|
|
1448
|
+
getScaleMultiplier: () => ctx.getCurrentScale() || 1,
|
|
1449
|
+
// premortem 2026-06-07 (task_1780881034070_wnlv): the attach context
|
|
1450
|
+
// previously lacked state access, so a handler's `setState` no-op'd on
|
|
1451
|
+
// attach and solver results never reached durable runtime state (only
|
|
1452
|
+
// the fire-and-forget emit). Mirror updateTraits' context so attach-time
|
|
1453
|
+
// results are persisted for receipt / SimulationContract readers (D.057).
|
|
1454
|
+
getState: () => ctx.state.getSnapshot(),
|
|
1455
|
+
setState: (updates) => ctx.state.update(updates)
|
|
1456
1456
|
});
|
|
1457
1457
|
}
|
|
1458
1458
|
if (d.name === "chat") {
|
|
@@ -2248,7 +2248,11 @@ async function executeMatch(node, ctx) {
|
|
|
2248
2248
|
return lastResult;
|
|
2249
2249
|
} else {
|
|
2250
2250
|
const result = ctx.evaluateExpression(String(matchCase.body));
|
|
2251
|
-
return {
|
|
2251
|
+
return {
|
|
2252
|
+
success: true,
|
|
2253
|
+
output: result,
|
|
2254
|
+
executionTime: Date.now() - startTime
|
|
2255
|
+
};
|
|
2252
2256
|
}
|
|
2253
2257
|
}
|
|
2254
2258
|
}
|
|
@@ -2309,9 +2313,7 @@ async function evaluateHoloExpression(expr, scopeOverride, ctx) {
|
|
|
2309
2313
|
}
|
|
2310
2314
|
const callee = await evaluateHoloExpression(expr.callee, scopeOverride, ctx);
|
|
2311
2315
|
const args = await Promise.all(
|
|
2312
|
-
expr.arguments.map(
|
|
2313
|
-
(a) => evaluateHoloExpression(a, scopeOverride, ctx)
|
|
2314
|
-
)
|
|
2316
|
+
expr.arguments.map((a) => evaluateHoloExpression(a, scopeOverride, ctx))
|
|
2315
2317
|
);
|
|
2316
2318
|
if (typeof callee === "function") {
|
|
2317
2319
|
return callee(...args);
|
|
@@ -2597,11 +2599,7 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
|
|
|
2597
2599
|
ensureJepaObjectiveAttached() {
|
|
2598
2600
|
if (!this.jepaObjectiveAttached) {
|
|
2599
2601
|
const config = this.getJepaObjectiveConfig();
|
|
2600
|
-
jepObjectiveHandler.onAttach?.(
|
|
2601
|
-
this.jepaObjectiveNode,
|
|
2602
|
-
config,
|
|
2603
|
-
this.buildJepaTraitContext()
|
|
2604
|
-
);
|
|
2602
|
+
jepObjectiveHandler.onAttach?.(this.jepaObjectiveNode, config, this.buildJepaTraitContext());
|
|
2605
2603
|
this.jepaObjectiveAttached = true;
|
|
2606
2604
|
}
|
|
2607
2605
|
}
|
|
@@ -2656,17 +2654,12 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
|
|
|
2656
2654
|
const latentDim = config.latentDim;
|
|
2657
2655
|
const outcomeStr = outcome.success ? `success:${String(outcome.output ?? "")}` : `failure:${String(outcome.error ?? "")}`;
|
|
2658
2656
|
const targetVec = textToEmbeddingFloat32(outcomeStr, latentDim);
|
|
2659
|
-
jepObjectiveHandler.onEvent?.(
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
context: contextStr,
|
|
2666
|
-
targetVec,
|
|
2667
|
-
conditioning: void 0
|
|
2668
|
-
}
|
|
2669
|
-
);
|
|
2657
|
+
jepObjectiveHandler.onEvent?.(this.jepaObjectiveNode, config, this.buildJepaTraitContext(), {
|
|
2658
|
+
type: "jepa:encode_pair",
|
|
2659
|
+
context: contextStr,
|
|
2660
|
+
targetVec,
|
|
2661
|
+
conditioning: void 0
|
|
2662
|
+
});
|
|
2670
2663
|
}
|
|
2671
2664
|
/**
|
|
2672
2665
|
* Lightweight fork-detection heuristic for runtime adapters.
|
|
@@ -2742,7 +2735,9 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
|
|
|
2742
2735
|
if (this.isDestroyed) return { success: false, error: "Agent destroyed" };
|
|
2743
2736
|
const forkCheck = this.checkForkSandbox();
|
|
2744
2737
|
if (!forkCheck.allowed) {
|
|
2745
|
-
logger.warn(
|
|
2738
|
+
logger.warn(
|
|
2739
|
+
`[Agent:${this.agentNode.name}] ForkSandboxGate blocked action "${actionName}": ${forkCheck.reason}`
|
|
2740
|
+
);
|
|
2746
2741
|
return { success: false, error: `ForkSandboxGate: ${forkCheck.reason}` };
|
|
2747
2742
|
}
|
|
2748
2743
|
const directives = this.agentNode.directives;
|
|
@@ -2800,9 +2795,7 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
|
|
|
2800
2795
|
try {
|
|
2801
2796
|
this.trainJepaOffline(stateBefore, actionName, executionResult);
|
|
2802
2797
|
} catch (trainErr) {
|
|
2803
|
-
logger.warn(
|
|
2804
|
-
`[JEPA:${this.agentNode.name}] trainJepaOffline error: ${String(trainErr)}`
|
|
2805
|
-
);
|
|
2798
|
+
logger.warn(`[JEPA:${this.agentNode.name}] trainJepaOffline error: ${String(trainErr)}`);
|
|
2806
2799
|
}
|
|
2807
2800
|
return executionResult;
|
|
2808
2801
|
}
|
|
@@ -2943,6 +2936,15 @@ var HoloScriptAgentRuntime = class _HoloScriptAgentRuntime {
|
|
|
2943
2936
|
}
|
|
2944
2937
|
};
|
|
2945
2938
|
|
|
2939
|
+
// src/runtime/plugin-trait-registrar.ts
|
|
2940
|
+
var TRAIT_OWNER_KEY = "__pluginOwner";
|
|
2941
|
+
function registerPluginTraits(target, pluginId, handlers) {
|
|
2942
|
+
for (const handler of handlers) {
|
|
2943
|
+
handler[TRAIT_OWNER_KEY] = pluginId;
|
|
2944
|
+
target.registerTrait(handler.name, handler);
|
|
2945
|
+
}
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2946
2948
|
// src/extensions/ExtensionRegistry.ts
|
|
2947
2949
|
var ExtensionRegistry = class {
|
|
2948
2950
|
constructor(runtime) {
|
|
@@ -3020,9 +3022,11 @@ var StateSynchronizer = lazyPeerSymbol(
|
|
|
3020
3022
|
"@holoscript/mesh",
|
|
3021
3023
|
"StateSynchronizer"
|
|
3022
3024
|
);
|
|
3023
|
-
var
|
|
3024
|
-
"
|
|
3025
|
+
var WebSocketServer = lazyPeerSymbol(
|
|
3026
|
+
"ws",
|
|
3027
|
+
"WebSocketServer"
|
|
3025
3028
|
);
|
|
3029
|
+
var engineRuntime = definePeerNamespace("@holoscript/engine/runtime");
|
|
3026
3030
|
var RUNTIME_SECURITY_LIMITS = {
|
|
3027
3031
|
maxExecutionDepth: 50,
|
|
3028
3032
|
maxTotalNodes: 1e3,
|
|
@@ -3061,7 +3065,10 @@ var HoloScriptRuntime = class {
|
|
|
3061
3065
|
for (const [name, fn] of this.builtinFunctions) {
|
|
3062
3066
|
this.context.functions.set(name, ((...spreadArgs) => fn(spreadArgs)));
|
|
3063
3067
|
}
|
|
3064
|
-
attachStateInvalidationConsumer(
|
|
3068
|
+
attachStateInvalidationConsumer(
|
|
3069
|
+
this.buildEventSystemContext(),
|
|
3070
|
+
defaultStateInvalidationRegistry
|
|
3071
|
+
);
|
|
3065
3072
|
this.registerFunction("get_attended_entities", (args) => {
|
|
3066
3073
|
const topK = typeof args[0] === "number" ? args[0] : 10;
|
|
3067
3074
|
const selfRaw = this.context.variables.get("self");
|
|
@@ -3090,7 +3097,9 @@ var HoloScriptRuntime = class {
|
|
|
3090
3097
|
this.traitHandlers.set("orbital", orbitalHandler);
|
|
3091
3098
|
this.extensionRegistry = new ExtensionRegistry(this);
|
|
3092
3099
|
engineRuntime.stateMachineInterpreter.setHookExecutor((code) => this.evaluateExpression(code));
|
|
3093
|
-
engineRuntime.stateMachineInterpreter.setGuardEvaluator(
|
|
3100
|
+
engineRuntime.stateMachineInterpreter.setGuardEvaluator(
|
|
3101
|
+
(expr) => this.evaluateExpression(expr)
|
|
3102
|
+
);
|
|
3094
3103
|
}
|
|
3095
3104
|
/**
|
|
3096
3105
|
* Initialize built-in functions
|
|
@@ -3134,6 +3143,15 @@ var HoloScriptRuntime = class {
|
|
|
3134
3143
|
*/
|
|
3135
3144
|
registerTrait(name, handler) {
|
|
3136
3145
|
const vrName = name;
|
|
3146
|
+
const existingHandler = this.traitHandlers.get(vrName);
|
|
3147
|
+
if (existingHandler) {
|
|
3148
|
+
const priorOwner = existingHandler[TRAIT_OWNER_KEY] ?? "unknown";
|
|
3149
|
+
const incomingOwner = handler[TRAIT_OWNER_KEY] ?? "unknown";
|
|
3150
|
+
logger.warn(
|
|
3151
|
+
`Trait '${name}' is already registered by '${String(priorOwner)}'; ignoring the duplicate from '${String(incomingOwner)}' (keep-first). Trait names must be unique across plugins.`
|
|
3152
|
+
);
|
|
3153
|
+
return;
|
|
3154
|
+
}
|
|
3137
3155
|
this.traitHandlers.set(vrName, handler);
|
|
3138
3156
|
logger.info(`Registered trait: ${name}`);
|
|
3139
3157
|
}
|
|
@@ -4299,6 +4317,6 @@ var HoloScriptRuntime = class {
|
|
|
4299
4317
|
}
|
|
4300
4318
|
};
|
|
4301
4319
|
|
|
4302
|
-
export { HoloScriptAgentRuntime, HoloScriptRuntime };
|
|
4303
|
-
//# sourceMappingURL=chunk-
|
|
4304
|
-
//# sourceMappingURL=chunk-
|
|
4320
|
+
export { HoloScriptAgentRuntime, HoloScriptRuntime, TRAIT_OWNER_KEY, registerPluginTraits };
|
|
4321
|
+
//# sourceMappingURL=chunk-PXNZ6TME.js.map
|
|
4322
|
+
//# sourceMappingURL=chunk-PXNZ6TME.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_CompilerBase, CompilerBase, escapeStringValue } from './chunk-
|
|
1
|
+
import { init_CompilerBase, CompilerBase, escapeStringValue } from './chunk-C7ZBSV2Q.js';
|
|
2
2
|
import { init_roomplan, init_lidar_scanner, init_face_tracking, init_ios_object_capture, init_shareplay, init_uwb_positioning, init_airpods_spatial_audio, ROOMPLAN_TRAITS, LIDAR_SCANNER_TRAITS, IOS_OBJECT_CAPTURE_TRAITS, FACE_TRACKING_TRAITS, SHAREPLAY_TRAITS, UWB_POSITIONING_TRAITS, AIRPODS_SPATIAL_AUDIO_TRAITS } from './chunk-SIEXCILW.js';
|
|
3
3
|
import { init_npu_scene, init_portal_ar, init_camera_hand_tracking, NPU_SCENE_TRAITS, NPU_SCENE_DEFAULTS, PORTAL_AR_TRAITS, CAMERA_HAND_TRACKING_TRAITS } from './chunk-CBJY23VL.js';
|
|
4
4
|
import { __esm, __export } from './chunk-OL46QLBJ.js';
|
|
@@ -248,9 +248,7 @@ function generateSceneFile(compiler, composition) {
|
|
|
248
248
|
compiler.emit("var nodes: [String: SCNNode] = [:]");
|
|
249
249
|
for (const obj of composition.objects || []) {
|
|
250
250
|
const varName = compiler.sanitizeName(obj.name);
|
|
251
|
-
compiler.emit(
|
|
252
|
-
`nodes["${escapeStringValue(obj.name, "Swift")}"] = make${varName}()`
|
|
253
|
-
);
|
|
251
|
+
compiler.emit(`nodes["${escapeStringValue(obj.name, "Swift")}"] = make${varName}()`);
|
|
254
252
|
}
|
|
255
253
|
compiler.emit("return nodes");
|
|
256
254
|
compiler.indentLevel--;
|
|
@@ -735,7 +733,9 @@ function emitGeoAnchorMethods(compiler, composition) {
|
|
|
735
733
|
compiler.emit("let anchor = ARAnchor(name: name, transform: transform)");
|
|
736
734
|
compiler.emit("arView.session.add(anchor: anchor)");
|
|
737
735
|
compiler.emit("geoAnchors[name] = anchor");
|
|
738
|
-
compiler.emit(
|
|
736
|
+
compiler.emit(
|
|
737
|
+
'print("[HoloScript] Location-anchored: \\(name) at (\\(latitude), \\(longitude))")'
|
|
738
|
+
);
|
|
739
739
|
compiler.indentLevel--;
|
|
740
740
|
compiler.emit("}");
|
|
741
741
|
compiler.emit("");
|
|
@@ -793,7 +793,9 @@ function emitGeoAnchorMethods(compiler, composition) {
|
|
|
793
793
|
compiler.emit(
|
|
794
794
|
"arView.session.run(configuration, options: [.resetTracking, .removeExistingAnchors])"
|
|
795
795
|
);
|
|
796
|
-
compiler.emit(
|
|
796
|
+
compiler.emit(
|
|
797
|
+
'print("[HoloScript] World map restored with \\(worldMap.anchors.count) anchors")'
|
|
798
|
+
);
|
|
797
799
|
compiler.indentLevel--;
|
|
798
800
|
compiler.emit("}");
|
|
799
801
|
compiler.emit("");
|
|
@@ -1083,7 +1085,9 @@ function generateRoomPlanFile(compiler, composition) {
|
|
|
1083
1085
|
compiler.emit("");
|
|
1084
1086
|
compiler.emit(`extension ${cls}RoomPlanManager: RoomCaptureSessionDelegate {`);
|
|
1085
1087
|
compiler.indentLevel++;
|
|
1086
|
-
compiler.emit(
|
|
1088
|
+
compiler.emit(
|
|
1089
|
+
"func captureSession(_ session: RoomCaptureSession, didUpdate room: CapturedRoom) {"
|
|
1090
|
+
);
|
|
1087
1091
|
compiler.indentLevel++;
|
|
1088
1092
|
compiler.emit("DispatchQueue.main.async { [weak self] in");
|
|
1089
1093
|
compiler.indentLevel++;
|
|
@@ -1241,7 +1245,8 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1241
1245
|
compiler.emit("@Published var isScanning: Bool = false");
|
|
1242
1246
|
compiler.emit("@Published var entities: [LiDARHoloEntity] = []");
|
|
1243
1247
|
compiler.emit("@Published var meshAnchors: [ARMeshAnchor] = []");
|
|
1244
|
-
if (traits.has("lidar_point_cloud"))
|
|
1248
|
+
if (traits.has("lidar_point_cloud"))
|
|
1249
|
+
compiler.emit("@Published var pointCloud: [simd_float3] = []");
|
|
1245
1250
|
if (traits.has("lidar_depth_map")) compiler.emit("@Published var depthMap: CVPixelBuffer?");
|
|
1246
1251
|
if (traits.has("lidar_depth_confidence"))
|
|
1247
1252
|
compiler.emit("@Published var confidenceMap: CVPixelBuffer?");
|
|
@@ -1349,7 +1354,9 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1349
1354
|
compiler.emit("// MARK: - Classification extraction");
|
|
1350
1355
|
compiler.emit("");
|
|
1351
1356
|
compiler.emit("/// Extract per-face classification from an ARMeshAnchor.");
|
|
1352
|
-
compiler.emit(
|
|
1357
|
+
compiler.emit(
|
|
1358
|
+
"func extractClassifications(_ anchor: ARMeshAnchor) -> [ARMeshClassification] {"
|
|
1359
|
+
);
|
|
1353
1360
|
compiler.indentLevel++;
|
|
1354
1361
|
compiler.emit("guard let classBuffer = anchor.geometry.classification else { return [] }");
|
|
1355
1362
|
compiler.emit("var classifications: [ARMeshClassification] = []");
|
|
@@ -1517,7 +1524,9 @@ function generateLiDARScannerFile(compiler, composition) {
|
|
|
1517
1524
|
compiler.emit(
|
|
1518
1525
|
"let simplified = MDLMesh(meshBySubdividing: mdlMesh, submeshIndex: 0, subdivisionLevels: 0, allocator: allocator)"
|
|
1519
1526
|
);
|
|
1520
|
-
compiler.emit(
|
|
1527
|
+
compiler.emit(
|
|
1528
|
+
'print("[HoloScript] Mesh simplified to target face count: \\(targetFaceCount)")'
|
|
1529
|
+
);
|
|
1521
1530
|
compiler.emit("return simplified");
|
|
1522
1531
|
compiler.indentLevel--;
|
|
1523
1532
|
compiler.emit("}");
|
|
@@ -2502,7 +2511,9 @@ function generateHandTrackingFile(compiler, composition) {
|
|
|
2502
2511
|
compiler.emit("session.addInput(input)");
|
|
2503
2512
|
compiler.emit("");
|
|
2504
2513
|
compiler.emit("let output = AVCaptureVideoDataOutput()");
|
|
2505
|
-
compiler.emit(
|
|
2514
|
+
compiler.emit(
|
|
2515
|
+
'output.setSampleBufferDelegate(self, queue: DispatchQueue(label: "handTracking"))'
|
|
2516
|
+
);
|
|
2506
2517
|
compiler.emit("session.addOutput(output)");
|
|
2507
2518
|
compiler.emit("");
|
|
2508
2519
|
compiler.emit("captureSession = session");
|
|
@@ -2664,7 +2675,9 @@ function generateHandTrackingFile(compiler, composition) {
|
|
|
2664
2675
|
"func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {"
|
|
2665
2676
|
);
|
|
2666
2677
|
compiler.indentLevel++;
|
|
2667
|
-
compiler.emit(
|
|
2678
|
+
compiler.emit(
|
|
2679
|
+
"guard let pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer) else { return }"
|
|
2680
|
+
);
|
|
2668
2681
|
compiler.emit("");
|
|
2669
2682
|
compiler.emit(
|
|
2670
2683
|
"let handler = VNImageRequestHandler(cvPixelBuffer: pixelBuffer, orientation: .up, options: [:])"
|
|
@@ -2995,7 +3008,9 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
2995
3008
|
compiler.emit("case .full: detail = .full");
|
|
2996
3009
|
compiler.emit("case .raw: detail = .raw");
|
|
2997
3010
|
compiler.emit("}");
|
|
2998
|
-
compiler.emit(
|
|
3011
|
+
compiler.emit(
|
|
3012
|
+
"let request = PhotogrammetrySession.Request.modelFile(url: url, detail: detail)"
|
|
3013
|
+
);
|
|
2999
3014
|
compiler.emit("try session.process(requests: [request])");
|
|
3000
3015
|
compiler.emit("for try await output in session.outputs {");
|
|
3001
3016
|
compiler.indentLevel++;
|
|
@@ -3040,7 +3055,9 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
3040
3055
|
compiler.emit("}");
|
|
3041
3056
|
compiler.emit("");
|
|
3042
3057
|
}
|
|
3043
|
-
compiler.emit(
|
|
3058
|
+
compiler.emit(
|
|
3059
|
+
"private func handlePhotogrammetryResult(_ result: PhotogrammetrySession.Result) {"
|
|
3060
|
+
);
|
|
3044
3061
|
compiler.indentLevel++;
|
|
3045
3062
|
compiler.emit("switch result {");
|
|
3046
3063
|
compiler.emit("case .modelFile(let url):");
|
|
@@ -3082,7 +3099,9 @@ function generateObjectCaptureFile(compiler, composition) {
|
|
|
3082
3099
|
compiler.indentLevel--;
|
|
3083
3100
|
compiler.emit("} catch {");
|
|
3084
3101
|
compiler.indentLevel++;
|
|
3085
|
-
compiler.emit(
|
|
3102
|
+
compiler.emit(
|
|
3103
|
+
'logger.error("[HoloScript] USDZ export failed: \\(error.localizedDescription)")'
|
|
3104
|
+
);
|
|
3086
3105
|
compiler.emit("return nil");
|
|
3087
3106
|
compiler.indentLevel--;
|
|
3088
3107
|
compiler.emit("}");
|
|
@@ -3696,7 +3715,9 @@ function generateSharePlayFile(compiler, composition) {
|
|
|
3696
3715
|
if (compiler.compositionHasTrait(composition, "shareplay_anchor_local")) {
|
|
3697
3716
|
compiler.emit("// MARK: - Local Anchor Mapping");
|
|
3698
3717
|
compiler.emit("");
|
|
3699
|
-
compiler.emit(
|
|
3718
|
+
compiler.emit(
|
|
3719
|
+
"func calibrateLocalAnchor(arFrame: ARFrame, sharedReferencePoint: simd_float3) {"
|
|
3720
|
+
);
|
|
3700
3721
|
compiler.indentLevel++;
|
|
3701
3722
|
compiler.emit("// Each participant creates a local ARKit anchor and maps shared positions");
|
|
3702
3723
|
compiler.emit("let cameraPos = arFrame.camera.transform.columns.3");
|
|
@@ -3735,7 +3756,9 @@ function generateSharePlayFile(compiler, composition) {
|
|
|
3735
3756
|
if (compiler.compositionHasTrait(composition, "shareplay_mute_zone")) {
|
|
3736
3757
|
compiler.emit("// MARK: - Mute Zones");
|
|
3737
3758
|
compiler.emit("");
|
|
3738
|
-
compiler.emit(
|
|
3759
|
+
compiler.emit(
|
|
3760
|
+
"func addMuteZone(center: simd_float3, radius: Float, attenuation: Float = 0.0) {"
|
|
3761
|
+
);
|
|
3739
3762
|
compiler.indentLevel++;
|
|
3740
3763
|
compiler.emit(
|
|
3741
3764
|
"muteZones.append(MuteZone(center: center, radius: radius, attenuation: attenuation))"
|
|
@@ -4356,7 +4379,9 @@ function generateUWBPositioningFile(compiler, composition) {
|
|
|
4356
4379
|
compiler.emit("mcAdvertiser?.delegate = self");
|
|
4357
4380
|
compiler.emit("mcAdvertiser?.startAdvertisingPeer()");
|
|
4358
4381
|
compiler.emit("");
|
|
4359
|
-
compiler.emit(
|
|
4382
|
+
compiler.emit(
|
|
4383
|
+
"mcBrowser = MCNearbyServiceBrowser(peer: localPeerId, serviceType: serviceType)"
|
|
4384
|
+
);
|
|
4360
4385
|
compiler.emit("mcBrowser?.delegate = self");
|
|
4361
4386
|
compiler.emit("mcBrowser?.startBrowsingForPeers()");
|
|
4362
4387
|
compiler.emit("");
|
|
@@ -4972,11 +4997,15 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
4972
4997
|
}
|
|
4973
4998
|
compiler.emit("// MARK: - Audio Pipeline");
|
|
4974
4999
|
compiler.emit("");
|
|
4975
|
-
compiler.emit(
|
|
5000
|
+
compiler.emit(
|
|
5001
|
+
"private func loadAndPlayAudio(sourceId: String, audioFile: String, gain: Float) {"
|
|
5002
|
+
);
|
|
4976
5003
|
compiler.indentLevel++;
|
|
4977
5004
|
compiler.emit("guard let engine = phaseEngine, let source = sources[sourceId] else { return }");
|
|
4978
5005
|
compiler.emit("");
|
|
4979
|
-
compiler.emit(
|
|
5006
|
+
compiler.emit(
|
|
5007
|
+
"guard let url = Bundle.main.url(forResource: audioFile, withExtension: nil) else {"
|
|
5008
|
+
);
|
|
4980
5009
|
compiler.indentLevel++;
|
|
4981
5010
|
compiler.emit('print("[SpatialAudio] Audio file not found: \\(audioFile)")');
|
|
4982
5011
|
compiler.emit("return");
|
|
@@ -4995,7 +5024,9 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
4995
5024
|
compiler.indentLevel--;
|
|
4996
5025
|
compiler.emit(")");
|
|
4997
5026
|
compiler.emit("");
|
|
4998
|
-
compiler.emit(
|
|
5027
|
+
compiler.emit(
|
|
5028
|
+
"let channelLayout = AVAudioChannelLayout(layoutTag: kAudioChannelLayoutTag_Mono)!"
|
|
5029
|
+
);
|
|
4999
5030
|
compiler.emit("let samplerNodeDef = PHASESamplerNodeDefinition(");
|
|
5000
5031
|
compiler.indentLevel++;
|
|
5001
5032
|
compiler.emit("soundAssetIdentifier: sourceId,");
|
|
@@ -5010,14 +5041,18 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
5010
5041
|
if (traits.has("audio_falloff")) {
|
|
5011
5042
|
compiler.emit("// Distance-based falloff (audio_falloff)");
|
|
5012
5043
|
compiler.emit("let distanceModelParameters = PHASEGeometricSpreadingDistanceModelParameters()");
|
|
5013
|
-
compiler.emit(
|
|
5044
|
+
compiler.emit(
|
|
5045
|
+
"distanceModelParameters.fadeOutParameters = PHASEDistanceModelFadeOutParameters("
|
|
5046
|
+
);
|
|
5014
5047
|
compiler.indentLevel++;
|
|
5015
5048
|
compiler.emit("cullDistance: 20.0");
|
|
5016
5049
|
compiler.indentLevel--;
|
|
5017
5050
|
compiler.emit(")");
|
|
5018
5051
|
compiler.emit("distanceModelParameters.rolloffFactor = 1.0");
|
|
5019
5052
|
compiler.emit("");
|
|
5020
|
-
compiler.emit(
|
|
5053
|
+
compiler.emit(
|
|
5054
|
+
"let spatialPipelineDef = PHASESpatialPipeline(flags: [.directPathTransmission])!"
|
|
5055
|
+
);
|
|
5021
5056
|
compiler.emit(
|
|
5022
5057
|
"spatialPipelineDef.entries[PHASESpatialCategory.directPath]!.sendLevel = Double(gain)"
|
|
5023
5058
|
);
|
|
@@ -5029,7 +5064,9 @@ function generateSpatialAudioFile(compiler, composition) {
|
|
|
5029
5064
|
compiler.emit(")");
|
|
5030
5065
|
compiler.emit("spatialMixerDef.distanceModelParameters = distanceModelParameters");
|
|
5031
5066
|
} else {
|
|
5032
|
-
compiler.emit(
|
|
5067
|
+
compiler.emit(
|
|
5068
|
+
"let spatialPipelineDef = PHASESpatialPipeline(flags: [.directPathTransmission])!"
|
|
5069
|
+
);
|
|
5033
5070
|
compiler.emit(
|
|
5034
5071
|
"spatialPipelineDef.entries[PHASESpatialCategory.directPath]!.sendLevel = Double(gain)"
|
|
5035
5072
|
);
|
|
@@ -5382,5 +5419,5 @@ var init_IOSCompiler = __esm({
|
|
|
5382
5419
|
});
|
|
5383
5420
|
|
|
5384
5421
|
export { IOSCompiler, IOSCompiler_exports, compileToIOS, init_IOSCompiler };
|
|
5385
|
-
//# sourceMappingURL=chunk-
|
|
5386
|
-
//# sourceMappingURL=chunk-
|
|
5422
|
+
//# sourceMappingURL=chunk-Q2Q34NF3.js.map
|
|
5423
|
+
//# sourceMappingURL=chunk-Q2Q34NF3.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compilePhysicsBlock, physicsToSDF, compileMaterialBlock, materialToSDF } from './chunk-
|
|
2
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, compilePhysicsBlock, physicsToSDF, compileMaterialBlock, materialToSDF } from './chunk-ZA34AN3R.js';
|
|
2
|
+
import { init_CompilerBase, CompilerBase } from './chunk-C7ZBSV2Q.js';
|
|
3
3
|
import { __export, __esm } from './chunk-OL46QLBJ.js';
|
|
4
4
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
5
5
|
|
|
@@ -213,10 +213,14 @@ ${layers}`;
|
|
|
213
213
|
this.emit("<render_engine>ogre2</render_engine>");
|
|
214
214
|
this.indentLevel--;
|
|
215
215
|
this.emit("</plugin>");
|
|
216
|
-
this.emit(
|
|
216
|
+
this.emit(
|
|
217
|
+
'<plugin name="gz::sim::systems::SceneBroadcaster" filename="gz-sim-scene-broadcaster-system" />'
|
|
218
|
+
);
|
|
217
219
|
this.emit('<plugin name="gz::sim::systems::Contact" filename="gz-sim-contact-system" />');
|
|
218
220
|
this.emit('<plugin name="gz::sim::systems::Imu" filename="gz-sim-imu-system" />');
|
|
219
|
-
this.emit(
|
|
221
|
+
this.emit(
|
|
222
|
+
'<plugin name="gz::sim::systems::JointStatePublisher" filename="gz-sim-joint-state-publisher-system" />'
|
|
223
|
+
);
|
|
220
224
|
this.emit("");
|
|
221
225
|
}
|
|
222
226
|
calculateInertia(geometry, mass, scale) {
|
|
@@ -604,5 +608,5 @@ ${layers}`;
|
|
|
604
608
|
});
|
|
605
609
|
|
|
606
610
|
export { SDFCompiler, SDFCompiler_default, SDFCompiler_exports, init_SDFCompiler };
|
|
607
|
-
//# sourceMappingURL=chunk-
|
|
608
|
-
//# sourceMappingURL=chunk-
|
|
611
|
+
//# sourceMappingURL=chunk-QBWNJXNR.js.map
|
|
612
|
+
//# sourceMappingURL=chunk-QBWNJXNR.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_ProvenanceSemiring, authorityWeight, ProvenanceSemiring } from './chunk-
|
|
2
|
-
import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError } from './chunk-
|
|
1
|
+
import { init_ProvenanceSemiring, authorityWeight, ProvenanceSemiring } from './chunk-SLHLXUMO.js';
|
|
2
|
+
import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError } from './chunk-C7ZBSV2Q.js';
|
|
3
3
|
|
|
4
4
|
// src/compiler/TraitCompositionCompiler.ts
|
|
5
5
|
init_AgentRBAC();
|
|
@@ -160,5 +160,5 @@ var UnauthorizedTraitCompositionAccessError = class extends UnauthorizedCompiler
|
|
|
160
160
|
};
|
|
161
161
|
|
|
162
162
|
export { CompositionConflictError, MissingComponentError, TraitCompositionCompiler, UnauthorizedTraitCompositionAccessError };
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
163
|
+
//# sourceMappingURL=chunk-QFU53KRH.js.map
|
|
164
|
+
//# sourceMappingURL=chunk-QFU53KRH.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkEBS32AJI_cjs = require('./chunk-EBS32AJI.cjs');
|
|
4
|
+
var chunkGH6C2QGW_cjs = require('./chunk-GH6C2QGW.cjs');
|
|
5
|
+
var chunkLODTHGST_cjs = require('./chunk-LODTHGST.cjs');
|
|
6
6
|
var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
|
|
7
7
|
var ans = require('@holoscript/core-types/ans');
|
|
8
8
|
|
|
@@ -14,10 +14,10 @@ chunkHCCQLAA4_cjs.__export(OpenXRCompiler_exports, {
|
|
|
14
14
|
exports.OpenXRCompiler = void 0;
|
|
15
15
|
var init_OpenXRCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
16
16
|
"src/compiler/OpenXRCompiler.ts"() {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.OpenXRCompiler = class extends
|
|
17
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
18
|
+
chunkEBS32AJI_cjs.init_PlatformConditionalCompilerMixin();
|
|
19
|
+
chunkGH6C2QGW_cjs.init_DomainBlockCompilerMixin();
|
|
20
|
+
exports.OpenXRCompiler = class extends chunkLODTHGST_cjs.CompilerBase {
|
|
21
21
|
constructor(options = {}) {
|
|
22
22
|
super();
|
|
23
23
|
this.compilerName = "OpenXRCompiler";
|
|
@@ -36,7 +36,7 @@ var init_OpenXRCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
36
36
|
}
|
|
37
37
|
compile(composition, agentToken, outputPath) {
|
|
38
38
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
39
|
-
composition =
|
|
39
|
+
composition = chunkEBS32AJI_cjs.filterCompositionForPlatform(composition, "quest3");
|
|
40
40
|
this.lines = [];
|
|
41
41
|
this.indentLevel = 0;
|
|
42
42
|
this.emit("// Auto-generated by HoloScript OpenXRCompiler");
|
|
@@ -136,32 +136,32 @@ var init_OpenXRCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
136
136
|
if (domainBlocks.length > 0) {
|
|
137
137
|
this.emit("");
|
|
138
138
|
this.emit("// === v4.2 Domain Blocks ===");
|
|
139
|
-
const compiled =
|
|
139
|
+
const compiled = chunkGH6C2QGW_cjs.compileDomainBlocks(
|
|
140
140
|
// @ts-expect-error During migration
|
|
141
141
|
domainBlocks,
|
|
142
142
|
{
|
|
143
143
|
material: (block) => {
|
|
144
|
-
const m =
|
|
144
|
+
const m = chunkGH6C2QGW_cjs.compileMaterialBlock(block);
|
|
145
145
|
return `// Material: "${this.escapeStringValue(m.name, "TypeScript")}" type=${m.type} baseColor=${m.baseColor || "none"} roughness=${m.roughness ?? "default"} metallic=${m.metallic ?? "default"}`;
|
|
146
146
|
},
|
|
147
147
|
physics: (block) => {
|
|
148
|
-
const p =
|
|
148
|
+
const p = chunkGH6C2QGW_cjs.compilePhysicsBlock(block);
|
|
149
149
|
return `// Physics: ${p.keyword} "${p.name || ""}" colliders=${p.colliders?.length || 0} rigidbody=${!!p.rigidbody}`;
|
|
150
150
|
},
|
|
151
151
|
vfx: (block) => {
|
|
152
|
-
const ps =
|
|
152
|
+
const ps = chunkGH6C2QGW_cjs.compileParticleBlock(block);
|
|
153
153
|
return `// Particles: "${this.escapeStringValue(ps.name, "TypeScript")}" rate=${ps.properties.rate || "default"} modules=${ps.modules.length}`;
|
|
154
154
|
},
|
|
155
155
|
postfx: (block) => {
|
|
156
|
-
const pp =
|
|
156
|
+
const pp = chunkGH6C2QGW_cjs.compilePostProcessingBlock(block);
|
|
157
157
|
return `// PostFX: ${pp.keyword} effects=[${pp.effects.map((e) => e.type).join(", ")}]`;
|
|
158
158
|
},
|
|
159
159
|
audio: (block) => {
|
|
160
|
-
const a =
|
|
160
|
+
const a = chunkGH6C2QGW_cjs.compileAudioSourceBlock(block);
|
|
161
161
|
return `// Audio: "${this.escapeStringValue(a.name, "TypeScript")}" (${a.keyword}) clip=${a.properties.clip || "none"}`;
|
|
162
162
|
},
|
|
163
163
|
weather: (block) => {
|
|
164
|
-
const w =
|
|
164
|
+
const w = chunkGH6C2QGW_cjs.compileWeatherBlock(block);
|
|
165
165
|
return `// Weather: ${w.keyword} layers=[${w.layers.map((l) => l.type).join(", ")}]`;
|
|
166
166
|
}
|
|
167
167
|
},
|
|
@@ -1045,5 +1045,5 @@ var init_OpenXRCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
1045
1045
|
|
|
1046
1046
|
exports.OpenXRCompiler_exports = OpenXRCompiler_exports;
|
|
1047
1047
|
exports.init_OpenXRCompiler = init_OpenXRCompiler;
|
|
1048
|
-
//# sourceMappingURL=chunk-
|
|
1049
|
-
//# sourceMappingURL=chunk-
|
|
1048
|
+
//# sourceMappingURL=chunk-QGMUTVVH.cjs.map
|
|
1049
|
+
//# sourceMappingURL=chunk-QGMUTVVH.cjs.map
|