SIMON Master Console Rebuild
True command center for SIMON + WEB360
This rebuild gives you a cleaner production spine: interactive tree, live viewer, guarded editor, dynamic graphics, architecture map, and note storage. It is designed to sit beside your existing
console.php
and become the stronger replacement path.
Dashboard
Tree
Viewer
System Map
File Registry
Notes
Files
15,523
Folders
410
Scanned Size
3.85 GB
PHP Files
894
Editable Text Files
12,784
File viewer
guarded to /htdocs
/simon/data/evolution_api.php
<?php declare(strict_types=1); header('Content-Type: application/json; charset=utf-8'); header('Cache-Control: no-store'); require_once __DIR__ . '/evolution_core.php'; try { $core = new SimonEvolutionCore(__DIR__); $action = (string)($_GET['action'] ?? $_POST['action'] ?? 'status'); $raw = file_get_contents('php://input'); $json = json_decode((string)$raw, true); $input = is_array($json) ? $json : $_POST; $writeActions = ['start_cycle','create_candidate','run_test','run_shadow','start_canary','advance_canary','rollback','seed_demo']; if (in_array($action, $writeActions, true)) { if (($_SERVER['REQUEST_METHOD'] ?? 'GET') !== 'POST') throw new RuntimeException('POST required.'); $expected = getenv('SIMON_PHASE3_TOKEN') ?: ''; if ($expected !== '') { $provided = (string)($_SERVER['HTTP_X_SIMON_TOKEN'] ?? $input['token'] ?? ''); if (!hash_equals($expected, $provided)) { http_response_code(403); throw new RuntimeException('Invalid Phase 3 token.'); } } } $result = match ($action) { 'status' => $core->status(), 'start_cycle' => $core->startCycle($input), 'create_candidate' => $core->createCandidate($input), 'run_test' => $core->runTest($input), 'run_shadow' => $core->runShadow($input), 'start_canary' => $core->startCanary($input), 'advance_canary' => $core->advanceCanary($input), 'rollback' => $core->rollback($input), 'seed_demo' => $core->seedDemo(), default => throw new InvalidArgumentException('Unknown action.'), }; echo json_encode(['ok' => true, 'result' => $result], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); } catch (Throwable $e) { if (http_response_code() < 400) http_response_code($e instanceof InvalidArgumentException ? 422 : 500); echo json_encode(['ok' => false, 'error' => $e->getMessage()], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); }
Save file
Quick jump
open a path
Open