Expand description
Pure helper functions for context assembly.
These functions are called by assembly.rs in zeph-core (via a module alias)
and by the crate::service::ContextService stubs that will be filled in during
subsequent migration steps.
All functions operate on crate::state::ContextAssemblyView instead of the
zeph-core-internal MemoryState, keeping this crate free of zeph-core types.
Structs§
- Budget
Hint - Budget state injected into the volatile system prompt section.
Constants§
- CODE_
CONTEXT_ PREFIX - System message prefix for code-context (repo-map / file context) injections.
- CORRECTIONS_
PREFIX - System message prefix for past user corrections injected into context.
- CROSS_
SESSION_ PREFIX - System message prefix for cross-session context entries.
- DOCUMENT_
RAG_ PREFIX - System message prefix for document RAG results.
- GRAPH_
FACTS_ PREFIX - System message prefix for graph memory facts injected into context.
- LSP_
NOTE_ PREFIX - System message prefix for LSP context notes (diagnostics, hover data, etc.).
- PERSONA_
PREFIX - System message prefix for persona context injected into the system prompt.
- REASONING_
PREFIX - System message prefix for reasoning strategy context.
- RECALL_
PREFIX - System message prefix for semantic recall entries.
- SESSION_
DIGEST_ PREFIX - User message prefix for session digest summaries from the previous interaction.
- SUMMARY_
PREFIX - System message prefix for session summary entries.
- TRAJECTORY_
PREFIX - System message prefix for trajectory (past experience) context.
- TREE_
MEMORY_ PREFIX - System message prefix for tree-based memory summaries.
Functions§
- effective_
recall_ timeout_ ms - Return the effective spreading-activation recall timeout in milliseconds.
- fetch_
cross_ session - Fetch cross-session context summaries for the given query and enforce the token budget.
- fetch_
cross_ session_ raw - Fetch cross-session context summaries using individual field arguments.
- fetch_
graph_ facts - Fetch graph memory facts for the given query and inject them into the context budget.
- fetch_
graph_ facts_ raw - Fetch graph memory facts using individual field arguments.
- fetch_
semantic_ recall - Fetch semantically recalled messages for the given query and enforce the token budget.
- fetch_
semantic_ recall_ raw - Fetch semantically recalled messages using individual field arguments.
- fetch_
summaries - Fetch session summaries for the current conversation and enforce the token budget.
- fetch_
summaries_ raw - Fetch session summaries using individual field arguments.
- format_
correction_ note - Format a user correction as a single bullet point for injection into the system prompt.
- truncate_
chars - Truncate
sto at mostmax_charsUnicode scalar values.