Spaces:
Running
Running
deploy(hf): sync szl-holdings/a11oy@42ece2159d56c4ac37a4b16c27a5edace60017e5 derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy 42ece2159d56c4ac37a4b16c27a5edace60017e5.
Files: 1163 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
|
@@ -422,6 +422,7 @@ const SURFACES = [
|
|
| 422 |
{ id: "research", cat: "more", flag: true, title: "Frontier Research · Live arXiv AI · MEASURED live arXiv submission stream (cs.AI/LG/CL/CV/NE) — one pillar per research category (height = fresh-paper count, bead = share of the window); most-recent papers orbit as satellites sized by author count; log-scaling is display-only, no citation count, score, or ranking", mod: "/static/3d/surfaces/research.js" },
|
| 423 |
{ id: "open", cat: "more", flag: true, title: "Open Frontier · Live Hugging Face · MEASURED live Hugging Face Hub trending stream — one pillar per org/author (height = summed likes, bead = download reach); most-liked open models orbit as satellites coloured by task; log-scaling is display-only, no invented benchmark, score, or ranking beyond the Hub’s own", mod: "/static/3d/surfaces/open.js" },
|
| 424 |
{ id: "brainagent", cat: "brain", title: "Brain Agent · honesty-gated agentic graph reasoner · treats the brain graph as a state space and walks it one node at a time for a query, choosing EXPAND/FOLLOW/BACKTRACK/STOP by pure graph heuristics (no model call, fully deterministic); every candidate hop passes an honesty gate built from the sibling surfaces (grounding, provenance, contradiction, uncertainty) — an ungrounded/untraceable/contradicted/uncertain hop is refused with a recorded reason, an absent guard is UNAVAILABLE never a fabricated pass; within an explicit step/node budget it returns ANSWER-GROUNDED/PARTIAL or abstains ABSTAINED-BUDGET/ABSTAINED-INSUFFICIENT rather than answer under-grounded, emits an ordered trace + unsigned SHA-256 receipt-on-write, makes no sentience claim (MODELED)", mod: "/static/3d/surfaces/brainagent.js" },
|
|
|
|
| 425 |
];
|
| 426 |
|
| 427 |
const stageEl = document.getElementById("stage");
|
|
|
|
| 422 |
{ id: "research", cat: "more", flag: true, title: "Frontier Research · Live arXiv AI · MEASURED live arXiv submission stream (cs.AI/LG/CL/CV/NE) — one pillar per research category (height = fresh-paper count, bead = share of the window); most-recent papers orbit as satellites sized by author count; log-scaling is display-only, no citation count, score, or ranking", mod: "/static/3d/surfaces/research.js" },
|
| 423 |
{ id: "open", cat: "more", flag: true, title: "Open Frontier · Live Hugging Face · MEASURED live Hugging Face Hub trending stream — one pillar per org/author (height = summed likes, bead = download reach); most-liked open models orbit as satellites coloured by task; log-scaling is display-only, no invented benchmark, score, or ranking beyond the Hub’s own", mod: "/static/3d/surfaces/open.js" },
|
| 424 |
{ id: "brainagent", cat: "brain", title: "Brain Agent · honesty-gated agentic graph reasoner · treats the brain graph as a state space and walks it one node at a time for a query, choosing EXPAND/FOLLOW/BACKTRACK/STOP by pure graph heuristics (no model call, fully deterministic); every candidate hop passes an honesty gate built from the sibling surfaces (grounding, provenance, contradiction, uncertainty) — an ungrounded/untraceable/contradicted/uncertain hop is refused with a recorded reason, an absent guard is UNAVAILABLE never a fabricated pass; within an explicit step/node budget it returns ANSWER-GROUNDED/PARTIAL or abstains ABSTAINED-BUDGET/ABSTAINED-INSUFFICIENT rather than answer under-grounded, emits an ordered trace + unsigned SHA-256 receipt-on-write, makes no sentience claim (MODELED)", mod: "/static/3d/surfaces/brainagent.js" },
|
| 425 |
+
{ id: "estateconstitution", cat: "governance", title: "Estate Constitution · the WHOLE ESTATE's honesty posture graded continuously against explicit estate-level ARTICLES (the per-query brain-constitution pattern lifted to the estate) · Art 1 the honesty wall holds (0 REACHABLE invariant violations), Art 2 no surface declares a fabricated MEASURED label (every declared label in the honest vocabulary, read VERBATIM), Art 3 manifest coverage DISCLOSED honestly (NATIVE-OK vs NO-MANIFEST counted out loud — a DISCLOSURE Article: admitting the gap is compliance, papering it over is the violation, full coverage never claimed while any surface is unverifiable), Art 4 doctrine invariants (Λ = Conjecture 1 never a theorem, locked-8 never inflated, trust ceiling 0.97 never 100%, no consciousness claim) · each graded COMPLIANT/VIOLATED/UNAVAILABLE over the szl_honestywall aggregate read in-process through a GUARDED import (an unreadable aggregate 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/estateconstitution.js" },
|
| 426 |
];
|
| 427 |
|
| 428 |
const stageEl = document.getElementById("stage");
|
static/3d/surfaces/estateconstitution.js
ADDED
|
@@ -0,0 +1,495 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// SPDX-License-Identifier: Apache-2.0
|
| 2 |
+
// © 2026 Lutar, Stephen P. — SZL Holdings · ORCID 0009-0001-0110-4173 · Doctrine v11
|
| 3 |
+
//
|
| 4 |
+
// surfaces/estateconstitution.js — ESTATE CONSTITUTION · the WHOLE ESTATE's honesty posture,
|
| 5 |
+
// graded continuously against explicit estate-level ARTICLES. The per-query brain-constitution
|
| 6 |
+
// pattern lifted to the estate: one PILLAR per estate Article (honesty wall holds · no fabricated
|
| 7 |
+
// MEASURED label · manifest coverage disclosed honestly · doctrine invariants), each graded
|
| 8 |
+
// COMPLIANT / VIOLATED / UNAVAILABLE, with a CORE orb carrying the overall verdict
|
| 9 |
+
// CONSTITUTIONAL / IN-VIOLATION / INSUFFICIENT-SIGNAL. Pure honesty/governance/observability;
|
| 10 |
+
// it advances NO detection / fusion / effector / targeting / cueing capability.
|
| 11 |
+
//
|
| 12 |
+
// A VIOLATED Article is drawn plainly (violet) and stands tallest so it cannot hide; an
|
| 13 |
+
// UNAVAILABLE Article (its evidence unreadable this request) reads grey, never a fabricated pass.
|
| 14 |
+
// The core is NEVER teal ("CONSTITUTIONAL") while any pillar is violet ("VIOLATED").
|
| 15 |
+
//
|
| 16 |
+
// The COVERAGE RAIL beneath the ring is the honest manifest-coverage disclosure: teal beads are
|
| 17 |
+
// NATIVE-OK surfaces, grey beads are NO-MANIFEST surfaces this estate cannot verify in-process.
|
| 18 |
+
// The grey beads are drawn, never omitted — the gap is disclosed, not papered over.
|
| 19 |
+
//
|
| 20 |
+
// DATA: live snapshot from GET /api/a11oy/v1/govern/estateconstitution/status (PURE READ, mints
|
| 21 |
+
// nothing):
|
| 22 |
+
// ok, label (MODELED), verdict, modeled_compliance,
|
| 23 |
+
// articles[]{ article, title, result (COMPLIANT|VIOLATED|UNAVAILABLE), evaluable },
|
| 24 |
+
// summary{ articles_total, articles_evaluable, compliant, violated, unavailable,
|
| 25 |
+
// violated_articles, min_articles_required, surfaces_total, surfaces_native_ok,
|
| 26 |
+
// surfaces_no_manifest },
|
| 27 |
+
// coverage_disclosure{ disclosure, surfaces_total, native_ok, unknown, no_manifest,
|
| 28 |
+
// modeled_native_coverage, full_coverage_claimed, gap_disclosed },
|
| 29 |
+
// honesty_wall{ available, wall_verdict }, doctrine{ locked_proven, lambda, trust_ceiling }.
|
| 30 |
+
//
|
| 31 |
+
// HONESTY LABEL: MODELED — this surface's own top label is MODELED (a derived compliance verdict,
|
| 32 |
+
// not a measurement). Per-Article results and the wall verdict are read VERBATIM; no compliance
|
| 33 |
+
// is fabricated. No green "1.0 / VERIFIED" state. Trust ceiling 0.97, never 100%.
|
| 34 |
+
// COLOURS (approved palette only, no green): proof-teal 0x3af4c8 (CONSTITUTIONAL / COMPLIANT /
|
| 35 |
+
// NATIVE-OK), lattice-blue 0x5b8dee (INSUFFICIENT-SIGNAL / frame), violet-blue 0x8a6bff
|
| 36 |
+
// (IN-VIOLATION / VIOLATED), grey 0x42505d (UNAVAILABLE / NO-MANIFEST / init).
|
| 37 |
+
// 0 RUNTIME CDN. Vendored three.js via page importmap (ctx.THREE).
|
| 38 |
+
// DOCTRINE v11: OBSERVES only — adds NOTHING to the locked-8 {F1,F4,F7,F11,F12,F18,F19,F22} @
|
| 39 |
+
// c7c0ba17; Λ stays Conjecture 1; introduces no theorem. Degrades grey on 404/error.
|
| 40 |
+
|
| 41 |
+
import { createShowcase } from "./_showcase.js";
|
| 42 |
+
|
| 43 |
+
const ID = "estateconstitution";
|
| 44 |
+
const TITLE = "Estate Constitution · the whole estate's honesty posture, graded continuously (live)";
|
| 45 |
+
|
| 46 |
+
// same-origin, relative — no CDN, no cross-origin fetch. PURE-READ governance endpoint.
|
| 47 |
+
const EP = "/api/a11oy/v1/govern/estateconstitution/status";
|
| 48 |
+
|
| 49 |
+
// verdict / result hues — approved palette only, no green
|
| 50 |
+
const C_OK = 0x3af4c8; // proof-teal — CONSTITUTIONAL / COMPLIANT / NATIVE-OK
|
| 51 |
+
const C_MID = 0x5b8dee; // lattice-blue — INSUFFICIENT-SIGNAL / frame
|
| 52 |
+
const C_VIOL = 0x8a6bff; // violet-blue — IN-VIOLATION / VIOLATED
|
| 53 |
+
const C_NEUTRAL = 0x42505d; // grey — UNAVAILABLE / NO-MANIFEST / init
|
| 54 |
+
const C_GRID = 0x1b3a44; // floor colour
|
| 55 |
+
|
| 56 |
+
// overall verdict -> core colour
|
| 57 |
+
function _verdictColor(v) {
|
| 58 |
+
const s = String(v || "").toUpperCase();
|
| 59 |
+
if (s === "CONSTITUTIONAL") return C_OK;
|
| 60 |
+
if (s === "IN-VIOLATION") return C_VIOL;
|
| 61 |
+
if (s === "INSUFFICIENT-SIGNAL") return C_MID;
|
| 62 |
+
return C_NEUTRAL; // init / unknown
|
| 63 |
+
}
|
| 64 |
+
// per-Article result -> pillar colour (VERBATIM; a violation is never softened to compliance)
|
| 65 |
+
function _resultColor(r) {
|
| 66 |
+
const s = String(r || "").toUpperCase();
|
| 67 |
+
if (s === "COMPLIANT") return C_OK;
|
| 68 |
+
if (s === "VIOLATED") return C_VIOL;
|
| 69 |
+
return C_NEUTRAL; // UNAVAILABLE / unknown
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
let _stage = null, _THREE = null, _ctx = null, _group = null, _show = null;
|
| 73 |
+
let _frameReg = false, _polls = [], _el = {}, _badge = null, _plain = false;
|
| 74 |
+
|
| 75 |
+
let _core = null; // THREE.Mesh — the verdict core orb
|
| 76 |
+
let _pillars = []; // Array<{ mesh, n, result }>
|
| 77 |
+
let _beads = null; // THREE.Points — coverage-disclosure rail
|
| 78 |
+
let _spin = 0;
|
| 79 |
+
|
| 80 |
+
// live state (all read from JSON; nothing invented)
|
| 81 |
+
const S = {
|
| 82 |
+
label: null, // top honesty label VERBATIM (MODELED)
|
| 83 |
+
verdict: null, // CONSTITUTIONAL | IN-VIOLATION | INSUFFICIENT-SIGNAL
|
| 84 |
+
compliance: null, // MODELED ratio in [0,0.97], never MEASURED, never 1.0
|
| 85 |
+
total: null,
|
| 86 |
+
evaluable: null,
|
| 87 |
+
compliant: null,
|
| 88 |
+
violated: null,
|
| 89 |
+
unavailable: null,
|
| 90 |
+
violatedArts: [],
|
| 91 |
+
minReq: null,
|
| 92 |
+
articles: [], // [{ n, result }]
|
| 93 |
+
wallAvail: null,
|
| 94 |
+
wallVerdict: null,
|
| 95 |
+
disclosure: null, // the honest coverage sentence, read VERBATIM
|
| 96 |
+
surfaces: null,
|
| 97 |
+
nativeOk: null,
|
| 98 |
+
noManifest: null,
|
| 99 |
+
unknownSurf: null,
|
| 100 |
+
fullClaimed: null,
|
| 101 |
+
trustCeil: null,
|
| 102 |
+
lambda: null,
|
| 103 |
+
locked: null,
|
| 104 |
+
state: "init",
|
| 105 |
+
};
|
| 106 |
+
|
| 107 |
+
// =============================================================================
|
| 108 |
+
export function mount(ctx) {
|
| 109 |
+
_ctx = ctx; _stage = ctx.stage; _THREE = ctx.THREE;
|
| 110 |
+
_group = new _THREE.Group();
|
| 111 |
+
_stage.scene.add(_group);
|
| 112 |
+
_stage.camera.position.set(0, 5.2, 18.5);
|
| 113 |
+
try { if (_stage.controls && _stage.controls.target) { _stage.controls.target.set(0, 2.4, 0); _stage.controls.update(); } } catch (_) {}
|
| 114 |
+
try { _stage.setBloom(true); } catch (_) {}
|
| 115 |
+
|
| 116 |
+
_buildFloor();
|
| 117 |
+
_buildCore();
|
| 118 |
+
|
| 119 |
+
if (!_frameReg) { _stage.onFrame(_onFrame); _frameReg = true; }
|
| 120 |
+
|
| 121 |
+
_badge = ctx.live.createBadge();
|
| 122 |
+
_polls.push(ctx.live.poll(EP, 9000, _onData, {
|
| 123 |
+
badge: _badge, onState: (m) => { S.state = m.state; _paintOverlay(); _paintCore(); },
|
| 124 |
+
}));
|
| 125 |
+
|
| 126 |
+
_buildOverlay();
|
| 127 |
+
return { id: ID, started: true };
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
// =============================================================================
|
| 131 |
+
function _buildFloor() {
|
| 132 |
+
const THREE = _THREE;
|
| 133 |
+
const grid = new THREE.GridHelper(40, 40, C_GRID, 0x0f2027);
|
| 134 |
+
grid.material.opacity = 0.16; grid.material.transparent = true; grid.position.y = -0.01;
|
| 135 |
+
_group.add(grid);
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
function _buildCore() {
|
| 139 |
+
const THREE = _THREE;
|
| 140 |
+
const g = new THREE.IcosahedronGeometry(1.6, 1);
|
| 141 |
+
_core = new THREE.Mesh(g, new THREE.MeshStandardMaterial({
|
| 142 |
+
color: C_NEUTRAL, emissive: C_NEUTRAL, emissiveIntensity: 0.35,
|
| 143 |
+
transparent: true, opacity: 0.9, flatShading: true,
|
| 144 |
+
}));
|
| 145 |
+
_core.position.set(0, 4.8, 0);
|
| 146 |
+
_group.add(_core);
|
| 147 |
+
|
| 148 |
+
// lattice ring beneath the core (the estate constitution base rail)
|
| 149 |
+
const pts = [];
|
| 150 |
+
const R = 6.0;
|
| 151 |
+
for (let i = 0; i <= 72; i++) {
|
| 152 |
+
const a = (i / 72) * Math.PI * 2;
|
| 153 |
+
pts.push(new THREE.Vector3(Math.cos(a) * R, 0.02, Math.sin(a) * R));
|
| 154 |
+
}
|
| 155 |
+
const rg = new THREE.BufferGeometry().setFromPoints(pts);
|
| 156 |
+
const ring = new THREE.Line(rg, new THREE.LineBasicMaterial({
|
| 157 |
+
color: C_MID, transparent: true, opacity: 0.4,
|
| 158 |
+
}));
|
| 159 |
+
_group.add(ring);
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
// One PILLAR per estate Article, in a ring; colour by the VERBATIM per-Article result. Height is a
|
| 163 |
+
// fixed governance column (an Article is a rule, not a magnitude), except that a VIOLATED Article
|
| 164 |
+
// stands tallest so it cannot hide and an UNAVAILABLE one is an honest short stub. Rebuilt on each
|
| 165 |
+
// live snapshot so the ring always mirrors the CURRENT feed (never a hard-coded Article set).
|
| 166 |
+
function _buildPillars() {
|
| 167 |
+
const THREE = _THREE;
|
| 168 |
+
_disposePillars();
|
| 169 |
+
|
| 170 |
+
const arts = Array.isArray(S.articles) ? S.articles : [];
|
| 171 |
+
const n = arts.length;
|
| 172 |
+
if (!n) return;
|
| 173 |
+
const R = 5.2;
|
| 174 |
+
const geo = new THREE.BoxGeometry(0.9, 1.0, 0.9);
|
| 175 |
+
|
| 176 |
+
for (let i = 0; i < n; i++) {
|
| 177 |
+
const art = arts[i];
|
| 178 |
+
const result = String(art.result || "").toUpperCase();
|
| 179 |
+
const color = _resultColor(result);
|
| 180 |
+
const h = result === "VIOLATED" ? 4.8 : (result === "COMPLIANT" ? 3.5 : 1.2);
|
| 181 |
+
const a = (i / n) * Math.PI * 2;
|
| 182 |
+
|
| 183 |
+
const mesh = new THREE.Mesh(geo, new THREE.MeshStandardMaterial({
|
| 184 |
+
color, emissive: color, emissiveIntensity: 0.26,
|
| 185 |
+
transparent: true, opacity: result === "UNAVAILABLE" ? 0.42 : 0.92,
|
| 186 |
+
}));
|
| 187 |
+
mesh.scale.y = h;
|
| 188 |
+
mesh.position.set(Math.cos(a) * R, h / 2, Math.sin(a) * R);
|
| 189 |
+
_group.add(mesh);
|
| 190 |
+
|
| 191 |
+
_pillars.push({ mesh, n: art.n, result });
|
| 192 |
+
}
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
// The COVERAGE RAIL — one bead per registered surface on an outer arc: teal for NATIVE-OK, grey for
|
| 196 |
+
// NO-MANIFEST/UNKNOWN. The grey beads are DRAWN, never dropped: the manifest gap is disclosed
|
| 197 |
+
// visually exactly as the JSON discloses it numerically.
|
| 198 |
+
function _buildBeads() {
|
| 199 |
+
const THREE = _THREE;
|
| 200 |
+
_disposeBeads();
|
| 201 |
+
|
| 202 |
+
const total = typeof S.surfaces === "number" ? S.surfaces : 0;
|
| 203 |
+
if (total <= 0) return;
|
| 204 |
+
const ok = typeof S.nativeOk === "number" ? S.nativeOk : 0;
|
| 205 |
+
|
| 206 |
+
const pos = new Float32Array(total * 3);
|
| 207 |
+
const col = new Float32Array(total * 3);
|
| 208 |
+
const c1 = new THREE.Color(C_OK), c0 = new THREE.Color(C_NEUTRAL);
|
| 209 |
+
const R = 7.6;
|
| 210 |
+
for (let i = 0; i < total; i++) {
|
| 211 |
+
const a = (i / total) * Math.PI * 2;
|
| 212 |
+
pos[i * 3] = Math.cos(a) * R;
|
| 213 |
+
pos[i * 3 + 1] = 0.35 + 0.25 * Math.sin(i * 0.7);
|
| 214 |
+
pos[i * 3 + 2] = Math.sin(a) * R;
|
| 215 |
+
const c = i < ok ? c1 : c0;
|
| 216 |
+
col[i * 3] = c.r; col[i * 3 + 1] = c.g; col[i * 3 + 2] = c.b;
|
| 217 |
+
}
|
| 218 |
+
const g = new THREE.BufferGeometry();
|
| 219 |
+
g.setAttribute("position", new THREE.BufferAttribute(pos, 3));
|
| 220 |
+
g.setAttribute("color", new THREE.BufferAttribute(col, 3));
|
| 221 |
+
_beads = new THREE.Points(g, new THREE.PointsMaterial({
|
| 222 |
+
size: 0.2, vertexColors: true, transparent: true, opacity: 0.85, sizeAttenuation: true,
|
| 223 |
+
}));
|
| 224 |
+
_group.add(_beads);
|
| 225 |
+
}
|
| 226 |
+
|
| 227 |
+
function _rm(o) {
|
| 228 |
+
if (!o) return;
|
| 229 |
+
try {
|
| 230 |
+
if (o.geometry && o.geometry.dispose) o.geometry.dispose();
|
| 231 |
+
if (o.material) { const ms = Array.isArray(o.material) ? o.material : [o.material]; ms.forEach((m) => m.dispose && m.dispose()); }
|
| 232 |
+
if (_group) _group.remove(o);
|
| 233 |
+
} catch (_) {}
|
| 234 |
+
}
|
| 235 |
+
function _disposePillars() { _pillars.forEach((p) => _rm(p.mesh)); _pillars = []; }
|
| 236 |
+
function _disposeBeads() { _rm(_beads); _beads = null; }
|
| 237 |
+
|
| 238 |
+
// =============================================================================
|
| 239 |
+
// live data handler — read VERBATIM, never upgrade, never fabricate compliance
|
| 240 |
+
// =============================================================================
|
| 241 |
+
function _onData(j) {
|
| 242 |
+
// Top honesty label VERBATIM; absent live data this surface is MODELED (a derived verdict).
|
| 243 |
+
S.label = (j && j.label ? String(j.label) : "MODELED").toUpperCase();
|
| 244 |
+
S.verdict = j && j.verdict ? String(j.verdict).toUpperCase() : null;
|
| 245 |
+
S.compliance = (j && typeof j.modeled_compliance === "number") ? j.modeled_compliance : null;
|
| 246 |
+
|
| 247 |
+
const sm = (j && j.summary) || {};
|
| 248 |
+
S.total = typeof sm.articles_total === "number" ? sm.articles_total : null;
|
| 249 |
+
S.evaluable = typeof sm.articles_evaluable === "number" ? sm.articles_evaluable : null;
|
| 250 |
+
S.compliant = typeof sm.compliant === "number" ? sm.compliant : null;
|
| 251 |
+
S.violated = typeof sm.violated === "number" ? sm.violated : null;
|
| 252 |
+
S.unavailable = typeof sm.unavailable === "number" ? sm.unavailable : null;
|
| 253 |
+
S.violatedArts = Array.isArray(sm.violated_articles) ? sm.violated_articles : [];
|
| 254 |
+
S.minReq = typeof sm.min_articles_required === "number" ? sm.min_articles_required : null;
|
| 255 |
+
|
| 256 |
+
const arts = Array.isArray(j && j.articles) ? j.articles : [];
|
| 257 |
+
S.articles = arts.map((a) => ({
|
| 258 |
+
n: typeof a.article === "number" ? a.article : null,
|
| 259 |
+
result: a && a.result ? String(a.result).toUpperCase() : "UNAVAILABLE",
|
| 260 |
+
}));
|
| 261 |
+
|
| 262 |
+
const w = (j && j.honesty_wall) || {};
|
| 263 |
+
S.wallAvail = typeof w.available === "boolean" ? w.available : null;
|
| 264 |
+
S.wallVerdict = w.wall_verdict ? String(w.wall_verdict).toUpperCase() : null;
|
| 265 |
+
|
| 266 |
+
// The coverage disclosure sentence is rendered VERBATIM — the gap is shown, never smoothed.
|
| 267 |
+
const cd = (j && j.coverage_disclosure) || {};
|
| 268 |
+
S.disclosure = typeof cd.disclosure === "string" ? cd.disclosure : null;
|
| 269 |
+
S.surfaces = typeof cd.surfaces_total === "number" ? cd.surfaces_total : null;
|
| 270 |
+
S.nativeOk = typeof cd.native_ok === "number" ? cd.native_ok : null;
|
| 271 |
+
S.noManifest = typeof cd.no_manifest === "number" ? cd.no_manifest : null;
|
| 272 |
+
S.unknownSurf = typeof cd.unknown === "number" ? cd.unknown : null;
|
| 273 |
+
S.fullClaimed = typeof cd.full_coverage_claimed === "boolean" ? cd.full_coverage_claimed : null;
|
| 274 |
+
|
| 275 |
+
const d = (j && j.doctrine) || {};
|
| 276 |
+
S.trustCeil = typeof d.trust_ceiling === "number" ? d.trust_ceiling : null;
|
| 277 |
+
S.lambda = typeof d.lambda === "string" ? d.lambda : null;
|
| 278 |
+
S.locked = typeof d.locked_proven === "number" ? d.locked_proven : null;
|
| 279 |
+
|
| 280 |
+
_buildPillars();
|
| 281 |
+
_buildBeads();
|
| 282 |
+
_paintCore();
|
| 283 |
+
_paintOverlay();
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
// =============================================================================
|
| 287 |
+
function _onFrame() {
|
| 288 |
+
const t = performance.now();
|
| 289 |
+
if (_group) _group.rotation.y = Math.sin(t * 0.00005) * 0.08;
|
| 290 |
+
|
| 291 |
+
const live = S.state === "live";
|
| 292 |
+
if (_core) {
|
| 293 |
+
_core.rotation.y += 0.004; _core.rotation.x += 0.0015;
|
| 294 |
+
_core.material.emissiveIntensity = 0.35 + (live ? 0.25 : 0.08) * (0.5 + 0.5 * Math.sin(t * 0.003));
|
| 295 |
+
}
|
| 296 |
+
if (_beads) _beads.rotation.y = t * 0.00006;
|
| 297 |
+
if (_pillars.length) {
|
| 298 |
+
_spin = (t * 0.0002) % 1;
|
| 299 |
+
const lead = Math.floor(_spin * _pillars.length);
|
| 300 |
+
for (let i = 0; i < _pillars.length; i++) {
|
| 301 |
+
const p = _pillars[i];
|
| 302 |
+
// a VIOLATED pillar always glows hot (a violation must never hide); others follow the sweep.
|
| 303 |
+
const viol = p.result === "VIOLATED";
|
| 304 |
+
const base = viol ? 0.6 : (p.result === "COMPLIANT" && live ? 0.26 : 0.12);
|
| 305 |
+
p.mesh.material.emissiveIntensity = (i === lead && live) ? Math.max(base, 0.85) : base;
|
| 306 |
+
}
|
| 307 |
+
}
|
| 308 |
+
}
|
| 309 |
+
|
| 310 |
+
// =============================================================================
|
| 311 |
+
function _paintCore() {
|
| 312 |
+
if (!_core) return;
|
| 313 |
+
const col = (S.state === "live") ? _verdictColor(S.verdict) : C_NEUTRAL;
|
| 314 |
+
_core.material.color.setHex(col);
|
| 315 |
+
_core.material.emissive.setHex(col);
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
// =============================================================================
|
| 319 |
+
// overlay (HUD)
|
| 320 |
+
// =============================================================================
|
| 321 |
+
function _buildOverlay() {
|
| 322 |
+
const ctx = _ctx;
|
| 323 |
+
_show = createShowcase(ctx, {
|
| 324 |
+
id: ID, title: TITLE, accent: "#5b8dee", badge: _badge,
|
| 325 |
+
chips: [{ label: "MODELED", text: "estate compliance", name: "lbl" },
|
| 326 |
+
{ label: "—", text: "verdict", name: "vrd" }],
|
| 327 |
+
legend: ["MODELED"],
|
| 328 |
+
});
|
| 329 |
+
const host = _show.body;
|
| 330 |
+
|
| 331 |
+
const sub = document.createElement("div");
|
| 332 |
+
sub.style.cssText = "color:#9fb1bf;font-size:11px;line-height:1.55";
|
| 333 |
+
sub.innerHTML =
|
| 334 |
+
'The brain constitution grades ONE query. This grades the <b>whole estate</b>, continuously, ' +
|
| 335 |
+
'against explicit estate-level <b>ARTICLES</b>: (1) the honesty wall holds — zero ' +
|
| 336 |
+
'<i>reachable</i> invariant violations; (2) no surface declares a fabricated ' +
|
| 337 |
+
'<b>MEASURED</b> label (every declared label must sit in the honest vocabulary, read ' +
|
| 338 |
+
'verbatim); (3) manifest coverage is <b>disclosed honestly</b> — NATIVE-OK vs NO-MANIFEST ' +
|
| 339 |
+
'counted out loud, full coverage never claimed while any surface is unverifiable; (4) the ' +
|
| 340 |
+
'doctrine invariants hold (Λ stays Conjecture 1, locked-8, trust 0.97). Evidence comes from ' +
|
| 341 |
+
'the <b>szl_honestywall</b> aggregate read in-process through a guarded import — an ' +
|
| 342 |
+
'unreadable aggregate makes an Article <b>UNAVAILABLE</b>, never a fabricated pass. The ' +
|
| 343 |
+
'estate is <b>never CONSTITUTIONAL while any evaluable Article is VIOLATED</b>. Strictly ' +
|
| 344 |
+
'honesty/governance/observability. 0 runtime CDN.';
|
| 345 |
+
host.appendChild(sub);
|
| 346 |
+
|
| 347 |
+
const card = document.createElement("div");
|
| 348 |
+
card.style.cssText = "background:#0a1117;border:1px solid #1d2a36;border-radius:9px;padding:9px 10px;display:flex;flex-direction:column;gap:6px";
|
| 349 |
+
|
| 350 |
+
const grid = document.createElement("div");
|
| 351 |
+
grid.style.cssText = "display:grid;grid-template-columns:1fr;gap:4px";
|
| 352 |
+
function kpiRow(id, label) {
|
| 353 |
+
const r = document.createElement("div");
|
| 354 |
+
r.style.cssText = "display:flex;justify-content:space-between;gap:10px;font-size:11px";
|
| 355 |
+
const l = document.createElement("span"); l.style.cssText = "color:#9fb1bf"; l.textContent = label;
|
| 356 |
+
const v = document.createElement("b");
|
| 357 |
+
v.id = id;
|
| 358 |
+
v.style.cssText = "font-variant-numeric:tabular-nums;color:#eef3f6;text-align:right;max-width:62%;overflow-wrap:anywhere";
|
| 359 |
+
v.textContent = "—";
|
| 360 |
+
_el[id] = v;
|
| 361 |
+
r.appendChild(l); r.appendChild(v); return r;
|
| 362 |
+
}
|
| 363 |
+
grid.appendChild(kpiRow("ec-verdict", "estate verdict"));
|
| 364 |
+
grid.appendChild(kpiRow("ec-compl", "modeled compliance"));
|
| 365 |
+
grid.appendChild(kpiRow("ec-articles", "articles (evaluable/total)"));
|
| 366 |
+
grid.appendChild(kpiRow("ec-ok", "compliant"));
|
| 367 |
+
grid.appendChild(kpiRow("ec-viol", "violated"));
|
| 368 |
+
grid.appendChild(kpiRow("ec-unavail", "unavailable"));
|
| 369 |
+
grid.appendChild(kpiRow("ec-violarts", "violated articles"));
|
| 370 |
+
grid.appendChild(kpiRow("ec-wall", "honesty wall"));
|
| 371 |
+
grid.appendChild(kpiRow("ec-cover", "coverage (disclosed)"));
|
| 372 |
+
grid.appendChild(kpiRow("ec-nomanifest", "NO-MANIFEST (unverifiable)"));
|
| 373 |
+
grid.appendChild(kpiRow("ec-locked", "locked proofs"));
|
| 374 |
+
grid.appendChild(kpiRow("ec-ceil", "trust ceiling"));
|
| 375 |
+
grid.appendChild(kpiRow("ec-lambda", "Λ"));
|
| 376 |
+
card.appendChild(grid);
|
| 377 |
+
host.appendChild(card);
|
| 378 |
+
|
| 379 |
+
const leg = document.createElement("div");
|
| 380 |
+
leg.style.cssText = "font-size:9.5px;color:#6b7a86;line-height:1.6";
|
| 381 |
+
leg.innerHTML =
|
| 382 |
+
'<span style="color:#3af4c8">■</span> CONSTITUTIONAL / COMPLIANT / NATIVE-OK ' +
|
| 383 |
+
'<span style="color:#5b8dee">■</span> INSUFFICIENT-SIGNAL ' +
|
| 384 |
+
'<span style="color:#8a6bff">■</span> IN-VIOLATION / VIOLATED ' +
|
| 385 |
+
'<span style="color:#8494a1">■</span> UNAVAILABLE / NO-MANIFEST. ' +
|
| 386 |
+
'MODELED · per-Article results and the wall verdict read verbatim · the coverage gap is ' +
|
| 387 |
+
'disclosed, never papered over (a VIOLATION is a VIOLATION).';
|
| 388 |
+
card.appendChild(leg);
|
| 389 |
+
|
| 390 |
+
const pl = document.createElement("button");
|
| 391 |
+
pl.textContent = "◑ what this means";
|
| 392 |
+
pl.title = "Toggle plain-language explanation for investors & consumers.";
|
| 393 |
+
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";
|
| 394 |
+
pl.addEventListener("click", () => {
|
| 395 |
+
_plain = !_plain;
|
| 396 |
+
pl.style.background = _plain ? "#0f2a20" : "#08140f";
|
| 397 |
+
_applyPlain();
|
| 398 |
+
});
|
| 399 |
+
host.appendChild(pl);
|
| 400 |
+
|
| 401 |
+
const pd = document.createElement("div");
|
| 402 |
+
pd.id = "ec-plain";
|
| 403 |
+
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";
|
| 404 |
+
_el["plain"] = pd;
|
| 405 |
+
host.appendChild(pd);
|
| 406 |
+
|
| 407 |
+
_paintOverlay();
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
function _applyPlain() {
|
| 411 |
+
const pd = _el["plain"];
|
| 412 |
+
if (!pd) return;
|
| 413 |
+
pd.style.display = _plain ? "block" : "none";
|
| 414 |
+
if (!_plain) return;
|
| 415 |
+
pd.innerHTML =
|
| 416 |
+
"<b>What this means:</b> the estate has a written <b>rulebook</b> about its own honesty, and " +
|
| 417 |
+
"this surface grades the estate against it continuously — not one answer, the whole thing. " +
|
| 418 |
+
"The rules: the honesty wall must hold with no live rule-breaks; no part of the system may " +
|
| 419 |
+
"claim it <i>measured</i> something when it didn’t; the parts we cannot verify must be " +
|
| 420 |
+
"<b>counted out loud</b> instead of quietly folded into the good column; and the doctrine " +
|
| 421 |
+
"limits stay put (Λ stays a conjecture, the proven count stays 8, confidence caps at 0.97). " +
|
| 422 |
+
"That third rule is the unusual one: <b>admitting the gap is what passing looks like</b>. " +
|
| 423 |
+
"The read-out says something like “" + (S.disclosure || "N/M NATIVE-OK; K NO-MANIFEST unverifiable") +
|
| 424 |
+
"” — the grey beads on the outer rail are exactly those unverifiable surfaces, drawn rather " +
|
| 425 |
+
"than hidden. If <b>any</b> rule is broken the whole estate reads <b>IN-VIOLATION</b>; it " +
|
| 426 |
+
"will never call itself compliant while a rule is broken, and if there is too little evidence " +
|
| 427 |
+
"to grade it says <b>INSUFFICIENT-SIGNAL</b> instead of guessing. No “verified / 1.0” state.";
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
function _tok(s) {
|
| 431 |
+
if (s === "live") return null;
|
| 432 |
+
if (s === "missing") return "NO-LIVE-DATA";
|
| 433 |
+
if (s === "degraded") return "DEGRADED";
|
| 434 |
+
if (s === "error") return "OFFLINE";
|
| 435 |
+
return "…";
|
| 436 |
+
}
|
| 437 |
+
function _set(id, v) { if (_el[id]) _el[id].textContent = v; }
|
| 438 |
+
function _n(v) { return v == null ? "—" : String(v); }
|
| 439 |
+
|
| 440 |
+
function _paintOverlay() {
|
| 441 |
+
const t = _tok(S.state);
|
| 442 |
+
if (_show) {
|
| 443 |
+
_show.setChip("lbl", S.label || "MODELED", { text: "estate compliance" });
|
| 444 |
+
_show.setChip("vrd", t || (S.verdict || "—"), { text: "verdict" });
|
| 445 |
+
}
|
| 446 |
+
_set("ec-verdict", t || (S.verdict || "—"));
|
| 447 |
+
_set("ec-compl", t || (S.compliance != null ? String(S.compliance) : "—"));
|
| 448 |
+
_set("ec-articles", t || (S.evaluable != null && S.total != null
|
| 449 |
+
? S.evaluable + " / " + S.total : _n(S.total)));
|
| 450 |
+
_set("ec-ok", t || _n(S.compliant));
|
| 451 |
+
_set("ec-viol", t || _n(S.violated));
|
| 452 |
+
_set("ec-unavail", t || _n(S.unavailable));
|
| 453 |
+
_set("ec-violarts", t || (S.violatedArts && S.violatedArts.length
|
| 454 |
+
? S.violatedArts.map((n) => "Art" + n).join(", ") : "none"));
|
| 455 |
+
_set("ec-wall", t || (S.wallAvail === false ? "UNAVAILABLE" : (S.wallVerdict || "—")));
|
| 456 |
+
// VERBATIM disclosure sentence — the honest coverage gap, never rounded up to "full".
|
| 457 |
+
_set("ec-cover", t || (S.disclosure || "—"));
|
| 458 |
+
_set("ec-nomanifest", t || (S.noManifest != null ? String(S.noManifest) : "—"));
|
| 459 |
+
_set("ec-locked", t || (S.locked != null ? String(S.locked) : "—"));
|
| 460 |
+
_set("ec-ceil", t || (S.trustCeil != null ? String(S.trustCeil) : "—"));
|
| 461 |
+
_set("ec-lambda", t || (S.lambda || "—"));
|
| 462 |
+
if (_plain) _applyPlain();
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
// =============================================================================
|
| 466 |
+
export function unmount() {
|
| 467 |
+
_polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = [];
|
| 468 |
+
try { if (_show) _show.destroy(); } catch (_) {}
|
| 469 |
+
try {
|
| 470 |
+
_disposePillars();
|
| 471 |
+
_disposeBeads();
|
| 472 |
+
if (_group && _stage) {
|
| 473 |
+
_group.traverse((o) => {
|
| 474 |
+
if (o.geometry && o.geometry.dispose) o.geometry.dispose();
|
| 475 |
+
if (o.material) {
|
| 476 |
+
const ms = Array.isArray(o.material) ? o.material : [o.material];
|
| 477 |
+
ms.forEach((mm) => { if (mm.dispose) mm.dispose(); });
|
| 478 |
+
}
|
| 479 |
+
});
|
| 480 |
+
_stage.scene.remove(_group);
|
| 481 |
+
}
|
| 482 |
+
} catch (_) {}
|
| 483 |
+
_group = _show = null;
|
| 484 |
+
_core = null; _pillars = []; _beads = null;
|
| 485 |
+
_el = {}; _badge = null; _plain = false; _frameReg = false; _spin = 0;
|
| 486 |
+
_stage = _THREE = _ctx = null;
|
| 487 |
+
S.label = S.verdict = S.compliance = null;
|
| 488 |
+
S.total = S.evaluable = S.compliant = S.violated = S.unavailable = null;
|
| 489 |
+
S.violatedArts = []; S.minReq = null; S.articles = [];
|
| 490 |
+
S.wallAvail = S.wallVerdict = null;
|
| 491 |
+
S.disclosure = S.surfaces = S.nativeOk = S.noManifest = S.unknownSurf = S.fullClaimed = null;
|
| 492 |
+
S.trustCeil = S.lambda = S.locked = null; S.state = "init";
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
export default { id: ID, title: TITLE, endpoints: [EP], mount, unmount };
|