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/basis-gate-runtime

v0.1.1

Published

Reference implementation of BASIS Gate v1. Resolves postures to pipelines, executes layers in block/inline/deferred modes, and produces a two-stage proof chain for every gated action.

Downloads

35

Readme

BASIS Gate Runtime

A reference implementation of BASIS Gate v1. Resolves a posture to an ordered layer pipeline, executes the pipeline for each action in the three declared execution modes, and produces a two-stage proof chain for every decision.

What this package provides

  • Posture resolver. Takes a preset, optional industry profile, and operator overrides and returns a concrete pipeline with execution modes resolved per layer per risk level.
  • Pipeline executor. Runs block layers serially, inline layers in parallel with action dispatch, and deferred layers through an in-process queue. Honors the spec's ordering, dependency, and conformance rules.
  • Two-stage proof chain. Computes and signs a tip-commit event before action dispatch. Signs and anchors chain-extension events as deferred layers complete. Emits deferred-timeout events when a deferred layer misses its window.
  • Reference layers. Minimal, auditable implementations of @basis/identity, @basis/tier-check, @basis/proof-chain-tip, @basis/audit-log, and @basis/rate-limit. These are intended as specification illustrations and as scaffolding for production deployments, not as feature-complete production layers.

What this package does not provide

  • Production-grade content-safety, jailbreak-detection, PII-redaction, or tool-validation layers. Those are domain-specific implementations that belong in separate packages.
  • Durable queue storage for deferred layers. The in-process queue here is appropriate for development and single-node use. Production deployments should supply a queue implementation backed by a durable store.
  • Sandboxing for third-party layers. Production deployments should isolate third-party layer code per the spec's security considerations (§ 10.2).

Installation

npm install @vorionsys/basis-gate-runtime

Minimal use

import { GateRuntime } from "@vorionsys/basis-gate-runtime";
import { loadBuiltinProfile } from "@vorionsys/basis-gate-industry";

// Create a runtime with a signing key.
const runtime = await GateRuntime.create({
  posture: {
    preset: "standard",
    industry: "@basis/industry/consumer-default",
  },
  signingKey: /* 32-byte Ed25519 private key */,
});

// Gate an action.
const result = await runtime.gate({
  actionId: "act_abc123",
  agentId: "agent_market_scout",
  risk: "LOW",
  classes: ["internal-effect"],
  payload: { /* ... */ },
  receivedAt: new Date().toISOString(),
});

if (result.verdict === "allow") {
  // Dispatch the action. The proof-chain tip has already been committed.
  // Deferred layers will continue running in the background.
} else if (result.verdict === "deny") {
  // The action did not pass. `result.reason` explains why.
}

License

Apache License, Version 2.0.

Related packages