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

@nikip0/colorless

v1.0.1

Published

Authorize, gate, and prove every action your AI agent takes — tamper-evident, zero-dependency.

Downloads

301

Readme

colorless (JavaScript / TypeScript)

Authorize, gate, and prove every action your AI agent takes. Tamper-evident. Zero dependencies. First-class TypeScript types. The JS/TS port of colorless.

npm install @nikip0/colorless   # zero dependencies (uses only Node built-ins; Node >= 18)
import { Colorless } from "@nikip0/colorless";

const cl = new Colorless({ ledger: "agent.jsonl", onApproval: pingSlack });

cl.deny("delete_database");                                   // never
cl.requireApproval("refund", (a) => a.args.amount > 100);     // big ones need a human

const refund = cl.guard(async ({ amount, to }) => pay(amount, to), { name: "refund" });

await refund({ amount: 80, to: "cust_12" });    // runs — sealed in the chain
await refund({ amount: 5000, to: "cust_12" });  // throws ApprovalRequired until a human says yes

cl.verify();   // { ok: true, length: 412, head: "9f3c…" } — proof nothing was altered

Tool calls (OpenAI / Anthropic / MCP)

import { Colorless, ToolGuard, PolicyDenied } from "@nikip0/colorless";

const cl = new Colorless({ ledger: "agent.jsonl" });
cl.deny("delete_repo");

const tg = new ToolGuard(cl);
tg.add("search_web", searchWeb);
tg.add("send_invoice", sendInvoice);

for (const call of llmResponse.toolCalls) {
  try {
    const result = await tg.call(call.name, call.arguments);   // gated + sealed
  } catch (e) {
    if (e instanceof PolicyDenied) /* hand the refusal back to the model */;
  }
}

Same ledger, any language

This SDK writes the exact same JSONL hash-chain format as the Python engine, so a ledger an agent writes in Node can be verified from the terminal with the Python CLI:

colorless verify agent.jsonl    # ✓ verifies a Node-written ledger (any JSON value; see note below)

Cross-language verify covers strings (incl. non-ASCII/emoji), integers, booleans, null, and ordinary decimals. The one edge: floats that serialize in scientific notation (e.g. 1e-7, very small/large) format differently in Python vs JS — avoid those in payloads you verify across languages.

API

  • new Colorless({ ledger, policy, onApproval, redact })redact defaults to "auto" (secrets masked); pass null to disable.
  • .deny / .allow / .requireApproval(name?, when?, reason?) — ordered rules, first match wins.
  • .guard(fn, { name }) — wrap a tool (sync or async). .run(name, args, fn) — gate a call directly.
  • .verify() · .head() · .entries(ref?) · .anchor(path) · .verifyAgainstAnchor(path).
  • .subscribe(cb) — fire cb(entry) after every sealed action (build alerts/exporters). onApproval may return { approved, approver } to seal who authorized it.
  • ToolGuard(cl).add(name, fn).call(name, args) — gate + seal one tool call.

MIT © 2026 Niki Petrov