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

@ophirai/registry

v0.3.0

Published

Ophir Agent Registry — discovery service for AI agent negotiation

Readme

@ophirai/registry

Agent discovery registry for the Ophir protocol. Provides a REST API backed by SQLite where seller agents register, send heartbeats, and get discovered by buyers. Includes challenge-based authentication and reputation tracking.

Installation

npm install @ophirai/registry

Usage

Start a registry server

import { createRegistryServer } from '@ophirai/registry';

const registry = createRegistryServer({
  port: 8420,
  dbPath: './ophir-registry.db',
});

await registry.start();

Use the database directly

import { RegistryDB } from '@ophirai/registry';

const db = new RegistryDB('./ophir-registry.db');

// Find inference providers
const agents = db.findAgents({ category: 'inference', minReputation: 0.8 });

// Check an agent
const agent = db.getAgent('did:key:z6Mk...');

REST API

| Method | Path | Auth | Description | |--------|------|------|-------------| | POST | /auth/challenge | No | Get a signing challenge | | POST | /agents | Yes | Register an agent | | GET | /agents | No | Search agents | | GET | /agents/:agentId | No | Get agent details | | POST | /agents/:agentId/heartbeat | Yes | Keep-alive ping | | DELETE | /agents/:agentId | Yes | Unregister an agent | | POST | /reputation/:agentId | Yes | Report agreement outcome | | GET | /health | No | Server health check |

Search query parameters

  • category -- Filter by service category
  • max_price -- Maximum base price
  • currency -- Currency filter
  • min_reputation -- Minimum reputation score (0-1)
  • limit -- Max results

Reputation reporting

curl -X POST http://localhost:8420/reputation/did:key:z6Mk... \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{"outcome": "completed", "response_time_ms": 340}'

Outcomes: completed, disputed_won, disputed_lost

What is included

  • createRegistryServer -- Factory that returns an Express app with all routes, a SQLite database, and start/stop lifecycle methods.
  • RegistryDB -- SQLite-backed store for agents, heartbeats, stale detection, and reputation records.
  • createRouter -- Express router with all REST endpoints.
  • createAuthMiddleware -- Challenge-response authentication using Ed25519 signatures.
  • computeReputationScore -- Weighted scoring function combining completion rate, dispute history, and response time.

Configuration

| Option | Default | Description | |--------|---------|-------------| | port | 8420 | HTTP listen port | | dbPath | ./ophir-registry.db | SQLite database path | | corsOrigin | 'https://ophirai.com' | CORS allowed origin | | staleCheckInterval | 5 | Minutes between stale agent checks |

Security

  • Rate limiting: Global (100 req/min), challenge endpoint (10/min), reputation (20/min)
  • Body size limit: 16KB max JSON payload
  • Security headers: Helmet middleware (CSP, HSTS, X-Frame-Options, etc.)
  • CORS: Restricted by default (set corsOrigin to your domain)
  • Challenge consumption: Each auth challenge is single-use (deleted after verification)
  • Reputation hardening: Duplicate reports rejected (unique reporter+target+agreement), column whitelist prevents SQL injection
  • LIKE escape: Category search escapes % and _ wildcards