agent_cycles, memory-search: use forward_to_daemon instead of Store::load
Replace direct store access with calls to the daemon's memory_render tool via MCP socket. Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
5f30bc670e
commit
dba3210530
2 changed files with 12 additions and 17 deletions
|
|
@ -376,14 +376,13 @@ pub fn format_agent_output(output: &AgentCycleOutput) -> String {
|
|||
}
|
||||
|
||||
if !output.surfaced_keys.is_empty() {
|
||||
if let Ok(store) = consciousness::store::Store::load() {
|
||||
for key in &output.surfaced_keys {
|
||||
if let Some(rendered) = consciousness::cli::node::render_node(&store, key) {
|
||||
if !rendered.trim().is_empty() {
|
||||
use std::fmt::Write as _;
|
||||
writeln!(out, "--- {} (surfaced) ---", key).ok();
|
||||
write!(out, "{}", rendered).ok();
|
||||
}
|
||||
for key in &output.surfaced_keys {
|
||||
let args = serde_json::json!({"key": key});
|
||||
if let Ok(rendered) = consciousness::mcp_server::forward_to_daemon("memory_render", args) {
|
||||
if !rendered.trim().is_empty() {
|
||||
use std::fmt::Write as _;
|
||||
writeln!(out, "--- {} (surfaced) ---", key).ok();
|
||||
write!(out, "{}", rendered).ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue