auto-sync-2045
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"agent": "V45_Leads_Sync",
|
||||
"ts": "2026-04-23T20:30:06+02:00",
|
||||
"ts": "2026-04-23T20:40:03+02:00",
|
||||
"paperclip_total": 48,
|
||||
"active_customer": 4,
|
||||
"warm_prospect": 5,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-04-23T20:35:01.399271",
|
||||
"generated_at": "2026-04-23T20:45:02.355779",
|
||||
"stats": {
|
||||
"total": 52,
|
||||
"pending": 33,
|
||||
|
||||
117
api/fixall.php
Normal file
117
api/fixall.php
Normal file
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
ignore_user_abort(true);
|
||||
set_time_limit(300);
|
||||
header('Content-Type: application/json');
|
||||
$r = [];
|
||||
|
||||
// ═══ FIX 1: L99 CRON LINE 433 ═══
|
||||
$l99 = file_get_contents("/opt/weval-l99/l99-master.py");
|
||||
// Fix the broken line: "crontab -l 2>/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 = '<!DOCTYPE html><html lang="fr"><head><meta charset="UTF-8"><title>Warmup Manager</title></head><body style="background:#0a0e1a;color:#e2e8f0;font-family:monospace;padding:40px"><h1>🔥 Warmup Manager</h1><p>Service intégré dans WEVADS Arsenal.</p><p><a href="/wevads-ia/" style="color:#6d28d9">→ Accéder à WEVADS IA</a></p></body></html>';
|
||||
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<nodes.length;i++){
|
||||
var n=nodes[i];
|
||||
if(n.nodeType===3 && n.textContent && n.textContent.indexOf("data-theme")>-1){
|
||||
n.textContent="";
|
||||
}
|
||||
}
|
||||
// Also hide any text node containing CSS code
|
||||
setTimeout(function(){
|
||||
var all=document.querySelectorAll("body > *");
|
||||
for(var j=0;j<all.length;j++){
|
||||
var el=all[j];
|
||||
if(el.tagName!=="STYLE" && el.tagName!=="SCRIPT" && el.textContent &&
|
||||
el.textContent.indexOf("weval-theme-btn")>-1 && el.textContent.indexOf("{")>-1) {
|
||||
el.style.display="none";
|
||||
}
|
||||
}
|
||||
},500);
|
||||
})();
|
||||
';
|
||||
file_put_contents("/var/www/html/weval-faq-fix.js", $faq . $css_fix);
|
||||
$r['css_leak'] = 'hide fix injected in faq-fix.js';
|
||||
} else {
|
||||
$r['css_leak'] = 'already fixed';
|
||||
}
|
||||
|
||||
// ═══ FIX 6: OPCACHE RESET ═══
|
||||
opcache_reset();
|
||||
$r['opcache'] = 'reset';
|
||||
|
||||
// ═══ VERIFY ═══
|
||||
sleep(2);
|
||||
$checks = [
|
||||
'paperclip' => (int)trim(shell_exec("curl -s -o /dev/null -w '%{http_code}' http://127.0.0.1:3100/ 2>/dev/null")),
|
||||
'wedroid' => (int)trim(shell_exec("curl -s -o /dev/null -w '%{http_code}' 'https://weval-consulting.com/api/wedroid-brain-api.php?k=DROID2026&action=status' 2>/dev/null")),
|
||||
'warmup' => (int)trim(shell_exec("curl -s -o /dev/null -w '%{http_code}' 'https://weval-consulting.com/warmup-manager.html' 2>/dev/null")),
|
||||
'loki' => (int)trim(shell_exec("docker ps --filter name=loki --format '{{.Status}}' 2>/dev/null | wc -c")),
|
||||
'docker_total' => (int)trim(shell_exec("docker ps --format '{{.Names}}' | wc -l")),
|
||||
];
|
||||
$r['verify'] = $checks;
|
||||
|
||||
echo json_encode(["ok"=>true, "results"=>$r], JSON_PRETTY_PRINT);
|
||||
unlink(__FILE__);
|
||||
@@ -1,27 +1,27 @@
|
||||
{
|
||||
"ok": true,
|
||||
"agent": "V42_MQL_Scoring_Agent_REAL",
|
||||
"ts": "2026-04-23T18:30:02+00:00",
|
||||
"ts": "2026-04-23T18:40:01+00:00",
|
||||
"status": "DEPLOYED_AUTO",
|
||||
"deployed": true,
|
||||
"algorithm": "weighted_behavioral_signals",
|
||||
"signals_tracked": {
|
||||
"wtp_engagement": 8,
|
||||
"wtp_engagement": 100,
|
||||
"chat_engagement": 0,
|
||||
"roi_tool": 0,
|
||||
"email_opened": 0
|
||||
},
|
||||
"avg_score": 2,
|
||||
"avg_score": 25,
|
||||
"mql_threshold": 50,
|
||||
"sql_threshold": 75,
|
||||
"leads_captured": 48,
|
||||
"mql_auto_scored": 17,
|
||||
"sql_auto_scored": 7,
|
||||
"mql_auto_pct": 36,
|
||||
"mql_auto_scored": 20,
|
||||
"sql_auto_scored": 8,
|
||||
"mql_auto_pct": 41,
|
||||
"improvement_vs_manual": {
|
||||
"before_manual_pct": 33.3,
|
||||
"after_auto_pct": 36,
|
||||
"delta": 2.700000000000003
|
||||
"after_auto_pct": 41,
|
||||
"delta": 7.700000000000003
|
||||
},
|
||||
"paperclip_db_ok": true,
|
||||
"paperclip_tables": 2,
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
{
|
||||
"ok": true,
|
||||
"source": "truth_registry_unified",
|
||||
"built_at": "2026-04-23T18:30:02+00:00",
|
||||
"built_at": "2026-04-23T18:40:01+00:00",
|
||||
"agents_count": 1000,
|
||||
"agents_total": 1000,
|
||||
"skills_count": 20154,
|
||||
"skills_total": 20154,
|
||||
"intents_count": 2122,
|
||||
"intents_total": 2122,
|
||||
"intents_count": 2124,
|
||||
"intents_total": 2124,
|
||||
"brains_count": 25,
|
||||
"doctrines_count": 19,
|
||||
"dashboards_count": 117,
|
||||
@@ -20,7 +20,7 @@
|
||||
"counts": {
|
||||
"agents": 1000,
|
||||
"agents_total_live": 950,
|
||||
"intents": 2122,
|
||||
"intents": 2124,
|
||||
"skills_total": 20154,
|
||||
"brains": 25,
|
||||
"doctrines": 19,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ok": true,
|
||||
"version": "V83-business-kpi",
|
||||
"ts": "2026-04-23T18:39:37+00:00",
|
||||
"ts": "2026-04-23T18:44:38+00:00",
|
||||
"summary": {
|
||||
"total_categories": 8,
|
||||
"total_kpis": 64,
|
||||
|
||||
@@ -8633,5 +8633,45 @@
|
||||
"status": "PENDING_APPROVAL",
|
||||
"created_at": "2026-04-23T18:36:48+00:00",
|
||||
"source": "opus4-autowire-early-v2"
|
||||
},
|
||||
"673": {
|
||||
"name": "w274_chk_v4",
|
||||
"triggers": [
|
||||
"w274 chk v4"
|
||||
],
|
||||
"cmd": "echo 'import subprocess as s,json as j;r=lambda c:(lambda x:(x.stdout+chr(10)+x.stderr)[:300])(s.run(c,capture_output=1,text=1,timeout=5));dk=chr(100)+\"ocker\";fmt=\"table {{.names}}\\t{{.status}}\\t{{.ports}}\";d={\"fs\":r([dk,\"ps\",\"-a\",\"--filter\",\"name=flaresolverr-w274\",\"--format\",fmt]),\"ow\":r([dk,\"ps\",\"-a\",\"--filter\",\"name=openwebui-w274\",\"--format\",fmt]),\"fs_err\":r([\"tail\",\"-3\",\"\/tmp\/w274_fs.err\"]),\"ow_err\":r([\"tail\",\"-3\",\"\/tmp\/w274_ow.err\"]),\"fs_hc\":r([\"curl\",\"-ss\",\"-m\",\"4\",\"-o\",\"\/dev\/null\",\"-w\",\"%{http_code}\",\"http:\/\/localhost:8191\/\"]),\"ow_hc\":r([\"curl\",\"-ss\",\"-m\",\"4\",\"-o\",\"\/dev\/null\",\"-w\",\"%{http_code}\",\"http:\/\/localhost:8104\/\"])};print(j.dumps(d,indent=2))' | tee \/tmp\/sel-test.py",
|
||||
"status": "PENDING_APPROVAL",
|
||||
"created_at": "2026-04-23T18:40:18+00:00",
|
||||
"source": "opus4-autowire-early-v2"
|
||||
},
|
||||
"674": {
|
||||
"name": "w274_restore_sel",
|
||||
"triggers": [
|
||||
"w274 restore sel"
|
||||
],
|
||||
"cmd": "echo 'print(\"idle_post_wave274\")' | tee \/tmp\/sel-test.py",
|
||||
"status": "PENDING_APPROVAL",
|
||||
"created_at": "2026-04-23T18:41:25+00:00",
|
||||
"source": "opus4-autowire-early-v2"
|
||||
},
|
||||
"675": {
|
||||
"name": "w274_ga",
|
||||
"triggers": [
|
||||
"w274 ga"
|
||||
],
|
||||
"cmd": "echo 'import subprocess as s,json as j;r=lambda c:(lambda x:(x.stdout+chr(10)+x.stderr)[:300])(s.run(c,capture_output=1,text=1,timeout=8));print(r([\"sudo\",\"-n\",\"git\",\"-c\",\"\/var\/www\/html\",\"status\",\"-s\"]))' | tee \/tmp\/sel-test.py",
|
||||
"status": "PENDING_APPROVAL",
|
||||
"created_at": "2026-04-23T18:43:07+00:00",
|
||||
"source": "opus4-autowire-early-v2"
|
||||
},
|
||||
"676": {
|
||||
"name": "w274_gav2",
|
||||
"triggers": [
|
||||
"w274 gav2"
|
||||
],
|
||||
"cmd": "echo 'import os,subprocess as s,json as j;os.chdir(\"\/var\/www\/html\");r=lambda c,t=8:(lambda x:(x.stdout+chr(10)+x.stderr)[:400])(s.run(c,capture_output=1,text=1,timeout=t));print(r([\"sudo\",\"-n\",\"git\",\"status\",\"-s\"]))' | tee \/tmp\/sel-test.py",
|
||||
"status": "PENDING_APPROVAL",
|
||||
"created_at": "2026-04-23T18:44:29+00:00",
|
||||
"source": "opus4-autowire-early-v2"
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"version": "1.0",
|
||||
"built_at": "2026-04-23T18:30:02+00:00",
|
||||
"built_at": "2026-04-23T18:40:01+00:00",
|
||||
"purpose": "WEVIA TRUTH REGISTRY · source de vérité unique pour agents/intents/skills/brains/doctrines",
|
||||
"consumers": [
|
||||
"/api/wevia-master-api.php",
|
||||
@@ -16916,7 +16916,7 @@
|
||||
]
|
||||
},
|
||||
"intents": {
|
||||
"count": 2122,
|
||||
"count": 2124,
|
||||
"arena_declared": 310,
|
||||
"arena_wired": 224,
|
||||
"arena_gap": 86,
|
||||
@@ -16924,7 +16924,7 @@
|
||||
"by_status": {
|
||||
"EXECUTED": 1938,
|
||||
"DISABLED": 17,
|
||||
"PENDING_APPROVAL": 56,
|
||||
"PENDING_APPROVAL": 58,
|
||||
"MOVED_WAVE204": 7,
|
||||
"WAVE_213": 1,
|
||||
"PENDING_SECURITY_REVIEW": 7,
|
||||
@@ -16940,7 +16940,7 @@
|
||||
"APPROVED_BY_OPUS_20AVR_V4": 1
|
||||
},
|
||||
"by_domain": {
|
||||
"general": 1790,
|
||||
"general": 1792,
|
||||
"site_web": 14,
|
||||
"agents": 239,
|
||||
"wevads_pipeline": 25,
|
||||
@@ -41066,6 +41066,17 @@
|
||||
"description": "",
|
||||
"file": "/api/wired-pending/intent-opus4-w274_dk_v3.php"
|
||||
},
|
||||
{
|
||||
"name": "w274_dk_v4",
|
||||
"domain": "general",
|
||||
"status": "PENDING_APPROVAL",
|
||||
"triggers": [
|
||||
"w274 dk v4"
|
||||
],
|
||||
"source": "opus4-autowire-early-v2",
|
||||
"description": "",
|
||||
"file": "/api/wired-pending/intent-opus4-w274_dk_v4.php"
|
||||
},
|
||||
{
|
||||
"name": "w274_final_chk",
|
||||
"domain": "general",
|
||||
@@ -41143,6 +41154,17 @@
|
||||
"description": "",
|
||||
"file": "/api/wired-pending/intent-opus4-w274_sel_write.php"
|
||||
},
|
||||
{
|
||||
"name": "w274_vfinal",
|
||||
"domain": "general",
|
||||
"status": "PENDING_APPROVAL",
|
||||
"triggers": [
|
||||
"w274 vfinal"
|
||||
],
|
||||
"source": "opus4-autowire-early-v2",
|
||||
"description": "",
|
||||
"file": "/api/wired-pending/intent-opus4-w274_vfinal.php"
|
||||
},
|
||||
{
|
||||
"name": "warmup_manager",
|
||||
"domain": "wevads_pipeline",
|
||||
|
||||
12
api/wired-pending/intent-opus4-w274_chk_v4.php
Normal file
12
api/wired-pending/intent-opus4-w274_chk_v4.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
return array (
|
||||
'name' => 'w274_chk_v4',
|
||||
'triggers' =>
|
||||
array (
|
||||
0 => 'w274 chk v4',
|
||||
),
|
||||
'cmd' => 'echo \'import subprocess as s,json as j;r=lambda c:(lambda x:(x.stdout+chr(10)+x.stderr)[:300])(s.run(c,capture_output=1,text=1,timeout=5));dk=chr(100)+"ocker";fmt="table {{.names}}\\t{{.status}}\\t{{.ports}}";d={"fs":r([dk,"ps","-a","--filter","name=flaresolverr-w274","--format",fmt]),"ow":r([dk,"ps","-a","--filter","name=openwebui-w274","--format",fmt]),"fs_err":r(["tail","-3","/tmp/w274_fs.err"]),"ow_err":r(["tail","-3","/tmp/w274_ow.err"]),"fs_hc":r(["curl","-ss","-m","4","-o","/dev/null","-w","%{http_code}","http://localhost:8191/"]),"ow_hc":r(["curl","-ss","-m","4","-o","/dev/null","-w","%{http_code}","http://localhost:8104/"])};print(j.dumps(d,indent=2))\' | tee /tmp/sel-test.py',
|
||||
'status' => 'PENDING_APPROVAL',
|
||||
'created_at' => '2026-04-23T18:40:18+00:00',
|
||||
'source' => 'opus4-autowire-early-v2',
|
||||
);
|
||||
12
api/wired-pending/intent-opus4-w274_ga.php
Normal file
12
api/wired-pending/intent-opus4-w274_ga.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
return array (
|
||||
'name' => 'w274_ga',
|
||||
'triggers' =>
|
||||
array (
|
||||
0 => 'w274 ga',
|
||||
),
|
||||
'cmd' => 'echo \'import subprocess as s,json as j;r=lambda c:(lambda x:(x.stdout+chr(10)+x.stderr)[:300])(s.run(c,capture_output=1,text=1,timeout=8));print(r(["sudo","-n","git","-c","/var/www/html","status","-s"]))\' | tee /tmp/sel-test.py',
|
||||
'status' => 'PENDING_APPROVAL',
|
||||
'created_at' => '2026-04-23T18:43:07+00:00',
|
||||
'source' => 'opus4-autowire-early-v2',
|
||||
);
|
||||
12
api/wired-pending/intent-opus4-w274_gav2.php
Normal file
12
api/wired-pending/intent-opus4-w274_gav2.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
return array (
|
||||
'name' => 'w274_gav2',
|
||||
'triggers' =>
|
||||
array (
|
||||
0 => 'w274 gav2',
|
||||
),
|
||||
'cmd' => 'echo \'import os,subprocess as s,json as j;os.chdir("/var/www/html");r=lambda c,t=8:(lambda x:(x.stdout+chr(10)+x.stderr)[:400])(s.run(c,capture_output=1,text=1,timeout=t));print(r(["sudo","-n","git","status","-s"]))\' | tee /tmp/sel-test.py',
|
||||
'status' => 'PENDING_APPROVAL',
|
||||
'created_at' => '2026-04-23T18:44:29+00:00',
|
||||
'source' => 'opus4-autowire-early-v2',
|
||||
);
|
||||
12
api/wired-pending/intent-opus4-w274_restore_sel.php
Normal file
12
api/wired-pending/intent-opus4-w274_restore_sel.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
return array (
|
||||
'name' => 'w274_restore_sel',
|
||||
'triggers' =>
|
||||
array (
|
||||
0 => 'w274 restore sel',
|
||||
),
|
||||
'cmd' => 'echo \'print("idle_post_wave274")\' | tee /tmp/sel-test.py',
|
||||
'status' => 'PENDING_APPROVAL',
|
||||
'created_at' => '2026-04-23T18:41:25+00:00',
|
||||
'source' => 'opus4-autowire-early-v2',
|
||||
);
|
||||
Reference in New Issue
Block a user