# Upgrading to 1.3.0

This page lists what changed since the previous release; see the [upgrade procedure](README.md).

## @openlup/core

### Compatibility exception

This minor release tightens native payment settlement outside the SemVer promise.

- (a) Contract: success results of custom payment reconciliation readbacks, native renewal bindings and native webhook adapters. Action: return the provider-collected amount and currency (`amountMinor` and `currency` in readbacks, `observedMoney` in renewals) with `capturedAmountBasis: "provider_capture_v1"`; on webhook evidence, keep the basis outside the event fingerprint.
  Behaviour is specified by “records the exact amount and provenance of a %s readback before settling” and “makes replay fingerprints independent of receipt time and never invents provider occurrence time”.
- (b) Contract: amount selection in `@openlup/platform/payments/stripe` and `@openlup/platform/payments/tpay`. Action: before settling, retrying or invoicing, review readbacks flagged `provider_amount_mismatch` and webhooks answered with HTTP 409 and reason `provider_amount_mismatch`.
  Behaviour is specified by “keeps a provider success with zero collected money out of capture readback”, “records a provider success with conflicting %s without settling native payment”, “records and refuses a signed success with conflicting collected amount %s on each delivery” and “acknowledges a completed legacy receipt for $object”.
- (c) Contract: replay of completed 1.2.0 native reconciliations. Action: replay with the original key and evidence.
  Behaviour is specified by “records the exact amount and provenance of a %s readback before settling”.
- (d) Contract: native late captures on a cancelled intent or a cancelled or expired order. Action: find them with `captureReviewRequired` or `readCaptureReview`, and resolve the transaction with the provider before charging again.
  Behaviour is specified by “retains a %s order's late %s capture without paying it”.

If your legacy cart reminder job runs under its own database role, run this
grant as the database owner once after applying the reminder episode pin
migration. Replace `cart_runtime` with the role that runs the job.

```sql
GRANT EXECUTE ON FUNCTION public.commerce_enqueue_abandoned_cart_reminder_episodes(integer) TO cart_runtime;
```

The job reports `checkout_recovery_cart_runtime_grant_required` and supplies
the command for its role if the grant is missing. The built-in runtime role
already has the grant.

Apply the checkout recovery reminder guard and episode pin migrations before
using the target installer. Pinned episodes keep their timing and are exempt
from the schedule-change guard. An older pending checkout order with a wave
and no pin blocks a change regardless of age with
`checkout_recovery_schedule_change_blocked_open_episodes`.
The same refusal applies to an unpinned pending abandoned cart with a wave, a
valid draft receipt and no settlement intent. Keep the current schedule until
the blocking orders close or their carts stop qualifying.

Changed installs and reminder producers at `REPEATABLE READ` or `SERIALIZABLE`
refuse with `checkout_recovery_schedule_isolation_unsupported`. With an installed
schedule, a compacted checkout wave consumes both stages and the later stage
is skipped. With no schedule installed, historical hours identify its stage.

### Fixed

- Rank installed reader-guide recipes and upgrade narrative sections above generated `### \`packages/*/api/*.api.md\`` diff blocks in `openlup-context search`, cap repeated API-report diff matches to one per upgrade file unless `.api.md` is queried explicitly, match `PascalCase` and `UPPER_SNAKE_CASE` declaration symbols in multi-word queries, and raise the per-package declaration and source scan limit from 1,200 to 2,000 files.

Migration: This search-ranking change does not alter result shapes, CLI flags, package runtime or SQL. The declaration and source scans report `scans[].fileLimit` of `2000`.

- Improve `openlup-context search` to resolve exact exported symbols directly to their declared public package subpath via installed `package.json#exports` declaration entrypoints while keeping non-entrypoint declaration occurrences clearly marked unverified.
- Scope `@openlup/core` `.api.md` declaration snapshots to each subpath's own directory and explicit re-exports without changing any exported runtime or type symbol.

Migration: No application changes required. Snapshot scoping does not alter public exports. It removes cross-subpath duplicates from generated `.api.md` snapshots.

- Add machine-readable `FULFILLMENT_STATUS_EFFECTS` and `FulfillmentStatusEffect` to `@openlup/core/fulfillment` alongside the unchanged `FULFILLMENT_STATUS_MAP`, exposing domain stock, handover, notification, tracking, and off-track flags without UI prose or locale keys.

- Improve `openlup-context` search ergonomics and determinism:
  - Traverse declaration, application, and package-source directories in deterministic lexicographic order so bounded scans produce identical results across filesystems.
  - Add configurable result limits (`1..50`, default `8`) via `--limit <n>` / `--limit=<n>` on the CLI, `limit` on the MCP `search_openlup_context` tool, and an optional `SearchContextOptions` argument on `searchContext(...)`.

### Discover and check the starter's owned settings

