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

@mostra/conformance

v0.8.0

Published

Prove a host's Mostra integration: conformance scenarios run against your host through a small harness protocol, with expected-failure baselines and reference hosts.

Readme

@mostra/conformance

Prove that a host's Mostra integration holds. The kit runs scenarios against your host (durable submissions, delivery once in effect across crashes, retries and outbox replay, identity, trusted controls, hygiene, version negotiation, long-lived state, the authoring directory's removal, and more), compares the outcome with your expected-failure baseline, and exits 0 only when nothing changed for the worse.

How it reaches your host

Your host ships a small harness shim: a program the kit starts, which reads JSON-RPC 2.0 requests on stdin (one per line) and answers them with your real integration. Any language works.

| Method | Your shim | |---|---| | harness/initialize | names the host, the ports it registers and its features (attach, faults, events) | | harness/start { home, env, mode? } | starts or attaches to your Mostra instance for that home, adding env to its environment | | harness/call { method, params, timeoutMs? } | sends one host-protocol request through your client; answers { result } or { error } | | harness/stop | ends your session | | harness/store | reports what your own store holds: deliveries, draft mirrors, activations, identity, policy and secret calls, with what your identity and policy ports answered (scenarios judge a host that can't be scripted by those answers) | | harness/script | (feature faults) answers a port the way the kit asks | | harness/events | (feature events) reads pages from your own named event stream |

TypeScript hosts write the shim with serveHarness:

import { serveHarness } from "@mostra/conformance";

await serveHarness({
  initialize: () => ({ host: { name: "my-host", version: "1.0.0" }, ports: ["submissions"], features: [] }),
  start: (params) => myHost.startMostra(params.home, params.env),
  call: (method, params) => myHost.mostra.call(method, params),
  stop: () => myHost.stopMostra(),
  store: () => myHost.conformanceStore(),
});

Rust hosts copy crates/mostra-host-reference in the Mostra repository.

Running it

npx -p @mostra/conformance mostra-conformance --host "node my-harness.js" --baseline conformance.json
npx -p @mostra/conformance mostra-conformance --list

--only <id or prefix> picks scenarios, --json prints the report, --verify publishes through verify's gate (it needs the verify browser). Exit codes: 0 conformant, 1 not, 2 a usage error.

Baselines

A host that fails a scenario today records it with the reason:

{ "schemaVersion": 1, "expectedFailures": { "delivery.exactly-once": "our store isn't idempotent yet (#123)" } }

The run stays green while those fail and goes red when a new scenario fails or a listed one passes, so the baseline only ever shrinks.

Reference hosts

mostra-conformance-reference-host is the TypeScript reference host, built on @mostra/sdk. --standalone registers no port (Mostra's built-in adapters); --unscripted serves every port without the faults feature, naming people by its own IDs and allowing both channels, as a host that can't be scripted would; --break <fault,…> is a deliberately broken host for proving the kit. Both reference hosts pass every scenario that applies to them.

License: Apache-2.0.