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

@weaveintel/resilience

v0.1.1

Published

Per-call resilience guards (circuit breaker, rate limiter, retry) plus operational durability (idempotency, dead-letter, retry budget, health).

Downloads

1,153

Readme

@weaveintel/resilience

Wraps a flaky call — an LLM, an API, a queue handler — so retries, rate limits, circuit breakers, and durability rules apply consistently.

Why it exists

Every network call eventually fails: a provider rate-limits you, a service goes down, the same request arrives twice. Handling each of these by hand, per endpoint, leads to subtle bugs — you retry something that shouldn't be retried, or hammer a service that's already on the floor. Think of this package as the guardrails and speed bumps on a mountain road: they don't drive the car, but they keep it from going over the edge when things go wrong. You describe the endpoint once, and every call through it gets the same protection.

When to reach for it

Reach for it when a call can fail transiently and you want retry, backoff, rate limiting, or a circuit breaker — plus operational durability like idempotency keys, dead-letter capture, and health checks. It guards how a call runs; if you need to decide whether a call is allowed on safety or spend grounds, that's @weaveintel/guardrails or @weaveintel/cost-governor.

How to use it

import { createResilientCallable, PROVIDER_RESILIENCE_DEFAULTS } from '@weaveintel/resilience';

const callModel = createResilientCallable({
  key: 'openai:chat',
  retry: PROVIDER_RESILIENCE_DEFAULTS.retry,
  circuit: PROVIDER_RESILIENCE_DEFAULTS.circuit,
});

// retried, rate-limited, and circuit-protected automatically
const answer = await callModel(() => fetch('https://api.example.com/v1/chat'));

What's in the box

Per-call guards:

  • createResilientCallable / runResilient — compose retry + rate limit + circuit breaker + concurrency into one callable.
  • createCircuitBreaker, createRetryPolicy, createTokenBucket, createKeyedRateLimiter, createConcurrencyLimiter — the individual guards.
  • createLatencyTracker, createThroughputTracker — p95/p99 latency and adaptive-budget signals.
  • createResilienceSignalBus — subscribe to normalized signals (retry, open circuit, throttle) so apps can react.

Operational durability (absorbed from the former reliability + durability packages):

  • Idempotency, retry-budget, dead-letter, backpressure, health, and a queue-based durable concurrency limiter.
  • getOrCreateEndpointState / createDurableEndpointRegistry — per-endpoint state, in memory or durable.
  • PROVIDER_RESILIENCE_DEFAULTS — the shared retry/circuit settings all built-in LLM providers use.

License

MIT.