# @lssm-tech/lib.translation-runtime

Framework-independent ContractSpec translation runtime

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `3.0.4`
- Package path: `packages/platform/ui/translation-runtime`
- Manifest path: `packages/platform/ui/translation-runtime/package.json`
- Manifest Git blob: `808278a71b3f183c1a6a7048e634510990e90da5`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.translation-runtime](https://lssm.co/docs/packages/lib.translation-runtime/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.translation-runtime.txt)

## Package metadata

```json
{
  "layer": "platform",
  "physicalArea": "ui",
  "primaryArea": "ui-and-presentations",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "runtime",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "stable"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Interfaces, presentations and design](https://lssm.co/docs/areas/ui-and-presentations/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/platform/ui/translation-runtime/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/README.md",
  "blobSha": "8603faf40fad6b40d0092b3755b7e8c31f4007a5",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# @lssm-tech/lib.translation-runtime

Framework-independent runtime for ContractSpec translation contracts.

Static catalog diagnostics, translation validation (including ICU, readability,
keyword density and locale validation), and tenant override declarations are
available from `./contracts/diagnostics`, `./contracts/validation`, and
`./contracts/tenant`. Historical ContractSpec imports forward to the same
implementations. Static diagnostics retain their distinct contract namespace;
the existing runtime `./diagnostics` API is unchanged. Private source partitions
preserve validation ordering, issue codes, defaults and the nominal
`TranslationRegistry` and `TranslationValidationError` identities.

`@lssm-tech/lib.contracts-spec-core/translations/spec` remains the canonical source of truth for `TranslationSpec` contracts, metadata, ownership, versions, locale variants, validation, fallback declarations, and override policy. This package consumes those specs at runtime to resolve, format, cache, load, diagnose, and serialize translations across server code, React, React Native, CLIs, and tests.

## Boundaries

- **Spec layer:** `@lssm-tech/lib.contracts-spec-core/translations/spec`
- **Runtime layer:** this package
- **Formatter engine:** `MessageFormatter`, with `createIntlMessageFormatter()` backed by FormatJS/`intl-messageformat`
- **Adapters:** React/design-system/i18next integrations consume this runtime and are optional downstream layers

## Example

Resolve messages through the `createI18nFactory` stack, with one factory per stable `TranslationSpec.meta.key`:

```ts
import { createI18nFactory } from "@lssm-tech/lib.translation-runtime/contracts/i18n-factory";
import { cartEn, cartFr } from "./catalogs";

const cartI18n = createI18nFactory({
  specKey: "cart.messages",
  catalogs: [cartEn, cartFr],
  supportedLocales: ["en", "fr"],
  defaultLocale: "en",
});

cartI18n.create("fr-FR").t("cart.greeting", { name: "Alice" });
```


`create()` resolves the requested locale within `supportedLocales` (`"fr-FR"` falls back to `"fr"`, then to `defaultLocale`), so keep that list aligned with the `locale` of each catalog. A missing message falls back to the catalog's declared `fallback` locale, then to the key itself. Root catalogs declare no `fallback`; only variants point at their parent locale.

`t()` interpolates `{placeholder}` values only. Format ICU messages (plural, select, selectordinal, number, date) with the formatter engine:

```ts
import { createIntlMessageFormatter } from "@lssm-tech/lib.translation-runtime/formatters/intl-messageformat";

const formatter = createIntlMessageFormatter();
formatter
  .compile({
    id: "cart.itemCount",
    locale: "en",
    message: "{count, plural, one {# item} other {# items}}",
  })
  .format({ count: 3 }); // "3 items"
```


> **Removed in 1.0.0.** The `createTranslationRuntime` engine, its `./runtime`, `./registry` and `./runtime-helpers` subpaths, and the preference override-layer builders (`createTranslationRuntimeFromPreferences` and related helpers) no longer exist. Migrate render paths to `createI18nFactory`. `resolveTranslationPreferenceContext` (`./preferences`) still resolves app, workspace, team, user and request locale precedence.

## SSR and hydration

The factory stack produces a versioned, framework-neutral `I18nFactoryHydrationPayload` that never aliases live catalog references:

```ts
import {
  createI18nFactory,
  createI18nFactoryFromHydrationPayload,
} from "@lssm-tech/lib.translation-runtime/contracts/i18n-factory";

// Server (RSC / route handler)
const factory = createI18nFactory({
  specKey: "cart.messages",
  catalogs: [cartEn, cartFr, cartEs],
  supportedLocales: ["en", "fr", "es"],
  defaultLocale: "en",
});
const payload = factory.hydrationPayload(requestLocale);
// Transfer payload to the client (inline script, RSC stream, etc.)

// Client: rehydrate without refetching or renegotiating locale
const hydrated = createI18nFactoryFromHydrationPayload(payload);
hydrated.create(payload.snapshot.locale).t("cart.greeting", { name: "Alice" });
```


The payload carries only the catalogs for the resolved locale and its declared fallback chain. `createI18nFactoryFromHydrationPayload` rebuilds the factory with the default `en`/`fr`/`es` locale set and `en` default, so create the client instance with `payload.snapshot.locale` and keep catalog locales within that set when you rehydrate.

`validateI18nFactorySnapshot(snapshot)` and `validateI18nFactoryHydrationPayload(payload)` return human-readable error strings for partial or unknown payloads before hydration.

The `./snapshot` helpers (`createTranslationHydrationPayload`, `createTranslationSnapshotStreamChunk`, `validateTranslationHydrationPayload`) serialize a host-assembled `TranslationRuntimeSnapshot`, which the i18next adapter can consume. `createTranslationSnapshotStreamChunk(snapshot)` returns a cloned payload that is safe to enqueue before later async catalog loads; `validateTranslationHydrationPayload(payload)` returns `invalid_snapshot` diagnostics for unsupported payloads.

## Shard-scoped catalog loading

`src/loader.ts` accepts an optional `specKeys?` array on `TranslationBundleLoadRequest` to load a subset of catalogs per route. Use `loadShardDelta` to fetch only the incremental shards needed on navigation:

```ts
import {
  computeShardDelta,
  createStaticBundleLoader,
  loadShardDelta,
} from "@lssm-tech/lib.translation-runtime/loader";

const delta = computeShardDelta(alreadyLoadedSpecKeys, requiredSpecKeys);
// delta = requiredSpecKeys not yet loaded

const bundleLoader = createStaticBundleLoader(allCatalogs);
const newCatalogs = await loadShardDelta(bundleLoader, {
  loaded: alreadyLoadedSpecKeys,
  required: requiredSpecKeys,
  locales: [locale],
});
```


Absent `specKeys` ⇒ all keys pass (existing `{specKey, locales}` semantics unchanged).

## Optimization surfaces (Model A — per-request inline payload)

> **Scope: per-request inline HTML reduction.** Catalogs remain bundled and cached in the JS bundle (shipped once per deploy). These optimizations reduce the per-request inline `<script>` hydration payload — NOT total transferred bytes. The ~90% total-bytes win requires Model B (catalog code-splitting + load-bearing inline payload). See `.omc/plans/ralplan-translation-catalog-sharding-ssr.md` § "Optimization Wave — ARCHITECTURE DECISION: Model A".

### O2/O3 — Slim inline payload + value-pool dedup

Enable slim mode on your scoped hydration builder to strip spec metadata from each shard before serialization. The value-pool dedup step folds message values appearing ≥2× into a `values[]` pool; expansion is automatic on rehydration.

**Realized:** `/` en 96.6 KB → 37.8 KB (−61%); `/companyos/founder` en 93.9 KB → 35.6 KB (−62%); fr routes ~−60%. No-flash (AC1) re-proven through slim+dedup path. CI budget gates: single-locale ≤ 64 KB, with-fallback ≤ 128 KB.

O3 adds only ~2% over O2 (five lanes have disjoint key namespaces; ~53 pooled value strings). The projected ~41 KB en-fallback win requires a shared-base architecture follow-up.

### O4 — Precompiled ICU AST fast-path (`./precompile` subpath)

At bundle build time, call `buildPrecompiledIcuCatalogFromSpecs(specs)` from `@lssm-tech/lib.translation-runtime/precompile` over your `TranslationSpec[]` set. This produces a `PrecompiledIcuCatalog` with FormatJS IR AST entries for every message. Pass `createPrecompiledIcuLookup(catalog)` as the `precompiled` option to `createIntlMessageFormatter` to activate the parse-skip fast-path:

```ts
// build step (runs once at bundle time, e.g. in your bundler plugin)
import {
  buildPrecompiledIcuCatalogFromSpecs,
  createPrecompiledIcuLookup,
  serializePrecompiledIcuCatalog,
} from "@lssm-tech/lib.translation-runtime/precompile";

const catalog = buildPrecompiledIcuCatalogFromSpecs([enMessages, frMessages]);
// optionally serialize and ship as a build asset
const serialized = serializePrecompiledIcuCatalog(catalog);

// runtime (wire the formatter with the precompiled lookup)
import { parsePrecompiledIcuCatalog, createPrecompiledIcuLookup } from "@lssm-tech/lib.translation-runtime/precompile";
import { createIntlMessageFormatter } from "@lssm-tech/lib.translation-runtime/formatters/intl-messageformat";

const precompiled = createPrecompiledIcuLookup(parsePrecompiledIcuCatalog(serialized));
const formatter = createIntlMessageFormatter({ precompiled });
// formatter skips ICU re-parsing for any message with a precompiled entry
```


Additive opt-in — messages without a precompiled entry fall back to the standard parser transparently. **Scope: formatter-path latency win only.** Factory proof routes use `{placeholder}` interpolation (no ICU); O4 benefits apply to ICU-heavy catalogs (plural/select/date/number).

### O5b (#17) — Scoped-hydration intersection (wired, currently no-op)

> **App-layer wiring — not a `translation-runtime` export.** `intersectScopedI18nHydration` and `isEffectiveReachabilityMap` are implemented in `web-application-monolith`'s scoped hydration path (`packages/apps/web-application-monolith/src/i18n/scoped-hydration.reachability.ts` and `reachability-map.loader.ts`). They compose with the loader's `loadShardDelta` but are not themselves library APIs. Do not import them from `@lssm-tech/lib.translation-runtime`.

Wired into `getRequestI18n` and fail-safe (pruned keys resolve via the bundled combined runtime — no flash). Currently no-op (77/129 `t()` call sites use dynamic dispatch; scanner emits retain-all map). Auto-activates if a precise reachability map ships. Zero regression.

### O5 (#14) — Dead-key audit tool (`@lssm-tech/tool.i18n-prune`)

`@lssm-tech/tool.i18n-prune` in `packages/tools/` walks `t('key')` call sites against a `RouteShardManifest` and reports dead keys per route. Use it in CI to surface dead-key drift. It does not drive the runtime inline payload under Model A.

## Optional i18next adapter

i18next is an optional downstream adapter, not the canonical ContractSpec model. Import it through the dedicated subpath so core runtime consumers do not load i18next:

```ts
import { createInstance } from "i18next";
import {
  createI18nextInitOptions,
  exportContractSpecToI18next,
} from "@lssm-tech/lib.translation-runtime/i18next";

const exported = exportContractSpecToI18next([cartEn, cartFr], {
  defaultLocale: "en",
  lng: requestLocale,
  assumeIcuFormatter: true,
});
const { options, diagnostics } = createI18nextInitOptions(exported);
const i18next = createInstance();

await i18next.init(options);
```


The adapter exports resources as `{ [locale]: { [namespace]: { [messageKey]: string } } }`. `TranslationSpec.locale` becomes the i18next language, while the namespace defaults to the stable `TranslationSpec.meta.key`. Flat ContractSpec keys such as `"cart.items"` remain flat because generated init options set `keySeparator: false`.

ContractSpec ICU messages are exported intact. i18next does not use ICU as its default JSON format, so apps that call `i18next.t()` for ICU plural/select/selectordinal messages must install and configure an ICU-capable i18next format plugin such as `i18next-icu`. The adapter reports `i18next_icu_plugin_required` unless you explicitly acknowledge that formatting layer.

Use `exportTranslationSnapshotToI18next(snapshot)` when the host already assembles a `TranslationRuntimeSnapshot` (`./snapshot`); it carries the snapshot locale, default locale and fallback chain into the init options. For SSR, export from the same catalogs and locale used by the server render and reuse those resources/options on the client. Do not let client-only language detection renegotiate the first hydrated render. For React Native, pass the host-selected locale explicitly; the adapter does not use DOM APIs or browser storage.

## React Native

The core runtime uses no DOM APIs. Locale detection is host-owned; pass the device or user locale to `factory.create(locale)`, or negotiate it first with `negotiateLocale({ requestedLocales, supportedLocales, defaultLocale })` from `./locale`. Ensure the host JS engine provides the required `Intl` APIs or install platform polyfills before using the default formatter.

## Compatible factory and registry ownership

The registry and BCP 47 contract helpers live in this package under `./contracts/registry` and `./contracts/locale`. The pure package i18n factory and its hydration snapshot are owned by Core (`@lssm-tech/lib.contracts-spec-core/translations/i18n-factory` and `./translations/i18n-factory-snapshot`), so domain specs can use them; `./contracts/i18n-factory` and `./contracts/i18n-factory-snapshot` here forward those same implementations, with unchanged resolution. Historical ContractSpec translation imports forward these same implementations. The existing runtime root and locale exports retain their names and behavior; use the explicit contract subpaths for the factory stack. Translation declarations come from `@lssm-tech/lib.contracts-spec-core/translations/spec`.

## Translation catalog model ownership

The unchanged `Locale`, `MessageKey`, `TranslationEntry`,
`TranslationCatalogMeta`, `PlatformTranslationCatalog` and
`BlueprintTranslationCatalog` declarations are canonical at
`@lssm-tech/lib.translation-runtime/contracts/catalog`. Historical
`@lssm-tech/lib.contracts-spec/translations/catalog` imports forward these
same declarations. The model move adds no loading, formatting or runtime
initialization behavior; Core continues to own `TranslationSpec`.


## Declared capabilities

### Lib Translation Runtime

Capability ID: `package.lssm.tech.lib.translation.runtime`

Framework-independent ContractSpec translation runtime

Use cases:

- Adopt framework-independent contractspec translation runtime

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/lib.translation-runtime package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "contractspec",
    "i18n",
    "translations",
    "messageformat",
    "icu",
    "lib",
    "translation",
    "runtime"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.translation-runtime",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/diagnostics",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/direction",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/fallback",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/formatter",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/formatters/intl-messageformat",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/i18next",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/loader",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/locale",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/overrides",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/precompile",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/preferences",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.translation-runtime/contracts/catalog",
    "symbols": [
      "Locale",
      "MessageKey",
      "TranslationEntry",
      "TranslationCatalogMeta",
      "PlatformTranslationCatalog",
      "BlueprintTranslationCatalog"
    ]
  }
]
```

## Catalogue metadata

```json
{
  "family": "runtime",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "stable",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./diagnostics",
    "./direction",
    "./fallback",
    "./formatter",
    "./formatters/intl-messageformat",
    "./i18next",
    "./loader",
    "./locale",
    "./overrides",
    "./precompile",
    "./preferences",
    "./snapshot",
    "./contracts/catalog"
  ],
  "examples": [],
  "replacements": []
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/diagnostics",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/direction",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/fallback",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/formatter",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/formatters/intl-messageformat",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/i18next",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/loader",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/locale",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/overrides",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/precompile",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/preferences",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.translation.runtime",
    "from": "@lssm-tech/lib.translation-runtime/contracts/catalog",
    "symbols": [
      "Locale",
      "MessageKey",
      "TranslationEntry",
      "TranslationCatalogMeta",
      "PlatformTranslationCatalog",
      "BlueprintTranslationCatalog"
    ]
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/lib.translation-runtime` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/index.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/catalog` — subpath `./contracts/catalog`
  - `unconditional`: `./src/contracts/catalog.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/catalog.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/i18n-factory` — subpath `./contracts/i18n-factory`
  - `unconditional`: `./src/contracts/i18n-factory.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/i18n-factory.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/i18n-factory-snapshot` — subpath `./contracts/i18n-factory-snapshot`
  - `unconditional`: `./src/contracts/i18n-factory-snapshot.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/i18n-factory-snapshot.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/locale` — subpath `./contracts/locale`
  - `unconditional`: `./src/contracts/locale.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/locale.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/registry` — subpath `./contracts/registry`
  - `unconditional`: `./src/contracts/registry.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/registry.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/diagnostics` — subpath `./diagnostics`
  - `unconditional`: `./src/diagnostics.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/diagnostics.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/direction` — subpath `./direction`
  - `unconditional`: `./src/direction.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/direction.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/fallback` — subpath `./fallback`
  - `unconditional`: `./src/fallback.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/fallback.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/formatter` — subpath `./formatter`
  - `unconditional`: `./src/formatter.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/formatter.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/formatters/intl-messageformat` — subpath `./formatters/intl-messageformat`
  - `unconditional`: `./src/formatters/intl-messageformat.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/formatters/intl-messageformat.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/i18next` — subpath `./i18next`
  - `unconditional`: `./src/i18next.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/i18next.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/loader` — subpath `./loader`
  - `unconditional`: `./src/loader.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/loader.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/locale` — subpath `./locale`
  - `unconditional`: `./src/locale.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/locale.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/overrides` — subpath `./overrides`
  - `unconditional`: `./src/overrides.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/overrides.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/precompile` — subpath `./precompile`
  - `unconditional`: `./src/precompile.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/precompile.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/preferences` — subpath `./preferences`
  - `unconditional`: `./src/preferences.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/preferences.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/snapshot` — subpath `./snapshot`
  - `unconditional`: `./src/snapshot.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/snapshot.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/diagnostics` — subpath `./contracts/diagnostics`
  - `unconditional`: `./src/contracts/diagnostics.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/diagnostics.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/tenant` — subpath `./contracts/tenant`
  - `unconditional`: `./src/contracts/tenant.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/tenant.ts); verified source file.

