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

@avee1234/warrant-verify

v0.1.0

Published

Zero-dependency Warrant verifier — runs the world-state outcome check against ground truth and renders a verdict (warranted | refuted | unverifiable). Reuses the OpenTrajectory/Inspector judge for fuzzy outcomes; the deterministic world-state engine is th

Downloads

92

Readme

@avee1234/warrant-verify

Zero-dependency Warrant verifier (spec v0). Runs the world-state outcome check against ground truth and renders a verdict: warranted | refuted | unverifiable.

The moat: the verdict is computed only from independent observations of the world (verification.evidence), never from the agent's self-reported trace (warrant.body). Self-reported evidence (independent: false) can enrich a warrant but can never, on its own, support warranted.

Build & test

npm run build   # tsc -> dist/  (no external deps; Node built-ins only)
npm test        # builds, then runs the zero-dep harness in test/run.ts

Requires Node ≥18 and a local tsc. No npm install needed at runtime.

CLI

node dist/src/cli.js verify   ../../examples/flight-booking.warrant.json  # schema + re-derive verdict
node dist/src/cli.js validate ../../examples/flight-booking.warrant.json  # JSON-schema conformance only
node dist/src/cli.js rep      ../../examples/                             # context-conditioned reputation
node dist/src/cli.js rep --by-harness ../../site/data/warrants.json       # + portable cross-harness breakdown
  • verify re-derives the verdict from the warrant's own evidence and schema-validates it — it never trusts the stamped verdict (a flipped stamp is rejected).
  • validate checks structure against schema/warrant-0.schema.json (the schema file is the source of truth, via a tiny zero-dep subset validator in schema-validate.ts).
  • rep aggregates a file or directory of warrants into per-domain, per-agent scores (the same tallyReputation the reputation board uses). Reputation is keyed by agent identity, so it is portable across harnesses; --by-harness adds the breakdown.

API

import { issueWarrant, verifyWarrant, signWarrant, verifySignature, generateKeypair } from "@avee1234/warrant-verify";
import type { Probe } from "@avee1234/warrant-verify";

// 1. Define a probe that observes GROUND TRUTH, independent of the subject.
const airline: Probe = {
  source: "amadeus-pnr-api",
  independent: true,
  run: async () => ({ observed: await fetch(`/pnr/${pnr}`).then(r => r.json()), probe: `GET /pnr/${pnr}` }),
};

// 2. Issue a warrant: probe the world, compare to the claim, compute the verdict.
const warrant = await issueWarrant({ /* issuer, subject, intent, claimed_outcome, ... */ }, [airline]);

// 3. (optional) Non-crypto signature — Ed25519 over the canonical body. No chain.
const { publicKey, privateKey } = generateKeypair();
const signed = signWarrant(warrant, privateKey, "k1");
verifySignature(signed, publicKey); // true

// 4. Anyone receiving a warrant re-derives the verdict before trusting it.
const { ok, derivedVerdict } = verifyWarrant(signed);

What's reused vs. new

  • New (the wedge): the world-state probe + comparison (probe.ts) and the deterministic verdict engine (verdict.ts).
  • Reused, not rebuilt: for fuzzy outcomes (method: "judge"), judge.ts exposes a pluggable seam for the shipped OpenTrajectory / Inspector judge — it is not re-implemented here.

See ../../docs/warrant-spec.md for the normative spec.