hermes-agent/plugins/platforms/google_chat
Teknium 4c677698ff fix(windows): stop persistent gateway console after update + close checker variable-argv blind spot
Two distinct Windows console bugs that survived #53791/#53810/#53829:

1. Persistent console after update that kills the gateway when closed.
   _spawn_gateway_restart_watcher rewrote the respawned gateway argv to
   windowless pythonw, but launched the WATCHER process itself with
   sys.executable — the venv console python.exe during `hermes update`.
   uv's venv launcher re-execs the base console interpreter, allocating a
   conhost that DETACHED_PROCESS/CREATE_NO_WINDOW can't suppress; the
   respawned gateway inherits it. Resolve the watcher interpreter to
   pythonw too (no-op on POSIX).

2. The AST footgun checker only resolved a flashing program when argv[0]
   was a string literal, so the update path's `git_cmd = ["git", ...]`
   then `subprocess.run(git_cmd + [...], capture_output=True)` calls were
   invisible and shipped unflagged — one console flash per call. Teach
   _argv_head to resolve variable and concat (BinOp Add) argv via a
   module-wide name->program map. Route the 39 newly-visible calls in
   main.py + 23 across 12 other files through the _subprocess_compat
   chokepoint (or creationflags=windows_hide_flags()).

Also fixes a latent NameError: main.py called _subprocess_compat.run with
no module import in scope — the update path would have crashed on Windows.

Tests: checker 32/32, watcher/restart/detach 5/5. Update suite failures
drop 29->7 (remaining 7 are pre-existing baseline failures).
2026-06-27 15:39:17 -07:00
..
__init__.py feat(plugins/google_chat): Google Chat platform adapter as a bundled plugin 2026-05-07 07:15:44 -07:00
adapter.py fix(telegram): preserve Bot API update queue on watcher reconnect 2026-06-25 21:29:57 -07:00
oauth.py fix(windows): stop persistent gateway console after update + close checker variable-argv blind spot 2026-06-27 15:39:17 -07:00
plugin.yaml feat(plugins/google_chat): Google Chat platform adapter as a bundled plugin 2026-05-07 07:15:44 -07:00