pub struct AtheneumGraph { /* private fields */ }Implementations§
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn insert_reasoning_log( &self, agent: &str, content: &str, project_id: Option<&str>, ) -> Result<i64>
pub fn insert_tool_call( &self, reasoning_log_id: i64, tool_name: &str, args: Value, project_id: Option<&str>, ) -> Result<i64>
pub fn record_tool_modifies( &self, tool_call_id: i64, target_id: i64, ) -> Result<i64>
pub fn record_agent_action( &self, agent: &str, thought: &str, tool_calls: Vec<ToolCallRecord>, project_id: Option<&str>, ) -> Result<ActionTrace>
pub fn get_action_trace( &self, agent: &str, project_id: Option<&str>, ) -> Result<Vec<ActionRecord>>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn sync_claude_transcript( &self, params: ClaudeTranscriptImportParams, ) -> Result<ClaudeTranscriptImportSummary>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn store_discovery( &self, agent: &str, discovery_type: &str, target: &str, metadata: Value, ) -> Result<i64>
pub fn query_discoveries(&self, target: &str) -> Result<Vec<GraphEntity>>
pub fn store_discovery_in_project( &self, agent: &str, discovery_type: &str, target: &str, project_id: Option<&str>, metadata: Value, ) -> Result<i64>
Sourcepub fn recent_project_context(
&self,
project: &str,
limit: i64,
) -> Result<Vec<GraphEntity>>
pub fn recent_project_context( &self, project: &str, limit: i64, ) -> Result<Vec<GraphEntity>>
Return the N most recent discoveries for a project (no target required). Used by SubagentStart hook to push project context into initial LLM context.
pub fn query_discoveries_in_project( &self, target: &str, project_id: Option<&str>, ) -> Result<Vec<GraphEntity>>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn query_events( &self, session_id: Option<&str>, event_type: Option<&str>, limit: usize, ) -> Result<Vec<Value>>
Sourcepub fn query_sessions(
&self,
project: Option<&str>,
last_n: i64,
parent_id: Option<&str>,
) -> Result<Vec<SessionSummary>>
pub fn query_sessions( &self, project: Option<&str>, last_n: i64, parent_id: Option<&str>, ) -> Result<Vec<SessionSummary>>
Query recent sessions. If project is Some, filter to that project.
Sourcepub fn record_event(&self, params: RecordEventParams) -> Result<()>
pub fn record_event(&self, params: RecordEventParams) -> Result<()>
Record a generic event into the event_log.
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn record_evidence_prompt(&self, params: PromptParams) -> Result<()>
pub fn record_evidence_tool_call(&self, params: ToolCallParams) -> Result<()>
pub fn record_evidence_file_write(&self, params: FileWriteParams) -> Result<()>
pub fn record_evidence_file_access( &self, params: FileAccessParams, ) -> Result<()>
pub fn record_evidence_commit(&self, params: CommitParams) -> Result<()>
pub fn record_evidence_test_run(&self, params: TestRunParams) -> Result<()>
pub fn record_evidence_fix_chain(&self, params: FixChainParams) -> Result<()>
pub fn record_evidence_bench_run( &self, session_id: String, bench_name: String, mean_ns: Option<i64>, median_ns: Option<i64>, p95_ns: Option<i64>, is_regression: bool, ) -> Result<()>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn update_session_progress( &self, params: SessionProgressParams, ) -> Result<()>
pub fn record_session(&self, params: SessionParams) -> Result<()>
pub fn end_session(&self, params: EndSessionParams) -> Result<()>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn store_handoff( &self, from_agent: &str, to_agent: &str, manifest: Value, ) -> Result<i64>
pub fn get_pending_handoff(&self, agent: &str) -> Result<Option<GraphEntity>>
pub fn mark_handoff_claimed(&self, handoff_id: i64) -> Result<()>
pub fn store_handoff_in_project( &self, from_agent: &str, to_agent: &str, project_id: Option<&str>, manifest: Value, ) -> Result<i64>
pub fn get_pending_handoff_in_project( &self, agent: &str, project_id: Option<&str>, ) -> Result<Option<GraphEntity>>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn consolidate_discoveries( &self, target: &str, project_id: Option<&str>, ) -> Result<Option<i64>>
pub fn consolidation_pass( &self, project_id: Option<&str>, ) -> Result<Vec<(String, i64)>>
pub fn query_knowledge(&self, target: &str) -> Result<Value>
pub fn query_knowledge_in_project( &self, target: &str, project_id: Option<&str>, ) -> Result<Value>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn import_symbol_from_magellan( &self, magellan_db_path: &Path, symbol_name: &str, agent_name: &str, project_id: Option<&str>, ) -> Result<Option<i64>>
pub fn import_all_symbols_from_magellan( &self, magellan_db_path: &Path, agent_name: &str, project_id: Option<&str>, limit: Option<usize>, ) -> Result<usize>
pub fn link_wiki_to_symbols( &self, magellan_db_path: &Path, agent_name: &str, project_id: Option<&str>, ) -> Result<usize>
Source§impl AtheneumGraph
impl AtheneumGraph
Sourcepub fn store_memory(
&self,
key: &str,
content: &str,
scope: &str,
confidence: f64,
project_id: Option<&str>,
) -> Result<i64>
pub fn store_memory( &self, key: &str, content: &str, scope: &str, confidence: f64, project_id: Option<&str>, ) -> Result<i64>
Store a memory entry.
Scope: "user" | "project" | "agent"
Sourcepub fn query_memory(
&self,
key: &str,
scope: Option<&str>,
project_id: Option<&str>,
) -> Result<Vec<GraphEntity>>
pub fn query_memory( &self, key: &str, scope: Option<&str>, project_id: Option<&str>, ) -> Result<Vec<GraphEntity>>
Query memory by key and optional scope/project.
Sourcepub fn list_memory(
&self,
scope: Option<&str>,
project_id: Option<&str>,
) -> Result<Vec<GraphEntity>>
pub fn list_memory( &self, scope: Option<&str>, project_id: Option<&str>, ) -> Result<Vec<GraphEntity>>
List all memory entries for a scope.
Source§impl AtheneumGraph
impl AtheneumGraph
Sourcepub fn get_neighbors(
&self,
entity_id: i64,
) -> Result<(Vec<GraphEdge>, Vec<GraphEdge>)>
pub fn get_neighbors( &self, entity_id: i64, ) -> Result<(Vec<GraphEdge>, Vec<GraphEdge>)>
Return (outgoing_edges, incoming_edges) for a single entity.
Sourcepub fn get_subgraph(&self, entry_id: i64, depth: u32) -> Result<SubgraphView>
pub fn get_subgraph(&self, entry_id: i64, depth: u32) -> Result<SubgraphView>
Extract a connected subgraph around entry_id by BFS up to depth.
Returns the entry entity, all reached entities, and all traversed edges.
Sourcepub fn get_subgraph_scoped(
&self,
entry_id: i64,
depth: u32,
project_id: Option<&str>,
) -> Result<SubgraphView>
pub fn get_subgraph_scoped( &self, entry_id: i64, depth: u32, project_id: Option<&str>, ) -> Result<SubgraphView>
Extract a connected subgraph scoped to project_id.
Neighbors whose data.project_id does not match are excluded, along
with any edges that would point to them. Entities with no project_id
in their data are treated as shared/global and always included.
When project_id is None the call delegates to get_subgraph (no filter).
pub fn get_subgraph_filtered( &self, entry_id: i64, depth: u32, allowed_types: &[EdgeType], ) -> Result<SubgraphView>
Semantic search entry point → walk the graph → return subgraph views.
Applies the same project_id scope to graph traversal as to the
initial semantic search — cross-project entities are not reachable
via edges from in-scope hits.
pub fn hopgraph_query( &self, query: &str, k: usize, depth: u32, allowed_types: &[EdgeType], max_tokens: usize, project_id: Option<&str>, ) -> Result<Vec<SubgraphView>>
Sourcepub fn graph_stats(&self) -> Result<GraphStats>
pub fn graph_stats(&self) -> Result<GraphStats>
Fast topological stats (entity + edge counts by kind / type).
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn define_class(&self, name: &str, description: Option<&str>) -> Result<i64>
pub fn define_property( &self, name: &str, domain_class: &str, range_class: &str, description: Option<&str>, ) -> Result<i64>
pub fn list_classes(&self) -> Result<Vec<OntologyClassInfo>>
pub fn list_properties(&self) -> Result<Vec<OntologyPropertyInfo>>
pub fn validate_edge( &self, from_kind: &str, to_kind: &str, edge_type: &str, ) -> Result<bool>
pub fn seed_standard_ontology(&self) -> Result<()>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn create_task( &self, title: &str, description: Option<&str>, project_id: Option<&str>, ) -> Result<i64>
pub fn update_task_status( &self, task_id: i64, status: KanbanStatus, ) -> Result<()>
pub fn find_task_by_title( &self, title: &str, project_id: Option<&str>, ) -> Result<Option<i64>>
pub fn list_tasks_by_status( &self, status: KanbanStatus, project_id: Option<&str>, ) -> Result<Vec<GraphEntity>>
pub fn list_tasks(&self, project_id: Option<&str>) -> Result<Vec<GraphEntity>>
pub fn add_requirement( &self, task_id: i64, statement: &str, verification_method: Option<&str>, ) -> Result<i64>
pub fn mark_requirement_met(&self, req_id: i64) -> Result<()>
pub fn add_blocker( &self, task_id: i64, description: &str, blocker_type: BlockerType, ) -> Result<i64>
pub fn resolve_blocker(&self, blocker_id: i64) -> Result<()>
pub fn get_task_with_details(&self, task_id: i64) -> Result<TaskDetail>
pub fn apply_kanban_updates_from_journal( &self, journal_section_id: i64, ) -> Result<Vec<AppliedKanbanUpdate>>
Source§impl AtheneumGraph
impl AtheneumGraph
Sourcepub fn build_search_index(&self) -> Result<()>
pub fn build_search_index(&self) -> Result<()>
Full rebuild of the HNSW index (still useful for manual reindexing).
Sourcepub fn lexical_search(
&self,
query: &str,
k: usize,
project_id: Option<&str>,
entity_kind: Option<&str>,
) -> Result<Vec<SearchResult>>
pub fn lexical_search( &self, query: &str, k: usize, project_id: Option<&str>, entity_kind: Option<&str>, ) -> Result<Vec<SearchResult>>
Search discoveries using a hash-projected bag-of-tokens index (HNSW).
Finds entities that share tokens with query. This is lexical similarity,
not semantic/neural similarity — synonyms with no token overlap will not match.
For true semantic search, embeddings from a language model would be needed.
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn ingest_wiki_page( &self, path: &str, content: &str, project_id: Option<&str>, ) -> Result<i64>
pub fn ingest_journal( &self, path: &str, content: &str, project_id: Option<&str>, ) -> Result<Vec<i64>>
pub fn sync_wiki_directory( &self, dir: &Path, project_id: Option<&str>, ) -> Result<Vec<i64>>
pub fn query_journal_sections(&self, path: &str) -> Result<Vec<JournalSection>>
pub fn sync_journal_directory( &self, dir: &Path, project_id: Option<&str>, ) -> Result<Vec<i64>>
pub fn get_wiki_page(&self, path: &str) -> Result<Option<WikiPage>>
pub fn list_wiki_pages(&self, project_id: Option<&str>) -> Result<Vec<WikiPage>>
pub fn find_pages_by_wikilink( &self, target: &str, project_id: Option<&str>, ) -> Result<Vec<WikiPage>>
pub fn find_wiki_page_entity_id(&self, path: &str) -> Result<Option<i64>>
pub fn outgoing_wikilinks(&self, page_id: i64) -> Result<Vec<GraphEntity>>
pub fn incoming_wikilinks(&self, page_id: i64) -> Result<Vec<GraphEntity>>
Source§impl AtheneumGraph
impl AtheneumGraph
pub fn open_in_memory() -> Result<Self>
pub fn open(path: &Path) -> Result<Self>
pub fn set_embedder(&mut self, embedder: Box<dyn TextEmbedder>)
pub fn embedder_dimension(&self) -> usize
pub fn with_raw_connection<F, R>(&self, f: F) -> Result<R>
pub fn is_healthy(&self) -> bool
pub fn get_entity(&self, id: i64) -> Result<GraphEntity>
pub fn get_edge(&self, id: i64) -> Result<GraphEdge>
pub fn outgoing_edges(&self, entity_id: i64) -> Result<Vec<GraphEdge>>
pub fn incoming_edges(&self, entity_id: i64) -> Result<Vec<GraphEdge>>
pub fn all_entities(&self) -> Result<Vec<GraphEntity>>
pub fn entities_by_kind(&self, kind: &str) -> Result<Vec<GraphEntity>>
pub fn count_entities_by_kind(&self) -> Result<Vec<(String, i64)>>
pub fn count_edges_by_type(&self) -> Result<Vec<(String, i64)>>
pub fn insert_agent(&self, name: &str, data: Value) -> Result<i64>
pub fn insert_task(&self, name: &str, data: Value) -> Result<i64>
pub fn insert_event(&self, name: &str, data: Value) -> Result<i64>
pub fn insert_edge( &self, from_id: i64, to_id: i64, edge_type: EdgeType, data: Value, ) -> Result<i64>
pub fn events_performed_by(&self, agent_id: i64) -> Result<Vec<GraphEntity>>
pub fn tasks_assigned_to(&self, agent_id: i64) -> Result<Vec<GraphEntity>>
pub fn causal_chain(&self, event_id: i64) -> Result<Vec<GraphEntity>>
Auto Trait Implementations§
impl !Freeze for AtheneumGraph
impl !RefUnwindSafe for AtheneumGraph
impl !Sync for AtheneumGraph
impl !UnwindSafe for AtheneumGraph
impl Send for AtheneumGraph
impl Unpin for AtheneumGraph
impl UnsafeUnpin for AtheneumGraph
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more