Skip to main content

zeph_context/
lib.rs

1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Context budget, lifecycle management, compaction strategy, and context assembler for Zeph.
5//!
6//! This crate contains the **stateless and data-only** parts of context management extracted
7//! from `zeph-core`. It has no dependency on `zeph-core` — callers in `zeph-core` implement
8//! the [`input::IndexAccess`] trait for their own types and populate
9//! [`input::ContextMemoryView`] before each assembly pass.
10//!
11//! # Modules
12//!
13//! - [`budget`] — [`budget::ContextBudget`] and [`budget::BudgetAllocation`]
14//! - [`manager`] — [`manager::ContextManager`] state machine and [`manager::CompactionState`]
15//! - [`assembler`] — [`assembler::ContextAssembler`] parallel fetch coordinator
16//! - [`input`] — [`input::ContextAssemblyInput`], [`input::ContextMemoryView`], traits
17//! - [`slot`] — [`slot::ContextSlot`], [`slot::CompactionOutcome`], helper functions
18//! - [`summarization`] — pure prompt-building helpers for context compaction
19//! - [`compression_feedback`] — context-loss detection and failure classification
20//! - [`microcompact`] — low-value tool detection helpers for time-based microcompact
21//! - [`error`] — [`error::ContextError`]
22
23pub mod assembler;
24pub mod budget;
25pub mod compression_feedback;
26pub mod error;
27pub mod input;
28pub mod manager;
29pub mod microcompact;
30pub mod slot;
31pub mod summarization;