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

@sumi-labs/corpus-contract

v0.1.0

Published

Versioned Sumi documentation corpus schemas and conformance helpers.

Readme

Corpus contract

This internal package owns the Sumi Docs manifest schemas, canonical JSON, revision calculation, strict validation, and conformance fixtures. It contains no filesystem acquisition, Markdown parser, MCP transport, or Astro behavior.

Manifest version 1 remains supported without changing its payload. Version 2 adds immutable revisions, explicit locale and route metadata, content digests, navigation metadata, and provenance.

Contract rules

  • V1 is an exact version: 1 object with a path-only documents array. Unknown fields, duplicate paths, absolute paths, and non-Markdown paths are rejected.
  • V2 is sealed with sha256: plus the SHA-256 digest of canonical compact JSON for the core fields, excluding revision. Object keys and published arrays are sorted deterministically. Producer-side Windows separators normalize to /; wire manifests must already use portable paths.
  • Locale values must equal Intl.getCanonicalLocales(value)[0] (for example, zh-CN, not zh-cn). Routes are absolute site paths ending in / and do not contain dot segments, encoded delimiters, or query/fragment syntax.
  • repository, commit, and dirty are all required provenance fields. null explicitly means unavailable; a commit without a repository is not accepted. Non-null repository URLs are canonical HTTPS URLs without credentials, queries, or fragments.
  • bytes and sha256 describe the raw bytes acquired by a consumer. Use assertIntegrity before parsing text. The package enforces the existing bounded acquisition limits: 1,000 documents, 2 MiB per document, 8 MiB for OpenAPI, and 64 MiB total document bytes.

The JSON Schemas provide portable structural validation and mark the canonical BCP 47 rule. Runtime validation remains authoritative for computed revisions, cross-field uniqueness, byte totals, and exact locale canonicalization, which JSON Schema cannot express portably without custom formats.

createCurrentLocatorV2 serializes a validated manifest using the same canonical JSON and records its byte count and digest. The locator's manifest path is derived from the digest-only revision directory, so sha256: never becomes a Windows path segment. Consumers can use parseLocatedManifestV2 to verify the immutable bytes before JSON parsing and bind the parsed revision to the locator.