betterwithage commited on
Commit
08dcc19
·
verified ·
1 Parent(s): 55fd4fc

a11oy build wave: leader-grade console v4. INSTILL canonical knowledge (v5.1.0: locked-5 F1/F11/F12/F18/F19 proven, wave3/4/5 proof blocks, 23 puriq formulas, 10 vertical policies, plain-language maturity labels). ADD 4 out-of-this-world tabs: Trust Ledger (entity graph + verified hash-chain proof timeline), Knowledge Lineage (axiom->theorem->formula->DOI DAG colored by proof maturity + AIBOM export), Mission Health (Workloads honeycomb + business-outcome banner + signed trust floor), Reasoning Replay (3D run-tree + eval-on-span + chain receipt). UPGRADE graphs: live auto-refresh, animated, tooltips/legends/units, 3D where it helps. 33 tabs. HONEST: Lambda=Conjecture 1; only kernel-verified labeled proven; SLSA L2 (not L3); UNSIGNED receipts labeled honest; 0 amaru/sentra/rosie user-visible refs. All in-image data REAL (live local endpoints).

Browse files
Files changed (2) hide show
  1. console/index.html +34 -16
  2. pages/console.html +34 -16
console/index.html CHANGED
@@ -678,6 +678,7 @@ const VIEWS={
678
  <div class="kpi"><div class="k">Consistency</div><div class="chartbox" style="height:90px"><canvas id="rp-cons"></canvas></div><div class="v" id="rp-cons-v" style="font-size:15px">\u2014</div></div></div>
679
  <div class="kpi"><div class="k">Hallucination risk</div><div id="rp-halluc"><span class="v dim">\u2014</span></div></div>
680
  <div class="kpi"><div class="k">Chain receipt</div><div id="rp-receipt"><span class="dim mono">run a replay\u2026</span></div></div>
 
681
  </div>
682
  </div>${HONEST}`;window.replay_run();}},
683
  };
@@ -1335,19 +1336,31 @@ async function replay_run(){
1335
  setHTML('rp-answer','<div class="row mono dim">'+liveDot()+'reasoning…</div>');
1336
  try{
1337
  const r = await postJSON('/api/a11oy/v1/reason', {prompt:q, query:q});
1338
- // answer card
1339
- const ans = r.answer || r.response || r.reasoning || r.summary || JSON.stringify(r).slice(0,400);
1340
- const cited = r.cited_theorems || r.citations || r.theorems || [];
 
 
 
 
 
 
 
1341
  setHTML('rp-answer',
1342
- `<div class="row"><span class="badge b-live">grounded</span><span class="badge b-gold">cited</span></div>`
1343
- +`<div class="row" style="font-size:13px">${esc(typeof ans==='string'?ans:JSON.stringify(ans)).slice(0,600)}</div>`
1344
- +(cited.length?`<div class="row mono dim">cited: ${cited.map(esc).join(' · ')}</div>`:''));
1345
- // build a run-tree DAG from the reasoning structure
 
1346
  const nodes=[{id:'q',name:'Question',color:'#c9b787',val:8}];
1347
  const links=[];
1348
- const steps = r.steps || r.chain || r.trace || cited.map((c,i)=>({name:String(c),id:'s'+i}));
 
 
 
 
1349
  let prev='q';
1350
- (steps.length?steps:[{name:'grounded answer',id:'a'}]).forEach((s,i)=>{
1351
  const id=s.id||('s'+i);
1352
  nodes.push({id, name:(s.name||s.step||('step '+(i+1))), color:'#5fb3a3', val:5});
1353
  links.push({source:prev, target:id}); prev=id;
@@ -1355,17 +1368,22 @@ async function replay_run(){
1355
  nodes.push({id:'rcpt',name:'Chain receipt',color:'#c9b787',val:6}); links.push({source:prev,target:'rcpt'});
1356
  dag3d('rp-tree', nodes, links, {dagMode:'lr', dist:48});
1357
 
1358
- // Arize eval-on-span gauges (from confidence endpoint if available)
 
 
1359
  try{
1360
- const conf = await postJSON('/api/a11oy/v1/confidence', {prompt:q, query:q, answer:typeof ans==='string'?ans:''});
1361
- const cov = conf.citation_coverage!=null?conf.citation_coverage:(conf.coverage!=null?conf.coverage:0.0);
1362
- const cons = conf.cove_consistency!=null?conf.cove_consistency:(conf.consistency!=null?conf.consistency:0.0);
1363
- const halluc = conf.hallucination_risk!=null?conf.hallucination_risk:(conf.risk||'LOW');
 
 
1364
  gauge('rp-cov', cov, 'coverage', '#5fb3a3');
1365
  gauge('rp-cons', cons, 'consistency', '#c9b787');
1366
  setTxt('rp-cov-v', (cov*100).toFixed(0)+'%'); setTxt('rp-cons-v',(cons*100).toFixed(0)+'%');
1367
- const hl=String(halluc).toUpperCase();
1368
- setHTML('rp-halluc', `<span class="v ${hl.indexOf('HIGH')>=0?'err':'teal'}">${esc(hl)}</span>`);
 
1369
  }catch(e2){
1370
  gauge('rp-cov', 0, 'coverage', '#5fb3a3'); gauge('rp-cons',0,'consistency','#c9b787');
1371
  setHTML('rp-halluc','<span class="v dim">—</span>');
 
678
  <div class="kpi"><div class="k">Consistency</div><div class="chartbox" style="height:90px"><canvas id="rp-cons"></canvas></div><div class="v" id="rp-cons-v" style="font-size:15px">\u2014</div></div></div>
679
  <div class="kpi"><div class="k">Hallucination risk</div><div id="rp-halluc"><span class="v dim">\u2014</span></div></div>
680
  <div class="kpi"><div class="k">Chain receipt</div><div id="rp-receipt"><span class="dim mono">run a replay\u2026</span></div></div>
681
+ <div id="rp-evalnote"></div>
682
  </div>
683
  </div>${HONEST}`;window.replay_run();}},
