mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-21 16:18:55 +00:00
Follow-up to the restore-boundary alternation heal (#65492): get_messages_ as_conversation grew a repair_alternation flag, wired into gateway load_transcript and the CLI startup resume. Three other LIVE-REPLAY restore sites still loaded the transcript verbatim, so a durable 'user;user' violation there re-fires the pre-request defensive repair on every request for the rest of the session (it only ever mutates the per-request list, never the restored working conversation): - acp_adapter/session.py::SessionManager._restore — the loaded history becomes the resumed ACP (Zed) agent's SessionState.history. - hermes_cli/cli_commands_mixin.py — the /resume slash command sets self.conversation_history from the load (the startup resume was fixed, this mid-session one was missed). - tui_gateway/server.py — the resume handler feeds the load into the deferred session record's working conversation. Pass repair_alternation=True at all three so the wedge is healed once at restore. Inspection/export consumers (trace upload, context guard, api_server history, display_history) keep the verbatim default. Adds an end-to-end regression test driving the ACP _restore path: a seeded user;user session restores to an alternation-clean live history with no user input lost. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| auth.py | ||
| edit_approval.py | ||
| entry.py | ||
| events.py | ||
| permissions.py | ||
| provenance.py | ||
| server.py | ||
| session.py | ||
| tools.py | ||