/shared/platform-tools/api/agent.php // dirname(__DIR__, 3) === // The per-platform stub at /api/agent.php is a one-line require of this file. // // The action set lives in functions_agent.php, so a host that needs its own // stub (surf sets MIGRATIONS_DIR first) still shares it. $repo_root = dirname(__DIR__, 3); require_once $repo_root . '/config/db.php'; // opens $pdo, starts the session require_once $repo_root . '/config/functions.php'; // env(), helpers, migrations stub require_once __DIR__ . '/../functions_agent.php'; $secret = (string) (function_exists('env') ? (env('HUB_OPS_SECRET', '') ?: '') : (getenv('HUB_OPS_SECRET') ?: '')); agent_dispatch($pdo, $repo_root, $secret);