steer_core/tools/static_tools/
mod.rs1pub mod astgrep;
2pub mod bash;
3pub mod dispatch_agent;
4pub mod edit;
5pub mod fetch;
6pub mod glob;
7pub mod grep;
8pub mod ls;
9pub mod replace;
10pub mod todo;
11pub mod view;
12
13pub use astgrep::AstGrepTool;
14pub use bash::BashTool;
15pub use dispatch_agent::DispatchAgentTool;
16pub use edit::{EditTool, MultiEditTool};
17pub use fetch::FetchTool;
18pub use glob::GlobTool;
19pub use grep::GrepTool;
20pub use ls::LsTool;
21pub use replace::ReplaceTool;
22pub use todo::{TodoReadTool, TodoWriteTool};
23pub use view::ViewTool;
24
25pub(crate) fn workspace_op_error(
26 err: steer_workspace::WorkspaceError,
27) -> steer_tools::error::WorkspaceOpError {
28 use steer_tools::error::WorkspaceOpError;
29
30 match err {
31 steer_workspace::WorkspaceError::Io(message) => WorkspaceOpError::Io { message },
32 steer_workspace::WorkspaceError::NotSupported(message) => {
33 WorkspaceOpError::NotSupported { message }
34 }
35 other => WorkspaceOpError::Other {
36 message: other.to_string(),
37 },
38 }
39}
40
41pub(crate) fn workspace_manager_op_error(
42 err: steer_workspace::WorkspaceManagerError,
43) -> steer_tools::error::WorkspaceOpError {
44 use steer_tools::error::WorkspaceOpError;
45
46 match err {
47 steer_workspace::WorkspaceManagerError::NotFound(_) => WorkspaceOpError::NotFound,
48 steer_workspace::WorkspaceManagerError::NotSupported(message) => {
49 WorkspaceOpError::NotSupported { message }
50 }
51 steer_workspace::WorkspaceManagerError::Io(message) => WorkspaceOpError::Io { message },
52 other => WorkspaceOpError::Other {
53 message: other.to_string(),
54 },
55 }
56}
57
58pub const READ_ONLY_TOOL_NAMES: &[&str] = &[
59 steer_tools::tools::GREP_TOOL_NAME,
60 steer_tools::tools::AST_GREP_TOOL_NAME,
61 steer_tools::tools::GLOB_TOOL_NAME,
62 steer_tools::tools::LS_TOOL_NAME,
63 steer_tools::tools::VIEW_TOOL_NAME,
64 steer_tools::tools::TODO_READ_TOOL_NAME,
65 steer_tools::tools::TODO_WRITE_TOOL_NAME,
66];