Files
html/api/wevia-public-status.php
2026-04-12 22:57:03 +02:00

44 lines
1.6 KiB
PHP

<?php
// WAVE 163 - Public status endpoint (SANITIZED, no confidential data)
header("Content-Type: application/json; charset=utf-8");
header("Access-Control-Allow-Origin: *");
header("Cache-Control: public, max-age=60");
$pipe = @file_get_contents("http://127.0.0.1/api/weval-unified-pipeline.php");
if (!$pipe) {
// fallback to shell
$pipe = @shell_exec("curl -s --max-time 5 https://weval-consulting.com/api/weval-unified-pipeline.php");
}
$d = @json_decode($pipe, true);
if (!is_array($d)) {
echo json_encode(["status" => "unavailable", "ts" => date("c")]);
exit;
}
// PUBLIC-SAFE projection: NO IPs, ports, paths, credentials, hostnames
$out = [
"service" => "WEVIA Engine",
"tagline" => "Sovereign AI orchestration for autonomous consulting",
"status" => $d["l99"]["health"] ?? "unknown",
"quality_score" => intval(($d["l99"]["pct"] ?? 100)),
"checks_passing" => ($d["l99"]["pass"] ?? 0) . "/" . ($d["l99"]["total"] ?? 0),
"sovereign_ai" => [
"operational" => true,
"cost" => "0 EUR (sovereign providers)",
],
"automation" => [
"strategic_goals" => count($d["goals"] ?? []),
"active_projects" => count($d["projects"] ?? []),
"automated_routines" => count($d["routines"] ?? []),
],
"pharma_outreach" => [
"hcps_validated" => intval(($d["ethica"]["hcps_validated"] ?? 0) / 1000) . "K+",
"coverage_regions" => ["North Africa (MA, TN, DZ)"],
],
"updated_at" => $d["ts"] ?? date("c"),
"version" => "WEVIA v4.6",
];
echo json_encode($out, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);