betterwithage Claude Opus 4.7 commited on
Commit
1c54290
·
verified ·
1 Parent(s): 5af3cd5

deploy(hf): sync szl-holdings/a11oy@main derived COPY set

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 907 Pruned: 0
Derived from Dockerfile COPY sources (NO hand-maintained allowlist).

Signed-off-by: SZL Holdings <noreply@szlholdings.ai>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

static/3d/holographic.html CHANGED
@@ -165,6 +165,7 @@ const SURFACES = [
165
  { id: "flower", title: "Flower Brain", mod: "/static/3d/surfaces/flower.js" },
166
  { id: "agentmem", title: "AgentMem · Λ-Governed Agent Memory (synthesis)", mod: "/static/3d/surfaces/agentmem.js" },
167
  { id: "loopforge", title: "Loop Forge", mod: "/static/3d/surfaces/loopforge.js" },
 
168
  ];
169
 
170
  const stageEl = document.getElementById("stage");
 
165
  { id: "flower", title: "Flower Brain", mod: "/static/3d/surfaces/flower.js" },
166
  { id: "agentmem", title: "AgentMem · Λ-Governed Agent Memory (synthesis)", mod: "/static/3d/surfaces/agentmem.js" },
167
  { id: "loopforge", title: "Loop Forge", mod: "/static/3d/surfaces/loopforge.js" },
168
+ { id: "edgefusion", title: "EdgeFusion · Λ-Gated Energy-Proportional Sensor Fusion (synthesis)", mod: "/static/3d/surfaces/edgefusion.js" },
169
  ];
170
 
171
  const stageEl = document.getElementById("stage");
