Skip to content

SHELL ​

Implementation: supported · Proposal: merged (status checked 2026-10-31). Optional readiness and environment binding has focused shim and reference-runtime coverage. All capabilities remain subject to change. Maturity and opt-in policy.

The runtime may expose shell for environment information. shell.supports(domain) reads current domain object presence, shell.services is empty until environment delivery, and shell.ready() / shell.onReady(handler) use the retained snapshot. Readiness does not gate other domain calls. See the living NAP-SHELL.

ts
if (window.napplet?.shell) {
  if (window.napplet.shell.supports('storage')) enableDrafts();
  const sub = window.napplet.shell.onReady((environment) => {
    console.log(environment.services);
  });
}

Named helpers shellSupports, shellReady, and shellOnReady are exported from @napplet/nap/shell.

This non-normative guide defers to the living NAP-SHELL proposal. Feature-gate with if (window.napplet?.shell) before use; the runtime injects only available domains. Typed helpers ship from @napplet/nap/shell and @napplet/sdk.

Released under the MIT License.