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

@kindgi/pack-conformance

v0.8.1

Published

Conformance suite for pack services: a black-box HTTP and process test of pack protocol v2 and the pack index, run against any language's pack service and indexer over the same fixture pack. Kindgi's Node pack service, the Python `kindgi` package and the

Readme

@kindgi/pack-conformance

The conformance suite for pack services. A Kindgi runtime runs a pack's code by calling a pack service over pack protocol v2, and learns the pack from its index. Any language can implement both; this suite is how an implementation proves it.

It checks, from the outside:

  • the index the implementation's indexer writes for the fixture pack: valid against the spec, the right ids, canonical bytes (sorted keys, two-space indent, trailing newline), the same bytes on a second build, and every flow passing the graph checks every index goes through (flowGraphProblem, from @kindgi/flow);
  • a flow with a cycle, in the invalid-flow pack: refused, either by the indexer (a manifest-validation-failed file error naming its module) or by those graph checks on the index it wrote;
  • the process contract: --index / --module-root / --host, KINDGI_PACK_SERVICE_TOKEN, PORT=0, KINDGI_PACK_SERVICE_MAX_CONCURRENCY, KINDGI_PACK_ENV_CHECK, KINDGI_PACK_ENV_FILTER; the listening, config-invalid and boot-failed lines on stderr; SIGTERM draining in-flight calls and exiting 0;
  • every route and status: /healthz, /readyz, /v1/info, /v1/invoke; 401 / 404 / 405 / 413 / 415 / 503 with Retry-After;
  • the declared process env: an index's env.required names, unset or empty, keep /readyz and calls at 503 (missing env), and /v1/info lists them;
  • the pack's environment: a variable the index doesn't declare is absent in a tool, while the declared ones, KINDGI_* and the platform's are there; env-dropped names it, never its value; KINDGI_PACK_ENV_FILTER=off keeps it. The suite sets KINDGI_PACK_ENV_DECLARED from the index, as a built image does, for a JVM pack service's launcher;
  • every message: results, Ajv-shaped validation issues, handler-throw, tool-not-in-pack, tool-version-mismatch, malformed requests, deadline-exceeded from kindgi-timeout-ms, cancelled on disconnect, check results, a check's config refused against its configSchema (the first issue in the message) — each answer validated against the protocol schema.

Targets

| Target | Indexer | Pack service | Fixtures | |---|---|---|---| | tests/node.test.ts | runIndexer (@kindgi/handler-runtime) | @kindgi/handler-runtime/pack-service-main | fixtures/node-pack, fixtures/node-invalid-flow-pack | | tests/python.test.ts | python -m kindgi.pack index | python -m kindgi.pack serve | fixtures/python-pack, fixtures/python-invalid-flow-pack | | tests/java.test.ts | com.kindgi.pack.Main index | kindgi-pack-java … com.kindgi.pack.Main serve | fixtures/java-pack, fixtures/java-invalid-flow-pack | | tests/scala.test.ts | com.kindgi.pack.Main index | kindgi-pack-java … com.kindgi.pack.Main serve | fixtures/scala-pack, fixtures/scala-invalid-flow-pack |

The Python target uses KINDGI_CONFORMANCE_PYTHON, else sdks/python/.venv (uv sync in sdks/python), and is skipped — saying why — when neither exists.

The Java target uses the JDK 17+ in KINDGI_CONFORMANCE_JAVA_HOME, else JAVA_HOME, else the java on PATH, and the built sdks/java/kindgi-pack (./mvnw -pl kindgi-pack -am compile in sdks/java). It compiles both fixture packs against them and starts the service through its launcher. Without a JDK or the build it's skipped, saying why; under CI it fails instead.

The Scala target runs the same service and indexer on the fixture packs in Scala (kindgi-pack-scala, sdks/scala). sbt builds each against the layer from source: with kindgi-pack installed (./mvnw -pl kindgi-pack -am install -DskipTests), sbt writeClasspath in fixtures/scala-pack and in fixtures/scala-invalid-flow-pack writes its target/classpath.txt (Scala 3; sbt "++2.13.18!" writeClasspath for 2.13, in both). Without them, or with the two built on different Scala versions, the target is skipped, saying why. The Scala job sets KINDGI_CONFORMANCE_SCALA=1, under which it fails instead.

A target that hasn't implemented part of the contract yet lists it in unsupported (ConformanceFeature, e.g. 'pack-env'): those cases are skipped until it drops the entry. A target without indexInvalidFlowPack has the invalid-flow case skipped, saying so.

Adding an implementation

  1. Write the fixture pack in your language under fixtures/<name>-pack/, and the invalid-flow pack under fixtures/<name>-invalid-flow-pack/ (FIXTURE.md).
  2. Add tests/<name>.test.ts:
import { describePackServiceConformance, fixturePackDir } from '../src/index.js';

describePackServiceConformance({
  name: 'go',
  packDir: fixturePackDir('go-pack'),
  command: ['/path/to/pack-service'],          // the suite appends --index, --module-root, --host
  async buildIndex(outputPath, { artifactVersion, publishedAt }) {
    // run your indexer on packDir, writing outputPath with these pins
  },
  async indexInvalidFlowPack(outputPath, { artifactVersion, publishedAt }) {
    // run it on fixturePackDir('go-invalid-flow-pack') the same way, and
    // return its file errors ({ code, message, filePath }) instead of throwing
    return [];
  },
});

License

Apache-2.0 — see LICENSE.