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

@fiducial/identity

v0.2.0

Published

One identity model across users, devices and services — mirrors the Rust fiducial-identity crate

Readme

@fiducial/identity

One identity model across users, devices and services.

Mirrors the Rust fiducial-identity crate. The Rust side runs in firmware, the desktop backend and the CLI; this side runs in the Worker and the app. Both answer the same question — may this actor do this to this thing? — and both are held to the same answer by docs/identity/vectors.json, a decision table generated from the Rust crate and replayed by this package's test suite.

import { can, principalFromSession } from "@fiducial/identity";
import { createAuth, CookieSessionContext } from "./adapters.generated.js";

const auth = createAuth(env, new CookieSessionContext(cookieJar));
const who = principalFromSession(await auth.getSession());

const thermostat = { kind: "device", id: "dadadadadadadada" } as const;
if (!can(who, "write", thermostat, grants)) {
  return new Response("forbidden", { status: 403 });
}

The rule

| | | |---|---| | Deny by default | an empty grant table permits nothing | | Unidentified is refused | anonymous, or an all-zero sentinel id | | A device may read itself | with no grant; it may not write itself | | Platform scope | a platform grant covers every resource | | Roles are ordered | viewer < member < admin < owner |

Ids are hex strings here

The Rust side holds ids as fixed-width bytes because it must run without an allocator. This side holds them as lowercase hex, because that is what crosses a wire, lands in a database column and appears in the vectors — converting at each boundary instead would be three places to get it wrong.

userIdFromUuid() is the one conversion point: an auth vendor's UUID subject in, a normalized UserId out, hyphens dropped and lowercased so the same user in different casing is one identity rather than two.