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-spec

v1.2.1

Published

BASIS — open standard for AI agent trust and governance. Canonical parameters, formulas, and types.

Readme

@vorionsys/basis-spec

BASIS — Baseline Authority for Safe & Interoperable Systems. Open standard for AI agent trust and governance.

License: Apache 2.0 npm

This package is the canonical TypeScript representation of the BASIS spec. It exports the tier definitions, risk levels, formulas, and constants any conforming implementation can rely on.

What BASIS defines

  • An 8-tier trust score model (T0..T7) on a 0..1000 scale, with each tier specifying its score range and intended autonomy level.
  • Six risk levels (READ, LOW, MEDIUM, HIGH, CRITICAL, LIFE_CRITICAL) with multipliers used in trust update formulas and minimum trust thresholds for action gating.
  • A logarithmic gain formula with cube-root risk scaling to prevent risk-seeking as a path to faster trust accumulation.
  • An asymmetric loss formula with tier-scaled penalty multipliers P(T) = 3 + T, anchored to a fixed midpoint reference so loss exposure cannot be reduced by positioning near the ceiling.
  • Five observation tiers capping the maximum achievable score based on internal-state visibility.
  • A risk accumulator with rolling 24-hour windows for warning, degraded, and circuit-breaker thresholds.
  • A dormancy schedule with stepped per-milestone deductions for inactive agents and a 50% floor.
  • Eight lifecycle states every agent traverses, with explicit canOperate / canGain / canLose semantics per state.
  • A no-positive-inheritance rule: derived agents start at zero trust and earn it.

Install

npm install @vorionsys/basis-spec

Use the canonical values

import {
  TRUST_TIERS,
  RISK_LEVELS,
  OBSERVATION_TIERS,
  GAIN_RATE,
  PENALTY_RATIO_MIN,
  PENALTY_RATIO_MAX,
  HYSTERESIS,
  PROMOTION_DELAYS,
  CIRCUIT_BREAKER,
  RISK_ACCUMULATOR,
  DORMANCY,
  LIFECYCLE_STATES,
  BASIS_SPEC_VERSION,
} from '@vorionsys/basis-spec';

console.log(BASIS_SPEC_VERSION); // "1.0.0"

Helper functions

import {
  tierFromScore,
  penaltyRatio,
  calculateGain,
  calculateLoss,
} from '@vorionsys/basis-spec';

tierFromScore(750);       // "T4"
penaltyRatio(0);          // 3
penaltyRatio(7);          // 10

calculateGain({ currentScore: 500, ceiling: 900, riskMultiplier: 5 });
// 0.05 * ln(401) * cbrt(5)

calculateLoss({ tierIndex: 4, ceiling: 900, riskMultiplier: 10 });
// -7 * 10 * 0.05 * ln(451)

Zod validators (optional)

import {
  AgentTrustStateSchema,
  GateDecisionSchema,
} from '@vorionsys/basis-spec/zod';

const result = AgentTrustStateSchema.safeParse(input);
if (!result.success) console.error(result.error.format());

Conformance

Any implementation that imports from this package and respects the canonical values is considered BASIS-conforming at the parameter level. To verify behavioural conformance (formulas, tier transitions, lifecycle invariants), use the companion test-vector package:

npm install --save-dev @vorionsys/basis-spec-conformance

License

Apache-2.0 — see LICENSE.