- `@lssm-tech/lib.translation-runtime/contracts/validation` — subpath `./contracts/validation`
  - `unconditional`: `./src/contracts/validation.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/ui/translation-runtime/src/contracts/validation.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./contracts/catalog": {
      "types": "./dist/contracts/catalog.d.ts",
      "browser": "./dist/browser/contracts/catalog.js",
      "bun": "./dist/contracts/catalog.js",
      "node": "./dist/node/contracts/catalog.js",
      "default": "./dist/contracts/catalog.js"
    },
    "./contracts/i18n-factory": {
      "types": "./dist/contracts/i18n-factory.d.ts",
      "browser": "./dist/browser/contracts/i18n-factory.js",
      "bun": "./dist/contracts/i18n-factory.js",
      "node": "./dist/node/contracts/i18n-factory.js",
      "default": "./dist/contracts/i18n-factory.js"
    },
    "./contracts/i18n-factory-snapshot": {
      "types": "./dist/contracts/i18n-factory-snapshot.d.ts",
      "browser": "./dist/browser/contracts/i18n-factory-snapshot.js",
      "bun": "./dist/contracts/i18n-factory-snapshot.js",
      "node": "./dist/node/contracts/i18n-factory-snapshot.js",
      "default": "./dist/contracts/i18n-factory-snapshot.js"
    },
    "./contracts/locale": {
      "types": "./dist/contracts/locale.d.ts",
      "browser": "./dist/browser/contracts/locale.js",
      "bun": "./dist/contracts/locale.js",
      "node": "./dist/node/contracts/locale.js",
      "default": "./dist/contracts/locale.js"
    },
    "./contracts/registry": {
      "types": "./dist/contracts/registry.d.ts",
      "browser": "./dist/browser/contracts/registry.js",
      "bun": "./dist/contracts/registry.js",
      "node": "./dist/node/contracts/registry.js",
      "default": "./dist/contracts/registry.js"
    },
    "./diagnostics": {
      "types": "./dist/diagnostics.d.ts",
      "browser": "./dist/browser/diagnostics.js",
      "bun": "./dist/diagnostics.js",
      "node": "./dist/node/diagnostics.js",
      "default": "./dist/diagnostics.js"
    },
    "./direction": {
      "types": "./dist/direction.d.ts",
      "browser": "./dist/browser/direction.js",
      "bun": "./dist/direction.js",
      "node": "./dist/node/direction.js",
      "default": "./dist/direction.js"
    },
    "./fallback": {
      "types": "./dist/fallback.d.ts",
      "browser": "./dist/browser/fallback.js",
      "bun": "./dist/fallback.js",
      "node": "./dist/node/fallback.js",
      "default": "./dist/fallback.js"
    },
    "./formatter": {
      "types": "./dist/formatter.d.ts",
      "browser": "./dist/browser/formatter.js",
      "bun": "./dist/formatter.js",
      "node": "./dist/node/formatter.js",
      "default": "./dist/formatter.js"
    },
    "./formatters/intl-messageformat": {
      "types": "./dist/formatters/intl-messageformat.d.ts",
      "browser": "./dist/browser/formatters/intl-messageformat.js",
      "bun": "./dist/formatters/intl-messageformat.js",
      "node": "./dist/node/formatters/intl-messageformat.js",
      "default": "./dist/formatters/intl-messageformat.js"
    },
    "./i18next": {
      "types": "./dist/i18next.d.ts",
      "browser": "./dist/browser/i18next.js",
      "bun": "./dist/i18next.js",
      "node": "./dist/node/i18next.js",
      "default": "./dist/i18next.js"
    },
    "./loader": {
      "types": "./dist/loader.d.ts",
      "browser": "./dist/browser/loader.js",
      "bun": "./dist/loader.js",
      "node": "./dist/node/loader.js",
      "default": "./dist/loader.js"
    },
    "./locale": {
      "types": "./dist/locale.d.ts",
      "browser": "./dist/browser/locale.js",
      "bun": "./dist/locale.js",
      "node": "./dist/node/locale.js",
      "default": "./dist/locale.js"
    },
    "./overrides": {
      "types": "./dist/overrides.d.ts",
      "browser": "./dist/browser/overrides.js",
      "bun": "./dist/overrides.js",
      "node": "./dist/node/overrides.js",
      "default": "./dist/overrides.js"
    },
    "./precompile": {
      "types": "./dist/precompile.d.ts",
      "browser": "./dist/browser/precompile.js",
      "bun": "./dist/precompile.js",
      "node": "./dist/node/precompile.js",
      "default": "./dist/precompile.js"
    },
    "./preferences": {
      "types": "./dist/preferences.d.ts",
      "browser": "./dist/browser/preferences.js",
      "bun": "./dist/preferences.js",
      "node": "./dist/node/preferences.js",
      "default": "./dist/preferences.js"
    },
    "./snapshot": {
      "types": "./dist/snapshot.d.ts",
      "browser": "./dist/browser/snapshot.js",
      "bun": "./dist/snapshot.js",
      "node": "./dist/node/snapshot.js",
      "default": "./dist/snapshot.js"
    },
    "./contracts/diagnostics": {
      "types": "./dist/contracts/diagnostics.d.ts",
      "browser": "./dist/browser/contracts/diagnostics.js",
      "bun": "./dist/contracts/diagnostics.js",
      "node": "./dist/node/contracts/diagnostics.js",
      "default": "./dist/contracts/diagnostics.js"
    },
    "./contracts/tenant": {
      "types": "./dist/contracts/tenant.d.ts",
      "browser": "./dist/browser/contracts/tenant.js",
      "bun": "./dist/contracts/tenant.js",
      "node": "./dist/node/contracts/tenant.js",
      "default": "./dist/contracts/tenant.js"
    },
    "./contracts/validation": {
      "types": "./dist/contracts/validation.d.ts",
      "browser": "./dist/browser/contracts/validation.js",
      "bun": "./dist/contracts/validation.js",
      "node": "./dist/node/contracts/validation.js",
      "default": "./dist/contracts/validation.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- `@formatjs/icu-messageformat-parser`: `catalog:i18n`
- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- `intl-messageformat`: `catalog:i18n`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `i18next`: `catalog:i18n`
- `typescript`: `catalog:`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
  "publish:pkg:canary": "bun publish:pkg --tag canary",
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "clean": "rm -rf dist",
  "dev": "contractspec-bun-build dev",
  "lint": "bun run lint:fix",
  "lint:fix": "node ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "prebuild": "contractspec-bun-build prebuild",
  "test": "bun test",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Lib Translation Runtime documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.translation-runtime) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Flib.translation-runtime",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/lib.translation-runtime.txt",
  "route": "/llms/lib.translation-runtime",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.translation-runtime.txt",
  "blobSha": "8603faf40fad6b40d0092b3755b7e8c31f4007a5",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
