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

@runuai/host

v0.9.145

Published

Uai host — runs ephemeral AI tasks in containers on a machine you control.

Readme

@runuai/host

The host for Uai — a self-hosted service that runs parallel AI coding tasks in ephemeral Docker containers on a machine you control. This package is the long-running per-user daemon that connects your machine to the Uai cloud and runs the task containers locally. It also serves a small read-only monitor UI on 127.0.0.1 (ADR-028).

One process does three things:

  • Cloud bridge — a host-initiated outbound WSS to wss://app.runuai.com/host carrying every command/tunnel. The cloud never connects in; nothing inbound is exposed.
  • Local UI — an HTTP server on 127.0.0.1:5876 (next free port if taken): connection badge, service info, active tasks, recent events. Localhost only, no auth, read-only — mutations come from the cloud, not here.
  • MCP gateway — a credential-injecting HTTP proxy for task containers, bound to 127.0.0.1:5877 by default. Listener failures retry with capped backoff and are advertised to the cloud as bounded health state.

Requirements

  • Docker (running) — tasks are containers.
  • Node 22, 24, 25 or 26; Node 24 LTS recommended. Those are the majors the pinned SQLite dependency ships a prebuilt binary for. Tested release majors are 22, 24 and 26; Node 25 warns and continues when the binding loads. Anything else — including Node 20, 21 and 23 — has to compile from source and fails on a machine without a C++ toolchain.

Install & enroll

npm i -g @runuai/host

Then, in the Uai web app, open an organization and choose “Add a host.” It mints a one-time enrollment token and shows the exact command to run on this machine (ADR-031):

uai-host setup --cloud wss://app.runuai.com/host --enroll uaienroll_…
uai-host install      # per-user service: launchd (macOS) / systemd --user (Linux)
uai-host start

The host generates its own bridge credential locally. The cloud persists only its hash; the raw credential transits authenticated TLS for bridge auth and existing-host attachment but is not stored there (ADR-015). Once started it appears in your org and can run tasks. Data + config live under ~/.uai (~/.uai/.env.local, ~/.uai/data/); from a repo checkout they stay under the repo instead. The monitor UI is at http://127.0.0.1:5876 (exact port in uai-host status).

CLI (uai-host)

setup --cloud <wss-url> --enroll <token>
                     claim this machine, or enroll its existing identity in
                     the token's workspace
enroll <token> [--cloud <wss-url>]
                     first-time setup, or attach this machine to another
                     workspace; uses the stored cloud URL when available
install [--dry-run]  install as a per-user service for this OS
uninstall            remove the service
start | stop         control the installed service
restart              stop + start
status               connection, service info, active tasks (same data as the UI)
logs [--follow]      tail the service log
run                  run in the foreground (debug)
pair <token>         store a host token directly (manual fallback for setup)
open                 open the local UI in your browser

enroll is available in host version 0.9.15 and newer. Its compatible cloud endpoint is intentionally deployed before that host release.

--dry-run on install (and start/stop/…) prints the unit file + load commands without touching launchd/systemd.

Headless

Runs identically with no display: install via the same flow, skip uai-host open, and use uai-host status for everything the UI shows. The UI stays reachable over an SSH port-forward to 127.0.0.1:5876 if you want it.

At boot, task and channel starts wait for the initial agent-CLI maintenance pass to settle before any in-container writer or runner executes. The cloud host page shows this short preparation state. It also shows MCP gateway listener failures while the host retries them; gateway health is independent of ordinary task admission.

Security

Tasks run in ephemeral containers and do not mount your live AI session dirs. Per-task credentials (GitHub tokens, SSH keys) are decrypted only on the host, using a host-resident master key; the cloud stores only hashes and public keys. See ADR-015 for the secret-blind model.

Dev (from a repo checkout)

pnpm host-agent (from the repo root) = uai-host run — the service in the foreground, no install, logs to stdout. The packaged binary runs the same TypeScript source through tsx; there is no build step (ADR-032).

More

Telemetry

Installed hosts report crashes only to Sentry by default. Sent on a crash: the error and stack trace (paths and secret-shaped strings redacted), recent bridge-connection breadcrumbs, OS/runtime versions, the package version, and a pseudonymous host id. No sessions, no usage pings, and no request data — nothing is sent until something actually crashes. Telemetry is designed to exclude chat, prompts, env values, and repo content; error text is scrubbed for secret shapes, but redaction is pattern-based, not perfect. Repo checkouts and dev/test runs never report, and reporting only activates after this notice has been shown once (the install/pair/setup/start/restart commands print it — a silently upgraded service stays off until one of them runs).

Opt out any time — add to $UAI_HOME/.env.local (default ~/.uai/.env.local), then uai-host restart:

UAI_TELEMETRY_DISABLED=1

UAI_SENTRY_DSN=<dsn> redirects reports to your own Sentry instead.