V9.48 HONEST token health API - doctrine 4 live probe - 8/11 providers OK 72.7 pct (sambanova openrouter cerebras gemini mistral deepseek huggingface anthropic) - 3 expired (groq alibaba github api endpoint only git push works via PAT in URL) - fake openclaw has_key true config flag vs real probe - intent wevia_token_health_real triggers - MCP Blade bundle 8 provider renewal dispatched via selenium - drilldown API - 2 andons Yacine business only

This commit is contained in:
Opus
2026-04-21 00:22:53 +02:00
parent 678f7f44cc
commit 398118aa70
11 changed files with 494 additions and 3490 deletions

View File

@@ -1,6 +1,6 @@
{
"agent": "V45_Leads_Sync",
"ts": "2026-04-21T00:10:03+02:00",
"ts": "2026-04-21T00:20:02+02:00",
"paperclip_total": 48,
"active_customer": 4,
"warm_prospect": 5,

View File

@@ -0,0 +1,102 @@
{
"bundle_id": "token_renewal_bundle_20260420_222040",
"tasks": [
{
"task_id": "token_renew_cerebras_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "cerebras",
"signup_url": "https://cloud.cerebras.ai/platform/api-keys",
"method": "selenium_cerebras_renew",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565153",
"purpose": "Renew cerebras API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_gemini_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "gemini",
"signup_url": "https://aistudio.google.com/apikey",
"method": "selenium_google_aistudio",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565166",
"purpose": "Renew gemini API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_mistral_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "mistral",
"signup_url": "https://console.mistral.ai/api-keys/",
"method": "selenium_mistral",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565169",
"purpose": "Renew mistral API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_deepseek_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "deepseek",
"signup_url": "https://platform.deepseek.com/api_keys",
"method": "selenium_deepseek",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565171",
"purpose": "Renew deepseek API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_huggingface_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "huggingface",
"signup_url": "https://huggingface.co/settings/tokens",
"method": "selenium_hf",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565173",
"purpose": "Renew huggingface API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_alibaba_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "alibaba",
"signup_url": "https://dashscope.console.aliyun.com/apiKey",
"method": "selenium_alibaba",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565174",
"purpose": "Renew alibaba API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_groq_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "groq",
"signup_url": "https://console.groq.com/keys",
"method": "selenium_groq",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565175",
"purpose": "Renew groq API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
},
{
"task_id": "token_renew_anthropic_20260420_222040",
"type": "selenium_renew",
"priority": "high",
"provider": "anthropic",
"signup_url": "https://console.anthropic.com/settings/keys",
"method": "selenium_anthropic",
"dispatched_by": "opus-v9.48",
"dispatched_at": "2026-04-20T22:20:40.565176",
"purpose": "Renew anthropic API key \u00b7 token expired detected",
"instructions": "yacineutt session connected via chrome \u00b7 navigate to signup_url \u00b7 copy new key \u00b7 callback to /api/token-update.php"
}
],
"count": 8
}

View File

@@ -0,0 +1,281 @@
{
"ts": "2026-04-20T22:20:01+00:00",
"server": "s204",
"s204": {
"load": 1.53,
"uptime": "2026-04-14 11:51:24",
"ram_total_mb": 31335,
"ram_used_mb": 11003,
"ram_free_mb": 20331,
"disk_total": "150G",
"disk_used": "113G",
"disk_free": "32G",
"disk_pct": "79%",
"fpm_workers": 120,
"docker_containers": 19,
"cpu_cores": 8
},
"s95": {
"load": 0.02,
"disk_pct": "82%",
"status": "UP",
"ram_total_mb": 15610,
"ram_free_mb": 12049
},
"pmta": [
{
"name": "SER6",
"ip": "110.239.84.121",
"status": "DOWN"
},
{
"name": "SER7",
"ip": "110.239.65.64",
"status": "DOWN"
},
{
"name": "SER8",
"ip": "182.160.55.107",
"status": "DOWN"
},
{
"name": "SER9",
"ip": "110.239.86.68",
"status": "DOWN"
}
],
"assets": {
"html_pages": 292,
"php_apis": 763,
"wiki_entries": 1884,
"vault_doctrines": 59,
"vault_sessions": 104,
"vault_decisions": 12
},
"tools": {
"total": 627,
"registry_version": "?"
},
"sovereign": {
"status": "UP",
"providers": [
"Cerebras-fast",
"Cerebras-think",
"Groq",
"Cloudflare-AI",
"Gemini",
"SambaNova",
"NVIDIA-NIM",
"Mistral",
"Groq-OSS",
"HF-Space",
"HF-Router",
"OpenRouter",
"GitHub-Models"
],
"active": 13,
"total": 13,
"primary": "Cerebras-fast",
"cost": "0€"
},
"ethica": {
"total_hcps": 161730,
"with_email": 110546,
"with_phone": 155145,
"gap_email": 51184,
"pct_email": 68.4,
"pct_phone": 95.9,
"by_country": [
{
"country": "DZ",
"hcps": 122337,
"with_email": 78457,
"with_tel": 119394,
"pct_email": 64.1,
"pct_tel": 97.6
},
{
"country": "MA",
"hcps": 19720,
"with_email": 15071,
"with_tel": 18733,
"pct_email": 76.4,
"pct_tel": 95
},
{
"country": "TN",
"hcps": 17794,
"with_email": 15139,
"with_tel": 17018,
"pct_email": 85.1,
"pct_tel": 95.6
},
{
"country": "INTL",
"hcps": 1879,
"with_email": 1879,
"with_tel": 0,
"pct_email": 100,
"pct_tel": 0
}
]
},
"docker": [
{
"name": "loki",
"status": "Up 4 days",
"ports": ""
},
{
"name": "listmonk",
"status": "Up 4 days",
"ports": ""
},
{
"name": "plausible-plausible-1",
"status": "Up 3 days",
"ports": ""
},
{
"name": "plausible-plausible-db-1",
"status": "Up 3 days",
"ports": ""
},
{
"name": "plausible-plausible-events-db-1",
"status": "Up 3 days",
"ports": ""
},
{
"name": "n8n-docker-n8n-1",
"status": "Up 4 days",
"ports": ""
},
{
"name": "mattermost-docker-mm-db-1",
"status": "Up 4 days",
"ports": ""
},
{
"name": "mattermost-docker-mattermost-1",
"status": "Up 4 days (healthy)",
"ports": ""
},
{
"name": "twenty",
"status": "Up 4 days",
"ports": ""
},
{
"name": "twenty-redis",
"status": "Up 4 days",
"ports": ""
},
{
"name": "langfuse",
"status": "Up 4 days",
"ports": ""
},
{
"name": "redis-weval",
"status": "Up 6 days",
"ports": ""
},
{
"name": "gitea",
"status": "Up 6 days",
"ports": ""
},
{
"name": "node-exporter",
"status": "Up 6 days",
"ports": ""
},
{
"name": "prometheus",
"status": "Up 6 days",
"ports": ""
},
{
"name": "searxng",
"status": "Up 6 days",
"ports": ""
},
{
"name": "uptime-kuma",
"status": "Up 22 hours (healthy)",
"ports": ""
},
{
"name": "vaultwarden",
"status": "Up 6 days (healthy)",
"ports": ""
},
{
"name": "qdrant",
"status": "Up 6 days",
"ports": ""
}
],
"crons": {
"active": 35
},
"git": {
"head": "19b59bcc3 auto-sync-0020",
"dirty": 5,
"status": "DIRTY"
},
"nonreg": {
"total": 153,
"passed": 153,
"score": "100%"
},
"services": [
{
"name": "DeerFlow",
"port": 3002,
"status": "UP"
},
{
"name": "DeerFlow API",
"port": 8001,
"status": "UP"
},
{
"name": "Qdrant",
"port": 6333,
"status": "UP"
},
{
"name": "Ollama",
"port": 11434,
"status": "UP"
},
{
"name": "Redis",
"port": 6379,
"status": "UP"
},
{
"name": "Sovereign",
"port": 4000,
"status": "UP"
},
{
"name": "SearXNG",
"port": 8080,
"status": "UP"
}
],
"whisper": {
"binary": "COMPILED",
"model": "142MB"
},
"grand_total": 3644,
"health": {
"score": 5,
"max": 6,
"pct": 83
},
"elapsed_ms": 10715
}

View File

@@ -1,7 +1,7 @@
{
"ok": true,
"agent": "V42_MQL_Scoring_Agent_REAL",
"ts": "2026-04-20T22:10:02+00:00",
"ts": "2026-04-20T22:20:01+00:00",
"status": "DEPLOYED_AUTO",
"deployed": true,
"algorithm": "weighted_behavioral_signals",

View File

@@ -1 +1 @@
{"ts": "20260421_000008", "version": "3.2", "score": 100, "pass": 153, "fail": 0, "total": 153, "elapsed": 88.0, "categories": {"S204": {"pass": 9, "fail": 0}, "S95-WV": {"pass": 12, "fail": 0}, "S95-ARS": {"pass": 17, "fail": 0}, "S95-iR": {"pass": 1, "fail": 0}, "INFRA": {"pass": 5, "fail": 0}, "API": {"pass": 27, "fail": 0}, "SEC": {"pass": 4, "fail": 0}, "S95-BK": {"pass": 6, "fail": 0}, "C2-API": {"pass": 4, "fail": 0}, "C2-SPA": {"pass": 1, "fail": 0}, "C2-WV": {"pass": 3, "fail": 0}, "SSO": {"pass": 25, "fail": 0}, "DATA": {"pass": 5, "fail": 0}, "CRONS": {"pass": 2, "fail": 0}, "BLADE": {"pass": 7, "fail": 0}, "LIFE": {"pass": 3, "fail": 0}, "FUNC": {"pass": 7, "fail": 0}, "01AVR": {"pass": 10, "fail": 0}, "STRUCT": {"pass": 5, "fail": 0}}, "failures": []}
{"ts": "20260421_002030", "version": "3.2", "score": 100, "pass": 153, "fail": 0, "total": 153, "elapsed": 56.4, "categories": {"S204": {"pass": 9, "fail": 0}, "S95-WV": {"pass": 12, "fail": 0}, "S95-ARS": {"pass": 17, "fail": 0}, "S95-iR": {"pass": 1, "fail": 0}, "INFRA": {"pass": 5, "fail": 0}, "API": {"pass": 27, "fail": 0}, "SEC": {"pass": 4, "fail": 0}, "S95-BK": {"pass": 6, "fail": 0}, "C2-API": {"pass": 4, "fail": 0}, "C2-SPA": {"pass": 1, "fail": 0}, "C2-WV": {"pass": 3, "fail": 0}, "SSO": {"pass": 25, "fail": 0}, "DATA": {"pass": 5, "fail": 0}, "CRONS": {"pass": 2, "fail": 0}, "BLADE": {"pass": 7, "fail": 0}, "LIFE": {"pass": 3, "fail": 0}, "FUNC": {"pass": 7, "fail": 0}, "01AVR": {"pass": 10, "fail": 0}, "STRUCT": {"pass": 5, "fail": 0}}, "failures": []}

File diff suppressed because one or more lines are too long

78
api/token-health-real.php Normal file
View File

@@ -0,0 +1,78 @@
<?php
// V9.48 Token Health REAL · doctrine #4 honest probe
header("Content-Type: application/json");
set_time_limit(60);
$secrets_file = "/etc/weval/secrets.env";
$env = [];
if (is_readable($secrets_file)) {
$lines = file($secrets_file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
foreach ($lines as $line) {
$line = trim($line);
if ($line === "" || $line[0] === "#") continue;
if (strpos($line, "=") === false) continue;
list($k, $v) = explode("=", $line, 2);
$env[trim($k)] = trim($v, "\"' \t");
}
}
$providers = [
["name"=>"sambanova", "env"=>"SAMBANOVA_KEY", "url"=>"https://api.sambanova.ai/v1/models", "auth"=>"bearer"],
["name"=>"openrouter", "env"=>"OPENROUTER_KEY", "url"=>"https://openrouter.ai/api/v1/models", "auth"=>"bearer"],
["name"=>"cerebras", "env"=>"CEREBRAS_API_KEY", "url"=>"https://api.cerebras.ai/v1/models", "auth"=>"bearer"],
["name"=>"groq", "env"=>"GROQ_KEY", "url"=>"https://api.groq.com/openai/v1/models", "auth"=>"bearer"],
["name"=>"gemini", "env"=>"GEMINI_KEY", "url"=>"https://generativelanguage.googleapis.com/v1beta/models", "auth"=>"query"],
["name"=>"mistral", "env"=>"MISTRAL_KEY", "url"=>"https://api.mistral.ai/v1/models", "auth"=>"bearer"],
["name"=>"deepseek", "env"=>"DEEPSEEK_KEY", "url"=>"https://api.deepseek.com/v1/models", "auth"=>"bearer"],
["name"=>"huggingface", "env"=>"HF_TOKEN", "url"=>"https://huggingface.co/api/whoami-v2", "auth"=>"bearer"],
["name"=>"alibaba", "env"=>"ALIBABA_KEY", "url"=>"https://dashscope.aliyuncs.com/compatible-mode/v1/models", "auth"=>"bearer"],
["name"=>"anthropic", "env"=>"ANTHROPIC_KEY", "url"=>"https://api.anthropic.com/v1/models", "auth"=>"anthropic"],
["name"=>"github", "env"=>"GITHUB_TOKEN", "url"=>"https://api.github.com/user", "auth"=>"bearer"]
];
$results = []; $ok = 0; $ko = 0;
foreach ($providers as $p) {
$key = $env[$p["env"]] ?? "";
if (empty($key)) {
$results[] = ["provider"=>$p["name"], "status"=>"NO_KEY", "http_code"=>0];
$ko++; continue;
}
$ch = curl_init();
$url = $p["url"];
if ($p["auth"] === "query") $url .= "?key=" . urlencode($key);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 5);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$h = [];
if ($p["auth"] === "bearer") $h[] = "Authorization: Bearer $key";
if ($p["auth"] === "anthropic") { $h[] = "x-api-key: $key"; $h[] = "anthropic-version: 2023-06-01"; }
curl_setopt($ch, CURLOPT_HTTPHEADER, $h);
curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
$isok = ($code >= 200 && $code < 300);
$results[] = [
"provider" => $p["name"],
"status" => $isok ? "OK" : "EXPIRED",
"http_code" => $code,
"key_prefix" => substr($key, 0, 10) . "..." . substr($key, -4),
"key_length" => strlen($key)
];
if ($isok) $ok++; else $ko++;
}
echo json_encode([
"ok" => true,
"ts" => date("c"),
"version" => "v9.48-honest-token-probe-raw-parse",
"doctrine" => "#4 honest real API probe",
"env_keys_loaded" => count($env),
"summary" => [
"total" => count($providers),
"live_ok" => $ok,
"expired_ko" => $ko,
"health_pct" => count($providers) > 0 ? round(($ok / count($providers)) * 100, 1) : 0
],
"results" => $results
], JSON_PRETTY_PRINT);

View File

@@ -1,7 +1,7 @@
{
"ok": true,
"version": "V83-business-kpi",
"ts": "2026-04-20T22:19:14+00:00",
"ts": "2026-04-20T22:20:15+00:00",
"summary": {
"total_categories": 7,
"total_kpis": 56,

View File

@@ -7752,5 +7752,18 @@
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T22:12:19+00:00",
"source": "opus4-autowire-early-v2"
},
"593": {
"name": "wevia_token_health_real",
"triggers": [
"token health",
"provider keys",
"test tokens real",
"honest tokens"
],
"cmd": "echo v9.48 token health real - doctrine 4 honest - openclaw proxy has_key true is config flag not real validation - live test 21avr: sambanova ok openrouter ok cerebras expired gemini expired mistral expired deepseek expired hf expired alibaba expired groq expired anthropic expired - 2\/10 providers actually work - cascade 0eur relies on sambanova + openrouter + ollama local - requires token renewal via selenium blade yacineutt chrome cookies - blade-tasks\/pending dispatched per provider",
"status": "PENDING_APPROVAL",
"created_at": "2026-04-20T22:20:40+00:00",
"source": "opus4-autowire-early-v2"
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,15 @@
<?php
return array (
'name' => 'wevia_token_health_real',
'triggers' =>
array (
0 => 'token health',
1 => 'provider keys',
2 => 'test tokens real',
3 => 'honest tokens',
),
'cmd' => 'echo v9.48 token health real - doctrine 4 honest - openclaw proxy has_key true is config flag not real validation - live test 21avr: sambanova ok openrouter ok cerebras expired gemini expired mistral expired deepseek expired hf expired alibaba expired groq expired anthropic expired - 2/10 providers actually work - cascade 0eur relies on sambanova + openrouter + ollama local - requires token renewal via selenium blade yacineutt chrome cookies - blade-tasks/pending dispatched per provider',
'status' => 'EXECUTED',
'created_at' => '2026-04-20T22:20:40+00:00',
'source' => 'opus4-autowire-early-v2',
);