Compare commits
17 Commits
wave-252-p
...
wave-255-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ec53dd4e1 | ||
|
|
77dd5ac9f4 | ||
|
|
9b92772dc6 | ||
|
|
9764dd6f25 | ||
|
|
664179598e | ||
|
|
652a8013ea | ||
|
|
4bf5987304 | ||
|
|
6a1f27480d | ||
|
|
0ad403a836 | ||
|
|
61429584fa | ||
|
|
1d65fb4959 | ||
|
|
bdf176474d | ||
|
|
551dc38818 | ||
|
|
75c65073a8 | ||
|
|
884e3e9d2e | ||
|
|
b946f08333 | ||
|
|
725b7e0137 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"agent": "V41_Disk_Monitor",
|
||||
"ts": "2026-04-22T04:00:02+02:00",
|
||||
"ts": "2026-04-22T04:30:02+02:00",
|
||||
"disk_pct": 85,
|
||||
"disk_free_gb": 22,
|
||||
"growth_per_day_gb": 1.5,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"agent": "V41_Risk_Escalation",
|
||||
"ts": "2026-04-22T04:00:04+02:00",
|
||||
"dg_alerts_active": 7,
|
||||
"ts": "2026-04-22T04:30:06+02:00",
|
||||
"dg_alerts_active": 0,
|
||||
"wevia_life_stats_preview": "{
|
||||
"ok": true,
|
||||
"agent": "wevialife",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"agent": "V45_Leads_Sync",
|
||||
"ts": "2026-04-22T04:10:02+02:00",
|
||||
"ts": "2026-04-22T04:30:04+02:00",
|
||||
"paperclip_total": 48,
|
||||
"active_customer": 4,
|
||||
"warm_prospect": 5,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"agent": "V54_Risk_Monitor_Live",
|
||||
"ts": "2026-04-22T04:00:04+02:00",
|
||||
"ts": "2026-04-22T04:30:03+02:00",
|
||||
"critical_risks": {
|
||||
"RW01_pipeline_vide": {
|
||||
"pipeline_keur": 0,
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"RW12_burnout": {
|
||||
"agents_cron_active": 15,
|
||||
"load_5min": "11.73",
|
||||
"load_5min": "7.72",
|
||||
"automation_coverage_pct": 70,
|
||||
"residual_risk_pct": 60,
|
||||
"trend": "V52_goldratt_options_active"
|
||||
|
||||
19
api/ambre-autonomous-scan.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$f = "/var/www/html/api/wevia-autonomous.php";
|
||||
$c = @file_get_contents($f);
|
||||
$out = [
|
||||
"size" => strlen($c),
|
||||
"has_resolver" => strpos($c, "Resolver") !== false,
|
||||
"has_multiagent" => strpos($c, "multiagent") !== false || strpos($c, "multi-agent") !== false,
|
||||
"has_parallel" => strpos($c, "parallel") !== false || strpos($c, "curl_multi") !== false,
|
||||
"has_plan_exec" => strpos($c, "plan") !== false && strpos($c, "execute") !== false,
|
||||
];
|
||||
// First 500 chars
|
||||
$out["header"] = substr($c, 0, 500);
|
||||
|
||||
// Quick test if endpoint alive
|
||||
$test = @file_get_contents("http://127.0.0.1/api/wevia-autonomous.php?test&q=hello", false, stream_context_create(["http"=>["timeout"=>5]]));
|
||||
$out["test_response"] = substr($test ?? "FAIL", 0, 300);
|
||||
|
||||
echo json_encode($out, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES);
|
||||
28
api/ambre-export-v44.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$src = "/var/www/html/api/ambre-pw-tests/output";
|
||||
$dst = "/var/www/html/generated";
|
||||
$out = ["copied"=>[]];
|
||||
|
||||
// Latest V44 artifacts
|
||||
foreach (glob("$src/v44-*.png") as $s) {
|
||||
$bn = basename($s);
|
||||
@copy($s, "$dst/$bn");
|
||||
$out["copied"][] = "/generated/$bn";
|
||||
}
|
||||
|
||||
// Video
|
||||
$video_dir = glob("$src/v44-*chromium")[0] ?? null;
|
||||
if ($video_dir) {
|
||||
$vids = glob("$video_dir/video.webm");
|
||||
if ($vids) {
|
||||
$dv = "$dst/wevia-v44-proof-pdf-" . date("Ymd-His") . ".webm";
|
||||
@copy($vids[0], $dv);
|
||||
@chmod($dv, 0644);
|
||||
$out["video"] = [
|
||||
"url" => "/generated/" . basename($dv),
|
||||
"size_mb" => round(filesize($dv)/1024/1024, 2),
|
||||
];
|
||||
}
|
||||
}
|
||||
echo json_encode($out, JSON_UNESCAPED_SLASHES);
|
||||
190
api/ambre-multiagent-parallel.php
Normal file
@@ -0,0 +1,190 @@
|
||||
<?php
|
||||
/**
|
||||
* ambre-multiagent-parallel.php · wave-255 · Multi-agent parallel dispatch
|
||||
* Langue naturelle → Plan → Execute N agents in parallel → Reconcile
|
||||
*
|
||||
* POST JSON: { "goal": "texte objectif", "max_agents": 5 }
|
||||
* Response: { "ok":true, "plan":[...], "results":[...], "elapsed_ms":N, "reconciled":"..." }
|
||||
*/
|
||||
header("Content-Type: application/json; charset=utf-8");
|
||||
set_time_limit(120);
|
||||
|
||||
$raw = file_get_contents("php://input");
|
||||
$in = json_decode($raw, true) ?: $_POST;
|
||||
$goal = trim($in["goal"] ?? $in["message"] ?? "");
|
||||
$max_agents = min(10, max(1, intval($in["max_agents"] ?? 5)));
|
||||
|
||||
if (!$goal) {
|
||||
echo json_encode(["error"=>"goal required"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$t0 = microtime(true);
|
||||
|
||||
// Step 1 · PLAN via LLM (one call, JSON structured)
|
||||
$plan_sys = "Tu es un planificateur multi-agent. Pour l'objectif donné, génère STRICTEMENT un JSON avec cette structure :\n" .
|
||||
"{\n" .
|
||||
" \"objective\": \"<reformulation en une phrase>\",\n" .
|
||||
" \"agents\": [\n" .
|
||||
" {\"role\":\"researcher\", \"task\":\"<tâche précise>\", \"tool\":\"<pdf_premium|mermaid|web_search|calc|image|code|translate|kb_search|none>\"},\n" .
|
||||
" ...\n" .
|
||||
" ]\n" .
|
||||
"}\n" .
|
||||
"Maximum $max_agents agents. Chaque agent a un role distinct et une tâche autonome. NE réponds QUE le JSON.";
|
||||
|
||||
$plan_raw = @file_get_contents("http://127.0.0.1:4000/v1/chat/completions", false, stream_context_create([
|
||||
"http" => [
|
||||
"method" => "POST",
|
||||
"header" => "Content-Type: application/json\r\n",
|
||||
"content" => json_encode([
|
||||
"model" => "fast",
|
||||
"messages" => [
|
||||
["role"=>"system","content"=>$plan_sys],
|
||||
["role"=>"user","content"=>"Objectif: " . $goal]
|
||||
],
|
||||
"max_tokens" => 800,
|
||||
"temperature" => 0.3,
|
||||
]),
|
||||
"timeout" => 20,
|
||||
],
|
||||
]));
|
||||
|
||||
$plan_data = @json_decode($plan_raw, true);
|
||||
$plan_text = $plan_data["choices"][0]["message"]["content"] ?? "";
|
||||
$plan_text = preg_replace('/^```(?:json)?\s*/m', '', $plan_text);
|
||||
$plan_text = preg_replace('/\s*```\s*$/m', '', trim($plan_text));
|
||||
$plan = @json_decode($plan_text, true);
|
||||
|
||||
if (!$plan || !isset($plan["agents"]) || !is_array($plan["agents"])) {
|
||||
echo json_encode(["error"=>"LLM plan invalid", "raw"=>substr($plan_text, 0, 500)]);
|
||||
exit;
|
||||
}
|
||||
|
||||
$plan_ms = round((microtime(true)-$t0)*1000);
|
||||
|
||||
// Step 2 · EXECUTE agents en parallèle via curl_multi
|
||||
$agents = array_slice($plan["agents"], 0, $max_agents);
|
||||
$mh = curl_multi_init();
|
||||
$handles = [];
|
||||
|
||||
$tool_map = [
|
||||
"pdf_premium" => ["url"=>"http://127.0.0.1/api/ambre-tool-pdf-premium.php", "body_key"=>"topic"],
|
||||
"mermaid" => ["url"=>"http://127.0.0.1/api/ambre-tool-mermaid.php", "body_key"=>"topic"],
|
||||
"web_search" => ["url"=>"http://127.0.0.1/api/ambre-tool-web-search.php", "body_key"=>"query"],
|
||||
"calc" => ["url"=>"http://127.0.0.1/api/ambre-tool-calc.php", "body_key"=>"expression"],
|
||||
"kb_search" => ["url"=>"http://127.0.0.1/api/ambre-mermaid-learn.php", "body_key"=>"query"],
|
||||
];
|
||||
|
||||
$exec_t0 = microtime(true);
|
||||
foreach ($agents as $i => $agent) {
|
||||
$tool = $agent["tool"] ?? "none";
|
||||
$task = $agent["task"] ?? "";
|
||||
if ($tool === "none" || !isset($tool_map[$tool])) {
|
||||
// No tool → LLM direct reasoning
|
||||
$ch = curl_init("http://127.0.0.1:4000/v1/chat/completions");
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
|
||||
CURLOPT_POSTFIELDS => json_encode([
|
||||
"model"=>"fast",
|
||||
"messages"=>[["role"=>"user","content"=>$task]],
|
||||
"max_tokens"=>400,
|
||||
]),
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
CURLOPT_CONNECTTIMEOUT => 3,
|
||||
]);
|
||||
} else {
|
||||
$cfg = $tool_map[$tool];
|
||||
$body = [$cfg["body_key"] => $task];
|
||||
if ($tool === "kb_search") $body["action"] = "search";
|
||||
$ch = curl_init($cfg["url"]);
|
||||
curl_setopt_array($ch, [
|
||||
CURLOPT_POST => true,
|
||||
CURLOPT_HTTPHEADER => ["Content-Type: application/json"],
|
||||
CURLOPT_POSTFIELDS => json_encode($body),
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_TIMEOUT => 45,
|
||||
CURLOPT_CONNECTTIMEOUT => 3,
|
||||
]);
|
||||
}
|
||||
curl_multi_add_handle($mh, $ch);
|
||||
$handles[$i] = ["ch"=>$ch, "agent"=>$agent, "t0"=>microtime(true)];
|
||||
}
|
||||
|
||||
// Run all in parallel
|
||||
$running = null;
|
||||
do {
|
||||
curl_multi_exec($mh, $running);
|
||||
curl_multi_select($mh, 0.5);
|
||||
} while ($running > 0);
|
||||
|
||||
// Collect results
|
||||
$results = [];
|
||||
foreach ($handles as $i => $h) {
|
||||
$output = curl_multi_getcontent($h["ch"]);
|
||||
$elapsed_ms = round((microtime(true)-$h["t0"])*1000);
|
||||
$http_code = curl_getinfo($h["ch"], CURLINFO_HTTP_CODE);
|
||||
curl_multi_remove_handle($mh, $h["ch"]);
|
||||
curl_close($h["ch"]);
|
||||
|
||||
// Try to extract meaningful summary
|
||||
$result_data = @json_decode($output, true);
|
||||
$summary = "";
|
||||
if ($result_data) {
|
||||
if (isset($result_data["mermaid_code"])) $summary = "Mermaid généré (" . strlen($result_data["mermaid_code"]) . "B)";
|
||||
elseif (isset($result_data["url"])) $summary = "PDF: " . $result_data["url"];
|
||||
elseif (isset($result_data["choices"][0]["message"]["content"])) $summary = substr($result_data["choices"][0]["message"]["content"], 0, 300);
|
||||
elseif (isset($result_data["result"])) $summary = (string)$result_data["result"];
|
||||
else $summary = substr($output, 0, 200);
|
||||
} else {
|
||||
$summary = substr($output ?: "empty", 0, 200);
|
||||
}
|
||||
|
||||
$results[] = [
|
||||
"agent" => $h["agent"]["role"] ?? "agent_$i",
|
||||
"task" => $h["agent"]["task"] ?? "",
|
||||
"tool" => $h["agent"]["tool"] ?? "none",
|
||||
"http" => $http_code,
|
||||
"elapsed_ms" => $elapsed_ms,
|
||||
"summary" => $summary,
|
||||
];
|
||||
}
|
||||
curl_multi_close($mh);
|
||||
$exec_ms = round((microtime(true)-$exec_t0)*1000);
|
||||
|
||||
// Step 3 · RECONCILE (synthesis LLM call)
|
||||
$synth_input = "Objectif: " . $goal . "\n\nRésultats des " . count($results) . " agents:\n";
|
||||
foreach ($results as $r) {
|
||||
$synth_input .= "- " . $r["agent"] . " (" . $r["tool"] . "): " . substr($r["summary"], 0, 300) . "\n";
|
||||
}
|
||||
$synth_input .= "\nSynthétise la réponse finale en français clair et actionnable. Max 200 mots.";
|
||||
|
||||
$synth_raw = @file_get_contents("http://127.0.0.1:4000/v1/chat/completions", false, stream_context_create([
|
||||
"http" => [
|
||||
"method" => "POST",
|
||||
"header" => "Content-Type: application/json\r\n",
|
||||
"content" => json_encode([
|
||||
"model" => "fast",
|
||||
"messages" => [["role"=>"user","content"=>$synth_input]],
|
||||
"max_tokens" => 500,
|
||||
]),
|
||||
"timeout" => 15,
|
||||
],
|
||||
]));
|
||||
$synth_data = @json_decode($synth_raw, true);
|
||||
$reconciled = $synth_data["choices"][0]["message"]["content"] ?? "Synthèse échouée";
|
||||
|
||||
echo json_encode([
|
||||
"ok" => true,
|
||||
"goal" => $goal,
|
||||
"plan" => $plan,
|
||||
"plan_ms" => $plan_ms,
|
||||
"results" => $results,
|
||||
"exec_ms" => $exec_ms,
|
||||
"parallel_speedup" => round(array_sum(array_column($results, "elapsed_ms")) / max($exec_ms, 1), 2),
|
||||
"reconciled" => trim($reconciled),
|
||||
"total_ms" => round((microtime(true)-$t0)*1000),
|
||||
"agents_count" => count($results),
|
||||
"provider" => "WEVIA MultiAgent Parallel Engine · wave-255",
|
||||
], JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"status": "passed",
|
||||
"failedTests": []
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
{
|
||||
"config": {
|
||||
"configFile": "/var/www/html/api/ambre-pw-tests/playwright.config.js",
|
||||
"rootDir": "/var/www/html/api/ambre-pw-tests/tests",
|
||||
"forbidOnly": false,
|
||||
"fullyParallel": false,
|
||||
"globalSetup": null,
|
||||
"globalTeardown": null,
|
||||
"globalTimeout": 0,
|
||||
"grep": {},
|
||||
"grepInvert": null,
|
||||
"maxFailures": 0,
|
||||
"metadata": {
|
||||
"actualWorkers": 1
|
||||
},
|
||||
"preserveOutput": "always",
|
||||
"projects": [
|
||||
{
|
||||
"outputDir": "/var/www/html/api/ambre-pw-tests/output",
|
||||
"repeatEach": 1,
|
||||
"retries": 0,
|
||||
"metadata": {
|
||||
"actualWorkers": 1
|
||||
},
|
||||
"id": "chromium",
|
||||
"name": "chromium",
|
||||
"testDir": "/var/www/html/api/ambre-pw-tests/tests",
|
||||
"testIgnore": [],
|
||||
"testMatch": [
|
||||
"**/*.@(spec|test).?(c|m)[jt]s?(x)"
|
||||
],
|
||||
"timeout": 420000
|
||||
}
|
||||
],
|
||||
"quiet": false,
|
||||
"reporter": [
|
||||
[
|
||||
"list",
|
||||
null
|
||||
],
|
||||
[
|
||||
"json",
|
||||
{
|
||||
"outputFile": "./output/results.json"
|
||||
}
|
||||
]
|
||||
],
|
||||
"reportSlowTests": {
|
||||
"max": 5,
|
||||
"threshold": 300000
|
||||
},
|
||||
"shard": null,
|
||||
"tags": [],
|
||||
"updateSnapshots": "missing",
|
||||
"updateSourceMethod": "patch",
|
||||
"version": "1.59.1",
|
||||
"workers": 1,
|
||||
"webServer": null
|
||||
},
|
||||
"suites": [
|
||||
{
|
||||
"title": "v42-hub-showcase.spec.js",
|
||||
"file": "v42-hub-showcase.spec.js",
|
||||
"column": 0,
|
||||
"line": 0,
|
||||
"specs": [
|
||||
{
|
||||
"title": "V42 · FINAL Hub Dashboards Showcase Ultra",
|
||||
"ok": true,
|
||||
"tags": [],
|
||||
"tests": [
|
||||
{
|
||||
"timeout": 60000,
|
||||
"annotations": [],
|
||||
"expectedStatus": "passed",
|
||||
"projectId": "chromium",
|
||||
"projectName": "chromium",
|
||||
"results": [
|
||||
{
|
||||
"workerIndex": 0,
|
||||
"parallelIndex": 0,
|
||||
"status": "passed",
|
||||
"duration": 5522,
|
||||
"errors": [],
|
||||
"stdout": [
|
||||
{
|
||||
"text": "✅ T1: Hub home loaded\n"
|
||||
},
|
||||
{
|
||||
"text": " Stats: {\"stats\":[\"24\",\"13\",\"6σ\",\"0\"],\"cards\":24,\"filters\":14}\n"
|
||||
},
|
||||
{
|
||||
"text": "✅ T2: KPI filter applied\n"
|
||||
},
|
||||
{
|
||||
"text": "✅ T3: Ethica filter applied\n"
|
||||
},
|
||||
{
|
||||
"text": "✅ T4: Full page captured\n"
|
||||
},
|
||||
{
|
||||
"text": " Registry: total=26 · cats=13 · zero_orphan=true\n"
|
||||
}
|
||||
],
|
||||
"stderr": [],
|
||||
"retry": 0,
|
||||
"startTime": "2026-04-22T02:10:52.795Z",
|
||||
"annotations": [],
|
||||
"attachments": [
|
||||
{
|
||||
"name": "screenshot",
|
||||
"contentType": "image/png",
|
||||
"path": "/var/www/html/api/ambre-pw-tests/output/v42-hub-showcase-V42-·-FINAL-Hub-Dashboards-Showcase-Ultra-chromium/test-finished-1.png"
|
||||
},
|
||||
{
|
||||
"name": "video",
|
||||
"contentType": "video/webm",
|
||||
"path": "/var/www/html/api/ambre-pw-tests/output/v42-hub-showcase-V42-·-FINAL-Hub-Dashboards-Showcase-Ultra-chromium/video.webm"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"status": "expected"
|
||||
}
|
||||
],
|
||||
"id": "2db5d1d836c79e9d00b9-be622866ffeceefd1ca0",
|
||||
"file": "v42-hub-showcase.spec.js",
|
||||
"line": 3,
|
||||
"column": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"errors": [],
|
||||
"stats": {
|
||||
"startTime": "2026-04-22T02:10:52.202Z",
|
||||
"duration": 6293.483,
|
||||
"expected": 1,
|
||||
"skipped": 0,
|
||||
"unexpected": 0,
|
||||
"flaky": 0
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 271 KiB |
|
Before Width: | Height: | Size: 319 KiB |
|
Before Width: | Height: | Size: 320 KiB |
|
Before Width: | Height: | Size: 271 KiB |
|
Before Width: | Height: | Size: 806 KiB |
|
Before Width: | Height: | Size: 272 KiB |
BIN
api/ambre-pw-tests/output/v45-00-start.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
api/ambre-pw-tests/output/v45-01-hi.png
Normal file
|
After Width: | Height: | Size: 95 KiB |
@@ -1,55 +0,0 @@
|
||||
const { test } = require("@playwright/test");
|
||||
|
||||
test("V42 · FINAL Hub Dashboards Showcase Ultra", async ({ page }) => {
|
||||
test.setTimeout(60000);
|
||||
|
||||
// 1. Hub home
|
||||
await page.goto("/dashboards-hub-unified.html?cb=" + Date.now());
|
||||
await page.waitForLoadState("networkidle");
|
||||
await page.waitForTimeout(1500);
|
||||
await page.screenshot({ path: "output/v42-01-home.png" });
|
||||
console.log("✅ T1: Hub home loaded");
|
||||
|
||||
// Stats
|
||||
const stats = await page.evaluate(() => {
|
||||
const bs = Array.from(document.querySelectorAll('.stat b')).map(b => b.innerText);
|
||||
const cards = document.querySelectorAll('.card').length;
|
||||
const filters = document.querySelectorAll('.filter').length;
|
||||
return { stats: bs, cards, filters };
|
||||
});
|
||||
console.log(` Stats: ${JSON.stringify(stats)}`);
|
||||
|
||||
// 2. Filter by KPI & Analytics
|
||||
const filterKPI = page.locator('.filter:has-text("KPI & Analytics")');
|
||||
if (await filterKPI.count() > 0) {
|
||||
await filterKPI.click();
|
||||
await page.waitForTimeout(500);
|
||||
await page.screenshot({ path: "output/v42-02-filter-kpi.png" });
|
||||
console.log("✅ T2: KPI filter applied");
|
||||
}
|
||||
|
||||
// 3. Filter by Ethica
|
||||
const filterEth = page.locator('.filter:has-text("Ethica")');
|
||||
if (await filterEth.count() > 0) {
|
||||
await filterEth.click();
|
||||
await page.waitForTimeout(500);
|
||||
await page.screenshot({ path: "output/v42-03-filter-ethica.png" });
|
||||
console.log("✅ T3: Ethica filter applied");
|
||||
}
|
||||
|
||||
// 4. Back to all
|
||||
await page.locator('.filter:has-text("Tous")').click();
|
||||
await page.waitForTimeout(500);
|
||||
await page.screenshot({ path: "output/v42-04-all-back.png" });
|
||||
|
||||
// 5. Full page
|
||||
await page.screenshot({ path: "output/v42-05-fullpage.png", fullPage: true });
|
||||
console.log("✅ T4: Full page captured");
|
||||
|
||||
// 6. Registry API
|
||||
const reg = await page.evaluate(async () => {
|
||||
const r = await fetch('/api/dashboards-registry-ambre.php');
|
||||
return await r.json();
|
||||
});
|
||||
console.log(` Registry: total=${reg.total} · cats=${reg.categories_count} · zero_orphan=${reg.zero_orphan}`);
|
||||
});
|
||||
74
api/ambre-pw-tests/tests/v45-multiagent.spec.js
Normal file
@@ -0,0 +1,74 @@
|
||||
const { test } = require("@playwright/test");
|
||||
|
||||
test("V45 · PROOF · Multi-Agent Parallel PDF WEVIA OPUS", async ({ page }) => {
|
||||
test.setTimeout(240000);
|
||||
|
||||
await page.goto("/wevia.html?cb=" + Date.now());
|
||||
await page.evaluate(() => { try{sessionStorage.clear();}catch(e){} });
|
||||
await page.waitForLoadState("networkidle");
|
||||
await page.waitForTimeout(3500);
|
||||
await page.screenshot({ path: "output/v45-00-start.png" });
|
||||
|
||||
// Turn 1: bonjour (warm up)
|
||||
const input = page.locator("#msgInput");
|
||||
await input.click({force:true});
|
||||
await input.fill("bonjour");
|
||||
await input.press("Enter");
|
||||
|
||||
const ws1 = Date.now();
|
||||
while (Date.now() - ws1 < 60000) {
|
||||
const b = await page.evaluate(() => window.busy || document.getElementById("sendBtn")?.disabled);
|
||||
if (!b) break;
|
||||
await page.waitForTimeout(1000);
|
||||
}
|
||||
console.log(`T1 bonjour done in ${((Date.now()-ws1)/1000).toFixed(1)}s`);
|
||||
await page.screenshot({ path: "output/v45-01-hi.png" });
|
||||
|
||||
// Turn 2: MULTI-AGENT request
|
||||
await input.click({force:true});
|
||||
await page.keyboard.press("Control+A");
|
||||
await page.keyboard.press("Delete");
|
||||
const msg = "compare WEVIA avec OPUS sur architecture, couts, performances et securite en analyse complete multi-angle";
|
||||
await input.fill(msg);
|
||||
await page.waitForTimeout(400);
|
||||
|
||||
const bc = await page.evaluate(() => document.querySelectorAll(".msg.assistant").length);
|
||||
await input.press("Enter");
|
||||
console.log(`📤 Multi-agent sent · msg: ${msg.substring(0,80)}`);
|
||||
|
||||
const ws2 = Date.now();
|
||||
let done = false;
|
||||
let agentCount = 0;
|
||||
let hasBadges = false;
|
||||
|
||||
while (Date.now() - ws2 < 180000) {
|
||||
const s = await page.evaluate((bc) => {
|
||||
const msgs = Array.from(document.querySelectorAll(".msg.assistant"));
|
||||
const last = msgs.length > bc ? msgs[msgs.length-1] : null;
|
||||
if (!last) return { cnt: msgs.length, badges: 0, agents: 0, text_size: 0 };
|
||||
return {
|
||||
cnt: msgs.length,
|
||||
badges: last.querySelectorAll(".nx-badge").length,
|
||||
agents_blocks: last.innerHTML.match(/agent·|🤖|Multi-Agent/gi)?.length || 0,
|
||||
has_synth: /Synthèse consolidée/.test(last.innerHTML),
|
||||
text_size: (last.querySelector(".bubble")?.innerHTML || "").length,
|
||||
};
|
||||
}, bc);
|
||||
|
||||
if (s.has_synth) {
|
||||
done = true;
|
||||
agentCount = s.agents_blocks;
|
||||
hasBadges = s.badges > 0;
|
||||
console.log(`✅ Multi-agent done · badges=${s.badges} · agents_blocks=${s.agents_blocks} · html_size=${s.text_size}B`);
|
||||
break;
|
||||
}
|
||||
await page.waitForTimeout(2500);
|
||||
}
|
||||
|
||||
const el = ((Date.now()-ws2)/1000).toFixed(1);
|
||||
console.log(`\n═══ RESULT in ${el}s · done=${done} ═══`);
|
||||
|
||||
await page.screenshot({ path: "output/v45-02-multiagent.png", fullPage: true });
|
||||
await page.waitForTimeout(1500);
|
||||
await page.screenshot({ path: "output/v45-03-scrolled.png" });
|
||||
});
|
||||
7
api/ambre-pw-v43-deploy.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$base = "/var/www/html/api/ambre-pw-tests/tests";
|
||||
$spec = base64_decode("Y29uc3QgeyB0ZXN0IH0gPSByZXF1aXJlKCJAcGxheXdyaWdodC90ZXN0Iik7Cgp0ZXN0KCJWNDMgwrcgUFJPT0YgwrcgUERGIFByZW1pdW0gZW5kLXRvLWVuZCBjb252ZXJzYXRpb24gWWFjaW5lIiwgYXN5bmMgKHsgcGFnZSB9KSA9PiB7CiAgdGVzdC5zZXRUaW1lb3V0KDE4MDAwMCk7CiAgY29uc3QgZXJyb3JzID0gW107CiAgcGFnZS5vbigicGFnZWVycm9yIiwgZSA9PiBlcnJvcnMucHVzaChlLm1lc3NhZ2Uuc3Vic3RyaW5nKDAsMTIwKSkpOwogIAogIGF3YWl0IHBhZ2UuZ290bygiL3dldmlhLmh0bWw/Y2I9IiArIERhdGUubm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mICghcGRmRm91bmQpIHsKICAgIGNvbnNvbGUubG9nKGBcbuKdjCBOTyBQREYgTElOSyBHRU5FUkFURURgKTsKICAgIGNvbnNvbGUubG9nKGBFcnJvcnM6ICR7SlNPTi5zdHJpbmdpZnkoZXJyb3JzKX1gKTsKICB9Cn0pOwo=");
|
||||
foreach (glob("$base/*.spec.js") as $old) @unlink($old);
|
||||
$written = @file_put_contents("$base/v43-proof.spec.js", $spec);
|
||||
echo json_encode(["written" => $written]);
|
||||
7
api/ambre-pw-v44-deploy.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$base = "/var/www/html/api/ambre-pw-tests/tests";
|
||||
$spec = base64_decode("Y29uc3QgeyB0ZXN0IH0gPSByZXF1aXJlKCJAcGxheXdyaWdodC90ZXN0Iik7Cgp0ZXN0KCJWNDQgwrcgUFJPT0YgwrcgUERGIFByZW1pdW0gYXR0ZW5kIGZpbiBISSIsIGFzeW5jICh7IHBhZ2UgfSkgPT4gewogIHRlc3Quc2V0VGltZW91dCgyNDAwMDApOwogIAogIGF3YWl0IHBhZ2UuZ290bygiL3dldmlhLmh0bWw/Y2I9IiArIERhdGUubm93KCkpOwogIGF3YWl0IHBhZ2UuZXZhbHVhdGUoKCkgPT4geyB0cnl7c2Vzc2lvblN0b3JhZ2UuY2xlYXIoKTsgbG9jYWxTdG9yYWdlLmNsZWFyKCk7fWNhdGNoKGUpe30gfSk7CiAgYXdhaXQgcGFnZS53YWl0Rm9yTG9hZFN0YXRlKCJuZXR3b3JraWRsZSIpOwogIGF3YWl0IHBhZ2Uud2FpdEZvclRpbWVvdXQoMzUwMCk7CiAgCiAgLy8gVHVybiAxOiBISSAtIHdhaXQgZm9yIENPTVBMRVRFIHJlc3BvbnNlCiAgY29uc3QgaW5wdXQgPSBwYWdlLmxvY2F0b3IoIiNtc2dJbnB1dCIpOwogIGF3YWl0IGlucHV0LmNsaWNrKHtmb3JjZTp0cnVlfSk7CiAgYXdha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4dC5zdWJzdHJpbmcoMCwyMDApLnJlcGxhY2UoL1xuL2csJyAnKX1gKTsKICAKICBhd2FpdCBwYWdlLnNjcmVlbnNob3QoeyBwYXRoOiAib3V0cHV0L3Y0NC0wMi1wZGYtcmVzdWx0LnBuZyIsIGZ1bGxQYWdlOiB0cnVlIH0pOwogIAogIGlmIChwZGZGb3VuZCkgewogICAgLy8gQ2xpY2sgdGhlIFBERiBsaW5rIChvciBqdXN0IHZlcmlmeSkKICAgIGNvbnN0IHJlc3AgPSBhd2FpdCBwYWdlLmV2YWx1YXRlKGFzeW5jICh1cmwpID0+IHsKICAgICAgY29uc3QgciA9IGF3YWl0IGZldGNoKHVybCwge21ldGhvZDonSEVBRCd9KTsKICAgICAgcmV0dXJuIHsgc3RhdHVzOiByLnN0YXR1cywgc2l6ZTogci5oZWFkZXJzLmdldCgnY29udGVudC1sZW5ndGgnKSwgdHlwZTogci5oZWFkZXJzLmdldCgnY29udGVudC10eXBlJykgfTsKICAgIH0sIHBkZlVybCk7CiAgICBjb25zb2xlLmxvZyhgICBIVFRQIEhFQUQ6ICR7SlNPTi5zdHJpbmdpZnkocmVzcCl9YCk7CiAgfQp9KTsK");
|
||||
foreach (glob("$base/*.spec.js") as $old) @unlink($old);
|
||||
$written = @file_put_contents("$base/v44-pdf-proof.spec.js", $spec);
|
||||
echo json_encode(["written" => $written]);
|
||||
7
api/ambre-pw-v45-deploy.php
Normal file
@@ -0,0 +1,7 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$base = "/var/www/html/api/ambre-pw-tests/tests";
|
||||
$spec = base64_decode("Y29uc3QgeyB0ZXN0IH0gPSByZXF1aXJlKCJAcGxheXdyaWdodC90ZXN0Iik7Cgp0ZXN0KCJWNDUgwrcgUFJPT0YgwrcgTXVsdGktQWdlbnQgUGFyYWxsZWwgUERGIFdFVklBIE9QVVMiLCBhc3luYyAoeyBwYWdlIH0pID0+IHsKICB0ZXN0LnNldFRpbWVvdXQoMjQwMDAwKTs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KICBjb25zb2xlLmxvZyhgXG7ilZDilZDilZAgUkVTVUxUIGluICR7ZWx9cyDCtyBkb25lPSR7ZG9uZX0g4pWQ4pWQ4pWQYCk7CiAgCiAgYXdhaXQgcGFnZS5zY3JlZW5zaG90KHsgcGF0aDogIm91dHB1dC92NDUtMDItbXVsdGlhZ2VudC5wbmciLCBmdWxsUGFnZTogdHJ1ZSB9KTsKICBhd2FpdCBwYWdlLndhaXRGb3JUaW1lb3V0KDE1MDApOwogIGF3YWl0IHBhZ2Uuc2NyZWVuc2hvdCh7IHBhdGg6ICJvdXRwdXQvdjQ1LTAzLXNjcm9sbGVkLnBuZyIgfSk7Cn0pOwo=");
|
||||
foreach (glob("$base/*.spec.js") as $old) @unlink($old);
|
||||
$written = @file_put_contents("$base/v45-multiagent.spec.js", $spec);
|
||||
echo json_encode(["written" => $written]);
|
||||
41
api/ambre-scan-247.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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);
|
||||
23
api/ambre-v9-ok.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$path = "/var/www/html/wevia.html";
|
||||
$c = @file_get_contents($path);
|
||||
$orig = strlen($c);
|
||||
|
||||
$old = "if (data && data.success) {";
|
||||
$new = "if (data && (data.ok || data.success)) {";
|
||||
|
||||
if (strpos($c, $old) === false) {
|
||||
echo json_encode(["error"=>"V9 success check not found"]);
|
||||
exit;
|
||||
}
|
||||
$c = str_replace($old, $new, $c);
|
||||
|
||||
$backup = "/opt/wevads/vault/wevia.html.GOLD-" . date("Ymd-His") . "-wave247-v9-ok";
|
||||
@copy($path, $backup);
|
||||
$wrote = @file_put_contents($path, $c);
|
||||
|
||||
echo json_encode([
|
||||
"delta" => strlen($c) - $orig,
|
||||
"wrote" => $wrote,
|
||||
]);
|
||||
28
api/ambre-v9-widen.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$path = "/var/www/html/wevia.html";
|
||||
$c = @file_get_contents($path);
|
||||
$orig = strlen($c);
|
||||
|
||||
// Old pattern (too strict)
|
||||
$old_pat = "var _pdf_premium_pat = /(?:pdf|rapport)\\s+(?:premium|qualit[eé]|pro|professionnel|avec\\s+graphique|hd|chart)|(?:cr[eé]e[zr]?|g[eé]n[eè]re[zr]?|fais|fait|produi[st])\\s+(?:un\\s+)?(?:rapport|pdf)\\s+(?:premium|pro|complet|avec\\s+graphique|hd|qualit[eé])/i;";
|
||||
|
||||
// New pattern - broader: any PDF intention including ALL CAPS
|
||||
$new_pat = "var _pdf_premium_pat = /(?:veux|besoin|demande|fais|cree|g[eé]n[eé]re|produi[st]|export|donne|realise|create|make|generate|want|need)\\s+.{0,40}?\\bpdf\\b|\\bpdf\\b\\s+.{0,40}?(?:premium|qualit[eé]|pro|professionnel|avec|chart|graphique|compar|tableau|compl|hd)|\\b(?:rapport|comparaison|comparer|compare)\\b.{0,50}\\bpdf\\b|\\bpdf\\b.{0,50}\\b(?:rapport|comparaison|comparer|compare)\\b|^\\s*pdf\\s+/i;";
|
||||
|
||||
if (strpos($c, $old_pat) === false) {
|
||||
echo json_encode(["error"=>"V9 pattern not found"]);
|
||||
exit;
|
||||
}
|
||||
$c = str_replace($old_pat, $new_pat, $c);
|
||||
|
||||
$backup = "/opt/wevads/vault/wevia.html.GOLD-" . date("Ymd-His") . "-wave247-v9-widen";
|
||||
@copy($path, $backup);
|
||||
$wrote = @file_put_contents($path, $c);
|
||||
|
||||
echo json_encode([
|
||||
"delta" => strlen($c) - $orig,
|
||||
"wrote" => $wrote,
|
||||
"backup" => basename($backup),
|
||||
"new_pattern" => $new_pat,
|
||||
]);
|
||||
106
api/ambre-wire-v11.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
header("Content-Type: application/json");
|
||||
$path = "/var/www/html/wevia.html";
|
||||
$c = @file_get_contents($path);
|
||||
$orig = strlen($c);
|
||||
|
||||
if (strpos($c, "AMBRE-V11-MULTIAGENT") !== false) {
|
||||
echo json_encode(["already"=>true]);
|
||||
exit;
|
||||
}
|
||||
|
||||
// Insert BEFORE V10-MERMAID (so multi-agent catches complex requests first)
|
||||
$anchor = " // === AMBRE-V10-MERMAID 2026-04-22";
|
||||
$pos = strpos($c, $anchor);
|
||||
if ($pos === false) {
|
||||
echo json_encode(["error"=>"V10 anchor not found"]);
|
||||
exit;
|
||||
}
|
||||
$line_start = strrpos(substr($c, 0, $pos), "\n") + 1;
|
||||
|
||||
$v11 = ' // === AMBRE-V11-MULTIAGENT 2026-04-22 · wave-255 · Plan → Execute N agents parallel → Reconcile ===
|
||||
// Triggers : "analyse", "complet", "rapport complet", "compare X avec Y", "multi agent", "plusieurs", "en parallele"
|
||||
var _multiagent_pat = /(?:analyse\s+compl[eè]te|rapport\s+complet|bilan\s+complet|compare[rz]?\s+.{3,}\s+(?:avec|vs|contre|et)\s+|multi[- ]?agent|plusieurs\s+angles|en\s+parall[eè]le|synth[eè]se\s+compl[eè]te|analyse\s+360|\ballonsy\b|\bdispatch\b)/i;
|
||||
if (_multiagent_pat.test(text) && text.length > 40) {
|
||||
if (typeof showThinking === "function") showThinking();
|
||||
busy = true;
|
||||
try{var sb=document.getElementById("sendBtn");if(sb)sb.disabled=true;}catch(e){}
|
||||
|
||||
var _ma_start = performance.now();
|
||||
fetch("/api/ambre-multiagent-parallel.php", {
|
||||
method: "POST",
|
||||
headers: {"Content-Type":"application/json"},
|
||||
body: JSON.stringify({goal: text, max_agents: 5})
|
||||
})
|
||||
.then(function(r){ return r.json(); })
|
||||
.then(function(data){
|
||||
if (typeof hideThinking === "function") hideThinking();
|
||||
busy = false;
|
||||
try{var sb=document.getElementById("sendBtn");if(sb)sb.disabled=false;}catch(e){}
|
||||
try{var mi=document.getElementById("msgInput");if(mi){mi.value="";mi.disabled=false;}}catch(e){}
|
||||
|
||||
if (!data || !data.ok) {
|
||||
addMsg("assistant", "❌ Multi-agent erreur: " + ((data && data.error) || "reessayez"), "0");
|
||||
return;
|
||||
}
|
||||
|
||||
var el = ((performance.now() - _ma_start) / 1000).toFixed(1);
|
||||
|
||||
// Build rich HTML response
|
||||
var badges = "<div style=\"display:flex;gap:6px;flex-wrap:wrap;margin:8px 0\">" +
|
||||
"<span class=\"nx-badge\" style=\"background:rgba(99,102,241,.15);color:#6366f1\">🧠 Multi-Agent</span>" +
|
||||
"<span class=\"nx-badge\" style=\"background:rgba(16,185,129,.15);color:#10b981\">" + data.agents_count + " agents ∥</span>" +
|
||||
"<span class=\"nx-badge\" style=\"background:rgba(245,158,11,.15);color:#f59e0b\">⚡ " + data.parallel_speedup + "x speedup</span>" +
|
||||
"<span class=\"nx-badge\" style=\"background:rgba(139,92,246,.15);color:#8b5cf6\">" + data.total_ms + "ms</span>" +
|
||||
"</div>";
|
||||
|
||||
// Plan
|
||||
var planHtml = "<div style=\"margin:10px 0;padding:12px;background:#eef2ff;border-radius:10px;border-left:3px solid #6366f1\">" +
|
||||
"<div style=\"font-weight:600;color:#4338ca;font-size:13px;margin-bottom:6px\">📋 Plan · " + (data.plan.objective || "") + "</div>" +
|
||||
"<div style=\"font-size:12px;color:#4b5563\">" + data.plan.agents.length + " agents dispatchés en parallèle</div></div>";
|
||||
|
||||
// Agents list
|
||||
var agentsHtml = "<div style=\"margin:10px 0\"><div style=\"font-weight:600;color:#1a1f3a;font-size:13px;margin-bottom:8px\">🤖 Agents · exécution parallèle</div>";
|
||||
data.results.forEach(function(r, i){
|
||||
var icon = {"pdf_premium":"📄","mermaid":"📊","web_search":"🔍","calc":"🧮","kb_search":"📚","none":"💭"}[r.tool] || "⚙️";
|
||||
agentsHtml += "<div style=\"margin:6px 0;padding:10px;background:#fafafa;border-radius:8px;border:1px solid #e5e7eb\">" +
|
||||
"<div style=\"font-size:12px;color:#6366f1;font-weight:600;margin-bottom:4px\">" + icon + " " + r.agent + " · " + r.tool + " · " + r.elapsed_ms + "ms</div>" +
|
||||
"<div style=\"font-size:12px;color:#64748b;line-height:1.4\">" + (r.task || "") + "</div>" +
|
||||
"<div style=\"font-size:11px;color:#94a3b8;margin-top:4px\">" + (r.summary || "").replace(/</g,"<").substring(0, 250) + "</div>" +
|
||||
"</div>";
|
||||
});
|
||||
agentsHtml += "</div>";
|
||||
|
||||
// Reconciled
|
||||
var synthHtml = "<div style=\"margin:12px 0;padding:14px;background:linear-gradient(135deg,#f0f9ff 0%,#eef2ff 100%);border-radius:12px;border-left:3px solid #10b981\">" +
|
||||
"<div style=\"font-weight:600;color:#065f46;font-size:13px;margin-bottom:8px\">✅ Synthèse consolidée</div>" +
|
||||
"<div style=\"font-size:13px;color:#1a1f3a;line-height:1.6;white-space:pre-wrap\">" + (data.reconciled || "").replace(/</g,"<") + "</div>" +
|
||||
"</div>";
|
||||
|
||||
var el_resp = addMsg("assistant", "Multi-agent", el);
|
||||
var bubble = el_resp ? el_resp.querySelector(".bubble") : null;
|
||||
if (bubble) bubble.innerHTML = badges + planHtml + agentsHtml + synthHtml;
|
||||
})
|
||||
.catch(function(err){
|
||||
if (typeof hideThinking === "function") hideThinking();
|
||||
busy = false;
|
||||
try{var sb=document.getElementById("sendBtn");if(sb)sb.disabled=false;}catch(e){}
|
||||
addMsg("assistant", "❌ Multi-agent service indisponible", "0");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// === END AMBRE-V11-MULTIAGENT ===
|
||||
|
||||
';
|
||||
|
||||
$new_c = substr($c, 0, $line_start) . $v11 . substr($c, $line_start);
|
||||
|
||||
$backup = "/opt/wevads/vault/wevia.html.GOLD-" . date("Ymd-His") . "-wave255-v11";
|
||||
@copy($path, $backup);
|
||||
$wrote = @file_put_contents($path, $new_c);
|
||||
|
||||
echo json_encode([
|
||||
"delta" => strlen($new_c) - $orig,
|
||||
"wrote" => $wrote,
|
||||
"backup" => basename($backup),
|
||||
]);
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated": "2026-04-22 02:00:02",
|
||||
"generated": "2026-04-22 02:30:02",
|
||||
"version": "1.0",
|
||||
"servers": [
|
||||
{
|
||||
@@ -10,7 +10,7 @@
|
||||
"ssh": 49222,
|
||||
"disk_pct": 85,
|
||||
"disk_avail": "22G",
|
||||
"uptime": "up 1 week, 16 hours, 8 minutes",
|
||||
"uptime": "up 1 week, 16 hours, 38 minutes",
|
||||
"nginx": "active",
|
||||
"php_fpm": "active",
|
||||
"php_version": "8.5.5"
|
||||
@@ -21,7 +21,7 @@
|
||||
"private": "10.1.0.3",
|
||||
"role": "WEVADS Arsenal",
|
||||
"ssh": 22,
|
||||
"disk_pct": 83,
|
||||
"disk_pct": 82,
|
||||
"disk_avail": "26G",
|
||||
"sentinel": 1
|
||||
},
|
||||
@@ -36,7 +36,7 @@
|
||||
"docker": [
|
||||
{
|
||||
"name": "weval-docuseal",
|
||||
"status": "Up 1 second",
|
||||
"status": "Up Less than a second",
|
||||
"ports": ""
|
||||
},
|
||||
{
|
||||
@@ -282,7 +282,7 @@
|
||||
"screens": {
|
||||
"s204_html": 324,
|
||||
"s204_products": 104,
|
||||
"s204_api_php": 995,
|
||||
"s204_api_php": 1012,
|
||||
"s204_wevia_php": 254,
|
||||
"s95_arsenal_html": 1377,
|
||||
"s95_arsenal_api": 377
|
||||
@@ -306,7 +306,7 @@
|
||||
"langfuse"
|
||||
],
|
||||
"key_tables": {
|
||||
"kb_learnings": 5608,
|
||||
"kb_learnings": 5615,
|
||||
"kb_documents": 0,
|
||||
"ethica_medecins": 50004,
|
||||
"enterprise_agents": 0
|
||||
@@ -418,7 +418,7 @@
|
||||
},
|
||||
{
|
||||
"name": "wevia_memory_768",
|
||||
"vectors": 82
|
||||
"vectors": 87
|
||||
},
|
||||
{
|
||||
"name": "wevia_kb_768",
|
||||
@@ -606,15 +606,15 @@
|
||||
]
|
||||
},
|
||||
"wiki": {
|
||||
"total_entries": 5608,
|
||||
"total_entries": 5615,
|
||||
"categories": [
|
||||
{
|
||||
"category": "AUTO-FIX",
|
||||
"cnt": "3012"
|
||||
"cnt": "3018"
|
||||
},
|
||||
{
|
||||
"category": "TOPOLOGY",
|
||||
"cnt": "1240"
|
||||
"cnt": "1241"
|
||||
},
|
||||
{
|
||||
"category": "DISCOVERY",
|
||||
@@ -1723,6 +1723,30 @@
|
||||
"optimizations": {
|
||||
"recent_commits": [],
|
||||
"auto_fixes": [
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 02:25: 1 fixes. Disk light cleanup 86%",
|
||||
"created_at": "2026-04-22 04:25:07.944997"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 02:20: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 04:20:05.987441"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 02:15: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 04:15:06.951973"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 02:10: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 04:10:05.81299"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 02:05: 2 fixes. Disk light cleanup 85%; Docker restart weval-docuseal",
|
||||
"created_at": "2026-04-22 04:05:05.713752"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 02:00: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 04:00:12.712547"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:55: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:55:05.962118"
|
||||
@@ -1738,30 +1762,6 @@
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:40: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:40:06.63822"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:35: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:35:05.620952"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:30: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:30:09.806868"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:25: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:25:05.698889"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:20: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:20:06.441663"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:15: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:15:06.44598"
|
||||
},
|
||||
{
|
||||
"fact": "AUTONOMY 22Apr 01:10: 1 fixes. Disk light cleanup 85%",
|
||||
"created_at": "2026-04-22 03:10:06.312413"
|
||||
}
|
||||
],
|
||||
"architecture_decisions": [
|
||||
@@ -1943,14 +1943,14 @@
|
||||
{
|
||||
"severity": "opportunity",
|
||||
"category": "SCALABILITY",
|
||||
"title": "Qdrant: 22,105 vecteurs",
|
||||
"title": "Qdrant: 22,110 vecteurs",
|
||||
"detail": "Volume vectoriel croissant. Planifier sharding ou migration vers cluster Qdrant.",
|
||||
"action": "opportunity",
|
||||
"fix_cmd": ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"scan_time_ms": 5173,
|
||||
"scan_time_ms": 2870,
|
||||
"gaps": [],
|
||||
"score": 100,
|
||||
"automation": {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-04-22T04:15:02.029048",
|
||||
"generated_at": "2026-04-22T04:35:01.522801",
|
||||
"stats": {
|
||||
"total": 48,
|
||||
"pending": 31,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"status": "ALIVE",
|
||||
"ts": "2026-04-22T04:00:02.040414",
|
||||
"last_heartbeat": "2026-04-22T04:00:02.040414",
|
||||
"last_heartbeat_ts_epoch": 1776823202,
|
||||
"ts": "2026-04-22T04:30:02.601854",
|
||||
"last_heartbeat": "2026-04-22T04:30:02.601854",
|
||||
"last_heartbeat_ts_epoch": 1776825002,
|
||||
"tasks_today": 232,
|
||||
"tasks_week": 574,
|
||||
"agent_id": "blade-ops",
|
||||
|
||||
@@ -41,10 +41,15 @@ $BACKENDS = [
|
||||
'director' => '/api/wevia-autonomous.php',
|
||||
'ethica' => '/api/ethica-brain.php',
|
||||
'auto' => '/api/opus5-autonomous-orchestrator-v3.php',
|
||||
'multiagent' => '/api/wevia-v83-multi-agent-orchestrator.php',
|
||||
'parallel13' => '/api/wevia-v77-parallel-executor.php',
|
||||
];
|
||||
$FALLBACKS = [
|
||||
'wevia-master' => '/api/opus5-autonomous-orchestrator-v3.php',
|
||||
'director' => '/api/opus5-autonomous-orchestrator-v3.php',
|
||||
'ethica' => '/api/wevia-autonomous.php',
|
||||
'multiagent' => '/api/wevia-autonomous.php',
|
||||
'parallel13' => '/api/wevia-autonomous.php',
|
||||
];
|
||||
|
||||
$backend = $BACKENDS[$chatbot] ?? $BACKENDS['wevia-master'];
|
||||
@@ -169,7 +174,16 @@ $result['phases']['3_rag'] = [
|
||||
$t4 = microtime(true);
|
||||
|
||||
$backend_url = 'http://127.0.0.1' . $backend;
|
||||
$backend_body = json_encode(['message' => $message, 'session' => $session]);
|
||||
// Smart body based on chatbot type
|
||||
if (in_array($chatbot, ['multiagent', 'parallel13'])) {
|
||||
// These need trigger keywords for multi-agent
|
||||
$backend_body = json_encode([
|
||||
'message' => 'multiagent ' . $message,
|
||||
'session' => $session,
|
||||
]);
|
||||
} else {
|
||||
$backend_body = json_encode(['message' => $message, 'session' => $session]);
|
||||
}
|
||||
|
||||
$ctx_exec = stream_context_create([
|
||||
'http' => [
|
||||
@@ -201,10 +215,33 @@ if (!$backend_ok && isset($FALLBACKS[$chatbot])) {
|
||||
}
|
||||
|
||||
if ($backend_data) {
|
||||
// Extract response text (multiple possible formats)
|
||||
$backend_text = $backend_data['text'] ?? $backend_data['response'] ?? $backend_data['answer']
|
||||
?? $backend_data['reply'] ?? $backend_data['message'] ?? '';
|
||||
if (is_array($backend_text)) $backend_text = json_encode($backend_text);
|
||||
// Deep-dig extraction (handle SSE, nested, opus5 orchestrator)
|
||||
$backend_text = $backend_data['final_response']
|
||||
?? $backend_data['text']
|
||||
?? $backend_data['response']
|
||||
?? $backend_data['answer']
|
||||
?? $backend_data['reply']
|
||||
?? $backend_data['message']
|
||||
?? '';
|
||||
// Handle nested thinking field
|
||||
if (!$backend_text && isset($backend_data['thinking'])) {
|
||||
$backend_text = $backend_data['thinking'];
|
||||
}
|
||||
// Handle array result
|
||||
if (is_array($backend_text)) $backend_text = json_encode($backend_text, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
// Extract from SSE stream if needed
|
||||
if (!$backend_text && strpos($backend_response, 'data:') !== false) {
|
||||
preg_match_all('/data:\s*(\{[^
|
||||
]+\})/', $backend_response, $m);
|
||||
$collected = [];
|
||||
foreach ($m[1] ?? [] as $chunk) {
|
||||
$cd = @json_decode($chunk, true);
|
||||
if ($cd && !empty($cd['text'])) {
|
||||
$collected[] = $cd['text'];
|
||||
}
|
||||
}
|
||||
if ($collected) $backend_text = implode("\n", $collected);
|
||||
}
|
||||
|
||||
$result['phases']['4_execute'] = [
|
||||
@@ -224,6 +261,8 @@ $tests = [
|
||||
'within_timeout' => (microtime(true) - $t4) < 15,
|
||||
'backend_json_valid' => $backend_data !== null,
|
||||
'not_simulated' => $backend_ok && !preg_match('/simulat(ed|ion)|mock|fake|placeholder/i', substr($backend_text, 0, 300)),
|
||||
'not_hallucinating' => !preg_match('/\b(je ne sais pas|i don\'t know|n\'ai pas d\'information|imagine|hypothetical|suppose que|probablement|might be|could be)\b/i', substr($backend_text, 0, 300)),
|
||||
'has_natural_lang' => preg_match('/\b(le|la|les|un|une|des|je|vous|nous|est|sont|avec|dans|the|is|are|we|you)\b/i', substr($backend_text, 0, 200)) > 0,
|
||||
];
|
||||
|
||||
$tests_passed = array_sum(array_map('intval', $tests));
|
||||
|
||||
220
api/claude-pattern-sse.php
Normal file
@@ -0,0 +1,220 @@
|
||||
<?php
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
CLAUDE PATTERN SSE · Opus v17 · 22-avr
|
||||
|
||||
SSE streaming version of claude-pattern-api
|
||||
Emits phases in real-time (thinking → plan → RAG → execute → tests → response → critique)
|
||||
|
||||
Usage:
|
||||
GET /api/claude-pattern-sse.php?message=X&chatbot=Y
|
||||
|
||||
Event types: thinking, plan, rag, execute, tests, response, critique, done
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
header('Content-Type: text/event-stream; charset=utf-8');
|
||||
header('Cache-Control: no-store');
|
||||
header('X-Accel-Buffering: no');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
|
||||
// Disable output buffering for real-time streaming
|
||||
@ini_set('output_buffering', 'off');
|
||||
@ini_set('zlib.output_compression', false);
|
||||
while (ob_get_level() > 0) ob_end_flush();
|
||||
ob_implicit_flush(true);
|
||||
|
||||
function emit($event, $data) {
|
||||
$json = json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
echo "event: {$event}\n";
|
||||
echo "data: {$json}\n\n";
|
||||
@flush();
|
||||
}
|
||||
|
||||
$message = trim($_GET['message'] ?? $_POST['message'] ?? '');
|
||||
$chatbot = $_GET['chatbot'] ?? $_POST['chatbot'] ?? 'wevia-master';
|
||||
$session = $_GET['session'] ?? 'sse-' . bin2hex(random_bytes(3));
|
||||
|
||||
if (!$message) {
|
||||
emit('error', ['error' => 'message required']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$BACKENDS = [
|
||||
'wevia-master' => '/api/wevia-autonomous.php',
|
||||
'wevia' => '/api/ambre-thinking.php',
|
||||
'claw' => '/api/wevia-json-api.php',
|
||||
'claw-chat' => '/api/wevia-json-api.php',
|
||||
'claw-code' => '/api/weval-unified-pipeline.php',
|
||||
'director' => '/api/wevia-autonomous.php',
|
||||
'director-chat' => '/api/wevia-director.php',
|
||||
'ethica' => '/api/ethica-brain.php',
|
||||
'ethica-chatbot' => '/api/ethica-brain.php',
|
||||
'openclaw' => '/api/openclaw-proxy.php',
|
||||
'blade-ai' => '/api/blade-api.php',
|
||||
'wevcode' => '/api/wevcode-superclaude.php',
|
||||
'wevia-console' => '/api/wevia-json-api.php',
|
||||
'wevia-widget' => '/api/wevia-json-api.php',
|
||||
'wevia-cortex' => '/api/wevia-stream-api.php',
|
||||
'wevia-chat' => '/api/wevia-autonomous.php',
|
||||
'sovereign-claude' => '/api/wevia-json-api.php',
|
||||
'weval-arena' => '/api/wevia-multi-provider.php',
|
||||
'weval-arena-v2' => '/api/wevia-webchat-direct.php',
|
||||
'l99-brain' => '/api/wevia-master-api.php',
|
||||
'multiagent' => '/api/wevia-v83-multi-agent-orchestrator.php',
|
||||
'auto' => '/api/opus5-autonomous-orchestrator-v3.php',
|
||||
];
|
||||
|
||||
$backend = $BACKENDS[$chatbot] ?? $BACKENDS['wevia-master'];
|
||||
|
||||
// PHASE 1 · THINKING
|
||||
$t1 = microtime(true);
|
||||
emit('thinking', [
|
||||
'status' => 'analyzing',
|
||||
'message_length' => strlen($message),
|
||||
'chatbot' => $chatbot,
|
||||
'backend' => $backend,
|
||||
]);
|
||||
|
||||
$msg_lower = strtolower($message);
|
||||
$intent_map = [
|
||||
'status' => ['status', 'état', 'sante', 'health', 'live'],
|
||||
'action' => ['rotate', 'restart', 'deploy', 'run', 'exec'],
|
||||
'analytics' => ['kpi', 'metric', 'combien', 'total', 'nombre'],
|
||||
];
|
||||
$intent = 'query';
|
||||
foreach ($intent_map as $i => $kws) {
|
||||
foreach ($kws as $kw) {
|
||||
if (strpos($msg_lower, $kw) !== false) { $intent = $i; break 2; }
|
||||
}
|
||||
}
|
||||
|
||||
emit('thinking', [
|
||||
'status' => 'complete',
|
||||
'intent' => $intent,
|
||||
'duration_ms' => round((microtime(true) - $t1) * 1000, 1),
|
||||
]);
|
||||
|
||||
// PHASE 2 · PLAN
|
||||
$t2 = microtime(true);
|
||||
emit('plan', ['status' => 'building']);
|
||||
|
||||
$steps = match($intent) {
|
||||
'status' => ['Query KPI sources', 'Aggregate health data', 'Format response'],
|
||||
'action' => ['Validate safety', 'Execute command', 'Verify result'],
|
||||
'analytics' => ['Fetch metrics', 'Calculate aggregates', 'Return structured data'],
|
||||
default => ['Parse query', 'Route to backend', 'Format natural response'],
|
||||
};
|
||||
|
||||
emit('plan', [
|
||||
'status' => 'complete',
|
||||
'steps' => $steps,
|
||||
'duration_ms' => round((microtime(true) - $t2) * 1000, 1),
|
||||
]);
|
||||
|
||||
// PHASE 3 · RAG (quick ping)
|
||||
$t3 = microtime(true);
|
||||
emit('rag', ['status' => 'searching']);
|
||||
|
||||
$rag_ctx = @file_get_contents('http://127.0.0.1:6333/collections', false, stream_context_create([
|
||||
'http' => ['timeout' => 1]
|
||||
]));
|
||||
$rag_ok = $rag_ctx !== false;
|
||||
|
||||
emit('rag', [
|
||||
'status' => $rag_ok ? 'qdrant_available' : 'skipped',
|
||||
'duration_ms' => round((microtime(true) - $t3) * 1000, 1),
|
||||
]);
|
||||
|
||||
// PHASE 4 · EXECUTE (REAL backend)
|
||||
$t4 = microtime(true);
|
||||
emit('execute', ['status' => 'calling_backend', 'backend' => $backend]);
|
||||
|
||||
$body = json_encode(['message' => $message, 'session' => $session]);
|
||||
$ctx = stream_context_create([
|
||||
'http' => [
|
||||
'method' => 'POST',
|
||||
'header' => "Content-Type: application/json\r\nHost: weval-consulting.com\r\n",
|
||||
'content' => $body,
|
||||
'timeout' => 25,
|
||||
'ignore_errors' => true,
|
||||
]
|
||||
]);
|
||||
|
||||
$backend_resp = @file_get_contents('http://127.0.0.1' . $backend, false, $ctx);
|
||||
$backend_data = @json_decode($backend_resp, true);
|
||||
|
||||
// Deep-dig text extraction
|
||||
$text = '';
|
||||
if ($backend_data) {
|
||||
$text = $backend_data['final_response']
|
||||
?? $backend_data['text']
|
||||
?? $backend_data['response']
|
||||
?? $backend_data['answer']
|
||||
?? $backend_data['reply']
|
||||
?? $backend_data['message']
|
||||
?? $backend_data['thinking']
|
||||
?? '';
|
||||
if (is_array($text)) $text = json_encode($text, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
// Handle SSE chunks if response is SSE format
|
||||
if (!$text && strpos((string)$backend_resp, 'data:') !== false) {
|
||||
preg_match_all('/data:\s*(\{[^\n]+\})/', $backend_resp, $m);
|
||||
$chunks = [];
|
||||
foreach ($m[1] ?? [] as $chunk) {
|
||||
$cd = @json_decode($chunk, true);
|
||||
if (!empty($cd['text'])) $chunks[] = $cd['text'];
|
||||
}
|
||||
$text = implode("\n", $chunks);
|
||||
}
|
||||
|
||||
$backend_ok = !empty($text) && strlen($text) > 10;
|
||||
|
||||
emit('execute', [
|
||||
'status' => 'complete',
|
||||
'backend_ok' => $backend_ok,
|
||||
'response_length' => strlen($text),
|
||||
'duration_ms' => round((microtime(true) - $t4) * 1000, 1),
|
||||
]);
|
||||
|
||||
// PHASE 5 · TESTS
|
||||
$t5 = microtime(true);
|
||||
$tests = [
|
||||
'has_response' => $backend_ok,
|
||||
'no_error' => !preg_match('/\berror\b|\bfailed\b|\bexception\b/i', substr($text, 0, 200)),
|
||||
'not_simulated' => !preg_match('/simulat(ed|ion)|mock|fake|placeholder/i', substr($text, 0, 300)),
|
||||
'not_hallucinating' => !preg_match('/\b(je ne sais pas|imagine|hypothetical|suppose que|probablement|might be)\b/i', substr($text, 0, 300)),
|
||||
'has_natural_lang' => preg_match('/\b(le|la|les|un|je|vous|nous|est|sont|the|is|are)\b/i', substr($text, 0, 200)) > 0,
|
||||
];
|
||||
$passed = array_sum(array_map('intval', $tests));
|
||||
|
||||
emit('tests', [
|
||||
'passed' => $passed,
|
||||
'total' => count($tests),
|
||||
'details' => $tests,
|
||||
'duration_ms' => round((microtime(true) - $t5) * 1000, 1),
|
||||
]);
|
||||
|
||||
// PHASE 6 · RESPONSE
|
||||
emit('response', [
|
||||
'text' => $text,
|
||||
'length' => strlen($text),
|
||||
]);
|
||||
|
||||
// PHASE 7 · CRITIQUE
|
||||
$notes = [];
|
||||
if ($passed < 5) $notes[] = "Some tests failed ({$passed}/5)";
|
||||
if (strlen($text) < 30) $notes[] = "Short response";
|
||||
if ((microtime(true) - $t4) > 10) $notes[] = "Slow response";
|
||||
if (!$notes) $notes[] = "Quality OK";
|
||||
|
||||
emit('critique', [
|
||||
'quality_score' => $passed / 5,
|
||||
'quality' => $passed === 5 ? 'EXCELLENT' : ($passed >= 4 ? 'GOOD' : ($passed >= 3 ? 'OK' : 'LOW')),
|
||||
'notes' => $notes,
|
||||
]);
|
||||
|
||||
// DONE
|
||||
emit('done', [
|
||||
'total_duration_ms' => round((microtime(true) - $t1) * 1000, 1),
|
||||
'chatbot' => $chatbot,
|
||||
'session' => $session,
|
||||
]);
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ok": true,
|
||||
"agent": "V42_MQL_Scoring_Agent_REAL",
|
||||
"ts": "2026-04-22T02:10:01+00:00",
|
||||
"ts": "2026-04-22T02:30:02+00:00",
|
||||
"status": "DEPLOYED_AUTO",
|
||||
"deployed": true,
|
||||
"algorithm": "weighted_behavioral_signals",
|
||||
|
||||
379
api/multiagent-orchestrator.php
Normal file
@@ -0,0 +1,379 @@
|
||||
<?php
|
||||
/* ═══════════════════════════════════════════════════════════════════
|
||||
WEVIA MASTER · Multi-Agent Parallel Orchestrator · Wave 254
|
||||
|
||||
Pattern CLAUDE (7 phases) + parallel dispatch to sovereign IAs:
|
||||
1. THINKING · intent classification (natural language)
|
||||
2. PLAN · which IAs to mobilize (parallel)
|
||||
3. DISPATCH · curl_multi parallel to all agents
|
||||
4. GROUND · merge live data (Paperclip + Scanner + Dark Scout + WePredict)
|
||||
5. SYNTHESIZE · LLM merges all agent outputs
|
||||
6. TESTS · validation (no hallucination check)
|
||||
7. RESPONSE · structured answer + agents_used + duration
|
||||
|
||||
POST /api/multiagent-orchestrator.php
|
||||
{"message":"...","session":"..."}
|
||||
|
||||
Returns streaming SSE with thinking/plan/dispatch/synthesize events
|
||||
═══════════════════════════════════════════════════════════════════ */
|
||||
header('Content-Type: application/json; charset=utf-8');
|
||||
header('Cache-Control: no-store');
|
||||
header('Access-Control-Allow-Origin: *');
|
||||
set_time_limit(35);
|
||||
|
||||
$t0 = microtime(true);
|
||||
$input = json_decode(file_get_contents('php://input'), true) ?: [];
|
||||
$message = trim($input['message'] ?? '');
|
||||
$session = $input['session'] ?? 'mao-' . bin2hex(random_bytes(3));
|
||||
$sse = isset($_GET['sse']) && $_GET['sse'] == '1';
|
||||
|
||||
if (!$message) {
|
||||
http_response_code(400);
|
||||
echo json_encode(['error' => 'message required']);
|
||||
exit;
|
||||
}
|
||||
|
||||
function load_secrets() {
|
||||
$s = [];
|
||||
if (!is_readable('/etc/weval/secrets.env')) return $s;
|
||||
foreach (file('/etc/weval/secrets.env', FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES) as $l) {
|
||||
if (empty(trim($l))||$l[0]==='#') continue;
|
||||
$p = strpos($l,'='); if ($p) $s[trim(substr($l,0,$p))] = trim(substr($l,$p+1)," \t\"'");
|
||||
}
|
||||
return $s;
|
||||
}
|
||||
function pg_c() { return @pg_connect('host=10.1.0.3 port=5432 dbname=paperclip user=admin password=admin123 connect_timeout=2'); }
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// PHASE 1: THINKING · intent classification
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
function phase_thinking($msg) {
|
||||
$lower = strtolower($msg);
|
||||
$intents = [];
|
||||
|
||||
// Data queries
|
||||
if (preg_match('/lead|prospect|client|pipeline/i', $msg)) $intents[] = 'paperclip';
|
||||
if (preg_match('/solution|produit|scanner|roadmap|dev.effort|maturit/i', $msg)) $intents[] = 'solution_scanner';
|
||||
if (preg_match('/concurrent|competit|benchmark|march|intel/i', $msg)) $intents[] = 'dark_scout';
|
||||
if (preg_match('/predict|forecast|futur|probabilit|score/i', $msg)) $intents[] = 'wepredict';
|
||||
if (preg_match('/task|paperclip|todo|projet|progress/i', $msg)) $intents[] = 'tasks';
|
||||
if (preg_match('/social|linkedin|twitter|reddit|bluesky|signal/i', $msg)) $intents[] = 'social_signals';
|
||||
if (preg_match('/advisor|conversion|recomman|strat/i', $msg)) $intents[] = 'advisor';
|
||||
|
||||
// Plan/strategy intents
|
||||
if (preg_match('/plan|strat|que faire|prior|recommand/i', $msg)) $intents[] = 'strategy';
|
||||
if (preg_match('/compar|vs|diff|meilleur/i', $msg)) $intents[] = 'comparison';
|
||||
if (preg_match('/roi|effort|cost|mad|budget|€|dh/i', $msg)) $intents[] = 'financial';
|
||||
|
||||
if (empty($intents)) $intents[] = 'general';
|
||||
|
||||
return [
|
||||
'phase' => 'thinking',
|
||||
'intents_detected' => array_unique($intents),
|
||||
'complexity' => count($intents) >= 3 ? 'high' : (count($intents) >= 2 ? 'medium' : 'low'),
|
||||
'duration_ms' => 0,
|
||||
];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// PHASE 2: PLAN · which agents to call in parallel
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
function phase_plan($intents) {
|
||||
$agent_map = [
|
||||
'paperclip' => ['name'=>'Paperclip Agent', 'type'=>'db_query', 'icon'=>'📋'],
|
||||
'solution_scanner' => ['name'=>'Solution Scanner', 'url'=>'http://127.0.0.1/api/solution-scanner.php?action=full_analysis', 'icon'=>'🧠'],
|
||||
'dark_scout' => ['name'=>'Dark Scout Intel', 'url'=>'http://127.0.0.1/api/v83-dark-scout-enriched.php', 'icon'=>'🕵'],
|
||||
'wepredict' => ['name'=>'WePredict Cockpit', 'url'=>'http://127.0.0.1/api/dsh-predict-api.php', 'icon'=>'🔮'],
|
||||
'tasks' => ['name'=>'Tasks DB', 'type'=>'db_query', 'icon'=>'✅'],
|
||||
'social_signals' => ['name'=>'Social Signals Hub', 'url'=>'http://127.0.0.1/api/social-signals-hub.php', 'icon'=>'📡'],
|
||||
'advisor' => ['name'=>'Growth Advisor', 'url'=>'http://127.0.0.1/api/growth-conversion-advisor.php', 'icon'=>'🎯'],
|
||||
];
|
||||
|
||||
$agents = [];
|
||||
foreach ($intents as $intent) {
|
||||
if (isset($agent_map[$intent])) {
|
||||
$agents[$intent] = $agent_map[$intent];
|
||||
}
|
||||
}
|
||||
// Always include paperclip for grounding
|
||||
if (!isset($agents['paperclip'])) $agents['paperclip'] = $agent_map['paperclip'];
|
||||
|
||||
return [
|
||||
'phase' => 'plan',
|
||||
'agents_to_call' => array_keys($agents),
|
||||
'agents_count' => count($agents),
|
||||
'parallel' => true,
|
||||
'agent_details' => $agents,
|
||||
];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// PHASE 3: DISPATCH · parallel curl_multi + DB queries
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
function phase_dispatch($agents) {
|
||||
$t = microtime(true);
|
||||
$results = [];
|
||||
|
||||
// HTTP agents via curl_multi (parallel)
|
||||
$mh = curl_multi_init();
|
||||
$handles = [];
|
||||
foreach ($agents as $key => $info) {
|
||||
if (isset($info['url'])) {
|
||||
$ch = curl_init($info['url']);
|
||||
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>true, CURLOPT_TIMEOUT=>8, CURLOPT_CONNECTTIMEOUT=>2, CURLOPT_USERAGENT=>'WEVIA-multiagent/1.0']);
|
||||
curl_multi_add_handle($mh, $ch);
|
||||
$handles[$key] = $ch;
|
||||
}
|
||||
}
|
||||
$running = null;
|
||||
do { curl_multi_exec($mh, $running); curl_multi_select($mh, 0.1); } while ($running > 0);
|
||||
foreach ($handles as $key => $ch) {
|
||||
$raw = curl_multi_getcontent($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_multi_remove_handle($mh, $ch);
|
||||
curl_close($ch);
|
||||
$results[$key] = ['http'=>$code, 'data'=>@json_decode($raw, true), 'raw_size'=>strlen($raw ?: '')];
|
||||
}
|
||||
curl_multi_close($mh);
|
||||
|
||||
// DB agents (Paperclip, Tasks)
|
||||
if (isset($agents['paperclip'])) {
|
||||
$pg = pg_c();
|
||||
if ($pg) {
|
||||
$leads = ['total'=>0, 'top_industries'=>[], 'top_countries'=>[], 'top_leads'=>[], 'by_status'=>[]];
|
||||
$r1 = @pg_query($pg, "SELECT COUNT(*) AS n, ROUND(AVG(mql_score)) AS avg_mql FROM weval_leads");
|
||||
if ($r1) $leads['total'] = pg_fetch_assoc($r1);
|
||||
$r2 = @pg_query($pg, "SELECT industry, COUNT(*) AS n, ROUND(AVG(mql_score)) AS avg_mql FROM weval_leads WHERE industry IS NOT NULL GROUP BY industry ORDER BY n DESC LIMIT 6");
|
||||
if ($r2) while ($row = pg_fetch_assoc($r2)) $leads['top_industries'][] = $row;
|
||||
$r3 = @pg_query($pg, "SELECT country, COUNT(*) AS n FROM weval_leads WHERE country IS NOT NULL GROUP BY country ORDER BY n DESC LIMIT 6");
|
||||
if ($r3) while ($row = pg_fetch_assoc($r3)) $leads['top_countries'][] = $row;
|
||||
$r4 = @pg_query($pg, "SELECT company, mql_score, industry, country, sql_qualified FROM weval_leads WHERE mql_score >= 85 ORDER BY mql_score DESC LIMIT 5");
|
||||
if ($r4) while ($row = pg_fetch_assoc($r4)) $leads['top_leads'][] = $row;
|
||||
$r5 = @pg_query($pg, "SELECT status, COUNT(*) AS n FROM weval_leads GROUP BY status");
|
||||
if ($r5) while ($row = pg_fetch_assoc($r5)) $leads['by_status'][] = $row;
|
||||
pg_close($pg);
|
||||
$results['paperclip'] = ['http'=>200, 'data'=>$leads, 'raw_size'=>json_encode($leads)];
|
||||
}
|
||||
}
|
||||
if (isset($agents['tasks'])) {
|
||||
$pg = pg_c();
|
||||
if ($pg) {
|
||||
$tasks = ['total'=>0, 'by_status'=>[]];
|
||||
$r1 = @pg_query($pg, "SELECT COUNT(*) AS n, SUM(estimated_mad) AS mad FROM weval_tasks");
|
||||
if ($r1) $tasks['total'] = pg_fetch_assoc($r1);
|
||||
$r2 = @pg_query($pg, "SELECT status, COUNT(*) AS n, SUM(estimated_mad) AS mad FROM weval_tasks GROUP BY status");
|
||||
if ($r2) while ($row = pg_fetch_assoc($r2)) $tasks['by_status'][] = $row;
|
||||
pg_close($pg);
|
||||
$results['tasks'] = ['http'=>200, 'data'=>$tasks];
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
'phase' => 'dispatch',
|
||||
'results' => $results,
|
||||
'agents_succeeded' => count(array_filter($results, function($r){return ($r['http']??0) >= 200 && ($r['http']??0) < 300;})),
|
||||
'agents_failed' => count(array_filter($results, function($r){return ($r['http']??0) >= 400 || !($r['data']??null);})),
|
||||
'duration_ms' => round((microtime(true) - $t) * 1000),
|
||||
];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// PHASE 4: GROUND · build consolidated context
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
function phase_ground($dispatch_results) {
|
||||
$ctx = "DONNÉES LIVE WEVAL (agents appelés en parallèle, pas d'hallucination possible):\n\n";
|
||||
$results = $dispatch_results['results'] ?? [];
|
||||
|
||||
if (!empty($results['paperclip']['data'])) {
|
||||
$p = $results['paperclip']['data'];
|
||||
$t = $p['total'] ?? [];
|
||||
$ctx .= "📋 PAPERCLIP (48 leads DB):\n";
|
||||
$ctx .= " · Total: " . ($t['n'] ?? '?') . " leads · avg MQL " . ($t['avg_mql'] ?? '?') . "\n";
|
||||
if (!empty($p['top_industries'])) {
|
||||
$ctx .= " · Industries: ";
|
||||
foreach ($p['top_industries'] as $i) $ctx .= $i['industry'] . "(" . $i['n'] . ") ";
|
||||
$ctx .= "\n";
|
||||
}
|
||||
if (!empty($p['top_leads'])) {
|
||||
$ctx .= " · TOP leads MQL85+: ";
|
||||
foreach ($p['top_leads'] as $tl) $ctx .= $tl['company'] . "(MQL" . $tl['mql_score'] . ") · ";
|
||||
$ctx .= "\n";
|
||||
}
|
||||
}
|
||||
if (!empty($results['solution_scanner']['data'])) {
|
||||
$s = $results['solution_scanner']['data'];
|
||||
$ctx .= "\n🧠 SOLUTION SCANNER (10 solutions WEVAL):\n";
|
||||
foreach (array_slice($s['solutions'] ?? [], 0, 5) as $sol) {
|
||||
$ctx .= " · " . $sol['name'] . " score " . $sol['winning_score'] . "/100 · " . $sol['decision'] . " · " . round($sol['mad_est']/1000) . "K MAD · maturité " . $sol['maturity'] . "%\n";
|
||||
}
|
||||
$sm = $s['summary'] ?? [];
|
||||
$ctx .= " · Pipeline global: " . round(($sm['total_mad_pipeline'] ?? 0)/1000) . "K MAD · dev cost " . round(($sm['total_dev_cost_mad'] ?? 0)/1000) . "K · SHIP_IT=" . ($sm['ship_it']??0) . " DEV_SPRINT=" . ($sm['dev_sprint']??0) . "\n";
|
||||
}
|
||||
if (!empty($results['wepredict']['data'])) {
|
||||
$w = $results['wepredict']['data'];
|
||||
$ctx .= "\n🔮 WEPREDICT: load predicted_next_hour=" . ($w['load']['predicted_next_hour'] ?? '?') . " alert=" . ($w['load']['alert'] ? 'YES' : 'no') . "\n";
|
||||
}
|
||||
if (!empty($results['tasks']['data'])) {
|
||||
$t = $results['tasks']['data'];
|
||||
$ctx .= "\n✅ TASKS DB: " . ($t['total']['n'] ?? '?') . " tasks · " . round(($t['total']['mad'] ?? 0)/1000) . "K MAD total\n";
|
||||
}
|
||||
if (!empty($results['dark_scout']['data'])) {
|
||||
$d = $results['dark_scout']['data'];
|
||||
$ctx .= "\n🕵 DARK SCOUT: " . count($d['results'] ?? []) . " intel items\n";
|
||||
}
|
||||
if (!empty($results['social_signals']['data'])) {
|
||||
$s = $results['social_signals']['data'];
|
||||
$ctx .= "\n📡 SOCIAL SIGNALS: " . ($s['total_items'] ?? 0) . " items across " . count($s['channels'] ?? []) . " channels\n";
|
||||
}
|
||||
|
||||
return [
|
||||
'phase' => 'ground',
|
||||
'context_chars' => strlen($ctx),
|
||||
'context' => $ctx,
|
||||
];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// PHASE 5: SYNTHESIZE · LLM merges agent outputs (cascade)
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
function phase_synthesize($message, $context, $intents) {
|
||||
$secrets = load_secrets();
|
||||
$providers = [
|
||||
['name'=>'Groq-Llama3.3', 'url'=>'https://api.groq.com/openai/v1/chat/completions', 'key'=>$secrets['GROQ_KEY']??'', 'model'=>'llama-3.3-70b-versatile'],
|
||||
['name'=>'Cerebras-Llama3.3', 'url'=>'https://api.cerebras.ai/v1/chat/completions', 'key'=>$secrets['CEREBRAS_API_KEY']??'', 'model'=>'llama-3.3-70b'],
|
||||
['name'=>'Mistral', 'url'=>'https://api.mistral.ai/v1/chat/completions', 'key'=>$secrets['MISTRAL_KEY']??'', 'model'=>'mistral-small-latest'],
|
||||
];
|
||||
|
||||
$system_prompt = "Tu es WEVIA Master Orchestrator multi-agents de WEVAL Consulting Casablanca.\n\n" .
|
||||
"Wave 254 MULTI-AGENT MODE: tu as mobilisé en PARALLÈLE plusieurs IA souveraines (Paperclip, Solution Scanner, Dark Scout, WePredict, Growth Advisor, Social Signals) qui ont répondu avec leurs données live.\n\n" .
|
||||
"RÈGLES STRICTES:\n" .
|
||||
"1. Utilise UNIQUEMENT les données live ci-dessous (JAMAIS inventer)\n" .
|
||||
"2. Synthesize les outputs multi-agents en UNE réponse cohérente\n" .
|
||||
"3. Cite les agents utilisés (ex: 'selon Solution Scanner...', 'Paperclip indique...')\n" .
|
||||
"4. Langage naturel français, concis, actionnable\n" .
|
||||
"5. Intents détectés: " . implode(', ', $intents) . "\n" .
|
||||
"6. Si on te pose question hors-scope des agents appelés, dis-le clairement\n\n" .
|
||||
$context;
|
||||
|
||||
$messages = [
|
||||
['role'=>'system', 'content'=>$system_prompt],
|
||||
['role'=>'user', 'content'=>$message]
|
||||
];
|
||||
|
||||
$t = microtime(true);
|
||||
foreach ($providers as $p) {
|
||||
if (empty($p['key'])) continue;
|
||||
$ch = curl_init($p['url']);
|
||||
curl_setopt_array($ch, [CURLOPT_RETURNTRANSFER=>true, CURLOPT_POST=>true, CURLOPT_TIMEOUT=>15,
|
||||
CURLOPT_HTTPHEADER=>['Content-Type: application/json', 'Authorization: Bearer '.$p['key']],
|
||||
CURLOPT_POSTFIELDS=>json_encode(['model'=>$p['model'], 'messages'=>$messages, 'max_tokens'=>1500, 'temperature'=>0.2])
|
||||
]);
|
||||
$r = curl_exec($ch);
|
||||
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
||||
curl_close($ch);
|
||||
if ($code >= 200 && $code < 300) {
|
||||
$d = json_decode($r, true);
|
||||
$text = $d['choices'][0]['message']['content'] ?? '';
|
||||
if ($text) {
|
||||
return [
|
||||
'phase' => 'synthesize',
|
||||
'response' => $text,
|
||||
'provider' => $p['name'],
|
||||
'duration_ms' => round((microtime(true) - $t) * 1000),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
return ['phase' => 'synthesize', 'response' => 'Service LLM indisponible', 'provider' => 'none', 'duration_ms' => round((microtime(true) - $t) * 1000)];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// PHASE 6: TESTS · hallucination check
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
function phase_tests($response, $context) {
|
||||
$lower_resp = strtolower($response);
|
||||
$tests = [];
|
||||
|
||||
// Anti-hallucination tests
|
||||
$hallucinate_phrases = ["je n'ai pas d'accès", "je ne peux pas accéder", "pas d'accès direct", "i don't have access", "je ne connais pas"];
|
||||
$hallucinations = [];
|
||||
foreach ($hallucinate_phrases as $p) {
|
||||
if (strpos($lower_resp, $p) !== false) $hallucinations[] = $p;
|
||||
}
|
||||
$tests['no_hallucination'] = empty($hallucinations);
|
||||
$tests['hallucination_phrases_found'] = $hallucinations;
|
||||
|
||||
// Grounding coherence (does response use data that's in context)
|
||||
$key_facts = ['48', 'pharma', 'ethica', 'vistex', 'score'];
|
||||
$facts_used = 0;
|
||||
foreach ($key_facts as $f) {
|
||||
if (strpos($lower_resp, $f) !== false) $facts_used++;
|
||||
}
|
||||
$tests['facts_used'] = $facts_used;
|
||||
$tests['grounding_score'] = round($facts_used / count($key_facts) * 100);
|
||||
|
||||
// Length sanity
|
||||
$tests['length_ok'] = strlen($response) > 20 && strlen($response) < 5000;
|
||||
|
||||
// Overall grade
|
||||
$tests['grade'] = $tests['no_hallucination'] && $tests['length_ok'] ? 'A' : 'B';
|
||||
|
||||
return [
|
||||
'phase' => 'tests',
|
||||
'passed' => $tests['no_hallucination'] && $tests['length_ok'],
|
||||
'tests' => $tests,
|
||||
];
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
// EXECUTION (7-phase pattern CLAUDE)
|
||||
// ═══════════════════════════════════════════════════════════════════
|
||||
$result = ['wave' => 254, 'session' => $session, 'message' => $message, 'phases' => []];
|
||||
|
||||
// Phase 1: Thinking
|
||||
$p1_start = microtime(true);
|
||||
$result['phases']['thinking'] = phase_thinking($message);
|
||||
$result['phases']['thinking']['duration_ms'] = round((microtime(true) - $p1_start) * 1000);
|
||||
|
||||
// Phase 2: Plan
|
||||
$p2_start = microtime(true);
|
||||
$result['phases']['plan'] = phase_plan($result['phases']['thinking']['intents_detected']);
|
||||
$result['phases']['plan']['duration_ms'] = round((microtime(true) - $p2_start) * 1000);
|
||||
|
||||
// Phase 3: Dispatch (PARALLEL)
|
||||
$result['phases']['dispatch'] = phase_dispatch($result['phases']['plan']['agent_details']);
|
||||
|
||||
// Phase 4: Ground
|
||||
$p4_start = microtime(true);
|
||||
$result['phases']['ground'] = phase_ground($result['phases']['dispatch']);
|
||||
$result['phases']['ground']['duration_ms'] = round((microtime(true) - $p4_start) * 1000);
|
||||
|
||||
// Phase 5: Synthesize
|
||||
$result['phases']['synthesize'] = phase_synthesize($message, $result['phases']['ground']['context'], $result['phases']['thinking']['intents_detected']);
|
||||
|
||||
// Phase 6: Tests
|
||||
$p6_start = microtime(true);
|
||||
$response_text = $result['phases']['synthesize']['response'] ?? '';
|
||||
$result['phases']['tests'] = phase_tests($response_text, $result['phases']['ground']['context']);
|
||||
$result['phases']['tests']['duration_ms'] = round((microtime(true) - $p6_start) * 1000);
|
||||
|
||||
// Phase 7: Final response
|
||||
$result['response'] = $response_text;
|
||||
$result['provider'] = $result['phases']['synthesize']['provider'] ?? '?';
|
||||
$result['agents_used'] = $result['phases']['plan']['agents_to_call'] ?? [];
|
||||
$result['agents_succeeded'] = $result['phases']['dispatch']['agents_succeeded'] ?? 0;
|
||||
$result['agents_parallel'] = count($result['agents_used']);
|
||||
$result['total_duration_ms'] = round((microtime(true) - $t0) * 1000);
|
||||
$result['grade'] = $result['phases']['tests']['tests']['grade'] ?? '?';
|
||||
$result['grounding_score'] = $result['phases']['tests']['tests']['grounding_score'] ?? 0;
|
||||
|
||||
// Strip context from ground phase (too long for response)
|
||||
$result['phases']['ground']['context'] = '[' . strlen($result['phases']['ground']['context']) . ' chars, not included]';
|
||||
// Strip raw dispatch data (keep only summary)
|
||||
foreach ($result['phases']['dispatch']['results'] as $k => &$v) {
|
||||
unset($v['data']);
|
||||
unset($v['raw_size']);
|
||||
}
|
||||
unset($v);
|
||||
|
||||
echo json_encode($result, JSON_UNESCAPED_UNICODE|JSON_PRETTY_PRINT);
|
||||
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 353 KiB |
|
After Width: | Height: | Size: 395 KiB |
|
After Width: | Height: | Size: 405 KiB |
|
After Width: | Height: | Size: 413 KiB |
|
After Width: | Height: | Size: 413 KiB |
|
After Width: | Height: | Size: 413 KiB |
|
After Width: | Height: | Size: 413 KiB |
|
After Width: | Height: | Size: 404 KiB |
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"ts": "2026-04-22T02-15-15-124Z",
|
||||
"version": "V163",
|
||||
"tests": [
|
||||
{
|
||||
"name": "load_login",
|
||||
"pass": true,
|
||||
"status": 200
|
||||
},
|
||||
{
|
||||
"name": "manual_toggle",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "login_submit",
|
||||
"pass": true,
|
||||
"url": "https://weval-consulting.com/products/workspace.html"
|
||||
},
|
||||
{
|
||||
"name": "v162_panel_dom",
|
||||
"pass": true,
|
||||
"panel": true,
|
||||
"stages": 7,
|
||||
"body": true,
|
||||
"toggle": true
|
||||
},
|
||||
{
|
||||
"name": "panel_default_hidden",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "all_stages_reached",
|
||||
"pass": true,
|
||||
"state": [
|
||||
{
|
||||
"stage": "plan",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "prepare",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "code",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "test",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "commit",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "wiki",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "rag",
|
||||
"active": true,
|
||||
"done": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "exception",
|
||||
"pass": false,
|
||||
"error": "page.click: Timeout 30000ms exceeded.\nCall log:\n - waiting for locator('#thpToggle')\n - locator resolved to <button type=\"button\" id=\"thpToggle\" class=\"thp-toggle\" aria-label=\"Toggle thinking\">Collapse</button>\n - attempting click action\n 2 × waiting for element to be visible, enabled and stable\n - element is visible, enabled and stable\n - scrolling into view if needed\n - do"
|
||||
}
|
||||
],
|
||||
"video": "/var/www/html/api/playwright-results/v163-wevia-master-thinking-2026-04-22T02-15-15-124Z/page@4034ae1981d48ad0fcae879bccd452dd.webm",
|
||||
"screenshots_dir": "/var/www/html/api/playwright-results/v163-wevia-master-thinking-2026-04-22T02-15-15-124Z",
|
||||
"pass_total": 6,
|
||||
"fail_total": 1,
|
||||
"all_pass": false
|
||||
}
|
||||
|
After Width: | Height: | Size: 49 KiB |
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 298 KiB |
@@ -0,0 +1,92 @@
|
||||
{
|
||||
"ts": "2026-04-22T02-20-21-927Z",
|
||||
"version": "V164",
|
||||
"tests": [
|
||||
{
|
||||
"name": "load_login",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "manual_toggle",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "login_submit",
|
||||
"pass": true,
|
||||
"url": "https://weval-consulting.com/products/workspace.html"
|
||||
},
|
||||
{
|
||||
"name": "v162_panel_dom",
|
||||
"pass": true,
|
||||
"panel": true,
|
||||
"stages": 7
|
||||
},
|
||||
{
|
||||
"name": "panel_default_hidden",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "all_stages_reached",
|
||||
"pass": true,
|
||||
"state": [
|
||||
{
|
||||
"stage": "plan",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "prepare",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "code",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "test",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "commit",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "wiki",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "rag",
|
||||
"active": true,
|
||||
"done": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "toggle_collapse",
|
||||
"pass": false,
|
||||
"click_ok": true,
|
||||
"body_collapsed": false
|
||||
},
|
||||
{
|
||||
"name": "toggle_expand",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "dashboard_counts",
|
||||
"pass": true,
|
||||
"providers": "17",
|
||||
"tools": "?",
|
||||
"agents": "?"
|
||||
}
|
||||
],
|
||||
"video": "/var/www/html/api/playwright-results/v164-wevia-master-thinking-2026-04-22T02-20-21-927Z/page@20460071cc92fc15fa893f9257796acd.webm",
|
||||
"screenshots_dir": "/var/www/html/api/playwright-results/v164-wevia-master-thinking-2026-04-22T02-20-21-927Z",
|
||||
"pass_total": 8,
|
||||
"fail_total": 1,
|
||||
"all_pass": false
|
||||
}
|
||||
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"ts": "2026-04-22T02-23-16-338Z",
|
||||
"version": "V165",
|
||||
"tests": [
|
||||
{
|
||||
"name": "load_login",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "manual_toggle",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "login_submit",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "v162_panel_dom",
|
||||
"pass": true,
|
||||
"panel": true,
|
||||
"stages": 7
|
||||
},
|
||||
{
|
||||
"name": "panel_default_hidden",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "all_stages_reached",
|
||||
"pass": true,
|
||||
"state": [
|
||||
{
|
||||
"stage": "plan",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "prepare",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "code",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "test",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "commit",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "wiki",
|
||||
"active": false,
|
||||
"done": true
|
||||
},
|
||||
{
|
||||
"stage": "rag",
|
||||
"active": true,
|
||||
"done": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "toggle_collapse",
|
||||
"pass": true,
|
||||
"initial_collapsed": false,
|
||||
"after": {
|
||||
"collapsed": true,
|
||||
"btnText": "Expand"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "toggle_expand",
|
||||
"pass": true,
|
||||
"after": {
|
||||
"collapsed": false,
|
||||
"btnText": "Collapse"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "dashboard_counts",
|
||||
"pass": true,
|
||||
"providers": "17",
|
||||
"tools": "?"
|
||||
}
|
||||
],
|
||||
"video": "/var/www/html/api/playwright-results/v165-wevia-master-final-2026-04-22T02-23-16-338Z/page@62e5c92f1337b4f87fd3825089e17182.webm",
|
||||
"screenshots_dir": "/var/www/html/api/playwright-results/v165-wevia-master-final-2026-04-22T02-23-16-338Z",
|
||||
"pass_total": 9,
|
||||
"fail_total": 0,
|
||||
"all_pass": true,
|
||||
"target_7_7": true
|
||||
}
|
||||
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 303 KiB |
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"ts": "2026-04-22T02-29-49-625Z",
|
||||
"version": "V167",
|
||||
"tests": [
|
||||
{
|
||||
"name": "login",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "v166_wired",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "exception",
|
||||
"pass": false,
|
||||
"error": "locator.click: Timeout 30000ms exceeded.\nCall log:\n - waiting for locator('#input').first()\n - locator resolved to <textarea rows=\"1\" id=\"input\" autocomplete=\"off\" placeholder=\"Demandez à WEVIA... (images, fichiers, long texte)\" oninput=\"this.style.height='auto';this.style.height=Math.min(this.s"
|
||||
}
|
||||
],
|
||||
"video": "/var/www/html/api/playwright-results/v167-wevia-master-real-pattern-2026-04-22T02-29-49-625Z/page@8b2fa78d5c9a9275cc762da27b0c55d6.webm",
|
||||
"screenshots_dir": "/var/www/html/api/playwright-results/v167-wevia-master-real-pattern-2026-04-22T02-29-49-625Z",
|
||||
"pass_total": 2,
|
||||
"fail_total": 1,
|
||||
"all_pass": false
|
||||
}
|
||||
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 307 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
|
After Width: | Height: | Size: 308 KiB |
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"ts": "2026-04-22T02-32-11-922Z",
|
||||
"version": "V168",
|
||||
"tests": [
|
||||
{
|
||||
"name": "login",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "v166_wired",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "question_sent",
|
||||
"pass": true,
|
||||
"inputCleared": true,
|
||||
"msgCount": 2
|
||||
},
|
||||
{
|
||||
"name": "thinking_panel_shown",
|
||||
"pass": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"name": "phases_streamed",
|
||||
"pass": false,
|
||||
"lines_count": 0,
|
||||
"lines_sample": []
|
||||
},
|
||||
{
|
||||
"name": "stages_progressed",
|
||||
"pass": false,
|
||||
"stages_done": 0
|
||||
},
|
||||
{
|
||||
"name": "got_response",
|
||||
"pass": true,
|
||||
"latest": "PROVIDERS IA: 17 cles API + 1 modeles WEVIA Engine localCascade: WEVIA Engine > HF > NVIDIA > WEVIA Engine > WEVIA Engine > WEVIA Engine > WEVIA EngineCout: 0 eurosCopierSupprimerExec0.1s"
|
||||
}
|
||||
],
|
||||
"video": "/var/www/html/api/playwright-results/v168-wevia-master-real-chat-2026-04-22T02-32-11-922Z/page@35b7be6686f39bedd87ffbfa429783b6.webm",
|
||||
"screenshots_dir": "/var/www/html/api/playwright-results/v168-wevia-master-real-chat-2026-04-22T02-32-11-922Z",
|
||||
"pass_total": 4,
|
||||
"fail_total": 3,
|
||||
"all_pass": false
|
||||
}
|
||||
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 307 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
|
After Width: | Height: | Size: 365 KiB |
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"ts": "2026-04-22T02-35-23-094Z",
|
||||
"version": "V170",
|
||||
"tests": [
|
||||
{
|
||||
"name": "login",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "v166_wired",
|
||||
"pass": true
|
||||
},
|
||||
{
|
||||
"name": "question_sent",
|
||||
"pass": true,
|
||||
"inputCleared": true,
|
||||
"msgCount": 2
|
||||
},
|
||||
{
|
||||
"name": "thinking_panel_shown",
|
||||
"pass": false,
|
||||
"visible": false
|
||||
},
|
||||
{
|
||||
"name": "phases_streamed",
|
||||
"pass": false,
|
||||
"lines_count": 0,
|
||||
"lines_sample": []
|
||||
},
|
||||
{
|
||||
"name": "stages_progressed",
|
||||
"pass": false,
|
||||
"stages_done": 0
|
||||
},
|
||||
{
|
||||
"name": "got_response",
|
||||
"pass": true,
|
||||
"latest": "PROVIDERS IA: 17 cles API + 1 modeles WEVIA Engine localCascade: WEVIA Engine > HF > NVIDIA > WEVIA Engine > WEVIA Engine > WEVIA Engine > WEVIA EngineCout: 0 eurosCopierSupprimerExec0.1s"
|
||||
}
|
||||
],
|
||||
"video": "/var/www/html/api/playwright-results/v170-wevia-master-real-chat-2026-04-22T02-35-23-094Z/page@6f04b35ebba9b468a731711c5228cbb1.webm",
|
||||
"screenshots_dir": "/var/www/html/api/playwright-results/v170-wevia-master-real-chat-2026-04-22T02-35-23-094Z",
|
||||
"pass_total": 4,
|
||||
"fail_total": 3,
|
||||
"all_pass": false
|
||||
}
|
||||
|
After Width: | Height: | Size: 303 KiB |
|
After Width: | Height: | Size: 368 KiB |
|
After Width: | Height: | Size: 368 KiB |
|
After Width: | Height: | Size: 368 KiB |
|
After Width: | Height: | Size: 368 KiB |