mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
When _compress_context rotates session_id (compression split), fire on_session_start(new_sid, boundary_reason="compression", old_session_id=<old>) on the active context engine. Plugin engines (e.g. hermes-lcm) use this to preserve DAG lineage across the rollover instead of re-initializing fresh per-session state. Built-in ContextCompressor.on_session_start accepts **kwargs and ignores them — no behavior change for default users. Closes hermes-lcm#68 symptom: after Hermes compressed and minted a new physical session, LCM was treating the split as a fresh /new and losing continuity (compression_count: 1, store_messages: 0, dag_nodes: 0). Credit: @Tosko4 (PR #13370) — minimized scope to the boundary_reason signal only; the broader session-lifecycle refactor will be taken in separate PRs if justified by concrete plugin need.
643 KiB
643 KiB