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

@stigmer/enterprise

v0.3.2

Published

Stigmer Enterprise: many organizations, federation with the platforms whose tokens it trusts, teams and invitations, on the open-source Stigmer server, turned on by a license key.

Readme

@stigmer/enterprise

Stigmer Enterprise: the Stigmer server with many organizations, federation with the platforms whose tokens it trusts, teams and invitations, turned on by a license key.

This package is the Enterprise half of one server. It runs on @stigmer/server, the open-source control plane, and adds to it through the library's own extension points; it changes none of the library's behaviour. Its source is published under the Stigmer Enterprise License (see LICENSE in this folder), not under the Apache License that covers the rest of this repository.

What a key turns on

The server reads one license key at boot and decides its edition once:

  • No key: the server is the open-source server exactly, one organization and all. No Enterprise code path runs.
  • A key that does not verify: the boot is refused with the reason (an unknown key, a signature that does not match, contents that do not read, or a ticket that is not one), and the process exits 1. It never falls back to open source silently, because that would sign every single-sign-on person out over a typo.
  • A verified key: the Enterprise edition, on Postgres. Its tables live in their own ee schema beside the library's, created and migrated by the server at start.

A license is verified offline, against the public keys compiled into this package; there is no setting that adds a key. When a license and its grace period have ended, the server keeps running and keeps every person, organization and record: it refuses only growth (a new organization, a new team, a new or changed federation issuer) until a renewed key is pasted. A server whose license allows one organization still makes that organization at its first start, even when the license has already ended, and logs a warning at every start once it has. How long production use in that mode stays licensed is the license's to say (see LICENSE), not the code's: the server never locks anyone out.

Running it

