betterwithage Claude Opus 4.7 commited on
Commit
04de65c
·
verified ·
1 Parent(s): 810b4c2

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

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 921 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/surfaces/atlas.js CHANGED
@@ -35,6 +35,8 @@
35
  // Surface export shape: export default { id, title, endpoints, mount(ctx), unmount() }
36
  // ctx = { stage, container, live, label, THREE, szl3d }
37
 
 
 
38
  const ID = "atlas";
39
  const TITLE = "Atlas";
40
 
@@ -94,7 +96,7 @@ const KOBJ_R = 0.10; // kernel-object node radius
94
  const DEG = Math.PI / 180;
95
 
96
  let _stage = null, _THREE = null, _ctx = null, _group = null, _overlay = null;
97
- let _frameReg = false, _polls = [], _badge = null, _plain = false;
98
 
99
  let _pistil = null; // immutable locked-8 core at center
100
  let _clusterGroups = {}; // clusterKey -> THREE.Group
@@ -144,12 +146,10 @@ function mount(ctx) {
144
  _raycaster = new _THREE.Raycaster();
145
  _pointer = new _THREE.Vector2();
146
 
 
147
  _buildOverlay(ctx);
148
  _buildTooltip(ctx);
149
  _buildScaffold(); // pistil + 8 empty cluster groups (render before live data)
150
- _badge = ctx.live.createBadge();
151
- const brow = _overlay && _overlay.querySelector("#atlas-badgerow");
152
- if (brow && _badge && _badge.el) brow.appendChild(_badge.el);
153
 
154
  // Pull the rich classification (map) + the organism layout, then keep them fresh.
155
  _polls.push(ctx.live.poll(EP_MAP, 15000, _onMap, {
@@ -546,17 +546,14 @@ function _animate() {
546
  // overlay HUD
547
  // =============================================================================
548
  function _buildOverlay(ctx) {
 
 
 
 
549
  _overlay = document.createElement("div");
550
- _overlay.style.cssText =
551
- "position:absolute;top:12px;left:12px;max-width:384px;font:12px/1.5 ui-monospace,Menlo,monospace;" +
552
- "color:#cfe3ea;background:rgba(10,17,23,0.86);border:1px solid #1b3a44;border-radius:10px;padding:12px 14px;" +
553
- "pointer-events:auto;backdrop-filter:blur(3px);z-index:20;max-height:calc(100% - 24px);overflow:auto;";
554
  _overlay.innerHTML =
555
- '<div style="font-weight:700;letter-spacing:.03em;color:#eaf6f9;font-size:13px">Atlas ' +
556
- '<span id="atlas-label" style="float:right;font-size:10px;padding:1px 7px;border-radius:8px;background:#123;color:#3af4c8;border:1px solid #1b3a44">MODELED</span></div>' +
557
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">The whole holographic estate as ONE organism — the 67 surfaces mapped by the Flower Brain\u2019s 8 real clusters. The still teal heart is the machine-proven locked-8 pistil (kernel c7c0ba17); clusters radiate out; hover a node for its honest label, click a surface to open it.</div>' +
558
- '<div id="atlas-badgerow" style="margin-top:8px"></div>' +
559
- '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">' +
560
  _row("Total surfaces", "atlas-total") +
561
  _row("Clusters", "atlas-clusters") +
562
  _row("Coverage (all classified)", "atlas-coverage") +
@@ -579,7 +576,7 @@ function _buildOverlay(ctx) {
579
  '</div>' +
580
  '<div id="atlas-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>' +
581
  '<div id="atlas-infobox" style="display:none;margin-top:8px;font-size:10px;color:#bcd;line-height:1.55"></div>';
582
- (ctx.container || document.body).appendChild(_overlay);
583
  const pb = _overlay.querySelector("#atlas-plain");
584
  if (pb) pb.addEventListener("click", () => { _plain = !_plain; _applyPlain(); });
585
  const ib = _overlay.querySelector("#atlas-info");
@@ -626,7 +623,7 @@ function _paintOverlay() {
626
  const nd = "NO-LIVE-DATA";
627
  const d = deg ? "\u2014" : null;
628
 
629
- _set("atlas-label", S.label || "MODELED");
630
 
631
  if (missing && !S.clusters.length) {
632
  _set("atlas-total", nd);
@@ -752,7 +749,7 @@ function unmount() {
752
  try { if (_onLeave) _domEl.removeEventListener("pointerleave", _onLeave); } catch (_) {}
753
  try { _domEl.style.cursor = "default"; } catch (_) {}
754
  }
755
- try { if (_overlay && _overlay.parentNode) _overlay.parentNode.removeChild(_overlay); } catch (_) {}
756
  try { if (_tooltip && _tooltip.parentNode) _tooltip.parentNode.removeChild(_tooltip); } catch (_) {}
757
  try {
758
  if (_group && _stage) {
 
35
  // Surface export shape: export default { id, title, endpoints, mount(ctx), unmount() }
36
  // ctx = { stage, container, live, label, THREE, szl3d }
37
 
38
+ import { createShowcase } from "./_showcase.js";
39
+
40
  const ID = "atlas";
41
  const TITLE = "Atlas";
42
 
 
96
  const DEG = Math.PI / 180;
97
 
98
  let _stage = null, _THREE = null, _ctx = null, _group = null, _overlay = null;
99
+ let _frameReg = false, _polls = [], _badge = null, _plain = false, _show = null;
100
 
101
  let _pistil = null; // immutable locked-8 core at center
102
  let _clusterGroups = {}; // clusterKey -> THREE.Group
 
146
  _raycaster = new _THREE.Raycaster();
147
  _pointer = new _THREE.Vector2();
148
 
149
+ _badge = ctx.live.createBadge();
150
  _buildOverlay(ctx);
151
  _buildTooltip(ctx);
152
  _buildScaffold(); // pistil + 8 empty cluster groups (render before live data)
 
 
 
153
 
154
  // Pull the rich classification (map) + the organism layout, then keep them fresh.
155
  _polls.push(ctx.live.poll(EP_MAP, 15000, _onMap, {
 
546
  // overlay HUD
547
  // =============================================================================
548
  function _buildOverlay(ctx) {
549
+ _show = createShowcase(ctx, {
550
+ id: ID, title: TITLE, accent: "#3af4c8", badge: _badge,
551
+ chips: [{ label: "MODELED", name: "label" }],
552
+ });
553
  _overlay = document.createElement("div");
554
+ _overlay.style.cssText = "font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;";
 
 
 
555
  _overlay.innerHTML =
 
 
556
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">The whole holographic estate as ONE organism — the 67 surfaces mapped by the Flower Brain\u2019s 8 real clusters. The still teal heart is the machine-proven locked-8 pistil (kernel c7c0ba17); clusters radiate out; hover a node for its honest label, click a surface to open it.</div>' +
 
 
557
  _row("Total surfaces", "atlas-total") +
558
  _row("Clusters", "atlas-clusters") +
559
  _row("Coverage (all classified)", "atlas-coverage") +
 
576
  '</div>' +
577
  '<div id="atlas-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>' +
578
  '<div id="atlas-infobox" style="display:none;margin-top:8px;font-size:10px;color:#bcd;line-height:1.55"></div>';
579
+ _show.body.appendChild(_overlay);
580
  const pb = _overlay.querySelector("#atlas-plain");
581
  if (pb) pb.addEventListener("click", () => { _plain = !_plain; _applyPlain(); });
582
  const ib = _overlay.querySelector("#atlas-info");
 
623
  const nd = "NO-LIVE-DATA";
624
  const d = deg ? "\u2014" : null;
625
 
626
+ if (_show) _show.setChip("label", S.label || "MODELED");
627
 
628
  if (missing && !S.clusters.length) {
629
  _set("atlas-total", nd);
 
749
  try { if (_onLeave) _domEl.removeEventListener("pointerleave", _onLeave); } catch (_) {}
750
  try { _domEl.style.cursor = "default"; } catch (_) {}
751
  }
752
+ try { if (_show) _show.destroy(); } catch (_) {} _show = null;
753
  try { if (_tooltip && _tooltip.parentNode) _tooltip.parentNode.removeChild(_tooltip); } catch (_) {}
754
  try {
755
  if (_group && _stage) {
static/3d/surfaces/evalarena.js CHANGED
@@ -36,6 +36,8 @@
36
  // Surface export shape mirrors loopforge.js / harness.js exactly:
37
  // export default { id, title, endpoints, mount, unmount }
38
 
 
 
39
  const ID = "evalarena";
40
  const TITLE = "Eval Arena";
41
 
@@ -55,7 +57,7 @@ const C_EDGE = 0x1b3a44;
55
  const RING_R = 3.0, ARC_R = 5.4, CORE_R = 0.62;
56
 
57
  let _stage=null,_THREE=null,_ctx=null,_group=null,_overlay=null;
58
- let _frameReg=false,_polls=[],_badge=null,_plain=false,_t0=0;
59
  let _ring=null,_ringGlow=null,_core=null,_caseGroup=null,_caseMeshes=[];
60
 
61
  const S = {
@@ -79,11 +81,9 @@ function mount(ctx){
79
  try{ if(_stage.controls&&_stage.controls.target){ _stage.controls.target.set(0,1.0,0); _stage.controls.update(); } }catch(_){}
80
  try{ _stage.setBloom&&_stage.setBloom(true); }catch(_){}
81
  _t0=(typeof performance!=="undefined"?performance.now():Date.now());
 
82
  _buildOverlay(ctx);
83
  _buildScaffold();
84
- _badge=ctx.live.createBadge();
85
- const brow=_overlay&&_overlay.querySelector("#ea-badgerow");
86
- if(brow&&_badge&&_badge.el) brow.appendChild(_badge.el);
87
 
88
  // POST /eval/run — the CORE poll. Body carries {suite, model_id}.
89
  _polls.push(ctx.live.poll(EP_RUN, 8000, _onRun, {
@@ -196,13 +196,14 @@ function _animate(){
196
  }
197
 
198
  function _buildOverlay(ctx){
 
 
 
 
199
  _overlay=document.createElement("div");
200
- _overlay.style.cssText="position:absolute;top:12px;left:12px;max-width:378px;font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;background:rgba(10,17,23,0.86);border:1px solid #1b3a44;border-radius:10px;padding:12px 14px;pointer-events:auto;backdrop-filter:blur(3px);z-index:20;max-height:calc(100% - 24px);overflow:auto;";
201
  _overlay.innerHTML=
202
- '<div style="font-weight:700;letter-spacing:.03em;color:#eaf6f9;font-size:13px">Eval Arena <span id="ea-label" style="float:right;font-size:10px;padding:1px 7px;border-radius:8px;background:#123;color:#3af4c8;border:1px solid #1b3a44">MODELED</span></div>'+
203
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">Governed eval / red-team arena. Each eval CASE flies at the central <b>Λ-gate</b>: passing cases glow teal and cross the ring; red-team (should-refuse) cases correctly refused glow gold; failures dim and fall. Every run mints a <b>signed receipt</b> ingested to /llm/forum. Λ is advisory (Conjecture 1) — never green.</div>'+
204
- '<div id="ea-badgerow" style="margin-top:8px"></div>'+
205
- '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">'+
206
  _row("Suite","ea-suite")+_row("Model routed","ea-model")+
207
  _row("Cases passed","ea-cases")+_row("Accuracy","ea-acc")+
208
  '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">'+
@@ -222,7 +223,7 @@ function _buildOverlay(ctx){
222
  '</div>'+
223
  '<div id="ea-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>'+
224
  '<div id="ea-infobox" style="display:none;margin-top:8px;font-size:10px;color:#bcd;line-height:1.55"></div>';
225
- (ctx.container||document.body).appendChild(_overlay);
226
  const pb=_overlay.querySelector("#ea-plain"); if(pb) pb.addEventListener("click",()=>{_plain=!_plain;_applyPlain();});
227
  const ib=_overlay.querySelector("#ea-info");
228
  if(ib) ib.addEventListener("click",()=>{ const box=_overlay.querySelector("#ea-infobox");
@@ -238,7 +239,7 @@ function _pct(x){ return x==null?"—":(x<=1?(x*100).toFixed(1)+"%":String(x));
238
  function _paintOverlay(){
239
  if(!_overlay)return;
240
  const missing=(S.state==="missing"||S.state==="error"); const deg=missing||(S.state==="degraded");
241
- _set("ea-label",S.label||"MODELED");
242
  if(missing&&!S.cases.length){
243
  ["ea-suite","ea-model","ea-cases","ea-acc","ea-correct","ea-refuse","ea-honest","ea-control","ea-lambda","ea-sign","ea-forum"]
244
  .forEach((id)=>_set(id,"NO-LIVE-DATA"));
@@ -270,7 +271,7 @@ function _infoHTML(){
270
 
271
  function unmount(){
272
  _polls.forEach((p)=>{ try{p.stop();}catch(_){} }); _polls=[];
273
- try{ if(_overlay&&_overlay.parentNode) _overlay.parentNode.removeChild(_overlay); }catch(_){}
274
  try{ if(_group&&_stage){ _group.traverse((o)=>{ if(o.geometry&&o.geometry.dispose)o.geometry.dispose();
275
  if(o.material){const ms=Array.isArray(o.material)?o.material:[o.material];ms.forEach((m)=>{if(m.dispose)m.dispose();});} }); _stage.scene.remove(_group); } }catch(_){}
276
  _group=_overlay=null; _ring=_ringGlow=_core=_caseGroup=null; _caseMeshes=[];
 
36
  // Surface export shape mirrors loopforge.js / harness.js exactly:
37
  // export default { id, title, endpoints, mount, unmount }
38
 
39
+ import { createShowcase } from "./_showcase.js";
40
+
41
  const ID = "evalarena";
42
  const TITLE = "Eval Arena";
43
 
 
57
  const RING_R = 3.0, ARC_R = 5.4, CORE_R = 0.62;
58
 
59
  let _stage=null,_THREE=null,_ctx=null,_group=null,_overlay=null;
60
+ let _frameReg=false,_polls=[],_badge=null,_plain=false,_t0=0,_show=null;
61
  let _ring=null,_ringGlow=null,_core=null,_caseGroup=null,_caseMeshes=[];
62
 
63
  const S = {
 
81
  try{ if(_stage.controls&&_stage.controls.target){ _stage.controls.target.set(0,1.0,0); _stage.controls.update(); } }catch(_){}
82
  try{ _stage.setBloom&&_stage.setBloom(true); }catch(_){}
83
  _t0=(typeof performance!=="undefined"?performance.now():Date.now());
84
+ _badge=ctx.live.createBadge();
85
  _buildOverlay(ctx);
86
  _buildScaffold();
 
 
 
87
 
88
  // POST /eval/run — the CORE poll. Body carries {suite, model_id}.
89
  _polls.push(ctx.live.poll(EP_RUN, 8000, _onRun, {
 
196
  }
197
 
198
  function _buildOverlay(ctx){
199
+ _show=createShowcase(ctx,{
200
+ id:ID, title:TITLE, accent:"#3af4c8", badge:_badge,
201
+ chips:[{label:"MODELED", name:"label"}],
202
+ });
203
  _overlay=document.createElement("div");
204
+ _overlay.style.cssText="font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;";
205
  _overlay.innerHTML=
 
206
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">Governed eval / red-team arena. Each eval CASE flies at the central <b>Λ-gate</b>: passing cases glow teal and cross the ring; red-team (should-refuse) cases correctly refused glow gold; failures dim and fall. Every run mints a <b>signed receipt</b> ingested to /llm/forum. Λ is advisory (Conjecture 1) — never green.</div>'+
 
 
207
  _row("Suite","ea-suite")+_row("Model routed","ea-model")+
208
  _row("Cases passed","ea-cases")+_row("Accuracy","ea-acc")+
209
  '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">'+
 
223
  '</div>'+
224
  '<div id="ea-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>'+
225
  '<div id="ea-infobox" style="display:none;margin-top:8px;font-size:10px;color:#bcd;line-height:1.55"></div>';
226
+ _show.body.appendChild(_overlay);
227
  const pb=_overlay.querySelector("#ea-plain"); if(pb) pb.addEventListener("click",()=>{_plain=!_plain;_applyPlain();});
228
  const ib=_overlay.querySelector("#ea-info");
229
  if(ib) ib.addEventListener("click",()=>{ const box=_overlay.querySelector("#ea-infobox");
 
239
  function _paintOverlay(){
240
  if(!_overlay)return;
241
  const missing=(S.state==="missing"||S.state==="error"); const deg=missing||(S.state==="degraded");
242
+ if(_show) _show.setChip("label",S.label||"MODELED");
243
  if(missing&&!S.cases.length){
244
  ["ea-suite","ea-model","ea-cases","ea-acc","ea-correct","ea-refuse","ea-honest","ea-control","ea-lambda","ea-sign","ea-forum"]
245
  .forEach((id)=>_set(id,"NO-LIVE-DATA"));
 
271
 
272
  function unmount(){
273
  _polls.forEach((p)=>{ try{p.stop();}catch(_){} }); _polls=[];
274
+ try{ if(_show) _show.destroy(); }catch(_){} _show=null;
275
  try{ if(_group&&_stage){ _group.traverse((o)=>{ if(o.geometry&&o.geometry.dispose)o.geometry.dispose();
276
  if(o.material){const ms=Array.isArray(o.material)?o.material:[o.material];ms.forEach((m)=>{if(m.dispose)m.dispose();});} }); _stage.scene.remove(_group); } }catch(_){}
277
  _group=_overlay=null; _ring=_ringGlow=_core=_caseGroup=null; _caseMeshes=[];
static/3d/surfaces/flower.js CHANGED
@@ -29,6 +29,8 @@
29
  // Surface export shape: export default { id, title, endpoints, mount(ctx), unmount() }
30
  // ctx = { stage, container, live, label, THREE, szl3d }
31
 
 
 
32
  const ID = "flower";
33
  const TITLE = "The Flower Brain";
34
 
@@ -84,7 +86,7 @@ const PETAL_R0 = 0.9; // inner radius where a petal starts
84
  const PETAL_DR = 0.62; // radial step per tier-depth ring within a petal
85
 
86
  let _stage = null, _THREE = null, _ctx = null, _group = null, _overlay = null;
87
- let _frameReg = false, _polls = [], _badge = null, _plain = false;
88
 
89
  let _pistil = null; // the immutable proven-core mesh at the center
90
  let _petalGroups = {}; // petalKey -> THREE.Group (rotates/scales on bloom)
@@ -123,9 +125,9 @@ function mount(ctx) {
123
  _stage.scene.add(_group);
124
  _t0 = (typeof performance !== "undefined" ? performance.now() : Date.now());
125
 
 
126
  _buildOverlay(ctx);
127
  _buildScaffold(); // pistil + 8 empty petal groups (render before live data)
128
- _badge = ctx.live.createBadge();
129
 
130
  // Pull the real graph once, then poll the bloom snapshot every 5s.
131
  _polls.push(ctx.live.poll(EP_GRAPH, 0, _onGraph, {
@@ -401,14 +403,13 @@ function _animate() {
401
  // overlay HUD
402
  // =============================================================================
403
  function _buildOverlay(ctx) {
 
 
 
 
404
  _overlay = document.createElement("div");
405
- _overlay.style.cssText =
406
- "position:absolute;top:12px;left:12px;max-width:360px;font:12px/1.5 ui-monospace,Menlo,monospace;" +
407
- "color:#cfe3ea;background:rgba(15,32,39,0.82);border:1px solid #1b3a44;border-radius:10px;padding:12px 14px;" +
408
- "pointer-events:auto;backdrop-filter:blur(3px);z-index:20;";
409
  _overlay.innerHTML =
410
- '<div style="font-weight:700;letter-spacing:.03em;color:#eaf6f9;font-size:13px">The Flower Brain ' +
411
- '<span id="flower-label" style="float:right;font-size:10px;padding:1px 7px;border-radius:8px;background:#123;color:#3af4c8;border:1px solid #1b3a44">MODELED</span></div>' +
412
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">Everything SZL built as one 8-petal bloom — the proven-8 pistil at the center, petals open with cluster health.</div>' +
413
  '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">' +
414
  _row("Overall bloom", "flower-bloom") +
@@ -425,7 +426,7 @@ function _buildOverlay(ctx) {
425
  '<div style="margin-top:8px"><button id="flower-plain" style="font:11px ui-monospace;background:#0f2027;color:#9fc;' +
426
  'border:1px solid #1b3a44;border-radius:6px;padding:3px 8px;cursor:pointer">Plain language</button></div>' +
427
  '<div id="flower-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>';
428
- (ctx.container || document.body).appendChild(_overlay);
429
  const btn = _overlay.querySelector("#flower-plain");
430
  if (btn) btn.addEventListener("click", () => { _plain = !_plain; _applyPlain(); });
431
  }
@@ -446,7 +447,7 @@ function _paintOverlay() {
446
  const deg = missing || (S.state === "degraded");
447
  const nd = "NO-LIVE-DATA";
448
 
449
- _set("flower-label", S.label || "MODELED");
450
  if (missing && !S.nodes.length) {
451
  _set("flower-bloom", nd);
452
  _set("flower-locked", "8 (proven pistil, offline)");
@@ -520,7 +521,7 @@ function _applyPlain() {
520
  // =============================================================================
521
  function unmount() {
522
  _polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = [];
523
- try { if (_overlay && _overlay.parentNode) _overlay.parentNode.removeChild(_overlay); } catch (_) {}
524
  try {
525
  if (_group && _stage) {
526
  _group.traverse((o) => {
 
29
  // Surface export shape: export default { id, title, endpoints, mount(ctx), unmount() }
30
  // ctx = { stage, container, live, label, THREE, szl3d }
31
 
32
+ import { createShowcase } from "./_showcase.js";
33
+
34
  const ID = "flower";
35
  const TITLE = "The Flower Brain";
36
 
 
86
  const PETAL_DR = 0.62; // radial step per tier-depth ring within a petal
87
 
88
  let _stage = null, _THREE = null, _ctx = null, _group = null, _overlay = null;
89
+ let _frameReg = false, _polls = [], _badge = null, _plain = false, _show = null;
90
 
91
  let _pistil = null; // the immutable proven-core mesh at the center
92
  let _petalGroups = {}; // petalKey -> THREE.Group (rotates/scales on bloom)
 
125
  _stage.scene.add(_group);
126
  _t0 = (typeof performance !== "undefined" ? performance.now() : Date.now());
127
 
128
+ _badge = ctx.live.createBadge();
129
  _buildOverlay(ctx);
130
  _buildScaffold(); // pistil + 8 empty petal groups (render before live data)
 
131
 
132
  // Pull the real graph once, then poll the bloom snapshot every 5s.
133
  _polls.push(ctx.live.poll(EP_GRAPH, 0, _onGraph, {
 
403
  // overlay HUD
404
  // =============================================================================
405
  function _buildOverlay(ctx) {
406
+ _show = createShowcase(ctx, {
407
+ id: ID, title: TITLE, accent: "#3af4c8", badge: _badge,
408
+ chips: [{ label: "MODELED", name: "label" }],
409
+ });
410
  _overlay = document.createElement("div");
411
+ _overlay.style.cssText = "font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;";
 
 
 
412
  _overlay.innerHTML =
 
 
413
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">Everything SZL built as one 8-petal bloom — the proven-8 pistil at the center, petals open with cluster health.</div>' +
414
  '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">' +
415
  _row("Overall bloom", "flower-bloom") +
 
426
  '<div style="margin-top:8px"><button id="flower-plain" style="font:11px ui-monospace;background:#0f2027;color:#9fc;' +
427
  'border:1px solid #1b3a44;border-radius:6px;padding:3px 8px;cursor:pointer">Plain language</button></div>' +
428
  '<div id="flower-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>';
429
+ _show.body.appendChild(_overlay);
430
  const btn = _overlay.querySelector("#flower-plain");
431
  if (btn) btn.addEventListener("click", () => { _plain = !_plain; _applyPlain(); });
432
  }
 
447
  const deg = missing || (S.state === "degraded");
448
  const nd = "NO-LIVE-DATA";
449
 
450
+ if (_show) _show.setChip("label", S.label || "MODELED");
451
  if (missing && !S.nodes.length) {
452
  _set("flower-bloom", nd);
453
  _set("flower-locked", "8 (proven pistil, offline)");
 
521
  // =============================================================================
522
  function unmount() {
523
  _polls.forEach((p) => { try { p.stop(); } catch (_) {} }); _polls = [];
524
+ try { if (_show) _show.destroy(); } catch (_) {} _show = null;
525
  try {
526
  if (_group && _stage) {
527
  _group.traverse((o) => {
static/3d/surfaces/loopforge.js CHANGED
@@ -6,6 +6,8 @@
6
  // J-lens-analogue WORKSPACE READOUT of the loop's own pre-commit state.
7
  // See DEV3_REPORT.md for the full write-up. ZERO PURPLE. Vendored three via ctx.THREE.
8
 
 
 
9
  const ID = "loopforge";
10
  const TITLE = "Loop Forge";
11
 
@@ -30,7 +32,7 @@ function _flagClass(k){ if(k==null) return {color:C_FLAG,label:"flag"}; const s=
30
  const HUB_R=0.6, RING_R=3.0, BRANCH_IN=0.9, ARCHIVE_R=4.3, TOKEN_R=2.0, FLAG_LANE_Y=2.7;
31
 
32
  let _stage=null,_THREE=null,_ctx=null,_group=null,_overlay=null;
33
- let _frameReg=false,_polls=[],_badge=null,_plain=false;
34
  let _hub=null,_ring=null,_ringGlow=null,_branchGroup=null,_tokenGroup=null,_flagGroup=null;
35
  let _branchMeshes=[],_tokenMeshes=[],_flagMeshes=[],_t0=0;
36
 
@@ -45,10 +47,8 @@ function mount(ctx){
45
  _ctx=ctx;_stage=ctx.stage;_THREE=ctx.THREE;
46
  _group=new _THREE.Group();_stage.scene.add(_group);
47
  _t0=(typeof performance!=="undefined"?performance.now():Date.now());
48
- _buildOverlay(ctx);_buildScaffold();
49
  _badge=ctx.live.createBadge();
50
- const brow=_overlay&&_overlay.querySelector("#lf-badgerow");
51
- if(brow&&_badge&&_badge.el) brow.appendChild(_badge.el);
52
  _polls.push(ctx.live.poll(EP_RUN,6000,_onRun,{ badge:_badge, onState:(m)=>{S.state=m.state;_paintOverlay();},
53
  fetchInit:{ method:"POST", headers:{"accept":"application/json","content-type":"application/json"}, body:"{}" } }));
54
  _polls.push(ctx.live.poll(EP_ARCHIVE,7000,_onArchive,{ onState:(m)=>{S.state=m.state;_paintOverlay();} }));
@@ -217,13 +217,14 @@ function _animate(){
217
  _group.rotation.y=t*0.06;
218
  }
219
  function _buildOverlay(ctx){
 
 
 
 
220
  _overlay=document.createElement("div");
221
- _overlay.style.cssText="position:absolute;top:12px;left:12px;max-width:376px;font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;background:rgba(10,17,23,0.86);border:1px solid #1b3a44;border-radius:10px;padding:12px 14px;pointer-events:auto;backdrop-filter:blur(3px);z-index:20;max-height:calc(100% - 24px);overflow:auto;";
222
  _overlay.innerHTML=
223
- '<div style="font-weight:700;letter-spacing:.03em;color:#eaf6f9;font-size:13px">Loop Forge <span id="lf-label" style="float:right;font-size:10px;padding:1px 7px;border-radius:8px;background:#123;color:#3af4c8;border:1px solid #1b3a44">MODELED</span></div>'+
224
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">Kernel-gated agentic loop. Proposer branches bloom from the HEART/BLOOD hub; the kernel gate ring accepts (gold, archived) or rejects (grey, falls away). The orbiting cloud is the workspace readout of the "silent" candidate tokens; the raised lane surfaces safety flags <b>before commit</b>.</div>'+
225
- '<div id="lf-badgerow" style="margin-top:8px"></div>'+
226
- '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">'+
227
  '<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:3px">Kernel-gate invariants</div>'+
228
  '<div id="lf-inv" style="font-size:11px;color:#eaf6f9"></div>'+
229
  '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">'+
@@ -242,7 +243,7 @@ function _buildOverlay(ctx){
242
  '</div>'+
243
  '<div id="lf-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>'+
244
  '<div id="lf-infobox" style="display:none;margin-top:8px;font-size:10px;color:#bcd;line-height:1.55"></div>';
245
- (ctx.container||document.body).appendChild(_overlay);
246
  const pb=_overlay.querySelector("#lf-plain"); if(pb) pb.addEventListener("click",()=>{_plain=!_plain;_applyPlain();});
247
  const ib=_overlay.querySelector("#lf-info");
248
  if(ib) ib.addEventListener("click",()=>{ const box=_overlay.querySelector("#lf-infobox");
@@ -266,7 +267,7 @@ function _paintOverlay(){
266
  if(!_overlay)return;
267
  const missing=(S.state==="missing"||S.state==="error"); const deg=missing||(S.state==="degraded");
268
  const nd="NO-LIVE-DATA"; const d=deg?"—":null;
269
- _set("lf-label",S.label||"MODELED");
270
  const inv=_overlay.querySelector("#lf-inv");
271
  if(inv) inv.innerHTML=_check("writer ≠ judge",S.writerNeJudge,true)+_check("kernel outside loop",S.kernelOutsideLoop,true)+_checkZero("conjecture rendered green",S.conjGreen);
272
  if(missing&&!S.branches.length){
@@ -300,7 +301,7 @@ function _infoHTML(){
300
  }
301
  function unmount(){
302
  _polls.forEach((p)=>{ try{p.stop();}catch(_){} }); _polls=[];
303
- try{ if(_overlay&&_overlay.parentNode) _overlay.parentNode.removeChild(_overlay); }catch(_){}
304
  try{ if(_group&&_stage){ _group.traverse((o)=>{ if(o.geometry&&o.geometry.dispose)o.geometry.dispose();
305
  if(o.material){const ms=Array.isArray(o.material)?o.material:[o.material];ms.forEach((m)=>{if(m.dispose)m.dispose();});} }); _stage.scene.remove(_group); } }catch(_){}
306
  _group=_overlay=null; _hub=_ring=_ringGlow=null; _branchGroup=_tokenGroup=_flagGroup=null;
 
6
  // J-lens-analogue WORKSPACE READOUT of the loop's own pre-commit state.
7
  // See DEV3_REPORT.md for the full write-up. ZERO PURPLE. Vendored three via ctx.THREE.
8
 
9
+ import { createShowcase } from "./_showcase.js";
10
+
11
  const ID = "loopforge";
12
  const TITLE = "Loop Forge";
13
 
 
32
  const HUB_R=0.6, RING_R=3.0, BRANCH_IN=0.9, ARCHIVE_R=4.3, TOKEN_R=2.0, FLAG_LANE_Y=2.7;
33
 
34
  let _stage=null,_THREE=null,_ctx=null,_group=null,_overlay=null;
35
+ let _frameReg=false,_polls=[],_badge=null,_plain=false,_show=null;
36
  let _hub=null,_ring=null,_ringGlow=null,_branchGroup=null,_tokenGroup=null,_flagGroup=null;
37
  let _branchMeshes=[],_tokenMeshes=[],_flagMeshes=[],_t0=0;
38
 
 
47
  _ctx=ctx;_stage=ctx.stage;_THREE=ctx.THREE;
48
  _group=new _THREE.Group();_stage.scene.add(_group);
49
  _t0=(typeof performance!=="undefined"?performance.now():Date.now());
 
50
  _badge=ctx.live.createBadge();
51
+ _buildOverlay(ctx);_buildScaffold();
 
52
  _polls.push(ctx.live.poll(EP_RUN,6000,_onRun,{ badge:_badge, onState:(m)=>{S.state=m.state;_paintOverlay();},
53
  fetchInit:{ method:"POST", headers:{"accept":"application/json","content-type":"application/json"}, body:"{}" } }));
54
  _polls.push(ctx.live.poll(EP_ARCHIVE,7000,_onArchive,{ onState:(m)=>{S.state=m.state;_paintOverlay();} }));
 
217
  _group.rotation.y=t*0.06;
218
  }
219
  function _buildOverlay(ctx){
220
+ _show=createShowcase(ctx,{
221
+ id:ID, title:TITLE, accent:"#3af4c8", badge:_badge,
222
+ chips:[{label:"MODELED", name:"label"}],
223
+ });
224
  _overlay=document.createElement("div");
225
+ _overlay.style.cssText="font:12px/1.5 ui-monospace,Menlo,monospace;color:#cfe3ea;";
226
  _overlay.innerHTML=
 
227
  '<div style="margin-top:2px;color:#8fb3bd;font-size:10.5px">Kernel-gated agentic loop. Proposer branches bloom from the HEART/BLOOD hub; the kernel gate ring accepts (gold, archived) or rejects (grey, falls away). The orbiting cloud is the workspace readout of the "silent" candidate tokens; the raised lane surfaces safety flags <b>before commit</b>.</div>'+
 
 
228
  '<div style="font-size:10.5px;color:#8fb3bd;margin-bottom:3px">Kernel-gate invariants</div>'+
229
  '<div id="lf-inv" style="font-size:11px;color:#eaf6f9"></div>'+
230
  '<hr style="border:0;border-top:1px solid #1b3a44;margin:8px 0">'+
 
243
  '</div>'+
244
  '<div id="lf-plainbox" style="display:none;margin-top:8px;font-size:10.5px;color:#bcd;line-height:1.55"></div>'+
245
  '<div id="lf-infobox" style="display:none;margin-top:8px;font-size:10px;color:#bcd;line-height:1.55"></div>';
246
+ _show.body.appendChild(_overlay);
247
  const pb=_overlay.querySelector("#lf-plain"); if(pb) pb.addEventListener("click",()=>{_plain=!_plain;_applyPlain();});
248
  const ib=_overlay.querySelector("#lf-info");
249
  if(ib) ib.addEventListener("click",()=>{ const box=_overlay.querySelector("#lf-infobox");
 
267
  if(!_overlay)return;
268
  const missing=(S.state==="missing"||S.state==="error"); const deg=missing||(S.state==="degraded");
269
  const nd="NO-LIVE-DATA"; const d=deg?"—":null;
270
+ if(_show) _show.setChip("label",S.label||"MODELED");
271
  const inv=_overlay.querySelector("#lf-inv");
272
  if(inv) inv.innerHTML=_check("writer ≠ judge",S.writerNeJudge,true)+_check("kernel outside loop",S.kernelOutsideLoop,true)+_checkZero("conjecture rendered green",S.conjGreen);
273
  if(missing&&!S.branches.length){
 
301
  }
302
  function unmount(){
303
  _polls.forEach((p)=>{ try{p.stop();}catch(_){} }); _polls=[];
304
+ try{ if(_show) _show.destroy(); }catch(_){} _show=null;
305
  try{ if(_group&&_stage){ _group.traverse((o)=>{ if(o.geometry&&o.geometry.dispose)o.geometry.dispose();
306
  if(o.material){const ms=Array.isArray(o.material)?o.material:[o.material];ms.forEach((m)=>{if(m.dispose)m.dispose();});} }); _stage.scene.remove(_group); } }catch(_){}
307
  _group=_overlay=null; _hub=_ring=_ringGlow=null; _branchGroup=_tokenGroup=_flagGroup=null;