Spaces:
Running
Running
deploy(hf): sync szl-holdings/a11oy@main derived COPY set
Browse filesReusable Dockerfile-COPY-derived deploy from szl-holdings/a11oy main.
Files: 776 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>
- console/index.html +77 -0
console/index.html
CHANGED
|
@@ -219,6 +219,7 @@ details.raw[open] summary{color:var(--muted);}
|
|
| 219 |
<div class="nav-item" data-view="gates" onclick="go('gates')"><span class="ico">⊠</span>Safety Gates</div>
|
| 220 |
<div class="nav-item" data-view="feed" onclick="go('feed')"><span class="ico">∿</span>Live Decisions</div>
|
| 221 |
<div class="nav-item" data-view="govern" onclick="go('govern')"><span class="ico">✓</span>Readiness & Compliance</div>
|
|
|
|
| 222 |
<div class="nav-item" data-view="forecast" onclick="go('forecast')"><span class="ico">↗</span>Forecast</div>
|
| 223 |
<div class="nav-group">Prove & Verify</div>
|
| 224 |
<div class="nav-item" data-view="receipts" onclick="go('receipts')"><span class="ico">⎙</span>Signed Receipts</div>
|
|
@@ -892,6 +893,34 @@ knowledge:{title:'Knowledge Ontology',badge:'AXIOMS \u2192 THEOREMS \u2192 FORMU
|
|
| 892 |
}catch(e2){setHTML('ex-wave910-rows',`<div class="row mono dim">proven/index unavailable: ${esc(e2.message)}</div>`);}
|
| 893 |
}},
|
| 894 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 895 |
};
|
| 896 |
|
| 897 |
// ============ HANDLERS ============
|
|
@@ -905,6 +934,54 @@ async function ask_recs(){try{const d=await orgGet('core','/api/a11oy/v1/operato
|
|
| 905 |
setHTML('ask-rec-list','');(d.recommendations||[]).forEach(r=>addHTML('ask-rec-list',`<div class="row"><span class="badge ${r.severity==='critical'?'b-err':(r.severity==='warn'?'b-gold':'b-teal')}">${esc(r.severity)}</span><span>${esc(r.organ||'')}: ${esc(r.finding||'')}</span></div>`));
|
| 906 |
if(!(d.recommendations||[]).length)setHTML('ask-rec-list','<div class="row mono dim">no findings \u2014 all clear</div>');}catch(e){setHTML('ask-rec-list','<div class="row mono dim">retry: '+esc(e.message)+'</div>');}}
|
| 907 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 908 |
// Demo / Warhacker (a11oy)
|
| 909 |
async function wh_one(key,out){try{setOut(out,'launching\u2026');const d=await postJSON(API+'/v1/warhacker/launch/'+key,{});const o=d.organ_response||{};setOut(out,'service: '+esc(d.organ)+' status: '+esc(o.status)+' http: '+esc(o.http_code)+'\n'+JSON.stringify(o.json||o,null,2).slice(0,900));}catch(e){setOut(out,'retry: '+e.message);}}
|
| 910 |
async function wh_all(){for(const k of ['cannonico','tychee','hangar2apps','cyber-rts','raven']){await wh_one(k,'o-'+k);}}
|
|
|
|
| 219 |
<div class="nav-item" data-view="gates" onclick="go('gates')"><span class="ico">⊠</span>Safety Gates</div>
|
| 220 |
<div class="nav-item" data-view="feed" onclick="go('feed')"><span class="ico">∿</span>Live Decisions</div>
|
| 221 |
<div class="nav-item" data-view="govern" onclick="go('govern')"><span class="ico">✓</span>Readiness & Compliance</div>
|
| 222 |
+
<div class="nav-item" data-view="chat" onclick="go('chat')"><span class="ico">✦</span>Governed AI Chat</div>
|
| 223 |
<div class="nav-item" data-view="forecast" onclick="go('forecast')"><span class="ico">↗</span>Forecast</div>
|
| 224 |
<div class="nav-group">Prove & Verify</div>
|
| 225 |
<div class="nav-item" data-view="receipts" onclick="go('receipts')"><span class="ico">⎙</span>Signed Receipts</div>
|
|
|
|
| 893 |
}catch(e2){setHTML('ex-wave910-rows',`<div class="row mono dim">proven/index unavailable: ${esc(e2.message)}</div>`);}
|
| 894 |
}},
|
| 895 |
|
| 896 |
+
// ==========================================================================
|
| 897 |
+
// Governed AI Chat — wake-ai-chat-surface (Dev: Stephen Lutar 2026-06-30)
|
| 898 |
+
// Calls POST /api/a11oy/v1/govern/infer; renders answer, Λ advisory, receipt.
|
| 899 |
+
// Doctrine: Λ = Conjecture 1 (advisory, NOT a theorem). LIVE sovereign mesh.
|
| 900 |
+
// ==========================================================================
|
| 901 |
+
chat:{title:'Governed AI Chat',badge:'LIVE \u00b7 SOVEREIGN MESH \u00b7 \u039b=Conjecture 1',sub:'Conversational governed-AI wired to the live sovereign mesh (POST /api/a11oy/v1/govern/infer). Every turn is gate-checked, \u039b-scored, and returns a signed Khipu receipt. Answer returned only on decision=allow. \u039b is Conjecture 1 \u2014 advisory, not a theorem.',
|
| 902 |
+
render:(c)=>{c.innerHTML=`
|
| 903 |
+
<div class="card" style="margin-bottom:1rem">
|
| 904 |
+
<div class="card-h"><span class="card-t">Governed AI Chat</span><span class="card-ep">sovereign mesh \u00b7 \u039b = Conjecture 1</span></div>
|
| 905 |
+
<div style="margin-bottom:.7rem">
|
| 906 |
+
<div class="row mono dim" style="font-size:10.5px;margin-bottom:.5rem">Prompt is gated, \u039b-scored, and returned only on decision=allow. Khipu receipt on every turn.</div>
|
| 907 |
+
<textarea id="chat-prompt" rows="3" spellcheck="false" style="width:100%;background:#111;border:1px solid rgba(201,183,135,0.22);border-radius:8px;padding:.6rem .8rem;color:var(--cream);font-family:var(--mono);font-size:13px;resize:vertical" placeholder="Ask the governed AI a question\u2026">What does the governed-inference stack at a11oy do?</textarea>
|
| 908 |
+
<div style="margin-top:.5rem;display:flex;gap:.5rem;align-items:center">
|
| 909 |
+
<button class="btn teal" id="chat-run" onclick="chat_send()">▶ Send governed turn</button>
|
| 910 |
+
<span id="chat-status" class="mono dim" style="font-size:11px"></span>
|
| 911 |
+
</div>
|
| 912 |
+
</div>
|
| 913 |
+
<pre class="out" id="chat-out" style="min-height:80px">— send a prompt to run it through the live governance stack —</pre>
|
| 914 |
+
</div>
|
| 915 |
+
<div class="card" id="chat-receipt-card" style="display:none">
|
| 916 |
+
<div class="card-h"><span class="card-t">Last turn receipt</span><span class="card-ep">Khipu hash-chain \u00b7 signed when cosign key present</span></div>
|
| 917 |
+
<div class="row mono dim" id="chat-lambda" style="font-size:11px">—</div>
|
| 918 |
+
<div class="row mono dim" id="chat-engine" style="font-size:11px">—</div>
|
| 919 |
+
<div class="row mono dim" id="chat-gates" style="font-size:11px">—</div>
|
| 920 |
+
<pre class="out" id="chat-receipt" style="font-size:10.5px;max-height:180px;overflow:auto">—</pre>
|
| 921 |
+
</div>
|
| 922 |
+
<div class="honesty"><b>Honesty (doctrine v11 LOCKED).</b> \u039b = Conjecture 1 \u2014 advisory floor, NOT a closed theorem. Answer returned only when decision == allow; on review/deny the governance verdict and receipt are returned with no answer. Energy labeled MEASURED only when NVML meter is live; otherwise UNAVAILABLE \u2014 never fabricated. Receipt chain is hash-linked; DSSE_PLACEHOLDER when cosign key is absent. Sovereign GPU 1 (laptop \u00b7 RTX 5050 \u00b7 Blackwell) is the live engine as of 2026-06-30; GPU 2 (tower \u00b7 RTX 4060 Ti) is offline.</div>
|
| 923 |
+
`;}},
|
| 924 |
};
|
| 925 |
|
| 926 |
// ============ HANDLERS ============
|
|
|
|
| 934 |
setHTML('ask-rec-list','');(d.recommendations||[]).forEach(r=>addHTML('ask-rec-list',`<div class="row"><span class="badge ${r.severity==='critical'?'b-err':(r.severity==='warn'?'b-gold':'b-teal')}">${esc(r.severity)}</span><span>${esc(r.organ||'')}: ${esc(r.finding||'')}</span></div>`));
|
| 935 |
if(!(d.recommendations||[]).length)setHTML('ask-rec-list','<div class="row mono dim">no findings \u2014 all clear</div>');}catch(e){setHTML('ask-rec-list','<div class="row mono dim">retry: '+esc(e.message)+'</div>');}}
|
| 936 |
|
| 937 |
+
// Governed AI Chat handler (wake-ai-chat-surface 2026-06-30)
|
| 938 |
+
async function chat_send(){
|
| 939 |
+
const prompt=(document.getElementById('chat-prompt')||{}).value||'';
|
| 940 |
+
if(!prompt.trim()){return;}
|
| 941 |
+
const btn=document.getElementById('chat-run');
|
| 942 |
+
const st=document.getElementById('chat-status');
|
| 943 |
+
const out=document.getElementById('chat-out');
|
| 944 |
+
if(btn)btn.disabled=true;
|
| 945 |
+
if(st)st.textContent='governing\u2026';
|
| 946 |
+
if(out)out.textContent='governing on sovereign mesh\u2026';
|
| 947 |
+
try{
|
| 948 |
+
const resp=await fetch('/api/a11oy/v1/govern/infer',{
|
| 949 |
+
method:'POST',
|
| 950 |
+
headers:{'Content-Type':'application/json'},
|
| 951 |
+
body:JSON.stringify({prompt,vertical:'general',declared:'PUBLIC'})
|
| 952 |
+
});
|
| 953 |
+
const d=resp.ok?await resp.json():{decision:'error',answer:'HTTP '+resp.status};
|
| 954 |
+
const g=d.governance||{};
|
| 955 |
+
const lbl=g.lambda_label||('\u039b='+((g.lambda||0).toFixed?g.lambda.toFixed(2):g.lambda)+' [Conjecture 1 \u2014 advisory]');
|
| 956 |
+
const eng=d.served_by||'engine unavailable';
|
| 957 |
+
const decision=d.decision||'unknown';
|
| 958 |
+
const gates=(g.gates||[]).map(gt=>gt.gate+':'+(gt.decision||gt.fired)).join(' | ')||'none';
|
| 959 |
+
const energy=(d.energy||{});
|
| 960 |
+
const joules=energy.label==='MEASURED'?('joules='+energy.joules+' MEASURED'):'energy=UNAVAILABLE';
|
| 961 |
+
const receipt=d.receipt||{};
|
| 962 |
+
if(decision==='allow'){
|
| 963 |
+
if(out)out.textContent='ANSWER [decision=allow \u00b7 '+eng+']\n\n'+(d.answer||'(empty answer)');
|
| 964 |
+
}else{
|
| 965 |
+
if(out)out.textContent='GOVERNANCE HOLD [decision='+decision+']\nGovernance gate blocked this turn. No answer returned (doctrine: the half-state is the only unacceptable outcome).';
|
| 966 |
+
}
|
| 967 |
+
const rcCard=document.getElementById('chat-receipt-card');
|
| 968 |
+
if(rcCard)rcCard.style.display='';
|
| 969 |
+
const lambdaEl=document.getElementById('chat-lambda');
|
| 970 |
+
if(lambdaEl)lambdaEl.textContent=lbl;
|
| 971 |
+
const engineEl=document.getElementById('chat-engine');
|
| 972 |
+
if(engineEl)engineEl.textContent='engine: '+eng+' \u00b7 '+joules;
|
| 973 |
+
const gatesEl=document.getElementById('chat-gates');
|
| 974 |
+
if(gatesEl)gatesEl.textContent='gates: '+gates;
|
| 975 |
+
const rcEl=document.getElementById('chat-receipt');
|
| 976 |
+
if(rcEl)rcEl.textContent=JSON.stringify({seq:receipt.seq,digest:(receipt.digest||'').slice(0,16)+'\u2026',chain_verified:receipt.chain_verified,signed:!!(receipt.signature&&receipt.signature!=='DSSE_PLACEHOLDER')},null,2);
|
| 977 |
+
if(st)st.textContent='done \u00b7 decision='+decision;
|
| 978 |
+
}catch(e){
|
| 979 |
+
if(out)out.textContent='error: '+e.message;
|
| 980 |
+
if(st)st.textContent='error';
|
| 981 |
+
}
|
| 982 |
+
if(btn)btn.disabled=false;
|
| 983 |
+
}
|
| 984 |
+
|
| 985 |
// Demo / Warhacker (a11oy)
|
| 986 |
async function wh_one(key,out){try{setOut(out,'launching\u2026');const d=await postJSON(API+'/v1/warhacker/launch/'+key,{});const o=d.organ_response||{};setOut(out,'service: '+esc(d.organ)+' status: '+esc(o.status)+' http: '+esc(o.http_code)+'\n'+JSON.stringify(o.json||o,null,2).slice(0,900));}catch(e){setOut(out,'retry: '+e.message);}}
|
| 987 |
async function wh_all(){for(const k of ['cannonico','tychee','hangar2apps','cyber-rts','raven']){await wh_one(k,'o-'+k);}}
|