Repository navigation
Add the E2B extension for Pi (@e2b/pi) - #1
Merged
Merged
Conversation
With pi --e2b, Pi runs on your machine and its tools (bash, read, write, edit) run in an E2B sandbox that belongs to the Pi session. - Your git working tree is uploaded when the sandbox starts (ignored files such as .env stay local). /e2b pull applies the agent's changes to your checkout, or commits them on a local pi/<session> branch with --branch. - The sandbox starts with the first prompt, pauses with its memory when idle, and comes back on resume. A forked session gets its own copy. - preview_url shares a public link to a server running in the sandbox. - No credentials go into the sandbox, and host environment variables are not forwarded. Sandboxes of deleted sessions are cleaned up on the next start. Checks: typecheck, oxlint with vendored anti-slop rules, oxfmt, an offline smoke test, and a live test against real E2B sandboxes.
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.
Adds
@e2b/pi, the E2B extension for Pi. Withpi --e2b, Pi stays on your machine and its tools run in an E2B sandbox that belongs to the Pi session.What it does
bash,read,write,editand!commands run in the sandbox through Pi's pluggable tool operations.grep,findandlsare off in E2B mode. If there is no sandbox, tools fail and never run on the host..envstay local./e2b pulldiffs the sandbox against an upload baseline and runsgit applylocally./e2b pull --branchcommits topi/<session>instead.pi --e2b -creconnects to the same sandbox (paused with memory). A forked session gets its own copy viaSandbox.fork.preview_urlgives a public link for a port.--no-sessionoffers a pull, then kills on exit.Layout
Tests
npm run check: typecheck, oxlint (anti-slop rules,curly), oxfmt, offline smoke testnpm run test:live: real sandbox, 10/10 steps pass (tools, background processes, abort, pause and resume, upload and pull, lazy start, fork)Linear: INT-149