Trust and capabilities
PocketPi does not trust App source to define its own authority. Apps declare intent; native code validates the package, mounts scoped capabilities, retains credentials and enforces exact transport and lifecycle boundaries.
Trust zones
| Zone | Trusted for | Not trusted for |
|---|---|---|
| Native host/runtime | capability enforcement, credential storage, storage roots, deadlines, package lifecycle | App domain meaning or provider response mapping |
| Resident System App | top-level workspace UI, narrow system commands, Agent interaction | raw native secrets or arbitrary host calls |
| Ordinary App source | declared domain behavior and fixed View | other Apps, top-level workspace, undeclared endpoints/operations |
| Agent/model output | intent, reasoning and selection among advertised Tools | credentials, direct database writes or bypassing confirmation |
| Package transport | moving one complete candidate artifact | activating it or writing live App/runtime state |
Capability declaration
"capabilities": ["data.sqlite", "net.http"]The current manifest accepts:
data.sqlitefor the App-owned database contract;data.fsas a recognized App-local filesystem capability;net.httpfor the bounded Actionfetch()surface.
Duplicate or unknown capabilities reject the App. A declaration does not override native enforcement: the host still decides which module/service surface is mounted and which App id owns it.
Network policy is more specific than a capability
net.http allows the HTTP mechanism, while nativeServices.http declares exact methods, URLs, request headers and optional credential binding. MCP connections declare exact connection URLs, credential binding and a separate operation allowlist. App JavaScript cannot turn those into an unrestricted proxy.
Credential lifecycle
- The manifest declares stable credential ids and how native transport consumes them.
- A first-install
credentials.jsoncarries exactly those values. - The Installer strips the file before App activation and writes values to native storage.
- At request time, native code applies the value only to an allowlisted operation.
- Update packages omit credentials and preserve installed native values.
- Uninstall removes credentials owned by that App.
A raw credential never needs to enter App source, App SQLite, the Agent workspace, Tool arguments, the fixed View or model context.
Human review
Both HTTP and UART ingress stop at one review screen. Review makes the candidate identity, version, Tools, schedules and network/credential needs visible before lifecycle mutation. It is an installation boundary, not blanket approval for every future real-world action an App Tool might perform.
Product-level safety still belongs to the App
An allowlisted provider operation is necessary but not sufficient for high-impact behavior. The App must describe side effects accurately, validate arguments, use idempotency identifiers where offered, avoid unsafe retries after ambiguous responses and introduce explicit product confirmation where the domain requires it.