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

@geonosis/gate

v3.9.0

Published

One heavy budget per machine: the slots every heavy command takes, the machine-wide heavy lock, and the opt-in gate daemon that runs a tier once per tree.

Readme

@geonosis/gate

One heavy budget per machine. Every heavy command the kit runs — geonosis verify, geonosis ratchet, geonosis release smoke, the kit's own build — takes a slot from it before it starts, so sessions sharing a laptop queue instead of CPU-starving each other into a red that is about the machine. Beside the slots are the machine-wide heavy lock --exclusive holds and the opt-in geonosis-gate daemon. This README is where the budget, the slots and the lock are described; the other kit READMEs link here.

Install

pnpm add -D @geonosis/gate

The kit's tools already install it as a library. Add it by name only for the geonosis-gate command, which starts the daemon: the geonosis door does not front it, and under pnpm a bin is a command only where its package is a direct dependency.

The heavy slots

The budget is GEONOSIS_HEAVY_SLOTS when set, then geonosis.json → caps.heavy (a whole number of at least 1), then the smaller of cores − 1 and memory ÷ geonosis.json → stack.memoryMbPerSlot (512 MB when unset). GEONOSIS_HEAVY_MEMORY_MB replaces the machine's memory reading.

A slot is a file, slot-<n>.json, in $GEONOSIS_HEAVY_SLOT_DIR (or geonosis-heavy under the temporary directory), holding the command, directory, pid and start time of its holder. A holder whose process is gone is reaped. A child started with GEONOSIS_HEAVY_SLOT_HELD naming its parent's slot runs in that slot instead of waiting on one its parent holds.

The heavy lock

acquireExclusive takes ~/.cache/geonosis/heavy.lock (under $XDG_CACHE_HOME when that is an absolute path), writing the pid, cwd and start time into it. A second taker waits and says who holds it; a holder whose process is gone is taken over with a printed note; the wait ends in an error at its timeout. GEONOSIS_HEAVY_LOCK moves the lock file, for a sandbox with no writable home or for a test. geonosis ratchet --exclusive and geonosis verify --exclusive hold it.

geonosis-gate: one tier run per tree, one budget per machine

geonosis-gate serve --detach     # start the daemon in the background; `serve` runs it in this terminal
geonosis-gate status [--json]    # slots, running tiers, the queue, the reports kept
geonosis-gate stop               # a tier it is running is stopped with it

geonosis-gate --help prints the same. Exit 0 done, 1 when status or stop found no daemon, 2 when the command could not be run.

One daemon per machine, listening on gate.sock in the heavy-slot directory ($GEONOSIS_HEAVY_SLOT_DIR, or geonosis-heavy under the temporary directory), with its log (gate.log), the runs it has going (gate-runs/) and the reports it kept (gate-cache/) beside it.

  • A run is keyed by the tree. geonosis verify <tier> asks the daemon, which keys the run by the directory, the tier, the flags that shape the report, a hash of the tree (HEAD, every uncommitted change, every untracked file, and the install record npm, pnpm or yarn writes under node_modules) and the keyEnv values and keyFiles contents geonosis.json names. Two verifies started together over one unchanged tree start one tier and each write the same report. One started after a green is answered the green the daemon kept, with when and at what load it was made. The daemon keeps no red: a red can come of the load or the environment, so the next ask runs the tier again. A tree that moved is a different key. A run that changed the tree it was asked about is not kept. geonosis verify --fresh runs the tier again whatever the daemon holds. geonosis ledger land asks it the same way.
  • The queue is the heavy budget. A run, and every geonosis ratchet or release run that takes a slot, waits in one first-come queue bounded by the budget of "The heavy slots" above. The slots are the same files the daemon-less path takes, so a client that cannot reach the daemon and one that can never share a slot.
  • Nothing depends on it. With no daemon every client takes the slot files itself and runs its own tier, as it did before. A daemon that goes away while it holds a client's run ends that client with exit 2 and the daemon's last log line; the run it started ends with it, and its slot is reaped.
  • The Stop hook is a client. It reads a kept green for the current tree without running anything, and hands the fast tier to the daemon, under the key verify asks under, when there is none; without a daemon it launches the tier itself, detached.

The daemon accepts a command to run from any process of the same user that can open its socket (mode 0600), the way a shell does; it is not a service to expose.

Programmatic use

import { heavyBudget, takeSlot } from '@geonosis/gate'

const release = await takeSlot({ command: 'my heavy step', cwd: process.cwd() })
try {
  // run with heavyBudget({ root: process.cwd() }).slots workers
} finally {
  release()
}