# @lssm-tech/lib.data-exchange-core

SchemaModel-first core primitives for data import/export and mapping

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `2.0.4`
- Package path: `packages/platform/delivery/data-exchange-core`
- Manifest path: `packages/platform/delivery/data-exchange-core/package.json`
- Manifest Git blob: `853fb23a8a9cfb78c0a1c5d4947857f3fb9dd95f`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.data-exchange-core](https://lssm.co/docs/packages/lib.data-exchange-core/)
- 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/delivery/data-exchange-core)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.data-exchange-core.txt)

## Package metadata

```json
{
  "layer": "platform",
  "physicalArea": "delivery",
  "primaryArea": "forms-and-data",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "sharedLibs",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

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

Primary area: [Forms, data views and data exchange](https://lssm.co/docs/areas/forms-and-data/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/platform/delivery/data-exchange-core/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/README.md",
  "blobSha": "c5c6d0356f95a6ab9d175259eeb9c0aebca05e56",
  "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.data-exchange-core

Website: https://contractspec.io

**SchemaModel-first core primitives for data import, export, mapping, preview, and reconciliation planning.**

## What It Provides

- Headless CSV, JSON, and XML codecs.
- Normalized `RecordBatch` contracts for runtime data interchange.
- `SchemaModel` mapping inference, coercion, and validation helpers.
- Import/export planning and preview diff APIs.
- Provider-neutral governed projection contracts for cross-product sharing,
  consent and lawful-basis grants, residency, retention, revocation, and privacy
status.

Delivery contracts add leased `pending → processing → retry_scheduled` recovery
with explicit `applied` or `dead_letter` terminals. Rights jobs follow the same
bounded-attempt discipline. Operator projections expose application, state,
attempt, redacted error, and evidence references only—never pairwise subjects or
shared values.

Product recovery dispatches are a narrower contract than the central queue
record. They carry only the receiving consumer or processor's pairwise subject,
exact grant/projection event or rights operation, product binding, and
idempotency identifier. Scheduler leases,
attempt counters, payloads, credentials, and source values are rejected.
Revocation and rights dispatches name the receiver-specific pairwise subject.
They never reuse another relying party's subject or expose the canonical
identity.

## Installation

`npm install @lssm-tech/lib.data-exchange-core`

or

`bun add @lssm-tech/lib.data-exchange-core`

## Usage

Import the root entrypoint from `@lssm-tech/lib.data-exchange-core`, or use subpaths such as `./codecs`, `./governed`, `./mapping`, `./plans`, `./preview`, `./records`, `./schema`, and `./types`.

SQL sources and targets may include optional portable database metadata (`database.resource`, `fieldMapping`, `policyRefs`, and provenance). The core package remains runtime-agnostic; server adapters and provider integrations decide how to execute PostgreSQL, SQLite, or MySQL work.

## Import Templates

Developers can define the recommended import shape once, then let users upload files with different column labels or value formats:

```ts
import {
	createImportPlan,
	createRecordBatch,
	defineDataExchangeTemplate,
	previewImport,
} from "@lssm-tech/lib.data-exchange-core";

const template = defineDataExchangeTemplate({
	key: "accounts.import",
	version: "1.0.0",
	columns: [
		{
			key: "id",
			label: "Account ID",
			targetField: "id",
			required: true,
			sourceAliases: ["Account Identifier", "External ID"],
		},
		{
			key: "amount",
			label: "Amount",
			targetField: "amount",
			format: {
				kind: "number",
				decimalSeparator: ",",
				thousandsSeparator: ".",
			},
		},
	],
});

const sourceBatch = createRecordBatch([
	{ "Account Identifier": "acc-1", Amount: "1.234,50" },
]);

