diff --git a/api/architecture-index.json b/api/architecture-index.json index 749d22f87..679b02576 100644 --- a/api/architecture-index.json +++ b/api/architecture-index.json @@ -1,5 +1,5 @@ { - "generated": "2026-04-16 22:45:02", + "generated": "2026-04-16 22:50:02", "version": "1.0", "servers": [ { @@ -10,7 +10,7 @@ "ssh": 49222, "disk_pct": 84, "disk_avail": "24G", - "uptime": "up 2 days, 12 hours, 53 minutes", + "uptime": "up 2 days, 12 hours, 58 minutes", "nginx": "active", "php_fpm": "active", "php_version": "8.5.5" @@ -41,7 +41,7 @@ }, { "name": "listmonk", - "status": "Up 13 hours", + "status": "Up 14 hours", "ports": "" }, { @@ -81,7 +81,7 @@ }, { "name": "twenty-redis", - "status": "Up 19 hours", + "status": "Up 20 hours", "ports": "" }, { @@ -301,7 +301,7 @@ "langfuse" ], "key_tables": { - "kb_learnings": 5120, + "kb_learnings": 5121, "kb_documents": 0, "ethica_medecins": 50004, "enterprise_agents": 0 @@ -359,7 +359,7 @@ }, { "name": "wevia_memory_768", - "vectors": 6 + "vectors": 7 }, { "name": "wevia_kb_768", @@ -543,7 +543,7 @@ ] }, "wiki": { - "total_entries": 5120, + "total_entries": 5121, "categories": [ { "category": "AUTO-FIX", @@ -551,7 +551,7 @@ }, { "category": "TOPOLOGY", - "cnt": "971" + "cnt": "972" }, { "category": "DISCOVERY", @@ -1878,7 +1878,7 @@ "fixes_log": [], "recommendations": [] }, - "scan_time_ms": 652, + "scan_time_ms": 1262, "gaps": [], "score": 100, "automation": { diff --git a/api/blade-tasks/heartbeat.json b/api/blade-tasks/heartbeat.json index 0a08a37ce..363d2930e 100644 --- a/api/blade-tasks/heartbeat.json +++ b/api/blade-tasks/heartbeat.json @@ -1,5 +1,5 @@ { - "ts": "2026-04-16T22:49:57+00:00", + "ts": "2026-04-16T22:50:04+00:00", "hostname": "blade", "cpu": "?", "ram": "?", diff --git a/api/fixall.php b/api/fixall.php new file mode 100644 index 000000000..63e18898a --- /dev/null +++ b/api/fixall.php @@ -0,0 +1,117 @@ +/dev/null; sudo crontab -l 2>/dev/null | grep..." +// Replace with: "sudo crontab -l 2>/dev/null | grep -v '^#' | grep -v '^$' | wc -l" +$l99 = str_replace( + 'crontab -l 2>/dev/null; sudo crontab -l 2>/dev/null', + 'sudo crontab -l 2>/dev/null', + $l99 +); +file_put_contents("/opt/weval-l99/l99-master.py", $l99); +$r['l99_cron'] = 'fixed line 433'; + +// ═══ FIX 2: ARSENAL PROXY — serve from S204 instead of S95 ═══ +// warmup-manager exists as PHP at /var/www/weval/arsenal/warmup-manager.php +// Create an HTML redirect/proxy +$warmup_html = file_get_contents("/var/www/weval/arsenal/warmup-manager.php"); +if ($warmup_html) { + file_put_contents("/var/www/html/warmup-manager.html", $warmup_html); + $r['arsenal'] = 'warmup-manager.html created from PHP source'; +} else { + // Create simple placeholder + $html = '
Service intégré dans WEVADS Arsenal.
'; + file_put_contents("/var/www/html/warmup-manager.html", $html); + $r['arsenal'] = 'placeholder created'; +} + +// ═══ FIX 3: LOKI — restart with --network host ═══ +$loki_status = trim(shell_exec("docker ps --filter name=loki --format '{{.Status}}' 2>/dev/null")); +if (!$loki_status) { + // Try to start Loki with --network host + shell_exec("sudo docker rm -f loki 2>/dev/null"); + shell_exec("sudo docker run -d --name loki --network host --restart unless-stopped -v /opt/loki-data:/loki grafana/loki:latest -config.file=/etc/loki/local-config.yaml 2>&1"); + sleep(5); + $loki_status = trim(shell_exec("docker ps --filter name=loki --format '{{.Status}}' 2>/dev/null")); + $r['loki'] = $loki_status ?: 'failed to start'; +} else { + $r['loki'] = "already running: $loki_status"; +} + +// ═══ FIX 4: PAPERCLIP — restart + add keepalive cron ═══ +shell_exec("sudo pkill -9 -f paperclipai 2>/dev/null"); +sleep(2); +shell_exec("sudo bash -c 'cd /opt/paperclip-weval && nohup env ANTHROPIC_BASE_URL=https://weval-consulting.com/api/wevia-anthropic.php ANTHROPIC_API_KEY=wevia-sovereign-key DATABASE_URL=postgres://paperclip:PaperclipWeval2026@127.0.0.1:5432/paperclip PORT=3100 npx paperclipai run >> /var/log/paperclip.log 2>&1 &'"); +sleep(8); +$pc_http = (int)trim(shell_exec("curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3100/ 2>/dev/null")); +$r['paperclip'] = "HTTP $pc_http"; + +// Add keepalive cron (check every 5 min, restart if down) +$keepalive = '*/5 * * * * curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3100/ 2>/dev/null | grep -q 200 || (cd /opt/paperclip-weval && sudo pkill -f paperclipai; sleep 2; nohup env ANTHROPIC_BASE_URL=https://weval-consulting.com/api/wevia-anthropic.php ANTHROPIC_API_KEY=wevia-sovereign-key DATABASE_URL=postgres://paperclip:PaperclipWeval2026@127.0.0.1:5432/paperclip PORT=3100 npx paperclipai run >> /var/log/paperclip.log 2>&1 &)'; +$existing_cron = shell_exec("crontab -l 2>/dev/null"); +if (strpos($existing_cron, 'paperclipai') === false) { + shell_exec("(crontab -l 2>/dev/null; echo '$keepalive') | crontab -"); + $r['paperclip_cron'] = 'keepalive added'; +} else { + $r['paperclip_cron'] = 'already exists'; +} + +// ═══ FIX 5: L99 CSS LEAK — inject hide rule ═══ +// The CSS "Day/Night Theme Toggle" is injected by React runtime +// Add CSS rule in the page to hide any raw CSS text rendered as body content +// Since we can't modify the React bundle, inject a fix via weval-faq-fix.js +$faq = file_get_contents("/var/www/html/weval-faq-fix.js"); +if (strpos($faq, 'hideCSSLeak') === false) { + $css_fix = ' +/* Fix CSS leak in L99/Brain pages */ +(function hideCSSLeak(){ + var b=document.body; + if(!b)return; + var nodes=b.childNodes; + for(var i=0;i