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

@kybernesis/arp-spec

v0.2.1

Published

ARP shared contract: Zod schemas, JSON Schemas (draft 2020-12), and protocol constants.

Readme

@kybernesis/arp-spec

The shared contract for ARP (Agent Relationship Protocol). Zod schemas, JSON Schema (draft 2020-12) equivalents, and protocol constants that every ARP implementer — runtime, registrar integration, SDKs, owner app — agrees on.

This package is intentionally pure data: no HTTP, filesystem, or network. If you need builder functions, see @kybernesis/arp-templates; if you need the scope catalog, see @kybernesis/arp-scope-catalog.

Install

pnpm add @kybernesis/arp-spec
# or
npm install @kybernesis/arp-spec

Usage

Validate an incoming document (Zod)

import { DidDocumentSchema } from '@kybernesis/arp-spec';

const result = DidDocumentSchema.safeParse(await fetch('/.well-known/did.json').then((r) => r.json()));
if (!result.success) {
  throw new Error(`invalid DID document: ${result.error.message}`);
}
const didDoc = result.data; // fully typed

Validate with a JSON Schema consumer (Ajv, etc.)

import Ajv2020 from 'ajv/dist/2020.js';
import addFormats from 'ajv-formats';
import agentCardSchema from '@kybernesis/arp-spec/json-schema/agent-card.json' with { type: 'json' };

const ajv = new Ajv2020();
addFormats(ajv);
const validate = ajv.compile(agentCardSchema);
if (!validate(candidate)) throw new Error(ajv.errorsText(validate.errors));

Use protocol constants

import { ARP_VERSION, WELL_KNOWN_PATHS, PROTOCOL_RESERVED_NAMES } from '@kybernesis/arp-spec';

console.log(ARP_VERSION);                // "0.1"
console.log(WELL_KNOWN_PATHS.DID);       // "/.well-known/did.json"
console.log(PROTOCOL_RESERVED_NAMES);    // ["_arp", "_did", ...]

Schemas shipped

Every schema has a Zod version (type-inferable in TS) and a JSON Schema version (for interop with non-TS consumers). Both are kept in sync by a build step that emits the JSON Schema files from the Zod sources.

| Name | Source | |---|---| | did-document | ARP-tld-integration-spec-v2.md §6.1 | | agent-card | ARP-tld-integration-spec-v2.md §6.2 | | arp-json | ARP-tld-integration-spec-v2.md §6.3 | | representation-vc | ARP-tld-integration-spec-v2.md §6.4 | | revocations | ARP-tld-integration-spec-v2.md §6.5 | | connection-token | ARP-policy-examples.md §3 Layer 3 | | handoff-bundle | ARP-tld-integration-spec-v2.md §7 step 14 | | scope-catalog | ARP-scope-catalog-v1.md §1 | | cedar-schema | ARP-policy-examples.md §8 |

JSON Schema $id URLs follow https://arp.spec/schema/<name>/v0.1.json.

Error contract

Schemas are value objects; they don't throw across package boundaries. Parsing an invalid document gives you a structured SafeParseReturnType from Zod. Helpers that do throw (like those in @kybernesis/arp-templates) wrap the issues in typed error classes you can catch.

Phase

Shipped as part of Phase 1 of the ARP build roadmap. See docs/ARP-phase-0-roadmap.md for the overall plan.

License

MIT.