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

aivil

v2.3.2

Published

The AI Vital Identity Layer — civil registry for AI agents

Downloads

1,407

Readme

AIVIL — AI Vital Identity Layer

The civil registry for artificial intelligence. Give every AI agent a verified identity, spending controls, and a tamper-proof audit trail. npm version License: AGPL-3.0 Install

npm install aivil

Quick Start

const AIVIL = require('aivil')

const aivil = new AIVIL({ apiKey: process.env.AIVIL_API_KEY })

// Get or create agent — safe to call on every startup
const { agent } = await aivil.getOrCreate({
  name: "Prometheus",
  role: "Procurement Specialist",
  owner: "Acme Corp",
  purpose: "Handle vendor search and purchasing",
  jurisdiction: "Delaware_USA",
  policy: {
    spending_limit: 100,
    requires_human_signoff_over: 50,
    allowed_topics: ["vendors", "pricing", "procurement"],
    blocked_topics: ["gambling", "adult", "illegal"],
  }
})

// Audit BEFORE every action
const verdict = await aivil.audit(agent.id, {
  type: "purchase",
  amount: 30,
  domain: "openai.com",
  description: "Buy API credits for data processing"
})

if (verdict.status === "APPROVED")  executeAction()
if (verdict.status === "ESCALATE")  notifyHuman(verdict.reason)
if (verdict.status === "BLOCKED")   logAndStop(verdict.reason)

Features Verified identity — Every agent gets a real EC P-256 keypair + W3C DID Policy engine — Spending limits, blocked domains, allowed topics Audit trail — Every decision logged, HMAC-signed, tamper-proof Live dashboard — See every decision in real time at aivildev.com/app MCP support — Zero-code Claude integration via mcp.aivildev.com/mcp Rogue detection — Auto-suspend agents that violate policy repeatedly Fallback mode — Never crashes your agent if AIVIL is unreachable Configuration

const aivil = new AIVIL({
  apiKey:   process.env.AIVIL_API_KEY,   // required
  timeout:  8000,                         // ms (default: 8000)
  retries:  2,                            // retry attempts (default: 2)
  fallback: "escalate",                   // if unreachable: "escalate"|"approve"|"block"
  debug:    false,                        // log all requests
})

Error Handling

const { AIVILAuthError, AIVILPlanError, AIVILTimeoutError } = require('aivil')

try {
  const verdict = await aivil.audit(agent.id, action)
} catch (e) {
  if (e instanceof AIVILAuthError)    console.error("Invalid API key")
  if (e instanceof AIVILPlanError)    console.error("Plan limit —", e.upgradeUrl)
  if (e instanceof AIVILTimeoutError) console.error("Request timed out")
}

MCP Server (Claude) Add to Claude Desktop config — zero code required:

{
  "mcpServers": {
    "aivil": { "url": "https://mcp.aivildev.com/mcp" }
  }
}

Links Docs: https://aivildev.com/docs Dashboard: https://aivildev.com/app Sign up free: https://aivildev.com/signup GitHub: https://github.com/scalatest01/AIVIL License AGPL-3.0 — Free to use. If you run it as a hosted service, open source your changes.
Commercial license available: [email protected]