mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 01:07:31 +08:00
Port the useful part of PR #588 onto current main without regressing summary role alternation or the centralized call_llm-based summary path. This adds a prune-first compression pass that: - protects recent tool outputs with adaptive thresholds - never prunes key tool outputs like read_file/memory/clarify - skips the LLM summary call entirely when pruning alone is enough - keeps head/tail protected windows untouched Tests cover prune-only compaction, protected tools, and tail protection. Co-authored-by: teyrebaz33 <hakanerten02@hotmail.com>