CLI/hippocampus: rename core memory functions to memory_*

Aligns function names with tool names for consistency:
- hippocampus: render → memory_render, write → memory_write, etc.
- tools/memory.rs: macro no longer prepends memory_ prefix
- CLI files: use typed async API throughout (graph.rs, journal.rs, admin.rs)

This eliminates the "memory_graph_topology" tool name bug where
graph_* and journal_* tools were incorrectly prefixed.

Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
Kent Overstreet 2026-04-13 13:26:22 -04:00
parent fa50f1c826
commit 5b07a81aa7
7 changed files with 106 additions and 130 deletions

View file

@ -328,20 +328,18 @@ pub fn cmd_dedup(apply: bool) -> Result<(), String> {
Ok(())
}
pub fn cmd_health() -> Result<(), String> {
let result = crate::mcp_server::memory_rpc(
"graph_health",
serde_json::json!({}),
).map_err(|e| e.to_string())?;
pub async fn cmd_health() -> Result<(), String> {
use crate::agent::tools::memory;
let result = memory::graph_health(None).await
.map_err(|e| e.to_string())?;
print!("{}", result);
Ok(())
}
pub fn cmd_topology() -> Result<(), String> {
let result = crate::mcp_server::memory_rpc(
"graph_topology",
serde_json::json!({}),
).map_err(|e| e.to_string())?;
pub async fn cmd_topology() -> Result<(), String> {
use crate::agent::tools::memory;
let result = memory::graph_topology(None).await
.map_err(|e| e.to_string())?;
print!("{}", result);
Ok(())
}
@ -422,11 +420,10 @@ pub fn cmd_export(files: &[String], export_all: bool) -> Result<(), String> {
Ok(())
}
pub fn cmd_status() -> Result<(), String> {
let result = crate::mcp_server::memory_rpc(
"graph_topology",
serde_json::json!({}),
).map_err(|e| e.to_string())?;
pub async fn cmd_status() -> Result<(), String> {
use crate::agent::tools::memory;
let result = memory::graph_topology(None).await
.map_err(|e| e.to_string())?;
print!("{}", result);
Ok(())
}