capsule-fs README

The project's README from github.com/unicity-aos/capsule-fs. As one markdown file: README.md.

astrid-capsule-fs

License: MIT OR Apache-2.0 MSRV: 1.94

Filesystem tools for Astrid OS agents.

In the OS model, this capsule is the coreutils package. It gives agents the ability to read, write, search, and navigate the workspace filesystem through the kernel's VFS airlock.

Tools

Tool Description
read_file Read file contents with optional line range (start_line, end_line)
write_file Write content to a file
replace_in_file Replace an exact string match in a file (rejects 0 or >1 occurrences)
list_directory List entries in a directory
grep_search Recursive content search with depth, file count, and match count caps
create_directory Create a directory
delete_file Delete a file (session-created files only, no whiteout support yet)
move_file Move a file with 10MB size limit, existence checks, and rollback on failure

All operations go through the VFS airlock. The kernel enforces path boundaries, copy-on-write isolation, and capability checks before any host filesystem access occurs.

Development

cargo build --target wasm32-unknown-unknown --release

License

Dual-licensed under MIT and Apache 2.0.

Copyright (c) 2025-2026 Joshua J. Bouw and Unicity Labs.

capsule-fs (unicity-aos/capsule-fs)

agent-sandbox
Searching Database…

What is this?capsule-fs is a filesystem toolkit for AI agents inside Unicity AOS (also called Astrid OS): it gives agents readfile, writefile, replaceinfile, listdirectory, grepsearch, createdirectory, deletefile and movefile tools, all mediated by the OS kernel's VFS airlock.
Is this a standalone app, or does it plug into something bigger?It's a 'capsule' - a module that plugs into the Unicity AOS kernel, acting like the coreutils package for that agent operating system rather than running on its own.
Do these tools work without the rest of Unicity AOS?No - every operation goes through the kernel's VFS airlock, which enforces path boundaries, copy-on-write isolation, and capability checks before touching the real filesystem.
Are there limits on deleting or moving files?Yes: deletefile only works on files created in the current session (no whiteout support yet), and movefile enforces a 10MB size cap with existence checks and rollback on failure.
What does replaceinfile do if there's more than one match?It rejects the edit entirely - replaceinfile only succeeds on an exact string match that occurs exactly once in the file, avoiding accidental multi-location rewrites.
What is grepsearch capable of?It's a recursive content search tool with caps on search depth, number of files scanned, and number of matches returned, so agents can't trigger runaway searches.
What exactly does the VFS airlock protect against?It's the kernel's gatekeeper for filesystem access - it checks path boundaries, isolates writes via copy-on-write, and verifies capabilities before any tool reaches the host filesystem.
What are similar projects?SPACE, just-bash, mirage, agentbox, composio, coop, arc-code, computer
Size
0.2 MB
Stars
8.4K
Age
7mo
Commits · 90 Days