Files
hermes-agent/agent
Teknium acfa6e3691 refactor(agent): pass-2 structural compaction of prompt_caching and native_compaction
- prompt_caching: fold _count_cache_markers' nested _marked into one sum over
  [*messages, *parts, *tools]; collapse the open-turn guard + endpoint append in
  _completed_transaction_endpoint_indexes into one predicate; enumerate() in
  apply_anthropic_cache_control's non_sys scan; effective_cache_ttl tail -> one
  conditional; pack wrapped calls/comprehensions to <=120 cols; tighten
  docstrings (every WHY kept).
- native_compaction: resolve_compact_threshold upper -> one conditional expr;
  warn-once guard -> single if; _extract_item_text part loop drops the str/dict/
  else ladder (candidates default (part,), non-str filtered by the same isinstance
  check); _retain_summary early-return -> guarded body; pack wrapped calls and
  docstrings.
Zero behavior change: E corpus (224MB) and C corpus byte-identical vs base
113f04616bd; extra corpus for warn-once/_extract_item_text edges identical;
68 test files / 1359 tests green; no symbol added/removed vs pass 1.
2026-09-02 21:44:48 -07:00
..