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/acb-manifest

v0.3.0

Published

TypeScript reference implementation of the Agent Cognitive Budget Protocol (ACB)

Downloads

135

Readme

acb-manifest

A TypeScript reference implementation of the Agent Cognitive Budget (ACB) protocol — the metabolic-budget layer for deliberative multi-agent systems. ACB provides append-only journal entries, pricing models, habit-memory discounts, and settlement distribution that mirror the brain's resource allocation for routine vs. contested decisions.

This library is one of several reference implementations (C#, Python) of the same spec. The spec itself is at adp-manifest.dev and is the source of truth; this library implements what the spec says.

Zero runtime dependencies. Pure TypeScript, ESM.

Install

npm install @ai-manifests/acb-manifest

Quick example

import {
  InMemoryBudgetStore,
  computeDisagreementMagnitude,
  selectRoutine,
  computeExpensiveDraw,
  buildSettlementRecord,
  Routine,
  TerminationState,
  type BudgetCommitted,
  type Tally,
} from '@ai-manifests/acb-manifest';

const initialTally: Tally = { approveWeight: 0.71, rejectWeight: 0.64, abstainWeight: 0.18 };
const magnitude = computeDisagreementMagnitude(initialTally);  // ≈ 0.948 (contested)

const routine = selectRoutine(pricingProfile, initialTally, /*roundCount*/ 1, TerminationState.Converged);
// routine === Routine.Expensive (unlock threshold exceeded)

const draw = computeExpensiveDraw(pricingProfile, /*participants*/ 3, /*rounds*/ 1, /*habitDiscount*/ 0.80);
// draw = 200 × 3 × 1.5^1 × (1 − 0.80) = 180 EU

API

All exports are re-exported from the package root.

Entry types

AcbEntry, BudgetCommitted, BudgetCancelled, SettlementRecorded

Value types

Denomination, PricingProfile, SettlementProfile, SettlementMode, BudgetConstraints, SubstrateDistribution, EpistemicDistribution, ContributionBreakdown, Tally, HistoricalDeliberation, ParticipantContribution, SubstrateReport, SettlementInputs, BudgetState

Enums

Routine, TerminationState, SettlementMode

Pricing

  • computeDisagreementMagnitude(tally)1 − |approve − reject| / (approve + reject), in [0, 1]
  • selectRoutine(pricing, tally, roundCount, termination) — returns Routine.Cheap when the decision is an agreed-on routine; Routine.Expensive when contested
  • computeCheapDraw(pricing, participantCount, habitDiscount?) — cheap-routine draw
  • computeExpensiveDraw(pricing, participantCount, roundCount, habitDiscount?) — expensive-routine draw with round multiplier
  • computeDraw(pricing, tally, participantCount, roundCount, termination, habitDiscount?) — convenience wrapper that picks a routine and computes the draw
  • computeHabitDiscount(history) — habit-memory discount function, capped at MAX_HABIT_DISCOUNT (0.80)
  • MAX_HABIT_DISCOUNT — exported constant

Settlement

  • distributeSubstrate(pool, reports) — substrate pool distribution proportional to reported cycles
  • distributeEpistemic(pool, contributions) — default-v0 epistemic scoring with the four equal-weight bonuses (base, falsification, load-bearing, outcome correctness) plus dissent-quality penalty
  • buildSettlementRecord(inputs) — builds a complete SettlementRecorded entry from contributions and substrate reports

Store

  • InMemoryBudgetStore — thread-safe in-memory budget store suitable for tests and prototypes
  • BudgetStore — interface for custom backends

Testing

npm test

Spec

This library implements the Agent Cognitive Budget protocol specification. Read the spec at adp-manifest.dev. If the spec and this library disagree, the spec is correct and this is a bug.

License

Apache-2.0 — see LICENSE for the full license text and NOTICE for attribution.