@holoscript/core 8.0.13 → 8.0.15
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 +20 -13
- package/bin/holo-decision.mjs +133 -0
- package/bin/holoscript.cjs +0 -0
- package/dist/{GLTFPipeline-L76YTXKA.js → GLTFPipeline-FRBZIATS.js} +7 -7
- package/dist/{GLTFPipeline-ZWJN7GI6.cjs → GLTFPipeline-MTPP444P.cjs} +11 -11
- package/dist/{HoloCompositionParser-P4Y3CXKQ.js → HoloCompositionParser-2GVQAZ2X.js} +7 -7
- package/dist/HoloCompositionParser-3NDF6BMX.cjs +45 -0
- package/dist/HoloScriptPlusParser-URSIBEAW.cjs +30 -0
- package/dist/HoloScriptPlusParser-YCV6L7GI.js +13 -0
- package/dist/{HoloScriptRuntime-YBYXJHJN.cjs → HoloScriptRuntime-CRWI6C3P.cjs} +5 -5
- package/dist/{HoloScriptRuntime-UTRLJI5L.js → HoloScriptRuntime-IAZGHPFP.js} +4 -4
- package/dist/{SceneIRCompiler-63KA3M2F.js → SceneIRCompiler-BJQMKLWL.js} +7 -7
- package/dist/{SceneIRCompiler-KWUFHZ4O.cjs → SceneIRCompiler-RTPPDQAV.cjs} +12 -12
- package/dist/{chunk-FWCHPCD4.js → chunk-22AULOAL.js} +5 -5
- package/dist/{chunk-G35CAQ7I.cjs → chunk-2DJIS7TH.cjs} +5 -5
- package/dist/{chunk-LHUDAJQT.cjs → chunk-2PVEXEOL.cjs} +5 -5
- package/dist/{chunk-WWNCM473.js → chunk-2UP2J3OK.js} +4 -4
- package/dist/{chunk-HVX7QQYK.js → chunk-3AUYBQ5I.js} +3 -3
- package/dist/{chunk-TSTFYGGX.js → chunk-3MQAOMKD.js} +3 -3
- package/dist/{chunk-FWKEY4LD.js → chunk-4AGNARX6.js} +3 -3
- package/dist/{chunk-WNYXT4TE.cjs → chunk-4CQ7ULXZ.cjs} +3 -3
- package/dist/{chunk-U3D4SYQ5.js → chunk-5LCJDX5A.js} +3 -3
- package/dist/{chunk-IK6Z2HNC.js → chunk-6OQHLNTT.js} +2 -2
- package/dist/{chunk-EI3J6LTW.cjs → chunk-6RDHWSZM.cjs} +217 -217
- package/dist/{chunk-77QI552M.js → chunk-7AY66PZP.js} +3 -3
- package/dist/{chunk-7IDJDMPU.cjs → chunk-7FYSSI3C.cjs} +27 -2
- package/dist/{chunk-BP4KTMLY.js → chunk-7HDRN5BW.js} +4 -4
- package/dist/{chunk-SQAAWO4V.cjs → chunk-7YKNV2BE.cjs} +5 -5
- package/dist/{chunk-WTH23ISI.js → chunk-AAUQTR7I.js} +4 -4
- package/dist/{chunk-OC6GV5QH.cjs → chunk-AN3ZH7M7.cjs} +38 -38
- package/dist/{chunk-YW3I2FQL.js → chunk-ANMME7XT.js} +4 -2
- package/dist/{chunk-A4OOLBZD.js → chunk-ATRAK4RC.js} +5 -5
- package/dist/{chunk-BQJ3YBF3.js → chunk-AUF7HFOO.js} +724 -647
- package/dist/{chunk-2X3IPCBK.cjs → chunk-AUMTQV64.cjs} +7 -7
- package/dist/chunk-AUU4ACJP.cjs +1605 -0
- package/dist/{chunk-QQFB4RT2.cjs → chunk-BTVHY3UB.cjs} +2 -2
- package/dist/{chunk-ZK7KX5CD.cjs → chunk-CMEINO5I.cjs} +190 -74
- package/dist/{chunk-BCP4E7MD.cjs → chunk-CRUIGXF7.cjs} +26 -10
- package/dist/{chunk-2E6PP5UE.cjs → chunk-E2SNPMBO.cjs} +11 -11
- package/dist/{chunk-2BYAUHBO.js → chunk-E4YS5SIZ.js} +90 -25
- package/dist/{chunk-KFVNCW4Q.js → chunk-EKNWUSGW.js} +3 -3
- package/dist/{chunk-JEJ7TT54.js → chunk-ETIJOUIO.js} +4 -4
- package/dist/{chunk-FRSKLX6I.js → chunk-F33KLYOS.js} +12 -9
- package/dist/{chunk-GGR7QUKK.cjs → chunk-F47FEV4X.cjs} +40 -40
- package/dist/{chunk-J3UHV5T4.cjs → chunk-FCGTI7FO.cjs} +4 -4
- package/dist/{chunk-RRQIAJLQ.cjs → chunk-FGTXAVKG.cjs} +5 -5
- package/dist/{chunk-2KKOYZYI.cjs → chunk-FPGYWNNA.cjs} +5 -5
- package/dist/{chunk-65S62L4D.cjs → chunk-FQ4MYZYU.cjs} +20 -20
- package/dist/{chunk-UGQ3QNV6.js → chunk-FT4FGTR6.js} +24 -8
- package/dist/{chunk-Q4K2GEMW.cjs → chunk-FVNV4WHQ.cjs} +20 -17
- package/dist/{chunk-SJIRCTIS.cjs → chunk-HSGJFCVJ.cjs} +2 -2
- package/dist/{chunk-B3CWTCK2.js → chunk-IA7FCSRY.js} +27 -2
- package/dist/{chunk-OIBRWLPY.cjs → chunk-ILO2KMER.cjs} +55 -4
- package/dist/{chunk-ZRPALBQB.cjs → chunk-IPBSNGAN.cjs} +92 -27
- package/dist/{chunk-FHVPN7BN.js → chunk-IX2U3RQT.js} +3 -3
- package/dist/{chunk-QEDMOGF3.cjs → chunk-IYK6LMQ7.cjs} +7 -7
- package/dist/{chunk-G6EKZHXY.js → chunk-J3VVM6GV.js} +4 -4
- package/dist/{chunk-LMB555QB.cjs → chunk-J74S4ZMF.cjs} +18 -18
- package/dist/{chunk-36NPLOI4.cjs → chunk-JERWCCEJ.cjs} +4 -2
- package/dist/{chunk-RVNXBF2M.js → chunk-JTDDLCSP.js} +4 -4
- package/dist/{chunk-VTEXJOSD.cjs → chunk-K53L47NH.cjs} +30 -30
- package/dist/{chunk-IJU6AS67.cjs → chunk-LJTM5ONX.cjs} +23 -23
- package/dist/{chunk-G6KACNMO.js → chunk-LJVVOVA6.js} +4 -4
- package/dist/{chunk-PDXX5UI4.cjs → chunk-LNJKBQ2B.cjs} +38 -38
- package/dist/{chunk-EM2OGPYE.js → chunk-M2GDE3NV.js} +3 -3
- package/dist/{chunk-CP7V3ATL.js → chunk-MSZNGI5P.js} +52 -5
- package/dist/{chunk-P7JEKJTZ.cjs → chunk-N2BOTBPG.cjs} +27 -16
- package/dist/{chunk-LB3ZZMKT.cjs → chunk-NFALJJCH.cjs} +12 -12
- package/dist/{chunk-XF63CZ7E.cjs → chunk-NRZRBK25.cjs} +6 -6
- package/dist/{chunk-GZPUA2TL.cjs → chunk-NTSLNIY7.cjs} +10 -10
- package/dist/{chunk-Y57AVOM2.cjs → chunk-NZJOAWJM.cjs} +4 -4
- package/dist/{chunk-RXQNRZ5F.js → chunk-OG7RKWWX.js} +3 -3
- package/dist/{chunk-VVAAZITA.cjs → chunk-OQVHCYY4.cjs} +5 -5
- package/dist/{chunk-PJFTTSKE.js → chunk-PFZ5WLIP.js} +4 -4
- package/dist/{chunk-PXVAPGTR.cjs → chunk-PHLNABJD.cjs} +3788 -1138
- package/dist/{chunk-SQXAZHDG.js → chunk-PLK3DLTF.js} +3 -3
- package/dist/{chunk-QBY7LRN2.js → chunk-PMACVMHL.js} +3 -3
- package/dist/{chunk-DJ5BNRIS.js → chunk-PV2OXNP5.js} +3684 -1041
- package/dist/{chunk-F3YT6GUF.cjs → chunk-Q6VW7MGX.cjs} +14 -14
- package/dist/{chunk-DUG3OQAS.js → chunk-QC3CAVFN.js} +187 -70
- package/dist/{chunk-NQN5LFN4.cjs → chunk-QKLEDRHN.cjs} +19 -19
- package/dist/{chunk-2EGGAZT3.js → chunk-QS27OYBU.js} +3 -3
- package/dist/{chunk-4376VHNJ.js → chunk-RUB7WL6C.js} +3 -3
- package/dist/{chunk-5LVFTGKH.js → chunk-TW2AH2ZS.js} +3 -3
- package/dist/{chunk-AATYYLYK.js → chunk-TZM6DKSJ.js} +18 -7
- package/dist/{chunk-ESSEF6U2.js → chunk-U227RWXB.js} +3 -3
- package/dist/{chunk-TC7JEO6R.cjs → chunk-U6CQOM5Q.cjs} +711 -52
- package/dist/{chunk-Z557DVYN.js → chunk-ULT2QAV5.js} +4 -4
- package/dist/{chunk-S4O7CFHQ.cjs → chunk-VSO6HPDZ.cjs} +7 -7
- package/dist/{chunk-ONPVM4IV.js → chunk-WQJMSSJT.js} +698 -45
- package/dist/{chunk-GILYQ5VH.cjs → chunk-WXSDBWGM.cjs} +4 -4
- package/dist/{chunk-UTUD6GJI.js → chunk-X5PMMK7H.js} +3 -3
- package/dist/{chunk-IFW5IW4L.cjs → chunk-X5ZLSPU2.cjs} +742 -657
- package/dist/{chunk-QM7FJB5W.js → chunk-X727CQ7X.js} +5 -5
- package/dist/{chunk-566ZB4LZ.cjs → chunk-XHZYS4QO.cjs} +5 -5
- package/dist/{chunk-RZ2EPXO3.cjs → chunk-XRQCTTDC.cjs} +8 -8
- package/dist/{chunk-5FYMCVBY.js → chunk-YBIHSN55.js} +4 -4
- package/dist/{chunk-FG6PYGIZ.js → chunk-Z574GVI3.js} +4 -4
- package/dist/{chunk-ZVQMKUGJ.js → chunk-Z5V3KA7L.js} +2 -2
- package/dist/chunk-ZGDEOXGU.js +1571 -0
- package/dist/{chunk-IS7NTKY5.cjs → chunk-ZHW6TDZ6.cjs} +14 -14
- package/dist/{chunk-CKV5NYAE.js → chunk-ZPHCTPR6.js} +4 -4
- package/dist/{chunk-3IUHTGDD.cjs → chunk-ZXXC2GXB.cjs} +38 -38
- package/dist/cli/holoscript-runner.cjs +169 -20
- package/dist/cli/holoscript-runner.js +163 -14
- package/dist/compiler/agent-inference.cjs +8 -8
- package/dist/compiler/agent-inference.js +4 -4
- package/dist/compiler/android-xr.cjs +7 -7
- package/dist/compiler/android-xr.js +5 -5
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/daimon-seed.cjs +9 -9
- package/dist/compiler/daimon-seed.js +4 -4
- package/dist/compiler/domain-block-utils.cjs +165 -165
- 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 +2275 -212
- package/dist/compiler/index.d.ts +29 -1
- package/dist/compiler/index.js +2078 -66
- 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/openxr.cjs +6 -6
- package/dist/compiler/openxr.js +5 -5
- 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 +7 -7
- package/dist/compiler/trait-composition.js +3 -3
- package/dist/compiler/unity.cjs +6 -6
- package/dist/compiler/unity.js +5 -5
- package/dist/compiler/unreal.cjs +7 -7
- package/dist/compiler/unreal.js +5 -5
- 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 +6 -6
- package/dist/compiler/visionos.js +5 -5
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.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/constants.cjs +99 -99
- package/dist/constants.js +3 -3
- package/dist/debugger.cjs +5 -5
- package/dist/debugger.js +3 -3
- package/dist/{dist-GRMOP2UL.cjs → dist-YGATNURH.cjs} +705 -9
- package/dist/{dist-ZBUKU2JG.js → dist-ZEZXRCBG.js} +701 -10
- package/dist/entries/scripting.cjs +8 -8
- package/dist/entries/scripting.js +4 -4
- package/dist/evolution/index.cjs +20 -20
- package/dist/evolution/index.js +8 -8
- package/dist/index.cjs +1099 -826
- package/dist/index.d.ts +78 -5
- package/dist/index.js +265 -120
- package/dist/parser/HoloCompositionTypes.d.ts +1 -1
- package/dist/parser.cjs +21 -21
- package/dist/parser.js +7 -7
- package/dist/reconstruction/index.cjs +127 -38
- package/dist/reconstruction/index.d.ts +159 -0
- package/dist/reconstruction/index.js +11 -2
- package/dist/runtime.cjs +9 -9
- package/dist/runtime.d.ts +1 -0
- package/dist/runtime.js +3 -3
- package/dist/traitDocs/traitDocs.cjs +8 -8
- package/dist/traitDocs/traitDocs.js +2 -2
- package/dist/traits/botanical-lotus.d.ts +61 -0
- package/dist/traits/index.cjs +761 -673
- package/dist/traits/index.d.ts +65 -0
- package/dist/traits/index.js +102 -27
- package/dist/types/HoloScriptPlus.d.ts +1 -1
- package/package.json +71 -65
- package/dist/HoloCompositionParser-6GW2BZID.cjs +0 -45
- package/dist/HoloScriptPlusParser-HQV6IJAH.js +0 -13
- package/dist/HoloScriptPlusParser-RFNHRMPE.cjs +0 -30
- package/dist/chunk-DVHZD5HV.cjs +0 -639
- package/dist/chunk-G72754QB.js +0 -625
|
@@ -5,7 +5,7 @@ import { botanicalLotusHandler } from './chunk-VKCTYLDN.js';
|
|
|
5
5
|
import { SimulationSolverFactory } from './chunk-YQELFNJV.js';
|
|
6
6
|
import { init_color, init_PerceptualColorPass, DEFAULT_DAMPENING, applyPerceptualColorPass, analyzePerceptualColor } from './chunk-UCVZXQ63.js';
|
|
7
7
|
import { COGNITIVE_COMPLETE_TO_VERB, isCognitiveVerb, compileCognitiveDispatch } from './chunk-UNMVGZVW.js';
|
|
8
|
-
import { mitosisHandler, embeddingHandler, jepObjectiveHandler, orbitalHandler, getSharedEventBus, applyEasing } from './chunk-
|
|
8
|
+
import { mitosisHandler, embeddingHandler, jepObjectiveHandler, orbitalHandler, getSharedEventBus, applyEasing } from './chunk-6OQHLNTT.js';
|
|
9
9
|
import { logger } from './chunk-PHENW4MQ.js';
|
|
10
10
|
import { init_safeJsonParse, readJson, jsonClone } from './chunk-RAN3ECAS.js';
|
|
11
11
|
import { __require } from './chunk-W4GABFCR.js';
|
|
@@ -2725,6 +2725,44 @@ var evolveProgramHandler = {
|
|
|
2725
2725
|
}
|
|
2726
2726
|
};
|
|
2727
2727
|
|
|
2728
|
+
// src/traits/FreezeWhenTrait.ts
|
|
2729
|
+
var DEFAULT_EXEMPT = ["fix", "native-format", "infra-repair"];
|
|
2730
|
+
var freezeWhenHandler = {
|
|
2731
|
+
name: "freeze_when",
|
|
2732
|
+
defaultConfig: {
|
|
2733
|
+
id: "",
|
|
2734
|
+
scope: "",
|
|
2735
|
+
signal: "",
|
|
2736
|
+
unfreeze: "",
|
|
2737
|
+
exempt: DEFAULT_EXEMPT,
|
|
2738
|
+
severity: "advisory",
|
|
2739
|
+
reason: "",
|
|
2740
|
+
repair: ""
|
|
2741
|
+
},
|
|
2742
|
+
onAttach(node, config, context) {
|
|
2743
|
+
node.__freezeWhen = {
|
|
2744
|
+
id: config.id,
|
|
2745
|
+
scope: config.scope,
|
|
2746
|
+
signal: config.signal,
|
|
2747
|
+
unfreeze: config.unfreeze,
|
|
2748
|
+
exempt: config.exempt ?? DEFAULT_EXEMPT,
|
|
2749
|
+
severity: config.severity ?? "advisory",
|
|
2750
|
+
reason: config.reason ?? "",
|
|
2751
|
+
repair: config.repair ?? ""
|
|
2752
|
+
};
|
|
2753
|
+
context.emit?.("freeze_declared", {
|
|
2754
|
+
node,
|
|
2755
|
+
rule: node.__freezeWhen,
|
|
2756
|
+
derived: true,
|
|
2757
|
+
nativeExempt: true
|
|
2758
|
+
});
|
|
2759
|
+
},
|
|
2760
|
+
onDetach(node, _config, context) {
|
|
2761
|
+
delete node.__freezeWhen;
|
|
2762
|
+
context.emit?.("freeze_when_detached", { node });
|
|
2763
|
+
}
|
|
2764
|
+
};
|
|
2765
|
+
|
|
2728
2766
|
// src/traits/AiUpscalingTrait.ts
|
|
2729
2767
|
var aiUpscalingHandler = {
|
|
2730
2768
|
name: "ai_upscaling",
|
|
@@ -21113,6 +21151,33 @@ var NetworkedTrait = class {
|
|
|
21113
21151
|
lerpVector3(a, b, t) {
|
|
21114
21152
|
return [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t];
|
|
21115
21153
|
}
|
|
21154
|
+
/**
|
|
21155
|
+
* SLERP for networked rotation interpolation (tuple-in / tuple-out).
|
|
21156
|
+
*
|
|
21157
|
+
* DO NOT "dedup" this into `../math/Quaternion.slerp` without reading this first.
|
|
21158
|
+
* It is a near-duplicate of that function — same shortest-arc flip, same
|
|
21159
|
+
* `dot > 0.9995` normalize-lerp fallback, same s0/s1 coefficients — but it is
|
|
21160
|
+
* deliberately NOT bit-identical: the main branch below returns the raw
|
|
21161
|
+
* `s0*a + s1*b` combination, whereas `Quaternion.slerp` wraps its result in
|
|
21162
|
+
* `normalize(...)`. For exact unit inputs the two agree analytically; in floating
|
|
21163
|
+
* point they differ in the last ULPs.
|
|
21164
|
+
*
|
|
21165
|
+
* That matters here because this is a netcode path: rotations interpolated by two
|
|
21166
|
+
* clients on different builds must agree, and a last-ULP change is a *behavior*
|
|
21167
|
+
* change that no single-version test can catch (the failure mode is version-skew
|
|
21168
|
+
* divergence, which only reproduces with two builds live). Migrating this requires
|
|
21169
|
+
* either bit-exactness proven against golden values for every branch, or a
|
|
21170
|
+
* cross-version replay test — neither exists today.
|
|
21171
|
+
*
|
|
21172
|
+
* Also note `Quaternion.slerp` is currently package-private (not in core's
|
|
21173
|
+
* package.json `exports`) and returns a hybrid `{x,y,z,w}` object with
|
|
21174
|
+
* NON-enumerable numeric indices — it indexes like a tuple but `JSON.stringify`
|
|
21175
|
+
* drops the indices and spreading it throws. It is not a drop-in for a real tuple
|
|
21176
|
+
* on a serialization path.
|
|
21177
|
+
*
|
|
21178
|
+
* Analysis: ai-ecosystem `research/2026-07-15_interpolation.md` +
|
|
21179
|
+
* `research/2026-07-15_native-interpolate-trait-feasibility.md`.
|
|
21180
|
+
*/
|
|
21116
21181
|
slerpQuat(a, b, t) {
|
|
21117
21182
|
let dot = a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
|
|
21118
21183
|
const bNorm = dot < 0 ? [-b[0], -b[1], -b[2], -b[3]] : [...b];
|
|
@@ -24323,6 +24388,200 @@ export default IframeSandbox;`;
|
|
|
24323
24388
|
}
|
|
24324
24389
|
};
|
|
24325
24390
|
|
|
24391
|
+
// src/traits/RetryTrait.ts
|
|
24392
|
+
function computeDelay(config, attempt) {
|
|
24393
|
+
let delay;
|
|
24394
|
+
switch (config.backoff) {
|
|
24395
|
+
case "exponential":
|
|
24396
|
+
delay = config.base_delay_ms * Math.pow(2, attempt);
|
|
24397
|
+
break;
|
|
24398
|
+
case "linear":
|
|
24399
|
+
delay = config.base_delay_ms * (attempt + 1);
|
|
24400
|
+
break;
|
|
24401
|
+
case "constant":
|
|
24402
|
+
default:
|
|
24403
|
+
delay = config.base_delay_ms;
|
|
24404
|
+
break;
|
|
24405
|
+
}
|
|
24406
|
+
delay = Math.min(delay, config.max_delay_ms);
|
|
24407
|
+
if (config.jitter > 0) {
|
|
24408
|
+
const jitterAmount = delay * config.jitter;
|
|
24409
|
+
delay += Math.random() * jitterAmount * 2 - jitterAmount;
|
|
24410
|
+
}
|
|
24411
|
+
return Math.max(0, Math.round(delay));
|
|
24412
|
+
}
|
|
24413
|
+
var retryHandler = {
|
|
24414
|
+
name: "retry",
|
|
24415
|
+
defaultConfig: {
|
|
24416
|
+
max_retries: 3,
|
|
24417
|
+
base_delay_ms: 1e3,
|
|
24418
|
+
max_delay_ms: 3e4,
|
|
24419
|
+
backoff: "exponential",
|
|
24420
|
+
jitter: 0.1,
|
|
24421
|
+
circuit_threshold: 5,
|
|
24422
|
+
circuit_reset_ms: 6e4
|
|
24423
|
+
},
|
|
24424
|
+
onAttach(node, _config, _context) {
|
|
24425
|
+
const state = {
|
|
24426
|
+
circuit: "closed",
|
|
24427
|
+
consecutiveFailures: 0,
|
|
24428
|
+
circuitOpenedAt: 0,
|
|
24429
|
+
totalAttempts: 0,
|
|
24430
|
+
totalSuccesses: 0,
|
|
24431
|
+
totalFailures: 0,
|
|
24432
|
+
pendingActions: /* @__PURE__ */ new Map(),
|
|
24433
|
+
actionCounter: 0
|
|
24434
|
+
};
|
|
24435
|
+
node.__retryState = state;
|
|
24436
|
+
},
|
|
24437
|
+
onDetach(node, _config, _context) {
|
|
24438
|
+
delete node.__retryState;
|
|
24439
|
+
},
|
|
24440
|
+
onUpdate(node, config, context, _delta) {
|
|
24441
|
+
const state = node.__retryState;
|
|
24442
|
+
if (!state) return;
|
|
24443
|
+
if (state.circuit === "open") {
|
|
24444
|
+
const elapsed = Date.now() - state.circuitOpenedAt;
|
|
24445
|
+
if (elapsed >= config.circuit_reset_ms) {
|
|
24446
|
+
state.circuit = "half-open";
|
|
24447
|
+
context.emit?.("retry:circuit_half", {
|
|
24448
|
+
testAttempt: state.totalAttempts + 1
|
|
24449
|
+
});
|
|
24450
|
+
}
|
|
24451
|
+
}
|
|
24452
|
+
},
|
|
24453
|
+
onEvent(node, config, context, event) {
|
|
24454
|
+
const state = node.__retryState;
|
|
24455
|
+
if (!state) return;
|
|
24456
|
+
const eventType = typeof event === "string" ? event : event.type;
|
|
24457
|
+
const payload = extractPayload(event);
|
|
24458
|
+
switch (eventType) {
|
|
24459
|
+
case "retry:execute": {
|
|
24460
|
+
const actionName = payload.action;
|
|
24461
|
+
if (!actionName) break;
|
|
24462
|
+
if (state.circuit === "open") {
|
|
24463
|
+
context.emit?.("retry:failure", {
|
|
24464
|
+
actionName,
|
|
24465
|
+
attempt: 0,
|
|
24466
|
+
error: "Circuit breaker is OPEN"
|
|
24467
|
+
});
|
|
24468
|
+
break;
|
|
24469
|
+
}
|
|
24470
|
+
const retryId = `retry_${state.actionCounter++}`;
|
|
24471
|
+
state.pendingActions.set(retryId, {
|
|
24472
|
+
actionName,
|
|
24473
|
+
attempt: 0,
|
|
24474
|
+
startedAt: Date.now()
|
|
24475
|
+
});
|
|
24476
|
+
state.totalAttempts++;
|
|
24477
|
+
context.emit?.("retry:attempt", {
|
|
24478
|
+
retryId,
|
|
24479
|
+
actionName,
|
|
24480
|
+
attempt: 0,
|
|
24481
|
+
maxRetries: config.max_retries
|
|
24482
|
+
});
|
|
24483
|
+
context.emit?.(actionName, {
|
|
24484
|
+
...payload.params,
|
|
24485
|
+
__retryId: retryId
|
|
24486
|
+
});
|
|
24487
|
+
break;
|
|
24488
|
+
}
|
|
24489
|
+
case "retry:action_result": {
|
|
24490
|
+
const retryId = payload.retryId;
|
|
24491
|
+
const success = payload.success;
|
|
24492
|
+
const error = payload.error;
|
|
24493
|
+
const pending = state.pendingActions.get(retryId);
|
|
24494
|
+
if (!pending) break;
|
|
24495
|
+
if (success) {
|
|
24496
|
+
state.totalSuccesses++;
|
|
24497
|
+
state.consecutiveFailures = 0;
|
|
24498
|
+
state.pendingActions.delete(retryId);
|
|
24499
|
+
if (state.circuit === "half-open") {
|
|
24500
|
+
state.circuit = "closed";
|
|
24501
|
+
context.emit?.("retry:circuit_close", {
|
|
24502
|
+
recoveredAfterMs: Date.now() - state.circuitOpenedAt
|
|
24503
|
+
});
|
|
24504
|
+
}
|
|
24505
|
+
context.emit?.("retry:success", {
|
|
24506
|
+
actionName: pending.actionName,
|
|
24507
|
+
attempt: pending.attempt,
|
|
24508
|
+
elapsed: Date.now() - pending.startedAt
|
|
24509
|
+
});
|
|
24510
|
+
} else {
|
|
24511
|
+
state.totalFailures++;
|
|
24512
|
+
state.consecutiveFailures++;
|
|
24513
|
+
pending.attempt++;
|
|
24514
|
+
context.emit?.("retry:failure", {
|
|
24515
|
+
actionName: pending.actionName,
|
|
24516
|
+
attempt: pending.attempt,
|
|
24517
|
+
error: error ?? "unknown"
|
|
24518
|
+
});
|
|
24519
|
+
if (state.consecutiveFailures >= config.circuit_threshold) {
|
|
24520
|
+
state.circuit = "open";
|
|
24521
|
+
state.circuitOpenedAt = Date.now();
|
|
24522
|
+
state.pendingActions.delete(retryId);
|
|
24523
|
+
context.emit?.("retry:circuit_open", {
|
|
24524
|
+
consecutiveFailures: state.consecutiveFailures,
|
|
24525
|
+
resetMs: config.circuit_reset_ms
|
|
24526
|
+
});
|
|
24527
|
+
break;
|
|
24528
|
+
}
|
|
24529
|
+
if (state.circuit === "half-open") {
|
|
24530
|
+
state.circuit = "open";
|
|
24531
|
+
state.circuitOpenedAt = Date.now();
|
|
24532
|
+
state.pendingActions.delete(retryId);
|
|
24533
|
+
context.emit?.("retry:circuit_open", {
|
|
24534
|
+
consecutiveFailures: state.consecutiveFailures,
|
|
24535
|
+
resetMs: config.circuit_reset_ms
|
|
24536
|
+
});
|
|
24537
|
+
break;
|
|
24538
|
+
}
|
|
24539
|
+
if (pending.attempt > config.max_retries) {
|
|
24540
|
+
state.pendingActions.delete(retryId);
|
|
24541
|
+
context.emit?.("retry:exhausted", {
|
|
24542
|
+
actionName: pending.actionName,
|
|
24543
|
+
totalAttempts: pending.attempt
|
|
24544
|
+
});
|
|
24545
|
+
} else {
|
|
24546
|
+
const delay = computeDelay(config, pending.attempt - 1);
|
|
24547
|
+
state.totalAttempts++;
|
|
24548
|
+
setTimeout(() => {
|
|
24549
|
+
if (!node.__retryState) return;
|
|
24550
|
+
context.emit?.("retry:attempt", {
|
|
24551
|
+
retryId,
|
|
24552
|
+
actionName: pending.actionName,
|
|
24553
|
+
attempt: pending.attempt,
|
|
24554
|
+
maxRetries: config.max_retries
|
|
24555
|
+
});
|
|
24556
|
+
context.emit?.(pending.actionName, {
|
|
24557
|
+
__retryId: retryId
|
|
24558
|
+
});
|
|
24559
|
+
}, delay);
|
|
24560
|
+
}
|
|
24561
|
+
}
|
|
24562
|
+
break;
|
|
24563
|
+
}
|
|
24564
|
+
case "retry:reset_circuit": {
|
|
24565
|
+
state.circuit = "closed";
|
|
24566
|
+
state.consecutiveFailures = 0;
|
|
24567
|
+
context.emit?.("retry:circuit_close", { recoveredAfterMs: 0 });
|
|
24568
|
+
break;
|
|
24569
|
+
}
|
|
24570
|
+
case "retry:get_status": {
|
|
24571
|
+
context.emit?.("retry:status", {
|
|
24572
|
+
circuit: state.circuit,
|
|
24573
|
+
consecutiveFailures: state.consecutiveFailures,
|
|
24574
|
+
totalAttempts: state.totalAttempts,
|
|
24575
|
+
totalSuccesses: state.totalSuccesses,
|
|
24576
|
+
totalFailures: state.totalFailures,
|
|
24577
|
+
pending: state.pendingActions.size
|
|
24578
|
+
});
|
|
24579
|
+
break;
|
|
24580
|
+
}
|
|
24581
|
+
}
|
|
24582
|
+
}
|
|
24583
|
+
};
|
|
24584
|
+
|
|
24326
24585
|
// src/traits/SchedulerTrait.ts
|
|
24327
24586
|
var schedulerHandler = {
|
|
24328
24587
|
name: "scheduler",
|
|
@@ -25412,6 +25671,110 @@ function addEntry(state, config, context, level, payload) {
|
|
|
25412
25671
|
}
|
|
25413
25672
|
}
|
|
25414
25673
|
|
|
25674
|
+
// src/traits/CacheTrait.ts
|
|
25675
|
+
var cacheHandler = {
|
|
25676
|
+
name: "cache",
|
|
25677
|
+
defaultConfig: {
|
|
25678
|
+
max_size: 1e3,
|
|
25679
|
+
default_ttl_ms: 6e4,
|
|
25680
|
+
eviction_policy: "lru"
|
|
25681
|
+
},
|
|
25682
|
+
onAttach(node, _config, _context) {
|
|
25683
|
+
node.__cacheState = {
|
|
25684
|
+
entries: /* @__PURE__ */ new Map(),
|
|
25685
|
+
hits: 0,
|
|
25686
|
+
misses: 0,
|
|
25687
|
+
evictions: 0
|
|
25688
|
+
};
|
|
25689
|
+
},
|
|
25690
|
+
onDetach(node) {
|
|
25691
|
+
delete node.__cacheState;
|
|
25692
|
+
},
|
|
25693
|
+
onUpdate(node, config, _context, _delta) {
|
|
25694
|
+
const state = node.__cacheState;
|
|
25695
|
+
if (!state) return;
|
|
25696
|
+
const now = Date.now();
|
|
25697
|
+
for (const [key, entry] of state.entries) {
|
|
25698
|
+
if (entry.expiresAt > 0 && now >= entry.expiresAt) {
|
|
25699
|
+
state.entries.delete(key);
|
|
25700
|
+
state.evictions++;
|
|
25701
|
+
}
|
|
25702
|
+
}
|
|
25703
|
+
},
|
|
25704
|
+
onEvent(node, config, context, event) {
|
|
25705
|
+
const state = node.__cacheState;
|
|
25706
|
+
if (!state) return;
|
|
25707
|
+
const eventType = typeof event === "string" ? event : event.type;
|
|
25708
|
+
switch (eventType) {
|
|
25709
|
+
case "cache:set": {
|
|
25710
|
+
const key = event.key;
|
|
25711
|
+
if (!key) break;
|
|
25712
|
+
const ttl = event.ttl ?? config.default_ttl_ms;
|
|
25713
|
+
if (state.entries.size >= config.max_size && !state.entries.has(key)) {
|
|
25714
|
+
evictOne(state, config, context);
|
|
25715
|
+
}
|
|
25716
|
+
const now = Date.now();
|
|
25717
|
+
state.entries.set(key, {
|
|
25718
|
+
value: event.value,
|
|
25719
|
+
expiresAt: ttl > 0 ? now + ttl : 0,
|
|
25720
|
+
accessedAt: now,
|
|
25721
|
+
createdAt: now
|
|
25722
|
+
});
|
|
25723
|
+
break;
|
|
25724
|
+
}
|
|
25725
|
+
case "cache:get": {
|
|
25726
|
+
const key = event.key;
|
|
25727
|
+
if (!key) break;
|
|
25728
|
+
const entry = state.entries.get(key);
|
|
25729
|
+
if (entry && (entry.expiresAt === 0 || Date.now() < entry.expiresAt)) {
|
|
25730
|
+
state.hits++;
|
|
25731
|
+
entry.accessedAt = Date.now();
|
|
25732
|
+
context.emit?.("cache:result", { key, value: entry.value, hit: true });
|
|
25733
|
+
} else {
|
|
25734
|
+
state.misses++;
|
|
25735
|
+
if (entry) state.entries.delete(key);
|
|
25736
|
+
context.emit?.("cache:result", { key, value: void 0, hit: false });
|
|
25737
|
+
}
|
|
25738
|
+
break;
|
|
25739
|
+
}
|
|
25740
|
+
case "cache:invalidate": {
|
|
25741
|
+
const key = event.key;
|
|
25742
|
+
if (key) state.entries.delete(key);
|
|
25743
|
+
break;
|
|
25744
|
+
}
|
|
25745
|
+
case "cache:clear": {
|
|
25746
|
+
state.entries.clear();
|
|
25747
|
+
break;
|
|
25748
|
+
}
|
|
25749
|
+
case "cache:get_stats": {
|
|
25750
|
+
context.emit?.("cache:stats", {
|
|
25751
|
+
hits: state.hits,
|
|
25752
|
+
misses: state.misses,
|
|
25753
|
+
size: state.entries.size,
|
|
25754
|
+
evictions: state.evictions,
|
|
25755
|
+
hitRate: state.hits + state.misses > 0 ? state.hits / (state.hits + state.misses) : 0
|
|
25756
|
+
});
|
|
25757
|
+
break;
|
|
25758
|
+
}
|
|
25759
|
+
}
|
|
25760
|
+
}
|
|
25761
|
+
};
|
|
25762
|
+
function evictOne(state, config, context) {
|
|
25763
|
+
if (state.entries.size === 0) return;
|
|
25764
|
+
let oldest = null;
|
|
25765
|
+
for (const [key, entry] of state.entries) {
|
|
25766
|
+
const time = config.eviction_policy === "lru" ? entry.accessedAt : entry.createdAt;
|
|
25767
|
+
if (!oldest || time < oldest.time) {
|
|
25768
|
+
oldest = { key, time };
|
|
25769
|
+
}
|
|
25770
|
+
}
|
|
25771
|
+
if (oldest) {
|
|
25772
|
+
state.entries.delete(oldest.key);
|
|
25773
|
+
state.evictions++;
|
|
25774
|
+
context.emit?.("cache:evict", { key: oldest.key, reason: config.eviction_policy });
|
|
25775
|
+
}
|
|
25776
|
+
}
|
|
25777
|
+
|
|
25415
25778
|
// src/traits/FairnessMonitorTrait.ts
|
|
25416
25779
|
var DEFAULT_POSITIVE_DECISION_VALUES = ["true", "approved", "approve", "pass", "1", "yes"];
|
|
25417
25780
|
var DEFAULT_CONFIG5 = {
|
|
@@ -44488,6 +44851,333 @@ var environmentalAudioHandler = {
|
|
|
44488
44851
|
}
|
|
44489
44852
|
};
|
|
44490
44853
|
|
|
44854
|
+
// src/traits/FluidSimulationTrait.ts
|
|
44855
|
+
function poly6Kernel(r, h) {
|
|
44856
|
+
if (r < 0 || r > h) return 0;
|
|
44857
|
+
const coeff = 315 / (64 * Math.PI * h ** 9);
|
|
44858
|
+
return coeff * (h * h - r * r) ** 3;
|
|
44859
|
+
}
|
|
44860
|
+
function spikyKernelGradient(dx, dy, dz, h) {
|
|
44861
|
+
const r = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
44862
|
+
if (r > h || r < 1e-5) return [0, 0, 0];
|
|
44863
|
+
const coeff = -45 / (Math.PI * h ** 6) * (h - r) ** 2;
|
|
44864
|
+
return [coeff * (dx / r), coeff * (dy / r), coeff * (dz / r)];
|
|
44865
|
+
}
|
|
44866
|
+
function viscosityKernelLaplacian(r, h) {
|
|
44867
|
+
if (r < 0 || r > h) return 0;
|
|
44868
|
+
return 45 / (Math.PI * h ** 6) * (h - r);
|
|
44869
|
+
}
|
|
44870
|
+
var SpatialHash = class {
|
|
44871
|
+
constructor(cellSize) {
|
|
44872
|
+
this.cells = /* @__PURE__ */ new Map();
|
|
44873
|
+
this.cellSize = cellSize;
|
|
44874
|
+
}
|
|
44875
|
+
key(x, y, z) {
|
|
44876
|
+
const cx = Math.floor(x / this.cellSize);
|
|
44877
|
+
const cy = Math.floor(y / this.cellSize);
|
|
44878
|
+
const cz = Math.floor(z / this.cellSize);
|
|
44879
|
+
return `${cx},${cy},${cz}`;
|
|
44880
|
+
}
|
|
44881
|
+
insert(id, pos) {
|
|
44882
|
+
const k = this.key(pos[0], pos[1], pos[2]);
|
|
44883
|
+
if (!this.cells.has(k)) this.cells.set(k, []);
|
|
44884
|
+
this.cells.get(k).push(id);
|
|
44885
|
+
}
|
|
44886
|
+
getNeighbors(pos) {
|
|
44887
|
+
const cx = Math.floor(pos[0] / this.cellSize);
|
|
44888
|
+
const cy = Math.floor(pos[1] / this.cellSize);
|
|
44889
|
+
const cz = Math.floor(pos[2] / this.cellSize);
|
|
44890
|
+
const result = [];
|
|
44891
|
+
for (let dx = -1; dx <= 1; dx++) {
|
|
44892
|
+
for (let dy = -1; dy <= 1; dy++) {
|
|
44893
|
+
for (let dz = -1; dz <= 1; dz++) {
|
|
44894
|
+
const k = `${cx + dx},${cy + dy},${cz + dz}`;
|
|
44895
|
+
const cell = this.cells.get(k);
|
|
44896
|
+
if (cell) result.push(...cell);
|
|
44897
|
+
}
|
|
44898
|
+
}
|
|
44899
|
+
}
|
|
44900
|
+
return result;
|
|
44901
|
+
}
|
|
44902
|
+
clear() {
|
|
44903
|
+
this.cells.clear();
|
|
44904
|
+
}
|
|
44905
|
+
};
|
|
44906
|
+
var FluidSimulationSystem = class {
|
|
44907
|
+
constructor(config = {}) {
|
|
44908
|
+
this.particles = /* @__PURE__ */ new Map();
|
|
44909
|
+
this.nextId = 0;
|
|
44910
|
+
this.boundaries = [];
|
|
44911
|
+
this.cfg = {
|
|
44912
|
+
restDensity: config.restDensity ?? 1e3,
|
|
44913
|
+
viscosity: config.viscosity ?? 1e-3,
|
|
44914
|
+
gravity: config.gravity ?? [0, -9.81, 0],
|
|
44915
|
+
solverType: config.solverType ?? "sph",
|
|
44916
|
+
timeStep: config.timeStep ?? 0.016,
|
|
44917
|
+
maxVelocity: config.maxVelocity ?? 100,
|
|
44918
|
+
smoothingRadius: config.smoothingRadius ?? 0.04,
|
|
44919
|
+
gridCellSize: config.gridCellSize ?? 0.04,
|
|
44920
|
+
particleRadius: config.particleRadius ?? 0.01,
|
|
44921
|
+
gasConstant: config.gasConstant ?? 8.314,
|
|
44922
|
+
surfaceTension: config.surfaceTension ?? 0.072
|
|
44923
|
+
};
|
|
44924
|
+
this.spatialHash = new SpatialHash(this.cfg.gridCellSize);
|
|
44925
|
+
}
|
|
44926
|
+
// ── Particle Management ────────────────────────────────────────────────
|
|
44927
|
+
addParticle(position, velocity) {
|
|
44928
|
+
const id = this.nextId++;
|
|
44929
|
+
this.particles.set(id, {
|
|
44930
|
+
id,
|
|
44931
|
+
position: [...position],
|
|
44932
|
+
velocity: velocity ? [...velocity] : [0, 0, 0],
|
|
44933
|
+
force: [0, 0, 0],
|
|
44934
|
+
density: this.cfg.restDensity,
|
|
44935
|
+
pressure: 0,
|
|
44936
|
+
mass: 1
|
|
44937
|
+
});
|
|
44938
|
+
return id;
|
|
44939
|
+
}
|
|
44940
|
+
getParticle(id) {
|
|
44941
|
+
return this.particles.get(id);
|
|
44942
|
+
}
|
|
44943
|
+
getParticles() {
|
|
44944
|
+
return Array.from(this.particles.values());
|
|
44945
|
+
}
|
|
44946
|
+
getParticleCount() {
|
|
44947
|
+
return this.particles.size;
|
|
44948
|
+
}
|
|
44949
|
+
removeParticle(id) {
|
|
44950
|
+
return this.particles.delete(id);
|
|
44951
|
+
}
|
|
44952
|
+
clearParticles() {
|
|
44953
|
+
this.particles.clear();
|
|
44954
|
+
this.nextId = 0;
|
|
44955
|
+
}
|
|
44956
|
+
// ── Boundary Management ────────────────────────────────────────────────
|
|
44957
|
+
addBoundary(boundary) {
|
|
44958
|
+
this.boundaries.push(boundary);
|
|
44959
|
+
}
|
|
44960
|
+
getBoundaries() {
|
|
44961
|
+
return [...this.boundaries];
|
|
44962
|
+
}
|
|
44963
|
+
clearBoundaries() {
|
|
44964
|
+
this.boundaries.length = 0;
|
|
44965
|
+
}
|
|
44966
|
+
// ── Configuration ──────────────────────────────────────────────────────
|
|
44967
|
+
getConfig() {
|
|
44968
|
+
return { ...this.cfg };
|
|
44969
|
+
}
|
|
44970
|
+
setConfig(partial) {
|
|
44971
|
+
Object.assign(this.cfg, partial);
|
|
44972
|
+
if (partial.gridCellSize !== void 0) {
|
|
44973
|
+
this.spatialHash = new SpatialHash(this.cfg.gridCellSize);
|
|
44974
|
+
}
|
|
44975
|
+
}
|
|
44976
|
+
// ── Simulation Step ────────────────────────────────────────────────────
|
|
44977
|
+
step(dt) {
|
|
44978
|
+
const h = this.cfg.smoothingRadius;
|
|
44979
|
+
const deltaT = dt ?? this.cfg.timeStep;
|
|
44980
|
+
const particles = Array.from(this.particles.values());
|
|
44981
|
+
this.spatialHash.clear();
|
|
44982
|
+
for (const p of particles) {
|
|
44983
|
+
this.spatialHash.insert(p.id, p.position);
|
|
44984
|
+
}
|
|
44985
|
+
for (const pi of particles) {
|
|
44986
|
+
let density = 0;
|
|
44987
|
+
for (const pj of particles) {
|
|
44988
|
+
const r = this.dist(pi.position, pj.position);
|
|
44989
|
+
density += pj.mass * poly6Kernel(r, h);
|
|
44990
|
+
}
|
|
44991
|
+
pi.density = Math.max(density, this.cfg.restDensity * 0.01);
|
|
44992
|
+
pi.pressure = this.cfg.gasConstant * (pi.density - this.cfg.restDensity);
|
|
44993
|
+
}
|
|
44994
|
+
for (const pi of particles) {
|
|
44995
|
+
pi.force = [
|
|
44996
|
+
this.cfg.gravity[0] * pi.mass,
|
|
44997
|
+
this.cfg.gravity[1] * pi.mass,
|
|
44998
|
+
this.cfg.gravity[2] * pi.mass
|
|
44999
|
+
];
|
|
45000
|
+
for (const pj of particles) {
|
|
45001
|
+
if (pi.id === pj.id) continue;
|
|
45002
|
+
const dx = pi.position[0] - pj.position[0];
|
|
45003
|
+
const dy = pi.position[1] - pj.position[1];
|
|
45004
|
+
const dz = pi.position[2] - pj.position[2];
|
|
45005
|
+
const r = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
45006
|
+
if (r < h && r > 1e-5) {
|
|
45007
|
+
const grad = spikyKernelGradient(dx, dy, dz, h);
|
|
45008
|
+
const pScale = -pj.mass * ((pi.pressure + pj.pressure) / (2 * pj.density));
|
|
45009
|
+
pi.force[0] += pScale * grad[0];
|
|
45010
|
+
pi.force[1] += pScale * grad[1];
|
|
45011
|
+
pi.force[2] += pScale * grad[2];
|
|
45012
|
+
const viscLap = viscosityKernelLaplacian(r, h);
|
|
45013
|
+
const vScale = this.cfg.viscosity * pj.mass * (1 / pj.density) * viscLap;
|
|
45014
|
+
pi.force[0] += vScale * (pj.velocity[0] - pi.velocity[0]);
|
|
45015
|
+
pi.force[1] += vScale * (pj.velocity[1] - pi.velocity[1]);
|
|
45016
|
+
pi.force[2] += vScale * (pj.velocity[2] - pi.velocity[2]);
|
|
45017
|
+
}
|
|
45018
|
+
}
|
|
45019
|
+
}
|
|
45020
|
+
for (const p of particles) {
|
|
45021
|
+
p.velocity[0] += p.force[0] / p.mass * deltaT;
|
|
45022
|
+
p.velocity[1] += p.force[1] / p.mass * deltaT;
|
|
45023
|
+
p.velocity[2] += p.force[2] / p.mass * deltaT;
|
|
45024
|
+
const speed = Math.sqrt(p.velocity[0] ** 2 + p.velocity[1] ** 2 + p.velocity[2] ** 2);
|
|
45025
|
+
if (speed > this.cfg.maxVelocity) {
|
|
45026
|
+
const scale = this.cfg.maxVelocity / speed;
|
|
45027
|
+
p.velocity[0] *= scale;
|
|
45028
|
+
p.velocity[1] *= scale;
|
|
45029
|
+
p.velocity[2] *= scale;
|
|
45030
|
+
}
|
|
45031
|
+
p.position[0] += p.velocity[0] * deltaT;
|
|
45032
|
+
p.position[1] += p.velocity[1] * deltaT;
|
|
45033
|
+
p.position[2] += p.velocity[2] * deltaT;
|
|
45034
|
+
}
|
|
45035
|
+
for (const p of particles) {
|
|
45036
|
+
this.applyBoundaries(p);
|
|
45037
|
+
}
|
|
45038
|
+
}
|
|
45039
|
+
// ── Density Queries ────────────────────────────────────────────────────
|
|
45040
|
+
getDensityAt(position) {
|
|
45041
|
+
const h = this.cfg.smoothingRadius;
|
|
45042
|
+
let density = 0;
|
|
45043
|
+
for (const p of this.particles.values()) {
|
|
45044
|
+
const r = this.dist(position, p.position);
|
|
45045
|
+
density += p.mass * poly6Kernel(r, h);
|
|
45046
|
+
}
|
|
45047
|
+
return density;
|
|
45048
|
+
}
|
|
45049
|
+
isInsideFluid(position) {
|
|
45050
|
+
return this.getDensityAt(position) > this.cfg.restDensity * 0.5;
|
|
45051
|
+
}
|
|
45052
|
+
// ── Statistics ─────────────────────────────────────────────────────────
|
|
45053
|
+
getKineticEnergy() {
|
|
45054
|
+
let energy = 0;
|
|
45055
|
+
for (const p of this.particles.values()) {
|
|
45056
|
+
energy += 0.5 * p.mass * (p.velocity[0] ** 2 + p.velocity[1] ** 2 + p.velocity[2] ** 2);
|
|
45057
|
+
}
|
|
45058
|
+
return energy;
|
|
45059
|
+
}
|
|
45060
|
+
getAverageDensity() {
|
|
45061
|
+
if (this.particles.size === 0) return 0;
|
|
45062
|
+
let total = 0;
|
|
45063
|
+
for (const p of this.particles.values()) total += p.density;
|
|
45064
|
+
return total / this.particles.size;
|
|
45065
|
+
}
|
|
45066
|
+
reset() {
|
|
45067
|
+
this.particles.clear();
|
|
45068
|
+
this.spatialHash.clear();
|
|
45069
|
+
this.boundaries.length = 0;
|
|
45070
|
+
this.nextId = 0;
|
|
45071
|
+
}
|
|
45072
|
+
// ── Private Helpers ────────────────────────────────────────────────────
|
|
45073
|
+
dist(a, b) {
|
|
45074
|
+
return Math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 + (a[2] - b[2]) ** 2);
|
|
45075
|
+
}
|
|
45076
|
+
applyBoundaries(p) {
|
|
45077
|
+
const pr = this.cfg.particleRadius;
|
|
45078
|
+
for (const b of this.boundaries) {
|
|
45079
|
+
if (b.type === "plane") {
|
|
45080
|
+
const dx = p.position[0] - b.position[0];
|
|
45081
|
+
const dy = p.position[1] - b.position[1];
|
|
45082
|
+
const dz = p.position[2] - b.position[2];
|
|
45083
|
+
const d = dx * b.normal[0] + dy * b.normal[1] + dz * b.normal[2];
|
|
45084
|
+
if (d < pr) {
|
|
45085
|
+
p.position[0] += b.normal[0] * (pr - d);
|
|
45086
|
+
p.position[1] += b.normal[1] * (pr - d);
|
|
45087
|
+
p.position[2] += b.normal[2] * (pr - d);
|
|
45088
|
+
const vn = p.velocity[0] * b.normal[0] + p.velocity[1] * b.normal[1] + p.velocity[2] * b.normal[2];
|
|
45089
|
+
if (vn < 0) {
|
|
45090
|
+
p.velocity[0] -= (1 + b.restitution) * vn * b.normal[0];
|
|
45091
|
+
p.velocity[1] -= (1 + b.restitution) * vn * b.normal[1];
|
|
45092
|
+
p.velocity[2] -= (1 + b.restitution) * vn * b.normal[2];
|
|
45093
|
+
}
|
|
45094
|
+
}
|
|
45095
|
+
} else if (b.type === "sphere") {
|
|
45096
|
+
const dx = p.position[0] - b.position[0];
|
|
45097
|
+
const dy = p.position[1] - b.position[1];
|
|
45098
|
+
const dz = p.position[2] - b.position[2];
|
|
45099
|
+
const dist = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
45100
|
+
const maxDist = b.radius - pr;
|
|
45101
|
+
if (dist > maxDist && dist > 1e-6) {
|
|
45102
|
+
const nx = dx / dist;
|
|
45103
|
+
const ny = dy / dist;
|
|
45104
|
+
const nz = dz / dist;
|
|
45105
|
+
p.position[0] = b.position[0] + nx * maxDist;
|
|
45106
|
+
p.position[1] = b.position[1] + ny * maxDist;
|
|
45107
|
+
p.position[2] = b.position[2] + nz * maxDist;
|
|
45108
|
+
const vn = p.velocity[0] * nx + p.velocity[1] * ny + p.velocity[2] * nz;
|
|
45109
|
+
if (vn > 0) {
|
|
45110
|
+
p.velocity[0] -= (1 + b.restitution) * vn * nx;
|
|
45111
|
+
p.velocity[1] -= (1 + b.restitution) * vn * ny;
|
|
45112
|
+
p.velocity[2] -= (1 + b.restitution) * vn * nz;
|
|
45113
|
+
}
|
|
45114
|
+
}
|
|
45115
|
+
} else if (b.type === "box") {
|
|
45116
|
+
const halfX = b.size[0] / 2;
|
|
45117
|
+
const halfY = b.size[1] / 2;
|
|
45118
|
+
const halfZ = b.size[2] / 2;
|
|
45119
|
+
const limit = pr;
|
|
45120
|
+
if (p.position[0] > b.position[0] + halfX - limit) {
|
|
45121
|
+
p.position[0] = b.position[0] + halfX - limit;
|
|
45122
|
+
p.velocity[0] *= -b.restitution;
|
|
45123
|
+
} else if (p.position[0] < b.position[0] - halfX + limit) {
|
|
45124
|
+
p.position[0] = b.position[0] - halfX + limit;
|
|
45125
|
+
p.velocity[0] *= -b.restitution;
|
|
45126
|
+
}
|
|
45127
|
+
if (p.position[1] > b.position[1] + halfY - limit) {
|
|
45128
|
+
p.position[1] = b.position[1] + halfY - limit;
|
|
45129
|
+
p.velocity[1] *= -b.restitution;
|
|
45130
|
+
} else if (p.position[1] < b.position[1] - halfY + limit) {
|
|
45131
|
+
p.position[1] = b.position[1] - halfY + limit;
|
|
45132
|
+
p.velocity[1] *= -b.restitution;
|
|
45133
|
+
}
|
|
45134
|
+
if (p.position[2] > b.position[2] + halfZ - limit) {
|
|
45135
|
+
p.position[2] = b.position[2] + halfZ - limit;
|
|
45136
|
+
p.velocity[2] *= -b.restitution;
|
|
45137
|
+
} else if (p.position[2] < b.position[2] - halfZ + limit) {
|
|
45138
|
+
p.position[2] = b.position[2] - halfZ + limit;
|
|
45139
|
+
p.velocity[2] *= -b.restitution;
|
|
45140
|
+
}
|
|
45141
|
+
}
|
|
45142
|
+
}
|
|
45143
|
+
}
|
|
45144
|
+
};
|
|
45145
|
+
var fluidSimulationHandler = {
|
|
45146
|
+
name: "fluid_simulation",
|
|
45147
|
+
defaultConfig: {},
|
|
45148
|
+
onAttach(node, config, ctx) {
|
|
45149
|
+
const instance = new FluidSimulationSystem(config);
|
|
45150
|
+
node.__fluid_simulation_instance = instance;
|
|
45151
|
+
ctx.emit("fluid_simulation_attached", { node, config });
|
|
45152
|
+
},
|
|
45153
|
+
onDetach(node, _config, ctx) {
|
|
45154
|
+
const instance = node.__fluid_simulation_instance;
|
|
45155
|
+
if (instance) {
|
|
45156
|
+
if (typeof instance.onDetach === "function") instance.onDetach(node, ctx);
|
|
45157
|
+
else if (typeof instance.dispose === "function") instance.dispose();
|
|
45158
|
+
else if (typeof instance.cleanup === "function") instance.cleanup();
|
|
45159
|
+
}
|
|
45160
|
+
ctx.emit("fluid_simulation_detached", { node });
|
|
45161
|
+
delete node.__fluid_simulation_instance;
|
|
45162
|
+
},
|
|
45163
|
+
onEvent(node, _config, ctx, event) {
|
|
45164
|
+
const instance = node.__fluid_simulation_instance;
|
|
45165
|
+
if (!instance) return;
|
|
45166
|
+
if (typeof instance.onEvent === "function") instance.onEvent(event);
|
|
45167
|
+
else if (typeof instance.emit === "function" && event.type) instance.emit(event);
|
|
45168
|
+
if (event.type === "fluid_simulation_configure" && event.payload) {
|
|
45169
|
+
Object.assign(instance, event.payload);
|
|
45170
|
+
ctx.emit("fluid_simulation_configured", { node });
|
|
45171
|
+
}
|
|
45172
|
+
},
|
|
45173
|
+
onUpdate(node, _config, ctx, dt) {
|
|
45174
|
+
const instance = node.__fluid_simulation_instance;
|
|
45175
|
+
if (!instance) return;
|
|
45176
|
+
if (typeof instance.onUpdate === "function") instance.onUpdate(node, ctx, dt);
|
|
45177
|
+
else if (typeof instance.step === "function") instance.step(dt);
|
|
45178
|
+
}
|
|
45179
|
+
};
|
|
45180
|
+
|
|
44491
45181
|
// src/traits/GranularMaterialTrait.ts
|
|
44492
45182
|
function toVec3(v) {
|
|
44493
45183
|
if (Array.isArray(v)) {
|
|
@@ -53788,200 +54478,6 @@ var httpClientHandler = {
|
|
|
53788
54478
|
}
|
|
53789
54479
|
};
|
|
53790
54480
|
|
|
53791
|
-
// src/traits/RetryTrait.ts
|
|
53792
|
-
function computeDelay(config, attempt) {
|
|
53793
|
-
let delay;
|
|
53794
|
-
switch (config.backoff) {
|
|
53795
|
-
case "exponential":
|
|
53796
|
-
delay = config.base_delay_ms * Math.pow(2, attempt);
|
|
53797
|
-
break;
|
|
53798
|
-
case "linear":
|
|
53799
|
-
delay = config.base_delay_ms * (attempt + 1);
|
|
53800
|
-
break;
|
|
53801
|
-
case "constant":
|
|
53802
|
-
default:
|
|
53803
|
-
delay = config.base_delay_ms;
|
|
53804
|
-
break;
|
|
53805
|
-
}
|
|
53806
|
-
delay = Math.min(delay, config.max_delay_ms);
|
|
53807
|
-
if (config.jitter > 0) {
|
|
53808
|
-
const jitterAmount = delay * config.jitter;
|
|
53809
|
-
delay += Math.random() * jitterAmount * 2 - jitterAmount;
|
|
53810
|
-
}
|
|
53811
|
-
return Math.max(0, Math.round(delay));
|
|
53812
|
-
}
|
|
53813
|
-
var retryHandler = {
|
|
53814
|
-
name: "retry",
|
|
53815
|
-
defaultConfig: {
|
|
53816
|
-
max_retries: 3,
|
|
53817
|
-
base_delay_ms: 1e3,
|
|
53818
|
-
max_delay_ms: 3e4,
|
|
53819
|
-
backoff: "exponential",
|
|
53820
|
-
jitter: 0.1,
|
|
53821
|
-
circuit_threshold: 5,
|
|
53822
|
-
circuit_reset_ms: 6e4
|
|
53823
|
-
},
|
|
53824
|
-
onAttach(node, _config, _context) {
|
|
53825
|
-
const state = {
|
|
53826
|
-
circuit: "closed",
|
|
53827
|
-
consecutiveFailures: 0,
|
|
53828
|
-
circuitOpenedAt: 0,
|
|
53829
|
-
totalAttempts: 0,
|
|
53830
|
-
totalSuccesses: 0,
|
|
53831
|
-
totalFailures: 0,
|
|
53832
|
-
pendingActions: /* @__PURE__ */ new Map(),
|
|
53833
|
-
actionCounter: 0
|
|
53834
|
-
};
|
|
53835
|
-
node.__retryState = state;
|
|
53836
|
-
},
|
|
53837
|
-
onDetach(node, _config, _context) {
|
|
53838
|
-
delete node.__retryState;
|
|
53839
|
-
},
|
|
53840
|
-
onUpdate(node, config, context, _delta) {
|
|
53841
|
-
const state = node.__retryState;
|
|
53842
|
-
if (!state) return;
|
|
53843
|
-
if (state.circuit === "open") {
|
|
53844
|
-
const elapsed = Date.now() - state.circuitOpenedAt;
|
|
53845
|
-
if (elapsed >= config.circuit_reset_ms) {
|
|
53846
|
-
state.circuit = "half-open";
|
|
53847
|
-
context.emit?.("retry:circuit_half", {
|
|
53848
|
-
testAttempt: state.totalAttempts + 1
|
|
53849
|
-
});
|
|
53850
|
-
}
|
|
53851
|
-
}
|
|
53852
|
-
},
|
|
53853
|
-
onEvent(node, config, context, event) {
|
|
53854
|
-
const state = node.__retryState;
|
|
53855
|
-
if (!state) return;
|
|
53856
|
-
const eventType = typeof event === "string" ? event : event.type;
|
|
53857
|
-
const payload = extractPayload(event);
|
|
53858
|
-
switch (eventType) {
|
|
53859
|
-
case "retry:execute": {
|
|
53860
|
-
const actionName = payload.action;
|
|
53861
|
-
if (!actionName) break;
|
|
53862
|
-
if (state.circuit === "open") {
|
|
53863
|
-
context.emit?.("retry:failure", {
|
|
53864
|
-
actionName,
|
|
53865
|
-
attempt: 0,
|
|
53866
|
-
error: "Circuit breaker is OPEN"
|
|
53867
|
-
});
|
|
53868
|
-
break;
|
|
53869
|
-
}
|
|
53870
|
-
const retryId = `retry_${state.actionCounter++}`;
|
|
53871
|
-
state.pendingActions.set(retryId, {
|
|
53872
|
-
actionName,
|
|
53873
|
-
attempt: 0,
|
|
53874
|
-
startedAt: Date.now()
|
|
53875
|
-
});
|
|
53876
|
-
state.totalAttempts++;
|
|
53877
|
-
context.emit?.("retry:attempt", {
|
|
53878
|
-
retryId,
|
|
53879
|
-
actionName,
|
|
53880
|
-
attempt: 0,
|
|
53881
|
-
maxRetries: config.max_retries
|
|
53882
|
-
});
|
|
53883
|
-
context.emit?.(actionName, {
|
|
53884
|
-
...payload.params,
|
|
53885
|
-
__retryId: retryId
|
|
53886
|
-
});
|
|
53887
|
-
break;
|
|
53888
|
-
}
|
|
53889
|
-
case "retry:action_result": {
|
|
53890
|
-
const retryId = payload.retryId;
|
|
53891
|
-
const success = payload.success;
|
|
53892
|
-
const error = payload.error;
|
|
53893
|
-
const pending = state.pendingActions.get(retryId);
|
|
53894
|
-
if (!pending) break;
|
|
53895
|
-
if (success) {
|
|
53896
|
-
state.totalSuccesses++;
|
|
53897
|
-
state.consecutiveFailures = 0;
|
|
53898
|
-
state.pendingActions.delete(retryId);
|
|
53899
|
-
if (state.circuit === "half-open") {
|
|
53900
|
-
state.circuit = "closed";
|
|
53901
|
-
context.emit?.("retry:circuit_close", {
|
|
53902
|
-
recoveredAfterMs: Date.now() - state.circuitOpenedAt
|
|
53903
|
-
});
|
|
53904
|
-
}
|
|
53905
|
-
context.emit?.("retry:success", {
|
|
53906
|
-
actionName: pending.actionName,
|
|
53907
|
-
attempt: pending.attempt,
|
|
53908
|
-
elapsed: Date.now() - pending.startedAt
|
|
53909
|
-
});
|
|
53910
|
-
} else {
|
|
53911
|
-
state.totalFailures++;
|
|
53912
|
-
state.consecutiveFailures++;
|
|
53913
|
-
pending.attempt++;
|
|
53914
|
-
context.emit?.("retry:failure", {
|
|
53915
|
-
actionName: pending.actionName,
|
|
53916
|
-
attempt: pending.attempt,
|
|
53917
|
-
error: error ?? "unknown"
|
|
53918
|
-
});
|
|
53919
|
-
if (state.consecutiveFailures >= config.circuit_threshold) {
|
|
53920
|
-
state.circuit = "open";
|
|
53921
|
-
state.circuitOpenedAt = Date.now();
|
|
53922
|
-
state.pendingActions.delete(retryId);
|
|
53923
|
-
context.emit?.("retry:circuit_open", {
|
|
53924
|
-
consecutiveFailures: state.consecutiveFailures,
|
|
53925
|
-
resetMs: config.circuit_reset_ms
|
|
53926
|
-
});
|
|
53927
|
-
break;
|
|
53928
|
-
}
|
|
53929
|
-
if (state.circuit === "half-open") {
|
|
53930
|
-
state.circuit = "open";
|
|
53931
|
-
state.circuitOpenedAt = Date.now();
|
|
53932
|
-
state.pendingActions.delete(retryId);
|
|
53933
|
-
context.emit?.("retry:circuit_open", {
|
|
53934
|
-
consecutiveFailures: state.consecutiveFailures,
|
|
53935
|
-
resetMs: config.circuit_reset_ms
|
|
53936
|
-
});
|
|
53937
|
-
break;
|
|
53938
|
-
}
|
|
53939
|
-
if (pending.attempt > config.max_retries) {
|
|
53940
|
-
state.pendingActions.delete(retryId);
|
|
53941
|
-
context.emit?.("retry:exhausted", {
|
|
53942
|
-
actionName: pending.actionName,
|
|
53943
|
-
totalAttempts: pending.attempt
|
|
53944
|
-
});
|
|
53945
|
-
} else {
|
|
53946
|
-
const delay = computeDelay(config, pending.attempt - 1);
|
|
53947
|
-
state.totalAttempts++;
|
|
53948
|
-
setTimeout(() => {
|
|
53949
|
-
if (!node.__retryState) return;
|
|
53950
|
-
context.emit?.("retry:attempt", {
|
|
53951
|
-
retryId,
|
|
53952
|
-
actionName: pending.actionName,
|
|
53953
|
-
attempt: pending.attempt,
|
|
53954
|
-
maxRetries: config.max_retries
|
|
53955
|
-
});
|
|
53956
|
-
context.emit?.(pending.actionName, {
|
|
53957
|
-
__retryId: retryId
|
|
53958
|
-
});
|
|
53959
|
-
}, delay);
|
|
53960
|
-
}
|
|
53961
|
-
}
|
|
53962
|
-
break;
|
|
53963
|
-
}
|
|
53964
|
-
case "retry:reset_circuit": {
|
|
53965
|
-
state.circuit = "closed";
|
|
53966
|
-
state.consecutiveFailures = 0;
|
|
53967
|
-
context.emit?.("retry:circuit_close", { recoveredAfterMs: 0 });
|
|
53968
|
-
break;
|
|
53969
|
-
}
|
|
53970
|
-
case "retry:get_status": {
|
|
53971
|
-
context.emit?.("retry:status", {
|
|
53972
|
-
circuit: state.circuit,
|
|
53973
|
-
consecutiveFailures: state.consecutiveFailures,
|
|
53974
|
-
totalAttempts: state.totalAttempts,
|
|
53975
|
-
totalSuccesses: state.totalSuccesses,
|
|
53976
|
-
totalFailures: state.totalFailures,
|
|
53977
|
-
pending: state.pendingActions.size
|
|
53978
|
-
});
|
|
53979
|
-
break;
|
|
53980
|
-
}
|
|
53981
|
-
}
|
|
53982
|
-
}
|
|
53983
|
-
};
|
|
53984
|
-
|
|
53985
54481
|
// src/traits/DatabaseTrait.ts
|
|
53986
54482
|
var databaseHandler = {
|
|
53987
54483
|
name: "database",
|
|
@@ -54083,110 +54579,6 @@ var databaseHandler = {
|
|
|
54083
54579
|
}
|
|
54084
54580
|
};
|
|
54085
54581
|
|
|
54086
|
-
// src/traits/CacheTrait.ts
|
|
54087
|
-
var cacheHandler = {
|
|
54088
|
-
name: "cache",
|
|
54089
|
-
defaultConfig: {
|
|
54090
|
-
max_size: 1e3,
|
|
54091
|
-
default_ttl_ms: 6e4,
|
|
54092
|
-
eviction_policy: "lru"
|
|
54093
|
-
},
|
|
54094
|
-
onAttach(node, _config, _context) {
|
|
54095
|
-
node.__cacheState = {
|
|
54096
|
-
entries: /* @__PURE__ */ new Map(),
|
|
54097
|
-
hits: 0,
|
|
54098
|
-
misses: 0,
|
|
54099
|
-
evictions: 0
|
|
54100
|
-
};
|
|
54101
|
-
},
|
|
54102
|
-
onDetach(node) {
|
|
54103
|
-
delete node.__cacheState;
|
|
54104
|
-
},
|
|
54105
|
-
onUpdate(node, config, _context, _delta) {
|
|
54106
|
-
const state = node.__cacheState;
|
|
54107
|
-
if (!state) return;
|
|
54108
|
-
const now = Date.now();
|
|
54109
|
-
for (const [key, entry] of state.entries) {
|
|
54110
|
-
if (entry.expiresAt > 0 && now >= entry.expiresAt) {
|
|
54111
|
-
state.entries.delete(key);
|
|
54112
|
-
state.evictions++;
|
|
54113
|
-
}
|
|
54114
|
-
}
|
|
54115
|
-
},
|
|
54116
|
-
onEvent(node, config, context, event) {
|
|
54117
|
-
const state = node.__cacheState;
|
|
54118
|
-
if (!state) return;
|
|
54119
|
-
const eventType = typeof event === "string" ? event : event.type;
|
|
54120
|
-
switch (eventType) {
|
|
54121
|
-
case "cache:set": {
|
|
54122
|
-
const key = event.key;
|
|
54123
|
-
if (!key) break;
|
|
54124
|
-
const ttl = event.ttl ?? config.default_ttl_ms;
|
|
54125
|
-
if (state.entries.size >= config.max_size && !state.entries.has(key)) {
|
|
54126
|
-
evictOne(state, config, context);
|
|
54127
|
-
}
|
|
54128
|
-
const now = Date.now();
|
|
54129
|
-
state.entries.set(key, {
|
|
54130
|
-
value: event.value,
|
|
54131
|
-
expiresAt: ttl > 0 ? now + ttl : 0,
|
|
54132
|
-
accessedAt: now,
|
|
54133
|
-
createdAt: now
|
|
54134
|
-
});
|
|
54135
|
-
break;
|
|
54136
|
-
}
|
|
54137
|
-
case "cache:get": {
|
|
54138
|
-
const key = event.key;
|
|
54139
|
-
if (!key) break;
|
|
54140
|
-
const entry = state.entries.get(key);
|
|
54141
|
-
if (entry && (entry.expiresAt === 0 || Date.now() < entry.expiresAt)) {
|
|
54142
|
-
state.hits++;
|
|
54143
|
-
entry.accessedAt = Date.now();
|
|
54144
|
-
context.emit?.("cache:result", { key, value: entry.value, hit: true });
|
|
54145
|
-
} else {
|
|
54146
|
-
state.misses++;
|
|
54147
|
-
if (entry) state.entries.delete(key);
|
|
54148
|
-
context.emit?.("cache:result", { key, value: void 0, hit: false });
|
|
54149
|
-
}
|
|
54150
|
-
break;
|
|
54151
|
-
}
|
|
54152
|
-
case "cache:invalidate": {
|
|
54153
|
-
const key = event.key;
|
|
54154
|
-
if (key) state.entries.delete(key);
|
|
54155
|
-
break;
|
|
54156
|
-
}
|
|
54157
|
-
case "cache:clear": {
|
|
54158
|
-
state.entries.clear();
|
|
54159
|
-
break;
|
|
54160
|
-
}
|
|
54161
|
-
case "cache:get_stats": {
|
|
54162
|
-
context.emit?.("cache:stats", {
|
|
54163
|
-
hits: state.hits,
|
|
54164
|
-
misses: state.misses,
|
|
54165
|
-
size: state.entries.size,
|
|
54166
|
-
evictions: state.evictions,
|
|
54167
|
-
hitRate: state.hits + state.misses > 0 ? state.hits / (state.hits + state.misses) : 0
|
|
54168
|
-
});
|
|
54169
|
-
break;
|
|
54170
|
-
}
|
|
54171
|
-
}
|
|
54172
|
-
}
|
|
54173
|
-
};
|
|
54174
|
-
function evictOne(state, config, context) {
|
|
54175
|
-
if (state.entries.size === 0) return;
|
|
54176
|
-
let oldest = null;
|
|
54177
|
-
for (const [key, entry] of state.entries) {
|
|
54178
|
-
const time = config.eviction_policy === "lru" ? entry.accessedAt : entry.createdAt;
|
|
54179
|
-
if (!oldest || time < oldest.time) {
|
|
54180
|
-
oldest = { key, time };
|
|
54181
|
-
}
|
|
54182
|
-
}
|
|
54183
|
-
if (oldest) {
|
|
54184
|
-
state.entries.delete(oldest.key);
|
|
54185
|
-
state.evictions++;
|
|
54186
|
-
context.emit?.("cache:evict", { key: oldest.key, reason: config.eviction_policy });
|
|
54187
|
-
}
|
|
54188
|
-
}
|
|
54189
|
-
|
|
54190
54582
|
// src/traits/StreamTrait.ts
|
|
54191
54583
|
var streamHandler = {
|
|
54192
54584
|
name: "stream",
|
|
@@ -55008,6 +55400,19 @@ var discordHandler = {
|
|
|
55008
55400
|
}
|
|
55009
55401
|
};
|
|
55010
55402
|
|
|
55403
|
+
// src/traits/unwired.ts
|
|
55404
|
+
function emitUnwired(context, errorEvent, detail) {
|
|
55405
|
+
const payload = {
|
|
55406
|
+
ok: false,
|
|
55407
|
+
error: "not_implemented",
|
|
55408
|
+
capability: detail.capability,
|
|
55409
|
+
reason: "trait declared but its backend is not wired \u2014 no external effect was performed"
|
|
55410
|
+
};
|
|
55411
|
+
if (detail.wiring) payload.wiring = detail.wiring;
|
|
55412
|
+
if (detail.requested) payload.requested = detail.requested;
|
|
55413
|
+
context.emit?.(errorEvent, payload);
|
|
55414
|
+
}
|
|
55415
|
+
|
|
55011
55416
|
// src/traits/MqttPubTrait.ts
|
|
55012
55417
|
var mqttPubHandler = {
|
|
55013
55418
|
name: "mqtt_pub",
|
|
@@ -55025,10 +55430,10 @@ var mqttPubHandler = {
|
|
|
55025
55430
|
if (!state) return;
|
|
55026
55431
|
if ((typeof event === "string" ? event : event.type) === "mqtt:publish") {
|
|
55027
55432
|
state.published++;
|
|
55028
|
-
context
|
|
55029
|
-
|
|
55030
|
-
|
|
55031
|
-
qos: event.qos ?? config.default_qos
|
|
55433
|
+
emitUnwired(context, "mqtt:error", {
|
|
55434
|
+
capability: "mqtt",
|
|
55435
|
+
wiring: "mqtt npm client + persistent broker connection + QoS 1/2 PUBACK",
|
|
55436
|
+
requested: { topic: event.topic, qos: event.qos ?? config.default_qos }
|
|
55032
55437
|
});
|
|
55033
55438
|
}
|
|
55034
55439
|
}
|
|
@@ -56111,11 +56516,10 @@ var stripeHandler = {
|
|
|
56111
56516
|
if (t === "stripe:charge") {
|
|
56112
56517
|
state.charges++;
|
|
56113
56518
|
state.totalAmount += event.amount ?? 0;
|
|
56114
|
-
context
|
|
56115
|
-
|
|
56116
|
-
|
|
56117
|
-
currency: config.currency,
|
|
56118
|
-
customerId: event.customerId
|
|
56519
|
+
emitUnwired(context, "stripe:error", {
|
|
56520
|
+
capability: "stripe",
|
|
56521
|
+
wiring: "Stripe SDK + vault secret_key + per-charge idempotency key",
|
|
56522
|
+
requested: { amount: event.amount, currency: config.currency, customerId: event.customerId }
|
|
56119
56523
|
});
|
|
56120
56524
|
} else if (t === "stripe:get_stats") {
|
|
56121
56525
|
context.emit?.("stripe:stats", {
|
|
@@ -57408,10 +57812,10 @@ var s3UploadHandler = {
|
|
|
57408
57812
|
if ((typeof event === "string" ? event : event.type) === "s3:upload") {
|
|
57409
57813
|
state.uploads++;
|
|
57410
57814
|
state.totalBytes += event.size ?? 0;
|
|
57411
|
-
context
|
|
57412
|
-
|
|
57413
|
-
|
|
57414
|
-
|
|
57815
|
+
emitUnwired(context, "s3:error", {
|
|
57816
|
+
capability: "s3",
|
|
57817
|
+
wiring: "@aws-sdk/client-s3 (or MinIO/R2) + credentials + multipart for large files",
|
|
57818
|
+
requested: { key: event.key, bucket: event.bucket ?? config.bucket }
|
|
57415
57819
|
});
|
|
57416
57820
|
}
|
|
57417
57821
|
}
|
|
@@ -57610,11 +58014,10 @@ var restEndpointHandler = {
|
|
|
57610
58014
|
break;
|
|
57611
58015
|
case "rest:request":
|
|
57612
58016
|
state.requests++;
|
|
57613
|
-
context
|
|
57614
|
-
|
|
57615
|
-
|
|
57616
|
-
|
|
57617
|
-
requestCount: state.requests
|
|
58017
|
+
emitUnwired(context, "rest:error", {
|
|
58018
|
+
capability: "rest_endpoint",
|
|
58019
|
+
wiring: "express/fastify route dispatch to the registered handler",
|
|
58020
|
+
requested: { method: event.method, path: event.path }
|
|
57618
58021
|
});
|
|
57619
58022
|
break;
|
|
57620
58023
|
}
|
|
@@ -59987,333 +60390,6 @@ var gotchaHandler = {
|
|
|
59987
60390
|
}
|
|
59988
60391
|
};
|
|
59989
60392
|
|
|
59990
|
-
// src/traits/FluidSimulationTrait.ts
|
|
59991
|
-
function poly6Kernel(r, h) {
|
|
59992
|
-
if (r < 0 || r > h) return 0;
|
|
59993
|
-
const coeff = 315 / (64 * Math.PI * h ** 9);
|
|
59994
|
-
return coeff * (h * h - r * r) ** 3;
|
|
59995
|
-
}
|
|
59996
|
-
function spikyKernelGradient(dx, dy, dz, h) {
|
|
59997
|
-
const r = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
59998
|
-
if (r > h || r < 1e-5) return [0, 0, 0];
|
|
59999
|
-
const coeff = -45 / (Math.PI * h ** 6) * (h - r) ** 2;
|
|
60000
|
-
return [coeff * (dx / r), coeff * (dy / r), coeff * (dz / r)];
|
|
60001
|
-
}
|
|
60002
|
-
function viscosityKernelLaplacian(r, h) {
|
|
60003
|
-
if (r < 0 || r > h) return 0;
|
|
60004
|
-
return 45 / (Math.PI * h ** 6) * (h - r);
|
|
60005
|
-
}
|
|
60006
|
-
var SpatialHash = class {
|
|
60007
|
-
constructor(cellSize) {
|
|
60008
|
-
this.cells = /* @__PURE__ */ new Map();
|
|
60009
|
-
this.cellSize = cellSize;
|
|
60010
|
-
}
|
|
60011
|
-
key(x, y, z) {
|
|
60012
|
-
const cx = Math.floor(x / this.cellSize);
|
|
60013
|
-
const cy = Math.floor(y / this.cellSize);
|
|
60014
|
-
const cz = Math.floor(z / this.cellSize);
|
|
60015
|
-
return `${cx},${cy},${cz}`;
|
|
60016
|
-
}
|
|
60017
|
-
insert(id, pos) {
|
|
60018
|
-
const k = this.key(pos[0], pos[1], pos[2]);
|
|
60019
|
-
if (!this.cells.has(k)) this.cells.set(k, []);
|
|
60020
|
-
this.cells.get(k).push(id);
|
|
60021
|
-
}
|
|
60022
|
-
getNeighbors(pos) {
|
|
60023
|
-
const cx = Math.floor(pos[0] / this.cellSize);
|
|
60024
|
-
const cy = Math.floor(pos[1] / this.cellSize);
|
|
60025
|
-
const cz = Math.floor(pos[2] / this.cellSize);
|
|
60026
|
-
const result = [];
|
|
60027
|
-
for (let dx = -1; dx <= 1; dx++) {
|
|
60028
|
-
for (let dy = -1; dy <= 1; dy++) {
|
|
60029
|
-
for (let dz = -1; dz <= 1; dz++) {
|
|
60030
|
-
const k = `${cx + dx},${cy + dy},${cz + dz}`;
|
|
60031
|
-
const cell = this.cells.get(k);
|
|
60032
|
-
if (cell) result.push(...cell);
|
|
60033
|
-
}
|
|
60034
|
-
}
|
|
60035
|
-
}
|
|
60036
|
-
return result;
|
|
60037
|
-
}
|
|
60038
|
-
clear() {
|
|
60039
|
-
this.cells.clear();
|
|
60040
|
-
}
|
|
60041
|
-
};
|
|
60042
|
-
var FluidSimulationSystem = class {
|
|
60043
|
-
constructor(config = {}) {
|
|
60044
|
-
this.particles = /* @__PURE__ */ new Map();
|
|
60045
|
-
this.nextId = 0;
|
|
60046
|
-
this.boundaries = [];
|
|
60047
|
-
this.cfg = {
|
|
60048
|
-
restDensity: config.restDensity ?? 1e3,
|
|
60049
|
-
viscosity: config.viscosity ?? 1e-3,
|
|
60050
|
-
gravity: config.gravity ?? [0, -9.81, 0],
|
|
60051
|
-
solverType: config.solverType ?? "sph",
|
|
60052
|
-
timeStep: config.timeStep ?? 0.016,
|
|
60053
|
-
maxVelocity: config.maxVelocity ?? 100,
|
|
60054
|
-
smoothingRadius: config.smoothingRadius ?? 0.04,
|
|
60055
|
-
gridCellSize: config.gridCellSize ?? 0.04,
|
|
60056
|
-
particleRadius: config.particleRadius ?? 0.01,
|
|
60057
|
-
gasConstant: config.gasConstant ?? 8.314,
|
|
60058
|
-
surfaceTension: config.surfaceTension ?? 0.072
|
|
60059
|
-
};
|
|
60060
|
-
this.spatialHash = new SpatialHash(this.cfg.gridCellSize);
|
|
60061
|
-
}
|
|
60062
|
-
// ── Particle Management ────────────────────────────────────────────────
|
|
60063
|
-
addParticle(position, velocity) {
|
|
60064
|
-
const id = this.nextId++;
|
|
60065
|
-
this.particles.set(id, {
|
|
60066
|
-
id,
|
|
60067
|
-
position: [...position],
|
|
60068
|
-
velocity: velocity ? [...velocity] : [0, 0, 0],
|
|
60069
|
-
force: [0, 0, 0],
|
|
60070
|
-
density: this.cfg.restDensity,
|
|
60071
|
-
pressure: 0,
|
|
60072
|
-
mass: 1
|
|
60073
|
-
});
|
|
60074
|
-
return id;
|
|
60075
|
-
}
|
|
60076
|
-
getParticle(id) {
|
|
60077
|
-
return this.particles.get(id);
|
|
60078
|
-
}
|
|
60079
|
-
getParticles() {
|
|
60080
|
-
return Array.from(this.particles.values());
|
|
60081
|
-
}
|
|
60082
|
-
getParticleCount() {
|
|
60083
|
-
return this.particles.size;
|
|
60084
|
-
}
|
|
60085
|
-
removeParticle(id) {
|
|
60086
|
-
return this.particles.delete(id);
|
|
60087
|
-
}
|
|
60088
|
-
clearParticles() {
|
|
60089
|
-
this.particles.clear();
|
|
60090
|
-
this.nextId = 0;
|
|
60091
|
-
}
|
|
60092
|
-
// ── Boundary Management ────────────────────────────────────────────────
|
|
60093
|
-
addBoundary(boundary) {
|
|
60094
|
-
this.boundaries.push(boundary);
|
|
60095
|
-
}
|
|
60096
|
-
getBoundaries() {
|
|
60097
|
-
return [...this.boundaries];
|
|
60098
|
-
}
|
|
60099
|
-
clearBoundaries() {
|
|
60100
|
-
this.boundaries.length = 0;
|
|
60101
|
-
}
|
|
60102
|
-
// ── Configuration ──────────────────────────────────────────────────────
|
|
60103
|
-
getConfig() {
|
|
60104
|
-
return { ...this.cfg };
|
|
60105
|
-
}
|
|
60106
|
-
setConfig(partial) {
|
|
60107
|
-
Object.assign(this.cfg, partial);
|
|
60108
|
-
if (partial.gridCellSize !== void 0) {
|
|
60109
|
-
this.spatialHash = new SpatialHash(this.cfg.gridCellSize);
|
|
60110
|
-
}
|
|
60111
|
-
}
|
|
60112
|
-
// ── Simulation Step ────────────────────────────────────────────────────
|
|
60113
|
-
step(dt) {
|
|
60114
|
-
const h = this.cfg.smoothingRadius;
|
|
60115
|
-
const deltaT = dt ?? this.cfg.timeStep;
|
|
60116
|
-
const particles = Array.from(this.particles.values());
|
|
60117
|
-
this.spatialHash.clear();
|
|
60118
|
-
for (const p of particles) {
|
|
60119
|
-
this.spatialHash.insert(p.id, p.position);
|
|
60120
|
-
}
|
|
60121
|
-
for (const pi of particles) {
|
|
60122
|
-
let density = 0;
|
|
60123
|
-
for (const pj of particles) {
|
|
60124
|
-
const r = this.dist(pi.position, pj.position);
|
|
60125
|
-
density += pj.mass * poly6Kernel(r, h);
|
|
60126
|
-
}
|
|
60127
|
-
pi.density = Math.max(density, this.cfg.restDensity * 0.01);
|
|
60128
|
-
pi.pressure = this.cfg.gasConstant * (pi.density - this.cfg.restDensity);
|
|
60129
|
-
}
|
|
60130
|
-
for (const pi of particles) {
|
|
60131
|
-
pi.force = [
|
|
60132
|
-
this.cfg.gravity[0] * pi.mass,
|
|
60133
|
-
this.cfg.gravity[1] * pi.mass,
|
|
60134
|
-
this.cfg.gravity[2] * pi.mass
|
|
60135
|
-
];
|
|
60136
|
-
for (const pj of particles) {
|
|
60137
|
-
if (pi.id === pj.id) continue;
|
|
60138
|
-
const dx = pi.position[0] - pj.position[0];
|
|
60139
|
-
const dy = pi.position[1] - pj.position[1];
|
|
60140
|
-
const dz = pi.position[2] - pj.position[2];
|
|
60141
|
-
const r = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
60142
|
-
if (r < h && r > 1e-5) {
|
|
60143
|
-
const grad = spikyKernelGradient(dx, dy, dz, h);
|
|
60144
|
-
const pScale = -pj.mass * ((pi.pressure + pj.pressure) / (2 * pj.density));
|
|
60145
|
-
pi.force[0] += pScale * grad[0];
|
|
60146
|
-
pi.force[1] += pScale * grad[1];
|
|
60147
|
-
pi.force[2] += pScale * grad[2];
|
|
60148
|
-
const viscLap = viscosityKernelLaplacian(r, h);
|
|
60149
|
-
const vScale = this.cfg.viscosity * pj.mass * (1 / pj.density) * viscLap;
|
|
60150
|
-
pi.force[0] += vScale * (pj.velocity[0] - pi.velocity[0]);
|
|
60151
|
-
pi.force[1] += vScale * (pj.velocity[1] - pi.velocity[1]);
|
|
60152
|
-
pi.force[2] += vScale * (pj.velocity[2] - pi.velocity[2]);
|
|
60153
|
-
}
|
|
60154
|
-
}
|
|
60155
|
-
}
|
|
60156
|
-
for (const p of particles) {
|
|
60157
|
-
p.velocity[0] += p.force[0] / p.mass * deltaT;
|
|
60158
|
-
p.velocity[1] += p.force[1] / p.mass * deltaT;
|
|
60159
|
-
p.velocity[2] += p.force[2] / p.mass * deltaT;
|
|
60160
|
-
const speed = Math.sqrt(p.velocity[0] ** 2 + p.velocity[1] ** 2 + p.velocity[2] ** 2);
|
|
60161
|
-
if (speed > this.cfg.maxVelocity) {
|
|
60162
|
-
const scale = this.cfg.maxVelocity / speed;
|
|
60163
|
-
p.velocity[0] *= scale;
|
|
60164
|
-
p.velocity[1] *= scale;
|
|
60165
|
-
p.velocity[2] *= scale;
|
|
60166
|
-
}
|
|
60167
|
-
p.position[0] += p.velocity[0] * deltaT;
|
|
60168
|
-
p.position[1] += p.velocity[1] * deltaT;
|
|
60169
|
-
p.position[2] += p.velocity[2] * deltaT;
|
|
60170
|
-
}
|
|
60171
|
-
for (const p of particles) {
|
|
60172
|
-
this.applyBoundaries(p);
|
|
60173
|
-
}
|
|
60174
|
-
}
|
|
60175
|
-
// ── Density Queries ────────────────────────────────────────────────────
|
|
60176
|
-
getDensityAt(position) {
|
|
60177
|
-
const h = this.cfg.smoothingRadius;
|
|
60178
|
-
let density = 0;
|
|
60179
|
-
for (const p of this.particles.values()) {
|
|
60180
|
-
const r = this.dist(position, p.position);
|
|
60181
|
-
density += p.mass * poly6Kernel(r, h);
|
|
60182
|
-
}
|
|
60183
|
-
return density;
|
|
60184
|
-
}
|
|
60185
|
-
isInsideFluid(position) {
|
|
60186
|
-
return this.getDensityAt(position) > this.cfg.restDensity * 0.5;
|
|
60187
|
-
}
|
|
60188
|
-
// ── Statistics ─────────────────────────────────────────────────────────
|
|
60189
|
-
getKineticEnergy() {
|
|
60190
|
-
let energy = 0;
|
|
60191
|
-
for (const p of this.particles.values()) {
|
|
60192
|
-
energy += 0.5 * p.mass * (p.velocity[0] ** 2 + p.velocity[1] ** 2 + p.velocity[2] ** 2);
|
|
60193
|
-
}
|
|
60194
|
-
return energy;
|
|
60195
|
-
}
|
|
60196
|
-
getAverageDensity() {
|
|
60197
|
-
if (this.particles.size === 0) return 0;
|
|
60198
|
-
let total = 0;
|
|
60199
|
-
for (const p of this.particles.values()) total += p.density;
|
|
60200
|
-
return total / this.particles.size;
|
|
60201
|
-
}
|
|
60202
|
-
reset() {
|
|
60203
|
-
this.particles.clear();
|
|
60204
|
-
this.spatialHash.clear();
|
|
60205
|
-
this.boundaries.length = 0;
|
|
60206
|
-
this.nextId = 0;
|
|
60207
|
-
}
|
|
60208
|
-
// ── Private Helpers ────────────────────────────────────────────────────
|
|
60209
|
-
dist(a, b) {
|
|
60210
|
-
return Math.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2 + (a[2] - b[2]) ** 2);
|
|
60211
|
-
}
|
|
60212
|
-
applyBoundaries(p) {
|
|
60213
|
-
const pr = this.cfg.particleRadius;
|
|
60214
|
-
for (const b of this.boundaries) {
|
|
60215
|
-
if (b.type === "plane") {
|
|
60216
|
-
const dx = p.position[0] - b.position[0];
|
|
60217
|
-
const dy = p.position[1] - b.position[1];
|
|
60218
|
-
const dz = p.position[2] - b.position[2];
|
|
60219
|
-
const d = dx * b.normal[0] + dy * b.normal[1] + dz * b.normal[2];
|
|
60220
|
-
if (d < pr) {
|
|
60221
|
-
p.position[0] += b.normal[0] * (pr - d);
|
|
60222
|
-
p.position[1] += b.normal[1] * (pr - d);
|
|
60223
|
-
p.position[2] += b.normal[2] * (pr - d);
|
|
60224
|
-
const vn = p.velocity[0] * b.normal[0] + p.velocity[1] * b.normal[1] + p.velocity[2] * b.normal[2];
|
|
60225
|
-
if (vn < 0) {
|
|
60226
|
-
p.velocity[0] -= (1 + b.restitution) * vn * b.normal[0];
|
|
60227
|
-
p.velocity[1] -= (1 + b.restitution) * vn * b.normal[1];
|
|
60228
|
-
p.velocity[2] -= (1 + b.restitution) * vn * b.normal[2];
|
|
60229
|
-
}
|
|
60230
|
-
}
|
|
60231
|
-
} else if (b.type === "sphere") {
|
|
60232
|
-
const dx = p.position[0] - b.position[0];
|
|
60233
|
-
const dy = p.position[1] - b.position[1];
|
|
60234
|
-
const dz = p.position[2] - b.position[2];
|
|
60235
|
-
const dist = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
60236
|
-
const maxDist = b.radius - pr;
|
|
60237
|
-
if (dist > maxDist && dist > 1e-6) {
|
|
60238
|
-
const nx = dx / dist;
|
|
60239
|
-
const ny = dy / dist;
|
|
60240
|
-
const nz = dz / dist;
|
|
60241
|
-
p.position[0] = b.position[0] + nx * maxDist;
|
|
60242
|
-
p.position[1] = b.position[1] + ny * maxDist;
|
|
60243
|
-
p.position[2] = b.position[2] + nz * maxDist;
|
|
60244
|
-
const vn = p.velocity[0] * nx + p.velocity[1] * ny + p.velocity[2] * nz;
|
|
60245
|
-
if (vn > 0) {
|
|
60246
|
-
p.velocity[0] -= (1 + b.restitution) * vn * nx;
|
|
60247
|
-
p.velocity[1] -= (1 + b.restitution) * vn * ny;
|
|
60248
|
-
p.velocity[2] -= (1 + b.restitution) * vn * nz;
|
|
60249
|
-
}
|
|
60250
|
-
}
|
|
60251
|
-
} else if (b.type === "box") {
|
|
60252
|
-
const halfX = b.size[0] / 2;
|
|
60253
|
-
const halfY = b.size[1] / 2;
|
|
60254
|
-
const halfZ = b.size[2] / 2;
|
|
60255
|
-
const limit = pr;
|
|
60256
|
-
if (p.position[0] > b.position[0] + halfX - limit) {
|
|
60257
|
-
p.position[0] = b.position[0] + halfX - limit;
|
|
60258
|
-
p.velocity[0] *= -b.restitution;
|
|
60259
|
-
} else if (p.position[0] < b.position[0] - halfX + limit) {
|
|
60260
|
-
p.position[0] = b.position[0] - halfX + limit;
|
|
60261
|
-
p.velocity[0] *= -b.restitution;
|
|
60262
|
-
}
|
|
60263
|
-
if (p.position[1] > b.position[1] + halfY - limit) {
|
|
60264
|
-
p.position[1] = b.position[1] + halfY - limit;
|
|
60265
|
-
p.velocity[1] *= -b.restitution;
|
|
60266
|
-
} else if (p.position[1] < b.position[1] - halfY + limit) {
|
|
60267
|
-
p.position[1] = b.position[1] - halfY + limit;
|
|
60268
|
-
p.velocity[1] *= -b.restitution;
|
|
60269
|
-
}
|
|
60270
|
-
if (p.position[2] > b.position[2] + halfZ - limit) {
|
|
60271
|
-
p.position[2] = b.position[2] + halfZ - limit;
|
|
60272
|
-
p.velocity[2] *= -b.restitution;
|
|
60273
|
-
} else if (p.position[2] < b.position[2] - halfZ + limit) {
|
|
60274
|
-
p.position[2] = b.position[2] - halfZ + limit;
|
|
60275
|
-
p.velocity[2] *= -b.restitution;
|
|
60276
|
-
}
|
|
60277
|
-
}
|
|
60278
|
-
}
|
|
60279
|
-
}
|
|
60280
|
-
};
|
|
60281
|
-
var fluidSimulationHandler = {
|
|
60282
|
-
name: "fluid_simulation",
|
|
60283
|
-
defaultConfig: {},
|
|
60284
|
-
onAttach(node, config, ctx) {
|
|
60285
|
-
const instance = new FluidSimulationSystem(config);
|
|
60286
|
-
node.__fluid_simulation_instance = instance;
|
|
60287
|
-
ctx.emit("fluid_simulation_attached", { node, config });
|
|
60288
|
-
},
|
|
60289
|
-
onDetach(node, _config, ctx) {
|
|
60290
|
-
const instance = node.__fluid_simulation_instance;
|
|
60291
|
-
if (instance) {
|
|
60292
|
-
if (typeof instance.onDetach === "function") instance.onDetach(node, ctx);
|
|
60293
|
-
else if (typeof instance.dispose === "function") instance.dispose();
|
|
60294
|
-
else if (typeof instance.cleanup === "function") instance.cleanup();
|
|
60295
|
-
}
|
|
60296
|
-
ctx.emit("fluid_simulation_detached", { node });
|
|
60297
|
-
delete node.__fluid_simulation_instance;
|
|
60298
|
-
},
|
|
60299
|
-
onEvent(node, _config, ctx, event) {
|
|
60300
|
-
const instance = node.__fluid_simulation_instance;
|
|
60301
|
-
if (!instance) return;
|
|
60302
|
-
if (typeof instance.onEvent === "function") instance.onEvent(event);
|
|
60303
|
-
else if (typeof instance.emit === "function" && event.type) instance.emit(event);
|
|
60304
|
-
if (event.type === "fluid_simulation_configure" && event.payload) {
|
|
60305
|
-
Object.assign(instance, event.payload);
|
|
60306
|
-
ctx.emit("fluid_simulation_configured", { node });
|
|
60307
|
-
}
|
|
60308
|
-
},
|
|
60309
|
-
onUpdate(node, _config, ctx, dt) {
|
|
60310
|
-
const instance = node.__fluid_simulation_instance;
|
|
60311
|
-
if (!instance) return;
|
|
60312
|
-
if (typeof instance.onUpdate === "function") instance.onUpdate(node, ctx, dt);
|
|
60313
|
-
else if (typeof instance.step === "function") instance.step(dt);
|
|
60314
|
-
}
|
|
60315
|
-
};
|
|
60316
|
-
|
|
60317
60393
|
// src/traits/VRTraitSystem.ts
|
|
60318
60394
|
function vec3ToTuple(v) {
|
|
60319
60395
|
return v;
|
|
@@ -61137,6 +61213,7 @@ var VRTraitRegistry = class {
|
|
|
61137
61213
|
this.register(provenanceHandler);
|
|
61138
61214
|
this.register(provenanceDensifyHandler);
|
|
61139
61215
|
this.register(evolveProgramHandler);
|
|
61216
|
+
this.register(freezeWhenHandler);
|
|
61140
61217
|
this.register(bodyHandler);
|
|
61141
61218
|
this.register(proactiveHandler);
|
|
61142
61219
|
this.register(eventTraitHandler);
|
|
@@ -61640,6 +61717,6 @@ var VRTraitRegistry = class {
|
|
|
61640
61717
|
};
|
|
61641
61718
|
var vrTraitRegistry = new VRTraitRegistry();
|
|
61642
61719
|
|
|
61643
|
-
export { AIDriverTrait, ALL_CIRCUITS, ARKIT_MOUTH_SHAPES, AnimationTrait, BUILTIN_CIRCUITS, BarretenbergBackend, BehaviorTreeRunner, CARE_ETHICS_TRAIT, CRDTRoomTraitValidationError, CRDT_ROOM_TRAIT_DEFAULTS, CharacterTrait, ComponentType, ConsensusTrait, DEFAULT_ANIMATION_MAP, DEFAULT_AUTONOMY_GUARD_POLICY, DEFAULT_BEHAVIOR_FACT_TTL_ALERT_RULE, DEFAULT_EXPRESSION_PRESETS, DEFAULT_EXTERNAL_TIMEOUT_MS, DEFAULT_FOVEATED_BLEND, DEFAULT_FREQUENCY_BANDS, DEFAULT_REPUTATION_LEDGER_MAX_FACTS, DEFAULT_REPUTATION_LEDGER_TTL_DAYS, DEFAULT_SYNC_FIELD, DEFAULT_TRAIT_CONFIG2 as DEFAULT_TRAIT_CONFIG, DRAFT_DEFAULTS, DRAFT_TRAIT, DialogTrait, DraftManager, ECSWorld, EmotionDirectiveTrait, EnvironmentalAudioSystem, GEM_RESONANCE_ELEMENT_FREQUENCIES, GOAPPlanner, GOLDEN_ANGLE_DEG, HOLOSCRIPT_HUMANOID_BONE_MAP, IKTrait, InteractiveGraphTrait, JobQueuePersistence, JointTrait, LIGHTING_PRESETS, LOCAL_WEBCAM_VIEW_ID, LightingTrait, LipSyncTrait, LobbyTrait, MATERIAL_PRESETS2 as MATERIAL_PRESETS, MAX_EXPERIENCE_LOG_ENTRIES, MaterialTrait, MorphTrait, MultiviewGaussianRendererTrait, NetworkedTrait, OCULUS_VISEME_MAP, PIDControllerTrait, PressableTrait, REFERENCE_SPACE_CHAIN, REFUSED_CARE_OPTIMIZATION_TARGETS, RenderingTrait, RigidbodyTrait, SHADER_CHUNKS, SHADER_PRESETS, SPATIAL_PREDICATE_CIRCUITS, SYNC_PRESETS, SandboxExecutionTrait, ShaderTrait, SlidableTrait, SpatialAwarenessTrait, SyncTierTrait, TIER_DEFAULTS, TriggerTrait, URDFRobotTrait, VRTraitRegistry, VoiceInputTrait, VoiceOutputTrait, VoronoiFractureSystem, WEATHER_PRESETS, aIDriverHandler, abTestHandler, abstain, accessibleHandler, advancedClothHandler, affinityHandler, agentDiscoveryHandler, agentMemoryHandler, agentMovementSystem, agentPortalHandler, aiInpaintingHandler, aiTextureGenHandler, aiUpscalingHandler, ainpcBrainHandler, alertHandler, altTextHandler, ambisonicsHandler, analyticsHandler, analyzeFairnessWindow, anchorHandler, animationConfigFromStateMachine, applyFBXAxisConversion, applyStatModifiers, applyUSDAxisConversion, approve, audioMaterialHandler, audioOcclusionHandler, audioPortalHandler, auditLogHandler, autoRigHandler, autoVote, avatarEmbodimentHandler, behaviorTreeHandler, biofeedbackHandler, blackboardHandler, bloomReactiveHandler, bodyTrackingHandler, bufferHandler, buildBehaviorFactDisclosure, buoyancyHandler, cRDTRoomHandler, careEthicsHandler, chainHandler, characterHandler, choreographyHandler, circuitBreakerHandler, clearLocalLLMNativeBridges, clothHandler, coLocatedHandler, compareSemVer, computeHandler, computePhyllotaxisPosition, computerUseHandler, consensusHandler, consentGateHandler, controlNetHandler, controllerInputHandler, controlnetHandler, createAIDriverTrait, createAnimationTrait, createApprovalRequest, createBaseMainnetAccountingAdapter, createBehaviorFactTtlAlertRule, createCRDTRoomTraitConfig, createCanBusAccountingAdapter, createCareField, createCharacterTrait, createConsensusTrait, createDialogTrait, createEdiX12AccountingAdapter, createEmotionDirectiveTrait, createHl7FhirAccountingAdapter, createIKTrait, createJointTrait, createLightingTrait, createLipSyncTrait, createLobbyTrait, createMaterialTrait, createMorphTrait, createNativeAutoRigPlan, createNetworkedTrait, createRenderingTrait, createRepairLoop, createRigidbodyTrait, createRollbackCheckpoint, createSelectiveDisclosure, createShaderTrait, createSharedSpatialProvider, createSimulatedController, createSpatialAwarenessTrait, createTriggerTrait, createURDFRobotTrait, createVoiceInputTrait, createVoiceOutputTrait, cronHandler, dataBindingHandler, deriveBloomReactiveOutput, deriveFairnessRisk, deriveLotusCenterPhase, deriveLotusGardenerSchedule, deriveLotusGenesisGate, deriveLotusGenesisSeed, deriveLotusPetalVisual, deriveLotusRootEmissive, deriveLotusStalkPosture, deriveWalkableNavmesh, destructionHandler, deviceProfiles, dialogHandler, dialogueHandler, diffusionRealtimeHandler, digitalTwinHandler, dropTableHandler, economyPrimitivesHandler, effectiveWeight, embeddingSearchHandler, emissiveAt, emotionDirectiveHandler, emotionHandler, emotionalVoiceHandler, encounterHandler, environmentalAudioHandler, evaluateAction, evaluateAutonomyGuard, evaluateCareEthicsTurn, evolveProgramHandler, extractLotusGenesisAnchorHash, extractPayload, eyeTrackedHandler, faceTrackingHandler, factionHandler, fairnessMonitorHandler, fbxHandler, feedbackLoopHandler, findReachablePath, findWalkableNodeAt, flowFieldHandler, fluidHandler, forgetPolicyHandler, formationControlHandler, gardenerPulseJitter, gaussianSplatHandler, gazeFocusAnalyticsHandler, gemResonanceHandler, generatedMeshHandler, geospatialAnchorHandler, geospatialEnvHandler, gestureHandler, getActiveSessions, getAgentId, getAirAbsorption, getAuditLog, getCachedThingDescription, getCapabilities, getCareEthicsState, getEventHistory, getFBXAnimationStacks, getFBXBoneNames, getFBXMorphTargets, getFBXState, getGLTFAnimations, getGLTFMorphTargets, getGLTFState, getMQTTSinkClient, getMQTTSinkState, getMQTTSourceClient, getMQTTSourceState, getMyProposals, getMyVotes, getNegotiationMethods, getPredicateCircuitId, getSession, getUSDActiveVariant, getUSDAnimation, getUSDBlendShapes, getUSDJointNames, getUSDState, getUSDVariantSets, getWoTThingState, gltfHandler, goalOrientedHandler, gpuBufferHandler, gpuParticleHandler, gpuPhysicsHandler, granularMaterialHandler, handMenuHandler, handMeshAIHandler, handTrackingHandler, hapticCueHandler, hapticHandler, hasMQTTSinkTrait, hasMQTTSourceTrait, hasVoted, hasWoTThingTrait, hashGardenerSeed, hashSeed, headTrackedAudioHandler, heatmap3dHandler, highContrastHandler, hitlHandler, hrtfHandler, iKHandler, initiate, invalidateThingDescription, isConsentGranted, isFBXLoaded, isGLTFLoaded, isInSession, isMQTTSinkConnected, isMQTTSourceConnected, isNativeLLMBackend, isReservedPaperId, isUSDLoaded, isUSDZ, isWalkableAt, jointHandler, layerAwareHandler, leave, lightEstimationHandler, lightingHandler, lipSyncHandler, llmAgentHandler, lobbyHandler, localLLMHandler, locomotionHandler, lodSystem, lotusCenterHandler, lotusGardenerHandler, lotusGenesisTriggerHandler, lotusPetalHandler, lotusRootHandler, lotusStalkHandler, luckHandler, magnifiableHandler, marketplaceHandler, marketplaceIntegrationHandler, matchesCondition, materialHandler, materialXHandler, memoryCrystalHandler, memoryHandler, meshDetectionHandler, messagingHandler, modifiedThreshold, morphHandler, motionReducedHandler, mqttSinkHandler, mqttSourceHandler, multiAgentHandler, multiviewGaussianRendererHandler, negotiationHandler, nerfHandler, networkedAvatarHandler, networkedHandler, neuralAnimationHandler, neuralForgeHandler, neuralLinkHandler, neuralUpscalingHandler, nftHandler, normalizeCenter, normalizeLotusSeed, normalizePointCloud, npcAIHandler, objectTrackingHandler, occlusionHandler, onboardingHandler, openXRHALHandler, parseCRDTRoomEntityConfig, parseCRDTRoomTraitConfig, partnerSDKHandler, passthroughCameraHandler, patrolHandler, perceptionHandler, perceptualColorHandler, persistentAnchorHandler, photogrammetryHandler, phyllotaxisHandler, physicsSystem, pickByWeight, planeDetectionHandler, poiHandler, pointCloudHandler, portableHandler, poseEstimationHandler, pressableHandler, propose, provenanceDensifyHandler, provenanceHandler, publishToMQTTSink, qrDecodeHandler, quotaHandler, ragKnowledgeHandler, rateLimiterHandler, rbacHandler, realityKitMeshHandler, recallTriggerHandler, recordGratitude, registerLocalLLMNativeBridge, rememberRelationalContext, remotePresenceHandler, renderNetworkHandler, renderingHandler, reputationLedgerHandler, resolveBloomStage, resolveCRDTRoomTraitConfig, resolvePulseHz, resourceAccountingHandler, reverbZoneHandler, rigidbodyHandler, roadmapNodeHandler, roleHandler, rooftopAnchorHandler, roomMeshHandler, ropeHandler, runECSBenchmark, runFairnessMonitorSweep, runResourceAccountingAudit, sampleTrack, sceneGraphHandler, sceneReconstructionHandler, schedulerHandler, screenReaderHandler, scrollableHandler, seatedHandler, secondsToUSDTimeCode, seededRand01, sensorHandler, setAgentManifest, shaderHandler, sharePlayHandler, sharedAnchorHandler, sharedWorldHandler, shouldFire, signRequest, skillRegistryHandler, slidableHandler, softBodyHandler, sonificationHandler, spatialAccessoryHandler, spatialAudioCueHandler, spatialAwarenessHandler, spatialNavigationHandler, spatialPanelHandler, spatialPersonaHandler, spectatorHandler, ssoOidcHandler, ssoSamlHandler, stableDiffusionHandler, stableFairnessMonitorHash, stableResourceAccountingReceiptHash, statHandler, structuredLoggerHandler, subtitleHandler, syncTierHandler, tenantHandler, terrainAnchorHandler, timeoutGuardHandler, tokenGatedHandler, transformHandler, triggerHandler, tutorialHandler, urdfRobotHandler, usdHandler, usdTimeCodeToSeconds, userMonitorHandler, validateCRDTRoomTraitConfig, validateCareField, validateSemVer, vectorDBHandler, verifyWebhookSignature, visionHandler, voiceInputHandler, voiceMeshHandler, voiceOutputHandler, voiceProximityHandler, volumetricHandler, volumetricVideoHandler, volumetricWindowHandler, voronoiFractureHandler, vote, vpsHandler, vrTraitRegistry, walletHandler, wasmBridgeHandler, windHandler, withNegotiation, worldPortalHandler, wotThingHandler, zkPrivateHandler };
|
|
61644
|
-
//# sourceMappingURL=chunk-
|
|
61645
|
-
//# sourceMappingURL=chunk-
|
|
61720
|
+
export { AIDriverTrait, ALL_CIRCUITS, ARKIT_MOUTH_SHAPES, AnimationTrait, BUILTIN_CIRCUITS, BarretenbergBackend, BehaviorTreeRunner, CARE_ETHICS_TRAIT, CRDTRoomTraitValidationError, CRDT_ROOM_TRAIT_DEFAULTS, CharacterTrait, ComponentType, ConsensusTrait, DEFAULT_ANIMATION_MAP, DEFAULT_AUTONOMY_GUARD_POLICY, DEFAULT_BEHAVIOR_FACT_TTL_ALERT_RULE, DEFAULT_EXPRESSION_PRESETS, DEFAULT_EXTERNAL_TIMEOUT_MS, DEFAULT_FOVEATED_BLEND, DEFAULT_FREQUENCY_BANDS, DEFAULT_REPUTATION_LEDGER_MAX_FACTS, DEFAULT_REPUTATION_LEDGER_TTL_DAYS, DEFAULT_SYNC_FIELD, DEFAULT_TRAIT_CONFIG2 as DEFAULT_TRAIT_CONFIG, DRAFT_DEFAULTS, DRAFT_TRAIT, DialogTrait, DraftManager, ECSWorld, EmotionDirectiveTrait, EnvironmentalAudioSystem, ExpressionParseError, GEM_RESONANCE_ELEMENT_FREQUENCIES, GOAPPlanner, GOLDEN_ANGLE_DEG, HOLOSCRIPT_HUMANOID_BONE_MAP, IKTrait, InteractiveGraphTrait, JobQueuePersistence, JointTrait, LIGHTING_PRESETS, LOCAL_WEBCAM_VIEW_ID, LightingTrait, LipSyncTrait, LobbyTrait, MATERIAL_PRESETS2 as MATERIAL_PRESETS, MAX_EXPERIENCE_LOG_ENTRIES, MaterialTrait, MorphTrait, MultiviewGaussianRendererTrait, NetworkedTrait, OCULUS_VISEME_MAP, PIDControllerTrait, PressableTrait, REFERENCE_SPACE_CHAIN, REFUSED_CARE_OPTIMIZATION_TARGETS, RenderingTrait, RigidbodyTrait, SHADER_CHUNKS, SHADER_PRESETS, SPATIAL_PREDICATE_CIRCUITS, SYNC_PRESETS, SandboxExecutionTrait, ShaderTrait, SlidableTrait, SpatialAwarenessTrait, SyncTierTrait, TIER_DEFAULTS, TriggerTrait, URDFRobotTrait, VRTraitRegistry, VoiceInputTrait, VoiceOutputTrait, VoronoiFractureSystem, WEATHER_PRESETS, aIDriverHandler, abTestHandler, abstain, accessibleHandler, advancedClothHandler, affinityHandler, agentDiscoveryHandler, agentMemoryHandler, agentMovementSystem, agentPortalHandler, aiInpaintingHandler, aiTextureGenHandler, aiUpscalingHandler, ainpcBrainHandler, alertHandler, altTextHandler, ambisonicsHandler, analyticsHandler, analyzeFairnessWindow, anchorHandler, animationConfigFromStateMachine, applyFBXAxisConversion, applyStatModifiers, applyUSDAxisConversion, approve, audioMaterialHandler, audioOcclusionHandler, audioPortalHandler, auditLogHandler, autoRigHandler, autoVote, avatarEmbodimentHandler, behaviorTreeHandler, biofeedbackHandler, blackboardHandler, bloomReactiveHandler, bodyTrackingHandler, bufferHandler, buildBehaviorFactDisclosure, buoyancyHandler, cRDTRoomHandler, cacheHandler, careEthicsHandler, chainHandler, characterHandler, choreographyHandler, circuitBreakerHandler, clearLocalLLMNativeBridges, clothHandler, coLocatedHandler, compareSemVer, computeHandler, computePhyllotaxisPosition, computerUseHandler, consensusHandler, consentGateHandler, controlNetHandler, controllerInputHandler, controlnetHandler, createAIDriverTrait, createAnimationTrait, createApprovalRequest, createBaseMainnetAccountingAdapter, createBehaviorFactTtlAlertRule, createCRDTRoomTraitConfig, createCanBusAccountingAdapter, createCareField, createCharacterTrait, createConsensusTrait, createDialogTrait, createEdiX12AccountingAdapter, createEmotionDirectiveTrait, createHl7FhirAccountingAdapter, createIKTrait, createJointTrait, createLightingTrait, createLipSyncTrait, createLobbyTrait, createMaterialTrait, createMorphTrait, createNativeAutoRigPlan, createNetworkedTrait, createRenderingTrait, createRepairLoop, createRigidbodyTrait, createRollbackCheckpoint, createSelectiveDisclosure, createShaderTrait, createSharedSpatialProvider, createSimulatedController, createSpatialAwarenessTrait, createTriggerTrait, createURDFRobotTrait, createVoiceInputTrait, createVoiceOutputTrait, cronHandler, dataBindingHandler, deriveBloomReactiveOutput, deriveFairnessRisk, deriveLotusCenterPhase, deriveLotusGardenerSchedule, deriveLotusGenesisGate, deriveLotusGenesisSeed, deriveLotusPetalVisual, deriveLotusRootEmissive, deriveLotusStalkPosture, deriveWalkableNavmesh, destructionHandler, deviceProfiles, dialogHandler, dialogueHandler, diffusionRealtimeHandler, digitalTwinHandler, dropTableHandler, economyPrimitivesHandler, effectiveWeight, embeddingSearchHandler, emissiveAt, emitUnwired, emotionDirectiveHandler, emotionHandler, emotionalVoiceHandler, encounterHandler, environmentalAudioHandler, evaluateAction, evaluateAutonomyGuard, evaluateCareEthicsTurn, evaluateExpressionIR, evolveProgramHandler, extractLotusGenesisAnchorHash, extractPayload, eyeTrackedHandler, faceTrackingHandler, factionHandler, fairnessMonitorHandler, fbxHandler, feedbackLoopHandler, findReachablePath, findWalkableNodeAt, flowFieldHandler, fluidHandler, fluidSimulationHandler, forgetPolicyHandler, formationControlHandler, freezeWhenHandler, gardenerPulseJitter, gaussianSplatHandler, gazeFocusAnalyticsHandler, gemResonanceHandler, generatedMeshHandler, geospatialAnchorHandler, geospatialEnvHandler, gestureHandler, getActiveSessions, getAgentId, getAirAbsorption, getAuditLog, getCachedThingDescription, getCapabilities, getCareEthicsState, getEventHistory, getFBXAnimationStacks, getFBXBoneNames, getFBXMorphTargets, getFBXState, getGLTFAnimations, getGLTFMorphTargets, getGLTFState, getMQTTSinkClient, getMQTTSinkState, getMQTTSourceClient, getMQTTSourceState, getMyProposals, getMyVotes, getNegotiationMethods, getPredicateCircuitId, getSession, getUSDActiveVariant, getUSDAnimation, getUSDBlendShapes, getUSDJointNames, getUSDState, getUSDVariantSets, getWoTThingState, gltfHandler, goalOrientedHandler, gpuBufferHandler, gpuParticleHandler, gpuPhysicsHandler, granularMaterialHandler, handMenuHandler, handMeshAIHandler, handTrackingHandler, hapticCueHandler, hapticHandler, hasMQTTSinkTrait, hasMQTTSourceTrait, hasVoted, hasWoTThingTrait, hashGardenerSeed, hashSeed, headTrackedAudioHandler, heatmap3dHandler, highContrastHandler, hitlHandler, hrtfHandler, iKHandler, initiate, invalidateThingDescription, isConsentGranted, isFBXLoaded, isGLTFLoaded, isInSession, isMQTTSinkConnected, isMQTTSourceConnected, isNativeLLMBackend, isReservedPaperId, isUSDLoaded, isUSDZ, isWalkableAt, jointHandler, layerAwareHandler, leave, lightEstimationHandler, lightingHandler, lipSyncHandler, llmAgentHandler, lobbyHandler, localLLMHandler, locomotionHandler, lodSystem, lotusCenterHandler, lotusGardenerHandler, lotusGenesisTriggerHandler, lotusPetalHandler, lotusRootHandler, lotusStalkHandler, luckHandler, magnifiableHandler, marketplaceHandler, marketplaceIntegrationHandler, matchesCondition, materialHandler, materialXHandler, memoryCrystalHandler, memoryHandler, meshDetectionHandler, messagingHandler, modifiedThreshold, morphHandler, motionReducedHandler, mqttSinkHandler, mqttSourceHandler, multiAgentHandler, multiviewGaussianRendererHandler, negotiationHandler, nerfHandler, networkedAvatarHandler, networkedHandler, neuralAnimationHandler, neuralForgeHandler, neuralLinkHandler, neuralUpscalingHandler, nftHandler, normalizeCenter, normalizeLotusSeed, normalizePointCloud, npcAIHandler, objectTrackingHandler, occlusionHandler, onboardingHandler, openXRHALHandler, parseCRDTRoomEntityConfig, parseCRDTRoomTraitConfig, parseExpressionToIR, partnerSDKHandler, passthroughCameraHandler, patrolHandler, perceptionHandler, perceptualColorHandler, persistentAnchorHandler, photogrammetryHandler, phyllotaxisHandler, physicsSystem, pickByWeight, planeDetectionHandler, poiHandler, pointCloudHandler, portableHandler, poseEstimationHandler, pressableHandler, propose, provenanceDensifyHandler, provenanceHandler, publishToMQTTSink, qrDecodeHandler, quotaHandler, ragKnowledgeHandler, rateLimiterHandler, rbacHandler, realityKitMeshHandler, recallTriggerHandler, recordGratitude, registerLocalLLMNativeBridge, rememberRelationalContext, remotePresenceHandler, renderNetworkHandler, renderingHandler, reputationLedgerHandler, resolveBloomStage, resolveCRDTRoomTraitConfig, resolvePulseHz, resourceAccountingHandler, retryHandler, reverbZoneHandler, rigidbodyHandler, roadmapNodeHandler, roleHandler, rooftopAnchorHandler, roomMeshHandler, ropeHandler, runECSBenchmark, runFairnessMonitorSweep, runResourceAccountingAudit, sampleTrack, sceneGraphHandler, sceneReconstructionHandler, schedulerHandler, screenReaderHandler, scrollableHandler, seatedHandler, secondsToUSDTimeCode, seededRand01, sensorHandler, setAgentManifest, shaderHandler, sharePlayHandler, sharedAnchorHandler, sharedWorldHandler, shouldFire, signRequest, skillRegistryHandler, slidableHandler, softBodyHandler, sonificationHandler, spatialAccessoryHandler, spatialAudioCueHandler, spatialAwarenessHandler, spatialNavigationHandler, spatialPanelHandler, spatialPersonaHandler, spectatorHandler, ssoOidcHandler, ssoSamlHandler, stableDiffusionHandler, stableFairnessMonitorHash, stableResourceAccountingReceiptHash, statHandler, structuredLoggerHandler, subtitleHandler, syncTierHandler, tenantHandler, terrainAnchorHandler, timeoutGuardHandler, tokenGatedHandler, transformHandler, triggerHandler, tutorialHandler, urdfRobotHandler, usdHandler, usdTimeCodeToSeconds, userMonitorHandler, validateCRDTRoomTraitConfig, validateCareField, validateSemVer, vectorDBHandler, verifyWebhookSignature, visionHandler, voiceInputHandler, voiceMeshHandler, voiceOutputHandler, voiceProximityHandler, volumetricHandler, volumetricVideoHandler, volumetricWindowHandler, voronoiFractureHandler, vote, vpsHandler, vrTraitRegistry, walletHandler, wasmBridgeHandler, windHandler, withNegotiation, worldPortalHandler, wotThingHandler, zkPrivateHandler };
|
|
61721
|
+
//# sourceMappingURL=chunk-AUF7HFOO.js.map
|
|
61722
|
+
//# sourceMappingURL=chunk-AUF7HFOO.js.map
|