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

@zanii/succession

v0.1.0

Published

Agent lifecycle and key rotation with signed continuity - the owner attests 'B succeeds A', so reputation and CV history transfer verifiably instead of dying with a key. A compromise succession REQUIRES the compromise timestamp, bracketing the trusted win

Readme

@zanii/succession

Agent lifecycle: key rotation with signed continuity. An agent's did:key IS its key, so rotating a compromised key normally kills its reputation, CV history, and counterparty trust. Succession fixes it: the owner — the same root authority whose delegation empowered the old key — signs "agent B is the successor of agent A", and verifiers follow the lineage instead of starting from zero.

npm install @zanii/succession @zanii/core @zanii/a2a-directory
import { buildSuccessionBody, signSuccession, assembleSuccession, verifySuccession, verifyLineage, combinedSummary } from '@zanii/succession';

// planned rotation — old key still safe, so it countersigns (the strong form)
const body = buildSuccessionBody({ predecessor: oldAgent.did, successor: newAgent.did, owner: owner.did, reason: 'rotation', ts: now });
const s = assembleSuccession(body, [
  signSuccession(body, owner.did, ownerKey),        // REQUIRED — the trust anchor
  signSuccession(body, oldAgent.did, oldAgentKey),  // optional — sets `cosigned`
]);
verifySuccession(s);          // { ok, reasons, cosigned }

// after a compromise, compromised_at is REQUIRED — it brackets the trusted window
buildSuccessionBody({ ..., reason: 'compromise', compromisedAt: '2026-07-20T00:00:00Z' });

// walk a chain A→B→C and aggregate reputation across it (conservatively)
verifyLineage(links, currentDid);                   // { ok, lineage: [oldest…newest] }
combinedSummary(links, trusts, currentDid);         // sums + explicit caveats

Python: from zanii.succession import build_succession_body, verify_lineage, combined_summary, ... — byte-identical JCS objects and hashes.

The rules that keep it honest

  • No owner, no succession — anyone can claim to succeed anyone; only the owner's signature makes it real. After a compromise the predecessor's signature is deliberately NOT required (the attacker holds that key).
  • compromise requires compromised_at — history transfers, but receipts after that instant under the old key may be the attacker's; combinedSummary says so in its caveats instead of silently inheriting them. Pair with a revocation of the old delegation: succession records continuity, revocation kills the old authority.
  • One lineage, one owner — a lineage spanning owners is refused; an ownership transfer is a sale, not a succession, and conflating them would launder history.
  • Conservative aggregation — combined receipt counts are an upper bound and say so; counterparties are deliberately not summed (overlap is unknowable).

The limit, stated up front

Succession proves continuity of authority — the owner vouches that B carries A's mandate. It does NOT prove B runs the same code or behaves like A (@zanii/attest is for which-code-ran). And it is the owner's attestation: a lying owner's lie is signed and permanent — attributable, not impossible.