Skip to content

Add Microsandbox sandbox blueprint#427

Closed
Hor1zonZzz wants to merge 1 commit into
withastro:mainfrom
Hor1zonZzz:add-microsandbox-sandbox-blueprint
Closed

Add Microsandbox sandbox blueprint#427
Hor1zonZzz wants to merge 1 commit into
withastro:mainfrom
Hor1zonZzz:add-microsandbox-sandbox-blueprint

Conversation

@Hor1zonZzz

Copy link
Copy Markdown

Summary

Add Microsandbox as a supported sandbox provider blueprint (flue add sandbox microsandbox), following the same format as the existing sandbox blueprints (Daytona, E2B, boxd, Mirage, ...).

Why

Microsandbox boots real hardware-isolated microVMs (a guest kernel, not container namespaces) from any OCI image via a self-hosted TypeScript SDK with no API key and no server to run — the microsandbox npm package embeds the runtime through a native addon. That's a meaningfully different tradeoff from the existing hosted sandbox providers (Daytona, E2B, Modal): no account, no network dependency, fully local/self-hosted, sub-second boot.

What this adds

  • blueprints/sandbox--microsandbox.md — the SandboxApi adapter implementation guide, in the same format as the other sandbox blueprints
  • apps/ecosystem-catalog.ts / apps/docs/src/lib/docs-navigation.ts / apps/docs/src/content/docs/ecosystem/sandboxes/microsandbox.md — ecosystem listing + docs page
  • Regenerated skills/flue/SKILL.md docs catalog

Implementation notes

The SandboxApi implementation was checked against the actual sdk/node-ts source in superradcompany/microsandbox (not just its docs), so a few details are worth calling out:

  • Filesystem ops map directly onto sandbox.fs()read()/write() already accept/return Uint8Array | string, so no buffer conversion is needed, unlike Daytona/E2B.
  • mkdir/rm only support single-level operations, so recursive mkdir falls back to a shell command and rm rejects unsupported recursive/force with SandboxOperationUnsupportedError, matching the contract.
  • exec() runs through sh -c '<command>' via execStreamWith(), so cwd/env/timeoutMs all forward through the native ExecOptionsBuildertimeoutMs maps directly to .timeout(ms) with no unit conversion needed. AbortSignal gets true mid-flight cancellation via the streaming handle's kill(), not a Promise.race fake.
  • A native ExecTimeoutError is converted to an exit-code-124 result, matching the convention documented for other adapters.

Testing

  • pnpm --dir packages/cli run prebuild regenerates the blueprint index cleanly (39 blueprints)
  • Ran the docs website locally and verified flue add sandbox microsandbox, the msb alias, and flue update sandbox microsandbox all return the expected guide via FLUE_REGISTRY_URL pointed at the local server
  • pnpm --dir apps/docs run check:types (astro check): 0 errors
  • packages/cli test suite: 93/93 node --test + 83/83 vitest passing, including the SKILL.md catalog sync test
  • biome check / prettier clean on all touched files

🤖 Generated with Claude Code

Microsandbox (microsandbox.dev) boots real hardware-isolated microVMs
from any OCI image through a self-hosted, no-API-key Node SDK — a
different tradeoff than the existing hosted providers (Daytona, E2B,
Modal). Add it as a first-class `flue add sandbox microsandbox`
blueprint alongside them.

The `SandboxApi` implementation was verified against the actual
`sdk/node-ts` source in superradcompany/microsandbox rather than just
its docs: filesystem ops map straight onto `sandbox.fs()` with no
buffer conversion needed, `exec()` runs through `sh -c` via
`execStreamWith()` so `timeoutMs` forwards to the native `.timeout()`
option as a direct millisecond match, and `AbortSignal` cancellation
uses the streaming handle's `kill()` for true mid-flight cancellation
rather than a `Promise.race` fake.

Also wires it into the ecosystem catalog, docs navigation, and a new
ecosystem/sandboxes page, and regenerates the `flue docs` catalog
embedded in the Flue skill via `scripts/prepare-publish.mjs`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@astrobot-houston

Copy link
Copy Markdown

Thanks for the contribution! We're closing this PR and moving the conversation to the existing thread: #417

We've moved to a model where bugs and feature proposals are discussed in issues/discussions before code review, so the community can help prioritize and shape the work. Your branch is linked from the new thread so the implementation isn't lost — please join us there to continue the conversation.

— astrobot 🤖

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.

2 participants