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

@mulmobridge/web-push

v1.0.1

Published

Auth-agnostic sender for the mulmoserver Web Push (sendPush) Cloud Function

Readme

@mulmobridge/web-push

Auth-agnostic sender for the mulmoserver sendPush Cloud Function. The app only POSTs { title, body } + a Firebase Auth ID token; the target devices resolve server-side from the signed-in user's uid, and device registration / delivery / dead-token pruning are the server's job (see mulmoserver docs/web-push-sending.md).

No firebase or app dependency — the caller injects the ID-token provider, so both mulmoclaude and mulmoterminal share one source of truth for the wire contract.

Usage

import { sendWebPush } from "@mulmobridge/web-push";

const result = await sendWebPush("✅ my-project", "Task finished", {
  // Return the current Firebase Auth ID token, or null when not signed in.
  getIdToken: async () => auth.currentUser?.getIdToken() ?? null,
});
// → { sent, failed, targets } on success, or null when nothing was sent
//   (not signed in / network / timeout / non-2xx). Never throws.
// targets === 0 means the user hasn't enabled notifications on any device.

API

  • sendWebPush(title, body, options) — POST to sendPush. No-ops (returns null, never fetches) when getIdToken() yields null or rejects. AbortController timeout (default 8000 ms). Never throws.
  • buildSendPushBody(title, body, data?) — the onCall { data: { title, body } } envelope, with the routing map nested as data.data when non-empty.
  • parseSendPushResult(json) — read { sent, failed, targets } from the onCall { result } envelope, or null when the shape doesn't match.
  • DEFAULT_SEND_PUSH_URL — the mulmoserver production endpoint.

SendWebPushOptions

| Field | Default | Purpose | |---|---|---| | getIdToken | — (required) | () => Promise<string \| null>; null ⇒ skip | | url | DEFAULT_SEND_PUSH_URL | sendPush endpoint | | timeoutMs | 8000 | request timeout | | fetchImpl | globalThis.fetch | test seam | | data | — | Record<string, string> forwarded to FCM's data block, for routing the tap |

Routing the tap (data)

A push with only a title and body lands the user on the home screen. Attach data so the receiver knows what to open:

await sendWebPush("✅ my-project", "Task finished", {
  getIdToken,
  data: { sessionId },   // → the receiver can open /terminals/{sessionId}
});

FCM requires string values. The map is deliberately untyped beyond that — each host picks its own routing keys.

data is added alongside notification, never instead of it: both mulmoserver receivers return early when payload.notification is missing, so a data-only message is silently discarded. Omitting data (or passing {}) sends exactly the envelope this package sent before the option existed.

Related projects

Used by both MulmoClaude and MulmoTerminal, and published from the MulmoClaude monorepo by Receptron.

  • MulmoClaude — an open-source AI assistant platform that runs on your own computer. Claude Code as the engine, a personal wiki for long-term memory, schema-driven collections for your data, and chat that summons the right GUI (markdown, charts, forms, spreadsheets, wikis) for each task.
  • MulmoTerminal — a terminal-first cockpit for running many AI coding agents in parallel. One roster showing every session's summary and PR status, tmux-backed session persistence, git-worktree isolation, one-click PRs, and mobile push with remote reply.
  • MulmoTerminal manual — setup, workflows, feature reference, configuration, mobile notifications, and alternative / local model providers. Available in English and Japanese.

License

MIT