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

@uvrn/drift

v2.0.0

Published

Temporal decay scoring for UVRN verification receipts

Readme

@uvrn/drift

Temporal decay scoring for UVRN verification receipts.

Models how a claim's confidence score degrades over time using configurable decay curves — because a receipt from 6 hours ago on a fast-moving claim shouldn't carry the same weight as one from 6 minutes ago.

Package provides: computeDrift, DriftMonitor, computeDriftFromInput; built-in profiles and decay curves; types (DriftReceipt, DriftSnapshot, AgentDriftReceipt, etc.). Score-to-status (STABLE / DRIFTING / CRITICAL).

You provide: Receipt (or drift input) to score; optionally your own decay profile. No storage — you consume threshold events (e.g. alert, feed agent/canon).

Install

npm install @uvrn/drift @uvrn/core @uvrn/score

@uvrn/core and @uvrn/score are required peer dependencies. @uvrn/score owns the canonical V-Score weights; @uvrn/drift imports WEIGHTS from it.

Quick start

import { computeDrift, DRIFT_PROFILES } from '@uvrn/drift';

const result = computeDrift(receipt, DRIFT_PROFILES.fast);

console.log(result.drift.decayed_score); // e.g. 61 (was 88, 24h ago)
console.log(result.drift.status);        // 'DRIFTING'
console.log(result.drift.delta);         // -27

Decay curves

| Curve | Behaviour | Good for | |---|---|---| | LINEAR | Fixed pts/hr drop | Slow-moving, long-lived claims | | SIGMOID | Holds, then hard drop at midpoint | Claims with binary freshness — current or not | | EXPONENTIAL | Immediate aggressive decay | Fast-moving claims, volatile data |

Built-in profiles

fast · moderate · threshold_short · threshold_long · slow · archival · default

These are generic starting points covering each curve type at different speeds. Build your own DriftProfile for domain-specific tuning:

import type { DriftProfile } from '@uvrn/drift';

const myCustomProfile: DriftProfile = {
  name: 'my_domain_profile',
  curve: 'SIGMOID',
  rate: 48,               // midpoint at 48 hours
  staleAfterHours: 120,
  scoreFloor: 10,
};

const result = computeDrift(receipt, myCustomProfile);

Continuous monitoring

import { DriftMonitor, DRIFT_PROFILES } from '@uvrn/drift';

const monitor = new DriftMonitor({
  intervalMs: 60_000, // check every minute
  onThreshold: (event) => {
    console.log(`${event.receipt_id}: ${event.from} → ${event.to}`);
    // emit alert receipt, notify @uvrn/agent, etc.
  },
});

monitor.watch(receipt, DRIFT_PROFILES.threshold_short);
monitor.start();

V-Score formula

V-Score = (Completeness × 0.35) + (Parity × 0.35) + (Freshness × 0.30)

Weights are owned by @uvrn/score. Drift decays the Freshness component only (via computeDrift). Completeness and Parity are re-scored by @uvrn/agent when new sources are fetched.

License

MIT · uvrn.org