You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Idea: LIST/GLOB — enumerate guest files without shelling out #74
There is no primitive for directory enumeration on the guest filesystem. Clients that need to discover files must either exec a shell (ls/find), which couples clients to guest shell semantics and bypasses structured errors and accounting, or maintain client-side ledgers that drift from actual filesystem state.
Follow-up from #72: append makes segmented, append-only logs viable inside guests; enumeration is the complementary half of that workload. Our concrete case: agents write rotating segment files (seg.0.jsonl, seg.1.jsonl, …), and a host-side poller needs to enumerate segments it hasn't read. This generalizes to checkpoint discovery, temp-file cleanup passes, and any "what exists in this directory" query.
Proposal
Additive RPC (or an optional surface on the existing message set), single-directory scope for v1:
Pagination (limit/page_token) keeps large directories bounded.
Out of scope for v1: recursive walks; streaming/watch semantics — the fuller long-term answer for tailing workloads, but a substantially larger surface, worth discussing separately.
Alternatives considered
Exec find/ls in the guest — rejected: shell coupling, unstructured output and errors, no accounting.
Client-side segment ledgers — rejected: duplicate directory state, drifts from the filesystem, and must be reimplemented in every client.
ReadFile on directories — not meaningful under current read semantics; would overload the read path.
If this fits the project's direction, I'm glad to draft the PR — proto + guest implementation + e2e test, same shape as #72.
Agreed that the guest needs this. On main the FileSystemService has only ReadFile and WriteFile (proto/ateenv/v1alpha/guest.proto:69-74), thus a client cannot list a directory or find a file size without a shell. A PR is welcome. Some notes on the shape:
Add a Stat (one path) next to ListFiles. Add append mode to WriteFile #72 shows the need: without a size, a client cannot find the end of a file.
Give FileEntry a type (file, directory, symlink). Do not follow symlinks by default.
Apply the same path checks as ReadFile and WriteFile, and return NotFound and InvalidArgument as they do.
Cap limit on the server, and make page_token opaque.
Define pattern as path.Match on the entry name, and say whether hidden entries match *.
Activity
tomergee commentedon Oct 16, 2026
Agreed that the guest needs this. On
mainthe FileSystemService has onlyReadFileandWriteFile(proto/ateenv/v1alpha/guest.proto:69-74), thus a client cannot list a directory or find a file size without a shell. A PR is welcome. Some notes on the shape:Stat(one path) next toListFiles. Add append mode to WriteFile #72 shows the need: without a size, a client cannot find the end of a file.FileEntrya type (file, directory, symlink). Do not follow symlinks by default.ReadFileandWriteFile, and returnNotFoundandInvalidArgumentas they do.limiton the server, and makepage_tokenopaque.patternaspath.Matchon the entry name, and say whether hidden entries match*.guest.proto.rakyll commentedon Oct 19, 2026
We cannot merge this into the FileSystemService which only represents baseline file system operations.
Why is this an issue in agentic workloads? We decided against a glob tool in the MCP server because models can deal with the arbitrary output.