M1: read, write, bash, glob, and grep tools

Implements the first five harness-tools: read, write, bash (with timeout/output truncation), glob, and grep, plus shared path-resolution helpers. Wires them into the core tool registry and processor.
This commit is contained in:
2026-07-10 16:19:38 +02:00
parent 5ac646b3c6
commit a5af873924
12 changed files with 1224 additions and 1 deletions
@@ -424,6 +424,11 @@ impl<'a> Run<'a> {
}
};
// docs/05-tools.md: cap tool output at 30k chars regardless of which tool produced it.
let output = crate::tool::truncate::truncate(&output, &self.ctx.data_dir, &call_id)
.map(|t| t.text)
.unwrap_or(output);
let final_state = if is_error {
ToolState::Error {
input,
+1
View File
@@ -122,6 +122,7 @@ pub struct ToolCtx {
pub metadata: MetadataSink,
}
#[derive(Debug)]
pub struct ToolOutput {
pub title: String,
pub output: String,