Skip to content

refactor(agentos): build Pocket Pi as a device-native, agent-native runtime - #11

Merged
siwei-yuan merged 25 commits into
pocket-stack:mainfrom
siwei-yuan:codex/unified-hosts
Aug 13, 2026
Merged

refactor(agentos): build Pocket Pi as a device-native, agent-native runtime#11
siwei-yuan merged 25 commits into
pocket-stack:mainfrom
siwei-yuan:codex/unified-hosts

Conversation

@siwei-yuan

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

Copy link
Copy Markdown
Collaborator

Project scope

Pocket Pi is a complete Agent-native runtime for embedded and dedicated devices. The Agent is a resident system actor with a persistent workspace, native tools, schedules, Agent-native Apps, local state and a PocketJS UI—not a user-launched desktop application or a generic pi-agent-core SDK.

ESP32-P4 is the first fully supported hardware target and current reference implementation. hosts/esp32-p4-sim is its macOS development and product-contract testing tool; it is not a desktop Pocket Pi product or a second hardware target.

Summary

  • make Pi Agent the resident System App that owns /workspace, with ordinary Apps defined by public Tools, private Data Actions and schedules, App-local SQLite state, and fixed PocketJS Views
  • share the AgentOS and PocketJS product contracts between the physical ESP32-P4 composition and its development simulator
  • keep credentials, policy, TLS, MCP sessions, transport, lifecycle, and timeout enforcement in native target hosts
  • migrate Exa and Robinhood into build-selected App bundles and improve long-text device rendering
  • remove the superseded full macOS/Node-compatible runtime, legacy Rust device UI, compatibility paths, and other dead runtime code; Pocket Pi no longer maintains a separate desktop product composition

Audit cleanup and invariants

  • remove the Exa and Robinhood storage_status debug Tools together with their App UI, runtime branches, tests, and obsolete completion registry
  • propagate one 80 second absolute monotonic deadline from Tool routing through Data Actions into native HTTP and MCP without restarting the clock at layer boundaries
  • pin ESP32-P4 to a 100 Hz FreeRTOS tick, use vTaskDelay for native wait loops, and retain task-watchdog coverage for both idle tasks
  • coalesce App invalidation at the foreground render boundary and bound App network, SQLite, and response paths
  • synchronize README, architecture, AgentOS and port documentation with the embedded/dedicated-device project boundary

Latest validation

  • cargo test --workspace: 30 passed
  • bun test apps/_shared/text.test.ts: 3 passed
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo fmt --check
  • git diff --check
  • optimized ESP32-P4 cross-build with Pi Agent, Robinhood and Exa selected

Commit 64f951e changes documentation only; it does not modify runtime, firmware, App logic, configuration or generated bundles.

Physical ESP32-P4 evidence

Earlier commits in this PR were flashed without erasing NVS or workspace. DeepSeek, Exa, and read-only Robinhood paths completed successfully on hardware, including Exa search/fetch/SQLite state and Robinhood MCP calls. No trading or account-changing operation was called.

The final storage cleanup, absolute-deadline propagation, and scheduler/WDT tightening passed the simulator tests and optimized ESP32-P4 cross-build, but were not reflashed in the final audit. This PR therefore does not claim fresh physical-board acceptance for commit bceb641.

Expose the checked-in Robinhood catalog through deferred lookup, keep Exa and Robinhood projections bounded, and return completed App Tool results without duplicate payloads.

Reuse the embedded model worker and HTTPS client, refresh generated bundles, and align the AgentOS architecture documentation with the implemented runtime.
@siwei-yuan siwei-yuan changed the title feat(agentos): add first-class PocketJS app runtime refactor(agentos): align Apps with firmware boundaries Aug 12, 2026
@siwei-yuan siwei-yuan changed the title refactor(agentos): align Apps with firmware boundaries refactor(agentos): build Pocket Pi as a device-native runtime Aug 12, 2026
@siwei-yuan siwei-yuan changed the title refactor(agentos): build Pocket Pi as a device-native runtime refactor(agentos): build Pocket Pi as a device-native, agent-native runtime Aug 13, 2026
@siwei-yuan
siwei-yuan merged commit 63e904e into pocket-stack:main Aug 13, 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