Ports opencode's multi-strategy string-replacer chain (and its test table) into harness-tools::edit, giving the edit tool the same fuzzy-match fallback behavior opencode relies on.
29 lines
673 B
Rust
29 lines
673 B
Rust
mod bash;
|
|
mod edit;
|
|
mod glob;
|
|
mod grep;
|
|
mod paths;
|
|
mod read;
|
|
mod write;
|
|
|
|
pub use bash::BashTool;
|
|
pub use edit::EditTool;
|
|
pub use glob::GlobTool;
|
|
pub use grep::GrepTool;
|
|
pub use read::ReadTool;
|
|
pub use write::WriteTool;
|
|
|
|
use std::sync::Arc;
|
|
|
|
use harness_core::tool::ToolRegistry;
|
|
|
|
/// Registers all M1 built-ins: read, write, edit, bash, glob, grep.
|
|
pub fn register_builtins(registry: &mut ToolRegistry) {
|
|
registry.register(Arc::new(ReadTool));
|
|
registry.register(Arc::new(WriteTool));
|
|
registry.register(Arc::new(EditTool::new()));
|
|
registry.register(Arc::new(BashTool));
|
|
registry.register(Arc::new(GlobTool));
|
|
registry.register(Arc::new(GrepTool));
|
|
}
|