pub struct Episode {
pub situation: String,
pub tools: Vec<String>,
pub outcome: String,
pub tags: Vec<String>,
pub skills: Vec<String>,
pub success: Option<bool>,
}Expand description
One remembered experience.
Fields§
§situation: StringWhat the agent was asked / the situation it faced (the recall key).
tools: Vec<String>Names of the tools called while handling it, in first-seen order.
outcome: StringHow it turned out — the approach / final answer, summarized.
Extra retrieval tags (beyond the automatic ones).
skills: Vec<String>Names of the skills the run followed, if any. Populated by the host (or
by crate::experience::SkillUseTrace); the framework emits no skill-activation
event of its own, so nothing fills this automatically.
This is the join key the reviser needs: “skill deploy-runbook was in
play when this run went wrong”.
success: Option<bool>Did the run achieve what it was asked to? None = the host never said.
Deliberately three-valued. Distillation treats “unknown” like “no”: a skill minted from a run nobody confirmed worked is exactly how bad procedural memory is born.
Implementations§
Source§impl Episode
impl Episode
pub fn new(situation: impl Into<String>, outcome: impl Into<String>) -> Self
pub fn with_tools<I, S>(self, tools: I) -> Self
Sourcepub fn with_skills<I, S>(self, skills: I) -> Self
pub fn with_skills<I, S>(self, skills: I) -> Self
Names of the skills the run followed. See Episode::skills.
Sourcepub fn with_success(self, success: bool) -> Self
pub fn with_success(self, success: bool) -> Self
Whether the run achieved what it was asked to. See Episode::success.
Sourcepub fn succeeded(&self) -> bool
pub fn succeeded(&self) -> bool
Convenience for the distiller’s gate: true only when the host
explicitly said the run worked. Unknown counts as “no”.
Sourcepub fn render(&self) -> String
pub fn render(&self) -> String
Natural-language rendering used as the searchable memory content.
Keyword/semantic backends index this text; Episode::parse reverses it.
Skills used: / Result: are emitted only when set, and always before
Outcome: — see the module docs for why that ordering is load-bearing.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Episode
impl<'de> Deserialize<'de> for Episode
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 Episode
impl StructuralPartialEq for Episode
Auto Trait Implementations§
impl Forget for Episode
impl Freeze for Episode
impl RefUnwindSafe for Episode
impl Send for Episode
impl Sync for Episode
impl Unpin for Episode
impl UnsafeUnpin for Episode
impl UnwindSafe for Episode
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.