Expand description
Context budget, lifecycle management, compaction strategy, and context assembler for Zeph.
This crate contains the stateless and data-only parts of context management extracted
from zeph-core. It has no dependency on zeph-core — callers in zeph-core implement
the input::IndexAccess trait for their own types and populate
input::ContextMemoryView before each assembly pass.
§Modules
budget—budget::ContextBudgetandbudget::BudgetAllocationmanager—manager::ContextManagerstate machine andmanager::CompactionStateassembler—assembler::ContextAssemblerparallel fetch coordinatorinput—input::ContextAssemblyInput,input::ContextMemoryView, traitsslot—slot::ContextSlot,slot::CompactionOutcome, helper functionssummarization— pure prompt-building helpers for context compactionturn_context—turn_context::TurnId,turn_context::TurnContextper-turn carriercompression_feedback— context-loss detection and failure classificationmicrocompact— low-value tool detection helpers for time-based microcompactfidelity— heuristic fidelity scorer for Context-Adaptive Memory (CAM)tool_result_compress— per-result and batch-level token budget enforcement for tool outputstyped_page— typed page classification and minimum-fidelity invariants for compactionerror—error::AssemblerError
Modules§
- assembler
- Stateless context assembler.
- budget
- Token budget calculation for context assembly.
- compression_
feedback - Pure detection and classification helpers for ACON compression guidelines (#1647).
- error
- Error type for context assembly operations.
- fidelity
- Heuristic fidelity scorer for Context-Adaptive Memory (CAM).
- input
- Input types for context assembly.
- manager
- Context lifecycle state machine for the Zeph agent.
- microcompact
- Pure helpers for time-based microcompact (#2699).
- slot
- Context slot types, compaction outcome, and message-chunking helpers.
- summarization
- Pure prompt-building, compaction helpers, and async LLM summarization for context.
- tool_
result_ compress - Acon tool-result compression (#4021).
- turn_
context - Per-turn execution context shared across agent phases.
- typed_
page - Typed page classification and minimum-fidelity invariants for context compaction.