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

@reinconsole/policy-engine

v0.1.1

Published

Rein policy evaluation service — sandboxed declarative rule engine with hash-chained, signed decisions.

Readme

@reinconsole/policy-engine

The rule engine of Rein — the control plane for AI agent payments. A sandboxed, declarative policy engine that judges every payment intent (deny > escalate > allow > default), with every decision ed25519-signed and sha256 hash-chained into a tamper-evident audit log.

Status: v0.1 — early open-source infrastructure, live on testnet. APIs may change before 1.0. See it running: Rein console.

Install & run

npm install @reinconsole/policy-engine
# or just run it:
npx -p @reinconsole/policy-engine rein-policy-engine   # HTTP API on :8787 (PORT/HOST env)

Point @reinconsole/sdk's guard at it (engineUrl) and every x402 paywall your agent hits is evaluated here first.

In-process

import { PolicyEngine, buildServer } from '@reinconsole/policy-engine';

const engine = new PolicyEngine();      // in-memory stores by default
const app = buildServer(engine);        // Fastify instance (not yet listening)
await app.listen({ port: 8787 });

What it does

  • Declarative policies — budgets over rolling windows, per-tx caps, vendor allow/deny lists by glob, escalation, and reputation rules (vendorReputationLt, fed by @reinconsole/graph). Precedence is deny > escalate > allow > default.
  • Kill switch — freeze an agent and there is no allow; the check happens before evaluation.
  • Signed decisions — each decision commits to the exact intent it judged (intentHash), is ed25519-signed, and links to the previous decision's hash. verifyDecisionChain validates the whole history offline; the {intent, decision} pair is a self-contained spend voucher downstream tiers verify without calling back.
  • Store ports — agents, policies, rolling spend, and the decision log sit behind injectable ports (SpendStorePort, PolicyStorePort, AgentRegistryPort). In-memory implementations ship here; the durable Postgres-backed variant lives in the monorepo (@reinconsole/store) and keeps the hash chain continuous across restarts.
  • HTTP APIPOST /v1/evaluate, agent + policy CRUD, decision reads. Zod-validated 400s, not 500s.

MIT © Rein contributors · Repository · Issues