Skip to main content

GraphQuery

Struct GraphQuery 

Source
pub struct GraphQuery<'a> { /* private fields */ }
Expand description

Builder-style queries scoped to one agent_id (matches json_extract(payload, '$.agent_id')).

Implementations§

Source§

impl<'a> GraphQuery<'a>

Source

pub fn episodes(&self) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn semantic_nodes(&self) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn procedural_nodes(&self) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn persona_nodes(&self) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn recent_episodes( &self, limit: usize, ) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn since( &self, ts: DateTime<Utc>, node_type: &str, ) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn subgraph_edges(&self) -> Result<Vec<SnapshotEdge>, String>

All directed edges whose both endpoints are nodes for this agent_id (same rule as SqliteGraphStore::export_graph).

Source

pub fn neighbors( &self, node_id: Uuid, edge_type: &str, ) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn lineage(&self, node_id: Uuid) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn by_tag(&self, tag: &str) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn by_topic_cluster( &self, cluster: &str, ) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn pattern_by_name( &self, name: &str, ) -> Result<Option<AinlMemoryNode>, String>

Source

pub fn active_patches(&self) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn successful_episodes( &self, limit: usize, ) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn episodes_with_tool( &self, tool_name: &str, limit: usize, ) -> Result<Vec<AinlMemoryNode>, String>

Source

pub fn evolved_persona(&self) -> Result<Option<AinlMemoryNode>, String>

Source

pub fn read_runtime_state(&self) -> Result<Option<RuntimeStateNode>, String>

Latest persisted RuntimeStateNode for this query’s agent_id.

Auto Trait Implementations§

§

impl<'a> Freeze for GraphQuery<'a>

§

impl<'a> !RefUnwindSafe for GraphQuery<'a>

§

impl<'a> !Send for GraphQuery<'a>

§

impl<'a> !Sync for GraphQuery<'a>

§

impl<'a> Unpin for GraphQuery<'a>

§

impl<'a> UnsafeUnpin for GraphQuery<'a>

§

impl<'a> !UnwindSafe for GraphQuery<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.