The package's process entry is main.js at the root of its build output, a one-line shim that loads the entry proper, src/editions/enterprise-entry.ts: it reads the key and boots the edition it decides through the library's own process body. Everything the open-source server reads (the database, the operator's sign-in issuer, the ports, Temporal) is read the same way. Beside that, the Enterprise server reads:

| Variable | Meaning | |---|---| | STIGMER_LICENSE_KEY | The license key. Unset or blank: the server runs as open source. | | STIGMER_OUTBOUND_EGRESS | Which addresses a licensed server may dial when it reaches a URL a person wrote (a federation issuer's documents, an MCP or plugin install probe, a vault sign-in). Unset, blank or strict: public addresses only, the default. relaxed: private and loopback addresses too, link-local still refused. Read only when a license key is set: without one the server is the open-source edition exactly and ignores this variable. With a key, any other value refuses the boot. | | STIGMER_ACCESS_HISTORY_RETENTION_DAYS | How many days a licensed server keeps the access history (who gave whom access to what). Unset or blank: every entry is kept. A whole number of days, at least 1 (for example 365): once an hour the server removes the entries older than that, in every organization, deleted ones included; the numbering continues, and every page of the history says how long it is kept and the oldest entry it still holds. Read only when a license key is set. With a key, any other value (0, 365d, 1y) refuses the boot. | | STIGMER_SHARED_RUNNER_ACROSS_ORGANIZATIONS | accepted: a licensed server whose license may hold more than one organization starts with no sandbox driver that isolates a session, every organization's agents sharing one runner user, workspace root and reach to Temporal, and logs one warning saying so. Unset or empty: such a server refuses to start. Any other value refuses the boot. A license with maxOrgs: 1 needs nothing. | | STIGMER_ORGANIZATION_CREATORS | Who may create an organization on a licensed server. Unset, blank or anyone: anyone signed in, as without the setting. Otherwise a comma-separated list of account ids (ida_ and 26 characters): only those accounts create a top-level organization, and anyone else is refused with their own account id and told both ways forward (ask an organization's admin for an invitation, or send the operator their id). A person reads their account id with stigmer auth whoami, or from that refusal. An organization's admins still create child organizations under it, and every person keeps doing what they can today inside the organizations they belong to. Read only when a license key is set. With a key, an entry that is not an account id, an empty entry, or anyone inside a list refuses the boot. A change takes a restart. | | DATABASE_URL | Required with a key: Stigmer Enterprise runs on Postgres. | | STIGMER_PLATFORM_TOKEN_KEY | The key the server signs its own tokens with. Unset, the server generates one and keeps it under its home directory; a server run as several replicas sets it so they share one key. |

The server image

Every release also publishes this server as a container image, ghcr.io/stigmer/stigmer-server-ee, for linux/amd64 and linux/arm64. It is the open-source stigmer-server image built from the same Dockerfile (backend/services/stigmer-server/README.md, "Docker image": the same /data volume, ports and health check, the web console included) plus this package: its /app is the server's slim bundle with this package's main.js as the entry. The npm package ships no console, so the image is how a self-hosted Enterprise server gets one.

# No key: the open-source server exactly.
docker run -d -p 7234:7234 -p 7235:7235 -v stigmer-data:/data \
  ghcr.io/stigmer/stigmer-server-ee:latest

# A license key, on Postgres, signing callers in through your identity provider.
docker run -d -p 7234:7234 -p 7235:7235 -v stigmer-data:/data \
  -e STIGMER_LICENSE_KEY="<the key>" \
  -e DATABASE_URL="postgres://<user>:<password>@<host>:5432/<database>" \
  -e STIGMER_OIDC_ISSUER="https://<your issuer>" \
  -e STIGMER_OIDC_AUDIENCE="<your API audience>" \
  ghcr.io/stigmer/stigmer-server-ee:latest

The image reads the variables in the table above, and everything the open-source image reads. A key it cannot verify stops the container with exit code 1 and one boot failed: line saying why. An image only trusts the signing keys compiled into its release (src/license/trusted-keys.ts): from 0.1.1, Stigmer's own issuer's key, license-signing:v1, so a license Stigmer issues verifies, and any other key is refused. With no key the image runs as open source. A licensed server refuses to start without Postgres or without sign-in (STIGMER_OIDC_ISSUER). One whose license may hold more than one organization also refuses to start with no sandbox driver that isolates a session (SANDBOX_PROVISIONER_TYPE set to docker, agent-sandbox or substrate), because every organization's agents would share one runner, unless STIGMER_SHARED_RUNNER_ACROSS_ORGANIZATIONS=accepted says the operator accepts that; the example above sets neither, so add one of them, or use a license with maxOrgs: 1.

On Kubernetes, the Stigmer operator runs this image: a license Secret named in spec.enterprise.license switches the server to it, with the settings above as fields of spec.enterprise and an outbound network fence on by default (deploy/operator/config/samples/enterprise.yaml, and the Stigmer resource's reference in the docs).

Its labels say what it holds: org.opencontainers.image.title is stigmer-server-ee, and org.opencontainers.image.licenses is LicenseRef-Stigmer-Enterprise AND Apache-2.0, this package under LICENSE (which sits beside main.js in /app) and the open-source server under the Apache License 2.0.

Tags: vX.Y.Z for each release; latest moves only to a stable release, after the pushed image has passed its smoke on native runners of both architectures. Local build and smoke: make smoke-ee-image, which bundles the tree (make bundle-ee-slim) and runs scripts/smoke-image.mjs: the labels, the open-source server's own image smoke with no key, and two keys it cannot verify refused; with a license from Stigmer's issuer in STIGMER_EE_SMOKE_LICENSE_KEY, also a licensed boot reading edition enterprise, and that license with one claim changed refused. Each release runs it with a license (--require-license) before latest moves.

Using it as a library

A host that composes the Enterprise identity unit beside units of its own imports it from the package's one entry, @stigmer/enterprise: the unit's builder and its ports, the Postgres side built over the host's pool and its schema chain, the license verifier and the state a verified license is in, the growth gate, and the contract kits an adapter of the unit's ports must pass. The server's own composition from a license verdict, the license status it reports and the growth freeze it builds are not exported: a server that runs Stigmer Enterprise runs this package's entry, whose trusted keys are compiled in.

Building and testing

npm install
npm run build
npm run typecheck
npm test

The suites that need Postgres read TEST_DATABASE_URL and skip by name without it; STIGMER_TEST_GATE=1 makes a missing database a failure instead. npm run typecheck also checks test/conformance.

The repository's conformance suite (test/conformance at the root) runs against a licensed Enterprise server as its enterprise target (make test-conformance-enterprise, and the ci.conformance-enterprise.yaml lane on every pull request touching the server, this package or the suite). It spawns test/conformance/licensed-server.ts from source under tsx: the shipped entry's composition with a license that process signs for itself and a ring trusting only that key. The file is outside src/, so it is in no build, no published package and no image; it refuses to start when STIGMER_LICENSE_KEY is set, and reads its license terms from STIGMER_TEST_LICENSE_TERMS (its header has the fields). src/editions/__tests__/licensed-server.postgres.test.ts boots it and pins its refusals. On that target the suite also proves the identity features over the wire: teams (a share with a team reaches its members), invitation links (made, previewed, redeemed, used up and revoked), and federation issuers, both their whole lifecycle and a live sign-in through an outside TLS issuer the spawned server trusts. A licensed server with no egress setting refuses a loopback issuer.

docs/enterprise-authorization-coverage.md is the authorization inventory of the RPCs the unit serves, held to the served methods by the unit's own test.