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

@assistant-ui/pinboard

v0.3.0

Published

Pinned control plane: directory, placement, and HTTP proxy

Readme

pinboard

The pinned control plane: a stateless Node service that owns the directory (which backend holds which id) and proxies all data-plane traffic to the right backend. Any number of nodes behind one LB URL; coordination via Redis. Plain Node: node:http + undici + ioredis.

Running

npm install && npm run build
PINBOARD_TOKEN=... REDIS_URL=redis://localhost:6379 npm start

Env: PORT (8080), REDIS_URL (memory: = in-process store for dev/tests), PINBOARD_TOKEN (required; Bearer on /registry/*), PINBOARD_LEASE_TTL_MS (10000). npm test needs no Redis.

How it works

Non-/registry requests hit the catch-all proxy: longest registered namespace prefix → next segment is the id → look up pinboard:place:{ns}:{sha256(id)} in Redis. Live worker: stream through (SSE-safe). Stale entry (worker record expired): clientId-guarded delete, then fresh placement — pick 2 random live workers, take the one with more headroom, claim with SET NX (the singleton guarantee). Sticky, no rebalancing.

Workers POST /registry/register at boot — the full worker record; the response mints a sessionId and returns expiresInMs (the record TTL, i.e. the re-place deadline). POST /registry/heartbeat ~every 3s — { sessionId, headroom, draining } renews the record for another full window; an unknown session is a 409 { reregister: true } NACK telling the worker to abort its instances and reregister, a superseded session is a 409 { superseded: true }. Booting against an empty registry writes pinboard:boot_epoch and new placements are refused (503 + Retry-After) for one full record TTL. POST /registry/release frees a placement. Pinboard pushes evict / wind_down / resume as HTTP callbacks to the worker's <advertiseUrl>/_pinned/*, authed with the worker's own secret. Body shapes and Redis keys are documented where they're defined: src/registry.ts, src/proxy.ts, and the tests.

Introspection (Bearer): GET /registry/workers, GET /registry/overview (workers plus per-namespace placed entries and this node's in-flight proxied connection counts), POST /registry/push; GET /healthz unauthenticated.

Observability

Structured JSON logs on stdout via pino; LOG_LEVEL (default info), pretty-printed when NODE_ENV=development. GET /metrics (unauthenticated, like /healthz) serves Prometheus metrics prefixed pinboard_: HTTP request counts and durations by normalized route, placement resolution outcomes, forwards, in-flight data-plane connections, registered workers, active placements, event-loop lag, and Node process defaults. GET /readyz returns { status, uptimeSeconds, workers } — 200 when serving, 503 while booting or draining. A heartbeat line (uptime, workers, memory, event-loop lag) logs every 60s; uncaught exceptions log fatal and exit.