pub struct ContextRequest {
pub query: String,
pub max_tokens: usize,
pub reserve_tokens: usize,
pub required: BTreeSet<String>,
pub allowed: Option<BTreeSet<String>>,
pub semantic_candidates: Vec<String>,
pub policy_revision: String,
pub max_candidates: usize,
pub max_blocks: usize,
pub graph_depth: usize,
pub evidence_per_term: usize,
pub excerpt_mode: ExcerptMode,
}Expand description
A bounded query against one local graph. Authorization is supplied by the owning application.
Fields§
§query: StringNatural-language query or code identifiers.
max_tokens: usizeMaximum context-text tokens, before subtracting reserve_tokens.
reserve_tokens: usizeCaller allowance for system prompt, history, output, and provider framing.
required: BTreeSet<String>Exact IDs that must appear, with their complete hard closure.
allowed: Option<BTreeSet<String>>Authorized IDs for this call; None means all documents in this caller-owned local graph.
semantic_candidates: Vec<String>Optional ranked IDs from an application-supplied semantic retriever. Every ID is still
filtered by allowed. Rank, not an incompatible model similarity scale, supplies the gain.
policy_revision: StringApplication policy revision; changing it invalidates delta reuse.
max_candidates: usizeMaximum candidate roots retained after lexical lookup and graph expansion.
max_blocks: usizeMaximum physical evidence blocks in the output, including hard closure.
graph_depth: usizeMaximum optional graph-expansion depth. Hard closure is never silently truncated.
evidence_per_term: usizeNumber of distinct source witnesses sought for each query term, between one and four.
excerpt_mode: ExcerptModeRepresentation mode for optional roots.