const preview = previewImport(
	createImportPlan({
		source: { kind: "memory", batch: sourceBatch, format: "csv" },
		target: { kind: "memory", format: "json" },
		schema: AccountImportSchema,
		sourceBatch,
		template,
	})
);
```


Template resolution uses exact headers, aliases, normalized labels, and SchemaModel fallback inference. Explicit `mappings` still override template mappings.
`defineImportTemplate` remains available as a backwards-compatible import-specific alias.

## Governed ecosystem projections

`@lssm-tech/lib.data-exchange-core/governed` defines the portable contract for
sharing a minimized projection between LSSM products. A catalog entry declares
the source, schema, exact field paths, provenance, classification, and storage
region. A separate grant binds one subject and optional tenant to one audience,
purpose, lawful basis, field allowlist, expiry, retention horizon, region set,
revision, and revocation watermark.

The access request and decision schemas are deliberately payload-free. They
reject identity secrets and require denied decisions to disclose no field
paths. Revocation events and consumer acknowledgements support deterministic
reconciliation, while the privacy projection exposes who receives which fields
and why without exposing the shared values.

A source product may publish an immutable sharing offer with an exact grantee,
field subset, purpose code, legal-basis reference, EN/FR/ES consent copy,
residency, expiry, and retention limit. User issuance accepts only the published
offer id and locale; the resulting grant binds the projection schema version
and preserves the exact localized consent text, version, and timestamp.

`@lssm-tech/lib.data-exchange-core/governed/privacy-commands` holds the pure
privacy-rights transitions hosts compose: `resolvePrivacyRightsProcessor`
routes export to the catalog source and erasure to the materialized consumer,
`createPrivacyRevocation` derives the next revision/watermark revocation event
and its payload-free pending delivery to the grant consumer, and
`resetFailedRightsJob` requeues a failed rights job without stale terminal
evidence. Event and delivery ids come from an injected deterministic `opaqueId`
function so the package stays free of `node:crypto`.

This is not a shared raw database. Products keep their own persistence and
local authorization; only a purpose-bound projection crosses the product
boundary.

Receiving products persist a governed copy only through
`GovernedProductMaterialization`: an exact pairwise subject, application,
grant, projection/schema version, purpose, lawful-basis evidence, field
allowlist, receiver region, grant expiry, retention horizon, revocation
watermark, receiver key reference, and encrypted envelope. A separate
payload-free authorization must match every one of those facts and the
encryption algorithm exactly. The schema rejects plaintext, source subjects,
canonical identity, credentials, leases, and payload fields. Product recovery
and materialization receipts return evidence only; they never return the
subject or shared values to the central identity authority.


## Declared capabilities

### Lib Data Exchange Core

Capability ID: `package.lssm.tech.lib.data.exchange.core`

SchemaModel-first core primitives for data import/export and mapping

Use cases:

- Adopt schemamodel-first core primitives for data import/export and mapping

Constraints:

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

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "contractspec",
    "data",
    "import",
    "export",
    "mapping",
    "typescript",
    "lib",
    "exchange",
    "core"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.data-exchange-core",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/codecs",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/codecs/csv",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/codecs/json",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/codecs/xml",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/data-exchange-core.feature",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/governed",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/mapping",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/mapping/format",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/mapping/format-parsers",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/mapping/infer",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.data-exchange-core/mapping/rules",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "sharedLibs",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./codecs",
    "./codecs/csv",
    "./codecs/json",
    "./codecs/xml",
    "./data-exchange-core.feature",
    "./governed",
    "./mapping",
    "./mapping/format",
    "./mapping/format-parsers",
    "./mapping/infer",
    "./mapping/rules",
    "./mapping/template",
    "./mapping/template-builders",
    "./mapping/template-define",
    "./mapping/template-format",
    "./mapping/template-matchers",
    "./mapping/template-results",
    "./plans",
    "./plans/export-plan",
    "./plans/import-plan",
    "./plans/shared",
    "./preview",
    "./preview/diff",
    "./preview/preview",
    "./records",
    "./records/batch",
    "./records/flatten",
    "./records/path",
    "./schema",
    "./schema/coerce",
    "./schema/describe",
    "./types"
  ],
  "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.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/codecs",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/codecs/csv",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/codecs/json",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/codecs/xml",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/data-exchange-core.feature",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/governed",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/mapping",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/mapping/format",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/mapping/format-parsers",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/mapping/infer",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.data.exchange.core",
    "from": "@lssm-tech/lib.data-exchange-core/mapping/rules",
    "symbols": []
  }
]
```

