49 lines
1.7 KiB
PHP
49 lines
1.7 KiB
PHP
<?php
|
|
// V57 Agent Factory Live - Opus WIRE doctrine 13+14
|
|
header('Content-Type: application/json');
|
|
|
|
$registry = @json_decode(@file_get_contents('/var/www/html/api/v57-agent-stubs-registry.json'), true) ?: array();
|
|
$stubs_dir = '/var/www/html/api/agent-stubs-v57';
|
|
$count = 0;
|
|
if (is_dir($stubs_dir)) {
|
|
$count = count(glob("$stubs_dir/*.php"));
|
|
}
|
|
|
|
// Previous stubs (pre-V57): 45 (V77 baseline)
|
|
$pre_v57 = 45;
|
|
$new_total = $pre_v57 + $count;
|
|
|
|
$coherence = @json_decode(@file_get_contents('https://weval-consulting.com/api/wevia-coherence-scan-v77.php'), true) ?: array();
|
|
$current_v77_measure = 0;
|
|
foreach (($coherence['kpis_to_optimize'] ?? array()) as $k) {
|
|
if (($k['kpi'] ?? '') === 'agent_stubs_total') {
|
|
$current_v77_measure = $k['current'] ?? 0;
|
|
}
|
|
}
|
|
|
|
echo json_encode(array(
|
|
'ok' => true,
|
|
'v' => 'V57-agent-factory-live',
|
|
'ts' => date('c'),
|
|
'pre_v57_stubs' => $pre_v57,
|
|
'v57_stubs_created' => $count,
|
|
'total_stubs_after_v57' => $new_total,
|
|
'target_v55' => 100,
|
|
'target_achieved' => $new_total >= 100,
|
|
'kpi_v55_progress' => array(
|
|
'kpi' => 'agent_stubs_total',
|
|
'was_current' => $pre_v57,
|
|
'now_current' => $new_total,
|
|
'target' => 100,
|
|
'gap_before' => 55,
|
|
'gap_now' => max(0, 100 - $new_total),
|
|
'delta' => $count,
|
|
),
|
|
'by_category' => $registry['by_category'] ?? array(),
|
|
'registry_path' => '/api/v57-agent-stubs-registry.json',
|
|
'stubs_dir' => '/api/agent-stubs-v57/',
|
|
'v77_current_measure_before_rescan' => $current_v77_measure,
|
|
'note' => 'V77 coherence scan will re-detect stubs at next cron cycle',
|
|
'doctrine_4_honnete' => 'stubs = capability placeholders pointing to dormants V58 activation',
|
|
), JSON_PRETTY_PRINT);
|