forked from kent/consciousness
remove legacy feedback commands (used, wrong, gap, etc.)
These were early experiments with manual feedback signals that never worked well. The scoring system will handle this properly. Removed: - CLI: used, wrong, not-relevant, not-useful, gap - MCP: memory_used - Store: mark_used, mark_wrong, record_gap, modify_node Co-Authored-By: Proof of Concept <poc@bcachefs.org>
This commit is contained in:
parent
11b58e6b0b
commit
7842b6fc8b
6 changed files with 10 additions and 190 deletions
|
|
@ -115,7 +115,6 @@ async fn dispatch(
|
|||
"memory_links" => links(&args).await,
|
||||
"memory_link_set" => link_set(&args).await,
|
||||
"memory_link_add" => link_add(agent, &args).await,
|
||||
"memory_used" => used(&args).await,
|
||||
"memory_weight_set" => weight_set(&args).await,
|
||||
"memory_rename" => rename(&args).await,
|
||||
"memory_supersede" => supersede(agent, &args).await,
|
||||
|
|
@ -131,7 +130,7 @@ async fn dispatch(
|
|||
|
||||
// ── Definitions ────────────────────────────────────────────────
|
||||
|
||||
pub fn memory_tools() -> [super::Tool; 13] {
|
||||
pub fn memory_tools() -> [super::Tool; 12] {
|
||||
use super::Tool;
|
||||
[
|
||||
Tool { name: "memory_render", description: "Read a memory node's content and links.",
|
||||
|
|
@ -152,9 +151,6 @@ pub fn memory_tools() -> [super::Tool; 13] {
|
|||
Tool { name: "memory_link_add", description: "Add a new link between two nodes.",
|
||||
parameters_json: r#"{"type":"object","properties":{"source":{"type":"string"},"target":{"type":"string"}},"required":["source","target"]}"#,
|
||||
handler: Arc::new(|a, v| Box::pin(async move { dispatch("memory_link_add", &a, v).await })) },
|
||||
Tool { name: "memory_used", description: "Mark a node as useful (boosts weight).",
|
||||
parameters_json: r#"{"type":"object","properties":{"key":{"type":"string","description":"Node key"}},"required":["key"]}"#,
|
||||
handler: Arc::new(|a, v| Box::pin(async move { dispatch("memory_used", &a, v).await })) },
|
||||
Tool { name: "memory_weight_set", description: "Set a node's weight directly (0.01 to 1.0).",
|
||||
parameters_json: r#"{"type":"object","properties":{"key":{"type":"string"},"weight":{"type":"number","description":"0.01 to 1.0"}},"required":["key","weight"]}"#,
|
||||
handler: Arc::new(|a, v| Box::pin(async move { dispatch("memory_weight_set", &a, v).await })) },
|
||||
|
|
@ -315,18 +311,6 @@ async fn link_add(agent: &Option<std::sync::Arc<crate::agent::Agent>>, args: &se
|
|||
Ok(format!("linked {} → {} (strength={:.2})", s, t, strength))
|
||||
}
|
||||
|
||||
async fn used(args: &serde_json::Value) -> Result<String> {
|
||||
let key = get_str(args, "key")?;
|
||||
let arc = cached_store().await?;
|
||||
let mut store = arc.lock().await;
|
||||
if !store.nodes.contains_key(key) {
|
||||
anyhow::bail!("node not found: {}", key);
|
||||
}
|
||||
store.mark_used(key);
|
||||
store.save().map_err(|e| anyhow::anyhow!("{}", e))?;
|
||||
Ok(format!("marked {} as used", key))
|
||||
}
|
||||
|
||||
async fn weight_set(args: &serde_json::Value) -> Result<String> {
|
||||
let arc = cached_store().await?;
|
||||
let mut store = arc.lock().await;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue