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

@forgrit/contracts

v0.2.0

Published

Cross-domain Zod schemas + TypeScript types for the ForGrit Foundry OS — release artifacts, deployment environments, blueprint contracts, prompt schemas, storage metering, and more.

Readme

@forgrit/contracts

Cross-domain Zod schemas + TypeScript types for the ForGrit Foundry OS. The shared vocabulary that every other @forgrit/* package speaks.

npm version license: MIT

Status: early-access (v0.x). Pre-1.0 releases may include breaking changes in minor bumps until the API stabilizes at v1.0.0.

Single runtime dep: zod. Zero NestJS, Prisma, or framework coupling. Pure TypeScript types + Zod schemas. Node 20+.


What's in the box

5 sub-module surfaces:

types/ — TypeScript interfaces

Cross-domain interfaces that span the ForGrit Foundry OS:

  • Release lifecycle: ReleaseArtifact, DeploymentEnvironment, DeploymentVersion const enums
  • Blueprint: BlueprintContract, ArchitectureBlueprint, IntegrationOptions
  • Prompt + planning: PagePlan, PromptContract-related types
  • Truth reconciler: TruthReconcilerTruth, drift digest DTOs
  • Storage metering: StorageMeterSubcategory, StorageMeterTruth, snapshot DTOs
  • Asset transfer: AssetTransfer types
  • Support tickets: category vocabulary + DTOs
  • Design DNA + variants: DesignDna, archetype-related types
  • Figma: entity + conversion types
  • Preview: archetype types
  • Plus: JobLifecycle, TechDefaults, TechTarget, SSO, app blueprint fragments, etc.

schemas/ — Zod runtime schemas

Zod schemas inferred from the corresponding types/ interfaces. Use these at runtime boundaries (HTTP request parsing, queue payload validation, etc.).

pricing/storage-pricing — Pricing constants + helpers

  • STORAGE_PRICING_INR_PER_GB_DAY — per-subcategory rates
  • computeStorageCharge(bytes, days, subcategory) — BigInt-safe charge math
  • dateBucketUtc(date) — UTC YYYY-MM-DD bucketing for idempotent metering

validators/tech-target.validator

Tech-stack-target validation rules for blueprint planning.

utils/blueprint-accessors

Convenience accessors for navigating blueprint trees.


Install

npm install @forgrit/contracts
# or
pnpm add @forgrit/contracts
# or
yarn add @forgrit/contracts

Quick start

import {
  STORAGE_METER_SUBCATEGORIES,
  computeStorageCharge,
  dateBucketUtc,
} from '@forgrit/contracts';

// Compute a charge for a storage observation
const charge = computeStorageCharge(
  1024n * 1024n * 1024n, // 1 GB in bytes
  1, // 1 day
  STORAGE_METER_SUBCATEGORIES.ARTIFACT,
);
console.log('Charge (INR):', charge); // 0.01

// Date bucket for idempotency
console.log(dateBucketUtc(new Date('2026-05-26T03:00:00Z'))); // '2026-05-26'

What it's NOT

  • Not a runtime engine. Pure type definitions + Zod schemas + a handful of pricing helpers.
  • Not opinionated about transport. Use the schemas at any boundary (REST, GraphQL, queue, etc.).
  • Not coupled to a database. Types describe shapes; persistence is consumer's choice.

Versioning

0.1.x is early-access. The public API may evolve before 1.0.0 locks semver.

License

MIT — see LICENSE.

Links

  • npm: https://www.npmjs.com/package/@forgrit/contracts
  • Source: https://github.com/forgrit-ai/forgrit/tree/main/packages/contracts
  • Issues: https://github.com/forgrit-ai/forgrit/issues
  • ForGrit: https://forgrit.ai

Sibling packages (use these together)