## 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.data-exchange-core` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/index.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/codecs/csv` — subpath `./codecs/csv`
  - `unconditional`: `./src/codecs/csv.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/codecs/csv.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/codecs/json` — subpath `./codecs/json`
  - `unconditional`: `./src/codecs/json.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/codecs/json.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/codecs/xml` — subpath `./codecs/xml`
  - `unconditional`: `./src/codecs/xml.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/codecs/xml.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/data-exchange-core.feature` — subpath `./data-exchange-core.feature`
  - `unconditional`: `./src/data-exchange-core.feature.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/data-exchange-core.feature.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/governed/access` — subpath `./governed/access`
  - `unconditional`: `./src/governed/access.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/access.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/catalog` — subpath `./governed/catalog`
  - `unconditional`: `./src/governed/catalog.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/catalog.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/delivery` — subpath `./governed/delivery`
  - `unconditional`: `./src/governed/delivery.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/delivery.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/grant` — subpath `./governed/grant`
  - `unconditional`: `./src/governed/grant.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/grant.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/privacy` — subpath `./governed/privacy`
  - `unconditional`: `./src/governed/privacy.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/privacy.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/privacy-commands` — subpath `./governed/privacy-commands`
  - `unconditional`: `./src/governed/privacy-commands.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/privacy-commands.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/product-materialization` — subpath `./governed/product-materialization`
  - `unconditional`: `./src/governed/product-materialization.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/product-materialization.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/product-materialization-authorization` — subpath `./governed/product-materialization-authorization`
  - `unconditional`: `./src/governed/product-materialization-authorization.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/product-materialization-authorization.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/recovery` — subpath `./governed/recovery`
  - `unconditional`: `./src/governed/recovery.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/recovery.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/revocation` — subpath `./governed/revocation`
  - `unconditional`: `./src/governed/revocation.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/revocation.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/governed/shared` — subpath `./governed/shared`
  - `unconditional`: `./src/governed/shared.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/governed/shared.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/mapping/format` — subpath `./mapping/format`
  - `unconditional`: `./src/mapping/format.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/format.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/format-parsers` — subpath `./mapping/format-parsers`
  - `unconditional`: `./src/mapping/format-parsers.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/format-parsers.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/infer` — subpath `./mapping/infer`
  - `unconditional`: `./src/mapping/infer.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/infer.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/rules` — subpath `./mapping/rules`
  - `unconditional`: `./src/mapping/rules.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/rules.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/template` — subpath `./mapping/template`
  - `unconditional`: `./src/mapping/template.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/template.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/template-builders` — subpath `./mapping/template-builders`
  - `unconditional`: `./src/mapping/template-builders.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/template-builders.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/template-define` — subpath `./mapping/template-define`
  - `unconditional`: `./src/mapping/template-define.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/template-define.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/template-format` — subpath `./mapping/template-format`
  - `unconditional`: `./src/mapping/template-format.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/template-format.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/template-matchers` — subpath `./mapping/template-matchers`
  - `unconditional`: `./src/mapping/template-matchers.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/template-matchers.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/mapping/template-results` — subpath `./mapping/template-results`
  - `unconditional`: `./src/mapping/template-results.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/mapping/template-results.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/plans/export-plan` — subpath `./plans/export-plan`
  - `unconditional`: `./src/plans/export-plan.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/plans/export-plan.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/plans/import-plan` — subpath `./plans/import-plan`
  - `unconditional`: `./src/plans/import-plan.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/plans/import-plan.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/plans/shared` — subpath `./plans/shared`
  - `unconditional`: `./src/plans/shared.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/plans/shared.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/preview/diff` — subpath `./preview/diff`
  - `unconditional`: `./src/preview/diff.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/preview/diff.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/preview/preview` — subpath `./preview/preview`
  - `unconditional`: `./src/preview/preview.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/preview/preview.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/records/batch` — subpath `./records/batch`
  - `unconditional`: `./src/records/batch.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/records/batch.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/records/flatten` — subpath `./records/flatten`
  - `unconditional`: `./src/records/flatten.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/records/flatten.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/records/path` — subpath `./records/path`
  - `unconditional`: `./src/records/path.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/records/path.ts); verified source file.

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

- `@lssm-tech/lib.data-exchange-core/schema/coerce` — subpath `./schema/coerce`
  - `unconditional`: `./src/schema/coerce.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/schema/coerce.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/schema/describe` — subpath `./schema/describe`
  - `unconditional`: `./src/schema/describe.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/schema/describe.ts); verified source file.

