Filesystem Phase 1: file operations + content - #2
Open
col wants to merge 8 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rename/remove) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ser tests Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
E2bEx.Filesystem(Phase 1) — read/write file content and the core metadata operations against the sandbox'senvddaemon (same transport family asE2bEx.Commands).E2bEx.Filesystem—read/4,write/5,list/4,get_info/4,exists/4,make_dir/4,rename/5,remove/4.E2bEx.EntryInfo— typed struct for a file/dir entry (type: :file | :dir, RFC3339modified_time,symlink_target,metadata, …).E2bEx.Envd.Rpc— two new HTTP helpers,get_file/3/put_file/4(GET/POST /files), for raw file content. The 6 metadata ops ride the existingRpc.unary/4againstfilesystem.Filesystem/*Connect paths unchanged.Behaviour notes
readreturns{:ok, binary}(an Elixir binary already serves as text+bytes);""for an empty file.writeuploadsapplication/octet-streamand returns the written{:ok, %EntryInfo{}}.exists/make_dirtranslate a specific envd error code to a boolean (theRpc.kill/2idiom).listreturns{:ok, []}for an empty dir (proto3 omits theentriesfield).get_info/renamereturn{:error, …}rather than a malformed{:ok, %{}}if envd ever returns a 2xx with noentry.Scope
Phase 1 only. Deferred: watch (live filesystem events — Phase 2, its own spec), plus gzip, xattr/metadata write headers, batch
write_files(multipart), signed-URL generation, and streaming reads.Spec:
docs/superpowers/specs/2026-06-13-e2b-filesystem-design.md· Plan:docs/superpowers/plans/2026-06-13-e2b-filesystem.mdTest Plan
mix test— 152 tests, 0 failuresmix compile --warnings-as-errorscleanEntryInfo.from_api/1decode;Rpc.get_file/put_file(raw bytes, octet-stream,:userquery param, non-2xx errors, Connect-header stripping); all 8Filesystemops incl. empty-dir, boolean translations,:userend-to-end, and the no-entry error path🤖 Generated with Claude Code