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

@usekova/antifragile

v2.0.0

Published

Antifragility analysis with stress testing and recovery metrics

Readme

@usekova/antifragile

Antifragility analysis with stress testing, recovery metrics, and evolutionary antibody fitness.

Installation

npm install @usekova/antifragile

Key APIs

  • generateAntibody(breach, adoptionThreshold?): Analyze a breach and generate a defensive constraint (antibody) to prevent recurrence
  • adoptAntibody(antibody): Adopt an antibody after it meets the vote threshold
  • forceAdopt(antibody): Governance override to adopt an antibody regardless of votes
  • rejectAntibody(antibody): Mark an antibody as rejected
  • voteForAntibody(antibody): Increment an antibody's adoption vote count
  • antibodyExists(antibodies, breach): Check if a matching antibody already exists
  • proposeToGovernance(antibody): Wrap an antibody in a governance proposal
  • networkHealth(antibodies, breaches): Compute resistance score and find vulnerable categories
  • stressTest(baseBreaches, rounds?, intensityMultiplier?): Simulate escalating attack waves and measure resistance over time
  • antifragilityIndex(breaches, waves?): Quantify system antifragility as a normalized index (-1 fragile to +1 antifragile)
  • calibratedAntifragilityIndex(breaches, waves?, confidenceLevel?): Statistically calibrated z-score index with confidence intervals and p-values
  • StressResponseCurve: Nonlinear stress response modeling (logistic, exponential, threshold curves)
  • PhaseTransitionDetector: Detect tipping points via rolling-window variance and lag-1 autocorrelation
  • FitnessEvolution: Evolutionary engine with tournament selection, crossover, and mutation for antibody populations

Usage

import {
  generateAntibody,
  forceAdopt,
  networkHealth,
  stressTest,
  antifragilityIndex,
  StressResponseCurve,
} from '@usekova/antifragile';

// Generate an antibody from a detected breach
const antibody = generateAntibody({
  id: 'breach-1',
  violatedConstraint: 'deny:secret-access',
  severity: 'high',
  category: 'secrets',
});

// Force-adopt via governance and check network health
const adopted = forceAdopt(antibody);
const health = networkHealth([adopted], [breach]);
console.log(health.resistanceScore);       // ratio of adopted antibodies to breaches
console.log(health.vulnerableCategories);  // categories lacking adopted antibodies

// Run a stress test simulation
const result = stressTest([breach], 5, 2);
console.log(result.improved);              // true if system got stronger
console.log(result.resistanceOverTime);    // resistance score per round

// Compute antifragility index
const index = antifragilityIndex([breach], 5);
console.log(index.classification); // 'antifragile' | 'robust' | 'fragile'

// Model nonlinear stress response
const curve = new StressResponseCurve({ inflectionPoint: 0.5, steepness: 5, saturation: 1 });
console.log(curve.logistic(0.8)); // S-curve response at stress level 0.8

Docs

See the Stele SDK root documentation for the full API reference.