Skip to content

feat(sandbox): forward supported just-bash SandboxOptions through justbash()#446

Closed
arimxyer wants to merge 1 commit into
vercel:mainfrom
arimxyer:feat/sandbox-justbash-capability-passthrough
Closed

feat(sandbox): forward supported just-bash SandboxOptions through justbash()#446
arimxyer wants to merge 1 commit into
vercel:mainfrom
arimxyer:feat/sandbox-justbash-capability-passthrough

Conversation

@arimxyer

@arimxyer arimxyer commented Jun 30, 2026

Copy link
Copy Markdown

What

Forward the just-bash SandboxOptions fields that justbash() currently hardcodes or
omits, through JustBashSandboxCreateOptionsSandbox.create(...):

  • timeoutMs
  • maxCallDepth
  • maxCommandCount
  • maxLoopIterations
  • defenseInDepth

Today JustBashSandboxCreateOptions exposes only autoInstall, and createBashSandbox
calls Sandbox.create({ cwd, env, fs, network }) with everything else hardcoded — so an
author has no way to set the interpreter's execution limits, an overall timeout, or
toggle defense-in-depth.

Why

This is the "backends should forward their options" generalization (cf. #239): the
just-bash backend should let authors set the SandboxOptions just-bash actually accepts,
rather than silently fixing them. Each new field is optional and forwarded as undefined
when omitted, falling back to just-bash's own default — so existing apps are unaffected.

Relationship to #431 (capability flags / Python)

This does not yet close #431. #431 asks for python3 (and js-exec) through
justbash(), but those capability flags live on just-bash's BashOptions (the
new Bash(...) constructor) and just-bash's Sandbox.create — the call eve uses — drops
them. That's an upstream gap, filed and fixed in vercel-labs/just-bash#284. Once that
change ships in a just-bash release eve depends on, this same passthrough extends to
python / javascript / commands / customCommands / fetch to genuinely close #431.
The JustBashSandboxCreateOptions doc comment notes this explicitly.

The limits/timeout/defense-in-depth forwarding here is complete and self-contained —
mergeable on its own as the #239-class "backends forward their options" passthrough. The
bundled-interpreter capability flags (python, javascript, …) are a follow-up that
extends this same JustBashSandboxCreateOptions surface once just-bash#284 ships in a
release eve depends on; that follow-up is what closes #431.

Backward compatibility

No behavior change when the new fields are omitted — each forwards as undefined, i.e.
just-bash's existing default (network still defaults to full internet access exactly as
before).

Tests

packages/eve/src/execution/sandbox/bindings/just-bash-capability-options.integration.test.ts
(new): mocks the just-bash module's Sandbox.create, asserts (a) author-supplied
options are forwarded into the call, and (b) omitting them leaves the call unchanged from
today (new fields undefined, network default intact).

Validation

  • pnpm --filter eve run typecheck — clean
  • pnpm --filter eve exec vitest run --config vitest.integration.config.ts just-bash-capability-options — pass

Refs #431, #239. Upstream prerequisite for the capability flags: vercel-labs/just-bash#284.

…tbash()

Signed-off-by: Ari Mayer <ari111097@gmail.com>
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@arimxyer is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

@arimxyer arimxyer marked this pull request as ready for review June 30, 2026 19:09
@arimxyer

arimxyer commented Jul 8, 2026

Copy link
Copy Markdown
Author

Looks like #284 just landed in the just-bash repo

@arimxyer

arimxyer commented Jul 8, 2026

Copy link
Copy Markdown
Author

Superseded by #607. Now that the upstream fix (vercel-labs/just-bash#284) shipped in just-bash 3.1.0, #607 does this in one pass off fresh main — the limits/timeout forwarding from here plus the python / javascript capability flags — and closes #431. Closing this in favor of it.

@arimxyer arimxyer closed this Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

justbash() backend can't enable just-bash's bundled Python (capability passthrough)

1 participant