Expand description
Agent context-assembly service for Zeph.
This crate provides service::ContextService — a stateless façade for all
context-assembly operations that were previously implemented directly on Agent<C>
in zeph-core. Extracting this logic means that editing context-assembly code does
not trigger recompilation of the tool dispatcher (zeph-agent-tools) or the
persistence layer (zeph-agent-persistence).
§Architecture
zeph-agent-context depends on zeph-memory, zeph-llm, zeph-context,
zeph-config, zeph-common, zeph-skills, and zeph-sanitizer. It does not
depend on zeph-core — this is the core invariant that keeps context-assembly
changes from triggering full workspace rebuilds.
zeph-core depends on this crate and constructs narrow borrow-lens views
(state::MessageWindowView, state::ContextAssemblyView,
state::ContextSummarizationView) from Agent<C> field projections, then
delegates to ContextService.
§Features
self-check— gates retrieved-memory mirror types for the MARCH self-check pipeline.index— enableszeph-indexintegration via theIndexAccesstrait.
Re-exports§
pub use compaction::BlockScore;pub use compaction::ContentDensity;pub use compaction::SubgoalExtractionResult;pub use compaction::SubgoalId;pub use compaction::SubgoalRegistry;pub use compaction::SubgoalState;pub use compaction::classify_density;pub use compaction::extract_scorable_text;pub use compaction::partition_by_density;pub use compaction::run_focus_auto_consolidation;pub use compaction::score_blocks_mig;pub use compaction::score_blocks_subgoal;pub use compaction::score_blocks_subgoal_mig;pub use compaction::score_blocks_task_aware;pub use error::ContextError;pub use helpers::BudgetHint;pub use service::ContextService;pub use state::CompactionOutcome;pub use state::CompactionPersistence;pub use state::CompactionProbeCallback;pub use state::ContextAssemblyView;pub use state::ContextDelta;pub use state::ContextSummarizationView;pub use state::MessageWindowView;pub use state::MetricsCallback;pub use state::MetricsCounters;pub use state::ProbeOutcome;pub use state::ProviderHandles;pub use state::QdrantPersistFuture;pub use state::SecurityEventSink;pub use state::StatusSink;pub use state::ToolOutputArchive;pub use state::TrustGate;
Modules§
- compaction
- Task-aware pruning strategy for tool output eviction.
- error
- Error types for the context-assembly service.
- helpers
- Pure helper functions for context assembly.
- service
ContextService— stateless façade for agent context-assembly operations.- state
- Borrow-lens view types used by
crate::service::ContextService. - summarization
- Context summarization pipeline for
zeph-agent-context.