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

@docflow-local/contracts

v0.1.0

Published

Versioned public contracts shared by DocFlow Core, hosts and plugins

Readme

DocFlow public contracts

@docflow-local/contracts is the versioned compatibility boundary shared by DocFlow Core, desktop hosts and plugins.

It exports:

  • SCHEMA_VERSION
  • PLUGIN_API_VERSION
  • PLUGIN_CAPABILITIES
  • GENERATE_REQUEST_KEYS
  • ERROR_CODES
  • DocFlowError
  • assertSchemaVersion()
  • assertKnownProperties()
  • registerAjvRuntimeTypes()
  • problemFromError()
  • JSON schemas through @docflow-local/contracts/schemas/*

generate-request.schema.json describes the public Node generation job, including rows, plugin transforms, assets, strict validation and naming aliases. Buffer fields carry the x-docflow-runtimeType keyword because a Node Buffer is not a JSON value. Register that keyword with registerAjvRuntimeTypes(ajv) when using Ajv; generic JSON-only validators can still validate the surrounding descriptor shape but cannot validate Node binary types. Core rejects unknown top-level generation properties so the runtime and schema cannot silently drift.

Plugin contract v1

A plugin package exports one module with exactly two public pieces:

module.exports = {
  manifest: {
    schemaVersion: 1,
    id: "example.csv-cleanup",
    name: "CSV cleanup",
    version: "1.0.0",
    apiVersion: "1",
    entry: "index.js",
    capabilities: ["transform"],
    permissions: {
      filesystem: ["read"]
    }
  },
  activate(api) {
    api.registerTransform("cleanup", (row, context) => ({
      ...row,
      customer: String(row.customer || "").trim()
    }));
  }
};

The module must export:

  • manifest, conforming to plugin-manifest.schema.json;
  • synchronous activate(api).

The v1 api exposes exactly these registration functions, each taking a hook name and its implementation:

registerDataSource(name, dataSource)
registerTransform(name, transform)
registerFormatter(name, formatter)
registerOutputSink(name, outputSink)

The matching capability must appear in manifest.capabilities:

data-source
transform
formatter
output-sink

permissions is a transparent declaration of expected filesystem and network access. It is not a security sandbox. Plugins execute as trusted code in the host process and must be reviewed before installation.

Versioning

Generation requests carry schemaVersion: 1; plugin manifests carry both schemaVersion: 1 and apiVersion: "1". A host must reject unsupported versions rather than guessing or silently coercing them.

Errors crossing a process or HTTP boundary use ERROR_CODES. HTTP adapters can turn a DocFlowError into an RFC 9457-style problem document with problemFromError().