#835

[FEATURE REQUEST] Add just-bash + isomorphic-git as in-memory sandbox provider

Openvincenzodominaopened 6mo ago

Summary

Add just-bash as an alternative self-hostable sandbox provider. The goal would be to do most of the work like exploring as much as possible in-memory for cost and latency reasons, but also to faster/easier self host and experiment.

just-bash via the existing sandbox abstraction instead of via the bash tool directly, so that i can plug in my own Filesystem provider and to keep switching sandbox providers intact as is.

Existing POC

I've implemented a POC in a fork using the existing sandbox abstraction.

Note: This touches a lot of UI components and their logic to make this work, but i think worth it

Implementation Summary

  • Extend the existing sandbox abstraction (SandboxState / connectSandbox) to support a just-bash provider, rather than wiring local execution through the bash tool directly.
  • Add a packages/sandbox/just-bash implementation with a mounted virtual workspace/filesystem layer, named persistent session sandboxes, and reconnect/resume support for local sessions.
  • Route repository bootstrap and common git flows through isomorphic-git on that virtual filesystem so clone/init/status/log/branch/checkout/add/commit/fetch/pull/push continue to work without a host git binary.
  • Thread sandbox provider selection through session creation, persisted session state, user preferences, and the session/settings UI so users can switch between Vercel and just-bash per session/default.
  • Update sandbox lifecycle, status, reconnect, pause/resume, and timeout handling for a non-VM provider, including just-bash-specific active-state tracking and skipping Vercel-style auto-hibernation behavior.
  • Gracefully gate provider-specific capabilities in the UI/API surface, especially full-VM-only features like the code editor, instead of letting them fail at runtime.
  • Add targeted tests and minimal docs/env updates needed to make the provider usable in local/self-hosted setups.

Activity

0

No activity yet.