feat: add Tenki sandbox provider (@vibe-kit/tenki) - #256
Open
thomasacook wants to merge 6 commits into
Open
thomasacook wants to merge 6 commits into
thomasacook wants to merge 6 commits into
Conversation
added 6 commits
July 22, 2026 16:42
Runs coding agents in Tenki disposable microVMs. Implements the SandboxProvider contract over @tenkicloud/sandbox with runtime agent-CLI install on the default image, preview URLs via exposePort, and failure-atomic create. Includes docs, offline lifecycle unit tests, and a live integration test. Mirrors packages/daytona and packages/blaxel.
…t-CLI e2e - validateConfig(): reject out-of-range cpuCores/memoryMb at construction instead of failing minutes into provisioning - create-failure cleanup now names the sandbox id, and warns to terminate manually if teardown itself also fails - add live e2e test that installs @anthropic-ai/claude-code on the default image and invokes it; add unit tests for validation + cleanup-id
VibeKit defaults its working directory to the root-owned /vibe0, but Tenki's default image runs as a non-root user, so a plain mkdir fails with EACCES. create() now falls back to sudo mkdir + chown so the directory is owned by (and writable for) the sandbox user. Adds a live test asserting /vibe0 is created and writable.
generateCode() is deprecated in favor of executeCommand(); update the README and docs examples accordingly, and drop the stale pinned model (claude-sonnet-4-20250514) in favor of the 'sonnet' alias.
Addresses review feedback: if an executeCommand or getHost() call throws, the sandbox would otherwise leak until its timeout. Guard the example body with try/finally so kill() always runs.
Bumps the Tenki SDK to the latest release. 0.5.x infers workspace/project scope from the API key, so the previous projectId auto-resolution (via whoAmI) is removed; workspaceId stays as an optional passthrough for service-token callers. Rebuilt, type-checked, and re-verified against live sandboxes (7 unit + 3 integration tests green).
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
@vibe-kit/tenki, a sandbox provider that runs coding agents inside Tenki disposable microVMs, alongside the existing providers (e2b, daytona, blaxel, modal, …).Why
Tenki offers per-second microVMs with public preview URLs and pause/resume — a natural fit for VibeKit's "run an agent safely, watch it remotely" model.
How it works
SandboxProvider(create/resume) andSandboxInstance(commands.run,kill,pause,getHost) over@tenkicloud/sandbox, mirroringpackages/daytonaandpackages/blaxel.create()time (@anthropic-ai/claude-code,@openai/codex,@google/gemini-cli,opencode-ai,@vibe-kit/grok-cli). Optionally boots a pre-built Tenki registryimage/snapshotIdinstead.getHost(port)returns a public preview URL viaexposePort./vibe0) with asudo mkdir + chownfallback to keep it writable.Reliability
create()is failure-atomic: if agent-CLI install or workdir setup fails, the sandbox is torn down rather than leaked.kill()surfaces teardown failures instead of swallowing them.maxDurationMs/idleTimeoutMinuteslifetime backstops.Testing
workspaceIdpassthrough.test/tenki-integration.test.ts, gated onTENKI_AUTH_TOKEN): create → run (piped shell + streaming) →exposePort→kill; agent-CLI install + invoke; root-owned working-dir creation. All green.new VibeKit().withSandbox(createTenkiProvider())→ Tenki VM → Claude Code (via a Claude Max OAuth token) held a real conversation and ran a command inside the VM.Files
packages/tenki/*— new provider package (@tenkicloud/sandbox@^0.5.4)docs/supported-sandboxes/tenki.mdx+docs/docs.jsonnav entrytest/tenki-integration.test.ts,test/tenki.test.ts,test/helpers/test-utils.ts