Expand description
Context summarization pipeline for zeph-agent-context.
This module organises the three summarization tiers:
- Deferred (
deferred) — stores tool-pair summaries on message metadata and applies them lazily when context pressure rises, preserving provider cache hits. - Pruning (
pruning) — evicts tool output bodies using one of the five configured strategies (Reactive,TaskAware, MIG, Subgoal,SubgoalMig). - Scheduling (
scheduling) — dispatches the Soft/Hard/Proactive compaction tiers and drives non-blocking background goal/subgoal extraction. - Compaction (
compaction) — LLM-based summarization that drains the oldest messages and reinserts a compact summary.
All entry points accept a crate::state::ContextSummarizationView so the logic
contains no Agent<C> references and the crate does not depend on zeph-core.
Modules§
- scheduling
- Compaction scheduling: tiered compaction dispatch, proactive compression, and background goal/subgoal extraction.
Functions§
- count_
deferred_ summaries - Count messages that carry a pending
deferred_summary. - count_
unsummarized_ pairs - Count tool-use/result pairs that have not yet been summarized.
- find_
oldest_ unsummarized_ pair - Find the index of the oldest unsummarized tool-use/result pair.