pub struct ContextAssemblyView<'a> {Show 44 fields
pub memory: Option<Arc<SemanticMemory>>,
pub conversation_id: Option<ConversationId>,
pub recall_limit: usize,
pub cross_session_score_threshold: f32,
pub context_format: ContextFormat,
pub last_recall_confidence: &'a mut Option<f32>,
pub context_strategy: ContextStrategy,
pub crossover_turn_threshold: u32,
pub cached_session_digest: Option<(String, usize)>,
pub digest_enabled: bool,
pub graph_config: GraphConfig,
pub document_config: DocumentConfig,
pub persona_config: PersonaConfig,
pub trajectory_config: TrajectoryConfig,
pub reasoning_config: ReasoningConfig,
pub memcot_config: MemCotConfig,
pub memcot_state: Option<String>,
pub tree_config: TreeConfig,
pub last_skills_prompt: &'a mut String,
pub active_skill_names: &'a mut Vec<String>,
pub skill_registry: Arc<RwLock<SkillRegistry>>,
pub skill_paths: &'a [PathBuf],
pub correction_config: Option<CorrectionConfig>,
pub sidequest_turn_counter: u64,
pub proactive_explorer: Option<Arc<ProactiveExplorer>>,
pub sanitizer: &'a ContentSanitizer,
pub quarantine_summarizer: Option<&'a QuarantinedSummarizer>,
pub context_manager: &'a mut ContextManager,
pub token_counter: Arc<TokenCounter>,
pub metrics: MetricsCounters,
pub security_events: &'a mut dyn SecurityEventSink,
pub cached_prompt_tokens: u64,
pub redact_credentials: bool,
pub channel_skills: &'a [String],
pub scrub: fn(&str) -> Cow<'_, str>,
pub tiered_retrieval_config: TieredRetrievalConfig,
pub tiered_retrieval_classifier: Option<Arc<AnyProvider>>,
pub tiered_retrieval_validator: Option<Arc<AnyProvider>>,
pub fidelity_config: Option<&'a FidelityConfig>,
pub fidelity_semantic_provider: Option<Arc<AnyProvider>>,
pub fidelity_compress_provider: Option<Arc<AnyProvider>>,
pub planned_next_tools: &'a [PlannedToolHint],
pub status_tx: Option<UnboundedSender<String>>,
pub task_supervisor: Arc<TaskSupervisor>,
}Expand description
Borrow-lens over all fields needed for prepare_context and Agent<C>::rebuild_system_prompt.
Every field maps to a single sub-field of Agent<C> and uses a type from a
lower-level crate (zeph-memory, zeph-skills, zeph-context, zeph-sanitizer,
zeph-config, zeph-common, zeph-llm). No zeph-core-internal *State
aggregator ever crosses this boundary.
Constructed by the zeph-core shim using one literal struct expression. The
borrow checker verifies disjointness because no two &mut paths share a prefix.
Fields§
§memory: Option<Arc<SemanticMemory>>services.memory.persistence.memory — Arc clone is cheap.
conversation_id: Option<ConversationId>services.memory.persistence.conversation_id.
recall_limit: usizeservices.memory.persistence.recall_limit.
cross_session_score_threshold: f32services.memory.persistence.cross_session_score_threshold.
context_format: ContextFormatservices.memory.persistence.context_format — determines recall entry formatting.
last_recall_confidence: &'a mut Option<f32>services.memory.persistence.last_recall_confidence — written by apply path.
context_strategy: ContextStrategyservices.memory.compaction.context_strategy (Copy enum).
crossover_turn_threshold: u32services.memory.compaction.crossover_turn_threshold.
cached_session_digest: Option<(String, usize)>services.memory.compaction.cached_session_digest — cloned into assembler input.
The usize is the token count of the digest (used by ContextMemoryView).
digest_enabled: boolservices.memory.compaction.digest_config.enabled.
graph_config: GraphConfigservices.memory.extraction.graph_config — cloned (small, Clone).
document_config: DocumentConfigservices.memory.extraction.document_config — cloned.
persona_config: PersonaConfigservices.memory.extraction.persona_config — cloned.
trajectory_config: TrajectoryConfigservices.memory.extraction.trajectory_config — cloned.
reasoning_config: ReasoningConfigservices.memory.extraction.reasoning_config — cloned.
memcot_config: MemCotConfigservices.memory.extraction.memcot_config — cloned.
memcot_state: Option<String>Current MemCoT semantic state buffer. Some when the accumulator has a non-empty state.
Snapshot taken at context-assembly time; used to prefix graph recall queries.
tree_config: TreeConfigservices.memory.subsystems.tree_config — cloned.
last_skills_prompt: &'a mut Stringservices.skill.last_skills_prompt — written by Agent<C>::rebuild_system_prompt.
active_skill_names: &'a mut Vec<String>services.skill.active_skill_names — written by Agent<C>::rebuild_system_prompt.
skill_registry: Arc<RwLock<SkillRegistry>>services.skill.registry — Arc clone enables concurrent read access.
skill_paths: &'a [PathBuf]services.skill.skill_paths — read during proactive reload.
correction_config: Option<CorrectionConfig>Built at the shim from services.learning_engine.config — the engine itself
never crosses the crate boundary.
sidequest_turn_counter: u64services.sidequest.turn_counter.
proactive_explorer: Option<Arc<ProactiveExplorer>>services.proactive_explorer — Arc clone for async use without borrowing self.
sanitizer: &'a ContentSanitizerservices.security.sanitizer — borrowed from SecurityState; not Arc-wrapped in zeph-core.
quarantine_summarizer: Option<&'a QuarantinedSummarizer>services.security.quarantine_summarizer — borrowed from SecurityState.
context_manager: &'a mut ContextManagerself.context_manager — mutably borrowed for token recompute hooks.
token_counter: Arc<TokenCounter>runtime.metrics.token_counter — Arc clone is cheap.
metrics: MetricsCountersAccumulated metric deltas — incremented during the pass, applied to the metrics
snapshot by the zeph-core shim after prepare_context returns.
security_events: &'a mut dyn SecurityEventSinkAbstract sink for security events raised during context assembly.
cached_prompt_tokens: u64runtime.providers.cached_prompt_tokens — read for compression-spectrum ratio.
redact_credentials: boolruntime.config.redact_credentials.
channel_skills: &'a [String]runtime.config.channel_skills — per-channel skill filter for system prompt rebuild.
scrub: fn(&str) -> Cow<'_, str>Function pointer for scrubbing credentials from message content.
Passed as a function pointer so zeph-agent-context does not need to depend on
zeph-core::redact. The shim in zeph-core sets this to crate::redact::scrub_content.
When redact_credentials = false the service does not call this function.
tiered_retrieval_config: TieredRetrievalConfigMemFlow tiered retrieval configuration ([memory.tiered_retrieval]).
When enabled = true, inject_semantic_recall dispatches to zeph_memory::recall_tiered
instead of the flat fetch_semantic_recall_raw path.
tiered_retrieval_classifier: Option<Arc<AnyProvider>>Optional provider for LLM-backed intent classification in tiered retrieval.
Resolved from tiered_retrieval.classifier_provider at agent construction.
None means the HeuristicRouter is used (no LLM call).
tiered_retrieval_validator: Option<Arc<AnyProvider>>Optional provider for evidence quality validation and tier escalation.
Resolved from tiered_retrieval.validator_provider at agent construction.
None means validation is skipped (evidence accepted as-is).
fidelity_config: Option<&'a FidelityConfig>Fidelity scoring configuration resolved from [memory.fidelity].
None when fidelity scoring is not configured (treated as enabled = false).
Some(&cfg) with cfg.enabled = false is also a no-op (early-return inside scorer).
fidelity_semantic_provider: Option<Arc<AnyProvider>>LLM provider used for query and per-message embeddings when
fidelity_config.semantic_scoring_provider is set. Resolved at construction time.
None → keyword overlap fallback is used.
fidelity_compress_provider: Option<Arc<AnyProvider>>LLM provider used for Compressed rendering when fidelity_config.compress_provider
is set. Resolved by the agent from [[llm.providers]] at construction time.
None → truncation fallback is used.
planned_next_tools: &'a [PlannedToolHint]Lookahead tool hints derived from the orchestration DAG.
Empty slice when no DAG lookahead is available (PAACE deferred to P2). The scorer simply zeroes the plan signal when the slice is empty.
status_tx: Option<UnboundedSender<String>>TUI status channel for spinner updates during fidelity scoring.
Mirrors the channel wired in ContextSummarizationView::status_tx. None in
non-TUI modes; the service skips sending when the sender is absent.
task_supervisor: Arc<TaskSupervisor>Background task supervisor for registering JoinHandles produced during context
assembly (e.g. mark_reasoning_used in fetch_reasoning_strategies).
Handles drained from PreparedContext::background_tasks are wrapped and
registered here so they remain tracked and abortable instead of being silently
dropped when PreparedContext goes out of scope.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ContextAssemblyView<'a>
impl<'a> !Sync for ContextAssemblyView<'a>
impl<'a> !UnwindSafe for ContextAssemblyView<'a>
impl<'a> Freeze for ContextAssemblyView<'a>
impl<'a> Send for ContextAssemblyView<'a>
impl<'a> Unpin for ContextAssemblyView<'a>
impl<'a> UnsafeUnpin for ContextAssemblyView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request