Skip to content

SyncStorageDeclaration

Defined in: packages/contracts/src/config.ts:223

The registry’s storage contract (ADR-0049 decision 1, ADR-0047). Storage is PART OF THE DATA CONTRACT: whether losing the last not-yet-flushed action is acceptable, and whether OPFS may be used at all, is decided by what the data IS — so it is declared once on the registry, not at any minting/open site.

  • durability defaults to "relaxed" and binds every toolkit-minted open of every store the registry mints (its own boot AND the provision/spare path). No open-site option exists to contradict it; a capability fallback keeps the declared mode. A no-op on memory clones.
  • backend defaults to "opfs" and scopes the BROWSER store only; Node/file and memory clones are unaffected. "idbfs" opts the store out of the capability/election machinery.
  • build defaults to "c" and names the pgwasm build that owns the store’s datadir (ADR-0063). It resolves and binds exactly as durability does.
  • engine defaults to ABSENT — the toolkit’s own store. Present, its module URL is the store factory that mints this store instead (ADR-0050 addendum 2026-09-08). It is part of the declaration for the same reason the other two are: a store’s datadir belongs to the engine that wrote it, so a different module is a DIFFERENT store, minted fresh under a fresh path, never a rehome of an existing one.

optional backend?: StorageBackend

Defined in: packages/contracts/src/config.ts:224


optional build?: StorageBuild

Defined in: packages/contracts/src/config.ts:226


optional durability?: StorageDurability

Defined in: packages/contracts/src/config.ts:225


optional engine?: StorageEngineDeclaration

Defined in: packages/contracts/src/config.ts:227