pub struct ContextRequest {
pub stage: String,
pub query: String,
pub budget_tokens: u32,
pub tags: Vec<String>,
pub min_score: f32,
pub max_capsules: usize,
pub prefer_roles: Vec<String>,
pub kinds: Vec<String>,
}Fields§
§stage: String§query: String§budget_tokens: u32v0.6: domain-hint tags. Capsules whose text or kind contains any
of these strings receive a 1.4× score boost, pushing on-domain
capsules above the min_score threshold when they would otherwise
be filtered out.
min_score: f32v0.6: minimum composite score for inclusion. When > 0.0 and the
top-scoring capsule falls below this threshold, ContextBundle
is returned with skipped: true and an empty capsule list —
zero tokens injected. 0.0 (default) disables the check.
max_capsules: usizev0.6: hard cap on returned capsules regardless of token budget. 0 = no cap (budget-only limit, prior behaviour).
prefer_roles: Vec<String>v0.6: role-preference boost. Capsules whose kind matches one
of these strings receive an additional 1.3× multiplier after the
tag boost (e.g. ["semantic_operator", "anti_pattern"] for bench).
kinds: Vec<String>v0.8: hard kind filter applied BEFORE scoring + capping. When
non-empty, only candidates whose capsule kind is in this list
survive — so a higher-ranked repo file or off-kind memory can’t
consume a (often single) slot. Used by the proactive engine to
restrict recall to actionable kinds (failure_pattern, command,
convention). Empty (default) keeps all kinds, prior behaviour.
Trait Implementations§
Source§impl Clone for ContextRequest
impl Clone for ContextRequest
Source§fn clone(&self) -> ContextRequest
fn clone(&self) -> ContextRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more