The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(hermes_cli): merge simp/r3-19-A1 (round 2) — inline one-caller forwarders, s6 snapshot helper, launchd degrade helper
Tekniuma8209adfa1ea
diff --cc hermes_cli/gateway.pyindex 3bb7c34aedc,60424ad0175..807052190f8--- a/hermes_cli/gateway.py+++ b/hermes_cli/gateway.py@@@ -1634,23 -1752,17 +1630,18 @@@ def _reaper_exclusion_pids(extra_excludwith contextlib.suppress(Exception):own |= _get_service_pids(all_profiles=True)# Exempt the recorded gateway PID and its parent chain (on Windows the Scheduled-Task bootstrap's- # ``gateway run`` argv matches the scan). Use the RAW pidfile + lock records, not only the- # validated probe: get_running_pid returns None on any validation hiccup — exactly when a healthy- # standalone gateway would be hard-killed. For a KILL exclusion list a stale PID at worst spares- # one process; a false-negative kills a live gateway.+ # ``gateway run`` argv matches the scan; killing it takes the gateway down). Use the RAW pidfile ++ # lock records, not only the validated probe: get_running_pid returns None on any validation+ # hiccup — exactly when a healthy standalone gateway would be hard-killed (Windows SIGTERM is+ # TerminateProcess, no drain). For a KILL exclusion list a stale PID at worst spares one process;+ # a false negative kills a live gateway. The probe still supplies the runtime-status fallback PID.try:from gateway.status import _pid_from_record, _read_gateway_lock_record, _read_pid_record, get_running_pid-- recorded_pids = set()- for _record in (_read_pid_record(), _read_gateway_lock_record()):- _raw_pid = _pid_from_record(_record)- if _raw_pid and _raw_pid > 0:- recorded_pids.add(_raw_pid)- _probed = get_running_pid(cleanup_stale=False)- if _probed and _probed > 0:- recorded_pids.add(_probed)+ recorded_pids = {_pid_from_record(rec) for rec in (_read_pid_record(), _read_gateway_lock_record())}+ recorded_pids.add(get_running_pid(cleanup_stale=False))for recorded in recorded_pids:+ if not recorded or recorded <= 0:+ continueown.add(recorded)try:import psutil # type: ignore