forked from kent/consciousness
centralize memory store interface in hippocampus/mod.rs
This commit is contained in:
parent
063cf031d3
commit
5db00e083f
8 changed files with 899 additions and 723 deletions
|
|
@ -1,5 +1,6 @@
|
|||
// cli/admin.rs — admin subcommand handlers
|
||||
|
||||
use crate::hippocampus as memory;
|
||||
use crate::store;
|
||||
|
||||
fn install_default_file(data_dir: &std::path::Path, name: &str, content: &str) -> Result<(), String> {
|
||||
|
|
@ -329,7 +330,6 @@ pub fn cmd_dedup(apply: bool) -> Result<(), 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);
|
||||
|
|
@ -337,7 +337,6 @@ pub async fn cmd_health() -> Result<(), 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);
|
||||
|
|
@ -421,7 +420,6 @@ pub fn cmd_export(files: &[String], export_all: bool) -> Result<(), 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);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// cli/agent.rs — agent subcommand handlers
|
||||
|
||||
use crate::agent::tools::memory;
|
||||
use crate::hippocampus as memory;
|
||||
use crate::store;
|
||||
|
||||
pub async fn cmd_run_agent(agent: &str, count: usize, target: &[String], query: Option<&str>, dry_run: bool, _local: bool, state_dir: Option<&str>) -> Result<(), String> {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
// link, link-add, link-impact, link-audit, cap-degree,
|
||||
// normalize-strengths, trace, spectral-*, organize, communities.
|
||||
|
||||
use crate::agent::tools::memory;
|
||||
use crate::hippocampus as memory;
|
||||
use crate::store;
|
||||
|
||||
pub fn cmd_cap_degree(max_deg: usize) -> Result<(), String> {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// cli/journal.rs — journal subcommand handlers
|
||||
|
||||
use crate::agent::tools::memory;
|
||||
use crate::hippocampus as memory;
|
||||
|
||||
pub fn cmd_tail(n: usize, full: bool, provenance: Option<&str>, dedup: bool) -> Result<(), String> {
|
||||
let path = crate::store::nodes_path();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// render, write, node-delete, node-rename, history, list-keys,
|
||||
// list-edges, dump-json, lookup-bump, lookups.
|
||||
|
||||
use crate::agent::tools::memory;
|
||||
use crate::hippocampus as memory;
|
||||
use crate::store;
|
||||
|
||||
pub async fn cmd_weight_set(key: &str, weight: f32) -> Result<(), String> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue