42 lines
1.7 KiB
PHP
42 lines
1.7 KiB
PHP
<?php
|
|
header("Content-Type: application/json");
|
|
$out = [];
|
|
chdir("/var/www/html");
|
|
$out["recent_tags"] = array_filter(array_map("trim", explode("\n", @shell_exec("git tag -l 'wave-*' --sort=-creatordate 2>&1 | head -10"))));
|
|
$out["recent_commits"] = array_filter(array_map("trim", explode("\n", @shell_exec("git log --since='30 minutes ago' --oneline 2>&1 | head -10"))));
|
|
|
|
// Multi-agent infrastructure
|
|
$out["multiagent_files"] = [];
|
|
foreach (["ambre-master-multiagent.php", "wevia-autonomous.php", "weval-master-api.php", "wevia-multiagent.php", "multiagent-orchestrator.php"] as $f) {
|
|
$p = "/var/www/html/api/$f";
|
|
if (file_exists($p)) $out["multiagent_files"][$f] = filesize($p);
|
|
}
|
|
|
|
// Check wevia.html V9 state
|
|
$w = @file_get_contents("/var/www/html/wevia.html");
|
|
$out["wevia"] = [
|
|
"size" => strlen($w),
|
|
"v9_wave247_ok_check" => strpos($w, "data.ok || data.success") !== false,
|
|
"v9_pattern_widened" => strpos($w, "veux|besoin|demande|fais|cree") !== false,
|
|
"v5_memory" => strpos($w, "AMBRE-V5-MEMORY") !== false,
|
|
"v10_mermaid" => strpos($w, "AMBRE-V10-MERMAID") !== false,
|
|
"mode_select" => strpos($w, "mode.*auto") !== false,
|
|
];
|
|
|
|
// Cascade + semaphore
|
|
$out["cascade_up"] = @file_get_contents("http://127.0.0.1:4000/health", false, stream_context_create(["http"=>["timeout"=>3]])) ? "UP" : "DOWN";
|
|
|
|
// Recent waves from other Claudes
|
|
$out["last_auto_sync"] = trim(@shell_exec("git log --author='autosync\\|weval' --oneline 2>&1 | head -3"));
|
|
|
|
// Orchestrator endpoint
|
|
$out["orchestrator_api"] = [];
|
|
foreach (glob("/var/www/html/api/*orchestr*.php") as $f) {
|
|
$out["orchestrator_api"][] = basename($f);
|
|
}
|
|
|
|
// Current load
|
|
$out["load"] = trim(@shell_exec("uptime"));
|
|
|
|
echo json_encode($out, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|