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

crux-protocol

v0.1.0

Published

CRUX/1 — a dialectical exchange protocol for two LLMs to debate a claim, with typed challenges, provenance tracking, and a cost-guardrailed orchestrator.

Readme

crux-protocol

Runs a CRUX/1 dialectical exchange between two LLM peers debating a claim — typed challenges, provenance tracking, credence updates, and a required RES/IMP/HALT exit, instead of free-form chat that tends to collapse into agreement without actually testing anything.

Install

npm install crux-protocol
npx crux init

crux init scaffolds config.yaml and .env.example into your project (skipping either if it already exists), and adds .env / transcripts/ to .gitignore. It also drops a SKILL.md into .claude/skills/crux-protocol/, so a Claude Code session in this project knows how to invoke it.

Then:

cp .env.example .env
# fill in GOOGLE_API_KEY and/or FIREWORKS_API_KEY

Usage

npx crux "<topic claim to debate>" [--a=google|fireworks] [--b=google|fireworks] \
  [--a-model=<model id>] [--b-model=<model id>] [--max-turns=12]

Example:

npx crux "For a small team's internal tools, a monolith beats microservices." \
  --a=google --b=fireworks --max-turns=8

Peers default to --a=google --b=fireworks. Anthropic's adapter ships in the package (providers/anthropic.js) but isn't wired into orchestrate.js by default — see Anthropic below.

Output

  • Live CRUX frames print to stdout as the exchange runs.
  • Full accepted transcript: transcripts/<timestamp>-<topic-slug>.md.
  • Every raw API call — system prompt, user prompt, raw response, token usage, estimated cost, including retries and failures — logged to transcripts/<timestamp>-<topic-slug>.calls.md.

Cost guardrail

config.yaml sets a spend cap:

budget:
  maxUsd: 1.00
  pricing:
    google:
      gemini-3.1-pro-preview:
        input: 2.00   # USD per 1,000,000 tokens
        output: 12.00
    fireworks:
      accounts/fireworks/models/glm-5p3:
        input: 1.40
        output: 4.40
  defaultPricing:
    input: 0
    output: 0

Every call's actual token usage (from the API response, not estimated) is multiplied by these rates and added to a running total. The exchange halts cleanly — partial transcript and call log preserved — the moment that total reaches maxUsd. Prices are not fetched live; re-check them against each vendor's pricing page periodically, and add an entry under pricing for any model you point --a-model/--b-model at. An unpriced model reports $0 cost (with a one-time warning) rather than guessing.

Anthropic

providers/anthropic.js and a matching CLAUDE_API_KEY in .env.example are included for a third peer, but scripts/orchestrate.js doesn't register it in its provider map by default. To enable it: uncomment the callAnthropic import and its PEERS entry near the top of scripts/orchestrate.js, and add a price entry under config.yaml's pricing.anthropic.

Known limitations

  • Termination is simplified. The orchestrator stops at the first RES or IMP move it sees, not when every claim on the crux stack is resolved (the spec's actual Rule 7 intent). Fine for exploration; not a literal implementation of the full termination rule.
  • Frame validation is pragmatic, not exhaustive. validateFrame in scripts/orchestrate.js catches the mechanically checkable frame errors from CRUX-1.md §8.1 (missing credence/provenance, missing attack codes, malformed U/RES/IMP forms, unrecognized move codes) — it does not check the semantic rules (§6.2 uncertainty inheritance, §7.1 unforced-movement smells).

Protocol spec

See CRUX-1.md for the full CRUX/1 specification — move vocabulary, attack codes, provenance tags, and a worked example.