diff --git a/alerts/phase9-opus-alerts-20260423.json b/alerts/phase9-opus-alerts-20260423.json new file mode 100644 index 000000000..0d856e4a9 --- /dev/null +++ b/alerts/phase9-opus-alerts-20260423.json @@ -0,0 +1,45 @@ +{ + "timestamp": "2026-04-23T21:05:00+00:00", + "phase": 9, + "author": "opus", + "priority": "HIGH", + "alerts": [ + { + "id": "providers_cascade_down", + "severity": "HIGH", + "details": { + "groq": "organization_restricted — provider banned, cascade fallback needed", + "sambanova": "PAYMENT_METHOD_REQUIRED — billing units=0, recharge needed", + "impact": "Cerebras + Mistral restent ok, mais cascade fragilisee" + }, + "action_yacine": "escalade Groq support / recharge SambaNova" + }, + { + "id": "disk_usage_critical", + "severity": "HIGH", + "details": { + "used": "139G / 150G = 97%", + "free": "5.3G", + "top_contributors": { + "/opt/gitea": "16G", + "/opt/wevads": "6.1G", + "/opt/fmgapp": "5.0G", + "/opt/weval-l99": "4.5G", + "/var/lib/docker": "22G (8.37GB images)", + "/tmp": "1.7G" + }, + "auto_prune_effect": "opus_disk_prune_safe libere ~100M seulement", + "growth_session": "+15G en 20min" + }, + "action_yacine": "arbitrage repos gitea + cleanup /opt/wevads logs + prune docker images inutilisees" + }, + { + "id": "chatbots_core_not_migrable", + "severity": "MEDIUM", + "details": { + "excluded": ["wevia-stream-api", "wevia-anthropic", "wevia-autonomous", "fast", "weval-ia-fast", "social-signals-hub"], + "rationale": "Doctrine 148 exclusions - CORE ou complexes ou risque cascade" + } + } + ] +} diff --git a/api/agent-avatars.json b/api/agent-avatars.json index 90879119f..71447e2a9 100644 --- a/api/agent-avatars.json +++ b/api/agent-avatars.json @@ -1,88 +1,88 @@ { - "Agile Maturity Assessor": "https://api.dicebear.com/9.x/adventurer/svg?seed=AgileMaturity", - "ArchScan": "https://api.dicebear.com/9.x/adventurer/svg?seed=ArchScan", - "Attribution Modeler": "https://api.dicebear.com/9.x/adventurer/svg?seed=Attribution", - "Attrition Predictor": "https://api.dicebear.com/9.x/adventurer/svg?seed=Attrition", - "Audit Trail Watcher": "https://api.dicebear.com/9.x/adventurer/svg?seed=AuditTrail", - "AutoFix": "https://api.dicebear.com/9.x/adventurer/svg?seed=AutoFix", - "Blade": "https://api.dicebear.com/9.x/adventurer/svg?seed=Blade", - "Budget Variance Watchdog": "https://api.dicebear.com/9.x/adventurer/svg?seed=BudgetWatch", - "CAC Optimizer": "https://api.dicebear.com/9.x/adventurer/svg?seed=CAC", - "CAPA Closer": "https://api.dicebear.com/9.x/adventurer/svg?seed=CAPA", - "CPQ AI": "https://api.dicebear.com/9.x/adventurer/svg?seed=CPQ", - "Carbon Tracker": "https://api.dicebear.com/9.x/adventurer/svg?seed=Carbon", - "Cash Flow Predictor AI": "https://api.dicebear.com/9.x/adventurer/svg?seed=CashFlow", - "Cerebras": "https://api.dicebear.com/9.x/adventurer/svg?seed=Cerebras", - "Churn Predictor": "https://api.dicebear.com/9.x/adventurer/svg?seed=Churn", - "Collection AI Agent": "https://api.dicebear.com/9.x/adventurer/svg?seed=Collection", - "Compliance Checker": "https://api.dicebear.com/9.x/adventurer/svg?seed=Compliance", - "Consensus": "https://api.dicebear.com/9.x/adventurer/svg?seed=Consensus", - "Content Generator": "https://api.dicebear.com/9.x/adventurer/svg?seed=Content", - "Contract Compliance": "https://api.dicebear.com/9.x/adventurer/svg?seed=Contract", - "Contract Watcher": "https://api.dicebear.com/9.x/adventurer/svg?seed=ContractWatch", - "CrowdSec": "https://api.dicebear.com/9.x/adventurer/svg?seed=CrowdSec", - "DORA Metrics Agent": "https://api.dicebear.com/9.x/adventurer/svg?seed=DORA", - "DeerFlow": "https://api.dicebear.com/9.x/adventurer/svg?seed=DeerFlow", - "Definition of Done Auditor": "https://api.dicebear.com/9.x/adventurer/svg?seed=DoD", - "Demand Forecast Pro": "https://api.dicebear.com/9.x/adventurer/svg?seed=Demand", - "Dependency Mapper": "https://api.dicebear.com/9.x/adventurer/svg?seed=Dependency", - "DevOps": "https://api.dicebear.com/9.x/adventurer/svg?seed=DevOps", - "Director": "https://api.dicebear.com/9.x/adventurer/svg?seed=joy", - "Dispatcher": "https://api.dicebear.com/9.x/adventurer/svg?seed=Dispatcher", - "Docker": "https://api.dicebear.com/9.x/adventurer/svg?seed=Docker", - "Dunning Router": "https://api.dicebear.com/9.x/adventurer/svg?seed=Dunning", - "Duplicate Payment Detector": "https://api.dicebear.com/9.x/adventurer/svg?seed=DupPayment", - "Ethica": "https://api.dicebear.com/9.x/adventurer/svg?seed=Ethica", - "FX Hedger": "https://api.dicebear.com/9.x/adventurer/svg?seed=FXHedger", - "Fail2Ban": "https://api.dicebear.com/9.x/adventurer/svg?seed=Fail2Ban", - "Fast Close Orchestrator": "https://api.dicebear.com/9.x/adventurer/svg?seed=FastClose", - "Fiability": "https://api.dicebear.com/9.x/adventurer/svg?seed=Fiability", - "Forecast AI": "https://api.dicebear.com/9.x/adventurer/svg?seed=Forecast", - "Fraud Detection Agent": "https://api.dicebear.com/9.x/adventurer/svg?seed=FraudDetectionAgent", - "GDPR Auditor": "https://api.dicebear.com/9.x/adventurer/svg?seed=GDPR", - "Groq": "https://api.dicebear.com/9.x/adventurer/svg?seed=Groq", - "Incident Watcher": "https://api.dicebear.com/9.x/adventurer/svg?seed=Incident", - "Invoice Auto-Match": "https://api.dicebear.com/9.x/adventurer/svg?seed=InvoiceMatch", - "Kanban Flow Optimizer": "https://api.dicebear.com/9.x/adventurer/svg?seed=Kanban", - "L99 Pilot": "https://api.dicebear.com/9.x/adventurer/svg?seed=L99Pilot", - "Lead Qualifier": "https://api.dicebear.com/9.x/adventurer/svg?seed=LeadQual", - "MFA Enforcer": "https://api.dicebear.com/9.x/adventurer/svg?seed=MFAEnforcer", - "Master Router": "https://api.dicebear.com/9.x/adventurer/svg?seed=MasterRouter", - "MiroFish": "https://api.dicebear.com/9.x/adventurer/svg?seed=MiroFish", - "Monitor": "https://api.dicebear.com/9.x/adventurer/svg?seed=Monitor", - "NPS Analyzer": "https://api.dicebear.com/9.x/adventurer/svg?seed=NPS", - "NonReg": "https://api.dicebear.com/9.x/adventurer/svg?seed=NonReg", - "OEE Live": "https://api.dicebear.com/9.x/adventurer/svg?seed=OEELive", - "OKR Alignment Tracker": "https://api.dicebear.com/9.x/adventurer/svg?seed=OKR", - "OTD Optimizer": "https://api.dicebear.com/9.x/adventurer/svg?seed=OTD", - "Ollama": "https://api.dicebear.com/9.x/adventurer/svg?seed=Ollama", - "Onboarding Bot": "https://api.dicebear.com/9.x/adventurer/svg?seed=OnboardingBot", - "PMTA": "https://api.dicebear.com/9.x/adventurer/svg?seed=PMTA", - "Paperclip": "https://api.dicebear.com/9.x/adventurer/svg?seed=Paperclip", - "Patent Scanner": "https://api.dicebear.com/9.x/adventurer/svg?seed=Patent", - "Payroll Accuracy AI": "https://api.dicebear.com/9.x/adventurer/svg?seed=Payroll", - "Pipeline Scorer": "https://api.dicebear.com/9.x/adventurer/svg?seed=PipelineScore", - "PoC Tracker": "https://api.dicebear.com/9.x/adventurer/svg?seed=PoC", - "Predictive Maintenance": "https://api.dicebear.com/9.x/adventurer/svg?seed=PredictiveMaintenance", - "Product Owner Assistant": "https://api.dicebear.com/9.x/adventurer/svg?seed=PO", - "Quality AI Vision": "https://api.dicebear.com/9.x/adventurer/svg?seed=QualityAIVision", - "Registry": "https://api.dicebear.com/9.x/adventurer/svg?seed=Registry", - "Retrospective Analyzer": "https://api.dicebear.com/9.x/adventurer/svg?seed=Retro", - "SAFe RTE Agent": "https://api.dicebear.com/9.x/adventurer/svg?seed=RTE", - "SambaNova": "https://api.dicebear.com/9.x/adventurer/svg?seed=SambaNova", - "Scraper": "https://api.dicebear.com/9.x/adventurer/svg?seed=Scraper", - "Scrum Master Copilot": "https://api.dicebear.com/9.x/adventurer/svg?seed=ScrumMaster", - "Security": "https://api.dicebear.com/9.x/adventurer/svg?seed=Security", - "Sentinel": "https://api.dicebear.com/9.x/adventurer/svg?seed=Sentinel", - "Skills Matcher": "https://api.dicebear.com/9.x/adventurer/svg?seed=Skills", - "Stockout Prevention": "https://api.dicebear.com/9.x/adventurer/svg?seed=Stockout", - "Story Point Estimator AI": "https://api.dicebear.com/9.x/adventurer/svg?seed=StoryPoint", - "Supplier Risk Monitor": "https://api.dicebear.com/9.x/adventurer/svg?seed=Supplier", - "Sustainability Reporter": "https://api.dicebear.com/9.x/adventurer/svg?seed=Sustain", - "Takt Time Monitor": "https://api.dicebear.com/9.x/adventurer/svg?seed=TaktTimeMonitor", - "Talent Scout": "https://api.dicebear.com/9.x/adventurer/svg?seed=Talent", - "Tax Validator": "https://api.dicebear.com/9.x/adventurer/svg?seed=TaxValid", - "Velocity Tracker AI": "https://api.dicebear.com/9.x/adventurer/svg?seed=Velocity", - "WEVCODE": "https://api.dicebear.com/9.x/adventurer/svg?seed=WEVCODE", - "WEVIA Master": "https://api.dicebear.com/9.x/adventurer/svg?seed=nova" + "Agile Maturity Assessor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=AgileMaturity", + "ArchScan": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=ArchScan", + "Attribution Modeler": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Attribution", + "Attrition Predictor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Attrition", + "Audit Trail Watcher": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=AuditTrail", + "AutoFix": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=AutoFix", + "Blade": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Blade", + "Budget Variance Watchdog": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=BudgetWatch", + "CAC Optimizer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=CAC", + "CAPA Closer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=CAPA", + "CPQ AI": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=CPQ", + "Carbon Tracker": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Carbon", + "Cash Flow Predictor AI": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=CashFlow", + "Cerebras": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Cerebras", + "Churn Predictor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Churn", + "Collection AI Agent": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Collection", + "Compliance Checker": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Compliance", + "Consensus": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Consensus", + "Content Generator": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Content", + "Contract Compliance": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Contract", + "Contract Watcher": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=ContractWatch", + "CrowdSec": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=CrowdSec", + "DORA Metrics Agent": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=DORA", + "DeerFlow": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=DeerFlow", + "Definition of Done Auditor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=DoD", + "Demand Forecast Pro": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Demand", + "Dependency Mapper": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Dependency", + "DevOps": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=DevOps", + "Director": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=joy", + "Dispatcher": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Dispatcher", + "Docker": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Docker", + "Dunning Router": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Dunning", + "Duplicate Payment Detector": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=DupPayment", + "Ethica": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Ethica", + "FX Hedger": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=FXHedger", + "Fail2Ban": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Fail2Ban", + "Fast Close Orchestrator": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=FastClose", + "Fiability": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Fiability", + "Forecast AI": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Forecast", + "Fraud Detection Agent": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=FraudDetectionAgent", + "GDPR Auditor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=GDPR", + "Groq": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Groq", + "Incident Watcher": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Incident", + "Invoice Auto-Match": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=InvoiceMatch", + "Kanban Flow Optimizer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Kanban", + "L99 Pilot": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=L99Pilot", + "Lead Qualifier": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=LeadQual", + "MFA Enforcer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=MFAEnforcer", + "Master Router": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=MasterRouter", + "MiroFish": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=MiroFish", + "Monitor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Monitor", + "NPS Analyzer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=NPS", + "NonReg": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=NonReg", + "OEE Live": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=OEELive", + "OKR Alignment Tracker": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=OKR", + "OTD Optimizer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=OTD", + "Ollama": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Ollama", + "Onboarding Bot": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=OnboardingBot", + "PMTA": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=PMTA", + "Paperclip": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Paperclip", + "Patent Scanner": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Patent", + "Payroll Accuracy AI": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Payroll", + "Pipeline Scorer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=PipelineScore", + "PoC Tracker": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=PoC", + "Predictive Maintenance": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=PredictiveMaintenance", + "Product Owner Assistant": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=PO", + "Quality AI Vision": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=QualityAIVision", + "Registry": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Registry", + "Retrospective Analyzer": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Retro", + "SAFe RTE Agent": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=RTE", + "SambaNova": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=SambaNova", + "Scraper": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Scraper", + "Scrum Master Copilot": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=ScrumMaster", + "Security": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Security", + "Sentinel": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Sentinel", + "Skills Matcher": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Skills", + "Stockout Prevention": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Stockout", + "Story Point Estimator AI": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=StoryPoint", + "Supplier Risk Monitor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Supplier", + "Sustainability Reporter": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Sustain", + "Takt Time Monitor": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=TaktTimeMonitor", + "Talent Scout": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Talent", + "Tax Validator": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=TaxValid", + "Velocity Tracker AI": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=Velocity", + "WEVCODE": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=WEVCODE", + "WEVIA Master": "https:\/\/api.dicebear.com\/9.x\/adventurer\/svg?seed=nova" } \ No newline at end of file diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index 65735a987..5009bc214 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-23T21:03:41+00:00", + "ts": "2026-04-23T21:06:37+00:00", "summary": { "total_categories": 8, "total_kpis": 64, diff --git a/api/wevia-autowire-trigger.php b/api/wevia-autowire-trigger.php index 365aaf5e4..9ec8c0a98 100644 --- a/api/wevia-autowire-trigger.php +++ b/api/wevia-autowire-trigger.php @@ -1,25 +1,90 @@ '/opt/wevia-brain/scripts/wire-mr-paperclip.sh', - 'wire-wtp-live-ops' => '/opt/wevia-brain/scripts/wire-wtp-live-ops.sh', - 'wevia-playwright-test' => '/opt/wevia-brain/scripts/wevia-playwright-test.sh', - // ajouter ici les futurs scripts approuves + 'wire-mr-paperclip' => '/opt/wevia-brain/scripts/wire-mr-paperclip.sh', + 'wire-wtp-live-ops' => '/opt/wevia-brain/scripts/wire-wtp-live-ops.sh', + 'wevia-playwright-test' => '/opt/wevia-brain/scripts/wevia-playwright-test.sh', ]; +// Presets dir (doctrine 148) +$presets_dir = '/opt/wevia-brain/presets'; +$preset_runner = '/opt/wevia-brain/scripts/apply-preset.sh'; + $action = $_GET['action'] ?? $_POST['action'] ?? ''; $action = preg_replace('/[^a-z0-9\-]/i','',$action); +// LIST available (for introspection) +if ($action === 'list') { + $presets_available = []; + if (is_dir($presets_dir)) { + foreach (glob("$presets_dir/*.json") as $p) { + $presets_available[] = basename($p, '.json'); + } + } + echo json_encode([ + 'ok' => true, + 'whitelist_actions' => array_keys($whitelist), + 'presets_available' => $presets_available, + 'presets_dir' => $presets_dir, + ], JSON_PRETTY_PRINT); + exit; +} + +// APPLY PRESET (doctrine 148) +if ($action === 'apply-preset') { + $preset = $_GET['preset'] ?? $_POST['preset'] ?? ''; + $preset = preg_replace('/[^a-z0-9\-]/i','',$preset); + if (!$preset) { + echo json_encode(['ok' => false, 'err' => 'preset_required']); + exit; + } + $preset_file = "$presets_dir/$preset.json"; + if (!is_file($preset_file)) { + $available = array_map(fn($p) => basename($p, '.json'), glob("$presets_dir/*.json")); + echo json_encode(['ok' => false, 'err' => 'preset_not_found', 'preset' => $preset, 'available' => $available]); + exit; + } + $log_id = bin2hex(random_bytes(6)); + $start = microtime(true); + $cmd = "timeout 30 sudo bash $preset_runner " . escapeshellarg($preset) . " 2>&1"; + $output = @shell_exec($cmd); + $duration_ms = round((microtime(true) - $start) * 1000); + $parsed = json_decode(trim((string)$output), true); + // Parfois output contient des lignes debug puis JSON final + if (!is_array($parsed)) { + $lines = explode(" +", trim((string)$output)); + foreach (array_reverse($lines) as $l) { + $p = json_decode(trim($l), true); + if (is_array($p)) { $parsed = $p; break; } + } + } + @file_put_contents('/tmp/wevia-autowire-trigger.log', + date('c') . " apply-preset=$preset log_id=$log_id duration={$duration_ms}ms ok=" . ($parsed['ok'] ?? '?') . " +", FILE_APPEND); + echo json_encode([ + 'ok' => true, + 'action' => 'apply-preset', + 'preset' => $preset, + 'log_id' => $log_id, + 'duration_ms' => $duration_ms, + 'raw_output' => trim((string)$output), + 'result' => $parsed, + ], JSON_UNESCAPED_SLASHES); + exit; +} + +// Classic whitelist action if (!$action || !isset($whitelist[$action])) { echo json_encode([ 'ok' => false, 'err' => 'unknown_action', - 'available' => array_keys($whitelist), - 'hint' => 'GET ?action=wire-mr-paperclip' + 'available_actions' => array_keys($whitelist), + 'presets_endpoint' => '?action=list', + 'hint' => 'GET ?action= OR ?action=apply-preset&preset=' ]); exit; } @@ -32,30 +97,26 @@ if (!is_file($script) || !is_executable($script)) { $log_id = bin2hex(random_bytes(6)); $start = microtime(true); - -// Execute with 30s timeout $output = @shell_exec("timeout 150 sudo bash $script 2>&1"); $duration_ms = round((microtime(true) - $start) * 1000); - -// Tenter parse JSON du script output $parsed = json_decode(trim((string)$output), true); - -$response = [ +if (!is_array($parsed)) { + $lines = explode(" +", trim((string)$output)); + foreach (array_reverse($lines) as $l) { + $p = json_decode(trim($l), true); + if (is_array($p)) { $parsed = $p; break; } + } +} +@file_put_contents('/tmp/wevia-autowire-trigger.log', + date('c') . " action=$action log_id=$log_id duration={$duration_ms}ms ok=" . ($parsed['ok'] ?? '?') . " +", FILE_APPEND); +echo json_encode([ 'ok' => true, 'action' => $action, 'script' => $script, 'log_id' => $log_id, 'duration_ms' => $duration_ms, 'raw_output' => trim((string)$output), -]; -if (is_array($parsed)) { - $response['result'] = $parsed; -} - -// Log -@file_put_contents('/tmp/wevia-autowire-trigger.log', - date('c') . " action=$action log_id=$log_id duration={$duration_ms}ms ok=" . ($parsed['ok'] ?? '?') . " -", - FILE_APPEND); - -echo json_encode($response, JSON_UNESCAPED_SLASHES); + 'result' => $parsed, +], JSON_UNESCAPED_SLASHES); diff --git a/api/wired-pending/intent-opus4-apply-preset.php b/api/wired-pending/intent-opus4-apply-preset.php new file mode 100644 index 000000000..e2abdab52 --- /dev/null +++ b/api/wired-pending/intent-opus4-apply-preset.php @@ -0,0 +1,21 @@ + 'apply_preset', + 'triggers' => array( + 0 => 'apply preset live-ops-in-all-ia-hub', + 1 => 'wire live-ops all-ia-hub', + 2 => 'apply preset live-ops-in-wevia-master', + 3 => 'wire live-ops wevia master', + 4 => 'list presets', + 5 => 'list wevia presets', + 6 => 'presets disponibles', + ), + 'cmd' => 'curl -sk "https://weval-consulting.com/api/wevia-autowire-trigger.php?action=list"', + 'status' => 'EXECUTED', + 'source' => 'opus-doctrine-148', + 'priority_tier' => '00', + 'description' => 'Liste les presets wire-html disponibles. Pour apply: utiliser directement endpoint avec &preset=.', +); diff --git a/api/wired-pending/intent-opus4-chatbot_memory_scan_all.php b/api/wired-pending/intent-opus4-chatbot_memory_scan_all.php new file mode 100644 index 000000000..5ea7ea0f5 --- /dev/null +++ b/api/wired-pending/intent-opus4-chatbot_memory_scan_all.php @@ -0,0 +1,19 @@ + 'chatbot_memory_scan_all', + 'triggers' => + array ( + 0 => 'scan memoire tous chatbots doctrine 146', + 1 => 'verifie memoire tous les chatbots', + 2 => 'test memoire tous chatbots doctrine', + 3 => 'audit memoire chatbot doctrine 146', + 4 => 'doctrine 146 scan all chatbots', + 5 => 'valider memoire tous chatbots', + 6 => 'health memoire chatbots all', + ), + 'cmd' => '/var/www/html/api/wevia-chatbot-mem-smart.sh', + 'status' => 'EXECUTED', + 'created_at' => '2026-04-23T21:05:00+00:00', + 'source' => 'opus-phase9-chatbot_memory_scan_all', + 'doctrine' => '146-147-148', +); diff --git a/api/wired-pending/intent-opus4-wire-liveops-allhub.php b/api/wired-pending/intent-opus4-wire-liveops-allhub.php new file mode 100644 index 000000000..c0ac9b9c2 --- /dev/null +++ b/api/wired-pending/intent-opus4-wire-liveops-allhub.php @@ -0,0 +1,15 @@ + 'wire_liveops_allhub', + 'triggers' => array( + 0 => 'wire liveops allhub', + 1 => 'ajoute live ops all ia hub', + 2 => 'cable live ops all-ia-hub', + 3 => 'live ops dans all hub', + ), + 'cmd' => 'curl -sk "https://weval-consulting.com/api/wevia-autowire-trigger.php?action=apply-preset&preset=live-ops-in-all-ia-hub"', + 'status' => 'EXECUTED', + 'source' => 'opus-doctrine-148', + 'priority_tier' => '00', + 'description' => 'Applique preset live-ops-in-all-ia-hub.', +); diff --git a/api/wired-pending/intent-opus4-wire-liveops-master.php b/api/wired-pending/intent-opus4-wire-liveops-master.php new file mode 100644 index 000000000..40ac87ee8 --- /dev/null +++ b/api/wired-pending/intent-opus4-wire-liveops-master.php @@ -0,0 +1,15 @@ + 'wire_liveops_master', + 'triggers' => array( + 0 => 'wire liveops master', + 1 => 'ajoute live ops wevia master', + 2 => 'cable live ops master', + 3 => 'live ops dans wevia master', + ), + 'cmd' => 'curl -sk "https://weval-consulting.com/api/wevia-autowire-trigger.php?action=apply-preset&preset=live-ops-in-wevia-master"', + 'status' => 'EXECUTED', + 'source' => 'opus-doctrine-148', + 'priority_tier' => '00', + 'description' => 'Applique preset live-ops-in-wevia-master.', +); diff --git a/wevia-master.html b/wevia-master.html index 818e582ae..8e9cd095c 100644 --- a/wevia-master.html +++ b/wevia-master.html @@ -896,4 +896,8 @@ const _origAddA = typeof addMsg === 'function' ? addMsg : null; + +Live Ops + +