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/codegen-types

v0.1.0

Published

Pure TypeScript type declarations for ForGrit code-generation contracts — CodePlanContract, UIScreenContract, IntegrationSelections. Types only; no orchestration engine.

Readme

@forgrit/codegen-types

Pure TypeScript type declarations for ForGrit's code-generation contracts.

Types only. The 49K-LOC codegen orchestration engine that produces these contracts stays proprietary inside ForGrit's monorepo. This package exists so external tools (CLIs, marketplace plugins, analytics, integration tests) can type-check their interop without depending on the foundry runtime.

Install

pnpm add -D @forgrit/codegen-types
# or
npm install --save-dev @forgrit/codegen-types

Note: -D / --save-dev because this package emits only .d.ts declarations and a tiny .js shim that re-exports enums. There is no runtime behavior to ship in production bundles.

What's in the box (~50 types)

| Sub-module | Key exports | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | code-plan | CodePlanContract, ComponentSpec, APIEndpointSpec, EntitySpec, EntityFieldSpec, StateSpec, Language | | navigation | NavigationContract, RouteSpec, NavItemSpec | | file-manifest | FileManifest, FileBatch, FileSpec, FileOwnership, FileKind | | frozen | FrozenCodePlanDTO (composite of the 3 contracts above + hashes) | | ui-screen | UIScreenContract, ScreenArchetype, LayoutSpec, ComponentInventory, ComponentType, DataRequirements, CrudOperation, FilterSpec, SortSpec, PaginationSpec, InteractionSpec, ActionSpec, ModalSpec, ValidationRule, AccessibilitySpec, DesignTokenUsage | | validation | ContractValidationResult, ContractValidationError, ContractValidationWarning | | integrations | IntegrationCategory + 7 per-category enums + IntegrationSelections + DEFAULT_INTEGRATIONS + IntegrationOptionMeta |

All types are re-exported from the package root for convenience:

import type {
  CodePlanContract,
  FrozenCodePlanDTO,
  UIScreenContract,
  IntegrationSelections,
} from '@forgrit/codegen-types';

Or scope by sub-module if you prefer narrower imports — sub-paths are NOT exposed in package.json#exports (kept to a single root export for stability; sub-paths may be added in 0.2.x if demand emerges).

What's NOT in this package (intentional moat boundary)

These belong to the codegen ENGINE, not the contract surface, and stay apps/api-local:

  • Patch family: PatchSet, PatchOperation, PatchPrecondition, PatchApplicationResult — the cross-batch modification engine
  • Module ownership graph: ModuleContract, ModuleType, ModuleOwnership, ModuleDependencies, ModuleExports, ModuleImports, TestRequirements, STANDARD_MODULES — the module orchestration model
  • INTEGRATION_CATALOG: the 268-line catalog with display labels, npm package lists, and template fragment IDs — the curation IS competitive value
  • ContractBundleV1: the legacy bundle format wired to ForGrit's internal storage layer
  • Prisma JSON column shapes (JobMetadata, DesignSelectionContractJson, FrozenPromptContractJson, BudgetEstimateSnapshotJson) — ForGrit-internal persistence concerns
  • live-demo.types, compliance-types, all stack-adapter types — apps/api-local orchestration concerns

If your use case needs any of the above as a contract, open an issue — the right answer is usually a SEPARATE narrow types package, not bundling them here.

Versioning

Semver from 0.1.0. Type shapes are considered stable for the major version; additive changes (new optional fields, new union variants) ship in minor versions; removals or required-field changes will bump major.

The four source files in apps/api/src/codegen/{codegen,contracts,contract-bundle,integration-options}.types.ts had zero 30-day churn at the time of extraction (2026-05-27), indicating the surface is stable enough for a v0.1 publish.

License

MIT. See LICENSE.

Related ForGrit packages

See plan #22 Path D for design rationale + the load-bearing "engine vs intelligence" decision.

Engines

Node ≥ 20. No runtime dependencies.

Issues

https://github.com/forgrit-ai/forgrit/issues