'Claw Code','version'=>'1.2.9','port'=>3900,'running'=>$up,'github'=>'nicepkg/gpt-runner','path'=>'/opt/claw-code']); } elseif ($action === 'health') { $ch = curl_init('http://127.0.0.1:3900/'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_TIMEOUT, 3); $r = curl_exec($ch); $c = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo json_encode(['http_code'=>$c, 'alive'=>$c>0, 'body_len'=>strlen($r)]); } else { echo json_encode(['error'=>'Unknown','actions'=>['status','health']]); }