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

@usine/run-host

v0.3.0

Published

The worker-side one-shot process that hosts a single usine attempt's agent session.

Readme

@usine/run-host

The worker-side process for one usine Attempt. Installations receive the usine-run-host executable; embedders can import its absolute Node command from @usine/run-host/executable.

The host uses protocol v6 as newline-delimited JSON. Its first input must be a secret-free Start frame containing the repository, payload snapshot, rendered task, named agent, requested parent model, and child-session budget. After launch, Started records the SDK-selected parent model. Normalized parent and child SessionEvent envelopes follow. A launch error sends Failed as the first and terminal frame; a started session closes with one Final, Failed, or Interrupted envelope. Failure in either the session result or its event stream ends the Attempt. Attributed operator envelopes address the parent by default or a child by its normalized session id. Steer sends guidance, Interrupt pauses the addressed session until guidance arrives, and OperatorMessage starts a child Hold. Release allows an idle held child to return. Accepted and rejected deliveries produce transcript receipts. Cancel stops the entire Attempt and receives the terminal Interrupted acknowledgement. usine-run-host --protocol-version prints the supported wire version for worker preflight checks.

For harness readiness, run:

usine-run-host --preflight '{"harness":"codex","model":"gpt-5.4-mini","effort":"low"}'

The command prints one HarnessReadiness JSON response: HarnessReady or HarnessUnavailableError with the harness, capability, and corrective message. A reported capability failure still exits zero so executors can decode it; invalid arguments, a broken run host, or an incomplete check such as a timeout exit nonzero. It uses the worker user’s installed tools and login state, runs no agent prompt, and never performs an interactive login or installation. Logs go to stderr. Codex requires CLI 0.144.0 and ChatGPT authentication; Claude uses its worker-provisioned CLI with a subscription login. Pi uses the SDK installed with the host and requires API-key authentication for child models.

The executable runs the production Pi parent with Claude Code, Codex, and Pi child backends. --stub and --stub-delay-ms select the deterministic adapter used by process tests. Runtime logs and process-console output go to stderr because stdout belongs exclusively to the attempt channel, including logs from libraries with separate Effect runtimes.

After the agent session finishes, the host records commits created after the supplied base commit. For a changed checkout, an agent-created branch, or an Attempt pinned to a commit, it also asks GitHub for PRs whose head matches the final checkout commit. These structured PullRequest facts persist with the result and supply the operator's PR link. Discovery uses gh api with the worker's existing repository access, including the exe.dev GitHub host; it does not parse the agent's message. A failed lookup or ten-second timeout logs a warning and preserves the completed agent result. Worker images need the GitHub CLI for PR discovery.

Run pnpm --filter @usine/run-host test from the workspace to exercise the production host through an in-memory stdio harness. The suite covers protocol validation, session interruption and cleanup, and commit harvesting from temporary Git repositories. Agent sessions and GitHub responses are controlled test adapters; tests require Git and Node.js and run without agent or GitHub credentials.

Everything is 0.x, so APIs may change. Supply effect at the version pinned by the usine workspace.