v0.4.0
Streaming I/O, process control, and file watching - across the full stack.
Spawn long-running processes in the VM and stream stdout/stderr back in real-time. Kill processes, write to stdin, and watch directories for file changes - all concurrently within a single sandbox.
What's new
spawn()- stream stdout/stderr as it happens, no more waiting for the command to finishkill()- terminate running processesstdin- write to a spawned process's stdinwatch()- guest-side inotify file watching (detects creates, modifications, deletions, renames through tmpfs overlays)- Concurrent operations - run a dev server, tests, and a file watcher simultaneously in the same VM
- cwd support - set working directory per command
Example
const sb = await Sandbox.start();
const server = await sb.spawn("npm run dev", { cwd: "/workspace" });
server.on("stdout", (data) => process.stdout.write(data));
await sb.watch("/workspace", (e) => console.log(e.event, e.path));
const result = await sb.exec("npm test");
await server.kill();
await sb.stop();Full Changelog: v0.3.3...v0.4.0