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

@openagp/sdk

v0.0.1

Published

Reference TypeScript SDK for the Agent Governance Protocol (AGP) — vendor-neutral standard for AI agent governance.

Downloads

222

Readme

openagp/sdk-typescript

Reference TypeScript SDK for AGP — vendor-side and plane-side.

npm License Spec

Install

npm install @openagp/sdk

Node.js 20+. Pure JavaScript at runtime — no native bindings, no build step on install.

Runtime deps: @noble/curves (Ed25519), canonicalize (RFC 8785 JCS), ajv + ajv-formats (JSON Schema validation).

Quick start

import { generateKeyPair, sign, verify } from "@openagp/sdk";

// vendor side
const keys = generateKeyPair();

const event = {
  agp_version: "0.1",
  schema_version: "1.0",
  event_id: "evt_01JFXY8B5Z9RHQXM3WTNPK4VG2",
  occurred_at: "2026-08-12T14:23:11.412Z",
  actor: {
    vendor: "yourcompany.com",
    agent_id: "agt_42",
  },
  action: {
    type: "tool_call",
    tool_name: "browser.navigate",
  },
};

const signed = sign(event, {
  privateKeyB64: keys.privateKeyB64,
  keyId: "yourcompany-2026-q2",
});

// plane side
verify(signed, { publicKeyB64: keys.publicKeyB64 });   // throws InvalidSignature on tamper

What the SDK does (and doesn't)

Implements — per ADR 0001:

  • RFC 8785 JCS canonicalization
  • Ed25519 sign / verify
  • JSON Schema validation against bundled v0.1 schemas (Draft 2020-12)
  • Tamper detection via signature
  • Algorithm-substitution rejection (only Ed25519 is accepted)

Does NOT implement yet (Phase 1+):

  • HTTP client / server scaffolds (Express / Fastify vendor + plane apps)
  • Policy DSL evaluation
  • Real-time decision callback (Flow C)
  • Registry resolution and key rotation

Cross-language interop

This SDK is interop-tested against the Python reference SDK using deterministic byte-level test vectors checked into openagp/spec/test-vectors/. For the same input:

  • canonicalize() MUST produce identical UTF-8 bytes (RFC 8785).
  • sign() MUST produce identical signatures with the same key (Ed25519 is deterministic per RFC 8032).
  • A signature produced by one SDK MUST verify in the other.

If any of those drift, CI fails. That's the contract that makes AGP a real cross-vendor protocol — not an implementation-specific dialect.

Schemas

The SDK ships a bundled copy of every AGP JSON Schema under src/_schemas/. These are kept in lockstep with the canonical schemas in openagp/spec — CI fails if they drift. To sync after pulling the latest spec:

scripts/sync-schemas.sh

Tests

npm install
npm test

Tests load fixtures and test vectors from a sibling checkout of openagp/spec. CI clones both repos automatically.

Status

Scaffold + Phase 0 sign/verify roundtrip with cross-language interop. The full Phase 1 SDK (HTTP scaffolds, policy evaluator) is in progress; see §4.2 Phase 1 of the spec.

License

Apache-2.0.