Skip to main content

KnowledgeManagement

Trait KnowledgeManagement 

Source
pub trait KnowledgeManagement: KnowledgeGraph {
    // Provided methods
    fn store_finding(
        &mut self,
        node_id: &str,
        key: &str,
        value: &str,
    ) -> Result<()> { ... }
    fn get_finding(&self, node_id: &str, key: &str) -> Option<String> { ... }
    fn get_upstream_findings(&self, node_id: &str, key: &str) -> Option<String> { ... }
    fn cache_file(
        &mut self,
        node_id: &str,
        path: &str,
        content: &str,
    ) -> Result<()> { ... }
    fn get_cached_file(&self, node_id: &str, path: &str) -> Option<String> { ... }
    fn record_tool_call(
        &mut self,
        node_id: &str,
        tool_name: &str,
        summary: &str,
    ) -> Result<()> { ... }
    fn get_tool_history(&self, node_id: &str) -> Vec<ToolCallRecord> { ... }
    fn get_knowledge_context(&self, node_id: &str) -> String { ... }
    fn collect_upstream_findings_all(
        &self,
        node_id: &str,
        findings: &mut HashMap<String, String>,
    ) { ... }
}
Expand description

Knowledge management functions

Provided Methods§

Source

fn store_finding(&mut self, node_id: &str, key: &str, value: &str) -> Result<()>

Store a finding in a node

Source

fn get_finding(&self, node_id: &str, key: &str) -> Option<String>

Get a finding from a node or any upstream node

Source

fn get_upstream_findings(&self, node_id: &str, key: &str) -> Option<String>

Get finding from upstream nodes recursively

Source

fn cache_file(&mut self, node_id: &str, path: &str, content: &str) -> Result<()>

Cache file content in a node

Source

fn get_cached_file(&self, node_id: &str, path: &str) -> Option<String>

Get cached file from this node or upstream

Source

fn record_tool_call( &mut self, node_id: &str, tool_name: &str, summary: &str, ) -> Result<()>

Record a tool call

Source

fn get_tool_history(&self, node_id: &str) -> Vec<ToolCallRecord>

Get all tool calls from this and upstream nodes

Source

fn get_knowledge_context(&self, node_id: &str) -> String

Get all findings from this and upstream nodes as formatted context

Source

fn collect_upstream_findings_all( &self, node_id: &str, findings: &mut HashMap<String, String>, )

Helper to collect all findings recursively

Implementors§