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

causalontology

v4.0.0

Published

The JavaScript binding of the Causalontology standard - the third verified implementation. Node.js builtins only; zero dependencies.

Readme

causalontology-js

The third implementation of the Causalontology standard — further proof of language independence. (The first is the PrologAI reference implementation; the second is the Python binding in bindings/python/.)

Zero dependencies — Node.js builtins only (node:crypto, node:fs, node:path). The whole SDK is a single CommonJS module, causalontology.js:

| Area | Implements | |---|---| | canonical | RFC 8785 (JSON Canonicalization Scheme) serialization, identity-bearing field filtering, Secure Hash Algorithm 256-bit (SHA-256) content-addressed identify(). JavaScript gets RFC 8785 primitives natively: JSON.stringify's number and string serialization IS the ES6 rule the RFC is based on. | | ed25519 | Ed25519 (RFC 8032) via node:crypto KeyObjects (raw 32-byte seeds and public keys wrapped in PKCS8/SPKI DER), verified against the RFC's known-answer test | | signing | record-level signRecord() / verifyRecord() over canonical identity-bearing bytes | | schema | validation against the twenty-one JSON Schemas in spec/schema/ | | semantics | the 25 semantic rules: temporal admissibility (fixed constants, with the ordinal ticks dimension kept disjoint from wall-clock), formal conflict, refinement validity, bridged reachability, stratal classification, the skip decision, seam well-formedness (Algorithm F) and the coarsest-stratum home rule, enrichment field/shape rules, the token-tier coherence checks, the prediction pairing check, and the attitude quarantine | | store | an in-memory conformant store: idempotent immutable puts, signed add-only records, materialized enrichment views with contributors, retraction and succession lineage, the resolve minimum, the deterministic cycle-breaking view rule, and the stigmergy gaps() read |

application programming interface (API) surface

const {
  canonicalize, identify, identityBearing, inferKind,
  validateSchema, validateSemantics, isPartial, admissible,
  conflicts, refinementValid, hierarchyConsistent, UNIT_SECONDS,
  keypairFromSeed, signRecord, verifyRecord,
  InMemoryStore, RejectedWrite,
} = require("./causalontology.js");

Ed25519 is deterministic (RFC 8032), and the canonical bytes are pinned by RFC 8785, so identifiers and signatures are byte-compatible across the Prolog, Python, and JavaScript implementations: the same record signed with the same key yields the same id and the same signature in all three.

TypeScript

The binding is typed out of the box: hand-written declarations in causalontology.d.ts (wired up via "types" in package.json) cover the whole exported surface — the domain shapes (including the 3.0.0 cross_stratal_seam and the 4.0.0 attitude, predicted_occurrence, and prediction_error), every function, the InMemoryStore class (including the materialized-view and gaps() return shapes), and RejectedWrite. The JavaScript module remains the single source of logic; the declarations only describe it.

import co = require("./causalontology"); // CommonJS export= pattern

const store = new co.InMemoryStore();
const id = store.put({ label: "press_button", category: "action" }, "occurrent");
const view = store.get(id); // { object, enrichments } | null, fully typed

Type-check the declarations and the compile-only exercise in tests/type_check.ts with:

$ npx tsc -p .

No dependencies are needed (not even @types/node): binary values are declared as Uint8Array (co.Bytes), which every Node Buffer is.

Conformance

$ node tests/run_conformance.js
...
137/137 vectors passed
causalontology-js is CONFORMANT to the suite (vectors frozen at specification 4.0.0).

The vectors are frozen at specification 4.0.0 (2026-07-22; 137 vectors, V01–V137): they carry concrete identifiers, real keys, and a real verifying signature. The harness's old normalization now simply passes frozen values through.

License

The attribution always; no profit, no problem license. (Apache License 2.0 text — see the repository LICENSE and NOTICE.)