Update boxd sandbox blueprint for @boxd-sh/sdk 0.2 #643
astrobot-houston
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
Follow-up to #62.
@boxd-sh/sdk0.2 (0.2.7 at time of writing) replaced the 0.1.x handle-based API the boxd blueprint was written against, so this updates the integration to the latest SDK:blueprints/sandbox--boxd.mdbumped to version 2: adapter rewritten against the new API, prose updated (@boxd-sh/sdk@^0.2.7,bxd_key prefix,machines.forktip), and a cumulative Upgrade Guide entry carrying the complete v1 → v2 unified diff per theblueprints/README.mdcontract. Validated withgenerate-blueprint-index.ts.apps/docs/.../ecosystem/sandboxes/boxd.mdrefreshed to match.What changed in the SDK
0.2 is a full API rewrite, not an incremental bump:
Boxd(wasCompute); the statefulBoxhandle is gone in favor of a flatclient.machines.*namespace whose methods take the machine id.machines.files.download/machines.files.upload.{ command, env, timeout }); the timeout option was renamed fromtimeoutMstotimeout(still milliseconds).suspended,starting,migrating, …); the terminal set the death detector keys on (destroyed/failed/stopped) is unchanged.Adapter shape change
boxd(box, { client })becomesboxd(client, machine, options?): theBoxdclient is now a required first argument (every operation routes through it), so the death detector is always active instead of opt-in viaoptions.client. The machine can be passed as theMachinerecord or its id.cwd,readyTimeoutMs, the/home/boxddefault, and allSandboxDriverbehavior are unchanged. The Upgrade Guide diff covers existing installs.Verification
boxdat version 2.tsc --noEmit) against@boxd-sh/sdk@0.2.7and@flue/runtime.Sandboxinterface (the same surface a model-invoked tool drives): 23/23 checks — readiness probe on a fresh machine, default cwd/home/boxd, shell coverage (compound commands, pipes, redirects, env forwarding with quoting, stderr/exit codes), file APIs including a binary round-trip viamachines.files,stat/readdir/exists/mkdir/rm, exectimeoutenforcement, and the death detector rejecting withSandboxDiedError~5s after the machine was deleted mid-exec.flue run: an agent using the generated adapter created a machine, the model called its sandbox tool, and all checks passed on the VM.Test plan
generate-blueprint-index.tspasses and listsboxdat version 2.@boxd-sh/sdk@0.2.7.Sandboxinterface + fullflue runloop).https://flueframework.com/cli/blueprints/boxd.mdserves the version-2 body.🤖 Generated with Claude Code
Original implementation from #642 by @MichielMAnalytics
All reactions