1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! sgr-agent-tools — reusable file-system tools for sgr-agent based AI agents.
//!
//! 11 universal tools parameterized by `FileBackend` trait:
//!
//! | # | Tool | Category |
//! |---|------|----------|
//! | 1 | ReadTool | observe |
//! | 2 | WriteTool | act |
//! | 3 | DeleteTool | act |
//! | 4 | SearchTool | observe |
//! | 5 | ListTool | observe |
//! | 6 | TreeTool | observe |
//! | 7 | EvalTool | compute (feature "eval") |
//! | 8 | ReadAllTool | observe (batch) |
//! | 9 | MkDirTool | act (deferred) |
//! | 10 | MoveTool | act (deferred) |
//! | 11 | FindTool | observe (deferred) |
//!
//! # Usage
//!
//! ```rust,ignore
//! use sgr_agent_tools::{FileBackend, TreeTool, ReadTool, SearchTool, WriteTool};
//!
//! // Implement FileBackend for your runtime
//! impl FileBackend for MyBackend { ... }
//!
//! // Create tools
//! let b = Arc::new(MyBackend::new());
//! let registry = ToolRegistry::new()
//! .register(ReadTool(b.clone()))
//! .register(WriteTool(b.clone()))
//! .register(SearchTool(b.clone()))
//! .register(TreeTool(b.clone()))
//! .register_deferred(MkDirTool(b.clone()));
//! ```
// Core tools
// Deferred tools
// Optional: eval (heavy dep on boa_engine)
// Optional: shell (needs tokio process feature)
// Optional: apply_patch (Codex-compatible diff editing)
// Re-export the core trait
pub use FileBackend;
// Re-export all tools
pub use DeleteTool;
pub use FindTool;
pub use ListTool;
pub use MkDirTool;
pub use MoveTool;
pub use ReadTool;
pub use ReadAllTool;
pub use SearchTool;
pub use TreeTool;
pub use WriteTool;
pub use EvalTool;
pub use ShellTool;
pub use ApplyPatchTool;
// Re-export helpers for wrapper tools (PAC1 uses these for Pac1SearchTool, etc.)
pub use ;
pub use ;
pub use ;