Skip to content

ProvisionPayload

Defined in: packages/client/src/worker/protocol.ts:115

tab → worker: pre-spawn the store WITHOUT booting the engine (ADR-0032 decision 5). Sent at the login screen against the freshly-named spare worker: the worker only runs PGlite create/initdb (off every thread that matters) and holds the raw store idle — no schema, no shape streams, no token — until the real AttachPayload arrives (with config + token) and adopts the provisioned store. Role-agnostic on purpose: the spare is minted before the user (and role) is known, so provisioning carries no registry — the schema is applied at attach with the role-resolved registry.

optional storage?: SyncStorageDeclaration

Defined in: packages/client/src/worker/protocol.ts:136

The tab’s WIRE storage declaration (ADR-0050) — the same declaration the pre-placement declaration message carried, repeated here so the ENGINE binds it (the mint’s durability) wherever it runs. The first provision/attach binds the store’s declaration; a later payload whose explicit field disagrees with the bound resolution is refused typed (StorageDeclarationRefusedError).


optional storeId?: string

Defined in: packages/client/src/worker/protocol.ts:117

The bound store id (informational; naming is done tab-side via the SharedWorker name).


optional storePath?: string

Defined in: packages/client/src/worker/protocol.ts:122

The plain store PATH (ADR-0036) to create ahead of attach — a name, not a storage URL; the worker derives the backend (IndexedDB in a browser worker). When omitted, storeId/the worker default is used.