Skip to main content

Module state

Module state 

Source
Expand description

Borrow-lens view types used by crate::service::ContextService.

Each view holds &/&mut references to the exact sub-fields that the context service needs. By accepting lenses instead of &mut Agent<C>, this crate avoids depending on zeph-core while still letting the call site in zeph-core construct them from disjoint field projections.

Views are constructed at the call site in zeph-core using one literal struct expression. The borrow checker proves disjointness at that level without additional helper methods — each &mut resolves to a unique field path under Agent<C>.

Structs§

ContextAssemblyView
Borrow-lens over all fields needed for prepare_context and Agent<C>::rebuild_system_prompt.
ContextDelta
Values produced by crate::service::ContextService::prepare_context that must be applied by the caller.
ContextSummarizationView
Borrow-lens over all fields needed for compaction and summarization operations.
MessageWindowView
Borrow-lens over the agent’s conversation window fields.
MetricsCounters
Accumulated metric deltas for one context-assembly pass.
ProviderHandles
Bundle of LLM provider handles needed for async context operations.

Enums§

CompactionOutcome
Return type from compact_context() that distinguishes between successful compaction, probe rejection, and no-op.
ProbeOutcome
Verdict returned by a CompactionProbeCallback after evaluating a candidate summary.

Traits§

CompactionPersistence
Persistence completion hook invoked after the in-memory drain/reinsert is finalized.
CompactionProbeCallback
Probe-validation callback invoked by ContextService::compact_context after the LLM produces a candidate summary.
MetricsCallback
Metrics-counter sink for ContextService increments.
SecurityEventSink
Abstract sink for security events raised during context assembly.
StatusSink
Abstract status sink for emitting short progress strings to the channel.
ToolOutputArchive
Pre-summary tool-output archiving hook (Memex #2432).
TrustGate
Abstract gate for applying a skill trust level to the tool executor.

Type Aliases§

QdrantPersistFuture
Boxed 'static future for the off-thread Qdrant session-summary write.