betterwithage Claude Opus 4.7 commited on
Commit
d4d9887
·
verified ·
1 Parent(s): e259128

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

Browse files

Reusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 848 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>

Files changed (1) hide show
  1. pages/console.html +42 -42
pages/console.html CHANGED
@@ -180,7 +180,7 @@ pre.out{font-family:var(--mono);font-size:11.5px;line-height:1.55;color:var(--pa
180
  /* full-width single column + readable viz on portrait */
181
  .grid2,.split2{grid-template-columns:1fr!important;}
182
  .grid2>*,.split2>*{min-width:0!important;max-width:100%;}
183
- #cd-pane-chaski pre.out{max-width:100%;overflow-x:auto;}
184
  .kpis{grid-template-columns:repeat(auto-fit,minmax(46%,1fr));}
185
  .view-title{font-size:1.35rem;}
186
  .view-sub{font-size:12px;}
@@ -1482,12 +1482,12 @@ knowledge:{title:'Knowledge Ontology',badge:'AXIOMS \u2192 THEOREMS \u2192 FORMU
1482
  codetab:{title:'a11oy Code',badge:'CHAT \u00b7 CODE \u00b7 RESEARCH \u00b7 GOVERNED',sub:'A governed agentic coder you can mathematically trust \u2014 NOT AGI. Three modes (chat, run code, research), and EVERY turn flows through the proven P1\u2013P6 governed loop and emits a signed, re-verifiable receipt. Code actually runs in a real governed sandbox (restricted subprocess: no network, CPU/memory/time limits). The model roster is OPEN-WEIGHT only (Qwen2.5-Coder, Phi, Gemma, Mistral-Nemo, StarCoder2, DeepSeek-Coder, Codestral, Llama) \u2014 nothing closed is ever claimed as baked in. The router pick is stability-bounded (C20), bracketed best\u2013worst (W7-5), and the confidence is conformal (W5-3/W7-4) so it never reports 100%.',
1483
  render:async(c)=>{c.innerHTML=`
1484
  <div class="btns" id="cd-subtabs" style="gap:8px;margin-bottom:12px;flex-wrap:wrap">
1485
- <button class="btn teal" id="cd-sub-chaski" onclick="codetab_sub('chaski')">\u2691 a11oy Code \u2014 agentic surface</button>
1486
  <button class="btn" id="cd-sub-turn" onclick="codetab_sub('turn')">\u232b Governed turn (P1\u2013P6)</button>
1487
  <span class="mono dim" id="cd-sub-hint" style="font-size:11px;align-self:center">a11oy Code runs the live agent loop \u2014 plan, retrieve, act, verify \u2014 a receipt for every step</span>
1488
  </div>
1489
- <!-- ============ CHASKI AGENTIC SURFACE (additive, 0-CDN) ============ -->
1490
- <div id="cd-pane-chaski">
1491
  <div class="kpis">
1492
  <div class="kpi"><div class="k">FSM state</div><div class="v teal" id="ck-state">IDLE</div><div class="d">9-state governed engine</div></div>
1493
  <div class="kpi"><div class="k">Step</div><div class="v" id="ck-step">0 / 12</div><div class="d">vs max_steps guard</div></div>
@@ -1498,15 +1498,15 @@ knowledge:{title:'Knowledge Ontology',badge:'AXIOMS \u2192 THEOREMS \u2192 FORMU
1498
  <div class="row" id="ck-brain"><span class="mono dim">probing brain state\u2026</span></div>
1499
  <div class="row" id="ck-corpus-head" style="margin-top:6px"><span class="mono dim">loading corpus status\u2026</span></div>
1500
  <div id="ck-corpus" style="display:flex;flex-wrap:wrap;gap:6px;margin-top:6px"></div>
1501
- <div class="btns" style="margin-top:8px;gap:8px;flex-wrap:wrap"><button class="btn" id="ck-refresh-btn" onclick="chaski_refresh()">\u21bb Refresh corpus index</button><span class="mono dim" id="ck-refresh-note" style="font-size:11px;align-self:center"></span></div>
1502
  </div>
1503
  <div class="card"><div class="card-h"><span class="card-t">Ask a11oy Code</span><span class="card-ep">live \u00b7 agentic \u00b7 governed</span></div>
1504
  <textarea id="ck-input" aria-label="Governed coder prompt" class="in" style="width:100%;min-height:72px;padding:10px;background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-family:ui-monospace,monospace;font-size:13px">List the repos in the szl-holdings org and summarise what a11oy does.</textarea>
1505
  <div class="btns" style="gap:8px;margin-top:8px;flex-wrap:wrap">
1506
  <label class="mono dim" style="font-size:11px;align-self:center;display:inline-flex;align-items:center;gap:6px">tier
1507
  <select id="ck-tier" aria-label="Model tier" style="background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-family:ui-monospace,monospace;font-size:11px;padding:4px 6px"><option value="T1">FAST (T1)</option><option value="T2">HEART (T2)</option><option value="T3">PRIME (T3)</option><option value="T5">FRONTIER (T5)</option></select></label>
1508
- <button class="btn teal" id="ck-run-btn" onclick="chaski_run()">\u25b6 Run agentic turn</button>
1509
- <button class="btn" id="ck-stop-btn" onclick="chaski_stop()" disabled>\u25a0 Stop</button>
1510
  </div>
1511
  </div>
1512
  <div class="grid2" style="margin-top:12px">
@@ -1528,7 +1528,7 @@ knowledge:{title:'Knowledge Ontology',badge:'AXIOMS \u2192 THEOREMS \u2192 FORMU
1528
  <label class="mono dim" style="font-size:11px;align-self:center;display:inline-flex;align-items:center;gap:6px">app
1529
  <select id="ck-app" aria-label="Target app" style="background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-family:ui-monospace,monospace;font-size:11px;padding:4px 6px"><option value="a11oy" selected>a11oy</option><option value="killinchu">killinchu</option></select></label>
1530
  <input id="ck-cmd" class="in" placeholder="slash command, e.g. /status" value="/status" style="flex:1;min-width:200px;padding:8px;background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-size:12px"/>
1531
- <button class="btn teal" id="ck-disp-btn" onclick="chaski_dispatch()">\u2197 Dispatch governed command</button>
1532
  </div>
1533
  <pre class="out" id="ck-orch" style="max-height:200px;margin-top:8px">\u2014 dispatch a command to see its DSSE receipt \u2014</pre>
1534
  </div>
@@ -1571,7 +1571,7 @@ knowledge:{title:'Knowledge Ontology',badge:'AXIOMS \u2192 THEOREMS \u2192 FORMU
1571
  <div class="row"><span class="badge b-gold">DEQ / EqR</span><span>Fixed-point (equilibrium) reasoning receipt \u2014 the answer is a verified fixed point of the reasoning map (Banach iteration to a residual floor). <span class="mono dim">EXPERIMENTAL \u00b7 clean-room \u00b7 MIT \u00b7 not a locked-8 claim</span></span></div>
1572
  <div class="row"><span class="badge b-teal">HALTS</span><span>The run provably finishes in bounded steps (F-G5 bounded-frontier).</span></div></div></div>
1573
  <details class="raw"><summary>raw governed-turn run + signed receipt</summary><pre class="out" id="cd-raw">\u2014</pre></details>
1574
- </div><!-- /cd-pane-turn -->${HONEST}`;window.codetab_sub(window._cd_sub||'chaski');window.codetab_load();window.chaski_load();}},
1575
 
1576
  honest:{title:'What We Claim',badge:'NO BANDAIDS',sub:'The single source of truth for what this platform does and does NOT claim \u2014 published, not marketed. If it is not proven, we say so.',
1577
  render:async(c)=>{c.innerHTML=`<div class="card"><div class="card-h"><span class="card-t">Honest claims</span><span class="card-ep">live</span></div><div id="ho-host"><div class="row mono dim">loading\u2026</div></div></div>
@@ -3084,7 +3084,7 @@ window.codetab_verify=codetab_verify;window.codetab_tamper=codetab_tamper;
3084
  DOM write via the house el()/setHTML()/setTxt() helpers (never bare innerHTML
3085
  on a possibly-missing node in an async path).
3086
  ============================================================================ */
3087
- window._cd_sub='chaski';
3088
  window._ck_abort=null;
3089
  window._ck_nodes={}; // id -> node (for the 3D graph)
3090
  window._ck_links=[];
@@ -3092,23 +3092,23 @@ window._ck_retrieved={}; // ids lit up this turn
3092
  const CK_VIOLET='#B79BD6';
3093
  function codetab_sub(which){
3094
  window._cd_sub=which;
3095
- const pc=el('cd-pane-chaski'),pt=el('cd-pane-turn');
3096
- if(pc)pc.style.display=(which==='chaski')?'':'none';
3097
  if(pt)pt.style.display=(which==='turn')?'':'none';
3098
- const bc=el('cd-sub-chaski'),bt=el('cd-sub-turn');
3099
- if(bc)bc.className='btn'+(which==='chaski'?' teal':'');
3100
  if(bt)bt.className='btn'+(which==='turn'?' teal':'');
3101
  const h=el('cd-sub-hint');
3102
- if(h)h.textContent=(which==='chaski')
3103
  ? 'a11oy Code runs the live agent loop \u2014 plan, retrieve, act, verify \u2014 a receipt for every step'
3104
  : 'Governed turn \u2014 single P1\u2013P6 governed run with signed receipt chain + tamper test';
3105
- // (re)seed the 3D graph when the Chaski pane becomes visible
3106
- if(which==='chaski'){ try{ chaski_seed_graph(); }catch(e){} }
3107
  }
3108
  window.codetab_sub=codetab_sub;
3109
 
3110
  /* ---- honest brain state + live corpus (7 categories) ---- */
3111
- async function chaski_load(){
3112
  // brain state from /api/a11oy/code/healthz (mode + key_resolution honesty)
3113
  try{
3114
  const hz=await getJSON('/api/a11oy/code/healthz');
@@ -3125,13 +3125,13 @@ async function chaski_load(){
3125
  const ep=el('ck-mode-ep'); if(ep)ep.textContent=wired?'brain: live':'brain: labeled stub';
3126
  }catch(e){ setHTML('ck-brain','<span class="badge" style="border:1px solid '+AMBER+';color:'+AMBER+'">brain status unavailable</span><span class="mono dim">'+esc(e.message)+'</span>'); }
3127
  // corpus status (7 categories, chunk counts)
3128
- await chaski_corpus();
3129
  // seed the 3D org-knowledge graph from the corpus categories + repos
3130
- try{ chaski_seed_graph(); }catch(e){}
3131
  }
3132
- window.chaski_load=chaski_load;
3133
 
3134
- async function chaski_corpus(){
3135
  try{
3136
  const st=await getJSON('/api/a11oy/code/rag/status');
3137
  const per=st.per_category||{};
@@ -3162,21 +3162,21 @@ async function chaski_corpus(){
3162
  }catch(e){ setHTML('ck-corpus-head','<span class="badge" style="border:1px solid '+AMBER+';color:'+AMBER+'">corpus status unavailable</span><span class="mono dim">'+esc(e.message)+'</span>'); }
3163
  }
3164
 
3165
- async function chaski_refresh(){
3166
  const btn=el('ck-refresh-btn'); if(btn)btn.disabled=true;
3167
  setTxt('ck-refresh-note','refreshing index\u2026');
3168
  try{
3169
  const r=await fetch('/api/a11oy/code/rag/refresh',{method:'POST',headers:{'Content-Type':'application/json'},body:'{}'});
3170
  const j=await r.json().catch(()=>({}));
3171
  setTxt('ck-refresh-note', r.ok?('refreshed \u00b7 '+((j.chunks!=null?j.chunks+' chunks':'')||'ok')):('HTTP '+r.status));
3172
- await chaski_corpus(); chaski_seed_graph();
3173
  }catch(e){ setTxt('ck-refresh-note','refresh unavailable: '+e.message); }
3174
  if(btn)btn.disabled=false;
3175
  }
3176
- window.chaski_refresh=chaski_refresh;
3177
 
3178
  /* ---- 3D org-knowledge graph (vendored ForceGraph3D + THREE, 0 CDN) ---- */
3179
- function chaski_seed_graph(){
3180
  const host=el('ck-3d'); if(!host) return;
3181
  if(!window.ForceGraph3D){ host.innerHTML='<div class="row mono dim" style="padding:1rem">3D engine (ForceGraph3D) not present</div>'; return; }
3182
  // Build org-knowledge graph: org root -> repos (from corpus categories) -> seed files.
@@ -3212,9 +3212,9 @@ function chaski_seed_graph(){
3212
  });
3213
  });
3214
  window._ck_nodes=nodes; window._ck_links=links; window._ck_retrieved={};
3215
- chaski_render_graph();
3216
  }
3217
- function chaski_render_graph(){
3218
  const host=el('ck-3d'); if(!host||!window.ForceGraph3D) return;
3219
  host.innerHTML='';
3220
  const data={nodes:Object.values(window._ck_nodes||{}),links:(window._ck_links||[]).slice()};
@@ -3235,7 +3235,7 @@ function chaski_render_graph(){
3235
  }catch(e){ host.innerHTML='<div class="row mono dim" style="padding:1rem">3D init: '+esc(e.message)+'</div>'; }
3236
  }
3237
  /* light up nodes whose repo/file matches a retrieved evidence ref, refresh colors */
3238
- function chaski_light(refs){
3239
  if(!refs||!refs.length) return;
3240
  let changed=false;
3241
  refs.forEach(ref=>{
@@ -3262,7 +3262,7 @@ function _ck_lambdaBadge(lam,allow){
3262
  const col=allow?TEAL:RED;
3263
  return '<span class="badge" style="border:1px solid '+col+';color:'+col+'">\u039b '+v+'</span>';
3264
  }
3265
- async function chaski_run(){
3266
  if(window._ck_abort){try{window._ck_abort.abort();}catch(e){}}
3267
  const prompt=(el('ck-input')||{}).value||'';
3268
  const tier=(el('ck-tier')||{}).value||'T1';
@@ -3273,7 +3273,7 @@ async function chaski_run(){
3273
  const runBtn=el('ck-run-btn'),stopBtn=el('ck-stop-btn');
3274
  if(runBtn)runBtn.disabled=true; if(stopBtn)stopBtn.disabled=false;
3275
  // reset graph highlights
3276
- window._ck_retrieved={}; chaski_render_graph();
3277
  let answer='';
3278
  const ctrl=new AbortController(); window._ck_abort=ctrl;
3279
  try{
@@ -3300,12 +3300,12 @@ async function chaski_run(){
3300
  if(stepsHost)stepsHost.insertAdjacentHTML('beforeend',
3301
  '<div class="row"><span class="badge b-teal">ROUTE</span><span>tier <b>'+esc(d.tier||'')+'</b> \u00b7 model <b>'+esc(d.model||'')+'</b> \u00b7 license '+esc(d.license_class||'')+' <span class="dim mono" style="font-size:10px">'+esc(d.reason||'')+'</span></span></div>');
3302
  }else if(evt==='agent_step'){
3303
- chaski_render_step(d); answer='';
3304
  }else if(evt==='token'){
3305
  answer+=(d.text||'');
3306
  setHTML('ck-answer','<div class="row"><span class="badge b-teal">FINALIZE</span><span style="white-space:pre-wrap">'+esc(answer)+'</span></div>');
3307
  }else if(evt==='done'){
3308
- chaski_render_done(d);
3309
  }
3310
  }
3311
  }
@@ -3314,11 +3314,11 @@ async function chaski_run(){
3314
  }
3315
  if(runBtn)runBtn.disabled=false; if(stopBtn)stopBtn.disabled=true; window._ck_abort=null;
3316
  }
3317
- window.chaski_run=chaski_run;
3318
- function chaski_stop(){ if(window._ck_abort){try{window._ck_abort.abort();}catch(e){}} const rb=el('ck-run-btn'),sb=el('ck-stop-btn'); if(rb)rb.disabled=false; if(sb)sb.disabled=true; }
3319
- window.chaski_stop=chaski_stop;
3320
 
3321
- function chaski_render_step(d){
3322
  const stepsHost=el('ck-steps'); if(!stepsHost)return;
3323
  const st=d.state||'?'; const col=CK_STATE_COLOR[st]||GOLD;
3324
  // KPIs
@@ -3342,7 +3342,7 @@ function chaski_render_step(d){
3342
  evHtml+='<div class="row" style="margin-left:14px"><span class="badge" style="font-size:9px;border:1px solid '+kcol+';color:'+kcol+'">'+icon+' '+esc(k)+'</span><span class="dim" style="font-size:11px;word-break:break-all">'+det+lamd+'</span></div>';
3343
  if(k==='file'&&ev.ref)refs.push(ev.ref);
3344
  });
3345
- if(refs.length)chaski_light(refs);
3346
  // plan DAG mini-render for PLAN state
3347
  let planHtml='';
3348
  if(st==='PLAN'&&d.args&&d.args.nodes){
@@ -3363,7 +3363,7 @@ function chaski_render_step(d){
3363
  stepsHost.insertAdjacentHTML('beforeend',html);
3364
  stepsHost.scrollTop=stepsHost.scrollHeight;
3365
  }
3366
- function chaski_render_done(d){
3367
  setTxt('ck-state',d.final_state||'FINALIZE');
3368
  if(d.khipu_hash)setTxt('ck-chain',String(d.khipu_hash).slice(0,12)+'\u2026');
3369
  const stub=d.stub===true;
@@ -3379,11 +3379,11 @@ function chaski_render_done(d){
3379
  // final grounded-evidence list lights the graph
3380
  const ge=d.grounded_evidence||[]; const refs=[];
3381
  ge.forEach(ev=>{ if(ev.kind==='file'&&ev.ref)refs.push(ev.ref); });
3382
- if(refs.length)chaski_light(refs);
3383
  }
3384
 
3385
  /* ---- orchestration: governed command across apps (operator_shell_v4 bus) ---- */
3386
- async function chaski_dispatch(){
3387
  const app=(el('ck-app')||{}).value||'killinchu';
3388
  const cmd=(el('ck-cmd')||{}).value||'/status';
3389
  const btn=el('ck-disp-btn'); if(btn)btn.disabled=true;
@@ -3412,7 +3412,7 @@ async function chaski_dispatch(){
3412
  }
3413
  if(btn)btn.disabled=false;
3414
  }
3415
- window.chaski_dispatch=chaski_dispatch;
3416
 
3417
 
3418
  /* ===== FRONTIER TAB LOADERS (injected) ===== */
 
180
  /* full-width single column + readable viz on portrait */
181
  .grid2,.split2{grid-template-columns:1fr!important;}
182
  .grid2>*,.split2>*{min-width:0!important;max-width:100%;}
183
+ #cd-pane-a11oy pre.out{max-width:100%;overflow-x:auto;}
184
  .kpis{grid-template-columns:repeat(auto-fit,minmax(46%,1fr));}
185
  .view-title{font-size:1.35rem;}
186
  .view-sub{font-size:12px;}
 
1482
  codetab:{title:'a11oy Code',badge:'CHAT \u00b7 CODE \u00b7 RESEARCH \u00b7 GOVERNED',sub:'A governed agentic coder you can mathematically trust \u2014 NOT AGI. Three modes (chat, run code, research), and EVERY turn flows through the proven P1\u2013P6 governed loop and emits a signed, re-verifiable receipt. Code actually runs in a real governed sandbox (restricted subprocess: no network, CPU/memory/time limits). The model roster is OPEN-WEIGHT only (Qwen2.5-Coder, Phi, Gemma, Mistral-Nemo, StarCoder2, DeepSeek-Coder, Codestral, Llama) \u2014 nothing closed is ever claimed as baked in. The router pick is stability-bounded (C20), bracketed best\u2013worst (W7-5), and the confidence is conformal (W5-3/W7-4) so it never reports 100%.',
1483
  render:async(c)=>{c.innerHTML=`
1484
  <div class="btns" id="cd-subtabs" style="gap:8px;margin-bottom:12px;flex-wrap:wrap">
1485
+ <button class="btn teal" id="cd-sub-a11oy" onclick="codetab_sub('a11oy')">\u2691 a11oy Code \u2014 agentic surface</button>
1486
  <button class="btn" id="cd-sub-turn" onclick="codetab_sub('turn')">\u232b Governed turn (P1\u2013P6)</button>
1487
  <span class="mono dim" id="cd-sub-hint" style="font-size:11px;align-self:center">a11oy Code runs the live agent loop \u2014 plan, retrieve, act, verify \u2014 a receipt for every step</span>
1488
  </div>
1489
+ <!-- ============ A11OY CODE AGENTIC SURFACE (additive, 0-CDN) ============ -->
1490
+ <div id="cd-pane-a11oy">
1491
  <div class="kpis">
1492
  <div class="kpi"><div class="k">FSM state</div><div class="v teal" id="ck-state">IDLE</div><div class="d">9-state governed engine</div></div>
1493
  <div class="kpi"><div class="k">Step</div><div class="v" id="ck-step">0 / 12</div><div class="d">vs max_steps guard</div></div>
 
1498
  <div class="row" id="ck-brain"><span class="mono dim">probing brain state\u2026</span></div>
1499
  <div class="row" id="ck-corpus-head" style="margin-top:6px"><span class="mono dim">loading corpus status\u2026</span></div>
1500
  <div id="ck-corpus" style="display:flex;flex-wrap:wrap;gap:6px;margin-top:6px"></div>
1501
+ <div class="btns" style="margin-top:8px;gap:8px;flex-wrap:wrap"><button class="btn" id="ck-refresh-btn" onclick="a11oy_refresh()">\u21bb Refresh corpus index</button><span class="mono dim" id="ck-refresh-note" style="font-size:11px;align-self:center"></span></div>
1502
  </div>
1503
  <div class="card"><div class="card-h"><span class="card-t">Ask a11oy Code</span><span class="card-ep">live \u00b7 agentic \u00b7 governed</span></div>
1504
  <textarea id="ck-input" aria-label="Governed coder prompt" class="in" style="width:100%;min-height:72px;padding:10px;background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-family:ui-monospace,monospace;font-size:13px">List the repos in the szl-holdings org and summarise what a11oy does.</textarea>
1505
  <div class="btns" style="gap:8px;margin-top:8px;flex-wrap:wrap">
1506
  <label class="mono dim" style="font-size:11px;align-self:center;display:inline-flex;align-items:center;gap:6px">tier
1507
  <select id="ck-tier" aria-label="Model tier" style="background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-family:ui-monospace,monospace;font-size:11px;padding:4px 6px"><option value="T1">FAST (T1)</option><option value="T2">HEART (T2)</option><option value="T3">PRIME (T3)</option><option value="T5">FRONTIER (T5)</option></select></label>
1508
+ <button class="btn teal" id="ck-run-btn" onclick="a11oy_run()">\u25b6 Run agentic turn</button>
1509
+ <button class="btn" id="ck-stop-btn" onclick="a11oy_stop()" disabled>\u25a0 Stop</button>
1510
  </div>
1511
  </div>
1512
  <div class="grid2" style="margin-top:12px">
 
1528
  <label class="mono dim" style="font-size:11px;align-self:center;display:inline-flex;align-items:center;gap:6px">app
1529
  <select id="ck-app" aria-label="Target app" style="background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-family:ui-monospace,monospace;font-size:11px;padding:4px 6px"><option value="a11oy" selected>a11oy</option><option value="killinchu">killinchu</option></select></label>
1530
  <input id="ck-cmd" class="in" placeholder="slash command, e.g. /status" value="/status" style="flex:1;min-width:200px;padding:8px;background:#0d1411;border:1px solid #1c2a24;color:#cfe;border-radius:6px;font-size:12px"/>
1531
+ <button class="btn teal" id="ck-disp-btn" onclick="a11oy_dispatch()">\u2197 Dispatch governed command</button>
1532
  </div>
1533
  <pre class="out" id="ck-orch" style="max-height:200px;margin-top:8px">\u2014 dispatch a command to see its DSSE receipt \u2014</pre>
1534
  </div>
 
1571
  <div class="row"><span class="badge b-gold">DEQ / EqR</span><span>Fixed-point (equilibrium) reasoning receipt \u2014 the answer is a verified fixed point of the reasoning map (Banach iteration to a residual floor). <span class="mono dim">EXPERIMENTAL \u00b7 clean-room \u00b7 MIT \u00b7 not a locked-8 claim</span></span></div>
1572
  <div class="row"><span class="badge b-teal">HALTS</span><span>The run provably finishes in bounded steps (F-G5 bounded-frontier).</span></div></div></div>
1573
  <details class="raw"><summary>raw governed-turn run + signed receipt</summary><pre class="out" id="cd-raw">\u2014</pre></details>
1574
+ </div><!-- /cd-pane-turn -->${HONEST}`;window.codetab_sub(window._cd_sub||'a11oy');window.codetab_load();window.a11oy_load();}},
1575
 
1576
  honest:{title:'What We Claim',badge:'NO BANDAIDS',sub:'The single source of truth for what this platform does and does NOT claim \u2014 published, not marketed. If it is not proven, we say so.',
1577
  render:async(c)=>{c.innerHTML=`<div class="card"><div class="card-h"><span class="card-t">Honest claims</span><span class="card-ep">live</span></div><div id="ho-host"><div class="row mono dim">loading\u2026</div></div></div>
 
3084
  DOM write via the house el()/setHTML()/setTxt() helpers (never bare innerHTML
3085
  on a possibly-missing node in an async path).
3086
  ============================================================================ */
3087
+ window._cd_sub='a11oy';
3088
  window._ck_abort=null;
3089
  window._ck_nodes={}; // id -> node (for the 3D graph)
3090
  window._ck_links=[];
 
3092
  const CK_VIOLET='#B79BD6';
3093
  function codetab_sub(which){
3094
  window._cd_sub=which;
3095
+ const pc=el('cd-pane-a11oy'),pt=el('cd-pane-turn');
3096
+ if(pc)pc.style.display=(which==='a11oy')?'':'none';
3097
  if(pt)pt.style.display=(which==='turn')?'':'none';
3098
+ const bc=el('cd-sub-a11oy'),bt=el('cd-sub-turn');
3099
+ if(bc)bc.className='btn'+(which==='a11oy'?' teal':'');
3100
  if(bt)bt.className='btn'+(which==='turn'?' teal':'');
3101
  const h=el('cd-sub-hint');
3102
+ if(h)h.textContent=(which==='a11oy')
3103
  ? 'a11oy Code runs the live agent loop \u2014 plan, retrieve, act, verify \u2014 a receipt for every step'
3104
  : 'Governed turn \u2014 single P1\u2013P6 governed run with signed receipt chain + tamper test';
3105
+ // (re)seed the 3D graph when the a11oy Code pane becomes visible
3106
+ if(which==='a11oy'){ try{ a11oy_seed_graph(); }catch(e){} }
3107
  }
3108
  window.codetab_sub=codetab_sub;
3109
 
3110
  /* ---- honest brain state + live corpus (7 categories) ---- */
3111
+ async function a11oy_load(){
3112
  // brain state from /api/a11oy/code/healthz (mode + key_resolution honesty)
3113
  try{
3114
  const hz=await getJSON('/api/a11oy/code/healthz');
 
3125
  const ep=el('ck-mode-ep'); if(ep)ep.textContent=wired?'brain: live':'brain: labeled stub';
3126
  }catch(e){ setHTML('ck-brain','<span class="badge" style="border:1px solid '+AMBER+';color:'+AMBER+'">brain status unavailable</span><span class="mono dim">'+esc(e.message)+'</span>'); }
3127
  // corpus status (7 categories, chunk counts)
3128
+ await a11oy_corpus();
3129
  // seed the 3D org-knowledge graph from the corpus categories + repos
3130
+ try{ a11oy_seed_graph(); }catch(e){}
3131
  }
3132
+ window.a11oy_load=a11oy_load;
3133
 
3134
+ async function a11oy_corpus(){
3135
  try{
3136
  const st=await getJSON('/api/a11oy/code/rag/status');
3137
  const per=st.per_category||{};
 
3162
  }catch(e){ setHTML('ck-corpus-head','<span class="badge" style="border:1px solid '+AMBER+';color:'+AMBER+'">corpus status unavailable</span><span class="mono dim">'+esc(e.message)+'</span>'); }
3163
  }
3164
 
3165
+ async function a11oy_refresh(){
3166
  const btn=el('ck-refresh-btn'); if(btn)btn.disabled=true;
3167
  setTxt('ck-refresh-note','refreshing index\u2026');
3168
  try{
3169
  const r=await fetch('/api/a11oy/code/rag/refresh',{method:'POST',headers:{'Content-Type':'application/json'},body:'{}'});
3170
  const j=await r.json().catch(()=>({}));
3171
  setTxt('ck-refresh-note', r.ok?('refreshed \u00b7 '+((j.chunks!=null?j.chunks+' chunks':'')||'ok')):('HTTP '+r.status));
3172
+ await a11oy_corpus(); a11oy_seed_graph();
3173
  }catch(e){ setTxt('ck-refresh-note','refresh unavailable: '+e.message); }
3174
  if(btn)btn.disabled=false;
3175
  }
3176
+ window.a11oy_refresh=a11oy_refresh;
3177
 
3178
  /* ---- 3D org-knowledge graph (vendored ForceGraph3D + THREE, 0 CDN) ---- */
3179
+ function a11oy_seed_graph(){
3180
  const host=el('ck-3d'); if(!host) return;
3181
  if(!window.ForceGraph3D){ host.innerHTML='<div class="row mono dim" style="padding:1rem">3D engine (ForceGraph3D) not present</div>'; return; }
3182
  // Build org-knowledge graph: org root -> repos (from corpus categories) -> seed files.
 
3212
  });
3213
  });
3214
  window._ck_nodes=nodes; window._ck_links=links; window._ck_retrieved={};
3215
+ a11oy_render_graph();
3216
  }
3217
+ function a11oy_render_graph(){
3218
  const host=el('ck-3d'); if(!host||!window.ForceGraph3D) return;
3219
  host.innerHTML='';
3220
  const data={nodes:Object.values(window._ck_nodes||{}),links:(window._ck_links||[]).slice()};
 
3235
  }catch(e){ host.innerHTML='<div class="row mono dim" style="padding:1rem">3D init: '+esc(e.message)+'</div>'; }
3236
  }
