pub struct MeditateResult {
pub notes_before: usize,
pub notes_after: usize,
pub notes_pruned: usize,
pub notes_merged: usize,
pub failures_pruned: usize,
pub constraints_removed: usize,
pub used_llm: bool,
pub insights_summary: Option<String>,
}Expand description
Summary of what a meditate operation did.
Returned after each meditate cycle for logging, debugging, and agent self-awareness. An agent can inspect this to understand how its memory was reshaped.
§Example
use pe_core::cognitive_memory::MeditateResult;
let result = MeditateResult {
notes_before: 45,
notes_after: 28,
notes_pruned: 12, // includes threshold + cap removals
notes_merged: 5,
failures_pruned: 3,
constraints_removed: 1,
used_llm: true,
insights_summary: Some("Consolidated 5 observation notes into 2".into()),
};
assert!(result.notes_after <= result.notes_before);Fields§
§notes_before: usizeNumber of working notes before meditate ran.
notes_after: usizeNumber of working notes after meditate completed.
notes_pruned: usizeNumber of notes removed during prune phase (threshold + cap combined).
notes_merged: usizeNumber of notes merged during consolidation.
failures_pruned: usizeNumber of failure records pruned (resolved or stale).
constraints_removed: usizeNumber of constraints removed (no longer applicable).
used_llm: boolWhether the LLM was used for consolidation.
insights_summary: Option<String>Optional summary of insights generated during consolidation.
Trait Implementations§
Source§impl Clone for MeditateResult
impl Clone for MeditateResult
Source§fn clone(&self) -> MeditateResult
fn clone(&self) -> MeditateResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MeditateResult
impl Debug for MeditateResult
Source§impl Default for MeditateResult
impl Default for MeditateResult
Source§fn default() -> MeditateResult
fn default() -> MeditateResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MeditateResult
impl<'de> Deserialize<'de> for MeditateResult
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MeditateResult
impl PartialEq for MeditateResult
Source§fn eq(&self, other: &MeditateResult) -> bool
fn eq(&self, other: &MeditateResult) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for MeditateResult
impl Serialize for MeditateResult
impl StructuralPartialEq for MeditateResult
Auto Trait Implementations§
impl Freeze for MeditateResult
impl RefUnwindSafe for MeditateResult
impl Send for MeditateResult
impl Sync for MeditateResult
impl Unpin for MeditateResult
impl UnsafeUnpin for MeditateResult
impl UnwindSafe for MeditateResult
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
Mutably borrows from an owned value. Read more