Skip to main content
Each package publishes its public types through a types-only ./contracts entry (ADR 0117 decision 2): request and response shapes, event names and versioned payloads (0141, 0260), config keys with their value types (0044, 0146) and DI tokens (0042, 0263). src/contracts/ is a leaf: it imports nothing from the package’s other folders, and no symbol is exported from two entries (ADR 0294). A dependency is met when its contract exists. Import the declared name and keep going; a missing name is added as a new file in the producer’s src/contracts/ and listed in your report. Existing contract names are never renamed or removed.

Added by the contracts batch (STA-1215)

Gap-fill run 1: names the product and peer batches asked for

Product and peer contract batches left // contract-gap: stackra placeholders for these names. Each maps to an existing export or to a name the run added; replace the placeholder with the import on the right.

Members with a ./contracts entry

The count is the number of export lines in src/contracts/index.ts (the stand-in barrel until stackra gen writes the entry barrels, STA-339).

Members without a ./contracts entry

Their public types are exported from . today. Copying them into src/contracts/ would export one symbol from two entries, so the contracts batch does not; the package’s owner moves them (types, enums and ports from src/core/ into src/contracts/, core re-imports through #contracts/*) and adds the ./contracts export. Until then, import these names from ..

Services

services/example and services/health are reference services with no published events or API shapes of their own; a service gains src/contracts/ (its events, request and response shapes) when it publishes one (ADR 0260).

Integration asks

  • Done (stackra-177): build/contracts is listed by the { folder: "build" } group of apps/docs/src/config/docs.config.ts.
  • @stackra/brand-kit: root runway.yaml placement, the packages/developer/README.md row and the catalogue row (stackra-90); build and test configs come with stackra-12.
  • @stackra/calendar and @stackra/app: add the ./contracts export, the #contracts/* import and the tsdown contracts entry for the src/contracts/ the gap-fill run added (package owners; outside the contracts batch’s files).
  • @stackra/app edge header names x-figentra-request-id, x-figentra-timestamp and x-figentra-signature are a proposal until ADR 0437 lands; stackra-65 confirms them.