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

@sapienx/saas-core

v2.6.0

Published

Workspace tenancy, entitlement, manifest and lifecycle contracts for SaaS Core

Readme

@sapienx/saas-core

Current release: runtime 2.6.0; Core schema compatibility coordinate 2.0. The release delivers the additive, Core-managed billing, entitlement-lock, and plan-catalog migration sources through the canonical application template and CLI. This package exports the generic contracts; it does not execute SQL. Consumers apply and verify the delivered sources through their own controlled migration process.

Generic SaaS Core contracts include product configuration, compatibility metadata, the workspace-owned Domain/PublicSite contract, and the Agent Surface contract. Use defineAgentTool() for a validated, transport-neutral capability definition; the managed application template supplies the page-scoped WebMCP adapter.

Billing is provider-neutral at this boundary. The package exports the interval, status, transition, outcome, proration, retry, effective-plan, presentation, plan, and entitlement contracts, plus deterministic helpers such as resolveBillingPolicy(), resolveEffectiveBillingPlan(), resolveBillingRetry(), getUsageSnapshot(), and evaluateEntitlementConsumption(), and getEntitlementGateState(). The Plan Catalog consumer handoff is shipped at docs/PLAN-CATALOG.md. A consumer can pack and validate these exports without loading a provider SDK or making a network call. Gate state is advisory UI output; server-side mutation authorization remains the consumer's responsibility. The public evaluatePlanChangeEligibility() contract provides fail-closed target-plan checks for explicit downgrades; null is unlimited and missing configuration is unavailable.

Plan catalog consumers can also use validatePlanDefinition(), normalizeProductPlan(), duplicateProductPlan(), and classifyProductPlanChange(). A duplicate is intentionally inactive and has no provider price reference; provider mappings must be registered separately.

Portable workspace, entitlement, catalog, public-domain, schema, manifest, and compatibility contracts for SaaS Core products. CoreDomainService describes the product-neutral listDomains, platform-subdomain mutation, and resolveHost boundary. This package contains no Next.js, Supabase service-role, Paddle, migration execution, or product-domain code. Its package boundary does not own the template's migration files.

Import it from Core runtime adapters and product tooling. Products define their own plan names, prices, feature keys, and usage metrics through the config boundary; Core only evaluates stable keys and lifecycle contracts.