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

@concordance-wiki/core

v1.0.0

Published

Model types, identifiers, canonical sorting, deterministic utilities and the plugin API.

Readme


Why

Concordance turns the markdown your team writes for the AI into a wiki for the humans: point it at your git repositories and every word of your business gets a page. You install @concordance-wiki/concordance for that. This package is the part of it every other part depends on: the shape of the model, the schemas of the configuration files, the deterministic identifiers, the injected file system, git and clock, and the API a plugin declares itself with. Install it alone to write a plugin, or to build on the engine.

Quick start

npm install @concordance-wiki/core

The smallest plugin, a reader for .log files, declared with definePlugin and named from concordance.yaml under plugins::

import { definePlugin } from "@concordance-wiki/core";

export default definePlugin({
  name: "concordance-plugin-reader-log",
  version: "0.1.0",
  apiVersion: "1",
  contributes: {
    readers: [
      {
        extensions: [".log"],
        read: (input) => ({ metadata: {}, text: new TextDecoder().decode(input.payload.bytes) }),
      },
    ],
  },
});

Reading and validating a configuration the way concordance validate-config does:

import { formatValidation, parseConfig } from "@concordance-wiki/core";
import { readFileSync } from "node:fs";

const validation = parseConfig(readFileSync("concordance.yaml", "utf8"));
for (const line of formatValidation(validation, "concordance.yaml")) console.log(line);

What you get

  • The plugin API: definePlugin, loadPlugins, importPlugin and the contribution points, readers, converters, sources, inference methods, checks, projections, UI components, themes, types.
  • The configuration, checked: parseConfig, validateConfig, formatValidation, with the lock file of human decisions and the theme file, against the JSON schemas shipped under schemas/.
  • What a repository declares for the tool: readLintConfig, repositoryFiles, compileGitignore, the files a build or a lint reads once the excluded globs and the .gitignore files apply.
  • Injected effects: FileSystem, GitClient, Clock with their node and in-memory implementations, so that everything else stays pure and testable.
  • Deterministic identifiers: slugify, identifierFor, resolveDuplicates, pagePath, pageUrl; two builds of the same sources name everything the same.
  • The model: Entity, Link, Provenance, Finding with their canonical comparators, assembleModel, serializeModel, parseModel, validateModel, toCypher.
  • The build log: summarize, shouldFail, serializeBuildLog, the counts per severity and per check and the verdict of build.fail_on.
  • Contracts and pseudonyms: the contract cache the contract plugins share, and the pseudonymisation of transcripts and of the names a dictionary lists.

Documentation

Part of Concordance, MIT licence.

Configuration parsing and validation (parseConfig, validateConfig, formatValidation), the lock file of human decisions (parseLock, validateLock over schemas/lock.schema.json, the LockFile type), the schema reader (readSchema) and error describer (describeSchemaError), the lint configuration of a repository (readLintConfig, parseLintConfig over schemas/lint.schema.json) and the files a repository holds for the tool (repositoryFiles: the excluded globs and, through compileGitignore and readGitignore, the files git ignores are left out), the injected file system (FileSystem, nodeFileSystem, memoryFileSystem), the plugin API (PLUGIN_API_VERSION, definePlugin, loadPlugins, importPlugin, commandExists, the types contribution point listing the type modules of the plugins with typeSlugOf naming each after its folder), the schema of a type module (schemas/type-module.schema.json), the finding type with its canonical order (Finding, compareFindings; every finding carries a remediation) and the build log (summarize, shouldFail, serializeBuildLog): counts per severity and per check, the decisions of the lock file applied (LockCounts), the verdict driven by build.fail_on, and the stable JSON written to dist/build.log.json, deterministic identifiers (slugify, identifierFor, resolveDuplicates, pagePath, pageUrl), and the link model (Link, Provenance) mirroring schemas/model.schema.json, ordered by the canonical comparators (compareLinks, compareProvenances), the entity of the model (Entity, mirroring the entities block of model.json, keyword: true marking a keyword page without a note), the keyword counts of the build summary (KeywordCounts: pages published and expressions under the threshold, serialised only when the build computes them), and the canonical model itself: assembleModel sorts every block, serializeModel writes the canonical JSON of dist/model.json, parseModel and validateModel check a model against schemas/model.schema.json (ModelError carries the issues), and toCypher turns a model into a Cypher script; the contract loading the contract plugins share (loadContracts with a ContractReader, declaredContracts, fingerprintOf, the cache under <cache>/contracts/, the ContractView written next to the cached contract for the viewer of the API page); and pseudonymisation of transcripts (loadPseudonymDictionary over the published pseudonyms.schema.json, pseudonymizeText, pseudonymizeSpeaker, pseudonymizeTranscript, transcriptsPublished).