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

tunc-clm

v0.2.2

Published

Parser and v3.0 trim-aware validator for CLM (Continuity Log Memory)

Readme

tunc-clm (JavaScript / TypeScript)

Parser and v3.0 trim-aware validator for CLM (Continuity Log Memory). Pure TypeScript, zero runtime dependencies, ESM + CJS + types.

npm install tunc-clm
import { Document, validateV3, validateV3WithFilesystem } from "tunc-clm";
import { readFileSync } from "node:fs";

const doc = Document.parse(readFileSync("MANIFESTO.clm", "utf8"));
console.assert(doc.toString() === readFileSync("MANIFESTO.clm", "utf8"));

const report = validateV3(doc);
console.log(`${report.errors.length} errors, ${report.warnings.length} warnings`);

const fullReport = validateV3WithFilesystem(doc, ".");

CLI

npx clm validate path/to/file.clm

What CLM is for

CLM/3.0 is a write-ahead log for multi-session AI handoff threads. Four axes; this package implements two of them:

  1. Read retrieval — prose summary wins this axis; don't pick CLM for one-shot Q&A.
  2. Write cost — CLM wins by 4.2× at 100 sessions, 12.2× at 500. (See experiments/v3/RESULTS-compounding-cost.md.)
  3. Audit integrity — verbatim preservation, signed deltas. CLM by ritual.
  4. Tooling — parser round-trip + validator. This package implements axes 3 and 4 in TypeScript; the Rust and Python packages do the same.

See the main README for the full positioning, including links to the four review rounds where each marketing claim was iteratively narrowed by @copyleftdev's empirical work.

What this validator checks

Per SPEC.clm validation.posture.v3.0:

  • Header declarations: trim.mode, trim.config, archive.mode, archive.path
  • Trim-config grammar: keys / duplicates / missing values / unknown keys
  • Lifecycle states A/B/C; declared offload via (last X of Y archived) form
  • Sentinel placement (BEFORE entries, not after)
  • Per-entry shape (ROLL.CALL needs · YYYY-MM-DD ·; DREAM.LOG needs | YYYY-MM-DD |); malformed quarantined
  • Cross-doc sentinel symmetry (live ↔ archive)
  • Archive structural check (must contain trim ARCHIVE sections, not just any file)
  • Filesystem-aware variant (state.B → warning, state.C → error)
  • Chained archive validation (warnings propagate from archive into live report)

Mirror of the Rust reference

This package mirrors clm-rs and is paired with clm-py. All three implementations validate the same set of behaviors against the same canonical artifacts (MANIFESTO.clm, SPEC.clm, the experiments/v3/ bench docs). 117 tests across all three.

Known limitations (parity with clm-rs v0.2.0)

Three follow-ups from Codex round-8 review apply equally:

  1. [DECISIONS.ARCHIVE] cross-doc sentinel check is missing (symmetric gap to [ROLL.CALL.ARCHIVE] / [DREAM.LOG.ARCHIVE]).
  2. Malformed lines in decisions.live aren't quarantined (counted toward overflow).
  3. Generator (experiments/v3/gen_50_session.py) emits nonsense metadata for depths ≤ 5.

License

MIT.

Audit thread

CLM is itself an append-only audit-thread format. The thread for MANIFESTO.clm and SPEC.clm is at https://github.com/TUNC-AI/tunc-clm — read it like any CLM file: open, sign, append.