Streaming Agent Shell in Rust
Build a real stdin/stdout Rust action loop with bounded reads, an explicit command grammar, path containment, and streamed JSON events.
An inspectable repository-observation process usable by different coding agents.
- An inspectable repository-observation process usable by different coding agents.
- JSONL requests use caller ids and explicit tool argument objects.
Streaming Agent Shell in Rust in 4 stages
Build a real stdin/stdout Rust action loop with bounded reads, an explicit command grammar, path containment, and streamed JSON events.
Parse a deliberately small action language
Define an action enum for help, pwd, list, read, literal search and quit.
starter · ~2 hours · Rust
Actionparse_actionConfine file tools to a bounded root
Canonicalize the workspace root and requested targets, reject absolute and parent-traversing paths, and verify that symlinks remain inside the root.
core · ~2 hours · Rust
containedread_textexecuteTrack budgets and terminal state
Wrap the tools in a session that owns its root, request count and closed state.
core · ~2 hours · Rust
Session.newSession.handleStream bounded JSON events through real stdin
Read input incrementally with BufRead and cap each line before allocating an unbounded string.
core · ~2 hours · Rust + Python
read_boundedjson_stringEvent.jsonrun_loop