3237
  /* light up nodes whose repo/file matches a retrieved evidence ref, refresh colors */
3238
+ function a11oy_light(refs){
3239
  if(!refs||!refs.length) return;
3240
  let changed=false;
3241
  refs.forEach(ref=>{
 
3262
  const col=allow?TEAL:RED;
3263
  return '<span class="badge" style="border:1px solid '+col+';color:'+col+'">\u039b '+v+'</span>';
3264
  }
3265
+ async function a11oy_run(){
3266
  if(window._ck_abort){try{window._ck_abort.abort();}catch(e){}}
3267
  const prompt=(el('ck-input')||{}).value||'';
3268
  const tier=(el('ck-tier')||{}).value||'T1';
 
3273
  const runBtn=el('ck-run-btn'),stopBtn=el('ck-stop-btn');
3274
  if(runBtn)runBtn.disabled=true; if(stopBtn)stopBtn.disabled=false;
3275
  // reset graph highlights
3276
+ window._ck_retrieved={}; a11oy_render_graph();
3277
  let answer='';
3278
  const ctrl=new AbortController(); window._ck_abort=ctrl;
3279
  try{
 
3300
  if(stepsHost)stepsHost.insertAdjacentHTML('beforeend',
3301
  '<div class="row"><span class="badge b-teal">ROUTE</span><span>tier <b>'+esc(d.tier||'')+'</b> \u00b7 model <b>'+esc(d.model||'')+'</b> \u00b7 license '+esc(d.license_class||'')+' <span class="dim mono" style="font-size:10px">'+esc(d.reason||'')+'</span></span></div>');
3302
  }else if(evt==='agent_step'){
3303
+ a11oy_render_step(d); answer='';
3304
  }else if(evt==='token'){
3305
  answer+=(d.text||'');
3306
  setHTML('ck-answer','<div class="row"><span class="badge b-teal">FINALIZE</span><span style="white-space:pre-wrap">'+esc(answer)+'</span></div>');
3307
  }else if(evt==='done'){
3308
+ a11oy_render_done(d);
3309
  }
3310
  }
3311
  }
 
3314
  }
