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

huncho

v0.6.0

Published

Decisions as code. Typed questions, thresholds with hysteresis, nested decisions, journal, replay and calibration over decision models. Providers: TypeSafe Jev, OpenRouter, Vercel AI Gateway.

Readme

huncho

ci npm license

Decisions as code.

A hunch is a probability with a policy attached. huncho makes that a first-class object in TypeScript: ask typed questions of a decision model, apply thresholds that do not flap, nest decisions, journal every one, replay a policy change without inference, and calibrate against what actually happened.

Decision models are providers, not the product. Out of the box: TypeSafe Jev called directly, Jev through OpenRouter, Jev through Vercel AI Gateway, and a factory for anything else. Nothing above the model seam knows which vendor answered. Zero runtime dependencies.

npm i huncho
import { choice, huncho, noul } from "huncho";
import { jev } from "huncho/jev";

const route = huncho("support.route", { model: jev() })
  .ask({
    urgent: noul("Does this need a human within the hour?"),
    topic: choice("What is it about?", ["billing", "bug", "other"]),
  })
  .when((a) => a.urgent.p, { enter: 0.8, exit: 0.6 }, "page")
  .when((a) => a.topic.is("billing", 0.7), "billing")
  .else("triage");

const decision = await route.decide("Checkout is down. Every customer gets a 500 at payment.", { key: "T-1041" });
decision.outcome;   // "page" | "billing" | "triage"
decision.via;       // "enter" | "hold" | "else": how the outcome was reached
decision.previous;  // what this key decided last time, if anything

jev() reads TYPESAFE_API_KEY the first time it is called. { enter: 0.8, exit: 0.6 } is hysteresis: the ticket enters page at 0.8 and stays there until urgency drops below 0.6, per key. Answer types follow from the questions, so a.topic.p("refund") is a compile error.

Docs

The documentation is the site at edgardcham.github.io/huncho. It is built from this repo, so the pages under docs/ and the scripts under examples/ are the source, and the API reference is generated from the type declarations.

CONTRIBUTING.md is the working agreement and the module map.

Packages

| Ecosystem | Package | Status | | --- | --- | --- | | npm | huncho | 0.6.0; the public API has been frozen since 0.1.0, CHANGELOG.md records every change to it and stability says what a version number means | | PyPI | huncho | next, ported from the fixtures now that the TypeScript API is frozen |

One set of fixtures for wire dialects and policy semantics; each port passes the same files, and journals are interchangeable.

License

MIT