- `@lssm-tech/lib.data-exchange-core/types` — subpath `./types`
  - `unconditional`: `./src/types.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/data-exchange-core/src/types.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"
    },
    "./codecs": {
      "types": "./dist/codecs/index.d.ts",
      "browser": "./dist/browser/codecs/index.js",
      "bun": "./dist/codecs/index.js",
      "node": "./dist/node/codecs/index.js",
      "default": "./dist/codecs/index.js"
    },
    "./codecs/csv": {
      "types": "./dist/codecs/csv.d.ts",
      "browser": "./dist/browser/codecs/csv.js",
      "bun": "./dist/codecs/csv.js",
      "node": "./dist/node/codecs/csv.js",
      "default": "./dist/codecs/csv.js"
    },
    "./codecs/json": {
      "types": "./dist/codecs/json.d.ts",
      "browser": "./dist/browser/codecs/json.js",
      "bun": "./dist/codecs/json.js",
      "node": "./dist/node/codecs/json.js",
      "default": "./dist/codecs/json.js"
    },
    "./codecs/xml": {
      "types": "./dist/codecs/xml.d.ts",
      "browser": "./dist/browser/codecs/xml.js",
      "bun": "./dist/codecs/xml.js",
      "node": "./dist/node/codecs/xml.js",
      "default": "./dist/codecs/xml.js"
    },
    "./data-exchange-core.feature": {
      "types": "./dist/data-exchange-core.feature.d.ts",
      "browser": "./dist/browser/data-exchange-core.feature.js",
      "bun": "./dist/data-exchange-core.feature.js",
      "node": "./dist/node/data-exchange-core.feature.js",
      "default": "./dist/data-exchange-core.feature.js"
    },
    "./governed": {
      "types": "./dist/governed/index.d.ts",
      "browser": "./dist/browser/governed/index.js",
      "bun": "./dist/governed/index.js",
      "node": "./dist/node/governed/index.js",
      "default": "./dist/governed/index.js"
    },
    "./governed/access": {
      "types": "./dist/governed/access.d.ts",
      "browser": "./dist/browser/governed/access.js",
      "bun": "./dist/governed/access.js",
      "node": "./dist/node/governed/access.js",
      "default": "./dist/governed/access.js"
    },
    "./governed/catalog": {
      "types": "./dist/governed/catalog.d.ts",
      "browser": "./dist/browser/governed/catalog.js",
      "bun": "./dist/governed/catalog.js",
      "node": "./dist/node/governed/catalog.js",
      "default": "./dist/governed/catalog.js"
    },
    "./governed/delivery": {
      "types": "./dist/governed/delivery.d.ts",
      "browser": "./dist/browser/governed/delivery.js",
      "bun": "./dist/governed/delivery.js",
      "node": "./dist/node/governed/delivery.js",
      "default": "./dist/governed/delivery.js"
    },
    "./governed/grant": {
      "types": "./dist/governed/grant.d.ts",
      "browser": "./dist/browser/governed/grant.js",
      "bun": "./dist/governed/grant.js",
      "node": "./dist/node/governed/grant.js",
      "default": "./dist/governed/grant.js"
    },
    "./governed/privacy": {
      "types": "./dist/governed/privacy.d.ts",
      "browser": "./dist/browser/governed/privacy.js",
      "bun": "./dist/governed/privacy.js",
      "node": "./dist/node/governed/privacy.js",
      "default": "./dist/governed/privacy.js"
    },
    "./governed/privacy-commands": {
      "types": "./dist/governed/privacy-commands.d.ts",
      "browser": "./dist/browser/governed/privacy-commands.js",
      "bun": "./dist/governed/privacy-commands.js",
      "node": "./dist/node/governed/privacy-commands.js",
      "default": "./dist/governed/privacy-commands.js"
    },
    "./governed/product-materialization": {
      "types": "./dist/governed/product-materialization.d.ts",
      "browser": "./dist/browser/governed/product-materialization.js",
      "bun": "./dist/governed/product-materialization.js",
      "node": "./dist/node/governed/product-materialization.js",
      "default": "./dist/governed/product-materialization.js"
    },
    "./governed/product-materialization-authorization": {
      "types": "./dist/governed/product-materialization-authorization.d.ts",
      "browser": "./dist/browser/governed/product-materialization-authorization.js",
      "bun": "./dist/governed/product-materialization-authorization.js",
      "node": "./dist/node/governed/product-materialization-authorization.js",
      "default": "./dist/governed/product-materialization-authorization.js"
    },
    "./governed/recovery": {
      "types": "./dist/governed/recovery.d.ts",
      "browser": "./dist/browser/governed/recovery.js",
      "bun": "./dist/governed/recovery.js",
      "node": "./dist/node/governed/recovery.js",
      "default": "./dist/governed/recovery.js"
    },
    "./governed/revocation": {
      "types": "./dist/governed/revocation.d.ts",
      "browser": "./dist/browser/governed/revocation.js",
      "bun": "./dist/governed/revocation.js",
      "node": "./dist/node/governed/revocation.js",
      "default": "./dist/governed/revocation.js"
    },
    "./governed/shared": {
      "types": "./dist/governed/shared.d.ts",
      "browser": "./dist/browser/governed/shared.js",
      "bun": "./dist/governed/shared.js",
      "node": "./dist/node/governed/shared.js",
      "default": "./dist/governed/shared.js"
    },
    "./mapping": {
      "types": "./dist/mapping/index.d.ts",
      "browser": "./dist/browser/mapping/index.js",
      "bun": "./dist/mapping/index.js",
      "node": "./dist/node/mapping/index.js",
      "default": "./dist/mapping/index.js"
    },
    "./mapping/format": {
      "types": "./dist/mapping/format.d.ts",
      "browser": "./dist/browser/mapping/format.js",
      "bun": "./dist/mapping/format.js",
      "node": "./dist/node/mapping/format.js",
      "default": "./dist/mapping/format.js"
    },
    "./mapping/format-parsers": {
      "types": "./dist/mapping/format-parsers.d.ts",
      "browser": "./dist/browser/mapping/format-parsers.js",
      "bun": "./dist/mapping/format-parsers.js",
      "node": "./dist/node/mapping/format-parsers.js",
      "default": "./dist/mapping/format-parsers.js"
    },
    "./mapping/infer": {
      "types": "./dist/mapping/infer.d.ts",
      "browser": "./dist/browser/mapping/infer.js",
      "bun": "./dist/mapping/infer.js",
      "node": "./dist/node/mapping/infer.js",
      "default": "./dist/mapping/infer.js"
    },
    "./mapping/rules": {
      "types": "./dist/mapping/rules.d.ts",
      "browser": "./dist/browser/mapping/rules.js",
      "bun": "./dist/mapping/rules.js",
      "node": "./dist/node/mapping/rules.js",
      "default": "./dist/mapping/rules.js"
    },
    "./mapping/template": {
      "types": "./dist/mapping/template.d.ts",
      "browser": "./dist/browser/mapping/template.js",
      "bun": "./dist/mapping/template.js",
      "node": "./dist/node/mapping/template.js",
      "default": "./dist/mapping/template.js"
    },
    "./mapping/template-builders": {
      "types": "./dist/mapping/template-builders.d.ts",
      "browser": "./dist/browser/mapping/template-builders.js",
      "bun": "./dist/mapping/template-builders.js",
      "node": "./dist/node/mapping/template-builders.js",
      "default": "./dist/mapping/template-builders.js"
    },
    "./mapping/template-define": {
      "types": "./dist/mapping/template-define.d.ts",
      "browser": "./dist/browser/mapping/template-define.js",
      "bun": "./dist/mapping/template-define.js",
      "node": "./dist/node/mapping/template-define.js",
      "default": "./dist/mapping/template-define.js"
    },
    "./mapping/template-format": {
      "types": "./dist/mapping/template-format.d.ts",
      "browser": "./dist/browser/mapping/template-format.js",
      "bun": "./dist/mapping/template-format.js",
      "node": "./dist/node/mapping/template-format.js",
      "default": "./dist/mapping/template-format.js"
    },
    "./mapping/template-matchers": {
      "types": "./dist/mapping/template-matchers.d.ts",
      "browser": "./dist/browser/mapping/template-matchers.js",
      "bun": "./dist/mapping/template-matchers.js",
      "node": "./dist/node/mapping/template-matchers.js",
      "default": "./dist/mapping/template-matchers.js"
    },
    "./mapping/template-results": {
      "types": "./dist/mapping/template-results.d.ts",
      "browser": "./dist/browser/mapping/template-results.js",
      "bun": "./dist/mapping/template-results.js",
      "node": "./dist/node/mapping/template-results.js",
      "default": "./dist/mapping/template-results.js"
    },
    "./plans": {
      "types": "./dist/plans/index.d.ts",
      "browser": "./dist/browser/plans/index.js",
      "bun": "./dist/plans/index.js",
      "node": "./dist/node/plans/index.js",
      "default": "./dist/plans/index.js"
    },
    "./plans/export-plan": {
      "types": "./dist/plans/export-plan.d.ts",
      "browser": "./dist/browser/plans/export-plan.js",
      "bun": "./dist/plans/export-plan.js",
      "node": "./dist/node/plans/export-plan.js",
      "default": "./dist/plans/export-plan.js"
    },
    "./plans/import-plan": {
      "types": "./dist/plans/import-plan.d.ts",
      "browser": "./dist/browser/plans/import-plan.js",
      "bun": "./dist/plans/import-plan.js",
      "node": "./dist/node/plans/import-plan.js",
      "default": "./dist/plans/import-plan.js"
    },
    "./plans/shared": {
      "types": "./dist/plans/shared.d.ts",
      "browser": "./dist/browser/plans/shared.js",
      "bun": "./dist/plans/shared.js",
      "node": "./dist/node/plans/shared.js",
      "default": "./dist/plans/shared.js"
    },
    "./preview": {
      "types": "./dist/preview/index.d.ts",
      "browser": "./dist/browser/preview/index.js",
      "bun": "./dist/preview/index.js",
      "node": "./dist/node/preview/index.js",
      "default": "./dist/preview/index.js"
    },
    "./preview/diff": {
      "types": "./dist/preview/diff.d.ts",
      "browser": "./dist/browser/preview/diff.js",
      "bun": "./dist/preview/diff.js",
      "node": "./dist/node/preview/diff.js",
      "default": "./dist/preview/diff.js"
    },
    "./preview/preview": {
      "types": "./dist/preview/preview.d.ts",
      "browser": "./dist/browser/preview/preview.js",
      "bun": "./dist/preview/preview.js",
      "node": "./dist/node/preview/preview.js",
      "default": "./dist/preview/preview.js"
    },
    "./records": {
      "types": "./dist/records/index.d.ts",
      "browser": "./dist/browser/records/index.js",
      "bun": "./dist/records/index.js",
      "node": "./dist/node/records/index.js",
      "default": "./dist/records/index.js"
    },
    "./records/batch": {
      "types": "./dist/records/batch.d.ts",
      "browser": "./dist/browser/records/batch.js",
      "bun": "./dist/records/batch.js",
      "node": "./dist/node/records/batch.js",
      "default": "./dist/records/batch.js"
    },
    "./records/flatten": {
      "types": "./dist/records/flatten.d.ts",
      "browser": "./dist/browser/records/flatten.js",
      "bun": "./dist/records/flatten.js",
      "node": "./dist/node/records/flatten.js",
      "default": "./dist/records/flatten.js"
    },
    "./records/path": {
      "types": "./dist/records/path.d.ts",
      "browser": "./dist/browser/records/path.js",
      "bun": "./dist/records/path.js",
      "node": "./dist/node/records/path.js",
      "default": "./dist/records/path.js"
    },
    "./schema": {
      "types": "./dist/schema/index.d.ts",
      "browser": "./dist/browser/schema/index.js",
      "bun": "./dist/schema/index.js",
      "node": "./dist/node/schema/index.js",
      "default": "./dist/schema/index.js"
    },
    "./schema/coerce": {
      "types": "./dist/schema/coerce.d.ts",
      "browser": "./dist/browser/schema/coerce.js",
      "bun": "./dist/schema/coerce.js",
      "node": "./dist/node/schema/coerce.js",
      "default": "./dist/schema/coerce.js"
    },
    "./schema/describe": {
      "types": "./dist/schema/describe.d.ts",
      "browser": "./dist/browser/schema/describe.js",
      "bun": "./dist/schema/describe.js",
      "node": "./dist/node/schema/describe.js",
      "default": "./dist/schema/describe.js"
    },
    "./types": {
      "types": "./dist/types.d.ts",
      "browser": "./dist/browser/types.js",
      "bun": "./dist/types.js",
      "node": "./dist/node/types.js",
      "default": "./dist/types.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- [@lssm-tech/lib.schema](https://lssm.co/docs/packages/lib.schema/): `workspace:^`
- `zod`: `catalog:`

### 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:*`
- `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",
  "dev": "contractspec-bun-build dev",
  "clean": "rimraf dist .turbo",
  "lint": "bun 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",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Lib Data Exchange Core documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.data-exchange-core) — declared link; destination not verified.

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

## Existing agent-guide projection

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