Conformant NAP-SHELL domain list (PRIMARY for @napplet/shim >=0.13).
Bare NAP domain names the shell offers — 'identity', 'storage',
'inc', 'theme', etc. — with the same conditional entries as naps
(relay/outbox when a relay pool is wired, upload/intent under their
hooks). Carries NO inc:NAP-NN protocol strings (those live in
protocols). Any perm:<x> sandbox entries are appended here too, since
the 0.13 shim resolves supports('perm:<x>') against this list.
Read by createShellEnvironment(msg).capabilities.domains →
makeSupports for supports('<domain>') queries.
NAP-vocabulary domain entries the shell handles (PRIMARY — consumed by
@napplet/shim >=0.9.0). Bare domain inc (the NAP rename of inc)
plus protocol IDs inc:NAP-01..inc:NAP-06. Conditional entries:
relay, outbox prepended when a relay pool is wired; upload appended
when an upload backend is wired; intent appended when an intent
dispatcher is available.
Contains NO NAP-NN protocol strings (those live in protocols).
Conformant NAP-SHELL per-domain numbered protocols (PRIMARY for
@napplet/shim >=0.13). Maps a domain to the NAP-NN protocol IDs it
speaks — { inc: ['NAP-01','NAP-02','NAP-03','NAP-04','NAP-05','NAP-06'] }
(derived from NAP_INC_PROTOCOLS by stripping the inc: prefix).
Read by createShellEnvironment(msg).capabilities.protocols →
makeSupports for supports('<domain>','NAP-NN') queries.
Sandbox permissions under the perm:<permission> namespace. Each entry
MUST begin with the literal prefix 'perm:' — e.g. 'perm:popups',
'perm:modals', 'perm:downloads'. Napplets call
shell.supports('perm:<permission>') to check sandbox entitlements.
The perm: prefix is what separates sandbox permissions from NAP
capabilities; bare-name entries here violate the NIP-5D contract and will
be unreachable through supports() (see the living NIP-5D at
https://github.com/nostr-protocol/nips/pull/2303/). NAP-capability lookups (on naps) retain the bare-name
convention and do NOT use the perm: prefix.
Static capability set sent to napplet iframes through the shell.ready / shell.init handshake. Used by hosted
window.napplet.shell.supports()for synchronous capability queries after the shim consumes shell.init.Per canonical NIP-5D (https://github.com/nostr-protocol/nips/pull/2303/), supports() distinguishes two namespaces:
napsarray — e.g.supports('relay'),supports('identity').perm:<permission>prefix for sandbox-permission lookups, resolved against thesandboxarray — e.g.supports('perm:popups'),supports('perm:modals').The two namespaces do not cross: a bare-name lookup never matches a sandbox entry and a
perm:-prefixed lookup never matches a NAP entry.Conformant NAP-SHELL shape (TERM-03 — @napplet/core@0.12 / @napplet/shim@0.13)
The released 0.13 shim no longer reads the flat
napsarray. Onshell.initit calls@napplet/nap@0.12'screateShellEnvironment(msg)+makeSupports(env), which read the STRUCTUREDcapabilities.{ domains: string[], protocols: Record<string, string[]> }:supports('relay')→ true iff'relay' ∈ capabilities.domainssupports('inc','NAP-01')→ true iffcapabilities.protocols['inc']includes'NAP-01'domainsandprotocolsare emitted as a SUPERSET ALONGSIDE thenaps/sandboxfields (TERM-05 back-compat). The 0.13 shim has NO specialperm:logic —supports('perm:popups')is an ordinary bare-domain membership check, so kehto'sperm:-prefixed sandbox entries are folded intodomains(empty by default, preserving the default-empty sandbox behavior).