@holoscript/core 8.0.6 → 8.0.8
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-2GQHTXOK.js → chunk-22Q5A6RV.js} +3 -3
- package/dist/{chunk-XHZCF3AS.cjs → chunk-2BZHWUSR.cjs} +27 -15
- package/dist/{chunk-XJAN7CZG.cjs → chunk-2GCNOI2U.cjs} +2 -2
- package/dist/{chunk-DBPGNHFS.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-RCZHLCX2.js → chunk-3GWWJT7L.js} +4 -4
- package/dist/{chunk-EK7L4DW7.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-VHAONJBY.js → chunk-4JGRWHZJ.js} +7 -5
- package/dist/{chunk-2J5WZLF5.cjs → chunk-4W5G5QVL.cjs} +26 -26
- package/dist/{chunk-GQHQOPXZ.cjs → chunk-4YNYPHH3.cjs} +186 -17
- package/dist/{chunk-H5PUZHJV.cjs → chunk-56VOWURB.cjs} +61 -40
- package/dist/{chunk-DQRQZB33.cjs → chunk-5A4TCHOC.cjs} +3 -3
- package/dist/{chunk-M56JSP4A.js → chunk-5EDVCNRT.js} +2 -2
- package/dist/{chunk-YU5RJQPE.js → chunk-5ET6L4NS.js} +3 -3
- package/dist/{chunk-A3GFOZAF.cjs → chunk-63ZGNR2T.cjs} +43 -39
- package/dist/{chunk-NG77ATEW.cjs → chunk-6PRZIHGL.cjs} +6 -6
- package/dist/{chunk-OXGPGQXN.cjs → chunk-7DMMMBCY.cjs} +7 -7
- package/dist/{chunk-FHP6LXJS.js → chunk-7E7GCQCK.js} +2 -2
- package/dist/{chunk-P4AIF7OQ.js → chunk-7VMGP2FW.js} +44 -28
- package/dist/{chunk-7MVLEZB2.js → chunk-7X5PNIQJ.js} +3 -3
- package/dist/{chunk-X7QB5PL5.cjs → chunk-7ZHYEITD.cjs} +11 -11
- package/dist/{chunk-KPJL34Y7.cjs → chunk-ACVWFGBI.cjs} +2 -2
- package/dist/{chunk-QWSB553J.cjs → chunk-AWB7QYY6.cjs} +6 -6
- package/dist/{chunk-VATGR4EM.js → chunk-B4EKV6HQ.js} +61 -40
- package/dist/{chunk-HBEN5TQR.js → chunk-BRNUPDHJ.js} +5 -5
- package/dist/{chunk-F63LYRVE.js → chunk-BTKZGHAV.js} +23 -11
- package/dist/{chunk-YTR32ZEB.cjs → chunk-C4GSLCHE.cjs} +300 -125
- package/dist/{chunk-CXS3DUKD.js → chunk-C7ZBSV2Q.js} +3 -3
- package/dist/{chunk-WOH6LKYT.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-D63CGNJU.js → chunk-DY72BMU5.js} +3 -3
- package/dist/{chunk-AIA52I7T.cjs → chunk-EBS32AJI.cjs} +6 -4
- package/dist/{chunk-DCE3LDO3.cjs → chunk-EDPYCLRC.cjs} +52 -62
- package/dist/{chunk-NDUX553L.js → chunk-F2G6CWFT.js} +240 -65
- package/dist/{chunk-X7LYK5TX.cjs → chunk-F5LKJ6F5.cjs} +43 -31
- package/dist/{chunk-LAUFLPB6.js → chunk-FGMDMJM7.js} +10 -5
- package/dist/{chunk-P52PPB5R.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-5BLWXOIP.cjs → chunk-G6PNEASF.cjs} +13 -13
- package/dist/{chunk-2BSMSUCE.js → chunk-GASCWJK5.js} +2 -2
- package/dist/{chunk-2VL6SJ33.cjs → chunk-GH6C2QGW.cjs} +12 -21
- package/dist/{chunk-JEB5UU3E.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-IBXT6UP3.cjs → chunk-HFSVMKM3.cjs} +14 -14
- package/dist/{chunk-E767PVC6.cjs → chunk-HLFDZ35S.cjs} +5 -5
- package/dist/{chunk-ZXZ2AL2J.cjs → chunk-I76GIKN7.cjs} +20 -16
- package/dist/{chunk-4FDL7JLJ.cjs → chunk-KAIVDEIG.cjs} +145 -60
- package/dist/{chunk-X4EBCG4K.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-4DO425P5.js → chunk-L5U4W6JC.js} +4 -4
- package/dist/{chunk-HBLKLLG5.cjs → chunk-LMJ5EBV7.cjs} +10 -10
- package/dist/{chunk-QWAR3GY6.cjs → chunk-LODTHGST.cjs} +8 -8
- package/dist/{chunk-TFUMBR7G.cjs → chunk-LPS5AMQD.cjs} +8 -8
- package/dist/{chunk-ISG3TQ2O.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-ULXWSPCK.js → chunk-MSYSQ2AJ.js} +101 -16
- package/dist/{chunk-TCBJMNXS.cjs → chunk-NGBXXZLL.cjs} +50 -62
- package/dist/{chunk-RXU4PQKA.js → chunk-NHJLP37F.js} +6 -6
- package/dist/{chunk-NTGBEMYL.cjs → chunk-NHYRRAGI.cjs} +5 -5
- package/dist/{chunk-YG3OAHJZ.cjs → chunk-O3MGZDCT.cjs} +89 -52
- package/dist/{chunk-GIOYPNTH.js → chunk-OABEO6HH.js} +185 -16
- package/dist/{chunk-N5YOAFNA.cjs → chunk-OS533P33.cjs} +37 -29
- package/dist/{chunk-IIUFMUTV.js → chunk-PABONWKI.js} +24 -11
- package/dist/{chunk-5BQIJG3O.js → chunk-PXNZ6TME.js} +47 -57
- package/dist/{chunk-KDZRD6EI.js → chunk-Q2Q34NF3.js} +63 -26
- package/dist/{chunk-IS4AEGLU.js → chunk-QBWNJXNR.js} +10 -6
- package/dist/{chunk-5IHG2LGT.js → chunk-QFU53KRH.js} +4 -4
- package/dist/{chunk-NTJZJ5IP.cjs → chunk-QGMUTVVH.cjs} +17 -17
- package/dist/{chunk-MYY4PMWX.cjs → chunk-RUVBFAF7.cjs} +50 -11
- package/dist/{chunk-E64LOLJU.js → chunk-S762UEV5.js} +5 -5
- package/dist/{chunk-3SBVODUP.cjs → chunk-SH5PPVK7.cjs} +61 -45
- package/dist/{chunk-LY4DMQOW.cjs → chunk-SKZPC5AG.cjs} +5 -5
- package/dist/{chunk-TJHVSBP2.js → chunk-SLHLXUMO.js} +10 -4
- package/dist/{chunk-S6OVFUXD.js → chunk-SSSN7VAM.js} +3 -3
- package/dist/{chunk-K5UGRXKR.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-U36W76U7.js → chunk-TEVX443G.js} +44 -51
- package/dist/{chunk-6DOKCECB.cjs → chunk-TQ377OLB.cjs} +23 -21
- package/dist/{chunk-YAPPQYJH.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-3OIZJNVT.cjs → chunk-UGXHYIWT.cjs} +5 -5
- package/dist/{chunk-44GM3P4G.cjs → chunk-ULMSSHCJ.cjs} +21 -21
- package/dist/{chunk-3B5NVDHJ.cjs → chunk-UOL6Y5TD.cjs} +18 -18
- package/dist/{chunk-5S7RKFGR.cjs → chunk-UVFI7XIR.cjs} +10 -4
- package/dist/{chunk-5TIZXMED.cjs → chunk-V7AKE5VT.cjs} +10 -10
- package/dist/{chunk-3B7AY37W.js → chunk-VEPGBETF.js} +6 -6
- package/dist/{chunk-BKCK3IU6.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-PVWNU4QT.cjs → chunk-WFKVS2K4.cjs} +64 -26
- package/dist/{chunk-TDCJ7YPA.js → chunk-WXQ57LAO.js} +3 -3
- package/dist/{chunk-NE5CZ2NC.cjs → chunk-X27QRG4C.cjs} +38 -38
- package/dist/{chunk-TVHSPJ4N.cjs → chunk-X2AVEAZM.cjs} +30 -23
- package/dist/{chunk-C34AJIJO.js → chunk-XQ5MWMP2.js} +4 -4
- package/dist/{chunk-TFWYKOOB.cjs → chunk-XW6IXEQH.cjs} +26 -13
- package/dist/{chunk-YIVFJNYV.js → chunk-Y3ZFVUUU.js} +2 -2
- package/dist/{chunk-TJIMBJ6L.cjs → chunk-Y57W2CT5.cjs} +2 -2
- package/dist/{chunk-BFROVZOF.cjs → chunk-YCM6QQRT.cjs} +46 -53
- package/dist/{chunk-MBOOR7X4.js → chunk-YFVQWSNJ.js} +3 -3
- package/dist/{chunk-ISM4NX6N.js → chunk-YFWRJW4B.js} +2 -2
- package/dist/{chunk-6OTFG3EB.js → chunk-YN6IETRZ.js} +179 -136
- package/dist/{chunk-NPDNFPTU.js → chunk-YRRAUB35.js} +4 -4
- package/dist/{chunk-GCYR3D2K.js → chunk-Z6PMDS4G.js} +61 -23
- package/dist/{chunk-DPZXVDGM.js → chunk-ZA34AN3R.js} +8 -17
- package/dist/{chunk-EKYL4PE3.cjs → chunk-ZLF4YF3U.cjs} +2 -2
- package/dist/{chunk-VFKXK4GR.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 +347 -362
- package/dist/compiler/index.d.ts +20 -0
- package/dist/compiler/index.js +200 -215
- 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 +1056 -796
- package/dist/index.js +440 -180
- 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 +274 -76
- 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 +49 -49
- 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 +881 -773
- package/dist/traits/index.js +366 -258
- 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 +74 -68
- package/LICENSE +0 -21
- package/dist/GLTFPipeline-PVLTKDBD.cjs +0 -38
- package/dist/GLTFPipeline-QPI4I7DL.js +0 -17
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +0 -27
- package/dist/HoloScriptRuntime-6ZGLUCFS.js +0 -10
- package/dist/HoloScriptRuntime-ALUASIL2.cjs +0 -19
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { computeHoloMapReplayFingerprint } from './chunk-WNNE3PO3.js';
|
|
2
|
-
import { isWebGpuEnvironmentPresent, HOLOMAP_SIMULATION_CONTRACT_KIND } from './chunk-
|
|
2
|
+
import { isWebGpuEnvironmentPresent, HOLOMAP_SIMULATION_CONTRACT_KIND } from './chunk-47RUFYKR.js';
|
|
3
3
|
|
|
4
4
|
// src/version.ts
|
|
5
5
|
var HOLOSCRIPT_VERSION = "8.0.6" ;
|
|
6
|
-
var GIT_COMMIT_SHA = "
|
|
7
|
-
var BUILD_TIMESTAMP = "2026-06-
|
|
6
|
+
var GIT_COMMIT_SHA = "33f2b3e49" ;
|
|
7
|
+
var BUILD_TIMESTAMP = "2026-06-08T22:53:19.715Z" ;
|
|
8
8
|
function getVersionString() {
|
|
9
9
|
const sha = `+${GIT_COMMIT_SHA}` ;
|
|
10
10
|
return `${HOLOSCRIPT_VERSION}${sha}`;
|
|
@@ -88,14 +88,18 @@ function createImagePatchEmbedKernel(device) {
|
|
|
88
88
|
return {
|
|
89
89
|
async run(image, proj, params) {
|
|
90
90
|
const { imgH, imgW, patchH, patchW, numChannels, embedDim } = params;
|
|
91
|
-
if (imgH % patchH !== 0)
|
|
92
|
-
|
|
91
|
+
if (imgH % patchH !== 0)
|
|
92
|
+
throw new Error(`imagePatchEmbed: imgH=${imgH} not divisible by patchH=${patchH}`);
|
|
93
|
+
if (imgW % patchW !== 0)
|
|
94
|
+
throw new Error(`imagePatchEmbed: imgW=${imgW} not divisible by patchW=${patchW}`);
|
|
93
95
|
const patchLen = patchH * patchW * numChannels;
|
|
94
96
|
const numPatchesY = imgH / patchH;
|
|
95
97
|
const numPatchesX = imgW / patchW;
|
|
96
98
|
const numPatches = numPatchesY * numPatchesX;
|
|
97
|
-
if (image.length !== imgH * imgW * numChannels)
|
|
98
|
-
|
|
99
|
+
if (image.length !== imgH * imgW * numChannels)
|
|
100
|
+
throw new Error(`imagePatchEmbed: image size mismatch`);
|
|
101
|
+
if (proj.length !== embedDim * patchLen)
|
|
102
|
+
throw new Error(`imagePatchEmbed: proj size mismatch`);
|
|
99
103
|
const outBytes = numPatches * embedDim * 4;
|
|
100
104
|
const imgBuf = storageBuffer(device, image);
|
|
101
105
|
const projBuf = storageBuffer(device, proj);
|
|
@@ -1031,8 +1035,18 @@ function createHoloMapMicroEncoder(device) {
|
|
|
1031
1035
|
const qFlat = await gemm.run(tokens, weights.Wq, 1, EMBED_DIM, EMBED_DIM);
|
|
1032
1036
|
const kFlat = await gemm.run(tokens, weights.Wk, 1, EMBED_DIM, EMBED_DIM);
|
|
1033
1037
|
const vFlat = await gemm.run(tokens, weights.Wv, 1, EMBED_DIM, EMBED_DIM);
|
|
1034
|
-
const q3 = await rope.run(qFlat, {
|
|
1035
|
-
|
|
1038
|
+
const q3 = await rope.run(qFlat, {
|
|
1039
|
+
seqLen: 1,
|
|
1040
|
+
numHeads: NUM_HEADS,
|
|
1041
|
+
headDim: HEAD_DIM,
|
|
1042
|
+
posOffset: frame.index
|
|
1043
|
+
});
|
|
1044
|
+
const k3 = await rope.run(kFlat, {
|
|
1045
|
+
seqLen: 1,
|
|
1046
|
+
numHeads: NUM_HEADS,
|
|
1047
|
+
headDim: HEAD_DIM,
|
|
1048
|
+
posOffset: frame.index
|
|
1049
|
+
});
|
|
1036
1050
|
let attn = await fusedMha.run(q3, k3, vFlat, {
|
|
1037
1051
|
numHeads: NUM_HEADS,
|
|
1038
1052
|
qLen: 1,
|
|
@@ -1206,7 +1220,10 @@ function resetHoloMapTelemetryForTests() {
|
|
|
1206
1220
|
async function sha256Digest(bytes) {
|
|
1207
1221
|
const c = globalThis.crypto;
|
|
1208
1222
|
if (c?.subtle) {
|
|
1209
|
-
const buf = await c.subtle.digest(
|
|
1223
|
+
const buf = await c.subtle.digest(
|
|
1224
|
+
"SHA-256",
|
|
1225
|
+
bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength)
|
|
1226
|
+
);
|
|
1210
1227
|
return bufferToHex(new Uint8Array(buf));
|
|
1211
1228
|
}
|
|
1212
1229
|
const { createHash } = await import('crypto');
|
|
@@ -1547,8 +1564,16 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
1547
1564
|
updateBounds(positions) {
|
|
1548
1565
|
if (positions.length === 0) return;
|
|
1549
1566
|
if (!this.boundsValid) {
|
|
1550
|
-
this.boundsMin = [
|
|
1551
|
-
|
|
1567
|
+
this.boundsMin = [
|
|
1568
|
+
Number.POSITIVE_INFINITY,
|
|
1569
|
+
Number.POSITIVE_INFINITY,
|
|
1570
|
+
Number.POSITIVE_INFINITY
|
|
1571
|
+
];
|
|
1572
|
+
this.boundsMax = [
|
|
1573
|
+
Number.NEGATIVE_INFINITY,
|
|
1574
|
+
Number.NEGATIVE_INFINITY,
|
|
1575
|
+
Number.NEGATIVE_INFINITY
|
|
1576
|
+
];
|
|
1552
1577
|
}
|
|
1553
1578
|
for (let i = 0; i < positions.length; i += 3) {
|
|
1554
1579
|
const x = positions[i] ?? 0;
|
|
@@ -1667,7 +1692,13 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
1667
1692
|
this.globalConfSum = 0;
|
|
1668
1693
|
this.lastAcceptedFrameTimestampMs = null;
|
|
1669
1694
|
this.sessionStartMs = performance.now();
|
|
1670
|
-
this.perfMetrics = {
|
|
1695
|
+
this.perfMetrics = {
|
|
1696
|
+
stepCount: 0,
|
|
1697
|
+
throttledCount: 0,
|
|
1698
|
+
totalStepMs: 0,
|
|
1699
|
+
maxStepMs: 0,
|
|
1700
|
+
minStepMs: Infinity
|
|
1701
|
+
};
|
|
1671
1702
|
this.replayKey = computeHoloMapReplayFingerprint({
|
|
1672
1703
|
modelHash: this.config.modelHash,
|
|
1673
1704
|
seed: this.config.seed,
|
|
@@ -1783,11 +1814,7 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
1783
1814
|
],
|
|
1784
1815
|
luminance: meanLuma / 255,
|
|
1785
1816
|
texture: Math.sqrt(lumaVariance) / 255,
|
|
1786
|
-
meanColor: [
|
|
1787
|
-
Math.round(rSum / denom),
|
|
1788
|
-
Math.round(gSum / denom),
|
|
1789
|
-
Math.round(bSum / denom)
|
|
1790
|
-
]
|
|
1817
|
+
meanColor: [Math.round(rSum / denom), Math.round(gSum / denom), Math.round(bSum / denom)]
|
|
1791
1818
|
});
|
|
1792
1819
|
}
|
|
1793
1820
|
}
|
|
@@ -1956,7 +1983,10 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
1956
1983
|
let interFrameDeltaMeters = 0;
|
|
1957
1984
|
let interFrameRotationRadians = 0;
|
|
1958
1985
|
if (this.prevCameraPose) {
|
|
1959
|
-
interFrameDeltaMeters = _HoloMapRuntimeImpl.poseDistanceMeters(
|
|
1986
|
+
interFrameDeltaMeters = _HoloMapRuntimeImpl.poseDistanceMeters(
|
|
1987
|
+
cameraPose,
|
|
1988
|
+
this.prevCameraPose
|
|
1989
|
+
);
|
|
1960
1990
|
interFrameRotationRadians = _HoloMapRuntimeImpl.poseRotationDeltaRadians(
|
|
1961
1991
|
cameraPose,
|
|
1962
1992
|
this.prevCameraPose
|
|
@@ -2031,7 +2061,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2031
2061
|
interFrameRotationRadians
|
|
2032
2062
|
)
|
|
2033
2063
|
});
|
|
2034
|
-
const trajectoryKeyframes = _HoloMapRuntimeImpl.cloneTrajectoryKeyframes(
|
|
2064
|
+
const trajectoryKeyframes = _HoloMapRuntimeImpl.cloneTrajectoryKeyframes(
|
|
2065
|
+
this.trajectoryKeyframes
|
|
2066
|
+
);
|
|
2035
2067
|
const step = {
|
|
2036
2068
|
frame,
|
|
2037
2069
|
pose: cameraPose,
|
|
@@ -2141,7 +2173,13 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2141
2173
|
this.globalConfSum = 0;
|
|
2142
2174
|
this.boundsValid = false;
|
|
2143
2175
|
this.lastAcceptedFrameTimestampMs = null;
|
|
2144
|
-
this.perfMetrics = {
|
|
2176
|
+
this.perfMetrics = {
|
|
2177
|
+
stepCount: 0,
|
|
2178
|
+
throttledCount: 0,
|
|
2179
|
+
totalStepMs: 0,
|
|
2180
|
+
maxStepMs: 0,
|
|
2181
|
+
minStepMs: Infinity
|
|
2182
|
+
};
|
|
2145
2183
|
}
|
|
2146
2184
|
};
|
|
2147
2185
|
_HoloMapRuntimeImpl.LOOP_CLOSURE_MIN_GAP = 3;
|
|
@@ -2172,5 +2210,5 @@ function createHoloMapRuntime(_config) {
|
|
|
2172
2210
|
}
|
|
2173
2211
|
|
|
2174
2212
|
export { BUILD_TIMESTAMP, GIT_COMMIT_SHA, HOLOMAP_DEFAULTS, HOLOSCRIPT_VERSION, assertWeightCid, createHoloMapMicroEncoder, createHoloMapRunId, createHoloMapRuntime, frameToMicroImage, getCachedWeightBlob, getVersionInfo, getVersionString, loadHoloMapWeightBlob, logHoloMapEvent, normalizeWeightCidDigest, putCachedWeightBlob, resetHoloMapTelemetryForTests, runHoloMapMicroEncoderCpu, tryCreateHoloMapEncoderDevice };
|
|
2175
|
-
//# sourceMappingURL=chunk-
|
|
2176
|
-
//# sourceMappingURL=chunk-
|
|
2213
|
+
//# sourceMappingURL=chunk-Z6PMDS4G.js.map
|
|
2214
|
+
//# sourceMappingURL=chunk-Z6PMDS4G.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_CompilerBase, init_ANSNamespace, ANSCapabilityPath, escapeStringValue } from './chunk-
|
|
1
|
+
import { init_CompilerBase, init_ANSNamespace, ANSCapabilityPath, escapeStringValue } from './chunk-C7ZBSV2Q.js';
|
|
2
2
|
import { __esm } from './chunk-OL46QLBJ.js';
|
|
3
3
|
|
|
4
4
|
// src/compiler/DomainBlockCompilerMixin.ts
|
|
@@ -2729,18 +2729,10 @@ function compileDataVizBlock(block) {
|
|
|
2729
2729
|
const props = block.properties || {};
|
|
2730
2730
|
let axes;
|
|
2731
2731
|
if (props.x_axis || props.y_axis || props.z_axis) {
|
|
2732
|
-
axes = [
|
|
2733
|
-
String(props.x_axis ?? ""),
|
|
2734
|
-
String(props.y_axis ?? ""),
|
|
2735
|
-
String(props.z_axis ?? "")
|
|
2736
|
-
];
|
|
2732
|
+
axes = [String(props.x_axis ?? ""), String(props.y_axis ?? ""), String(props.z_axis ?? "")];
|
|
2737
2733
|
} else if (props.axes && typeof props.axes === "object") {
|
|
2738
2734
|
const a = props.axes;
|
|
2739
|
-
axes = [
|
|
2740
|
-
String(a[0] ?? ""),
|
|
2741
|
-
String(a[1] ?? ""),
|
|
2742
|
-
String(a[2] ?? "")
|
|
2743
|
-
];
|
|
2735
|
+
axes = [String(a[0] ?? ""), String(a[1] ?? ""), String(a[2] ?? "")];
|
|
2744
2736
|
}
|
|
2745
2737
|
let dimensions;
|
|
2746
2738
|
if (props.width != null || props.height != null) {
|
|
@@ -3713,7 +3705,8 @@ function parseSimulationEnvironment(block) {
|
|
|
3713
3705
|
const cp = c.properties || {};
|
|
3714
3706
|
if (kw === "skybox" || kw === "environment_sky" || kw === "hdri") {
|
|
3715
3707
|
if (typeof cp.preset === "string" && cp.preset.trim()) env.skyboxPreset = cp.preset.trim();
|
|
3716
|
-
if (cp.color != null && String(cp.color).trim() !== "")
|
|
3708
|
+
if (cp.color != null && String(cp.color).trim() !== "")
|
|
3709
|
+
env.skyboxColor = String(cp.color).trim();
|
|
3717
3710
|
}
|
|
3718
3711
|
if (kw === "gravity" || kw === "world_gravity") {
|
|
3719
3712
|
const g = parseGravityVector(cp);
|
|
@@ -3768,9 +3761,7 @@ function simulationEnvironmentToR3FChunks(env) {
|
|
|
3768
3761
|
visualLines.push(`<color attach="background" args={['${hex}']} />`);
|
|
3769
3762
|
}
|
|
3770
3763
|
if (env.skyboxPreset) {
|
|
3771
|
-
visualLines.push(
|
|
3772
|
-
`<Environment preset={${JSON.stringify(env.skyboxPreset)}} background />`
|
|
3773
|
-
);
|
|
3764
|
+
visualLines.push(`<Environment preset={${JSON.stringify(env.skyboxPreset)}} background />`);
|
|
3774
3765
|
}
|
|
3775
3766
|
const meta = {};
|
|
3776
3767
|
if (env.gravity) meta.gravity = env.gravity;
|
|
@@ -3853,5 +3844,5 @@ var init_DomainBlockCompilerMixin = __esm({
|
|
|
3853
3844
|
});
|
|
3854
3845
|
|
|
3855
3846
|
export { DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY, architectureToGodot, architectureToR3F, architectureToUSDA, architectureToUnity, architectureToVRChat, audioSourceToAndroidXR, audioSourceToBabylon, audioSourceToGodot, audioSourceToPlayCanvas, audioSourceToR3F, audioSourceToUSD, audioSourceToUnity, audioSourceToUnreal, audioSourceToVisionOS, compileArchitectureBlock, compileAudioSourceBlock, compileDataVizBlock, compileDomainBlocks, compileEducationBlock, compileHealthcareBlock, compileInputBlock, compileIoTBlock, compileMaterialBlock, compileMusicBlock, compileNarrativeBlock, compileNavigationBlock, compileParticleBlock, compilePaymentBlock, compilePhysicsBlock, compilePostProcessingBlock, compileProceduralBlock, compileRenderingBlock, compileRoboticsBlock, compileSimulationBlock, compileWeatherBlock, compileWeb3Block, datavizToGodot, datavizToR3F, datavizToUSDA, datavizToUnity, datavizToVRChat, educationToGodot, educationToR3F, educationToUSDA, educationToUnity, educationToVRChat, getRequiredCapability, healthcareToGodot, healthcareToR3F, healthcareToUSDA, healthcareToUnity, healthcareToVRChat, init_DomainBlockCompilerMixin, inputToGodot, inputToR3F, inputToUSDA, inputToUnity, inputToVRChat, iotToGodot, iotToR3F, iotToUSDA, iotToUnity, iotToVRChat, isPhysicalMaterial, materialToAndroidXR, materialToBabylon, materialToGLTF, materialToGodot, materialToPlayCanvas, materialToR3F, materialToSDF, materialToUSD, materialToUnity, materialToUnreal, materialToVRChat, materialToVisionOS, materialToWebGPU, musicToGodot, musicToR3F, musicToUSDA, musicToUnity, musicToVRChat, narrativeToGodot, narrativeToR3F, narrativeToUSDA, narrativeToUnity, narrativeToVRChat, navigationToGodot, navigationToR3F, navigationToUSDA, navigationToUnity, navigationToVRChat, particlesToAndroidXR, particlesToBabylon, particlesToGodot, particlesToPlayCanvas, particlesToR3F, particlesToUSD, particlesToUnity, particlesToUnreal, particlesToVisionOS, paymentToGodot, paymentToR3F, paymentToUSDA, paymentToUnity, paymentToVRChat, physicsToAndroidXR, physicsToBabylon, physicsToGodot, physicsToPlayCanvas, physicsToR3F, physicsToSDF, physicsToURDF, physicsToUnity, physicsToUnreal, physicsToVisionOS, postProcessingToBabylon, postProcessingToGodot, postProcessingToR3F, postProcessingToUSD, postProcessingToUnity, postProcessingToUnreal, proceduralToGodot, proceduralToR3F, proceduralToUSDA, proceduralToUnity, proceduralToVRChat, renderingToGodot, renderingToR3F, renderingToUSDA, renderingToUnity, renderingToVRChat, roboticsToGodot, roboticsToR3F, roboticsToUSDA, roboticsToUnity, roboticsToVRChat, simulationToR3F, weatherToAndroidXR, weatherToGodot, weatherToR3F, weatherToUSD, weatherToUnity, weatherToUnreal, web3ToGodot, web3ToR3F, web3ToUSDA, web3ToUnity, web3ToVRChat };
|
|
3856
|
-
//# sourceMappingURL=chunk-
|
|
3857
|
-
//# sourceMappingURL=chunk-
|
|
3847
|
+
//# sourceMappingURL=chunk-ZA34AN3R.js.map
|
|
3848
|
+
//# sourceMappingURL=chunk-ZA34AN3R.js.map
|
|
@@ -400,5 +400,5 @@ var skeletonHandler = {
|
|
|
400
400
|
exports.SkeletonTrait = SkeletonTrait;
|
|
401
401
|
exports.createSkeletonTrait = createSkeletonTrait;
|
|
402
402
|
exports.skeletonHandler = skeletonHandler;
|
|
403
|
-
//# sourceMappingURL=chunk-
|
|
404
|
-
//# sourceMappingURL=chunk-
|
|
403
|
+
//# sourceMappingURL=chunk-ZLF4YF3U.cjs.map
|
|
404
|
+
//# sourceMappingURL=chunk-ZLF4YF3U.cjs.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkFT6TDR2O_cjs = require('./chunk-FT6TDR2O.cjs');
|
|
4
|
+
var chunkKAIVDEIG_cjs = require('./chunk-KAIVDEIG.cjs');
|
|
5
5
|
var chunkOIQYIIO3_cjs = require('./chunk-OIQYIIO3.cjs');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunkGH6C2QGW_cjs = require('./chunk-GH6C2QGW.cjs');
|
|
7
|
+
var chunkLODTHGST_cjs = require('./chunk-LODTHGST.cjs');
|
|
8
8
|
var ans = require('@holoscript/core-types/ans');
|
|
9
9
|
|
|
10
10
|
// src/compiler/GLTFPipeline.ts
|
|
11
11
|
chunkOIQYIIO3_cjs.init_TraitCompositor();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
chunkKAIVDEIG_cjs.init_R3FCompiler();
|
|
13
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
14
|
+
chunkGH6C2QGW_cjs.init_DomainBlockCompilerMixin();
|
|
15
15
|
|
|
16
16
|
// src/compiler/gltf/extensions.ts
|
|
17
17
|
function createEmissiveStrengthExtension(strength) {
|
|
@@ -120,8 +120,8 @@ function declareExtensions(gltf) {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// src/compiler/GLTFPipeline.ts
|
|
123
|
-
|
|
124
|
-
var gltfNodePool = new
|
|
123
|
+
chunkKAIVDEIG_cjs.init_ObjectPool();
|
|
124
|
+
var gltfNodePool = new chunkKAIVDEIG_cjs.ASTNodePool(
|
|
125
125
|
() => ({ name: "" }),
|
|
126
126
|
(node) => {
|
|
127
127
|
node.name = "";
|
|
@@ -840,7 +840,7 @@ function generatePlaneGeometry(scale) {
|
|
|
840
840
|
var INITIAL_COMPILE_BUFFER_SIZE = 1024 * 1024;
|
|
841
841
|
var MAX_RETAINED_BUFFER_SIZE = 1024 * 1024 * 20;
|
|
842
842
|
var SHARED_COMPILE_BUFFER = new Uint8Array(INITIAL_COMPILE_BUFFER_SIZE);
|
|
843
|
-
var GLTFPipeline = class extends
|
|
843
|
+
var GLTFPipeline = class extends chunkLODTHGST_cjs.CompilerBase {
|
|
844
844
|
constructor(options = {}) {
|
|
845
845
|
super();
|
|
846
846
|
this.compilerName = "GLTFPipeline";
|
|
@@ -1282,12 +1282,12 @@ var GLTFPipeline = class extends chunkQWAR3GY6_cjs.CompilerBase {
|
|
|
1282
1282
|
}
|
|
1283
1283
|
const domainBlocks = composition.domainBlocks ?? [];
|
|
1284
1284
|
if (domainBlocks.length > 0) {
|
|
1285
|
-
|
|
1285
|
+
chunkGH6C2QGW_cjs.compileDomainBlocks(
|
|
1286
1286
|
domainBlocks,
|
|
1287
1287
|
{
|
|
1288
1288
|
material: (block) => {
|
|
1289
|
-
const mat =
|
|
1290
|
-
const gltfMat =
|
|
1289
|
+
const mat = chunkGH6C2QGW_cjs.compileMaterialBlock(block);
|
|
1290
|
+
const gltfMat = chunkGH6C2QGW_cjs.materialToGLTF(mat);
|
|
1291
1291
|
this.materials.push(gltfMat);
|
|
1292
1292
|
this.stats.materialCount++;
|
|
1293
1293
|
return "";
|
|
@@ -1485,7 +1485,7 @@ var GLTFPipeline = class extends chunkQWAR3GY6_cjs.CompilerBase {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
const radialSegments = typeof segmentsProp === "number" ? segmentsProp : 24;
|
|
1487
1487
|
const lengthSteps = typeof stepsProp === "number" ? stepsProp : 8;
|
|
1488
|
-
geometry =
|
|
1488
|
+
geometry = chunkFT6TDR2O_cjs.generateSplineGeometry(points, radii, radialSegments, lengthSteps);
|
|
1489
1489
|
break;
|
|
1490
1490
|
}
|
|
1491
1491
|
case "membrane": {
|
|
@@ -1495,7 +1495,7 @@ var GLTFPipeline = class extends chunkQWAR3GY6_cjs.CompilerBase {
|
|
|
1495
1495
|
const anchors = this.extractNestedArray(anchorsProp, 3);
|
|
1496
1496
|
const subdivisions = typeof subdivisionsProp === "number" ? subdivisionsProp : 8;
|
|
1497
1497
|
const bulge = typeof bulgeProp === "number" ? bulgeProp : 0.15;
|
|
1498
|
-
geometry =
|
|
1498
|
+
geometry = chunkFT6TDR2O_cjs.generateMembraneGeometry(anchors, subdivisions, bulge);
|
|
1499
1499
|
break;
|
|
1500
1500
|
}
|
|
1501
1501
|
case "hull":
|
|
@@ -1523,7 +1523,7 @@ var GLTFPipeline = class extends chunkQWAR3GY6_cjs.CompilerBase {
|
|
|
1523
1523
|
}
|
|
1524
1524
|
const resolution = typeof resolutionProp === "number" ? resolutionProp : 24;
|
|
1525
1525
|
const threshold = typeof thresholdProp === "number" ? thresholdProp : 1;
|
|
1526
|
-
geometry =
|
|
1526
|
+
geometry = chunkFT6TDR2O_cjs.generateHullGeometry(blobs, resolution, threshold);
|
|
1527
1527
|
break;
|
|
1528
1528
|
}
|
|
1529
1529
|
default:
|
|
@@ -1601,8 +1601,8 @@ var GLTFPipeline = class extends chunkQWAR3GY6_cjs.CompilerBase {
|
|
|
1601
1601
|
let attenuationColor;
|
|
1602
1602
|
let attenuationDistance;
|
|
1603
1603
|
const namedMat = this.findProp(object, "material");
|
|
1604
|
-
if (typeof namedMat === "string" &&
|
|
1605
|
-
const preset =
|
|
1604
|
+
if (typeof namedMat === "string" && chunkKAIVDEIG_cjs.MATERIAL_PRESETS[namedMat]) {
|
|
1605
|
+
const preset = chunkKAIVDEIG_cjs.MATERIAL_PRESETS[namedMat];
|
|
1606
1606
|
if (preset.color) color = this.parseColorString(preset.color);
|
|
1607
1607
|
if (preset.metalness !== void 0) metallic = preset.metalness;
|
|
1608
1608
|
if (preset.roughness !== void 0) roughness = preset.roughness;
|
|
@@ -2253,5 +2253,5 @@ exports.GLTFPipeline = GLTFPipeline;
|
|
|
2253
2253
|
exports.createGLTFPipeline = createGLTFPipeline;
|
|
2254
2254
|
exports.generateScaleNormalMap = generateScaleNormalMap;
|
|
2255
2255
|
exports.generateScaleTexture = generateScaleTexture;
|
|
2256
|
-
//# sourceMappingURL=chunk-
|
|
2257
|
-
//# sourceMappingURL=chunk-
|
|
2256
|
+
//# sourceMappingURL=chunk-ZPZAVHXL.cjs.map
|
|
2257
|
+
//# sourceMappingURL=chunk-ZPZAVHXL.cjs.map
|
|
@@ -5,9 +5,9 @@ var chunk2YSNA2F2_cjs = require('../chunk-2YSNA2F2.cjs');
|
|
|
5
5
|
var chunkSLU6UPJI_cjs = require('../chunk-SLU6UPJI.cjs');
|
|
6
6
|
var chunkXHIV6326_cjs = require('../chunk-XHIV6326.cjs');
|
|
7
7
|
var chunkR75BSDH7_cjs = require('../chunk-R75BSDH7.cjs');
|
|
8
|
-
var
|
|
9
|
-
require('../chunk-
|
|
10
|
-
require('../chunk-
|
|
8
|
+
var chunkKOUAQL2B_cjs = require('../chunk-KOUAQL2B.cjs');
|
|
9
|
+
require('../chunk-6PRZIHGL.cjs');
|
|
10
|
+
require('../chunk-3SKLAUDD.cjs');
|
|
11
11
|
require('../chunk-X3GJPRVK.cjs');
|
|
12
12
|
require('../chunk-DTGBOSEM.cjs');
|
|
13
13
|
require('../chunk-YKGPCZEE.cjs');
|
|
@@ -56,7 +56,7 @@ function defaultModelForProvider(provider) {
|
|
|
56
56
|
case "openai":
|
|
57
57
|
return "gpt-4.1";
|
|
58
58
|
case "ollama":
|
|
59
|
-
return "
|
|
59
|
+
return "qwen2.5-coder:7b";
|
|
60
60
|
case "anthropic":
|
|
61
61
|
default:
|
|
62
62
|
return "claude-sonnet-4-6";
|
|
@@ -239,12 +239,7 @@ function parseArgs(argv) {
|
|
|
239
239
|
return opts;
|
|
240
240
|
}
|
|
241
241
|
async function createDaemonLLMProvider(opts) {
|
|
242
|
-
const {
|
|
243
|
-
AnthropicAdapter,
|
|
244
|
-
XAIAdapter,
|
|
245
|
-
OpenAIAdapter,
|
|
246
|
-
LocalLLMAdapter
|
|
247
|
-
} = await import('@holoscript/llm-provider');
|
|
242
|
+
const { AnthropicAdapter, XAIAdapter, OpenAIAdapter, LocalLLMAdapter } = await import('@holoscript/llm-provider');
|
|
248
243
|
if (opts.provider === "anthropic") {
|
|
249
244
|
const adapter2 = new AnthropicAdapter({
|
|
250
245
|
apiKey: process.env.ANTHROPIC_API_KEY || "",
|
|
@@ -684,7 +679,7 @@ async function runScript(opts) {
|
|
|
684
679
|
const source = fs__namespace.readFileSync(filePath, "utf-8");
|
|
685
680
|
const ext = path__namespace.extname(filePath);
|
|
686
681
|
console.log(`[holoscript] Running ${path__namespace.basename(filePath)} (target: ${opts.target})`);
|
|
687
|
-
const parseResult =
|
|
682
|
+
const parseResult = chunkKOUAQL2B_cjs.parse(source);
|
|
688
683
|
const ast = parseResult.ast;
|
|
689
684
|
if (opts.debug) {
|
|
690
685
|
console.log(`[holoscript] Parsed ${ast.body?.length || 0} top-level nodes`);
|
|
@@ -748,7 +743,7 @@ async function runScript(opts) {
|
|
|
748
743
|
console.log(`[holoscript] Re-running ${path__namespace.basename(filePath)}...`);
|
|
749
744
|
try {
|
|
750
745
|
const newSource = fs__namespace.readFileSync(filePath, "utf-8");
|
|
751
|
-
const newParseResult =
|
|
746
|
+
const newParseResult = chunkKOUAQL2B_cjs.parse(newSource);
|
|
752
747
|
const newAst = newParseResult.ast;
|
|
753
748
|
const newRuntime = createHeadlessRuntime(newAst, {
|
|
754
749
|
profile: opts.profile === "headless" ? HEADLESS_PROFILE : getProfile(opts.profile),
|
|
@@ -784,11 +779,15 @@ async function testScript(opts) {
|
|
|
784
779
|
}
|
|
785
780
|
const source = fs__namespace.readFileSync(filePath, "utf-8");
|
|
786
781
|
console.log(`[holoscript test] Running tests in ${path__namespace.basename(filePath)}`);
|
|
787
|
-
const parseResult =
|
|
782
|
+
const parseResult = chunkKOUAQL2B_cjs.parse(source);
|
|
788
783
|
const ast = parseResult.ast;
|
|
789
784
|
const { createHeadlessRuntime, HEADLESS_PROFILE } = await loadEngineRuntime();
|
|
790
785
|
const profile = HEADLESS_PROFILE;
|
|
791
|
-
const runtime = createHeadlessRuntime(ast, {
|
|
786
|
+
const runtime = createHeadlessRuntime(ast, {
|
|
787
|
+
profile,
|
|
788
|
+
tickRate: 10,
|
|
789
|
+
debug: opts.debug
|
|
790
|
+
});
|
|
792
791
|
runtime.start();
|
|
793
792
|
const runtimeAccess = runtime;
|
|
794
793
|
for (let i = 0; i < 50; i++) runtimeAccess.tick();
|
|
@@ -863,7 +862,7 @@ function compileScript(opts) {
|
|
|
863
862
|
}
|
|
864
863
|
console.log(`[holoscript compile] @gotcha check passed (no critical violations)`);
|
|
865
864
|
}
|
|
866
|
-
const compileResult =
|
|
865
|
+
const compileResult = chunkKOUAQL2B_cjs.parse(source);
|
|
867
866
|
if (!compileResult.success) {
|
|
868
867
|
console.error(`[holoscript compile] Failed to parse: ${compileResult.errors?.[0]?.message}`);
|
|
869
868
|
process.exit(1);
|
|
@@ -942,7 +941,7 @@ async function deployScript(opts) {
|
|
|
942
941
|
const fileName = path__namespace.basename(filePath);
|
|
943
942
|
const title = path__namespace.basename(filePath, path__namespace.extname(filePath));
|
|
944
943
|
console.log(`Parsing ${fileName}...`);
|
|
945
|
-
const ast =
|
|
944
|
+
const ast = chunkKOUAQL2B_cjs.parse(source);
|
|
946
945
|
if (ast.errors && ast.errors.length > 0) {
|
|
947
946
|
console.error("Parse errors:");
|
|
948
947
|
for (const err of ast.errors) {
|
|
@@ -1269,7 +1268,10 @@ function loadRuntimeSkillActions(skillsDir, opts, host, repoRoot, debug = false)
|
|
|
1269
1268
|
return false;
|
|
1270
1269
|
}
|
|
1271
1270
|
}
|
|
1272
|
-
const runtimeArgs = Array.isArray(params.args) ?
|
|
1271
|
+
const runtimeArgs = Array.isArray(params.args) ? (
|
|
1272
|
+
// @ts-expect-error During migration
|
|
1273
|
+
params.args.filter((v) => typeof v === "string")
|
|
1274
|
+
) : [];
|
|
1273
1275
|
const timeoutMs = typeof params.timeoutMs === "number" && Number.isFinite(params.timeoutMs) ? Math.max(1e3, Math.min(3e5, Math.floor(params.timeoutMs))) : 6e4;
|
|
1274
1276
|
const result = await host.exec(command, [...bakedArgs, ...runtimeArgs], {
|
|
1275
1277
|
cwd: repoRoot,
|
|
@@ -1304,7 +1306,7 @@ async function daemonScript(opts) {
|
|
|
1304
1306
|
const { createDaemonActions, getDaemonFileState } = await import('@holoscript/absorb-service/daemon');
|
|
1305
1307
|
const repoRoot = findGitRoot(path__namespace.dirname(filePath));
|
|
1306
1308
|
const source = fs__namespace.readFileSync(filePath, "utf-8");
|
|
1307
|
-
const parseResult =
|
|
1309
|
+
const parseResult = chunkKOUAQL2B_cjs.parse(source);
|
|
1308
1310
|
if (!parseResult.success || !parseResult.ast) {
|
|
1309
1311
|
const errors = parseResult.errors?.map((e) => e.message).join(", ") || "unknown";
|
|
1310
1312
|
console.error(`[daemon] Parse failed: ${errors}`);
|
|
@@ -1410,10 +1412,22 @@ async function daemonScript(opts) {
|
|
|
1410
1412
|
if (!fs__namespace.existsSync(skillsDirAbs)) {
|
|
1411
1413
|
fs__namespace.mkdirSync(skillsDirAbs, { recursive: true });
|
|
1412
1414
|
}
|
|
1413
|
-
let runtimeSkillActions = loadRuntimeSkillActions(
|
|
1415
|
+
let runtimeSkillActions = loadRuntimeSkillActions(
|
|
1416
|
+
skillsDirAbs,
|
|
1417
|
+
opts,
|
|
1418
|
+
host,
|
|
1419
|
+
repoRoot,
|
|
1420
|
+
opts.debug
|
|
1421
|
+
);
|
|
1414
1422
|
let activeRuntime = null;
|
|
1415
1423
|
const reloadRuntimeSkills = () => {
|
|
1416
|
-
runtimeSkillActions = loadRuntimeSkillActions(
|
|
1424
|
+
runtimeSkillActions = loadRuntimeSkillActions(
|
|
1425
|
+
skillsDirAbs,
|
|
1426
|
+
opts,
|
|
1427
|
+
host,
|
|
1428
|
+
repoRoot,
|
|
1429
|
+
opts.debug
|
|
1430
|
+
);
|
|
1417
1431
|
if (activeRuntime) {
|
|
1418
1432
|
for (const [name, handler] of Object.entries(runtimeSkillActions)) {
|
|
1419
1433
|
activeRuntime.registerAction(name, handler);
|
|
@@ -1491,7 +1505,10 @@ async function daemonScript(opts) {
|
|
|
1491
1505
|
let daemonState = { ...daemonStateDefaults };
|
|
1492
1506
|
if (fs__namespace.existsSync(stateFile)) {
|
|
1493
1507
|
try {
|
|
1494
|
-
daemonState = {
|
|
1508
|
+
daemonState = {
|
|
1509
|
+
...daemonState,
|
|
1510
|
+
...chunkE7JP3BS3_cjs.readJson(fs__namespace.readFileSync(stateFile, "utf-8"))
|
|
1511
|
+
};
|
|
1495
1512
|
} catch {
|
|
1496
1513
|
}
|
|
1497
1514
|
}
|
|
@@ -1856,7 +1873,7 @@ async function holoMeshDaemonScript(opts) {
|
|
|
1856
1873
|
}
|
|
1857
1874
|
const rawSource = fs__namespace.readFileSync(filePath, "utf-8");
|
|
1858
1875
|
const source = rawSource.replace(/^#(version|target|mode)\s+.*/gm, "");
|
|
1859
|
-
const parseResult =
|
|
1876
|
+
const parseResult = chunkKOUAQL2B_cjs.parse(source);
|
|
1860
1877
|
if (!parseResult.success || !parseResult.ast) {
|
|
1861
1878
|
const errors = parseResult.errors?.map((e) => e.message).join(", ") || "unknown";
|
|
1862
1879
|
console.error(`[holomesh-daemon] Parse failed: ${errors}`);
|
|
@@ -3,9 +3,9 @@ import { checkLicenseCompatibility, ethToWei, calculateRevenueDistribution, form
|
|
|
3
3
|
import { InteropContext } from '../chunk-5JEU52DW.js';
|
|
4
4
|
import { AbsorbProcessor, ScriptTestRunner, HotReloadWatcher } from '../chunk-2M2DPHKB.js';
|
|
5
5
|
import { generateProvenance } from '../chunk-4R6SBXDB.js';
|
|
6
|
-
import { parse } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import '../chunk-
|
|
6
|
+
import { parse } from '../chunk-FNHJRI32.js';
|
|
7
|
+
import '../chunk-VSACG2AR.js';
|
|
8
|
+
import '../chunk-GASCWJK5.js';
|
|
9
9
|
import '../chunk-WRNEH5MO.js';
|
|
10
10
|
import '../chunk-WKX5AMOY.js';
|
|
11
11
|
import '../chunk-SIEXCILW.js';
|
|
@@ -32,7 +32,7 @@ function defaultModelForProvider(provider) {
|
|
|
32
32
|
case "openai":
|
|
33
33
|
return "gpt-4.1";
|
|
34
34
|
case "ollama":
|
|
35
|
-
return "
|
|
35
|
+
return "qwen2.5-coder:7b";
|
|
36
36
|
case "anthropic":
|
|
37
37
|
default:
|
|
38
38
|
return "claude-sonnet-4-6";
|
|
@@ -215,12 +215,7 @@ function parseArgs(argv) {
|
|
|
215
215
|
return opts;
|
|
216
216
|
}
|
|
217
217
|
async function createDaemonLLMProvider(opts) {
|
|
218
|
-
const {
|
|
219
|
-
AnthropicAdapter,
|
|
220
|
-
XAIAdapter,
|
|
221
|
-
OpenAIAdapter,
|
|
222
|
-
LocalLLMAdapter
|
|
223
|
-
} = await import('@holoscript/llm-provider');
|
|
218
|
+
const { AnthropicAdapter, XAIAdapter, OpenAIAdapter, LocalLLMAdapter } = await import('@holoscript/llm-provider');
|
|
224
219
|
if (opts.provider === "anthropic") {
|
|
225
220
|
const adapter2 = new AnthropicAdapter({
|
|
226
221
|
apiKey: process.env.ANTHROPIC_API_KEY || "",
|
|
@@ -764,7 +759,11 @@ async function testScript(opts) {
|
|
|
764
759
|
const ast = parseResult.ast;
|
|
765
760
|
const { createHeadlessRuntime, HEADLESS_PROFILE } = await loadEngineRuntime();
|
|
766
761
|
const profile = HEADLESS_PROFILE;
|
|
767
|
-
const runtime = createHeadlessRuntime(ast, {
|
|
762
|
+
const runtime = createHeadlessRuntime(ast, {
|
|
763
|
+
profile,
|
|
764
|
+
tickRate: 10,
|
|
765
|
+
debug: opts.debug
|
|
766
|
+
});
|
|
768
767
|
runtime.start();
|
|
769
768
|
const runtimeAccess = runtime;
|
|
770
769
|
for (let i = 0; i < 50; i++) runtimeAccess.tick();
|
|
@@ -1245,7 +1244,10 @@ function loadRuntimeSkillActions(skillsDir, opts, host, repoRoot, debug = false)
|
|
|
1245
1244
|
return false;
|
|
1246
1245
|
}
|
|
1247
1246
|
}
|
|
1248
|
-
const runtimeArgs = Array.isArray(params.args) ?
|
|
1247
|
+
const runtimeArgs = Array.isArray(params.args) ? (
|
|
1248
|
+
// @ts-expect-error During migration
|
|
1249
|
+
params.args.filter((v) => typeof v === "string")
|
|
1250
|
+
) : [];
|
|
1249
1251
|
const timeoutMs = typeof params.timeoutMs === "number" && Number.isFinite(params.timeoutMs) ? Math.max(1e3, Math.min(3e5, Math.floor(params.timeoutMs))) : 6e4;
|
|
1250
1252
|
const result = await host.exec(command, [...bakedArgs, ...runtimeArgs], {
|
|
1251
1253
|
cwd: repoRoot,
|
|
@@ -1386,10 +1388,22 @@ async function daemonScript(opts) {
|
|
|
1386
1388
|
if (!fs.existsSync(skillsDirAbs)) {
|
|
1387
1389
|
fs.mkdirSync(skillsDirAbs, { recursive: true });
|
|
1388
1390
|
}
|
|
1389
|
-
let runtimeSkillActions = loadRuntimeSkillActions(
|
|
1391
|
+
let runtimeSkillActions = loadRuntimeSkillActions(
|
|
1392
|
+
skillsDirAbs,
|
|
1393
|
+
opts,
|
|
1394
|
+
host,
|
|
1395
|
+
repoRoot,
|
|
1396
|
+
opts.debug
|
|
1397
|
+
);
|
|
1390
1398
|
let activeRuntime = null;
|
|
1391
1399
|
const reloadRuntimeSkills = () => {
|
|
1392
|
-
runtimeSkillActions = loadRuntimeSkillActions(
|
|
1400
|
+
runtimeSkillActions = loadRuntimeSkillActions(
|
|
1401
|
+
skillsDirAbs,
|
|
1402
|
+
opts,
|
|
1403
|
+
host,
|
|
1404
|
+
repoRoot,
|
|
1405
|
+
opts.debug
|
|
1406
|
+
);
|
|
1393
1407
|
if (activeRuntime) {
|
|
1394
1408
|
for (const [name, handler] of Object.entries(runtimeSkillActions)) {
|
|
1395
1409
|
activeRuntime.registerAction(name, handler);
|
|
@@ -1467,7 +1481,10 @@ async function daemonScript(opts) {
|
|
|
1467
1481
|
let daemonState = { ...daemonStateDefaults };
|
|
1468
1482
|
if (fs.existsSync(stateFile)) {
|
|
1469
1483
|
try {
|
|
1470
|
-
daemonState = {
|
|
1484
|
+
daemonState = {
|
|
1485
|
+
...daemonState,
|
|
1486
|
+
...readJson(fs.readFileSync(stateFile, "utf-8"))
|
|
1487
|
+
};
|
|
1471
1488
|
} catch {
|
|
1472
1489
|
}
|
|
1473
1490
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @holoscript/core/compiler/GasOptimizationAnalyzer
|
|
3
|
+
*
|
|
4
|
+
* Hand-crafted declarations mirroring
|
|
5
|
+
* packages/core/src/compiler/GasOptimizationAnalyzer.ts.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type GasOptimizationSeverity = 'critical' | 'high' | 'medium' | 'low' | 'info';
|
|
9
|
+
export type GasOptimizationCategory =
|
|
10
|
+
| 'storage'
|
|
11
|
+
| 'arithmetic'
|
|
12
|
+
| 'loops'
|
|
13
|
+
| 'errors'
|
|
14
|
+
| 'memory'
|
|
15
|
+
| 'external-calls'
|
|
16
|
+
| 'visibility';
|
|
17
|
+
|
|
18
|
+
export interface CodeLocation {
|
|
19
|
+
file: string;
|
|
20
|
+
line: number;
|
|
21
|
+
column: number;
|
|
22
|
+
length: number;
|
|
23
|
+
snippet?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface GasOptimization {
|
|
27
|
+
id: string;
|
|
28
|
+
severity: GasOptimizationSeverity;
|
|
29
|
+
category: GasOptimizationCategory;
|
|
30
|
+
location: CodeLocation;
|
|
31
|
+
issue: string;
|
|
32
|
+
suggestion: string;
|
|
33
|
+
potentialSavings: number;
|
|
34
|
+
autoFixAvailable: boolean;
|
|
35
|
+
autoFix?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface GasAnalysisReport {
|
|
39
|
+
totalOptimizations: number;
|
|
40
|
+
totalPotentialSavings: number;
|
|
41
|
+
criticalCount: number;
|
|
42
|
+
highCount: number;
|
|
43
|
+
mediumCount: number;
|
|
44
|
+
lowCount: number;
|
|
45
|
+
optimizations: GasOptimization[];
|
|
46
|
+
summary: string[];
|
|
47
|
+
appliedFixes?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface AnalyzerOptions {
|
|
51
|
+
enableAutoFix: boolean;
|
|
52
|
+
severityThreshold: GasOptimizationSeverity;
|
|
53
|
+
categories: string[];
|
|
54
|
+
ignorePatterns?: string[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export declare class GasOptimizationAnalyzer {
|
|
58
|
+
constructor(options?: Partial<AnalyzerOptions>);
|
|
59
|
+
analyze(code: string, filename?: string): GasAnalysisReport;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export declare const ANALYZER_PRESETS: {
|
|
63
|
+
readonly production: {
|
|
64
|
+
enableAutoFix: false;
|
|
65
|
+
severityThreshold: 'medium';
|
|
66
|
+
categories: string[];
|
|
67
|
+
};
|
|
68
|
+
readonly development: {
|
|
69
|
+
enableAutoFix: true;
|
|
70
|
+
severityThreshold: 'info';
|
|
71
|
+
categories: string[];
|
|
72
|
+
};
|
|
73
|
+
};
|