Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2431b04
fix(filesystem): remove unused gate module
senamakel Sep 30, 2026
53e84dd
chore(filesystem): add missing test files and module stubs
senamakel Sep 30, 2026
c95eac6
fix(filesystem): remove unused imports across multiple modules
senamakel Sep 30, 2026
20438d8
chore(filesystem): add missing module declarations
senamakel Sep 30, 2026
c830f19
chore(filesystem): remove unused mod.rs files
senamakel Sep 30, 2026
0101702
feat(filesystem): add filesystem module with FsGate and new dependencies
senamakel Sep 30, 2026
8cd618f
chore(filesystem): remove unused test support file
senamakel Sep 30, 2026
23cb571
chore(deps): update Cargo.lock
senamakel Sep 30, 2026
ba8adaf
fix(git_operations): correct config path resolution for test support
senamakel Sep 30, 2026
bd3b8ee
test: add test module for filesystem run_tests functionality
senamakel Sep 30, 2026
7c34d59
chore(filesystem): reformat imports and fix trailing whitespace
senamakel Sep 30, 2026
10458fe
chore(filesystem): suppress clippy lints in test modules
senamakel Sep 30, 2026
3e8e7e9
refactor(filesystem): modernise Rust idioms across filesystem tools
senamakel Sep 30, 2026
ba781e9
fix(filesystem): handle empty path in gate function
senamakel Sep 30, 2026
984fd2c
chore(filesystem): remove unused mod.rs files
senamakel Sep 30, 2026
0253249
chore(filesystem): remove unused mod.rs files
senamakel Sep 30, 2026
54b389e
fix(filesystem): handle write errors in file sink
senamakel Sep 30, 2026
2141f2a
fix(filesystem): remove unused `use` statements across multiple modules
senamakel Sep 30, 2026
966b425
chore: suppress additional clippy lints in test files and add approva…
senamakel Sep 30, 2026
d394faa
fix(filesystem): remove unused git_operations module
senamakel Sep 30, 2026
c27bc93
fix(test): update test support to use consistent file write helper
senamakel Sep 30, 2026
7b3d28e
fix(csv_export): handle empty rows in CSV export
senamakel Sep 30, 2026
0e5577c
test(filesystem): add coverage for budget, symlink, size, read and gu…
senamakel Sep 30, 2026
d470801
feat(filesystem): add extensive edge-case and integration tests
senamakel Sep 30, 2026
6f2ad1b
refactor(csv_export): change data helper to accept a reference
senamakel Sep 30, 2026
680979d
fix(test): correct test assertions to match expected output
senamakel Sep 30, 2026
bb5053a
test(filesystem): add tests for fake gate delegation and policy rejec…
senamakel Sep 30, 2026
44e7c3d
chore: files changed AGENTS.md,crates/tinytools-std/README.md,crates/…
senamakel Sep 30, 2026
60e9194
fix(test): correct stale file reference in config test module comment
senamakel Sep 30, 2026
a81b82a
Merge origin/main into oh-extract-fs-tools
senamakel Sep 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ approval — it belongs to the host, whose threat model and configuration the
decision depends on.

`crates/tinytools-std` holds host-independent tool building blocks (cross-agent
file staleness tracking, SSRF-safe URL validation, PATH probing). It is not part of the dependency-light vocabulary crate and may pull
file staleness tracking, SSRF-safe URL validation, PATH probing, and the
filesystem tools, which ask a host-implemented `FsGate` before they act). It is not part of the dependency-light vocabulary crate and may pull
in `tokio`, `parking_lot` and `log`.

Add a crate by creating `crates/<name>/` — `members = ["crates/*"]` picks it up
Expand Down
152 changes: 152 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 14 additions & 2 deletions crates/tinytools-std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,31 @@ publish = false
[dependencies]
anyhow = { workspace = true }
async-trait = { workspace = true }
# Advisory inter-process `flock` around the MEMORY.md read-modify-write.
fs2 = "0.4"
# `glob_search` pattern matching.
glob = "0.3"
# `O_NOFOLLOW` when opening the workspace lock file (Unix only).
libc = "0.2"
# Structured diagnostics for DNS validation and SSRF refusals.
log = "0.4"
# Async path locks must remain non-blocking while callers hold them across I/O.
parking_lot = "0.12"
# `grep` pattern compilation.
regex = { workspace = true }
# Safe effective-credential executable checks for Unix PATH candidates.
rustix = { version = "1", default-features = false, features = ["fs"] }
serde_json = { workspace = true }
tinytools = { path = "../tinytools", version = "0.5.0" }
# `spawn_blocking` keeps synchronous system DNS resolution off async executor threads.
tokio = { version = "1", default-features = false, features = ["rt", "sync"] }
# `spawn_blocking` keeps synchronous system DNS resolution off async executor threads;
# `fs`/`process`/`time` serve the filesystem tools.
tokio = { version = "1", default-features = false, features = ["rt", "sync", "fs", "process", "time"] }
tracing = { workspace = true }
# `grep` and `glob_search` directory walks.
walkdir = "2"

[dev-dependencies]
tempfile = "3"
tokio = { workspace = true }

[lints]
Expand Down
3 changes: 2 additions & 1 deletion crates/tinytools-std/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Host-independent building blocks for agent tools, extracted from OpenHuman.
| --- | --- |
| `file_state` | Process-wide read/write stamps so parallel agents detect stale or partial reads before overwriting a file. The host decides whether the guard is on (`init_global(enabled)`); read tools pass `record_read` an `Instant` captured before their I/O. |
| `url_guard` | URL validation with SSRF checks for outbound network tools. `validate_url_with_dns_check` returns a `ValidatedUrl` whose vetted `addrs` the caller must pin its HTTP client to (e.g. `reqwest`'s `resolve_to_addrs`); re-resolving the hostname reopens DNS rebinding. |
| `filesystem` | The file and repository tools: `file_read`, `file_write`, `edit_file`, `apply_patch`, `grep`, `glob`, `list_files`, `csv_export`, `read_diff`, `git_operations`, `run_linter`, `run_tests`, `update_memory_md`. Every tool that can touch a path takes an `Arc<dyn FsGate>`: the tool does the I/O, the host's gate (autonomy, workspace boundary, approvals, action budget) decides whether it may. |
| `detect_tools` | `find_on_path` and the read-only `detect_tools` tool. |

No enforcement of host policy lives here; the crate only supplies mechanisms.
No enforcement of host policy lives here; the crate only supplies mechanisms. The `filesystem` tools' name, description and JSON Schema are pinned by the fixtures in `src/filesystem/fixtures/`.
Loading
Loading