opus-90NL-intents-80-80-zero-fallback-lean6sigma

This commit is contained in:
opus
2026-04-16 22:09:12 +02:00
parent e0138ac892
commit 5d3ce2ac29
11 changed files with 17 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
{
"ts": "2026-04-16T20:05:53+00:00",
"ts": "2026-04-16T20:09:07+00:00",
"hostname": "blade",
"cpu": "?",
"ram": "?",

View File

@@ -1 +1 @@
{"ts":"22:04","status":"offline"}
{"ts":"22:08","status":"offline"}

View File

@@ -846,7 +846,7 @@ async function loadSystemData(){
try{
// State
const stRes=await fetch('/api/l99-state.json?t='+Date.now());
/* HTML_GUARD_V2_BATCH */ const _t_st=await stRes.text(); const st; {var _q=(_t_st||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){st={error:"[HTTP "+(stRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{st=JSON.parse(_q)}catch(e){st={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_st=await stRes.text(); const st=null; {var _q=(_t_st||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){st={error:"[HTTP "+(stRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{st=JSON.parse(_q)}catch(e){st={error:"[JSON] "+e.message}}}}
document.getElementById('kpiNR').textContent=(st.nonreg_pass||'?')+'/'+(st.nonreg_total||'?');
document.getElementById('kpiState').textContent=(st.pass||'?')+'/'+(st.total||'?');
document.getElementById('kpiDocker').textContent=st.docker_up||'?';
@@ -857,7 +857,7 @@ async function loadSystemData(){
try{
// Source of truth
const sotRes=await fetch('/api/source-of-truth.json?t='+Date.now());
/* HTML_GUARD_V2_BATCH */ const _t_sot=await sotRes.text(); const sot; {var _q=(_t_sot||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){sot={error:"[HTTP "+(sotRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{sot=JSON.parse(_q)}catch(e){sot={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_sot=await sotRes.text(); const sot=null; {var _q=(_t_sot||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){sot={error:"[HTTP "+(sotRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{sot=JSON.parse(_q)}catch(e){sot={error:"[JSON] "+e.message}}}}
const scores=sot.scores||{};
const testDiv=document.getElementById('testList');
let th='';

View File

@@ -37,7 +37,7 @@ async function testHealth(){
out.textContent='Fetching health...\n';
try{
const r=await fetch(API+'?health',{credentials:'include'});
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j; {var _q=(_t_j||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){j={error:"[HTTP "+(r.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j=null; {var _q=(_t_j||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){j={error:"[HTTP "+(r.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:"[JSON] "+e.message}}}}
out.textContent+=`Health: ${JSON.stringify(j)}\n`;
}catch(e){
out.textContent+=`ERROR: ${e.message}\n`;

View File

@@ -114,7 +114,7 @@ async function load() {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify({message:'verifyfp'})
});
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j; {var _q=(_t_j||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j={error:'[HTTP '+(r.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:'[JSON] '+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j=null; {var _q=(_t_j||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j={error:'[HTTP '+(r.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:'[JSON] '+e.message}}}}
if (j.engine === 'NL-Priority' || j.tool === 'fast-path') {
document.getElementById('awBadge').textContent = 'OPERATIONAL';
document.getElementById('awDetail').textContent = 'pipeline v6 priority JSON live';
@@ -127,7 +127,7 @@ async function load() {
// Sovereign cascade
try {
const r = await fetch('/api/sovereign/v1/models');
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j; {var _q=(_t_j||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j={error:'[HTTP '+(r.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:'[JSON] '+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j=null; {var _q=(_t_j||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j={error:'[HTTP '+(r.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:'[JSON] '+e.message}}}}
const n = (j.data || []).length;
document.getElementById('sovBadge').textContent = n + ' providers';
document.getElementById('sovDetail').textContent = 'cascade :4000/v1 OK';
@@ -140,7 +140,7 @@ async function load() {
// NonReg
try {
const r = await fetch('/api/nonreg-latest.json');
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j; {var _q=(_t_j||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j={error:'[HTTP '+(r.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:'[JSON] '+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); const j=null; {var _q=(_t_j||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j={error:'[HTTP '+(r.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j=JSON.parse(_q)}catch(e){j={error:'[JSON] '+e.message}}}}
document.getElementById('nrBadge').textContent = j.score + '%';
document.getElementById('nrBadge').className = 'badge ' + (j.fail === 0 ? 'ok' : 'warn');
document.getElementById('nrDetail').textContent = j.pass + '/' + j.total + ' &mdash; ts ' + j.ts;
@@ -157,7 +157,7 @@ async function load() {
method: 'POST', headers: {'Content-Type':'application/json'},
body: JSON.stringify({message:'listprio'})
});
/* HTML_GUARD_V2_BATCH */ const _t_j2=await r2.text(); const j2; {var _q=(_t_j2||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j2={error:'[HTTP '+(r2.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j2=JSON.parse(_q)}catch(e){j2={error:'[JSON] '+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_j2=await r2.text(); const j2=null; {var _q=(_t_j2||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){j2={error:'[HTTP '+(r2.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{j2=JSON.parse(_q)}catch(e){j2={error:'[JSON] '+e.message}}}}
if (j2.content) {
const list = JSON.parse(j2.content);
document.getElementById('prioBadge').textContent = list.length + ' intents';

View File

@@ -110,7 +110,7 @@ async function load(){
</div>`;
// Accounts table with sample data
const ar=await fetch(API+'?action=accounts');/* HTML_GUARD_V2_BATCH */ const _t_ad=await ar.text(); const ad; {var _q=(_t_ad||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){ad={error:"[HTTP "+(ar.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{ad=JSON.parse(_q)}catch(e){ad={error:"[JSON] "+e.message}}}}
const ar=await fetch(API+'?action=accounts');/* HTML_GUARD_V2_BATCH */ const _t_ad=await ar.text(); const ad=null; {var _q=(_t_ad||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){ad={error:"[HTTP "+(ar.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{ad=JSON.parse(_q)}catch(e){ad={error:"[JSON] "+e.message}}}}
allAccts=(ad.accounts||[]).map(a=>({
email:a.name,
tenant:a.tenant_domain,

View File

@@ -82,7 +82,7 @@ async function load(){
try{
const r=await fetch(CACHE+'?t='+Date.now());
if(!r.ok)throw new Error('cache '+r.status);
/* HTML_GUARD_V2_BATCH */ const _t_c=await r.text(); const c; {var _q=(_t_c||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){c={error:"[HTTP "+(r.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{c=JSON.parse(_q)}catch(e){c={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_c=await r.text(); const c=null; {var _q=(_t_c||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){c={error:"[HTTP "+(r.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{c=JSON.parse(_q)}catch(e){c={error:"[JSON] "+e.message}}}}
render(c.report,c.tools||{});
}catch(e){
_lastScan=d.scan_time||d.last_scan||'';

View File

@@ -701,7 +701,7 @@ async function buildHomepage() {
for (const dir of dirs) {
try {
const r2 = await fetch(API_VAULT + '?action=list&dir=' + dir.name);
/* HTML_GUARD_V2_BATCH */ const _t_d2=await r2.text(); const d2; {var _q=(_t_d2||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){d2={error:'[HTTP '+(r2.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{d2=JSON.parse(_q)}catch(e){d2={error:'[JSON] '+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_d2=await r2.text(); const d2=null; {var _q=(_t_d2||'').trim();if(_q.startsWith('<!DOCTYPE')||_q.startsWith('<html')){d2={error:'[HTTP '+(r2.status||'?')+'] Backend indisponible',isHtmlError:true};}else{try{d2=JSON.parse(_q)}catch(e){d2={error:'[JSON] '+e.message}}}}
const files = (d2.files||[]).filter(f=>f.type==='file'&&f.name.endsWith('.md'));
if (!files.length) continue;

View File

@@ -859,7 +859,7 @@ async function loadSystemData(){
try{
// State
const stRes=await fetch('/api/l99-state.json?t='+Date.now());
/* HTML_GUARD_V2_BATCH */ const _t_st=await stRes.text(); const st; {var _q=(_t_st||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){st={error:"[HTTP "+(stRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{st=JSON.parse(_q)}catch(e){st={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_st=await stRes.text(); const st=null; {var _q=(_t_st||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){st={error:"[HTTP "+(stRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{st=JSON.parse(_q)}catch(e){st={error:"[JSON] "+e.message}}}}
document.getElementById('kpiNR').textContent=(st.nonreg_pass||'?')+'/'+(st.nonreg_total||'?');
document.getElementById('kpiState').textContent=(st.pass||'?')+'/'+(st.total||'?');
document.getElementById('kpiDocker').textContent=st.docker_up||'?';
@@ -870,7 +870,7 @@ async function loadSystemData(){
try{
// Source of truth
const sotRes=await fetch('/api/source-of-truth.json?t='+Date.now());
/* HTML_GUARD_V2_BATCH */ const _t_sot=await sotRes.text(); const sot; {var _q=(_t_sot||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){sot={error:"[HTTP "+(sotRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{sot=JSON.parse(_q)}catch(e){sot={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_sot=await sotRes.text(); const sot=null; {var _q=(_t_sot||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){sot={error:"[HTTP "+(sotRes.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{sot=JSON.parse(_q)}catch(e){sot={error:"[JSON] "+e.message}}}}
const scores=sot.scores||{};
const testDiv=document.getElementById('testList');
let th='';

View File

@@ -318,7 +318,7 @@ async function send() {
const res2 = await fetch('/api/wevia-full-exec.php?m=' + encodeURIComponent(text), {
signal: AbortSignal.timeout(20000)
});
/* HTML_GUARD_V2_BATCH */ const _t_data2=await res2.text(); const data2; {var _q=(_t_data2||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){data2={error:"[HTTP "+(res2.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{data2=JSON.parse(_q)}catch(e){data2={error:"[JSON] "+e.message}}}}
/* HTML_GUARD_V2_BATCH */ const _t_data2=await res2.text(); const data2=null; {var _q=(_t_data2||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){data2={error:"[HTTP "+(res2.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{data2=JSON.parse(_q)}catch(e){data2={error:"[JSON] "+e.message}}}}
const elapsed = ((Date.now() - t0) / 1000).toFixed(1) + 's';
addMsg(data2.response || 'Pas de réponse', 'a', { engine: data2.provider || 'Exec', time: elapsed });
} catch(err2) {

View File

@@ -301,14 +301,14 @@ async function send(){
// Fallback: try exec endpoint (JSON)
showProgress('Fallback exec...', 50);
const r2=await fetch('/api/wevia-full-exec.php?m='+encodeURIComponent(text),{signal:AbortSignal.timeout(120000)});
/* HTML_GUARD_V2_BATCH */ const _t_d2=await r2.text(); const d2; {var _q=(_t_d2||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){d2={error:"[HTTP "+(r2.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{d2=JSON.parse(_q)}catch(e){d2={error:"[JSON] "+e.message}}}}fullText=d2.response||'Pas de réponse';engine=d2.provider||'Exec'
/* HTML_GUARD_V2_BATCH */ const _t_d2=await r2.text(); const d2=null; {var _q=(_t_d2||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){d2={error:"[HTTP "+(r2.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{d2=JSON.parse(_q)}catch(e){d2={error:"[JSON] "+e.message}}}}fullText=d2.response||'Pas de réponse';engine=d2.provider||'Exec'
}
addMsg(fullText,'a',{engine,time:elapsed});
chatHistory.push({role:"user",content:text},{role:"assistant",content:fullText});
}catch(err){
hideTyping();
try{showProgress('Fallback exec...', 50);
const r2=await fetch('/api/wevia-full-exec.php?m='+encodeURIComponent(text));/* HTML_GUARD_V2_BATCH */ const _t_d2=await r2.text(); const d2; {var _q=(_t_d2||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){d2={error:"[HTTP "+(r2.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{d2=JSON.parse(_q)}catch(e){d2={error:"[JSON] "+e.message}}}}addMsg(d2.response||err.message,'a',{engine:'Fallback',time:((Date.now()-t0)/1000).toFixed(1)+'s'})}
const r2=await fetch('/api/wevia-full-exec.php?m='+encodeURIComponent(text));/* HTML_GUARD_V2_BATCH */ const _t_d2=await r2.text(); const d2=null; {var _q=(_t_d2||"").trim();if(_q.startsWith("<!DOCTYPE")||_q.startsWith("<html")){d2={error:"[HTTP "+(r2.status||"?")+"] Backend indisponible",isHtmlError:true};}else{try{d2=JSON.parse(_q)}catch(e){d2={error:"[JSON] "+e.message}}}}addMsg(d2.response||err.message,'a',{engine:'Fallback',time:((Date.now()-t0)/1000).toFixed(1)+'s'})}
catch(e2){addMsg('Erreur: '+err.message,'a',{engine:'Error'})}
}
stEl.textContent='Connecté';hideProgress();busy=false;$('sendBtn').disabled=false;inp.focus();files=[];$('filePrev').innerHTML=''