mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
/simplify-code findings on the #66222 salvage: - consume_detached_task_result moves to agent/async_utils.py (shared home); gateway/run.py and the Discord adapter both had near-identical copies of the same pattern (a third lives in the telegram adapter). One canonical implementation, both new callsites import it. - Reconnect backoff formula min(30 * 2^(n-1), 300) was copied verbatim at 3 sites in run.py (primary watcher x2, secondary-profile reconnect), the third hardcoding the cap. Hoisted to module-level _reconnect_backoff() with a single _RECONNECT_BACKOFF_CAP so a future tune can't silently miss one path. Behavior-preserving: 70 gateway teardown/liveness/reconnect tests green. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| adapter.py | ||
| plugin.yaml | ||
| voice_mixer.py | ||