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

@ai-manifests/aar-manifest

v1.0.0

Published

TypeScript reference implementation of the Agent Acknowledgment Record (AAR)

Readme

aar-ref-lib-ts

npm License Spec

TypeScript reference implementation of the Agent Acknowledgment Record (AAR) — the append-only, hash-chained ledger that stores and aggregates AAP acknowledgment events, with Merkle checkpoints and the normative §9 default reputation algorithm.

Install

npm install @ai-manifests/aar-manifest

What's in the box

| Module | Spec | Purpose | |--------|------|---------| | entries | §3, §5, §8 | RecordEntry, Checkpoint, ReputationResult | | ledger | §3, §4 | canonicalize, computeEntryHash, computeCommitment, buildGenesis, appendEvent, verifyChain | | checkpoint | §5 | merkleRoot, buildInclusionProof, verifyInclusionProof, buildCheckpoint | | aggregation | §9 | aggregateReputation — the normative default algorithm | | store | §3/§4/§8 | InMemoryLedger — accept, withdraw, query, verify, reputation |

Usage

import { InMemoryLedger, type AapEvent } from '@ai-manifests/aar-manifest';

const ledger = new InMemoryLedger({ aggregatorDid: 'did:tutus:0xagg' });

const ev: AapEvent = {
  id: 'urn:uuid:…',
  type: 'ENDORSEMENT',
  issuedAt: '2026-05-20T14:32:00Z',
  issuer: { did: 'did:web:alice' },
  subject: { did: 'did:web:bob' },
};

ledger.accept(ev);                 // appends a chained Record Entry; throws on duplicate id (§4.1.2)
ledger.verify(true);               // re-checks the chain and recomputes every entryHash (§4)
const rep = ledger.reputation('did:web:bob', {
  settlementVerified: (e) => /* check the rail */ false,
});

The default aggregation (spec §9)

weight(a) = type_weight × issuer_trust × value_weight × witness_factor
          × time_decay × (withdrawn ? 0 : 1) × settlement_factor
  • value_weight = 1 + log10(1 + usd) applies only when settlement is verified (§6.3).
  • settlement_factor = 0.5 when a value is claimed but unverified (discourages fake economic claims, T2/T10), else 1.
  • After summing, the issuer-diversity penalty (§9.5) scales the aggregate by diversity / 0.3 when Simpson diversity over distinct issuers/controllers is below 0.3.
  • Recursive issuer trust is bounded at depth 2 with an attestation fallback (§9.4); supply your own issuerTrust resolver, or an attestation resolver to use the ATTESTATION_TRUST constants.

aggregateReputation returns a full ReputationResult (aggregate score, sample size, staleness, per-type breakdown, issuer diversity, settlement-backed fraction, withdrawal rate, confidence) — the AAR §8 ReputationSource shape ADP consumes.

Hash chaining & checkpoints

entryHash is computed over the immutable content (everything except entryHash and the mutable status fields withdrawn / withdrawalRef), so a withdrawal can flip those fields without breaking chain continuity (§3.2, §4.2, §7.4). buildCheckpoint produces a signed, prev-chained Merkle commitment over an interval; buildInclusionProof / verifyInclusionProof give standard single-entry inclusion proofs (§5.4).

How It Composes

aap-manifest   constructs and weights acknowledgment events
aar-manifest   stores, chains, federates, and aggregates them   (this library)
aar-validate   audits a ledger's chain, sequencing, and replay

Build & test

npm install
npm run build
npm test

License

Apache-2.0 — see LICENSE and NOTICE.