defs.rs: remove store/graph params, use typed memory API

resolve_placeholders() and run_agent() no longer take &Store.
All placeholders now use async memory_render/memory_links/memory_query
directly. The "siblings" placeholder uses Vec<LinkInfo> for ranking
neighbors by link_strength * node_weight.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-13 15:18:05 -04:00
commit 419bb222b5
4 changed files with 19 additions and 26 deletions

View file

@ -212,8 +212,8 @@ pub fn format_health_section(store: &Store, graph: &Graph) -> String {
}
/// Generate a specific agent prompt with filled-in data.
pub async fn agent_prompt(store: &Store, agent: &str, count: usize) -> Result<AgentBatch, String> {
pub async fn agent_prompt(agent: &str, count: usize) -> Result<AgentBatch, String> {
let def = super::defs::get_def(agent)
.ok_or_else(|| format!("Unknown agent: {}", agent))?;
super::defs::run_agent(store, &def, count, &Default::default()).await
super::defs::run_agent(&def, count, &Default::default()).await
}