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

@mushi-mushi/core

v0.8.0

Published

Core types, API client, and pre-filter for Mushi Mushi SDK

Downloads

2,245

Readme

@mushi-mushi/core

Core types, API client, and utilities for the Mushi Mushi SDK.

You almost certainly don't need to install this directly. Run npx mushi-mushi and the wizard will pick the right framework SDK (@mushi-mushi/react, @mushi-mushi/vue, @mushi-mushi/svelte, @mushi-mushi/angular, @mushi-mushi/react-native, @mushi-mushi/capacitor, or @mushi-mushi/web) which depends on this package.

What's Inside

  • Types: MushiConfig, MushiReport, MushiEnvironment, and all shared interfaces
  • API Client: Fetch-based HTTP client with retry and exponential backoff. Tags every internal request with X-Mushi-Internal: <kind> so framework SDKs can filter their own traffic out of network capture and apiCascade. Ships HMAC-signed reporter helpers (getLatestSdkVersion, listReporterReports, listReporterComments, replyToReporterReport) for the two-way reply pipeline
  • Pre-Filter: On-device Stage 0 spam/gibberish filter (runs client-side, zero server cost)
  • Offline Queue: IndexedDB-backed queue with auto-sync on reconnect
  • Environment Capture: Browser/device snapshot (viewport, user agent, connection info)
  • Reporter Token: Anonymous persistent identity for report attribution
  • Session ID: Tab-scoped session correlation
  • Rate Limiter: Token bucket self-throttle to prevent API flooding

Public types added in 0.7 → 0.11

| Type | Purpose | |----------------------------|-----------------------------------------------------------------------------------------------| | MushiPreset | 'production-calm' \| 'beta-loud' \| 'internal-debug' \| 'manual-only' posture bundles. | | MushiWidgetAnchor | Raw-CSS positioning (top / right / bottom / left) for the widget launcher. | | MushiPrivacyConfig | maskSelectors, blockSelectors, allowUserRemoveScreenshot for screenshot redaction. | | MushiUrlMatcher | string \| RegExp element used by capture.ignoreUrls and apiCascade.ignoreUrls. | | MushiApiCascadeConfig | Object form of proactive.apiCascade so URL filters can be declared per-host-app. | | MushiDiagnosticsResult | Return shape of Mushi.diagnose() (CSP, runtime-config, capture, widget health). | | MushiSdkVersionInfo | Response shape for getLatestSdkVersion(packageName); powers the outdated-banner UI. | | MushiTimelineEntry | { ts, kind: 'route' \| 'click' \| 'request' \| 'log' \| 'screen', payload } repro entries. | | MushiReporterReport | Reporter-facing report row (HMAC-authed) with unread_count for the widget badge. | | MushiReporterComment | Reporter-facing comment row (HMAC-authed) tagged author_kind: 'admin' \| 'reporter'. |

Constants: MUSHI_INTERNAL_HEADER ('X-Mushi-Internal'), MUSHI_INTERNAL_INIT_MARKER, and the MushiInternalRequestKind literal union are re-exported so framework adapters can build their own self-noise filters.

Usage

import {
  createApiClient,
  createPreFilter,
  captureEnvironment,
  createRateLimiter,
  MUSHI_INTERNAL_HEADER,
} from '@mushi-mushi/core';

This package is used internally by @mushi-mushi/web and @mushi-mushi/react. Most consumers should use those packages instead.

Bundle Size

~3.15 KB brotli (limit: 15 KB)

License

MIT