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

@myzonerocks/app-sdk

v0.1.1

Published

Partner SDK for the chat App Store: build one web mini-app that runs on web, iOS and Android.

Downloads

251

Readme

app-sdk

The partner SDK for the chat App Store. A mini-app is a web app, and every client — web, and iOS/Android through their native webview bridge — hosts it and speaks one protocol. So a partner writes one build that runs everywhere; there is no separate iOS or Android SDK to maintain.

The SDK is the app's side of that protocol. It never sees the conversation — the chat is end-to-end encrypted and the host hands the app only what the user explicitly shares. The host mediates every call: it checks the app's capability, prompts for consent, runs the payment rails, and does the platform-native thing behind a single verb (a web payment request, Apple Pay, Google Pay).

It speaks the App Store protocol (spec revision 1): the same capability names and decisions the host enforces, so the SDK and the host never disagree.

New here? Start with the integration guide — the manifest, capabilities and consent, the verbs, and a worked minimal mini-app.

Install

bun add @myzonerocks/app-sdk

Use

import { connect, AppError, Capabilities } from '@myzonerocks/app-sdk'

const app = await connect({ hostOrigin: 'https://host.example' })

// A per-app scoped identity — never the real account.
console.log(app.session.user.displayName)

// Post a card into the thread.
await app.card({
  title: 'Split the ride?',
  actions: [{ id: 'split', label: 'Split 4 ways', style: 'primary' }],
})

// Ask for money; the host runs consent and the rails. Amount is minor units as a
// string, so precision is never lost.
try {
  const r = await app.requestPayment({ to: 'user_2', amount: '1250', token: 'USD', memo: 'ride' })
  if (r.status === 'settled') app.card({ title: 'Settled — thanks!' })
} catch (e) {
  if (e instanceof AppError && e.code === 'denied') { /* the user declined */ }
}

// Ask the user to share one thing; the host prompts and returns only that.
const ctx = await app.getContext('location')

app.close()

Surface

connect(options) handshakes and returns an App:

  • app.session — the scoped user, locale, theme, and the capabilities granted at install.
  • app.has(capability) — whether a capability was granted.
  • app.card(input) — post a card into the thread.
  • app.requestPayment(input) — pay / request-to-pay via the host's rails.
  • app.getContext(scope) — request identity | location | selection, with consent.
  • app.openSheet(size?) — open the app's UI in a host sheet.
  • app.getState() / app.setState(data) — persist your app's state across close/reopen, scoped to the app + user + conversation (stateful apps; no capability needed).
  • app.act(input) — (agents) propose or take an action within a granted scope.
  • app.on(event, handler) — subscribe to host events (e.g. a payment settling).
  • app.close(result?) / app.disconnect().

Every request is correlated to its reply, times out a silent host, and rejects with an AppError whose code (denied, not_configured, timeout, …) is stable to branch on.

Testing / native hosts

connect takes an optional transport, so the SDK runs against a mock host with no DOM (see test/) and a native host (WKWebView, Android WebView) can supply its own bridge while the app code stays identical.

License

See LICENSE.