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

@animastor/gpu-hub

v0.1.0

Published

Animastor GPU Hub — standalone HTTP orchestration boundary between the backend and GPU workers. Job queue (Redis), task dispatch/result callbacks, worker onboarding artifacts. Job Protocol v2 is consumed from the canonical @animastor/contracts package.

Readme

@animastor/gpu-hub

GPU Hub — standalone HTTP orchestration boundary between the Animastor backend and GPU workers. It owns the Redis-backed task queues, dispatches GPU jobs, relays results/errors back to the backend, and serves worker onboarding artifacts (bootstrap installer, worker bundle, workflows).

Job Protocol v2 is consumed from the canonical @animastor/contracts package — the hub carries no local protocol copy.

Standalone run

npm ci
npm start          # node server.js

@animastor/contracts resolves from npm registry as a regular dependency. No special setup required.

Tests:

npm test           # zero-dependency suite: package smoke, import isolation,
                   # canonical contracts import, protocol parity, route freeze,
                   # Redis ownership

Required env

| Variable | Default | Purpose | |---|---|---| | PORT | 5000 | HTTP listen port | | REDIS_URL | redis://animastor-redis:6379 | Redis connection | | BACKEND_URL | http://animastor-backend:3000 | Backend base URL for result/error callbacks | | GPU_HUB_API_KEY | — (empty) | Shared API key for backend → hub calls (/task, /queue/clear). Empty = no auth (dev only) | | GPU_TIMEOUT_MS / GPU_TIMEOUT | 600000 | GPU task hard timeout (ms) | | SHARE_FEATURES_ENABLED | 0 | Worker-sharing V1 kill-switch (default OFF) |

Exposed port

5000 (HTTP only; in production always behind the nginx /gpu/ proxy).

HTTP contract

Frozen route set (14 routes — see docs/architecture/GPU_HUB_CONTRACT.md §3):

  • POST /beacon — worker heartbeat
  • POST /task — backend submits a GPU job (API key)
  • GET /task/next — worker claims next job (worker credential)
  • POST /task/result — worker posts result → backend callback
  • POST /task/error — worker reports failure → backend callback
  • DELETE /queue/clear — backend clears queues (API key)
  • GET /worker-source — deprecated legacy worker.cjs (backward compat)
  • GET /worker-bundle, GET /worker-bundle/sha256 — worker runtime bundle
  • GET /workflow/:id — baseline workflow by allowlisted id
  • GET /installer, GET /installer/bundle, GET /installer/sha256 — private worker onboarding installer
  • GET /health — queue depths

Additions/removals are guarded by tests (route freeze).

Redis dependency

Hub connects to a single Redis instance (REDIS_URL). Hub-owned keyspace: animastor:gpu-hub:workers, queue/running/heartbeat/dead-letter families (constants frozen, ownership guarded). The backend-owned animastor:worker-auth mirror is read-only for the hub — the hub never writes it (frozen debt, guarded).

Backend callback

For POST /task/result and POST /task/error the hub POSTs the Job Protocol v2 envelope to BACKEND_URL (callback URL supplied by the backend at dispatch). Hub → backend is HTTP only.

Job Protocol v2 dependency

@animastor/contracts is the single canonical implementation of Job Protocol v2 (PROTOCOL_VERSION import). The hub must never carry a local protocol literal — guarded by tests on both sides (hub + monorepo architecture guards).

Security warning

The hub exposes worker onboarding artifacts, queue introspection and (without GPU_HUB_API_KEY) task submission. Do not expose the hub directly to the internet. In production it is reachable only through the internal docker network and the authenticated nginx /gpu/ proxy prefix. Running it publicly without an API key and reverse proxy is unsafe.