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

@nobulex/trust-physics

v0.2.1

Published

Multidimensional, directional, time-decaying, context-dependent, composable trust framework for the Nobulex covenant protocol

Readme

@nobulex/trust-physics

A mathematical framework for multidimensional, directional, time-decaying, context-dependent, composable trust in autonomous systems.

Why Trust Physics?

Current trust systems — star ratings, credit scores, TLS certificates — are one-dimensional, centralized, and designed for humans. As billions of autonomous systems deploy, trust must become computable, composable, and cryptographically verifiable at machine speed.

Trust Physics models trust the way it actually works in the real world:

| Property | Star Ratings | Trust Physics | |---|---|---| | Dimensions | 1 (a number) | 6+ (vector) | | Direction | Symmetric | Directional (A→B ≠ B→A) | | Context | Global | Scoped (financial ≠ medical) | | Time | Static | Decaying (erodes without reinforcement) | | Transitivity | None | Composable chains with attenuation | | Stakeable | No | Yes (reputation as collateral) |

Core Concepts

Trust is a Vector, Not a Scalar

A single number cannot capture trust. An agent may be highly reliable but not transparent, or capable but not benevolent. Trust Physics decomposes trust into six core dimensions:

  • Reliability — Does the agent do what it says?
  • Capability — Can the agent perform this task competently?
  • Integrity — Does the agent act honestly when unobserved?
  • Benevolence — Does the agent act in others' interests?
  • Predictability — How consistent is the agent's behavior?
  • Transparency — How observable are the agent's processes?

Custom dimensions can be added for domain-specific needs.

Trust is Directional

Agent A trusting Agent B does not mean B trusts A. Every trust relationship is a directed edge with an explicit trustor and trustee.

Trust is Context-Dependent

An agent trusted for financial transactions is NOT automatically trusted for medical decisions. Every trust relationship is scoped to a domain and scope.

Trust Decays Over Time

Trust erodes without reinforcement. The decay follows an exponential function:

trust(t) = base_trust × e^(-λ × Δt)

Verified covenant compliance reinforces trust and slows future decay.

Trust is Composable

If A trusts B and B trusts C, A has derived trust in C — but trust attenuates through each hop. A three-hop chain with 0.9 trust per link and 0.7 attenuation yields 0.9 × 0.9 × 0.7 × 0.9 × 0.7 ≈ 0.357 end-to-end trust per dimension.

Trust is Stakeable

Agents can stake their own reputation on claims about other agents, creating a trust economy where reputation becomes tradeable collateral.

Installation

npm install @nobulex/trust-physics

Usage

Creating Trust Vectors

import {
  createTrustVector,
  createTrustVectorFromValues,
  trustMagnitude,
} from '@nobulex/trust-physics';

// Uniform trust vector (all dimensions at 0.8)
const uniform = createTrustVector(0.8);

// Per-dimension trust vector
const specific = createTrustVectorFromValues({
  reliability: 0.95,
  capability: 0.8,
  integrity: 0.9,
  benevolence: 0.7,
  predictability: 0.85,
  transparency: 0.6,
});

// Scalar summary
console.log(trustMagnitude(specific)); // ~0.81

Directional Trust with Context

import {
  createDirectionalTrust,
  createTrustContext,
} from '@nobulex/trust-physics';

const financialCtx = createTrustContext('financial', 'transactions_under_10k');

const trust = createDirectionalTrust(
  agentA,       // trustor
  agentB,       // trustee
  createTrustVector(0.85),
  financialCtx,
);

Time-Decaying Trust

import {
  createDecayConfig,
  applyDecay,
  reinforceDecay,
  computeHalfLife,
} from '@nobulex/trust-physics';

const decay = createDecayConfig(); // ~30-day half-life

// Trust decays over time
const currentTrust = applyDecay(baseVector, decay);

// Verified covenant compliance slows decay
const reinforced = reinforceDecay(decay);
console.log(computeHalfLife(reinforced)); // Longer half-life

Trust Chains

import { createTrustChain, computeChainTrust } from '@nobulex/trust-physics';

const chain = createTrustChain([trustAB, trustBC], 0.7);
const endToEnd = computeChainTrust(chain);
// Each dimension: A→B trust × B→C trust × 0.7 attenuation

Trust Graph

import { TrustGraph } from '@nobulex/trust-physics';

const graph = new TrustGraph();
graph.addTrust(trustAB);
graph.addTrust(trustBC);

// Direct trust query
const direct = graph.queryTrust(agentA, agentB);

// Transitive trust via pathfinding
const paths = graph.findTrustPaths(agentA, agentC, 4);

// Aggregated reputation
const reputation = graph.getReputationVector(agentC);

Trust Staking

import { createTrustStake, resolveStake } from '@nobulex/trust-physics';

const stake = createTrustStake(
  staker,           // Agent risking reputation
  subject,          // Agent being vouched for
  covenantDoc,      // The behavioral commitment
  0.3,              // 30% of reputation at risk
  0.1,              // 10% reward if verified
  0.2,              // 20% penalty if falsified
  86_400_000,       // 24-hour expiry
);

// Later, resolve with a compliance proof
const { outcome } = resolveStake(stake, complianceProof);
// outcome.verified === true → staker gains 0.1 reputation
// outcome.verified === false → staker loses 0.2 reputation

Connection to the Covenant Protocol

Trust Physics is the fourth layer of the Nobulex architecture:

  1. Identity (@nobulex/identity) — Every autonomous system gets a cryptographic identity
  2. Covenants (@nobulex/core) — Any system can make verifiable behavioral commitments
  3. Proofs (@nobulex/proof) — Third parties verify covenant compliance with zero knowledge
  4. Trust Physics (@nobulex/trust-physics) — Verified covenants compose into rich, multidimensional trust relationships

Trust is the emergent property that arises from accumulated verified covenants over time.

The Vision

TCP/IP gave machines communication. Bitcoin gave machines value transfer. The Covenant Protocol gives machines trust.

License

MIT