feat(eve-sandbox): add a Coder workspace backend for Vercel's eve framework#12
Open
ThomasK33 wants to merge 1 commit into
Open
feat(eve-sandbox): add a Coder workspace backend for Vercel's eve framework#12ThomasK33 wants to merge 1 commit into
ThomasK33 wants to merge 1 commit into
Conversation
a415cd4 to
219650e
Compare
New package implementing Vercel eve's `SandboxBackend` contract so eve agents run their sandbox (bash/read/write/glob/grep) inside a Coder workspace. - Reuses @coder/ai-sdk-sandbox (createCoderWorkspace + transport + session) for workspace get-or-create, wait-for-ready, and $HOME resolution; only resolvePath/removePath/setNetworkPolicy are added on top. - `eve` is a type-only peer dependency, so the repo's pinned ai/@ai-sdk version chain is untouched (pnpm added eve to minimumReleaseAgeExclude). - Coder-specific behavior: prewarm is a no-op (Coder templates are server-side, no build-time capture), setNetworkPolicy throws on non-allow-all unless opted out, and dispose defaults to "keep" (leave the workspace running for fast reattach). - dispose "stop"/"delete" only act on workspaces this backend provisions per session; an explicitly-named (borrowed) workspace is never torn down. - removePath refuses empty / working-dir / root targets to avoid a stray rm -rf. - CI now builds before typecheck/test: this is the first package that depends on a sibling workspace package, whose types/output resolve from its built dist (pnpm -r build is topological, so deps build first). - 17 mock-transport tests; typecheck, build, oxlint, oxfmt, publint, and attw all pass. Wired into release-please, the PR-title scope check, and root publint/attw scripts. Change-Id: I269d55246c0ea6cad806d54b88afafb21f579059 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Thomas Kosiewski <tk@coder.com>
219650e to
e140894
Compare
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.
What
Adds
@coder/ai-sdk-eve-sandbox, a fourth package implementing Vercel eve'sSandboxBackendcontract so an eve agent runs its sandbox (bash/read_file/write_file/glob/grep) inside a real, long-lived Coder workspace instead of an ephemeral microVM.How it works
@coder/ai-sdk-sandbox: reusescreateCoderWorkspace(get-or-create, wait-for-ready,$HOMEresolution, preset validation) +CoderCliTransport+CoderWorkspaceSession, and adapts the result to eve'sSandboxSession. OnlyresolvePath/removePath/setNetworkPolicyare net-new.@coder/ai-sdk-sandboxboth build their I/O surface on the AI SDK'sExperimental_SandboxSession, so the exec/file layer maps over directly.eveis a type-only peer dependency — the package imports no eve runtime values, so the repo's pinnedai/@ai-sdk/*chain is untouched (pnpm addedevetominimumReleaseAgeExclude).Coder-specific behavior (documented in the README)
prewarmis a no-op — Coder templates are server-side Terraform, so there's no build-time capture andseedFilesaren't baked.disposedefaults tokeep(leave the workspace running for fast reattach).stop/deleteapply only to per-session workspaces this backend provisions; an explicitly-named (borrowed) workspace is never torn down.setNetworkPolicycan't enforce egress, so it throws on anything butallow-allunlessallowUnsafeNetworkPolicyis set (credential-brokering flows such as eve's GitHub channel are unsupported here).removePathguards against empty / working-dir / root targets to avoid a strayrm -rf.Testing
pnpm check(oxfmt + oxlint + typecheck across all 5 packages),pnpm build,publint, andattwall pass.Notes / follow-ups
eve@0.11.5) and its sandbox interfaces may change before GA — this is a v1 adapter against a moving target.createCoderWorkspaceand this backend on a shared, harness-free transport core so the package wouldn't transitively need@ai-sdk/harnesstypes.publint/attwscripts, and the PR-title scope allowlist.🤖 Generated with Claude Code