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

@typeonce/ritmo

v0.16.1

Published

The agent-first, type-safe ECS runtime for TypeScript

Readme

@typeonce/ritmo

The agent-first type safe ECS runtime

Closed schemas, declared system access, explicit schedule boundaries, typed services, and no user-facing casts for normal usage.

pnpm add @typeonce/ritmo
import { Descriptor, Schema } from "@typeonce/ritmo"

const Position = Descriptor.Component<{ x: number; y: number }>()("Example/Position")
const Game = Schema.bind(Schema.fragment({ components: { Position } }))

A component or resource can say what its number fields mean with meta: a unit, an expected range, and a one-sentence hint per top-level field. Keys are checked against the value's fields, and range compiles only on number fields. It is advisory, never validation: the schema decides what is valid, describe() lists the metadata, and a devtools session warns (out-of-range) when a write leaves the range. Snapshots do not save it, and production runtimes never read it.

const Health = Descriptor.ConstructedComponent(z.object({ hp: z.number() }))("Example/Health", {
  meta: { hp: { unit: "points", range: [0, 100], hint: "Hit points left; 0 despawns the entity." } }
})

Modules are also importable by path, for example @typeonce/ritmo/Result.

Determinism across devices

JavaScript engines may approximate Math.sin, cos, tan, asin, acos, atan, atan2, exp, expm1, log, log2, log10, log1p, cbrt, pow, hypot, sinh, cosh, tanh, asinh, acosh, atanh, and a ** b, and they do: Chrome, Safari, macOS, and Linux disagree in the last bit, and a simulation grows that bit into a different run, so a session recorded on a phone stops replaying on a server. Ops has the same functions as pure-JavaScript ports of fdlibm, built only from operations every engine rounds exactly, so they return the same bits everywhere (within an ulp of the exact value). The list is closed: Math.abs, min, max, floor, ceil, round, trunc, sign, sqrt, the constants, + - * /, and x ** 2 are already exact. The ritmo/use-ops-for-math rule of @typeonce/oxlint-plugin-ritmo reports the Math calls left in simulation code, and oxlint --fix rewrites them and adds the import.

import { Ops } from "@typeonce/ritmo"

const heading = Ops.atan2(target.y - position.y, target.x - position.x)
const velocity = { x: Ops.cos(heading) * speed, y: Ops.sin(heading) * speed }
const damping = Ops.exp(-friction * dt)

Randomness is Random, a generator (mulberry32) whose whole state is one integer, kept in a resource so a run replays and saves with the world: Descriptor.ConstructedResource(Random.codec), started with Random.seed(n), drawn in a system with Random.draw(resources.rng).

Agents: set up a project with SETUP.md, then follow the skill at skills/ritmo/SKILL.md on every change.

Related packages, released together with the same version:

Source: https://github.com/typeonce-dev/ritmo