Skip to content

feat(agentos): install ordinary apps at runtime - #12

Merged
siwei-yuan merged 1 commit into
pocket-stack:mainfrom
siwei-yuan:codex/app-hotplug
Aug 14, 2026
Merged

feat(agentos): install ordinary apps at runtime#12
siwei-yuan merged 1 commit into
pocket-stack:mainfrom
siwei-yuan:codex/app-hotplug

Conversation

@siwei-yuan

Copy link
Copy Markdown
Collaborator

Summary

  • Decouple ordinary Apps from firmware: firmware contains only the resident Pi Agent System App.
  • Build any ordinary App as one .pocketapp with exact declared credentials, then install it through one native Installer contract.
  • Add the current LAN HTTP ingress and Pi Design review/installing/success/failure UI without adding a second lifecycle path.
  • Keep Pi Agent resident while ordinary View and Data Guests load on demand in separate simple 3-entry LRU caches.
  • Allocate App QuickJS heaps and large ESP32 worker stacks from PSRAM through the host-selected PocketJS allocator API.

Architecture boundaries

  • HTTP only transports the complete artifact. Installer alone validates the package, stores credentials in NVS, creates current, updates the in-memory installed-App index, schedules, and the live Tool snapshot.
  • A future UART ingress must hand the same artifact to Installer and cannot write lifecycle state directly.
  • Installation does not foreground the new App; the user remains on the install screen until dismissing it.
  • Marketplace, Registry, signing, TLS, update, rollback, uninstall, migration, and credential UI remain out of scope.

Cleanup

  • Delete the old pocket-pi-app-pack embedded ordinary-App composition.
  • Delete factory seeding, build-time ordinary-App selection, App whitelist logic, and UART App-credential injection.
  • Pin all PocketJS crates to merged commit e12cf12f82cc60b636368119d49a06eb9ed2a3d5 and remove both local path patches.
  • Rename the single System App build command from agentos-apps to pi-agent.
  • Update architecture, App, ESP32, Pi Design, credential, LRU, ingress, provenance, and build documentation. The root README now warns that breaking changes are frequent during rapid development.

Validation

  • cargo test --workspace — 34 passed
  • bun test apps/_shared/text.test.ts — 3 passed
  • cargo clippy --workspace --all-targets -- -D warnings — passed
  • cargo fmt --all -- --check — passed
  • git diff --check — passed
  • cargo xtask build pi-agent against the pinned PocketJS commit — passed
  • Exa and Robinhood package builds with test-only exact-ID credential files — passed
  • cargo xtask build esp32-p4 release build against the pinned PocketJS commit — passed

A fresh post-commit physical-board upload, provider call, reboot-persistence run, and sustained memory-pressure run remain separate hardware acceptance tiers; this PR does not treat the cross-build as those proofs.

@siwei-yuan
siwei-yuan merged commit 24e11cd into pocket-stack:main Aug 14, 2026
1 check passed
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.

1 participant