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

sahou

v0.0.2

Published

Sahou runtime — schema-first typed messaging for creative installations (on Zenoh)

Readme

sahou

The TypeScript runtime for Sahou (two entry points: node / browser). Validation, envelopes, and handshake verdicts are all delegated to the bundled Rust core (wasm), so diagnostics are byte-identical with Python / TD.

Usage

// Node (auto-spawns a link if none is running)
import { connect } from "sahou";
const node = await connect("descriptor.json", { node: "visuals" });
// (The path is up to you. To use the output of `sahou gen --out-dir gen`, pass "gen/descriptor.json".)

// browser (cannot spawn; when not connected, returns a NO with startup steps)
import { connect } from "sahou/browser";
const node = await connect(descriptorJson, { node: "visuals" });

await node.subscribe("touch", (p) => { ... }, { onReject: (c, d) => { ... } });
await node.publish("cue", { ... });                     // send-boundary NO → SahouRejected
const res = await node.queryConfirmed("get_state", { ... }, { retries: 3 });
await node.answer("get_state", async (req) => ({ level: 3 }));
await node.close();

Typed connect (opt-in, generated)

The base connect above is untyped (node/conn are strings, payloads are unknown). To get editor completion for node names, per-node connection names, and payload types from the contract, generate a whole-descriptor typed layer and import its connect instead:

sahou gen schema.sahou.yaml --out-dir gen --lang ts            # node target (default)
sahou gen schema.sahou.yaml --out-dir gen --lang ts --target browser
import { connect } from "./gen/sahou.gen.mjs";           // browser: generate with --target browser
const node = await connect("gen/descriptor.json", { node: "visuals" }); // node name completes
await node.subscribe("touch", (p) => { p.phase; });      // conn completes; p is typed (Touch)

sahou.gen.mjs re-exports the real connect (zero runtime cost); sahou.gen.d.mts supplies the types (one connect overload per node → the correct facade). The engine behaves identically without it. sahou check detects stub↔IR drift. A per-node stub (sahou gen --lang ts --node <name>typedNode()) is also available.

Environment variables

  • SAHOU_LINK_CMD: the executable to spawn as the link (default: sahou on PATH)
  • SAHOU_LINK_ARGS: extra arguments when spawning (e.g. --no-multicast --grace 4)

Development

  • npm run build:core — generate the wasm core for both targets (node/browser) (requires wasm-pack)
  • npm run build — tsc / npm test — vitest (integration tests require cargo build -p sahou)

Known upstream limitations (tracked; outside the ②c completion criteria)

  • zenoh-ts WS reconnect loop: Session.open against an unreachable locator retries indefinitely inside zenoh-ts (RemoteLink.new fails to increment retries). openSessionWithTimeout in src/session.ts only cuts off the "wait"; it cannot stop the loop itself. Do not hammer connect() in a tight loop. Re-evaluate the timeout handling once an upstream fix lands.