@tupper/mastra
v0.1.1
Published
Tupper sandbox backend for Mastra workspaces.
Downloads
21
Maintainers
Readme
@tupper/mastra
A Mastra WorkspaceSandbox backed by Tupper. Give a Mastra workspace an isolated Tupper sandbox (Apple Containers today; Firecracker/WSL planned) for command execution.
Install
bun add @tupper/mastra @tupper/sdk @tupper/container @mastra/core@mastra/core is a peer dependency; install the Tupper backend for your platform (@tupper/container on macOS).
Usage
import { Workspace } from "@mastra/core/workspace";
import { TupperSandbox } from "@tupper/mastra";
const workspace = new Workspace({
sandbox: new TupperSandbox({ image: "docker.io/library/alpine:latest" }),
});
// Mastra calls sandbox.start() on init and sandbox.destroy() on cleanup.TupperSandbox implements Mastra's WorkspaceSandbox (start / destroy / getInfo / executeCommand) over @tupper/sdk.
Filesystem mounting
Mount host directories into the sandbox at creation (bind mounts, applied at launch):
const sandbox = new TupperSandbox({
image: "docker.io/library/alpine:latest",
mounts: [{ source: "/host/project", target: "/work", readonly: true }],
});Mastra's runtime sandbox.mount(filesystem, path) — FUSE / cloud mounts into a running sandbox — isn't supported by container or microVM backends (Mastra reports MountNotSupportedError). Pass host mounts at create time instead.
