hermes-agent/gateway
teknium1 909e048ad4 fix: integration hardening for gateway token tracking
Follow-up to 58dbd81 — ensures smooth transition for existing users:

- Backward compat: old session files without last_prompt_tokens
  default to 0 via data.get('last_prompt_tokens', 0)
- /compress, /undo, /retry: reset last_prompt_tokens to 0 after
  rewriting transcripts (stale token counts would under-report)
- Auto-compression hygiene: reset last_prompt_tokens after rewriting
- update_session: use None sentinel (not 0) as default so callers
  can explicitly reset to 0 while normal calls don't clobber
- 6 new tests covering: default value, serialization roundtrip,
  old-format migration, set/reset/no-change semantics
- /reset: new SessionEntry naturally gets last_prompt_tokens=0

2942 tests pass.
2026-03-10 23:40:24 -07:00
..
platforms fix(signal): align send() signature with base class (content, reply_to, metadata) 2026-03-10 15:18:26 -07:00
__init__.py Enhance CLI with multi-platform messaging integration and configuration management 2026-02-02 19:01:51 -08:00
channel_directory.py Merge PR #369: fix(gateway): add missing UTF-8 encoding to file I/O 2026-03-09 00:36:38 -07:00
config.py Merge PR #458: Add explicit UTF-8 encoding to config/data file I/O 2026-03-09 21:19:20 -07:00
delivery.py Hermes Agent UX Improvements 2026-02-22 02:16:11 -08:00
hooks.py Add messaging platform enhancements: STT, stickers, Discord UX, Slack, pairing, hooks 2026-02-15 21:38:59 -08:00
mirror.py Merge PR #565: fix: sanitize FTS5 queries and close mirror DB connections 2026-03-09 23:59:26 -07:00
pairing.py Add messaging platform enhancements: STT, stickers, Discord UX, Slack, pairing, hooks 2026-02-15 21:38:59 -08:00
run.py fix: integration hardening for gateway token tracking 2026-03-10 23:40:24 -07:00
session.py fix: integration hardening for gateway token tracking 2026-03-10 23:40:24 -07:00
status.py fix: prevent duplicate gateway instances from running simultaneously 2026-03-05 20:35:33 -08:00
sticker_cache.py Add messaging platform enhancements: STT, stickers, Discord UX, Slack, pairing, hooks 2026-02-15 21:38:59 -08:00