hermes-agent/tests/e2e
Surat Srichan 4d3e3ff8a2 fix(gateway): coerce plaintext "restart gateway" DMs to /restart
Narrow plaintext shortcut that rewrites a tiny set of admin phrases
("restart gateway", "restart the gateway", "restart hermes") into the
/restart slash command, but only in DMs. Scope is intentionally tight:

- DM text messages only — group chats keep natural-language semantics
- Exact restart-style phrases only
- Skips anything already starting with "/"

Without this, the LLM can receive "restart gateway" as a user turn and
try to satisfy it via the terminal tool (systemctl restart ...). That
kills the gateway while the originating agent is still running, which
leaves systemd in "draining" state waiting on a process it's about to
kill. Routing the phrase to the slash-command dispatcher bypasses the
agent loop and uses the existing restart machinery (request_restart).

Called once, at the adapter level in BasePlatformAdapter.handle_message,
so every platform gets it for free and pending-message reinjection is
covered by the same call site.

Adds 2 Telegram-parametrized e2e tests: DM routes to request_restart,
group chats fall through to the normal agent path.
2026-04-28 01:40:28 -07:00
..
matrix_xsign_bootstrap matrix: e2e test for cross-signing auto-bootstrap 2026-04-27 21:22:44 -07:00
__init__.py test(e2e): add telegram gateway e2e test infrastructure 2026-04-01 15:23:52 -07:00
conftest.py fix(gateway): coerce plaintext "restart gateway" DMs to /restart 2026-04-28 01:40:28 -07:00
test_discord_adapter.py fix: follow-up for salvaged PRs #6293, #7387, #9091, #13131 2026-04-20 14:56:04 -07:00
test_platform_commands.py fix(gateway): coerce plaintext "restart gateway" DMs to /restart 2026-04-28 01:40:28 -07:00