steer_tools/tools/collections.rs
1use crate::tools::{
2 AstGrepTool, BashTool, EditTool, GlobTool, GrepTool, LsTool, MultiEditTool, ReplaceTool,
3 TodoReadTool, TodoWriteTool, ViewTool,
4};
5use crate::traits::ExecutableTool;
6
7/// Tools that operate on the workspace (files, execution, etc.)
8///
9/// This includes all file manipulation and execution tools that work
10/// in the context of a workspace/filesystem.
11pub fn workspace_tools() -> Vec<Box<dyn ExecutableTool>> {
12 vec![
13 Box::new(BashTool),
14 Box::new(GrepTool),
15 Box::new(AstGrepTool),
16 Box::new(GlobTool),
17 Box::new(LsTool),
18 Box::new(ViewTool),
19 Box::new(EditTool),
20 Box::new(MultiEditTool),
21 Box::new(ReplaceTool),
22 Box::new(TodoReadTool),
23 Box::new(TodoWriteTool),
24 ]
25}
26
27/// Read-only workspace tools
28///
29/// This includes only tools that read information without modifying files.
30/// These are safe to use in restricted environments.
31/// Note: TodoReadTool and TodoWriteTool are included as they only modify
32/// in-memory session state, not actual files.
33pub fn read_only_workspace_tools() -> Vec<Box<dyn ExecutableTool>> {
34 vec![
35 Box::new(GrepTool),
36 Box::new(AstGrepTool),
37 Box::new(GlobTool),
38 Box::new(LsTool),
39 Box::new(ViewTool),
40 Box::new(TodoReadTool),
41 Box::new(TodoWriteTool),
42 ]
43}
44
45/// Server-side tools that don't operate on the workspace
46///
47/// These tools provide capabilities that are specific to the client/server
48/// and don't require access to the workspace filesystem.
49/// Note: These are NOT included in the tools crate, but this function
50/// documents what would be considered server tools.
51pub fn server_tools_note() -> &'static str {
52 "Server tools like FetchTool and DispatchAgentTool are defined in the steer crate"
53}