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

@soundbase/plugin-contract

v0.9.0

Published

SoundBase plugin contract: manifest schema, core API and SpectrumAnalyzer module OpenAPI specs, manifest validator.

Readme

@soundbase/plugin-contract

The compatibility boundary between SoundBase and a plugin process: the manifest schema (spec/soundbase-plugin.schema.json, the normative artifact for plugin authors), the OpenAPI 3.1 documents for the core plugin API (spec/core.openapi.yaml) and its modules — SpectrumAnalyzer (spec/spectrum-analyzer.openapi.yaml), ChannelMonitoring (spec/channel-monitoring.openapi.yaml) and PropertyControl (spec/property-control.openapi.yaml) — the core state-key table (spec/state-keys.json), and the shared constants and normalisers both sides depend on. It has no opinion about how a plugin is implemented — the host, the plugin shell and third-party tooling all validate against the same schema.

import { validateManifest, HANDSHAKE_PREFIX } from '@soundbase/plugin-contract';

const result = validateManifest(JSON.parse(await readFile(path, 'utf8')));
if (!result.ok) throw new Error(result.errors.join('; '));
console.log(result.manifest.id, HANDSHAKE_PREFIX);

validateManifest is a zod mirror of the JSON schema; a test in this package runs every manifest fixture through both and asserts identical verdicts. Unknown properties are tolerated everywhere, so a manifest written for a newer host still loads on an older one.

State patches and layouts

ChannelMonitoring plugins push device state as SoundBase's own patch envelope. createStatePatch(manifest, key, value, operation?) derives the patch's scope, operation and entity kind — from spec/state-keys.json for a core key, from the manifest's stateKeys for an extension key — and throws on anything else, so a bad emission fails in the plugin rather than being dropped by the host. normalizeLayout(layout) is the matching normaliser for a product's rendering layout. The shell runs both before emitting and the host runs both before reducing, the way normalizeWarnings is run today. spec/state-keys.json and LAYOUT_METRICS are the host's own tables, so a patch or layout this package accepts is one the host accepts.