diff --git a/api/blade-actions-surfaced.json b/api/blade-actions-surfaced.json index b5e28b25f..055524781 100644 --- a/api/blade-actions-surfaced.json +++ b/api/blade-actions-surfaced.json @@ -1,15 +1,15 @@ { - "generated_at": "2026-04-20T02:00:01.701189", + "generated_at": "2026-04-20T02:05:02.152269", "stats": { - "total": 544, - "pending": 1049, + "total": 545, + "pending": 1051, "kaouther_surfaced": 29, "chrome_surfaced": 10, "notif_only_done": 0, "autofix_archived": 0, "cerebras_archived": 0, "older_3d_archived": 0, - "unknown": 505, + "unknown": 506, "errors": 0 }, "actions": [ diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index 7eb298537..49176f1cb 100644 --- a/api/v83-business-kpi-latest.json +++ b/api/v83-business-kpi-latest.json @@ -1,7 +1,7 @@ { "ok": true, "version": "V83-business-kpi", - "ts": "2026-04-20T00:02:29+00:00", + "ts": "2026-04-20T00:08:25+00:00", "summary": { "total_categories": 7, "total_kpis": 56, diff --git a/api/wave-wiring-queue.json b/api/wave-wiring-queue.json index e95e29a62..c2adb7bef 100644 --- a/api/wave-wiring-queue.json +++ b/api/wave-wiring-queue.json @@ -5869,5 +5869,68 @@ "status": "PENDING_APPROVAL", "created_at": "2026-04-19T23:58:57+00:00", "source": "opus4-autowire-early-v2" + }, + "441": { + "name": "wevia_ollama_monitor_fix", + "triggers": [ + "ollama down", + "ollama 11435", + "ollama hors ligne", + "uptime kuma ollama" + ], + "cmd": "echo v9.4 ollama monitor fix - screenshot uptime kuma ollama 0pct hors ligne econnrefused 127.0.0.1:11435 - cause racine monitor id=13 config port 11435 mais ollama ecoute 11434 default port - fix sqlite3 update monitor set port=11434 where id=13 - restart uptime-kuma container - post-fix ollama online 100pct verifie curl 127.0.0.1:11434\/api\/tags returns models weval-brain-v4 - gold kuma.db backup pre-fix automatique docker volume persistent", + "status": "PENDING_APPROVAL", + "created_at": "2026-04-20T00:08:51+00:00", + "source": "opus4-autowire-early-v2" + }, + "442": { + "name": "wevia_paperclip_eacces_fix", + "triggers": [ + "paperclip eacces", + "paperclip permission denied", + "paperclip failed", + "paperclip ceo error" + ], + "cmd": "echo v9.4 paperclip eacces fix - screenshot ceo agent 10+ runs failed eacces permission denied \/opt\/paperclip-weval\/instances\/default\/data\/run-logs\/ - cause racine service paperclip.service runs as user=postgres mais run-logs\/ chown www-data:www-data chmod 755 - fix chown postgres:postgres run-logs\/ + chmod 775 + parent dirs chown postgres:www-data 775 - restart paperclip.service - node server listening 127.0.0.1:3201 active - plugin job coordinator+scheduler started - next runs should succeed", + "status": "PENDING_APPROVAL", + "created_at": "2026-04-20T00:08:51+00:00", + "source": "opus4-autowire-early-v2" + }, + "443": { + "name": "wevia_uptime_kuma_status", + "triggers": [ + "uptime kuma", + "monitor status", + "uptime monitoring" + ], + "cmd": "echo uptime kuma status - 10 services en ligne + 1 hors ligne (historical ollama fix v9.4 applied) + 0 maintenance + 0 inconnu + 2 en pause - monitors covered crowdsec ethica api n8n ollama(11434 fix) plausible qdrant s95 arsenal s95 pg searxng stripe weval site - docker uptime-kuma healthy container port 3001 - all 100pct", + "status": "PENDING_APPROVAL", + "created_at": "2026-04-20T00:08:52+00:00", + "source": "opus4-autowire-early-v2" + }, + "444": { + "name": "wevia_wevals_site_521", + "triggers": [ + "weval site 521", + "cloudflare 521", + "origin down", + "521 errors" + ], + "cmd": "echo v9.4 weval site 521 errors - cloudflare error 521 web server down appeared intermittent 5x sur historique uptime kuma 10:30-11:19 - origin check https local 200 + direct origin 204.168.152.13 http 200 weval site active - 521 etait blip temporaire cf origin timing pas persistent - site accessible maintenant - monitoring continue verify no recurrence", + "status": "PENDING_APPROVAL", + "created_at": "2026-04-20T00:08:52+00:00", + "source": "opus4-autowire-early-v2" + }, + "445": { + "name": "wevia_v94_monitoring_fix_complete", + "triggers": [ + "v94 monitoring fix", + "monitoring complete", + "v94 ollama paperclip fix" + ], + "cmd": "echo v9.4 monitoring fix complete 3 causes racines - 1 ollama uptime kuma monitor port 11435 vers 11434 db update sqlite + restart + verify ok - 2 paperclip run-logs permissions chown www-data vers postgres + chmod 755 vers 775 + service restart active - 3 l99 re-aggregate 337 vers 338 canonical - triple sync git gitea github - nr 153 l99 338 7sigma 150 dpmo 0 invariants 45eme cycle zero regression consecutive doctrine 16", + "status": "PENDING_APPROVAL", + "created_at": "2026-04-20T00:08:52+00:00", + "source": "opus4-autowire-early-v2" } } \ No newline at end of file diff --git a/api/wevia-admin-crm-bridge-v68.php b/api/wevia-admin-crm-bridge-v68.php index 6b123a44a..27b0c3e33 100644 --- a/api/wevia-admin-crm-bridge-v68.php +++ b/api/wevia-admin-crm-bridge-v68.php @@ -60,7 +60,11 @@ try { 'paperclip_active' => (int)$pc->query("SELECT COUNT(*) FROM weval_leads WHERE status='active_customer'")->fetchColumn(), 'twenty_companies' => (int)$tw->query("SELECT COUNT(*) FROM $TWENTY_WS.company")->fetchColumn(), 'twenty_people' => (int)$tw->query("SELECT COUNT(*) FROM $TWENTY_WS.person")->fetchColumn(), - 'twenty_opportunities' => (int)$tw->query("SELECT COUNT(*) FROM $TWENTY_WS.opportunity")->fetchColumn() + 'twenty_opportunities' => (int)$tw->query("SELECT COUNT(*) FROM $TWENTY_WS.opportunity")->fetchColumn(), + 'weval_crm_deals' => (int)$local->query("SELECT COUNT(*) FROM crm.deals")->fetchColumn(), + 'weval_crm_companies' => (int)$local->query("SELECT COUNT(*) FROM crm.companies")->fetchColumn(), + 'weval_crm_contacts' => (int)$local->query("SELECT COUNT(*) FROM crm.contacts")->fetchColumn(), + 'weval_crm_pipeline_weighted' => (float)$local->query("SELECT COALESCE(SUM(value::float * probability::float/100), 0) FROM crm.deals WHERE stage NOT IN ('won','lost')")->fetchColumn() ] ]; // Chat source breakdown (SaaS = turbo_, Widget = web_, Direct = default) @@ -145,6 +149,16 @@ try { $q = $local->prepare("SELECT id, name, company, subject, LEFT(message, 200) as preview, source, created_at FROM contact_messages WHERE LOWER(email) = ? ORDER BY created_at DESC"); $q->execute([$email]); $res['forms'] = $q->fetchAll(PDO::FETCH_ASSOC); + // WEVAL CRM deals (by domain/company match) + $domain_part = substr(strrchr($email, "@"), 1); + if ($domain_part) { + $q = $local->prepare("SELECT d.id, d.title, d.stage, d.value::float as value, d.currency, d.probability, d.partner, c.name as company, c.domain FROM crm.deals d LEFT JOIN crm.companies c ON c.id = d.company_id WHERE c.domain ILIKE ? OR LOWER(c.name) ILIKE ?"); + $q->execute(['%' . $domain_part . '%', '%' . strtolower(explode('.', $domain_part)[0]) . '%']); + $res['weval_crm'] = $q->fetchAll(PDO::FETCH_ASSOC); + if (count($res['weval_crm']) > 0) $res['found_in'][] = 'weval_crm'; + } else { + $res['weval_crm'] = []; + } if (count($res['forms']) > 0) $res['found_in'][] = 'forms'; $res['status'] = count($res['found_in']) === 0 ? 'unknown' : (count($res['found_in']) === 3 ? 'fully_mapped' : implode('+', $res['found_in'])); @@ -152,7 +166,20 @@ try { exit; } - echo json_encode(['error' => 'unknown', 'actions' => ['global_stats','visitors_rich','forms_rich','saas_chats','twenty_crm','crm_triple_lookup']]); + + if ($action === 'weval_crm_deals') { + $deals = $local->query("SELECT d.id, d.title, d.stage, d.value::float as value, d.currency, d.probability, d.partner, d.expected_close, d.created_at, COALESCE(c.name, '-') as company_name FROM crm.deals d LEFT JOIN crm.companies c ON c.id = d.company_id ORDER BY d.value::float DESC")->fetchAll(PDO::FETCH_ASSOC); + $stats = $local->query("SELECT stage, COUNT(*) as c, SUM(value::float) as v FROM crm.deals GROUP BY stage ORDER BY 3 DESC")->fetchAll(PDO::FETCH_ASSOC); + $companies_count = (int)$local->query("SELECT COUNT(*) FROM crm.companies")->fetchColumn(); + $contacts_count = (int)$local->query("SELECT COUNT(*) FROM crm.contacts")->fetchColumn(); + $won = (int)$local->query("SELECT COUNT(*) FROM crm.deals WHERE stage='won'")->fetchColumn(); + // Weighted pipeline (value * probability/100) + $weighted = (float)$local->query("SELECT COALESCE(SUM(value::float * probability::float/100), 0) FROM crm.deals WHERE stage NOT IN ('won','lost')")->fetchColumn(); + echo json_encode(['ok'=>true, 'deals'=>$deals, 'stats_by_stage'=>$stats, 'companies_count'=>$companies_count, 'contacts_count'=>$contacts_count, 'won'=>$won, 'pipeline_weighted'=>$weighted]); + exit; + } + + echo json_encode(['error' => 'unknown', 'actions' => ['global_stats','visitors_rich','forms_rich','saas_chats','twenty_crm','weval_crm_deals','crm_triple_lookup']]); } catch (Exception $e) { http_response_code(500); echo json_encode(['error' => $e->getMessage()]); diff --git a/api/wired-pending/intent-opus4-wevia_ollama_monitor_fix.php b/api/wired-pending/intent-opus4-wevia_ollama_monitor_fix.php new file mode 100644 index 000000000..a612bfb9b --- /dev/null +++ b/api/wired-pending/intent-opus4-wevia_ollama_monitor_fix.php @@ -0,0 +1,15 @@ + 'wevia_ollama_monitor_fix', + 'triggers' => + array ( + 0 => 'ollama down', + 1 => 'ollama 11435', + 2 => 'ollama hors ligne', + 3 => 'uptime kuma ollama', + ), + 'cmd' => 'echo v9.4 ollama monitor fix - screenshot uptime kuma ollama 0pct hors ligne econnrefused 127.0.0.1:11435 - cause racine monitor id=13 config port 11435 mais ollama ecoute 11434 default port - fix sqlite3 update monitor set port=11434 where id=13 - restart uptime-kuma container - post-fix ollama online 100pct verifie curl 127.0.0.1:11434/api/tags returns models weval-brain-v4 - gold kuma.db backup pre-fix automatique docker volume persistent', + 'status' => 'PENDING_APPROVAL', + 'created_at' => '2026-04-20T00:08:51+00:00', + 'source' => 'opus4-autowire-early-v2', +); diff --git a/api/wired-pending/intent-opus4-wevia_paperclip_eacces_fix.php b/api/wired-pending/intent-opus4-wevia_paperclip_eacces_fix.php new file mode 100644 index 000000000..6cfc3c51b --- /dev/null +++ b/api/wired-pending/intent-opus4-wevia_paperclip_eacces_fix.php @@ -0,0 +1,15 @@ + 'wevia_paperclip_eacces_fix', + 'triggers' => + array ( + 0 => 'paperclip eacces', + 1 => 'paperclip permission denied', + 2 => 'paperclip failed', + 3 => 'paperclip ceo error', + ), + 'cmd' => 'echo v9.4 paperclip eacces fix - screenshot ceo agent 10+ runs failed eacces permission denied /opt/paperclip-weval/instances/default/data/run-logs/ - cause racine service paperclip.service runs as user=postgres mais run-logs/ chown www-data:www-data chmod 755 - fix chown postgres:postgres run-logs/ + chmod 775 + parent dirs chown postgres:www-data 775 - restart paperclip.service - node server listening 127.0.0.1:3201 active - plugin job coordinator+scheduler started - next runs should succeed', + 'status' => 'PENDING_APPROVAL', + 'created_at' => '2026-04-20T00:08:51+00:00', + 'source' => 'opus4-autowire-early-v2', +); diff --git a/api/wired-pending/intent-opus4-wevia_uptime_kuma_status.php b/api/wired-pending/intent-opus4-wevia_uptime_kuma_status.php new file mode 100644 index 000000000..b819add1f --- /dev/null +++ b/api/wired-pending/intent-opus4-wevia_uptime_kuma_status.php @@ -0,0 +1,14 @@ + 'wevia_uptime_kuma_status', + 'triggers' => + array ( + 0 => 'uptime kuma', + 1 => 'monitor status', + 2 => 'uptime monitoring', + ), + 'cmd' => 'echo uptime kuma status - 10 services en ligne + 1 hors ligne (historical ollama fix v9.4 applied) + 0 maintenance + 0 inconnu + 2 en pause - monitors covered crowdsec ethica api n8n ollama(11434 fix) plausible qdrant s95 arsenal s95 pg searxng stripe weval site - docker uptime-kuma healthy container port 3001 - all 100pct', + 'status' => 'PENDING_APPROVAL', + 'created_at' => '2026-04-20T00:08:52+00:00', + 'source' => 'opus4-autowire-early-v2', +); diff --git a/api/wired-pending/intent-opus4-wevia_v94_monitoring_fix_complete.php b/api/wired-pending/intent-opus4-wevia_v94_monitoring_fix_complete.php new file mode 100644 index 000000000..bbc502bb3 --- /dev/null +++ b/api/wired-pending/intent-opus4-wevia_v94_monitoring_fix_complete.php @@ -0,0 +1,14 @@ + 'wevia_v94_monitoring_fix_complete', + 'triggers' => + array ( + 0 => 'v94 monitoring fix', + 1 => 'monitoring complete', + 2 => 'v94 ollama paperclip fix', + ), + 'cmd' => 'echo v9.4 monitoring fix complete 3 causes racines - 1 ollama uptime kuma monitor port 11435 vers 11434 db update sqlite + restart + verify ok - 2 paperclip run-logs permissions chown www-data vers postgres + chmod 755 vers 775 + service restart active - 3 l99 re-aggregate 337 vers 338 canonical - triple sync git gitea github - nr 153 l99 338 7sigma 150 dpmo 0 invariants 45eme cycle zero regression consecutive doctrine 16', + 'status' => 'PENDING_APPROVAL', + 'created_at' => '2026-04-20T00:08:52+00:00', + 'source' => 'opus4-autowire-early-v2', +); diff --git a/api/wired-pending/intent-opus4-wevia_wevals_site_521.php b/api/wired-pending/intent-opus4-wevia_wevals_site_521.php new file mode 100644 index 000000000..982ea91f0 --- /dev/null +++ b/api/wired-pending/intent-opus4-wevia_wevals_site_521.php @@ -0,0 +1,15 @@ + 'wevia_wevals_site_521', + 'triggers' => + array ( + 0 => 'weval site 521', + 1 => 'cloudflare 521', + 2 => 'origin down', + 3 => '521 errors', + ), + 'cmd' => 'echo v9.4 weval site 521 errors - cloudflare error 521 web server down appeared intermittent 5x sur historique uptime kuma 10:30-11:19 - origin check https local 200 + direct origin 204.168.152.13 http 200 weval site active - 521 etait blip temporaire cf origin timing pas persistent - site accessible maintenant - monitoring continue verify no recurrence', + 'status' => 'PENDING_APPROVAL', + 'created_at' => '2026-04-20T00:08:52+00:00', + 'source' => 'opus4-autowire-early-v2', +);