pub struct LobeContext {
pub self_summary: Option<String>,
pub recent_errors: Vec<String>,
pub confidence: f64,
pub current_plan: Option<String>,
pub metadata: HashMap<String, Value>,
}Expand description
Restricted context for a lobe — not the full conversation.
Use from_cognitive_state to build
from a full CognitiveState, or construct directly for testing.
Fields§
§self_summary: Option<String>Agent’s self-description (from SelfModel.self_context, summarized).
recent_errors: Vec<String>Recent error history (for lobes that learn from failures).
confidence: f64Current confidence level (from matrix C value).
current_plan: Option<String>Current plan (if one exists).
metadata: HashMap<String, Value>Arbitrary metadata from the outer graph.
Implementations§
Source§impl LobeContext
impl LobeContext
Sourcepub fn from_cognitive_state(state: &CognitiveState) -> Self
pub fn from_cognitive_state(state: &CognitiveState) -> Self
Build a lean context from a full CognitiveState.
This is the canonical conversion — used by both LobeNode
and LobeRegistry to avoid duplication.
Trait Implementations§
Source§impl Clone for LobeContext
impl Clone for LobeContext
Source§fn clone(&self) -> LobeContext
fn clone(&self) -> LobeContext
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 LobeContext
impl Debug for LobeContext
Source§impl Default for LobeContext
impl Default for LobeContext
Source§fn default() -> LobeContext
fn default() -> LobeContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LobeContext
impl RefUnwindSafe for LobeContext
impl Send for LobeContext
impl Sync for LobeContext
impl Unpin for LobeContext
impl UnsafeUnpin for LobeContext
impl UnwindSafe for LobeContext
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