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

@atlasauth/pca-revoke

v0.4.3

Published

Realtime revocation + mid-run kill-switch for PCA: revoke a capability, an agent holder, or a whole delegation subtree, and deny in-flight actions against a pluggable revocation registry (Shared-Signals/CAEP consumable).

Readme

@atlasauth/pca-revoke

Realtime revocation and a mid-run kill-switch for Proof-Carrying Authority. The core verifier is a pull check: a captured PCActn stays acceptable until it expires or its budget drains. This package adds the active boundary, a live RevocationRegistry a resource server consults on every action. You can revoke a capability id, an agent holder key, a principal/issuer key, or a whole delegation subtree. isRevoked walks every hop of the PCActn's cap_chain, and verifyWithRevocation ANDs the core verify result with the revocation gate and fails closed. ingestCaepEvent turns OpenID Shared Signals / CAEP revocation events into registry entries.

Install

npm i @atlasauth/pca-revoke @atlasauth/pca

Usage

import { DEFAULT_REQUIRED_CHECKS, verifyPCActn } from '@atlasauth/pca';
import { RevocationRegistry, isRevoked } from '@atlasauth/pca-revoke';

const registry = new RevocationRegistry(); // in-memory by default; pass any RevocationStore

// per action: the full server verifier decides, with the registry as its revocation hook.
// `grant` is the one YOUR store holds for pcactn.grant_ref (never one the request carries).
const verdict = await verifyPCActn(pcactn, {
  grant,
  audience: 'rs',
  allowedSuites: ['ed25519'],
  hooks: {
    revocation: ({ pcactn }) => {
      const r = isRevoked(pcactn, registry);
      return { enforced: true, ok: !r.revoked, ...(r.reason ? { reason: r.reason } : {}) };
    },
  },
  context: { params, plan, planAuthorized, budget }, // the RS's own view of the action
  require: [...DEFAULT_REQUIRED_CHECKS],
});
if (!verdict.allow) throw new Error(verdict.reasons.join('; '));

// kill-switch: bites every in-flight action immediately
registry.killAgent(agentHolderKey, { reason: 'runaway' });
registry.killSubtree(midChainCapId);
registry.revoke({ kind: 'issuer', value: principalKey });
registry.revokeSubtree([rootCapId, midCapId]); // chain-prefix form

A revocation may carry notBefore to schedule it for later; unrevoke removes one.

API

  • RevocationRegistry (revoke, revokeSubtree, unrevoke, killAgent, killSubtree, list, clear), InMemoryRevocationStore, RevocationStore interface for custom persistence.
  • isRevoked(pcactn, registry, { now? }), verifyWithRevocation(pcactn, coreResult, registry, { now? }) (ANDs a structural core result with the registry; the authorization decision itself belongs to verifyPCActn / requirePCA, as above).
  • ingestCaepEvent(event, registry), CAEP_EVENT_TYPES: bridge for grant-revoked, kill-switch and session-revoked events (see @atlasauth/pca-signals).

Status

Experimental. The registry is a local, mutable store: distributing revocations to every resource server (and persisting them) is up to you or a custom RevocationStore. Revocation is only as fast as your push channel.

License

MIT - see LICENSE