3315
  if(runBtn)runBtn.disabled=false; if(stopBtn)stopBtn.disabled=true; window._ck_abort=null;
3316
  }
3317
+ window.a11oy_run=a11oy_run;
3318
+ function a11oy_stop(){ if(window._ck_abort){try{window._ck_abort.abort();}catch(e){}} const rb=el('ck-run-btn'),sb=el('ck-stop-btn'); if(rb)rb.disabled=false; if(sb)sb.disabled=true; }
3319
+ window.a11oy_stop=a11oy_stop;
3320
 
3321
+ function a11oy_render_step(d){
3322
  const stepsHost=el('ck-steps'); if(!stepsHost)return;
3323
  const st=d.state||'?'; const col=CK_STATE_COLOR[st]||GOLD;
3324
  // KPIs
 
3342
  evHtml+='<div class="row" style="margin-left:14px"><span class="badge" style="font-size:9px;border:1px solid '+kcol+';color:'+kcol+'">'+icon+' '+esc(k)+'</span><span class="dim" style="font-size:11px;word-break:break-all">'+det+lamd+'</span></div>';
3343
  if(k==='file'&&ev.ref)refs.push(ev.ref);
3344
  });
3345
+ if(refs.length)a11oy_light(refs);
3346
  // plan DAG mini-render for PLAN state
