Spaces:
Running
Running
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 988 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
|
@@ -223,6 +223,7 @@ const SURFACES = [
|
|
| 223 |
{ id: "lgmi", cat: "governance", title: "LGMI · Λ-Governed Mechanistic Interpretability (synthesis)", mod: "/static/3d/surfaces/lgmi.js" },
|
| 224 |
{ id: "gnqs", cat: "quant", title: "GNQS · Governed-Norm Quantization Stability (synthesis)", mod: "/static/3d/surfaces/gnqs.js" },
|
| 225 |
{ id: "casta", cat: "defense", title: "CASTA · Clean-room Anomaly × Streaming Test-time Adaptation (synthesis)", mod: "/static/3d/surfaces/casta.js" },
|
|
|
|
| 226 |
];
|
| 227 |
|
| 228 |
const stageEl = document.getElementById("stage");
|
|
|
|
| 223 |
{ id: "lgmi", cat: "governance", title: "LGMI · Λ-Governed Mechanistic Interpretability (synthesis)", mod: "/static/3d/surfaces/lgmi.js" },
|
| 224 |
{ id: "gnqs", cat: "quant", title: "GNQS · Governed-Norm Quantization Stability (synthesis)", mod: "/static/3d/surfaces/gnqs.js" },
|
| 225 |
{ id: "casta", cat: "defense", title: "CASTA · Clean-room Anomaly × Streaming Test-time Adaptation (synthesis)", mod: "/static/3d/surfaces/casta.js" },
|
| 226 |
+
{ id: "frontierindex", cat: "brain", title: "Frontier Index · honest ecosystem catalog · per-surface backend label + citations + native/fallback (self-audited)", mod: "/static/3d/surfaces/frontierindex.js" },
|
| 227 |
];
|
| 228 |
|
| 229 |
const stageEl = document.getElementById("stage");
|
static/3d/surfaces/frontierindex.js
ADDED
|
@@ -0,0 +1,400 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
// © 2026 Lutar, Stephen P. Jr. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
+
//
|
| 4 |
+
// surfaces/frontierindex.js — FRONTIER INDEX · honest ecosystem catalog + self-audit.
|
| 5 |
+
//
|
| 6 |
+
// The map OF the maps. It renders the whole ecosystem as a constellation of surface
|
| 7 |
+
// nodes and, for EACH one, shows the honest data label that surface's OWN backend
|
| 8 |
+
// actually emits right now, whether it is a11oy-native or a cross-origin fallback, and
|
| 9 |
+
// whether it declares cited papers. HONEST BY CONSTRUCTION: every value is read VERBATIM
|
| 10 |
+
// from the same-origin catalog, which is itself derived live from the app's surface
|
| 11 |
+
// registry + registered routes + each surface's own response — never a hand-maintained
|
| 12 |
+
// list that can drift.
|
| 13 |
+
//
|
| 14 |
+
// DATA: live snapshot from the same-origin endpoint /api/a11oy/v1/frontier-index/catalog:
|
| 15 |
+
// ok, label (MODELED, VERBATIM), summary{ surfaces, backend_counts, label_counts,
|
| 16 |
+
// surfaces_with_citations }, surfaces[]{ id, title, category, backend, label,
|
| 17 |
+
// citations[], endpoint }, doctrine{ locked_proven, lambda, trust_ceiling }.
|
| 18 |
+
//
|
| 19 |
+
// VISUALIZES:
|
| 20 |
+
// 1. an ECOSYSTEM RING — one small node per registered surface, arranged in a ring,
|
| 21 |
+
// colored by its HONEST backend kind: a11oy-native (teal), cross-origin-fallback
|
| 22 |
+
// (amber), frontend-only (grey). A node with cited papers gets a thin bright halo.
|
| 23 |
+
// 2. a CENTRAL INDEX HUB — the self node; links fan out to every surface it enumerated.
|
| 24 |
+
// 3. a per-node ACTIVITY PULSE that sweeps the ring, lighting each node in turn so the
|
| 25 |
+
// viewer can read that the catalog covers the WHOLE estate, not a curated subset.
|
| 26 |
+
//
|
| 27 |
+
// HONESTY LABEL: MODELED — this surface's own top label is MODELED (an introspective view,
|
| 28 |
+
// not a measurement). Each per-surface label shown is that surface's OWN label read
|
| 29 |
+
// VERBATIM and NEVER upgraded: a down/proxy surface shows UNAVAILABLE, never a fake OK.
|
| 30 |
+
// No green "1.0 / VERIFIED" state anywhere. Trust ceiling 0.97, NEVER 100%.
|
| 31 |
+
// COLOURS: teal 0x3af4c8 (a11oy-native), amber 0xf4b23a (cross-origin-fallback), grey
|
| 32 |
+
// 0x42505d (frontend-only / pending), lattice-blue 0x5b8dee (hub / links). PURPLE BANNED.
|
| 33 |
+
// No green/1.0 verified state.
|
| 34 |
+
// 0 RUNTIME CDN. Vendored three.js via page importmap (ctx.THREE).
|
| 35 |
+
// DOCTRINE v11: adds NOTHING to the locked-8 {F1,F4,F7,F11,F12,F18,F19,F22} @ c7c0ba17;
|
| 36 |
+
// Λ stays Conjecture 1; introduces no theorem. Degrades grey on 404/error; label shown.
|
| 37 |
+
|
| 38 |
+
import { createShowcase } from "./_showcase.js";
|
| 39 |
+
|
| 40 |
+
const ID = "frontierindex";
|
| 41 |
+
const TITLE = "Frontier Index · honest ecosystem catalog (live, self-audited)";
|
| 42 |
+
|
| 43 |
+
// same-origin, relative — no CDN, no cross-origin fetch.
|
| 44 |
+
const EP = "/api/a11oy/v1/frontier-index/catalog";
|
| 45 |
+
|
| 46 |
+
// data-viz hues — purple BANNED, no green
|
| 47 |
+
const C_NATIVE = 0x3af4c8; // teal — a11oy-native (backend answered with an honest label)
|
| 48 |
+
const C_FALLBACK = 0xf4b23a; // amber — cross-origin-fallback (route exists, no native label)
|
| 49 |
+
const C_FRONTEND = 0x42505d; // grey — frontend-only (no local /api route) / pending
|
| 50 |
+
const C_HUB = 0x5b8dee; // lattice-blue — central index hub + links
|
| 51 |
+
const C_GRID = 0x1b3a44; // floor / link colour
|
| 52 |
+
|
| 53 |
+
const RING_R = 6.2; // ecosystem ring radius (world units)
|
| 54 |
+
|
| 55 |
+
let _stage = null, _THREE = null, _ctx = null, _group = null, _show = null;
|
| 56 |
+
let _frameReg = false, _polls = [], _el = {}, _badge = null, _plain = false;
|
| 57 |
+
|
| 58 |
+
// geometry handles
|
| 59 |
+
let _hub = null; // THREE.Mesh — central index node
|
| 60 |
+
let _nodes = []; // Array<{ mesh, halo, backend, cited }>
|
| 61 |
+
let _links = []; // Array<THREE.Line>
|
| 62 |
+
let _sweep = 0; // ring-sweep phase
|
| 63 |
+
|
| 64 |
+
// live state (all read from JSON; nothing invented)
|
| 65 |
+
const S = {
|
| 66 |
+
label: null, // top honesty label VERBATIM (MODELED)
|
| 67 |
+
count: null, // total surfaces enumerated
|
| 68 |
+
native: null,
|
| 69 |
+
fallback: null,
|
| 70 |
+
frontend: null,
|
| 71 |
+
cited: null,
|
| 72 |
+
trustCeil: null,
|
| 73 |
+
lambda: null,
|
| 74 |
+
locked: null,
|
| 75 |
+
surfaces: [], // [{ id, backend, label, cited }]
|
| 76 |
+
state: "init",
|
| 77 |
+
};
|
| 78 |
+
|
| 79 |
+
// =============================================================================
|
| 80 |
+
// mount(ctx)
|
| 81 |
+
// =============================================================================
|
| 82 |
+
export function mount(ctx) {
|
| 83 |
+
_ctx = ctx; _stage = ctx.stage; _THREE = ctx.THREE;
|
| 84 |
+
_group = new _THREE.Group();
|
| 85 |
+
_stage.scene.add(_group);
|
| 86 |
+
_stage.camera.position.set(0, 9, 16);
|
| 87 |
+
try { if (_stage.controls && _stage.controls.target) { _stage.controls.target.set(0, 1.2, 0); _stage.controls.update(); } } catch (_) {}
|
| 88 |
+
try { _stage.setBloom(true); } catch (_) {}
|
| 89 |
+
|
| 90 |
+
_buildFloor();
|
| 91 |
+
_buildHub();
|
| 92 |
+
|
| 93 |
+
if (!_frameReg) { _stage.onFrame(_onFrame); _frameReg = true; }
|
| 94 |
+
|
| 95 |
+
_badge = ctx.live.createBadge();
|
| 96 |
+
_polls.push(ctx.live.poll(EP, 8000, _onData, {
|
| 97 |
+
badge: _badge, onState: (m) => { S.state = m.state; _paintOverlay(); },
|
| 98 |
+
}));
|
| 99 |
+
|
| 100 |
+
_buildOverlay();
|
| 101 |
+
return { id: ID, started: true };
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
// =============================================================================
|
| 105 |
+
// builders
|
| 106 |
+
// =============================================================================
|
| 107 |
+
function _buildFloor() {
|
| 108 |
+
const THREE = _THREE;
|
| 109 |
+
const grid = new THREE.GridHelper(40, 40, C_GRID, 0x0f2027);
|
| 110 |
+
grid.material.opacity = 0.16; grid.material.transparent = true; grid.position.y = -0.01;
|
| 111 |
+
_group.add(grid);
|
| 112 |
+
}
|
| 113 |
+
|
| 114 |
+
function _buildHub() {
|
| 115 |
+
const THREE = _THREE;
|
| 116 |
+
_hub = new THREE.Mesh(
|
| 117 |
+
new THREE.IcosahedronGeometry(0.9, 1),
|
| 118 |
+
new THREE.MeshStandardMaterial({
|
| 119 |
+
color: C_HUB, emissive: C_HUB, emissiveIntensity: 0.4,
|
| 120 |
+
transparent: true, opacity: 0.9, wireframe: true,
|
| 121 |
+
}),
|
| 122 |
+
);
|
| 123 |
+
_hub.position.set(0, 1.2, 0);
|
| 124 |
+
_group.add(_hub);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
// Build (or rebuild) one ring node per enumerated surface. Called on each live snapshot so
|
| 128 |
+
// the constellation always mirrors the CURRENT catalog (never a stale hard-coded set).
|
| 129 |
+
function _buildNodes() {
|
| 130 |
+
const THREE = _THREE;
|
| 131 |
+
_disposeNodes();
|
| 132 |
+
const list = S.surfaces;
|
| 133 |
+
const n = list.length;
|
| 134 |
+
if (!n) return;
|
| 135 |
+
|
| 136 |
+
const nodeGeo = new THREE.SphereGeometry(0.26, 14, 10);
|
| 137 |
+
const haloGeo = new THREE.RingGeometry(0.34, 0.42, 20);
|
| 138 |
+
|
| 139 |
+
for (let i = 0; i < n; i++) {
|
| 140 |
+
const surf = list[i];
|
| 141 |
+
const ang = (i / n) * Math.PI * 2;
|
| 142 |
+
const x = Math.cos(ang) * RING_R;
|
| 143 |
+
const z = Math.sin(ang) * RING_R;
|
| 144 |
+
const color = _backendColor(surf.backend);
|
| 145 |
+
|
| 146 |
+
const mesh = new THREE.Mesh(nodeGeo, new THREE.MeshStandardMaterial({
|
| 147 |
+
color, emissive: color, emissiveIntensity: 0.3,
|
| 148 |
+
transparent: true, opacity: 0.92,
|
| 149 |
+
}));
|
| 150 |
+
mesh.position.set(x, 1.2, z);
|
| 151 |
+
_group.add(mesh);
|
| 152 |
+
|
| 153 |
+
// cited-papers halo — a thin bright ring only when the surface declares citations.
|
| 154 |
+
let halo = null;
|
| 155 |
+
if (surf.cited) {
|
| 156 |
+
halo = new THREE.Mesh(haloGeo, new THREE.MeshBasicMaterial({
|
| 157 |
+
color, transparent: true, opacity: 0.5, side: THREE.DoubleSide,
|
| 158 |
+
}));
|
| 159 |
+
halo.position.copy(mesh.position);
|
| 160 |
+
halo.lookAt(0, 1.2, 0);
|
| 161 |
+
_group.add(halo);
|
| 162 |
+
}
|
| 163 |
+
|
| 164 |
+
// link hub -> node
|
| 165 |
+
const g = new THREE.BufferGeometry().setFromPoints([
|
| 166 |
+
new THREE.Vector3(0, 1.2, 0), new THREE.Vector3(x, 1.2, z),
|
| 167 |
+
]);
|
| 168 |
+
const line = new THREE.Line(g, new THREE.LineBasicMaterial({
|
| 169 |
+
color: C_HUB, transparent: true, opacity: 0.12,
|
| 170 |
+
}));
|
| 171 |
+
_group.add(line);
|
| 172 |
+
_links.push(line);
|
| 173 |
+
|
| 174 |
+
_nodes.push({ mesh, halo, backend: surf.backend, cited: !!surf.cited });
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
function _backendColor(backend) {
|
| 179 |
+
if (backend === "a11oy-native") return C_NATIVE;
|
| 180 |
+
if (backend === "cross-origin-fallback") return C_FALLBACK;
|
| 181 |
+
return C_FRONTEND;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
function _disposeNodes() {
|
| 185 |
+
const rm = (o) => {
|
| 186 |
+
if (!o) return;
|
| 187 |
+
try {
|
| 188 |
+
if (o.geometry && o.geometry.dispose) o.geometry.dispose();
|
| 189 |
+
if (o.material) { const ms = Array.isArray(o.material) ? o.material : [o.material]; ms.forEach((m) => m.dispose && m.dispose()); }
|
| 190 |
+
if (_group) _group.remove(o);
|
| 191 |
+
} catch (_) {}
|
| 192 |
+
};
|
| 193 |
+
_nodes.forEach((nd) => { rm(nd.mesh); rm(nd.halo); });
|
| 194 |
+
_links.forEach(rm);
|
| 195 |
+
_nodes = []; _links = [];
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
// =============================================================================
|
| 199 |
+
// live data handler — read VERBATIM, never upgrade
|
| 200 |
+
// =============================================================================
|
| 201 |
+
function _onData(j) {
|
| 202 |
+
S.label = (j && j.label ? String(j.label) : "MODELED").toUpperCase();
|
| 203 |
+
const sm = (j && j.summary) || {};
|
| 204 |
+
const bc = sm.backend_counts || {};
|
| 205 |
+
S.count = typeof sm.surfaces === "number" ? sm.surfaces : null;
|
| 206 |
+
S.native = typeof bc["a11oy-native"] === "number" ? bc["a11oy-native"] : 0;
|
| 207 |
+
S.fallback = typeof bc["cross-origin-fallback"] === "number" ? bc["cross-origin-fallback"] : 0;
|
| 208 |
+
S.frontend = typeof bc["frontend-only"] === "number" ? bc["frontend-only"] : 0;
|
| 209 |
+
S.cited = typeof sm.surfaces_with_citations === "number" ? sm.surfaces_with_citations : 0;
|
| 210 |
+
|
| 211 |
+
const d = (j && j.doctrine) || {};
|
| 212 |
+
S.trustCeil = typeof d.trust_ceiling === "number" ? d.trust_ceiling : null;
|
| 213 |
+
S.lambda = typeof d.lambda === "string" ? d.lambda : null;
|
| 214 |
+
S.locked = typeof d.locked_proven === "number" ? d.locked_proven : null;
|
| 215 |
+
|
| 216 |
+
const arr = Array.isArray(j && j.surfaces) ? j.surfaces : [];
|
| 217 |
+
S.surfaces = arr.map((e) => ({
|
| 218 |
+
id: e && e.id,
|
| 219 |
+
backend: e && e.backend,
|
| 220 |
+
label: e && e.label,
|
| 221 |
+
cited: !!(e && Array.isArray(e.citations) && e.citations.length),
|
| 222 |
+
}));
|
| 223 |
+
|
| 224 |
+
_buildNodes();
|
| 225 |
+
_paintOverlay();
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
// =============================================================================
|
| 229 |
+
// per-frame animation
|
| 230 |
+
// =============================================================================
|
| 231 |
+
function _onFrame() {
|
| 232 |
+
const t = performance.now();
|
| 233 |
+
if (_group) _group.rotation.y = Math.sin(t * 0.00006) * 0.12;
|
| 234 |
+
if (_hub) { _hub.rotation.y += 0.01; _hub.rotation.x += 0.004; }
|
| 235 |
+
|
| 236 |
+
// ring-sweep: light each node in turn so the whole estate reads as covered.
|
| 237 |
+
const live = S.state === "live";
|
| 238 |
+
if (_nodes.length) {
|
| 239 |
+
_sweep = (t * 0.0002) % 1;
|
| 240 |
+
const lead = Math.floor(_sweep * _nodes.length);
|
| 241 |
+
for (let i = 0; i < _nodes.length; i++) {
|
| 242 |
+
const nd = _nodes[i];
|
| 243 |
+
const near = Math.abs(i - lead) <= 1 || Math.abs(i - lead) >= _nodes.length - 1;
|
| 244 |
+
const base = live ? 0.3 : 0.12;
|
| 245 |
+
nd.mesh.material.emissiveIntensity = near && live ? 0.85 : base;
|
| 246 |
+
nd.mesh.material.opacity = live ? 0.92 : 0.4;
|
| 247 |
+
if (nd.halo) { nd.halo.rotation.z += 0.01; nd.halo.material.opacity = live ? 0.5 : 0.2; }
|
| 248 |
+
}
|
| 249 |
+
}
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
// =============================================================================
|
| 253 |
+
// overlay (HUD)
|
| 254 |
+
// =============================================================================
|
| 255 |
+
function _buildOverlay() {
|
| 256 |
+
const ctx = _ctx;
|
| 257 |
+
_show = createShowcase(ctx, {
|
| 258 |
+
id: ID, title: TITLE, accent: "#5b8dee", badge: _badge,
|
| 259 |
+
chips: [{ label: "MODELED", text: "ecosystem index", name: "lbl" }],
|
| 260 |
+
legend: ["MODELED"],
|
| 261 |
+
});
|
| 262 |
+
const host = _show.body;
|
| 263 |
+
|
| 264 |
+
const sub = document.createElement("div");
|
| 265 |
+
sub.style.cssText = "color:#9fb1bf;font-size:11px;line-height:1.55";
|
| 266 |
+
sub.innerHTML =
|
| 267 |
+
'The <b>map of the maps</b>: every registered frontier surface, with the honest data ' +
|
| 268 |
+
'label its <b>own backend</b> actually emits right now, whether it is <b>a11oy-native</b> ' +
|
| 269 |
+
'or a <b>cross-origin fallback</b>, and whether it cites papers. <b>Honest by ' +
|
| 270 |
+
'construction</b> — derived live from the app’s surface registry + registered routes + ' +
|
| 271 |
+
'each surface’s own response, never a hand-maintained list that can drift. This tab’s ' +
|
| 272 |
+
'own label is <b>MODELED</b>; per-surface labels are read <b>VERBATIM</b> and never ' +
|
| 273 |
+
'upgraded. 0 runtime CDN.';
|
| 274 |
+
host.appendChild(sub);
|
| 275 |
+
|
| 276 |
+
const card = document.createElement("div");
|
| 277 |
+
card.style.cssText = "background:#0a1117;border:1px solid #1d2a36;border-radius:9px;padding:9px 10px;display:flex;flex-direction:column;gap:6px";
|
| 278 |
+
|
| 279 |
+
const grid = document.createElement("div");
|
| 280 |
+
grid.style.cssText = "display:grid;grid-template-columns:1fr;gap:4px";
|
| 281 |
+
function kpiRow(id, label) {
|
| 282 |
+
const r = document.createElement("div");
|
| 283 |
+
r.style.cssText = "display:flex;justify-content:space-between;gap:10px;font-size:11px";
|
| 284 |
+
const l = document.createElement("span"); l.style.cssText = "color:#9fb1bf"; l.textContent = label;
|
| 285 |
+
const v = document.createElement("b");
|
| 286 |
+
v.id = id;
|
| 287 |
+
v.style.cssText = "font-variant-numeric:tabular-nums;color:#eef3f6;text-align:right;max-width:62%;overflow-wrap:anywhere";
|
| 288 |
+
v.textContent = "—";
|
| 289 |
+
_el[id] = v;
|
| 290 |
+
r.appendChild(l); r.appendChild(v); return r;
|
| 291 |
+
}
|
| 292 |
+
grid.appendChild(kpiRow("fi-count", "surfaces enumerated"));
|
| 293 |
+
grid.appendChild(kpiRow("fi-native", "a11oy-native (own honest label)"));
|
| 294 |
+
grid.appendChild(kpiRow("fi-fall", "cross-origin-fallback"));
|
| 295 |
+
grid.appendChild(kpiRow("fi-front", "frontend-only"));
|
| 296 |
+
grid.appendChild(kpiRow("fi-cited", "surfaces citing papers"));
|
| 297 |
+
grid.appendChild(kpiRow("fi-locked", "locked proofs"));
|
| 298 |
+
grid.appendChild(kpiRow("fi-trust", "trust ceiling"));
|
| 299 |
+
grid.appendChild(kpiRow("fi-lambda", "Λ"));
|
| 300 |
+
card.appendChild(grid);
|
| 301 |
+
|
| 302 |
+
const leg = document.createElement("div");
|
| 303 |
+
leg.style.cssText = "font-size:9.5px;color:#6b7a86;line-height:1.6";
|
| 304 |
+
leg.innerHTML =
|
| 305 |
+
'<span style="color:#3af4c8">■</span> a11oy-native ' +
|
| 306 |
+
'<span style="color:#f4b23a">■</span> cross-origin-fallback ' +
|
| 307 |
+
'<span style="color:#8494a1">■</span> frontend-only · halo = cites papers. ' +
|
| 308 |
+
'MODELED · labels read verbatim, never upgraded.';
|
| 309 |
+
card.appendChild(leg);
|
| 310 |
+
host.appendChild(card);
|
| 311 |
+
|
| 312 |
+
const pl = document.createElement("button");
|
| 313 |
+
pl.textContent = "◑ what this means";
|
| 314 |
+
pl.title = "Toggle plain-language explanation for investors & consumers.";
|
| 315 |
+
pl.style.cssText = "font:11px ui-monospace,monospace;padding:5px 11px;border-radius:7px;border:1px solid #3af4c8;background:#08140f;color:#3af4c8;cursor:pointer;width:fit-content";
|
| 316 |
+
pl.addEventListener("click", () => {
|
| 317 |
+
_plain = !_plain;
|
| 318 |
+
pl.style.background = _plain ? "#0f2a20" : "#08140f";
|
| 319 |
+
_applyPlain();
|
| 320 |
+
});
|
| 321 |
+
host.appendChild(pl);
|
| 322 |
+
|
| 323 |
+
const pd = document.createElement("div");
|
| 324 |
+
pd.id = "fi-plain";
|
| 325 |
+
pd.style.cssText = "font-size:10.5px;color:#c9d6df;line-height:1.55;border:1px dashed #26333f;border-radius:7px;padding:7px 9px;display:none";
|
| 326 |
+
_el["plain"] = pd;
|
| 327 |
+
host.appendChild(pd);
|
| 328 |
+
|
| 329 |
+
_paintOverlay();
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
function _applyPlain() {
|
| 333 |
+
const pd = _el["plain"];
|
| 334 |
+
if (!pd) return;
|
| 335 |
+
pd.style.display = _plain ? "block" : "none";
|
| 336 |
+
if (!_plain) return;
|
| 337 |
+
pd.innerHTML =
|
| 338 |
+
"<b>What this means:</b> this is a single honest index of everything the platform " +
|
| 339 |
+
"shows. For each surface it asks that surface’s <b>own</b> backend, live, what data " +
|
| 340 |
+
"label it stands behind (for example <b>MODELED</b>, <b>SAMPLE</b>, or <b>UNAVAILABLE</b>) " +
|
| 341 |
+
"and repeats it <b>word-for-word</b> — it never rounds a claim up. It also says whether " +
|
| 342 |
+
"the surface is served by a11oy directly or is a fallback to another service, and whether " +
|
| 343 |
+
"it cites real papers. The point is <b>anti-drift</b>: because the list is generated from " +
|
| 344 |
+
"the running app itself, it cannot quietly disagree with what is actually wired. A CI " +
|
| 345 |
+
"guard re-checks every label independently and fails the build if this catalog ever " +
|
| 346 |
+
"claimed a label a backend does not emit. No “verified/1.0” state; trust ceiling 0.97.";
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
function _tok(s) {
|
| 350 |
+
if (s === "live") return null;
|
| 351 |
+
if (s === "missing") return "NO-LIVE-DATA";
|
| 352 |
+
if (s === "degraded") return "DEGRADED";
|
| 353 |
+
if (s === "error") return "OFFLINE";
|
| 354 |
+
return "…";
|
| 355 |
+
}
|
| 356 |
+
function _set(id, v) { if (_el[id]) _el[id].textContent = v; }
|
| 357 |
+
function _n(v) { return v == null ? "—" : String(v); }
|
| 358 |
+
|
| 359 |
+
function _paintOverlay() {
|
| 360 |
+
const t = _tok(S.state);
|
| 361 |
+
if (_show) _show.setChip("lbl", S.label || "MODELED", { text: "ecosystem index" });
|
| 362 |
+
_set("fi-count", t || _n(S.count));
|
| 363 |
+
_set("fi-native", t || _n(S.native));
|
| 364 |
+
_set("fi-fall", t || _n(S.fallback));
|
| 365 |
+
_set("fi-front", t || _n(S.frontend));
|
| 366 |
+
_set("fi-cited", t || _n(S.cited));
|
| 367 |
+
_set("fi-locked", t || (S.locked != null ? String(S.locked) : "—"));
|
| 368 |
+
_set("fi-trust", t || (S.trustCeil != null ? String(S.trustCeil) : "—"));
|
| 369 |
+
_set("fi-lambda", t || (S.lambda || "—"));
|
| 370 |
+
if (_plain) _applyPlain();
|
| 371 |
+
}
|
| 372 |
+
|
| 373 |
+
// =============================================================================
|
| 374 |
+
// unmount — dispose everything; must not affect other organs
|
| 375 |
+
// =============================================================================
|
| 376 |
+
export function unmount() {
|
| 377 |
+
_polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = [];
|
| 378 |
+
try { if (_show) _show.destroy(); } catch (_) {}
|
| 379 |
+
try {
|
| 380 |
+
_disposeNodes();
|
| 381 |
+
if (_group && _stage) {
|
| 382 |
+
_group.traverse((o) => {
|
| 383 |
+
if (o.geometry && o.geometry.dispose) o.geometry.dispose();
|
| 384 |
+
if (o.material) {
|
| 385 |
+
const ms = Array.isArray(o.material) ? o.material : [o.material];
|
| 386 |
+
ms.forEach((mm) => { if (mm.dispose) mm.dispose(); });
|
| 387 |
+
}
|
| 388 |
+
});
|
| 389 |
+
_stage.scene.remove(_group);
|
| 390 |
+
}
|
| 391 |
+
} catch (_) {}
|
| 392 |
+
_group = _show = null;
|
| 393 |
+
_hub = null; _nodes = []; _links = [];
|
| 394 |
+
_el = {}; _badge = null; _plain = false; _frameReg = false; _sweep = 0;
|
| 395 |
+
_stage = _THREE = _ctx = null;
|
| 396 |
+
S.label = S.count = S.native = S.fallback = S.frontend = S.cited = null;
|
| 397 |
+
S.trustCeil = S.lambda = S.locked = null; S.surfaces = []; S.state = "init";
|
| 398 |
+
}
|
| 399 |
+
|
| 400 |
+
export default { id: ID, title: TITLE, endpoints: [EP], mount, unmount };
|