codetether_agent/a2a/worker_tool_registry/
safe.rs1use crate::tool::{ToolRegistry, codesearch, file, lsp, search, skill, todo, webfetch, websearch};
2use std::path::{Path, PathBuf};
3use std::sync::Arc;
4
5pub fn register_safe_tools(registry: &mut ToolRegistry, workspace_dir: &Path, root_path: &PathBuf) {
22 registry.register(Arc::new(file::ReadTool::new()));
23 registry.register(Arc::new(file::ListTool::new()));
24 registry.register(Arc::new(file::GlobTool::with_root(root_path.clone())));
25 registry.register(Arc::new(search::GrepTool::new()));
26 registry.register(Arc::new(lsp::LspTool::with_root(format!(
27 "file://{}",
28 workspace_dir.display()
29 ))));
30 registry.register(Arc::new(webfetch::WebFetchTool::new()));
31 registry.register(Arc::new(websearch::WebSearchTool::new()));
32 registry.register(Arc::new(codesearch::CodeSearchTool::with_root(
33 root_path.clone(),
34 )));
35 registry.register(Arc::new(todo::TodoReadTool::with_root(root_path.clone())));
36 registry.register(Arc::new(skill::SkillTool::new()));
37}