PocketJS for AI-native apps

A runtime agents can drive, replay and diff.

A virtual clock makes every frame a pure function of an input tape. Sessions are data: an agent can run one, rewind it, and compare the pixels byte for byte.

Sessions are data

Input tapes record every session. Time-travel DevTools step to any frame and inspect the native tree, over USB to real hardware. Time-travel debugging →

Tests that cannot flake

Goldens compare framebuffers byte for byte, and the same tape produces the same pixels on every run, on every machine. The UI runtime that can’t flake →

Small enough to host the agent

Pocket Pi runs the unmodified pi coding agent in QuickJS with no Node underneath: the full harness on a desktop, a 304 KB core profile on an ESP32‑P4 board with a PocketJS touch UI. Just enough Node →

pi > fix the failing build
plan  read Makefile, patch CFLAGS
tool  fs.write src/config.h ok
tool  proc.run make ... exit 0
pi > done. 2 files changed_

Pocket Pi at work: the pi agent planning, editing and rebuilding, with no Node underneath.