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

@clomp/sdk-node

v0.2.0

Published

Node.js client for clomp — tamper-evident audit trail for security work

Downloads

33

Readme

@clomp/sdk-node

Node.js client for clomp — a tamper-evident audit trail for security work.

Install

npm install @clomp/sdk-node

Usage

const Clomp = require('@clomp/sdk-node');

const clomp = new Clomp({
  apiUrl: 'https://clomp.internal.example.com',
  apiKey: process.env.CLOMP_API_KEY,          // clomp_live_...
  defaultActor: { type: 'service', id: 'billing-api' }
});

// Record audit events (queued, sent in order)
clomp.record('access.revoked', {
  target: { type: 'user', id: 'u-42' },
  context: { reason: 'offboarding' }
});

clomp.record('patch.applied', {
  actor: { type: 'user', id: 'lucas' },       // overrides defaultActor
  target: { type: 'system', id: 'web-01' },
  occurredAt: '2026-07-13T06:00:00Z'          // backfill is allowed and visible
});

// Guaranteed delivery before shutdown
await clomp.destroy();

Behavior

  • Events are queued and sent oldest first — arrival order at the server defines the position in the hash chain.
  • Network failures and rate limits keep the event queued for retry; validation/auth rejections drop the event (set CLOMP_DEBUG=1 to see why).
  • The queue is bounded (maxQueueLength, default 1000); when full, the oldest event is dropped. The SDK never throws into your application.
  • Clomp.registerShutdownHandlers() (opt-in) flushes all clients on SIGINT/SIGTERM without hijacking process exit.

Options

| Option | Default | Description | |---|---|---| | apiUrl | $CLOMP_API_URL | clomp server base URL | | apiKey | $CLOMP_API_KEY | machine API key (created by an admin in the UI) | | defaultActor | — | actor used when record() gets none | | flushInterval | 2000 ms | periodic flush; 0 disables (flush manually) | | maxQueueLength | 1000 | bounded queue size | | timeoutMs | 10000 | per-request timeout |

CLI

The package ships a dependency-free clomp command (Node ≥ 18):

npm install -g @clomp/sdk-node

export CLOMP_API_URL=https://clomp.internal.example.com
export CLOMP_API_KEY=clomp_live_...

# record from cron, CI or a runbook
clomp record patch.applied --actor service:ci --target system:web-01
clomp record access.review.completed --actor user:lucas --target scope:all-prod \
  --evidence ./review-q3.pdf                # uploads and chains the file's sha256

# monitoring-friendly checks (non-zero exit on failure)
clomp verify                                # 1 if the chain is broken
clomp schedules --fail-on-overdue           # 1 if a scheduled control is overdue

clomp export --out backup.jsonl             # offline-verifiable export
clomp catalog                               # seeded SOC 2 / NIS2 action catalog

Offline verification (no server, no API key)

# recompute the chain in an export — what the auditor runs
clomp verify-file clomp-export.jsonl

# compare an archived anchoring checkpoint (email text or webhook JSON)
# against an export: detects history rewritten after the anchor
clomp anchor-check checkpoint-digest.txt clomp-export.jsonl

Both exit 0 on success and 1 on any mismatch.