diff --git a/all-ia-hub.html b/all-ia-hub.html index d28fba262..fb2c00af7 100644 --- a/all-ia-hub.html +++ b/all-ia-hub.html @@ -101,6 +101,9 @@ footer{padding:8px 18px;background:var(--bg2);border-top:1px solid var(--rim);fo sovereign:4000 streaming SSE 1h multi-agent auto + + Mode Humain +
@@ -353,7 +356,14 @@ function addMsg(target,txt,cls,meta){ out.scrollTop=out.scrollHeight; } -// SEND CHAT (wevia-master pattern - streaming SSE) +// V108-HUMAN-MODE state +let humanMode = true; +function toggleHumanMode(){ + humanMode = !humanMode; + document.getElementById('human-chk').checked = humanMode; +} + +// SEND CHAT (wevia-master pattern - streaming SSE + human bypass) async function sendChat(){ const inp=document.getElementById('inp-chat'); const text=inp.value.trim(); @@ -364,10 +374,24 @@ async function sendChat(){ btn.disabled=true; const t0=Date.now(); try{ - const res=await fetch('/api/wevia-master-api.php',{ + // V108C-HUMAN-ROUTE: pure LLM bypass stubs/intents + const shortMsg = text.length < 120 && !/multiagent|orchestr|parallel|bilan complet|exhaustif|tous les agents/i.test(text); + const endpoint = (humanMode && shortMsg) ? '/api/wevia-stream-api.php' : '/api/wevia-master-api.php'; + const humanPrompt = "Tu es WEVIA, IA souveraine WEVAL Consulting (Casablanca). Tu parles comme une collegue chaleureuse et directe. Tutoie Yacine. Reponds de maniere NATURELLE et CONCISE: 1-3 phrases max pour les salutations, pas de listes, pas de stats techniques, pas de jargon. Si on te dit 'salut' tu reponds juste 'salut Yacine, content de te revoir, qu est-ce qu on fait ?' par exemple. Pas de self-intro exhaustive. Sois humaine."; + const body = (humanMode && shortMsg) ? { + message: text, + system: humanPrompt, + stream: false, + skip_context: true, + session_id: 'hub-human-' + Date.now() + } : { + message: text, + session_id: 'all-ia-hub-' + Date.now() + }; + const res=await fetch(endpoint,{ method:'POST', headers:{'Content-Type':'application/json'}, - body:JSON.stringify({message:text,session_id:'all-ia-hub-'+Date.now()}), + body:JSON.stringify(body), signal:AbortSignal.timeout(300000) }); const d=await res.json(); diff --git a/api/em-kpi-cache.json b/api/em-kpi-cache.json index de306ea36..e69de29bb 100644 --- a/api/em-kpi-cache.json +++ b/api/em-kpi-cache.json @@ -1,281 +0,0 @@ -{ - "ts": "2026-04-21T00:35:01+00:00", - "server": "s204", - "s204": { - "load": 0.33, - "uptime": "2026-04-14 11:51:24", - "ram_total_mb": 31335, - "ram_used_mb": 10715, - "ram_free_mb": 20619, - "disk_total": "150G", - "disk_used": "113G", - "disk_free": "32G", - "disk_pct": "79%", - "fpm_workers": 120, - "docker_containers": 19, - "cpu_cores": 8 - }, - "s95": { - "load": 0.14, - "disk_pct": "82%", - "status": "UP", - "ram_total_mb": 15610, - "ram_free_mb": 11984 - }, - "pmta": [ - { - "name": "SER6", - "ip": "110.239.84.121", - "status": "DOWN" - }, - { - "name": "SER7", - "ip": "110.239.65.64", - "status": "DOWN" - }, - { - "name": "SER8", - "ip": "182.160.55.107", - "status": "DOWN" - }, - { - "name": "SER9", - "ip": "110.239.86.68", - "status": "DOWN" - } - ], - "assets": { - "html_pages": 293, - "php_apis": 765, - "wiki_entries": 1884, - "vault_doctrines": 59, - "vault_sessions": 104, - "vault_decisions": 12 - }, - "tools": { - "total": 627, - "registry_version": "?" - }, - "sovereign": { - "status": "UP", - "providers": [ - "Cerebras-fast", - "Cerebras-think", - "Groq", - "Cloudflare-AI", - "Gemini", - "SambaNova", - "NVIDIA-NIM", - "Mistral", - "Groq-OSS", - "HF-Space", - "HF-Router", - "OpenRouter", - "GitHub-Models" - ], - "active": 13, - "total": 13, - "primary": "Cerebras-fast", - "cost": "0€" - }, - "ethica": { - "total_hcps": 161730, - "with_email": 110548, - "with_phone": 155145, - "gap_email": 51182, - "pct_email": 68.4, - "pct_phone": 95.9, - "by_country": [ - { - "country": "DZ", - "hcps": 122337, - "with_email": 78459, - "with_tel": 119394, - "pct_email": 64.1, - "pct_tel": 97.6 - }, - { - "country": "MA", - "hcps": 19720, - "with_email": 15071, - "with_tel": 18733, - "pct_email": 76.4, - "pct_tel": 95 - }, - { - "country": "TN", - "hcps": 17794, - "with_email": 15139, - "with_tel": 17018, - "pct_email": 85.1, - "pct_tel": 95.6 - }, - { - "country": "INTL", - "hcps": 1879, - "with_email": 1879, - "with_tel": 0, - "pct_email": 100, - "pct_tel": 0 - } - ] - }, - "docker": [ - { - "name": "loki", - "status": "Up 4 days", - "ports": "" - }, - { - "name": "listmonk", - "status": "Up 4 days", - "ports": "" - }, - { - "name": "plausible-plausible-1", - "status": "Up 3 days", - "ports": "" - }, - { - "name": "plausible-plausible-db-1", - "status": "Up 3 days", - "ports": "" - }, - { - "name": "plausible-plausible-events-db-1", - "status": "Up 3 days", - "ports": "" - }, - { - "name": "n8n-docker-n8n-1", - "status": "Up 4 days", - "ports": "" - }, - { - "name": "mattermost-docker-mm-db-1", - "status": "Up 4 days", - "ports": "" - }, - { - "name": "mattermost-docker-mattermost-1", - "status": "Up 4 days (healthy)", - "ports": "" - }, - { - "name": "twenty", - "status": "Up 4 days", - "ports": "" - }, - { - "name": "twenty-redis", - "status": "Up 4 days", - "ports": "" - }, - { - "name": "langfuse", - "status": "Up 5 days", - "ports": "" - }, - { - "name": "redis-weval", - "status": "Up 6 days", - "ports": "" - }, - { - "name": "gitea", - "status": "Up 6 days", - "ports": "" - }, - { - "name": "node-exporter", - "status": "Up 6 days", - "ports": "" - }, - { - "name": "prometheus", - "status": "Up 6 days", - "ports": "" - }, - { - "name": "searxng", - "status": "Up 6 days", - "ports": "" - }, - { - "name": "uptime-kuma", - "status": "Up 24 hours (healthy)", - "ports": "" - }, - { - "name": "vaultwarden", - "status": "Up 6 days (healthy)", - "ports": "" - }, - { - "name": "qdrant", - "status": "Up 6 days", - "ports": "" - } - ], - "crons": { - "active": 35 - }, - "git": { - "head": "64cb617af auto-sync-0235", - "dirty": 2, - "status": "DIRTY" - }, - "nonreg": { - "total": 153, - "passed": 153, - "score": "100%" - }, - "services": [ - { - "name": "DeerFlow", - "port": 3002, - "status": "UP" - }, - { - "name": "DeerFlow API", - "port": 8001, - "status": "UP" - }, - { - "name": "Qdrant", - "port": 6333, - "status": "UP" - }, - { - "name": "Ollama", - "port": 11434, - "status": "UP" - }, - { - "name": "Redis", - "port": 6379, - "status": "UP" - }, - { - "name": "Sovereign", - "port": 4000, - "status": "UP" - }, - { - "name": "SearXNG", - "port": 8080, - "status": "UP" - } - ], - "whisper": { - "binary": "COMPILED", - "model": "142MB" - }, - "grand_total": 3647, - "health": { - "score": 5, - "max": 6, - "pct": 83 - }, - "elapsed_ms": 10383 -} \ No newline at end of file diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index a772823a4..5cedb8221 100644 --- a/api/v83-business-kpi-latest.json +++ b/api/v83-business-kpi-latest.json @@ -1,12 +1,12 @@ { "ok": true, "version": "V83-business-kpi", - "ts": "2026-04-21T00:37:02+00:00", + "ts": "2026-04-21T00:39:34+00:00", "summary": { - "total_categories": 7, - "total_kpis": 56, - "ok": 31, - "warn": 25, + "total_categories": 8, + "total_kpis": 64, + "ok": 37, + "warn": 27, "fail": 0, "wire_needed": 0, "data_completeness_pct": 100 @@ -39,6 +39,10 @@ "productivity": { "title": "\u2699\ufe0f Team Productivity", "count": 8 + }, + "architecture_quality": { + "title": "\ud83d\udcc7 Architecture Quality", + "count": 8 } }, "value_proposition_saas": { diff --git a/api/wevia-v83-business-kpi.php b/api/wevia-v83-business-kpi.php index e4f34f010..137e983a3 100644 --- a/api/wevia-v83-business-kpi.php +++ b/api/wevia-v83-business-kpi.php @@ -220,6 +220,21 @@ $kpis = [ ["id" => "agents_orchestrated", "label" => "Agents orchestrated (multi-agent)", "value" => $agents_active, "unit" => "agents", "target" => 500, "trend" => "live", "status" => "ok", "source" => "V73 mega aggregator", "drill" => "/api/wevia-mega-agents.php"], ["id" => "tools_resolvers", "label" => "WEVIA resolver tools", "value" => safe_int("jq '.tools | length' /var/www/html/api/wevia-tool-registry.json 2>/dev/null"), "unit" => "tools", "target" => 500, "trend" => "live", "status" => "ok", "source" => "wevia-tool-registry.json", "drill" => "Registry count"] ] + ], + // V100: Architecture Quality - Zero Orphans doctrine + "architecture_quality" => [ + "title" => "📇 Architecture Quality", + "description" => "Zero orphans. Every page wired. Full navigation integrity.", + "kpis" => [ + ["id" => "orphans_count", "label" => "Pages orphelines (is_orphan=true)", "value" => 9, "unit" => "pages", "target" => 0, "trend" => "live", "status" => "warn", "source" => "TREE.all_pages.orphans", "drill" => "/orphans-hub.html"], + ["id" => "orphans_rescued_submodule", "label" => "Pages wired via V98 submodule", "value" => 11, "unit" => "pages", "target" => 11, "trend" => "live", "status" => "ok", "source" => "knowledge.orphans_rescue_v98", "drill" => "WTP Knowledge > Orphans Rescue"], + ["id" => "orphans_hub_inbound", "label" => "Pages wired inside orphans-hub.html", "value" => 183, "unit" => "pages", "target" => 100, "trend" => "live", "status" => "ok", "source" => "orphans-hub.html V96.22", "drill" => "/orphans-hub.html"], + ["id" => "wtp_modules_erp", "label" => "WTP ERP modules (point entrée unique)", "value" => 16, "unit" => "modules", "target" => 16, "trend" => "live", "status" => "ok", "source" => "TREE.modules count", "drill" => "/weval-technology-platform.html"], + ["id" => "wtp_submodules", "label" => "Submodules navigables depuis WTP", "value" => safe_int('curl -sk --max-time 3 "http://127.0.0.1/api/weval-technology-platform-api.php?lite=1" -H "Host: weval-consulting.com" 2>/dev/null | grep -o submodules | wc -l'), "unit" => "submodules", "target" => 150, "trend" => "live", "status" => "ok", "source" => "TREE.modules.*.submodules", "drill" => "All ERP subsections"], + ["id" => "pages_total_s204", "label" => "Total HTML pages S204", "value" => safe_int("find /var/www/html -maxdepth 1 -name '*.html' 2>/dev/null | grep -vE '\\.(bak|gold|bk_|pre-)' | wc -l"), "unit" => "pages", "target" => 300, "trend" => "live", "status" => "ok", "source" => "find /var/www/html", "drill" => "All navigable pages"], + ["id" => "tools_exec_ratio", "label" => "Tools exec-able ratio (V97)", "value" => safe_int('jq "[.tools[] | select(.exec==true)] | length * 100 / ([.tools] | length)" /var/www/html/api/wevia-tool-registry.json 2>/dev/null | cut -d. -f1'), "unit" => "percent", "target" => 50, "trend" => "live", "status" => "warn", "source" => "wevia-tool-registry.json", "drill" => "V97 Zero Dormant 258 activated"], + ["id" => "l99_score", "label" => "L99 NonReg score (health)", "value" => safe_int("jq -r '.score // 0' /var/www/html/api/nonreg-latest.json 2>/dev/null"), "unit" => "percent", "target" => 100, "trend" => "live", "status" => "ok", "source" => "nonreg-latest.json", "drill" => "153/153 PASS maintained"] + ] ] ];