a11oy / static /3d /holographic.html
betterwithage's picture
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
66455ab verified
Raw History Blame
49.3 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Holographic Estate — a11oy</title>
<!-- 0 runtime CDN. All 3D libs vendored in-image and served same-origin via the
/static/3d/vendor/... importmap below (see VENDOR_MANIFEST.md). System fonts only. -->
<script type="importmap">
{
"imports": {
"three": "/static/3d/vendor/three/three.module.min.js",
"three/webgpu": "/static/3d/vendor/three/three.webgpu.min.js",
"three/addons/": "/static/3d/vendor/three/addons/"
}
}
</script>
<style>
:root{--bg:#05070d;--panel:#0b121b;--line:#1b2734;--teal:#39d3c4;--proof:#3af4c8;--gold:#e8c074;--cream:#eef3f6;--para:#9fb1bf;}
*{box-sizing:border-box}
html,body{margin:0;height:100%}
/* Flex column so the 3D stage always fills the space left over by the header +
tab strip, no matter how far they wrap. dvh (dynamic viewport height) tracks
the mobile address-bar collapse; svh/100vh are fallbacks for older engines. */
body{background:var(--bg);color:var(--cream);font:14px/1.5 ui-sans-serif,system-ui,Segoe UI,Roboto,Arial;
overflow:hidden;display:flex;flex-direction:column;height:100vh;height:100svh;height:100dvh}
header{padding:10px 16px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#08101a,#05070d);
display:flex;align-items:center;gap:14px;flex-wrap:wrap;flex:0 0 auto}
h1{font-size:16px;margin:0;letter-spacing:.4px}
.badge{display:inline-block;font:10.5px ui-monospace,monospace;padding:2px 7px;border-radius:6px;
border:1px solid var(--line);color:var(--gold);background:#10171f;white-space:nowrap}
#backend{color:var(--teal)}
/* Nav = a pinned ★ Featured row (flagships incl. Atlas, always visible) above a row of
collapsible CATEGORY dropdowns. Replaces the old flat wall of ~84 pills so the flagship
surfaces stand out and the rest group behind one-tap dropdowns. Accents are proof-teal
(0x3af4c8) — NEVER purple (doctrine v11 palette). */
.tabs{display:flex;flex-direction:column;gap:6px;padding:8px 12px;border-bottom:1px solid var(--line);
background:#070d15;flex:0 0 auto}
.navrow{display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.navlabel{font:9.5px ui-monospace,monospace;color:var(--para);letter-spacing:.6px;
text-transform:uppercase;opacity:.7;margin-right:2px;flex:0 0 auto}
.tab{font:11.5px ui-monospace,monospace;padding:6px 12px;border-radius:7px;border:1px solid var(--line);
background:#0a121b;color:var(--para);cursor:pointer;letter-spacing:.3px;transition:.12s;white-space:nowrap}
.tab:hover{border-color:var(--proof);color:var(--cream)}
.tab[aria-selected="true"]{background:#12202b;color:var(--cream);border-color:var(--proof);
box-shadow:0 0 0 1px var(--proof) inset}
/* Featured (flagship) pills — proof-teal star + accent so Brain/Anatomy stand out. */
.tab--feat{border-color:#20323e;color:var(--cream);background:#0b1620}
.tab--feat .star{color:var(--proof);margin-right:5px}
.tab--feat[aria-selected="true"]{border-color:var(--proof);
box-shadow:0 0 0 1px var(--proof) inset,0 0 10px rgba(58,244,200,.25)}
/* Category dropdown buttons — ▸ caret rotates to ▾ when the panel is open. */
.catbtn{font:11px ui-monospace,monospace;padding:6px 11px;border-radius:7px;border:1px solid var(--line);
background:#0a121b;color:var(--para);cursor:pointer;letter-spacing:.3px;white-space:nowrap;
display:inline-flex;align-items:center;gap:6px;transition:.12s}
.catbtn:hover{border-color:var(--proof);color:var(--cream)}
.catbtn .caret{font-size:9px;transition:transform .15s;color:var(--proof)}
.catbtn[aria-expanded="true"]{color:var(--cream);border-color:var(--proof)}
.catbtn[aria-expanded="true"] .caret{transform:rotate(90deg)}
.catbtn[data-hasactive="true"]{box-shadow:0 0 0 1px var(--proof) inset}
.catbtn .count{font-size:9px;color:var(--para);opacity:.7}
/* Drop panel: the tabs of the currently-open category (only one open at a time). */
.panel{display:none;gap:6px;flex-wrap:wrap;padding:8px;margin-top:2px;
border:1px solid var(--line);border-radius:9px;background:#08111a}
.panel[data-open="true"]{display:flex}
#stage-wrap{position:relative;flex:1 1 auto;min-height:0;width:100%}
#stage{position:absolute;inset:0}
#stage canvas{display:block;width:100%;height:100%;touch-action:none}
#fallback{position:absolute;inset:0;display:none;align-items:center;justify-content:center;
text-align:center;color:var(--para);padding:24px;font:13px ui-monospace,monospace}
footer{padding:6px 14px;border-top:1px solid var(--line);flex:0 0 auto;
background:#070d15;color:var(--para);font:10.5px ui-monospace,monospace;letter-spacing:.3px;z-index:6;
white-space:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}
a{color:var(--teal);text-decoration:none}
/* ---- Mobile / touch (<=640px) ---------------------------------------- */
@media (max-width:640px){
header{padding:8px 12px;gap:8px}
h1{font-size:14px;flex:1 1 100%}
/* Keep only the essential badges visible; hide the noisier ones on small screens. */
header .badge{font-size:9.5px;padding:2px 6px}
#three-rev-badge,#cdn-badge{display:none}
.tabs{padding:7px 10px;gap:5px}
/* Featured + category rows each scroll horizontally so they never build a tall wall;
the tapped-open panel wraps below, height-capped so it never shoves the stage off. */
.navrow{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin}
.navrow::-webkit-scrollbar{height:4px}
.navrow::-webkit-scrollbar-thumb{background:var(--line);border-radius:4px}
.navlabel{position:sticky;left:0;background:#070d15;z-index:1}
.tab,.catbtn{padding:7px 11px;font-size:11px;flex:0 0 auto}
.panel[data-open="true"]{flex-wrap:wrap;max-height:34vh;overflow-y:auto}
footer{font-size:9px;padding:5px 10px}
/* Give the 3D stage a guaranteed usable share of the screen on phones (100dvh-safe). */
#stage-wrap{min-height:46vh}
}
@media (max-width:640px) and (orientation:landscape){
#stage-wrap{min-height:56vh}
}
/* ---- Landing / intro overlay (Dev4, Wave R) --------------------------- */
/* A coherent honest entry panel that showcases the Brain + the frontier estate
+ the public /verify, sitting over the live 3D stage (which boots underneath).
Additive: dismisses to reveal the estate; every stat carries an honest label and
degrades to NO-LIVE-DATA if its same-origin endpoint 404s / is unreachable. */
#intro{position:absolute;inset:0;z-index:20;display:flex;flex-direction:column;
align-items:center;justify-content:center;gap:16px;padding:26px 20px;overflow-y:auto;
background:radial-gradient(120% 120% at 50% 0%,rgba(11,22,32,.90),rgba(5,7,13,.96));
-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);text-align:center}
#intro[hidden]{display:none}
#intro .intro-eyebrow{font:10.5px ui-monospace,monospace;letter-spacing:1.2px;
text-transform:uppercase;color:var(--gold);opacity:.85}
#intro h2{margin:0;font-size:clamp(19px,3.4vw,30px);letter-spacing:.3px;color:var(--cream);
font-weight:600;max-width:min(720px,92vw)}
#intro .intro-sub{margin:0;max-width:min(640px,90vw);color:var(--para);
font:13.5px/1.55 ui-sans-serif,system-ui,Segoe UI,Roboto,Arial}
#intro .cards{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;
max-width:min(880px,95vw);margin-top:2px}
#intro .card{flex:1 1 240px;min-width:210px;max-width:280px;text-align:left;
border:1px solid var(--line);border-radius:12px;background:#0a121bcc;padding:14px 15px;
display:flex;flex-direction:column;gap:8px}
#intro .card h3{margin:0;font:12.5px ui-monospace,monospace;letter-spacing:.4px;color:var(--cream)}
#intro .card p{margin:0;font:12px/1.5 ui-sans-serif,system-ui,Segoe UI,Roboto,Arial;color:var(--para)}
#intro .stat{font:22px ui-monospace,monospace;color:var(--proof);line-height:1.1}
#intro .stat small{font-size:11px;color:var(--para);display:block;margin-top:2px;letter-spacing:.2px}
#intro .lbl{align-self:flex-start;font:9.5px ui-monospace,monospace;padding:2px 7px;border-radius:6px;
border:1px solid var(--line);letter-spacing:.4px}
#intro .lbl[data-state="live"]{color:var(--proof);border-color:#20323e}
#intro .lbl[data-state="degraded"]{color:var(--gold);border-color:#3a2f1a}
#intro .card .go{margin-top:auto;font:11px ui-monospace,monospace;padding:7px 10px;border-radius:8px;
border:1px solid var(--line);background:#0b1620;color:var(--cream);cursor:pointer;text-align:center;
transition:.12s;text-decoration:none}
#intro .card .go:hover{border-color:var(--proof);color:var(--cream)}
#intro .enter{margin-top:6px;font:12.5px ui-monospace,monospace;padding:10px 22px;border-radius:9px;
border:1px solid var(--proof);background:#12202b;color:var(--cream);cursor:pointer;letter-spacing:.4px;
box-shadow:0 0 0 1px var(--proof) inset,0 0 12px rgba(58,244,200,.22);transition:.12s}
#intro .enter:hover{box-shadow:0 0 0 1px var(--proof) inset,0 0 18px rgba(58,244,200,.4)}
#intro .intro-foot{font:10px ui-monospace,monospace;color:var(--para);opacity:.8;letter-spacing:.3px;
max-width:min(760px,92vw)}
#intro-reopen{cursor:pointer;background:#10171f}
@media (max-width:640px){
#intro{gap:12px;padding:20px 14px;justify-content:flex-start}
#intro .cards{gap:9px}
#intro .card{padding:11px 12px;min-width:0;flex:1 1 100%;max-width:420px}
}
</style>
</head>
<body>
<header>
<h1>◇ Holographic Estate</h1>
<span class="badge" id="backend">renderer: …</span>
<button class="badge" id="gpu-toggle" title="Toggle WebGPU compute path (falls back to WebGL2 if the browser/driver can't provide a WebGPU device). WebGPU is not production-safe on all platforms — doctrine." style="cursor:pointer;background:#10171f">⚡ WebGPU: off</button>
<span class="badge" id="three-rev-badge">three r<span id="three-rev">…</span></span>
<span class="badge" id="cdn-badge">0 runtime CDN</span>
<span class="badge">Λ = Conjecture 1</span>
<button class="badge" id="intro-reopen" title="Reopen the landing overview (Brain · frontier estate · public verify)">◇ intro</button>
<a href="/verify" class="badge" title="Public receipt verifier — paste a signed Khipu receipt / DSSE envelope for a PASS/FAIL panel">✓ verify</a>
<a href="/" style="margin-left:auto;font:11px ui-monospace,monospace">← a11oy</a>
</header>
<nav class="tabs" id="tabs" role="tablist" aria-label="Estate surfaces">
<div class="navrow" id="featured-row"><span class="navlabel">★ Featured</span></div>
<div class="navrow" id="cat-row"><span class="navlabel">Categories</span></div>
<div id="cat-panels"></div>
</nav>
<div id="stage-wrap">
<div id="stage"></div>
<div id="fallback">3D unavailable on this device — the holographic estate needs a WebGL2 or WebGPU canvas.<br>
All underlying data is still available as JSON at the per-surface endpoints.</div>
<!-- Landing overlay (Dev4): coherent honest entry over the live estate. -->
<div id="intro" role="dialog" aria-label="a11oy holographic estate — landing overview" hidden>
<div class="intro-eyebrow">SZL Holdings · Doctrine v11 · Λ = Conjecture 1</div>
<h2>The governed agentic substrate, rendered as a holographic estate</h2>
<p class="intro-sub">Every value each surface shows traces to a real same-origin a11oy endpoint and
carries its own honesty label (MEASURED / MODELED / SAMPLE / STRUCTURAL-ONLY). Nothing here is
invented. Start with the Brain, walk the frontier estate, or verify a signed receipt yourself.</p>
<div class="cards">
<div class="card" id="card-brain">
<span class="lbl" data-state="degraded" id="brain-lbl">NO-LIVE-DATA</span>
<h3>Brain — live knowledge graph</h3>
<div class="stat" id="brain-stat">—<small id="brain-sub">distinct artifacts (harvested)</small></div>
<p id="brain-note">The estate's own harvested graph. Distinct artifacts is the honest headline;
the raw node count is larger (dominated by arXiv co-author nodes).</p>
<button class="go" data-go="brain">Open the Brain →</button>
</div>
<div class="card" id="card-estate">
<span class="lbl" data-state="degraded" id="estate-lbl">NO-LIVE-DATA</span>
<h3>Frontier estate</h3>
<div class="stat" id="estate-stat">—<small>3D surfaces, each wired to a live backend</small></div>
<p>Attention, reasoning, governance, proof, energy, defense and more — grouped behind the
category dropdowns above. locked-proven formulas = 8 (never inflated).</p>
<button class="go" data-go="frontierindex">Explore the estate →</button>
</div>
<div class="card" id="card-verify">
<span class="lbl" data-state="live">PUBLIC</span>
<h3>Verify it yourself</h3>
<div class="stat">✓<small>signed Khipu receipt / DSSE envelope</small></div>
<p>Receipts sign on state changes, never on reads. Paste a receipt id or envelope into the
public verifier for an independent PASS / FAIL panel — no login.</p>
<a class="go" href="/verify">Open /verify →</a>
</div>
</div>
<button class="enter" id="intro-enter">Enter the estate →</button>
<div class="intro-foot">Doctrine v11 · locked = 8 {F1,F4,F7,F11,F12,F18,F19,F22} · Λ = Conjecture 1 ·
Khipu BFT = Conjecture 2 · 0 runtime CDN (three.js vendored in-image) · trust &lt; 100%</div>
</div>
</div>
<footer>Doctrine v11 · locked = 8 @ c7c0ba17 · Λ = Conjecture 1 · Khipu BFT = Conjecture 2 ·
shared szl3d toolkit (Dev0) · every value carries its honesty label · trust &lt; 100%</footer>
<script type="module">
import szl3d from "/static/3d/szl3d/szl3d_boot.js";
import * as live from "/static/3d/szl3d/szl3d_live.js";
import * as label from "/static/3d/szl3d/szl3d_label.js";
import * as THREE from "three";
// The 9 surface slots the other devs fill. Lazy-loaded per tab.
const SURFACES = [
{ id: "atlas", cat: "map", flag: true, title: "Atlas", mod: "/static/3d/surfaces/atlas.js" },
{ id: "frontier", cat: "map", title: "Frontier", mod: "/static/3d/surfaces/frontier.js" },
{ id: "neuromorphic", cat: "more", title: "Neuromorphic", mod: "/static/3d/surfaces/neuromorphic.js" },
{ id: "interpretability", cat: "governance", title: "Interpretability", mod: "/static/3d/surfaces/interpretability.js" },
{ id: "circuits", cat: "governance", title: "Attribution Graph \u00b7 Circuit Tracing", mod: "/static/3d/surfaces/circuits.js" },
{ id: "worldmodel", cat: "attention", title: "World Model", mod: "/static/3d/surfaces/worldmodel.js" },
{ id: "qec", cat: "proof", title: "Topological QEC", mod: "/static/3d/surfaces/qec.js" },
{ id: "episodic", cat: "brain", title: "Episodic Memory", mod: "/static/3d/surfaces/episodic.js" },
{ id: "testtime", cat: "reasoning", title: "Test-Time Compute", mod: "/static/3d/surfaces/testtime.js" },
{ id: "ssm", cat: "attention", title: "State-Space (Mamba-3)", mod: "/static/3d/surfaces/ssm.js" },
{ id: "genie", cat: "attention", title: "Genie World-Model", mod: "/static/3d/surfaces/genie.js" },
{ id: "specdecode", cat: "attention", title: "Speculative Decoding", mod: "/static/3d/surfaces/specdecode.js" },
{ id: "flowmatch", cat: "attention", title: "Flow Matching", mod: "/static/3d/surfaces/flowmatch.js" },
{ id: "dllm", cat: "attention", title: "Diffusion LLM", mod: "/static/3d/surfaces/dllm.js" },
{ id: "moe", cat: "attention", title: "MoE Router", mod: "/static/3d/surfaces/moe.js" },
{ id: "formalmath", cat: "governance", title: "Formal-Math Retrieval", mod: "/static/3d/surfaces/formalmath.js" },
{ id: "ccattest", cat: "proof", title: "Confidential-Compute Attest", mod: "/static/3d/surfaces/ccattest.js" },
{ id: "attestinfer", cat: "proof", title: "Attested Inference", mod: "/static/3d/surfaces/attestinfer.js" },
{ id: "pcai", cat: "proof", title: "Proof-Carrying Attested Inference", mod: "/static/3d/surfaces/pcai.js" },
{ id: "ringattn", cat: "attention", title: "Ring Attention", mod: "/static/3d/surfaces/ringattn.js" },
{ id: "grpo", cat: "rl", title: "GRPO Reward Dynamics", mod: "/static/3d/surfaces/grpo.js" },
{ id: "kvcache", cat: "quant", title: "KV-Cache H2O", mod: "/static/3d/surfaces/kvcache.js" },
{ id: "mla", cat: "attention", title: "Latent Attention (MLA)", mod: "/static/3d/surfaces/mla.js" },
{ id: "blt", cat: "attention", title: "Byte-Latent Patching", mod: "/static/3d/surfaces/blt.js" },
{ id: "nsa", cat: "attention", title: "Native Sparse Attention", mod: "/static/3d/surfaces/nsa.js" },
{ id: "kan", cat: "attention", title: "Kolmogorov-Arnold Network", mod: "/static/3d/surfaces/kan.js" },
{ id: "steering", cat: "governance", title: "Steering Vectors (ActAdd / RepE)", mod: "/static/3d/surfaces/steering.js" },
{ id: "titans", cat: "brain", title: "Titans Neural Long-Term Memory", mod: "/static/3d/surfaces/titans.js" },
{ id: "mor", cat: "reasoning", title: "Mixture-of-Recursions (adaptive depth)", mod: "/static/3d/surfaces/mor.js" },
{ id: "goat", cat: "attention", title: "GOAT Optimal-Transport Attention", mod: "/static/3d/surfaces/goat.js" },
{ id: "kla", cat: "attention", title: "Kaczmarz Linear Attention", mod: "/static/3d/surfaces/kla.js" },
{ id: "hrm", cat: "reasoning", title: "Hierarchical Reasoning Model", mod: "/static/3d/surfaces/hrm.js" },
{ id: "pfield", cat: "anatomy", title: "Pressure-Field Coordination", mod: "/static/3d/surfaces/pfield.js" },
{ id: "qhall", cat: "governance", title: "Quantum-Inspired Hallucination UQ", mod: "/static/3d/surfaces/qhall.js" },
{ id: "aimc", cat: "attention", title: "Analog In-Memory Attention", mod: "/static/3d/surfaces/aimc.js" },
{ id: "ternary", cat: "quant", title: "Ternary 1.58-bit Weights", mod: "/static/3d/surfaces/ternary.js" },
{ id: "sement", cat: "governance", title: "Semantic-Entropy Uncertainty", mod: "/static/3d/surfaces/sement.js" },
{ id: "inplacettt", cat: "reasoning", title: "In-Place Test-Time Training", mod: "/static/3d/surfaces/inplacettt.js" },
{ id: "nested", cat: "brain", title: "Nested Learning (multi-timescale)", mod: "/static/3d/surfaces/nested.js" },
{ id: "matgran", cat: "brain", title: "Matryoshka Representation Granularity", mod: "/static/3d/surfaces/matgran.js" },
{ id: "graphmem", cat: "brain", title: "Multi-Graph Agentic Memory", mod: "/static/3d/surfaces/graphmem.js" },
{ id: "elf", cat: "attention", title: "Continuous-Embedding Flow LM", mod: "/static/3d/surfaces/elf.js" },
{ id: "s3search", cat: "quant", title: "Stratified Denoise Search", mod: "/static/3d/surfaces/s3search.js" },
{ id: "slidesparse", cat: "quant", title: "Structured-Sparse Layout Packing", mod: "/static/3d/surfaces/slidesparse.js" },
{ id: "catq", cat: "quant", title: "Calibration Ternary Quant", mod: "/static/3d/surfaces/catq.js" },
{ id: "rauq", cat: "governance", title: "Attention-Pattern Uncertainty", mod: "/static/3d/surfaces/rauq.js" },
{ id: "agentcoh", cat: "brain", title: "Multi-Agent Memory Coherence", mod: "/static/3d/surfaces/agentcoh.js" },
{ id: "energy", cat: "energy", title: "Energy", mod: "/static/3d/surfaces/energy.js" },
{ id: "fabric", cat: "defense", title: "Fabric", mod: "/static/3d/surfaces/fabric.js" },
{ id: "pnt", cat: "defense", title: "PNT", mod: "/static/3d/surfaces/pnt.js" },
{ id: "counter-uas", cat: "defense", title: "Counter-UAS", mod: "/static/3d/surfaces/counter-uas.js" },
{ id: "governance", cat: "governance", flag: true, title: "Governance", mod: "/static/3d/surfaces/governance.js" },
{ id: "pinn", cat: "defense", title: "PINN", mod: "/static/3d/surfaces/pinn.js" },
{ id: "router", cat: "defense", title: "Router", mod: "/static/3d/surfaces/router.js" },
{ id: "anatomy", cat: "anatomy", title: "Anatomy", mod: "/static/3d/surfaces/anatomy.js" },
{ id: "anatomy_body", cat: "anatomy", flag: true, title: "Anatomy · Living Body", mod: "/static/3d/surfaces/anatomy_body.js" },
{ id: "estate", cat: "map", title: "Estate", mod: "/static/3d/surfaces/estate.js" },
{ id: "muon", cat: "attention", title: "Muon Orthogonalized-Momentum Optimizer", mod: "/static/3d/surfaces/muon.js" },
{ id: "specexec", cat: "attention", title: "Tree Speculative Execution", mod: "/static/3d/surfaces/specexec.js" },
{ id: "nvfp4", cat: "quant", title: "NVFP4 4-bit Training Format", mod: "/static/3d/surfaces/nvfp4.js" },
{ id: "keyless", cat: "attention", title: "Keyless Attention (Value-Only Cache)", mod: "/static/3d/surfaces/keyless.js" },
{ id: "gitthoughts", cat: "reasoning", title: "GitOfThoughts (Version-Controlled Reasoning)", mod: "/static/3d/surfaces/gitthoughts.js" },
{ id: "herotq", cat: "quant", title: "HeRo-Q Hessian-Conditioned Quantization", mod: "/static/3d/surfaces/herotq.js" },
{ id: "dla", cat: "attention", title: "Dynamic Linear Attention", mod: "/static/3d/surfaces/dla.js" },
{ id: "ctxready", cat: "reasoning", title: "Context-Ready Transformer", mod: "/static/3d/surfaces/ctxready.js" },
{ id: "opera", cat: "reasoning", title: "OPERA Perplexity-Reward Alignment", mod: "/static/3d/surfaces/opera.js" },
{ id: "brain", cat: "brain", flag: true, title: "Brain — live knowledge graph", mod: "/static/3d/surfaces/brain.js" },
{ id: "zkinfer", cat: "proof", title: "zkML Proof-of-Inference (Cryptographic Receipts)", mod: "/static/3d/surfaces/zkinfer.js" },
{ id: "flower", cat: "brain", title: "Flower Brain", mod: "/static/3d/surfaces/flower.js" },
{ id: "agentmem", cat: "brain", title: "AgentMem · Λ-Governed Agent Memory (synthesis)", mod: "/static/3d/surfaces/agentmem.js" },
{ id: "loopforge", cat: "brain", title: "Loop Forge", mod: "/static/3d/surfaces/loopforge.js" },
{ id: "edgefusion", cat: "energy", title: "EdgeFusion · Λ-Gated Energy-Proportional Sensor Fusion (synthesis)", mod: "/static/3d/surfaces/edgefusion.js" },
{ id: "evalarena", cat: "governance", flag: true, title: "Eval Arena · Governed Eval / Red-Team", mod: "/static/3d/surfaces/evalarena.js" },
{ id: "vqc", cat: "energy", title: "Governed VQC · Parameter-Shift Hybrid QML (MODELED)", mod: "/static/3d/surfaces/vqc.js" },
{ id: "harness", cat: "governance", title: "Governed Model Harness · Behavior Transfer", mod: "/static/3d/surfaces/harness.js" },
{ id: "aigov", cat: "governance", title: "AI Governance Conformance · Λ-Advisory Readiness (crosswalk)", mod: "/static/3d/surfaces/aigov.js" },
{ id: "fmverif", cat: "proof", title: "Proof-Carrying Inference (Machine-Checkable Certificates)", mod: "/static/3d/surfaces/fmverif.js" },
{ id: "supplychain", cat: "proof", title: "Model-Artifact Provenance (SLSA / in-toto / Rekor / C2PA)", mod: "/static/3d/surfaces/supplychain.js" },
{ id: "hybridssm", cat: "attention", title: "HybridSSM · Attention vs State-Space vs Hybrid Frontier (synthesis)", mod: "/static/3d/surfaces/hybridssm.js" },
{ id: "governedagent", cat: "reasoning", title: "Governed Agent Loop · plan→act→self-eval→gate→retry", mod: "/static/3d/surfaces/governedagent.js" },
{ id: "governedrag", cat: "reasoning", title: "Governed RAG · Retrieval-with-Receipts", mod: "/static/3d/surfaces/governedrag.js" },
{ id: "ecosystem", cat: "defense", flag: true, title: "Harness · Ecosystem Status", mod: "/static/3d/surfaces/ecosystem.js" },
{ id: "brainquery", cat: "brain", flag: true, title: "Brain Query · ask the graph (retrieval)", mod: "/static/3d/surfaces/brainquery.js" },
{ id: "sovereign", cat: "energy", flag: true, title: "Sovereign Local Model · status · doctrine self-test · Stage A/B · signed receipt", mod: "/static/3d/surfaces/sovereign.js" },
{ id: "brainbody", cat: "anatomy", title: "Anatomy \u00b7 Body lit by the Brain (pulse + energy)", mod: "/static/3d/surfaces/brainbody.js" },
{ id: "braincommand", cat: "brain", title: "Brain Command · pulse · subscribe/budget · signed receipt (Brain powering the ecosystem)", mod: "/static/3d/surfaces/braincommand.js" },
{ id: "mesh", cat: "defense", title: "Sovereign Mesh · Cross-Node Orchestration (status/route/quorum)", mod: "/static/3d/surfaces/mesh.js" },
{ id: "agenttts", cat: "reasoning", title: "Agent Test-Time Compute · Multi-Agent TTC (live)", mod: "/static/3d/surfaces/agenttts.js" },
{ id: "cryptopipeline", cat: "proof", title: "Crypto-Pipeline · End-to-End AI Lifecycle Verifiable Transcript (MODELED)", mod: "/static/3d/surfaces/cryptopipeline.js" },
{ id: "gateddelta", cat: "attention", title: "Gated Delta-Rule Linear Attention · state recall (MODELED)", mod: "/static/3d/surfaces/gateddelta.js" },
{ id: "agentops", cat: "reasoning", title: "Agent Ops · bounded operate loop (ground→act→self-eval→gate, Ouroboros-bounded, writer≠judge)", mod: "/static/3d/surfaces/agentops.js" },
{ id: "lgmi", cat: "governance", title: "LGMI · Λ-Governed Mechanistic Interpretability (synthesis)", mod: "/static/3d/surfaces/lgmi.js" },
{ id: "gnqs", cat: "quant", title: "GNQS · Governed-Norm Quantization Stability (synthesis)", mod: "/static/3d/surfaces/gnqs.js" },
{ id: "casta", cat: "defense", title: "CASTA · Clean-room Anomaly × Streaming Test-time Adaptation (synthesis)", mod: "/static/3d/surfaces/casta.js" },
{ 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" },
{ id: "sparsemoe", cat: "quant", title: "Extreme-Sparsity MoE Analyzer · activation-ratio ↔ inference-cost tradeoff (STRUCTURAL-ONLY)", mod: "/static/3d/surfaces/sparsemoe.js" },
{ id: "pddisagg", cat: "defense", title: "Prefill/Decode Disaggregation Map · colocated vs disaggregated latency across the mesh (STRUCTURAL-ONLY/ROADMAP)", mod: "/static/3d/surfaces/pddisagg.js" },
{ id: "execverify", cat: "reasoning", title: "Execution-Verified Synthesis Loop · eval → verified trajectory → corpus candidate → receipt (STRUCTURAL-ONLY)", mod: "/static/3d/surfaces/execverify.js" },
{ id: "opsdash", cat: "governance", flag: true, title: "Ops Dashboard · live estate health · GREEN/DEGRADED/UNAVAILABLE rollup + per-surface honest labels + /verify", mod: "/static/3d/surfaces/opsdash.js" },
{ id: "flowbrain", cat: "brain", flag: true, title: "FlowBrain · continuous belief-flow lens · tiers as thresholds crossed on x_t∈[0,1] + 1D-time⊗1D-node axis-factorization (STRUCTURAL-ONLY; borrows B[FM]² continuous-flow principle, NO EEG)", mod: "/static/3d/surfaces/flowbrain.js" },
{ id: "blocksparse", cat: "attention", title: "Learned Blockwise Top-k KV Sparse Attention · selection (MODELED)", mod: "/static/3d/surfaces/blocksparse.js" },
{ id: "confattest", cat: "governance", title: "Confidential-Compute Attestation + Action Gate · SIMULATED enclave quote → receipt · govern ACTIONS not reasoning (MODELED)", mod: "/static/3d/surfaces/confattest.js" },
{ id: "retrievalattn", cat: "attention", title: "Retrieval-Modulated Long-Context Attention · needle recall (MODELED)", mod: "/static/3d/surfaces/retrievalattn.js" },
{ id: "whatsnew", cat: "brain", title: "What's New · honest auto-derived estate changelog · recently-added surfaces w/ verbatim labels + citations from real git history (drift-proof)", mod: "/static/3d/surfaces/whatsnew.js" },
{ id: "honestywall", cat: "governance", title: "Honesty Wall · live integrity aggregation · reads each surface's OWN honest label VERBATIM + estate honesty invariants → INTACT/DEGRADED/VIOLATED verdict, unsigned SHA-256 receipt-on-write (drift-proof)", mod: "/static/3d/surfaces/honestywall.js" },
{ id: "agentos", cat: "governance", flag: true, title: "Agent OS Map · live self-honest operator's-eye map of the agent OS · nodes (daily loop←agentops, trust ledger←anatomy+receipts+honestywall, standing goals←doctrine+locked-8, optional loops←governedagent/governedrag/loopforge/mesh) with LIVE per-node verdict from the honestywall aggregate → OPERATING/DEGRADED/HALTED-HONEST, never OPERATING if anything VIOLATED, unsigned SHA-256 receipt-on-write (drift-proof)", mod: "/static/3d/surfaces/agentos.js" },
{ id: "brainground", cat: "brain", title: "Brainground · grounding-confidence + honest abstention over brain retrieval · scores the brain's REAL grounding_subgraph (seed coverage · subgraph cohesion · salience mass · community consistency) → GROUNDED/WEAK-GROUNDING/INSUFFICIENT-GROUNDING, brain abstains when grounding is weak, MODELED (never MEASURED), unsigned SHA-256 receipt-on-write", mod: "/static/3d/surfaces/brainground.js" },
{ id: "brainmemory", cat: "brain", title: "Brain Memory Freshness · honest episodic decay proxy over the knowledge graph · deterministic per-node freshness (recency + structure when a real timestamp exists, else STRUCTURAL-ONLY connectivity+salience proxy, never a fabricated timestamp) -> FRESH/AGING/STALE, STALE flagged for re-harvest, unsigned SHA-256 receipt-on-write (drift-proof)", mod: "/static/3d/surfaces/brainmemory.js" },
{ id: "brainprovenance", cat: "brain", title: "Brain Provenance · per-answer source-lineage chain · which knowledge-graph nodes supported the answer, each node's OWN label VERBATIM + contribution_weight + coverage (HARVESTED/MODELED/UNAVAILABLE) → TRACEABLE/PARTIAL-PROVENANCE/UNTRACEABLE, never TRACEABLE while any node UNAVAILABLE, unsigned SHA-256 receipt-on-write (source-lineage of an answer, NOT build/model attestation)", mod: "/static/3d/surfaces/brainprovenance.js" },
{ id: "braincontradict", cat: "brain", flag: true, title: "Brain Contradiction Detector · surfaces potential contradictions between grounded knowledge-graph claims HONESTLY via transparent deterministic heuristics (negation polarity / antonym opposition / numeric conflict) → NO-CONFLICT/POSSIBLE-CONFLICT/CONFLICT-FLAGGED · PRESENTS conflicts, NEVER resolves them (adjudication=human-required), unsigned SHA-256 receipt-on-write (MODELED)", mod: "/static/3d/surfaces/braincontradict.js" },
{ id: "brainuncertainty", cat: "brain", title: "Brain Uncertainty · calibrated honest uncertainty on a brain retrieval · reads the same honest ranked retrieval and derives score dispersion + retrieval entropy + rank stability → one uncertainty in [0,1] with a CONFIDENT/UNCERTAIN/HIGHLY-UNCERTAIN verdict (recommends abstain), never CONFIDENT when dispersion/entropy high, MODELED calibration honesty not a probability, unsigned SHA-256 receipt-on-write", mod: "/static/3d/surfaces/brainuncertainty.js" },
{ id: "brainhealth", cat: "brain", title: "Brain Health · live \"can the brain be trusted for this query right now?\" rollup · reads each brain-honesty surface's OWN label VERBATIM (grounding, freshness, provenance, contradiction, uncertainty), degrades absent siblings to UNAVAILABLE → TRUSTWORTHY/DEGRADED/UNTRUSTWORTHY/INSUFFICIENT-SIGNAL, never TRUSTWORTHY if any available component abstains, unsigned SHA-256 receipt-on-write (MODELED)", mod: "/static/3d/surfaces/brainhealth.js" },
{ id: "brainwatch", cat: "brain", title: "Brain Watch · knowledge-graph honesty-posture drift monitor · MEASURED label-distribution/orphan/community/salience snapshot vs a caller-supplied PRIOR → STABLE/DRIFTING/DEGRADED/BASELINE-ONLY (no fabricated trend without a real prior), unsigned SHA-256 receipt-on-write", mod: "/static/3d/surfaces/brainwatch.js" },
{ id: "brainconsensus", cat: "brain", title: "Brain Consensus · honest corroboration of a brain grounding · measures how MANY distinct nodes support a query and how many distinct communities they span (cross-community agreement is stronger than one clique) → CORROBORATED/WEAK-CORROBORATION/SINGLE-SOURCE, single-source-risk flag when support collapses to one node/community, never CORROBORATED while that flag is set, MODELED corroboration honesty not a truth guarantee, unsigned SHA-256 receipt-on-write", mod: "/static/3d/surfaces/brainconsensus.js" },
{ id: "brainqueryaudit", cat: "brain", title: "Brain Query Audit · append-only hash-linked ledger of brain queries + the honest verdict each returned · POST appends {query, verdict, grounding_label} and mints an UNSIGNED SHA-256 receipt chained to the prior entry (tamper-evident); GET recomputes the whole chain → CHAIN-INTACT/CHAIN-BROKEN (never softened), ephemeral in-memory ledger labelled honestly, MODELED, receipt-on-write-not-on-read", mod: "/static/3d/surfaces/brainqueryaudit.js" },
{ id: "brainlineage", cat: "brain", title: "Brain Lineage · node-origin chain · how each knowledge-graph node ENTERED the graph, read VERBATIM from its OWN real origin fields (source/url → structural derivation → none) → TRACED/PARTIAL-LINEAGE/UNKNOWN-ORIGIN, a node with no source is UNKNOWN-ORIGIN never a fabricated source, aggregate never TRACED while any origin UNKNOWN, unsigned SHA-256 receipt-on-write (node-origin lineage, NOT per-answer provenance, NOT build/model attestation)", mod: "/static/3d/surfaces/brainlineage.js" },
{ id: "brainexplain", cat: "brain", title: "Brain Explain · transparent explanation of WHY the brain retrieved what it did · MODELED descriptive trace over the REAL retrieval subgraph (which query terms matched which seed nodes, per-node ppr-vs-salience rationale, communities traversed, each node's OWN label VERBATIM) → EXPLAINABLE/PARTIALLY-EXPLAINABLE/OPAQUE (never invents a rationale; honest OPAQUE beats a fake one), unsigned SHA-256 receipt-on-write", mod: "/static/3d/surfaces/brainexplain.js" },
{ id: "braingaps", cat: "brain", title: "Brain Gaps · an honest map of what the brain does NOT know · MEASURED thin (sparse) communities + weakly-connected island nodes (degree≤1) + weak-label share over the live graph, and per-query COVERED/THIN/GAP grounding → estate verdict WELL-COVERED/PATCHY/SPARSE (a GAP is never fabricated into coverage), unsigned SHA-256 receipt-on-write (MODELED)", mod: "/static/3d/surfaces/braingaps.js" },
{ id: "brainconstitution", cat: "brain", title: "Brain Constitution · the honest, machine-checkable ruleset the brain is graded against per query · an explicit ordered set of ARTICLES (grounding sufficiency, calibrated confidence, honest corroboration, contradictions surfaced, traceable to source, freshness honesty, coverage gaps admitted, doctrine invariants) each graded COMPLIANT/VIOLATED/UNAVAILABLE against whatever sibling brain-honesty surfaces are importable (an absent surface is UNAVAILABLE, never a fabricated pass) → CONSTITUTIONAL/IN-VIOLATION/INSUFFICIENT-SIGNAL, never CONSTITUTIONAL while any evaluable Article is VIOLATED, unsigned SHA-256 receipt-on-write (MODELED)", mod: "/static/3d/surfaces/brainconstitution.js" },
{ id: "markets", cat: "finance", flag: true, title: "Markets & Finance · live Polymarket prediction book (top markets by 24h volume, pillar height = 24h vol, bead = YES probability) + crypto majors orbiting by market cap · 100% MEASURED same-origin deva finance feeds, no mocked spend/keys, log-scaling is display-only", mod: "/static/3d/surfaces/finance.js" },
{ id: "leaders", cat: "more", flag: true, title: "Frontier Models · Live AI Leaders · MEASURED live OpenRouter model catalog — one pillar per lab (height = max context window, bead = open/free share); widest-context models orbit as satellites (teal = free, amber = paid); log-scaling is display-only, no invented benchmark or ranking", mod: "/static/3d/surfaces/leaders.js" },
];
const stageEl = document.getElementById("stage");
const tabsEl = document.getElementById("tabs");
const fallbackEl = document.getElementById("fallback");
document.getElementById("three-rev").textContent = THREE.REVISION;
let stage = null;
let current = null; // { def, instance }
let loadToken = 0;
// WebGPU opt-in: seeded from ?webgpu=1, flippable live via the header toggle. WebGPU is not
// production-safe on all browsers/drivers yet (doctrine) so WebGL2 stays the default; the
// toolkit's probe is timeout-guarded and falls back honestly if no device is available.
let wantWebGPU = /[?&]webgpu=1\b/.test(location.search);
async function ensureStage() {
if (stage) return stage;
try {
stage = await szl3d.boot(stageEl, {
bloom: { strength: 0.85, radius: 0.5, threshold: 0.18 },
cameraPos: [0, 5, 16],
forceWebGL: !wantWebGPU,
});
document.getElementById("backend").textContent = "renderer: " + stage.backend.toUpperCase();
_syncGpuToggle();
stage.start();
} catch (e) {
fallbackEl.style.display = "flex";
document.getElementById("backend").textContent = "renderer: UNAVAILABLE";
console.error("[holographic] stage boot failed:", e);
throw e;
}
return stage;
}
function _syncGpuToggle() {
const btn = document.getElementById("gpu-toggle");
if (!btn) return;
const on = stage && stage.backend === "webgpu";
btn.textContent = "\u26a1 WebGPU: " + (on ? "on" : (wantWebGPU ? "requested" : "off"));
btn.style.color = on ? "var(--proof, #3af4c8)" : "var(--gold)";
btn.style.borderColor = on ? "var(--teal)" : "var(--line)";
}
// Tear down the current stage + surface and re-boot with the new renderer preference, then
// re-mount the active surface. Used by the header WebGPU toggle so users can engage the
// compute path on capable browsers without editing the URL.
async function rebootStage() {
const active = current ? current.def.id : (SURFACES[0] && SURFACES[0].id);
try { if (current && current.instance && current.instance.unmount) current.instance.unmount(); } catch (_) {}
current = null;
try { if (stage && stage.dispose) stage.dispose(); } catch (_) {}
stage = null;
// The toolkit's dispose() releases the GL context but leaves its <canvas> in the DOM;
// a fresh boot() appends a new one. Remove the orphaned canvas(es) here so a toggle
// never accumulates duplicate canvases / leaked contexts.
try { stageEl.querySelectorAll("canvas").forEach((c) => c.remove()); } catch (_) {}
fallbackEl.style.display = "none";
await selectSurface(active);
}
function clearScene() {
if (!stage) return;
// Remove everything the previous surface added except the default lights.
const keep = new Set();
stage.scene.traverse((o) => { if (o.isLight) keep.add(o); });
for (let i = stage.scene.children.length - 1; i >= 0; i--) {
const o = stage.scene.children[i];
if (!keep.has(o)) stage.scene.remove(o);
}
// reset per-frame callbacks by re-booting frame list is overkill; surfaces guard on null.
}
async function selectSurface(id) {
const def = SURFACES.find((s) => s.id === id);
if (!def) return;
const token = ++loadToken;
// visual selection state: mark every tab button with this id (a flagship appears both in
// the ★ Featured row and inside its category panel), auto-open the active category, and
// proof-teal-flag the owning dropdown button.
_highlight(id);
await ensureStage();
// tear down previous
if (current && current.instance && current.instance.unmount) {
try { current.instance.unmount(); } catch (_) {}
}
clearScene();
let mod;
try { mod = await import(def.mod); }
catch (e) { console.error("[holographic] failed to load surface", id, e); return; }
if (token !== loadToken) return; // a newer tab click superseded us
const surface = mod.default || mod;
const ctx = { stage, container: stageEl, live, label, THREE, szl3d };
try {
surface.mount(ctx);
current = { def, instance: surface };
history.replaceState(null, "", "#" + id);
} catch (e) {
console.error("[holographic] surface mount threw", id, e);
}
}
// ---- grouped nav: pinned ★ Featured row + collapsible category dropdowns ----
// Category display order + labels (spec taxonomy). Only categories with >=1 surface are
// rendered; any surface without a `cat` falls to "more" (safety net — never dropped).
const CATS = [
["map", "Map"],
["brain", "Brain & Memory"],
["anatomy", "Anatomy & Living System"],
["reasoning", "Reasoning & Agents"],
["attention", "Attention & Architecture"],
["quant", "Quantization & Efficiency"],
["governance", "Governance & Assurance"],
["proof", "Proof & Attestation"],
["energy", "Energy & Sovereign"],
["defense", "Defense & Fleet"],
["rl", "RL & Training"],
["more", "More"],
];
const catOf = (s) => s.cat || "more";
const featuredRow = document.getElementById("featured-row");
const catRow = document.getElementById("cat-row");
const catPanels = document.getElementById("cat-panels");
const _panels = {}; // cat -> drop-panel element
const _catBtns = {}; // cat -> dropdown button
function _makeTab(s, feat) {
const b = document.createElement("button");
b.className = "tab" + (feat ? " tab--feat" : "");
b.dataset.id = s.id; b.dataset.cat = catOf(s);
b.setAttribute("role", "tab"); b.setAttribute("aria-selected", "false");
b.title = s.title;
if (feat) {
const star = document.createElement("span"); star.className = "star"; star.textContent = "★";
b.appendChild(star); b.appendChild(document.createTextNode(s.title));
} else {
b.textContent = s.title;
}
b.addEventListener("click", () => {
selectSurface(s.id);
// On the mobile horizontal strips, keep the tapped tab in view.
try { b.scrollIntoView({ behavior: "smooth", inline: "center", block: "nearest" }); } catch (_) {}
});
return b;
}
// Open exactly one category panel (or close all when open=false). One open at a time.
function openCategory(cat, open) {
Object.keys(_panels).forEach((c) => {
const on = (c === cat) ? open : false;
_panels[c].dataset.open = String(on);
if (_catBtns[c]) _catBtns[c].setAttribute("aria-expanded", String(on));
});
}
// (a) pinned Featured row — flagships (incl. Atlas), always visible above the dropdowns.
SURFACES.filter((s) => s.flag).forEach((s) => featuredRow.appendChild(_makeTab(s, true)));
// (b) category dropdown buttons + their drop panels.
CATS.forEach(([cat, label]) => {
const items = SURFACES.filter((s) => catOf(s) === cat);
if (!items.length) return;
const btn = document.createElement("button");
btn.className = "catbtn"; btn.type = "button";
btn.dataset.cat = cat; btn.setAttribute("aria-expanded", "false");
const caret = document.createElement("span"); caret.className = "caret"; caret.textContent = "▸";
btn.appendChild(caret);
btn.appendChild(document.createTextNode(label + " "));
const cnt = document.createElement("span"); cnt.className = "count"; cnt.textContent = String(items.length);
btn.appendChild(cnt);
const panel = document.createElement("div");
panel.className = "panel"; panel.dataset.cat = cat; panel.dataset.open = "false";
items.forEach((s) => panel.appendChild(_makeTab(s, false)));
btn.addEventListener("click", () => openCategory(cat, panel.dataset.open !== "true"));
catRow.appendChild(btn);
catPanels.appendChild(panel);
_panels[cat] = panel; _catBtns[cat] = btn;
});
// Mark every tab button carrying `id` as selected (a flagship is in both the Featured row
// and its category panel), auto-open the active surface's category, and proof-teal-flag the
// owning dropdown button so the current location is always legible.
function _highlight(id) {
const def = SURFACES.find((s) => s.id === id);
const cat = def ? catOf(def) : null;
tabsEl.querySelectorAll("[data-id]").forEach((t) =>
t.setAttribute("aria-selected", String(t.dataset.id === id)));
if (cat && _panels[cat]) openCategory(cat, true);
Object.keys(_catBtns).forEach((c) =>
_catBtns[c].setAttribute("data-hasactive", String(c === cat)));
}
// WebGPU toggle: flip the preference and re-boot the renderer + re-mount the active surface.
// Honest: if the browser/driver yields no WebGPU device the toolkit falls back to WebGL2 and
// the badge reports the real backend ("WebGPU: requested" but renderer stays WEBGL2).
{
const gpuBtn = document.getElementById("gpu-toggle");
if (gpuBtn) {
gpuBtn.addEventListener("click", async () => {
wantWebGPU = !wantWebGPU;
gpuBtn.disabled = true;
const prev = gpuBtn.textContent; gpuBtn.textContent = "\u26a1 switching\u2026";
try { await rebootStage(); } catch (_) { document.getElementById("backend").textContent = "renderer: UNAVAILABLE"; }
finally { gpuBtn.disabled = false; _syncGpuToggle(); }
});
_syncGpuToggle();
}
}
// expose a tiny API for the selftest harness to drive the shell headlessly.
window.__SZL3D_SHELL__ = {
surfaces: SURFACES,
select: selectSurface,
get stage() { return stage; },
get current() { return current; },
get wantWebGPU() { return wantWebGPU; },
ensureStage, rebootStage,
};
// initial surface from hash or default to the Atlas front door (Wave 27 unifier)
const initial = (location.hash || "").replace("#", "");
selectSurface(SURFACES.some((s) => s.id === initial) ? initial : "atlas");
// ---- Landing / intro overlay (Dev4, Wave R) --------------------------------
// A coherent honest entry: the estate boots live underneath while this panel shows the
// Brain headline + frontier surface count + the public verifier. Every stat is fetched
// same-origin (0 CDN) and degrades to an honest NO-LIVE-DATA chip if the endpoint 404s or
// is unreachable — never a fabricated number. Auto-shows once per tab session; re-openable
// via the header ◇ intro badge or ?intro=1.
{
const introEl = document.getElementById("intro");
const setLabel = (id, state, text) => {
const el = document.getElementById(id);
if (el) { el.dataset.state = state; el.textContent = text; }
};
const setStat = (id, value, subHtml) => {
const el = document.getElementById(id);
if (!el) return;
el.textContent = value;
if (subHtml !== undefined) { const s = document.createElement("small"); s.innerHTML = subHtml; el.appendChild(s); }
};
// Brain headline — honest distinct_artifacts (never the raw, person-inflated total).
async function loadBrain() {
try {
const r = await fetch("/api/a11oy/v1/brain/graph?summary=1", { headers: { accept: "application/json" } });
if (!r.ok) throw new Error("HTTP " + r.status);
const j = await r.json();
const s = j.summary || j;
const distinct = s.distinct_artifacts ?? j.distinct_artifacts;
const total = s.node_count ?? j.node_count;
if (distinct == null) throw new Error("no distinct_artifacts field");
setStat("brain-stat", Number(distinct).toLocaleString(), "distinct artifacts (harvested)");
setLabel("brain-lbl", "live", "LIVE");
if (total != null) {
const note = document.getElementById("brain-note");
if (note) note.textContent =
`${Number(distinct).toLocaleString()} distinct artifacts; raw node_count ${Number(total).toLocaleString()} ` +
`is larger (dominated by arXiv co-author person nodes — never presented as distinct work).`;
}
} catch (e) {
setStat("brain-stat", "—", "distinct artifacts (harvested)");
setLabel("brain-lbl", "degraded", "NO-LIVE-DATA");
}
}
// Frontier estate — count of live 3D surfaces (prefer the honest server info, fall back to
// the in-page manifest which is the same source of truth as the shell).
async function loadEstate() {
try {
const r = await fetch("/api/a11oy/v1/holographic/info", { headers: { accept: "application/json" } });
if (!r.ok) throw new Error("HTTP " + r.status);
const j = await r.json();
const n = Array.isArray(j.surfaces) ? j.surfaces.length : SURFACES.length;
setStat("estate-stat", String(n), "3D surfaces, each wired to a live backend");
setLabel("estate-lbl", "live", "LIVE");
} catch (e) {
// The shell manifest is authoritative and always present — honest count, labelled as
// in-page (not a fresh server read).
setStat("estate-stat", String(SURFACES.length), "3D surfaces (from in-page manifest)");
setLabel("estate-lbl", "degraded", "MANIFEST");
}
}
function openIntro() { introEl.hidden = false; loadBrain(); loadEstate(); }
function closeIntro() {
introEl.hidden = true;
try { sessionStorage.setItem("szl3d_intro_seen", "1"); } catch (_) {}
}
introEl.querySelectorAll("[data-go]").forEach((b) =>
b.addEventListener("click", () => { closeIntro(); selectSurface(b.dataset.go); }));
const enterBtn = document.getElementById("intro-enter");
if (enterBtn) enterBtn.addEventListener("click", closeIntro);
const reopen = document.getElementById("intro-reopen");
if (reopen) reopen.addEventListener("click", openIntro);
// Auto-show on a fresh visit: skip if this tab already dismissed it, unless a deep-link
// hash (#brain etc.) or a suppress flag says otherwise; ?intro=1 always forces it.
let seen = false;
try { seen = sessionStorage.getItem("szl3d_intro_seen") === "1"; } catch (_) {}
const force = /[?&]intro=1\b/.test(location.search);
const deepLink = SURFACES.some((s) => s.id === initial);
if (force || (!seen && !deepLink)) openIntro();
else introEl.hidden = true;
window.__SZL3D_SHELL__.openIntro = openIntro;
window.__SZL3D_SHELL__.closeIntro = closeIntro;
}
</script>
</body>
</html>