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-validate

v0.3.0

Published

Validate ACB budget and settlement entries and audit settlement arithmetic against deliberation records

Readme

acb-validate

Validate ACB budget and settlement entries, audit settlement arithmetic against deliberation records, and re-price deliberations against a posted budget.

Install

npm install -g @ai-manifests/acb-validate

Usage

Validate ACB entries

acb-validate ./budget-committed.json
acb-validate ./settlement-recorded.json
acb-validate ./budget.json ./cancel.json ./settlement.json

Validate a complete budget record

Pass a directory containing the ACB entries (budget_committed, optionally budget_cancelled, settlement_recorded) and the related ADJ entries (deliberation_opened, deliberation_closed, outcome_observed) to check cross-entry consistency:

acb-validate --record ./deliberation/

Cross-entry checks:

  • budget_id matches between budget_committed and settlement_recorded
  • amount_total matches between budget and settlement
  • budget_committed.timestampsettlement_recorded.timestamp
  • deliberation_id matches across all entries
  • disagreement_magnitude_initial in settlement is consistent with deliberation_closed.final_tally
  • Epistemic distributions only target agents declared in deliberation_opened.participants
  • A budget cannot be both cancelled and settled

Re-price a deliberation

Verify the draw computation against a budget and a deliberation result:

acb-validate --price ./budget.json ./deliberation-closed.json

Reports cheap-routine and expensive-routine draws, the unlock signal computed from the tally, and the routine the budget would select. Useful for sanity-checking settlement arithmetic when no settlement entry exists yet.

Semantic Checks

| Check | Type | |-------|------| | substrate_share + epistemic_share = 1.0 | Error | | round_multiplier >= 1 | Error | | posted_at <= timestamp | Error | | amount_total > 0 | Error | | amount_returned_to_requester = amount_total − draw_total | Error | | sum(distributions) = draw_total | Error | | contribution_breakdown sums to amount per agent | Error | | habit_discount_applied in [0, 1] | Error | | expensive_routine_rate >= cheap_routine_rate | Warning | | unlock_threshold is 0 or 1 (degenerate) | Warning | | habit_discount_applied > 0.80 (default-v0 cap) | Warning | | unlock_triggered inconsistent with disagreement magnitude | Warning | | mode = deferred without outcome_window_seconds | Warning | | Settlement targets agent not in deliberation participants | Warning |

Programmatic Use

import {
  validateEntry,
  validateBudgetRecord,
  computeDisagreementMagnitude,
  computeCheapDraw,
  computeExpensiveDraw,
  selectRoutine,
} from '@ai-manifests/acb-validate';

const result = validateEntry(budgetEntry);
const recordResult = validateBudgetRecord(allEntries);

const magnitude = computeDisagreementMagnitude({
  approve_weight: 0.71,
  reject_weight: 0.64,
  abstain_weight: 0.18,
});

const draw = computeExpensiveDraw(
  { expensive_routine_rate: 200, round_multiplier: 1.5 },
  3,    // participants
  1,    // rounds
  0.80  // habit discount
);

const routine = selectRoutine(budget, initialTally, roundCount, termination);

How It Composes

acb-validate extends the same envelope adj-validate validates against. ACB entries (budget_committed, budget_cancelled, settlement_recorded) live in the same journal as ADJ entries (deliberation_opened, proposal_emitted, round_event, deliberation_closed, outcome_observed) and inherit the same hash chaining, append-only guarantees, and replay verification.

Run both validators against a journal directory for full coverage:

adj-validate --deliberation ./journal/
acb-validate --record ./journal/

Status

v0.1 — Validates against ACB spec v0 (draft, pre-implementation).

License

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