cc9ef82355
hermes_cli/gateway.py (9178 -> 6906): - `hermes gateway` subcommand routing: if/elif chain -> _GATEWAY_SUBCOMMANDS dispatch table of _cmd_* handlers; _stop_installed_service and _refuse_from_inside_gateway unify the stop/restart/uninstall service-stop and self-target guards. - One systemd unit template; _systemctl_show, systemctl reset+action, is-active probes, _installed_service_kind ladder (3 sites), launchctl-list PID probe, launchd bootstrap+kickstart helper, legacy-unit removal loop, loop-tick witness ping, ps/wmic line parsers, planned-stop marker helper, _CAPTURE_TEXT subprocess kwargs (21 sites), _gw_windows() accessor (15 lazy imports). - run_gateway startup helpers, reaper exclusion set, Windows process listing extracted; wizard service actions and platform-setup prompts unified (_setup_service_action). - Dead: _windows_scheduled_task_running (test-only), _container_systemd_operational (inlined), whatsapp/email/matrix built-in status branches (those platforms are registry plugins). - try/except-pass around single statements -> contextlib.suppress; comments/docstrings compacted to the WHY (bounded_probe_run vs subprocess.run on Windows, pythonw launcher-stub filtering, raw-record vs validated-probe exclusion in the orphan reaper, Scheduled-Task Ready-vs-Running). - `hermes gateway --help` byte-identical.