Recognize hermes_cli/main.py gateway command lines in gateway process detection and PID validation so --replace reliably finds existing gateway instances. Adds a regression test covering script-style cmdline detection. Closes #1830