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

@vorionsys/gate-core

v0.6.0

Published

Minimal deterministic BASIS gate engine — fail-closed pipeline emitting signed, hash-linked decision records (verify with npx @vorionsys/verify)

Readme

@vorionsys/gate-core

The minimal deterministic BASIS gate engine — fail-closed checks in fixed order, every verdict signed into a hash-linked chain of canonical decision records.

license

Use

import { GateChain, ed25519Signer } from "@vorionsys/gate-core";

const gate = new GateChain({ policy, signer: ed25519Signer(privateKey, "my-kid") });
const record = gate.evaluate(ctx, {
  domain: "finance.payments",
  capability: "payments.execute",
  params: { amountUsd: 250_000 },
});
// record.verdict → { decision: "escalate", reason: "TIER_CAP_EXCEEDED", latencyMs: 0, linksTo: null }

gate.resolveEscalation(record.id, "deny", ctx); // signed HUMAN_DENIED, linksTo record.id
gate.toChainFile(); // → verify with `npx @vorionsys/verify` or verifier.html

The pipeline (fixed order, fail-closed by construction)

  1. credential check → deny CREDENTIAL_REVOKED / CREDENTIAL_EXPIRED (expired, none, or past expiresAt)
  2. domain allowlist → deny DOMAIN_NOT_ALLOWLISTED
  3. tier cap → escalate TIER_CAP_EXCEEDED
  4. otherwise → allow WITHIN_AUTHORITY

No model, no randomness, no I/O in the decision path — decisions land in single-digit milliseconds and the latency is recorded in every verdict. Raw action params never enter a record; only their RFC 8785 hash does.

Human resolutions (resolveEscalation) emit a record that copies the escalated action verbatim and sets verdict.linksTo — accountability is structural.

One crypto implementation, zero drift

This package imports canonicalBytes and hashRecord from @vorionsys/verify rather than implementing its own. That direction is deliberate: the thing that signs cannot disagree with the thing that verifies.

Where this sits in BASIS

basis-spec (standard)
   └── basis-gate (Gate v1 spec + layered reference runtime)
         ├── contracts (record schema — @vorionsys/contracts/basis)
         ├── THIS REPO ◄ (minimal embeddable gate core)
         └── basis-verify (offline proof-chain verification)

Two gate implementations, one lineage, one record format: @vorionsys/basis-gate-runtime is the full reference implementation of the Gate v1 spec (composable layers, postures, block/inline/deferred execution); this package is the minimal core — the fixed fail-closed pipeline for when you want gate semantics in a few kilobytes. Converging the runtime's proof output onto the canonical decision-record format is tracked publicly on basis-gate.

See it run at basis-demo — the demo imports this exact package; that is the credibility mechanism. Standard: basis-spec · vorion.org

Status & versioning

v0.1.0 — minimal pipeline matching the demo policy surface (payment caps, domain allowlist, credential state). npm publish lands once @vorionsys/[email protected] (vorionsys/contracts PR: feat/basis-decision-record) is merged and released. Roadmap, not built: pluggable check stages, rate/risk accumulators, multi-signer.

Development

git clone https://github.com/vorionsys/gate-core && cd gate-core
npm install && npm run build && npm test   # one test per reason code + chain round-trip

Node ≥ 18. PRs: small, tested, one concern.

License

Apache-2.0 © Vorion LLC