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:
@@ -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,
|
||||
|
||||
@@ -122,6 +122,7 @@ pub struct ToolCtx {
|
||||
pub metadata: MetadataSink,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ToolOutput {
|
||||
pub title: String,
|
||||
pub output: String,
|
||||
|
||||
Reference in New Issue
Block a user