static/3d/surfaces/edgefusion.js ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ // © 2026 Lutar, Stephen P. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
3
+ //
4
+ // surfaces/edgefusion.js — EDGEFUSION: energy-proportional, Λ-gated multi-sensor
5
+ // edge fusion (SZL synthesis) for the holographic frontier ring. Heterogeneous
6
+ // sensors sit on an outer arc; each modeled track flows inward, is FUSED by
7
+ // inverse-variance weighting, and passes a central Λ-GATE (Λ = Conjecture 1 —
8
+ // gray, NEVER green). Admitted tracks glow proof-teal, Λ-gated / inconsistent
9
+ // tracks stay grey. The gate core scales with the CAPPED trust (≤0.97). A compact
10
+ // HUD shows the fusion / energy / gate stats and the signed-fusion-receipt-per-
11
+ // write DESIGN (nothing minted on a read). Live snapshot:
12
+ // /api/a11oy/v1/frontier/edgefusion
13
+ //
14
+ // This is an SZL CROSS-AXIS SYNTHESIS no published system ships together:
15
+ // multi-sensor fusion (BEVFusion / TransFuser / VINS-Fusion) + energy-
16
+ // proportional / carbon-aware inference (MLPerf Power / CarbonCall) + a
17
+ // neuromorphic (SNN / Loihi) efficiency factor + the Λ trust gate + a signed
18
+ // fusion-receipt-per-write chain.
19
+ //
20
+ // LEADERS ADOPTED & CITED (clean-room; NOT claimed as SZL's own):
21
+ // BEVFusion — Liu et al. 2022, arXiv:2205.13542
22
+ // TransFuser — Chitta et al. 2022, arXiv:2205.15997
23
+ // VINS-Fusion — HKUST-Aerial-Robotics
24
+ // MLPerf Power — Tschand et al. 2024, arXiv:2410.12032
25
+ // CarbonCall — 2025, arXiv:2504.20348
26
+ // snnTorch — Eshraghian et al. 2021, arXiv:2109.12894
27
+ // Loihi — Davies et al. 2018, IEEE Micro
28
+ //
29
+ // HONESTY LABELS: MODELED (deterministic multi-sensor scene + inverse-variance
30
+ // fusion + parametric joules model; read VERBATIM from JSON, never upgraded).
31
+ // The SZL SYNTHESIS is CONJECTURE: Λ as a per-track trust gate is Λ = Conjecture
32
+ // 1 (gray, never green), and the signed-fusion-receipt-per-write chain is design-
33
+ // only (RECEIPT-ON-WRITE — nothing minted or signed on this GET). Energy is
34
+ // MODELED, NOT MEASURED (no NVML/RAPL/Loihi meter wired). Trust capped at 0.97.
35
+ // COLOURS: lattice-blue 0x5b8dee (sensors / track links), violet-blue 0x8a6bff
36
+ // (Λ-gate ring), proof-teal 0x3af4c8 (admitted track / accent), greys (gated-out
37
+ // / inconsistent / degraded). Purple BANNED.
38
+ // 0 RUNTIME CDN. three.js via ctx.THREE (vendored by the page importmap).
39
+ // DOCTRINE v11: degrades gracefully (grey) on 404/error; honesty label still shown.
40
+ // Nothing here is in the locked-8 (adds 0). Λ stays Conjecture 1. Trust never 100%.
41
+
42
+ import { createShowcase } from "./_showcase.js";
43
+
44
+ const ID = "edgefusion";
45
+ const TITLE = "EdgeFusion · Λ-Gated Energy-Proportional Sensor Fusion (live)";
46
+
47
+ // Served SAME-ORIGIN by szl_edgefusion.py — a deterministic governed-fusion model.
48
+ const EP = "/api/a11oy/v1/frontier/edgefusion?seed=42&n_tracks=48&n_sensors=4&horizon=64";
49
+
50
+ // data-viz hues — purple BANNED
51
+ const C_SENSOR = 0x5b8dee; // lattice-blue (sensor emitter / track link)
52
+ const C_GATE = 0x8a6bff; // violet-blue (Λ-gate ring)
53
+ const C_ADMIT = 0x3af4c8; // proof-teal (admitted track / accent)
54
+ const C_GATED = 0x5a6570; // grey (Λ-gated-out / inconsistent)
55
+ const C_DIM = 0x42505d; // grey (degraded / no-live-data)
56
+ const C_GRID = 0x1b3a44; // floor / link colour
57
+
58
+ // layout geometry
59
+ const SENSOR_R = 7.0; // radius of the outer sensor arc
60
+ const MAX_TRACK = 96; // cap on track meshes rendered (matches backend _TRACK_CAP)
61
+ const MAX_SENS = 6; // cap on sensor emitters (matches backend _SENSOR_BANK)
62
+ const GATE_Y = 0.7; // height of the central Λ-gate core
63
+
64
+ let _stage = null, _THREE = null, _ctx = null, _group = null, _show = null;
65
+ let _frameReg = false, _polls = [], _badge = null, _f = {};
66
+
67
+ // geometry handles
68
+ let _floor = null;
69
+ let _sensMesh = []; // Array<THREE.Mesh> — sensor emitters on the outer arc
70
+ let _gateRing = null; // THREE.LineLoop — Λ-gate ring
71
+ let _core = null; // THREE.Mesh — central gate core (scales with trust)
72
+ let _trkMesh = []; // Array<THREE.Mesh> — fused-track particles
73
+ let _trkLine = []; // Array<THREE.Line> — track -> gate links
74
+
75
+ // live state
76
+ const S = {
77
+ label: null,
78
+ nTracks: null, nSensors: null, horizon: null,
79
+ sensors: null, // sensors[] {name, sigma, joules}
80
+ tracks: null, // tracks[] (per-track)
81
+ admits: null, gatedOut: null,
82
+ meanConf: null, meanAgree: null, consistencyRate: null,
83
+ meanLambda: null, lambdaMax: null, admitThresh: null,
84
+ trust: null, trustCap: null,
85
+ joules: null, joulesIdle: null, neuro: null, neuroFactor: null,
86
+ receiptSigned: null, receiptDigest: null,
87
+ state: "init",
88
+ };
89
+
90
+ // =============================================================================
91
+ // mount(ctx)
92
+ // =============================================================================
93
+ export function mount(ctx) {
94
+ _ctx = ctx; _stage = ctx.stage; _THREE = ctx.THREE;
95
+ _group = new _THREE.Group();
96
+ _stage.scene.add(_group);
97
+ _stage.camera.position.set(0, 10, 22);
98
+ try { if (_stage.controls && _stage.controls.target) { _stage.controls.target.set(0, 1.2, 0); _stage.controls.update(); } } catch (_) {}
99
+ try { _stage.setBloom(true); } catch (_) {}
100
+
101
+ _buildFloor();
102
+ _buildSensors();
103
+ _buildGate();
104
+ _buildTracks();
105
+
106
+ if (!_frameReg && _stage.onFrame) { _stage.onFrame(_onFrame); _frameReg = true; }
107
+
108
+ _badge = ctx.live.createBadge();
109
+ _buildShowcase(ctx);
110
+
111
+ // top-N sensor labels (billboarded) + hover tooltip via the shared helper.
112
+ _show.attachSceneLabels({
113
+ objects: () => _sensMesh.filter((m) => m.visible),
114
+ text: (o) => (o && o.userData && o.userData.label) || "",
115
+ weight: (o) => (o && o.userData ? o.userData.weight : 0),
116
+ topN: MAX_SENS,
117
+ hover: true,
118
+ });
119
+
120
+ _polls.push(ctx.live.poll(EP, 5000, _onData, {
121
+ badge: _badge, onState: (m) => { S.state = m.state; _paint(); },
122
+ }));
123
+ return { id: ID, started: true };
124
+ }
125
+
126
+ // =============================================================================
127
+ // builders
128
+ // =============================================================================
129
+ function _buildFloor() {
130
+ const THREE = _THREE;
131
+ const grid = new THREE.GridHelper(48, 48, C_GRID, 0x0f2027);
132
+ grid.material.opacity = 0.18; grid.material.transparent = true; grid.position.y = -0.01;
133
+ _group.add(grid);
134
+ _floor = grid;
135
+ }
136
+
137
+ // Sensor emitters: up to MAX_SENS nodes on the outer arc (front hemisphere), each
138
+ // a lattice-blue node; a lower-sigma (better) sensor is drawn larger + weighted
139
+ // higher for the top-N label ranking.
140
+ function _buildSensors() {
141
+ const THREE = _THREE;
142
+ const geo = new THREE.OctahedronGeometry(0.34, 0);
143
+ for (let i = 0; i < MAX_SENS; i++) {
144
+ const a = Math.PI * (0.15 + 0.7 * (i / Math.max(1, MAX_SENS - 1))); // front arc
145
+ const mesh = new THREE.Mesh(
146
+ geo,
147
+ new THREE.MeshStandardMaterial({ color: C_SENSOR, emissive: C_SENSOR, emissiveIntensity: 0.25, transparent: true, opacity: 0.0 }),
148
+ );
149
+ mesh.position.set(Math.cos(a) * SENSOR_R, 1.1, Math.sin(a) * SENSOR_R);
150
+ mesh.visible = false;
151
+ mesh.userData = { label: "", weight: 0 };
152
+ _group.add(mesh);
153
+ _sensMesh.push(mesh);
154
+ }
155
+ }
156
+
157
+ // Central Λ-gate: an advisory ring + a core that scales with the CAPPED trust.
158
+ function _buildGate() {
159
+ const THREE = _THREE;
160
+ {
161
+ const pts = [];
162
+ for (let i = 0; i <= 64; i++) {
163
+ const a = (i / 64) * Math.PI * 2;
164
+ pts.push(new THREE.Vector3(Math.cos(a) * 1.9, GATE_Y, Math.sin(a) * 1.9));
165
+ }
166
+ const g = new THREE.BufferGeometry().setFromPoints(pts);
167
+ const m = new THREE.LineBasicMaterial({ color: C_GATE, transparent: true, opacity: 0.45 });
168
+ _gateRing = new THREE.LineLoop(g, m);
169
+ _group.add(_gateRing);
170
+ }
171
+ _core = new THREE.Mesh(
172
+ new THREE.IcosahedronGeometry(0.75, 1),
173
+ new THREE.MeshStandardMaterial({ color: C_GATE, emissive: C_GATE, emissiveIntensity: 0.4, wireframe: true, transparent: true, opacity: 0.85 }),
174
+ );
175
+ _core.position.set(0, GATE_Y, 0);
176
+ _group.add(_core);
177
+ }
178
+
179
+ // Fused-track particles: pre-allocated spheres arranged on a deterministic spiral
180
+ // between the sensor arc and the gate, each with a link line toward the gate core.
181
+ function _buildTracks() {
182
+ const THREE = _THREE;
183
+ const geo = new THREE.SphereGeometry(0.13, 8, 8);
184
+ const golden = Math.PI * (3 - Math.sqrt(5));
185
+ for (let i = 0; i < MAX_TRACK; i++) {
186
+ const t = (i + 1) / MAX_TRACK;
187
+ const r = 2.6 + (SENSOR_R - 3.4) * Math.sqrt(t);
188
+ const a = i * golden;
189
+ const mesh = new THREE.Mesh(
190
+ geo,
191
+ new THREE.MeshStandardMaterial({ color: C_SENSOR, emissive: C_SENSOR, emissiveIntensity: 0.15, transparent: true, opacity: 0.0 }),
192
+ );
193
+ mesh.position.set(Math.cos(a) * r, 0.5 + 0.6 * Math.sin(t * 6.283), Math.sin(a) * r);
194
+ mesh.visible = false;
195
+ _group.add(mesh);
196
+ _trkMesh.push(mesh);
197
+
198
+ const lg = new THREE.BufferGeometry().setFromPoints([mesh.position.clone(), new THREE.Vector3(0, GATE_Y, 0)]);
199
+ const lm = new THREE.LineBasicMaterial({ color: C_SENSOR, transparent: true, opacity: 0.0 });
200
+ const line = new THREE.Line(lg, lm);
201
+ line.visible = false;
202
+ _group.add(line);
203
+ _trkLine.push(line);
204
+ }
205
+ }
206
+
207
+ // =============================================================================
208
+ // live data handler
209
+ // =============================================================================
210
+ function _onData(j) {
211
+ const p = (j && typeof j.payload === "object" && j.payload) ? j.payload : j;
212
+ const rawLabel = (j && j.label) || (p && p.label) || "MODELED";
213
+ S.label = String(rawLabel).toUpperCase();
214
+
215
+ S.nTracks = typeof p.n_tracks === "number" ? p.n_tracks : null;
216
+ S.nSensors = typeof p.n_sensors === "number" ? p.n_sensors : null;
217
+ S.horizon = typeof p.horizon === "number" ? p.horizon : null;
218
+ S.sensors = Array.isArray(p.sensors) ? p.sensors : null;
219
+ S.tracks = Array.isArray(p.tracks) ? p.tracks : null;
220
+
221
+ const fus = (p && typeof p.fusion === "object") ? p.fusion : {};
222
+ S.admits = typeof fus.admitted === "number" ? fus.admitted : null;
223
+ S.gatedOut = typeof fus.gated_out === "number" ? fus.gated_out : null;
224
+ S.meanConf = typeof fus.mean_fused_confidence === "number" ? fus.mean_fused_confidence : null;
225
+ S.meanAgree = typeof fus.mean_sensor_agreement === "number" ? fus.mean_sensor_agreement : null;
226
+ S.consistencyRate = typeof fus.consistency_rate === "number" ? fus.consistency_rate : null;
227
+
228
+ const g = (p && typeof p.lambda_gate === "object") ? p.lambda_gate : {};
229
+ S.meanLambda = typeof g.mean_lambda_advisory === "number" ? g.mean_lambda_advisory : null;
230
+ S.admitThresh = typeof g.admit_threshold === "number" ? g.admit_threshold : null;
231
+ S.lambdaMax = (g.bounds && typeof g.bounds.max === "number") ? g.bounds.max : null;
232
+ S.trust = typeof g.trust === "number" ? g.trust : null;
233
+ S.trustCap = typeof g.trust_cap === "number" ? g.trust_cap : null;
234
+
235
+ const e = (p && typeof p.energy === "object") ? p.energy : {};
236
+ S.joules = typeof e.joules_per_inference === "number" ? e.joules_per_inference : null;
237
+ S.joulesIdle = typeof e.joules_idle_floor === "number" ? e.joules_idle_floor : null;
238
+ S.neuro = typeof e.neuromorphic === "boolean" ? e.neuromorphic : null;
239
+ S.neuroFactor = typeof e.neuromorphic_factor === "number" ? e.neuromorphic_factor : null;
240
+
241
+ const rd = (p && typeof p.receipt_design === "object") ? p.receipt_design : {};
242
+ S.receiptSigned = typeof rd.signed === "boolean" ? rd.signed : null;
243
+ S.receiptDigest = typeof rd.receipt_preview_digest === "string" ? rd.receipt_preview_digest : null;
244
+
245
+ _updateScene();
246
+ _paint();
247
+ }
248
+
249
+ // =============================================================================
250
+ // geometry updater
251
+ // =============================================================================
252
+ function _updateScene() {
253
+ const live = S.state === "live";
254
+
255
+ // gate ring degrades to grey when not live
256
+ if (_gateRing) {
257
+ _gateRing.material.color.setHex(live ? C_GATE : C_DIM);
258
+ _gateRing.material.opacity = live ? 0.45 : 0.12;
259
+ }
260
+
261
+ // sensor emitters: light up the active sensor set; size ~ inverse sigma (better
262
+ // sensor = larger), label = name + sigma, weight for the top-N ranking.
263
+ const sens = live && S.sensors ? S.sensors : [];
264
+ for (let i = 0; i < MAX_SENS; i++) {
265
+ const mesh = _sensMesh[i];
266
+ const s = i < sens.length ? sens[i] : null;
267
+ if (!s) { mesh.visible = false; mesh.userData.label = ""; mesh.userData.weight = 0; continue; }
268
+ mesh.visible = true;
269
+ const sigma = typeof s.sigma === "number" ? s.sigma : 0.5;
270
+ const w = 1 / Math.max(0.05, sigma);
271
+ mesh.userData.label = (s.name || ("s" + i)) + " σ" + sigma.toFixed(2);
272
+ mesh.userData.weight = w;
273
+ mesh.material.color.setHex(live ? C_SENSOR : C_DIM);
274
+ mesh.material.emissive.setHex(live ? C_SENSOR : C_DIM);
275
+ mesh.material.emissiveIntensity = live ? 0.3 : 0.1;
276
+ mesh.material.opacity = live ? 0.9 : 0.3;
277
+ mesh.scale.setScalar(0.7 + Math.min(1.4, w * 0.28));
278
+ }
279
+
280
+ // fused tracks: colour by verdict — admitted proof-teal, Λ-gated/inconsistent
281
+ // grey (the advisory verdict is always shown, never hidden). Size ~ fused conf.
282
+ const trk = live && S.tracks ? S.tracks.slice(0, MAX_TRACK) : [];
283
+ for (let i = 0; i < MAX_TRACK; i++) {
284
+ const mesh = _trkMesh[i];
285
+ const line = _trkLine[i];
286
+ const t = i < trk.length ? trk[i] : null;
287
+ if (!t) { mesh.visible = false; line.visible = false; continue; }
288
+ mesh.visible = true; line.visible = true;
289
+ const admitted = !!t.admitted;
290
+ const conf = typeof t.fused_confidence === "number" ? t.fused_confidence : 0.5;
291
+ const col = admitted ? C_ADMIT : C_GATED;
292
+ mesh.material.color.setHex(col);
293
+ mesh.material.emissive.setHex(col);
294
+ mesh.material.emissiveIntensity = admitted ? 0.6 : 0.12;
295
+ mesh.material.opacity = admitted ? 0.95 : 0.4;
296
+ mesh.scale.setScalar(0.7 + conf * 1.0);
297
+ line.material.color.setHex(col);
298
+ line.material.opacity = admitted ? 0.5 : 0.15;
299
+ }
300
+
301
+ // gate core: colour + size reflect the CAPPED trust (never green / never 1.0).
302
+ if (_core) {
303
+ if (live && S.trust != null) {
304
+ _core.material.color.setHex(C_ADMIT);
305
+ _core.material.emissive.setHex(C_ADMIT);
306
+ _core.material.opacity = 0.85;
307
+ _core.scale.setScalar(0.6 + S.trust * 1.0);
308
+ } else {
309
+ _core.material.color.setHex(C_DIM);
310
+ _core.material.emissive.setHex(C_DIM);
311
+ _core.material.opacity = 0.3;
312
+ _core.scale.setScalar(0.6);
313
+ }
314
+ }
315
+ }
316
+
317
+ // =============================================================================
318
+ // per-frame animation
319
+ // =============================================================================
320
+ function _onFrame() {
321
+ const t = (typeof performance !== "undefined" ? performance.now() : Date.now());
322
+ if (_group) _group.rotation.y = Math.sin(t * 0.00007) * 0.12;
323
+ if (_gateRing) _gateRing.rotation.y += 0.0015;
324
+ if (_core) {
325
+ _core.rotation.y += 0.02;
326
+ _core.rotation.x += 0.008;
327
+ const pulse = 1.0 + 0.1 * Math.sin(t * 0.0035);
328
+ const base = (S.state === "live" && S.trust != null) ? (0.6 + S.trust * 1.0) : 0.6;
329
+ _core.scale.setScalar(base * pulse);
330
+ }
331
+ }
332
+
333
+ // =============================================================================
334
+ // showcase overlay (shared helper) — compact chrome + collapsible KPIs
335
+ // =============================================================================
336
+ function _buildShowcase(ctx) {
337
+ _show = createShowcase(ctx, {
338
+ id: ID,
339
+ title: TITLE,
340
+ accent: "#5b8dee",
341
+ badge: _badge,
342
+ chips: [
343
+ { label: "MODELED", text: "fusion + energy", name: "ef" },
344
+ { label: "STRUCTURAL-ONLY", text: "Λ=Conjecture 1 · receipt design", name: "syn" },
345
+ ],
346
+ legend: ["MODELED", "STRUCTURAL-ONLY"],
347
+ description:
348
+ "<b>EdgeFusion.</b> Heterogeneous sensors (outer arc) feed MODELED tracks that are " +
349
+ "fused by <b>inverse-variance weighting</b>, then pass a central <b>Λ-gate</b> " +
350
+ "(Λ = Conjecture 1 — gray, NEVER green). Admitted tracks glow proof-teal, Λ-gated / " +
351
+ "inconsistent tracks stay grey; the core scales with the capped trust (≤0.97). A " +
352
+ "MODELED joules-per-inference readout scales with the active sensor+track workload " +
353
+ "(energy-proportional; optional neuromorphic factor). Energy is <b>MODELED, not " +
354
+ "MEASURED</b> — no NVML/RAPL/Loihi meter is wired.",
355
+ citations:
356
+ "BEVFusion arXiv:2205.13542 · TransFuser 2205.15997 · VINS-Fusion (HKUST) · " +
357
+ "MLPerf Power 2410.12032 · CarbonCall 2504.20348 · snnTorch 2109.12894 · Loihi (IEEE Micro 2018). " +
358
+ "MODELED/CONJECTURE · not claimed-as. Nothing here is in the locked-8.",
359
+ plain: {
360
+ html: () =>
361
+ "Many different sensors (camera, lidar, radar, …) each see the world imperfectly. " +
362
+ "EdgeFusion combines them so the good sensors count more — that's the inward flow to " +
363
+ "the middle. A <b>trust gate</b> in the centre decides which combined tracks are " +
364
+ "reliable enough to act on: teal = admitted, grey = held back. It also estimates the " +
365
+ "<b>energy per decision</b> so an edge device can stay power-frugal. The gate is a " +
366
+ "restraint idea we call Λ — an honest <b>conjecture</b>, so it's drawn grey and its " +
367
+ "trust never hits 100%. Nothing is signed or saved just by looking at this page.",
368
+ },
369
+ });
370
+
371
+ _f.workload = _show.addField("sensors / tracks", "workload");
372
+ _f.conf = _show.addField("mean fused confidence", "conf");
373
+ _f.agree = _show.addField("mean sensor agreement", "agree");
374
+ _f.cons = _show.addField("consistency rate", "cons");
375
+ _f.lambda = _show.addField("mean Λ advisory (gray)", "lambda");
376
+ _f.gate = _show.addField("Λ-gate admits / gated-out", "gate");
377
+ _f.trust = _show.addField("trust (capped ≤0.97)", "trust");
378
+ _f.energy = _show.addField("energy / inference (MODELED)", "energy");
379
+ _f.receipt = _show.addField("fusion receipt", "receipt");
380
+ _f.label = _show.addField("honesty label", "label");
381
+ _paint();
382
+ }
383
+
384
+ function _tok(s) {
385
+ if (s === "live") return null;
386
+ if (s === "missing") return "NO-LIVE-DATA";
387
+ if (s === "degraded") return "DEGRADED";
388
+ if (s === "error") return "OFFLINE";
389
+ return "…";
390
+ }
391
+
392
+ function pct(v, d) { return typeof v === "number" ? (v * 100).toFixed(d) + "%" : "—"; }
393
+ function fx(v, d) { return typeof v === "number" ? v.toFixed(d) : "—"; }
394
+ function _set(k, v) { if (_f[k]) _f[k].textContent = v; }
395
+
396
+ function _paint() {
397
+ if (!_show) return;
398
+ const t = _tok(S.state);
399
+ if (_show.setChip) _show.setChip("ef", S.label || "MODELED", { text: "fusion + energy" });
400
+
401
+ _set("workload", t || (S.nSensors != null || S.nTracks != null
402
+ ? (S.nSensors != null ? S.nSensors : "—") + " / " + (S.nTracks != null ? S.nTracks : "—") : "—"));
403
+ _set("conf", t || pct(S.meanConf, 1));
404
+ _set("agree", t || pct(S.meanAgree, 1));
405
+ _set("cons", t || pct(S.consistencyRate, 1));
406
+ _set("lambda", t || (S.meanLambda != null
407
+ ? fx(S.meanLambda, 3) + (S.lambdaMax != null ? " (max " + S.lambdaMax + ")" : "") : "—"));
408
+ _set("gate", t || (S.admits != null || S.gatedOut != null
409
+ ? (S.admits != null ? S.admits : "—") + " / " + (S.gatedOut != null ? S.gatedOut : "—") : "—"));
410
+ _set("trust", t || (S.trust != null ? fx(S.trust, 3) + (S.trustCap != null ? " (≤" + S.trustCap + ")" : "") : "—"));
411
+ _set("energy", t || (S.joules != null
412
+ ? S.joules.toFixed(4) + " J" + (S.neuro ? " · neuro ×" + (S.neuroFactor != null ? S.neuroFactor : "?") : "")
413
+ : "—"));
414
+ _set("receipt", t || (S.receiptSigned === false
415
+ ? "unsigned preview" + (S.receiptDigest ? " " + S.receiptDigest.slice(0, 10) + "…" : "")
416
+ : (S.receiptDigest ? S.receiptDigest.slice(0, 10) + "…" : "—")));
417
+ _set("label", t || (S.label || "MODELED"));
418
+ }
419
+
420
+ // =============================================================================
421
+ // unmount — clean up everything; must not affect other organs
422
+ // =============================================================================
423
+ export function unmount() {
424
+ _polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = [];
425
+ try { if (_show) _show.destroy(); } catch (_) {}
426
+ try {
427
+ if (_group && _stage) {
428
+ _group.traverse((o) => {
429
+ if (o.geometry && o.geometry.dispose) o.geometry.dispose();
430
+ if (o.material) {
431
+ const ms = Array.isArray(o.material) ? o.material : [o.material];
432
+ ms.forEach((m) => { if (m.dispose) m.dispose(); });
433
+ }
434
+ });
435
+ _stage.scene.remove(_group);
436
+ }
437
+ } catch (_) {}
438
+ _group = _show = null;
439
+ _floor = null; _sensMesh = []; _gateRing = null; _core = null; _trkMesh = []; _trkLine = [];
440
+ _f = {}; _badge = null; _frameReg = false;
441
+ _stage = _THREE = _ctx = null;
442
+ S.label = S.nTracks = S.nSensors = S.horizon = S.sensors = S.tracks = null;
443
+ S.admits = S.gatedOut = S.meanConf = S.meanAgree = S.consistencyRate = null;
444
+ S.meanLambda = S.lambdaMax = S.admitThresh = S.trust = S.trustCap = null;
445
+ S.joules = S.joulesIdle = S.neuro = S.neuroFactor = null;
446
+ S.receiptSigned = S.receiptDigest = null;
447
+ S.state = "init";
448
+ }
449
+
450
+ export default { id: ID, title: TITLE, endpoints: [EP], mount, unmount };