zeroclaw/src/config
Argenis ed305dc395
feat(context): token-based compaction, persistent sessions, and LLM consolidation (#3574)
Comprehensive long-running context upgrades:

- Token-based compaction: replace message-count trigger with token
  estimation (~4 chars/token). Compaction fires when estimated tokens
  exceed max_context_tokens (default 32K) OR message count exceeds
  max_history_messages. Cuts at user-turn boundaries only.

- Persistent sessions: JSONL append-only session files per channel
  sender in {workspace}/sessions/. Sessions survive daemon restarts.
  Hydrates in-memory history from disk on startup.

- LLM-driven memory consolidation: two-phase extraction after each
  conversation turn. Phase 1 writes a timestamped history entry (Daily).
  Phase 2 extracts new facts/preferences to Core memory (if any).
  Replaces raw message auto-save with semantic extraction.

- New config fields: agent.max_context_tokens (32000),
  channels_config.session_persistence (true).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 15:16:03 +03:00
..
mod.rs feat(gateway): add dynamic node discovery and capability advertisement (#3448) 2026-03-13 18:23:48 -04:00
schema.rs feat(context): token-based compaction, persistent sessions, and LLM consolidation (#3574) 2026-03-24 15:16:03 +03:00
traits.rs fix format 2026-02-21 19:38:19 +08:00