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

@jr2/machines

v0.2.1

Published

The Machines the jr2 kit ships: packaged xstate Machines that leave their parts Open for a composer to bind.

Readme

@jr2/machines

The Machines the kit ships (ADR-0054). A fourth published package beside @jr2/{cli,orchestrator,agent-protocol}, on the same release train, exporting named Machines from its index.

It ships Machines, never Workflows: a Workflow is the name an Instance registers a Machine under, and only the Instance's workflows/ file can do that. So the consumer line is one file of your own —

// workflows/task.ts  →  the workflow "task"
import { customize } from "@jr2/orchestrator";
import { task } from "@jr2/machines";

export const machine = customize(task, {
  repos: { target: { url: "https://github.com/you/repo.git" } },
  agents: { coder: { model: "anthropic/claude-sonnet-4-6" } },
});

The Open parts

A packaged Machine leaves the parts a package cannot honestly fill Open — a Repo Slot with no url, a slot map with no slots, an Agent with no model — because a package cannot know your repository or pay for your model. jr2 up walks the registered Machines, refuses an Open part nobody bound before anything is built, and prints the customize line that binds it.

task has two: its Repo Slots, Open as a map, and the Agent coder. Both are bound above. The slot names are yours: task reads none of them. Their order is task's convention (jr2 itself gives no slot a meaning): the first you write is where the coder works; any others are checked out beside it and the coder is told where they are, so a change that targets a library, or wants a handbook to hand, is one more line —

repos: {
  target: { url: "https://github.com/you/repo.git" },
  reference: { url: "https://github.com/you/lib.git", ref: "v3" },
},

Peer dependencies

@jr2/orchestrator, xstate and zod are peer dependencies, never regular ones. Every part a Machine carries is keyed in maps @jr2/orchestrator holds and in xstate's own machinery; a second copy of either is a Machine whose Menus are empty and whose Gates accept nothing, with no error anywhere. Your own Machine package copies this shape.

Machines

  • task — one prompt, one Workspace, one human says done. The coder works in a Sandbox on jr2/task-<run id> (or the branch you pass), finish parks the run at the review Gate, request_changes sends it back on the same conversation, approve ends the run and tears the Workspace down. It does not push: while the run is parked you can exec into the Sandbox, read the branch, and push it yourself with your own credential.