Back to Napplet Machines V8
SOURCE / PINNED RELEASE

Made of little things.

Napplet Machines V8

Release
b3f614e739f0…
Author-recorded commit
534f19acb4ba…
License
LICENSE
Author’s source reference
nostr://npub182jczunncwe0jn6frpqwq3e0qjws7yqqnc3auccqv9nte2dnd63scjm4rf/wss%3A%2F%2Fgit.napplet.soy%2F/n-b5572362d4a

Archive hash verified: 0f7feb97e2c3d336…. The source-to-build association is the author’s claim; it has not been independently rebuilt.

docs/boundaries.md
# Napplet Boundaries

Napplets run in a restrictive iframe and delegate privileged work to the shell.
The template should stay on the napplet side of that line.

## Napplet Owns

- UI state and rendering.
- User gestures inside the iframe.
- Calls into runtime-injected `window.napplet` through `@napplet/sdk`.
- Feature detection with injected domain property presence.
- Subscription cleanup for outbox, relay-local escape hatches, identity, config,
  keys, media, notify, and INC listeners.
- Graceful fallback when a shell does not implement a requested NAP.

## Shell Owns

- Relay pool access.
- Signing and encryption.
- User identity and signer state.
- Storage persistence and quota.
- External byte fetching through NAP-RESOURCE.
- Settings UI for NAP-CONFIG.

(NAP-CONNECT direct-network grants and NAP-CLASS security-class assignment are
currently deferred on the NAPs track — not part of the active surface.)

## Forbidden In Napplet Code

- Direct signer access or NIP-07 assumptions.
- Direct host DOM access.
- `localStorage` or `sessionStorage` for durable user data.
- Service worker registration.
- Cookie access.
- Unchecked direct network access.
- Shell policy decisions such as ACL, resource allowlists, or consent
  persistence.

## Allowed Patterns

- `import { outbox, storage, identity } from '@napplet/sdk';` for named helpers.
- `if (window.napplet?.resource) { ... }` before using optional domains.
- `relay.subscribe(..., { relay: groupRelay })` only when the feature requires
  explicit relay-local semantics that OUTBOX cannot express.
- `storage.setItem()` for durable key-value app state.
- `resource.bytes()` for external read-only bytes.