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

@vyr-e/latch

v0.2.2

Published

A permission system for AI agents, declared in one YAML file.

Readme

Agents get tool calls. latch decides which of them run. You declare what an agent may do in a latch.yaml — allow, deny, amount limits, human-approval gates, protected paths — and every runtime that reads the file enforces the same rules. Unlisted actions are denied by default.

agent: support-agent

allow:
  stripe.customers.read: true
  stripe.refunds.create:
    max_amount: 50
    approval: required
  github.issues.create: true

deny:
  github.repositories.delete: true
  filesystem:
    paths:
      - ~/.ssh
      - ~/.aws

How agents consume it

latch gives the same policy three surfaces, so any agent — framework-wired or plain LLM — can follow it:

  1. Runtime gate. Wrap a tool; the policy decides whether execute runs at all.

    import { createGate } from "@vyr-e/latch";
    
    const gate = createGate({ policy: "latch.yaml" });
    
    export const refund = gate.wrap("stripe.refunds.create", {
      async execute(input) {
        return chargeApi.refund(input);
      },
    });
    // denied → throws LatchDeniedError with the reason
    // approval: required → throws LatchApprovalRequiredError (or asks your onApproval handler)

    Action names autocomplete from latch.yaml; unknown names fail to compile.

  2. A prompt section. renderPrompt(policy) turns the YAML into markdown a model can read and follow: what is allowed, what needs a human, what never happens, and what to do when a call is denied. Paste it into instructions.md or a system prompt.

  3. A CLI. Validate files, evaluate single calls in CI, print the prompt section, and generate action-name types.

    bunx @vyr-e/latch validate
    latch check stripe.refunds.create --input '{"amount": 80}'   # exit 1: exceeds max_amount 50
    latch prompt > instructions-appendix.md
    latch types                                                   # writes latch-env.d.ts
  4. A contextual layer (optional). Rules say what an agent may do; an interchangeable classifier judges whether an authorized call is appropriate now — so an agent allowed to open GitHub issues doesn't open one for "good morning". Denials, constraints, and approvals always win; the classifier only restricts.

    const gate = createGate({
      policy: "latch.yaml",
      classifier: createLLMJudge({ model: "typesafe-ai/jev" }),
      situation: (input) => ({ agent, task, context }),
    });

    See Contextual gating.

Rules that hold everywhere

  • Deny beats allow. A matching deny rule wins, even against a more specific allow.
  • Default deny. Anything not allowed is denied; default: allow loosens only the fallback, never the deny rules.
  • Constraints are fail-closed. A max_amount rule with no numeric amount in the input is a denial, not a pass.
  • Approval is a decision. approval: required downgrades an allow to a pause-for-a-human decision — the same approved / denied / user-approval shape eve-style runtimes already use.

Install

bun add @vyr-e/latch

The CLI ships with the package: bunx @vyr-e/latch --help (or npx @vyr-e/latch).

Documentation

License

MIT