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

@agentcontextdistributionprotocol/acdp

v0.5.0

Published

Agent Context Distribution Protocol — Node.js SDK

Readme

acdp — Node.js SDK

Thin NAPI-rs binding over the acdp Rust library. Implements the producer- and consumer-side crypto for the Agent Context Distribution Protocol v0.1.0 (RFC-ACDP-0001/0003/0008). HTTP is intentionally left to the caller — pair this with fetch / undici for transport.

Install (development)

npm install                  # installs @napi-rs/cli
npm run build:debug          # produces index.js + acdp.<platform>.node
node --test tests/           # in-process unit tests, no HTTP

Build a release binary

npm run build                # release mode (LTO + strip)

Quickstart

import { AcdpProducer, AcdpVerifier } from '@agentcontextdistributionprotocol/acdp';

const producer = AcdpProducer.generate(
  'did:web:agents.example.com:my-agent',
  'did:web:agents.example.com:my-agent#key-1',
);

const raw = producer.buildPublishRequest({
  title: 'Q1 snapshot',
  contextType: 'data_snapshot',
  summary: 'Quarter-end inventory',
});

// POST `raw` (the JSON string) to your registry. On retrieve:
const body = (await response.json()).body;
AcdpVerifier.verifyContentHash(JSON.stringify(body), body.content_hash);
AcdpVerifier.verifySignature(
  pubKeyB64,                  // resolved from the producer's did:web doc
  body.signature.value,
  body.content_hash,
);

Design rules

  • JSON across the FFI boundary. Every method accepts and returns JSON strings — never a Rust type, never a JS class instance you'd have to serialize before sending. The binary stays at ~500 lines of glue.
  • Crypto in Rust, HTTP in JS. Key generation, JCS + SHA-256 hashing, Ed25519 signing, and signature verification happen in the underlying acdp crate. Transport, retries, and observability are yours.
  • AcdpProducer stores a 32-byte seed. The Rust SigningKey is ZeroizeOnDrop and not Clone, so the binding rebuilds the signing key from the seed on each call.
  • Golden vector parity. golden content_hash + signature match sig-001 pins the JS-side content_hash and signature.value against the spec's sig-001 fixture — the same constants the Rust suite asserts. A drift on either side is a protocol break.

Layout

bindings/acdp-node/
├── Cargo.toml         # standalone [workspace]; depends on `acdp` via path
├── build.rs           # napi-build setup
├── package.json
├── README.md          # this file
├── index.js           # generated by `napi build`
├── index.d.ts         # generated by `napi build`
├── acdp.<platform>.node  # native binary
├── src/
│   ├── lib.rs         # module entry — re-exports the napi classes
│   ├── producer.rs    # AcdpProducer: build/sign publish requests
│   ├── verifier.rs    # AcdpVerifier: content_hash + signature verify
│   └── helpers.rs     # visibility / contextType parsers
└── tests/
    └── test.mjs