3347
  let planHtml='';
3348
  if(st==='PLAN'&&d.args&&d.args.nodes){
 
3363
  stepsHost.insertAdjacentHTML('beforeend',html);
3364
  stepsHost.scrollTop=stepsHost.scrollHeight;
3365
  }
3366
+ function a11oy_render_done(d){
3367
  setTxt('ck-state',d.final_state||'FINALIZE');
3368
  if(d.khipu_hash)setTxt('ck-chain',String(d.khipu_hash).slice(0,12)+'\u2026');
3369
  const stub=d.stub===true;
 
3379
  // final grounded-evidence list lights the graph
3380
  const ge=d.grounded_evidence||[]; const refs=[];
3381
  ge.forEach(ev=>{ if(ev.kind==='file'&&ev.ref)refs.push(ev.ref); });
3382
+ if(refs.length)a11oy_light(refs);
3383
  }
3384
 
3385
  /* ---- orchestration: governed command across apps (operator_shell_v4 bus) ---- */
3386
+ async function a11oy_dispatch(){
3387
  const app=(el('ck-app')||{}).value||'killinchu';
3388
  const cmd=(el('ck-cmd')||{}).value||'/status';
3389
  const btn=el('ck-disp-btn'); if(btn)btn.disabled=true;
 
3412
  }
3413
  if(btn)btn.disabled=false;
3414
  }
3415
+ window.a11oy_dispatch=a11oy_dispatch;
3416
 
3417
 
3418
  /* ===== FRONTIER TAB LOADERS (injected) ===== */