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

@diffdelta/client

v0.1.2

Published

TypeScript client for DiffDelta — agent-ready intelligence feeds

Downloads

23

Readme

@diffdelta/client

TypeScript/JavaScript client for DiffDelta — agent-ready intelligence feeds for security advisories, changelogs, status pages, and more.

One import. 46 sources. Structured signals. Zero scraping.

Install

npm install @diffdelta/client

Quick Start

import { DiffDelta } from "@diffdelta/client";

const dd = new DiffDelta();
const items = await dd.poll();

if (items.length === 0) {
  const head = await dd.head();
  console.log(head.allClear
    ? `✅ All clear — ${head.sourcesChecked} sources verified`
    : `No new items.`);
} else {
  for (const item of items) {
    const action = item.suggestedAction;
    const sev = item.signals.severity;
    const prefix = action ? `⚡ ${action}` : sev ? `🔒 ${sev.level}` : `📋`;
    console.log(`${prefix}  ${item.source}: ${item.headline}`);
  }
}

See examples/ for runnable scripts: quick-check.ts, watch-security.ts, ci-gate.ts, discover-stack.ts.

Stack Discovery

Tell DiffDelta what you use, get back exactly which sources to watch:

const sources = await dd.discoverSources(["openai", "langchain", "pinecone"]);
// → ["openai_sdk_releases", "openai_api_changelog", "langchain_releases", "pinecone_status"]

Health Check

Check if the DiffDelta pipeline is alive before trusting the data:

const health = await dd.checkHealth();
if (!health.ok) {
  console.warn(`Pipeline degraded: ${health.sourcesOk}/${health.sourcesChecked} sources healthy`);
}

Verified Silence

When nothing changed, DiffDelta proves it checked:

const head = await dd.head();
if (!head.changed && head.allClear) {
  console.log(`All clear: ${head.sourcesChecked} sources verified, confidence ${head.allClearConfidence}`);
  // A non-DiffDelta bot can never make this claim.
}

Continuous Monitoring

const ac = new AbortController();

dd.watch(
  (item) => {
    if (item.suggestedAction === "PATCH_IMMEDIATELY") {
      alertOncall(item);
    }
  },
  { tags: ["security"], signal: ac.signal }
);

// Stop after 1 hour
setTimeout(() => ac.abort(), 3_600_000);

Per-Source Polling

More efficient if you only care about one source:

const items = await dd.pollSource("cisa_kev");

Cursor Persistence

Cursors are saved to ~/.diffdelta/cursors.json by default so your bot survives restarts. Disable with:

const dd = new DiffDelta({ cursorPath: "memory" }); // in-memory only

Signal Types

Every item can carry structured signals — pre-extracted, no parsing needed:

| Signal | Fields | Example | |--------|--------|---------| | severity | level, cvss, cwes, packages, exploited | { level: "critical", cvss: 9.8 } | | release | version, prerelease, security_patch | { version: "4.2.1", security_patch: true } | | incident | status, impact | { status: "investigating", impact: "major" } | | deprecation | type, affects, confidence | { type: "breaking_change", affects: ["gpt-4-turbo"] } | | suggested_action | action code | "PATCH_IMMEDIATELY" |

Action Codes

| Code | Meaning | |------|---------| | PATCH_IMMEDIATELY | Active exploitation or critical severity. Patch now. | | PATCH_SOON | High severity. Schedule a patch. | | VERSION_PIN | Breaking change coming. Pin your current version. | | REVIEW_CHANGELOG | New release with notable changes. | | MONITOR_STATUS | Incident in progress. Watch for updates. | | ACKNOWLEDGE | Low-risk change. Log it. | | NO_ACTION | Informational only. |

Options

const dd = new DiffDelta({
  baseUrl: "https://diffdelta.io", // default
  apiKey: "dd_live_...",           // Pro tier (optional)
  cursorPath: null,                // null = in-memory, string = file path
  timeout: 15_000,                 // HTTP timeout in ms
});

Examples

The examples/ directory has runnable scripts. Install tsx and run them directly:

npx tsx examples/quick-check.ts        # One-shot: what's happening right now?
npx tsx examples/watch-security.ts     # Continuous security monitoring
npx tsx examples/ci-gate.ts            # CI/CD gate: exit 1 if critical CVEs
npx tsx examples/discover-stack.ts openai langchain pinecone  # Stack-aware monitoring

CI/CD Gate

Use ci-gate.ts in your deployment pipeline to block deploys when critical vulnerabilities exist:

# .github/workflows/deploy.yml
- name: Security gate
  run: npx tsx node_modules/@diffdelta/client/examples/ci-gate.ts openai langchain

Exit code 0 = safe to deploy. Exit code 1 = PATCH_IMMEDIATELY items found.

Protocol

DiffDelta uses a three-layer polling protocol (ddv1):

  1. head.json (~200 bytes) — cursor + counts. Poll this first.
  2. digest.json (~500 bytes) — narrative + alert count. Fetch if cursor changed.
  3. latest.json (~5-40KB) — full items with signals. Fetch if alerts > 0.

The SDK handles this automatically. You never fetch more than you need.

License

MIT