pub struct KnowledgeState {Show 21 fields
pub thoughts: Vec<String>,
pub actions: Vec<String>,
pub context: HashMap<String, String>,
pub last_query_results: Vec<KnowledgeId>,
pub fragments: HashMap<KnowledgeId, KnowledgeFragment>,
pub nodes: Vec<TemporalNode>,
pub edges: Vec<TemporalEdge>,
pub realm: Realm,
pub last_pointer_pos: [f32; 2],
pub pointer_velocity: [f32; 2],
pub odin_focus: Option<String>,
pub agent_attention: HashMap<String, f32>,
pub component_states: HashMap<u64, Arc<RwLock<dyn Any + Send + Sync>>>,
pub undo_manager: UndoManager,
pub notifications: Vec<Notification>,
pub notification_center_visible: bool,
pub modifiers_shift: bool,
pub modifiers_ctrl: bool,
pub modifiers_alt: bool,
pub modifiers_logo: bool,
pub performance_overlay_visible: bool,
}Expand description
Knowledge state for the agentic memory system.
Fields§
§thoughts: Vec<String>§actions: Vec<String>§context: HashMap<String, String>§last_query_results: Vec<KnowledgeId>§fragments: HashMap<KnowledgeId, KnowledgeFragment>§nodes: Vec<TemporalNode>The Temporal Graph nodes
edges: Vec<TemporalEdge>The Temporal Graph edges
realm: RealmThe current operational Realm (Midgard/Asgard)
last_pointer_pos: [f32; 2]Last known pointer position (X, Y)
pointer_velocity: [f32; 2]Resolved pointer velocity (pixels per frame)
odin_focus: Option<String>The current ‘Focus’ node ID (Odin’s Eye focus)
agent_attention: HashMap<String, f32>Agent attention heatmap (node_id -> intensity)
component_states: HashMap<u64, Arc<RwLock<dyn Any + Send + Sync>>>§undo_manager: UndoManagerGlobal undo/redo manager tracking document and input states.
notifications: Vec<Notification>Active notification list.
notification_center_visible: boolFlag indicating whether the notification center panel is visible.
modifiers_shift: boolModifier key state: shift key pressed.
modifiers_ctrl: boolModifier key state: control key pressed.
modifiers_alt: boolModifier key state: alt/option key pressed.
modifiers_logo: boolModifier key state: logo/command/windows key pressed.
performance_overlay_visible: boolWhether the performance profiling overlay (Cmd+Shift+P) is currently visible.
Implementations§
Source§impl KnowledgeState
impl KnowledgeState
Sourcepub fn apply_decay(&mut self, decay_factor: f32)
pub fn apply_decay(&mut self, decay_factor: f32)
Apply activation decay to all temporal nodes and evolving components. Nodes with weight below a threshold drift out of the primary context. Components lose vitality (Fafnir’s Decay) if not actively ‘fed’.
Sourcepub fn reinforce(&mut self, node_ids: &[String], boost: f32)
pub fn reinforce(&mut self, node_ids: &[String], boost: f32)
Increase the importance weight of nodes associated with a successful task.
Sourcepub fn update_pointer(&mut self, new_pos: [f32; 2])
pub fn update_pointer(&mut self, new_pos: [f32; 2])
Update pointer kinematics based on a new position.
Source§impl KnowledgeState
impl KnowledgeState
Sourcepub fn set_component_state<T: 'static + Send + Sync>(
&mut self,
id: u64,
state: T,
)
pub fn set_component_state<T: 'static + Send + Sync>( &mut self, id: u64, state: T, )
Set a component’s internal state.
Sourcepub fn get_component_state<T: 'static + Send + Sync>(
&self,
id: u64,
) -> Option<Arc<RwLock<T>>>
pub fn get_component_state<T: 'static + Send + Sync>( &self, id: u64, ) -> Option<Arc<RwLock<T>>>
Get a reference to a component’s internal state.
Sourcepub fn remember(&mut self, fragment: KnowledgeFragment)
pub fn remember(&mut self, fragment: KnowledgeFragment)
Add a new fragment to memory.
Sourcepub fn process_query(&mut self, query: &str)
pub fn process_query(&mut self, query: &str)
Process a search query against the local knowledge base.
Sourcepub fn snapshot(&self) -> Vec<NodeStateSnapshot>
pub fn snapshot(&self) -> Vec<NodeStateSnapshot>
Captures a snapshot of the current state for debugging and hot-reloading.
Trait Implementations§
Source§impl Clone for KnowledgeState
impl Clone for KnowledgeState
Source§fn clone(&self) -> KnowledgeState
fn clone(&self) -> KnowledgeState
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 KnowledgeState
impl Debug for KnowledgeState
Source§impl Default for KnowledgeState
impl Default for KnowledgeState
Source§fn default() -> KnowledgeState
fn default() -> KnowledgeState
Source§impl<'de> Deserialize<'de> for KnowledgeState
impl<'de> Deserialize<'de> for KnowledgeState
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>,
Auto Trait Implementations§
impl !RefUnwindSafe for KnowledgeState
impl !UnwindSafe for KnowledgeState
impl Freeze for KnowledgeState
impl Send for KnowledgeState
impl Sync for KnowledgeState
impl Unpin for KnowledgeState
impl UnsafeUnpin for KnowledgeState
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>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.