delete dead code: channel-test, mcp-schema, cmd_mcp_schema
channel-test was a debug tool, mcp-schema was superseded by consciousness-mcp, cmd_mcp_schema in cli/misc.rs was the old poc-memory subcommand. Co-Developed-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
2208e68b4f
commit
61deb7d488
5 changed files with 2 additions and 158 deletions
|
|
@ -265,41 +265,7 @@ pub fn get_group_content(group: &crate::config::ContextGroup, store: &crate::sto
|
|||
/// - stdin_param: which parameter (if any) should be sent via stdin
|
||||
///
|
||||
/// Tools with cli=null are agent-internal (not exposed via MCP CLI bridge).
|
||||
pub fn cmd_mcp_schema() -> Result<(), String> {
|
||||
use serde_json::json;
|
||||
|
||||
// Map tool names to CLI args + stdin param.
|
||||
// Tools not listed here are skipped (agent-internal).
|
||||
let cli_map: std::collections::HashMap<&str, (Vec<&str>, Option<&str>)> = [
|
||||
("memory_render", (vec!["render"], None)),
|
||||
("memory_write", (vec!["write"], Some("content"))),
|
||||
("memory_search", (vec!["graph", "spread"], None)),
|
||||
("memory_links", (vec!["graph", "link"], None)),
|
||||
("memory_link_set", (vec!["graph", "link-set"], None)),
|
||||
("memory_link_add", (vec!["graph", "link-add"], None)),
|
||||
("memory_used", (vec!["used"], None)),
|
||||
("memory_weight_set", (vec!["weight-set"], None)),
|
||||
("memory_rename", (vec!["node", "rename"], None)),
|
||||
("memory_query", (vec!["query"], None)),
|
||||
].into_iter().collect();
|
||||
|
||||
let defs = crate::thought::memory::definitions();
|
||||
let json_out: Vec<_> = defs.iter().filter_map(|d| {
|
||||
let name = &d.function.name;
|
||||
let (cli, stdin_param) = cli_map.get(name.as_str())?;
|
||||
Some(json!({
|
||||
"name": name,
|
||||
"description": d.function.description,
|
||||
"inputSchema": d.function.parameters,
|
||||
"cli": cli,
|
||||
"stdin_param": stdin_param,
|
||||
}))
|
||||
}).collect();
|
||||
|
||||
println!("{}", serde_json::to_string_pretty(&json_out)
|
||||
.map_err(|e| e.to_string())?);
|
||||
Ok(())
|
||||
}
|
||||
// mcp-schema moved to consciousness-mcp binary (src/claude/mcp-server.rs)
|
||||
|
||||
pub fn cmd_load_context(stats: bool) -> Result<(), String> {
|
||||
let cfg = crate::config::get();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue