auto-sync-0300
This commit is contained in:
@@ -160,6 +160,20 @@ footer{padding:8px 18px;background:var(--bg2);border-top:1px solid var(--rim);fo
|
||||
<!-- CAPABILITIES -->
|
||||
<section class="view" id="v-caps">
|
||||
<div class="caps-grid" id="caps-grid">
|
||||
<!-- V111-BLADE-ENRICH: live blade tasks + quick actions -->
|
||||
<div class="cap" style="grid-column:1 / -1;background:linear-gradient(135deg,#1e293b,#0f172a);border-color:var(--cy)">
|
||||
<h3>📸 Blade Tasks Queue — Chrome yacineutt pilote temps-reel</h3>
|
||||
<p style="margin-bottom:10px">Tasks pending: <b id="blade-pending">...</b> · Tasks done: <b id="blade-done">...</b> · MCP port 8765 Bearer actif</p>
|
||||
<div style="display:flex;gap:6px;flex-wrap:wrap;margin-top:8px">
|
||||
<button class="mode" onclick="pushBladeTask(\'office_create\',{})">+ Office Create</button>
|
||||
<button class="mode" onclick="pushBladeTask(\'deepseek_renew\',{})">+ DeepSeek Renew</button>
|
||||
<button class="mode" onclick="pushBladeTask(\'thuggie_login\',{})">+ Thuggie Login</button>
|
||||
<button class="mode" onclick="pushBladeTask(\'token_github_renew\',{})">+ GitHub Token</button>
|
||||
<button class="mode" onclick="pushBladeTask(\'token_whatsapp_renew\',{})">+ WhatsApp Token</button>
|
||||
<button class="mode" onclick="refreshBladeStats()">Refresh</button>
|
||||
</div>
|
||||
<div id="blade-log" style="margin-top:10px;font-size:10px;color:var(--mu);max-height:120px;overflow-y:auto;background:var(--bg3);padding:8px;border-radius:4px;display:none"></div>
|
||||
</div>
|
||||
<div class="cap">
|
||||
<h3>🌐 DeepSeek Web Access</h3>
|
||||
<p>DeepSeek R1 reasoning + V3 chat · acces cookies + API · session rotee auto · gratuit via Thuggie Web integration.</p>
|
||||
@@ -512,6 +526,45 @@ document.querySelectorAll('.inp').forEach(i=>{
|
||||
});
|
||||
});
|
||||
|
||||
// V111-BLADE-ENRICH: live blade tasks stats + push actions
|
||||
async function refreshBladeStats(){
|
||||
try{
|
||||
const r=await fetch('/api/blade-task-create.php?k=WEVADS2026&action=list');
|
||||
const d=await r.json();
|
||||
const pending=(d.tasks||[]).filter(t=>t.status==='pending').length;
|
||||
const done=(d.tasks||[]).filter(t=>t.status==='done').length;
|
||||
const bp=document.getElementById('blade-pending');
|
||||
const bd=document.getElementById('blade-done');
|
||||
if(bp) bp.textContent=pending;
|
||||
if(bd) bd.textContent=done;
|
||||
}catch(e){
|
||||
const bp=document.getElementById('blade-pending');
|
||||
if(bp) bp.textContent='?';
|
||||
}
|
||||
}
|
||||
|
||||
async function pushBladeTask(goal, params){
|
||||
const log=document.getElementById('blade-log');
|
||||
if(log){log.style.display='block';log.innerHTML+='\n> Pushing task: '+goal+'...';}
|
||||
try{
|
||||
const fd=new FormData();
|
||||
fd.append('k','WEVADS2026');
|
||||
fd.append('action','create');
|
||||
fd.append('goal',goal);
|
||||
fd.append('params',JSON.stringify(params||{}));
|
||||
const r=await fetch('/api/blade-task-create.php',{method:'POST',body:fd});
|
||||
const d=await r.json();
|
||||
if(log){log.innerHTML+='\n> '+(d.ok?'\u2705 Task created: '+d.id:'\u274c '+(d.error||'failed'));log.scrollTop=log.scrollHeight;}
|
||||
setTimeout(refreshBladeStats,500);
|
||||
}catch(e){
|
||||
if(log) log.innerHTML+='\n> \u274c Error: '+e.message;
|
||||
}
|
||||
}
|
||||
|
||||
// auto-refresh blade stats every 30s when capabilities tab visible
|
||||
setInterval(()=>{ if(document.getElementById('v-caps').classList.contains('on')) refreshBladeStats(); },30000);
|
||||
setTimeout(refreshBladeStats, 1500);
|
||||
|
||||
// Live stats
|
||||
async function refreshStats(){
|
||||
try{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"agent": "V41_Disk_Monitor",
|
||||
"ts": "2026-04-21T02:30:01+02:00",
|
||||
"ts": "2026-04-21T03:00:01+02:00",
|
||||
"disk_pct": 79,
|
||||
"disk_free_gb": 32,
|
||||
"growth_per_day_gb": 1.5,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"generated_at": "2026-04-21T02:55:01.972735",
|
||||
"generated_at": "2026-04-21T03:00:01.640437",
|
||||
"stats": {
|
||||
"total": 35,
|
||||
"pending": 20,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"status": "ALIVE",
|
||||
"ts": "2026-04-21T02:45:02.142250",
|
||||
"last_heartbeat": "2026-04-21T02:45:02.142250",
|
||||
"last_heartbeat_ts_epoch": 1776732302,
|
||||
"ts": "2026-04-21T03:00:01.685570",
|
||||
"last_heartbeat": "2026-04-21T03:00:01.685570",
|
||||
"last_heartbeat_ts_epoch": 1776733201,
|
||||
"tasks_today": 232,
|
||||
"tasks_week": 574,
|
||||
"agent_id": "blade-ops",
|
||||
|
||||
51
api/blade-task-create.php
Normal file
51
api/blade-task-create.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/**
|
||||
* V111 - Blade Task Creator - WEVIA chat pilote Blade via tasks
|
||||
* POST /api/blade-task-create.php with key=WEVADS2026 and action+params
|
||||
* Writes /var/www/html/api/blade-tasks/task_<ts>.json for blade-poll
|
||||
*/
|
||||
header('Content-Type: application/json');
|
||||
$k = $_POST['k'] ?? $_GET['k'] ?? '';
|
||||
if ($k !== 'WEVADS2026') { http_response_code(403); die(json_encode(['error'=>'auth'])); }
|
||||
|
||||
$action = $_POST['action'] ?? $_GET['action'] ?? '';
|
||||
$DIR = '/var/www/html/api/blade-tasks';
|
||||
if (!is_dir($DIR)) @mkdir($DIR, 0755, true);
|
||||
|
||||
if ($action === 'list') {
|
||||
$files = glob("$DIR/task_*.json");
|
||||
sort($files);
|
||||
$out = [];
|
||||
foreach ($files as $f) {
|
||||
$d = @json_decode(@file_get_contents($f), true);
|
||||
if ($d) $out[] = ['file'=>basename($f),'status'=>$d['status']??'?','goal'=>$d['goal']??'?','created'=>$d['created']??'?'];
|
||||
}
|
||||
echo json_encode(['tasks'=>$out,'count'=>count($out)]);
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($action === 'create') {
|
||||
$goal = $_POST['goal'] ?? $_GET['goal'] ?? '';
|
||||
$params = $_POST['params'] ?? $_GET['params'] ?? '{}';
|
||||
$priority = $_POST['priority'] ?? 'normal';
|
||||
if (!$goal) { http_response_code(400); die(json_encode(['error'=>'missing goal'])); }
|
||||
|
||||
$ts = date('Ymd-His');
|
||||
$id = 'blade_'.$ts.'_'.substr(md5($goal.mt_rand()),0,6);
|
||||
$task = [
|
||||
'id'=>$id,
|
||||
'goal'=>$goal,
|
||||
'params'=>json_decode($params,true) ?: [],
|
||||
'priority'=>$priority,
|
||||
'status'=>'pending',
|
||||
'created'=>date('c'),
|
||||
'source'=>'wevia-master-chat'
|
||||
];
|
||||
$file = "$DIR/task_$id.json";
|
||||
$ok = @file_put_contents($file, json_encode($task, JSON_PRETTY_PRINT));
|
||||
if ($ok === false) { http_response_code(500); die(json_encode(['error'=>'write failed'])); }
|
||||
echo json_encode(['ok'=>true,'id'=>$id,'file'=>basename($file),'task'=>$task]);
|
||||
exit;
|
||||
}
|
||||
|
||||
echo json_encode(['error'=>'unknown action','available'=>['list','create']]);
|
||||
@@ -1,281 +0,0 @@
|
||||
{
|
||||
"ts": "2026-04-21T00:55:01+00:00",
|
||||
"server": "s204",
|
||||
"s204": {
|
||||
"load": 1.39,
|
||||
"uptime": "2026-04-14 11:51:24",
|
||||
"ram_total_mb": 31335,
|
||||
"ram_used_mb": 11926,
|
||||
"ram_free_mb": 19408,
|
||||
"disk_total": "150G",
|
||||
"disk_used": "113G",
|
||||
"disk_free": "31G",
|
||||
"disk_pct": "79%",
|
||||
"fpm_workers": 120,
|
||||
"docker_containers": 19,
|
||||
"cpu_cores": 8
|
||||
},
|
||||
"s95": {
|
||||
"load": 1.02,
|
||||
"disk_pct": "82%",
|
||||
"status": "UP",
|
||||
"ram_total_mb": 15610,
|
||||
"ram_free_mb": 12075
|
||||
},
|
||||
"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": 293,
|
||||
"php_apis": 768,
|
||||
"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": 110548,
|
||||
"with_phone": 155145,
|
||||
"gap_email": 51182,
|
||||
"pct_email": 68.4,
|
||||
"pct_phone": 95.9,
|
||||
"by_country": [
|
||||
{
|
||||
"country": "DZ",
|
||||
"hcps": 122337,
|
||||
"with_email": 78459,
|
||||
"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 5 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 25 hours (healthy)",
|
||||
"ports": ""
|
||||
},
|
||||
{
|
||||
"name": "vaultwarden",
|
||||
"status": "Up 6 days (healthy)",
|
||||
"ports": ""
|
||||
},
|
||||
{
|
||||
"name": "qdrant",
|
||||
"status": "Up 6 days",
|
||||
"ports": ""
|
||||
}
|
||||
],
|
||||
"crons": {
|
||||
"active": 35
|
||||
},
|
||||
"git": {
|
||||
"head": "abb94ba88 auto-sync-0255",
|
||||
"dirty": 2,
|
||||
"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": 3650,
|
||||
"health": {
|
||||
"score": 5,
|
||||
"max": 6,
|
||||
"pct": 83
|
||||
},
|
||||
"elapsed_ms": 11039
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"ok": true,
|
||||
"version": "V83-business-kpi",
|
||||
"ts": "2026-04-21T00:58:03+00:00",
|
||||
"ts": "2026-04-21T00:59:02+00:00",
|
||||
"summary": {
|
||||
"total_categories": 8,
|
||||
"total_kpis": 64,
|
||||
|
||||
18
api/wired-pending/intent-opus4-blade_task_push.php
Normal file
18
api/wired-pending/intent-opus4-blade_task_push.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
return array(
|
||||
'name' => 'blade_task_push',
|
||||
'triggers' => array(
|
||||
0 => 'push blade task',
|
||||
1 => 'blade task create',
|
||||
2 => 'envoie task blade',
|
||||
3 => 'blade do',
|
||||
4 => 'blade execute task',
|
||||
5 => 'create blade task',
|
||||
6 => 'task to blade',
|
||||
),
|
||||
'cmd' => 'curl -s "http://127.0.0.1/api/blade-task-create.php?k=WEVADS2026&action=list" | head -c 500',
|
||||
'status' => 'EXECUTED',
|
||||
'created_at' => '2026-04-21T03:00:00+00:00',
|
||||
'source' => 'opus-v111-blade-task-real',
|
||||
'description' => 'Lists all blade tasks (pending/done). To create a task: POST with action=create&goal=X¶ms={}',
|
||||
);
|
||||
Reference in New Issue
Block a user