Spaces:
Building
Building
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 924 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 +1 -0
- static/3d/surfaces/aigov.js +442 -0
static/3d/holographic.html
CHANGED
|
@@ -170,6 +170,7 @@ const SURFACES = [
|
|
| 170 |
{ id: "evalarena", title: "Eval Arena · Governed Eval / Red-Team", mod: "/static/3d/surfaces/evalarena.js" },
|
| 171 |
{ id: "vqc", title: "Governed VQC · Parameter-Shift Hybrid QML (SIMULATED)", mod: "/static/3d/surfaces/vqc.js" },
|
| 172 |
{ id: "harness", title: "Governed Model Harness · Behavior Transfer", mod: "/static/3d/surfaces/harness.js" },
|
|
|
|
| 173 |
];
|
| 174 |
|
| 175 |
const stageEl = document.getElementById("stage");
|
|
|
|
| 170 |
{ id: "evalarena", title: "Eval Arena · Governed Eval / Red-Team", mod: "/static/3d/surfaces/evalarena.js" },
|
| 171 |
{ id: "vqc", title: "Governed VQC · Parameter-Shift Hybrid QML (SIMULATED)", mod: "/static/3d/surfaces/vqc.js" },
|
| 172 |
{ id: "harness", title: "Governed Model Harness · Behavior Transfer", mod: "/static/3d/surfaces/harness.js" },
|
| 173 |
+
{ id: "aigov", title: "AI Governance Conformance · Λ-Advisory Readiness (crosswalk)", mod: "/static/3d/surfaces/aigov.js" },
|
| 174 |
];
|
| 175 |
|
| 176 |
const stageEl = document.getElementById("stage");
|
static/3d/surfaces/aigov.js
ADDED
|
@@ -0,0 +1,442 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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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/aigov.js — AIGOV: AI-Governance Conformance for the holographic frontier
|
| 5 |
+
// ring. Three framework pillars (EU AI Act / NIST AI RMF 1.0 / ISO/IEC 42001) stand
|
| 6 |
+
// on a floor; each cited CONTROL is a node orbiting its pillar, coloured by its
|
| 7 |
+
// MODELED evidence status — proof-teal = SATISFIED (advisory), lattice-blue =
|
| 8 |
+
// PARTIAL, grey = GAP (gaps are always shown, never hidden). A central Λ-READINESS
|
| 9 |
+
// core scales with the ADVISORY readiness score (Λ = Conjecture 1 — gray, NEVER
|
| 10 |
+
// green; capped ≤0.97, never 1.0). A compact HUD shows per-framework coverage, the
|
| 11 |
+
// advisory readiness, and the honest verdict. Live snapshot:
|
| 12 |
+
// /api/a11oy/v1/frontier/aigov
|
| 13 |
+
//
|
| 14 |
+
// This is an SZL GOVERNANCE SYNTHESIS: it cross-walks a11oy model/inference evidence
|
| 15 |
+
// (signed receipts, DSSE/in-toto supply chain, doctrine gate + Λ restraint, energy
|
| 16 |
+
// ledger, honest-label discipline) onto the REAL regulated-AI control catalogs.
|
| 17 |
+
//
|
| 18 |
+
// FRAMEWORKS CITED (clean-room; NOT claimed as SZL's own):
|
| 19 |
+
// EU AI Act — Regulation (EU) 2024/1689 (Annex IV; Arts. 9/10/12/13/14/15/72)
|
| 20 |
+
// NIST AI RMF 1.0 — NIST AI 100-1 (GOVERN / MAP / MEASURE / MANAGE)
|
| 21 |
+
// ISO/IEC 42001:2023 — AI management system (Annex A controls)
|
| 22 |
+
// COMPL-AI — Guldimann et al. 2024, arXiv:2410.07959 (technical interpretation)
|
| 23 |
+
//
|
| 24 |
+
// HONESTY LABELS: MODELED (real cited control catalog + a genuine design crosswalk;
|
| 25 |
+
// the per-control evidence strengths, coverage rates and readiness are a
|
| 26 |
+
// deterministic SELF-ASSESSMENT MODEL — computed, read VERBATIM from JSON, never
|
| 27 |
+
// upgraded). The readiness is ADVISORY CONJECTURE: Λ = Conjecture 1 (gray, never
|
| 28 |
+
// green). It is NOT a compliance guarantee, NOT an attestation, NOT an ATO — the
|
| 29 |
+
// honest verdict is SELF-ASSESSED / ADVISORY (third-party conformity assessment
|
| 30 |
+
// REQUIRED). Nothing is signed on this read. Readiness capped ≤0.97, never 1.0.
|
| 31 |
+
// COLOURS: lattice-blue 0x5b8dee (pillars / PARTIAL), violet-blue 0x8a6bff
|
| 32 |
+
// (Λ-readiness ring), proof-teal 0x3af4c8 (SATISFIED-advisory / accent), greys
|
| 33 |
+
// (GAP / degraded / no-live-data). Purple BANNED.
|
| 34 |
+
// 0 RUNTIME CDN. three.js via ctx.THREE (vendored by the page importmap).
|
| 35 |
+
// DOCTRINE v11: degrades gracefully (grey) on 404/error; honesty label still shown.
|
| 36 |
+
// Nothing here is in the locked-8 (adds 0). Λ stays Conjecture 1. Readiness never 100%.
|
| 37 |
+
|
| 38 |
+
import { createShowcase } from "./_showcase.js";
|
| 39 |
+
|
| 40 |
+
const ID = "aigov";
|
| 41 |
+
const TITLE = "AI Governance Conformance · Λ-Advisory Readiness (live)";
|
| 42 |
+
|
| 43 |
+
// Served SAME-ORIGIN by szl_aigov.py — a deterministic governed-conformance model.
|
| 44 |
+
const EP = "/api/a11oy/v1/frontier/aigov?seed=42";
|
| 45 |
+
|
| 46 |
+
// data-viz hues — purple BANNED
|
| 47 |
+
const C_PILLAR = 0x5b8dee; // lattice-blue (framework pillar / PARTIAL control)
|
| 48 |
+
const C_RING = 0x8a6bff; // violet-blue (Λ-readiness ring)
|
| 49 |
+
const C_SAT = 0x3af4c8; // proof-teal (SATISFIED-advisory / accent)
|
| 50 |
+
const C_GAP = 0x5a6570; // grey (GAP)
|
| 51 |
+
const C_DIM = 0x42505d; // grey (degraded / no-live-data)
|
| 52 |
+
const C_GRID = 0x1b3a44; // floor colour
|
| 53 |
+
|
| 54 |
+
// layout geometry
|
| 55 |
+
const N_PILLAR = 3; // EU AI Act / NIST AI RMF 1.0 / ISO/IEC 42001
|
| 56 |
+
const PILLAR_R = 6.4; // radius the three pillars sit on
|
| 57 |
+
const MAX_CTRL = 32; // cap on control nodes rendered
|
| 58 |
+
const CORE_Y = 1.4; // height of the central Λ-readiness core
|
| 59 |
+
|
| 60 |
+
let _stage = null, _THREE = null, _ctx = null, _group = null, _show = null;
|
| 61 |
+
let _frameReg = false, _polls = [], _badge = null, _f = {};
|
| 62 |
+
|
| 63 |
+
// geometry handles
|
| 64 |
+
let _floor = null;
|
| 65 |
+
let _pillars = []; // Array<THREE.Mesh> — the framework pillars (labelled top-N)
|
| 66 |
+
let _ring = null; // THREE.LineLoop — Λ-readiness ring
|
| 67 |
+
let _core = null; // THREE.Mesh — central readiness core (scales with score)
|
| 68 |
+
let _ctrlMesh = []; // Array<THREE.Mesh> — per-control orbiting nodes
|
| 69 |
+
|
| 70 |
+
// live state
|
| 71 |
+
const S = {
|
| 72 |
+
label: null,
|
| 73 |
+
frameworks: null, // per-framework roll-up
|
| 74 |
+
controls: null, // control rows
|
| 75 |
+
ctrlTotal: null, satTotal: null, partialTotal: null, gapTotal: null,
|
| 76 |
+
coverage: null,
|
| 77 |
+
readiness: null, readinessCap: null, green: null,
|
| 78 |
+
verdict: null, isGuarantee: null, isAto: null,
|
| 79 |
+
lambdaMax: null,
|
| 80 |
+
mappingSigned: null, mappingDigest: null,
|
| 81 |
+
state: "init",
|
| 82 |
+
};
|
| 83 |
+
|
| 84 |
+
// =============================================================================
|
| 85 |
+
// mount(ctx)
|
| 86 |
+
// =============================================================================
|
| 87 |
+
export function mount(ctx) {
|
| 88 |
+
_ctx = ctx; _stage = ctx.stage; _THREE = ctx.THREE;
|
| 89 |
+
_group = new _THREE.Group();
|
| 90 |
+
_stage.scene.add(_group);
|
| 91 |
+
_stage.camera.position.set(0, 9, 20);
|
| 92 |
+
try { if (_stage.controls && _stage.controls.target) { _stage.controls.target.set(0, 1.4, 0); _stage.controls.update(); } } catch (_) {}
|
| 93 |
+
try { _stage.setBloom(true); } catch (_) {}
|
| 94 |
+
|
| 95 |
+
_buildFloor();
|
| 96 |
+
_buildPillars();
|
| 97 |
+
_buildRing();
|
| 98 |
+
_buildControls();
|
| 99 |
+
|
| 100 |
+
if (!_frameReg && _stage.onFrame) { _stage.onFrame(_onFrame); _frameReg = true; }
|
| 101 |
+
|
| 102 |
+
_badge = ctx.live.createBadge();
|
| 103 |
+
_buildShowcase(ctx);
|
| 104 |
+
|
| 105 |
+
// top-N framework-pillar labels (billboarded) + hover tooltip via the helper.
|
| 106 |
+
_show.attachSceneLabels({
|
| 107 |
+
objects: () => _pillars.filter((m) => m.visible),
|
| 108 |
+
text: (o) => (o && o.userData && o.userData.label) || "",
|
| 109 |
+
weight: (o) => (o && o.userData ? o.userData.weight : 0),
|
| 110 |
+
topN: N_PILLAR,
|
| 111 |
+
hover: true,
|
| 112 |
+
});
|
| 113 |
+
|
| 114 |
+
_polls.push(ctx.live.poll(EP, 5000, _onData, {
|
| 115 |
+
badge: _badge, onState: (m) => { S.state = m.state; _paint(); },
|
| 116 |
+
}));
|
| 117 |
+
return { id: ID, started: true };
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
// =============================================================================
|
| 121 |
+
// builders
|
| 122 |
+
// =============================================================================
|
| 123 |
+
function _buildFloor() {
|
| 124 |
+
const THREE = _THREE;
|
| 125 |
+
const grid = new THREE.GridHelper(44, 44, C_GRID, 0x0f2027);
|
| 126 |
+
grid.material.opacity = 0.18; grid.material.transparent = true; grid.position.y = -0.01;
|
| 127 |
+
_group.add(grid);
|
| 128 |
+
_floor = grid;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
// Three framework pillars on an arc; each a lattice-blue column, labelled with its
|
| 132 |
+
// framework name + advisory readiness once live.
|
| 133 |
+
function _buildPillars() {
|
| 134 |
+
const THREE = _THREE;
|
| 135 |
+
const geo = new THREE.CylinderGeometry(0.4, 0.5, 3.2, 6);
|
| 136 |
+
for (let i = 0; i < N_PILLAR; i++) {
|
| 137 |
+
const a = Math.PI * (0.5 + (i - (N_PILLAR - 1) / 2) * 0.5);
|
| 138 |
+
const mesh = new THREE.Mesh(
|
| 139 |
+
geo,
|
| 140 |
+
new THREE.MeshStandardMaterial({ color: C_PILLAR, emissive: C_PILLAR, emissiveIntensity: 0.2, transparent: true, opacity: 0.0 }),
|
| 141 |
+
);
|
| 142 |
+
mesh.position.set(Math.cos(a) * PILLAR_R, 1.6, Math.sin(a) * PILLAR_R);
|
| 143 |
+
mesh.visible = false;
|
| 144 |
+
mesh.userData = { label: "", weight: 0, idx: i, home: mesh.position.clone() };
|
| 145 |
+
_group.add(mesh);
|
| 146 |
+
_pillars.push(mesh);
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
// Central Λ-readiness core: an advisory ring + a core that scales with the CAPPED
|
| 151 |
+
// advisory readiness score (never green, never 1.0).
|
| 152 |
+
function _buildRing() {
|
| 153 |
+
const THREE = _THREE;
|
| 154 |
+
{
|
| 155 |
+
const pts = [];
|
| 156 |
+
for (let i = 0; i <= 64; i++) {
|
| 157 |
+
const a = (i / 64) * Math.PI * 2;
|
| 158 |
+
pts.push(new THREE.Vector3(Math.cos(a) * 2.1, CORE_Y, Math.sin(a) * 2.1));
|
| 159 |
+
}
|
| 160 |
+
const g = new THREE.BufferGeometry().setFromPoints(pts);
|
| 161 |
+
const m = new THREE.LineBasicMaterial({ color: C_RING, transparent: true, opacity: 0.45 });
|
| 162 |
+
_ring = new THREE.LineLoop(g, m);
|
| 163 |
+
_group.add(_ring);
|
| 164 |
+
}
|
| 165 |
+
_core = new THREE.Mesh(
|
| 166 |
+
new THREE.IcosahedronGeometry(0.8, 1),
|
| 167 |
+
new THREE.MeshStandardMaterial({ color: C_RING, emissive: C_RING, emissiveIntensity: 0.4, wireframe: true, transparent: true, opacity: 0.85 }),
|
| 168 |
+
);
|
| 169 |
+
_core.position.set(0, CORE_Y, 0);
|
| 170 |
+
_group.add(_core);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
// Control nodes: pre-allocated spheres arranged on a deterministic spiral between
|
| 174 |
+
// the pillars and the core; coloured by MODELED evidence status once live.
|
| 175 |
+
function _buildControls() {
|
| 176 |
+
const THREE = _THREE;
|
| 177 |
+
const geo = new THREE.SphereGeometry(0.15, 8, 8);
|
| 178 |
+
const golden = Math.PI * (3 - Math.sqrt(5));
|
| 179 |
+
for (let i = 0; i < MAX_CTRL; i++) {
|
| 180 |
+
const t = (i + 1) / MAX_CTRL;
|
| 181 |
+
const r = 2.8 + (PILLAR_R - 3.4) * Math.sqrt(t);
|
| 182 |
+
const a = i * golden;
|
| 183 |
+
const mesh = new THREE.Mesh(
|
| 184 |
+
geo,
|
| 185 |
+
new THREE.MeshStandardMaterial({ color: C_PILLAR, emissive: C_PILLAR, emissiveIntensity: 0.15, transparent: true, opacity: 0.0 }),
|
| 186 |
+
);
|
| 187 |
+
mesh.position.set(Math.cos(a) * r, 0.6 + 1.4 * t, Math.sin(a) * r);
|
| 188 |
+
mesh.visible = false;
|
| 189 |
+
_group.add(mesh);
|
| 190 |
+
_ctrlMesh.push(mesh);
|
| 191 |
+
}
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
// =============================================================================
|
| 195 |
+
// live data handler
|
| 196 |
+
// =============================================================================
|
| 197 |
+
function _onData(j) {
|
| 198 |
+
const p = (j && typeof j.payload === "object" && j.payload) ? j.payload : j;
|
| 199 |
+
const rawLabel = (j && j.label) || (p && p.label) || "MODELED";
|
| 200 |
+
S.label = String(rawLabel).toUpperCase();
|
| 201 |
+
|
| 202 |
+
S.frameworks = Array.isArray(p.frameworks) ? p.frameworks : null;
|
| 203 |
+
S.controls = Array.isArray(p.controls) ? p.controls : null;
|
| 204 |
+
|
| 205 |
+
const sm = (p && typeof p.summary === "object") ? p.summary : {};
|
| 206 |
+
S.ctrlTotal = typeof sm.controls_total === "number" ? sm.controls_total : null;
|
| 207 |
+
S.satTotal = typeof sm.satisfied_advisory === "number" ? sm.satisfied_advisory : null;
|
| 208 |
+
S.partialTotal = typeof sm.partial === "number" ? sm.partial : null;
|
| 209 |
+
S.gapTotal = typeof sm.gaps === "number" ? sm.gaps : null;
|
| 210 |
+
S.coverage = typeof sm.coverage_rate === "number" ? sm.coverage_rate : null;
|
| 211 |
+
|
| 212 |
+
const rd = (p && typeof p.readiness === "object") ? p.readiness : {};
|
| 213 |
+
S.readiness = typeof rd.score_advisory === "number" ? rd.score_advisory : null;
|
| 214 |
+
S.readinessCap = typeof rd.score_cap === "number" ? rd.score_cap : null;
|
| 215 |
+
S.green = typeof rd.green === "boolean" ? rd.green : null;
|
| 216 |
+
S.verdict = typeof rd.verdict === "string" ? rd.verdict : null;
|
| 217 |
+
S.isGuarantee = typeof rd.is_compliance_guarantee === "boolean" ? rd.is_compliance_guarantee : null;
|
| 218 |
+
S.isAto = typeof rd.authorization_to_operate === "boolean" ? rd.authorization_to_operate : null;
|
| 219 |
+
S.lambdaMax = (rd.lambda_bounds && typeof rd.lambda_bounds.max === "number") ? rd.lambda_bounds.max : null;
|
| 220 |
+
|
| 221 |
+
const mp = (p && typeof p.mapping_preview === "object") ? p.mapping_preview : {};
|
| 222 |
+
S.mappingSigned = typeof mp.signed === "boolean" ? mp.signed : null;
|
| 223 |
+
S.mappingDigest = typeof mp.mapping_preview_digest === "string" ? mp.mapping_preview_digest : null;
|
| 224 |
+
|
| 225 |
+
_updateScene();
|
| 226 |
+
_paint();
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
// =============================================================================
|
| 230 |
+
// geometry updater
|
| 231 |
+
// =============================================================================
|
| 232 |
+
function _updateScene() {
|
| 233 |
+
const live = S.state === "live";
|
| 234 |
+
|
| 235 |
+
// readiness ring degrades to grey when not live
|
| 236 |
+
if (_ring) {
|
| 237 |
+
_ring.material.color.setHex(live ? C_RING : C_DIM);
|
| 238 |
+
_ring.material.opacity = live ? 0.45 : 0.12;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
// framework pillars: light up + label with the framework name and its advisory
|
| 242 |
+
// readiness; weight (for the top-N ranking) tracks the readiness.
|
| 243 |
+
const fws = live && S.frameworks ? S.frameworks : [];
|
| 244 |
+
for (let i = 0; i < N_PILLAR; i++) {
|
| 245 |
+
const mesh = _pillars[i];
|
| 246 |
+
const fw = i < fws.length ? fws[i] : null;
|
| 247 |
+
if (!fw) { mesh.visible = false; mesh.userData.label = ""; mesh.userData.weight = 0; continue; }
|
| 248 |
+
mesh.visible = true;
|
| 249 |
+
const rdy = typeof fw.readiness_advisory === "number" ? fw.readiness_advisory : 0;
|
| 250 |
+
const cov = typeof fw.coverage_rate === "number" ? fw.coverage_rate : 0;
|
| 251 |
+
mesh.userData.label = (fw.framework || ("fw" + i)) + " · " + (rdy * 100).toFixed(0) + "%";
|
| 252 |
+
mesh.userData.weight = rdy;
|
| 253 |
+
// colour a pillar by its coverage: some SATISFIED -> teal tint, else lattice-blue.
|
| 254 |
+
const col = cov > 0 ? C_SAT : C_PILLAR;
|
| 255 |
+
mesh.material.color.setHex(live ? col : C_DIM);
|
| 256 |
+
mesh.material.emissive.setHex(live ? col : C_DIM);
|
| 257 |
+
mesh.material.emissiveIntensity = live ? 0.28 : 0.1;
|
| 258 |
+
mesh.material.opacity = live ? 0.9 : 0.3;
|
| 259 |
+
mesh.scale.y = 0.5 + rdy * 1.2;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
+
// control nodes: colour by MODELED status — SATISFIED(advisory) proof-teal,
|
| 263 |
+
// PARTIAL lattice-blue, GAP grey. Gaps are always shown, never hidden.
|
| 264 |
+
const ctrls = live && S.controls ? S.controls.slice(0, MAX_CTRL) : [];
|
| 265 |
+
for (let i = 0; i < MAX_CTRL; i++) {
|
| 266 |
+
const mesh = _ctrlMesh[i];
|
| 267 |
+
const c = i < ctrls.length ? ctrls[i] : null;
|
| 268 |
+
if (!c) { mesh.visible = false; continue; }
|
| 269 |
+
mesh.visible = true;
|
| 270 |
+
const status = String(c.status || "");
|
| 271 |
+
const strength = typeof c.evidence_strength === "number" ? c.evidence_strength : 0.4;
|
| 272 |
+
let col = C_GAP;
|
| 273 |
+
if (status.indexOf("SATISFIED") === 0) col = C_SAT;
|
| 274 |
+
else if (status === "PARTIAL") col = C_PILLAR;
|
| 275 |
+
mesh.material.color.setHex(col);
|
| 276 |
+
mesh.material.emissive.setHex(col);
|
| 277 |
+
mesh.material.emissiveIntensity = col === C_SAT ? 0.6 : (col === C_PILLAR ? 0.3 : 0.12);
|
| 278 |
+
mesh.material.opacity = col === C_GAP ? 0.4 : 0.95;
|
| 279 |
+
mesh.scale.setScalar(0.6 + strength * 1.0);
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
// readiness core: colour + size reflect the CAPPED advisory readiness (never
|
| 283 |
+
// green / never 1.0). Teal accent, but the score itself is drawn as advisory.
|
| 284 |
+
if (_core) {
|
| 285 |
+
if (live && S.readiness != null) {
|
| 286 |
+
_core.material.color.setHex(C_SAT);
|
| 287 |
+
_core.material.emissive.setHex(C_SAT);
|
| 288 |
+
_core.material.opacity = 0.85;
|
| 289 |
+
_core.scale.setScalar(0.6 + S.readiness * 1.0);
|
| 290 |
+
} else {
|
| 291 |
+
_core.material.color.setHex(C_DIM);
|
| 292 |
+
_core.material.emissive.setHex(C_DIM);
|
| 293 |
+
_core.material.opacity = 0.3;
|
| 294 |
+
_core.scale.setScalar(0.6);
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
// =============================================================================
|
| 300 |
+
// per-frame animation
|
| 301 |
+
// =============================================================================
|
| 302 |
+
function _onFrame() {
|
| 303 |
+
const t = (typeof performance !== "undefined" ? performance.now() : Date.now());
|
| 304 |
+
if (_group) _group.rotation.y = Math.sin(t * 0.00007) * 0.12;
|
| 305 |
+
if (_ring) _ring.rotation.y += 0.0015;
|
| 306 |
+
if (_core) {
|
| 307 |
+
_core.rotation.y += 0.02;
|
| 308 |
+
_core.rotation.x += 0.008;
|
| 309 |
+
const pulse = 1.0 + 0.1 * Math.sin(t * 0.0035);
|
| 310 |
+
const base = (S.state === "live" && S.readiness != null) ? (0.6 + S.readiness * 1.0) : 0.6;
|
| 311 |
+
_core.scale.setScalar(base * pulse);
|
| 312 |
+
}
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
// =============================================================================
|
| 316 |
+
// showcase overlay (shared helper) — compact chrome + collapsible KPIs
|
| 317 |
+
// =============================================================================
|
| 318 |
+
function _buildShowcase(ctx) {
|
| 319 |
+
_show = createShowcase(ctx, {
|
| 320 |
+
id: ID,
|
| 321 |
+
title: TITLE,
|
| 322 |
+
accent: "#5b8dee",
|
| 323 |
+
badge: _badge,
|
| 324 |
+
chips: [
|
| 325 |
+
{ label: "MODELED", text: "conformance crosswalk", name: "cf" },
|
| 326 |
+
{ label: "STRUCTURAL-ONLY", text: "Λ readiness · advisory", name: "adv" },
|
| 327 |
+
],
|
| 328 |
+
legend: ["MODELED", "STRUCTURAL-ONLY"],
|
| 329 |
+
description:
|
| 330 |
+
"<b>AI Governance Conformance.</b> Three framework pillars — <b>EU AI Act</b> " +
|
| 331 |
+
"(Reg. (EU) 2024/1689, Annex IV), <b>NIST AI RMF 1.0</b> and <b>ISO/IEC 42001</b> — " +
|
| 332 |
+
"each carry cited CONTROLS cross-walked to a11oy evidence (signed receipts, " +
|
| 333 |
+
"DSSE/in-toto supply chain, doctrine gate + Λ restraint, energy ledger, honest " +
|
| 334 |
+
"labels). Each control node is coloured by its MODELED evidence status: proof-teal " +
|
| 335 |
+
"SATISFIED (advisory), lattice-blue PARTIAL, grey GAP (gaps are shown, never " +
|
| 336 |
+
"hidden). The central core scales with the <b>Λ-advisory readiness</b> " +
|
| 337 |
+
"(Λ = Conjecture 1 — gray, NEVER green; capped ≤0.97). This is a SELF-ASSESSMENT " +
|
| 338 |
+
"MODEL — <b>NOT a compliance guarantee, NOT an attestation, NOT an ATO</b>; a " +
|
| 339 |
+
"third-party conformity assessment is REQUIRED.",
|
| 340 |
+
citations:
|
| 341 |
+
"EU AI Act — Reg. (EU) 2024/1689 · NIST AI RMF 1.0 (NIST AI 100-1) · " +
|
| 342 |
+
"ISO/IEC 42001:2023 · COMPL-AI arXiv:2410.07959. " +
|
| 343 |
+
"MODELED/CONJECTURE · not claimed-as. Nothing here is in the locked-8.",
|
| 344 |
+
plain: {
|
| 345 |
+
html: () =>
|
| 346 |
+
"Companies that build AI have to answer to rulebooks — the EU AI Act, the US " +
|
| 347 |
+
"NIST framework, and the ISO 42001 standard. This surface lines up what a11oy " +
|
| 348 |
+
"can already show as evidence against each rule, and marks each one teal " +
|
| 349 |
+
"(covered), blue (partly covered) or grey (a real gap we haven't closed). The " +
|
| 350 |
+
"middle score is a <b>readiness estimate</b> — an honest self-check, drawn grey " +
|
| 351 |
+
"as a <b>conjecture</b>, and it never reaches 100%. It is <b>not</b> a pass, a " +
|
| 352 |
+
"certificate, or permission to deploy: a real outside auditor still has to sign " +
|
| 353 |
+
"off. Nothing is signed or saved just by looking at this page.",
|
| 354 |
+
},
|
| 355 |
+
});
|
| 356 |
+
|
| 357 |
+
_f.frameworks = _show.addField("frameworks mapped", "frameworks");
|
| 358 |
+
_f.controls = _show.addField("controls (cited)", "controls");
|
| 359 |
+
_f.coverage = _show.addField("coverage (satisfied-advisory)", "coverage");
|
| 360 |
+
_f.gaps = _show.addField("partial / gaps (honest)", "gaps");
|
| 361 |
+
_f.eu = _show.addField("EU AI Act readiness", "eu");
|
| 362 |
+
_f.nist = _show.addField("NIST AI RMF 1.0 readiness", "nist");
|
| 363 |
+
_f.iso = _show.addField("ISO/IEC 42001 readiness", "iso");
|
| 364 |
+
_f.readiness = _show.addField("Λ readiness (advisory ≤0.97)", "readiness");
|
| 365 |
+
_f.verdict = _show.addField("verdict", "verdict");
|
| 366 |
+
_f.mapping = _show.addField("mapping preview", "mapping");
|
| 367 |
+
_f.label = _show.addField("honesty label", "label");
|
| 368 |
+
_paint();
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
function _tok(s) {
|
| 372 |
+
if (s === "live") return null;
|
| 373 |
+
if (s === "missing") return "NO-LIVE-DATA";
|
| 374 |
+
if (s === "degraded") return "DEGRADED";
|
| 375 |
+
if (s === "error") return "OFFLINE";
|
| 376 |
+
return "…";
|
| 377 |
+
}
|
| 378 |
+
|
| 379 |
+
function pct(v, d) { return typeof v === "number" ? (v * 100).toFixed(d) + "%" : "—"; }
|
| 380 |
+
function fx(v, d) { return typeof v === "number" ? v.toFixed(d) : "—"; }
|
| 381 |
+
function _set(k, v) { if (_f[k]) _f[k].textContent = v; }
|
| 382 |
+
|
| 383 |
+
function _fwReadiness(name) {
|
| 384 |
+
if (!Array.isArray(S.frameworks)) return null;
|
| 385 |
+
const f = S.frameworks.find((x) => x && x.framework === name);
|
| 386 |
+
return f && typeof f.readiness_advisory === "number" ? f.readiness_advisory : null;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
function _paint() {
|
| 390 |
+
if (!_show) return;
|
| 391 |
+
const t = _tok(S.state);
|
| 392 |
+
if (_show.setChip) _show.setChip("cf", S.label || "MODELED", { text: "conformance crosswalk" });
|
| 393 |
+
|
| 394 |
+
_set("frameworks", t || (S.frameworks != null ? String(S.frameworks.length) : "—"));
|
| 395 |
+
_set("controls", t || (S.ctrlTotal != null ? String(S.ctrlTotal) : "—"));
|
| 396 |
+
_set("coverage", t || (S.satTotal != null && S.ctrlTotal != null
|
| 397 |
+
? S.satTotal + "/" + S.ctrlTotal + (S.coverage != null ? " (" + pct(S.coverage, 0) + ")" : "") : "—"));
|
| 398 |
+
_set("gaps", t || (S.partialTotal != null || S.gapTotal != null
|
| 399 |
+
? (S.partialTotal != null ? S.partialTotal : "—") + " / " + (S.gapTotal != null ? S.gapTotal : "—") : "—"));
|
| 400 |
+
_set("eu", t || pct(_fwReadiness("EU AI Act"), 1));
|
| 401 |
+
_set("nist", t || pct(_fwReadiness("NIST AI RMF 1.0"), 1));
|
| 402 |
+
_set("iso", t || pct(_fwReadiness("ISO/IEC 42001"), 1));
|
| 403 |
+
_set("readiness", t || (S.readiness != null
|
| 404 |
+
? fx(S.readiness, 3) + (S.readinessCap != null ? " (≤" + S.readinessCap + ")" : "")
|
| 405 |
+
+ (S.green === false ? " · not-green" : "") : "—"));
|
| 406 |
+
_set("verdict", t || (S.verdict || "—"));
|
| 407 |
+
_set("mapping", t || (S.mappingSigned === false
|
| 408 |
+
? "unsigned preview" + (S.mappingDigest ? " " + S.mappingDigest.slice(0, 10) + "…" : "")
|
| 409 |
+
: (S.mappingDigest ? S.mappingDigest.slice(0, 10) + "…" : "—")));
|
| 410 |
+
_set("label", t || (S.label || "MODELED"));
|
| 411 |
+
}
|
| 412 |
+
|
| 413 |
+
// =============================================================================
|
| 414 |
+
// unmount — clean up everything; must not affect other organs
|
| 415 |
+
// =============================================================================
|
| 416 |
+
export function unmount() {
|
| 417 |
+
_polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = [];
|
| 418 |
+
try { if (_show) _show.destroy(); } catch (_) {}
|
| 419 |
+
try {
|
| 420 |
+
if (_group && _stage) {
|
| 421 |
+
_group.traverse((o) => {
|
| 422 |
+
if (o.geometry && o.geometry.dispose) o.geometry.dispose();
|
| 423 |
+
if (o.material) {
|
| 424 |
+
const ms = Array.isArray(o.material) ? o.material : [o.material];
|
| 425 |
+
ms.forEach((m) => { if (m.dispose) m.dispose(); });
|
| 426 |
+
}
|
| 427 |
+
});
|
| 428 |
+
_stage.scene.remove(_group);
|
| 429 |
+
}
|
| 430 |
+
} catch (_) {}
|
| 431 |
+
_group = _show = null;
|
| 432 |
+
_floor = null; _pillars = []; _ring = null; _core = null; _ctrlMesh = [];
|
| 433 |
+
_f = {}; _badge = null; _frameReg = false;
|
| 434 |
+
_stage = _THREE = _ctx = null;
|
| 435 |
+
S.label = S.frameworks = S.controls = null;
|
| 436 |
+
S.ctrlTotal = S.satTotal = S.partialTotal = S.gapTotal = S.coverage = null;
|
| 437 |
+
S.readiness = S.readinessCap = S.green = S.verdict = S.isGuarantee = S.isAto = null;
|
| 438 |
+
S.lambdaMax = S.mappingSigned = S.mappingDigest = null;
|
| 439 |
+
S.state = "init";
|
| 440 |
+
}
|
| 441 |
+
|
| 442 |
+
export default { id: ID, title: TITLE, endpoints: [EP], mount, unmount };
|