pub struct KnowledgeCandidate {Show 17 fields
pub id: String,
pub uri: String,
pub path: String,
pub class: String,
pub status: String,
pub epistemics: String,
pub title: String,
pub date: String,
pub derived_from: Vec<String>,
pub episode: String,
pub branch: Option<String>,
pub freshness: Freshness,
pub age_minutes: Option<i64>,
pub freshness_reason: String,
pub age_source: AgeSource,
pub about: String,
pub route: String,
}Expand description
One candidate record awaiting review: what a reader needs to decide whether to open it.
use majordomus_cli::capability::builtin::knowledge_base::KnowledgeCandidate;
let c: KnowledgeCandidate = serde_json::from_str(r#"{
"id": "e1-0123456789ab", "uri": "majordomus://knowledge/e1-0123456789ab",
"path": ".ai/repo/knowledge/candidates/e1-0123456789ab.md", "class": "convention",
"status": "candidate", "epistemics": "decided", "title": "Tests run in disposable repositories",
"date": "2026-09-12", "derived_from": ["session:e1"], "episode": "e1",
"freshness": "unknown", "freshness_reason": "no timestamp", "age_source": "date"
}"#).unwrap();
assert_eq!(c.episode, "e1");
assert_eq!(c.branch, None, "an episode this checkout never saw has no branch, and says so");Fields§
§id: StringThe record id, which is also its file name.
uri: Stringmajordomus://knowledge/<id>.
path: StringRepository-relative path.
class: Stringfact, convention, constraint, memory or lesson.
status: StringAlways candidate here; carried so that a reader sees the same record shape as record.
epistemics: Stringobserved, inferred or decided.
title: StringThe assertion, in one line.
date: StringThe day of the evidence, YYYY-MM-DD.
derived_from: Vec<String>The typed references the record names as its evidence, as declared.
episode: StringThe episode the record came from: the session: reference, or empty when it names none.
branch: Option<String>The branch that episode ran on, joined to the tracked session record or, while that
is not yet written, to the ledger’s session.started line. None when this checkout
knows nothing about the episode — named rather than hidden, so that a reader can tell
“not this branch” from “not known here”. Serialised as null in that case, never
omitted.
freshness: FreshnessHow long it has waited, judged against session.freshness.
age_minutes: Option<i64>The wait in whole minutes, when it could be measured.
freshness_reason: StringWhy it was judged that way, in one phrase. Never empty.
age_source: AgeSourceWhere the wait was read from.
about: StringWhat the observation it was derived from is about (ADR 0118); empty for a record derived from anything else.
route: StringWhich owner should look first, derived from about’s structure; empty without one.
Trait Implementations§
Source§impl Clone for KnowledgeCandidate
impl Clone for KnowledgeCandidate
Source§fn clone(&self) -> KnowledgeCandidate
fn clone(&self) -> KnowledgeCandidate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KnowledgeCandidate
impl Debug for KnowledgeCandidate
Source§impl<'de> Deserialize<'de> for KnowledgeCandidate
impl<'de> Deserialize<'de> for KnowledgeCandidate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for KnowledgeCandidate
Source§impl JsonSchema for KnowledgeCandidate
impl JsonSchema for KnowledgeCandidate
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Ordered for KnowledgeCandidate
The queue orders by id, which the deriver makes total: the episode, then a digest of the
evidence.
impl Ordered for KnowledgeCandidate
The queue orders by id, which the deriver makes total: the episode, then a digest of the evidence.
Source§impl PartialEq for KnowledgeCandidate
impl PartialEq for KnowledgeCandidate
Source§fn eq(&self, other: &KnowledgeCandidate) -> bool
fn eq(&self, other: &KnowledgeCandidate) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for KnowledgeCandidate
impl Serialize for KnowledgeCandidate
impl StructuralPartialEq for KnowledgeCandidate
Auto Trait Implementations§
impl Freeze for KnowledgeCandidate
impl RefUnwindSafe for KnowledgeCandidate
impl Send for KnowledgeCandidate
impl Sync for KnowledgeCandidate
impl Unpin for KnowledgeCandidate
impl UnsafeUnpin for KnowledgeCandidate
impl UnwindSafe for KnowledgeCandidate
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.