npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@shopkit/apps-capabilities

v0.1.0

Published

Apps Platform capability catalog: single source of truth for SCOPES, METHOD_CAPABILITIES, SURFACE_ALLOWLIST, and shared message-envelope types. Consumed by apps-platform (runtime), apps-manifest (validator), and app-sdk (iframe client).

Readme

@shopkit/apps-capabilities

Single source of truth for the Apps Platform capability model. Zero runtime dependencies; consumed by:

  • @shopkit/apps-platform — runtime capability validation in HostAdapter
  • @shopkit/apps-manifest — declared-capabilities ⊆ catalog check at upload time
  • @shopkit/app-sdk — message envelope types for the iframe-side RPC client

What's in here

| Export | Purpose | | --- | --- | | SCOPES | The exhaustive catalog of capability strings. Adding/removing here is a platform-wide change. | | Capability | TypeScript union narrowed to SCOPES. | | isCapability(value) | Runtime type-guard for inbound manifest values. | | SURFACES | The 5 surfaces (embed, block, account-extension, checkout-extension, admin-extension). | | SurfaceType | TypeScript union narrowed to SURFACES. | | SURFACE_ALLOWLIST | Per-surface capability whitelist. Stage-2 of capability validation. | | METHOD_CAPABILITIES | RPC method → required capability map. The runtime trusts this; an unknown method denies as unknown_method. | | RpcMethod | TypeScript union narrowed to Object.keys(METHOD_CAPABILITIES). | | IframeReadyMessage / LoadAppCodeMessage / AppReadyMessage / IframeErrorMessage | Lifecycle envelopes. | | RpcRequestMessage / RpcResultMessage / RpcErrorCode | RPC envelopes. | | IframeOutboundMessage / HostOutboundMessage | Discriminated unions for exhaustive switches. |

Adding a new capability

  1. Add the string to SCOPES in scopes.ts.
  2. Add the RPC method(s) → scope mapping in methods.ts.
  3. Add the scope to the appropriate surface(s) in SURFACE_ALLOWLIST (surfaces.ts).

Test invariants will fail if you forget step 2 or 3 (every scope must be required by ≥1 method; every method's required capability must exist in SCOPES; every capability on a surface allowlist must exist in SCOPES).

Why a separate package

Both the runtime (apps-platform, browser) and the manifest validator (apps-manifest, Node/CLI/server) need to agree on the catalog. Duplicating drifts. Importing across runtime↔server boundaries couples them. A zero-dep contracts package is the clean cut.