A chat-driven video editor: the agent edits a HyperFrames
composition inside a just-bash virtual filesystem, and the
<hyperframes-player> next to the chat reloads after every tool call.
browser server (Node locally / Vercel function)
┌──────────────────────┐ POST /api/chat ┌──────────────────────────────────────┐
│ files map (state) │ ───────────────▶ │ InMemoryFs(files) → Bash │
│ ├ index.html │ {messages,files} │ custom cmd `hyperframes` │
│ └ assets/lucho.png │ │ lint/timeline → in-process JS │
│ │ ◀─── UI stream │ check/snapshot → host CLI (local)│
│ service worker │ data-files parts │ AI SDK streamText + bash-tool tools │
│ /vfs/* ← files │ │ readFile returns images (PR #22) │
│ <hyperframes-player │ └──────────────────────────────────────┘
│ srcdoc + <base │
│ href=/vfs/>> │
└──────────────────────┘
- State lives in the browser. Every request carries the files; every tool step streams the updated
files back (
data-files). That is what makes the server stateless enough for Vercel. hyperframesis adefineCommand.lintandtimelinerun in-process from@hyperframes/lintand a DOM scan.check,snapshotandrendermaterialise the virtual tree to.hf-scratch/and run the real CLI (Chrome + FFmpeg): local only. Snapshot PNGs are copied back into/workspace/snapshots/so the agent canreadFilethem and look at its own frames.- The player reads the virtual filesystem. A service worker answers
/vfs/<path>from the files map, and the composition is loaded assrcdocwith<base href="/vfs/">, soassets/…andcompositions/…resolve without a server.
npm install
echo "ANTHROPIC_API_KEY=<your key>" > .env
npm run dev # api on :8787, vite on :5173
npm run smoke # sandbox + bridged command, no model
npm run e2e # real Chrome: attach ~/Desktop/lucho.png, chat, screenshotThe system prompt embeds the HyperFrames skill from ~/.claude/skills/hyperframes when present
(npm run sync refreshes shared/skill-bundle.ts and shared/scaffold.ts).