AUTO-BACKUP 20260419-1640
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
{
|
||||
"generated_at": "2026-04-19T16:35:01.533191",
|
||||
"generated_at": "2026-04-19T16:40:01.180412",
|
||||
"stats": {
|
||||
"total": 445,
|
||||
"pending": 851,
|
||||
"total": 446,
|
||||
"pending": 853,
|
||||
"kaouther_surfaced": 29,
|
||||
"chrome_surfaced": 10,
|
||||
"notif_only_done": 0,
|
||||
"autofix_archived": 0,
|
||||
"cerebras_archived": 0,
|
||||
"older_3d_archived": 0,
|
||||
"unknown": 406,
|
||||
"unknown": 407,
|
||||
"errors": 0
|
||||
},
|
||||
"actions": [
|
||||
|
||||
11
api/blade-tasks/task_20260419144001_43f77a.json
Normal file
11
api/blade-tasks/task_20260419144001_43f77a.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "task_20260419144001_43f77a",
|
||||
"name": "Blade self-heal 16:40",
|
||||
"type": "powershell",
|
||||
"command": "\n# Blade self-heal\nWrite-Host \"Self-heal triggered $(Get-Date)\"\n$agentProc = Get-Process powershell | Where-Object { $_.CommandLine -match 'sentinel-agent' }\nif (!$agentProc) {\n Write-Host \"Agent not running, starting...\"\n Start-Process powershell -ArgumentList \"-ExecutionPolicy\",\"Bypass\",\"-File\",\"C:\\ProgramData\\WEVAL\\sentinel-agent.ps1\" -WindowStyle Hidden\n}\n# Clear stale tasks > 3 days locally\n$cutoff = (Get-Date).AddDays(-3)\nGet-ChildItem \"C:\\ProgramData\\WEVAL\\tasks\\*.json\" -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -lt $cutoff } | Move-Item -Destination \"C:\\ProgramData\\WEVAL\\tasks\\archived\\\" -Force -ErrorAction SilentlyContinue\nWrite-Host \"Self-heal complete\"\n",
|
||||
"cmd": "\n# Blade self-heal\nWrite-Host \"Self-heal triggered $(Get-Date)\"\n$agentProc = Get-Process powershell | Where-Object { $_.CommandLine -match 'sentinel-agent' }\nif (!$agentProc) {\n Write-Host \"Agent not running, starting...\"\n Start-Process powershell -ArgumentList \"-ExecutionPolicy\",\"Bypass\",\"-File\",\"C:\\ProgramData\\WEVAL\\sentinel-agent.ps1\" -WindowStyle Hidden\n}\n# Clear stale tasks > 3 days locally\n$cutoff = (Get-Date).AddDays(-3)\nGet-ChildItem \"C:\\ProgramData\\WEVAL\\tasks\\*.json\" -ErrorAction SilentlyContinue | Where-Object { $_.LastWriteTime -lt $cutoff } | Move-Item -Destination \"C:\\ProgramData\\WEVAL\\tasks\\archived\\\" -Force -ErrorAction SilentlyContinue\nWrite-Host \"Self-heal complete\"\n",
|
||||
"priority": "high",
|
||||
"status": "pending",
|
||||
"created": "2026-04-19T14:40:01+00:00",
|
||||
"created_by": "blade-control-ui"
|
||||
}
|
||||
@@ -8,7 +8,7 @@ $t0 = microtime(true);
|
||||
$R = ['ts'=>date('c'), 'source'=>'opus5-autonomy-kpi'];
|
||||
|
||||
// === 1. Truth registry ===
|
||||
$truth_raw = @file_get_contents('http://127.0.0.1/api/wevia-truth-registry.json');
|
||||
$truth_raw = @file_get_contents('/var/www/html/api/wevia-truth-registry.json');
|
||||
$truth = @json_decode((string)$truth_raw, true) ?: [];
|
||||
$R['truth'] = [
|
||||
'agents_unique' => $truth['agents']['count_unique'] ?? 0,
|
||||
@@ -55,19 +55,28 @@ $R['phases'] = [
|
||||
|
||||
// === 4. Health stack ===
|
||||
$R['health'] = [];
|
||||
foreach ([
|
||||
// PHP endpoints via curl, JSON files via filesystem
|
||||
$php_endpoints = [
|
||||
'cache' => 'http://127.0.0.1/api/opus5-predictive-cache.php?action=stats',
|
||||
'nonreg' => 'http://127.0.0.1/api/nonreg-api.php?cat=all',
|
||||
'l99' => 'http://127.0.0.1/api/l99-state.json',
|
||||
'truth' => 'http://127.0.0.1/api/wevia-truth-registry.json'
|
||||
] as $k => $url) {
|
||||
'plan_registry' => 'http://127.0.0.1/api/opus5-plan-registry.php?action=list&limit=1',
|
||||
'plan_from_text' => 'http://127.0.0.1/api/opus5-plan-from-text-action.php?dry_run=1'
|
||||
];
|
||||
foreach ($php_endpoints as $k => $url) {
|
||||
$ch = curl_init($url);
|
||||
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>3, CURLOPT_NOBODY=>false]);
|
||||
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>5, CURLOPT_FOLLOWLOCATION=>true]);
|
||||
$body = curl_exec($ch);
|
||||
$http = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
$R['health'][$k] = $http === 200 ? 'OK' : "HTTP$http";
|
||||
}
|
||||
$json_files = [
|
||||
'l99' => '/var/www/html/api/l99-state.json',
|
||||
'truth' => '/var/www/html/api/wevia-truth-registry.json'
|
||||
];
|
||||
foreach ($json_files as $k => $path) {
|
||||
$R['health'][$k] = (file_exists($path) && filesize($path) > 100) ? 'OK' : 'MISSING';
|
||||
}
|
||||
|
||||
// === 5. Intents Phase 1/2 mapped ===
|
||||
$R['intents_autonomy'] = [
|
||||
@@ -90,12 +99,12 @@ $R['synthesis'] = [
|
||||
'phases_pct' => round($phases_live / 5 * 100, 1),
|
||||
'intents_wired' => "$intents_wired/4",
|
||||
'intents_pct' => round($intents_wired / 4 * 100, 1),
|
||||
'health_ok' => "$health_ok/4",
|
||||
'health_pct' => round($health_ok / 4 * 100, 1),
|
||||
'health_ok' => "$health_ok/6",
|
||||
'health_pct' => round($health_ok / 6 * 100, 1),
|
||||
'overall_autonomy_pct' => round(
|
||||
($phases_live / 5 * 30) + // 30% poids phases
|
||||
($intents_wired / 4 * 25) + // 25% intents
|
||||
($health_ok / 4 * 20) + // 20% health
|
||||
($health_ok / 6 * 20) + // 20% health
|
||||
($R['truth']['autonomy_score'] / 100 * 25), // 25% truth registry
|
||||
1
|
||||
),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ok": true,
|
||||
"version": "V83-business-kpi",
|
||||
"ts": "2026-04-19T14:38:44+00:00",
|
||||
"ts": "2026-04-19T14:39:46+00:00",
|
||||
"summary": {
|
||||
"total_categories": 7,
|
||||
"total_kpis": 56,
|
||||
|
||||
Reference in New Issue
Block a user