684
  };
 
1336
  setHTML('rp-answer','<div class="row mono dim">'+liveDot()+'reasoning…</div>');
1337
  try{
1338
  const r = await postJSON('/api/a11oy/v1/reason', {prompt:q, query:q});
1339
+ // The /reason response carries a plain-English `rationale`, the gate that fired,
1340
+ // the policy decision, lambda score (conjecture), and the doctrine line. Render
1341
+ // the rationale (readable), NOT the raw JSON.
1342
+ const pr = r.policy_result || {};
1343
+ const rationale = r.rationale || pr.rationale || r.answer || r.response || '';
1344
+ const gateName = r.gate || pr.gate || '—';
1345
+ const decision = (pr.decision || r.decision || '—');
1346
+ const sev = r.severity_evaluated || '—';
1347
+ const lam = (pr.lambda_score!=null?pr.lambda_score:(r.lambda_score!=null?r.lambda_score:null));
1348
+ const decTeal = String(decision).toLowerCase()==='allow';
1349
  setHTML('rp-answer',
1350
+ `<div class="row"><span class="badge b-live">grounded</span><span class="badge b-gold">cited · runtime gate</span></div>`
1351
+ +`<div class="row" style="font-size:13px;line-height:1.5">${esc(rationale)||'(no rationale returned)'}</div>`
1352
+ +`<div class="row mono dim" style="margin-top:.4rem">gate: <b>${esc(gateName)}</b> · severity: <b>${esc(sev)}</b> · decision: <b style="color:${decTeal?'#5fb3a3':'#c9a05f'}">${esc(String(decision).toUpperCase())}</b>${lam!=null?` · Λ score: <b>${esc(String(lam))}</b> <span style="color:#c9a05f">(conjecture)</span>`:''}</div>`
1353
+ +(r.doctrine?`<div class="row mono dim" style="font-size:10px">${esc(r.doctrine)}</div>`:''));
1354
+ // build a run-tree DAG from the real reasoning structure (gate → policy → decision → receipt)
1355
  const nodes=[{id:'q',name:'Question',color:'#c9b787',val:8}];
1356
  const links=[];
1357
+ let steps = r.steps || r.chain || r.trace || null;
1358
+ if(!steps || !steps.length){
1359
+ // derive an honest run-tree from the real fields the gate returned
1360
+ steps=[{id:'gate',name:gateName},{id:'sev',name:'severity: '+sev},{id:'quorum',name:'witness quorum'},{id:'dec',name:'decision: '+String(decision).toUpperCase()}];
1361
+ }
1362
  let prev='q';
1363
+ steps.forEach((s,i)=>{
1364
  const id=s.id||('s'+i);
1365
  nodes.push({id, name:(s.name||s.step||('step '+(i+1))), color:'#5fb3a3', val:5});
1366
  links.push({source:prev, target:id}); prev=id;
 
1368
  nodes.push({id:'rcpt',name:'Chain receipt',color:'#c9b787',val:6}); links.push({source:prev,target:'rcpt'});
1369
  dag3d('rp-tree', nodes, links, {dagMode:'lr', dist:48});
1370
 
1371
+ // Arize-style eval-on-span: REAL metrics from the recorded eval harness (eval-arena)
1372
+ // fused with this run's live policy decision. No /confidence endpoint exists, so we
1373
+ // use the deterministic recorded run (honestly labelled as replay) + live lambda.
1374
  try{
1375
+ const arena = await getPublic('/api/a11oy/v1/eval-arena', 12000);
1376
+ const res = arena.results||[];
1377
+ const avg = k => res.length? res.reduce((a,b)=>a+((b.dimensions||{})[k]||0),0)/res.length : 0;
1378
+ const cov = avg('evidence_completeness'); // citation/evidence coverage proxy (real, recorded)
1379
+ const cons = avg('replay_completeness'); // run consistency / replay completeness (real, recorded)
1380
+ const hres = avg('hallucination_resistance'); // higher = lower risk
1381
  gauge('rp-cov', cov, 'coverage', '#5fb3a3');
1382
  gauge('rp-cons', cons, 'consistency', '#c9b787');
1383
  setTxt('rp-cov-v', (cov*100).toFixed(0)+'%'); setTxt('rp-cons-v',(cons*100).toFixed(0)+'%');
1384
+ const risk = hres>=0.9?'LOW':(hres>=0.75?'MEDIUM':'HIGH');
1385
+ setHTML('rp-halluc', `<span class="v ${risk==='HIGH'?'err':(risk==='MEDIUM'?'':'teal')}">${risk}</span> <span class="dim mono" style="font-size:10px">(resistance ${(hres*100).toFixed(0)}%)</span>`);
1386
+ setHTML('rp-evalnote', `<div class="row mono dim" style="font-size:10px">eval-on-span from recorded SZL eval harness (${res.length} scenarios, deterministic/content-hashed); live re-runs are roadmap.</div>`);
1387
  }catch(e2){
1388
  gauge('rp-cov', 0, 'coverage', '#5fb3a3'); gauge('rp-cons',0,'consistency','#c9b787');
1389
  setHTML('rp-halluc','<span class="v dim">—</span>');
pages/console.html CHANGED
@@ -678,6 +678,7 @@ const VIEWS={
678
  <div class="kpi"><div class="k">Consistency</div><div class="chartbox" style="height:90px"><canvas id="rp-cons"></canvas></div><div class="v" id="rp-cons-v" style="font-size:15px">\u2014</div></div></div>
679
  <div class="kpi"><div class="k">Hallucination risk</div><div id="rp-halluc"><span class="v dim">\u2014</span></div></div>
680
  <div class="kpi"><div class="k">Chain receipt</div><div id="rp-receipt"><span class="dim mono">run a replay\u2026</span></div></div>
 
681
  </div>
682
  </div>${HONEST}`;window.replay_run();}},
683
  };
@@ -1335,19 +1336,31 @@ async function replay_run(){
1335
  setHTML('rp-answer','<div class="row mono dim">'+liveDot()+'reasoning…</div>');
1336
  try{
1337
  const r = await postJSON('/api/a11oy/v1/reason', {prompt:q, query:q});
1338
- // answer card
1339
- const ans = r.answer || r.response || r.reasoning || r.summary || JSON.stringify(r).slice(0,400);
1340
- const cited = r.cited_theorems || r.citations || r.theorems || [];
 
 
 
 
 
 
 
1341
  setHTML('rp-answer',
1342
- `<div class="row"><span class="badge b-live">grounded</span><span class="badge b-gold">cited</span></div>`
1343
- +`<div class="row" style="font-size:13px">${esc(typeof ans==='string'?ans:JSON.stringify(ans)).slice(0,600)}</div>`
1344
- +(cited.length?`<div class="row mono dim">cited: ${cited.map(esc).join(' · ')}</div>`:''));
1345
- // build a run-tree DAG from the reasoning structure
 
1346
  const nodes=[{id:'q',name:'Question',color:'#c9b787',val:8}];
1347
  const links=[];
1348
- const steps = r.steps || r.chain || r.trace || cited.map((c,i)=>({name:String(c),id:'s'+i}));
 
 
 
 
1349
  let prev='q';
1350
- (steps.length?steps:[{name:'grounded answer',id:'a'}]).forEach((s,i)=>{
1351
  const id=s.id||('s'+i);
1352
  nodes.push({id, name:(s.name||s.step||('step '+(i+1))), color:'#5fb3a3', val:5});
1353
  links.push({source:prev, target:id}); prev=id;
@@ -1355,17 +1368,22 @@ async function replay_run(){
1355
  nodes.push({id:'rcpt',name:'Chain receipt',color:'#c9b787',val:6}); links.push({source:prev,target:'rcpt'});
1356
  dag3d('rp-tree', nodes, links, {dagMode:'lr', dist:48});
1357
 
1358
- // Arize eval-on-span gauges (from confidence endpoint if available)
 
 
1359
  try{
1360
- const conf = await postJSON('/api/a11oy/v1/confidence', {prompt:q, query:q, answer:typeof ans==='string'?ans:''});
1361
- const cov = conf.citation_coverage!=null?conf.citation_coverage:(conf.coverage!=null?conf.coverage:0.0);
1362
- const cons = conf.cove_consistency!=null?conf.cove_consistency:(conf.consistency!=null?conf.consistency:0.0);
1363
- const halluc = conf.hallucination_risk!=null?conf.hallucination_risk:(conf.risk||'LOW');
 
 
1364
  gauge('rp-cov', cov, 'coverage', '#5fb3a3');
1365
  gauge('rp-cons', cons, 'consistency', '#c9b787');
1366
  setTxt('rp-cov-v', (cov*100).toFixed(0)+'%'); setTxt('rp-cons-v',(cons*100).toFixed(0)+'%');
1367
- const hl=String(halluc).toUpperCase();
1368
- setHTML('rp-halluc', `<span class="v ${hl.indexOf('HIGH')>=0?'err':'teal'}">${esc(hl)}</span>`);
 
1369
  }catch(e2){
1370
  gauge('rp-cov', 0, 'coverage', '#5fb3a3'); gauge('rp-cons',0,'consistency','#c9b787');
1371
  setHTML('rp-halluc','<span class="v dim">—</span>');
 
678
  <div class="kpi"><div class="k">Consistency</div><div class="chartbox" style="height:90px"><canvas id="rp-cons"></canvas></div><div class="v" id="rp-cons-v" style="font-size:15px">\u2014</div></div></div>
679
  <div class="kpi"><div class="k">Hallucination risk</div><div id="rp-halluc"><span class="v dim">\u2014</span></div></div>
680
  <div class="kpi"><div class="k">Chain receipt</div><div id="rp-receipt"><span class="dim mono">run a replay\u2026</span></div></div>
681
+ <div id="rp-evalnote"></div>
682
  </div>
683
  </div>${HONEST}`;window.replay_run();}},
684
  };
 
1336
  setHTML('rp-answer','<div class="row mono dim">'+liveDot()+'reasoning…</div>');
1337
  try{
1338
  const r = await postJSON('/api/a11oy/v1/reason', {prompt:q, query:q});
1339
+ // The /reason response carries a plain-English `rationale`, the gate that fired,
1340
+ // the policy decision, lambda score (conjecture), and the doctrine line. Render
1341
+ // the rationale (readable), NOT the raw JSON.
1342
+ const pr = r.policy_result || {};
1343
+ const rationale = r.rationale || pr.rationale || r.answer || r.response || '';
1344
+ const gateName = r.gate || pr.gate || '—';
1345
+ const decision = (pr.decision || r.decision || '—');
1346
+ const sev = r.severity_evaluated || '—';
1347
+ const lam = (pr.lambda_score!=null?pr.lambda_score:(r.lambda_score!=null?r.lambda_score:null));
1348
+ const decTeal = String(decision).toLowerCase()==='allow';
1349
  setHTML('rp-answer',
1350
+ `<div class="row"><span class="badge b-live">grounded</span><span class="badge b-gold">cited · runtime gate</span></div>`
1351
+ +`<div class="row" style="font-size:13px;line-height:1.5">${esc(rationale)||'(no rationale returned)'}</div>`
1352
+ +`<div class="row mono dim" style="margin-top:.4rem">gate: <b>${esc(gateName)}</b> · severity: <b>${esc(sev)}</b> · decision: <b style="color:${decTeal?'#5fb3a3':'#c9a05f'}">${esc(String(decision).toUpperCase())}</b>${lam!=null?` · Λ score: <b>${esc(String(lam))}</b> <span style="color:#c9a05f">(conjecture)</span>`:''}</div>`
1353
+ +(r.doctrine?`<div class="row mono dim" style="font-size:10px">${esc(r.doctrine)}</div>`:''));
1354
+ // build a run-tree DAG from the real reasoning structure (gate → policy → decision → receipt)
1355
  const nodes=[{id:'q',name:'Question',color:'#c9b787',val:8}];
1356
  const links=[];
1357
+ let steps = r.steps || r.chain || r.trace || null;
1358
+ if(!steps || !steps.length){
1359
+ // derive an honest run-tree from the real fields the gate returned
1360
+ steps=[{id:'gate',name:gateName},{id:'sev',name:'severity: '+sev},{id:'quorum',name:'witness quorum'},{id:'dec',name:'decision: '+String(decision).toUpperCase()}];
1361
+ }
1362
  let prev='q';
1363
+ steps.forEach((s,i)=>{
1364
  const id=s.id||('s'+i);
1365
  nodes.push({id, name:(s.name||s.step||('step '+(i+1))), color:'#5fb3a3', val:5});
1366
  links.push({source:prev, target:id}); prev=id;
 
1368
  nodes.push({id:'rcpt',name:'Chain receipt',color:'#c9b787',val:6}); links.push({source:prev,target:'rcpt'});
1369
  dag3d('rp-tree', nodes, links, {dagMode:'lr', dist:48});
1370
 
1371
+ // Arize-style eval-on-span: REAL metrics from the recorded eval harness (eval-arena)
1372
+ // fused with this run's live policy decision. No /confidence endpoint exists, so we
1373
+ // use the deterministic recorded run (honestly labelled as replay) + live lambda.
1374
  try{
1375
+ const arena = await getPublic('/api/a11oy/v1/eval-arena', 12000);
1376
+ const res = arena.results||[];
1377
+ const avg = k => res.length? res.reduce((a,b)=>a+((b.dimensions||{})[k]||0),0)/res.length : 0;
1378
+ const cov = avg('evidence_completeness'); // citation/evidence coverage proxy (real, recorded)
1379
+ const cons = avg('replay_completeness'); // run consistency / replay completeness (real, recorded)
1380
+ const hres = avg('hallucination_resistance'); // higher = lower risk
1381
  gauge('rp-cov', cov, 'coverage', '#5fb3a3');
1382
  gauge('rp-cons', cons, 'consistency', '#c9b787');
1383
  setTxt('rp-cov-v', (cov*100).toFixed(0)+'%'); setTxt('rp-cons-v',(cons*100).toFixed(0)+'%');
1384
+ const risk = hres>=0.9?'LOW':(hres>=0.75?'MEDIUM':'HIGH');
1385
+ setHTML('rp-halluc', `<span class="v ${risk==='HIGH'?'err':(risk==='MEDIUM'?'':'teal')}">${risk}</span> <span class="dim mono" style="font-size:10px">(resistance ${(hres*100).toFixed(0)}%)</span>`);
1386
+ setHTML('rp-evalnote', `<div class="row mono dim" style="font-size:10px">eval-on-span from recorded SZL eval harness (${res.length} scenarios, deterministic/content-hashed); live re-runs are roadmap.</div>`);
1387
  }catch(e2){
1388
  gauge('rp-cov', 0, 'coverage', '#5fb3a3'); gauge('rp-cons',0,'consistency','#c9b787');
1389
  setHTML('rp-halluc','<span class="v dim">—</span>');