Skip to content

docs(blog): just enough Node — porting the Pi coding agent to the ESP32-P4 - #230

Merged
doodlewind merged 5 commits into
pocket-stack:mainfrom
siwei-yuan:blog/pocket-pi-esp32-p4
Aug 6, 2026
Merged

docs(blog): just enough Node — porting the Pi coding agent to the ESP32-P4#230
doodlewind merged 5 commits into
pocket-stack:mainfrom
siwei-yuan:blog/pocket-pi-esp32-p4

Conversation

@siwei-yuan

@siwei-yuan siwei-yuan commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

New blog post: Just Enough Node: Porting the Pi Coding Agent to the ESP32-P4 (/blog/pocket-pi-on-esp32-p4/).

The post tells the port as a story, layer by layer:

  1. Why — Pi is a widely used TypeScript agent harness that runs only where Node ≥ 22 runs; we wanted the complete agent living on embedded hardware (no companion server running the loop), in TypeScript specifically so behavior stays code-as-data.
  2. What Pi stands on — the harness's layered anatomy (pi-agent-core, schema'd tool registry, provider transports, extension seam) and what each layer assumes.
  3. The desk first — the Rust/QuickJS Node-compat runtime that boots the unmodified 9 MB pi-coding-agent with no Node installed: ESM re-export cycle rewriting, oxc-transpiled runtime extensions through extensionFactories.
  4. The 46.6 MB measurement — why the full profile can't ship on 32 MB PSRAM, and the 304 KB pi-agent-core embedded profile.
  5. Tools as the OS — native Rust tools behind Pi's schemas on LittleFS, schedules with a real wake loop.
  6. Transport and glass — Wi-Fi/UART model backends and the PocketJS draw-list UI wired end to end, with each bring-up failure told inside the layer it belongs to.

Port reference: pocket-stack/pocket-pi#9.

Changes

  • site/content/blog/pocket-pi-on-esp32-p4.md — post body; diagrams are inline SVGs in the blog's house style with aria-labels
  • site/assets/blog/pocket-pi-esp32-hero.png — hero: four simulator screens of the shared pocket-pi-device-ui crate (220 KB)
  • site/nav.tsBLOG_POSTS entry (2026-08-06, newest first)

Verification

  • bun run site:build passes — blog renders 13 posts, new post first on /blog/
  • Rendered page checked locally via site/serve.ts: hero loads, all four SVGs lay out at column width, dark-theme styling matches existing posts

🤖 Generated with Claude Code

New blog post covering the Pocket Pi embedded port: the 46.6 MB desktop-
profile measurement that forced a second pi-agent-core profile, QuickJS
hosting the agent and PocketJS draw lists on the 720x1280 panel with zero
engine changes, the bring-up failure catalog, the on-device acceptance run,
and the apps-are-files direction. Hero image is four simulator screens of
the shared pocket-pi-device-ui crate; diagrams are inline SVGs in the
blog's house style.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@siwei-yuan
siwei-yuan marked this pull request as ready for review August 6, 2026 06:57
… agent

Rework the narrative per review: lead with why the whole agent runs on
the device (no companion server for the loop) and why the harness stays
TypeScript (behavior as files vs. firmware releases), then frame the
core contribution — a Node-class runtime for the ESP32-P4 built in Rust
around QuickJS, which embedded JS engines never provided. Apps-are-files
shrinks to a closing outlook line. Title and nav description updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@siwei-yuan siwei-yuan changed the title docs(blog): 46 MB of agent, 32 MB of PSRAM — Pocket Pi on the ESP32-P4 docs(blog): just enough Node — the whole Pi coding agent on an ESP32-P4 Aug 6, 2026
siwei-yuan and others added 2 commits August 6, 2026 15:55
Drop the war-story teasers and engine-changes aside from the lede; keep
the runtime gap, the measured numbers, the resident agent, and
behavior-as-files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Per review: drop the hero caption; open with why — Pi is a widely used
harness that only runs where Node runs, and we wanted the complete agent
usable on embedded hardware. Replace the announcement-style sections with
the port's actual arc: Pi's layered anatomy, the desktop Node-compat
runtime (ESM cycle rewriting, oxc-transpiled runtime extensions), the
46.6 MB measurement and the pi-agent-core split, native tools standing in
for POSIX, the model transports, and the end-to-end UI wiring — with each
bring-up failure told inside the layer it belongs to. Apps-are-files stays
a closing line. Title and nav description follow the new frame.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@siwei-yuan siwei-yuan changed the title docs(blog): just enough Node — the whole Pi coding agent on an ESP32-P4 docs(blog): just enough Node — porting the Pi coding agent to the ESP32-P4 Aug 6, 2026
Fold the model-stays-remote point into the tools section as one
paragraph; the board diagram already shows both backends.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@doodlewind
doodlewind merged commit 9d85223 into pocket-stack:main Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants