244 lines
12 KiB
HTML
244 lines
12 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>NL-AutoWire Status — WEVAL Sovereign IA</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<style>
|
|
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
background: #0a0e1a; color: #e8eaed; margin: 0; padding: 24px; line-height: 1.5; }
|
|
h1 { color: #58a6ff; font-size: 1.6em; margin: 0 0 8px; }
|
|
h2 { color: #79c0ff; font-size: 1.15em; margin: 28px 0 10px; padding-bottom: 6px;
|
|
border-bottom: 1px solid #21262d; }
|
|
.sub { color: #8b949e; font-size: 0.9em; margin-bottom: 24px; }
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 14px; }
|
|
.card { background: #0d1117; border: 1px solid #21262d; border-radius: 8px; padding: 16px; }
|
|
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 0.78em; font-weight: 600; }
|
|
.ok { background: #1a3d2c; color: #56d364; }
|
|
.warn { background: #3d2c1a; color: #d29922; }
|
|
.meta { color: #8b949e; font-size: 0.85em; }
|
|
code { background: #161b22; padding: 1px 6px; border-radius: 3px; font-size: 0.88em; color: #d2a8ff; }
|
|
pre { background: #161b22; border: 1px solid #21262d; border-radius: 6px;
|
|
padding: 12px; overflow-x: auto; font-size: 0.85em; }
|
|
table { border-collapse: collapse; width: 100%; margin-top: 8px; }
|
|
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid #21262d; font-size: 0.9em; }
|
|
th { color: #8b949e; font-weight: 500; }
|
|
.nav { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; font-size: 0.9em; }
|
|
.nav a { color: #58a6ff; text-decoration: none; }
|
|
.nav a:hover { text-decoration: underline; }
|
|
#intents { font-size: 0.85em; max-height: 320px; overflow-y: auto; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<h1>NL-AutoWire Status</h1>
|
|
<div class="sub">WEVIA Master self-wiring system — doctrine SOUVERAINETÉ #1 + AUTO-RÉSILIENCE #8</div>
|
|
|
|
<div class="nav">
|
|
← <a href="/wevia-master.html">WEVIA Master</a> ·
|
|
<a href="/architecture.html">Architecture</a> ·
|
|
<a href="/architecture-map.html">Architecture Map</a> ·
|
|
<a href="/agents-archi.html">Agents Archi</a> ·
|
|
<a href="/security-dashboard.html">Security Dashboard</a> ·
|
|
<a href="/security-hub.html">Security Hub</a>
|
|
</div>
|
|
|
|
<h2>System Health</h2>
|
|
<div class="grid">
|
|
<div class="card">
|
|
<strong>Auto-wire pipeline</strong> <span class="badge ok" id="awBadge">CHECKING</span>
|
|
<div class="meta" id="awDetail">…</div>
|
|
</div>
|
|
<div class="card">
|
|
<strong>Sovereign cascade :4000</strong> <span class="badge ok" id="sovBadge">CHECKING</span>
|
|
<div class="meta" id="sovDetail">…</div>
|
|
</div>
|
|
<div class="card">
|
|
<strong>Priority intents</strong> <span class="badge ok" id="prioBadge">CHECKING</span>
|
|
<div class="meta" id="prioDetail">…</div>
|
|
</div>
|
|
<div class="card">
|
|
<strong>NonReg L99</strong> <span class="badge ok" id="nrBadge">CHECKING</span>
|
|
<div class="meta" id="nrDetail">…</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2>Cause-Racine Fixes (16 avr 2026)</h2>
|
|
<table>
|
|
<tr><th>#</th><th>Cause racine</th><th>Patch</th><th>État</th></tr>
|
|
<tr><td>1</td><td>Auto-wire NL hardcoded Groq (single-vendor rate-limit)</td><td>v4 cascade :4000 + Groq fallback</td><td><span class="badge ok">LIVE</span></td></tr>
|
|
<tr><td>4</td><td>Auto-wire insérait dans master-router (tail pipeline) → fs-verify hijack</td><td>v5 priority JSON top-of-fast-path</td><td><span class="badge ok">LIVE</span></td></tr>
|
|
<tr><td>5</td><td>Triggers greedy (substring match e.g. <code>xcode</code> dans <code>xcode_vhost</code>)</td><td>v6 word-boundary <code>\b</code> + skip auto-wire requests</td><td><span class="badge ok">LIVE</span></td></tr>
|
|
</table>
|
|
|
|
<h2>Architecture du Pipeline (post-fix)</h2>
|
|
<pre>
|
|
USER MSG → wevia-master-api.php
|
|
↓
|
|
wevia-fast-path-v3.php (function wevia_fast_path)
|
|
1. $r = null
|
|
2. <strong>NL-PRIORITY check (v5)</strong> ← nouveaux intents auto-wirés ATTERRISSENT ICI
|
|
- skip si message = auto-wire request
|
|
- word-boundary \b matching
|
|
- load /opt/wevia-brain/priority-intents-nl.json
|
|
3. classifier (Groq llama-3.3)
|
|
4. autowire NL (v4: cascade :4000 + Groq fallback)
|
|
→ ajoute dans priority JSON
|
|
5. fast-path classic intents
|
|
↓
|
|
opus-autonomy.php
|
|
arena-pre-intents.php
|
|
wevia-dynamic-resolver.php
|
|
wave200, gap-intents
|
|
master-router.php
|
|
LLM fallback
|
|
</pre>
|
|
|
|
<h2>Priority Intents enregistrés</h2>
|
|
<div class="card"><pre id="intents">…</pre></div>
|
|
|
|
<h2>GOLDs disponibles (rollback)</h2>
|
|
<table>
|
|
<tr><td><code>GOLD-fpv3-autowire-v4-20260416111628.php</code></td><td>pré v4 (cascade)</td></tr>
|
|
<tr><td><code>GOLD-fpv3-priority-v5-20260416112500.php</code></td><td>pré v5 (priority)</td></tr>
|
|
<tr><td><code>GOLD-fpv3-priority-v6-20260416113011.php</code></td><td>pré v6 (word-boundary)</td></tr>
|
|
<tr><td><code>GOLD-nginx-wevalia-20260416114645</code></td><td>nginx pré reload weval-ia</td></tr>
|
|
<tr><td><code>GOLD-nlprio-*.json</code> (15+)</td><td>snapshots priority JSON</td></tr>
|
|
</table>
|
|
|
|
<script>
|
|
async function load() {
|
|
// Auto-wire test (POST a probe)
|
|
try {
|
|
const r = await fetch('/api/wevia-master-api.php', {
|
|
method: 'POST', headers: {'Content-Type':'application/json'},
|
|
body: JSON.stringify({message:'verifyfp'})
|
|
});
|
|
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); let 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';
|
|
}
|
|
} catch(e) {
|
|
document.getElementById('awBadge').className = 'badge warn';
|
|
document.getElementById('awBadge').textContent = 'ERROR';
|
|
}
|
|
|
|
// Sovereign cascade
|
|
try {
|
|
const r = await fetch('/api/sovereign/v1/models');
|
|
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); let 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';
|
|
} catch(e) {
|
|
document.getElementById('sovBadge').className = 'badge warn';
|
|
document.getElementById('sovBadge').textContent = 'CHECK';
|
|
document.getElementById('sovDetail').textContent = 'cascade not exposed externally';
|
|
}
|
|
|
|
// NonReg
|
|
try {
|
|
const r = await fetch('/api/nonreg-latest.json');
|
|
/* HTML_GUARD_V2_BATCH */ const _t_j=await r.text(); let 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 + ' — ts ' + j.ts;
|
|
} catch(e) {}
|
|
|
|
// Priority intents (via wired intent that returns JSON list)
|
|
try {
|
|
const r = await fetch('/api/wevia-master-api.php', {
|
|
method: 'POST', headers: {'Content-Type':'application/json'},
|
|
body: JSON.stringify({message:'ajoute un nouvel intent listprio qui execute cat /opt/wevia-brain/priority-intents-nl.json quand on tape listprio'})
|
|
});
|
|
await r.json();
|
|
const r2 = await fetch('/api/wevia-master-api.php', {
|
|
method: 'POST', headers: {'Content-Type':'application/json'},
|
|
body: JSON.stringify({message:'listprio'})
|
|
});
|
|
/* 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';
|
|
document.getElementById('prioDetail').textContent = 'word-boundary matching active';
|
|
document.getElementById('intents').textContent = list.map(x =>
|
|
'[' + x.name + '] trigger: ' + x.triggers + ' → ' + (x.command || '').substring(0, 80)
|
|
).join('\n');
|
|
}
|
|
} catch(e) {
|
|
document.getElementById('prioBadge').className = 'badge warn';
|
|
document.getElementById('prioBadge').textContent = 'CHECK';
|
|
}
|
|
}
|
|
load();
|
|
</script>
|
|
|
|
|
|
<!-- === OPUS UNIVERSAL DRILL-DOWN v1 19avr — append-only, doctrine #14 === -->
|
|
<script>
|
|
(function(){
|
|
if (window.__opusUniversalDrill) return; window.__opusUniversalDrill = true;
|
|
var d = document;
|
|
var m = d.createElement('div');
|
|
m.id = 'opus-udrill';
|
|
m.style.cssText = 'position:fixed;inset:0;background:rgba(0,0,0,0.82);backdrop-filter:blur(6px);display:none;align-items:center;justify-content:center;z-index:99995;padding:20px;cursor:pointer';
|
|
var inner = d.createElement('div');
|
|
inner.id = 'opus-udrill-in';
|
|
inner.style.cssText = 'max-width:900px;width:100%;max-height:90vh;overflow:auto;background:#0b0d15;border:1px solid rgba(99,102,241,0.35);border-radius:14px;padding:28px;cursor:default;box-shadow:0 20px 60px rgba(0,0,0,0.6);color:#e2e8f0;font:14px/1.55 Inter,system-ui,sans-serif';
|
|
inner.addEventListener('click', function(e){ e.stopPropagation(); });
|
|
m.appendChild(inner);
|
|
m.addEventListener('click', function(){ m.style.display='none'; });
|
|
d.addEventListener('keydown', function(e){ if(e.key==='Escape') m.style.display='none'; });
|
|
(d.body || d.documentElement).appendChild(m);
|
|
|
|
function openCard(card) {
|
|
// Clone card content + show close btn + increase font-size
|
|
var html = '<div style="display:flex;justify-content:flex-end;margin-bottom:14px"><button id="opus-udrill-close" style="padding:6px 14px;background:#171b2a;border:1px solid rgba(99,102,241,0.25);color:#e2e8f0;border-radius:8px;cursor:pointer;font-size:12px">✕ Fermer (Esc)</button></div>';
|
|
html += '<div style="transform-origin:top left;font-size:1.05em">' + card.outerHTML + '</div>';
|
|
inner.innerHTML = html;
|
|
d.getElementById('opus-udrill-close').onclick = function(){ m.style.display='none'; };
|
|
m.style.display = 'flex';
|
|
}
|
|
|
|
function wire(root) {
|
|
var sels = '.card,[class*="card"],.kpi,[class*="kpi"],.stat,[class*="stat"],.tile,[class*="tile"],.metric,[class*="metric"],.widget,[class*="widget"]';
|
|
var cards = root.querySelectorAll(sels);
|
|
for (var i = 0; i < cards.length; i++) {
|
|
var c = cards[i];
|
|
if (c.__opusWired) continue;
|
|
if (c.closest('button, a, input, select, textarea, #opus-udrill')) continue;
|
|
var r = c.getBoundingClientRect();
|
|
if (r.width < 60 || r.height < 40) continue;
|
|
c.__opusWired = true;
|
|
c.style.cursor = 'pointer';
|
|
c.setAttribute('role','button');
|
|
c.setAttribute('tabindex','0');
|
|
c.addEventListener('click', function(ev){
|
|
// If a more-specific drill is already active (e.g. pp-card custom), let it handle
|
|
if (ev.target.closest('[data-pp-id]') && window.__opusDrillInit) return;
|
|
if (ev.target.closest('a,button,input,select')) return;
|
|
ev.preventDefault(); ev.stopPropagation();
|
|
openCard(this);
|
|
});
|
|
c.addEventListener('keydown', function(ev){ if(ev.key==='Enter'||ev.key===' '){ev.preventDefault();openCard(this);} });
|
|
}
|
|
}
|
|
|
|
// Initial + mutation observer
|
|
var initRun = function(){ wire(d.body || d.documentElement); };
|
|
if (d.readyState === 'loading') d.addEventListener('DOMContentLoaded', initRun);
|
|
else initRun();
|
|
var mo = new MutationObserver(function(muts){
|
|
var newCard = false;
|
|
for (var i=0;i<muts.length;i++) if (muts[i].addedNodes.length) { newCard = true; break; }
|
|
if (newCard) initRun();
|
|
});
|
|
mo.observe(d.body || d.documentElement, {childList:true, subtree:true});
|
|
})();
|
|
</script>
|
|
<!-- === OPUS UNIVERSAL DRILL-DOWN END === -->
|
|
|
|
</body>
|
|
</html>
|