Reconcile `owned/settings-host.ts` during the [starter upgrade](README.md#starter-upgrade-order).

- If the path is absent, include the exact file from the target extraction
  once, as a target-only creation.
- If the file exists, preserve it and reconcile only the applicable
  declarations below, keeping your values, file locations and local bindings.
- If the path becomes occupied during preflight, keep the owned file and
  remove the proposed creation before replanning. Use the final pair for
  apply, resume and replay.

Ensure the reconciled application manifest declares `"zod": "4.6.6"` in
dependencies before refreshing the lockfile and installation. When reconciling
an existing binding, add the Zod import after the `pg` type import, extend the
settings type import, annotate `entries`, and reconcile the filter as follows:

```diff
 import type { Pool } from 'pg';
+import { z } from 'zod';
-import type { SettingsAppBindings } from '@openlup/platform/operations/server';
+import type { SettingsAppBindings, SettingsFileEntry } from '@openlup/platform/operations/server';
-  const entries = {
+  const entries: Record<string, SettingsFileEntry> = {
-      entries: Object.fromEntries(Object.entries(entries).filter(([, entry]) => entry.value !== undefined)),
+      entries: Object.fromEntries(Object.entries(entries).filter(([, entry]) => entry.descriptor !== undefined || entry.value !== undefined)),
```

Reconcile the six `descriptor` members in your existing `file.entries` using
the target starter's native Zod schemas for
`offer.freeShippingFromMinor`, `offer.subscriptionDiscountBps`,
`purchase.reservationMinutes`, `subscriptionCreation.editWindowHours`,
`subscriptionOffers.deliveryCycles` and `subscriptions.lifecycleNoticeRetryBudget`.
Keep your value expressions, file locations and app-specific entries.
The filter keeps declarations with missing values and omits undefined
value-only reports.
If your binding has no `file` member yet, reconcile it with the target's
`file: { configuration, entries, validate }` section. Use your selected
configuration and existing startup assertion. Keep the installed policy
entries value-only and preserve your connected readers and stock source.

After refreshing dependencies, pass these arguments to the settings script
in `AGENTS.md` from the app root:

- `list --goal "free shipping"`
- `show offer.freeShippingFromMinor --json`
- `check --json`

Confirm that the list includes the key, show reports the expected file value and
check includes the six declarations. For a value reported without a descriptor,
reconcile the matching descriptor as above and rerun. These reads require no
database connection.

### Discover and preview settings with the package command

- Use the settings script from the extracted application root as shown in its `AGENTS.md`.
  The settings script calls the installed experimental `openlup settings`
  command. `show` and `explain` work offline. To preview, pass the proposal with
  `--value <json>` or `--value -` for stdin.
- Follow the [starter upgrade order](README.md#starter-upgrade-order) for the
  managed `package.json` and `ownership.json`. If you customized the inventory,
  [reconcile it during file preflight](README.md#reconcile-a-customized-ownership-inventory).
  Follow the [settings binding reconciliation](#discover-and-check-the-starters-owned-settings)
  above. Append the **Change a business setting**
  section from the target's `AGENTS.md` to the application's guide when absent.
- After refreshing dependencies and completing the applicable SQL and policy
  steps, use the settings script with
  `show checkout_recovery_reminders --database-url <read-capable-url> --json`
  against the intended store to verify the command and the owned binding: this
  key is read through the reader that `owned/settings-host.ts` supplies. A
  missing or unloadable binding module returns `commerce_setting_read_unavailable`
  with exit 74. A module that loads without that reader returns the same code
  with exit 1 and the hint that no connected reader exists for this key. Stock or
  reminder policy installation remains a separate deployment step.

### Use the installed renewal horizon in the starter editor

Take the target extraction's `host/editor-ports.ts` through the managed upgrade
plan and apply. If local edits cause a conflict, move them to an application-owned
file outside both snapshots and restore the exact predecessor bytes in
`host/editor-ports.ts`. Replan and apply with the same snapshots. Keep the app
stopped until the managed snapshot and installed OpenLup versions match.

The running editor reads the installed horizon on its next stock read. This
upgrade needs no separate policy write or runtime privilege.

### Preview renewal stock protection before deploying

- The settings host supplies the stock source for the selected owned
  configuration. Pass `preview --help` to the settings script to see
  the connected syntax. Preview requires a read-capable PostgreSQL connection.

### Starter catalogue unit factor

- For a pristine starter, take the target extraction's `owned/catalogue.ts`.
  It declares one `openlup:piece` per `starter:each`.
- For a customized starter, add the exact factors from `owned/catalogue.json`
  to the corresponding count units in `owned/catalogue.ts`. For a unit that
  represents one piece, use `{ canonicalUnit: 'openlup:piece', unscaled: '1', scale: 0 }`.

No database step is required.

### Show database hints during starter installation

Take the target extraction's `lifecycle.mjs` through the managed upgrade plan
and apply. If local edits cause a conflict, move the local launch behavior to
an application-owned launcher outside both snapshots that delegates to
`lifecycle.mjs`. Restore the exact predecessor bytes in `lifecycle.mjs`, then
replan and apply with the same snapshots. Keep the app stopped until the
managed snapshot and installed OpenLup versions match.

When the schedule guard refuses installation, the starter prints the existing
message first and the retry hint on the next stderr line. Other installer
errors with a database hint use the same format. Installation retains the same
exit status and refusal codes. This file upgrade requires no additional
settings write or database grant.

### Starter paid receipts and account dates

A pristine upgrade replaces the managed `host/paid-mail.ts`,
`client/pages/account.ts` and `browser/acquisition.spec.ts` with the target
extraction's files. Paid receipts use the order currency's minor-unit exponent.
The account page shows the next cycle date in the market time zone.

If apply refuses because one of those files has local edits, move the edits to
application-owned files, keeping any imports they need. Restore the pristine
predecessor at each modified managed path, then apply again. Apply installs
the target managed files and replay preserves the application-owned files.

### Starter catalogue rules

Keep your existing `owned/catalogue.ts` validator when you upgrade. The
upgrade leaves the new rules bundle and test absent. To switch to installed
rules, copy `owned/catalogue-rules.cjs` and `owned/catalogue-rules.test.cjs`
from a fresh extraction of the target starter and move your content checks
to the bundle's `validateContent`. Run `node --test owned/catalogue-rules.test.cjs`,
then `./lifecycle up` to use those rules in the operator form.

- Clarify in the starter ownership guide which extraction modes commit the installation lockfile and which local address callback results the platform accepts.

### Starter installation test

Use the target extraction's managed `test/installation.test.ts` when the
predecessor file is pristine. The test checks one idempotent write per setting
with the configured value inside a single install transaction.

For a customized test, move independent local test cases and their imports to
an application-owned test file. Restore the pristine predecessor at the managed
path, then apply the upgrade. Apply and replay keep the local file and use the
exact target bytes for the managed test. Startup refusals retain their existing
behavior.

### Find more starter settings by goal

New neutral-store extractions declare payment retry timing, checkout limits,
shipping and tax, subscription care, the displayed returns period, price
rounding, and market settings in `owned/settings-host.ts`. Use the app's
settings script with `list --goal "payment retry"` or `list --goal "flat shipping"`
to find the owned file to edit, then run `check --json` for the selected
configuration.

To include these additional settings in search, optionally reconcile their
declarations from the target starter using the
[settings binding guidance](#discover-and-check-the-starters-owned-settings) above.
Existing bindings and app behavior continue to work without these declarations.
The upgrade requires no installed-policy step. If the settings
check refuses after reconciliation, correct the named declaration or startup
validation error and rerun it.

## @openlup/outbox

- Scope `@openlup/outbox` `.api.md` declaration snapshots to each subpath's own exported declarations without changing any exported runtime or type symbol.

Migration: No application changes required. Snapshot scoping does not alter public exports. It removes cross-subpath duplicates from generated `.api.md` snapshots.

- Add optional `snoozeScope?: "all" | "event_type"` (`OutboxSnoozeScope`) on `OutboxDispatchConfig` so workers can isolate `{ kind: "snooze" }` circuit-breaking to the snoozed event type and affected aggregates without starving unrelated event types.

## @openlup/platform

- Keep lower-maturity declarations referenced by stable `@openlup/platform` APIs in the stable snapshots so maintainers can detect type narrowing. The snapshot tool also checks that every reachable declaration appears in a report and that entrypoint directories have a single owner.

  Migration: No adopter action is required. Installed exports and runtime behavior are unchanged.

- Scope `@openlup/platform` `.api.md` declaration snapshots by subpath.

  Migration: Snapshot scoping does not alter runtime or type exports. Snapshots omit import-only declarations owned by equally or more mature sibling subpaths unless another retained edge includes them.

- Prepare catalogue candidates through one ordered evaluator with actionable preparation and pricing diagnostics. Product rule builds attach to the existing definition installation. Published product content carries neutral facts and a document reference.
- Migration: Existing candidate-service construction and v1 references and digests remain supported. For definition installation, attach the rules build to the pack and compose the host registry from the same pack types. Run your rule tests and install the updated product type through the existing install flow.

Native installations can preserve product publication and revision history when transferring a store.
Migration: Apply the complete native database update before transferring a store that already has publication history. The managed rail does not supply this feature. Publication read refusals keep their released reasons and now carry an optional `message` that names the fix, which callers can display; an invalid history cursor or publication head returns `candidate_invalid`.
Migration: In 1.3.0, `CATALOG_MIGRATIONS` grows from 14 to 16 entries with `20261123190000_catalog_publication` and `20261123191000_catalog_publication_commands`. Update code that pins the tuple length.

### Explain invalid catalogue attribute definitions

- The `definition_attribute_invalid` remedy directs readers to the reported field, explains the attribute key length, character rules and reserved names with `recycled_cover` as a valid example, and retains guidance on kind, cardinality and bounds.

Apply the reminder episode pin migration before using the updated producers.
A pinned episode retains its starting timing. A changed schedule supplies
timing for episodes whose first wave is created after the change.

Older episodes with preexisting waves and no pin read the live schedule
and can block changes with `checkout_recovery_schedule_change_blocked_open_episodes`.
See **Install reminder stages and hours** for the blocker conditions and
when to retry. Use
`READ COMMITTED` for changes and producers to avoid
`checkout_recovery_schedule_isolation_unsupported`.

If your legacy cart reminder job runs under its own database role, grant that
role EXECUTE on `public.commerce_enqueue_abandoned_cart_reminder_episodes(integer)`
once after applying the migration. If the grant is missing, the job reports
`checkout_recovery_cart_runtime_grant_required` with the exact command to run.
The built-in runtime role already has the grant.

- Create each reminder stage at most once per order. Pinned episodes keep
  their timing and are exempt from the schedule-change guard. An older pending
  checkout order with a wave and no pin blocks a change regardless of age
  with `checkout_recovery_schedule_change_blocked_open_episodes`. The same
  refusal applies to unpinned pending abandoned carts with a wave, a valid
  draft receipt and no settlement intent. Changed installs and producers at
  `REPEATABLE READ` or `SERIALIZABLE` refuse with
  `checkout_recovery_schedule_isolation_unsupported`.
  With an installed schedule, a compacted checkout wave consumes both stages
  and the later stage is skipped. With no schedule installed, the historical
  hour rule applies.

- `resolveCustomerSessionBinding` reuses one PostgreSQL challenge store on the `store`, `pool` and default shared-store paths. `createStore` keeps its per-operation lifecycle. The env-free `createPostgresCustomerSessionBinding` accepts a borrowed `store`, a borrowed `pool` or an owned `connectionString`.
- Downgrade the challenge-table lock in `createPostgresCustomerChallengeStore` (`issue` and `redeem`) from `EXCLUSIVE MODE` to `ROW EXCLUSIVE MODE` so concurrent customer logins do not serialize globally while retaining mutual exclusion with `EXCLUSIVE MODE` privacy erasures.

- Add additive default policy factories (`createDefaultRenewalFailurePolicy`, `createDefaultRenewalPreflightPolicy`, `createDefaultRenewalCyclePolicy`) to `@openlup/platform/subscriptions` with overridable canonical renewal key dialects and refusal defaults.
- Unify internal capability contribution construction across `@openlup/platform/composition` factories without changing any exported contract or runtime behavior.

- Add optional `prepareCandidate` on `FulfillmentStorePort` (wired in `createPostgresFulfillmentDispatchStore` and native fulfillment preparation) so dispatch workers run one advisory-locked prepare+candidate transaction instead of two while retaining `readCandidate` for `contact_stale` remaps.
- Batch candidate hydration in `createPostgresFulfillmentDispatchComposition().listCandidates` using a single `unnest ... WITH ORDINALITY` query with per-row `22023` refusal isolation fallback.
- Add optional `readLocalState` on `reconcileFulfillmentObservations` (wired in native provider intake) to collapse repeated `fulfillment_intake_read_state` reads to one per row while invalidating `latestOccurredAt` after `recordStatusEvidence` and clearing cached state before `applyFulfillmentObservationEffects`.

- Read native stock availability for a batch of SKUs using the installed
  renewal protection horizon through `createPostgresStockAvailability(...).readInstalled(skus)`.
  The read uses one PostgreSQL statement for stock and the installed horizon.

Migration: Apply the complete native catalogue through
`20261123142000_inventory_renewal_protection_validation.sql`. The existing
horizon reader calls the extracted validator with its existing privileges.
The explicit-horizon TypeScript port and the 14-day fallback keep their
established behavior.

- Managed checkout uses the verified account when a submitted e-mail belongs to
  a linked profile. A first guest checkout can still use an unlinked e-mail.
  Apply the managed ownership migration before installing the updated reference
  adapter. The receipt reader uses the current account link on replays.

- Add the opt-in PostgreSQL catalogue commands binding for approving, revoking, publishing and replaying a receipted v3 draft. Enable the approval seal on candidate preparation and apply the complete native migration chain before binding the owner transaction.
- Publication refusals identify the affected field when available and explain how to correct the draft or recover a sealed publication. Adopter rule refusals name the rule, its code and the field. The released refusal contract adds an optional path. `catalog-contracts.api.md`
- In 1.3.0, `CATALOG_MIGRATIONS` grows from 14 to 16 entries with `20261123190000_catalog_publication` and `20261123191000_catalog_publication_commands`.

Added additive PostgreSQL host ports for native checkout (`createPostgresNativeCheckoutHostPort` on `@openlup/platform/commerce/server/native-checkout`, optional `readExpiry` on `PostgresCheckoutRecoveryTokenPort` in `@openlup/platform/commerce/server`, and `createPostgresNativeCheckoutSubscriptionPort` on `@openlup/platform/subscriptions`) and migrated `examples/neutral-store/host/` checkout modules onto those ports without raw internal-table SQL.

Migration: Apply the full selected 1.3.0 PostgreSQL catalogue, including `20261123149000_native_durable_capture_evidence.sql`, with the upgraded payment runtime.

- On successful custom reconciliation readbacks, return provider-collected `amountMinor` and `currency` with `capturedAmountBasis: "provider_capture_v1"`.
- On successful custom native renewal observations, return the collected money in `observedMoney`, the same basis and the actual provider occurrence time when available.
- For custom native webhook adapters, set `capturedAmountBasis: "provider_capture_v1"` outside the event fingerprint on verified success evidence backed by the provider-collected amount.
- For successful invoice readbacks missing captured money with only a configured-amount mismatch against the claim, handle `providerEvidence.unavailableReason` as `provider_configured_amount_mismatch` and `providerStatus` as `unknown`.
- Find recorded native capture reviews via `captureReviewRequired` or `readCaptureReview` and confirm and resolve the transaction with the provider before charging again.

- Fresh cycles and expired claims both get space in a normal Native PostgreSQL
  renewal batch when both have eligible work.

Migration: Apply the ordered Native PostgreSQL catalogue through
`20261123150000_subscription_renewal_due_fairness.sql`.

- Recover `createEnvAdvisoryLock` after transient connect errors or idle client disconnects when zero locks are held while preserving fail-closed session-affinity refusals on active locks, and report lock acquisition/release errors to `onError` in `withAdvisoryLock`.
- Add optional `readbackMaxPages` (default `1`) to the warehouse fulfillment adapter so hosts can opt into bounded multi-page whole-collection readback verification beyond 100 fulfilments.
- Honor `dispatch.maxAttempts` in `createPostgresLifecycleMessages` source queries instead of a hardcoded limit of 6, and add an optional non-throwing `onError` callback for per-notice delivery failures.

- Harden payment adapter webhook normalization, OAuth token handling, detached JWS verification, readback status translation, and verified ingress projection without changing 1.x public exports:
  - Restrict dispute webhook normalization to active dispute events (`charge.dispute.created`, `charge.dispute.funds_withdrawn`) so closed or reinstated dispute events are acknowledged as unsupported rather than recorded as new disputes, and remove the over-broad `status === "requires_action"` fallback on unrecognized event types.
  - Eliminate per-call reconciliation provider allocation in payment adapter `readbackPort.readPayment`.
  - Thread the injected `now()` clock into HTTP client deadline checks, deduplicate concurrent OAuth token requests (single-flight), and invalidate stale bearer tokens on HTTP `401` (retrying idempotent `GET` requests once without silently double-dispatching `POST /transactions`).
  - Enforce strict 3-part detached JWS format (`parts.length === 3 && parts[1] === ""`), canonical `new URL(...)` `x5u` certificate URL validation, and bounded `X509Certificate` parse caching during webhook signature verification.
  - Avoid projecting verified webhook evidence twice in `createVerifiedPaymentIngress` when attaching a host-resolved reusable method owner.

- Export canonical payment failure evidence helpers (`evidenceToken`, `evidenceRecord`, `serializeFailureEvidence`, `failureEvidencePayload`), attempt silence-window and reconciliation evidence helpers, prepared-absence reopen helper, `DEFAULT_STALE_AFTER_SECONDS`, `paymentVerifyRequestSchema`, `hasCommittedCaptureReview`, `sameCanonicalAttempt`, `toClaimedAttemptShape`, payment method lifecycle snapshot helpers, and webhook refusal handoff types from `@openlup/platform/payments`.
- Export payment execution and durable-event conformance contract types (`ExecutionCapability`, `ExecutionSubject`, `ExecutionProviderIdentity`, `ExecutionEvidence`, `DurableEventCounts`, `DurableEventAggregate`, `DurableEventFixtureCardinality`, `DurableEventWriteCardinality`, `DurableEventCardinalityExpectations`, `DurableEventSnapshot`, `EventReceipt`, `DurableEventCapability`, `DurableEventEvidence`) from `@openlup/platform/payments/contracts`.

- Accept all `v1` signatures in a webhook signature header during signing secret rotation instead of retaining only the last `v1` entry, while failing closed on conflicting timestamps or stale payloads.

- Attach a non-throwing `'error'` listener once per lazily created PostgreSQL `Pool` or dedicated advisory-lock `Client` across data, marketing acquisition, migrations and scheduler adapters, preventing idle disconnects from terminating the host process.
- Add optional `onPoolError` and `onClientError` callbacks to `PostgresDataGatewayOptions`, marketing Postgres adapter options, migration runner options and `EnvAdvisoryLockOptions` (`createEnvAdvisoryLock`).

Review successful `@openlup/platform/payments/tpay` readbacks flagged `provider_amount_mismatch` before retrying or issuing an invoice.

Review a verified `@openlup/platform/payments/stripe` success webhook answered with HTTP 409 and reason `provider_amount_mismatch` before settling.

- Add `PaymentProviderRegistry`, `createPaymentProviderRegistry`, `toCoreCaptureHandoff`, `fromCoreCaptureHandoff`, and `toCorePaymentProviderCapability` to `@openlup/platform/payments` and `@openlup/platform/payments/contracts` as a single source of truth over composed payment adapters.
- Add named `FulfillmentProviderAdapter`, `FulfillmentProviderRegistry`, and `createFulfillmentProviderRegistry` to `@openlup/platform/fulfillment` and `@openlup/platform/fulfillment/contracts`, re-export `FULFILLMENT_STATUS_EFFECTS`, and derive `observationStatusPolicy` directly from `FULFILLMENT_STATUS_EFFECTS`.

### Discover application-defined settings

- Declare an application setting in the settings binding with its file, symbol, goal and effect. The experimental settings command can list, show, explain and check those declarations when the app is supplied. Check uses the app's Zod schema when provided and reports the original value.

### Slim capability and invariant descriptors

- Capability gaps and invariants now have one reason and a reference. Read their `runtime.reason` for the explanation.

### Discover starter-owned settings

- The starter's settings binding declares the free-shipping threshold,
  subscription discount, delivery intervals, edit window, checkout reservation
  duration and lifecycle notice retry budget. Use the starter's settings script
  to discover them alongside the packaged platform catalogue.
- The currency and date entries describe starter display fixes. The stock-wait
  entry identifies the fixed 15-minute native hold lifetime during stock-wait
  recovery.

### Check loaded settings after editing owned configuration

- The experimental `openlup settings check --app <module>` command checks reported file values offline. It reports the app's startup assertion separately from the per-key catalogue schema checks. Connected drift remains a startup check.

### Experimental settings command

- The package binary now provides the experimental settings command for discovery and read-only preview. For preview, pass JSON with `--value` or read it from stdin with `--value -`.

### Connected settings require an explicit PostgreSQL target

- For connected `openlup settings show` and `preview`, supply a canonical PostgreSQL URL with one TCP host, a username and one non-empty database path segment. For the exact URL rules, see the reader guide, Configure settings, section “Read the effective behavior”.
- The URL alone sets the host, port, username, password, database and TLS mode. An omitted `sslmode` selects plaintext. `PG`-prefixed environment variables and password files cannot change those settings. Other driver variables still apply. Both commands refuse when the driver loads the native client. Unset `NODE_PG_FORCE_NATIVE` to use the JavaScript client.
- The experimental settings host's `bind` input now carries the admitted connection options in `database`, replacing the raw `databaseUrl` string.

- Discover platform settings, capability gaps and invariants from the installed catalogue
  and refusal vocabulary. The read-only settings API and the domain discovery
  exports are experimental.

Migration: Existing operations and installed-policy APIs keep their current
behavior. To opt into connected settings discovery, inject a reader for each
installed key you want to inspect. The reader reports row presence separately
from its value.

### Settings goal search

- Match goal words at the start of catalogue words, including acronyms in camelCase keys. A nonblank goal with no letters or decimal digits returns an empty list. The command still refuses blank goals with exit code 64. When no setting matches every word, the list shows up to ten partial matches ranked by the number of matching words.

### Settings MCP launch and required inputs

- Pass `mcp` to the starter's settings script to launch the read-only settings
  server from the application root. If the application module cannot load,
  launch stops and reports the reason on stderr.
- Provide `key` to `settings_show`, `keyOrCode` to `settings_explain`, and both
  `key` and the proposed JSON `value` to `settings_preview`. The JSON-RPC
  argument error names a missing field when that omission is the only issue.

### Settings over MCP

- Use the experimental `openlup settings mcp` command to connect a read-only stdio client. The Configure settings guide shows the extracted starter client configuration.
- The server uses the existing settings commands. The unreleased experimental `settingsReadTools`, `listSettings`, `showSetting`, `explainSetting`, `previewSetting`, `invalidSettingsCommand` and `refuseSettingsPreview` exports have been removed from `@openlup/platform/operations/server`.

### Read-only preview for renewal stock protection

- The experimental settings preview command and `settings_preview` tool report one validation outcome, the
  current installed policy, current availability by SKU, and an estimate of
  proposed availability at the same instant and in the same snapshot. Existing
  reservations keep their quantities and expiry times. Apply
  `20261123152000_inventory_new_purchase_stock_preview.sql` for the proposed
  estimate in CLI JSON, MCP, and library results.
- The explicit-horizon reader still requires a horizon that matches the
  installed value.

- Add optional batch persistence methods (`recordStockSnapshotBatch`, `recordProviderStockCurrentBatch`, `recordLowStockEvidenceBatch`, `resolveLowStockEvidenceBatch`) to `FulfillmentStockSyncPort` and `createPostgresFulfillmentStockSyncPort`, and use them in `runFulfillmentStockSyncWorker` with PostgreSQL collation-aligned lock ordering and per-item fallback on stock batch errors.
- Skip the `SAVEPOINT` and `subscription_command_preview` no-op probe in `createPostgresSubscriptionCommandStore` for lifecycle actions whose preview path never returns `noop` (`pause`, `resume`, `cancel`, `skip_next_cycle`, `order_now`, `reactivate`).

- Add optional `snapshot?: RenewalFrozenSnapshot` forwarding on `AutomaticRenewalRunDeps["inventory"]["reserve"]` so `runOneAutomaticSubscriptionRenewal` passes the claimed snapshot directly to inventory reservation without re-reading renewal state.
- Reduce database round-trips on the subscription renewal and retry hot paths: lightweight SQL for `readMandateEvidence` and `admitDeliveryAlignment`, single snapshot read in `buildCycleSnapshots`, batched stock-wait candidate loading, direct stock-wait recovery snapshot reuse, and `failure_propagation_pending` guarding in `createNativeRetryDriver`.
- Reduce redundant serialization and parsing in `createNativeRenewalCodec` and replace the indirect `requires_action` replay wrapper in `createPostgresProviderRenewalBinding` with a direct helper preserving exact retry-rung and idempotency semantics.

- Return redacted `persistence` facts from `createTpayPaymentAdapter().attemptPort.execute` and synthesize safe, redacted fallback persistence in `createPostgresProviderPaymentRail` when an adapter omits optional `execution.persistence`, preventing post-dispatch throws that stranded live provider attempts.

- Unify direct-PostgreSQL executor and pool-sharing contracts across `@openlup/platform`:
  - Re-export `SqlExecutor` and add `PostgresTransactionRunner` / `createPostgresTransactionRunner(pool)` in `@openlup/platform/data`.
  - Accept a non-owning borrowed `{ pool }` option across `PostgresDataGatewayOptions`, direct-PostgreSQL identity/communications/account-support/marketing stores, and `createPostgresMigrationRunner` (rejecting `{ pool, poolFactory }` fail-closed and never calling `pool.end()` on borrowed pools).
  - Parameterize `PostgresRoleFreeTransactionLane<G = unknown>` covariantly and add a typed overload on `createPostgresRoleFreeTransactionLane<G>(...)` (retaining `PostgresRoleFreeTransactionLane<unknown>` when unparameterized for 1.x compatibility, while accepting supertypes such as `PgGatewayClient`, `SqlExecutor`, or `PgQueryExecutor` for typed callbacks without unchecked casts) plus a runtime `isPgQueryExecutor` check in checkout recovery token storage.
  - Make `DataBindingDependencies.createSupabaseClient` optional so direct-PostgreSQL hosts can call `createDataBindings()` without a hosted-client stub while still failing closed (`OPENLUP_E_DATA_BINDING_SUPABASE_CLIENT_REQUIRED`) when the hosted capability is bound without a client factory.
  - Convert `@openlup/platform/marketing/server/postgres` from eager `pg` imports to lazy peer loading with `OPENLUP_E_PEER_MISSING` preservation.

Migration:

Code that reads `DataBindingDependencies.createSupabaseClient` must handle
`undefined`. Existing `PgGatewayClient.query` implementations keep their 1.2.0
signature. For typed rows or readonly query values, wrap the client with
`asPostgresSqlExecutor` from `@openlup/platform/data`.

`createStore` keeps its per-operation lifecycle; pass `pool` or `store` to reuse one store per binding.

Before (separate pools per store and stubbed hosted client factory):
```ts
import { createDataBindings, type SupabaseCreateClient } from "@openlup/platform/data";
import { createPostgresAccountLinkStore } from "@openlup/platform/identity";

declare const stubClient: SupabaseCreateClient;
declare const connectionString: string;

const bindings = createDataBindings({ createSupabaseClient: stubClient });
const store = createPostgresAccountLinkStore({ connectionString });
```

After (the transaction runner and account-link store borrow the application's pool):
```ts
import type { Pool } from "pg";
import { createDataBindings, createPostgresTransactionRunner } from "@openlup/platform/data";
import { createPostgresAccountLinkStore } from "@openlup/platform/identity";

declare const sharedPool: Pool;

const bindings = createDataBindings();
const runner = createPostgresTransactionRunner(sharedPool);
const store = createPostgresAccountLinkStore({ connectionString: "" }, { pool: sharedPool });
```

- Distinguish the three `openlup verify --app` CLI stages (module load, `createVerificationInput` export check and observation factory execution) with constant diagnostic messages while withholding application error details.

## API changes

### `packages/core/api/fulfillment.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/fulfillment/index.d.ts
export { FULFILLMENT_STATUS_MAP, FULFILLMENT_STATUS_EFFECTS, CANONICAL_LOCAL_FULFILLMENT_STATUSES, CUSTOMER_STEP_SEQUENCE, canonicalStatusToken, stepForToken, customerStepFromSignals, phaseIndexForStep, stepLabelKey, timelineLabelForStep, trackingPhaseKeyForStep, stepUsesTruckIcon } from "./statusMap.js";
export type { FulfillmentStatusStage, FulfillmentStatusMap, FulfillmentStatusEffect } from "./statusMap.js";
// dist/fulfillment/statusMap.d.ts
export interface FulfillmentStatusEffect {
export declare const FULFILLMENT_STATUS_EFFECTS: Readonly<Record<CanonicalLocalFulfillmentStatus, FulfillmentStatusEffect>>;
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/fulfillment/index.d.ts
export { FULFILLMENT_STATUS_MAP, CANONICAL_LOCAL_FULFILLMENT_STATUSES, CUSTOMER_STEP_SEQUENCE, canonicalStatusToken, stepForToken, customerStepFromSignals, phaseIndexForStep, stepLabelKey, timelineLabelForStep, trackingPhaseKeyForStep, stepUsesTruckIcon } from "./statusMap.js";
export type { FulfillmentStatusStage, FulfillmentStatusMap } from "./statusMap.js";
```

### `packages/outbox/api/index.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
export type OutboxSnoozeScope = "all" | "event_type";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
export interface OutboxDispatchConfig {
```

### `packages/platform/api/account-support-postgres.api.md`

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/data/index.d.ts
export { createPostgresDataGateway, createPostgresGatewayTypeOverrides, createPostgresRoleFreeTransactionLane, postgresTimestampTzToRfc3339, resolvePostgresDataGatewayEnv, type PostgresDataGatewayEnv, type PostgresDataGatewayOptions, type PostgresRoleFreeTransactionLane, } from "./postgresGateway.js";
export { PgGatewayClient, PgQueryBuilder, type PgQueryExecutor, type PgShimError, type PgShimResult, } from "./queryBuilder.js";
// dist/data/postgresGateway.d.ts
/**
 * Build one role-free, per-operation lane. Do not use this for generic service
 * work: DataGatewayPort.asService remains the mandatory service_role boundary.
 * Only a named owner-authority capability of the deployment may hold a lane.
 */
export declare function createPostgresRoleFreeTransactionLane(env: PostgresDataGatewayEnv, options?: PostgresDataGatewayOptions): PostgresRoleFreeTransactionLane;
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/account-support/postgres/customerSupportJourney.d.ts
export interface PostgresCustomerSupportJourneyOptions {
```

### `packages/platform/api/account-support.api.md`

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/invoicing/contracts/facts.d.ts
export interface InvoiceSeller {
// dist/invoicing/contracts/host.d.ts
export interface InvoiceHostPorts {
// dist/invoicing/contracts/provider.d.ts
export interface InvoiceDocumentIdentity {
export interface InvoiceProviderPort {
```

### `packages/platform/api/catalog-contracts.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/catalog/contracts/candidate.d.ts
export interface CatalogCandidateIssue extends CatalogDraftIssue {
// dist/catalog/contracts/index.d.ts
export type { CatalogCandidateQuery, CatalogCandidatePreview, CatalogCandidateComparison, CatalogCandidateIssue } from "./candidate.js";
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/catalog/contracts/index.d.ts
export type { CatalogCandidateQuery, CatalogCandidatePreview, CatalogCandidateComparison } from "./candidate.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/catalog/contracts/candidate.d.ts
export interface CatalogCandidatePreview {
// dist/catalog/contracts/lifecycle.d.ts
export interface CatalogPublicationRefusal {
// dist/catalog/contracts/productTypes.d.ts
export interface CatalogProductTypeDefinition extends CatalogProductTypeRef {
```

### `packages/platform/api/catalog-testing.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/catalog/testing/index.d.ts
export { publicationWireVectors } from "./publicationWireVectors.js";
// dist/catalog/testing/publicationWireVectors.d.ts
type Vector = {
export declare const publicationWireVectors: readonly Vector[];
export {};
```

### `packages/platform/api/catalog.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/catalog/draftV2Validation.d.ts
export declare const catalogCombinationIssue: (error: CatalogCombinationError, prefix?: string) => {
export declare function validateDraftV2Issues(payload: CatalogDraftPayloadV2, registry: CatalogProductTypeRegistry, references?: CatalogAttributeReferencePort): Promise<DraftValidationIssues>;
// dist/catalog/draftV3Schemas.d.ts
export declare const catalogPublicationContentSchema: z.ZodType<Omit<CatalogDraftSharedContentV3, "document">>;
export declare const catalogPublicationDraftPayloadSchema: z.ZodType<CatalogDraftPayloadV3>;
// dist/catalog/draftValidation.d.ts
type OwnedReadiness = {
export type DraftValidationIssues = {
export declare function draftValidationResult(result: DraftValidationIssues): CatalogDraftValidation;
export declare function validateDraftIssues(payload: CatalogDraftPayload, registry: CatalogProductTypeRegistry): DraftValidationIssues;
export {};
// dist/catalog/index.d.ts
export { createCatalogCandidateServiceWithPublication } from "./candidateService.js";
export type { CatalogCandidatePublicationDeps } from "./publicationEvidence.js";
export { loadCatalogRules, withCatalogPublicationRules } from "./catalogPublicationRules.js";
export type { CatalogPublicationRulesModule, CatalogPublicationRulesPack, CatalogRulesContext } from "./catalogPublicationRules.js";
export type { RulesProduct, RulesSku, RulesIdentifier } from "./contracts/publicationRuleFacts.js";
export { nativeCatalogPublication } from "./publicationCodec.js";
export type { CatalogFullPublicationV2, CatalogPublicationFailure, CatalogPublicationManifestV2, CatalogPublicationReceiptV2, CatalogPublishedProduct, CatalogPublishedSku, CatalogRetainedSourceBinding, CatalogSkuRevisionRef } from "./publicationContracts.js";
export { createPostgresCatalogPublicationCommands } from "./catalogPublicationCommands.js";
export type { CatalogPublicationCommand, CatalogPublicationCommandResult, CatalogPublicationDecisionReceipt, PostgresCatalogPublicationCommandsDeps } from "./catalogPublicationCommands.js";
// dist/catalog/candidateService.d.ts
export declare function parseCatalogCandidateReference(value: string): {
type CatalogCandidateService = CatalogValidationPort & {
export declare function createCatalogCandidateServiceWithPublication(deps: Omit<CatalogCandidateDeps, "readDraft"> & {
export {};
// dist/catalog/catalogPublicationCommands.d.ts
declare const commandSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
declare const decisionReceiptSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
export type CatalogPublicationCommand = Exclude<z.input<typeof commandSchema>, {
export type CatalogPublicationDecisionReceipt = z.output<typeof decisionReceiptSchema>;
export type CatalogPublicationCommandResult = {
export interface PostgresCatalogPublicationCommandsDeps<Context> {
export declare function createPostgresCatalogPublicationCommands<Context>(deps: PostgresCatalogPublicationCommandsDeps<Context>): {
export {};
// dist/catalog/catalogPublicationRules.d.ts
export interface CatalogRulesContext {
export interface CatalogPublicationRulesModule {
export type CatalogPublicationRulesPack = Omit<CatalogPackInput, "types"> & {
/** Attach built rules to a pack during deployment. Installation derives and verifies their identity.
 * @experimental
 */
export declare function withCatalogPublicationRules<P extends CatalogPackInput>(pack: P, rulesFor: (type: CatalogProductTypeRef) => Uint8Array | undefined): P;
/** @experimental */
export declare function withCatalogPublicationRules(pack: CatalogPublicationRulesPack, rulesFor: (type: CatalogProductTypeRef) => Uint8Array | undefined): CatalogPackInput;
export declare function loadCatalogRules(artifact: Uint8Array, evaluation?: CatalogRulesContext): Readonly<CatalogPublicationRulesModule>;
// dist/catalog/contracts/publicationRuleFacts.d.ts
export interface RulesIdentifier {
export interface RulesProduct {
export interface RulesSku {
// dist/catalog/publicationCodec.d.ts
export declare const SKU_PAGE_DEPTH = 3;
export declare function canonicalCatalogPublicationJson(input: unknown, depth?: number): string;
export declare const publicationJson: (input: unknown, maxBytes?: number, depth?: number) => string;
export declare const publicationDigest: (input: unknown, maxBytes?: number, depth?: number) => string;
export declare function publicationApprovalState(product: CatalogPublishedProduct, skus: readonly CatalogPublishedSku[]): {
export declare const comparePublicationText: (left: string, right: string) => number;
export declare const publicationReadinessReasons: z.ZodArray<z.ZodString>;
export declare const publicationReadinessVerdict: z.ZodObject<{
export declare const publishedFactsSchema: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
export declare function assertPublishedPresentation(input: unknown, path: string, subject?: string): void;
export declare function assertPublishedFacts(input: unknown, path: string, subject?: string): void;
export declare const catalogPublishedSkuSchema: z.ZodType<CatalogPublishedSku>;
export declare const catalogPublishedProductSchema: z.ZodType<CatalogPublishedProduct>;
export declare function assertNativeProductDocument(product: CatalogPublishedProduct): void;
export declare function assertNativeProductReferences(product: CatalogPublishedProduct): void;
export declare function decodePublishedProduct(product: CatalogPublishedProduct, documentDigests: ReadonlySet<string>): CatalogPublishedProduct;
export declare function decodePublishedSku(input: unknown, path: string, subject?: string): CatalogPublishedSku;
export declare function assertNativeSkuNetWeight({ code, netContent }: CatalogPublishedSku): void;
export declare function assertPublishedSkuDocumentExclusion(sku: CatalogPublishedSku, documentDigests: ReadonlySet<string>): void;
export declare function catalogPublicationManifestSchema(documentDigests?: ReadonlySet<string>): z.ZodType<CatalogPublicationManifestV2>;
export declare function publicationContent(content: CatalogDraftSharedContentV3, subject?: string, documentDigest?: string): CatalogPublishedContent;
type StoredFieldIssue = Issue & PlatformIssue & {
type Decoded<T> = {
type PacketRows = {
export declare function decodePublicationPacket(input: {
    manifest: unknown;
}): Decoded<CatalogPublicationManifestV2>;
export declare function decodePublicationPacket(input: PacketRows): Decoded<void>;
export declare function requireDecodedPublication<T>(decoded: Decoded<T>): T;
export declare function decodeStoredPublicationSku(text: unknown): CatalogPublishedSku;
export declare function decodeStoredPublicationReceipt(text: unknown): CatalogPublicationReceiptV2;
export declare function assertPublicationRegistration(text: string, path: string): void;
export declare const nativeCatalogPublication: {
export {};
// dist/catalog/publicationContracts.d.ts
export declare const CATALOG_PUBLICATION_LIMITS: {
export type CatalogPublishedIdentifier = RulesIdentifier;
export type CatalogPublishedContent = Pick<CatalogDraftSharedContentV3, "schemaVersion" | "catalogAction" | "presentation" | "offerMemberships" | "requestedModes" | "publicationSkus">;
export interface CatalogPublishedProduct extends RulesProduct {
export interface CatalogPublishedSku extends RulesSku {
export interface CatalogSkuRevisionRef {
export interface CatalogPublicationManifestV2 {
export interface CatalogFullPublicationV2 {
export interface CatalogPublicationReceiptV2 extends CatalogPublicationReceipt {
export interface CatalogRetainedSourceBinding {
export interface CatalogPublicationFailure {
// dist/catalog/publicationError.d.ts
export declare const publicationPriceRefusalReason: z.ZodEnum<{
declare const publicationCodes: readonly ["activation_not_assessed", "activation_unknown", "catalog_action_conflict", "catalog_lifecycle_child_effects_mismatch", "catalog_lifecycle_evidence_unavailable", "catalog_lifecycle_fresh_sale_refused", "catalog_lifecycle_last_active_child", "catalog_lifecycle_raw_status_fenced", "catalog_lifecycle_state_conflict", "catalog_lifecycle_transition_refused", "catalog_lifecycle_withdrawal_overlay_refused", "catalog_publication_absent", "catalog_publication_activation_effect_missing", "catalog_publication_approval_missing", "catalog_publication_approval_state_valid", "catalog_publication_approval_wrong", "catalog_publication_attributes_invalid", "catalog_publication_authored_amounts_invalid", "catalog_publication_axes_invalid", "catalog_publication_busy", "catalog_publication_candidate_already_issued", "catalog_publication_candidate_invalid", "catalog_publication_command_key_reused", "catalog_publication_committed_at_valid", "catalog_publication_content_invalid", "catalog_publication_cursor_invalid", "catalog_publication_decided_at_valid", "catalog_publication_derived_source_mismatch", "catalog_publication_document_bytes_unavailable", "catalog_publication_document_invalid", "catalog_publication_document_required", "catalog_publication_document_revision_sequence", "catalog_publication_document_source_mismatch", "catalog_publication_document_source_missing", "catalog_publication_document_text_copied", "catalog_publication_draft_advanced", "catalog_publication_eligibility_source_mismatch", "catalog_publication_envelope_too_large", "catalog_publication_facts_invalid", "catalog_publication_gross_below_net", "catalog_publication_gross_mass_invalid", "catalog_publication_gross_mass_required", "catalog_publication_gtin_conflict", "catalog_publication_gtin_invalid", "catalog_publication_head_invalid", "catalog_publication_history_item_too_large", "catalog_publication_identifier_blank", "catalog_publication_identifier_conflict", "catalog_publication_identifier_effect_missing", "catalog_publication_identifier_key_reused", "catalog_publication_identifier_primary_invalid", "catalog_publication_identifier_requires_created_sku", "catalog_publication_identifier_source_mismatch", "catalog_publication_identity_conflict", "catalog_publication_integral_grams_required", "catalog_publication_issue_sealed", "catalog_publication_lifecycle_assertion_changed", "catalog_publication_lineage_invalid", "catalog_publication_lineage_unknown", "catalog_publication_live_drift", "catalog_publication_activation_membership_required", "catalog_publication_logistics_source_mismatch", "catalog_publication_manifest_invalid", "catalog_publication_mass_required_until_mc5", "catalog_publication_media_evidence_mismatch", "catalog_publication_media_readiness_unproven", "catalog_publication_media_validation_unavailable", "catalog_publication_membership_change_not_allowed", "catalog_publication_membership_effect_missing", "catalog_publication_membership_source_mismatch", "catalog_publication_metadata_effect_missing", "catalog_publication_net_weight_unsupported", "catalog_publication_operation_invalid", "catalog_publication_operation_source_ambiguous", "catalog_publication_operation_source_mismatch", "catalog_publication_operation_source_missing", "catalog_publication_page_invalid", "catalog_publication_pointer_capability_unconsumed", "catalog_publication_post_state_changed", "catalog_publication_presentation_effect_missing", "catalog_publication_presentation_invalid", "catalog_publication_presentation_source_mismatch", "catalog_publication_presentation_unavailable", "catalog_publication_price_changed", "catalog_publication_price_key_reused", "catalog_publication_price_readiness", "catalog_publication_price_unavailable", "catalog_publication_primary_sku_required", "catalog_publication_product_identity_conflict", "catalog_publication_product_name_source_mismatch", "catalog_publication_query_invalid", "catalog_publication_read_invalid", "catalog_publication_readback_item_too_large", "catalog_publication_receipt_input_invalid", "catalog_publication_receipt_invalid", "catalog_publication_receipt_unsupported", "catalog_publication_record_immutable", "catalog_publication_reserved_carrier", "catalog_publication_roster_limit", "catalog_publication_route_conflict", "catalog_publication_rule_failed", "catalog_publication_rules_binding_mismatch", "catalog_publication_rules_digest_mismatch", "catalog_publication_rules_module_invalid", "catalog_publication_scope_expansion", "catalog_publication_sku_effect_missing", "catalog_publication_sku_identity_changed", "catalog_publication_sku_price_not_ready", "catalog_publication_sku_price_shape_invalid", "catalog_publication_sku_revision_invalid", "catalog_publication_sku_title_invalid", "catalog_publication_sku_too_large", "catalog_publication_source_invalid", "catalog_publication_source_mismatch", "catalog_publication_tax_class_unavailable", "catalog_publication_v3_activation_readiness_failed", "catalog_publication_v3_active_primary_required", "catalog_publication_v3_compile_archive_refused", "catalog_publication_v3_compile_change_noop", "catalog_publication_v3_compile_derived_facts_mismatch", "catalog_publication_v3_compile_document_absent", "catalog_publication_v3_compile_document_conflict", "catalog_publication_v3_compile_document_stale", "catalog_publication_v3_compile_identifier_conflict", "catalog_publication_v3_compile_primary_foreign", "catalog_publication_v3_compile_primary_immutable", "catalog_publication_v3_compile_product_absent", "catalog_publication_v3_compile_product_conflict", "catalog_publication_v3_compile_product_incomplete", "catalog_publication_v3_compile_sku_absent", "catalog_publication_v3_compile_sku_archived", "catalog_publication_v3_compile_sku_conflict", "catalog_publication_v3_document_digest_mismatch", "catalog_publication_v3_document_invalid", "catalog_publication_v3_document_not_canonical", "catalog_publication_v3_document_reference_stale", "catalog_publication_v3_presentation_required", "catalog_publication_v3_structural_readiness_failed", "catalog_publication_wire_invalid", "catalog_publications_canonical_state_check", "catalog_sku_revisions_full_facts_check", "channel_identity_not_assessed", "commerce_product_slug_unsupported", "commercial_activation_not_assessed", "content_missing", "dimension_not_declared", "dimension_not_installed", "current_primary_mismatch", "document_reference_missing", "duplicate_dimension", "duplicate_option_combination", "duplicate_sku_code", "duplicate_sku_id", "duplicate_trade_identifier", "foreign_product_reference", "gross_mass_invalid", "gross_mass_missing", "intent_sku_absent", "logistics_reference_missing", "media_readiness_mismatch", "media_readiness_unknown", "media_reference_missing", "net_content_invalid", "net_content_missing", "net_content_option_mismatch", "option_quantity_invalid", "option_type_invalid", "option_value_invalid", "price_reference_missing", "price_validation_unavailable", "primary_sku_missing", "primary_sku_not_in_product", "publication_evidence_unavailable", "publication_head_unavailable", "publication_preparation_unavailable", "publisher_not_authorized", "retained_read_not_authorized", "retained_revision_unavailable", "retained_source_mismatch", "sku_code_missing", "sku_missing", "slug_missing", "trade_identifier_invalid", "trade_identifier_quantity_invalid", "trade_identifier_scheme_unsupported", "type_not_installed", "unit_trade_identifier_missing"];
type PlatformCode = typeof publicationCodes[number] | CatalogConformanceCode | CatalogCandidateError["code"] | z.infer<typeof publicationPriceRefusalReason>;
export type { PlatformCode };
type Rule = "validateContent" | "validateProduct" | "validatePrices" | "presentationReadiness" | "assessActivation";
export type PlatformIssue = {
export type Issue = Omit<CatalogCandidateIssue, "code" | "message"> & {
export type EvaluationIssue = {
export declare function publicationIssue(code: PlatformCode, phase: CatalogCandidateIssue["phase"], path: string, subject?: string): Issue & PlatformIssue;
export declare function adopterIssue(rule: Rule, code: string, path: string): Issue;
export declare function renderPublicationIssue(issue: Issue): CatalogCandidateIssue & {
export declare class CatalogPublicationError extends Error {
export declare function publicationDiagnostic(error: CatalogPublicationError, phase: NonNullable<CatalogCandidateIssue["phase"]>, path: string, subject: string): Issue;
export declare const publicationRefuse: (code: PlatformCode, outcome?: CatalogPublicationError["outcome"]) => never;
export type AdmissionDiagnostic = PlatformCode;
export declare const refusePublicationCommand: (code: PlatformCode, outcome?: CatalogPublicationError["outcome"]) => never;
export declare function publicationRemedy(code: PlatformCode): string;
type AdmissionRefusal = {
export declare function catalogPublicationAdmissionRefusal(error: unknown): AdmissionRefusal | null;
export declare function publicationReadFailure(error: unknown): CatalogPublicationFailure & {
// dist/catalog/publicationEvidence.d.ts
export type ExpectedPublicationHead = Pick<CatalogHeadRef, "publicationId" | "revision"> & Partial<Pick<CatalogHeadRef, "documentDigest">>;
export declare function matchesPublicationHead(expected: ExpectedPublicationHead | null, observed: CatalogHeadRef | null): boolean;
export declare const publicationHeadSchema: z.ZodObject<{
export interface CatalogPublicationDocument {
export interface CatalogPublicationDraftEvidence {
export interface CatalogPublicationEvidence {
export interface CatalogCandidatePublicationDeps {
// dist/catalog/publicationIntent.d.ts
declare const state: z.ZodEnum<{
export declare const lifecycleEvidenceSchema: z.ZodObject<{
declare const lifecycleOperation: z.ZodDiscriminatedUnion<[z.ZodObject<{
export type PublicationLifecycleState = z.infer<typeof state>;
export type PublicationLifecycleOperation = z.infer<typeof lifecycleOperation>;
type LegacyOperation = CatalogDraftPayloadV3["publication"]["operations"][number];
export type PublicationOperation = LegacyOperation | PublicationLifecycleOperation;
type IntentSku = CatalogDraftPayloadV3["skus"][number] & {
export type PublicationIntent = Omit<CatalogDraftPayloadV3, "schemaVersion" | "publication" | "skus"> & {
export type PublicationDraftRecord = Omit<CatalogDraftPublicationStoredRecord, "payload"> & {
export declare function lifecycleWithdrawalOnly(payload: PublicationIntent): boolean;
export declare function isLifecycleOperation(operation: PublicationOperation): operation is PublicationLifecycleOperation;
export declare function publicationIntent(input: unknown, onInvalid?: (path: string, unsupportedKey: boolean, fix?: string) => never): PublicationIntent | null;
export declare function readPublicationDraftEnvelope(input: unknown): PublicationDraftRecord | null;
export declare function readPublicationDraftRecord(input: unknown): PublicationDraftRecord | null;
export declare function lifecycleTransition(from: PublicationLifecycleState, to: PublicationLifecycleState, restore: boolean): boolean;
export {};
// dist/catalog/publicationSkuIdentity.d.ts
export declare function assertPublishedSkuIdentity(db: PgQueryExecutor, productId?: string): Promise<void>;
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/catalog/productTypeIssues.d.ts
export declare const catalogDefinitionMetadataSchema: z.ZodObject<{
// dist/catalog/sql.d.ts
export declare const CATALOG_MIGRATIONS: readonly [
```

### `packages/platform/api/commerce-native-checkout.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
export interface NativeCheckoutOrderRow {
export interface NativeCheckoutOrderItemRow {
export interface NativeCheckoutPriorDraftOrderRow {
export interface NativeCheckoutSettlementIntentRow {
export interface PostgresNativeCheckoutHostPort {
export declare function createPostgresNativeCheckoutHostPort(executor: NativeCheckoutQuery): PostgresNativeCheckoutHostPort;
```

### `packages/platform/api/commerce-server.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/commerce/server/checkoutRecoveryReminderSchedule.d.ts
export declare function readCheckoutRecoveryReminderObservation(db: Executor, policy?: Partial<CheckoutRecoveryWavePolicy>): Promise<{
// dist/commerce/server/index.d.ts
export { installCheckoutRecoveryReminderSchedule, readCheckoutRecoveryReminderSchedule, readCheckoutRecoveryReminderObservation } from "./checkoutRecoveryReminderSchedule.js";
// dist/fulfillment/index.d.ts
export { FULFILLMENT_STATUS_MAP, FULFILLMENT_STATUS_EFFECTS, CANONICAL_LOCAL_FULFILLMENT_STATUSES, CUSTOMER_STEP_SEQUENCE, canonicalStatusToken, stepForToken, customerStepFromSignals, phaseIndexForStep, stepLabelKey, timelineLabelForStep, trackingPhaseKeyForStep, stepUsesTruckIcon } from "./statusMap.js";
export type { FulfillmentStatusEffect } from "./statusMap.js";
export { createFulfillmentProviderRegistry } from "./providerRegistry.js";
export { reconcileFulfillmentObservations, runFulfillmentReconciliationPage, type LocalFulfillmentReconciliationState } from "./providerReconciliationWorker.js";
// dist/fulfillment/providerReconciliationWorker.d.ts
export interface LocalFulfillmentReconciliationState {
// dist/fulfillment/statusMap.d.ts
export { FULFILLMENT_STATUS_MAP, FULFILLMENT_STATUS_EFFECTS, CANONICAL_LOCAL_FULFILLMENT_STATUSES, CUSTOMER_STEP_SEQUENCE, canonicalStatusToken, stepForToken, customerStepFromSignals, phaseIndexForStep, stepLabelKey, timelineLabelForStep, trackingPhaseKeyForStep, stepUsesTruckIcon } from "@openlup/core/fulfillment";
export type { FulfillmentStatusStage, FulfillmentStatusMap, FulfillmentStatusEffect } from "@openlup/core/fulfillment";
// dist/fulfillment/providerRegistry.d.ts
export declare function createFulfillmentProviderRegistry(adapters: readonly FulfillmentProviderAdapter[]): FulfillmentProviderRegistry;
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/commerce/server/index.d.ts
export { installCheckoutRecoveryReminderSchedule, readCheckoutRecoveryReminderSchedule } from "./checkoutRecoveryReminderSchedule.js";
// dist/fulfillment/contracts/index.d.ts
export type { FulfillmentAdapterConformanceSubject, FulfillmentAdapterConformanceEvidence } from "./conformance.js";
// dist/fulfillment/index.d.ts
export { FULFILLMENT_STATUS_MAP, CANONICAL_LOCAL_FULFILLMENT_STATUSES, CUSTOMER_STEP_SEQUENCE, canonicalStatusToken, stepForToken, customerStepFromSignals, phaseIndexForStep, stepLabelKey, timelineLabelForStep, trackingPhaseKeyForStep, stepUsesTruckIcon } from "./statusMap.js";
export { reconcileFulfillmentObservations, runFulfillmentReconciliationPage } from "./providerReconciliationWorker.js";
// dist/fulfillment/statusMap.d.ts
export { FULFILLMENT_STATUS_MAP, CANONICAL_LOCAL_FULFILLMENT_STATUSES, CUSTOMER_STEP_SEQUENCE, canonicalStatusToken, stepForToken, customerStepFromSignals, phaseIndexForStep, stepLabelKey, timelineLabelForStep, trackingPhaseKeyForStep, stepUsesTruckIcon } from "@openlup/core/fulfillment";
export type { FulfillmentStatusStage, FulfillmentStatusMap } from "@openlup/core/fulfillment";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/commerce/server/checkoutRecoveryReminderSchedule.d.ts
export declare function readCheckoutRecoveryReminderSchedule(db: Executor): Promise<CheckoutRecoveryReminderSchedule>;
// dist/commerce/server/configuratorIntentPersistence.d.ts
export declare function createConfiguratorIntentPersistenceRpcPort<Request extends object, Response, Command extends object, Persistence>(client: ConfiguratorIntentRpcQueryClient<Request, Command>, bindings: {
// dist/commerce/server/postgresCheckoutRecoveryTokenPort.d.ts
export interface PostgresCheckoutRecoveryTokenPort extends CheckoutRecoveryTokenPort {
// dist/fulfillment/postgresDispatchStore.d.ts
export declare function createPostgresFulfillmentDispatchStore(db: PgExecutor, host: {
// dist/fulfillment/providerDispatchWorker.d.ts
export declare function runFulfillmentDispatchWorker(input: {
// dist/fulfillment/providerReconciliationWorker.d.ts
export declare function reconcileFulfillmentObservations(input: {
```

### `packages/platform/api/communications.api.md`

Changed declarations:

```ts nocheck
// API report diff: not compiled.
export declare function createPostgresTransactionalDeliveryStore(env: PostgresDataGatewayEnv, options?: PostgresDataGatewayOptions, createTransactionLane?: (env: PostgresDataGatewayEnv, options?: PostgresDataGatewayOptions) => PostgresRoleFreeTransactionLane): PostgresTransactionalDeliveryStore;
```

### `packages/platform/api/composition.api.md`

Removed declarations:

```ts nocheck
// API report diff: not compiled.
export { advisoryLockKey, createEnvAdvisoryLock, createNoopAdvisoryLock, createPgAdvisoryLock, type AdvisoryLock, type AdvisoryLockQuerier, } from "./advisoryLock.js";
```

### `packages/platform/api/data.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/data/index.d.ts
export type { SqlExecutor } from "@openlup/core/readiness";
export { createPostgresDataGateway, createPostgresGatewayTypeOverrides, createPostgresRoleFreeTransactionLane, createPostgresTransactionRunner, postgresTimestampTzToRfc3339, resolvePostgresDataGatewayEnv, type PostgresDataGatewayEnv, type PostgresDataGatewayOptions, type PostgresRoleFreeTransactionLane, type PostgresTransactionRunner, } from "./postgresGateway.js";
export { asPostgresSqlExecutor, PgGatewayClient, PgQueryBuilder, type PgQueryExecutor, type PgShimError, type PgShimResult, } from "./queryBuilder.js";
// dist/data/postgresGateway.d.ts
export interface PostgresTransactionRunner<Client = SqlExecutor> {
export declare function createPostgresTransactionRunner(pool: Pool): PostgresTransactionRunner<SqlExecutor>;
// dist/data/queryBuilder.d.ts
export declare function asPostgresSqlExecutor(client: PgQueryExecutor): SqlExecutor;
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/data/binding.d.ts
export interface DataBindingDependencies {
export declare function createDataBindings(deps?: DataBindingDependencies): DataBindings;
// dist/data/postgresGateway.d.ts
export interface PostgresDataGatewayOptions {
export interface PostgresRoleFreeTransactionLane<G = unknown> {
/**
 * Build one role-free, per-operation lane. Do not use this for generic service
 * work: DataGatewayPort.asService remains the mandatory service_role boundary.
 * Only a named owner-authority capability of the deployment may hold a lane.
 *
 * Defaults to `PostgresRoleFreeTransactionLane<unknown>` for 1.x compatibility;
 * pass a supertype of the underlying gateway (such as `PgGatewayClient`,
 * `SqlExecutor`, or `PgQueryExecutor`) for typed callbacks without casts.
 */
export declare function createPostgresRoleFreeTransactionLane(env: PostgresDataGatewayEnv, options?: PostgresDataGatewayOptions): PostgresRoleFreeTransactionLane;
export declare function createPostgresRoleFreeTransactionLane<G>(env: PostgresDataGatewayEnv, options?: PostgresDataGatewayOptions): PostgresRoleFreeTransactionLane<[PgGatewayClient & SqlExecutor] extends [G] ? G : never>;
```

### `packages/platform/api/fulfillment-contracts.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/fulfillment/contracts/conformance.d.ts
export interface FulfillmentProviderAdapter {
export interface FulfillmentProviderRegistry {
// dist/fulfillment/contracts/index.d.ts
export type { FulfillmentProviderAdapter, FulfillmentProviderRegistry, FulfillmentAdapterConformanceSubject, FulfillmentAdapterConformanceEvidence } from "./conformance.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/fulfillment/contracts/conformance.d.ts
export interface FulfillmentAdapterConformanceSubject {
// dist/fulfillment/contracts/store.d.ts
export interface FulfillmentStorePort {
// dist/fulfillment/contracts/sync.d.ts
export interface FulfillmentStockSyncPort {
```

### `packages/platform/api/fulfillment-omnipack.api.md`

Changed declarations:

```ts nocheck
// API report diff: not compiled.
export interface OmnipackFulfillmentAdapterConfig {
export declare function createOmnipackFulfillmentAdapter(config: OmnipackFulfillmentAdapterConfig): FulfillmentProviderAdapter & {
```

### `packages/platform/api/identity.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/identity/customerSessionBinding.d.ts
type BorrowedPostgresPool = NonNullable<PostgresDataGatewayOptions["pool"]>;
export type PostgresCustomerSessionBindingOptions = {
export declare function createPostgresCustomerSessionBinding(options: PostgresCustomerSessionBindingOptions): CustomerSessionBinding & {
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/identity/customerSessionBinding.d.ts
export interface CustomerSessionBinding {
export declare function resolveCustomerSessionBinding(env: Env, options?: {
// dist/identity/postgresAccountLinkStore.d.ts
export declare function createPostgresAccountLinkStore(env: {
// dist/identity/postgresContactClientRegistrar.d.ts
export declare function createPostgresContactClientRegistrar(env: {
// dist/identity/postgresOperatorIdentity.d.ts
export declare function createPostgresOperatorIdentityStore(env: {
```

### `packages/platform/api/inventory.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/inventory/index.d.ts
export { installRenewalStockProtectionPolicy, readRenewalStockProtectionPolicy, readRenewalStockProtectionOverride, describeRenewalStockProtectionSetting, previewRenewalStockProtection, renewalStockProtectionPreviewResult, type RenewalStockProtectionPreviewConnection } from "./renewalStockProtection.js";
// dist/inventory/renewalStockProtection.d.ts
declare const key = "inventory_renewal_protection";
export declare function describeRenewalStockProtectionSetting(): {
export declare function validateRenewalStockProtection(value: unknown): RenewalStockProtectionPolicy;
export declare function readRenewalStockProtectionOverride(db: Executor): Promise<RenewalStockProtectionPolicy | undefined>;
declare const validationResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
export declare const renewalStockProtectionPreviewResult: z.ZodObject<{
type Validation = z.infer<typeof validationResult>;
type PreviewResult = z.infer<typeof renewalStockProtectionPreviewResult>;
type PreviewRefusal = {
type RefusePreview = (code: string, detail?: {
export interface RenewalStockProtectionPreviewConnection {
export declare function previewRenewalStockProtection(settingKey: typeof key, proposed: PreviewResult["proposed"], context: RenewalStockProtectionPreviewConnection & {
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/inventory/index.d.ts
export { installRenewalStockProtectionPolicy, readRenewalStockProtectionPolicy } from "./renewalStockProtection.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/inventory/postgresStockAvailability.d.ts
export declare function createPostgresStockAvailability(executor: StockQueryExecutor, options: {
```

### `packages/platform/api/invoicing.api.md`

Changed declarations:

```ts nocheck
// API report diff: not compiled.
export declare function readInvoicePaymentEvidence(payment: {
```

### `packages/platform/api/marketing-server-postgres.api.md`

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/marketing/server/postgres/acquisitionCaseRoutines.d.ts
type Options = {
// dist/marketing/server/postgres/acquisitionEvidenceRoutines.d.ts
type Options = {
// dist/marketing/server/postgres/partnerAcquisitionRoutines.d.ts
type Options = {
```

### `packages/platform/api/migrations.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/migrations/index.d.ts
export { packagedPlatformMigrationPosition } from "./packagedCatalog.js";
// dist/migrations/catalog.d.ts
export declare const PLATFORM_MIGRATION_DIRECTORY = "db/platform/migrations";
export declare const PLATFORM_MIGRATION_MANIFEST = "config/platform-migration-manifest.json";
export declare const PLATFORM_BASELINE_FILE = "db/platform/migrations/00000000000000_platform_baseline.sql";
export declare const QUALIFIED_BASELINE_FILE = "db/platform/migrations/q2_00000000000000_platform_baseline.sql";
export declare const QUALIFIED_ACTOR_FILE = "db/platform/migrations/q2_20260810180001_self_host_actor_auth.sql";
export declare const QUALIFIED_ACQUISITION_FILE = "db/platform/migrations/q2_20260816140000_acquisition_case_foundation.sql";
export declare const QUALIFIED_RUNTIME_FILE = "db/platform/migrations/q2_20261026130000_runtime_capabilities.sql";
export declare const QUALIFIED_IMPORT_FILE = "db/platform/migrations/q2_20261026140000_retained_client_subscription_import.sql";
export declare const QUALIFIED_RUNTIME_COMPLETION_FILE = "db/platform/migrations/q2_20261028100000_runtime_capability_completion.sql";
export declare const QUALIFIED_OWNER_PATH_FILE = "db/platform/migrations/q2_20261029100000_owner_path_name_resolution.sql";
export declare const QUALIFIED_LOCK_AND_CONFLICT_COMPLETION_FILE = "db/platform/migrations/q2_20261103200000_runtime_lock_and_conflict_completion.sql";
export declare const ADMIN_BASELINE_FILE = "db/platform/migrations/qa_00000000000000_platform_baseline.sql";
export declare const ADMIN_ACTOR_FILE = "db/platform/migrations/qa_20260810180001_self_host_actor_auth.sql";
export declare const ADMIN_ACQUISITION_FILE = "db/platform/migrations/qa_20260816140000_acquisition_case_foundation.sql";
export declare const ADMIN_RUNTIME_FILE = "db/platform/migrations/qa_20261026130000_runtime_capabilities.sql";
export declare const ADMIN_IMPORT_FILE = "db/platform/migrations/qa_20261026140000_retained_client_subscription_import.sql";
export declare const REVISED_ADMIN_ACTOR_FILE = "db/platform/migrations/qb_20260810180001_self_host_actor_auth.sql";
export declare const REVISED_ADMIN_ACQUISITION_FILE = "db/platform/migrations/qb_20260816140000_acquisition_case_foundation.sql";
export declare const REVISED_ADMIN_RUNTIME_FILE = "db/platform/migrations/qb_20261026130000_runtime_capabilities.sql";
export declare const REVISED_ADMIN_IMPORT_FILE = "db/platform/migrations/qb_20261026140000_retained_client_subscription_import.sql";
export type AddedMigration = {
export type PlatformMigrationManifestEntry = {
export type PlatformMigrationPlan = {
export type PlatformQualifiedBindingShape = {
type QualifiedInventories = {
type QualifiedPlan = Omit<PlatformMigrationPlan, "schemaVersion" | "objectInventorySha256"> & {
type AdminPlan = Omit<PlatformMigrationPlan, "schemaVersion" | "objectInventorySha256"> & {
export type PlatformMigrationManifest = PlatformMigrationPlan | (Omit<PlatformMigrationPlan, "schemaVersion"> & {
export type PlatformMigrationGeneration = "legacy" | "qualified-v2" | "qualified-admin";
export type PlatformAdminBindingShape = {
export type PlatformManifestInput = {
export type PlatformMigrationCatalog = {
export declare function isPlatformMigrationPath(file: string): boolean;
export declare function isQualifiedPlatformMigrationPath(file: string): boolean;
export declare function isChannelIngestMigrationPath(file: string): boolean;
export declare function sha256(value: string): string;
export declare function evaluatePlatformMigrationManifest(input: PlatformManifestInput): string[];
export declare function evaluatePlatformMigrationManifestMetadata(manifest: unknown): string[];
export declare function selectPlatformMigrationManifest(manifest: PlatformMigrationManifest, generation: PlatformMigrationGeneration, binding?: PlatformQualifiedBindingShape | PlatformAdminBindingShape): PlatformMigrationPlan;
export declare function evaluateSelectedPlatformMigrationManifest(input: PlatformManifestInput, generation: PlatformMigrationGeneration): string[];
export declare function evaluatePlatformMigrationManifestHistory(previous: PlatformMigrationManifest, current: PlatformMigrationManifest, addedFiles: readonly string[]): string[];
export declare function readPlatformMigrationManifest(root: string): unknown | null;
export declare function readPlatformMigrations(root: string): PlatformMigrationCatalog;
export declare function runPlatformMigrationManifestCheck(root?: string, objectInventoryPayload?: string): string[];
export {};
// dist/migrations/packagedCatalog.d.ts
type PackagedManifest = {
export declare function readPackagedPlatformManifest(): {
export declare function packagedPlatformMigrationPosition(catalogPath: string, sha256: string): number;
export declare function readPackagedPlatformCatalog(): {
export {};
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/migrations/platformRunner.d.ts
export interface PlatformPostgresMigrationRunnerOptions {
// dist/migrations/postgresRunner.d.ts
export interface PostgresMigrationRunnerOptions {
```

### `packages/platform/api/operations-contracts.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/operations/contracts/index.d.ts
export type * from "./settings.js";
// dist/operations/contracts/settings.d.ts
interface SettingMetadata {
export type SettingDescriptor = SettingMetadata & {
export interface SettingRefusal {
export {};
```

### `packages/platform/api/operations-server.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/operations/server/index.d.ts
export type { SettingReader, SettingPreviewer } from "./settingsRead.js";
export { settingDescriptorSchema, settingRefusalSchema, settingsToolOutputSchema, toolInputSchema } from "./toolSchema.js";
export { runSettingsCommand, type SettingsAppBindings, type SettingsFileEntry } from "./settingsCommand.js";
// dist/operations/server/settingsCommand.d.ts
type PreviewDocument = {
type ValueDescriptor = Extract<SettingDescriptor, {
type Location = Extract<ValueDescriptor["change"], {
export type SettingsFileEntry = {
export type SettingsAppBindings = {
type SettingsDatabase = {
type SettingsHost = {
type SettingsIo = {
export declare function runSettingsCommand(argv: readonly string[], io: SettingsIo, host?: SettingsHost): Promise<number>;
export {};
// dist/operations/server/settingsRead.d.ts
type JsonValue = z.infer<ReturnType<typeof z.json>>;
type ListResult = {
type Observation = {
type ShowResult = {
export type SettingReader = () => Promise<{
export declare function listSettings(input: unknown): ListResult | {
export declare function showSetting(input: unknown, readers?: Readonly<Record<string, SettingReader>>): Promise<ShowResult | {
export declare function explainSetting(codeOrKey: string): {
export declare function invalidSettingsCommand(): {
type PreviewRefusal = {
export declare function refuseSettingsPreview(code: string, detail?: Pick<SettingRefusal, "path" | "hint">): PreviewRefusal;
export declare const settingsPreviewRequest: z.ZodObject<{
export type SettingPreviewer<Result extends {
export declare function previewSetting<Result extends {
export {};
// dist/operations/server/toolSchema.d.ts
export declare function toolInputSchema(schema: ZodType, io?: "input" | "output"): Record<string, unknown>;
export declare const settingDescriptorSummary: z.ZodObject<{
export declare const settingDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
export declare function settingRefusalSchema(codes: readonly string[]): z.ZodObject<{
export declare function settingsToolOutputSchema(result: ZodType, refusal: ReturnType<typeof settingRefusalSchema>, schemaVersion?: 1): Record<string, unknown>;
```

### `packages/platform/api/operations.api.md`

Changed declarations:

```ts nocheck
// API report diff: not compiled.
export declare const WATCHDOG_STALE_AFTER_SECONDS: number;
```

### `packages/platform/api/payments-contracts.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/contracts/adapter.d.ts
export type AdapterCaptureHandoff = PaymentMethodHandoff["kind"] | "customer-authorization";
export type CoreCapabilityOverrides = Partial<Pick<PaymentProviderCapabilityDescriptor, "captureFlows" | "payerContext">>;
export interface PaymentProviderRegistry {
// dist/payments/contracts/index.d.ts
export type { TransientSecret, PaymentMethodHandoff, PaymentRefusalEnvelope, PaymentExecutionEnvelope, PaymentAttemptPort, PaymentAdapterCapabilities, PaymentAdapter, AdapterCaptureHandoff, CoreCapabilityOverrides, PaymentProviderRegistry, } from "./adapter.js";
export type { PaymentAdapterConformanceSubject, PaymentAdapterConformanceEvidence, ExecutionCapability, ExecutionSubject, ExecutionProviderIdentity, ExecutionEvidence, DurableEventCounts, DurableEventAggregate, DurableEventFixtureCardinality, DurableEventWriteCardinality, DurableEventCardinalityExpectations, DurableEventSnapshot, EventReceipt, DurableEventCapability, DurableEventEvidence, } from "./conformance.js";
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/contracts/index.d.ts
export type { TransientSecret, PaymentMethodHandoff, PaymentRefusalEnvelope, PaymentExecutionEnvelope, PaymentAttemptPort, PaymentAdapterCapabilities, PaymentAdapter, } from "./adapter.js";
export type { PaymentAdapterConformanceSubject, PaymentAdapterConformanceEvidence } from "./conformance.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/contracts/evidence.d.ts
export type VerifiedPaymentEvidence = VerifiedIdentity & {
export type PaymentReadbackEnvelope = {
// dist/payments/contracts/reconciliation.d.ts
export interface ProviderReconciliationStatus {
export interface PaymentProviderReconciliationPort {
export interface VerifiableAttemptSnapshot {
```

### `packages/platform/api/payments-stripe.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/stripe/intentMapper.d.ts
export declare function capturedAmountMinor(value: unknown): number | null;
// dist/payments/stripe/paymentFailureEvidence.d.ts
export { evidenceToken, evidenceRecord, serializeFailureEvidence, failureEvidencePayload, } from "../paymentFailureEvidence.js";
export type { FailureObservationSource, FailureObservationDisposition, PaymentFailureEvidence, } from "../paymentFailureEvidence.js";
// dist/payments/stripe/stripePaymentReconciliationProvider.d.ts
export declare function readStripeIntentStatus(intent: StripeIntentLike, providerPaymentId: string, purpose?: string): ProviderReconciliationStatus;
// dist/payments/paymentFailureEvidence.d.ts
export type FailureObservationSource = "execution" | "webhook" | "readback";
export type FailureObservationDisposition = "present" | "absent" | "unreadable" | "read_failed" | "read_timeout";
export interface PaymentFailureEvidence {
export declare function evidenceToken(value: unknown): string | null;
export declare function evidenceRecord(value: unknown): Record<string, unknown>;
export declare function serializeFailureEvidence(input: PaymentFailureEvidence): PaymentFailureEvidence;
export declare function failureEvidencePayload(evidence: PaymentFailureEvidence | null | undefined): Record<string, unknown>;
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/stripe/paymentFailureEvidence.d.ts
export type FailureObservationSource = "execution" | "webhook" | "readback";
export type FailureObservationDisposition = "present" | "absent" | "unreadable" | "read_failed" | "read_timeout";
export interface PaymentFailureEvidence {
export declare function evidenceToken(value: unknown): string | null;
export declare function evidenceRecord(value: unknown): Record<string, unknown>;
export declare function serializeFailureEvidence(input: PaymentFailureEvidence): PaymentFailureEvidence;
export declare function failureEvidencePayload(evidence: PaymentFailureEvidence | null | undefined): Record<string, unknown>;
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/stripe/donorContracts.d.ts
export interface ProviderReconciliationStatus {
```

### `packages/platform/api/payments-tpay.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/tpay/paymentFailureEvidence.d.ts
export { evidenceToken, evidenceRecord, serializeFailureEvidence, failureEvidencePayload, } from "../paymentFailureEvidence.js";
export type { FailureObservationSource, FailureObservationDisposition, PaymentFailureEvidence, } from "../paymentFailureEvidence.js";
// dist/payments/tpay/tpayTransactionPayload.d.ts
export declare function paidMajorToMinor(value: unknown): number | null;
export declare function readNullableTransactionAmount(raw: unknown): number | null;
type TransactionAmountField = {
export declare function readPaidAmountMinor(transaction: Record<string, unknown>, payments: Record<string, unknown>): number | null;
export declare const malformedConfiguredTransactionAmount: unique symbol;
export declare function readTransactionAmountEvidence(transaction: Record<string, unknown> & {
export {};
// dist/payments/tpay/webhookJwsVerifier.d.ts
export declare function parseX509Certificate(pem: string): X509Certificate;
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/tpay/paymentFailureEvidence.d.ts
export type FailureObservationSource = "execution" | "webhook" | "readback";
export type FailureObservationDisposition = "present" | "absent" | "unreadable" | "read_failed" | "read_timeout";
export interface PaymentFailureEvidence {
export declare function evidenceToken(value: unknown): string | null;
export declare function evidenceRecord(value: unknown): Record<string, unknown>;
export declare function serializeFailureEvidence(input: PaymentFailureEvidence): PaymentFailureEvidence;
export declare function failureEvidencePayload(evidence: PaymentFailureEvidence | null | undefined): Record<string, unknown>;
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/tpay/donorContracts.d.ts
export interface ProviderReconciliationStatus {
```

### `packages/platform/api/payments.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/index.d.ts
export { METHOD_SCHEME_SNAPSHOT_KEY, METHOD_LAST_DIGITS_SNAPSHOT_KEY, METHOD_EXPIRES_AT_SNAPSHOT_KEY, methodFactSnapshotKeys, expiryForMethodRefWrite, readMethodLifecycleEvent, } from "./paymentMethodLifecycle.js";
export type { ProviderWebhookWithMethodLifecycle } from "./paymentMethodLifecycle.js";
export { evidenceToken, evidenceRecord, serializeFailureEvidence, failureEvidencePayload, } from "./paymentFailureEvidence.js";
export type { FailureObservationSource, FailureObservationDisposition, PaymentFailureEvidence, } from "./paymentFailureEvidence.js";
export { silenceIsOverdue } from "./paymentAttemptSilenceWindow.js";
export { tryReopenPreparedAbsence } from "./paymentProviderReconciliationAbsenceReopen.js";
export { CAPTURE_REVIEW_RESULT_KIND, PROTECTED_FAILURE_RESULT_KIND, evidencePayload, terminalAmountMismatch, applyResultKey, observedEvidenceKey, preparedAttemptEvidenceKey, absenceReopenKey, absenceProbeEvidenceKey, bucket, clamp, safeMessage, classificationOf, } from "./paymentProviderReconciliationEvidence.js";
export type { PaymentRefusalHandoff, PaymentFailureDunningPort } from "./paymentWebhookPostProcessing.js";
export { DEFAULT_STALE_AFTER_SECONDS, runPaymentProviderReconciliationWorker, } from "./paymentProviderReconciliationWorker.js";
export { verifyPaymentAttemptNow, hasCommittedCaptureReview, sameCanonicalAttempt, toClaimedAttemptShape, } from "./paymentVerifyNowService.js";
export { paymentVerifyRequestSchema, createCommercePaymentVerifyHandler, } from "./paymentVerifyNowHandler.js";
export type { PaymentVerifyRequest } from "./paymentVerifyNowHandler.js";
export { createPaymentProviderRegistry, toCoreCaptureHandoff, fromCoreCaptureHandoff, toCorePaymentProviderCapability, } from "./providerRegistry.js";
// dist/payments/paymentVerifyNowService.d.ts
export declare function hasCommittedCaptureReview(snapshot: VerifiableAttemptSnapshot, port: Pick<PaymentProviderReconciliationPort, "readCaptureReview">): Promise<boolean>;
export declare function sameCanonicalAttempt(before: VerifiableAttemptSnapshot, after: VerifiableAttemptSnapshot | null): after is VerifiableAttemptSnapshot;
// dist/payments/paymentAttemptSilenceWindow.d.ts
export declare function silenceIsOverdue(capabilities: SilenceWindowLookup | undefined, attempt: ClaimedPaymentAttempt, now: string): boolean;
// dist/payments/paymentProviderReconciliationAbsenceReopen.d.ts
export declare function tryReopenPreparedAbsence(input: PaymentProviderReconciliationWorkerInput, attempt: ClaimedPaymentAttempt, now: string): Promise<boolean>;
// dist/payments/paymentProviderReconciliationEvidence.d.ts
export declare const CAPTURE_REVIEW_RESULT_KIND = "ignored_success_requiring_review";
export declare const PROTECTED_FAILURE_RESULT_KIND = "ignored_failure_protected_state";
export declare function evidencePayload(attempt: ClaimedPaymentAttempt, providerStatus: ProviderReconciliationStatus, extra: Record<string, unknown>): Record<string, unknown>;
export declare function terminalAmountMismatch(attempt: ClaimedPaymentAttempt, status: ProviderReconciliationStatus): string | null;
export declare function applyResultKey(attempt: ClaimedPaymentAttempt, status: "succeeded" | "failed"): string;
export declare function observedEvidenceKey(attempt: ClaimedPaymentAttempt, status: ProviderReconciliationStatusKind, correction: "observed" | "failed", checkedAt: string): string;
export declare function preparedAttemptEvidenceKey(attempt: ClaimedPaymentAttempt, checkedAt: string): string;
export declare function absenceReopenKey(attempt: ClaimedPaymentAttempt): string;
export declare function absenceProbeEvidenceKey(attempt: ClaimedPaymentAttempt, checkedAt: string): string;
export declare function bucket(value: string): string;
export declare function clamp(value: number, min: number, max: number): number;
export declare function safeMessage(error: unknown): string;
export declare function classificationOf(resultStatus: "succeeded" | "failed", providerStatus: ProviderReconciliationStatus): {
// dist/payments/providerRegistry.d.ts
export declare function toCoreCaptureHandoff(handoff: AdapterCaptureHandoff): PaymentMethodCaptureHandoff | null;
export declare function fromCoreCaptureHandoff(handoff: PaymentMethodCaptureHandoff): Exclude<AdapterCaptureHandoff, "redirect">;
export declare function toCorePaymentProviderCapability(capabilities: PaymentAdapterCapabilities, overrides?: CoreCapabilityOverrides): PaymentProviderCapabilityDescriptor;
export declare function createPaymentProviderRegistry(adapters: readonly PaymentAdapter[]): PaymentProviderRegistry;
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/index.d.ts
export { readMethodLifecycleEvent } from "./paymentMethodLifecycle.js";
export { runPaymentProviderReconciliationWorker } from "./paymentProviderReconciliationWorker.js";
export { verifyPaymentAttemptNow } from "./paymentVerifyNowService.js";
export { createCommercePaymentVerifyHandler } from "./paymentVerifyNowHandler.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/payments/checkoutRecoveryPaymentResolver.d.ts
export declare function createCheckoutRecoveryPaymentResolver(deps: {
// dist/payments/paymentVerifyNowHandler.d.ts
export declare function createCommercePaymentVerifyHandler(deps: {
// dist/payments/paymentVerifyNowService.d.ts
export declare function verifyPaymentAttemptNow(input: {
// dist/payments/postgresProviderRail.d.ts
export interface PostgresProviderAttemptSnapshot {
// dist/payments/verifiedIngress.d.ts
export interface NormalizedProviderPaymentWebhook {
export interface PaymentWebhookControlPort {
```

### `packages/platform/api/scheduler.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/scheduler/advisoryLock.d.ts
export interface EnvAdvisoryLockOptions {
// dist/scheduler/index.d.ts
export { advisoryLockKey, createEnvAdvisoryLock, createNoopAdvisoryLock, createPgAdvisoryLock, type AdvisoryLock, type AdvisoryLockQuerier, type EnvAdvisoryLockOptions, } from "./advisoryLock.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/scheduler/advisoryLock.d.ts
export declare function createEnvAdvisoryLock(env: Record<string, string | undefined>, connect?: (connectionString: string) => Promise<AdvisoryLockQuerier>, options?: EnvAdvisoryLockOptions): AdvisoryLock | null;
```

### `packages/platform/api/subscriptions.api.md`

Added declarations:

```ts nocheck
// API report diff: not compiled.
// dist/subscriptions/index.d.ts
export { executeRenewalCycle, prepareRenewalAttempt, checkRenewalDeliveryAdmission, createDefaultRenewalCyclePolicy } from "./renewalCycleMechanism.js";
export { recordRenewalPreflightBlock, replayRenewalAttempt, declinedRenewalOutcome, requiresActionRenewalOutcome, createDefaultRenewalPreflightPolicy } from "./renewalCycleRefusalMechanism.js";
export { propagateRenewalFailure, createDefaultRenewalFailurePolicy } from "./renewalCycleFailureMechanism.js";
export { createPostgresNativeCheckoutSubscriptionPort } from "./postgresNativeCheckoutSubscriptionPort.js";
export type { PostgresNativeCheckoutSubscriptionPort } from "./postgresNativeCheckoutSubscriptionPort.js";
// dist/subscriptions/renewalCycleFailureMechanism.d.ts
export declare function createDefaultRenewalFailurePolicy(overrides: Pick<RenewalFailurePolicy, "resolveClassification"> & Partial<RenewalFailurePolicy>): RenewalFailurePolicy;
// dist/subscriptions/renewalCycleMechanism.d.ts
export declare function createDefaultRenewalCyclePolicy<D extends HostedRenewalDue, CI, IR extends RenewalIntentResult, P extends string, I extends PaymentExecutionBaseInput, M extends string | null | undefined, F extends string>(overrides: Pick<RenewalCyclePolicy<D, CI, IR, P, I, M, F>, "validateProvider" | "intentInput" | "identity" | "providerFlow" | "prepareInput" | "executionInput" | "isNotChargeable" | "mandateBlockReason" | "preflight" | "outcome"> & Partial<Omit<RenewalCyclePolicy<D, CI, IR, P, I, M, F>, "replay">> & {
// dist/subscriptions/renewalCycleRefusalMechanism.d.ts
export declare function defaultReadRenewalTotalGrossMinor(orderSnapshot: Record<string, unknown>): number | null;
export declare function defaultRenewalCycleKey<D extends HostedRenewalDue>(due: D): string;
export declare function defaultRenewalExecutionKey(cycleOrderIdempotencyKey: string, retryAttempt: number, providerAttemptSequence: number): string;
export declare function defaultFailedRenewalResult<D extends HostedRenewalDue>(due: D, cycleId: string | null, cycleNumber: number | null, orderId: string | null, paymentIntentId: string | null, reason: string, propagation?: FailurePropagationResult): SubscriptionRenewalChargeResult;
export declare function createDefaultRenewalPreflightPolicy<D extends HostedRenewalDue, CI, IR extends RenewalIntentResult>(overrides: Pick<RenewalPreflightPolicy<D, CI, IR>, "intentInput" | "identity" | "failure"> & Partial<RenewalPreflightPolicy<D, CI, IR>>): RenewalPreflightPolicy<D, CI, IR>;
// dist/subscriptions/postgresNativeCheckoutSubscriptionPort.d.ts
export interface PostgresNativeCheckoutSubscriptionPort {
export declare function createPostgresNativeCheckoutSubscriptionPort(executor: SubscriptionQueryExecutor): PostgresNativeCheckoutSubscriptionPort;
```

Removed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/subscriptions/index.d.ts
export { executeRenewalCycle, prepareRenewalAttempt, checkRenewalDeliveryAdmission } from "./renewalCycleMechanism.js";
export { recordRenewalPreflightBlock, replayRenewalAttempt, declinedRenewalOutcome, requiresActionRenewalOutcome } from "./renewalCycleRefusalMechanism.js";
export { propagateRenewalFailure } from "./renewalCycleFailureMechanism.js";
```

Changed declarations:

```ts nocheck
// API report diff: not compiled.
// dist/subscriptions/automaticRenewal.d.ts
export interface AutomaticRenewalRunDeps {
// dist/subscriptions/postgresLifecycleMessages.d.ts
export interface NativeLifecycleMessagesOptions {
// dist/subscriptions/postgresProviderRenewalBinding.d.ts
type ProviderRenewalWebhookControl = {
type ProviderRenewalAttempt = {
export interface ProviderRenewalPaymentPorts {
```
