libraryPackage manifestv2.0.4

lib.authos-runtime

Pure deterministic AuthOS runtime projections and security gates over AuthOS contracts.

@lssm-tech/lib.authos-runtime
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 2.0.4. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.authos-runtimedomains

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

4 déclarationsSELECT TO INSPECT

@lssm-tech/lib.authos-runtime

The ./ssr request-edge APIs bind the shared server-only UI subject scope. runWithSubject, cached reads, nested/concurrent request isolation and SubjectContextMissingError remain compatible. AuthOS still owns subject construction; the lower propagation port makes no policy decisions.

Pure deterministic AuthOS runtime projections and security gates over @lssm-tech/lib.authos-spec.

This package does not authenticate users, call Better Auth, access databases, or execute providers. It converts AuthOS contracts into safe runtime-facing projections for RBAC, RoleMorph, personalization, data-transmission, database/form metadata, Connect with LSSM, redaction, and production IdP readiness.

The runtime also includes a deterministic domain-command persistence helper. It turns approved or approval-required AuthOS command contracts into immutable local runtime events with governance metadata, while returning canExecute: false plans so provider, database, and Better Auth execution remains outside this package.

The ecosystem provisioning reducer applies redacted, idempotent receipts for identity, entitlement, product-local membership, activation, and revocation. It never activates partial provisioning, rejects scope and idempotency conflicts, resumes after retry evidence, and can rebuild state from durable receipts without calling an identity provider or product API.

Subject providers and subject modes

The ./subject subpath ships the production-grade SubjectProvider port implementation consumed by @lssm-tech/lib.contracts-spec/rich-reference (S-3) and the per-call subject-mode factories used by the AI-agent surface (S-9):

  • createSubjectProvider({ resolve, cache }) — request-scoped resolver with optional dual-key tenant-scoped LRU cache. Returns undefined (deny-closed) when the strategy throws or yields a malformed shape.
  • createDelegatedSubject({ userSession, agentId, signature }, verifier) — builds an agent-on-behalf-of-user Subject with kind='user' and delegationChain=[userId, agentId] so the audit record carries both identities. Throws on bad signature; resolveSubjectMode turns that into a deny-closed undefined.
  • createAgentSubject(identity) — first-class agent identity (kind='agent', no delegation chain).
  • resolveSubjectMode(ctx) — per-call dispatcher selected by the caller via ctx.mode.

The createHmacDelegationVerifier(secret) helper produces a server-side HMAC-SHA-256 verifier; secrets must come from the orchestration boundary that issues delegation contracts.

Auth read models and lifecycles over injected ports

These subpaths hold the reusable rules; hosts keep storage, transport and environment wiring and implement the ports.

  • ./auth-audit — the public auth-audit taxonomy (AUTH_AUDIT_EVENT_TYPES), redacted action -> event projection, page-limit clamp, actor scoping (non tenant readers are forced to their own actor) and the tenant-bound HMAC-SHA-256 pagination cursor (constant-time verified, INVALID_CURSOR on any failure). The host maps each event type to its own query filter.
  • ./auth-email-address — the secondary email lifecycle behind the auth-email-address-* operations over an AuthEmailAddressStore port: syntax/length validation, a uniform 6-digit code stored only as sha256:<HMAC>, 10-minute expiry, store-enforced attempt limit, constant-time verification, non-enumerating collisions and typed AuthEmailLifecycleError codes. Ids, codes and the clock are injectable.
  • ./waitlist-admin — the approve/reject workflow over a WaitlistAdminStore port, generic over the host actor, record and invitation types: verified-email gate, eligibility, idempotent re-approve and reject, lowest-privilege default role, post-condition check, best-effort invite delivery and PII-free WAITLIST_APPROVED/WAITLIST_REJECTED events.
  • ./operator-auth — the operator-auth lifecycle generic over the host operator role: invitation pending -> processing -> accepted/revoked with exact code-ref checks, observed-claim completion/release, 5-minute stale-claim takeover (every store, guarded by compare-and-set), 24h resend rotation; single-use, operator-bound 5-minute passkey challenges; refs-only credentials (raw key/token/password material is refused); 5-failure / 15-minute lockout; admin/reader role gating via OperatorAuthPolicy. The clock and id source are injectable (OperatorAuthRuntime). InMemoryOperatorAuthRepository is a process-local store for tests and explicitly enabled local mode; durable hosts implement OperatorAuthRepository and apply the same rules in their guarded writes.
  • ./oauth-request — the Passport OAuth gates: resolvePassportOAuthRequest admits a serialized Better Auth OAuth query only for a catalog relying party carrying the signed envelope (sig, exp, ba_iat, ba_param, 8 KiB cap), and assertSafeOAuthRedirect(url, { identityOrigin }) is the open-redirect allowlist (identity-origin continuation paths or an exact registered relying-party callback origin + path; userinfo, other schemes/ports/origins and unparsable input fail closed with OAUTH_REDIRECT_NOT_REGISTERED). The host supplies the identity origin.

Declared capabilities.

Lib Authos Runtime

Pure deterministic AuthOS runtime projections and security gates over AuthOS contracts.

Use it to

  • Adopt pure deterministic authos runtime projections and security gates over authos contracts

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.authos-runtime package constraints do not match the target runtime or platform.

@lssm-tech/lib.authos-runtime

@lssm-tech/lib.authos-runtime/auth-audit

@lssm-tech/lib.authos-runtime/auth-email-address

@lssm-tech/lib.authos-runtime/oauth-request

@lssm-tech/lib.authos-runtime/operator-auth

@lssm-tech/lib.authos-runtime/projections

@lssm-tech/lib.authos-runtime/provisioning

@lssm-tech/lib.authos-runtime/security-gates

@lssm-tech/lib.authos-runtime/ssr

@lssm-tech/lib.authos-runtime/ssr/subject-context

@lssm-tech/lib.authos-runtime/subject

@lssm-tech/lib.authos-runtime/subject/agent

@lssm-tech/lib.authos-runtime/subject/delegated

@lssm-tech/lib.authos-runtime/subject/subject-provider

@lssm-tech/lib.authos-runtime/waitlist

@lssm-tech/lib.authos-runtime/waitlist-admin

Imports and export paths.

17 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

17 imports

Dependencies and related packages.

Runtime dependencies 4
Peer dependencies 1
react
catalog:
Development dependencies 8
@types/react
catalog:types
@types/react-dom
catalog:types
react
catalog:
react-dom
catalog:
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lintbun lint:fix
lint:fixnode ../../../../scripts/biome.cjs check --write .
lint:checknode ../../../../scripts/biome.cjs check .
testbun test
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit
Votre vue

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.