Skip to content

Commit 7644170

Browse files
committed
feat(tools): three new native file tools — batch_read, glob, file_info
batch_read — read multiple files in one call with parallel goroutines. Replaces N serial read_file calls with a single parallel batch. Addresses the fast_read benchmark bottleneck (23%, 163s across 10 iter). glob — file finding by glob pattern. Uses filepath.Glob for simple patterns (zero-walk) and filepath.Walk for recursive patterns. Returns {path, size, is_dir} sorted by mtime. file_info — file metadata without forking stat/ls. Returns size, mod_time (ISO8601), mode string, is_dir, is_symlink, is_regular. Security: all three use the same danger.ClassifyPath + CheckOperation gating, O_NOFOLLOW on file opens, and classifyToolCall entries for the batch approval gate. Zero new dependencies. 14 new tests.
1 parent f99b66f commit 7644170

4 files changed

Lines changed: 756 additions & 1 deletion

File tree

0 commit comments

Comments
 (0)