pub struct ContextCapsule {Show 17 fields
pub id: String,
pub kind: String,
pub summary: String,
pub token_estimate: u32,
pub expansion_handle: String,
pub provenance: Vec<ProvenanceRef>,
pub confidence: f32,
pub freshness: f32,
pub relevance: f32,
pub scope_weight: f32,
pub score: f32,
pub superseded_hint: bool,
pub rerank_policy_tier: i8,
pub claim_revision: Option<String>,
pub facts: Vec<StoredFact>,
pub rerank_usefulness: Option<f32>,
pub rerank_trust: Option<f32>,
}Fields§
§id: String§kind: String§summary: String§token_estimate: u32§expansion_handle: String§provenance: Vec<ProvenanceRef>§confidence: f32§freshness: f32§relevance: f32§scope_weight: f32§score: f32§superseded_hint: boolv2.7: set by [apply_supersession_penalty] when a newer near-duplicate
sibling was also a candidate. Carried on the capsule so the penalty can
be REAPPLIED after cross-encoder reranking — the reranker scores pure
query relevance and would otherwise resurrect the older twin whenever
the query’s wording happens to match it better (measured: resolution
0.58 → 0.36 when reranking landed without this flag).
rerank_policy_tier: i8Legacy serialized usefulness sign; bounded when reranking old capsules.
claim_revision: Option<String>Claim identity read in the same SQLite snapshot as the hydrated text.
facts: Vec<StoredFact>Structured evidence read alongside this capsule text and revision.
rerank_usefulness: Option<f32>Decayed usefulness multiplier and provenance discount carried to reranking.
rerank_trust: Option<f32>Implementations§
Source§impl ContextCapsule
impl ContextCapsule
Sourcepub fn wire_minimal(summary: String, kind: String, score: f32) -> Self
pub fn wire_minimal(summary: String, kind: String, score: f32) -> Self
v1.0.0: build a render-only capsule from daemon wire data. Only the
fields the hook renders (summary, kind, score) are meaningful;
the rest are zeroed — this capsule is never re-scored or expanded.
Trait Implementations§
Source§impl Clone for ContextCapsule
impl Clone for ContextCapsule
Source§fn clone(&self) -> ContextCapsule
fn clone(&self) -> ContextCapsule
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more