@pgxsinkit/client 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -43,15 +43,15 @@
43
43
  "// The placement probe (ADR-0049 decision 1, plan step 4). The SharedWorker decides its engine home by\n// ACTUALLY opening a sync-access handle in its own scope — the bench phase-0 mechanism\n// (`apps/perf-lab/src/bench/sharedworker-proof.worker.ts`, probe stage) — never by sniffing for the\n// PRESENCE of `createSyncAccessHandle` on a prototype. Presence says nothing: Chromium and Firefox\n// expose the method in a SharedWorker yet REFUSE the open there, while WebKit grants it. Only a real open\n// tells the truth, so the verdict here is a real open on a throwaway scratch file, removed afterwards.\n//\n// NEVER CACHED (invariant 8: \"probe per boot\"). There is deliberately no module-level memo: engines and\n// modes change across SharedWorker lifetimes, and a stale grant would place the engine in a scope that no\n// longer holds handles. Every call runs the full probe. This module owns no state whatsoever.\n//\n// The probe operates ENTIRELY under the toolkit's `pgxsinkit/probe/` namespace (from\n// `opfsProbeDirectoryPath()` — never re-derived here). It never touches the OPFS root directly and NEVER\n// goes inside or beside any store directory: a store directory is under whole-directory ownership by the\n// opfs-repacked VFS (ADR-0048), which fails CLOSED on any unowned entry it finds, so a scratch file placed\n// there would poison a real store's boot. The probe namespace is disjoint from `pgxsinkit/stores` and\n// `pgxsinkit/commitments` (ADR-0049 D6, invariant 11), so it can never contend with a store.\n\nimport { opfsProbeDirectoryPath } from \"./store-path\";\n\n/** Monotonic clock (ms) — `performance.now()` where available, else `Date.now()` (matches `boot-report.ts`). */\nconst nowMs = (): number => (typeof performance !== \"undefined\" ? performance.now() : Date.now());\n\n/**\n * The minimal structural shape of the OPFS sync-access handle the probe opens and immediately closes. The\n * open is the whole verdict; `close()` releases it so the scratch file can be removed. Typed locally so this\n * module carries no DOM lib dependency (the pattern `store-path.ts` uses for OPFS handles).\n */\nexport interface OpfsSyncAccessHandle {\n close(): void;\n}\n\n/**\n * The minimal structural shape of an OPFS `FileSystemFileHandle` the probe opens a sync-access handle on.\n * `createSyncAccessHandle` is typed as POSSIBLY ABSENT on purpose: the probe never pre-checks it — it calls\n * it, and absence at CALL time surfaces as the thrown `TypeError` we report verbatim, which is itself an\n * honest \"no sync access here\" verdict rather than a presence sniff.\n */\nexport interface OpfsProbeFileHandle {\n createSyncAccessHandle?: () => Promise<OpfsSyncAccessHandle>;\n}\n\n/**\n * The minimal structural shape of the OPFS `FileSystemDirectoryHandle` the probe walks and creates under.\n * All three hops use `{ create: true }`: the probe MAKES its namespace (unlike `store-path.ts`'s\n * never-creating existence walk). Declared locally so this module carries no DOM lib dependency.\n */\nexport interface OpfsProbeDirectoryHandle {\n getDirectoryHandle(name: string, options: { create: true }): Promise<OpfsProbeDirectoryHandle>;\n getFileHandle(name: string, options: { create: true }): Promise<OpfsProbeFileHandle>;\n removeEntry(name: string): Promise<void>;\n}\n\n/** The outcome of one placement probe. The probe ANSWERS; it never rejects. */\nexport interface PlacementProbeResult {\n /** True only when a REAL `createSyncAccessHandle` open succeeded in this scope. */\n granted: boolean;\n /** Verbatim `Name: message` of the denial/failure when not granted (diagnostics; never parsed). */\n error?: string;\n /** Wall-clock ms the probe took (injectable clock). */\n ms: number;\n}\n\n/** Injectable seams so the probe is deterministic in a Bun unit test (no real OPFS there). */\nexport interface PlacementProbeDeps {\n /**\n * The OPFS root getter. Omit in production: the default reads `navigator.storage.getDirectory` off\n * `globalThis` (structural, no DOM lib). Absent API → the API-absent verdict below.\n */\n getRoot?: () => Promise<OpfsProbeDirectoryHandle>;\n /**\n * The scratch file name to open under `pgxsinkit/probe/`. Defaults to `probe-<random>` — UNIQUE per call\n * so concurrent SharedWorkers (different stores, same origin) can probe simultaneously without contending\n * on one file. Injected for deterministic tests.\n */\n scratchName?: string;\n /** Wall clock. Defaults to `performance.now()`-or-`Date.now()` (the `boot-report.ts` `nowMs` pattern). */\n now?: () => number;\n}\n\n/** The API-absent verdict message — no throw occurred, so there is no `Name: message` to report verbatim. */\nconst OPFS_API_ABSENT_ERROR = \"OPFS API not available: navigator.storage.getDirectory is absent in this scope\";\n\n/** Verbatim `Name: message` attribution the diagnostics envelope wants (never parsed downstream). */\nfunction describeProbeError(error: unknown): string {\n if (error instanceof Error) return `${error.name}: ${error.message}`;\n return String(error);\n}\n\n/** The default scratch suffix — a short random tail so each probe file is unique per call. */\nfunction defaultScratchName(): string {\n const uuid = (globalThis as { crypto?: { randomUUID?: () => string } }).crypto?.randomUUID?.();\n // `randomUUID` exists in every scope pgxsinkit runs a probe in (browser SharedWorker, Bun); the fallback\n // only guards exotic embeds and is still unique enough for a per-call scratch name.\n return `probe-${uuid ? uuid.slice(0, 8) : Math.random().toString(36).slice(2, 10)}`;\n}\n\n/** Resolve the default OPFS root getter off `globalThis`, or `null` when the API is absent. */\nfunction resolveDefaultGetRoot(): (() => Promise<OpfsProbeDirectoryHandle>) | null {\n const storage = (\n globalThis as {\n navigator?: { storage?: { getDirectory?: () => Promise<OpfsProbeDirectoryHandle> } };\n }\n ).navigator?.storage;\n const getDirectory = storage?.getDirectory;\n if (getDirectory == null) return null;\n return () => getDirectory.call(storage);\n}\n\n/**\n * Probe whether a REAL `createSyncAccessHandle` open succeeds in the executing scope — the ADR-0049 D1\n * verdict that decides the engine home. Granted → the engine boots in this scope (SharedWorker-direct) and\n * election never engages; denied → router-only mode (attach acks carry `electionRequired: true`).\n *\n * Sequence, all under the `pgxsinkit/probe/` namespace ({@link opfsProbeDirectoryPath}):\n * 1. Resolve the OPFS root (`navigator.storage.getDirectory()`); API absent → {@link OPFS_API_ABSENT_ERROR}.\n * 2. Walk/create `pgxsinkit` → `probe` (`{ create: true }`).\n * 3. Create the scratch file (`{ create: true }`).\n * 4. Call `createSyncAccessHandle()` — the verdict. Absence at call time throws a `TypeError` we report.\n * 5. On success: `close()` the handle → granted.\n * 6. ALWAYS (finally): `removeEntry` the scratch file, best-effort.\n *\n * Any throw in steps 1–4 (bar the API-absent early return) → `{ granted: false, error: \"Name: message\" }`.\n * The probe NEVER rethrows: it answers, it never fails. And it is NEVER cached — every call probes afresh\n * (invariant 8).\n */\nexport async function probeOpfsSyncAccess(deps: PlacementProbeDeps = {}): Promise<PlacementProbeResult> {\n const now = deps.now ?? nowMs;\n const start = now();\n const elapsed = (): number => Math.max(0, now() - start);\n\n const getRoot = deps.getRoot ?? resolveDefaultGetRoot();\n if (getRoot == null) {\n // API absent: no handle open was even attempted, so there is no thrown error to attribute verbatim.\n return { granted: false, error: OPFS_API_ABSENT_ERROR, ms: elapsed() };\n }\n\n const scratchName = deps.scratchName ?? defaultScratchName();\n const [container, probe] = opfsProbeDirectoryPath();\n\n // Held so `finally` can remove the scratch file once the probe directory has been resolved; undefined\n // means the walk never got that far (nothing to clean up).\n let probeDir: OpfsProbeDirectoryHandle | undefined;\n try {\n const root = await getRoot();\n const containerHandle = await root.getDirectoryHandle(container, { create: true });\n probeDir = await containerHandle.getDirectoryHandle(probe, { create: true });\n const fileHandle = await probeDir.getFileHandle(scratchName, { create: true });\n // Call, never pre-check: absence surfaces as the thrown TypeError we report verbatim (a real \"no sync\n // access\" verdict), not as a method-presence sniff.\n const open = (fileHandle as { createSyncAccessHandle: () => Promise<OpfsSyncAccessHandle> }).createSyncAccessHandle;\n const handle = await open.call(fileHandle);\n handle.close();\n return { granted: true, ms: elapsed() };\n } catch (error) {\n return { granted: false, error: describeProbeError(error), ms: elapsed() };\n } finally {\n if (probeDir != null) {\n try {\n await probeDir.removeEntry(scratchName);\n } catch {\n // Best-effort cleanup: a leftover scratch file in the probe namespace harms nothing (it is not a\n // store, and the next probe uses a fresh unique name), and a cleanup error must NEVER demote a\n // granted verdict — the verdict was already decided by the open above.\n }\n }\n }\n}\n",
44
44
  "// The control-plane protocol (ADR-0049 step 5). This module defines the PURE types + rules the router\n// (communication centre), the elected engine worker, and the attach client all share for engine placement\n// and relocation. It is deliberately IO-FREE and worker-FREE — no `postMessage`, no MessagePort handling,\n// no timers — so the whole control plane is unit-testable with no worker at all (the same discipline the\n// bridge `protocol.ts` follows). Later steps wire these types into `protocol.ts`, the router, the attach\n// client, and the engine entry; this file only owns the vocabulary.\n//\n// Bounded-context terms (CONTEXT.md § \"Language — engine placement\") are used exactly: engine identity,\n// handoff window, engine home, communication centre, elected engine worker.\n\n// ─── A. Engine identity (ADR D4, invariant 7; CONTEXT \"Engine identity\") ─────────\n\n/** Namespaced wire key shared by every placement control-plane participant. */\nexport const ENGINE_CONTROL_ENVELOPE_KEY = \"pgx0049\" as const;\n\n/** Wrap a control message in the namespaced envelope used beside the bridge protocol. */\nexport function wrapControlEnvelope(message: EngineControlMessage): {\n [ENGINE_CONTROL_ENVELOPE_KEY]: EngineControlMessage;\n} {\n return { [ENGINE_CONTROL_ENVELOPE_KEY]: message };\n}\n\n/** Read a control message from its namespaced envelope, ignoring unrelated bridge traffic. */\nexport function readControlEnvelope(data: unknown): EngineControlMessage | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const message = (data as { [ENGINE_CONTROL_ENVELOPE_KEY]?: unknown })[ENGINE_CONTROL_ENVELOPE_KEY];\n if (typeof message !== \"object\" || message === null) return undefined;\n if (typeof (message as { type?: unknown }).type !== \"string\") return undefined;\n return message as EngineControlMessage;\n}\n\n/**\n * The PAIR naming one announced engine: the SharedWorker instance that stamped it plus a generation\n * counter that is monotonic ONLY within that one SharedWorker instance (it resets with the SharedWorker).\n * Authority and staleness checks always compare the pair — never the bare counter — because two different\n * SharedWorker instances can each hold a generation `0`.\n */\nexport interface EngineIdentity {\n /** Opaque id of the SharedWorker instance that minted this identity. Scopes {@link generation}. */\n swInstanceId: string;\n /** Monotonic counter WITHIN one `swInstanceId`; resets to 0 under a new SharedWorker instance. */\n generation: number;\n}\n\n/** Two identities are equal only when BOTH fields match (the pair, never the bare counter). */\nexport function engineIdentityEquals(a: EngineIdentity, b: EngineIdentity): boolean {\n return a.swInstanceId === b.swInstanceId && a.generation === b.generation;\n}\n\n/**\n * Staleness rule (invariant 7): a tagged message is applied ONLY when its identity equals the CURRENT\n * identity exactly — the pair, never the bare counter (it resets with the SharedWorker). So a message is\n * STALE precisely when it is not `engineIdentityEquals` the current identity.\n */\nexport function isStaleIdentity(current: EngineIdentity, tagged: EngineIdentity): boolean {\n return !engineIdentityEquals(current, tagged);\n}\n\n/**\n * Mint the next identity that THIS SharedWorker instance (`swInstanceId`) should announce.\n *\n * - No `previous` → generation `0` (the first engine this SharedWorker announces).\n * - `previous` belongs to the SAME `swInstanceId` → `previous.generation + 1` (a succession within one\n * SharedWorker: a fresh elected engine worker replacing the last).\n * - `previous` belongs to a DIFFERENT `swInstanceId` (a re-announce arriving at a NEW SharedWorker\n * instance, after SharedWorker death recovery) → the counter RESTARTS at `0` under the new instance id.\n * The generation is scoped to one SharedWorker instance, so it cannot carry across instances.\n */\nexport function mintEngineIdentity(swInstanceId: string, previous?: EngineIdentity): EngineIdentity {\n const sameInstance = previous !== undefined && previous.swInstanceId === swInstanceId;\n return { swInstanceId, generation: sameInstance ? previous.generation + 1 : 0 };\n}\n\n// ─── B. Control-plane message union (ADR D4; plan \"Protocol changes\") ────────────\n\n/**\n * The identity-tagged control plane the communication centre, the elected engine worker, and the tab\n * coordinators exchange (distinct from the data-path bridge in `protocol.ts`; the SharedWorker never sees\n * RPC payloads). Payload interfaces mirror `protocol.ts` conventions: a discriminating `type`, typed\n * fields only, and MessagePorts travelling as transferables OUTSIDE the JSON body (see individual members).\n * Identity-tagged members carry the {@link EngineIdentity} they belong to so a stale one is discarded.\n */\nexport type EngineControlMessage =\n // ── untagged (no identity exists yet, or the SharedWorker stamps it) ──\n /**\n * SharedWorker → tab (the lock holder): the leader lock was granted; SPAWN the engine. Pre-spawn, so no\n * identity exists yet — it OPENS the handoff window on the attach side (a relocation notice, CONTEXT\n * \"Handoff window\"). Untagged: there is no engine identity to compare against before the engine exists.\n */\n | { type: \"leader-granted\" }\n /**\n * tab → SharedWorker: the freshly spawned engine's MessagePort is announced so the SharedWorker can\n * stamp it with a minted {@link EngineIdentity}. The announce ITSELF carries no identity (the SharedWorker\n * mints it on receipt). The engine's control MessagePort travels as a TRANSFERABLE outside this JSON body\n * (the same way `protocol.ts` transfers ports — never a serialized field), so nothing is typed here.\n */\n | { type: \"engine-announce\" }\n /**\n * tab → SharedWorker (ADR-0049 D8): this tab is detaching — UNREGISTER it from the router so `tabCount`\n * (the destroy peer-refusal input) falls. The platform fires no SharedWorker port-close event and the tab's\n * `detach` bridge envelope rides the per-tab PIPE (which the router never sees), so this control-plane signal\n * on the SW port is the only channel the router observes. Untagged + always-applied: it names no engine (it\n * concerns the tab's own registration), and a detaching tab must be dropped regardless of the current engine\n * generation. The router stays payload-blind — this is a `pgx0049` control message, never a bridge envelope.\n */\n | { type: \"tab-detach\" }\n /**\n * elected engine → SharedWorker (ADR-0049 D1, capability-absence fallback): the elected dedicated engine's\n * OWN-scope OPFS probe was DENIED (or the OPFS API is absent/throwing in the dedicated home too), so no home on\n * this platform can hold sync-access handles. The engine reports that here so the router-only SharedWorker\n * abandons election and boots the in-scope IDBFS engine instead (with the registry-declared durability) — the\n * declared-idbfs shape reached by capability detection rather than declaration. Untagged: it names no engine\n * (the engine never became authoritative — it is reporting that it cannot host), and the SharedWorker must act\n * on it regardless of the current generation. `reason` is the verbatim probe attribution stamped into the\n * fallback boot's `storageFallbackReason` (decision 12).\n */\n | { type: \"engine-fallback\"; reason: string }\n /**\n * SharedWorker → engine (ADR-0049 step 9): the identity the router just minted for this engine, handed to\n * the elected engine worker's control plane RIGHT AFTER the router stamps the `engine-announce` (before any\n * `connect-port`). Although it carries an {@link EngineIdentity}, it is ALWAYS-APPLIED — it is the ASSIGNMENT\n * itself, so it is never gated on the receiver's (still-absent or stale) current identity; every subsequent\n * tagged message the engine receives is compared against THIS assigned identity. The engine remembers it and\n * replies `engine-ready` (control-plane readiness, NOT engine boot — the engine still boots lazily on first\n * attach). Sits with the untagged members in {@link shouldApplyControlMessage}'s always-apply set.\n */\n | { type: \"assign-identity\"; identity: EngineIdentity }\n // ── identity-tagged ──\n /** SharedWorker → tab: the announced engine is live under this identity (the stamp fan-out). */\n | { type: \"engine-ready\"; identity: EngineIdentity }\n /**\n * SharedWorker → engine: accept a per-tab proxy pipe. The tab-end MessagePort is transferred ALONGSIDE\n * this message (outside the JSON body, as a transferable), fed into `SyncWorkerHost.connect` (ADR D4).\n */\n | { type: \"connect-port\"; identity: EngineIdentity }\n /**\n * A liveness probe request. Used BOTH as a tab↔SharedWorker keepalive (the leader keepalive) AND as a\n * SharedWorker↔engine control-channel probe (the execution-limit path). `pingId` correlates the ack.\n */\n | { type: \"control-ping\"; identity: EngineIdentity; pingId: number }\n /**\n * The answer to a {@link EngineControlMessage} `control-ping`; `pingId` echoes the request. ONE reserved\n * value: `pingId: -1` is the TEARDOWN ack by convention (ADR-0049 step 9) — the engine emits it in reply to\n * an `engine-teardown` (not to any real ping), the router RELAYS it to every tab, and the coordinator's\n * teardown wait settles on it. A `-1` therefore never correlates a probe ping (those start at 1).\n */\n | {\n type: \"control-ack\";\n identity: EngineIdentity;\n pingId: number;\n /** Present only when the reserved teardown acknowledgement reports that host close failed. Mirrors `protocol.ts`'s `BridgeErrorWire` (this module deliberately imports nothing from the bridge). */\n error?: { message: string; name?: string; detail?: unknown };\n }\n /**\n * tab → SharedWorker: an execution-limit report — a dispatch has been outstanding `elapsedMs` past the\n * configured limit (ADR D5). The SharedWorker then probes the engine's control channel; it is NOT itself\n * a death verdict (the limit CONVERTS slow to terminated only after the probe threshold).\n */\n | { type: \"overdue-dispatch\"; identity: EngineIdentity; elapsedMs: number }\n /**\n * The retirement notice that PRECEDES every DELIBERATE termination — last-claim teardown, BFCache exit,\n * and execution-limit termination all send it first (ADR D5), so the attach side opens the handoff window\n * and queues new calls instead of racing a dying engine.\n */\n | { type: \"engine-retiring\"; identity: EngineIdentity }\n /** The teardown handshake after a retirement notice; ack/timeout settles the lock callback. */\n | { type: \"engine-teardown\"; identity: EngineIdentity };\n\n/** Discriminants that carry an {@link EngineIdentity} and are therefore staleness-gated. `assign-identity`\n carries one but is the ASSIGNMENT itself (always-applied), so it is excluded here alongside the untagged. */\ntype TaggedControlType = Exclude<\n EngineControlMessage,\n { type: \"leader-granted\" | \"engine-announce\" | \"assign-identity\" | \"tab-detach\" | \"engine-fallback\" }\n>[\"type\"];\n\nconst TAGGED_CONTROL_TYPES: ReadonlySet<TaggedControlType> = new Set<TaggedControlType>([\n \"engine-ready\",\n \"connect-port\",\n \"control-ping\",\n \"control-ack\",\n \"overdue-dispatch\",\n \"engine-retiring\",\n \"engine-teardown\",\n]);\n\n/**\n * Whether a received control message should be APPLIED given the receiver's current engine identity.\n *\n * - ALWAYS-APPLY members (`leader-granted`, `engine-announce`, `assign-identity`, `tab-detach`, `engine-fallback`)\n * always apply — `leader-granted`/`engine-announce`/`tab-detach`/`engine-fallback` carry no identity to compare\n * (they precede any engine, mint an identity, concern the tab's own registration, or report that no engine can\n * host), and `assign-identity` IS the assignment, so it applies unconditionally.\n * - IDENTITY-TAGGED members apply only when `current` is set AND the identities match exactly (the pair,\n * invariant 7). A tagged message with no current identity, or a stale identity, is discarded.\n *\n * The switch is exhaustive with a `never`-guard: a new union member fails to type-check until it is\n * classified here (the runtime exhaustiveness test pairs with this compile-time guard).\n */\nexport function shouldApplyControlMessage(current: EngineIdentity | undefined, message: EngineControlMessage): boolean {\n switch (message.type) {\n case \"leader-granted\":\n case \"engine-announce\":\n case \"assign-identity\":\n case \"tab-detach\":\n case \"engine-fallback\":\n return true;\n case \"engine-ready\":\n case \"connect-port\":\n case \"control-ping\":\n case \"control-ack\":\n case \"overdue-dispatch\":\n case \"engine-retiring\":\n case \"engine-teardown\":\n return current !== undefined && engineIdentityEquals(current, message.identity);\n default: {\n const unreachable: never = message;\n throw new Error(`[pgxsinkit] unclassified engine-control message: ${String(unreachable)}`);\n }\n }\n}\n\n/** Runtime companion to {@link shouldApplyControlMessage}'s compile-time guard: is this type staleness-gated? */\nexport function isTaggedControlType(type: EngineControlMessage[\"type\"]): type is TaggedControlType {\n return TAGGED_CONTROL_TYPES.has(type as TaggedControlType);\n}\n\n// ─── C. Execution limit (ADR D5 — opt-in, elected-placement-only) ────────────────\n\n/**\n * The opt-in execution limit (ADR D5). ONE engine-construction value; DISABLED BY DEFAULT — no finite\n * worst-case query duration exists, and the limit CONVERTS slow to terminated by policy, so enabling it\n * must be a deliberate consumer choice (the public contract). When enabled, the limit\n * CONVERTS slow to terminated after the control-probe threshold — it is NEVER claimed as death evidence.\n * This feature is ELECTED-PLACEMENT ONLY: on SharedWorker-direct placement (WebKit) the option is rejected\n * as unsupported — that rejection is wired in a later step; this module only defines the config + the\n * cross-tab mismatch rule.\n */\nexport interface ExecutionLimitConfig {\n /** ms; `undefined` = DISABLED (the default — preserves unbounded queries). */\n maxDispatchMs?: number;\n}\n\n/**\n * Thrown at attach when a tab's execution-limit value disagrees with the engine's construction value\n * (ADR D5): every tab must carry the SAME config. Named + `[pgxsinkit]`-prefixed like the repo's other\n * protocol errors so a consumer can `instanceof`-branch it.\n */\nexport class ExecutionLimitMismatchError extends Error {\n readonly engineValue: number | undefined;\n readonly attachValue: number | undefined;\n\n constructor(engineValue: number | undefined, attachValue: number | undefined) {\n super(\n `[pgxsinkit] execution-limit mismatch: this tab attaches with ${describeLimit(attachValue)} but the ` +\n `running engine was constructed with ${describeLimit(engineValue)} (ADR-0049 D5). The execution ` +\n \"limit is ONE engine-construction value; every tab attaching to a store must carry the same value \" +\n \"(including both disabled). Align the tabs' configuration.\",\n );\n this.name = \"ExecutionLimitMismatchError\";\n this.engineValue = engineValue;\n this.attachValue = attachValue;\n }\n}\n\nconst EXECUTION_LIMIT_MISMATCH_CODE = \"execution-limit-mismatch\";\n\nexport function executionLimitMismatchToWire(error: ExecutionLimitMismatchError): {\n code: typeof EXECUTION_LIMIT_MISMATCH_CODE;\n engineValue?: number;\n attachValue?: number;\n} {\n return {\n code: EXECUTION_LIMIT_MISMATCH_CODE,\n ...(error.engineValue !== undefined ? { engineValue: error.engineValue } : {}),\n ...(error.attachValue !== undefined ? { attachValue: error.attachValue } : {}),\n };\n}\n\nexport function executionLimitMismatchFromWire(detail: unknown): ExecutionLimitMismatchError | undefined {\n if (typeof detail !== \"object\" || detail === null) return undefined;\n const candidate = detail as { code?: unknown; engineValue?: unknown; attachValue?: unknown };\n if (candidate.code !== EXECUTION_LIMIT_MISMATCH_CODE) return undefined;\n const engineValue = typeof candidate.engineValue === \"number\" ? candidate.engineValue : undefined;\n const attachValue = typeof candidate.attachValue === \"number\" ? candidate.attachValue : undefined;\n return new ExecutionLimitMismatchError(engineValue, attachValue);\n}\n\nfunction describeLimit(value: number | undefined): string {\n return value === undefined ? \"the limit DISABLED (undefined)\" : `maxDispatchMs=${value}`;\n}\n\n/**\n * Attach-time guard (ADR D5): every tab must carry the SAME execution-limit value as the running engine.\n * Any mismatch — including one side disabled (`undefined`) and the other set — throws\n * {@link ExecutionLimitMismatchError}. Equal values (both `undefined`, or the same number) pass.\n */\nexport function assertSameExecutionLimit(engineValue: number | undefined, attachValue: number | undefined): void {\n if (engineValue !== attachValue) {\n throw new ExecutionLimitMismatchError(engineValue, attachValue);\n }\n}\n\n// ─── D. EngineRelocatedError (ADR D10, invariant 5; CONTEXT \"Handoff window\") ─────\n\n/**\n * The two honest relocation outcomes (ADR D10, invariant 5). There is deliberately NO blanket \"retryable\":\n * - `\"not-dispatched\"` — the call NEVER reached the engine (a queued call failed on the handoff queue's\n * cap/deadline, or was never sent). SAFE TO RETRY.\n * - `\"unknown\"` — a DISPATCHED mutation whose response was lost to relocation. Its journal update MAY\n * already exist and there is NO mutation-dedup key, so it must be inspected/reconciled, NEVER auto-retried.\n *\n * A dispatched READ that lost its response is NOT a third outcome: repeating a read is safe, so that is the\n * CALLER'S policy (repeat the read), not a distinct wire value.\n */\nexport type EngineRelocatedOutcome = \"not-dispatched\" | \"unknown\";\n\n/** The stable clone-safe discriminator carried on the wire (ADR D10). Consumers branch on this, never prose. */\nexport const ENGINE_RELOCATED_CODE = \"engine-relocated\";\n\n/**\n * The clone-safe wire form of a relocation failure (ADR D10). It travels inside the EXISTING bridge error\n * `detail` field — the `{ message, detail }` error shape in `protocol.ts` (~line 330, e.g.\n * `RpcResultPayload.error`) — so no new protocol field is needed. The attach side (step 7) calls\n * {@link engineRelocatedFromWire} on every bridge error `detail` to reconstruct the typed error.\n */\nexport interface EngineRelocatedWire {\n code: typeof ENGINE_RELOCATED_CODE;\n outcome: EngineRelocatedOutcome;\n}\n\n/**\n * The exported, consumer-visible relocation error (ADR D10, invariant 5). Consumers branch on `code` +\n * `outcome`, never on message prose — but the message NAMES the semantics so a developer hitting it in a\n * log understands immediately. `[pgxsinkit]`-prefixed like the repo's other errors.\n */\nexport class EngineRelocatedError extends Error {\n readonly code = ENGINE_RELOCATED_CODE;\n readonly outcome: EngineRelocatedOutcome;\n\n constructor(outcome: EngineRelocatedOutcome) {\n super(relocatedMessage(outcome));\n this.name = \"EngineRelocatedError\";\n this.outcome = outcome;\n }\n}\n\nfunction relocatedMessage(outcome: EngineRelocatedOutcome): string {\n if (outcome === \"not-dispatched\") {\n return (\n \"[pgxsinkit] the call was not dispatched to the engine before it relocated (ADR-0049 D10). It never \" +\n \"reached the engine, so it is SAFE TO RETRY.\"\n );\n }\n return (\n \"[pgxsinkit] a dispatched mutation's response was lost when the engine relocated (ADR-0049 D10, \" +\n \"outcome UNKNOWN). Its journal update may ALREADY exist and there is no mutation-dedup key, so \" +\n \"INSPECT/RECONCILE the store — NEVER auto-retry. (A dispatched READ, by contrast, is safe for the \" +\n \"caller to repeat.)\"\n );\n}\n\n/** Encode a {@link EngineRelocatedError} to its clone-safe wire form for the bridge error `detail` field. */\nexport function engineRelocatedToWire(error: EngineRelocatedError): EngineRelocatedWire {\n return { code: ENGINE_RELOCATED_CODE, outcome: error.outcome };\n}\n\n/**\n * Reconstruct a typed {@link EngineRelocatedError} from a bridge error's `detail` (step 7 calls this on\n * every bridge error detail). STRICT shape check: returns `undefined` for anything that is not exactly the\n * `{ code: \"engine-relocated\", outcome }` wire form (a foreign/absent detail, a wrong code, a bogus or\n * missing outcome, a non-object) — so a non-relocation error is never misclassified.\n */\nexport function engineRelocatedFromWire(detail: unknown): EngineRelocatedError | undefined {\n if (typeof detail !== \"object\" || detail === null) return undefined;\n const candidate = detail as { code?: unknown; outcome?: unknown };\n if (candidate.code !== ENGINE_RELOCATED_CODE) return undefined;\n if (candidate.outcome !== \"not-dispatched\" && candidate.outcome !== \"unknown\") return undefined;\n return new EngineRelocatedError(candidate.outcome);\n}\n",
45
45
  "// The ROUTER (ADR-0049 step 6): the SharedWorker-side placement machinery — the \"communication centre\"\n// (CONTEXT.md § \"Language — engine placement\"). This module runs INSIDE the SharedWorker and is the single\n// role that never moves whatever the engine's home is. It owns exactly four things:\n// - the ATTACH REGISTRY (every tab's bridge port),\n// - the CURRENT engine identity + the engine CONTROL CHANNEL,\n// - relocation-notice FAN-OUT to every tab, and\n// - execution-limit PROBE FORWARDING (tab-reported overdue dispatch → control-channel pings → verdict).\n//\n// It deliberately does NOT: spawn workers, decide leadership, or ever inspect RPC payloads. Per attached tab\n// it mints a proxy pipe and TRANSFERS one end to the engine and the other to the tab; from then on that tab's\n// RPC/live-query traffic flows tab↔engine DIRECTLY on the pipe (invariant 6 — the SharedWorker is not in the\n// data path). Because it is transport-agnostic (a `RouterPort`, never a real `SharedWorker`/`Worker`), the\n// whole thing is unit-testable over hand-rolled recording ports with no worker at all — the same discipline\n// `protocol.ts` and `engine-control.ts` follow.\n//\n// WIRE ENVELOPE. The control plane shares the same tab↔SharedWorker transport as today's data-path bridge\n// (`protocol.ts`). To coexist WITHOUT touching `protocol.ts`, every control message travels inside a\n// NAMESPACED envelope `{ [ENGINE_CONTROL_ENVELOPE_KEY]: <EngineControlMessage> }` (`pgx0049`). A bridge\n// envelope (`{ ch: \"pgxsinkit-bridge\", … }`) has no such key and is ignored here; a control envelope has no\n// `ch`/`v` and is ignored by the bridge router. Step 7's attach client speaks this SAME envelope.\n\nimport {\n mintEngineIdentity,\n readControlEnvelope,\n shouldApplyControlMessage,\n type EngineControlMessage,\n type EngineIdentity,\n type ExecutionLimitConfig,\n wrapControlEnvelope as envelope,\n} from \"./engine-control\";\n\n/**\n * The namespaced key under which every ADR-0049 control message rides the tab↔SharedWorker transport, so the\n * control plane coexists with the data-path bridge envelope (`protocol.ts`) without any change to it. The tab\n * side (step 7) sends/reads the identical envelope.\n */\nexport { ENGINE_CONTROL_ENVELOPE_KEY } from \"./engine-control\";\n\n/**\n * The minimal MessagePort-shaped transport the router needs — the intersection of a real `MessagePort`, a\n * `SharedWorker` connection port, and the pipe ends it mints. Modeled on `protocol.ts`'s `BridgePort` (kept\n * local, not imported, because the router's transfer list is plain `unknown[]` and it never `close()`s a tab\n * port). Injected everywhere so the router is exercised with plain recording ports (no worker) in tests.\n */\nexport interface RouterPort {\n postMessage: (message: unknown, transfer?: unknown[]) => void;\n addEventListener: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n removeEventListener: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n start?: () => void;\n}\n\n/** The setTimeout/clearTimeout pair the probe loop schedules on — injectable for deterministic tests. */\nexport interface RouterTimers {\n setTimeout(fn: () => void, ms: number): unknown;\n clearTimeout(handle: unknown): void;\n}\n\nexport interface EngineRouterOptions {\n /** The opaque id of THIS SharedWorker instance — scopes every minted {@link EngineIdentity}'s generation. */\n swInstanceId: string;\n /**\n * Engine-construction execution limit (`undefined`/absent `maxDispatchMs` = DISABLED, ADR D5). The router\n * only FORWARDS tab-reported overdue dispatches into control-channel probes when enabled; the verdict\n * threshold is {@link probeMissThreshold}. Disabled → overdue reports are ignored entirely.\n */\n executionLimit?: ExecutionLimitConfig;\n /** Consecutive unanswered probe pings before an engine-loss verdict (default 3). */\n probeMissThreshold?: number;\n /** Injectable pipe factory (default `() => new MessageChannel()`) so tests can observe both minted ends. */\n createPipe?: () => { port1: RouterPort; port2: RouterPort };\n /** Injectable timers for probe scheduling (default `globalThis`) for deterministic tests. */\n timers?: RouterTimers;\n /** Milliseconds between probe pings once a dispatch is reported overdue (default 2000). */\n probeIntervalMs?: number;\n}\n\nexport interface EngineRouter {\n /**\n * Register a tab's bridge port. Returns an unregister fn. If an engine is CURRENT and already ready, this\n * late joiner is piped IMMEDIATELY; otherwise it is piped when the current engine's `engine-ready` fans out.\n */\n attachTab(tabPort: RouterPort): () => void;\n /**\n * tab→SW: the leader coordinator announces a fresh engine control channel. Stamps the next\n * {@link EngineIdentity} ({@link mintEngineIdentity}), stores the control channel, and returns the identity.\n * On the engine's `engine-ready` for THIS identity it pipes every attached tab. Any prior engine's control\n * listener/probe is cleared first (this does not itself fan a notice).\n */\n announceEngine(controlPort: RouterPort): EngineIdentity;\n /**\n * Fan a relocation notice to every tab: `leader-granted` (untagged) or `engine-retiring` (tagged with the\n * retired identity). BOTH clear the current identity + control channel. Engine-loss verdicts fan\n * `engine-retiring` internally the same way.\n */\n openHandoff(reason: \"leader-granted\" | \"engine-retiring\"): void;\n /** The current identity, or `undefined` before the first announce / while relocating. */\n currentIdentity(): EngineIdentity | undefined;\n /** Total attached-tab count (used later for destroy peer-refusal). */\n tabCount(): number;\n}\n\ninterface TabEntry {\n port: RouterPort;\n listener: (event: { data: unknown }) => void;\n /** A `close`-event listener, present only where the platform supports the MessagePort `close` event (D8). */\n closeListener?: () => void;\n}\n\n/** The optional MessagePort `close`-event surface — feature-detected, not part of the structural {@link RouterPort}. */\ninterface ClosableRouterPort {\n onclose?: unknown;\n addEventListener: (type: \"close\", listener: () => void) => void;\n removeEventListener?: (type: \"close\", listener: () => void) => void;\n}\n\nexport function createEngineRouter(options: EngineRouterOptions): EngineRouter {\n const { swInstanceId, executionLimit } = options;\n const probeMissThreshold = options.probeMissThreshold ?? 3;\n const probeIntervalMs = options.probeIntervalMs ?? 2000;\n const createPipe =\n options.createPipe ?? (() => new MessageChannel() as unknown as { port1: RouterPort; port2: RouterPort });\n const timers: RouterTimers = options.timers ?? {\n setTimeout: (fn, ms) => globalThis.setTimeout(fn, ms),\n clearTimeout: (handle) => globalThis.clearTimeout(handle as ReturnType<typeof globalThis.setTimeout>),\n };\n\n const tabs = new Set<TabEntry>();\n\n // Current engine state. `lastMinted` survives a handoff (unlike `currentIdentity`) so the next announce mints\n // the SUCCESSOR generation (gen+1) under this SharedWorker instance, per mintEngineIdentity's contract.\n let currentIdentity: EngineIdentity | undefined;\n let lastMinted: EngineIdentity | undefined;\n let controlPort: RouterPort | undefined;\n let controlListener: ((event: { data: unknown }) => void) | undefined;\n let engineReady = false;\n\n // Execution-limit probe loop (one timer at a time; the whole loop keys on `currentIdentity`).\n let probeRunning = false;\n let probeHandle: unknown;\n let missCount = 0;\n let pingSeq = 0;\n let pendingPingId: number | undefined;\n\n function fanToTabs(message: EngineControlMessage): void {\n for (const tab of tabs) {\n tab.port.postMessage(envelope(message));\n }\n }\n\n /** Mint a fresh proxy pipe: engine end → the control channel, tab end → the tab (both TRANSFERRED). */\n function deliverPipe(tab: TabEntry): void {\n if (currentIdentity === undefined || controlPort === undefined) return;\n const { port1, port2 } = createPipe();\n controlPort.postMessage(envelope({ type: \"connect-port\", identity: currentIdentity }), [port1]);\n tab.port.postMessage(envelope({ type: \"connect-port\", identity: currentIdentity }), [port2]);\n }\n\n function resetProbe(): void {\n probeRunning = false;\n missCount = 0;\n pendingPingId = undefined;\n if (probeHandle !== undefined) {\n timers.clearTimeout(probeHandle);\n probeHandle = undefined;\n }\n }\n\n /** Detach the engine control channel + probe state WITHOUT fanning any notice (used by announce/handoff). */\n function clearEngine(): void {\n resetProbe();\n if (controlPort !== undefined && controlListener !== undefined) {\n controlPort.removeEventListener(\"message\", controlListener);\n }\n controlPort = undefined;\n controlListener = undefined;\n currentIdentity = undefined;\n engineReady = false;\n }\n\n /** The engine-loss path: capture the retiring identity, tear down, and fan `engine-retiring` to every tab. */\n function retireCurrentEngine(): void {\n const retiring = currentIdentity;\n clearEngine();\n if (retiring !== undefined) {\n fanToTabs({ type: \"engine-retiring\", identity: retiring });\n }\n }\n\n function scheduleProbe(): void {\n probeHandle = timers.setTimeout(() => {\n probeHandle = undefined;\n // The engine went away between ticks (handoff/verdict) — abandon the loop silently.\n if (currentIdentity === undefined || controlPort === undefined) {\n resetProbe();\n return;\n }\n const pingId = ++pingSeq;\n pendingPingId = pingId;\n controlPort.postMessage(envelope({ type: \"control-ping\", identity: currentIdentity, pingId }));\n missCount += 1;\n if (missCount >= probeMissThreshold) {\n // Threshold consecutive unanswered pings → ENGINE-LOSS VERDICT (the router never terminates anything;\n // the leader coordinator reacts to the fanned `engine-retiring`).\n resetProbe();\n retireCurrentEngine();\n } else {\n scheduleProbe();\n }\n }, probeIntervalMs);\n }\n\n function startProbe(): void {\n if (probeRunning) return;\n probeRunning = true;\n missCount = 0;\n scheduleProbe();\n }\n\n // ─── Engine control-channel inbound ──────────────────────────────────────────\n function onControlMessage(data: unknown): void {\n const message = readControlEnvelope(data);\n if (message === undefined) return;\n switch (message.type) {\n case \"engine-ready\":\n // Gate on the exact identity pair — a stale engine-ready from a superseded generation is discarded.\n if (shouldApplyControlMessage(currentIdentity, message)) {\n engineReady = true;\n for (const tab of tabs) deliverPipe(tab);\n }\n return;\n case \"control-ack\":\n // A live-but-slow engine answered the PROBE: reset the miss count and STOP the loop (below-threshold\n // probing is never a verdict). Only the pending ping's id for the current identity counts — that ack\n // is CONSUMED here (never fanned to tabs).\n if (shouldApplyControlMessage(currentIdentity, message) && message.pingId === pendingPingId) {\n resetProbe();\n return;\n }\n // Any OTHER engine ack (pingId mismatch or no probe loop running) is the engine's teardown ack\n // (`pingId: -1`, ADR-0049 step 9) — relay it VERBATIM to every tab so the coordinator's identity-matched\n // teardown wait settles. The router never inspects it beyond forwarding.\n fanToTabs(message);\n return;\n default:\n // The engine control channel emits nothing else the router acts on here.\n return;\n }\n }\n\n // ─── Tab bridge-port inbound ──────────────────────────────────────────────────\n function onTabMessage(tab: TabEntry, data: unknown): void {\n const message = readControlEnvelope(data);\n if (message === undefined) return;\n switch (message.type) {\n case \"control-ping\":\n // Keepalive: reply IMMEDIATELY on the same tab, echoing the PING's identity (there may be no current\n // engine yet, and the keepalive is a liveness check of the SharedWorker itself, not of an engine).\n tab.port.postMessage(envelope({ type: \"control-ack\", identity: message.identity, pingId: message.pingId }));\n return;\n case \"overdue-dispatch\":\n // Execution limit (ADR D5): only when enabled AND the report is for the CURRENT engine identity.\n if (executionLimit?.maxDispatchMs === undefined) return; // disabled → ignored entirely\n if (!shouldApplyControlMessage(currentIdentity, message)) return; // stale / no engine\n startProbe();\n return;\n case \"engine-teardown\":\n // The coordinator's teardown handshake (ADR-0049 step 9): forward it VERBATIM to the engine's control\n // channel for the CURRENT identity, so the engine acks + self-closes. A stale teardown is discarded.\n if (!shouldApplyControlMessage(currentIdentity, message)) return;\n controlPort?.postMessage(envelope(message));\n return;\n case \"tab-detach\":\n // The tab is detaching (ADR-0049 D8): unregister it so `tabCount` (the destroy peer-refusal input) falls.\n // The `detach` bridge envelope rides the tab's pipe (invisible here), so this control signal on the SW\n // port is the router's only view of the departure. Its minted pipe end is simply dropped.\n removeTab(tab);\n return;\n default:\n // Any other control type from a tab is not the router's concern.\n return;\n }\n }\n\n /** Unregister a tab: drop it from the registry and detach its listeners (the minted pipe end is dropped). */\n function removeTab(entry: TabEntry): void {\n if (!tabs.has(entry)) return;\n tabs.delete(entry);\n entry.port.removeEventListener(\"message\", entry.listener);\n if (entry.closeListener !== undefined) {\n (entry.port as unknown as ClosableRouterPort).removeEventListener?.(\"close\", entry.closeListener);\n }\n }\n\n function attachTab(tabPort: RouterPort): () => void {\n const entry: TabEntry = {\n port: tabPort,\n listener: (event) => onTabMessage(entry, event.data),\n };\n tabPort.addEventListener(\"message\", entry.listener);\n tabPort.start?.();\n // Belt-and-braces peer-departure detection (ADR-0049 D8): where the platform supports the MessagePort\n // `close` event, a CRASHED tab that never sent `tab-detach` is still dropped (its port closes on agent\n // teardown). Feature-detected via `onclose` so the structural `RouterPort` (and unit fakes) need not expose\n // it. RESIDUAL: where the `close` event is UNSUPPORTED, a crashed peer that never sent `tab-detach` leaves a\n // stale `tabCount` until the SharedWorker restarts — a `destroy()` then stays refused; the caller resolves it\n // with `destroy({ force: true })` (the documented escape). A clean `stop()`/`pagehide` always sends `tab-detach`.\n const closable = tabPort as unknown as ClosableRouterPort;\n if (\"onclose\" in closable) {\n const closeListener = () => removeTab(entry);\n entry.closeListener = closeListener;\n closable.addEventListener(\"close\", closeListener);\n }\n tabs.add(entry);\n // Late joiner: an already-ready engine pipes this tab immediately; otherwise it is piped on engine-ready.\n if (currentIdentity !== undefined && engineReady) {\n deliverPipe(entry);\n }\n return () => removeTab(entry);\n }\n\n function announceEngine(port: RouterPort): EngineIdentity {\n clearEngine(); // detach any prior engine's listener/probe (no notice fanned by an announce).\n const minted = mintEngineIdentity(swInstanceId, lastMinted);\n lastMinted = minted;\n currentIdentity = minted;\n controlPort = port;\n controlListener = (event) => onControlMessage(event.data);\n port.addEventListener(\"message\", controlListener);\n port.start?.();\n engineReady = false;\n // ADR-0049 step 9: hand the freshly-minted identity to the engine's control plane FIRST — before any\n // `connect-port` pipe. The engine remembers it (gating every subsequent tagged message) and replies\n // `engine-ready`, which drives the pipe fan-out below.\n port.postMessage(envelope({ type: \"assign-identity\", identity: minted }));\n return minted;\n }\n\n function openHandoff(reason: \"leader-granted\" | \"engine-retiring\"): void {\n if (reason === \"engine-retiring\") {\n retireCurrentEngine();\n return;\n }\n // leader-granted: a fresh engine is about to be spawned — clear the current one and open the window.\n clearEngine();\n fanToTabs({ type: \"leader-granted\" });\n }\n\n return {\n attachTab,\n announceEngine,\n openHandoff,\n currentIdentity: () => currentIdentity,\n tabCount: () => tabs.size,\n };\n}\n",
46
- "// The bridge protocol (ADR-0032 S2). Everything that crosses between a tab and the shared sync engine\n// travels as a typed {@link BridgeEnvelope} over a minimal {@link BridgePort} (a MessagePort-shaped\n// transport). The router only ever inspects the envelope's `type`/`id`; its `payload` is OPAQUE to the\n// router and always passes through a {@link BridgeCodec}, so a later columnar/transferable codec can be\n// swapped in WITHOUT any protocol change (see BridgeCodec's doc).\n//\n// Deliberately transport-agnostic: `defineSyncWorker` and `attachSyncClient` both talk to a `BridgePort`,\n// never a real `Worker`/`SharedWorker` directly — which is exactly why the whole bridge is unit-testable\n// over bun's `MessageChannel` with no worker at all.\n\nimport type { SyncRuntimeStatus, SyncStorageDeclaration } from \"@pgxsinkit/contracts\";\n\nimport type { BootReport } from \"../boot-report\";\nimport type { ExportReport } from \"../export-store\";\n\nexport const BRIDGE_CHANNEL = \"pgxsinkit-bridge\" as const;\nexport const BRIDGE_PROTOCOL_VERSION = 1 as const;\n\n/**\n * A structured-clone transferable (an `ArrayBuffer`, a `MessagePort`, …). The library carries no DOM lib\n * dependency (like the convergence triggers), so this is the toolkit's own name for the type a future\n * columnar codec would hand to `postMessage`'s transfer list. The wire-format-1 identity codec\n * ({@link BRIDGE_PROTOCOL_VERSION}) never produces one.\n */\nexport type BridgeTransferable = unknown;\n\n/**\n * The minimal MessagePort-shaped transport the bridge needs — the intersection of a real `MessagePort`,\n * a `SharedWorker` port, and a dedicated `Worker`/`self`. Injected everywhere so the protocol layer is\n * exercised with a plain `MessageChannel` (no Worker) in tests. `start()` is optional (MessagePort needs\n * it, `Worker`/`self` do not); `close()` is optional (a dedicated `self` cannot be closed by the tab).\n */\nexport interface BridgePort {\n postMessage: (message: unknown, transfer?: BridgeTransferable[]) => void;\n addEventListener: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n removeEventListener: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n start?: () => void;\n close?: () => void;\n}\n\n/**\n * The wire envelope. `payload` is the codec-encoded body — opaque to the router, which only routes on\n * `type` and correlates on `id`. Keeping the body opaque is what lets a future codec return a columnar\n * buffer (a transferable) in `payload` without any change to routing.\n */\nexport interface BridgeEnvelope {\n ch: typeof BRIDGE_CHANNEL;\n v: typeof BRIDGE_PROTOCOL_VERSION;\n type: BridgeMessageType;\n /** Correlation id for request/response pairs (rpc, subscribe, token pull). Absent for fire-and-forget fanout. */\n id?: string;\n /** Codec-encoded body — opaque to the router; decode with the same {@link BridgeCodec}. */\n payload: unknown;\n}\n\nexport type BridgeMessageType =\n // tab → worker\n | \"provision\"\n | \"attach\"\n | \"detach\"\n | \"token-push\"\n | \"token-response\"\n | \"rpc\"\n | \"subscribe\"\n | \"unsubscribe\"\n | \"wake\"\n | \"set-online\"\n // worker → tab\n | \"provision-ack\"\n | \"attach-ack\"\n | \"token-request\"\n | \"rpc-result\"\n | \"live-initial\"\n | \"live-diff\"\n | \"live-hydrated\"\n | \"event\";\n\n// ─── Payload shapes ───────────────────────────────────────────────────────────\n\n/**\n * The bridge's serialized-error wire shape. `message` always; `name` when the source error carried a\n * non-default one, so a TYPED failure (e.g. a restore refused with `RestoreTargetExistsError`) stays\n * type-detectable after the tab rebuilds it — a consumer must never be forced into message matching;\n * `detail` for structured payloads (execution-limit mismatch, engine-relocated, …) that rebuild as their\n * typed error class tab-side.\n */\nexport interface BridgeErrorWire {\n message: string;\n name?: string;\n detail?: unknown;\n}\n\n/** A single auth token snapshot the tab owns and pushes to the worker (ADR-0032 decision 3). */\nexport interface AuthTokenSnapshot {\n accessToken: string;\n /** Absolute expiry in epoch milliseconds (`Date.now()`-comparable), so the worker can apply an expiry margin. */\n expiresAt: number;\n}\n\n/**\n * tab → worker: pre-spawn the store WITHOUT booting the engine (ADR-0032 decision 5). Sent at the\n * login screen against the freshly-named spare worker: the worker only runs PGlite `create`/initdb\n * (off every thread that matters) and holds the raw store idle — no schema, no shape streams, no token\n * — until the real {@link AttachPayload} arrives (with config + token) and adopts the provisioned store.\n * Role-agnostic on purpose: the spare is minted before the user (and role) is known, so provisioning\n * carries no registry — the schema is applied at attach with the role-resolved registry.\n */\nexport interface ProvisionPayload {\n /** The bound store id (informational; naming is done tab-side via the SharedWorker name). */\n storeId?: string;\n /**\n * The plain store PATH (ADR-0036) to `create` ahead of attach — a name, not a storage URL; the worker\n * derives the backend (IndexedDB in a browser worker). When omitted, `storeId`/the worker default is used.\n */\n storePath?: string;\n /**\n * @internal INTERNAL WIRE FIELD (not consumer config, ADR-0036). Carries the testing memory-backend\n * override across the bridge, because a symbol-keyed marker does NOT survive `postMessage` structured\n * clone — so the worker's memory-store selection travels as this explicit field. Set only by the test\n * lane (via the attaching helper); a browser worker never sends it.\n */\n testStoreBackend?: \"memory\";\n /**\n * The tab's WIRE storage declaration (ADR-0050) — the same declaration the pre-placement declaration\n * message carried, repeated here so the ENGINE binds it (the mint's durability) wherever it runs. The\n * first provision/attach binds the store's declaration; a later payload whose explicit field disagrees\n * with the bound resolution is refused typed (`StorageDeclarationRefusedError`).\n */\n storage?: SyncStorageDeclaration;\n}\n\n/** worker → tab: the provision completed (or failed). Lets the login screen confirm the spare is warm. */\nexport interface ProvisionAckPayload {\n ok: boolean;\n storeId?: string;\n /** Present when `!ok` — the initdb/create failed; the worker falls back to a fresh create at attach. */\n error?: { message: string };\n}\n\n/**\n * tab → worker: a store-backup tarball to restore from, carried on the boot {@link AttachPayload}\n * (ADR-0035 decision 6). The mirror image of {@link ExportArtefactWire}: a `File`/`Blob` cannot cross the\n * bridge as a transferable, so it is decomposed into its zero-copy `ArrayBuffer` (listed on `postMessage`'s\n * transfer list) plus the metadata to rebuild it, and the worker reassembles a `Blob` from\n * `buffer`/`mimeType` to hand `createSyncClient` as `restoreFrom`.\n */\nexport interface RestoreArtefactWire {\n /** The backup tarball bytes — transferred, not copied. */\n buffer: ArrayBuffer;\n /** The backup file name (informational; PGlite's `loadDataDir` reads the bytes, not the name). */\n fileName: string;\n /** The backup MIME type (`application/x-gzip` / `application/x-tar`), used to rebuild the `Blob`. */\n mimeType: string;\n}\n\n/** tab → worker: the attach handshake. The first attach boots the engine; later attaches join it. */\nexport interface AttachPayload {\n /** The bound store id (SharedWorker naming resolves it tab-side before attach — ADR-0032 decision 5). */\n storeId?: string;\n /**\n * Explicit plain store PATH (ADR-0036) if the worker should create its own store — a name, not a storage\n * URL; the worker derives the backend. When omitted, `storeId`/the worker default is used.\n */\n storePath?: string;\n /**\n * @internal INTERNAL WIRE FIELD (not consumer config, ADR-0036). Carries the testing memory-backend\n * override across the bridge — a symbol-keyed marker does not survive structured clone, so the worker's\n * memory-store selection travels as this explicit field. Set only by the test lane; never by a browser tab.\n */\n testStoreBackend?: \"memory\";\n /** ADR-0049 D5: the tab's engine-construction limit, checked by the host before it acknowledges attach. */\n executionLimit?: { maxDispatchMs?: number };\n /**\n * Restore the store from a backup on THIS attach (ADR-0035 decision 6) — the worker-mode carrier of\n * `createSyncClient`'s `restoreFrom`. Restore rides the FIRST attach (the boot attach): a `File`/`Blob`\n * cannot cross `postMessage` as a transferable, so the tab decomposes it into a transferred `ArrayBuffer`\n * plus its name/mime — the {@link ExportArtefactWire} pattern in reverse — and the worker recomposes it\n * into a `Blob` and hands it to `createSyncClient`. Absent on every ordinary attach. An attach that carries\n * this AFTER the engine has already booted is REFUSED (you cannot restore into a running store).\n */\n restore?: RestoreArtefactWire;\n /**\n * The tab's WIRE storage declaration (ADR-0050) — repeated from the pre-placement declaration message so\n * the ENGINE binds it (durability included) wherever it runs, the elected dedicated engine included (whose\n * scope never saw the SharedWorker's declaration message). First payload binds; a later explicit\n * disagreement with the bound resolution is refused typed (`StorageDeclarationRefusedError`).\n */\n storage?: SyncStorageDeclaration;\n /** The tab's current auth token at attach time, or null when unauthenticated. */\n token: AuthTokenSnapshot | null;\n /**\n * Serializable per-attach config overrides (kept minimal; the urls are baked into the worker). `role`\n * selects which baked registry the worker boots (ADR-0032 S3): the spare is minted role-agnostic, so\n * the role is only known at claim/attach — a single worker file bakes BOTH registries and picks here.\n * `freshStore` is the fresh-store prefetch-overlap hint (ADR-0032 S4): the tab's claim path knows a\n * claimed spare is schemaless (fresh) while a mapped/returning store never is, and forwards that here so\n * the worker's `createSyncClient` can overlap the shape catch-up with the local boot phases.\n */\n config?: { syncEnabled?: boolean; role?: string; freshStore?: boolean };\n}\n\n/**\n * tab → worker: gate the worker's outbound convergence (the board's Offline toggle, ADR-0032 S3). In\n * in-process mode the toggle gates the local `autoSync` trigger; the worker owns convergence instead, so\n * the tab forwards the flag and the worker suppresses/resumes its flush passes. Going back online fires\n * one immediate pass so queued writes flush without waiting for the next interval tick.\n */\nexport interface SetOnlinePayload {\n online: boolean;\n}\n\n/**\n * The two background boot stages the worker announces over the bridge as one-shot milestones (ADR-0041\n * stage 2). `localReadReady` is NOT in this set: under the Option B contract the `attach-ack` fires AT the\n * engine's `localReadReady`, so a tab resolves that stage from the ack itself (early OR late attach) — it\n * needs no separate milestone. `writeReady` and `bootSettled` cross in the background write/sync tail, after\n * the ack, so they DO ride milestone messages (and the late-attach ack fold).\n */\nexport type BootMilestone = \"writeReady\" | \"bootSettled\";\n\n/** worker → tab: attach acknowledged. `alreadyBooted` is false for the attach that booted the engine. */\nexport interface AttachAckPayload {\n alreadyBooted: boolean;\n /**\n * True when the engine's initial sync had ALREADY fired by the time this attach was acked (a late\n * attach, ADR-0032 FIX 3). `ready` is monotonic in-process — once it resolves it stays resolved even if\n * the phase later degrades — so a tab attaching after that moment must resolve `ready` immediately from\n * the ack, rather than wait for a phase-\"ready\" status that may never come again.\n */\n engineReady?: boolean;\n /**\n * Late-attach milestone fold (ADR-0041 stage 2): true when the engine had ALREADY crossed `writeReady` /\n * `bootSettled` by the time this attach was acked, so a tab attaching after the stage fired resolves it\n * straight from the ack rather than waiting for a `milestone` broadcast it missed. The ack fires AT\n * `localReadReady`, so that stage is always implied by a non-error ack and carries no boolean.\n */\n writeReady?: boolean;\n bootSettled?: boolean;\n /**\n * Late-attach failure fold (ADR-0041 stage 2): present when the engine's background write/sync tail had\n * already REJECTED a downstream stage before this attach was acked. The tab rejects the matching stage\n * promise (so a gated write / `bootSettled` awaiter fails loudly rather than hangs) — but the attach\n * itself still RESOLVES (the engine reached `localReadReady`; only the tail failed). A live milestone\n * failure after attach rides the `milestone-error` broadcast instead.\n */\n writeReadyError?: BridgeErrorWire;\n bootSettledError?: BridgeErrorWire;\n /**\n * Present when the engine boot REJECTED for this attach: the tab rejects `attachSyncClient` with this\n * message instead of hanging forever on the ack (ADR-0032 FIX 1). A later attach retries the boot. This\n * is a LOCAL-READ-CORE failure (the engine never reached `localReadReady`); a tail failure after\n * `localReadReady` uses the stage-error fields above and does NOT reject the attach.\n */\n error?: BridgeErrorWire;\n}\n\n/** worker → tab: a broadcast pull-request — any attached tab may answer, first response wins (ADR-0032 decision 3). */\nexport interface TokenRequestPayload {\n requestId: string;\n}\n\n/** tab → worker: the answer to a {@link TokenRequestPayload}. `token: null` = the tab has none. */\nexport interface TokenResponsePayload {\n requestId: string;\n token: AuthTokenSnapshot | null;\n}\n\n/**\n * The RPC ops the attach facade proxies to the worker's booted client — the write API (mirrors\n * `client.mutate`/flush), mutation-state reads, and the one-shot raw inspection reads (`rawQuery`/`rawExec`).\n */\nexport type RpcOp =\n | \"create\"\n | \"update\"\n | \"delete\"\n | \"batch\"\n | \"transaction\"\n | \"flush\"\n | \"reconcile\"\n | \"retryFailed\"\n | \"recoverSending\"\n | \"discardConflict\"\n | \"discardQuarantined\"\n | \"desync\"\n | \"discardEphemeral\"\n // Lazy activation (ADR-0021): start the consistency groups of the given relation keys on the shared engine.\n // Engine-WIDE but additive/idempotent (unlike `desync`), so it is a plain fire-and-await RPC — carries\n // `[keys]`, resolves once the streams are started (catch-up may still be in flight).\n | \"ensureSynced\"\n | \"readMutationDetails\"\n | \"diagnostics\"\n | \"rawQuery\"\n | \"rawExec\"\n // Guarded one-shot Drizzle read (ADR-0032 decision 4): the attach client's Drizzle-over-bridge compiles a\n // read to SQL on the tab and routes it here as the {@link GuardedQueryWireArgs} tuple\n // `[sql, params?, { rowMode? }, use?]`. Unlike `rawQuery` (raw inspection, no guard), the worker runs the\n // engine's `guardedRawQuery` — the ADR-0041 read gate + the ADR-0021 lazy-group guard (activating any lazy\n // relation the SQL/`use` reference) — then returns the full PGlite `Results` over `rpc-result`, so Drizzle's\n // own result mapping runs on the tab. Only `rowMode` crosses in the options: drizzle's `parsers` map is\n // FUNCTIONS (non-serializable) and is stripped tab-side, then re-applied worker-side so the identity-parsed\n // OIDs (drizzle's identity parsers — temporal OIDs + numeric[]) round-trip as raw strings exactly as in-process.\n | \"guardedQuery\"\n // Boot observability (ADR-0034): pull the worker engine's most recent completed boot report. Returns the\n // stored report (or null) regardless of when this tab attached, so a late tab reads a boot predating it.\n | \"bootReport\"\n // Live-query diagnostics (ADR-0040 decision 5): pull the worker manager's per-entry snapshot (digests +\n // counts/timings, NEVER SQL/params/rows). Returns [] before any subscription / when the manager is absent.\n | \"liveQueryDiagnostics\"\n // Store backup (ADR-0035): the worker runs the live `exportStore` on its owned client; the dump crosses\n // back as a transferred `ArrayBuffer` ({@link ExportArtefactWire}), rebuilt into a `File` tab-side.\n | \"exportStore\"\n // Diagnostic dump (ADR-0035): the worker runs `exportDiagnostics` on its owned client (live datadir dump\n // → memory throwaway clone → `pg_dump`); the SQL crosses back as the same transferred `ArrayBuffer` wire.\n | \"exportDiagnostics\"\n // Data export (ADR-0035): the worker runs `exportData` on its owned client (drain the journal → throwaway\n // clone → `pg_dump -t` per synced table); the portable SQL crosses back as the same transferred wire.\n | \"exportData\";\n\n/**\n * The positional wire tuple the `guardedQuery` {@link RpcOp} carries: a guarded one-shot Drizzle read compiled\n * to SQL on the tab. Encoded identically by both tab-side senders (`attachSyncClient`'s bridge executor and\n * `guardedRawQuery`) and decoded against this same type worker-side (`defineSyncWorker`'s dispatch), so encoder\n * and decoder share ONE contract. `options` carries only `rowMode` — drizzle's `parsers` map is stripped\n * tab-side (see the `guardedQuery` op above) and re-applied worker-side. The optional trailing `use` lists the\n * raw-fragment lazy relations (ADR-0021) the SQL scan cannot see.\n */\nexport type GuardedQueryWireArgs = [\n sql: string,\n params: unknown[] | undefined,\n options: { rowMode?: \"array\" | \"object\" },\n use?: readonly string[],\n];\n\n/** tab → worker: a write/read-of-mutation-state RPC. `id` correlates the matching {@link RpcResultPayload}. */\nexport interface RpcPayload {\n op: RpcOp;\n args: unknown[];\n}\n\n/**\n * worker → tab: the wire form of ANY local-store export (ADR-0035) — the store backup's tarball OR the\n * diagnostic dump's SQL — carried as the `value` of an {@link RpcResultPayload}. The artefact crosses as a\n * transferred `ArrayBuffer` (zero-copy — the sender lists `buffer` in `postMessage`'s transfer list) plus\n * the metadata to rebuild it; the tab reconstructs a `File` from `buffer`/`fileName`/`mimeType`. A `File`\n * cannot itself be transferred, so it is decomposed here and reassembled tab-side, exactly the pattern the\n * codec's transferable seam anticipates for a zero-copy live-diff payload. `report` is the discriminated\n * {@link ExportReport} union, so the tab knows which export it round-tripped.\n */\nexport interface ExportArtefactWire {\n /** The artefact bytes (tarball or SQL) — transferred, not copied. */\n buffer: ArrayBuffer;\n /** The generated (or caller-supplied) artefact file name. */\n fileName: string;\n /** The artefact MIME type (`application/x-gzip` / `application/x-tar` for a backup, `application/sql` for a dump). */\n mimeType: string;\n /** The export report (ADR-0035), structured-cloned as a plain object — the `kind`-discriminated union. */\n report: ExportReport;\n}\n\n/** worker → tab: an RPC outcome, mirroring today's in-process resolve/reject semantics. */\nexport interface RpcResultPayload {\n ok: boolean;\n /** The resolved value (present when `ok`). */\n value?: unknown;\n /** The rejection message + optional structured detail (present when `!ok`). */\n error?: BridgeErrorWire;\n}\n\n/** tab → worker: register a live query. `id` correlates the initial snapshot; `queryId` keys subsequent diffs. */\nexport interface SubscribePayload {\n queryId: string;\n sql: string;\n params: unknown[];\n /**\n * The unique output aliases the worker wraps the query's columns under so it is safe to MATERIALISE\n * (one per output column, in the compiled SQL's column order). When omitted, the worker leaves the SQL\n * untouched and returns name-keyed rows; supply it for a JOIN with same-named columns, which\n * `live.query`/`live.incrementalQuery` otherwise\n * refuse to materialise (`column \"title\" specified more than once`). When present, result columns are\n * the aliases, so {@link pkColumns} must name a PK by its alias.\n */\n fields?: string[];\n /**\n * The result's primary-key columns, driving diff keying (§4). One column → the incremental path\n * (`live.incrementalQuery`); many → worker-side diff by composite PK; empty/absent → value-identity\n * fallback for a keyless query. When {@link fields} is supplied these name the ALIASED result columns.\n */\n pkColumns?: string[];\n /** Lazy relations to activate before the query runs (ADR-0021), forwarded to the worker's `prepareQuery`. */\n use?: string[];\n /**\n * Per-subscription keep-alive hint (ms) for the worker's live-query manager (ADR-0040 decision 4): how long\n * the shared registration should be retained after this subscription's last consumer leaves, so a matching\n * resubscribe reuses it verbatim. When omitted, the worker falls back to\n * `liveQueries.defaultKeepAliveMs`; absent means \"no hint\".\n */\n keepAliveMs?: number;\n}\n\n/** worker → tab: the initial ordered snapshot for a subscription. `id` correlates the `subscribe` request. */\nexport interface LiveInitialPayload {\n queryId: string;\n rows: Record<string, unknown>[];\n /**\n * The `lazy` relations the worker's guard activated for this query (ADR-0021) — the relations held out\n * of the eager boot set. Observability only: {@link hydratingTables}, not this, drives the tab's\n * `hydrated` promise.\n */\n lazyTables?: string[];\n /**\n * The referenced consistency groups' member tables (eager OR lazy) that were NOT YET caught up when this\n * snapshot was taken (ADR-0021 / ADR-0032). Non-empty → the tab builds a `hydrated` promise the worker\n * settles via `live-hydrated` (posted after the catch-up rows on this same port). Absent → every\n * referenced group was already ready (steady state) or sync is disabled: nothing to hydrate.\n */\n hydratingTables?: string[];\n}\n\n/**\n * worker → tab: the subscription's lazy relations have completed their initial catch-up AND the live\n * query has been refreshed against the caught-up store (ADR-0021). Posted on the SAME port as the\n * live-diff stream, strictly after the refresh-triggered diff — so when the tab sees this, the rows\n * reflecting the catch-up have already been delivered. Resolves the tab subscription's `hydrated`\n * promise (the React hooks' `hydrating` gate); never sent for a query with no pending groups (steady\n * state / sync disabled), i.e. an empty `live-initial` {@link LiveInitialPayload.hydratingTables}.\n */\nexport interface LiveHydratedPayload {\n queryId: string;\n}\n\n/**\n * worker → tab: a DIFF update for a subscription (§4). Never a full result-set resend after the initial\n * snapshot. `order` is the full ordered list of row keys (cheap — keys only, no row bodies); `added`/\n * `changed` carry only the delta row bodies; `removed` carries only the dropped keys. The tab materializer\n * rebuilds the ordered array from `order`, reusing cached row objects for keys not in `added`/`changed` so\n * an unchanged row keeps its object identity (React memo bails on `===`).\n */\nexport interface LiveDiffPayload {\n queryId: string;\n /** Every result key in ORDER BY order (the query's delivered order). */\n order: string[];\n added: { key: string; row: Record<string, unknown> }[];\n changed: { key: string; row: Record<string, unknown> }[];\n removed: string[];\n}\n\n/** worker → tab: the single broadcast event stream (ADR-0032 decision 7), re-exposed as today's callbacks. */\nexport type BridgeEvent =\n | { kind: \"status\"; status: SyncRuntimeStatus }\n | { kind: \"groupReady\"; groupKey: string }\n // Staged boot readiness (ADR-0041 stage 2): a one-shot milestone as the engine crosses a background boot\n // stage (`writeReady` / `bootSettled`), broadcast to currently-attached ports. A tab attaching AFTER a\n // stage fired never sees the broadcast — it folds the current milestone set off its `attach-ack` instead.\n // One engine crosses each stage once; every port observes the same monotonic sequence (ack fold + event).\n | { kind: \"milestone\"; stage: BootMilestone }\n // The mirror failure edge: the background write/sync tail REJECTED a downstream stage (ADR-0041). Rejects\n // the tab's matching `writeReady` / `bootSettled` promise so an awaiter fails loudly rather than hanging;\n // `localReadReady` (and the resolved attach) are unaffected — the engine reached local-read readiness.\n | { kind: \"milestone-error\"; stage: BootMilestone; error: BridgeErrorWire }\n | { kind: \"conflict\"; details: unknown }\n | { kind: \"quarantine\"; details: unknown }\n | { kind: \"reject\"; details: unknown }\n | { kind: \"schema-change\"; event: unknown }\n | { kind: \"sync-error\"; message: string }\n | { kind: \"timing\"; label: string; ms: number; data?: Record<string, unknown> }\n // Boot observability (ADR-0034): the one-shot boot report, broadcast to currently-attached ports when the\n // engine's boot finalizes (the push counterpart of the `bootReport` pull). Later tabs read it via the pull.\n | { kind: \"boot-report\"; report: BootReport }\n // The debug rail (ADR-0032 decision 7): stamped with the WORKER's monotonic clock and origin-tagged so a\n // tab can re-print it as `[pgxsinkit·w <stamp>ms] <line>` — a SharedWorker's own console is invisible.\n | { kind: \"debug\"; stamp: number; line: string; data?: Record<string, unknown> };\n\n/** tab → worker: an app-driven wake (online/visibilitychange), treated as a convergence pass request. */\nexport interface WakePayload {\n reason: \"online\" | \"visibility\" | \"manual\";\n}\n\n// ─── Codec seam ─────────────────────────────────────────────────────────────\n\n/**\n * The codec every bridge payload crosses through (owner-mandated seam, ADR-0032 S2 §1). v1 ships exactly\n * ONE codec — {@link identityCodec}, which relies on the transport's own structured clone. The seam exists\n * so a columnar/transferable codec (e.g. one that packs live-diff rows into a shared `ArrayBuffer` and\n * returns it as a transferable) can be swapped in later WITHOUT any protocol change: the router already\n * treats `BridgeEnvelope.payload` as opaque, and `encode` may return `{ payload, transfer }` so the sender\n * hands transferables to `postMessage`. Keep encode/decode inverse and side-effect free.\n */\nexport interface BridgeCodec {\n /** Encode a raw payload into the envelope body. May declare transferables for a future zero-copy codec. */\n encode: (payload: unknown) => { payload: unknown; transfer?: BridgeTransferable[] };\n /** Decode an envelope body back into the raw payload. Inverse of {@link encode}. */\n decode: (payload: unknown) => unknown;\n}\n\n/**\n * The identity codec, wire-format version 1 ({@link BRIDGE_PROTOCOL_VERSION}): the body IS the payload,\n * and the transport's structured clone does the real copying. No transferables. The sole codec at this\n * wire version — swapping in a columnar codec later touches only this object, never the message types or\n * the router.\n */\nexport const identityCodec: BridgeCodec = {\n encode: (payload) => ({ payload }),\n decode: (payload) => payload,\n};\n\n// ─── Envelope helpers ─────────────────────────────────────────────────────────\n\n/** Build a wire envelope, running the payload through the codec. Returns the envelope + any transferables. */\nexport function encodeEnvelope(\n codec: BridgeCodec,\n type: BridgeMessageType,\n payload: unknown,\n id?: string,\n): { envelope: BridgeEnvelope; transfer?: BridgeTransferable[] } {\n const encoded = codec.encode(payload);\n const envelope: BridgeEnvelope = {\n ch: BRIDGE_CHANNEL,\n v: BRIDGE_PROTOCOL_VERSION,\n type,\n payload: encoded.payload,\n ...(id !== undefined ? { id } : {}),\n };\n return { envelope, ...(encoded.transfer ? { transfer: encoded.transfer } : {}) };\n}\n\n/** Type-guard a received message as a bridge envelope of the current protocol version (ignore foreign traffic). */\nexport function isBridgeEnvelope(data: unknown): data is BridgeEnvelope {\n return (\n typeof data === \"object\" &&\n data !== null &&\n (data as { ch?: unknown }).ch === BRIDGE_CHANNEL &&\n (data as { v?: unknown }).v === BRIDGE_PROTOCOL_VERSION\n );\n}\n\n/**\n * Send a typed message over a port: encode → post (with any transferables). The one write choke point.\n * `transfer` lets a caller declare payload-specific transferables (e.g. a store-backup's `ArrayBuffer`,\n * ADR-0035) WITHOUT teaching the shared codec about that op — they are merged after any the codec itself\n * produces, so both the codec's future zero-copy path and per-message transfers coexist.\n */\nexport function postBridgeMessage(\n port: BridgePort,\n codec: BridgeCodec,\n type: BridgeMessageType,\n payload: unknown,\n id?: string,\n transfer?: BridgeTransferable[],\n): void {\n const { envelope, transfer: codecTransfer } = encodeEnvelope(codec, type, payload, id);\n const allTransfer = [...(codecTransfer ?? []), ...(transfer ?? [])];\n if (allTransfer.length > 0) {\n port.postMessage(envelope, allTransfer);\n } else {\n port.postMessage(envelope);\n }\n}\n",
46
+ "// The bridge protocol (ADR-0032 S2). Everything that crosses between a tab and the shared sync engine\n// travels as a typed {@link BridgeEnvelope} over a minimal {@link BridgePort} (a MessagePort-shaped\n// transport). The router only ever inspects the envelope's `type`/`id`; its `payload` is OPAQUE to the\n// router and always passes through a {@link BridgeCodec}, so a later columnar/transferable codec can be\n// swapped in WITHOUT any protocol change (see BridgeCodec's doc).\n//\n// Deliberately transport-agnostic: `defineSyncWorker` and `attachSyncClient` both talk to a `BridgePort`,\n// never a real `Worker`/`SharedWorker` directly — which is exactly why the whole bridge is unit-testable\n// over bun's `MessageChannel` with no worker at all.\n\nimport type { SyncRuntimeStatus, SyncStorageDeclaration } from \"@pgxsinkit/contracts\";\n\nimport type { BootReport } from \"../boot-report\";\nimport type { ExportReport } from \"../export-store\";\n\nexport const BRIDGE_CHANNEL = \"pgxsinkit-bridge\" as const;\nexport const BRIDGE_PROTOCOL_VERSION = 1 as const;\n\n/**\n * A structured-clone transferable (an `ArrayBuffer`, a `MessagePort`, …). The library carries no DOM lib\n * dependency (like the convergence triggers), so this is the toolkit's own name for the type a future\n * columnar codec would hand to `postMessage`'s transfer list. The wire-format-1 identity codec\n * ({@link BRIDGE_PROTOCOL_VERSION}) never produces one.\n */\nexport type BridgeTransferable = unknown;\n\n/**\n * The minimal MessagePort-shaped transport the bridge needs — the intersection of a real `MessagePort`,\n * a `SharedWorker` port, and a dedicated `Worker`/`self`. Injected everywhere so the protocol layer is\n * exercised with a plain `MessageChannel` (no Worker) in tests. `start()` is optional (MessagePort needs\n * it, `Worker`/`self` do not); `close()` is optional (a dedicated `self` cannot be closed by the tab).\n */\nexport interface BridgePort {\n // `transfer` is typed `any` (not `BridgeTransferable[]`) SOLELY so a real DOM `MessagePort`/`Worker` is\n // assignable to `BridgePort` without a cast: the library carries no DOM lib, and DOM's overloaded\n // `postMessage(message, transfer: Transferable[])` is CONTRAVARIANTLY stricter than any DOM-lib-free array\n // type we could name here (`unknown[] | undefined` is not assignable to `Transferable[]`). The list is opaque\n // to the library — the identity codec never produces one — so widening the param loses nothing internal while\n // letting consumers pass `SharedWorker.port` (and a `() => SharedWorker` factory) with no `as unknown` laundering.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- DOM-postMessage contravariance escape hatch\n postMessage: (message: unknown, transfer?: any) => void;\n addEventListener: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n removeEventListener: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n start?: () => void;\n close?: () => void;\n}\n\n/**\n * The wire envelope. `payload` is the codec-encoded body — opaque to the router, which only routes on\n * `type` and correlates on `id`. Keeping the body opaque is what lets a future codec return a columnar\n * buffer (a transferable) in `payload` without any change to routing.\n */\nexport interface BridgeEnvelope {\n ch: typeof BRIDGE_CHANNEL;\n v: typeof BRIDGE_PROTOCOL_VERSION;\n type: BridgeMessageType;\n /** Correlation id for request/response pairs (rpc, subscribe, token pull). Absent for fire-and-forget fanout. */\n id?: string;\n /** Codec-encoded body — opaque to the router; decode with the same {@link BridgeCodec}. */\n payload: unknown;\n}\n\nexport type BridgeMessageType =\n // tab → worker\n | \"provision\"\n | \"attach\"\n | \"detach\"\n | \"token-push\"\n | \"token-response\"\n | \"rpc\"\n | \"subscribe\"\n | \"unsubscribe\"\n | \"wake\"\n | \"set-online\"\n // worker → tab\n | \"provision-ack\"\n | \"attach-ack\"\n | \"token-request\"\n | \"rpc-result\"\n | \"live-initial\"\n | \"live-diff\"\n | \"live-hydrated\"\n | \"event\";\n\n// ─── Payload shapes ───────────────────────────────────────────────────────────\n\n/**\n * The bridge's serialized-error wire shape. `message` always; `name` when the source error carried a\n * non-default one, so a TYPED failure (e.g. a restore refused with `RestoreTargetExistsError`) stays\n * type-detectable after the tab rebuilds it — a consumer must never be forced into message matching;\n * `detail` for structured payloads (execution-limit mismatch, engine-relocated, …) that rebuild as their\n * typed error class tab-side.\n */\nexport interface BridgeErrorWire {\n message: string;\n name?: string;\n detail?: unknown;\n}\n\n/** A single auth token snapshot the tab owns and pushes to the worker (ADR-0032 decision 3). */\nexport interface AuthTokenSnapshot {\n accessToken: string;\n /** Absolute expiry in epoch milliseconds (`Date.now()`-comparable), so the worker can apply an expiry margin. */\n expiresAt: number;\n}\n\n/**\n * tab → worker: pre-spawn the store WITHOUT booting the engine (ADR-0032 decision 5). Sent at the\n * login screen against the freshly-named spare worker: the worker only runs PGlite `create`/initdb\n * (off every thread that matters) and holds the raw store idle — no schema, no shape streams, no token\n * — until the real {@link AttachPayload} arrives (with config + token) and adopts the provisioned store.\n * Role-agnostic on purpose: the spare is minted before the user (and role) is known, so provisioning\n * carries no registry — the schema is applied at attach with the role-resolved registry.\n */\nexport interface ProvisionPayload {\n /** The bound store id (informational; naming is done tab-side via the SharedWorker name). */\n storeId?: string;\n /**\n * The plain store PATH (ADR-0036) to `create` ahead of attach — a name, not a storage URL; the worker\n * derives the backend (IndexedDB in a browser worker). When omitted, `storeId`/the worker default is used.\n */\n storePath?: string;\n /**\n * @internal INTERNAL WIRE FIELD (not consumer config, ADR-0036). Carries the testing memory-backend\n * override across the bridge, because a symbol-keyed marker does NOT survive `postMessage` structured\n * clone — so the worker's memory-store selection travels as this explicit field. Set only by the test\n * lane (via the attaching helper); a browser worker never sends it.\n */\n testStoreBackend?: \"memory\";\n /**\n * The tab's WIRE storage declaration (ADR-0050) — the same declaration the pre-placement declaration\n * message carried, repeated here so the ENGINE binds it (the mint's durability) wherever it runs. The\n * first provision/attach binds the store's declaration; a later payload whose explicit field disagrees\n * with the bound resolution is refused typed (`StorageDeclarationRefusedError`).\n */\n storage?: SyncStorageDeclaration;\n}\n\n/** worker → tab: the provision completed (or failed). Lets the login screen confirm the spare is warm. */\nexport interface ProvisionAckPayload {\n ok: boolean;\n storeId?: string;\n /** Present when `!ok` — the initdb/create failed; the worker falls back to a fresh create at attach. */\n error?: { message: string };\n}\n\n/**\n * tab → worker: a store-backup tarball to restore from, carried on the boot {@link AttachPayload}\n * (ADR-0035 decision 6). The mirror image of {@link ExportArtefactWire}: a `File`/`Blob` cannot cross the\n * bridge as a transferable, so it is decomposed into its zero-copy `ArrayBuffer` (listed on `postMessage`'s\n * transfer list) plus the metadata to rebuild it, and the worker reassembles a `Blob` from\n * `buffer`/`mimeType` to hand `createSyncClient` as `restoreFrom`.\n */\nexport interface RestoreArtefactWire {\n /** The backup tarball bytes — transferred, not copied. */\n buffer: ArrayBuffer;\n /** The backup file name (informational; PGlite's `loadDataDir` reads the bytes, not the name). */\n fileName: string;\n /** The backup MIME type (`application/x-gzip` / `application/x-tar`), used to rebuild the `Blob`. */\n mimeType: string;\n}\n\n/** tab → worker: the attach handshake. The first attach boots the engine; later attaches join it. */\nexport interface AttachPayload {\n /** The bound store id (SharedWorker naming resolves it tab-side before attach — ADR-0032 decision 5). */\n storeId?: string;\n /**\n * Explicit plain store PATH (ADR-0036) if the worker should create its own store — a name, not a storage\n * URL; the worker derives the backend. When omitted, `storeId`/the worker default is used.\n */\n storePath?: string;\n /**\n * @internal INTERNAL WIRE FIELD (not consumer config, ADR-0036). Carries the testing memory-backend\n * override across the bridge — a symbol-keyed marker does not survive structured clone, so the worker's\n * memory-store selection travels as this explicit field. Set only by the test lane; never by a browser tab.\n */\n testStoreBackend?: \"memory\";\n /** ADR-0049 D5: the tab's engine-construction limit, checked by the host before it acknowledges attach. */\n executionLimit?: { maxDispatchMs?: number };\n /**\n * Restore the store from a backup on THIS attach (ADR-0035 decision 6) — the worker-mode carrier of\n * `createSyncClient`'s `restoreFrom`. Restore rides the FIRST attach (the boot attach): a `File`/`Blob`\n * cannot cross `postMessage` as a transferable, so the tab decomposes it into a transferred `ArrayBuffer`\n * plus its name/mime — the {@link ExportArtefactWire} pattern in reverse — and the worker recomposes it\n * into a `Blob` and hands it to `createSyncClient`. Absent on every ordinary attach. An attach that carries\n * this AFTER the engine has already booted is REFUSED (you cannot restore into a running store).\n */\n restore?: RestoreArtefactWire;\n /**\n * The tab's WIRE storage declaration (ADR-0050) — repeated from the pre-placement declaration message so\n * the ENGINE binds it (durability included) wherever it runs, the elected dedicated engine included (whose\n * scope never saw the SharedWorker's declaration message). First payload binds; a later explicit\n * disagreement with the bound resolution is refused typed (`StorageDeclarationRefusedError`).\n */\n storage?: SyncStorageDeclaration;\n /** The tab's current auth token at attach time, or null when unauthenticated. */\n token: AuthTokenSnapshot | null;\n /**\n * Serializable per-attach config overrides (kept minimal; the urls are baked into the worker). `role`\n * selects which baked registry the worker boots (ADR-0032 S3): the spare is minted role-agnostic, so\n * the role is only known at claim/attach — a single worker file bakes BOTH registries and picks here.\n * `freshStore` is the fresh-store prefetch-overlap hint (ADR-0032 S4): the tab's claim path knows a\n * claimed spare is schemaless (fresh) while a mapped/returning store never is, and forwards that here so\n * the worker's `createSyncClient` can overlap the shape catch-up with the local boot phases.\n */\n config?: { syncEnabled?: boolean; role?: string; freshStore?: boolean };\n}\n\n/**\n * tab → worker: gate the worker's outbound convergence (the board's Offline toggle, ADR-0032 S3). In\n * in-process mode the toggle gates the local `autoSync` trigger; the worker owns convergence instead, so\n * the tab forwards the flag and the worker suppresses/resumes its flush passes. Going back online fires\n * one immediate pass so queued writes flush without waiting for the next interval tick.\n */\nexport interface SetOnlinePayload {\n online: boolean;\n}\n\n/**\n * The two background boot stages the worker announces over the bridge as one-shot milestones (ADR-0041\n * stage 2). `localReadReady` is NOT in this set: under the Option B contract the `attach-ack` fires AT the\n * engine's `localReadReady`, so a tab resolves that stage from the ack itself (early OR late attach) — it\n * needs no separate milestone. `writeReady` and `bootSettled` cross in the background write/sync tail, after\n * the ack, so they DO ride milestone messages (and the late-attach ack fold).\n */\nexport type BootMilestone = \"writeReady\" | \"bootSettled\";\n\n/** worker → tab: attach acknowledged. `alreadyBooted` is false for the attach that booted the engine. */\nexport interface AttachAckPayload {\n alreadyBooted: boolean;\n /**\n * True when the engine's initial sync had ALREADY fired by the time this attach was acked (a late\n * attach, ADR-0032 FIX 3). `ready` is monotonic in-process — once it resolves it stays resolved even if\n * the phase later degrades — so a tab attaching after that moment must resolve `ready` immediately from\n * the ack, rather than wait for a phase-\"ready\" status that may never come again.\n */\n engineReady?: boolean;\n /**\n * Late-attach milestone fold (ADR-0041 stage 2): true when the engine had ALREADY crossed `writeReady` /\n * `bootSettled` by the time this attach was acked, so a tab attaching after the stage fired resolves it\n * straight from the ack rather than waiting for a `milestone` broadcast it missed. The ack fires AT\n * `localReadReady`, so that stage is always implied by a non-error ack and carries no boolean.\n */\n writeReady?: boolean;\n bootSettled?: boolean;\n /**\n * Late-attach failure fold (ADR-0041 stage 2): present when the engine's background write/sync tail had\n * already REJECTED a downstream stage before this attach was acked. The tab rejects the matching stage\n * promise (so a gated write / `bootSettled` awaiter fails loudly rather than hangs) — but the attach\n * itself still RESOLVES (the engine reached `localReadReady`; only the tail failed). A live milestone\n * failure after attach rides the `milestone-error` broadcast instead.\n */\n writeReadyError?: BridgeErrorWire;\n bootSettledError?: BridgeErrorWire;\n /**\n * Present when the engine boot REJECTED for this attach: the tab rejects `attachSyncClient` with this\n * message instead of hanging forever on the ack (ADR-0032 FIX 1). A later attach retries the boot. This\n * is a LOCAL-READ-CORE failure (the engine never reached `localReadReady`); a tail failure after\n * `localReadReady` uses the stage-error fields above and does NOT reject the attach.\n */\n error?: BridgeErrorWire;\n}\n\n/** worker → tab: a broadcast pull-request — any attached tab may answer, first response wins (ADR-0032 decision 3). */\nexport interface TokenRequestPayload {\n requestId: string;\n}\n\n/** tab → worker: the answer to a {@link TokenRequestPayload}. `token: null` = the tab has none. */\nexport interface TokenResponsePayload {\n requestId: string;\n token: AuthTokenSnapshot | null;\n}\n\n/**\n * The RPC ops the attach facade proxies to the worker's booted client — the write API (mirrors\n * `client.mutate`/flush), mutation-state reads, and the one-shot raw inspection reads (`rawQuery`/`rawExec`).\n */\nexport type RpcOp =\n | \"create\"\n | \"update\"\n | \"delete\"\n | \"batch\"\n | \"transaction\"\n | \"flush\"\n | \"reconcile\"\n | \"retryFailed\"\n | \"recoverSending\"\n | \"discardConflict\"\n | \"discardQuarantined\"\n | \"desync\"\n | \"discardEphemeral\"\n // Lazy activation (ADR-0021): start the consistency groups of the given relation keys on the shared engine.\n // Engine-WIDE but additive/idempotent (unlike `desync`), so it is a plain fire-and-await RPC — carries\n // `[keys]`, resolves once the streams are started (catch-up may still be in flight).\n | \"ensureSynced\"\n | \"readMutationDetails\"\n | \"diagnostics\"\n | \"rawQuery\"\n | \"rawExec\"\n // Guarded one-shot Drizzle read (ADR-0032 decision 4): the attach client's Drizzle-over-bridge compiles a\n // read to SQL on the tab and routes it here as the {@link GuardedQueryWireArgs} tuple\n // `[sql, params?, { rowMode? }, use?]`. Unlike `rawQuery` (raw inspection, no guard), the worker runs the\n // engine's `guardedRawQuery` — the ADR-0041 read gate + the ADR-0021 lazy-group guard (activating any lazy\n // relation the SQL/`use` reference) — then returns the full PGlite `Results` over `rpc-result`, so Drizzle's\n // own result mapping runs on the tab. Only `rowMode` crosses in the options: drizzle's `parsers` map is\n // FUNCTIONS (non-serializable) and is stripped tab-side, then re-applied worker-side so the identity-parsed\n // OIDs (drizzle's identity parsers — temporal OIDs + numeric[]) round-trip as raw strings exactly as in-process.\n | \"guardedQuery\"\n // Boot observability (ADR-0034): pull the worker engine's most recent completed boot report. Returns the\n // stored report (or null) regardless of when this tab attached, so a late tab reads a boot predating it.\n | \"bootReport\"\n // Live-query diagnostics (ADR-0040 decision 5): pull the worker manager's per-entry snapshot (digests +\n // counts/timings, NEVER SQL/params/rows). Returns [] before any subscription / when the manager is absent.\n | \"liveQueryDiagnostics\"\n // Store backup (ADR-0035): the worker runs the live `exportStore` on its owned client; the dump crosses\n // back as a transferred `ArrayBuffer` ({@link ExportArtefactWire}), rebuilt into a `File` tab-side.\n | \"exportStore\"\n // Diagnostic dump (ADR-0035): the worker runs `exportDiagnostics` on its owned client (live datadir dump\n // → memory throwaway clone → `pg_dump`); the SQL crosses back as the same transferred `ArrayBuffer` wire.\n | \"exportDiagnostics\"\n // Data export (ADR-0035): the worker runs `exportData` on its owned client (drain the journal → throwaway\n // clone → `pg_dump -t` per synced table); the portable SQL crosses back as the same transferred wire.\n | \"exportData\";\n\n/**\n * The positional wire tuple the `guardedQuery` {@link RpcOp} carries: a guarded one-shot Drizzle read compiled\n * to SQL on the tab. Encoded identically by both tab-side senders (`attachSyncClient`'s bridge executor and\n * `guardedRawQuery`) and decoded against this same type worker-side (`defineSyncWorker`'s dispatch), so encoder\n * and decoder share ONE contract. `options` carries only `rowMode` — drizzle's `parsers` map is stripped\n * tab-side (see the `guardedQuery` op above) and re-applied worker-side. The optional trailing `use` lists the\n * raw-fragment lazy relations (ADR-0021) the SQL scan cannot see.\n */\nexport type GuardedQueryWireArgs = [\n sql: string,\n params: unknown[] | undefined,\n options: { rowMode?: \"array\" | \"object\" },\n use?: readonly string[],\n];\n\n/** tab → worker: a write/read-of-mutation-state RPC. `id` correlates the matching {@link RpcResultPayload}. */\nexport interface RpcPayload {\n op: RpcOp;\n args: unknown[];\n}\n\n/**\n * worker → tab: the wire form of ANY local-store export (ADR-0035) — the store backup's tarball OR the\n * diagnostic dump's SQL — carried as the `value` of an {@link RpcResultPayload}. The artefact crosses as a\n * transferred `ArrayBuffer` (zero-copy — the sender lists `buffer` in `postMessage`'s transfer list) plus\n * the metadata to rebuild it; the tab reconstructs a `File` from `buffer`/`fileName`/`mimeType`. A `File`\n * cannot itself be transferred, so it is decomposed here and reassembled tab-side, exactly the pattern the\n * codec's transferable seam anticipates for a zero-copy live-diff payload. `report` is the discriminated\n * {@link ExportReport} union, so the tab knows which export it round-tripped.\n */\nexport interface ExportArtefactWire {\n /** The artefact bytes (tarball or SQL) — transferred, not copied. */\n buffer: ArrayBuffer;\n /** The generated (or caller-supplied) artefact file name. */\n fileName: string;\n /** The artefact MIME type (`application/x-gzip` / `application/x-tar` for a backup, `application/sql` for a dump). */\n mimeType: string;\n /** The export report (ADR-0035), structured-cloned as a plain object — the `kind`-discriminated union. */\n report: ExportReport;\n}\n\n/** worker → tab: an RPC outcome, mirroring today's in-process resolve/reject semantics. */\nexport interface RpcResultPayload {\n ok: boolean;\n /** The resolved value (present when `ok`). */\n value?: unknown;\n /** The rejection message + optional structured detail (present when `!ok`). */\n error?: BridgeErrorWire;\n}\n\n/** tab → worker: register a live query. `id` correlates the initial snapshot; `queryId` keys subsequent diffs. */\nexport interface SubscribePayload {\n queryId: string;\n sql: string;\n params: unknown[];\n /**\n * The unique output aliases the worker wraps the query's columns under so it is safe to MATERIALISE\n * (one per output column, in the compiled SQL's column order). When omitted, the worker leaves the SQL\n * untouched and returns name-keyed rows; supply it for a JOIN with same-named columns, which\n * `live.query`/`live.incrementalQuery` otherwise\n * refuse to materialise (`column \"title\" specified more than once`). When present, result columns are\n * the aliases, so {@link pkColumns} must name a PK by its alias.\n */\n fields?: string[];\n /**\n * The result's primary-key columns, driving diff keying (§4). One column → the incremental path\n * (`live.incrementalQuery`); many → worker-side diff by composite PK; empty/absent → value-identity\n * fallback for a keyless query. When {@link fields} is supplied these name the ALIASED result columns.\n */\n pkColumns?: string[];\n /** Lazy relations to activate before the query runs (ADR-0021), forwarded to the worker's `prepareQuery`. */\n use?: string[];\n /**\n * Per-subscription keep-alive hint (ms) for the worker's live-query manager (ADR-0040 decision 4): how long\n * the shared registration should be retained after this subscription's last consumer leaves, so a matching\n * resubscribe reuses it verbatim. When omitted, the worker falls back to\n * `liveQueries.defaultKeepAliveMs`; absent means \"no hint\".\n */\n keepAliveMs?: number;\n}\n\n/** worker → tab: the initial ordered snapshot for a subscription. `id` correlates the `subscribe` request. */\nexport interface LiveInitialPayload {\n queryId: string;\n rows: Record<string, unknown>[];\n /**\n * The `lazy` relations the worker's guard activated for this query (ADR-0021) — the relations held out\n * of the eager boot set. Observability only: {@link hydratingTables}, not this, drives the tab's\n * `hydrated` promise.\n */\n lazyTables?: string[];\n /**\n * The referenced consistency groups' member tables (eager OR lazy) that were NOT YET caught up when this\n * snapshot was taken (ADR-0021 / ADR-0032). Non-empty → the tab builds a `hydrated` promise the worker\n * settles via `live-hydrated` (posted after the catch-up rows on this same port). Absent → every\n * referenced group was already ready (steady state) or sync is disabled: nothing to hydrate.\n */\n hydratingTables?: string[];\n}\n\n/**\n * worker → tab: the subscription's lazy relations have completed their initial catch-up AND the live\n * query has been refreshed against the caught-up store (ADR-0021). Posted on the SAME port as the\n * live-diff stream, strictly after the refresh-triggered diff — so when the tab sees this, the rows\n * reflecting the catch-up have already been delivered. Resolves the tab subscription's `hydrated`\n * promise (the React hooks' `hydrating` gate); never sent for a query with no pending groups (steady\n * state / sync disabled), i.e. an empty `live-initial` {@link LiveInitialPayload.hydratingTables}.\n */\nexport interface LiveHydratedPayload {\n queryId: string;\n}\n\n/**\n * worker → tab: a DIFF update for a subscription (§4). Never a full result-set resend after the initial\n * snapshot. `order` is the full ordered list of row keys (cheap — keys only, no row bodies); `added`/\n * `changed` carry only the delta row bodies; `removed` carries only the dropped keys. The tab materializer\n * rebuilds the ordered array from `order`, reusing cached row objects for keys not in `added`/`changed` so\n * an unchanged row keeps its object identity (React memo bails on `===`).\n */\nexport interface LiveDiffPayload {\n queryId: string;\n /** Every result key in ORDER BY order (the query's delivered order). */\n order: string[];\n added: { key: string; row: Record<string, unknown> }[];\n changed: { key: string; row: Record<string, unknown> }[];\n removed: string[];\n}\n\n/** worker → tab: the single broadcast event stream (ADR-0032 decision 7), re-exposed as today's callbacks. */\nexport type BridgeEvent =\n | { kind: \"status\"; status: SyncRuntimeStatus }\n | { kind: \"groupReady\"; groupKey: string }\n // Staged boot readiness (ADR-0041 stage 2): a one-shot milestone as the engine crosses a background boot\n // stage (`writeReady` / `bootSettled`), broadcast to currently-attached ports. A tab attaching AFTER a\n // stage fired never sees the broadcast — it folds the current milestone set off its `attach-ack` instead.\n // One engine crosses each stage once; every port observes the same monotonic sequence (ack fold + event).\n | { kind: \"milestone\"; stage: BootMilestone }\n // The mirror failure edge: the background write/sync tail REJECTED a downstream stage (ADR-0041). Rejects\n // the tab's matching `writeReady` / `bootSettled` promise so an awaiter fails loudly rather than hanging;\n // `localReadReady` (and the resolved attach) are unaffected — the engine reached local-read readiness.\n | { kind: \"milestone-error\"; stage: BootMilestone; error: BridgeErrorWire }\n | { kind: \"conflict\"; details: unknown }\n | { kind: \"quarantine\"; details: unknown }\n | { kind: \"reject\"; details: unknown }\n | { kind: \"schema-change\"; event: unknown }\n | { kind: \"sync-error\"; message: string }\n | { kind: \"timing\"; label: string; ms: number; data?: Record<string, unknown> }\n // Boot observability (ADR-0034): the one-shot boot report, broadcast to currently-attached ports when the\n // engine's boot finalizes (the push counterpart of the `bootReport` pull). Later tabs read it via the pull.\n | { kind: \"boot-report\"; report: BootReport }\n // The debug rail (ADR-0032 decision 7): stamped with the WORKER's monotonic clock and origin-tagged so a\n // tab can re-print it as `[pgxsinkit·w <stamp>ms] <line>` — a SharedWorker's own console is invisible.\n | { kind: \"debug\"; stamp: number; line: string; data?: Record<string, unknown> };\n\n/** tab → worker: an app-driven wake (online/visibilitychange), treated as a convergence pass request. */\nexport interface WakePayload {\n reason: \"online\" | \"visibility\" | \"manual\";\n}\n\n// ─── Codec seam ─────────────────────────────────────────────────────────────\n\n/**\n * The codec every bridge payload crosses through (owner-mandated seam, ADR-0032 S2 §1). v1 ships exactly\n * ONE codec — {@link identityCodec}, which relies on the transport's own structured clone. The seam exists\n * so a columnar/transferable codec (e.g. one that packs live-diff rows into a shared `ArrayBuffer` and\n * returns it as a transferable) can be swapped in later WITHOUT any protocol change: the router already\n * treats `BridgeEnvelope.payload` as opaque, and `encode` may return `{ payload, transfer }` so the sender\n * hands transferables to `postMessage`. Keep encode/decode inverse and side-effect free.\n */\nexport interface BridgeCodec {\n /** Encode a raw payload into the envelope body. May declare transferables for a future zero-copy codec. */\n encode: (payload: unknown) => { payload: unknown; transfer?: BridgeTransferable[] };\n /** Decode an envelope body back into the raw payload. Inverse of {@link encode}. */\n decode: (payload: unknown) => unknown;\n}\n\n/**\n * The identity codec, wire-format version 1 ({@link BRIDGE_PROTOCOL_VERSION}): the body IS the payload,\n * and the transport's structured clone does the real copying. No transferables. The sole codec at this\n * wire version — swapping in a columnar codec later touches only this object, never the message types or\n * the router.\n */\nexport const identityCodec: BridgeCodec = {\n encode: (payload) => ({ payload }),\n decode: (payload) => payload,\n};\n\n// ─── Envelope helpers ─────────────────────────────────────────────────────────\n\n/** Build a wire envelope, running the payload through the codec. Returns the envelope + any transferables. */\nexport function encodeEnvelope(\n codec: BridgeCodec,\n type: BridgeMessageType,\n payload: unknown,\n id?: string,\n): { envelope: BridgeEnvelope; transfer?: BridgeTransferable[] } {\n const encoded = codec.encode(payload);\n const envelope: BridgeEnvelope = {\n ch: BRIDGE_CHANNEL,\n v: BRIDGE_PROTOCOL_VERSION,\n type,\n payload: encoded.payload,\n ...(id !== undefined ? { id } : {}),\n };\n return { envelope, ...(encoded.transfer ? { transfer: encoded.transfer } : {}) };\n}\n\n/** Type-guard a received message as a bridge envelope of the current protocol version (ignore foreign traffic). */\nexport function isBridgeEnvelope(data: unknown): data is BridgeEnvelope {\n return (\n typeof data === \"object\" &&\n data !== null &&\n (data as { ch?: unknown }).ch === BRIDGE_CHANNEL &&\n (data as { v?: unknown }).v === BRIDGE_PROTOCOL_VERSION\n );\n}\n\n/**\n * Send a typed message over a port: encode → post (with any transferables). The one write choke point.\n * `transfer` lets a caller declare payload-specific transferables (e.g. a store-backup's `ArrayBuffer`,\n * ADR-0035) WITHOUT teaching the shared codec about that op — they are merged after any the codec itself\n * produces, so both the codec's future zero-copy path and per-message transfers coexist.\n */\nexport function postBridgeMessage(\n port: BridgePort,\n codec: BridgeCodec,\n type: BridgeMessageType,\n payload: unknown,\n id?: string,\n transfer?: BridgeTransferable[],\n): void {\n const { envelope, transfer: codecTransfer } = encodeEnvelope(codec, type, payload, id);\n const allTransfer = [...(codecTransfer ?? []), ...(transfer ?? [])];\n if (allTransfer.length > 0) {\n port.postMessage(envelope, allTransfer);\n } else {\n port.postMessage(envelope);\n }\n}\n",
47
47
  "// The SharedWorker startup PLACEMENT DECISION (ADR-0049 decision 1/2, plan step 10b). A SharedWorker decides\n// its ENGINE HOME by running the placement probe (`placement-probe.ts`) ONCE at startup — a real\n// `createSyncAccessHandle` open in its own scope — and turns the probe's verdict into a placement result the\n// bootstrap gates every tab connection on. Granted → the engine lives IN the SharedWorker (`shared-worker`,\n// SW-direct, election disabled this lifetime); denied → the SharedWorker is ROUTER-ONLY (`elected-worker`) and\n// each tab's election coordinator spawns the real engine in a dedicated worker.\n//\n// This module is the PURE decision only — it boots NO engine and creates NO router. It is testable off-worker\n// (no real OPFS) via the injectable `probe`/`mintInstanceId` seams, the same discipline `placement-probe.ts`,\n// `engine-router.ts`, and `election-coordinator.ts` follow. The probe is NEVER cached across SW lifetimes\n// (invariant 8): a fresh SharedWorker runs a fresh decision.\n\nimport { type PlacementProbeResult, probeOpfsSyncAccess } from \"../placement-probe\";\n\n/**\n * The SharedWorker's engine-home decision (ADR-0049 D1). `shared-worker` = the engine boots in this\n * SharedWorker scope (granted OPFS sync access, SW-direct, election never engages); `elected-worker` = the\n * SharedWorker is router-only and each tab elects a dedicated engine worker. `probeError` carries the probe's\n * verbatim denial attribution when NOT granted (diagnostics only, never parsed). `swInstanceId` scopes every\n * minted engine identity's generation (`engine-router.ts`).\n */\nexport interface SwPlacementResult {\n engineHome: \"shared-worker\" | \"elected-worker\";\n probeError?: string;\n swInstanceId: string;\n /**\n * Present ONLY on a `shared-worker` home that is a CAPABILITY-ABSENCE fallback (ADR-0049 D1), not an OPFS\n * grant: the platform cannot hold sync-access handles in any home, so the engine boots in-SharedWorker on the\n * IDBFS backend with the registry-declared durability. Carries the verbatim probe attribution the fallback\n * boot stamps into `storageFallbackReason` (decision 12). Absent on a granted `shared-worker` (SW-direct OPFS)\n * and on `elected-worker` — an OPFS-capable elected home is not a fallback.\n */\n storageFallbackReason?: string;\n}\n\n/** Injectable seams so the decision is deterministic in a Bun unit test (no real OPFS, no real crypto needed). */\nexport interface DecideSwPlacementDeps {\n /** The placement probe; defaults to {@link probeOpfsSyncAccess}. Injected in tests to drive both verdicts. */\n probe?: () => Promise<PlacementProbeResult>;\n /** Mint the opaque SharedWorker instance id; defaults to `crypto.randomUUID()`. Injected for deterministic tests. */\n mintInstanceId?: () => string;\n}\n\n/**\n * Decide the SharedWorker's engine home ONCE at startup (ADR-0049 D1, invariant 8 — probe per boot, never\n * cached). Runs the placement probe; a granted verdict places the engine in-scope (`shared-worker`), a denied\n * one puts the SharedWorker in router-only mode (`elected-worker`) and carries the probe's verbatim error for\n * diagnostics. This is a PURE decision — no engine boots and no router is created here; the bootstrap\n * (`define-sync-worker.ts`) acts on the result.\n */\nexport async function decideSwPlacement(deps?: DecideSwPlacementDeps): Promise<SwPlacementResult> {\n const probe = deps?.probe ?? probeOpfsSyncAccess;\n const mintInstanceId = deps?.mintInstanceId ?? (() => crypto.randomUUID());\n const swInstanceId = mintInstanceId();\n const result = await probe();\n if (result.granted) {\n return { engineHome: \"shared-worker\", swInstanceId };\n }\n return {\n engineHome: \"elected-worker\",\n swInstanceId,\n ...(result.error !== undefined ? { probeError: result.error } : {}),\n };\n}\n",
48
48
  "// The worker's single auth token cache + pull mechanism (ADR-0032 decision 3). The worker holds exactly\n// ONE token and NEVER refreshes it — the tab layer is the sole auth owner (exactly one refresher exists, so\n// GoTrue refresh-token reuse detection can never trip). A read/write that finds the cache within the expiry\n// margin triggers ONE pull broadcast; concurrent needs dedupe onto that single in-flight pull; the first\n// tab answer wins. Factored out of `defineSyncWorker` so this mechanism is unit-tested in isolation.\n\nimport type { AuthTokenSnapshot } from \"./protocol\";\n\nexport interface WorkerTokenCache {\n /**\n * Resolve the access token for a shape/flush request. Returns the cached token when it is comfortably\n * ahead of expiry; otherwise broadcasts ONE pull (deduped across concurrent callers) and resolves when a\n * tab answers. Falls back to the (stale) cached token if a pull yields nothing.\n */\n getToken: () => Promise<string | undefined>;\n /** The tab pushed a fresh token (auth state change or the initial attach) — cache it and satisfy any pull. */\n push: (token: AuthTokenSnapshot | null) => void;\n /**\n * Seed the cache from a LATER attach's token, but only if it is strictly fresher than what is cached\n * (ADR-0032 FIX 5). Attach seeding must never CLOBBER a fresher cached token with an older/null one —\n * only the explicit `push` path (the tab as auth owner saying \"this is current\") may overwrite\n * unconditionally, including null on logout.\n */\n pushIfFresher: (token: AuthTokenSnapshot | null) => void;\n /** A tab answered a pull-request. First matching answer wins; later duplicates are ignored. */\n respond: (requestId: string, token: AuthTokenSnapshot | null) => void;\n}\n\nexport function createWorkerTokenCache(options: {\n marginMs: number;\n broadcastRequest: (requestId: string) => void;\n now?: () => number;\n}): WorkerTokenCache {\n const now = options.now ?? (() => Date.now());\n let cached: AuthTokenSnapshot | null = null;\n let inFlight: Promise<AuthTokenSnapshot | null> | null = null;\n let resolveInFlight: ((token: AuthTokenSnapshot | null) => void) | null = null;\n let currentRequestId: string | null = null;\n let requestCounter = 0;\n\n const settle = (token: AuthTokenSnapshot | null) => {\n if (token) cached = token;\n const resolve = resolveInFlight;\n inFlight = null;\n resolveInFlight = null;\n currentRequestId = null;\n resolve?.(token);\n };\n\n return {\n getToken: async () => {\n if (cached && cached.expiresAt - now() > options.marginMs) {\n return cached.accessToken;\n }\n if (!inFlight) {\n currentRequestId = `pull-${++requestCounter}`;\n inFlight = new Promise<AuthTokenSnapshot | null>((resolve) => {\n resolveInFlight = resolve;\n });\n // Exactly one broadcast per pull; concurrent getToken calls below await the same `inFlight`.\n options.broadcastRequest(currentRequestId);\n }\n const answered = await inFlight;\n return answered?.accessToken ?? cached?.accessToken;\n },\n push: (token) => {\n cached = token;\n // A push satisfies an outstanding pull too (the tab volunteered before answering the request).\n if (inFlight) settle(token);\n },\n pushIfFresher: (token) => {\n if (!token) return;\n if (cached && cached.expiresAt >= token.expiresAt) return;\n // Strictly fresher than the cache (or the cache is empty) → adopt it via `push`, which also settles\n // any in-flight pull.\n cached = token;\n if (inFlight) settle(token);\n },\n respond: (requestId, token) => {\n // First response for the CURRENT pull wins; a stale/duplicate requestId (or no pull) is ignored.\n if (inFlight && requestId === currentRequestId) settle(token);\n },\n };\n}\n",
49
49
  "// The worker entry factory (ADR-0032 S2, decisions 3/4/6/7). `defineSyncWorker` boots ONE sync engine and\n// fans it out to N attached tabs over the bridge. The first attach boots the engine by calling the\n// unchanged `createSyncClient` (the strongest form of \"reuse createSyncClient internals\" — the in-process\n// boot pipeline runs verbatim, so the unit suite stays its equivalence proof); later attaches join it.\n//\n// It serves BOTH a native `SharedWorker` (`onconnect`, many ports) and a dedicated `Worker` (one implicit\n// port) behind {@link SyncWorkerHost.connect} — the same entry a test drives with a plain `MessageChannel`\n// port, so no real Worker is needed to exercise the whole protocol.\n\nimport { type ParserOptions, type QueryOptions, types } from \"@electric-sql/pglite\";\n\nimport type {\n ResolvedStorageDeclaration,\n SyncRuntimeStatus,\n SyncStorageDeclaration,\n SyncTableName,\n SyncTableRegistry,\n WriteMode,\n} from \"@pgxsinkit/contracts\";\nimport {\n assertStorageDeclarationCompatible,\n getSyncRegistryStorage,\n isStorageBackend,\n isStorageDurability,\n resolveStorageDeclaration,\n StorageDeclarationRefusedError,\n} from \"@pgxsinkit/contracts\";\n\nimport { type ConvergenceTrigger, createIntervalConvergenceTrigger } from \"../convergence\";\nimport { setSyncDebugSink, syncDebug } from \"../debug\";\nimport { describeErrorChain } from \"../error-chain\";\nimport {\n type AdoptionDeclaration,\n type ClientPGlite,\n createClientPGlite,\n type CreateSyncClientOptions,\n createSyncClient,\n type DataExportOptions,\n type DiagnosticExportOptions,\n type MutationBatchItem,\n type RawQueryOptions,\n type StoreExportOptions,\n type SyncClient,\n} from \"../index\";\nimport { wrapLiveQueryForMaterialization } from \"../live-rows-sql\";\nimport type { LocalStoreVersionEvent } from \"../local-store\";\nimport { type PlacementProbeResult, probeOpfsSyncAccess } from \"../placement-probe\";\nimport { META_STORE_UNAVAILABLE, readStoreMetaRecord } from \"../store-meta\";\nimport { readTestStoreMarker, TEST_STORE_BACKEND, type TestStoreMarker } from \"../store-path\";\nimport {\n assertSameExecutionLimit,\n type EngineControlMessage,\n type EngineIdentity,\n ExecutionLimitMismatchError,\n executionLimitMismatchToWire,\n type ExecutionLimitConfig,\n readControlEnvelope,\n shouldApplyControlMessage,\n wrapControlEnvelope as controlEnvelope,\n} from \"./engine-control\";\nimport { createEngineRouter, type EngineRouter, type RouterPort } from \"./engine-router\";\nimport {\n createLiveQueryManager,\n type LiveQueryManager,\n type LiveSubscription,\n validateLiveQueryPolicy,\n} from \"./live-query-manager\";\nimport {\n type AttachPayload,\n type BootMilestone,\n type BridgeCodec,\n type BridgeEnvelope,\n type BridgeEvent,\n type BridgeErrorWire,\n type BridgePort,\n type ExportArtefactWire,\n type GuardedQueryWireArgs,\n identityCodec,\n isBridgeEnvelope,\n postBridgeMessage,\n type ProvisionPayload,\n type RpcOp,\n type RpcPayload,\n type SetOnlinePayload,\n type SubscribePayload,\n type TokenResponsePayload,\n} from \"./protocol\";\nimport { decideSwPlacement, type SwPlacementResult } from \"./sw-placement\";\nimport { createWorkerTokenCache } from \"./token-cache\";\n\n// The identity-parser map a guarded bridge read re-applies before executing (ADR-0032 decision 4). It\n// MIRRORS the fixed `parsers` constant in `drizzle-orm/pglite`'s session VERBATIM (pinned to\n// drizzle-orm@1.0.0-rc.4, `drizzle-orm/pglite/session.js`): identity parsers so the listed OIDs come back as\n// raw STRINGS — exactly what the in-process drizzle session receives, because it passes this same map into\n// `pglite.query`. The members are: the scalar OIDs `types.TIMESTAMP` / `TIMESTAMPTZ` / `INTERVAL` / `DATE`,\n// and the array OIDs 1115 = `timestamp[]`, 1185 = `timestamptz[]`, 1187 = `interval[]`, 1182 = `date[]`, and\n// 1231 = `numeric[]` (NOT temporal — drizzle's list is mirrored verbatim, whatever its members). Over the\n// bridge the map is FUNCTIONS (non-serializable), so the attach side strips the options down to `rowMode`\n// and this worker re-applies the identical map. We do NOT import drizzle's private constant — this is a\n// deliberate, version-pinned mirror.\nconst identityParser = (value: string): string => value;\nconst DRIZZLE_PGLITE_IDENTITY_PARSERS: ParserOptions = {\n [types.TIMESTAMP]: identityParser,\n [types.TIMESTAMPTZ]: identityParser,\n [types.INTERVAL]: identityParser,\n [types.DATE]: identityParser,\n 1231: identityParser,\n 1115: identityParser,\n 1185: identityParser,\n 1187: identityParser,\n 1182: identityParser,\n};\n\nexport interface DefineSyncWorkerOptions<TRegistry extends SyncTableRegistry> {\n /**\n * The sync registry — imported as CODE by the worker file, never cloned into it (ADR-0032 decision 4).\n * When {@link resolveRegistry} is also given this is the DEFAULT (used when the attach carries no role\n * or an unknown one).\n */\n registry: TRegistry;\n /**\n * Resolve the registry to boot from the attach's `config.role` (ADR-0032 S3). A single worker file can\n * bake BOTH role variants (e.g. the board's admin/member registries — same TS shape, different write\n * capability) and pick per-attach, which the spare flow needs: the spare is provisioned role-agnostic\n * (before the user is known) and the role is only settled at claim/attach. Returns `undefined` to fall\n * back to {@link registry}.\n */\n resolveRegistry?: (role: string | undefined) => TRegistry | undefined;\n /**\n * How the worker creates its raw PGlite store (provision + fresh-attach paths). Defaults to\n * {@link createClientPGlite}, which loads PGlite's own boot assets — in a browser worker those hit the\n * same-origin HTTP cache the tab's login-screen warm already primed (ADR-0032 S3). Injected in tests.\n * Takes a plain store PATH (ADR-0036); the internal `backendOverride` is the test lane's memory selection.\n */\n createPglite?: (storePath: string, backendOverride?: \"memory\") => Promise<ClientPGlite>;\n /**\n * ADR-0049 (capability-driven engine placement) decision 7, plan step 11b: the consumer's explicit\n * reconstructibility DECLARATION authorizing AUTOMATIC adoption of an existing idb-authoritative store into a\n * committed OPFS successor. A worker-ENTRY option (baked into the worker file as code, like\n * {@link executionLimit}), NEVER an attach option — a tab cannot set it (adoption DELETES local-only data, so\n * only the code author may authorize it). Forwarded verbatim to the {@link createSyncClient} boot below. DEFAULT\n * OFF (`undefined`): hook absence is never authority — only `\"server-reconstructible\"` (or the manual\n * `adoptStore` API) authorizes deleting the idb predecessor. Honoured only where the engine home grants OPFS\n * access (SW-direct / elected placement); inert on the browser-idb fallback where there is no opfs successor.\n */\n adoption?: AdoptionDeclaration;\n electricUrl: string;\n batchWriteUrl: string;\n /** Static headers on every read + write request (e.g. a gateway `apikey`). See `createSyncClient`. */\n requestHeaders?: Record<string, string>;\n /** Write-only headers merged over {@link requestHeaders} (e.g. region/DB-affinity). See `createSyncClient`. */\n writeRequestHeaders?: Record<string, string>;\n /** Default plain store PATH (ADR-0036) if the first attach carries none — a name, not a storage URL. */\n storePath?: string;\n maxMutationAttempts?: number;\n syncEnabled?: boolean;\n /**\n * How close to expiry (ms) a cached token may be before a read/write that needs it triggers a pull\n * broadcast (ADR-0032 decision 3). Default 30s — comfortably ahead of a long-poll cycle.\n */\n tokenExpiryMarginMs?: number;\n /**\n * The worker's own convergence cadence (ms) — the interval trigger FALLBACK only. Local writes\n * flush immediately via the event-driven `requestPass` seam and tab `wake` signals, so this\n * interval exists purely for retry/recovery sweeps; each idle pass still costs real worker CPU\n * (`flush` + `reconcile` queries). Default 15000.\n */\n convergenceIntervalMs?: number;\n /**\n * The opt-in engine-construction EXECUTION LIMIT (ADR-0049 D5), threaded into the ROUTER when this\n * SharedWorker lands in `elected-worker` placement (router-only mode). DISABLED by default (`undefined` /\n * absent `maxDispatchMs`) — no finite worst-case query duration exists, so an absent limit means the router\n * forwards no probe and queries run unbounded; enabling it is a deliberate consumer choice.\n * Elected placement ONLY: on SW-direct (`shared-worker`) the engine home is in-scope and there is no control\n * channel to probe, so an enabled value is rejected as unsupported before engine boot.\n */\n executionLimit?: ExecutionLimitConfig;\n /** Injected transport binder. Defaults to auto-detecting the SharedWorker/dedicated-worker global scope. */\n installGlobal?: boolean;\n /** Injected codec (ADR-0032 S2 §1). Defaults to the v1 identity codec. */\n codec?: BridgeCodec;\n /**\n * A raw PGlite the worker uses instead of creating its own (forwarded to `createSyncClient`'s\n * {@link CreateSyncClientOptions.precreatedPglite}) — the client still applies schema/reconcile. In a\n * browser worker the store is minted internally (`storePath`); this is the seam for a prepopulated store in\n * tests, and the future spare-worker claim (ADR-0032 decision 5).\n */\n precreatedPglite?: CreateSyncClientOptions<TRegistry>[\"precreatedPglite\"];\n /** A fully-provisioned PGlite (forwarded to {@link CreateSyncClientOptions.pgliteInstance}; caller owns schema). */\n pgliteInstance?: CreateSyncClientOptions<TRegistry>[\"pgliteInstance\"];\n /**\n * App-level schema prep run IN THE WORKER, against the engine's own local store, BEFORE the registry\n * schema exec — forwarded verbatim to {@link CreateSyncClientOptions.prepareLocalDbBeforeSchema}, same\n * timing as the in-process client. This is a worker-ENTRY option (baked into the worker file as code),\n * NOT an attach option: the hook is a function and functions cannot cross the bridge, so a tab can never\n * supply it — the worker owns it. Use it for DDL that must precede the registry's local tables (extensions,\n * a bespoke schema search_path). On a fresh store the registry-derived local tables do NOT yet exist when\n * this runs (that ordering is what distinguishes it from {@link prepareLocalDbAfterSchema}).\n *\n * Runs on the storePath, {@link precreatedPglite}, and restore boots; SKIPPED entirely on the\n * {@link pgliteInstance} path (the caller owns schema/prepare/reconcile there). On a restore boot it still\n * runs, but the store already carries the registry tables from the backup's datadir, so the \"tables absent\"\n * invariant does not hold there.\n */\n prepareLocalDbBeforeSchema?: CreateSyncClientOptions<TRegistry>[\"prepareLocalDbBeforeSchema\"];\n /**\n * App-level schema prep run IN THE WORKER, against the engine's own local store, AFTER the registry schema\n * exec — forwarded verbatim to {@link CreateSyncClientOptions.prepareLocalDbAfterSchema}, same timing as the in-process\n * client. Like {@link prepareLocalDbBeforeSchema} this is a worker-ENTRY option, never an attach option (the\n * tab never sees it — functions cannot cross the bridge). Use it for app-level indexes, views, or migrations\n * that depend on the registry's local tables, which DO exist by the time this runs.\n *\n * Runs on the storePath, {@link precreatedPglite}, and restore boots; SKIPPED entirely on the\n * {@link pgliteInstance} path (the caller owns schema/prepare/reconcile there).\n */\n prepareLocalDbAfterSchema?: CreateSyncClientOptions<TRegistry>[\"prepareLocalDbAfterSchema\"];\n /**\n * Bounded zero-subscriber keep-alive for the live-query manager (ADR-0040 decision 4). When an entry's last\n * subscriber leaves, a nonzero effective keep-alive retains its PGlite registration + diff state for a grace\n * period so a matching resubscribe (e.g. a re-mounted route across tabs) reuses it verbatim — no ~400 ms\n * re-materialization. Bounded by explicit budgets; DEFAULTS OFF (`defaultKeepAliveMs: 0` → tear a query\n * down the instant its last consumer leaves). The 0 default is justified: a retained entry STILL pays a\n * full SQL rerun + diff on every dependent write — PGlite live queries cannot be paused — so retention\n * only pays off for a genuinely hot, re-mounted query, and the default keeps worker memory bounded with\n * no surprise standing SQL reruns.\n */\n liveQueries?: {\n /** Baseline retention (ms) for a zero-subscriber entry; floored by each subscriber's own hint. Default 0. */\n defaultKeepAliveMs?: number;\n /** Max simultaneously-retained (zero-subscriber) entries — LRU-evicted past this. Default 16. */\n maxRetainedQueries?: number;\n /** Max total rows across all retained entries — LRU-evicted past this. Default 50_000. */\n maxRetainedRows?: number;\n };\n}\n\n/** The worker-side host: attach ports, await the boot, and (for tests) tear down. */\nexport interface SyncWorkerHost<TRegistry extends SyncTableRegistry> {\n /** Bind a transport port (a SharedWorker connection, the dedicated-worker `self`, or a test channel port). */\n connect: (port: BridgePort) => void;\n /** Resolves with the booted in-process engine once the first attach's `createSyncClient` completes. */\n whenBooted: () => Promise<SyncClient<TRegistry>>;\n /** Detach every port and stop the underlying client — for tests and dedicated-worker teardown. */\n close: () => Promise<void>;\n}\n\ninterface LiveSub {\n // The manager-owned handle: `unsubscribe()` (awaited teardown, tracked inside the manager — ADR-0040\n // decision 1) and a coalesced `refresh()` the hydration chain drives.\n subscription: LiveSubscription;\n port: BridgePort;\n}\n\n/**\n * Build a worker host over the given engine config. In a real worker file the consumer calls this at module\n * top level and it auto-binds the global scope; a test constructs it and drives {@link SyncWorkerHost.connect}.\n */\nexport function defineSyncWorker<const TRegistry extends SyncTableRegistry>(\n options: DefineSyncWorkerOptions<TRegistry>,\n): SyncWorkerHost<TRegistry> {\n // Fail at construction, not first subscribe, on a bad keep-alive policy (ADR-0040 decision 4 — bounded).\n validateLiveQueryPolicy(options.liveQueries);\n const codec = options.codec ?? identityCodec;\n const tokenExpiryMarginMs = options.tokenExpiryMarginMs ?? 30_000;\n const convergenceIntervalMs = options.convergenceIntervalMs ?? 15_000;\n // ADR-0049 D1: the placement probe's OPFS grant for THIS SharedWorker lifetime. Set true only by a GRANTED\n // `shared-worker` (SW-direct) probe, so both the provision-mint (default `createPglite` factory) and the boot\n // create (below) resolve the OPFS-repacked backend. False is the honest capability-absence invariant — the\n // engine home in this scope opens IDBFS: the registry-declared `backend: \"idbfs\"` mode (no probe ran), or a\n // capability-absence fallback (every home's probe denied / the OPFS API absent). Read at CALL time — every mint\n // that consults it runs only after a port has connected, and connections are gated on the resolved placement.\n let placementOpfsAccess = false;\n // ADR-0049 D1/D12: the verbatim reason this scope's engine opened IDBFS while OPFS was CAPABLE (a fallback,\n // not the declared-idbfs mode). Set alongside `placementOpfsAccess = false` by the bootstrap's capability-absence\n // fallback outcome; threaded into the boot's `storageFallbackReason`. Absent for a granted opfs boot AND for the\n // declared `backend: \"idbfs\"` mode (that is the contract, not a fallback — no reason to report).\n let placementFallbackReason: string | undefined;\n // ADR-0049 decision 12 (diagnostics): the resolved engine home for THIS SharedWorker scope, threaded into the\n // boot's {@link BootReport} (`engineHome`). Set alongside `placementOpfsAccess` when the placement decision\n // resolves. Both the SharedWorker and an elected dedicated-engine worker run the probe; only a plain test/Node\n // scope that has no browser placement omits `engineHome`.\n let placementEngineHome: SwPlacementResult[\"engineHome\"] | undefined;\n // ADR-0049 step 10b (bug fix — elected engine self-probe): the boot's OPFS grant may be decided ASYNCHRONOUSLY\n // (the SharedWorker placement decision, or — for the elected DEDICATED engine — that scope's own OPFS probe).\n // Both resolve BEFORE the first attach in practice, but the elected engine's probe races the incoming\n // `connect-port` pipe, so `boot()` AWAITS this gate before reading `placementOpfsAccess`/`placementEngineHome` —\n // guaranteeing the grant is threaded into the boot options (invariant 8: probed per boot, never assumed). Opened\n // by {@link bootstrapWorkerScope}'s `onPlacement` (SharedWorker decision OR dedicated-engine probe OR the plain\n // test/Node scope's immediate settle); opened immediately when no global bootstrap runs (`installGlobal:false`).\n let openPlacementGate!: () => void;\n const placementGate = new Promise<void>((resolve) => {\n openPlacementGate = resolve;\n });\n // ─── The store's BOUND storage declaration (ADR-0050) ────────────────────────────────────────────\n // Bound at the FIRST provision/attach payload: the registry-attached static declaration is authoritative,\n // the payload's wire declaration fills the silent fields, capability defaults close the rest. Immutable for\n // the engine's lifetime — a later payload whose explicit field disagrees is refused typed (the handlers ack\n // the `StorageDeclarationRefusedError` through `serializeError`, so the tab rebuilds it by name).\n let engineStorage: ResolvedStorageDeclaration | undefined;\n const bindEngineStorage = (wire: SyncStorageDeclaration | undefined): void => {\n if (engineStorage === undefined) {\n engineStorage = resolveStorageDeclaration(getSyncRegistryStorage(options.registry), wire);\n } else {\n assertStorageDeclarationCompatible(engineStorage, wire);\n }\n };\n // Durability (ADR-0047) comes from the bound declaration. The provision/spare mint does not run through\n // `createSyncClient` (which resolves it for the boot create), so resolve it here — AT MINT TIME, after the\n // provision payload bound the declaration (a construction-time constant could never see a wire declaration).\n const currentDurability = () =>\n engineStorage?.durability ?? getSyncRegistryStorage(options.registry)?.durability ?? \"relaxed\";\n const createPglite =\n options.createPglite ??\n ((storePath: string, backendOverride?: \"memory\") =>\n createClientPGlite(storePath, {\n ...(backendOverride ? { backendOverride } : {}),\n durability: currentDurability(),\n // SW-direct placement grant (ADR-0049 D1): a spare minted in-scope opens OPFS-repacked, matching the boot.\n ...(placementOpfsAccess ? { hasOpfsSyncAccess: true } : {}),\n }));\n // A testing acknowledgment (ADR-0036) spread into THIS worker's options — needed when a test injects a\n // non-persistent BYO store (`precreatedPglite` / `pgliteInstance` / a memory-returning `createPglite`),\n // which `createSyncClient` would otherwise refuse. Forwarded to the boot below. A browser worker never\n // sets it; a memory selection carried on the attach wire wins over it.\n const workerTestMarker = readTestStoreMarker(options);\n\n const ports = new Set<BridgePort>();\n const liveSubs = new Map<string, LiveSub>();\n // The live-query lifecycle (PGlite registration, diff listener, and the ADR-0040 decision-1 awaited-teardown\n // set) lives in a single manager owned per engine. Created lazily on first subscribe because it needs the\n // booted client's `live` namespace (`active.pglite.live`); the worker never restarts its engine in place\n // (ADR-0040 decision 7), so one manager serves the host's whole lifetime. `close()` disposes it.\n let liveManager: LiveQueryManager | null = null;\n const ensureLiveManager = (active: SyncClient<TRegistry>): LiveQueryManager =>\n (liveManager ??= createLiveQueryManager({\n live: active.pglite.live,\n ...(options.liveQueries ? { policy: options.liveQueries } : {}),\n }));\n // Subscribes that have entered `handleSubscribe` but not yet reached `liveSubs.set` (they are mid-await on\n // prepareQuery / hydration / manager setup). Registered SYNCHRONOUSLY at entry, keyed by `queryId`, so an\n // `unsubscribe`/`detach` arriving during those awaits can mark the pending subscribe CANCELLED — otherwise\n // it would finish and store a subscription for an already-gone port, escaping the awaited-teardown boundary\n // (ADR-0040 decision 1). Removed in `handleSubscribe`'s finally.\n const pendingSubscribes = new Map<string, { port: BridgePort; cancelled: boolean }>();\n // Host shutdown state (ADR-0040 decision 1 — the pending-before-manager close race). `close()` flips\n // `closing` and awaits every in-flight `handleSubscribe` task BEFORE disposing the manager, so a subscribe\n // still mid-await when close begins can neither create a registration afterwards (it early-bails on\n // `closing`) nor escape the awaited-teardown boundary. `inFlightSubscribes` holds each whole-call task.\n let closing = false;\n const inFlightSubscribes = new Set<Promise<void>>();\n // One stable, opaque diagnostics scope per bridge port (ADR-0040 decision 5) — so a snapshot's `scopeCount`\n // reads as the distinct-tab count. Never part of the fingerprint; a lazy per-port counter.\n const portScopes = new WeakMap<BridgePort, string>();\n let nextScopeId = 0;\n const scopeForPort = (port: BridgePort): string => {\n let scope = portScopes.get(port);\n if (scope === undefined) {\n scope = `port-${nextScopeId++}`;\n portScopes.set(port, scope);\n }\n return scope;\n };\n\n // ─── Pre-spawned (schemaless) store — the spare flow (ADR-0032 decision 5) ────────────────────────\n // A `provision` mints the raw PGlite (initdb only) and holds it idle here; the first real `attach`\n // adopts it as `precreatedPglite` (the client still runs schema/journal recovery/reconcile). Provision\n // is role-agnostic — the registry is chosen at attach — so the same warmed store serves either role.\n // `stamp` carries the spare's create timing (ADR-0034): a boot adopting this store reports the initdb cost\n // as `BootReport.provision` (with `phases.pgliteCreateMs = null`) instead of timing a create it never ran.\n let provisioned: {\n storePath: string;\n pglite: Promise<ClientPGlite>;\n stamp: Promise<{ initdbMs: number; provisionReadyAt: number }>;\n } | null = null;\n // A provision request performs a bounded authority read before it may mint. An attach that arrives during\n // that read waits for the attempt to settle, then either adopts the minted store or runs the ordinary boot\n // path. This keeps provision a pure accelerator without racing a replacement underneath live deletion.\n let provisionAttempt: Promise<void> | null = null;\n\n // ─── Outbound-convergence gate — the tab's Offline toggle over the bridge (ADR-0032 S3) ───────────\n // The worker owns convergence; the tab forwards its Offline flag as `set-online`. When suppressed the\n // interval trigger's `shouldConverge` returns false (writes stage in the journal, unsent) and a `wake`\n // is ignored; resuming fires one immediate pass so the queue flushes at once.\n let convergenceSuppressed = false;\n let fireConvergence: (() => void) | null = null;\n const baseTrigger = createIntervalConvergenceTrigger(convergenceIntervalMs);\n const gatedTrigger: ConvergenceTrigger = {\n subscribe: (onSignal) => {\n fireConvergence = onSignal;\n const unsubscribe = baseTrigger.subscribe(onSignal);\n return () => {\n fireConvergence = null;\n unsubscribe();\n };\n },\n shouldConverge: () => !convergenceSuppressed && baseTrigger.shouldConverge(),\n };\n\n // ─── The single auth token cache + pull mechanism (ADR-0032 decision 3) ──────────────────────────\n const tokenCache = createWorkerTokenCache({\n marginMs: tokenExpiryMarginMs,\n broadcastRequest: (requestId) => {\n syncDebug(\"worker token pull broadcast\", { requestId, tabs: ports.size });\n broadcast(\"token-request\", { requestId });\n },\n });\n const getWorkerAuthToken = () => tokenCache.getToken();\n\n // ─── The broadcast event channel (ADR-0032 decision 7) ───────────────────────────────────────────\n const seenReadyGroups = new Set<string>();\n const broadcast = (type: BridgeEnvelope[\"type\"], payload: unknown) => {\n for (const port of ports) postBridgeMessage(port, codec, type, payload);\n };\n const broadcastEvent = (event: BridgeEvent) => broadcast(\"event\", event);\n\n // ─── Debug-rail buffer + replay (ADR-0034) ───────────────────────────────────────────────────────\n // The engine boots on the first ATTACH, but the front half of boot (provision, and the boot rail's\n // schema/journal/reconcile lines) can be emitted before any debug-enabled tab is listening — so they\n // vanished. Install the sink at construction (not at boot) into a bounded ring buffer, so the whole boot\n // is captured from worker start; the buffer is REPLAYED (marked `[replay]`) to the first attach, while the\n // back half streams live over the bridge. Bounded so a long-lived worker never grows the buffer unbounded.\n const RAIL_BUFFER_MAX = 500;\n const railBuffer: Array<{ stamp: number; line: string; data?: Record<string, unknown> }> = [];\n let railReplayed = false;\n setSyncDebugSink((line, stamp, data) => {\n if (railBuffer.length >= RAIL_BUFFER_MAX) railBuffer.shift();\n railBuffer.push({ stamp, line, ...(data ? { data } : {}) });\n broadcastEvent({ kind: \"debug\", stamp, line, ...(data ? { data } : {}) });\n });\n const nowStamp = () => (typeof performance !== \"undefined\" ? performance.now() : Date.now());\n // Replay the pre-attach rail buffer to the first attaching port. Taken as a snapshot BEFORE this attach's\n // boot runs, so the boot's own lines (which stream live to this now-connected port) are never doubled.\n const replayRailBufferTo = (port: BridgePort) => {\n if (railReplayed) return;\n railReplayed = true;\n const buffered = [...railBuffer];\n postBridgeMessage(port, codec, \"event\", {\n kind: \"debug\",\n stamp: nowStamp(),\n line: `[replay] replaying ${buffered.length} buffered rail line(s)`,\n } satisfies BridgeEvent);\n for (const entry of buffered) {\n postBridgeMessage(port, codec, \"event\", {\n kind: \"debug\",\n stamp: entry.stamp,\n line: `[replay] ${entry.line}`,\n ...(entry.data ? { data: entry.data } : {}),\n } satisfies BridgeEvent);\n }\n };\n\n const emitStatus = (status: SyncRuntimeStatus) => {\n broadcastEvent({ kind: \"status\", status });\n // Derive a per-group `groupReady` event for each group that newly reached ready, so a tab gets both the\n // status snapshot (`status.groups`) and a discrete edge to await (ADR-0032 decision 6/7).\n for (const [groupKey, ready] of Object.entries(status.groups ?? {})) {\n if (ready && !seenReadyGroups.has(groupKey)) {\n seenReadyGroups.add(groupKey);\n broadcastEvent({ kind: \"groupReady\", groupKey });\n }\n }\n };\n\n // ─── Engine boot — reuse createSyncClient verbatim (ADR-0032 decision 1/4) ────────────────────────\n let client: SyncClient<TRegistry> | null = null;\n let bootPromise: Promise<SyncClient<TRegistry>> | null = null;\n // The role the engine actually booted with (from the FIRST attach's config). Later attaches compare\n // their requested role against this and get a warning on mismatch (ADR-0032 FIX 5) — never a reject.\n let bootedRole: string | undefined;\n // The engine's `ready` is monotonic: once its initial sync lands it stays resolved even if the phase\n // later degrades. A tab attaching AFTER that moment must still get a resolved `ready`, so track whether\n // it has fired and tell the ack (ADR-0032 FIX 3).\n let engineReadyFired = false;\n let resolveBooted!: (client: SyncClient<TRegistry>) => void;\n const bootedPromise = new Promise<SyncClient<TRegistry>>((resolve) => {\n resolveBooted = resolve;\n });\n\n // ─── Boot milestone bridge (ADR-0041 stage 2) ────────────────────────────────────────────────────\n // One engine crosses each background boot stage once. Broadcast a one-shot `milestone` as it crosses\n // `writeReady`/`bootSettled` (or a `milestone-error` if the tail rejects the stage), and FOLD the current\n // set into every `attach-ack` so a tab that attached after a stage fired resolves it from the ack. The\n // ack itself fires AT `localReadReady` (the Option B contract), so that stage needs no milestone. Wired\n // exactly once off the booted client's stage promises (`milestonesWired`), then driven purely by them.\n const milestones = { writeReady: false, bootSettled: false };\n const stageErrors: {\n writeReady?: BridgeErrorWire;\n bootSettled?: BridgeErrorWire;\n } = {};\n let milestonesWired = false;\n const markMilestone = (stage: BootMilestone) => {\n if (milestones[stage]) return;\n milestones[stage] = true;\n broadcastEvent({ kind: \"milestone\", stage });\n };\n const failMilestone = (stage: BootMilestone, error: unknown) => {\n if (stageErrors[stage]) return;\n const serialized = serializeError(error);\n stageErrors[stage] = serialized;\n broadcastEvent({ kind: \"milestone-error\", stage, error: serialized });\n };\n // Attach-ack fold fields for a LATE attach — the milestones/failures already crossed at ack time.\n const milestoneAckFields = () => ({\n ...(milestones.writeReady ? { writeReady: true as const } : {}),\n ...(milestones.bootSettled ? { bootSettled: true as const } : {}),\n ...(stageErrors.writeReady ? { writeReadyError: stageErrors.writeReady } : {}),\n ...(stageErrors.bootSettled ? { bootSettledError: stageErrors.bootSettled } : {}),\n });\n\n const boot = async (attach: AttachPayload): Promise<SyncClient<TRegistry>> => {\n await placementGate;\n // Provision owns no recovery policy. Wait only for its bounded pre-mint check/create attempt; a declined\n // attempt leaves `provisioned` null and this attach continues through createSyncClient's full phase machine.\n await provisionAttempt?.catch(() => undefined);\n const attachLimit = attach.executionLimit?.maxDispatchMs;\n if (placementEngineHome === \"shared-worker\" && attachLimit !== undefined) {\n throw new Error(\n \"[pgxsinkit] executionLimit is unsupported for SharedWorker-direct placement; it is available only \" +\n \"when the engine runs in elected-worker placement (ADR-0049 D5).\",\n );\n }\n assertSameExecutionLimit(options.executionLimit?.maxDispatchMs, attachLimit);\n if (bootPromise) return bootPromise;\n // The tab is the auth owner: seed the cache with the token it presented at attach (decision 3).\n tokenCache.push(attach.token);\n bootedRole = attach.config?.role;\n // The debug-rail sink is installed at construction (ADR-0034) so it buffers from worker start and\n // forwards live to tabs, stamped with the WORKER's monotonic clock (decision 7) — see above.\n // Resolve the registry from the attach's role (ADR-0032 S3): a single worker file bakes both variants\n // and the claim/attach settles which one boots — the spare was provisioned before the role was known.\n const registry = options.resolveRegistry?.(attach.config?.role) ?? options.registry;\n // ADR-0050: placement and engine binding were resolved against `options.registry`'s static declaration —\n // the spare was placed before any role existed, so a role-selected registry cannot re-home the store. A\n // role registry whose static declaration EXPLICITLY conflicts with that bound resolution is refused typed\n // here (the attach fails), never silently booted under the wrong placement. Role variants sharing one\n // worker must agree on storage.\n if (registry !== options.registry) {\n assertStorageDeclarationCompatible(\n engineStorage ?? resolveStorageDeclaration(getSyncRegistryStorage(options.registry), undefined),\n getSyncRegistryStorage(registry) ?? {},\n );\n }\n // storePath-first, matching the `provision` handler's resolution (below): the board sends BOTH a bare\n // `storeId` (SharedWorker naming, tab-side) AND the real `storePath` (`pgxsinkit-board-<id>`), and the\n // PGlite store lives at `storePath` — so the provisioned store's path must be what we adopt on.\n // `storeId` is only a last-ditch fallback for a caller that passes it as the store path.\n const storePath = attach.storePath ?? attach.storeId ?? options.storePath ?? \"pgxsinkit-overlay-v1\";\n // The testing memory-backend override rides as an explicit wire field (a symbol does not survive\n // structured clone, ADR-0036); re-stamp it as the internal marker on the createSyncClient options below.\n // A memory selection on the attach wins over the worker's own acknowledgment (memory implies acknowledged).\n const backendOverride = attach.testStoreBackend;\n const testMarker: TestStoreMarker | undefined = backendOverride === \"memory\" ? \"memory\" : workerTestMarker;\n // Restore (ADR-0035 decision 6): the tab decomposed the backup into a transferred `ArrayBuffer` + mime\n // (`RestoreArtefactWire`); recompose a `Blob` to hand `createSyncClient` as `restoreFrom`. Restore OWNS the\n // store's creation (a `loadDataDir` seed), so it is mutually exclusive with adopting a pre-provisioned or\n // caller-supplied instance — when restoring, we suppress the adopt paths below rather than let\n // createSyncClient throw the exclusion error.\n const restoreFrom = attach.restore\n ? new Blob([attach.restore.buffer], { type: attach.restore.mimeType })\n : undefined;\n // Adopt a matching pre-provisioned store (its initdb already ran off-thread) as `precreatedPglite`;\n // createSyncClient falls back to a fresh `storePath` create if that promise rejects — a pure accelerator.\n // Never adopt when restoring (restore boots a brand-new store from the backup, not the provisioned one).\n const adoptingProvisioned = restoreFrom == null && provisioned != null && provisioned.storePath === storePath;\n const precreatedPglite = adoptingProvisioned\n ? provisioned!.pglite\n : restoreFrom\n ? undefined\n : options.precreatedPglite;\n // The adopted spare's create timing feeds `BootReport.provision` (ADR-0034); absent otherwise.\n const provisionStamp = adoptingProvisioned ? provisioned!.stamp : undefined;\n if (adoptingProvisioned) {\n syncDebug(\"worker adopting provisioned store\", { storePath });\n }\n if (restoreFrom) {\n syncDebug(\"worker restoring store from backup\", { storePath, byteLength: attach.restore!.buffer.byteLength });\n }\n // Gate the store create on the resolved placement grant (ADR-0049 step 10b, elected-engine self-probe fix):\n // `placementOpfsAccess` / `placementEngineHome` are read INSIDE this `.then`, after the probe settles, so the\n // elected dedicated engine boots the OPFS-repacked backend it actually holds instead of racing to `idbfs`.\n bootPromise = createSyncClient<TRegistry>({\n registry,\n electricUrl: options.electricUrl,\n batchWriteUrl: options.batchWriteUrl,\n storePath,\n // Re-stamp the internal testing marker (ADR-0036) so `createSyncClient`'s option handling selects the\n // memory backend on its fallback create and/or bypasses the BYO refusal for an injected test store —\n // the wire field / worker acknowledgment are the cross-clone carriers for it.\n ...(testMarker ? { [TEST_STORE_BACKEND]: testMarker } : {}),\n // Restore rides the boot attach (ADR-0035 decision 6): createSyncClient seeds the fresh store via\n // `loadDataDir`, boots offline, and quarantines the recovered journal.\n ...(restoreFrom ? { restoreFrom } : {}),\n // Boot observability (ADR-0034): label the report `worker`, and forward the provision stamp so an\n // adopted spare's initdb cost is reported rather than a create this boot never ran.\n bootMode: \"worker\",\n // ADR-0049 decision 12 diagnostics: stamp the resolved engine home into the BootReport. This is\n // `\"shared-worker\"` for the in-scope host or `\"elected-worker\"` for the elected dedicated engine; it is\n // omitted only for a plain test/Node scope with no browser placement.\n ...(placementEngineHome ? { engineHome: placementEngineHome } : {}),\n ...(provisionStamp ? { provisionStamp } : {}),\n ...(precreatedPglite ? { precreatedPglite } : {}),\n ...(options.pgliteInstance && restoreFrom == null ? { pgliteInstance: options.pgliteInstance } : {}),\n // App-level schema prep runs IN THE WORKER around the registry schema exec (before/after), exactly as\n // the in-process client. Worker-entry options, not attach options: functions cannot cross the bridge.\n ...(options.prepareLocalDbBeforeSchema ? { prepareLocalDbBeforeSchema: options.prepareLocalDbBeforeSchema } : {}),\n ...(options.prepareLocalDbAfterSchema ? { prepareLocalDbAfterSchema: options.prepareLocalDbAfterSchema } : {}),\n // Durability (ADR-0047/ADR-0050): thread the store's BOUND declaration (registry static + first wire\n // declaration + defaults, bound in the attach handler above) into `createSyncClient`'s single storage\n // resolution point. Registry-only stores pass their own static values back — a no-op; wire-declared\n // stores are how the board's toggle reaches the mint. Conflicts were already refused at the handler.\n ...(engineStorage ? { storage: engineStorage } : {}),\n // SW-direct placement grant (ADR-0049 D1): thread a GRANTED probe's grant into the boot create so the engine\n // home in this SharedWorker scope opens the OPFS-repacked backend. Absent (false) is the honest IDBFS home —\n // the declared `backend: \"idbfs\"` mode or a capability-absence fallback. `createSyncClient` forwards it to\n // its `createClientPGlite` boot create.\n ...(placementOpfsAccess ? { hasOpfsSyncAccess: true } : {}),\n // ADR-0049 D1/D12: on a capability-absence fallback (OPFS was capable but no home could hold handles) the\n // engine boots IDBFS and stamps this verbatim reason into the BootReport's `storageFallbackReason`. Absent\n // on a granted opfs boot and on the declared-idbfs mode (which is the contract, not a fallback).\n ...(placementFallbackReason ? { storageFallbackReason: placementFallbackReason } : {}),\n // Adoption declaration (ADR-0049 D7, step 11b): a worker-entry option (never attach-controlled). When the\n // engine home grants OPFS access, an existing idb-authoritative store is migrated to a committed opfs\n // successor at boot. Default off (absent) — nothing is ever deleted without this explicit declaration.\n ...(options.adoption ? { adoption: options.adoption } : {}),\n // Fresh-store prefetch overlap (ADR-0032 S4): the tab's claim path proved this store a schemaless\n // spare and forwarded the hint in the attach config, so the shape catch-up overlaps schema exec +\n // journal recovery + registry reconciliation. Never inferred from \"adopting a provisioned store\": the board\n // provisions a worker even for a MAPPED (returning) user, whose idb is NOT fresh — only the claim\n // path's explicit hint distinguishes them.\n ...(attach.config?.freshStore === true ? { freshStore: true } : {}),\n getAuthToken: getWorkerAuthToken,\n // The worker owns convergence via the interval trigger, GATED by the tab's Offline toggle\n // (`set-online`); tabs additionally forward online/visibility as `wake` pass requests (below).\n autoSync: gatedTrigger,\n syncEnabled: attach.config?.syncEnabled ?? options.syncEnabled ?? true,\n ...(options.requestHeaders ? { requestHeaders: options.requestHeaders } : {}),\n ...(options.writeRequestHeaders ? { writeRequestHeaders: options.writeRequestHeaders } : {}),\n ...(options.maxMutationAttempts != null ? { maxMutationAttempts: options.maxMutationAttempts } : {}),\n onStatusChange: (status) => emitStatus(status),\n onConflict: (details) => broadcastEvent({ kind: \"conflict\", details }),\n onQuarantine: (details) => broadcastEvent({ kind: \"quarantine\", details }),\n onReject: (details) => broadcastEvent({ kind: \"reject\", details }),\n onSchemaChange: (event: LocalStoreVersionEvent) => broadcastEvent({ kind: \"schema-change\", event }),\n // The cause chain, not just the wrapper message: the bridge carries a string, and dropping\n // `.cause` here hid the actual database error from every tab (SQLSTATE, detail).\n onSyncError: (error) => broadcastEvent({ kind: \"sync-error\", message: describeErrorChain(error) }),\n // Boot observability (ADR-0034): broadcast the finalized report to currently-attached ports (one-shot\n // push). Later tabs read the same report via the `bootReport` pull RPC — there is no replay event.\n onBootReport: (report) => broadcastEvent({ kind: \"boot-report\", report }),\n // ADR-0041 stage 2 (Option B contract): `createSyncClient` resolves AT `localReadReady`, so the boot\n // promise now resolves there too — the attach handler acks at local-read readiness and the write/sync\n // tail runs in the background, announced to tabs via the `writeReady`/`bootSettled` milestone messages\n // wired in the attach handler below. The stage-1 `await booted.bootSettled` shim is deleted: attach no\n // longer waits for the whole boot, which is exactly the behavioural change this stage delivers.\n });\n return bootPromise;\n };\n\n const whenBooted = () => bootedPromise;\n\n // ─── Write / mutation-state RPC dispatch ─────────────────────────────────────────────────────────\n const dispatchRpc = async (active: SyncClient<TRegistry>, op: RpcOp, args: unknown[]): Promise<unknown> => {\n // Guarded-read parser re-application (ADR-0032 decision 4). A guarded read compiled by the tab's\n // Drizzle-over-bridge arrives as the {@link GuardedQueryWireArgs} tuple `[sql, params?, { rowMode? }, use?]`:\n // the `parsers` map drizzle's pglite session normally passes could not cross the bridge (it is FUNCTIONS,\n // not clonable), so the tab stripped it and we re-apply the identical map here before executing. Without it\n // PGlite's default parsers would turn the identity-parsed OIDs (temporal OIDs + `numeric[]`) into `Date`s\n // and numbers, whereas the in-process drizzle session sees them as raw STRINGS — so a guarded read would\n // diverge from its in-process twin exactly on those columns. Typed against `GuardedQueryWireArgs` so the\n // decode here shares the wire contract with the tab-side encoders (attach-sync-client).\n const runGuardedQueryRpc = (): Promise<unknown> => {\n const [sql, params, options, use] = args as unknown as GuardedQueryWireArgs;\n const queryOptions: QueryOptions = {\n ...(options?.rowMode ? { rowMode: options.rowMode } : {}),\n parsers: DRIZZLE_PGLITE_IDENTITY_PARSERS,\n };\n return active.guardedRawQuery(sql, params, queryOptions, use as readonly SyncTableName<TRegistry>[] | undefined);\n };\n type TableKey = SyncTableName<TRegistry>;\n switch (op) {\n case \"create\":\n return active.mutate.create(args[0] as TableKey, args[1] as never);\n case \"update\":\n return active.mutate.update(args[0] as TableKey, args[1] as Record<string, string>, args[2] as never);\n case \"delete\":\n return active.mutate.delete(args[0] as TableKey, args[1] as Record<string, string>);\n case \"batch\":\n return active.mutate.batch(args[0] as ReadonlyArray<MutationBatchItem<TRegistry>>);\n case \"transaction\": {\n // The tab collected the unit's mutations (the run callback can't cross the wire); the worker replays\n // the serialized items into a real `client.transaction` so pessimistic acks / optimistic flush match\n // the in-process semantics exactly.\n const { mode, items } = args[0] as { mode: WriteMode; items: MutationBatchItem<TRegistry>[] };\n return active.transaction({ mode }, (tx) => {\n for (const item of items) {\n const handle = tx.tables[item.table];\n if (item.kind === \"create\") {\n handle.create(item.input as never);\n } else if (item.kind === \"update\") {\n // ADR-0022 addendum: a `blind` update replays through `updateBlind` (journal-only, no overlay).\n if (item.blind) handle.updateBlind(item.entityKey, item.patch as never);\n else handle.update(item.entityKey, item.patch as never);\n } else {\n handle.delete(item.entityKey);\n }\n }\n });\n }\n case \"flush\":\n return active.flush(args[0] as TableKey | undefined);\n case \"reconcile\":\n return active.reconcile(args[0] as TableKey | undefined);\n case \"retryFailed\":\n return active.retryFailed(args[0] as TableKey | undefined);\n case \"recoverSending\":\n return active.recoverSending(args[0] as TableKey | undefined);\n case \"discardConflict\":\n return active.discardConflict(args[0] as TableKey, args[1] as Record<string, string>);\n case \"discardQuarantined\":\n return active.discardQuarantined(args[0] as TableKey, args[1] as Record<string, string>);\n case \"desync\":\n return active.desync(args[0] as TableKey);\n case \"discardEphemeral\":\n return active.discardEphemeral(args[0] as TableKey);\n case \"ensureSynced\":\n // Lazy activation (ADR-0021) on the worker's real client. Engine-wide but additive/idempotent — a tab\n // activating a group another tab already started is a no-op, so no cross-tab revert hazard (cf. desync).\n return active.ensureSynced(args[0] as readonly TableKey[]);\n case \"readMutationDetails\":\n return active.readMutationDetails(args[0] as TableKey | undefined);\n case \"diagnostics\":\n return active.diagnostics(args[0] as TableKey | undefined);\n case \"rawQuery\":\n // Inspection read (ADR-0032 S2): run straight against the worker's own store — `active.pglite`\n // exists worker-side (it's the in-process client). `Results` rows/fields structured-clone across\n // the wire (Dates survive postMessage), so the tab receives the same shape it would in-process.\n // The options arg is the clonable RawQueryOptions subset (rowMode) — the REPL's array mode.\n return active.rawQuery(args[0] as string, args[1] as unknown[] | undefined, args[2] as RawQueryOptions);\n case \"rawExec\":\n return active.rawExec(args[0] as string, args[1] as RawQueryOptions);\n case \"guardedQuery\":\n // Guarded one-shot Drizzle read (ADR-0032 decision 4): the ADR-0041 read gate + the ADR-0021\n // lazy-group guard run worker-side inside the engine's `guardedRawQuery`, so a read referencing a\n // lazy relation activates its group exactly as in-process. The full `Results` structured-clones back\n // and drizzle's own mapping (relational/nested included) runs on the tab.\n return runGuardedQueryRpc();\n case \"bootReport\":\n // Boot observability (ADR-0034): the worker engine's stored report (or null). Pull, so a late tab\n // reads a boot predating it; the report structured-clones across the bridge as a plain object.\n return active.bootReport();\n case \"liveQueryDiagnostics\":\n // Live-query diagnostics (ADR-0040 decision 5): the manager lives in THIS host closure (not on\n // `active`), so read it directly. Plain-object records (digests + counts only) structured-clone\n // across the bridge; `[]` when nothing has subscribed yet (the manager is created lazily).\n return liveManager?.snapshot() ?? [];\n case \"exportStore\": {\n // Store backup (ADR-0035): run the live export on the worker's OWN client (its lifecycle slot\n // serialises it against every tab's export). A `File` cannot cross the bridge as a transferable, so\n // decompose it into an `ExportArtefactWire` — the `ArrayBuffer` is listed on `postMessage`'s transfer\n // list in the `rpc` handler and rebuilt into a `File` tab-side.\n const { file, report } = await active.exportStore(args[0] as StoreExportOptions | undefined);\n const buffer = await file.arrayBuffer();\n return { buffer, fileName: file.name, mimeType: file.type, report } satisfies ExportArtefactWire;\n }\n case \"exportDiagnostics\": {\n // Diagnostic dump (ADR-0035): identical bridge shape to the store backup — the worker runs the live\n // datadir dump → memory throwaway clone → `pg_dump` on its OWN client (same lifecycle slot), and the\n // SQL crosses back as the same transferred-`ArrayBuffer` `ExportArtefactWire`.\n const { file, report } = await active.exportDiagnostics(args[0] as DiagnosticExportOptions | undefined);\n const buffer = await file.arrayBuffer();\n return { buffer, fileName: file.name, mimeType: file.type, report } satisfies ExportArtefactWire;\n }\n case \"exportData\": {\n // Data export (ADR-0035): identical bridge shape — the worker runs the drain-guarded `pg_dump -t`\n // per-synced-table export on its OWN client (same lifecycle slot), and the portable SQL crosses back\n // as the same transferred-`ArrayBuffer` `ExportArtefactWire`. A DataExportDrainError rejects the RPC\n // like any other failure (serialised back to the tab).\n const { file, report } = await active.exportData(args[0] as DataExportOptions | undefined);\n const buffer = await file.arrayBuffer();\n return { buffer, fileName: file.name, mimeType: file.type, report } satisfies ExportArtefactWire;\n }\n default: {\n const exhaustive: never = op;\n throw new Error(`unknown rpc op ${String(exhaustive)}`);\n }\n }\n };\n\n // ─── Live-query bridge (ADR-0032 S2 §4) ──────────────────────────────────────────────────────────\n // `queryId`s are minted by a PER-TAB counter (`live-1`, `live-2`, …), so two tabs collide on the bare id —\n // every worker-side bookkeeping key MUST be port-scoped or one tab's unsubscribe/close tears down another\n // tab's identically-numbered subscription (latent since ADR-0032; exposed the moment tab close started\n // sending unsubscribes — the two-tab board e2e's scenario (c)). The wire keeps the bare `queryId` (the\n // port disambiguates); only the worker's maps compose it with the port's scope.\n const subKeyFor = (port: BridgePort, queryId: string): string => `${scopeForPort(port)}:${queryId}`;\n\n const handleSubscribe = (port: BridgePort, id: string | undefined, payload: SubscribePayload): Promise<void> => {\n // Register the in-flight subscribe SYNCHRONOUSLY (before the first await) so an `unsubscribe`/`detach`/\n // `close` arriving mid-await can mark it cancelled (ADR-0040 decision 1 — no subscription escapes teardown).\n const pending = { port, cancelled: false };\n const subKey = subKeyFor(port, payload.queryId);\n pendingSubscribes.set(subKey, pending);\n // Track the WHOLE call so `close()` awaits it before disposing the manager: the task is added to\n // `inFlightSubscribes` synchronously here and removed in its own finally, so close can never observe an\n // empty set while a subscribe is still awaiting prepareQuery / hydration / manager setup.\n // `let task!` (not `const`): the finally references `task` to remove itself, and it only runs after the\n // first await — by then the assignment below has completed, so the definite-assignment assertion is safe.\n let task!: Promise<void>;\n task = (async () => {\n try {\n await handleSubscribeInner(port, id, payload, pending, subKey);\n } finally {\n pendingSubscribes.delete(subKey);\n inFlightSubscribes.delete(task);\n }\n })();\n inFlightSubscribes.add(task);\n return task;\n };\n\n const handleSubscribeInner = async (\n port: BridgePort,\n id: string | undefined,\n payload: SubscribePayload,\n pending: { port: BridgePort; cancelled: boolean },\n subKey: string,\n ) => {\n const active = client ?? (await bootPromise);\n if (!active) throw new Error(\"subscribe before attach\");\n const { queryId, sql, params, pkColumns, use, fields, keepAliveMs } = payload;\n // Activate any lazy relations the query reads BEFORE registering the live query (ADR-0021) — the worker\n // owns the real client, so its `prepareQuery` does the real work; the tab's `prepareQuery` is a no-op.\n // Scan the ORIGINAL sql (the wrap only adds an outer `SELECT * FROM (...)`; table refs are inside).\n // The activated keys travel back on the initial snapshot: activation is stream-start, not catch-up,\n // so the tab needs them to await `groupReady` (its `hydrating` signal) without blocking this register.\n const prepared = await active.prepareQuery({ sql, ...(use ? { use: use as SyncTableName<TRegistry>[] } : {}) });\n // Hydration spans EVERY referenced consistency group (eager AND lazy), computed on the real client the\n // worker owns: the referenced tables whose group is not yet caught up at subscribe time. Empty (steady\n // state / sync disabled) → no `hydrated` gating at all; otherwise it drives both the `live-initial`\n // `hydratingTables` field (the tab's `hydrating` source) and the `live-hydrated` block below.\n const hydratingTables = active.hydratingTablesFor({ sql, ...(use ? { use: use as string[] } : {}) });\n\n // Render the query safe to materialise: a JOIN with same-named columns fails BOTH live APIs' temp-view\n // creation (`column \"title\" specified more than once`) unless every output column has a unique alias.\n // No `fields` → SQL unchanged (the default name-keyed row shape; the aliased path keys by alias). The\n // wrap stays caller-side (ADR-0040 decision 3): the manager receives POST-WRAP SQL as its query input.\n const materialSql = wrapLiveQueryForMaterialization(sql, fields);\n // Early bail BEFORE the manager is created (ADR-0040 decision 1 — the pending-before-manager close race):\n // if the host is closing, this subscribe was cancelled, or its port detached WHILE we awaited prepareQuery\n // / hydration, do NOT call `ensureLiveManager` — creating a registration now would race the engine close\n // with a fire-and-forget teardown nothing awaits (a manager born after `close()` disposed is never\n // disposed). Post the rpc error for this subscribe id so a still-live tab's `subscribeLiveRows` rejects\n // instead of hanging, and return without touching the manager. The post-setup check below still catches a\n // cancellation that lands DURING manager setup (after the manager already exists).\n if (closing || pending.cancelled || !ports.has(port)) {\n postBridgeMessage(\n port,\n codec,\n \"rpc-result\",\n {\n ok: false,\n error: { message: \"[pgxsinkit] subscribe cancelled — the worker is closing or the port detached\" },\n },\n id,\n );\n return;\n }\n // The manager owns registration + diff + teardown; the bridge posting (per-`queryId`, with the caller-owned\n // `lazyTables`/`hydratingTables` observability fields) stays here — those are per-subscriber pre-steps.\n const subscription = await ensureLiveManager(active).subscribe(\n { materialSql, params: params as unknown[], ...(pkColumns ? { pkColumns } : {}) },\n {\n deliverInitial: (rows) => {\n // Initial snapshot verbatim (not a diff), correlated to the subscribe request so the tab resolves.\n postBridgeMessage(\n port,\n codec,\n \"live-initial\",\n {\n queryId,\n rows,\n // `lazyTables` = the activated lazy relations (observability); `hydratingTables` = the referenced\n // groups (eager OR lazy) still catching up, which the tab turns into its `hydrated` promise.\n ...(prepared.lazyTables.length > 0 ? { lazyTables: prepared.lazyTables.map(String) } : {}),\n ...(hydratingTables.length > 0 ? { hydratingTables: [...hydratingTables] } : {}),\n },\n id,\n );\n },\n deliverDiff: (diff) => {\n postBridgeMessage(port, codec, \"live-diff\", { queryId, ...diff });\n },\n },\n // The per-subscriber keep-alive hint (ADR-0040 decision 4) — kept OUT of the spec so it never touches\n // the fingerprint (decision 3). Absent → no hint (the manager falls back to its policy default). The\n // `scope` is one stable id per port (decision 5 diagnostics), also fingerprint-excluded.\n { ...(keepAliveMs != null ? { keepAliveMs } : {}), scope: scopeForPort(port) },\n );\n // The port was detached, or this query was unsubscribed, WHILE we awaited (prepareQuery / hydration /\n // manager setup all yield). Neither cleanup path found a `liveSubs` entry — so undo the just-created\n // subscription here and DO NOT record it, else it would outlive its port (ADR-0040 decision 1). A\n // `live-initial` may already have been posted to a dead port; that is harmless (a closed port's\n // postMessage is a no-op) and not worth preventing. `closing` is included so a `close()` that began DURING\n // manager setup still unwinds this just-created subscription rather than recording it.\n if (closing || pending.cancelled || !ports.has(port)) {\n void subscription.unsubscribe();\n return;\n }\n liveSubs.set(subKey, { port, subscription });\n\n // Hydration completion travels the SAME port as the diff stream, so ordering is guaranteed: await the\n // pending groups' catch-up (eager AND lazy), force one refresh of the live query against the caught-up\n // store (its listener posts the rows as a live-diff, synchronously inside the refresh), THEN post\n // `live-hydrated`. The tab therefore always has the caught-up rows before its `hydrated` resolves — a\n // readiness signal on a side channel (e.g. the `groupReady` broadcast) can beat the rows and flash a\n // false \"empty\" state. Skipped entirely when nothing is pending (steady state / sync disabled).\n if (hydratingTables.length > 0) {\n void Promise.all(hydratingTables.map((key) => active.groupReady(key as SyncTableName<TRegistry>)))\n .then(async () => {\n if (!liveSubs.has(subKey)) return; // unsubscribed while catching up\n await subscription.refresh();\n if (!liveSubs.has(subKey)) return;\n postBridgeMessage(port, codec, \"live-hydrated\", { queryId });\n })\n .catch(() => undefined); // a torn-down engine mid-catch-up must not surface as an unhandled rejection\n }\n };\n\n // ─── Per-port message routing ────────────────────────────────────────────────────────────────────\n const onPortMessage = (port: BridgePort, data: unknown) => {\n if (!isBridgeEnvelope(data)) return;\n const envelope = data;\n const payload = codec.decode(envelope.payload);\n switch (envelope.type) {\n case \"provision\": {\n // Pre-spawn the raw store (initdb only), idle and schemaless, for the first attach to adopt\n // (ADR-0032 decision 5). A no-op once the engine has booted or a store is already provisioned.\n const provision = payload as ProvisionPayload;\n const storePath = provision.storePath ?? provision.storeId ?? options.storePath ?? \"pgxsinkit-overlay-v1\";\n // The testing memory-backend override rides as an explicit wire field (ADR-0036) — a symbol does not\n // survive structured clone, so the store's backend selection travels here and is passed to createPglite.\n const backendOverride = provision.testStoreBackend;\n // ADR-0050: bind (or confirm) the store's storage declaration BEFORE the mint — the mint's durability\n // comes from it. An explicit disagreement with the bound declaration refuses THIS provision typed.\n try {\n bindEngineStorage(provision.storage);\n } catch (error) {\n postBridgeMessage(port, codec, \"provision-ack\", {\n ok: false,\n error: serializeError(error),\n ...(provision.storeId ? { storeId: provision.storeId } : {}),\n });\n break;\n }\n if (bootPromise != null || provisioned != null || provisionAttempt != null) {\n postBridgeMessage(port, codec, \"provision-ack\", {\n ok: true,\n ...(provision.storeId ? { storeId: provision.storeId } : {}),\n });\n break;\n }\n // Stamp the spare's create timing (ADR-0034): initdb cost + the monotonic instant it became ready,\n // so an adopting boot can compute how long it sat idle before adoption. Gated on the placement grant\n // (ADR-0049 elected engine self-probe): the elected dedicated engine pre-spawns the OPFS-repacked store it\n // holds access to, not idbfs, so the adopting boot backend matches its engine home. Opens the gate at\n // once for SW-direct / plain scopes (already settled before any port connects).\n const attempt = placementGate.then(async () => {\n // Provision is only an accelerator, never an authority-recovery path. Read the meta record on EVERY\n // persistent placement before minting. If deletion is live, decline the pre-mint and let the first\n // attach run createSyncClient's full ordinary phase machine. This closes both granted and denied lanes:\n // no replacement (and therefore no journal) can be created beneath a record a later boot must delete.\n if (backendOverride !== \"memory\") {\n const record = await readStoreMetaRecord(storePath);\n if (record !== META_STORE_UNAVAILABLE && record?.phase === \"deleting\") {\n syncDebug(\"worker provision declined — deletion authority is live\", { storePath });\n return;\n }\n }\n // An attach or another completed provision may have won while the bounded read was in flight.\n if (bootPromise != null || provisioned != null) return;\n\n const provisionStartedAt = nowStamp();\n const pglite = Promise.resolve().then(() => createPglite(storePath, backendOverride));\n const stamp = pglite.then(() => {\n const readyAt = nowStamp();\n return { initdbMs: readyAt - provisionStartedAt, provisionReadyAt: readyAt };\n });\n provisioned = { storePath, pglite, stamp };\n // Guard unobserved rejections when no attach ever adopts the spare (the page navigated away).\n void pglite.catch(() => undefined);\n void stamp.catch(() => undefined);\n syncDebug(\"worker store provisioned\", { storePath });\n await pglite;\n });\n provisionAttempt = attempt;\n void attempt.then(\n () => {\n if (provisionAttempt === attempt) provisionAttempt = null;\n },\n () => {\n if (provisionAttempt === attempt) provisionAttempt = null;\n },\n );\n void attempt.then(\n () =>\n postBridgeMessage(port, codec, \"provision-ack\", {\n ok: true,\n ...(provision.storeId ? { storeId: provision.storeId } : {}),\n }),\n (error: unknown) =>\n postBridgeMessage(port, codec, \"provision-ack\", {\n ok: false,\n error: serializeError(error),\n ...(provision.storeId ? { storeId: provision.storeId } : {}),\n }),\n );\n break;\n }\n case \"set-online\": {\n // The tab's Offline toggle over the bridge (ADR-0032 S3). Suppress/resume the worker's outbound\n // convergence; resuming fires one immediate pass so queued writes flush at once.\n const { online } = payload as SetOnlinePayload;\n convergenceSuppressed = !online;\n syncDebug(\"worker convergence gate\", { online });\n if (online) fireConvergence?.();\n break;\n }\n case \"attach\": {\n const attach = payload as AttachPayload;\n // Boot observability (ADR-0034): replay the pre-attach rail buffer (provision + any early lines) to\n // the FIRST attaching tab, so the front half of boot is no longer invisible. Snapshotted before this\n // attach's boot runs, so the boot's own lines (streamed live) are not doubled.\n replayRailBufferTo(port);\n const alreadyBooted = bootPromise !== null;\n // ADR-0050: bind (or confirm) the store's storage declaration BEFORE anything boots or joins. An\n // explicit disagreement — with the registry-attached declaration, or with what an earlier\n // provision/attach bound — refuses THIS attach typed (`StorageDeclarationRefusedError` by name);\n // the engine keeps running its bound mode. Never a silently different storage mode.\n try {\n bindEngineStorage(attach.storage);\n } catch (error) {\n postBridgeMessage(port, codec, \"attach-ack\", { alreadyBooted, error: serializeError(error) });\n break;\n }\n // Restore rides the FIRST (boot) attach only (ADR-0035 decision 6): a restore attach that arrives once\n // the engine has already booted CANNOT be honoured — `loadDataDir` is a create-time seed and the store\n // is already live. Reject THIS attach with a typed error rather than silently ignoring the backup, so\n // the caller learns their restore did not happen (the engine keeps running its existing store).\n if (alreadyBooted && attach.restore != null) {\n postBridgeMessage(port, codec, \"attach-ack\", {\n alreadyBooted,\n // `name` (BridgeErrorWire) makes this refusal type-detectable tab-side, like the\n // `RestoreTargetExistsError` the createSyncClient path throws — both mean \"a store is already\n // there; this restore lost the race\", the only refusals a consumer may fall back from.\n error: {\n name: \"RestoreIntoRunningStoreError\",\n message:\n \"[pgxsinkit] cannot restore into a running store: the worker engine has already booted, and a store backup can only seed a brand-new store on the FIRST attach (ADR-0035 decision 6). Restore into a fresh worker instead.\",\n },\n });\n break;\n }\n if (alreadyBooted) {\n // A later attach seeds auth WITHOUT clobbering a fresher cached token (ADR-0032 FIX 5) — the\n // first-boot `push` already ran, and only an explicit `token-push` (auth owner) may overwrite.\n tokenCache.pushIfFresher(attach.token);\n // Role is a property of the (user, store) the engine already booted for: the worker is\n // one-engine-per-(user,store) by ADR-0032 decision 2 and is NOT keyed by role. A mismatch is an\n // app-layer bug to surface, not a supported topology — warn, keep the booted registry.\n const requested = attach.config?.role;\n if (requested !== bootedRole) {\n syncDebug(\"worker attach role mismatch — engine keeps its booted registry\", {\n booted: bootedRole,\n requested,\n });\n }\n }\n void boot(attach).then(\n (booted) => {\n client = booted;\n resolveBooted(booted);\n // Wire the engine's background stage promises to the milestone bridge exactly ONCE (ADR-0041\n // stage 2). `createSyncClient` resolved at `localReadReady`, so by here the engine has crossed\n // that stage — the ack below carries it implicitly. `writeReady`/`bootSettled` cross later (or\n // fail): broadcast each as a one-shot `milestone`/`milestone-error` for currently-attached ports\n // and fold the current set into every subsequent ack for late attachers.\n if (!milestonesWired) {\n milestonesWired = true;\n void booted.writeReady.then(\n () => markMilestone(\"writeReady\"),\n (error: unknown) => failMilestone(\"writeReady\", error),\n );\n void booted.bootSettled.then(\n () => markMilestone(\"bootSettled\"),\n (error: unknown) => failMilestone(\"bootSettled\", error),\n );\n }\n // Track the engine's monotonic `ready` edge exactly once, so a LATER attach acked after the\n // initial sync landed can resolve its `ready` straight from the ack (ADR-0032 FIX 3).\n if (!engineReadyFired) {\n // ADR-0041: `ready` can now reject if the background write/sync tail fails after the client was\n // handed out; swallow that here so it is not an unhandled rejection (the failure surfaces to\n // tabs via the `milestone-error` broadcast / the stage-error ack fold instead).\n void booted.ready.then(\n () => {\n engineReadyFired = true;\n },\n () => undefined,\n );\n }\n // Ack AFTER the engine exists so the tab's subsequent traffic (rpc/subscribe) has a client to\n // hit; the ack fires AT `localReadReady` (Option B) and folds the current milestone set +\n // engine-ready edge for a late-joining tab (ADR-0041 / ADR-0032 FIX 3).\n postBridgeMessage(port, codec, \"attach-ack\", {\n alreadyBooted,\n ...(engineReadyFired ? { engineReady: true } : {}),\n ...milestoneAckFields(),\n });\n postBridgeMessage(port, codec, \"event\", { kind: \"status\", status: booted.status });\n },\n (error: unknown) => {\n // The engine boot rejected: tell THIS attaching tab so it rejects `attachSyncClient` instead of\n // hanging on the ack (ADR-0032 FIX 1), and clear `bootPromise` so a later attach retries the\n // boot. Do NOT clear `provisioned`: a resolved provisioned PGlite holds the only open handle on\n // that store, so a retry must adopt it (createSyncClient falls back internally if it rejected).\n if (!alreadyBooted) bootPromise = null;\n postBridgeMessage(port, codec, \"attach-ack\", {\n alreadyBooted,\n error: serializeError(error),\n });\n },\n );\n break;\n }\n case \"token-push\": {\n // The tab pushed a fresh token (auth state change) — update the cache and satisfy any in-flight pull.\n tokenCache.push(payload as AttachPayload[\"token\"]);\n break;\n }\n case \"token-response\": {\n const response = payload as TokenResponsePayload;\n // First response for the current pull wins; a stale/duplicate requestId is ignored.\n tokenCache.respond(response.requestId, response.token);\n break;\n }\n case \"rpc\": {\n const { op, args } = payload as RpcPayload;\n const id = envelope.id;\n void (async () => {\n try {\n const active = client ?? (await bootPromise);\n if (!active) throw new Error(\"rpc before attach\");\n const value = await dispatchRpc(active, op, args);\n // An export artefact (backup tarball or diagnostic SQL) crosses zero-copy: transfer its\n // `ArrayBuffer` (rebuilt into a `File` tab-side, ADR-0035). Every other op's value\n // structured-clones in place with no transfer list.\n const transfer =\n op === \"exportStore\" || op === \"exportDiagnostics\" || op === \"exportData\"\n ? [(value as ExportArtefactWire).buffer]\n : undefined;\n postBridgeMessage(port, codec, \"rpc-result\", { ok: true, value }, id, transfer);\n } catch (error) {\n postBridgeMessage(port, codec, \"rpc-result\", { ok: false, error: serializeError(error) }, id);\n }\n })();\n break;\n }\n case \"subscribe\": {\n const id = envelope.id;\n void handleSubscribe(port, id, payload as SubscribePayload).catch((error) => {\n postBridgeMessage(port, codec, \"rpc-result\", { ok: false, error: serializeError(error) }, id);\n });\n break;\n }\n case \"unsubscribe\": {\n const { queryId } = payload as { queryId: string };\n // Compose the SAME port-scoped key the subscribe used — a bare queryId lookup would collide with\n // another tab's identically-numbered subscription (see `subKeyFor`).\n const subKey = subKeyFor(port, queryId);\n const sub = liveSubs.get(subKey);\n if (sub) {\n // Non-blocking for the caller: the manager retains the teardown promise so `close()` awaits it.\n void sub.subscription.unsubscribe();\n liveSubs.delete(subKey);\n } else {\n // No live entry yet → the subscribe is still mid-await. Mark it cancelled so `handleSubscribe`\n // tears down the subscription it is about to create instead of recording it (ADR-0040 decision 1).\n const inFlight = pendingSubscribes.get(subKey);\n if (inFlight) inFlight.cancelled = true;\n }\n break;\n }\n case \"wake\": {\n // A tab forwarded online/visibilitychange (or a manual nudge): treat it as a convergence pass request\n // so a write flushes promptly without waiting for the worker's interval tick (decision 5 seam).\n // Suppressed while the Offline toggle is off — a wake must not flush a simulated-offline board.\n if (!convergenceSuppressed) void bootPromise?.then((active) => void active.flush());\n break;\n }\n default:\n break;\n }\n };\n\n const detachPort = (port: BridgePort) => {\n ports.delete(port);\n for (const [subKey, sub] of liveSubs) {\n if (sub.port === port) {\n // Non-blocking: the manager retains the teardown promise so `close()` awaits it (ADR-0040 decision 1).\n void sub.subscription.unsubscribe();\n liveSubs.delete(subKey);\n }\n }\n // Also cancel every subscribe for this port still mid-await — its `handleSubscribe` will tear down the\n // subscription it is about to create rather than record it for a detached port (ADR-0040 decision 1).\n for (const pending of pendingSubscribes.values()) {\n if (pending.port === port) pending.cancelled = true;\n }\n };\n\n // The host's own placement identity for DIRECT connections (no bootstrapWorkerScope): minted once per host.\n const hostInstanceId = crypto.randomUUID();\n const connect = (port: BridgePort, connection?: { placementQueriesHandled?: boolean }) => {\n ports.add(port);\n const listener = (event: { data: unknown }) => {\n // A DIRECTLY-connected host IS the in-scope engine home, so it answers the placement query itself —\n // `electionRequired: false`, exactly what `bootstrapWorkerScope`'s meta listener reports for SW-direct.\n // This makes \"every host answers the placement query\" true on EVERY transport (including plain test\n // ports), which a restore-bearing attach RELIES on: it awaits the reply to route the one-shot restore\n // artifact to the port that reaches the engine. The real SharedWorker bootstrap owns this query on\n // bootstrapped ports; answering here as well minted a second, unrelated identity and could poison teardown.\n if (isPlacementQuery(event.data)) {\n if (connection?.placementQueriesHandled !== true) {\n port.postMessage({\n [PLACEMENT_RESULT_KEY]: {\n engineHome: \"shared-worker\",\n electionRequired: false,\n swInstanceId: hostInstanceId,\n } satisfies PlacementQueryResult,\n });\n }\n return;\n }\n if (isBridgeEnvelope(event.data) && event.data.type === \"detach\") {\n detachPort(port);\n port.removeEventListener(\"message\", listener);\n return;\n }\n onPortMessage(port, event.data);\n };\n port.addEventListener(\"message\", listener);\n port.start?.();\n };\n\n const closeHost = async (): Promise<void> => {\n const closeStartedAt = nowStamp();\n const retirementPhase = (phase: string, data?: Record<string, unknown>): void =>\n syncDebug(\"worker retirement phase\", {\n phase,\n workerElapsedMs: Math.max(0, nowStamp() - closeStartedAt),\n ...(data ?? {}),\n });\n retirementPhase(\"host-close-started\", {\n pendingSubscribes: inFlightSubscribes.size,\n liveSubscriptions: liveSubs.size,\n hasBoot: bootPromise !== null,\n hasProvisionedStore: provisioned !== null,\n });\n try {\n // Halt ALL engine activity BEFORE draining subscribes or disposing live queries (ADR-0040 + the halt-first\n // teardown rule): abort the shape-stream long-polls, the write fetches, and convergence NOW. Otherwise those\n // two steps below race an engine still committing shape data into the live queries they are trying to tear\n // down, and never settle — closeHost then parks before it ever reaches active.stop(). The awaited teardown is\n // unchanged; active.stop() below (idempotent halt inside) still runs the full close.\n const active = client ?? (bootPromise ? await bootPromise.catch(() => null) : null);\n active?.haltActivity();\n retirementPhase(\"activity-halted\", { activeClient: active !== null });\n // Quiesce pending subscribes FIRST (ADR-0040 decision 1 — the pending-before-manager race): flip\n // `closing`, mark every mid-await subscribe cancelled, and await every in-flight `handleSubscribe` task.\n // This guarantees the manager exists (if any subscribe created one) BEFORE `dispose()` runs, and that no\n // subscribe can create a registration afterwards — each resumes into the `closing` early-bail instead.\n closing = true;\n for (const pending of pendingSubscribes.values()) pending.cancelled = true;\n retirementPhase(\"pending-subscriptions-wait-started\", { count: inFlightSubscribes.size });\n await Promise.allSettled([...inFlightSubscribes]);\n retirementPhase(\"pending-subscriptions-wait-completed\");\n // Dispose the manager BEFORE `active.stop()` (ADR-0040 decision 1): it tears down every remaining live\n // registration and awaits ALL teardowns, so no fire-and-forget unsubscribe is still in flight when the\n // engine closes (the close-vs-unsubscribe hang). No-op when nothing ever subscribed.\n liveSubs.clear();\n retirementPhase(\"live-query-disposal-started\");\n await liveManager?.dispose();\n retirementPhase(\"live-query-disposal-completed\");\n retirementPhase(\"active-client-stop-started\", { activeClient: active !== null });\n await active?.stop();\n retirementPhase(\"active-client-stop-completed\");\n retirementPhase(\"host-close-completed\");\n } catch (error) {\n retirementPhase(\"host-close-failed\", {\n message: error instanceof Error ? error.message : String(error),\n });\n throw error;\n } finally {\n ports.clear();\n setSyncDebugSink(undefined);\n }\n };\n\n // ─── Global-scope auto-binding (real worker only; tests inject ports via connect) ─────────────────\n // ADR-0049 D1 + ADR-0050: a SharedWorker scope routes through the PLACEMENT bootstrap — it decides its engine\n // home once and gates every `onconnect` port on that decision (SW-direct host connect vs router-only\n // `attachTab`). WHEN the decision runs is the storage declaration's call (ADR-0050): a registry-attached\n // STATIC declaration is authoritative and decides at scope startup; a registry-silent scope DEFERS the\n // decision until the first port's declaration message arrives, because `backend: \"idbfs\"` selects SW-direct\n // and skips the probe — the declaration must be known before the probe can be (not) run. A dedicated engine\n // worker still delegates to `bindGlobalScope` (the step-9 control plane); a plain test/Node scope is a no-op.\n //\n // The static declaration is read off the DEFAULT registry (placement is decided before any attach settles a\n // role) — storage is a data-contract property, so role variants baked into one worker file share it.\n const staticStorage = getSyncRegistryStorage(options.registry);\n if (options.installGlobal === false) {\n // No global bootstrap runs (a plain host driven via `connect` in tests) — open the placement gate at once so\n // the first boot proceeds with no OPFS grant and no engine home (a plain scope has no browser placement).\n openPlacementGate();\n } else {\n bootstrapWorkerScope({\n connect,\n closeHost,\n peerCount: () => ports.size,\n // ADR-0050: the registry-attached static declaration, when present, decides placement at startup —\n // `backend: \"idbfs\"` means no probe, no election, in-SW idbfs engine (ADR-0049 D1's declared opt-out).\n ...(staticStorage ? { staticStorage } : {}),\n ...(options.executionLimit ? { executionLimit: options.executionLimit } : {}),\n onPlacement: (outcome) => {\n // The resolved OPFS grant + engine home for THIS scope: the SharedWorker placement decision (`shared-worker`\n // ⇒ granted in-scope engine, or a capability-absence idbfs fallback carrying `storageFallbackReason`), the\n // elected DEDICATED engine's OWN-scope probe (`elected-worker` carrying its real probe verdict), or a plain\n // test/Node scope (no home, no grant). Threaded into the boot's grant/BootReport and OPENS the boot gate.\n // ADR-0049 decision 12: `placementEngineHome` stamps the report; `placementFallbackReason` stamps the\n // capability-absence idbfs fallback's `storageFallbackReason`.\n placementOpfsAccess = outcome.opfsGranted;\n placementEngineHome = outcome.engineHome;\n placementFallbackReason = outcome.storageFallbackReason;\n openPlacementGate();\n },\n });\n }\n\n return {\n connect,\n whenBooted,\n close: closeHost,\n };\n}\n\n/**\n * Serialize a thrown value into the bridge's {@link BridgeErrorWire} shape. `name` is carried whenever the\n * error's is not the bare `\"Error\"` default, so a typed refusal (e.g. `RestoreTargetExistsError`) stays\n * type-detectable after the tab rebuilds it; `detail` only when structured.\n */\nfunction serializeError(error: unknown): BridgeErrorWire {\n if (error instanceof ExecutionLimitMismatchError) {\n return { message: error.message, detail: executionLimitMismatchToWire(error) };\n }\n if (error instanceof Error) {\n const detail = (error as Error & { detail?: unknown }).detail;\n return {\n message: error.message,\n ...(error.name && error.name !== \"Error\" ? { name: error.name } : {}),\n ...(detail !== undefined ? { detail } : {}),\n };\n }\n return { message: String(error) };\n}\n\ninterface SharedWorkerConnectEvent {\n ports: BridgePort[];\n}\n/**\n * A message event that may carry transferred `MessagePort`s (the `ports` array). The engine-entry control plane\n * (ADR-0049 step 9) reads it for the delivered control channel and for each dynamically transferred pipe end.\n */\ninterface ScopeMessageEvent {\n data: unknown;\n ports?: readonly ControlPortLike[];\n}\ninterface WorkerGlobalScopeLike {\n onconnect?: (event: SharedWorkerConnectEvent) => void;\n postMessage?: (message: unknown) => void;\n addEventListener?: (type: \"message\", listener: (event: ScopeMessageEvent) => void) => void;\n removeEventListener?: (type: \"message\", listener: (event: { data: unknown }) => void) => void;\n /** Present on a real `DedicatedWorkerGlobalScope` (`self.close()`); the entry self-closes on teardown. */\n close?: () => void;\n}\n\n/**\n * The structural `MessagePort` shape the engine-entry control plane needs: the control channel end delivered on\n * the implicit port, and each transferred pipe end wrapped into a {@link BridgePort}. No DOM lib — structural\n * typing only, matching the router's `RouterPort` discipline.\n */\ninterface ControlPortLike {\n postMessage: (message: unknown, transfer?: unknown[]) => void;\n addEventListener: (type: \"message\", listener: (event: ScopeMessageEvent) => void) => void;\n removeEventListener?: (type: \"message\", listener: (event: ScopeMessageEvent) => void) => void;\n start?: () => void;\n}\n\n/**\n * The literal key of the CONTROL-CHANNEL DELIVERY message (ADR-0049 step 9). The spawning coordinator's step-10\n * wiring posts `{ [CONTROL_PORT_DELIVERY_KEY]: true }` on the elected engine worker's IMPLICIT port WITH the\n * engine end of the announce control channel as a transferred `MessagePort`. The engine entry starts that port\n * and runs its control plane on it. Distinct namespace from the data-path bridge envelope and the `pgx0049`\n * control envelope, so it is unambiguous on the shared implicit-port transport.\n */\nexport const CONTROL_PORT_DELIVERY_KEY = \"pgx0049ControlPort\" as const;\n\n/** Is this a control-channel DELIVERY message (`{ [CONTROL_PORT_DELIVERY_KEY]: true }`)? */\nfunction isControlPortDelivery(data: unknown): boolean {\n return (\n typeof data === \"object\" &&\n data !== null &&\n (data as { [CONTROL_PORT_DELIVERY_KEY]?: unknown })[CONTROL_PORT_DELIVERY_KEY] === true\n );\n}\n\n/**\n * The elected-engine-worker CONTROL PLANE (ADR-0049 step 9) — grown on the dedicated-worker ENTRY, leaving the\n * engine CORE (`SyncWorkerHost.connect`) untouched. Runs on the delivered control channel:\n *\n * - `assign-identity` → remember it (gates every subsequent tagged message) and reply `engine-ready`. That\n * signals CONTROL-plane readiness, NOT engine boot — the engine still boots lazily on the FIRST attach, as\n * today (the first `connect-port` pipe's traffic drives `boot`).\n * - `connect-port` (matching identity) + a transferred port → wrap it into a {@link BridgePort} (started if it\n * exposes `start()`, exactly as the implicit scope port is wrapped) and feed it to the SAME `connect(...)`\n * the entry already uses N times — dynamic per-tab pipe acceptance (ADR D4).\n * - `control-ping` → reply `control-ack` with the assigned identity (or the ping's, pre-assignment) and the\n * SAME `pingId`. Answered on the event loop, so a WASM-blocked engine cannot answer — which is exactly the\n * execution-limit's liveness signal.\n * - `engine-retiring` (matching) → a no-op hook for now (flush opportunities are engine-CORE concerns wired in\n * a later step).\n * - `engine-teardown` (matching) → reply `control-ack` with `pingId: -1` (the teardown ack the router relays)\n * then self-close the scope AFTER a microtask, so the ack flushes before the worker goes.\n *\n * Stale (post-assignment mismatch) tagged messages are discarded via {@link shouldApplyControlMessage}.\n */\nfunction startEngineControlPlane(\n controlPort: ControlPortLike,\n connect: (port: BridgePort) => void,\n closeScope: () => void,\n): () => void {\n let assigned: EngineIdentity | undefined;\n const post = (message: EngineControlMessage): void => controlPort.postMessage(controlEnvelope(message));\n const listener = (event: ScopeMessageEvent): void => {\n const message = readControlEnvelope(event.data);\n if (message === undefined) return;\n switch (message.type) {\n case \"assign-identity\":\n assigned = message.identity;\n post({ type: \"engine-ready\", identity: message.identity });\n return;\n case \"control-ping\":\n post({ type: \"control-ack\", identity: assigned ?? message.identity, pingId: message.pingId });\n return;\n case \"connect-port\": {\n if (!shouldApplyControlMessage(assigned, message)) return; // stale → discard\n const transferred = event.ports?.[0];\n if (!transferred) return;\n connect(wrapControlPortAsBridge(transferred));\n return;\n }\n case \"engine-retiring\":\n // No-op hook for now (matching-identity only) — later steps wire the engine-core flush opportunity.\n void shouldApplyControlMessage(assigned, message);\n return;\n case \"engine-teardown\":\n if (!shouldApplyControlMessage(assigned, message)) return; // stale → discard\n post({ type: \"control-ack\", identity: message.identity, pingId: -1 });\n // Defer the close a microtask so the teardown ack flushes before the scope goes.\n void Promise.resolve().then(closeScope);\n return;\n default:\n return;\n }\n };\n controlPort.addEventListener(\"message\", listener);\n controlPort.start?.();\n // Return a disposer that detaches THIS plane's listener, so a repeat control-port delivery (the keepalive\n // SW-reconstruction re-announce, step 11b follow-up 2) can REPLACE this channel and have the old one ignored.\n return () => controlPort.removeEventListener?.(\"message\", listener);\n}\n\n/** Wrap a transferred raw port into the {@link BridgePort} the engine's `connect(...)` consumes (started if able). */\nfunction wrapControlPortAsBridge(port: ControlPortLike): BridgePort {\n port.start?.();\n return {\n postMessage: (message, transfer) => port.postMessage(message, transfer),\n addEventListener: (type, listener) => port.addEventListener(type, listener),\n removeEventListener: (type, listener) => port.removeEventListener?.(type, listener),\n };\n}\n\n/**\n * Bind the running global scope to `connect`. A `SharedWorkerGlobalScope` exposes `onconnect` (one event per\n * tab, each carrying a port); a dedicated `DedicatedWorkerGlobalScope` has no `onconnect` but IS itself the\n * single implicit port (`self.postMessage`/`addEventListener`). Neither exists in a plain test/Node context,\n * where the host is driven via {@link SyncWorkerHost.connect} directly — so this is a no-op there.\n *\n * `globalScope` defaults to `globalThis` (the real worker binding); tests inject a fake scope to exercise the\n * dedicated-worker control-plane arm (ADR-0049 step 9) without a real Worker.\n */\nexport function bindGlobalScope(connect: (port: BridgePort) => void, globalScope: unknown = globalThis): void {\n const scope = globalScope as WorkerGlobalScopeLike;\n const hasSharedWorkerScope =\n typeof (globalScope as { SharedWorkerGlobalScope?: unknown }).SharedWorkerGlobalScope !== \"undefined\";\n const hasDedicatedWorkerScope =\n typeof (globalScope as { DedicatedWorkerGlobalScope?: unknown }).DedicatedWorkerGlobalScope !== \"undefined\";\n\n if (hasSharedWorkerScope) {\n scope.onconnect = (event: SharedWorkerConnectEvent) => {\n const port = event.ports[0];\n if (port) connect(port);\n };\n return;\n }\n if (hasDedicatedWorkerScope && scope.postMessage && scope.addEventListener && scope.removeEventListener) {\n // The dedicated worker's own global scope IS the single implicit port (the tab's engine port). Wrap it as a\n // bridge port and connect it — the same engine serves that one port for the worker's whole lifetime.\n const scopePort: BridgePort = {\n postMessage: (message: unknown) => scope.postMessage!(message),\n addEventListener: (type, listener) => scope.addEventListener!(type, listener),\n removeEventListener: (type, listener) => scope.removeEventListener!(type, listener),\n };\n connect(scopePort);\n // ADR-0049 step 9 (elected engine home): the implicit port ALSO carries the control-channel DELIVERY\n // message. On it, start the engine's control plane — dynamic pipe acceptance, probe replies, and\n // retirement/teardown — all identity-tagged. The engine CORE is untouched: transferred pipes flow into the\n // SAME `connect` above. The scope port's own baseline connect is unchanged.\n // A repeat delivery REPLACES the live control plane (ADR-0049 step 11b follow-up 2): when the leader-keepalive\n // reconstructs a dead SharedWorker it re-announces with a FRESH control channel and re-delivers this engine's\n // end. Dispose the previous plane's listener first so stale traffic on the dead old channel is ignored; the\n // engine CORE (`connect`) is untouched — pipes still flow into the same engine.\n let disposeControlPlane: (() => void) | undefined;\n scope.addEventListener(\"message\", (event: ScopeMessageEvent) => {\n if (!isControlPortDelivery(event.data)) return;\n const controlPort = event.ports?.[0];\n if (!controlPort) return;\n disposeControlPlane?.();\n disposeControlPlane = startEngineControlPlane(controlPort, connect, () => scope.close?.());\n });\n }\n}\n\n// ─── ADR-0049 D1: the SharedWorker placement bootstrap ───────────────────────────────────────────────\n// The SharedWorker arm decides its ENGINE HOME once at startup and gates each tab connection on that decision:\n// `shared-worker` (SW-direct) connects the port to the in-scope engine host; `elected-worker` (router-only)\n// hands the port to a `createEngineRouter` and NEVER boots the engine in-scope. The probe is UNCONDITIONAL —\n// every scope runs `decideSwPlacement` — with ONE exception: a registry declaring `backend: \"idbfs\"`\n// (`deps.declaredIdbfs`) skips the probe and binds the in-SW engine host on idbfs (the declared mode). Both modes\n// answer a tab's PLACEMENT query and DESTROY peer-count query; SW-direct additionally answers `pgx0049` keepalive\n// pings on each port (the router owns those in elected mode). A dedicated-worker scope (the elected engine worker)\n// still routes through `bindGlobalScope` (the step-9 control plane), unchanged.\n\n/**\n * The PLACEMENT-QUERY envelope key: a tab posts `{ [PLACEMENT_QUERY_KEY]: true }` on its SharedWorker\n * connection to learn the engine home; the SharedWorker replies `{ [PLACEMENT_RESULT_KEY]: PlacementQueryResult }`.\n * A distinct namespace from the data-path bridge envelope and the `pgx0049` control envelope, so it is\n * unambiguous on the shared tab↔SharedWorker transport (the attach client reads it off the raw message).\n */\nexport const PLACEMENT_QUERY_KEY = \"pgx0049Placement\" as const;\n/** The reply to a {@link PLACEMENT_QUERY_KEY} query — carries the engine home, `electionRequired`, and SW id. */\nexport const PLACEMENT_RESULT_KEY = \"pgx0049PlacementResult\" as const;\n/**\n * The DESTROY peer-count query key (ADR-0049 D8, plan fault row \"`destroy()` with peers attached → refused\").\n * A tab about to destroy the store posts `{ [DESTROY_QUERY_KEY]: true }`; the SharedWorker — which alone knows\n * the attached-tab count — replies `{ [DESTROY_VERDICT_KEY]: { peers } }`. `peers` INCLUDES the querying tab, so\n * `peers > 1` means other tabs still hold the store and destruction is refused.\n */\nexport const DESTROY_QUERY_KEY = \"pgx0049DestroyQuery\" as const;\n/** The reply to a {@link DESTROY_QUERY_KEY} query — the attached-tab count (querying tab included). */\nexport const DESTROY_VERDICT_KEY = \"pgx0049DestroyVerdict\" as const;\n/**\n * The DECLARATION-MESSAGE envelope key (ADR-0050): the tab posts `{ [DECLARATION_KEY]: SyncStorageDeclaration }`\n * on EVERY worker port BEFORE its placement query — always, even when the app declared nothing (an empty `{}`\n * meaning \"no opinion: capability defaults\"). The bootstrap defers its placement decision until the first one\n * arrives (a registry-attached static declaration decides at startup instead), binds the first arrival for the\n * worker/store lifetime, and refuses explicit conflicts. The worker NAME carries the store path only — never\n * configuration; that was the fault this key replaces.\n */\nexport const DECLARATION_KEY = \"pgx0050Declaration\" as const;\n/**\n * The reply when a declaration (or an engine-bound message on an undeclared port) is REFUSED (ADR-0050):\n * `{ [DECLARATION_REFUSED_KEY]: { message, name } }`. `name` is the stable typed-error name\n * (`StorageDeclarationRefusedError`) so the tab rebuilds the refusal typed and fails its boot loudly —\n * never a silent old value, never a hang.\n */\nexport const DECLARATION_REFUSED_KEY = \"pgx0050DeclarationRefused\" as const;\n\n/** The {@link DECLARATION_REFUSED_KEY} reply payload. */\nexport interface DeclarationRefusedWire {\n message: string;\n /** The stable typed-error name (`StorageDeclarationRefusedError`) for the tab-side rebuild. */\n name: string;\n}\n\n/** The placement a tab learns from the SharedWorker (the reply payload under {@link PLACEMENT_RESULT_KEY}). */\nexport interface PlacementQueryResult {\n engineHome: SwPlacementResult[\"engineHome\"];\n /** True in `elected-worker` mode — the tab's election coordinator must spawn the engine worker. */\n electionRequired: boolean;\n swInstanceId: string;\n /**\n * The SharedWorker's OWN script URL (`self.location.href`, ADR-0049 D5). In `elected-worker` mode the winning\n * tab constructs the elected engine as `new Worker(swScriptUrl, { type: \"module\" })` — the worker entry is\n * dual-scope (one file serves both homes), so no consumer wiring is needed; a `createEngineWorker` override is\n * only for entries that cannot be reconstructed from their URL as a module worker. Absent when the scope cannot\n * report its location (a plain test scope) — then a tab with no override fails attach with a typed wiring error.\n */\n swScriptUrl?: string;\n}\n\n/** The SharedWorker placement bootstrap's dependencies (all injected so it is unit-testable off-worker). */\nexport interface SharedWorkerBootstrapDeps {\n /** The engine host `connect` — used in SW-direct (`shared-worker`) placement to pipe a port to the in-scope engine. */\n connect: (port: BridgePort, connection?: { placementQueriesHandled?: boolean }) => void;\n /** Quiesce and close the in-scope host before SW-direct destruction acknowledges handle release. */\n closeHost?: () => Promise<void>;\n /** Current attached-tab count for the DESTROY verdict in SW-direct mode (the host's own port set). */\n peerCount: () => number;\n /** The opt-in execution limit, threaded into the router in `elected-worker` (router-only) placement. */\n executionLimit?: ExecutionLimitConfig;\n /**\n * The registry-attached STATIC storage declaration (ADR-0050) — authoritative when present: it binds the\n * store's declaration and decides placement AT SCOPE STARTUP (no wait for a declaration message).\n * `backend: \"idbfs\"` skips the probe entirely and binds the in-SharedWorker engine host on idbfs (ADR-0049\n * D1's declared opt-out — the declared mode, not a fallback); any other resolution runs the UNCONDITIONAL\n * placement probe. Absent: the scope is registry-silent and DEFERS its placement decision until the first\n * port's declaration message arrives (whose explicit fields then bind).\n */\n staticStorage?: SyncStorageDeclaration;\n /** Test seam: inject the placement decision (a fake probe result) instead of the real {@link decideSwPlacement}. */\n decidePlacement?: () => Promise<SwPlacementResult>;\n /** Defaults to `globalThis`; tests inject a fake SharedWorker scope. */\n globalScope?: unknown;\n /**\n * Notified once the placement grant for THIS scope resolves (SharedWorker decision, dedicated-engine probe, or\n * the plain-scope immediate settle). The entry threads `opfsGranted` into its `hasOpfsSyncAccess` boot grant and\n * `engineHome` into the BootReport, and opens its boot gate. `engineHome` is `undefined` for a plain test/Node\n * scope (no home) so the report omits it, exactly as before placement.\n */\n onPlacement?: (outcome: PlacementBootstrapOutcome) => void;\n /**\n * Test seam: inject the DEDICATED elected-engine scope's OPFS probe (a fake verdict) instead of the real\n * {@link probeOpfsSyncAccess}. Defaults to the real probe (invariant 8 — a real `createSyncAccessHandle` open in\n * the engine's own scope, per boot, never sniffed or cached).\n */\n probe?: () => Promise<PlacementProbeResult>;\n}\n\n/** The resolved placement grant for a worker scope, threaded to the entry's boot grant + BootReport engine home. */\nexport interface PlacementBootstrapOutcome {\n /** The engine home for this scope; `undefined` for a plain test/Node scope (the report then omits it). */\n engineHome: SwPlacementResult[\"engineHome\"] | undefined;\n /** True when THIS scope actually holds OPFS sync-access (in-scope SW-direct, or the elected engine's own probe). */\n opfsGranted: boolean;\n /**\n * The verbatim reason this scope's engine opened IDBFS while OPFS was CAPABLE (ADR-0049 D1/D12, a\n * capability-absence fallback) — stamped into the boot's `storageFallbackReason`. Absent on a granted opfs boot\n * AND on the declared `backend: \"idbfs\"` mode (the contract, not a fallback).\n */\n storageFallbackReason?: string;\n}\n\n/** Is this a raw `{ [PLACEMENT_QUERY_KEY]: true }` placement query? */\nfunction isPlacementQuery(data: unknown): boolean {\n return (\n typeof data === \"object\" &&\n data !== null &&\n (data as { [PLACEMENT_QUERY_KEY]?: unknown })[PLACEMENT_QUERY_KEY] === true\n );\n}\n\n/** Is this a raw `{ [DESTROY_QUERY_KEY]: true }` destroy peer-count query? */\nfunction isDestroyQuery(data: unknown): boolean {\n return (\n typeof data === \"object\" && data !== null && (data as { [DESTROY_QUERY_KEY]?: unknown })[DESTROY_QUERY_KEY] === true\n );\n}\n\n/** Narrow a raw `{ [DECLARATION_KEY]: SyncStorageDeclaration }` declaration message, or `undefined` for foreign traffic. */\nfunction readDeclarationMessage(data: unknown): SyncStorageDeclaration | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const raw = (data as { [DECLARATION_KEY]?: unknown })[DECLARATION_KEY];\n if (typeof raw !== \"object\" || raw === null) return undefined;\n return raw as SyncStorageDeclaration;\n}\n\n/** A declared field with a value outside the contract's vocabulary — refused loudly, never ignored (ADR-0050). */\nfunction invalidDeclarationField(declaration: SyncStorageDeclaration): string | undefined {\n if (declaration.backend !== undefined && !isStorageBackend(declaration.backend)) {\n return `backend \"${String(declaration.backend)}\"`;\n }\n if (declaration.durability !== undefined && !isStorageDurability(declaration.durability)) {\n return `durability \"${String(declaration.durability)}\"`;\n }\n return undefined;\n}\n\n/**\n * Bootstrap the running worker scope for ADR-0049 placement. A SharedWorker scope runs the placement decision\n * and gates every `onconnect` port on it ({@link wireSharedWorkerPlacement}); any other scope (the dedicated\n * elected-engine worker, or a plain test/Node scope) delegates to {@link bindGlobalScope} unchanged. Called by\n * `defineSyncWorker` in place of the old direct `bindGlobalScope(connect)`.\n */\nexport function bootstrapWorkerScope(deps: SharedWorkerBootstrapDeps): void {\n const globalScope = deps.globalScope ?? globalThis;\n const hasSharedWorkerScope =\n typeof (globalScope as { SharedWorkerGlobalScope?: unknown }).SharedWorkerGlobalScope !== \"undefined\";\n if (hasSharedWorkerScope) {\n // ADR-0050: the storage declaration decides HOW placement runs. A registry-attached static declaration\n // binds and decides at startup; a registry-silent scope defers to the first port's declaration message.\n // Either way, `backend: \"idbfs\"` never probes (ADR-0049 D1's declared opt-out — SW-direct on idbfs, the\n // declared mode, not a fallback) and any other resolution runs the UNCONDITIONAL placement probe.\n wireSharedWorkerPlacement(deps, globalScope);\n return;\n }\n const hasDedicatedWorkerScope =\n typeof (globalScope as { DedicatedWorkerGlobalScope?: unknown }).DedicatedWorkerGlobalScope !== \"undefined\";\n if (hasDedicatedWorkerScope) {\n // ADR-0049 D1 (elected engine self-probe): the elected DEDICATED engine holds OPFS access in its OWN scope, so\n // it probes THIS scope's real `createSyncAccessHandle` (invariant 8 — per boot, never sniffed/cached) and\n // threads the verdict as the `elected-worker` home's OPFS grant, opening the boot gate. The step-9 control plane\n // (dynamic pipe acceptance, probe replies, teardown) is still wired by `bindGlobalScope`, unchanged. A DENIED\n // dedicated probe is capability absence in this home: the engine opens idbfs, and the outcome carries a verbatim\n // `storageFallbackReason` so the boot's BootReport shows the fallback (decision 12) rather than a silent idb.\n bindGlobalScope(deps.connect, globalScope);\n const probe = deps.probe ?? probeOpfsSyncAccess;\n void probe().then(\n (result) =>\n deps.onPlacement?.({\n engineHome: \"elected-worker\",\n opfsGranted: result.granted,\n ...(result.granted\n ? {}\n : { storageFallbackReason: `elected engine OPFS probe denied (${result.error ?? \"no attribution\"})` }),\n }),\n // The probe answers (never rejects); this guard only protects against an injected fake that throws — still\n // open the gate with no grant so the boot cannot deadlock, falling back to the honest idb backend.\n () =>\n deps.onPlacement?.({\n engineHome: \"elected-worker\",\n opfsGranted: false,\n storageFallbackReason: \"elected engine OPFS probe threw\",\n }),\n );\n return;\n }\n // A plain test/Node scope: no engine home, no OPFS grant — settle the gate immediately (no browser placement).\n bindGlobalScope(deps.connect, globalScope);\n deps.onPlacement?.({ engineHome: undefined, opfsGranted: false });\n}\n\n/** Per-port bootstrap state (ADR-0050): declared gates engine routing; queries queue until placement resolves. */\ninterface BootstrapPortState {\n /** This port's declaration message arrived (and was compatible) — the routing gate (contract point 3). */\n declared: boolean;\n /** The port was handed to the engine host / router (exactly once). */\n routed: boolean;\n /** Placement/destroy queries that arrived before the placement decision — answered on resolve, in order. */\n queuedQueries: unknown[];\n /** A DECLARED port's engine-bound/control traffic that arrived while placement was still pending — redelivered\n in arrival order after routing (the sender contract is \"declaration first, then anything\", ADR-0050). */\n queuedTraffic: Array<{ data: unknown; ports?: readonly ControlPortLike[] }>;\n}\n\n/**\n * Wire the SharedWorker arm for placement (ADR-0049 D1 + ADR-0050). Every `onconnect` port is started\n * immediately under a live meta listener; the placement decision runs when the store's storage declaration is\n * KNOWN — at scope startup for a registry-attached static declaration, else on the FIRST port's declaration\n * message (`backend: \"idbfs\"` never probes; anything else runs the unconditional probe). The first arrival\n * binds the declaration for the worker lifetime; later explicit conflicts — and engine-bound traffic on a\n * port that has not declared — are refused typed (`DECLARATION_REFUSED_KEY`), never silently honoured. A port\n * is routed to the engine host (`shared-worker`) or the router (`elected-worker`) once it has declared AND\n * placement is resolved; placement/destroy queries queue until the decision and are answered after routing,\n * so a conforming tab's engine-bound follow-up always finds the engine listener installed.\n */\nfunction wireSharedWorkerPlacement(deps: SharedWorkerBootstrapDeps, globalScope: unknown): void {\n const scope = globalScope as WorkerGlobalScopeLike;\n const decide = deps.decidePlacement ?? (() => decideSwPlacement());\n // The SharedWorker's own script URL (ADR-0049 D5) — reported in the placement reply so the winning tab can\n // construct the elected engine as `new Worker(swScriptUrl, { type: \"module\" })` with no consumer wiring. Absent\n // when the scope cannot report its location (a plain test scope); a tab with no override then fails attach typed.\n const swScriptUrl = (globalScope as { location?: { href?: string } }).location?.href;\n let placement: SwPlacementResult | undefined;\n let router: EngineRouter | undefined;\n // Whether a `shared-worker` home holds the OPFS grant — true only on the PROBING path (a granted probe placed\n // the engine in-scope on OPFS-repacked); false when `backend: \"idbfs\"` was declared (no probe ran). A\n // capability-absence fallback (`storageFallbackReason`) is idbfs regardless.\n let opfsGrantedForSharedHome = false;\n // ADR-0050: the store's BOUND storage declaration — the registry-attached static declaration at wire time,\n // else the first declaration message's resolution. Immutable once set; later arrivals only confirm.\n let boundDeclaration: ResolvedStorageDeclaration | undefined;\n let decisionStarted = false;\n const portStates = new Map<BridgePort, BootstrapPortState>();\n let sharedHostTeardown: Promise<{ error?: BridgeErrorWire }> | undefined;\n\n const currentPeerCount = (): number =>\n placement?.engineHome === \"elected-worker\" ? (router?.tabCount() ?? 0) : deps.peerCount();\n\n /** Refuse a declaration (or a pre-declaration engine-bound message) TYPED on the offending port (ADR-0050). */\n const refuseDeclaration = (port: BridgePort, error: unknown): void => {\n const message = error instanceof Error ? error.message : String(error);\n port.postMessage({\n [DECLARATION_REFUSED_KEY]: { message, name: \"StorageDeclarationRefusedError\" } satisfies DeclarationRefusedWire,\n });\n };\n\n /** Answer a queued-or-live placement query on `port` from the RESOLVED placement. */\n const answerPlacementQuery = (port: BridgePort): void => {\n const live = placement!;\n port.postMessage({\n [PLACEMENT_RESULT_KEY]: {\n engineHome: live.engineHome,\n electionRequired: live.engineHome === \"elected-worker\",\n swInstanceId: live.swInstanceId,\n ...(swScriptUrl !== undefined ? { swScriptUrl } : {}),\n } satisfies PlacementQueryResult,\n });\n };\n\n /**\n * Redeliver one queued traffic entry by re-dispatching a real `message` event on the port — EXACTLY\n * equivalent to live delivery: every listener registered by then (the meta listener AND the routed engine\n * host's / router's) sees it in registration order, each ignoring the other's traffic as they already do on\n * a live routed port. Requires an EventTarget-backed port (every real MessagePort is; structural test ports\n * must be too to exercise replay — without `dispatchEvent` the entry is dropped, the pre-queue behavior).\n */\n const redeliver = (port: BridgePort, entry: { data: unknown; ports?: readonly ControlPortLike[] }): void => {\n const target = port as unknown as { dispatchEvent?: (event: unknown) => boolean };\n if (typeof target.dispatchEvent !== \"function\" || typeof MessageEvent === \"undefined\") return;\n target.dispatchEvent(\n new MessageEvent(\"message\", {\n data: entry.data,\n ...(entry.ports ? { ports: entry.ports as unknown as MessagePort[] } : {}),\n }),\n );\n };\n\n /** Hand a declared port to the resolved engine home — the host (SW-direct) or the router (elected). */\n const routePort = (port: BridgePort, state: BootstrapPortState): void => {\n if (state.routed) return;\n state.routed = true;\n if (placement!.engineHome === \"shared-worker\") {\n deps.connect(port, { placementQueriesHandled: true });\n } else {\n router!.attachTab(port as unknown as RouterPort);\n }\n };\n\n /** A port's declaration message: bind the first (start the decision), confirm-or-refuse the rest (ADR-0050). */\n const handleDeclaration = (port: BridgePort, state: BootstrapPortState, wire: SyncStorageDeclaration): void => {\n const invalid = invalidDeclarationField(wire);\n if (invalid !== undefined) {\n refuseDeclaration(port, new StorageDeclarationRefusedError(`storage declaration carries an unknown ${invalid}`));\n return;\n }\n if (boundDeclaration === undefined) {\n // First arrival binds (the registry-silent scope; a static declaration bound at wire time instead). A\n // single wire source cannot conflict with an absent static one, so this resolution never throws here.\n boundDeclaration = resolveStorageDeclaration(deps.staticStorage, wire);\n state.declared = true;\n startDecision(boundDeclaration.backend);\n } else {\n try {\n assertStorageDeclarationCompatible(boundDeclaration, wire);\n } catch (error) {\n refuseDeclaration(port, error);\n return;\n }\n state.declared = true;\n }\n if (placement !== undefined) routePort(port, state);\n };\n\n const installPortListener = (port: BridgePort, state: BootstrapPortState): void => {\n // The meta listener is installed (and the port STARTED) at `onconnect`, before any placement exists — it\n // must be, because the declaration message that UNBLOCKS the placement decision arrives on this port\n // (ADR-0050). It answers the placement + destroy-peer queries on EVERY port (both modes, queued until the\n // decision resolves) and, per mode:\n // - SW-direct: the `pgx0049` keepalive control-ping (the router owns that in elected mode).\n // - elected: the tab's `engine-announce` — the SW-side translation into `router.announceEngine`, handing\n // the transferred router-end control port to the router so it stamps an identity + pipes the tabs (the\n // router itself does not react to `engine-announce`; the SharedWorker scope drives it).\n // It coexists with the host's / router's own listener on the same port: each ignores the other's traffic.\n const metaListener = (event: { data: unknown; ports?: readonly ControlPortLike[] }): void => {\n const data = event.data;\n const declaration = readDeclarationMessage(data);\n if (declaration !== undefined) {\n handleDeclaration(port, state, declaration);\n return;\n }\n if (isPlacementQuery(data) || isDestroyQuery(data)) {\n // Meta queries: answerable the moment placement resolves (declaration-independent — a query is not\n // engine-bound), queued in arrival order until then.\n if (placement === undefined) {\n state.queuedQueries.push(data);\n return;\n }\n if (isPlacementQuery(data)) answerPlacementQuery(port);\n else port.postMessage({ [DESTROY_VERDICT_KEY]: { peers: currentPeerCount() } });\n return;\n }\n if (!state.declared && isBridgeEnvelope(data)) {\n // Contract point 3 (ADR-0050): an engine-bound message (provision/attach/…) before this port's\n // declaration is a protocol violation — refused typed, never buffered, never silently dropped. The\n // port itself is not poisoned: a declaration may still arrive and route it.\n refuseDeclaration(\n port,\n new StorageDeclarationRefusedError(\n \"engine-bound message received before the port's storage declaration — the declaration message \" +\n \"must precede provision/attach on every worker port (ADR-0050)\",\n ),\n );\n return;\n }\n if (placement === undefined) {\n // A DECLARED port's engine-bound/control traffic while the placement decision is still pending: the\n // sender contract is \"declaration first, then anything\" (ADR-0050) — a bridge-silence reconnect or a\n // keepalive SW reconstruction posts declaration + attach/announce back-to-back without awaiting a\n // placement reply. QUEUE it and redeliver after routing (the drain), never drop it. Undeclared-port\n // control traffic and non-protocol junk keep the drop (a conforming sender always declares first).\n if (state.declared && (isBridgeEnvelope(data) || readControlEnvelope(data) !== undefined)) {\n state.queuedTraffic.push({ data, ...(event.ports?.length ? { ports: event.ports } : {}) });\n }\n return;\n }\n const control = readControlEnvelope(data);\n if (placement.engineHome === \"shared-worker\") {\n if (control?.type === \"control-ping\") {\n port.postMessage(\n controlEnvelope({ type: \"control-ack\", identity: control.identity, pingId: control.pingId }),\n );\n return;\n }\n if (control?.type === \"engine-teardown\") {\n const sharedIdentity: EngineIdentity = { swInstanceId: placement.swInstanceId, generation: 0 };\n if (!shouldApplyControlMessage(sharedIdentity, control)) return;\n // SW-direct destruction is supervised by the tab, but the exclusive store handles live here. Close\n // the in-scope host first; only the reserved teardown ack proves that quiescence to the tab. The\n // SharedWorker scope then closes itself so a later attach starts a fresh, rebootable host even when\n // `extendedLifetime` would otherwise retain this closed scope.\n sharedHostTeardown ??= Promise.resolve()\n .then(() => deps.closeHost?.())\n .then(\n () => ({}),\n (error: unknown) => ({ error: serializeError(error) }),\n );\n void sharedHostTeardown.then((result) => {\n port.postMessage(\n controlEnvelope({\n type: \"control-ack\",\n identity: sharedIdentity,\n pingId: -1,\n ...(result.error ? { error: result.error } : {}),\n }),\n );\n // A task boundary, not merely a microtask: give the posted success/failure acknowledgement a delivery\n // turn before closing the SharedWorker global. A close failure poisons this lifetime just as surely as\n // a successful close retires it; never retain a rejected teardown promise in a live scope.\n globalThis.setTimeout(() => scope.close?.(), 0);\n });\n }\n return;\n }\n // elected-worker (router-only): the tab's coordinator drives leadership over this port.\n // - `leader-granted`: the newly-granted leader is about to (re)spawn its engine. Open the router's handoff\n // window NOW (fan `leader-granted` to EVERY tab) so in-flight ops settle by outcome and new ops QUEUE\n // across the spawn→announce→pipe gap, then flush onto the fresh pipe (invariants 5 + 9). Without this the\n // coordinator's `leader-granted` was DROPPED here, so on a leadership change (succession) a tab kept\n // dispatching onto the DEAD engine's pipe until the replacement pipe arrived — the elected-flow gap the\n // step-12 succession/relocation lanes surfaced (the router already owned `openHandoff`; nothing called it).\n // - `engine-announce`: translate into `router.announceEngine`, handing the transferred router-end control\n // port to the router so it stamps an identity + pipes the tabs (the router does not react to it itself).\n if (control?.type === \"leader-granted\") {\n router!.openHandoff(\"leader-granted\");\n return;\n }\n if (control?.type === \"engine-announce\") {\n const announced = event.ports?.[0];\n if (announced) router!.announceEngine(announced as unknown as RouterPort);\n return;\n }\n // ADR-0049 D1 capability-absence fallback: the tab's elected DEDICATED engine probed its OWN scope and was\n // DENIED — no home on this platform can hold sync-access handles. Abandon election and boot the IN-SCOPE\n // idbfs engine here (with the registry-declared durability), stamping the reported reason into the fallback\n // boot's `storageFallbackReason` (decision 12). This tab's port is connected to the in-scope host now; other\n // tabs re-establish through their placement re-query on reconnect.\n if (control?.type === \"engine-fallback\") {\n fallBackToIdbfs(control.reason, port);\n }\n };\n port.addEventListener(\"message\", metaListener);\n port.start?.();\n };\n\n // ADR-0049 D1: flip a router-only (`elected-worker`) scope to the in-SharedWorker IDBFS fallback when the elected\n // engine reports its own probe was denied (capability absence in every home). Idempotent — the first report wins.\n // Re-threads the placement onto the entry (so the lazily-booting in-scope engine opens idbfs with the fallback\n // reason) and connects the reporting tab's port to the in-scope host. Peer tabs re-establish via placement re-query.\n let fellBack = false;\n const fallBackToIdbfs = (reason: string, reportingPort: BridgePort): void => {\n if (fellBack) return;\n fellBack = true;\n placement = { engineHome: \"shared-worker\", swInstanceId: placement?.swInstanceId ?? crypto.randomUUID() };\n deps.onPlacement?.({ engineHome: \"shared-worker\", opfsGranted: false, storageFallbackReason: reason });\n deps.connect(reportingPort, { placementQueriesHandled: true });\n };\n\n /**\n * Run the placement decision for the BOUND backend (ADR-0050) — exactly once, the moment the declaration is\n * known (scope startup for a static declaration, first declaration message otherwise). `idbfs` NEVER probes:\n * the engine binds in-SharedWorker on idb, the declared mode, not a fallback (ADR-0049 D1). Anything else\n * runs the unconditional probe.\n */\n function startDecision(backend: ResolvedStorageDeclaration[\"backend\"]): void {\n if (decisionStarted) return;\n decisionStarted = true;\n let decision: Promise<SwPlacementResult>;\n if (backend === \"idbfs\") {\n decision = Promise.resolve({ engineHome: \"shared-worker\", swInstanceId: crypto.randomUUID() });\n } else {\n opfsGrantedForSharedHome = true;\n decision = decide();\n }\n void decision.then((result) => {\n placement = result;\n // `shared-worker` ⇒ the engine boots in-scope: holding OPFS access on a GRANTED probe, or on IDBFS with a\n // `storageFallbackReason` when the decision is a capability-absence fallback (or the declared idbfs mode,\n // no reason). `elected-worker` ⇒ router-only, no in-scope grant (each tab's elected DEDICATED engine\n // probes its own scope). Thread grant + home + fallback reason, open the boot gate.\n const isSharedFallback = result.engineHome === \"shared-worker\" && result.storageFallbackReason !== undefined;\n deps.onPlacement?.({\n engineHome: result.engineHome,\n opfsGranted: result.engineHome === \"shared-worker\" && opfsGrantedForSharedHome && !isSharedFallback,\n ...(isSharedFallback ? { storageFallbackReason: result.storageFallbackReason } : {}),\n });\n if (result.engineHome === \"elected-worker\") {\n router = createEngineRouter({\n swInstanceId: result.swInstanceId,\n ...(deps.executionLimit ? { executionLimit: deps.executionLimit } : {}),\n });\n }\n // Drain: route every DECLARED port first (the engine listener must exist before the tab's next message),\n // THEN answer its queued meta queries — the conforming tab only sends engine-bound traffic after the\n // placement reply, so this ordering closes the gap by construction. Queued declared-port traffic (a\n // reconnect's attach, a reconstruction's announce) redelivers LAST, onto the fully-routed port.\n for (const [port, state] of portStates) {\n if (state.declared) routePort(port, state);\n for (const queued of state.queuedQueries) {\n if (isPlacementQuery(queued)) answerPlacementQuery(port);\n else port.postMessage({ [DESTROY_VERDICT_KEY]: { peers: currentPeerCount() } });\n }\n state.queuedQueries.length = 0;\n const traffic = state.queuedTraffic.splice(0);\n for (const entry of traffic) redeliver(port, entry);\n }\n });\n }\n\n // ADR-0050: a registry-attached static declaration is authoritative — bind it and decide at scope startup,\n // no wait. (A registry-silent scope binds off the first declaration message instead; see handleDeclaration.)\n if (deps.staticStorage !== undefined) {\n boundDeclaration = resolveStorageDeclaration(deps.staticStorage, undefined);\n startDecision(boundDeclaration.backend);\n }\n\n scope.onconnect = (event: SharedWorkerConnectEvent) => {\n const port = event.ports[0];\n if (!port) return;\n // Start every port immediately under the live meta listener (ADR-0050): the declaration message that\n // unblocks the deferred placement decision arrives here, so the old buffer-unstarted-until-placement gate\n // is structurally impossible now. Engine routing is still gated — per port — on declared + resolved.\n const state: BootstrapPortState = { declared: false, routed: false, queuedQueries: [], queuedTraffic: [] };\n portStates.set(port, state);\n installPortListener(port, state);\n };\n}\n",
50
50
  "// The ELECTION COORDINATOR (ADR-0049 step 8): the TAB-SIDE, one-per-tab-per-store owner of leader\n// participation — the \"election coordinator\" of CONTEXT.md § \"Language — engine placement\". Exactly one lives\n// per tab per store; both pre-attach provisioning and attach flow through it so a tab NEVER queues behind\n// itself on the leader lock (invariant 2). It owns:\n// - the LEADER LOCK claim lifecycle (claim-counted: first claim queues the lock ONCE; last-claim release\n// retires the engine and settles the lock),\n// - the GRANT DUTIES on election (leader-granted → spawn the elected engine worker → engine-announce),\n// - the LEADER KEEPALIVE (the ONE standing timer) with SharedWorker reconstruction on missed acks,\n// - engine-loss handling (reported worker error → respawn; the router's execution-limit verdict →\n// deliberate terminate → VFS ownership release → respawn), and\n// - the BFCache release/reclaim hooks.\n//\n// It is fully IO-injected — `navigator.locks`, the engine-worker spawner, the control-channel factory, the SW\n// bridge port, timers, and the page-lifecycle subscription are all deps — so the whole contract is unit-\n// testable with no real worker, no real `navigator.locks`, and no real sleeps (the same discipline the router\n// and `engine-control.ts` follow). It speaks the SAME namespaced control envelope the router does\n// (`{ [ENGINE_CONTROL_ENVELOPE_KEY]: <EngineControlMessage> }`, `pgx0049`), so it coexists with the data-path\n// bridge (`protocol.ts`) untouched.\n//\n// WIRE NOTES (envelope-shape choices this step pins down):\n// - IDENTITY LEARNING. The router's `announceEngine` mints the engine identity SW-side; the tab learns it\n// from the next identity-tagged fan-out it observes (`engine-ready` / `connect-port`). That learned\n// identity tags the retirement notice + teardown and gates the execution-limit verdict.\n// - KEEPALIVE IDENTITY. The leader keepalive is a liveness check of the SharedWorker ITSELF, not of any\n// engine, so its `control-ping` carries a coordinator-local nonce identity ({@link KEEPALIVE_IDENTITY}) and\n// acks are matched by `pingId` ALONE (the router echoes the ping's identity verbatim). No magic sentinel\n// is compared — the identity field is deliberately irrelevant here.\n// - TEARDOWN ACK. The teardown handshake awaits a `control-ack` carrying the RETIRING engine's identity (the\n// same identity stamped on the `engine-teardown`). The keepalive is stopped at the START of retirement, so\n// no keepalive ack competes; when the identity was never learned the teardown uses a placeholder and any\n// `control-ack` settles it. Either way the `teardownAckTimeoutMs` timer guarantees completion.\n\nimport { storeIdentityComponent } from \"../store-path\";\nimport {\n engineIdentityEquals,\n type EngineControlMessage,\n type EngineIdentity,\n readControlEnvelope as readEnvelope,\n wrapControlEnvelope as envelope,\n} from \"./engine-control\";\n\n/** The prefix every per-store leader lock name carries (CONTEXT \"Leader lock\"). */\nexport const LEADER_LOCK_PREFIX = \"pgx-leader-\";\n\n/**\n * The per-store leader-lock name: {@link LEADER_LOCK_PREFIX} + the injective store-identity component (D11,\n * invariant 10). Using {@link storeIdentityComponent} keeps the lock name on the SAME one canonical encoding as\n * every other browser-side identity surface (OPFS namespaces, the meta record key, the SharedWorker name), so\n * two distinct store paths can never collapse to one lock (e.g. `\"foo/bar\"` → `pgx-leader-foo%2Fbar`).\n */\nexport function leaderLockName(storePath: string): string {\n return LEADER_LOCK_PREFIX + storeIdentityComponent(storePath);\n}\n\n/** A minimal MessagePort-shaped end — only ever TRANSFERRED across the SW bridge, never called on here. */\ntype ControlChannel = { port1: unknown; port2: unknown };\n\n/** The tab's SW bridge port (control plane): where the coordinator posts `pgx0049` envelopes and reads acks. */\nexport interface SwBridgePort {\n postMessage(message: unknown, transfer?: unknown[]): void;\n addEventListener(type: \"message\", listener: (event: { data: unknown }) => void): void;\n removeEventListener(type: \"message\", listener: (event: { data: unknown }) => void): void;\n}\n\nexport interface CoordinatorDeps {\n /** navigator.locks-shaped, injectable: `request(name, {signal}, callback)` — the callback's returned promise\n HOLDS the lock; resolving it releases the lock, aborting the signal cancels a still-queued request. */\n locks: {\n request(name: string, options: { signal?: AbortSignal }, callback: () => Promise<void>): Promise<void>;\n };\n /** Spawn the elected engine worker; returns a handle with `terminate()` and an error-event subscription. */\n spawnEngineWorker: () => { terminate(): void; onError(listener: (message: string) => void): void };\n /** Create the engine control MessageChannel; default `() => new MessageChannel()` — injectable so tests see\n both ends. The ROUTER end (`port1`) is transferred to the SharedWorker via `engine-announce`; the ENGINE\n end (`port2`) is wired to the elected engine worker in step 9. */\n createControlChannel?: () => ControlChannel;\n /** The tab's SW bridge port (control plane): the coordinator posts `pgx0049` envelopes (leader-granted,\n engine-announce with the transferred control port, engine-retiring, engine-teardown, control-ping) and\n receives control-acks + relocation notices on it. */\n swPort: SwBridgePort;\n /** Reconstruct the SharedWorker via the attach worker FACTORY (ADR-0049 D5) → the NEW swPort. Absent only for a\n bare-instance attach input, where a SharedWorker cannot be rebuilt from itself: keepalive recovery is then\n structurally unavailable (the still-live engine + grant are untouched; recovery narrows to leader-op-or-reload). */\n reconstructSw?: () => SwBridgePort;\n /** Await the VFS ownership release after a deliberate terminate (step 10 wires the real wait; tests fake it). */\n awaitOwnershipRelease: () => Promise<void>;\n timers: { setTimeout(fn: () => void, ms: number): unknown; clearTimeout(handle: unknown): void };\n /** Page-lifecycle subscription seam (BFCache): `pagehide`/`pageshow`; injectable. */\n pageLifecycle?: { onPageHide(listener: (persisted: boolean) => void): void; onPageShow(listener: () => void): void };\n}\n\nexport interface ElectionCoordinatorOptions {\n storePath: string;\n /** ms between leader-keepalive pings (default 20000). */\n keepaliveIntervalMs?: number;\n /** consecutive unanswered keepalive pings before SharedWorker reconstruction (default 2). */\n keepaliveMissThreshold?: number;\n /** ms to wait for the teardown ack before terminating anyway (default 3000). */\n teardownAckTimeoutMs?: number;\n}\n\nexport interface ElectionCoordinator {\n /** Claim for a pre-attach provision (optionally expiry-bounded — an abandoned warmed provision retires\n itself when the timer fires). Returns an idempotent release fn (invariant 2). */\n claimForProvision(opts?: { expiryMs?: number }): () => void;\n /** Claim for one attachment. Returns an idempotent release fn (invariant 2). */\n claimForAttach(): () => void;\n /** True while this tab holds the granted leader lock. */\n isLeader(): boolean;\n /** True while an elected engine worker handle is held. */\n hasEngine(): boolean;\n /**\n * Deliberately RETIRE this tab's elected engine and resolve once its teardown handshake has completed — the\n * point at which the engine's EXCLUSIVE OPFS sync-access handle is provably released (ADR-0049 D8). The\n * destroy supervisor awaits this BEFORE deleting the backend store so `deleteBackendStore` never races the\n * engine's async handle release (which surfaced as `NoModificationAllowedError`). Runs the retirement notice →\n * `engine-teardown` → ack/timeout → terminate → lock-settle sequence, then awaits the ownership-release seam.\n * A no-op (resolves at once) when this tab holds no engine (not the leader). Idempotent.\n */\n retireEngine(): Promise<void>;\n}\n\n/** The keepalive's nonce identity: the ping probes the SharedWorker's liveness, NOT an engine — acks are\n matched by `pingId` alone, so this identity is deliberately never compared for staleness. */\nconst KEEPALIVE_IDENTITY: EngineIdentity = { swInstanceId: \"keepalive\", generation: 0 };\n\n/** The identity a retirement uses when the engine identity was never learned (no fan-out observed yet). The\n notice/teardown still fire so the attach side opens its handoff window; there is at most one engine under a\n grant, so identity precision is unnecessary. */\nconst RETIRE_UNKNOWN_IDENTITY: EngineIdentity = { swInstanceId: \"\", generation: -1 };\n\ntype LockState = \"idle\" | \"queued\" | \"granted\";\n\ninterface EngineHandle {\n terminate(): void;\n onError(listener: (message: string) => void): void;\n}\n\ninterface TeardownWait {\n identity: EngineIdentity;\n finish: () => void;\n}\n\nexport function createElectionCoordinator(\n deps: CoordinatorDeps,\n options: ElectionCoordinatorOptions,\n): ElectionCoordinator {\n const lockName = leaderLockName(options.storePath);\n const keepaliveIntervalMs = options.keepaliveIntervalMs ?? 20000;\n const keepaliveMissThreshold = options.keepaliveMissThreshold ?? 2;\n const teardownAckTimeoutMs = options.teardownAckTimeoutMs ?? 3000;\n const createControlChannel = deps.createControlChannel ?? (() => new MessageChannel() as unknown as ControlChannel);\n\n // ── claim + lock lifecycle ──\n let claimCount = 0;\n let lockState: LockState = \"idle\";\n let abortController: AbortController | undefined;\n let grantSettle: (() => void) | undefined; // resolving this releases the held lock\n\n // ── SW bridge + engine state ──\n let swPort = deps.swPort;\n let engineHandle: EngineHandle | undefined;\n let currentIdentity: EngineIdentity | undefined;\n let retiring = false;\n let teardownWait: TeardownWait | undefined;\n let bfcacheSuspended = false;\n\n // ── keepalive state (the one standing timer) ──\n let keepaliveHandle: unknown;\n let keepaliveMisses = 0;\n let pendingKeepalivePingId: number | undefined;\n let pingSeq = 0;\n\n function post(message: EngineControlMessage, transfer?: unknown[]): void {\n swPort.postMessage(envelope(message), transfer);\n }\n\n // ─── SW bridge inbound ──────────────────────────────────────────────────────\n const onSwMessage = (event: { data: unknown }): void => {\n const message = readEnvelope(event.data);\n if (message !== undefined) handleControlMessage(message);\n };\n function attachSwListener(): void {\n swPort.addEventListener(\"message\", onSwMessage);\n }\n function detachSwListener(): void {\n swPort.removeEventListener(\"message\", onSwMessage);\n }\n\n function handleControlMessage(message: EngineControlMessage): void {\n switch (message.type) {\n case \"control-ack\":\n // Teardown ack (matches the retiring engine's identity) settles the teardown wait; keepalive is\n // stopped during retirement, so no keepalive ack competes. Otherwise it is a keepalive ack —\n // identity-irrelevant, matched by pingId only.\n if (teardownWait !== undefined && teardownAckMatches(message.identity)) {\n teardownWait.finish();\n return;\n }\n if (message.pingId === pendingKeepalivePingId) {\n keepaliveMisses = 0;\n pendingKeepalivePingId = undefined;\n }\n return;\n case \"engine-retiring\":\n // The router's execution-limit verdict for OUR current engine (tagged with the retired identity).\n if (isLeader() && currentIdentity !== undefined && engineIdentityEquals(currentIdentity, message.identity)) {\n void onExecutionLimitVerdict();\n }\n return;\n case \"engine-ready\":\n case \"connect-port\":\n // The identity-tagged fan-out that teaches the coordinator its current engine identity.\n currentIdentity = message.identity;\n return;\n default:\n // leader-granted / engine-announce are outbound-only from the tab; control-ping / overdue-dispatch\n // are never received here. Nothing to apply.\n return;\n }\n }\n\n function teardownAckMatches(acked: EngineIdentity): boolean {\n if (teardownWait === undefined) return false;\n // Identity never learned → the teardown carried the placeholder; accept any ack (no other ack source\n // once keepalive is stopped).\n if (engineIdentityEquals(teardownWait.identity, RETIRE_UNKNOWN_IDENTITY)) return true;\n return engineIdentityEquals(teardownWait.identity, acked);\n }\n\n // ─── lock lifecycle ─────────────────────────────────────────────────────────\n function queueLock(): void {\n if (lockState !== \"idle\") return;\n lockState = \"queued\";\n const controller = new AbortController();\n abortController = controller;\n const callback = (): Promise<void> =>\n new Promise<void>((resolve) => {\n abortController = undefined;\n lockState = \"granted\";\n grantSettle = resolve;\n // Queue→grant race: every claim vanished while queued — settle immediately, never spawn an engine.\n if (claimCount === 0) {\n settleGrant();\n return;\n }\n onGranted();\n });\n void deps.locks.request(lockName, { signal: controller.signal }, callback);\n }\n\n function settleGrant(): void {\n const resolve = grantSettle;\n grantSettle = undefined;\n lockState = \"idle\";\n resolve?.();\n }\n\n function addClaim(): () => void {\n claimCount += 1;\n if (claimCount === 1) queueLock();\n let released = false;\n return () => {\n if (released) return;\n released = true;\n releaseClaim();\n };\n }\n\n function releaseClaim(): void {\n if (claimCount === 0) return;\n claimCount -= 1;\n if (claimCount > 0) return;\n if (lockState === \"queued\") {\n // Queued non-leader: cancel the pending request via its AbortSignal (fault row \"queued non-leaders\n // cancel via AbortSignal\").\n abortController?.abort();\n abortController = undefined;\n lockState = \"idle\";\n } else if (lockState === \"granted\") {\n void runRetirement();\n }\n }\n\n // ─── grant duties ───────────────────────────────────────────────────────────\n function onGranted(): void {\n // leader-granted FIRST — it opens the router's handoff window pre-spawn (the attach side queues new calls).\n post({ type: \"leader-granted\" });\n spawnEngine();\n announce();\n startKeepalive();\n }\n\n function spawnEngine(): void {\n engineHandle = deps.spawnEngineWorker();\n engineHandle.onError((message) => onEngineError(message));\n }\n\n function announce(): void {\n // Fresh control channel every announce: the ROUTER end (port1) is transferred to the SharedWorker (→\n // router.announceEngine); the ENGINE end (port2) is wired to the elected engine worker in step 9.\n const channel = createControlChannel();\n post({ type: \"engine-announce\" }, [channel.port1]);\n }\n\n // ─── the single leader keepalive ────────────────────────────────────────────\n function startKeepalive(): void {\n keepaliveMisses = 0;\n pendingKeepalivePingId = undefined;\n scheduleKeepalive();\n }\n\n function scheduleKeepalive(): void {\n keepaliveHandle = deps.timers.setTimeout(() => {\n keepaliveHandle = undefined;\n const pingId = ++pingSeq;\n pendingKeepalivePingId = pingId;\n post({ type: \"control-ping\", identity: KEEPALIVE_IDENTITY, pingId });\n keepaliveMisses += 1;\n if (keepaliveMisses >= keepaliveMissThreshold) {\n onKeepaliveThreshold();\n } else {\n scheduleKeepalive();\n }\n }, keepaliveIntervalMs);\n }\n\n function stopKeepalive(): void {\n if (keepaliveHandle !== undefined) {\n deps.timers.clearTimeout(keepaliveHandle);\n keepaliveHandle = undefined;\n }\n keepaliveMisses = 0;\n pendingKeepalivePingId = undefined;\n }\n\n function onKeepaliveThreshold(): void {\n stopKeepalive();\n if (deps.reconstructSw === undefined) {\n // A bare-instance attach input has no factory to rebuild the SharedWorker from, so keepalive recovery is\n // structurally unavailable here: stop the keepalive and do nothing else (the still-live engine + grant are\n // untouched — recovery narrows to a leader op or a page reload). A factory input never reaches this branch.\n return;\n }\n // SharedWorker-death recovery is the LOCK HOLDER's causal duty: reconstruct via the factory, move the\n // control plane to the new port, re-announce the still-live engine (a fresh control channel), and resume.\n detachSwListener();\n swPort = deps.reconstructSw();\n attachSwListener();\n announce();\n startKeepalive();\n }\n\n // ─── engine loss ────────────────────────────────────────────────────────────\n function onEngineError(_message: string): void {\n if (!isLeader()) return;\n // Reported worker death: respawn under the SAME grant (respawn, not re-queue — the leader lock is still\n // held; failover cost is one cold engine boot, ADR D3).\n engineHandle?.terminate();\n currentIdentity = undefined;\n spawnEngine();\n announce();\n }\n\n async function onExecutionLimitVerdict(): Promise<void> {\n // The router's execution-limit verdict: DELIBERATE termination (idempotent) → await the VFS ownership\n // release that agent termination guarantees → respawn under the still-held grant (ADR D5).\n engineHandle?.terminate();\n engineHandle = undefined;\n currentIdentity = undefined;\n await deps.awaitOwnershipRelease();\n if (!isLeader()) return; // the grant may have been released while awaiting\n spawnEngine();\n announce();\n }\n\n // ─── deliberate retirement (last-claim / BFCache) ───────────────────────────\n async function runRetirement(): Promise<void> {\n if (retiring) return;\n retiring = true;\n const identity = currentIdentity ?? RETIRE_UNKNOWN_IDENTITY;\n // Stop the keepalive FIRST so no keepalive ack competes with the teardown ack.\n stopKeepalive();\n // The retirement notice PRECEDES the teardown — the attach side opens its handoff window and queues new\n // calls before the engine goes (ADR D5, \"deliberate retirement opens the window first\").\n post({ type: \"engine-retiring\", identity });\n post({ type: \"engine-teardown\", identity });\n await awaitTeardownAck(identity);\n engineHandle?.terminate();\n engineHandle = undefined;\n currentIdentity = undefined;\n retiring = false;\n settleGrant(); // resolve the lock-holding promise → release the leader lock\n }\n\n function awaitTeardownAck(identity: EngineIdentity): Promise<void> {\n return new Promise<void>((resolve) => {\n const finish = (): void => {\n if (teardownWait === undefined) return;\n teardownWait = undefined;\n deps.timers.clearTimeout(timeoutHandle);\n resolve();\n };\n const timeoutHandle = deps.timers.setTimeout(finish, teardownAckTimeoutMs);\n teardownWait = { identity, finish };\n });\n }\n\n // ─── BFCache hooks ──────────────────────────────────────────────────────────\n deps.pageLifecycle?.onPageHide((persisted) => {\n // Persisted freeze (BFCache entry, D2): release leader authority + retire the engine, but PRESERVE the\n // claim count so pageshow can re-queue. A non-persisted pagehide is ordinary navigation — the lock is\n // released structurally on agent teardown, nothing special here.\n if (persisted && lockState === \"granted\") {\n bfcacheSuspended = true;\n void runRetirement();\n }\n });\n deps.pageLifecycle?.onPageShow(() => {\n if (!bfcacheSuspended) return;\n bfcacheSuspended = false;\n // Claims were never decremented across the freeze, so a surviving claim re-queues the leader lock.\n if (claimCount > 0) queueLock();\n });\n\n attachSwListener();\n\n function isLeader(): boolean {\n return lockState === \"granted\";\n }\n\n return {\n claimForProvision(opts) {\n const release = addClaim();\n if (opts?.expiryMs === undefined) return release;\n // Abandoned warmed provision (D2): auto-release this claim when the expiry fires (which, if it is the\n // last claim while granted, runs the retirement sequence).\n const handle = deps.timers.setTimeout(() => release(), opts.expiryMs);\n return () => {\n deps.timers.clearTimeout(handle);\n release();\n };\n },\n claimForAttach() {\n return addClaim();\n },\n isLeader,\n hasEngine() {\n return engineHandle !== undefined;\n },\n async retireEngine() {\n // Nothing to retire when this tab holds no engine (not the leader): the store's OPFS handle, if any, is\n // held by another tab's engine — the peer-refusal gate already covered that (destroy refuses with peers).\n if (!isLeader() || engineHandle === undefined) return;\n // Run the graceful retirement (notice → teardown → ack/timeout → terminate → lock settle); `runRetirement`\n // awaits the teardown ack (the release point) before terminating. Then await the ownership-release seam so\n // a consumer/test can gate on the agent actually dropping the exclusive handle (default: resolved).\n await runRetirement();\n await deps.awaitOwnershipRelease();\n },\n };\n}\n",
51
- "// The tab facade (ADR-0032 S2, decisions 3/4/6/7). `attachSyncClient` returns the SAME client shape as\n// `createSyncClient` wherever semantics allow — the write API (RPC-backed), per-group readiness, the\n// live-rows seam, `ready`/`status`/`stop` — transparently proxied to the one shared worker engine. The tab\n// stays the single auth owner: it pushes its token at attach and on `notifyAuthChanged`, and answers the\n// worker's expiry pull-requests via `getToken`.\n//\n// One-shot Drizzle reads (`query`/`queryRow`/`queryRaw`/`queryRawRow`) ARE proxied (ADR-0032 decision 4):\n// `drizzle`/`views` here are a real Drizzle database over a bridge executor whose `query` routes each read to\n// the worker's `guardedQuery` RPC, so awaiting a builder runs the ADR-0041 read gate + the ADR-0021\n// lazy-group guard worker-side and Drizzle's own result mapping (relational/nested included) runs on the tab.\n// `ensureSynced` (async lazy-activation) is a plain RPC to the shared engine. The only members that stay\n// unsupported are the genuinely tab-local ones — `pglite` (no local store), `destroy`/`dropReadCache` (store\n// lifecycle the worker owns), and `isSynced` (a SYNCHRONOUS activation-STARTED peek the tab's cached per-group\n// catch-up readiness cannot answer, and a sync method cannot be an RPC) — each throwing a clear error saying why.\n\nimport type { Results } from \"@electric-sql/pglite\";\n\nimport type {\n MutationDiagnostics,\n SyncRuntimeStatus,\n SyncStorageDeclaration,\n SyncTableName,\n SyncTableRegistry,\n WriteMode,\n} from \"@pgxsinkit/contracts\";\nimport { StorageDeclarationRefusedError } from \"@pgxsinkit/contracts\";\n\nimport type { BootReport } from \"../boot-report\";\nimport type { DataExportOptions, DataExportResult } from \"../export-data\";\nimport type { DiagnosticExportOptions, DiagnosticExportResult } from \"../export-dump\";\nimport type { StoreExportOptions, StoreExportResult } from \"../export-store\";\nimport {\n buildRegistryReadHandles,\n type ClientPGlite,\n ClientDisposedError,\n createMutationsApi,\n type LiveQueryDiagnostics,\n type LiveRowsSubscription,\n type MutationBatchItem,\n type MutationDetail,\n type SubscribeLiveRowsInput,\n type SyncClient,\n type SyncTransaction,\n type SyncTransactionResult,\n} from \"../index\";\nimport type { LocalStoreVersionEvent } from \"../local-store\";\nimport { createOpfsEffects, type OpfsEffectsDeps } from \"../opfs-effects\";\nimport { type DestructionEffects, runDestruction } from \"../store-lifecycle\";\nimport { deleteStoreMetaRecord, type StoreMetaDeps, writeStoreMetaRecord } from \"../store-meta\";\nimport { storeIndexedDbDatabaseName } from \"../store-path\";\nimport { readTestStoreMarker } from \"../store-path\";\nimport {\n CONTROL_PORT_DELIVERY_KEY,\n DECLARATION_KEY,\n DECLARATION_REFUSED_KEY,\n type DeclarationRefusedWire,\n DESTROY_QUERY_KEY,\n DESTROY_VERDICT_KEY,\n PLACEMENT_RESULT_KEY,\n type PlacementQueryResult,\n PLACEMENT_QUERY_KEY,\n} from \"./define-sync-worker\";\nimport {\n type CoordinatorDeps,\n createElectionCoordinator,\n type ElectionCoordinator,\n type SwBridgePort,\n} from \"./election-coordinator\";\nimport {\n type EngineControlMessage,\n engineIdentityEquals,\n type EngineIdentity,\n EngineRelocatedError,\n engineRelocatedFromWire,\n executionLimitMismatchFromWire,\n type ExecutionLimitConfig,\n isStaleIdentity,\n readControlEnvelope,\n wrapControlEnvelope,\n} from \"./engine-control\";\nimport { LiveRowsMaterializer } from \"./live-diff\";\nimport {\n type AttachAckPayload,\n type AttachPayload,\n type AuthTokenSnapshot,\n type BridgeCodec,\n type BridgeEvent,\n type BridgePort,\n type BridgeTransferable,\n type ExportArtefactWire,\n type GuardedQueryWireArgs,\n identityCodec,\n type BridgeErrorWire,\n isBridgeEnvelope,\n type LiveDiffPayload,\n type LiveHydratedPayload,\n type LiveInitialPayload,\n postBridgeMessage,\n type ProvisionAckPayload,\n type RestoreArtefactWire,\n type RpcOp,\n type RpcResultPayload,\n type TokenRequestPayload,\n} from \"./protocol\";\n\n/** A `Worker`/`SharedWorker`-shaped handle: a dedicated `Worker` IS the port; a `SharedWorker` carries `.port`. */\ninterface WorkerLike {\n port?: BridgePort;\n postMessage?: (message: unknown, transfer?: BridgeTransferable[]) => void;\n addEventListener?: (\n type: \"message\" | \"error\",\n listener: (event: { data?: unknown; message?: unknown }) => void,\n ) => void;\n removeEventListener?: (\n type: \"message\" | \"error\",\n listener: (event: { data?: unknown; message?: unknown }) => void,\n ) => void;\n terminate?: () => void;\n}\n\n/**\n * The elected engine worker handle the election coordinator drives (ADR-0049 D5, step 8): `terminate()` (a\n * deliberate teardown / respawn), `onError` (a reported worker death → immediate respawn), and\n * `deliverControlPort` (post the engine end of the announce control channel — `{ [CONTROL_PORT_DELIVERY_KEY]:\n * true }` with the port transferred — so the elected worker's step-9 control plane starts on it). The consumer\n * supplies a factory that constructs their own `defineSyncWorker` entry as a dedicated `Worker`; wrap it with\n * {@link wrapEngineWorker}.\n */\nexport interface ElectedEngineWorker {\n terminate(): void;\n onError(listener: (message: string) => void): void;\n deliverControlPort(port: unknown): void;\n}\n\n/**\n * Wrap a dedicated `Worker` (a consumer's `defineSyncWorker` engine entry) into the {@link ElectedEngineWorker}\n * the coordinator drives (ADR-0049 step 10b). `deliverControlPort` posts `{ [CONTROL_PORT_DELIVERY_KEY]: true }`\n * on the worker's implicit port with the control-channel end TRANSFERRED — exactly the delivery message the\n * step-9 engine control plane listens for. `onError` subscribes to the worker's `error` event; `terminate`\n * forwards to `worker.terminate()`.\n */\n/**\n * The default {@link AttachSyncClientOptions.awaitOwnershipRelease} — a documented NO-OP (ADR-0049 step 11b\n * follow-up 1). The OPFS-repacked VFS enforces single-owner access with EXCLUSIVE OPFS sync-access handles\n * (`StoreOwnedError`), not a Web Lock, so there is no ownership lock to await from here without importing the\n * VFS. The bounded wait for the dead worker's agent to release the handle lives entirely in the SUCCESSOR'S OPEN\n * PATH: the respawned engine's `createOpfsRepacked` open retries on the owned-store contention error until it\n * clears (the `openWithBoundedRetries` wrapper) — the fault-matrix \"successor open retries on contention\" row.\n * So the coordinator can respawn immediately after a deliberate terminate; its VFS open is the real gate.\n */\nexport function resolvedOwnershipRelease(): Promise<void> {\n return Promise.resolve();\n}\n\nexport function wrapEngineWorker(worker: WorkerLike): ElectedEngineWorker {\n const post = (message: unknown, transfer: BridgeTransferable[]): void => {\n if (worker.postMessage) worker.postMessage(message, transfer);\n else worker.port?.postMessage(message, transfer);\n };\n return {\n terminate: () => worker.terminate?.(),\n onError: (listener) => {\n worker.addEventListener?.(\"error\", (event) => {\n const message = (event as { message?: unknown }).message;\n listener(typeof message === \"string\" ? message : \"elected engine worker error\");\n });\n },\n deliverControlPort: (port) => post({ [CONTROL_PORT_DELIVERY_KEY]: true }, [port as BridgeTransferable]),\n };\n}\n\n/**\n * `destroy()` on an attached facade REFUSES when other tabs still hold the store (ADR-0049 D8, plan fault row\n * \"`destroy()` with peers attached → refused with a typed error — close peers first\"). The SharedWorker — the\n * only role that knows the attached-tab count — answers a peer-count query; more than one attached tab (this\n * one plus at least one other) raises this. `peers` is the total attached-tab count, this tab included.\n */\nexport class StoreDestroyRefusedError extends Error {\n readonly peers: number;\n constructor(peers: number) {\n super(\n `[pgxsinkit] destroy() refused: ${Math.max(0, peers - 1)} other tab(s) are still attached to this store. ` +\n \"Close the peer tabs first, then destroy — the store is shared and destroying it under a live peer would \" +\n \"strand that tab's engine.\",\n );\n this.name = \"StoreDestroyRefusedError\";\n this.peers = peers;\n }\n}\n\n/**\n * Attach WIRING failure (ADR-0049 D1/D5): the SharedWorker requires election (a router-only, handle-denied home)\n * but the elected engine worker CANNOT be constructed — neither a `createEngineWorker` override was supplied NOR is\n * the SharedWorker's own script URL derivable (a plain scope that cannot report `self.location.href`, or a\n * non-module entry). Capability absence FALLS BACK (idbfs); a wiring failure ERRORS — the capability was present and\n * the configuration was wrong, and silently downgrading storage would hide the defect. `[pgxsinkit]`-prefixed like\n * the repo's other typed errors so a consumer can `instanceof`-branch it.\n */\nexport class ElectedEngineUnconstructibleError extends Error {\n constructor(detail: string) {\n super(\n `[pgxsinkit] cannot attach: this SharedWorker is router-only (election required) but the elected engine ` +\n `worker cannot be constructed — ${detail}. Pass a \\`createEngineWorker\\` override for entries that cannot ` +\n `be reconstructed from their URL as a module worker (classic-script / blob: / data: / CSP-constrained), ` +\n `or use a SharedWorker whose script URL is derivable (ADR-0049 D5). This is a wiring defect, not a ` +\n `capability fallback — the platform can hold sync-access handles here.`,\n );\n this.name = \"ElectedEngineUnconstructibleError\";\n }\n}\n\n/** The minimal `indexedDB.deleteDatabase` surface (no DOM lib) — mirrors `store-boot.ts`'s idb delete seam. */\ninterface IdbDeleteSurface {\n deleteDatabase(name: string): {\n error?: unknown;\n onsuccess: (() => void) | null;\n onerror: (() => void) | null;\n onblocked?: (() => void) | null;\n };\n}\n\n/** Resolve the `deleteDatabase` surface: injected meta deps first (tests), else structural off `globalThis`. */\nfunction resolveIdbDeleteSurface(meta?: StoreMetaDeps): IdbDeleteSurface | undefined {\n if (meta != null && \"indexedDB\" in meta) return meta.indexedDB as unknown as IdbDeleteSurface | undefined;\n return (globalThis as { indexedDB?: IdbDeleteSurface }).indexedDB;\n}\n\n/** Delete-if-present the store's PGlite idb database; only `onsuccess` proves completion. */\nfunction deleteStoreIdbDatabase(storePath: string, meta?: StoreMetaDeps): Promise<void> {\n const idb = resolveIdbDeleteSurface(meta);\n if (idb?.deleteDatabase == null) return Promise.resolve();\n const name = storeIndexedDbDatabaseName(storePath);\n return new Promise<void>((resolve, reject) => {\n let settled = false;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n const finish = (error?: unknown) => {\n if (settled) return;\n settled = true;\n if (timeout !== undefined) clearTimeout(timeout);\n if (error === undefined) resolve();\n else reject(error);\n };\n let request: {\n error?: unknown;\n onsuccess: (() => void) | null;\n onerror: (() => void) | null;\n onblocked?: (() => void) | null;\n };\n try {\n request = idb.deleteDatabase(name);\n } catch (error) {\n finish(error);\n return;\n }\n request.onsuccess = () => finish();\n request.onerror = () => finish(request.error ?? new Error(`indexedDB deletion failed for ${name}`));\n request.onblocked = () => undefined;\n timeout = setTimeout(() => finish(new Error(`indexedDB deletion timed out while blocked for ${name}`)), 5_000);\n });\n}\n\n/**\n * Build the REAL {@link DestructionEffects} for a store — the OPFS commitment sentinel + store directory\n * (`opfs-effects.ts`), the meta record (`store-meta.ts`), and the PGlite idb database. The destruction machine is\n * backend-agnostic (`store-lifecycle.ts`): `deleteBackendStore` delete-if-presents BOTH the OPFS directory and\n * the idb database, so it works whichever backend the store used. Injectable IO (`opfs`/`meta`) so the wiring is\n * unit-testable with fakes.\n */\nexport function createStoreDestructionEffects(\n storePath: string,\n deps?: { opfs?: OpfsEffectsDeps; meta?: StoreMetaDeps },\n): DestructionEffects {\n const opfs = createOpfsEffects(storePath, deps?.opfs);\n const meta = deps?.meta;\n return {\n setPhase: (phase) => writeStoreMetaRecord(storePath, { phase, updatedAt: Date.now() }, meta),\n deleteSentinel: () => opfs.deleteSentinel(),\n deleteBackendStore: async () => {\n await opfs.deleteStoreDirectory();\n await deleteStoreIdbDatabase(storePath, meta);\n },\n deleteMetaRecord: () => deleteStoreMetaRecord(storePath, meta),\n };\n}\n\n/**\n * Destroy every local artifact of a store BY PATH (ADR-0050 stage 2; the public face of the ADR-0049 D8\n * destruction machinery): the OPFS store directory, the commitment sentinel, the meta record, AND the idb\n * database — backend-agnostic (delete-if-present on both backends), with the bounded VFS-ownership-lag retry.\n *\n * **Precondition: the store is NOT running.** This is the companion to {@link SyncClient.destroy} (the\n * supervised destroy of an ATTACHED store — peer-checked, teardown-acknowledged): reach for\n * `destroyStoreArtifacts` for a store nobody is attached to — an obsolete path a preference change left\n * behind, a wipe of known store paths. Called on a path a live engine still holds, the backend delete throws\n * an ownership error after the bounded retry — loud, and safely RE-RUNNABLE: the destruction sequence is\n * idempotent and phase-recorded (a store whose meta record says `deleting` is refused for boot), so a re-run\n * completes it. No liveness probe is attempted here — it could not be race-free, and the ownership error\n * already fails hard; callers keep failed paths on their own retry list (e.g. the board's Obsolete stores).\n */\nexport function destroyStoreArtifacts(storePath: string, opts?: StoreDestructionRetryOptions): Promise<void> {\n return runStoreDestruction(createStoreDestructionEffects(storePath), opts);\n}\n\n/** Options for {@link quiesceStoreWorker} (ADR-0050). */\nexport interface StoreWorkerQuiesceOptions {\n /** The ADR-0050 storage declaration to post on the port. Omit (or `{}`) to state NO opinion — always\n * compatible with whatever declaration the live worker already bound, so it can never be refused. Passing a\n * concrete declaration risks a `StorageDeclarationRefusedError` if it disagrees with the bound one. */\n storage?: SyncStorageDeclaration;\n /** Bound on the whole handshake (declaration → placement reply → teardown ack). Default 6000ms. On timeout\n * the returned promise REJECTS — the caller keeps the path on its retry list; it is NOT proof of teardown. */\n timeoutMs?: number;\n /** Injectable timers (tests); defaults to real `setTimeout`/`clearTimeout`. */\n timers?: AttachClientTimers;\n}\n\n/** The outcome of {@link quiesceStoreWorker}. */\nexport interface StoreWorkerQuiesceOutcome {\n /** The store's engine home as reported by its placement reply. */\n engineHome: PlacementQueryResult[\"engineHome\"];\n /** True iff an SW-direct engine was torn down here (its host closed, releasing the backend connection).\n * `false` for an `elected-worker` home — there is no in-SharedWorker engine to close from this router-only\n * connection; the elected dedicated engine dies with its owning tab (the browser terminates it on document\n * teardown), releasing its store, so no active teardown is needed before a path-addressed destroy. */\n toreDown: boolean;\n}\n\n/**\n * Quiesce the SharedWorker HOSTING a store, by path, so its backend connection is released BEFORE a\n * {@link destroyStoreArtifacts} on the same path (ADR-0050). The gap it closes: the board's workers are\n * `extendedLifetime`, so a store's SharedWorker OUTLIVES the document that spawned it — and the idbfs backend\n * holds its IndexedDB connection open for the engine's whole life. So after a reload, an idbfs store's worker\n * is still alive and still holding the connection; `deleteDatabase` blocks and `destroyStoreArtifacts` fails,\n * boot after boot, until the browser eventually reaps the worker. OPFS releases its handles when idle, so it\n * never had this problem — this is the idbfs (SW-direct) fix.\n *\n * `worker` is a factory (or instance), exactly like {@link attachSyncClient}'s `worker` — the caller constructs\n * `new SharedWorker(url, { name: storePath })`, so the library stays DOM-free. Connecting by that name reaches\n * the LIVE worker (if any) or spawns a fresh one; either way the sequence is: post the declaration, query\n * placement, and — for a `shared-worker` home — send `engine-teardown` and await its reserved ack, which the\n * host posts only after `closeHost()` has stopped the engine and released the backend connection (it then\n * closes its own scope). An `elected-worker` home resolves immediately with `toreDown: false` (see the field).\n *\n * Idempotent and safe on an already-dead store: a fresh spawn boots no engine, and its teardown closes an empty\n * host. Compose it as `await quiesceStoreWorker(f).catch(() => {}); await destroyStoreArtifacts(path)` — a\n * quiesce failure (timeout) must NOT abort the destroy, whose own ownership-lag handling reports honestly and\n * leaves the path re-runnable.\n */\nexport function quiesceStoreWorker(\n worker: (() => WorkerLike) | WorkerLike,\n opts?: StoreWorkerQuiesceOptions,\n): Promise<StoreWorkerQuiesceOutcome> {\n const timers: AttachClientTimers = opts?.timers ?? {\n setTimeout: (fn, ms) => setTimeout(fn, ms),\n clearTimeout: (handle) => clearTimeout(handle as ReturnType<typeof setTimeout>),\n };\n const timeoutMs = opts?.timeoutMs ?? 6000;\n const port = resolvePort({ worker });\n return new Promise<StoreWorkerQuiesceOutcome>((resolve, reject) => {\n let settled = false;\n let teardownIdentity: EngineIdentity | undefined;\n const finish = (run: () => void): void => {\n if (settled) return;\n settled = true;\n timers.clearTimeout(timeout);\n port.removeEventListener(\"message\", listener);\n run();\n };\n const timeout = timers.setTimeout(\n () => finish(() => reject(new Error(`[pgxsinkit] quiesceStoreWorker timed out after ${timeoutMs}ms`))),\n timeoutMs,\n );\n const listener = (event: { data: unknown }): void => {\n const placement = readPlacementResult(event.data);\n if (placement !== undefined) {\n if (placement.engineHome !== \"shared-worker\") {\n finish(() => resolve({ engineHome: placement.engineHome, toreDown: false }));\n return;\n }\n // SW-direct: ask the in-scope host to quiesce+close, then await its reserved teardown ack (pingId -1),\n // which proves the engine stopped and the backend connection was released (define-sync-worker).\n teardownIdentity = { swInstanceId: placement.swInstanceId, generation: 0 };\n port.postMessage(wrapControlEnvelope({ type: \"engine-teardown\", identity: teardownIdentity }));\n return;\n }\n const refusal = readDeclarationRefusal(event.data);\n if (refusal !== undefined) {\n finish(() => reject(new StorageDeclarationRefusedError(refusal.message)));\n return;\n }\n const control = readControlEnvelope(event.data);\n if (\n control?.type === \"control-ack\" &&\n control.pingId === -1 &&\n teardownIdentity !== undefined &&\n control.identity?.swInstanceId === teardownIdentity.swInstanceId\n ) {\n if (control.error) {\n finish(() => reject(new Error(`[pgxsinkit] store-worker teardown failed: ${control.error?.message}`)));\n } else {\n finish(() => resolve({ engineHome: \"shared-worker\", toreDown: true }));\n }\n }\n };\n port.addEventListener(\"message\", listener);\n port.start?.();\n // Declaration FIRST (ADR-0050), then the placement query. If the worker's placement is still pending (a\n // fresh spawn), the queued-traffic path redelivers the follow-up teardown after routing (ADR-0050 W1).\n port.postMessage({ [DECLARATION_KEY]: opts?.storage ?? {} });\n port.postMessage({ [PLACEMENT_QUERY_KEY]: true });\n });\n}\n\n/** The bounded ownership-retry options for {@link runStoreDestruction} (the VFS-lock-lag guard, D8/fault row). */\nexport interface StoreDestructionRetryOptions {\n /** Max retries of `deleteBackendStore` on an ownership-lock-lag error before giving up (default 5). */\n maxOwnershipRetries?: number;\n /** Classify an error as VFS-ownership-lock lag (retryable). Default: OPFS `NoModificationAllowedError`-class. */\n isOwnershipError?: (error: unknown) => boolean;\n /** Between-retries delay; defaults to a real timer. Injected in tests. */\n delay?: (ms: number) => Promise<void>;\n /** The between-retries delay (ms); default 50. */\n retryDelayMs?: number;\n}\n\n/** Default ownership-lag classifier: OPFS raises `NoModificationAllowedError`/`InvalidStateError` while a sync-access handle is open. */\nfunction defaultIsOwnershipError(error: unknown): boolean {\n const name = (error as { name?: string } | null)?.name;\n if (name === \"NoModificationAllowedError\" || name === \"InvalidStateError\") return true;\n const message = (error as { message?: unknown } | null)?.message;\n const text = (typeof message === \"string\" ? message : \"\").toLowerCase();\n return text.includes(\"owned\") || text.includes(\"ownership\") || text.includes(\"locked\") || text.includes(\"in use\");\n}\n\n/**\n * Run the destructive lifecycle (ADR-0049 D8) with a BOUNDED ownership-lock-lag retry around the backend-store\n * delete. The engine was just detached, so its VFS ownership lock may not have cleared yet — the fault row\n * \"VFS ownership-lock release lag → successor retries until clear, bounded\" applies to destroy too. The other\n * steps (set `deleting`, delete sentinel, delete the meta record) are idempotent and not retried here. Shared by\n * the attached-facade supervisor (this module) and the in-process `destroy()` (index.ts).\n */\nexport async function runStoreDestruction(\n effects: DestructionEffects,\n opts?: StoreDestructionRetryOptions,\n): Promise<void> {\n const maxRetries = opts?.maxOwnershipRetries ?? 5;\n const isOwnershipError = opts?.isOwnershipError ?? defaultIsOwnershipError;\n const delay = opts?.delay ?? ((ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)));\n const retryDelayMs = opts?.retryDelayMs ?? 50;\n const guarded: DestructionEffects = {\n setPhase: (phase) => effects.setPhase(phase),\n deleteSentinel: () => effects.deleteSentinel(),\n deleteMetaRecord: () => effects.deleteMetaRecord(),\n deleteBackendStore: async () => {\n for (let attempt = 0; ; attempt += 1) {\n try {\n await effects.deleteBackendStore();\n return;\n } catch (error) {\n if (attempt >= maxRetries || !isOwnershipError(error)) throw error;\n await delay(retryDelayMs);\n }\n }\n },\n };\n await runDestruction(guarded);\n}\n\n/** Narrow a raw SharedWorker placement reply (`{ [PLACEMENT_RESULT_KEY]: … }`), or `undefined` for foreign traffic. */\nfunction readPlacementResult(data: unknown): PlacementQueryResult | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const result = (data as { [PLACEMENT_RESULT_KEY]?: unknown })[PLACEMENT_RESULT_KEY];\n if (typeof result !== \"object\" || result === null) return undefined;\n return result as PlacementQueryResult;\n}\n\n/** Narrow a raw SharedWorker destroy peer-count verdict (`{ [DESTROY_VERDICT_KEY]: { peers } }`), or `undefined`. */\nfunction readDestroyVerdict(data: unknown): number | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const verdict = (data as { [DESTROY_VERDICT_KEY]?: unknown })[DESTROY_VERDICT_KEY];\n if (typeof verdict !== \"object\" || verdict === null) return undefined;\n const peers = (verdict as { peers?: unknown }).peers;\n return typeof peers === \"number\" ? peers : undefined;\n}\n\n/** Narrow a raw storage-declaration refusal (`{ [DECLARATION_REFUSED_KEY]: { message, name } }`), or `undefined`. */\nfunction readDeclarationRefusal(data: unknown): DeclarationRefusedWire | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const refusal = (data as { [DECLARATION_REFUSED_KEY]?: unknown })[DECLARATION_REFUSED_KEY];\n if (typeof refusal !== \"object\" || refusal === null) return undefined;\n const message = (refusal as { message?: unknown }).message;\n return typeof message === \"string\" ? (refusal as unknown as DeclarationRefusedWire) : undefined;\n}\n\n/**\n * The `setTimeout`/`clearTimeout` pair the handoff-queue deadline and the bridge-silence reconnect schedule on\n * (ADR-0049 step 7) — injectable for deterministic tests, exactly the discipline `engine-router.ts` follows so\n * the whole placement seam is unit-testable with no real timers.\n */\nexport interface AttachClientTimers {\n setTimeout(fn: () => void, ms: number): unknown;\n clearTimeout(handle: unknown): void;\n}\n\n/**\n * The RPC ops that MUTATE the store/journal or push to the server — the ones whose lost response after a\n * relocation is `outcome: \"unknown\"` (a journal update may already exist, there is no dedup key; ADR-0049 D10,\n * invariant 5). Everything NOT in this set is a READ (or an idempotent activation) that is safe to repeat, so it\n * settles `outcome: \"not-dispatched\"`. `ensureSynced` is deliberately a read here: activation is additive and\n * idempotent (starting an already-active group is a no-op), so repeating it can never double-apply. The\n * `export*` ops read the store into an artefact (no mutation) and are likewise safe to repeat.\n */\nconst MUTATION_RPC_OPS: ReadonlySet<RpcOp> = new Set<RpcOp>([\n \"create\",\n \"update\",\n \"delete\",\n \"batch\",\n \"transaction\",\n \"flush\",\n \"reconcile\",\n \"retryFailed\",\n \"recoverSending\",\n \"discardConflict\",\n \"discardQuarantined\",\n \"desync\",\n \"discardEphemeral\",\n // `rawExec` is WRITE-CAPABLE (its docstring: any write it issues stays local and will NOT converge), so a\n // dispatched rawExec with a lost response is `\"unknown\"` — retrying could double-apply a local write.\n \"rawExec\",\n]);\n\nexport interface AttachSyncClientOptions<TRegistry extends SyncTableRegistry> {\n registry: TRegistry;\n /**\n * The worker input — PRIMARILY a FACTORY `() => SharedWorker` (ADR-0049 D5). A `SharedWorker` object cannot be\n * reconstructed from itself, so the factory is what makes SharedWorker-death recovery (the keepalive\n * reconstruction, and the {@link bridgeSilenceMs} bridge-silence reconnect) a GUARANTEE rather than an option:\n * both re-invoke it for a fresh SharedWorker. A bare instance (a native `Worker`/`SharedWorker`, or anything\n * port-shaped) is ALSO accepted for tests and exotic hosts — reconstruction is then structurally unavailable\n * (diagnostics say so). Provide this OR {@link port}.\n */\n worker?: (() => WorkerLike) | WorkerLike;\n /** A raw transport port (a `MessageChannel` port in tests, a `SharedWorker.port` in a browser). */\n port?: BridgePort;\n /**\n * The tab's token provider (ADR-0032 decision 3). Richer than `createSyncClient`'s string form: the\n * worker needs the EXPIRY to apply its pull margin, so this yields `{accessToken, expiresAt}` (or null\n * when unauthenticated). Pushed at attach and answered on every worker pull-request.\n */\n getToken?: () => Promise<AuthTokenSnapshot | null>;\n /** The bound store id (resolved tab-side before attach — SharedWorker naming, ADR-0032 decision 5). */\n storeId?: string;\n /**\n * The plain store PATH (ADR-0036) the worker opens if it must create its own store — a name, not a\n * storage URL. Spread `memoryStoreForTests(...)` from `@pgxsinkit/client/testing` here for a memory store\n * in tests (it also carries the internal marker forwarded to the worker as the memory-backend override).\n */\n storePath?: string;\n syncEnabled?: boolean;\n /**\n * Which baked registry the worker boots (ADR-0032 S3) — forwarded in the attach `config.role`. A worker\n * file that bakes multiple role variants (the board's admin/member) picks by this; single-registry\n * workers ignore it.\n */\n role?: string;\n /**\n * Fresh-store prefetch-overlap hint (ADR-0032 S4), forwarded in the attach `config.freshStore`. Set true\n * ONLY when the tab knows the store is a claimed schemaless spare (never for a mapped/returning store);\n * the worker's `createSyncClient` then overlaps the shape catch-up with its local boot phases.\n */\n freshStore?: boolean;\n /**\n * Restore the worker's store from a backup on attach (ADR-0035 decision 6) — the worker-mode `restoreFrom`.\n * A `File`/`Blob` as produced by {@link SyncClient.exportStore}; the facade decomposes it into a transferred\n * `ArrayBuffer` + name/mime ({@link RestoreArtefactWire}) and the worker recomposes it for `createSyncClient`.\n * Restore rides the one handshake that reaches the ENGINE HOME: a restore-bearing attach awaits the\n * placement reply, then carries the artifact on the SW-port handshake when the in-scope host is the engine\n * (SW-direct / declared-idbfs) or on the first per-tab PIPE handshake when the engine is elected — the\n * router-only SharedWorker is payload-blind, so a restore posted there would be dropped and destroyed.\n * Passing it when the engine has ALREADY booted rejects the attach with a typed error\n * (`RestoreIntoRunningStoreError` by name — you cannot restore into a running store). The restored engine\n * boots offline and its recovered journal is quarantined, exactly as in-process — see `restoreFrom` on\n * `createSyncClient`.\n */\n restoreFrom?: File | Blob;\n /**\n * The tab's WIRE storage declaration for this store (ADR-0050) — posted as the declaration message on the\n * worker port BEFORE the placement query (so `backend: \"idbfs\"` can skip the probe), and carried on the\n * provision/attach payloads so the engine binds it (durability included). Omit (or `{}`) for \"no opinion\":\n * a registry-attached static declaration, else the capability defaults, decide. A registry-attached\n * declaration is AUTHORITATIVE — an explicit field here that disagrees with it (or with the declaration\n * another tab already bound) is a typed refusal (`StorageDeclarationRefusedError`), never silently\n * overridden: a store's declaration is immutable, and a preference change mints a fresh store under a\n * fresh path instead.\n */\n storage?: SyncStorageDeclaration;\n codec?: BridgeCodec;\n onStatusChange?: (status: SyncRuntimeStatus) => void;\n onConflict?: (details: MutationDetail[]) => void;\n onQuarantine?: (details: MutationDetail[]) => void;\n onReject?: (details: MutationDetail[]) => void;\n onSchemaChange?: (event: LocalStoreVersionEvent) => void;\n onSyncError?: (error: Error) => void;\n /**\n * Boot observability (ADR-0034): invoked once with the worker engine's finalized {@link BootReport} if the\n * engine's boot finalizes WHILE this tab is attached (the one-shot `boot-report` broadcast). A tab that\n * attaches AFTER the boot never receives the push — it reads the report via {@link SyncClient.bootReport}.\n */\n onBootReport?: (report: BootReport) => void;\n /**\n * The bridge-silence deadline (ms) for non-leader reconnection (ADR-0049 D5). DISABLED when undefined (the\n * default); the election coordinator (step 8) sets it. When set: a pending op left with NO bridge traffic\n * since it was posted, past this deadline, triggers ONE reconnect attempt via the {@link worker} FACTORY (if the\n * input is a factory) — construct a fresh SharedWorker, resolve its port, re-attach, flush the queue,\n * re-subscribe. With a bare-instance input reconstruction is structurally unavailable, so no reconnect is armed.\n * Scheduled on {@link timers}.\n */\n bridgeSilenceMs?: number;\n /**\n * The bounded handoff queue (ADR-0049 invariant 9). While the handoff window is open — after a relocation\n * notice, before the replacement pipe's handshake completes — new data-path ops are QUEUED, not posted.\n * `cap` overflow or `deadlineMs` expiry fails queued ops with `EngineRelocatedError(\"not-dispatched\")` (they\n * never left the tab, so they are safe to retry). Defaults: `cap` 256, `deadlineMs` 15000. The deadline is\n * scheduled on {@link timers}.\n */\n handoffQueue?: { cap?: number; deadlineMs?: number };\n /**\n * Injectable timers for the handoff-queue deadline and the bridge-silence reconnect (ADR-0049 step 7) — the\n * same deterministic-test seam `engine-router.ts` exposes. Defaults to `globalThis.setTimeout`/`clearTimeout`.\n */\n timers?: AttachClientTimers;\n /**\n * The elected engine worker OVERRIDE (ADR-0049 D5). In `elected-worker` placement (a router-only SharedWorker)\n * the tab's election coordinator spawns the real engine as a dedicated `Worker`. NORMALLY NO WIRING IS NEEDED:\n * the worker entry is dual-scope (one file serves both homes), the SharedWorker reports its own script URL in the\n * placement reply, and the winning tab constructs the engine as `new Worker(swScriptUrl, { type: \"module\" })`\n * itself. Supply this override ONLY for entries that cannot be reconstructed from their URL as a module worker\n * (classic-script workers, `blob:`/`data:` URLs, CSP constraints); wrap the constructed worker with\n * {@link wrapEngineWorker}. When election is required but NEITHER a derivable URL NOR this override is available,\n * attach fails with the typed {@link ElectedEngineUnconstructibleError} — never a silent no-engine attach.\n */\n createEngineWorker?: () => ElectedEngineWorker;\n /**\n * The opt-in engine-construction EXECUTION LIMIT (ADR-0049 D5) as this tab carries it — every tab attaching to a\n * store MUST carry the SAME value the worker was constructed with (`ExecutionLimitMismatchError` on a mismatch).\n * DISABLED by default (`undefined` / absent `maxDispatchMs`) — no finite worst-case query duration exists, so\n * enabling the limit (which converts slow to terminated by policy) is a deliberate consumer choice. When\n * `maxDispatchMs` is set AND this tab is on an elected per-tab pipe, a dispatched RPC still outstanding past the\n * limit is reported to the router as an `overdue-dispatch` (the router then probes the engine's control channel;\n * a WASM-blocked engine cannot answer → the leader retires + respawns it). ELECTED PLACEMENT ONLY — on SW-direct\n * the option is rejected as unsupported during attach rather than silently ignored.\n */\n executionLimit?: ExecutionLimitConfig;\n /**\n * The leader-keepalive ping cadence (ms) the election coordinator uses (ADR-0049 step 8). Default 20000. The\n * keepalive is the ONE standing timer that detects SharedWorker death (unanswered pings) → reconstruct via the\n * {@link worker} factory + re-announce the still-live engine. Lower it to detect SW death faster.\n */\n keepaliveIntervalMs?: number;\n /** Consecutive unanswered keepalive pings before SharedWorker reconstruction (ADR-0049 step 8). Default 2. */\n keepaliveMissThreshold?: number;\n /**\n * Await the VFS ownership release after a deliberate engine termination (ADR-0049 step 8). Defaults to the\n * documented no-op {@link resolvedOwnershipRelease} — the HONEST MINIMUM (step 11b follow-up 1): the\n * OPFS-repacked VFS enforces ownership with EXCLUSIVE OPFS sync-access handles (`StoreOwnedError` /\n * `STORE_OWNED`), NOT a Web Lock, so there is no lock name to `navigator.locks.request(..., { ifAvailable })`\n * against here. The bounded wait therefore lives in the SUCCESSOR'S OPEN PATH: the respawned elected engine\n * worker's own `createOpfsRepacked` open throws the owned-store contention error and is retried with backoff\n * (the `openWithBoundedRetries` wrapper in `createClientPGlite`) until the dead worker's agent releases the\n * handle — exactly the fault-matrix row \"VFS ownership-lock release lag → successor open retries on contention\n * until clear, bounded, then boot failure\". Supply a custom async wait only to inject a real probe (tests do).\n */\n awaitOwnershipRelease?: () => Promise<void>;\n /**\n * @internal test seam (ADR-0049 step 10b): override the election coordinator's IO — the Web Locks surface and\n * the page-lifecycle subscription. Production reads `navigator.locks` structurally and subscribes to real\n * `pagehide`/`pageshow`. Injected so the election wiring is unit-testable with a fake locks (no real\n * `navigator.locks` under Bun).\n */\n electionIo?: {\n locks?: CoordinatorDeps[\"locks\"];\n pageLifecycle?: CoordinatorDeps[\"pageLifecycle\"];\n };\n /**\n * @internal test seam (ADR-0049 step 10b): override the destruction effects the ATTACHED `destroy()` runs\n * after it detaches. Production builds real OPFS + meta-record + idb effects from the store path\n * ({@link createStoreDestructionEffects}); injected so the supervised-destroy path is unit-testable with fake\n * effects (effect-order assertions, ownership-lock-lag retry).\n */\n createDestructionEffects?: (storePath: string) => DestructionEffects;\n}\n\n/**\n * The worker-attached client: `SyncClient`'s shape, worker-proxied, plus `notifyAuthChanged` (re-push the\n * token after an app auth-state change, ADR-0032 decision 3). One-shot Drizzle reads\n * (`query`/`queryRow`/`queryRaw`/`queryRawRow`) and `ensureSynced` ARE proxied to the worker; the members\n * that throw are the structurally unproxiable ones — `pglite`, `destroy`, `dropReadCache`, `isSynced`, and\n * `drizzle.transaction()`.\n */\nexport type AttachedSyncClient<TRegistry extends SyncTableRegistry> = SyncClient<TRegistry> & {\n notifyAuthChanged: () => void;\n /**\n * Forward the app's Offline toggle to the worker (ADR-0032 S3). The worker owns convergence, so the\n * tab cannot gate a local trigger; this sends `set-online`, which suppresses/resumes the worker's flush\n * passes (resuming fires one immediate pass). The in-process client gates its own `autoSync` instead.\n */\n setOnline: (online: boolean) => void;\n};\n\n/**\n * The IO a shared election coordinator is built from (ADR-0049 step 8) — the subset both {@link attachSyncClient}\n * and the elected {@link provisionSyncWorker} pass so ONE coordinator serves a tab's whole (provision + attach)\n * lifecycle per store (invariant 2 — never self-queued). A module-level builder (not a per-call closure) so both\n * entry points construct the identical coordinator.\n */\ninterface ElectedCoordinatorParams {\n storePath: string;\n /** The SW control port the coordinator posts announce/keepalive on (the FIRST creator's connection). */\n controlPort: BridgePort;\n createEngineWorker: () => ElectedEngineWorker;\n /** The SharedWorker reconstruction factory (ADR-0049 D5) — drives the keepalive SW-death recovery. Absent for a\n bare-instance input, where reconstruction is structurally unavailable. */\n swFactory?: () => WorkerLike;\n /** The tab's wire storage declaration (ADR-0050) — posted FIRST on every reconstructed SW port, before the\n coordinator's announce/keepalive traffic, so a fresh bootstrap binds and routes instead of refusing. */\n storage?: SyncStorageDeclaration;\n electionIo?: AttachSyncClientOptions<SyncTableRegistry>[\"electionIo\"];\n awaitOwnershipRelease?: () => Promise<void>;\n timers: AttachClientTimers;\n pageLifecycle?: CoordinatorDeps[\"pageLifecycle\"];\n keepaliveIntervalMs?: number;\n keepaliveMissThreshold?: number;\n}\n\n/**\n * Build the tab's election coordinator over a SW control port. The spawn adapter mints the announce control\n * channel and delivers its ENGINE end to the freshly-spawned worker; `createControlChannel` yields the SAME\n * channel so `announce` transfers the ROUTER end to the SharedWorker; a re-announce WITHOUT a respawn (keepalive\n * SW reconstruction) re-delivers a fresh engine-end to the retained live engine (step 11b follow-up 2).\n */\nfunction buildElectedCoordinator(params: ElectedCoordinatorParams): ElectionCoordinator {\n const factory = params.createEngineWorker;\n let pendingChannel: MessageChannel | undefined;\n let liveEngine: ElectedEngineWorker | undefined;\n const locks = params.electionIo?.locks ??\n (globalThis as { navigator?: { locks?: CoordinatorDeps[\"locks\"] } }).navigator?.locks ?? {\n request: () => Promise.resolve(),\n };\n const deps: CoordinatorDeps = {\n locks,\n spawnEngineWorker: () => {\n const engine = factory();\n liveEngine = engine;\n const channel = new MessageChannel();\n pendingChannel = channel;\n engine.deliverControlPort(channel.port2);\n return { terminate: () => engine.terminate(), onError: (listener) => engine.onError(listener) };\n },\n createControlChannel: () => {\n if (pendingChannel !== undefined) {\n const channel = pendingChannel;\n pendingChannel = undefined;\n return { port1: channel.port1, port2: channel.port2 };\n }\n const channel = new MessageChannel();\n liveEngine?.deliverControlPort(channel.port2);\n return { port1: channel.port1, port2: channel.port2 };\n },\n swPort: params.controlPort as unknown as SwBridgePort,\n ...(params.swFactory\n ? {\n reconstructSw: () => {\n const port = resolvePort({ worker: params.swFactory! });\n // ADR-0050: the reconstructed SharedWorker is a fresh bootstrap — declare before the coordinator's\n // announce rides this port, or the bootstrap refuses/queues nothing and recovery hangs.\n port.postMessage({ [DECLARATION_KEY]: params.storage ?? {} });\n return port as unknown as SwBridgePort;\n },\n }\n : {}),\n awaitOwnershipRelease: params.awaitOwnershipRelease ?? resolvedOwnershipRelease,\n timers: params.timers,\n ...(params.pageLifecycle ? { pageLifecycle: params.pageLifecycle } : {}),\n };\n return createElectionCoordinator(deps, {\n storePath: params.storePath,\n ...(params.keepaliveIntervalMs != null ? { keepaliveIntervalMs: params.keepaliveIntervalMs } : {}),\n ...(params.keepaliveMissThreshold != null ? { keepaliveMissThreshold: params.keepaliveMissThreshold } : {}),\n });\n}\n\n/**\n * Per-store SHARED election coordinators (ADR-0049 step 8 — \"one coordinator per tab per store; provision and\n * attach share it\"). Populated ONLY by an elected {@link provisionSyncWorker}; a later {@link attachSyncClient}\n * on the SAME store (same page realm) ADOPTS it (`claimForAttach` — no second lock request, no second engine,\n * invariant 2). Empty when no provision ran, so attach-only flows never touch it (no shared coordinator to adopt). Keyed\n * by store path; ref-counted so it clears once every provision claim + adopting attach has released.\n */\nconst sharedCoordinators = new Map<\n string,\n {\n coordinator: ElectionCoordinator;\n refs: number;\n /** Release the provision claim and cancel its expiry after an explicit construction-identity retirement. */\n releaseProvision?: () => void;\n /**\n * The provision's live engine pipe, held for HANDOVER (ADR-0049 step 8). The router mints exactly ONE proxy\n * pipe per SW connection; when provision and attach share one port (the documented ordered-messages contract,\n * e.g. the board), that pipe is delivered during provisioning — so the adopting attach must receive THIS pipe\n * rather than wait for a `connect-port` that will never be re-sent. Cleared on take; closed if never taken.\n */\n provisionPipe?: { pipe: BridgePort; identity: EngineIdentity };\n }\n>();\n\n/** Adopt an existing per-store coordinator (incrementing its ref), or register a freshly-built one. */\nfunction adoptOrRegisterCoordinator(storePath: string, build: () => ElectionCoordinator): ElectionCoordinator {\n let entry = sharedCoordinators.get(storePath);\n if (entry === undefined) {\n entry = { coordinator: build(), refs: 0 };\n sharedCoordinators.set(storePath, entry);\n }\n entry.refs += 1;\n return entry.coordinator;\n}\n\n/** Look up an already-registered per-store coordinator WITHOUT registering one (attach's adopt-if-present probe). */\nfunction lookupSharedCoordinator(storePath: string): ElectionCoordinator | undefined {\n return sharedCoordinators.get(storePath)?.coordinator;\n}\n\n/** Increment the ref of an already-registered coordinator (an adopting attach); no-op if none is registered. */\nfunction retainSharedCoordinator(storePath: string): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry !== undefined) entry.refs += 1;\n}\n\n/** Release one ref; the entry clears at zero so a later provision/attach starts a fresh coordinator. */\nfunction releaseSharedCoordinator(storePath: string): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry === undefined) return;\n entry.refs -= 1;\n if (entry.refs <= 0) {\n entry.provisionPipe?.pipe.close?.();\n sharedCoordinators.delete(storePath);\n }\n}\n\n/** Stash the provision's engine pipe for the adopting attach's handover; no-op when no entry is registered. */\nfunction stashProvisionPipe(storePath: string, pipe: BridgePort, identity: EngineIdentity): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry !== undefined) entry.provisionPipe = { pipe, identity };\n}\n\n/** Take (and clear) the stashed provision pipe — exactly one adopting attach may consume it. */\nfunction takeProvisionPipe(storePath: string): { pipe: BridgePort; identity: EngineIdentity } | undefined {\n const entry = sharedCoordinators.get(storePath);\n const stashed = entry?.provisionPipe;\n if (entry !== undefined) delete entry.provisionPipe;\n return stashed;\n}\n\n/** Record the provision claim's explicit release companion on its shared coordinator entry. */\nfunction setProvisionRelease(storePath: string, release: () => void): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry !== undefined) entry.releaseProvision = release;\n}\n\nexport async function attachSyncClient<const TRegistry extends SyncTableRegistry>(\n options: AttachSyncClientOptions<TRegistry>,\n): Promise<AttachedSyncClient<TRegistry>> {\n const codec = options.codec ?? identityCodec;\n const port = resolvePort(options);\n // The SharedWorker reconstruction factory (ADR-0049 D5), or undefined for a bare-instance/port input. Drives the\n // bridge-silence reconnect and the coordinator's keepalive SW-reconstruction; both re-invoke it for a fresh\n // SharedWorker. Absent → reconstruction is structurally unavailable and those recovery paths are simply not armed.\n const workerFactory = workerFactoryOf(options.worker);\n\n // ─── ADR-0049 placement seams (data-port indirection, handoff window, reconnect) ──────────────────\n // `controlPort` permanently carries the `{ pgx0049 }` control plane (relocation notices + `connect-port`);\n // `dataPort` starts AS the control port (SW-direct / declared-idbfs / no-pgx0049: the data path never leaves the SW port) and SWAPS to a\n // transferred pipe on `connect-port`. Every data-path send goes through `currentDataPort()` so the pending\n // maps stay in place across a swap (invariant 6 — one direct pipe per tab; the router never sees payloads).\n let controlPort: BridgePort = port;\n let dataPort: BridgePort = port;\n const currentDataPort = (): BridgePort => dataPort;\n const timers: AttachClientTimers = options.timers ?? {\n setTimeout: (fn, ms) => globalThis.setTimeout(fn, ms),\n clearTimeout: (handle) => globalThis.clearTimeout(handle as ReturnType<typeof globalThis.setTimeout>),\n };\n // The current engine identity (invariant 7 — the pair), set on each accepted `connect-port`; `hasPipe` marks\n // that the data path has left the control port. The handoff window (`windowOpen`) queues new ops.\n let currentEngineIdentity: EngineIdentity | undefined;\n let hasPipe = false;\n let windowOpen = false;\n // Bounded handoff queue (invariant 9): thunks deferred while the window is open, each carrying a `reject` so\n // cap-overflow / deadline-expiry can fail the caller with `EngineRelocatedError(\"not-dispatched\")`.\n const handoffQueue: Array<{ dispatch: () => void; reject: (error: Error) => void }> = [];\n const queueCap = options.handoffQueue?.cap ?? 256;\n const queueDeadlineMs = options.handoffQueue?.deadlineMs ?? 15000;\n let queueDeadlineHandle: unknown;\n // Bridge-silence reconnect (D5): armed on each dispatch when `bridgeSilenceMs` + a factory are set; ONE\n // attempt. `bridgeSeenSinceArm` distinguishes a live-but-slow engine from true silence.\n let silenceHandle: unknown;\n let bridgeSeenSinceArm = false;\n let reconnecting = false;\n // ─── ADR-0049 election + supervised-destroy state ─────────────────────────────────────────────────\n // The tab's election coordinator (created lazily on a router-only `electionRequired` placement reply — the\n // elected engine factory is the `createEngineWorker` override or the URL-derived default) + its released-on-detach\n // claim; and the pending destroy peer-count verdict resolver (the SharedWorker answers a `{ [DESTROY_QUERY_KEY] }`\n // query with the attached-tab count).\n let electionCoordinator: ElectionCoordinator | undefined;\n let releaseElectionClaim: (() => void) | undefined;\n let destroyVerdictResolver: ((peers: number) => void) | undefined;\n let placementResult: PlacementQueryResult | undefined;\n let swTeardownAckResolver: ((error?: BridgeErrorWire) => void) | undefined;\n let swTeardownIdentity: EngineIdentity | undefined;\n // Set to the store path when this attach ADOPTED a shared (provision-registered) coordinator — so detach\n // releases the shared ref (ref-counted registry cleanup). Undefined when this tab built its own coordinator.\n let adoptedSharedCoordinatorStore: string | undefined;\n // The placement decision is single-shot: once we act on the first `electionRequired` reply we ignore any repeat.\n let placementDecided = false;\n // Settles when the FIRST placement reply arrives (the bootstrap meta listener answers the query in BOTH SW\n // modes) — or REJECTS typed when the worker refuses this tab's storage declaration (ADR-0050), which arrives\n // in place of the placement reply. Every boot awaits it before the first handshake — see the send site.\n let resolvePlacementKnown: (() => void) | undefined;\n let rejectPlacementKnown: ((error: Error) => void) | undefined;\n const placementKnown = new Promise<void>((resolve, reject) => {\n resolvePlacementKnown = resolve;\n rejectPlacementKnown = reject;\n });\n // A refusal may land after a detach already settled the boot path — never an unhandled rejection.\n void placementKnown.catch(() => undefined);\n // The restore artifact rides EXACTLY ONE handshake — its ArrayBuffer detaches on first post, so a resend\n // would carry an empty buffer. Set the moment a handshake actually carries it (see `runAttachHandshake`).\n let restoreConsumed = false;\n\n // ─── ADR-0049 first-attach gate (placement-query-FIRST ordering — elected-mode ack routing) ───────\n // `attachSyncClient` no longer gates on the SW-port attach ack: a router-only SharedWorker (elected-worker home)\n // is payload-blind and DROPS the bridge `attach`, so that ack would never come there. Instead the attach resolves\n // when the FIRST attach ack lands from EITHER home — the in-scope SW engine (SW-direct / declared-idbfs / no-SW\n // baseline) OR the elected engine over the per-tab pipe (`onConnectPort`, after election delivers `connect-port`).\n // It REJECTS on a boot-failure ack, on detach, or — when election is required but the engine worker cannot be\n // constructed — with the typed {@link ElectedEngineUnconstructibleError} (a WIRING failure, never a hang). With a\n // constructible engine, the coordinator's own election spawns it and delivers the pipe, so no attach deadline exists.\n let firstAttachSettled = false;\n let resolveFirstAttach!: () => void;\n let rejectFirstAttach!: (error: Error) => void;\n const firstAttachReady = new Promise<void>((resolve, reject) => {\n resolveFirstAttach = resolve;\n rejectFirstAttach = reject;\n });\n void firstAttachReady.catch(() => undefined);\n const settleFirstAttach = (): void => {\n if (firstAttachSettled) return;\n firstAttachSettled = true;\n resolveFirstAttach();\n };\n const failFirstAttach = (error: Error): void => {\n if (firstAttachSettled) return;\n firstAttachSettled = true;\n rejectFirstAttach(error);\n };\n\n // ─── Correlation + subscription bookkeeping ──────────────────────────────────────────────────────\n let nextId = 0;\n const newId = (prefix: string) => `${prefix}-${++nextId}`;\n // `kind` (ADR-0049 invariant 5): a lost response on a MUTATION settles `outcome: \"unknown\"`, on a READ\n // `outcome: \"not-dispatched\"` (safe to repeat). Stamped at every `rpc` call site from {@link MUTATION_RPC_OPS}.\n const rpcPending = new Map<\n string,\n { resolve: (value: unknown) => void; reject: (error: Error) => void; kind: \"read\" | \"mutation\" }\n >();\n const initialPending = new Map<\n string,\n { resolve: (payload: LiveInitialPayload) => void; reject: (error: Error) => void }\n >();\n const diffHandlers = new Map<string, (diff: Omit<LiveDiffPayload, \"queryId\">) => void>();\n // Live subscriptions that have completed their initial snapshot (keyed by queryId) — re-issued through the\n // same subscribe machinery on a pipe swap so live queries re-establish (invariant 5; ADR-0041 re-attach).\n const activeSubscriptions = new Map<string, { resubscribe: () => void }>();\n // Resolvers for per-subscription `hydrated` promises, keyed by queryId. The worker posts\n // `live-hydrated` on the same port as the diff stream, strictly after the catch-up rows — so\n // resolution here guarantees the rows have already been applied by the materializer.\n const hydratedPending = new Map<string, () => void>();\n // Set once this tab detaches (explicit `stop()` OR a terminal `pagehide`). Guards NEW operations (they\n // reject at once) and lets `detachFromWorker` settle every outstanding promise — the port listener is torn\n // down on detach, so an unsettled `rpc`/`live-initial` waiter would otherwise hang forever (ADR-0040 P2).\n let detached = false;\n const detachError = () => new Error(\"[pgxsinkit] client detached — the tab released its worker attachment\");\n\n // ─── Status + readiness ──────────────────────────────────────────────────────────────────────────\n const status: SyncRuntimeStatus = { phase: \"booting\", isRunning: false };\n let resolveReady!: () => void;\n // FIX 2: `ready` gains a reject path so a detach BEFORE initial sync settles it (an attached client stopped\n // pre-ready would otherwise leave `client.ready` / `client.start()` pending forever). Guarded below.\n let rejectReady!: (error: unknown) => void;\n const ready = new Promise<void>((resolve, reject) => {\n resolveReady = resolve;\n rejectReady = reject;\n });\n void ready.catch(() => undefined);\n let readyResolved = false;\n const readyGroups = new Set<string>();\n const groupWaiters = new Map<string, Array<() => void>>();\n\n // ─── Auth: push at attach + on notifyAuthChanged, answer pull-requests ────────────────────────────\n const pushToken = async () => {\n const token = options.getToken ? await options.getToken() : null;\n postBridgeMessage(currentDataPort(), codec, \"token-push\", token);\n };\n const answerPull = async (requestId: string) => {\n const token = options.getToken ? await options.getToken() : null;\n postBridgeMessage(currentDataPort(), codec, \"token-response\", { requestId, token });\n };\n\n // ─── Inbound message routing ─────────────────────────────────────────────────────────────────────\n const markReady = () => {\n if (readyResolved) return;\n readyResolved = true;\n resolveReady();\n };\n // Record a group as ready and settle any waiters — shared by the discrete `groupReady` edge and the\n // status snapshot's `status.groups` merge (ADR-0032 FIX 4), so a tab attaching after the edge fired\n // still resolves `client.groupReady(table)` off the snapshot it gets at attach.\n const markGroupReady = (groupKey: string) => {\n readyGroups.add(groupKey);\n const waiters = groupWaiters.get(groupKey);\n if (waiters) {\n groupWaiters.delete(groupKey);\n for (const resolve of waiters) resolve();\n }\n };\n const onEvent = (event: BridgeEvent) => {\n switch (event.kind) {\n case \"status\": {\n Object.assign(status, event.status);\n options.onStatusChange?.(event.status);\n // Match the in-process contract EXACTLY (ADR-0032 FIX 3): `ready` resolves ONLY from phase\n // \"ready\" (all eager groups caught up, or the syncEnabled:false path). `auth-needed`/`degraded`\n // do NOT resolve it — an engine stuck retrying auth keeps `ready` pending, as in-process.\n if (event.status.phase === \"ready\") markReady();\n // Late-attach group merge (ADR-0032 FIX 4): fold every already-ready group from the snapshot.\n for (const [groupKey, ready] of Object.entries(event.status.groups ?? {})) {\n if (ready) markGroupReady(groupKey);\n }\n break;\n }\n case \"groupReady\": {\n markGroupReady(event.groupKey);\n break;\n }\n case \"milestone\": {\n // Staged boot readiness (ADR-0041 stage 2): the engine crossed a background stage while this tab was\n // attached. Idempotent with the ack's late-attach fold — whichever observes it first wins.\n if (event.stage === \"writeReady\") settleWriteReady();\n else if (event.stage === \"bootSettled\") settleBootSettled();\n break;\n }\n case \"milestone-error\": {\n // The background write/sync tail rejected a downstream stage (ADR-0041): fail the matching stage so a\n // gated write / `bootSettled` awaiter fails loudly. `localReadReady` and the resolved attach are\n // unaffected — the engine reached local-read readiness before the tail failed.\n if (event.stage === \"writeReady\") failWriteReady(rebuildError(event.error));\n else if (event.stage === \"bootSettled\") failBootSettled(rebuildError(event.error));\n break;\n }\n case \"conflict\":\n options.onConflict?.(event.details as MutationDetail[]);\n break;\n case \"quarantine\":\n options.onQuarantine?.(event.details as MutationDetail[]);\n break;\n case \"reject\":\n options.onReject?.(event.details as MutationDetail[]);\n break;\n case \"schema-change\":\n options.onSchemaChange?.(event.event as LocalStoreVersionEvent);\n break;\n case \"sync-error\":\n options.onSyncError?.(new Error(event.message));\n break;\n case \"boot-report\":\n // Boot observability (ADR-0034): the one-shot push for a tab attached at finalize. A late tab never\n // gets this event and pulls the report via `client.bootReport()` instead.\n options.onBootReport?.(event.report);\n break;\n case \"debug\": {\n // Re-print the worker's rail line gated on THIS tab's own flag, origin-tagged with the worker's\n // monotonic stamp (ADR-0032 decision 7) — a SharedWorker's own console is otherwise invisible.\n if ((globalThis as { __pgxsinkitDebug?: boolean }).__pgxsinkitDebug === true) {\n const line = `[pgxsinkit·w ${event.stamp.toFixed(0)}ms] ${event.line}`;\n if (event.data) console.debug(line, event.data);\n else console.debug(line);\n }\n break;\n }\n case \"timing\":\n break;\n default:\n break;\n }\n };\n\n const listener = (message: { data: unknown }) => {\n if (!isBridgeEnvelope(message.data)) return;\n // Any bridge traffic on the data port proves the engine is answering — clears the bridge-silence suspicion\n // (ADR-0049 D5), so a live-but-slow engine is never mistaken for a dead SharedWorker.\n bridgeSeenSinceArm = true;\n const envelope = message.data;\n const payload = codec.decode(envelope.payload);\n switch (envelope.type) {\n case \"attach-ack\": {\n const ack = payload as AttachAckPayload;\n // A LOCAL-READ-CORE boot failure crosses in the ack's `error` (ADR-0032 FIX 1): reject the handshake\n // so `attachSyncClient` rejects instead of hanging forever. On success, the engine reached\n // `localReadReady` — resolve that stage now (the ack fires AT localReadReady, ADR-0041 Option B) and\n // fold any downstream milestones/failures the tail already crossed (a late attach). `engineReady`\n // covers a LATE attach whose engine already fired its monotonic `ready` before this ack (FIX 3).\n if (ack.error) {\n const settle = pendingAttachAck;\n pendingAttachAck = null;\n const bootError = rebuildError(ack.error);\n settle?.reject(bootError);\n // A boot-failure ack on the FIRST attach (SW-direct) fails `attachSyncClient` (invariant: never hand out\n // a client whose engine failed to boot); a no-op once the first attach already settled (a re-attack ack).\n failFirstAttach(bootError);\n } else {\n if (ack.engineReady) markReady();\n resolveLocalReadReady();\n // Late-attach milestone fold: the stage may have already crossed (or failed) before this tab\n // attached, in which case there is no broadcast to catch — settle it straight from the ack.\n if (ack.writeReady) settleWriteReady();\n if (ack.writeReadyError) failWriteReady(rebuildError(ack.writeReadyError));\n if (ack.bootSettled) settleBootSettled();\n if (ack.bootSettledError) failBootSettled(rebuildError(ack.bootSettledError));\n const settle = pendingAttachAck;\n pendingAttachAck = null;\n settle?.resolve(ack);\n // The first attach ack from EITHER home (SW-direct engine, or the elected engine over the pipe) resolves\n // `attachSyncClient`. Idempotent — a re-attach ack (pipe swap / reconnect) is a no-op here.\n settleFirstAttach();\n }\n break;\n }\n case \"token-request\":\n void answerPull((payload as TokenRequestPayload).requestId);\n break;\n case \"rpc-result\": {\n const id = envelope.id;\n if (id == null) break;\n const result = payload as RpcResultPayload;\n const pending = rpcPending.get(id);\n if (pending) {\n rpcPending.delete(id);\n clearOverdue(id);\n if (result.ok) pending.resolve(result.value);\n else pending.reject(rebuildRpcError(result.error));\n break;\n }\n // A failed `subscribe` is reported as an `rpc-result` correlated by the subscribe's envelope id\n // (the worker has no client to hand an initial snapshot), so route the miss to the initial waiter\n // (ADR-0032 FIX 2). A successful subscribe never lands here — it resolves via `live-initial`.\n const initial = initialPending.get(id);\n if (initial && !result.ok) {\n initialPending.delete(id);\n initial.reject(rebuildRpcError(result.error));\n }\n break;\n }\n case \"live-initial\": {\n const id = envelope.id;\n const initial = payload as LiveInitialPayload;\n if (id != null) {\n const pending = initialPending.get(id);\n if (pending) {\n initialPending.delete(id);\n pending.resolve(initial);\n }\n }\n break;\n }\n case \"live-diff\": {\n const diff = payload as LiveDiffPayload;\n diffHandlers.get(diff.queryId)?.(diff);\n break;\n }\n case \"live-hydrated\": {\n const { queryId } = payload as LiveHydratedPayload;\n hydratedPending.get(queryId)?.();\n hydratedPending.delete(queryId);\n break;\n }\n case \"event\":\n onEvent(payload as BridgeEvent);\n break;\n default:\n break;\n }\n };\n // ─── ADR-0049 control-plane listener (the `{ pgx0049 }` envelope) ─────────────────────────────────\n // Lives on the CONTROL port for this tab's whole lifetime. It reacts to exactly the placement messages: a\n // `connect-port` (with a transferred pipe) swaps the data path; a `leader-granted`/`engine-retiring` notice\n // opens the handoff window. Foreign traffic (data-path bridge envelopes, anything else) is untouched — the\n // control plane is INERT until pgx0049 traffic arrives, so a plain SW-port attach is pure data-path passthrough.\n const controlListener = (event: { data: unknown; ports?: readonly BridgePort[] }) => {\n // ADR-0049 step 10b: the SharedWorker's RAW placement reply + destroy peer-count verdict (distinct envelope\n // keys, NOT `pgx0049` control messages). Handle those first, then fall through to the control envelope.\n const placementResult = readPlacementResult(event.data);\n if (placementResult !== undefined) {\n onPlacementResult(placementResult);\n return;\n }\n // ADR-0050: the worker refused this tab's storage declaration (explicit conflict with the bound/static\n // declaration, or engine-bound traffic before the declaration). It arrives IN PLACE of the placement\n // reply, so fail the boot typed and loudly — never a hang, never a silently different storage mode.\n const declarationRefusal = readDeclarationRefusal(event.data);\n if (declarationRefusal !== undefined) {\n const refusal = new StorageDeclarationRefusedError(declarationRefusal.message);\n rejectPlacementKnown?.(refusal);\n failFirstAttach(refusal);\n return;\n }\n const destroyPeers = readDestroyVerdict(event.data);\n if (destroyPeers !== undefined) {\n destroyVerdictResolver?.(destroyPeers);\n return;\n }\n const control = readControlEnvelope(event.data);\n if (control === undefined) return;\n switch (control.type) {\n case \"connect-port\":\n void onConnectPort(control.identity, event.ports?.[0]);\n break;\n case \"control-ack\":\n if (\n control.pingId === -1 &&\n swTeardownIdentity !== undefined &&\n engineIdentityEquals(control.identity, swTeardownIdentity)\n ) {\n swTeardownAckResolver?.(control.error);\n }\n break;\n case \"leader-granted\":\n case \"engine-retiring\":\n onRelocationNotice(control);\n break;\n default:\n break;\n }\n };\n\n // The bridge listener starts on the data port (initially === the control port); the control listener stays on\n // the control port. In the no-pgx0049 case both sit on the one `port` and coexist (each ignores the other's\n // traffic), so the data path is unchanged.\n dataPort.addEventListener(\"message\", listener);\n dataPort.start?.();\n controlPort.addEventListener(\"message\", controlListener);\n controlPort.start?.();\n\n // ─── Data-port swap + handoff-queue + reconnect machinery (ADR-0049) ──────────────────────────────\n /** Move the bridge listener onto `next`; close the previous pipe when replacing one (never the control port). */\n const swapDataPort = (next: BridgePort, closePrev: boolean): void => {\n const prev = dataPort;\n if (prev === next) return;\n next.addEventListener(\"message\", listener);\n next.start?.();\n prev.removeEventListener(\"message\", listener);\n // The control port keeps carrying `{ pgx0049 }` and MUST NOT be closed on the first swap; a replaced pipe is\n // dead and IS closed (invariant 5 — old-pipe pendings settled, the pipe closed, never replayed).\n if (closePrev && prev !== controlPort) prev.close?.();\n dataPort = next;\n };\n\n /**\n * Settle EVERY in-flight pending op by outcome (ADR-0049 invariant 5) — used on a relocation notice, a pipe\n * replacement, and a reconnect. A MUTATION whose response is lost is `\"unknown\"` (its journal update may\n * exist; inspect/reconcile, never auto-retry); a dispatched READ is `\"not-dispatched\"` — the name means\n * \"safe to retry\" (a read cannot double-apply; ADR-0049 D10: \"dispatched reads are safe to repeat — caller\n * policy\"). Live-query initial pendings are reads → `\"not-dispatched\"`; `hydrated` promises are doneness\n * signals with no reject path, so they RESOLVE (the file's existing convention on teardown), and re-subscribe\n * re-hydrates. Nothing is ever auto-retried here.\n */\n const settleInFlight = (): void => {\n for (const [id, pending] of rpcPending) {\n rpcPending.delete(id);\n clearOverdue(id);\n pending.reject(new EngineRelocatedError(pending.kind === \"mutation\" ? \"unknown\" : \"not-dispatched\"));\n }\n for (const [id, pending] of initialPending) {\n initialPending.delete(id);\n pending.reject(new EngineRelocatedError(\"not-dispatched\"));\n }\n for (const resolve of hydratedPending.values()) resolve();\n hydratedPending.clear();\n };\n\n const clearQueueDeadline = (): void => {\n if (queueDeadlineHandle !== undefined) {\n timers.clearTimeout(queueDeadlineHandle);\n queueDeadlineHandle = undefined;\n }\n };\n const armQueueDeadline = (): void => {\n if (queueDeadlineHandle !== undefined) return;\n queueDeadlineHandle = timers.setTimeout(() => {\n queueDeadlineHandle = undefined;\n // The window outlived the deadline — the queued work never left the tab, so fail it \"not-dispatched\".\n const items = handoffQueue.splice(0);\n for (const item of items) item.reject(new EngineRelocatedError(\"not-dispatched\"));\n }, queueDeadlineMs);\n };\n /** Enqueue a deferred data-path op while the window is open; cap overflow fails it \"not-dispatched\" at once. */\n const enqueue = (dispatch: () => void, reject: (error: Error) => void): void => {\n if (handoffQueue.length >= queueCap) {\n reject(new EngineRelocatedError(\"not-dispatched\"));\n return;\n }\n handoffQueue.push({ dispatch, reject });\n armQueueDeadline();\n };\n /** Flush the queue in order after a successful re-attach; clears the deadline. */\n const flushQueue = (): void => {\n clearQueueDeadline();\n const items = handoffQueue.splice(0);\n for (const item of items) item.dispatch();\n };\n\n const resubscribeAll = (): void => {\n for (const sub of activeSubscriptions.values()) sub.resubscribe();\n };\n\n /** A relocation notice opens the handoff window: settle in-flight per invariant 5, then QUEUE new calls. */\n function onRelocationNotice(control: EngineControlMessage): void {\n if (detached) return;\n // `engine-retiring` is identity-tagged: ignore a STALE one (a superseded engine) once we have an identity;\n // `leader-granted` is untagged and always applies (it precedes any engine).\n if (\n control.type === \"engine-retiring\" &&\n currentEngineIdentity !== undefined &&\n isStaleIdentity(currentEngineIdentity, control.identity)\n ) {\n return;\n }\n if (windowOpen) return;\n windowOpen = true;\n settleInFlight();\n armQueueDeadline();\n }\n\n /**\n * A `connect-port` delivers a transferred pipe (invariant 6). The FIRST one swaps the data path off the\n * control port and re-attaches over the pipe. A SUBSEQUENT one under a NEWER identity is a pipe REPLACEMENT\n * (a new SharedWorker handing fresh pipes): settle old-pipe in-flight, close the old pipe, swap, re-attach,\n * flush the queue, and re-subscribe every live query.\n */\n async function onConnectPort(identity: EngineIdentity, pipe: BridgePort | undefined): Promise<void> {\n if (detached || pipe === undefined) return;\n // A duplicate for the SAME identity we already piped is a no-op (never re-pipe the same engine).\n if (currentEngineIdentity !== undefined && engineIdentityEquals(currentEngineIdentity, identity)) return;\n const replacing = hasPipe;\n // Hold the window open across the swap+handshake so calls issued mid-flight queue rather than race.\n windowOpen = true;\n if (replacing) settleInFlight();\n currentEngineIdentity = identity;\n swapDataPort(pipe, replacing);\n hasPipe = true;\n try {\n // `includeRestore: true` — in elected mode THIS is the engine's boot attach, so the restore artifact\n // (withheld from the router-dropped SW-port handshake) rides here, over the direct tab↔engine pipe.\n // The `restoreConsumed` guard makes it first-carry-only: a pipe REPLACEMENT re-attach never re-sends.\n await runAttachHandshake(pipe, true);\n } catch {\n // A failed re-attach leaves the window open; a later notice / connect-port can retry. Never auto-retried.\n return;\n }\n windowOpen = false;\n flushQueue();\n resubscribeAll();\n }\n\n /** Arm the bridge-silence timer after a dispatch (D5) — only when a deadline AND a SharedWorker factory exist. */\n const armSilence = (): void => {\n if (options.bridgeSilenceMs === undefined || workerFactory === undefined) return;\n if (silenceHandle !== undefined || detached) return;\n bridgeSeenSinceArm = false;\n silenceHandle = timers.setTimeout(() => {\n silenceHandle = undefined;\n if (detached) return;\n // A pending op survived the deadline with NO bridge traffic since it was posted → the transport looks\n // dead. Reconnect ONCE. If traffic WAS seen but ops are still pending, re-arm (a slow-but-live engine).\n if (!bridgeSeenSinceArm && rpcPending.size > 0) void reconnect();\n else if (rpcPending.size > 0) armSilence();\n }, options.bridgeSilenceMs);\n };\n\n /**\n * ONE bridge-silence reconnect attempt (ADR-0049 D5): construct a fresh SharedWorker via the worker FACTORY, move\n * both listeners to its port, settle the presumed-dead transport's in-flight per invariant 5, re-run the attach\n * handshake, then flush + re-subscribe. With a bare-instance input (no factory) this is unreachable — reconstruction\n * is structurally unavailable. Never more than one concurrent attempt.\n */\n async function reconnect(): Promise<void> {\n if (reconnecting || detached || workerFactory === undefined) return;\n reconnecting = true;\n let newPort: BridgePort;\n try {\n newPort = resolvePort({ worker: workerFactory });\n } catch {\n reconnecting = false;\n return;\n }\n settleInFlight();\n dataPort.removeEventListener(\"message\", listener);\n controlPort.removeEventListener(\"message\", controlListener);\n controlPort = newPort;\n dataPort = newPort;\n hasPipe = false;\n currentEngineIdentity = undefined;\n windowOpen = true;\n newPort.addEventListener(\"message\", listener);\n newPort.addEventListener(\"message\", controlListener);\n newPort.start?.();\n // ADR-0050: the reconstructed SharedWorker may be a FRESH bootstrap whose placement is still pending —\n // every port must declare before any engine-bound message. The declaration precedes the attach on the same\n // port, and the bootstrap queues the attach until placement resolves (no placement round-trip needed here).\n newPort.postMessage({ [DECLARATION_KEY]: options.storage ?? {} });\n try {\n await runAttachHandshake(newPort, false);\n } catch {\n reconnecting = false;\n return;\n }\n windowOpen = false;\n flushQueue();\n resubscribeAll();\n reconnecting = false;\n }\n\n // ─── ADR-0049 election wiring + supervised destroy ────────────────────────────────────────────────\n /** The store PATH this tab owns — the identity every store-IO surface (OPFS namespaces, meta record, idb db, leader lock) derives from. */\n const resolveDestroyStorePath = (): string => options.storePath ?? options.storeId ?? \"pgxsinkit-overlay-v1\";\n // The elected engine worker factory for THIS attach (ADR-0049 D5): the `createEngineWorker` OVERRIDE, else the\n // default derived from the SharedWorker's reported script URL (`new Worker(url, { type: \"module\" })`). Resolved on\n // the `electionRequired` reply; `undefined` means neither is available — a WIRING failure, not a fallback.\n let electedEngineFactory: (() => ElectedEngineWorker) | undefined;\n\n /**\n * The SharedWorker reported the engine home. In `elected-worker` (router-only) mode this tab must elect its own\n * engine: resolve the engine factory (the `createEngineWorker` override, else the URL-derived default), build the\n * coordinator (once), and take one attach claim. When NEITHER a derivable URL NOR an override is available the\n * engine is genuinely unconstructible on a handle-denied home — a WIRING failure, so the attach fails with the\n * typed {@link ElectedEngineUnconstructibleError} (never a silent no-engine attach). `shared-worker` (SW-direct /\n * declared-idbfs) needs no election.\n */\n function onPlacementResult(result: PlacementQueryResult): void {\n if (detached || placementDecided) return;\n placementDecided = true;\n placementResult = result;\n resolvePlacementKnown?.();\n // SW-direct / declared-idbfs (or a non-placement transport that never replies): the SW-port attach ack gates the flow.\n if (!result.electionRequired) return;\n // Elected-worker (router-only): resolve the engine factory. Auto-derivation from the reported script URL is the\n // default (dual-scope entry); the `createEngineWorker` override wins where an entry is not URL-reconstructible.\n electedEngineFactory = options.createEngineWorker ?? deriveEngineWorkerFactory(result.swScriptUrl);\n if (electedEngineFactory === undefined) {\n // The capability is PRESENT (this home requires election) but the engine cannot be constructed — a wiring\n // defect. Fail the attach typed; never a silent no-engine attach and never a storage downgrade (ADR-0049 D1).\n failFirstAttach(\n new ElectedEngineUnconstructibleError(\n result.swScriptUrl === undefined\n ? \"the SharedWorker reported no derivable script URL and no `createEngineWorker` override was supplied\"\n : \"no `Worker` constructor is available in this scope to derive the module engine and no override was supplied\",\n ),\n );\n return;\n }\n // ADOPT an existing PROVISION grant for this store if one is registered (ADR-0049 step 8, fault row\n // \"provision then attach, same tab → attach adopts the provision grant; never self-queued\"): reuse the same\n // coordinator + its already-granted lock + already-spawned engine — `claimForAttach` adds NO second lock\n // request and spawns NO second engine (invariant 2). The router pipes this tab's OWN connection to that engine\n // and the boot adopts the provisioned store (no double initdb). Absent → build this tab's own coordinator.\n const storePath = resolveDestroyStorePath();\n const adopted = lookupSharedCoordinator(storePath);\n if (adopted !== undefined) {\n retainSharedCoordinator(storePath);\n adoptedSharedCoordinatorStore = storePath;\n electionCoordinator = adopted;\n } else {\n electionCoordinator = buildElectionCoordinator();\n }\n releaseElectionClaim = electionCoordinator.claimForAttach();\n // Provision-pipe HANDOVER (ADR-0049 step 8): when this attach shares its SW port with the provision that\n // registered the adopted coordinator, the router's one-and-only pipe for this connection was already\n // delivered during provisioning — feed it into the normal connect-port path instead of waiting for a\n // re-send that never comes. On a fresh (non-shared) port the stash is empty and the router's ordinary\n // late-joiner `connect-port` drives the handshake as usual.\n if (adopted !== undefined) {\n const stashed = takeProvisionPipe(storePath);\n if (stashed !== undefined) void onConnectPort(stashed.identity, stashed.pipe);\n }\n }\n\n /**\n * SW-direct stores are owned by the in-scope host, not an elected coordinator. Ask that host to quiesce and\n * close, then await its reserved teardown ack before detaching this tab and deleting the store. A timeout is\n * deliberately not treated as proof of worker death: destruction still runs and its bounded ownership retry\n * reports an honest failure while the durable `deleting` phase remains recoverable.\n */\n const awaitSharedHostTeardown = async (): Promise<void> => {\n const placement = placementResult;\n if (placement?.engineHome !== \"shared-worker\") return;\n const identity: EngineIdentity = { swInstanceId: placement.swInstanceId, generation: 0 };\n await new Promise<void>((resolve, reject) => {\n let settled = false;\n const timeout = timers.setTimeout(() => {\n if (settled) return;\n settled = true;\n swTeardownAckResolver = undefined;\n swTeardownIdentity = undefined;\n resolve();\n }, 5_000);\n swTeardownIdentity = identity;\n swTeardownAckResolver = (error) => {\n if (settled) return;\n settled = true;\n timers.clearTimeout(timeout);\n swTeardownAckResolver = undefined;\n swTeardownIdentity = undefined;\n if (error) reject(new Error(`[pgxsinkit] SW-direct host teardown failed: ${error.message}`));\n else resolve();\n };\n controlPort.postMessage(wrapControlEnvelope({ type: \"engine-teardown\", identity }));\n });\n };\n\n /**\n * Construct the tab's election coordinator over the SW control port. The spawn adapter creates the announce\n * control channel and delivers its ENGINE end (`port2`) to the freshly-spawned worker (fixing step-8's\n * \"port2 went nowhere\"); `createControlChannel` then returns the SAME channel so the coordinator's `announce`\n * transfers the ROUTER end (`port1`) to the SharedWorker. `navigator.locks` is read structurally (injectable\n * for tests); the page-lifecycle subscription is the real `pagehide`/`pageshow` (also injectable).\n */\n function buildElectionCoordinator(): ElectionCoordinator {\n return buildElectedCoordinator({\n storePath: resolveDestroyStorePath(),\n controlPort,\n createEngineWorker: electedEngineFactory!,\n ...(workerFactory ? { swFactory: workerFactory } : {}),\n ...(options.storage ? { storage: options.storage } : {}),\n ...(options.electionIo ? { electionIo: options.electionIo } : {}),\n ...(options.awaitOwnershipRelease ? { awaitOwnershipRelease: options.awaitOwnershipRelease } : {}),\n timers,\n ...(pageLifecycle ? { pageLifecycle } : {}),\n ...(options.keepaliveIntervalMs != null ? { keepaliveIntervalMs: options.keepaliveIntervalMs } : {}),\n ...(options.keepaliveMissThreshold != null ? { keepaliveMissThreshold: options.keepaliveMissThreshold } : {}),\n });\n }\n\n /** Ask the SharedWorker how many tabs are attached (this one included) — the destroy peer-refusal gate. */\n const queryDestroyPeers = (): Promise<number> =>\n new Promise<number>((resolve, reject) => {\n const timeout = timers.setTimeout(() => {\n destroyVerdictResolver = undefined;\n reject(new Error(\"[pgxsinkit] destroy() timed out waiting for the SharedWorker peer-count verdict.\"));\n }, options.handoffQueue?.deadlineMs ?? 15000);\n destroyVerdictResolver = (peers) => {\n timers.clearTimeout(timeout);\n destroyVerdictResolver = undefined;\n resolve(peers);\n };\n controlPort.postMessage({ [DESTROY_QUERY_KEY]: true });\n });\n\n // ─── ADR-0049 D5: execution-limit OVERDUE-DISPATCH reporting (tab side) ────────────────────────────\n // When `executionLimit.maxDispatchMs` is set and this tab holds a per-tab pipe (elected engine), a dispatched\n // RPC still pending past the limit is reported ONCE to the router as an identity-tagged `overdue-dispatch`. The\n // router then probes the engine control channel; a WASM-blocked engine cannot answer on its event loop, so the\n // router (past its probe threshold) fans `engine-retiring` and the leader terminates + respawns it. The router\n // NEVER treats slow-below-threshold as death (a long query under the limit runs to completion). Per-id timers,\n // cleared on settlement; reported on the CONTROL port (where the router listens), stamped with the current\n // engine identity so the router discards a stale report. SW-direct has no pipe/identity, so it never arms.\n const overdueMs = options.executionLimit?.maxDispatchMs;\n const overdueTimers = new Map<string, unknown>();\n const clearOverdue = (id: string): void => {\n const handle = overdueTimers.get(id);\n if (handle !== undefined) {\n timers.clearTimeout(handle);\n overdueTimers.delete(id);\n }\n };\n const clearAllOverdue = (): void => {\n for (const handle of overdueTimers.values()) timers.clearTimeout(handle);\n overdueTimers.clear();\n };\n const armOverdue = (id: string): void => {\n if (overdueMs === undefined) return;\n overdueTimers.set(\n id,\n timers.setTimeout(() => {\n overdueTimers.delete(id);\n // Report only while the op is genuinely still outstanding on a live pipe (we know the engine identity).\n if (detached || !rpcPending.has(id) || currentEngineIdentity === undefined) return;\n controlPort.postMessage(\n wrapControlEnvelope({\n type: \"overdue-dispatch\",\n identity: currentEngineIdentity,\n elapsedMs: overdueMs,\n }),\n );\n }, overdueMs),\n );\n };\n\n // ─── RPC helper ──────────────────────────────────────────────────────────────────────────────────\n const rpc = <T>(op: RpcOp, args: unknown[]): Promise<T> => {\n // A detached client has no live port listener, so a worker reply could never resolve this — reject at\n // once rather than register a forever-pending waiter (ADR-0040 P2).\n if (detached) return Promise.reject(detachError());\n const kind: \"read\" | \"mutation\" = MUTATION_RPC_OPS.has(op) ? \"mutation\" : \"read\";\n return new Promise<T>((resolve, reject) => {\n const dispatch = () => {\n const id = newId(\"rpc\");\n rpcPending.set(id, { resolve: resolve as (value: unknown) => void, reject, kind });\n postBridgeMessage(currentDataPort(), codec, \"rpc\", { op, args }, id);\n armSilence();\n armOverdue(id);\n };\n // While the handoff window is open, QUEUE rather than post (invariant 9); otherwise dispatch immediately.\n if (windowOpen) enqueue(dispatch, reject);\n else dispatch();\n });\n };\n\n // ─── Attach handshake ────────────────────────────────────────────────────────────────────────────\n // Re-entrant (ADR-0049): the SAME handshake runs for the FIRST attach and for every re-attach (pipe swap,\n // reconnect). `pendingAttachAck` holds whichever handshake is currently awaiting its `attach-ack`; the bridge\n // listener settles it. `runAttachHandshake` posts `attach` over a target port and awaits the ack.\n let pendingAttachAck: { resolve: (ack: AttachAckPayload) => void; reject: (error: Error) => void } | null = null;\n const runAttachHandshake = (target: BridgePort, includeRestore: boolean): Promise<AttachAckPayload> =>\n new Promise<AttachAckPayload>((resolve, reject) => {\n // The restore artifact rides at most ONE handshake ever (`restoreConsumed`): posting transfers (detaches)\n // its ArrayBuffer, so any later handshake would carry an empty husk. The caller chooses the target that\n // actually reaches the engine home; this guard makes a second carry structurally impossible.\n const carryRestore = includeRestore && restoreWire !== undefined && !restoreConsumed;\n if (carryRestore) restoreConsumed = true;\n pendingAttachAck = { resolve, reject };\n postBridgeMessage(\n target,\n codec,\n \"attach\",\n buildAttachPayload(carryRestore),\n undefined,\n carryRestore && restoreWire ? [restoreWire.buffer] : undefined,\n );\n });\n\n // ADR-0041 stage 2 — staged boot readiness on the worker-attached client. The `attach-ack` fires AT the\n // engine's `localReadReady` (the Option B contract), so this client resolves `attachSyncClient` there and\n // `localReadReady` is settled off the ack. `writeReady`/`bootSettled` cross in the engine's background tail:\n // they resolve off the `milestone` broadcast when this tab is attached as the stage fires, OR off the ack's\n // late-attach fold when the stage had already fired before this tab attached — one engine crosses each stage\n // once, so both routes observe the same monotonic sequence. A tail failure rejects the matching stage via\n // the `milestone-error` broadcast / the ack's stage-error fold, so a gated write or a `bootSettled` awaiter\n // fails loudly rather than hanging. All guarded so a rejection on an unconsumed stage is never unhandled.\n let resolveLocalReadReady!: () => void;\n const localReadReady = new Promise<void>((resolve) => {\n resolveLocalReadReady = resolve;\n });\n let resolveWriteReady!: () => void;\n let rejectWriteReady!: (error: unknown) => void;\n const writeReady = new Promise<void>((resolve, reject) => {\n resolveWriteReady = resolve;\n rejectWriteReady = reject;\n });\n let resolveBootSettled!: () => void;\n let rejectBootSettled!: (error: unknown) => void;\n const bootSettled = new Promise<void>((resolve, reject) => {\n resolveBootSettled = resolve;\n rejectBootSettled = reject;\n });\n void localReadReady.catch(() => undefined);\n void writeReady.catch(() => undefined);\n void bootSettled.catch(() => undefined);\n // Idempotent settlers — a stage may be signalled by BOTH the ack fold and a milestone event (or by a\n // detach), and must settle exactly once. `localReadReady` never rejects (a local-read-core failure rejects\n // the attach handshake instead, so this client is never handed out).\n let writeReadySettled = false;\n let bootSettledSettled = false;\n const settleWriteReady = () => {\n if (writeReadySettled) return;\n writeReadySettled = true;\n resolveWriteReady();\n };\n const failWriteReady = (error: unknown) => {\n if (writeReadySettled) return;\n writeReadySettled = true;\n rejectWriteReady(error);\n };\n const settleBootSettled = () => {\n if (bootSettledSettled) return;\n bootSettledSettled = true;\n resolveBootSettled();\n };\n const failBootSettled = (error: unknown) => {\n if (bootSettledSettled) return;\n bootSettledSettled = true;\n rejectBootSettled(error);\n };\n\n // ─── Detach (explicit stop AND page teardown) ──────────────────────────────────────────────────────\n // The platform fires NO close event on a SharedWorker port — a tab that simply closes would leave its\n // subscriptions (and their per-write rerun cost) alive in the worker for the worker's whole lifetime\n // (ADR-0040 decision 1; surfaced by the two-tab board e2e). So the same detach runs from `stop()` AND from\n // `pagehide` with `persisted === false` — the terminal signal of a real close/navigate-away. A\n // bfcache-parked page (`persisted === true`) keeps its attachment: its port survives parking and resumes\n // on restore, so detaching there would strand the restored page. Idempotent — pagehide then stop is safe.\n //\n // Installed BEFORE the attach handshake is posted/awaited (ADR-0040 P2): a tab that closes DURING a slow\n // worker boot must still send `detach` and reject the pending attach-ack, rather than leaving the worker\n // holding stale port/token bookkeeping for a page that is already gone. Pre-ack every pending map below is\n // empty, so the settlement loops are no-ops except for the attach-ack rejection.\n const detachFromWorker = (): void => {\n if (detached) return;\n detached = true;\n status.isRunning = false;\n // Detach THIS tab; the worker engine keeps running for other tabs (ADR-0032 decision 2). Sent on the\n // CURRENT data port (ADR-0049: the pipe once swapped, else the control port).\n for (const queryId of diffHandlers.keys()) postBridgeMessage(currentDataPort(), codec, \"unsubscribe\", { queryId });\n diffHandlers.clear();\n activeSubscriptions.clear();\n postBridgeMessage(currentDataPort(), codec, \"detach\", null);\n // ADR-0049 D8: tell the SharedWorker ROUTER this tab is gone, on the CONTROL port — the `detach` above rode\n // the per-tab PIPE, which the router never sees, so its `tabCount` (the destroy peer-refusal input) would\n // otherwise never fall. A `pgx0049` control envelope (the router stays payload-blind); harmless on a\n // non-placement transport (ignored) and when the control port IS the data port (SW-direct).\n controlPort.postMessage(wrapControlEnvelope({ type: \"tab-detach\" }));\n // Settle every tab-side promise now the port listener is about to go (ADR-0040 P2) — otherwise an\n // operation still awaiting a worker reply hangs forever. RPCs and initial subscribes promise DATA, so\n // REJECT them (fabricating a value is worse than a clear failure); hydration and group-ready waiters are\n // DONENESS signals, so RESOLVE them (their awaiters are void-chained hook code that should settle, not\n // throw). The attach-ack is rejected too so a detach DURING boot rejects `attachSyncClient` (a no-op once\n // it has already settled).\n const settleAttachAck = pendingAttachAck;\n pendingAttachAck = null;\n settleAttachAck?.reject(detachError());\n // ADR-0041 (FIX A): reject EVERY still-pending readiness STAGE with ONE typed `ClientDisposedError`, so\n // `instanceof ClientDisposedError` behaves identically in worker and in-process mode (the class doc + the\n // in-process client already promise the typed error on disposal). `detachError()` stays for RPC/subscription\n // rejections below, where the more specific \"client detached\" message is useful for a data operation.\n // `localReadReady` is left as-is: pre-ack it never resolved (the attach itself rejected); post-ack it already\n // resolved. The `milestone-error` path is untouched — that is a genuine engine failure, not disposal.\n const disposedError = new ClientDisposedError();\n // ADR-0049: a detach BEFORE the first attach ack settles fails `attachSyncClient` (a detach-during-boot rejects\n // the attach rather than leaving it pending) — with the SAME \"client detached\" error the pre-firstAttachReady\n // handshake rejection used, preserving the ADR-0040 P2 contract (idempotent once the attach already resolved).\n failFirstAttach(detachError());\n failWriteReady(disposedError);\n failBootSettled(disposedError);\n // The attached `ready` had NO reject path — a detach BEFORE initial sync would otherwise leave\n // `client.ready` / `client.start()` pending forever. Settle it once with the same disposed error.\n if (!readyResolved) {\n readyResolved = true;\n rejectReady(disposedError);\n }\n for (const pending of rpcPending.values()) pending.reject(detachError());\n rpcPending.clear();\n clearAllOverdue();\n for (const pending of initialPending.values()) pending.reject(detachError());\n initialPending.clear();\n for (const resolve of hydratedPending.values()) resolve();\n hydratedPending.clear();\n for (const waiters of groupWaiters.values()) for (const resolve of waiters) resolve();\n groupWaiters.clear();\n // ADR-0049: queued handoff ops settle with the detach error (rule 5), and the placement timers are cleared.\n const queued = handoffQueue.splice(0);\n for (const item of queued) item.reject(detachError());\n clearQueueDeadline();\n // ADR-0049 step 10b: release this tab's leader-lock claim (invariant 2 — one claim per attachment, released\n // on detach). Idempotent; a no-op when this tab never elected (SW-direct / no factory).\n releaseElectionClaim?.();\n releaseElectionClaim = undefined;\n // Release this tab's ref on an ADOPTED shared coordinator (ref-counted registry cleanup); no-op otherwise.\n if (adoptedSharedCoordinatorStore !== undefined) {\n releaseSharedCoordinator(adoptedSharedCoordinatorStore);\n adoptedSharedCoordinatorStore = undefined;\n }\n if (silenceHandle !== undefined) {\n timers.clearTimeout(silenceHandle);\n silenceHandle = undefined;\n }\n if (pagehideListener) pageWindow?.removeEventListener(\"pagehide\", pagehideListener);\n // Tear down BOTH listeners: the bridge listener on the data port, the control listener on the control port.\n dataPort.removeEventListener(\"message\", listener);\n controlPort.removeEventListener(\"message\", controlListener);\n dataPort.close?.();\n if (controlPort !== dataPort) controlPort.close?.();\n };\n // Structural window guard — this file compiles without the DOM lib (it also runs under tests/workers).\n interface PageLifecycleWindowLike {\n addEventListener(type: \"pagehide\" | \"pageshow\", handler: (event: { persisted: boolean }) => void): void;\n removeEventListener(type: \"pagehide\" | \"pageshow\", handler: (event: { persisted: boolean }) => void): void;\n }\n const pageWindow = (globalThis as { window?: PageLifecycleWindowLike }).window;\n const pagehideListener = pageWindow\n ? (event: { persisted: boolean }) => {\n if (!event.persisted) detachFromWorker();\n }\n : undefined;\n if (pagehideListener) pageWindow?.addEventListener(\"pagehide\", pagehideListener);\n // ADR-0049 step 10b: the real page-lifecycle subscription the election coordinator's BFCache hooks use\n // (`pagehide.persisted` → release authority + retire; `pageshow` → re-queue + re-attach). Structural window\n // check, exactly like the detach `pagehide` above; injectable (`electionIo.pageLifecycle`) for tests.\n const pageLifecycle: CoordinatorDeps[\"pageLifecycle\"] =\n options.electionIo?.pageLifecycle ??\n (pageWindow\n ? {\n onPageHide: (listener) => pageWindow.addEventListener(\"pagehide\", (event) => listener(event.persisted)),\n onPageShow: (listener) => pageWindow.addEventListener(\"pageshow\", () => listener()),\n }\n : undefined);\n\n const initialToken = options.getToken ? await options.getToken() : null;\n // The testing memory-backend override travels as an explicit wire field, not the symbol marker — a symbol\n // does not survive `postMessage` structured clone (ADR-0036). Read it off the spread helper's options here.\n const memoryOverride = readTestStoreMarker(options) === \"memory\";\n // Restore (ADR-0035 decision 6): a `File`/`Blob` cannot cross as a transferable, so decompose it into a\n // zero-copy `ArrayBuffer` + name/mime (the `ExportArtefactWire` pattern in reverse) and list the buffer on\n // the attach `postMessage`'s transfer list. Read the bytes BEFORE building the payload (async).\n const restoreWire: RestoreArtefactWire | undefined = options.restoreFrom\n ? {\n buffer: await options.restoreFrom.arrayBuffer(),\n fileName: options.restoreFrom instanceof File ? options.restoreFrom.name : \"restore.pgdata.tar\",\n mimeType: options.restoreFrom.type || \"application/octet-stream\",\n }\n : undefined;\n // The attach payload builder — reused by the FIRST attach and every re-attach (pipe swap / reconnect). Restore\n // rides ONLY the one handshake that reaches the engine home (SW port in SW-direct, first pipe attach when\n // elected — see the send sites); `runAttachHandshake`'s `restoreConsumed` guard makes any later carry\n // structurally impossible (the buffer is transferred/detached, and you cannot restore into a running store).\n function buildAttachPayload(includeRestore: boolean): AttachPayload {\n return {\n token: initialToken,\n ...(options.storeId ? { storeId: options.storeId } : {}),\n ...(options.storePath ? { storePath: options.storePath } : {}),\n // ADR-0050: the wire storage declaration also rides the attach payload, so the ENGINE binds it\n // (durability included) wherever it runs — the pre-placement declaration message only steers placement.\n ...(options.storage ? { storage: options.storage } : {}),\n ...(memoryOverride ? { testStoreBackend: \"memory\" as const } : {}),\n ...(options.executionLimit ? { executionLimit: options.executionLimit } : {}),\n ...(includeRestore && restoreWire ? { restore: restoreWire } : {}),\n ...(options.syncEnabled != null || options.role != null || options.freshStore != null\n ? {\n config: {\n ...(options.syncEnabled != null ? { syncEnabled: options.syncEnabled } : {}),\n ...(options.role != null ? { role: options.role } : {}),\n ...(options.freshStore != null ? { freshStore: options.freshStore } : {}),\n },\n }\n : {}),\n };\n }\n // ─── ADR-0050 declaration-FIRST, then placement-query, then handshake ─────────────────────────────\n // Post the storage DECLARATION MESSAGE first — always, even empty (`{}` = \"no opinion\") — because a\n // registry-silent worker DEFERS its placement decision until the first declaration arrives (`backend:\n // \"idbfs\"` must skip the probe, so the declaration must precede the decision). Then the placement query\n // (ADR-0049): a router-only SharedWorker (elected-worker home) is payload-blind and DROPS the bridge\n // `attach`, so an SW-port ack could never gate the flow — but the bootstrap meta listener answers the\n // placement query in BOTH SW modes, so this reliably drives election. In SW-direct / declared-idbfs (and\n // the no-placement / plain-port case) the reply is `electionRequired: false` (or absent) and the SW-port\n // attach below acks normally — a plain in-scope host attach.\n controlPort.postMessage({ [DECLARATION_KEY]: options.storage ?? {} });\n controlPort.postMessage({ [PLACEMENT_QUERY_KEY]: true });\n // EVERY boot awaits the placement reply before the first handshake (ADR-0050). The worker only installs the\n // engine listener on this port once placement resolves and the port's declaration is accepted, so an attach\n // posted earlier would be refused as a protocol violation — and the reply's slot is also where a storage\n // DECLARATION REFUSAL arrives (typed boot failure instead of a reply). This costs no real latency: the old\n // fire-and-forget attach queued browser-side behind the very same placement decision. Restore-bearing boots\n // additionally depend on this ordering for artifact routing: the restore's ArrayBuffer detaches on first\n // post, and in elected mode the router-only SharedWorker silently DROPS bridge `attach` envelopes — so the\n // restore is carried on the SW-port handshake only when the in-scope host IS the engine (SW-direct /\n // declared-idbfs), and on the first per-tab PIPE handshake (`onConnectPort`) when the engine is elected.\n try {\n await placementKnown;\n } catch (error) {\n // A typed declaration refusal (never a plain transport error): run the full detach so both listeners and\n // the pagehide handler are removed, then propagate — the boot fails loudly with the refusal.\n detachFromWorker();\n throw error;\n }\n // Send the tab's attach handshake — placement is KNOWN here (awaited above). SW-direct / plain / no-reply:\n // the current data port reaches the in-scope engine, which acks it (restore included). Elected\n // (`electionRequired`): the engine-reaching handshake is the per-tab PIPE one (`onConnectPort`, or the\n // adoption handover of a stashed provision pipe); the SW-port post below is the router-dropped\n // fire-and-forget (payload-blind — never taught to answer bridge envelopes), kept so `firstAttachReady` can\n // settle off whichever port answers first. The ONE case that must not post is elected mode with the data\n // path ALREADY swapped onto an adopted pipe — there the post would reach the live engine as a DUPLICATE\n // attach (a second boot) instead of being dropped.\n const handshakePort = currentDataPort();\n if (placementResult?.electionRequired !== true || handshakePort === controlPort) {\n void runAttachHandshake(handshakePort, placementResult?.electionRequired !== true).catch(() => undefined);\n }\n try {\n await firstAttachReady;\n } catch (error) {\n // The engine boot failed (ADR-0032 FIX 1), a terminal pagehide rejected the ack mid-boot (ADR-0040 P2), or a\n // degraded election never delivered a pipe: run the full detach so BOTH listeners AND the pagehide handler are\n // removed (no leaks), then propagate. Idempotent — a pagehide that already detached makes this a cheap no-op.\n detachFromWorker();\n throw error;\n }\n status.isRunning = true;\n\n // ─── Live-rows seam (ADR-0032 S2 §4) ─────────────────────────────────────────────────────────────\n const subscribeLiveRows = async <TRow extends Record<string, unknown>>(\n input: SubscribeLiveRowsInput,\n onRows: (rows: TRow[]) => void,\n ): Promise<LiveRowsSubscription<TRow>> => {\n // A detached client has no port listener, so `live-initial` could never arrive — reject at once rather\n // than register a forever-pending initial waiter (ADR-0040 P2).\n if (detached) throw detachError();\n const queryId = newId(\"live\");\n const materializer = new LiveRowsMaterializer<TRow>(input.pkColumns);\n diffHandlers.set(queryId, (diff) => {\n onRows(materializer.apply(diff));\n });\n // The subscribe payload — reused by the initial subscribe AND by the ADR-0049 re-subscribe on a pipe swap.\n const subscribePayload = {\n queryId,\n sql: input.sql,\n params: [...input.params],\n ...(input.fields ? { fields: [...input.fields] } : {}),\n ...(input.pkColumns ? { pkColumns: [...input.pkColumns] } : {}),\n ...(input.use ? { use: [...input.use] } : {}),\n // Per-subscription keep-alive hint (ADR-0040 decision 4) forwarded to the worker's manager.\n ...(input.keepAliveMs != null ? { keepAliveMs: input.keepAliveMs } : {}),\n };\n let initial: LiveInitialPayload;\n try {\n initial = await new Promise<LiveInitialPayload>((resolve, reject) => {\n const id = newId(\"sub\");\n initialPending.set(id, { resolve, reject });\n // While the handoff window is open, QUEUE the subscribe (invariant 9); otherwise post at once.\n const dispatch = () => postBridgeMessage(currentDataPort(), codec, \"subscribe\", subscribePayload, id);\n if (windowOpen) {\n enqueue(dispatch, (error) => {\n initialPending.delete(id);\n reject(error);\n });\n } else {\n dispatch();\n }\n });\n } catch (error) {\n // The worker rejected the subscribe (invalid SQL, etc.); the initial-payload waiter rejected via the\n // `rpc-result` route (ADR-0032 FIX 2). Drop the pre-registered diff handler so no orphan survives.\n diffHandlers.delete(queryId);\n throw error;\n }\n const initialRows = materializer.seed(initial.rows as TRow[]);\n // Register the live query for ADR-0049 re-subscribe: on a pipe swap, re-issue the SAME subscribe (same\n // queryId → diffs still route to the same materializer/handler) and re-seed the materializer off the fresh\n // snapshot. This is the re-attach re-establishment of live queries (ADR-0041 staged readiness); its\n // multi-tab integration coverage is step 12. A rejected re-subscribe leaves the existing rows in place.\n const resubscribe = () => {\n const rid = newId(\"sub\");\n initialPending.set(rid, {\n resolve: (fresh) => {\n onRows(materializer.seed(fresh.rows as TRow[]));\n },\n reject: () => undefined,\n });\n postBridgeMessage(currentDataPort(), codec, \"subscribe\", subscribePayload, rid);\n };\n activeSubscriptions.set(queryId, { resubscribe });\n // Pending groups present → build the `hydrated` promise the worker settles via `live-hydrated` (posted\n // after the catch-up rows on the same port — rows-before-signal). A missing/empty `hydratingTables`\n // means every referenced group (eager OR lazy) was already ready (steady state) or sync is disabled:\n // no hydration is pending, so no promise. Resolved on unsubscribe too, so an abandoned subscription\n // never leaves a forever-pending promise behind.\n let hydrated: Promise<void> | undefined;\n if (initial.hydratingTables && initial.hydratingTables.length > 0) {\n hydrated = new Promise<void>((resolve) => {\n hydratedPending.set(queryId, resolve);\n });\n }\n return {\n initialRows,\n unsubscribe: () => {\n diffHandlers.delete(queryId);\n activeSubscriptions.delete(queryId);\n hydratedPending.get(queryId)?.();\n hydratedPending.delete(queryId);\n postBridgeMessage(currentDataPort(), codec, \"unsubscribe\", { queryId });\n },\n // The lazy relations the worker's guard activated for this query (observability). `hydrated` — driven\n // by `hydratingTables`, not this — resolves once every pending group's caught-up rows are delivered.\n ...(initial.lazyTables ? { lazyTables: initial.lazyTables } : {}),\n ...(hydrated ? { hydrated } : {}),\n };\n };\n\n // ─── Assembled client ────────────────────────────────────────────────────────────────────────────\n const notSupported = (name: string) => (): never => {\n throw new Error(\n `[pgxsinkit] ${name} is not available on a worker-attached client: the tab holds no local PGlite. ` +\n `Direct store access (client.pglite) and store-lifecycle ops (destroy/dropReadCache) have no tab-local ` +\n `implementation. One-shot Drizzle reads (query/queryRow/queryRaw/queryRawRow), lazy activation ` +\n `(ensureSynced), and the write API ARE proxied to the worker.`,\n );\n };\n\n // A tab has no local store to run a read transaction against — every bridge executor's `transaction` throws.\n const noBridgeTransaction = (): never => {\n throw new Error(\n \"[pgxsinkit] client.drizzle.transaction() is not available on a worker-attached client: a read \" +\n \"transaction needs a local PGlite the tab does not have. Use one-shot reads (client.query) instead.\",\n );\n };\n // The ONE encoder of the `guardedQuery` positional wire tuple ({@link GuardedQueryWireArgs}): both tab-side\n // senders (the bridge executor below and `guardedRawQuery`) route through this so the shape is written once\n // and shares its contract with the worker-side decoder (`defineSyncWorker` types the decode against the same\n // type). The optional trailing `use` is appended only when present — never a spread of `undefined`.\n const guardedQueryArgs = (\n sql: string,\n params: unknown[] | undefined,\n rowMode: \"array\" | \"object\" | undefined,\n use?: readonly string[],\n ): GuardedQueryWireArgs => {\n // `rowMode` is only included when set (exactOptionalPropertyTypes: no `{ rowMode: undefined }`).\n const options = rowMode ? { rowMode } : {};\n return use ? [sql, params, options, use] : [sql, params, options];\n };\n // A `ClientPGlite`-shaped bridge executor Drizzle runs reads against (ADR-0032 decision 4). Drizzle's pglite\n // driver calls only `client.query` for reads and `client.transaction` for `.transaction()`. `query` routes\n // to the worker's `guardedQuery` RPC (stripping drizzle's non-serializable `parsers` to just `rowMode`; the\n // worker re-applies drizzle's identity parsers) and returns the full `Results` so Drizzle's mapping runs on\n // the tab. `use` (a raw-fragment's undetectable lazy relations, ADR-0021) is baked into the closure per read —\n // see `bridgeReadDrizzle` — NOT stashed on a shared field: a shared stash races, because Drizzle executes\n // the builder in a microtask AFTER `queryRaw` returns, so a plain `query` issued synchronously in between\n // would drain its executor first and consume the wrong call's `use`. A per-read scoped executor cannot\n // cross-contaminate.\n const makeBridgeExecutor = (use?: readonly string[]): ClientPGlite =>\n ({\n query: (sql: string, params?: unknown[], options?: { rowMode?: \"array\" | \"object\" }): Promise<Results> =>\n rpc<Results>(\"guardedQuery\", guardedQueryArgs(sql, params, options?.rowMode, use)),\n transaction: noBridgeTransaction,\n }) as unknown as ClientPGlite;\n // The base (no-`use`) bridge database `client.drizzle` exposes, plus the cached factory that mints a fresh\n // database over a per-read `use`-carrying executor (the schema/relations are computed ONCE, ADR-0032\n // decision 4). `views` are unchanged.\n const { drizzle, views, drizzleFor } = buildRegistryReadHandles(options.registry, makeBridgeExecutor());\n // Build a `use`-scoped Drizzle for one `queryRaw`/`queryRawRow` call and run its builder against a shallow\n // clone of the client whose `drizzle` is that scoped db. The clone is safe: every client method is an arrow\n // closing over this scope (no `this`), so spreading preserves behaviour and only `drizzle` is swapped.\n const bridgeReadDrizzle = (use?: readonly string[]) => drizzleFor(makeBridgeExecutor(use));\n\n const groupKeyForTable = (table: SyncTableName<TRegistry>): string | undefined => {\n const entry = options.registry[table];\n return entry?.consistencyGroup ?? entry?.shape?.shapeKey;\n };\n\n const client: AttachedSyncClient<TRegistry> = {\n drizzle,\n views,\n // The tab has no local PGlite; reads go through the live-rows bridge. Touching `.pglite` is a misuse\n // — the real trap is installed as a NON-ENUMERABLE throwing getter after this literal (see below).\n pglite: undefined as never,\n tables: Object.fromEntries(\n Object.keys(options.registry).map((tableKey) => [\n tableKey,\n {\n key: tableKey,\n mode: options.registry[tableKey as SyncTableName<TRegistry>]!.mode,\n create: (input: unknown) => rpc<void>(\"create\", [tableKey, input]),\n update: (entityKey: Record<string, string>, patch: unknown) =>\n rpc<void>(\"update\", [tableKey, entityKey, patch]),\n delete: (entityKey: Record<string, string>) => rpc<void>(\"delete\", [tableKey, entityKey]),\n },\n ]),\n ) as SyncClient<TRegistry>[\"tables\"],\n localReadReady,\n writeReady,\n bootSettled,\n ready,\n status,\n start: async () => {\n await ready;\n },\n // The tab facade holds no local engine — its \"activity\" is the worker bridge. Synchronously detaching it\n // (idempotent, no await) IS the tab-side halt: it stops posting/subscribing on the pipe and settles every\n // pending promise, the analogue of aborting the in-process engine's streams. `stop()` does the same.\n haltActivity: () => {\n detachFromWorker();\n },\n stop: async () => {\n detachFromWorker();\n },\n // ADR-0049 step 10b — SUPERVISED destroy from the attached facade. The SUPERVISOR is the TAB context, which\n // survives engine shutdown BY CONSTRUCTION: it detaches the engine, then runs the destructive lifecycle\n // itself (the tab has full OPFS/IndexedDB access). Ordering, per the plan's D8 fault rows:\n // 1. PEER REFUSAL FIRST — the SharedWorker alone knows the attached-tab count; more than one tab attached\n // (this one + a peer) → `StoreDestroyRefusedError` (close peers first). Runs BEFORE detach + any effect.\n // 2. REFUSE-IF-OWED (unless `force`) — a cheap journal read via the `diagnostics` RPC while still attached\n // (one round-trip; the honest minimum — the tab has no local journal). `force` skips it.\n // 3. DETACH, then run the destruction (set `deleting` → delete sentinel → delete backend store → delete\n // meta record) with a bounded ownership-lock-lag retry on the backend delete (the just-detached engine's\n // VFS ownership lock may lag). The initiating call resolves from the tab supervisor (invariant 13).\n destroy: async (destroyOptions) => {\n if (detached) throw detachError();\n const peers = await queryDestroyPeers();\n if (peers > 1) throw new StoreDestroyRefusedError(peers);\n if (!destroyOptions?.force) {\n const { mutation } = await client.diagnostics();\n const owed =\n mutation.pendingCount +\n mutation.sendingCount +\n mutation.failedCount +\n mutation.quarantinedCount +\n mutation.conflictedCount;\n if (owed > 0) {\n throw new Error(\n `destroy() refused: ${owed} mutation(s) still owed to the server. Flush them first or call destroy({ force: true }).`,\n );\n }\n }\n const storePath = resolveDestroyStorePath();\n // ADR-0049 D8 ordering (elected placement): RETIRE this tab's own elected engine and AWAIT its teardown —\n // the point its EXCLUSIVE OPFS sync-access handle is provably released — BEFORE deleting. The engine is a\n // dedicated Worker torn down ASYNCHRONOUSLY via the coordinator's retirement handshake; without this\n // barrier `deleteBackendStore` raced that release and failed `NoModificationAllowedError`. Run it while the\n // control channel is still up (before detach closes the SW port). A no-op when this tab holds no engine.\n if (electionCoordinator !== undefined) await electionCoordinator.retireEngine();\n else await awaitSharedHostTeardown();\n // Detach the engine FIRST — the supervisor is this tab, which outlives the engine. Idempotent.\n detachFromWorker();\n const effects = options.createDestructionEffects?.(storePath) ?? createStoreDestructionEffects(storePath);\n await runStoreDestruction(effects);\n },\n dropReadCache: notSupported(\"client.dropReadCache\"),\n flush: (table) => rpc<void>(\"flush\", [table]),\n reconcile: (table) => rpc<void>(\"reconcile\", [table]),\n retryFailed: (table) => rpc<void>(\"retryFailed\", [table]),\n recoverSending: (table) => rpc<void>(\"recoverSending\", [table]),\n readMutationDetails: (table) => rpc<MutationDetail[]>(\"readMutationDetails\", [table]),\n // Inspection reads run in the worker (ADR-0032 S2) — the same surface as the in-process client. `pglite`\n // itself stays blocked (below); these route the raw statement over the RPC round-trip instead.\n rawQuery: (sql, params, options) => rpc<Results>(\"rawQuery\", [sql, params, options]),\n rawExec: (sql, options) => rpc<Results[]>(\"rawExec\", [sql, options]),\n // The GUARDED raw-SQL read (ADR-0032 decision 4) — the seam the worker host dispatches `guardedQuery` to.\n // Unlike `rawQuery` (raw inspection, no guard), this routes to the worker's `guardedRawQuery`, so the read\n // gate + lazy-group guard run worker-side. Only `rowMode` crosses in the options (see the bridge executor).\n guardedRawQuery: (sql, params, options, use) =>\n rpc<Results>(\"guardedQuery\", guardedQueryArgs(sql, params, options?.rowMode, use)),\n mutate: {\n create: (table, input) => rpc<void>(\"create\", [table, input]),\n update: (table, entityKey, patch) => rpc<void>(\"update\", [table, entityKey, patch]),\n delete: (table, entityKey) => rpc<void>(\"delete\", [table, entityKey]),\n batch: (items) => rpc<void>(\"batch\", [items]),\n },\n discardConflict: (table, entityKey) => rpc<void>(\"discardConflict\", [table, entityKey]),\n discardQuarantined: (table, entityKey) => rpc<void>(\"discardQuarantined\", [table, entityKey]),\n diagnostics: (table) => rpc<{ mutation: MutationDiagnostics }>(\"diagnostics\", [table]),\n // The registry-wide mutation-status API (slice 4) over the SAME factory the in-process client uses,\n // wired to this facade's shared seams: the live-rows bridge (`subscribeLiveRows`) and the one-shot\n // `rawQuery` RPC. No new bridge message — `client.mutations` behaves identically to the in-process client.\n mutations: createMutationsApi({\n registry: options.registry,\n subscribeLiveRows,\n query: (sql, params) => rpc<Results>(\"rawQuery\", [sql, params]),\n }),\n // One-shot Drizzle reads (ADR-0032 decision 4) — proxied, mirroring the in-process shapes exactly. `build`\n // runs against a client whose `drizzle` is a bridge database, so awaiting the builder executes the read via\n // the `guardedQuery` RPC: the read gate + lazy-group guard run worker-side (no tab-side `prepareQuery`) and\n // Drizzle's own mapping runs on the tab. The pure `query`/`queryRow` need no `use` (the worker's SQL scan\n // finds every relation) and run against the base `client`. `queryRaw`/`queryRawRow` may embed a raw\n // fragment naming a lazy relation the scan cannot see, so each runs against a `{ ...client, drizzle }`\n // clone whose drizzle carries THAT call's `use` in its own executor — no shared state, no cross-read race.\n query: (build) => Promise.resolve(build(client)),\n queryRow: async (build) => {\n const rows = await build(client);\n return rows[0] ?? null;\n },\n queryRaw: ({ build, use }) => Promise.resolve(build({ ...client, drizzle: bridgeReadDrizzle(use) })),\n queryRawRow: async ({ build, use }) => {\n const rows = await build({ ...client, drizzle: bridgeReadDrizzle(use) });\n return rows[0] ?? null;\n },\n // Lazy activation (ADR-0021) over the shared engine — a plain RPC. Activation is engine-WIDE, but unlike\n // `desync` it is additive and idempotent: starting a group another tab already activated is a no-op, and\n // it never reverts or truncates, so there is no cross-tab footgun. Resolves once the group's stream is\n // started (catch-up may still be in flight — await `groupReady` for that), exactly as in-process.\n ensureSynced: (keys) => rpc<void>(\"ensureSynced\", [keys]),\n // `isSynced` is the SYNCHRONOUS peek in-process (`isTableStarted` — is the group's stream STARTED). It\n // cannot be an RPC (its signature returns a boolean, not a promise), and the tab's cached state cannot\n // answer it: the bridge delivers per-group CATCH-UP readiness (`status.groups` / `groupReady`), which is\n // strictly weaker than activation-started — an activated-but-not-yet-caught-up lazy group reads as\n // not-ready, the very case `isSynced` exists to distinguish. So no faithful synchronous answer is derivable.\n isSynced: () => {\n throw new Error(\n \"[pgxsinkit] client.isSynced is not available on a worker-attached client: it is a SYNCHRONOUS \" +\n \"activation-STARTED peek (in-process: isTableStarted), but the tab caches only per-group CATCH-UP \" +\n \"readiness (status.groups / groupReady) — an activated-but-not-caught-up group reads as not-ready — \" +\n \"so a faithful synchronous answer cannot be derived, and a synchronous method cannot be an RPC. Use \" +\n \"client.groupReady(table) for catch-up completion, and client.ensureSynced([...]) to activate a lazy relation.\",\n );\n },\n // In SharedWorker mode the engine is SHARED, so a desync from one tab reverts the consistency group for\n // EVERY attached tab — inherent to desync's group-wide semantics (that footgun is why the narrower\n // `discardEphemeral` exists). The RPC runs the worker's real `desync` (same refusals as in-process).\n desync: (key) => rpc<void>(\"desync\", [key]),\n // Scoped, multi-tab-safe finalize (ADR-0021): drops an ephemeral relation's local rows and reverts it to\n // dormant. Safe under a shared engine because an ephemeral window is per-delivery-session and inherently\n // single-consumer; the RPC runs the worker's real `discardEphemeral` (refuses persistent members).\n discardEphemeral: (key) => rpc<void>(\"discardEphemeral\", [key]),\n // The worker activates lazy relations inside its `subscribe` handler (via the `use` hint), so the tab's\n // `prepareQuery` is a no-op — the live-rows subscription is already guarded worker-side (ADR-0021).\n // Empty `lazyTables`: the real scan's keys travel back on the subscription itself (`live-initial`).\n prepareQuery: async () => ({ lazyTables: [] }),\n // The worker computes the pending hydrating tables inside its `subscribe` handler (on its owned client)\n // and reports them back on `live-initial` (`hydratingTables`), so the tab-side seam is a no-op here.\n hydratingTablesFor: () => [],\n transaction: async ({ mode }: { mode: WriteMode }, run) => {\n // Collect the unit's mutations tab-side (the run callback cannot cross the wire), then RPC the\n // serialized items + mode; the worker replays them into a real `client.transaction` (matching acks).\n const collected: MutationBatchItem<TRegistry>[] = [];\n const txTables = Object.fromEntries(\n Object.keys(options.registry).map((tableKey) => [\n tableKey,\n {\n create: (input: unknown) => {\n collected.push({ table: tableKey, kind: \"create\", input } as MutationBatchItem<TRegistry>);\n },\n update: (entityKey: Record<string, string>, patch: unknown) => {\n collected.push({ table: tableKey, kind: \"update\", entityKey, patch } as MutationBatchItem<TRegistry>);\n },\n updateBlind: (entityKey: Record<string, string>, patch: unknown) => {\n // ADR-0022 addendum: the `blind` flag rides the serialized item across the wire; the worker\n // replays it through `client.transaction`'s `updateBlind`, identical to the in-process client.\n collected.push({\n table: tableKey,\n kind: \"update\",\n entityKey,\n patch,\n blind: true,\n } as MutationBatchItem<TRegistry>);\n },\n delete: (entityKey: Record<string, string>) => {\n collected.push({ table: tableKey, kind: \"delete\", entityKey } as MutationBatchItem<TRegistry>);\n },\n },\n ]),\n ) as SyncTransaction<TRegistry>[\"tables\"];\n await run({ tables: txTables });\n if (collected.length === 0) return { acks: [] };\n return rpc<SyncTransactionResult>(\"transaction\", [{ mode, items: collected }]);\n },\n groupReady: async (table) => {\n // A detached client will never receive further `groupReady`/status edges — reject at once rather than\n // register a waiter that detach already drained (ADR-0040 P2).\n if (detached) throw detachError();\n const groupKey = groupKeyForTable(table);\n if (groupKey == null || readyGroups.has(groupKey)) return;\n await new Promise<void>((resolve) => {\n const waiters = groupWaiters.get(groupKey) ?? [];\n waiters.push(resolve);\n groupWaiters.set(groupKey, waiters);\n });\n },\n subscribeLiveRows,\n // Boot observability (ADR-0034): pull the worker engine's stored boot report over the bridge — returns\n // the same report regardless of when this tab attached (a late tab reads a boot that predates it).\n bootReport: () => rpc<BootReport | null>(\"bootReport\", []),\n // Live-query diagnostics (ADR-0040 decision 5): pull the worker manager's per-entry snapshot over the\n // bridge (digests + counts only — plain objects that structured-clone across the wire).\n liveQueryDiagnostics: () => rpc<LiveQueryDiagnostics[]>(\"liveQueryDiagnostics\", []),\n // Store backup (ADR-0035): the worker runs the live export on its owned client (its lifecycle slot\n // serialises it against every tab). The dump crosses back as a transferred `ArrayBuffer`; rebuild the\n // `File` tab-side from the wire form — NOT in the notSupported set (unlike the local `pglite` reads).\n exportStore: async (exportOptions?: StoreExportOptions): Promise<StoreExportResult> => {\n const wire = await rpc<ExportArtefactWire>(\"exportStore\", [exportOptions]);\n return {\n file: new File([wire.buffer], wire.fileName, { type: wire.mimeType }),\n // The wire carries the discriminated union; `exportStore` always round-trips a store-backup report.\n report: wire.report as StoreExportResult[\"report\"],\n };\n },\n // Diagnostic dump (ADR-0035): the worker runs the throwaway-clone dump on its owned client (same\n // lifecycle slot as every tab). The SQL crosses back as the same transferred `ArrayBuffer`; rebuild the\n // `File` tab-side. NOT in the notSupported set (unlike the local `pglite` reads).\n exportDiagnostics: async (exportOptions?: DiagnosticExportOptions): Promise<DiagnosticExportResult> => {\n const wire = await rpc<ExportArtefactWire>(\"exportDiagnostics\", [exportOptions]);\n return {\n file: new File([wire.buffer], wire.fileName, { type: wire.mimeType }),\n // The wire carries the discriminated union; `exportDiagnostics` always round-trips a diagnostic-dump report.\n report: wire.report as DiagnosticExportResult[\"report\"],\n };\n },\n // Data export (ADR-0035): the worker runs the drain-guarded `pg_dump -t` export on its owned client (same\n // lifecycle slot as every tab). The portable SQL crosses back as the same transferred `ArrayBuffer`;\n // rebuild the `File` tab-side. A `DataExportDrainError` surfaces as the rejected RPC (deserialised tab-side).\n exportData: async (exportOptions?: DataExportOptions): Promise<DataExportResult> => {\n const wire = await rpc<ExportArtefactWire>(\"exportData\", [exportOptions]);\n return {\n file: new File([wire.buffer], wire.fileName, { type: wire.mimeType }),\n // The wire carries the discriminated union; `exportData` always round-trips a data-export report.\n report: wire.report as DataExportResult[\"report\"],\n };\n },\n notifyAuthChanged: () => {\n void pushToken();\n },\n setOnline: (online: boolean) => {\n postBridgeMessage(currentDataPort(), codec, \"set-online\", { online });\n },\n };\n\n // The `pglite` misuse trap MUST be a NON-ENUMERABLE throwing getter, never an enumerable property\n // holding a throw-on-get Proxy: host tooling reflects over the client wherever the app hands it around\n // (React 19.2's dev-build render logging serializes prop diffs property-by-property — observed crashing\n // a <SyncClientProvider client={...}> re-render — and console inspection / object spreads do the same),\n // and an enumerable trap turns that passive reflection into a crash. Non-enumerable keeps the trap out\n // of every enumeration path while a direct `client.pglite` touch still throws the misuse error.\n Object.defineProperty(client, \"pglite\", {\n get: notSupported(\"client.pglite\"),\n enumerable: false,\n configurable: true,\n });\n\n return client;\n}\n\n/** {@link provisionSyncWorker} options — attach's transport/store/factory seams, plus the provision expiry. */\nexport type ProvisionSyncWorkerOptions<TRegistry extends SyncTableRegistry> = Pick<\n AttachSyncClientOptions<TRegistry>,\n | \"worker\"\n | \"port\"\n | \"storeId\"\n | \"storePath\"\n | \"storage\"\n | \"codec\"\n | \"createEngineWorker\"\n | \"electionIo\"\n | \"awaitOwnershipRelease\"\n | \"timers\"\n> & {\n /**\n * How long (ms) the elected-mode provision claim (and its shared-coordinator ref) is held before an abandoned\n * warmed provision auto-retires (ADR-0049 step 8, \"abandoned warmed provision → claim expiry\"). Default 60000.\n * A later {@link attachSyncClient} on the same store ADOPTS the grant within this window (adding its own claim,\n * so the engine outlives the expiry). Inert on SW-direct.\n */\n provisionExpiryMs?: number;\n};\n\n/**\n * Pre-spawn a worker's store WITHOUT attaching (ADR-0032 decision 5). Sent at the board's login screen against a\n * freshly-named spare `SharedWorker`: the worker runs PGlite `create`/initdb only and holds the raw store idle\n * until the real {@link attachSyncClient} claim adopts it. Resolves when the worker acks the provision (its initdb\n * settled); rejects only if the worker reports the create failed — the caller treats either outcome as best-effort,\n * since attach falls back to a fresh create regardless.\n *\n * Routed through the SAME placement-query-first flow as {@link attachSyncClient} (ADR-0049 step 8): a SW-direct\n * (or declared-idbfs) SharedWorker takes the `provision` bridge envelope on the SW port; a\n * router-only (`electionRequired`) SharedWorker DROPS bridge envelopes, so provision drives the election\n * coordinator's PROVISION CLAIM (expiry-bounded) and delivers the `provision` over the elected engine's per-tab\n * PIPE. The coordinator is REGISTERED per store so a later attach on the same tab ADOPTS the grant — no second\n * lock, no second engine, no double initdb (invariant 2). Elected mode REQUIRES a {@link createEngineWorker}\n * factory (mirroring attach); its absence is a clear rejection, never a hang.\n */\nexport function provisionSyncWorker<const TRegistry extends SyncTableRegistry>(\n options: ProvisionSyncWorkerOptions<TRegistry>,\n): Promise<void> {\n const codec = options.codec ?? identityCodec;\n const port = resolvePort(options);\n const timers: AttachClientTimers = options.timers ?? {\n setTimeout: (fn, ms) => globalThis.setTimeout(fn, ms),\n clearTimeout: (handle) => globalThis.clearTimeout(handle as ReturnType<typeof globalThis.setTimeout>),\n };\n const storePath = options.storePath ?? options.storeId ?? \"pgxsinkit-overlay-v1\";\n // The testing memory-backend override travels as an explicit wire field (a symbol does not survive structured\n // clone, ADR-0036) — read it off the spread helper's options and forward it to the worker.\n const memoryOverride = readTestStoreMarker(options) === \"memory\";\n const provisionPayload = {\n ...(options.storeId ? { storeId: options.storeId } : {}),\n ...(options.storePath ? { storePath: options.storePath } : {}),\n // ADR-0050: the wire storage declaration rides the provision payload too, so the mint's durability comes\n // from the store's bound declaration wherever the engine runs.\n ...(options.storage ? { storage: options.storage } : {}),\n ...(memoryOverride ? { testStoreBackend: \"memory\" as const } : {}),\n };\n const pageLifecycle = readDefaultPageLifecycle();\n\n const provision = new Promise<void>((resolve, reject) => {\n let settled = false;\n const ackRemovers: Array<() => void> = [];\n const controlListener = (event: { data: unknown; ports?: readonly BridgePort[] }): void => {\n const placement = readPlacementResult(event.data);\n if (placement !== undefined) {\n onPlacement(placement);\n return;\n }\n // ADR-0050: the worker refused this provision's storage declaration — it arrives in place of the\n // placement reply, so the provision fails typed and loudly (never a hang, never a silent mode).\n const declarationRefusal = readDeclarationRefusal(event.data);\n if (declarationRefusal !== undefined) {\n settle(() => reject(new StorageDeclarationRefusedError(declarationRefusal.message)));\n return;\n }\n const control = readControlEnvelope(event.data);\n if (control?.type === \"connect-port\") onProvisionPipe(event.ports?.[0], control.identity);\n };\n const settle = (fn: () => void): void => {\n if (settled) return;\n settled = true;\n port.removeEventListener(\"message\", controlListener);\n for (const remove of ackRemovers) remove();\n fn();\n };\n\n // Await `provision-ack` on whichever port carries it: the SW port (SW-direct) or the elected engine's pipe.\n // In elected mode the SW-port `provision` is dropped by the router, so its ack never comes — the pipe's does.\n const awaitAckOn = (ackPort: BridgePort): void => {\n const ackListener = (message: { data: unknown }): void => {\n if (!isBridgeEnvelope(message.data) || message.data.type !== \"provision-ack\") return;\n const ack = codec.decode(message.data.payload) as ProvisionAckPayload;\n settle(() => (ack.ok ? resolve() : reject(new Error(ack.error?.message ?? \"worker provision failed\"))));\n };\n ackPort.addEventListener(\"message\", ackListener);\n ackPort.start?.();\n ackRemovers.push(() => ackPort.removeEventListener(\"message\", ackListener));\n };\n const postProvisionOn = (target: BridgePort): void => {\n awaitAckOn(target);\n postBridgeMessage(target, codec, \"provision\", provisionPayload);\n };\n\n let placementDecided = false;\n let piped = false;\n const onProvisionPipe = (pipe: BridgePort | undefined, identity: EngineIdentity): void => {\n if (piped || pipe === undefined) return;\n piped = true;\n // The router piped this provision connection to the elected engine — deliver the `provision` over the pipe,\n // and STASH the pipe on the shared coordinator entry: the router mints one pipe per SW connection, so when a\n // later attach adopts this grant on the SAME port (the board's ordered-messages contract) it must receive\n // THIS pipe by handover — no second `connect-port` will ever arrive for an already-piped tab.\n stashProvisionPipe(storePath, pipe, identity);\n postProvisionOn(pipe);\n };\n\n const onPlacement = (result: PlacementQueryResult): void => {\n if (placementDecided) return;\n placementDecided = true;\n // SW-direct (or a plain host, which answers the placement query itself): the worker installs the engine\n // listener on this port only once placement resolves and the declaration is accepted (ADR-0050), so the\n // `provision` is posted NOW — on the reply — never fire-and-forget before it.\n if (!result.electionRequired) {\n postProvisionOn(port);\n return;\n }\n // Elected (router-only): the SW drops the `provision` bridge envelope, so ELECT and provision over the pipe.\n // Resolve the engine factory exactly as attach does — the `createEngineWorker` override, else the default\n // derived from the SharedWorker's reported script URL (dual-scope entry). Neither available → a WIRING failure.\n const engineFactory = options.createEngineWorker ?? deriveEngineWorkerFactory(result.swScriptUrl);\n if (engineFactory === undefined) {\n settle(() =>\n reject(\n new ElectedEngineUnconstructibleError(\n result.swScriptUrl === undefined\n ? \"provisionSyncWorker: the SharedWorker reported no derivable script URL and no `createEngineWorker` override was supplied\"\n : \"provisionSyncWorker: no `Worker` constructor is available in this scope to derive the module engine and no override was supplied\",\n ),\n ),\n );\n return;\n }\n const provisionSwFactory = workerFactoryOf(options.worker);\n const coordinator = adoptOrRegisterCoordinator(storePath, () =>\n buildElectedCoordinator({\n storePath,\n controlPort: port,\n createEngineWorker: engineFactory,\n ...(provisionSwFactory ? { swFactory: provisionSwFactory } : {}),\n ...(options.storage ? { storage: options.storage } : {}),\n ...(options.electionIo ? { electionIo: options.electionIo } : {}),\n ...(options.awaitOwnershipRelease ? { awaitOwnershipRelease: options.awaitOwnershipRelease } : {}),\n timers,\n ...(pageLifecycle ? { pageLifecycle } : {}),\n }),\n );\n // The PROVISION CLAIM elects → the coordinator spawns the engine + announces; the router pipes this\n // connection (→ `onProvisionPipe`). Bound by expiry: an abandoned warmed provision auto-retires (its claim\n // AND its shared-coordinator ref release together), so a store nobody adopts never pins the leader lock.\n const releaseProvisionClaim = coordinator.claimForProvision();\n const expiryMs = options.provisionExpiryMs ?? 60_000;\n let released = false;\n const expiryHandle = timers.setTimeout(() => {\n if (released) return;\n released = true;\n const entry = sharedCoordinators.get(storePath);\n if (entry?.releaseProvision === releaseProvision) delete entry.releaseProvision;\n releaseProvisionClaim();\n releaseSharedCoordinator(storePath);\n }, expiryMs);\n const releaseProvision = (): void => {\n if (released) return;\n released = true;\n timers.clearTimeout(expiryHandle);\n releaseProvisionClaim();\n };\n setProvisionRelease(storePath, releaseProvision);\n };\n\n port.addEventListener(\"message\", controlListener);\n port.start?.();\n // Declaration-FIRST, then placement query (ADR-0050, mirroring attach): the declaration message unblocks a\n // registry-silent worker's deferred placement decision, and the query is answered in BOTH SW modes by the\n // bootstrap meta listener. The `provision` itself is posted ON the placement reply (`onPlacement`): SW-direct\n // takes it on this port; a router-only SW would drop it, so elected mode delivers it over the pipe instead.\n port.postMessage({ [DECLARATION_KEY]: options.storage ?? {} });\n port.postMessage({ [PLACEMENT_QUERY_KEY]: true });\n });\n return provision;\n}\n\n/** Resolve the default page-lifecycle subscription off `globalThis.window` (structural, no DOM lib) — for the\n elected provision coordinator's BFCache hooks; `undefined` in a non-window scope. Mirrors the attach client. */\nfunction readDefaultPageLifecycle(): CoordinatorDeps[\"pageLifecycle\"] {\n interface PageLifecycleWindowLike {\n addEventListener(type: \"pagehide\" | \"pageshow\", handler: (event: { persisted: boolean }) => void): void;\n }\n const pageWindow = (globalThis as { window?: PageLifecycleWindowLike }).window;\n if (!pageWindow) return undefined;\n return {\n onPageHide: (listener) => pageWindow.addEventListener(\"pagehide\", (event) => listener(event.persisted)),\n onPageShow: (listener) => pageWindow.addEventListener(\"pageshow\", () => listener()),\n };\n}\n\n/**\n * Resolve the transport port from the options: an explicit port, or a worker input (ADR-0049 D5) that is EITHER a\n * FACTORY `() => WorkerLike` (invoked here for a fresh instance — the reconnect/reconstruct callers pass the factory\n * so each call yields a new SharedWorker) OR a bare instance. From the instance: a SharedWorker's `.port`, or a\n * Worker itself (which IS the port).\n */\nfunction resolvePort(options: { port?: BridgePort; worker?: (() => WorkerLike) | WorkerLike }): BridgePort {\n if (options.port) return options.port;\n const worker = typeof options.worker === \"function\" ? (options.worker as () => WorkerLike)() : options.worker;\n if (!worker) throw new Error(\"attachSyncClient: provide a `worker` or a `port`.\");\n if (worker.port) return worker.port;\n if (worker.postMessage && worker.addEventListener && worker.removeEventListener) {\n return worker as BridgePort;\n }\n throw new Error(\"attachSyncClient: the provided `worker` is neither a Worker nor a SharedWorker port.\");\n}\n\n/**\n * The SharedWorker reconstruction FACTORY, or `undefined` when the input is a bare instance/port (ADR-0049 D5). A\n * factory input (`worker: () => SharedWorker`) makes SharedWorker-death recovery a guarantee — the bridge-silence\n * reconnect and the keepalive reconstruction re-invoke it. A bare-instance input has none: reconstruction is\n * structurally unavailable (a SharedWorker cannot be rebuilt from itself), so those paths are simply not armed.\n */\nfunction workerFactoryOf(worker: (() => WorkerLike) | WorkerLike | undefined): (() => WorkerLike) | undefined {\n return typeof worker === \"function\" ? (worker as () => WorkerLike) : undefined;\n}\n\n/**\n * Auto-derive the elected engine worker factory from the SharedWorker's reported script URL (ADR-0049 D5). The\n * worker entry is dual-scope, so `new Worker(swScriptUrl, { type: \"module\" })` boots the SAME entry as a dedicated\n * engine — no consumer wiring. Returns `undefined` when there is no derivable URL or no `Worker` constructor in\n * scope (a plain test scope); the caller then requires the `createEngineWorker` override or fails typed.\n */\nfunction deriveEngineWorkerFactory(swScriptUrl: string | undefined): (() => ElectedEngineWorker) | undefined {\n if (swScriptUrl === undefined) return undefined;\n const WorkerCtor = (globalThis as { Worker?: new (url: string, options?: { type?: \"module\" }) => WorkerLike }).Worker;\n if (WorkerCtor === undefined) return undefined;\n return () => wrapEngineWorker(new WorkerCtor(swScriptUrl, { type: \"module\" }));\n}\n\n/**\n * Rebuild an Error from the bridge's serialized {@link BridgeErrorWire} shape, carrying `name` and `detail`\n * through. Restoring `name` is what keeps a typed worker-side failure (e.g. a restore refused with\n * `RestoreTargetExistsError`) detectable by the consumer without message matching.\n */\nfunction rebuildError(error: RpcResultPayload[\"error\"]): Error {\n if (error && \"detail\" in error) {\n const mismatch = executionLimitMismatchFromWire(error.detail);\n if (mismatch !== undefined) return mismatch;\n }\n const rebuilt = new Error(error?.message ?? \"worker rpc failed\");\n if (error?.name !== undefined) {\n rebuilt.name = error.name;\n }\n if (error && \"detail\" in error && error.detail !== undefined) {\n (rebuilt as Error & { detail?: unknown }).detail = error.detail;\n }\n return rebuilt;\n}\n\n/**\n * Rebuild an RPC/subscribe error, reconstructing the typed {@link EngineRelocatedError} when the bridge error's\n * `detail` carries the clone-safe `{ code: \"engine-relocated\", outcome }` wire form (ADR-0049 D10). This is the\n * attach-side reconstruction seam: a relocation failure crossing the pipe as a bridge error surfaces to the\n * consumer as an `instanceof EngineRelocatedError` with the honest `outcome`. Any other detail rebuilds as a\n * plain error carrying its `detail` (unchanged behavior).\n */\nfunction rebuildRpcError(error: RpcResultPayload[\"error\"]): Error {\n if (error && \"detail\" in error) {\n const relocated = engineRelocatedFromWire(error.detail);\n if (relocated !== undefined) return relocated;\n }\n return rebuildError(error);\n}\n",
51
+ "// The tab facade (ADR-0032 S2, decisions 3/4/6/7). `attachSyncClient` returns the SAME client shape as\n// `createSyncClient` wherever semantics allow — the write API (RPC-backed), per-group readiness, the\n// live-rows seam, `ready`/`status`/`stop` — transparently proxied to the one shared worker engine. The tab\n// stays the single auth owner: it pushes its token at attach and on `notifyAuthChanged`, and answers the\n// worker's expiry pull-requests via `getToken`.\n//\n// One-shot Drizzle reads (`query`/`queryRow`/`queryRaw`/`queryRawRow`) ARE proxied (ADR-0032 decision 4):\n// `drizzle`/`views` here are a real Drizzle database over a bridge executor whose `query` routes each read to\n// the worker's `guardedQuery` RPC, so awaiting a builder runs the ADR-0041 read gate + the ADR-0021\n// lazy-group guard worker-side and Drizzle's own result mapping (relational/nested included) runs on the tab.\n// `ensureSynced` (async lazy-activation) is a plain RPC to the shared engine. The only members that stay\n// unsupported are the genuinely tab-local ones — `pglite` (no local store), `destroy`/`dropReadCache` (store\n// lifecycle the worker owns), and `isSynced` (a SYNCHRONOUS activation-STARTED peek the tab's cached per-group\n// catch-up readiness cannot answer, and a sync method cannot be an RPC) — each throwing a clear error saying why.\n\nimport type { Results } from \"@electric-sql/pglite\";\n\nimport type {\n MutationDiagnostics,\n SyncRuntimeStatus,\n SyncStorageDeclaration,\n SyncTableName,\n SyncTableRegistry,\n WriteMode,\n} from \"@pgxsinkit/contracts\";\nimport { StorageDeclarationRefusedError } from \"@pgxsinkit/contracts\";\n\nimport type { BootReport } from \"../boot-report\";\nimport type { DataExportOptions, DataExportResult } from \"../export-data\";\nimport type { DiagnosticExportOptions, DiagnosticExportResult } from \"../export-dump\";\nimport type { StoreExportOptions, StoreExportResult } from \"../export-store\";\nimport {\n buildRegistryReadHandles,\n type ClientPGlite,\n ClientDisposedError,\n createMutationsApi,\n type LiveQueryDiagnostics,\n type LiveRowsSubscription,\n type MutationBatchItem,\n type MutationDetail,\n type SubscribeLiveRowsInput,\n type SyncClient,\n type SyncTransaction,\n type SyncTransactionResult,\n} from \"../index\";\nimport type { LocalStoreVersionEvent } from \"../local-store\";\nimport { createOpfsEffects, type OpfsEffectsDeps } from \"../opfs-effects\";\nimport { type DestructionEffects, runDestruction } from \"../store-lifecycle\";\nimport { deleteStoreMetaRecord, type StoreMetaDeps, writeStoreMetaRecord } from \"../store-meta\";\nimport { storeIndexedDbDatabaseName } from \"../store-path\";\nimport { readTestStoreMarker } from \"../store-path\";\nimport {\n CONTROL_PORT_DELIVERY_KEY,\n DECLARATION_KEY,\n DECLARATION_REFUSED_KEY,\n type DeclarationRefusedWire,\n DESTROY_QUERY_KEY,\n DESTROY_VERDICT_KEY,\n PLACEMENT_RESULT_KEY,\n type PlacementQueryResult,\n PLACEMENT_QUERY_KEY,\n} from \"./define-sync-worker\";\nimport {\n type CoordinatorDeps,\n createElectionCoordinator,\n type ElectionCoordinator,\n type SwBridgePort,\n} from \"./election-coordinator\";\nimport {\n type EngineControlMessage,\n engineIdentityEquals,\n type EngineIdentity,\n EngineRelocatedError,\n engineRelocatedFromWire,\n executionLimitMismatchFromWire,\n type ExecutionLimitConfig,\n isStaleIdentity,\n readControlEnvelope,\n wrapControlEnvelope,\n} from \"./engine-control\";\nimport { LiveRowsMaterializer } from \"./live-diff\";\nimport {\n type AttachAckPayload,\n type AttachPayload,\n type AuthTokenSnapshot,\n type BridgeCodec,\n type BridgeEvent,\n type BridgePort,\n type BridgeTransferable,\n type ExportArtefactWire,\n type GuardedQueryWireArgs,\n identityCodec,\n type BridgeErrorWire,\n isBridgeEnvelope,\n type LiveDiffPayload,\n type LiveHydratedPayload,\n type LiveInitialPayload,\n postBridgeMessage,\n type ProvisionAckPayload,\n type RestoreArtefactWire,\n type RpcOp,\n type RpcResultPayload,\n type TokenRequestPayload,\n} from \"./protocol\";\n\n/** A `Worker`/`SharedWorker`-shaped handle: a dedicated `Worker` IS the port; a `SharedWorker` carries `.port`. */\ninterface WorkerLike {\n port?: BridgePort;\n // `transfer: any` for the same reason `BridgePort.postMessage` uses it — so a DOM `Worker` (whose overloaded\n // `postMessage(message, transfer: Transferable[])` is contravariantly stricter than any DOM-lib-free array\n // type) is assignable to `WorkerLike` without a cast. See the note on `BridgePort` in `protocol.ts`.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- DOM-postMessage contravariance escape hatch\n postMessage?: (message: unknown, transfer?: any) => void;\n addEventListener?: (\n type: \"message\" | \"error\",\n listener: (event: { data?: unknown; message?: unknown }) => void,\n ) => void;\n removeEventListener?: (\n type: \"message\" | \"error\",\n listener: (event: { data?: unknown; message?: unknown }) => void,\n ) => void;\n terminate?: () => void;\n}\n\n/**\n * The elected engine worker handle the election coordinator drives (ADR-0049 D5, step 8): `terminate()` (a\n * deliberate teardown / respawn), `onError` (a reported worker death → immediate respawn), and\n * `deliverControlPort` (post the engine end of the announce control channel — `{ [CONTROL_PORT_DELIVERY_KEY]:\n * true }` with the port transferred — so the elected worker's step-9 control plane starts on it). The consumer\n * supplies a factory that constructs their own `defineSyncWorker` entry as a dedicated `Worker`; wrap it with\n * {@link wrapEngineWorker}.\n */\nexport interface ElectedEngineWorker {\n terminate(): void;\n onError(listener: (message: string) => void): void;\n deliverControlPort(port: unknown): void;\n}\n\n/**\n * Wrap a dedicated `Worker` (a consumer's `defineSyncWorker` engine entry) into the {@link ElectedEngineWorker}\n * the coordinator drives (ADR-0049 step 10b). `deliverControlPort` posts `{ [CONTROL_PORT_DELIVERY_KEY]: true }`\n * on the worker's implicit port with the control-channel end TRANSFERRED — exactly the delivery message the\n * step-9 engine control plane listens for. `onError` subscribes to the worker's `error` event; `terminate`\n * forwards to `worker.terminate()`.\n */\n/**\n * The default {@link AttachSyncClientOptions.awaitOwnershipRelease} — a documented NO-OP (ADR-0049 step 11b\n * follow-up 1). The OPFS-repacked VFS enforces single-owner access with EXCLUSIVE OPFS sync-access handles\n * (`StoreOwnedError`), not a Web Lock, so there is no ownership lock to await from here without importing the\n * VFS. The bounded wait for the dead worker's agent to release the handle lives entirely in the SUCCESSOR'S OPEN\n * PATH: the respawned engine's `createOpfsRepacked` open retries on the owned-store contention error until it\n * clears (the `openWithBoundedRetries` wrapper) — the fault-matrix \"successor open retries on contention\" row.\n * So the coordinator can respawn immediately after a deliberate terminate; its VFS open is the real gate.\n */\nexport function resolvedOwnershipRelease(): Promise<void> {\n return Promise.resolve();\n}\n\nexport function wrapEngineWorker(worker: WorkerLike): ElectedEngineWorker {\n const post = (message: unknown, transfer: BridgeTransferable[]): void => {\n if (worker.postMessage) worker.postMessage(message, transfer);\n else worker.port?.postMessage(message, transfer);\n };\n return {\n terminate: () => worker.terminate?.(),\n onError: (listener) => {\n worker.addEventListener?.(\"error\", (event) => {\n const message = (event as { message?: unknown }).message;\n listener(typeof message === \"string\" ? message : \"elected engine worker error\");\n });\n },\n deliverControlPort: (port) => post({ [CONTROL_PORT_DELIVERY_KEY]: true }, [port as BridgeTransferable]),\n };\n}\n\n/**\n * `destroy()` on an attached facade REFUSES when other tabs still hold the store (ADR-0049 D8, plan fault row\n * \"`destroy()` with peers attached → refused with a typed error — close peers first\"). The SharedWorker — the\n * only role that knows the attached-tab count — answers a peer-count query; more than one attached tab (this\n * one plus at least one other) raises this. `peers` is the total attached-tab count, this tab included.\n */\nexport class StoreDestroyRefusedError extends Error {\n readonly peers: number;\n constructor(peers: number) {\n super(\n `[pgxsinkit] destroy() refused: ${Math.max(0, peers - 1)} other tab(s) are still attached to this store. ` +\n \"Close the peer tabs first, then destroy — the store is shared and destroying it under a live peer would \" +\n \"strand that tab's engine.\",\n );\n this.name = \"StoreDestroyRefusedError\";\n this.peers = peers;\n }\n}\n\n/**\n * Attach WIRING failure (ADR-0049 D1/D5): the SharedWorker requires election (a router-only, handle-denied home)\n * but the elected engine worker CANNOT be constructed — neither a `createEngineWorker` override was supplied NOR is\n * the SharedWorker's own script URL derivable (a plain scope that cannot report `self.location.href`, or a\n * non-module entry). Capability absence FALLS BACK (idbfs); a wiring failure ERRORS — the capability was present and\n * the configuration was wrong, and silently downgrading storage would hide the defect. `[pgxsinkit]`-prefixed like\n * the repo's other typed errors so a consumer can `instanceof`-branch it.\n */\nexport class ElectedEngineUnconstructibleError extends Error {\n constructor(detail: string) {\n super(\n `[pgxsinkit] cannot attach: this SharedWorker is router-only (election required) but the elected engine ` +\n `worker cannot be constructed — ${detail}. Pass a \\`createEngineWorker\\` override for entries that cannot ` +\n `be reconstructed from their URL as a module worker (classic-script / blob: / data: / CSP-constrained), ` +\n `or use a SharedWorker whose script URL is derivable (ADR-0049 D5). This is a wiring defect, not a ` +\n `capability fallback — the platform can hold sync-access handles here.`,\n );\n this.name = \"ElectedEngineUnconstructibleError\";\n }\n}\n\n/** The minimal `indexedDB.deleteDatabase` surface (no DOM lib) — mirrors `store-boot.ts`'s idb delete seam. */\ninterface IdbDeleteSurface {\n deleteDatabase(name: string): {\n error?: unknown;\n onsuccess: (() => void) | null;\n onerror: (() => void) | null;\n onblocked?: (() => void) | null;\n };\n}\n\n/** Resolve the `deleteDatabase` surface: injected meta deps first (tests), else structural off `globalThis`. */\nfunction resolveIdbDeleteSurface(meta?: StoreMetaDeps): IdbDeleteSurface | undefined {\n if (meta != null && \"indexedDB\" in meta) return meta.indexedDB as unknown as IdbDeleteSurface | undefined;\n return (globalThis as { indexedDB?: IdbDeleteSurface }).indexedDB;\n}\n\n/** Delete-if-present the store's PGlite idb database; only `onsuccess` proves completion. */\nfunction deleteStoreIdbDatabase(storePath: string, meta?: StoreMetaDeps): Promise<void> {\n const idb = resolveIdbDeleteSurface(meta);\n if (idb?.deleteDatabase == null) return Promise.resolve();\n const name = storeIndexedDbDatabaseName(storePath);\n return new Promise<void>((resolve, reject) => {\n let settled = false;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n const finish = (error?: unknown) => {\n if (settled) return;\n settled = true;\n if (timeout !== undefined) clearTimeout(timeout);\n if (error === undefined) resolve();\n else reject(error);\n };\n let request: {\n error?: unknown;\n onsuccess: (() => void) | null;\n onerror: (() => void) | null;\n onblocked?: (() => void) | null;\n };\n try {\n request = idb.deleteDatabase(name);\n } catch (error) {\n finish(error);\n return;\n }\n request.onsuccess = () => finish();\n request.onerror = () => finish(request.error ?? new Error(`indexedDB deletion failed for ${name}`));\n request.onblocked = () => undefined;\n timeout = setTimeout(() => finish(new Error(`indexedDB deletion timed out while blocked for ${name}`)), 5_000);\n });\n}\n\n/**\n * Build the REAL {@link DestructionEffects} for a store — the OPFS commitment sentinel + store directory\n * (`opfs-effects.ts`), the meta record (`store-meta.ts`), and the PGlite idb database. The destruction machine is\n * backend-agnostic (`store-lifecycle.ts`): `deleteBackendStore` delete-if-presents BOTH the OPFS directory and\n * the idb database, so it works whichever backend the store used. Injectable IO (`opfs`/`meta`) so the wiring is\n * unit-testable with fakes.\n */\nexport function createStoreDestructionEffects(\n storePath: string,\n deps?: { opfs?: OpfsEffectsDeps; meta?: StoreMetaDeps },\n): DestructionEffects {\n const opfs = createOpfsEffects(storePath, deps?.opfs);\n const meta = deps?.meta;\n return {\n setPhase: (phase) => writeStoreMetaRecord(storePath, { phase, updatedAt: Date.now() }, meta),\n deleteSentinel: () => opfs.deleteSentinel(),\n deleteBackendStore: async () => {\n await opfs.deleteStoreDirectory();\n await deleteStoreIdbDatabase(storePath, meta);\n },\n deleteMetaRecord: () => deleteStoreMetaRecord(storePath, meta),\n };\n}\n\n/**\n * Destroy every local artifact of a store BY PATH (ADR-0050 stage 2; the public face of the ADR-0049 D8\n * destruction machinery): the OPFS store directory, the commitment sentinel, the meta record, AND the idb\n * database — backend-agnostic (delete-if-present on both backends), with the bounded VFS-ownership-lag retry.\n *\n * **Precondition: the store is NOT running.** This is the companion to {@link SyncClient.destroy} (the\n * supervised destroy of an ATTACHED store — peer-checked, teardown-acknowledged): reach for\n * `destroyStoreArtifacts` for a store nobody is attached to — an obsolete path a preference change left\n * behind, a wipe of known store paths. Called on a path a live engine still holds, the backend delete throws\n * an ownership error after the bounded retry — loud, and safely RE-RUNNABLE: the destruction sequence is\n * idempotent and phase-recorded (a store whose meta record says `deleting` is refused for boot), so a re-run\n * completes it. No liveness probe is attempted here — it could not be race-free, and the ownership error\n * already fails hard; callers keep failed paths on their own retry list (e.g. the board's Obsolete stores).\n */\nexport function destroyStoreArtifacts(storePath: string, opts?: StoreDestructionRetryOptions): Promise<void> {\n return runStoreDestruction(createStoreDestructionEffects(storePath), opts);\n}\n\n/** Options for {@link quiesceStoreWorker} (ADR-0050). */\nexport interface StoreWorkerQuiesceOptions {\n /** The ADR-0050 storage declaration to post on the port. Omit (or `{}`) to state NO opinion — always\n * compatible with whatever declaration the live worker already bound, so it can never be refused. Passing a\n * concrete declaration risks a `StorageDeclarationRefusedError` if it disagrees with the bound one. */\n storage?: SyncStorageDeclaration;\n /** Bound on the whole handshake (declaration → placement reply → teardown ack). Default 6000ms. On timeout\n * the returned promise REJECTS — the caller keeps the path on its retry list; it is NOT proof of teardown. */\n timeoutMs?: number;\n /** Injectable timers (tests); defaults to real `setTimeout`/`clearTimeout`. */\n timers?: AttachClientTimers;\n}\n\n/** The outcome of {@link quiesceStoreWorker}. */\nexport interface StoreWorkerQuiesceOutcome {\n /** The store's engine home as reported by its placement reply. */\n engineHome: PlacementQueryResult[\"engineHome\"];\n /** True iff an SW-direct engine was torn down here (its host closed, releasing the backend connection).\n * `false` for an `elected-worker` home — there is no in-SharedWorker engine to close from this router-only\n * connection; the elected dedicated engine dies with its owning tab (the browser terminates it on document\n * teardown), releasing its store, so no active teardown is needed before a path-addressed destroy. */\n toreDown: boolean;\n}\n\n/**\n * Quiesce the SharedWorker HOSTING a store, by path, so its backend connection is released BEFORE a\n * {@link destroyStoreArtifacts} on the same path (ADR-0050). The gap it closes: the board's workers are\n * `extendedLifetime`, so a store's SharedWorker OUTLIVES the document that spawned it — and the idbfs backend\n * holds its IndexedDB connection open for the engine's whole life. So after a reload, an idbfs store's worker\n * is still alive and still holding the connection; `deleteDatabase` blocks and `destroyStoreArtifacts` fails,\n * boot after boot, until the browser eventually reaps the worker. OPFS releases its handles when idle, so it\n * never had this problem — this is the idbfs (SW-direct) fix.\n *\n * `worker` is a factory (or instance), exactly like {@link attachSyncClient}'s `worker` — the caller constructs\n * `new SharedWorker(url, { name: storePath })`, so the library stays DOM-free. Connecting by that name reaches\n * the LIVE worker (if any) or spawns a fresh one; either way the sequence is: post the declaration, query\n * placement, and — for a `shared-worker` home — send `engine-teardown` and await its reserved ack, which the\n * host posts only after `closeHost()` has stopped the engine and released the backend connection (it then\n * closes its own scope). An `elected-worker` home resolves immediately with `toreDown: false` (see the field).\n *\n * Idempotent and safe on an already-dead store: a fresh spawn boots no engine, and its teardown closes an empty\n * host. Compose it as `await quiesceStoreWorker(f).catch(() => {}); await destroyStoreArtifacts(path)` — a\n * quiesce failure (timeout) must NOT abort the destroy, whose own ownership-lag handling reports honestly and\n * leaves the path re-runnable.\n */\nexport function quiesceStoreWorker(\n worker: (() => WorkerLike) | WorkerLike,\n opts?: StoreWorkerQuiesceOptions,\n): Promise<StoreWorkerQuiesceOutcome> {\n const timers: AttachClientTimers = opts?.timers ?? {\n setTimeout: (fn, ms) => setTimeout(fn, ms),\n clearTimeout: (handle) => clearTimeout(handle as ReturnType<typeof setTimeout>),\n };\n const timeoutMs = opts?.timeoutMs ?? 6000;\n const port = resolvePort({ worker });\n return new Promise<StoreWorkerQuiesceOutcome>((resolve, reject) => {\n let settled = false;\n let teardownIdentity: EngineIdentity | undefined;\n const finish = (run: () => void): void => {\n if (settled) return;\n settled = true;\n timers.clearTimeout(timeout);\n port.removeEventListener(\"message\", listener);\n run();\n };\n const timeout = timers.setTimeout(\n () => finish(() => reject(new Error(`[pgxsinkit] quiesceStoreWorker timed out after ${timeoutMs}ms`))),\n timeoutMs,\n );\n const listener = (event: { data: unknown }): void => {\n const placement = readPlacementResult(event.data);\n if (placement !== undefined) {\n if (placement.engineHome !== \"shared-worker\") {\n finish(() => resolve({ engineHome: placement.engineHome, toreDown: false }));\n return;\n }\n // SW-direct: ask the in-scope host to quiesce+close, then await its reserved teardown ack (pingId -1),\n // which proves the engine stopped and the backend connection was released (define-sync-worker).\n teardownIdentity = { swInstanceId: placement.swInstanceId, generation: 0 };\n port.postMessage(wrapControlEnvelope({ type: \"engine-teardown\", identity: teardownIdentity }));\n return;\n }\n const refusal = readDeclarationRefusal(event.data);\n if (refusal !== undefined) {\n finish(() => reject(new StorageDeclarationRefusedError(refusal.message)));\n return;\n }\n const control = readControlEnvelope(event.data);\n if (\n control?.type === \"control-ack\" &&\n control.pingId === -1 &&\n teardownIdentity !== undefined &&\n control.identity?.swInstanceId === teardownIdentity.swInstanceId\n ) {\n if (control.error) {\n finish(() => reject(new Error(`[pgxsinkit] store-worker teardown failed: ${control.error?.message}`)));\n } else {\n finish(() => resolve({ engineHome: \"shared-worker\", toreDown: true }));\n }\n }\n };\n port.addEventListener(\"message\", listener);\n port.start?.();\n // Declaration FIRST (ADR-0050), then the placement query. If the worker's placement is still pending (a\n // fresh spawn), the queued-traffic path redelivers the follow-up teardown after routing (ADR-0050 W1).\n port.postMessage({ [DECLARATION_KEY]: opts?.storage ?? {} });\n port.postMessage({ [PLACEMENT_QUERY_KEY]: true });\n });\n}\n\n/** The bounded ownership-retry options for {@link runStoreDestruction} (the VFS-lock-lag guard, D8/fault row). */\nexport interface StoreDestructionRetryOptions {\n /** Max retries of `deleteBackendStore` on an ownership-lock-lag error before giving up (default 5). */\n maxOwnershipRetries?: number;\n /** Classify an error as VFS-ownership-lock lag (retryable). Default: OPFS `NoModificationAllowedError`-class. */\n isOwnershipError?: (error: unknown) => boolean;\n /** Between-retries delay; defaults to a real timer. Injected in tests. */\n delay?: (ms: number) => Promise<void>;\n /** The between-retries delay (ms); default 50. */\n retryDelayMs?: number;\n}\n\n/** Default ownership-lag classifier: OPFS raises `NoModificationAllowedError`/`InvalidStateError` while a sync-access handle is open. */\nfunction defaultIsOwnershipError(error: unknown): boolean {\n const name = (error as { name?: string } | null)?.name;\n if (name === \"NoModificationAllowedError\" || name === \"InvalidStateError\") return true;\n const message = (error as { message?: unknown } | null)?.message;\n const text = (typeof message === \"string\" ? message : \"\").toLowerCase();\n return text.includes(\"owned\") || text.includes(\"ownership\") || text.includes(\"locked\") || text.includes(\"in use\");\n}\n\n/**\n * Run the destructive lifecycle (ADR-0049 D8) with a BOUNDED ownership-lock-lag retry around the backend-store\n * delete. The engine was just detached, so its VFS ownership lock may not have cleared yet — the fault row\n * \"VFS ownership-lock release lag → successor retries until clear, bounded\" applies to destroy too. The other\n * steps (set `deleting`, delete sentinel, delete the meta record) are idempotent and not retried here. Shared by\n * the attached-facade supervisor (this module) and the in-process `destroy()` (index.ts).\n */\nexport async function runStoreDestruction(\n effects: DestructionEffects,\n opts?: StoreDestructionRetryOptions,\n): Promise<void> {\n const maxRetries = opts?.maxOwnershipRetries ?? 5;\n const isOwnershipError = opts?.isOwnershipError ?? defaultIsOwnershipError;\n const delay = opts?.delay ?? ((ms: number) => new Promise<void>((resolve) => setTimeout(resolve, ms)));\n const retryDelayMs = opts?.retryDelayMs ?? 50;\n const guarded: DestructionEffects = {\n setPhase: (phase) => effects.setPhase(phase),\n deleteSentinel: () => effects.deleteSentinel(),\n deleteMetaRecord: () => effects.deleteMetaRecord(),\n deleteBackendStore: async () => {\n for (let attempt = 0; ; attempt += 1) {\n try {\n await effects.deleteBackendStore();\n return;\n } catch (error) {\n if (attempt >= maxRetries || !isOwnershipError(error)) throw error;\n await delay(retryDelayMs);\n }\n }\n },\n };\n await runDestruction(guarded);\n}\n\n/** Narrow a raw SharedWorker placement reply (`{ [PLACEMENT_RESULT_KEY]: … }`), or `undefined` for foreign traffic. */\nfunction readPlacementResult(data: unknown): PlacementQueryResult | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const result = (data as { [PLACEMENT_RESULT_KEY]?: unknown })[PLACEMENT_RESULT_KEY];\n if (typeof result !== \"object\" || result === null) return undefined;\n return result as PlacementQueryResult;\n}\n\n/** Narrow a raw SharedWorker destroy peer-count verdict (`{ [DESTROY_VERDICT_KEY]: { peers } }`), or `undefined`. */\nfunction readDestroyVerdict(data: unknown): number | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const verdict = (data as { [DESTROY_VERDICT_KEY]?: unknown })[DESTROY_VERDICT_KEY];\n if (typeof verdict !== \"object\" || verdict === null) return undefined;\n const peers = (verdict as { peers?: unknown }).peers;\n return typeof peers === \"number\" ? peers : undefined;\n}\n\n/** Narrow a raw storage-declaration refusal (`{ [DECLARATION_REFUSED_KEY]: { message, name } }`), or `undefined`. */\nfunction readDeclarationRefusal(data: unknown): DeclarationRefusedWire | undefined {\n if (typeof data !== \"object\" || data === null) return undefined;\n const refusal = (data as { [DECLARATION_REFUSED_KEY]?: unknown })[DECLARATION_REFUSED_KEY];\n if (typeof refusal !== \"object\" || refusal === null) return undefined;\n const message = (refusal as { message?: unknown }).message;\n return typeof message === \"string\" ? (refusal as unknown as DeclarationRefusedWire) : undefined;\n}\n\n/**\n * The `setTimeout`/`clearTimeout` pair the handoff-queue deadline and the bridge-silence reconnect schedule on\n * (ADR-0049 step 7) — injectable for deterministic tests, exactly the discipline `engine-router.ts` follows so\n * the whole placement seam is unit-testable with no real timers.\n */\nexport interface AttachClientTimers {\n setTimeout(fn: () => void, ms: number): unknown;\n clearTimeout(handle: unknown): void;\n}\n\n/**\n * The RPC ops that MUTATE the store/journal or push to the server — the ones whose lost response after a\n * relocation is `outcome: \"unknown\"` (a journal update may already exist, there is no dedup key; ADR-0049 D10,\n * invariant 5). Everything NOT in this set is a READ (or an idempotent activation) that is safe to repeat, so it\n * settles `outcome: \"not-dispatched\"`. `ensureSynced` is deliberately a read here: activation is additive and\n * idempotent (starting an already-active group is a no-op), so repeating it can never double-apply. The\n * `export*` ops read the store into an artefact (no mutation) and are likewise safe to repeat.\n */\nconst MUTATION_RPC_OPS: ReadonlySet<RpcOp> = new Set<RpcOp>([\n \"create\",\n \"update\",\n \"delete\",\n \"batch\",\n \"transaction\",\n \"flush\",\n \"reconcile\",\n \"retryFailed\",\n \"recoverSending\",\n \"discardConflict\",\n \"discardQuarantined\",\n \"desync\",\n \"discardEphemeral\",\n // `rawExec` is WRITE-CAPABLE (its docstring: any write it issues stays local and will NOT converge), so a\n // dispatched rawExec with a lost response is `\"unknown\"` — retrying could double-apply a local write.\n \"rawExec\",\n]);\n\nexport interface AttachSyncClientOptions<TRegistry extends SyncTableRegistry> {\n registry: TRegistry;\n /**\n * The worker input — PRIMARILY a FACTORY `() => SharedWorker` (ADR-0049 D5). A `SharedWorker` object cannot be\n * reconstructed from itself, so the factory is what makes SharedWorker-death recovery (the keepalive\n * reconstruction, and the {@link bridgeSilenceMs} bridge-silence reconnect) a GUARANTEE rather than an option:\n * both re-invoke it for a fresh SharedWorker. A bare instance (a native `Worker`/`SharedWorker`, or anything\n * port-shaped) is ALSO accepted for tests and exotic hosts — reconstruction is then structurally unavailable\n * (diagnostics say so). Provide this OR {@link port}.\n */\n worker?: (() => WorkerLike) | WorkerLike;\n /** A raw transport port (a `MessageChannel` port in tests, a `SharedWorker.port` in a browser). */\n port?: BridgePort;\n /**\n * The tab's token provider (ADR-0032 decision 3). Richer than `createSyncClient`'s string form: the\n * worker needs the EXPIRY to apply its pull margin, so this yields `{accessToken, expiresAt}` (or null\n * when unauthenticated). Pushed at attach and answered on every worker pull-request.\n */\n getToken?: () => Promise<AuthTokenSnapshot | null>;\n /** The bound store id (resolved tab-side before attach — SharedWorker naming, ADR-0032 decision 5). */\n storeId?: string;\n /**\n * The plain store PATH (ADR-0036) the worker opens if it must create its own store — a name, not a\n * storage URL. Spread `memoryStoreForTests(...)` from `@pgxsinkit/client/testing` here for a memory store\n * in tests (it also carries the internal marker forwarded to the worker as the memory-backend override).\n */\n storePath?: string;\n syncEnabled?: boolean;\n /**\n * Which baked registry the worker boots (ADR-0032 S3) — forwarded in the attach `config.role`. A worker\n * file that bakes multiple role variants (the board's admin/member) picks by this; single-registry\n * workers ignore it.\n */\n role?: string;\n /**\n * Fresh-store prefetch-overlap hint (ADR-0032 S4), forwarded in the attach `config.freshStore`. Set true\n * ONLY when the tab knows the store is a claimed schemaless spare (never for a mapped/returning store);\n * the worker's `createSyncClient` then overlaps the shape catch-up with its local boot phases.\n */\n freshStore?: boolean;\n /**\n * Restore the worker's store from a backup on attach (ADR-0035 decision 6) — the worker-mode `restoreFrom`.\n * A `File`/`Blob` as produced by {@link SyncClient.exportStore}; the facade decomposes it into a transferred\n * `ArrayBuffer` + name/mime ({@link RestoreArtefactWire}) and the worker recomposes it for `createSyncClient`.\n * Restore rides the one handshake that reaches the ENGINE HOME: a restore-bearing attach awaits the\n * placement reply, then carries the artifact on the SW-port handshake when the in-scope host is the engine\n * (SW-direct / declared-idbfs) or on the first per-tab PIPE handshake when the engine is elected — the\n * router-only SharedWorker is payload-blind, so a restore posted there would be dropped and destroyed.\n * Passing it when the engine has ALREADY booted rejects the attach with a typed error\n * (`RestoreIntoRunningStoreError` by name — you cannot restore into a running store). The restored engine\n * boots offline and its recovered journal is quarantined, exactly as in-process — see `restoreFrom` on\n * `createSyncClient`.\n */\n restoreFrom?: File | Blob;\n /**\n * The tab's WIRE storage declaration for this store (ADR-0050) — posted as the declaration message on the\n * worker port BEFORE the placement query (so `backend: \"idbfs\"` can skip the probe), and carried on the\n * provision/attach payloads so the engine binds it (durability included). Omit (or `{}`) for \"no opinion\":\n * a registry-attached static declaration, else the capability defaults, decide. A registry-attached\n * declaration is AUTHORITATIVE — an explicit field here that disagrees with it (or with the declaration\n * another tab already bound) is a typed refusal (`StorageDeclarationRefusedError`), never silently\n * overridden: a store's declaration is immutable, and a preference change mints a fresh store under a\n * fresh path instead.\n */\n storage?: SyncStorageDeclaration;\n codec?: BridgeCodec;\n onStatusChange?: (status: SyncRuntimeStatus) => void;\n onConflict?: (details: MutationDetail[]) => void;\n onQuarantine?: (details: MutationDetail[]) => void;\n onReject?: (details: MutationDetail[]) => void;\n onSchemaChange?: (event: LocalStoreVersionEvent) => void;\n onSyncError?: (error: Error) => void;\n /**\n * Boot observability (ADR-0034): invoked once with the worker engine's finalized {@link BootReport} if the\n * engine's boot finalizes WHILE this tab is attached (the one-shot `boot-report` broadcast). A tab that\n * attaches AFTER the boot never receives the push — it reads the report via {@link SyncClient.bootReport}.\n */\n onBootReport?: (report: BootReport) => void;\n /**\n * The bridge-silence deadline (ms) for non-leader reconnection (ADR-0049 D5). DISABLED when undefined (the\n * default); the election coordinator (step 8) sets it. When set: a pending op left with NO bridge traffic\n * since it was posted, past this deadline, triggers ONE reconnect attempt via the {@link worker} FACTORY (if the\n * input is a factory) — construct a fresh SharedWorker, resolve its port, re-attach, flush the queue,\n * re-subscribe. With a bare-instance input reconstruction is structurally unavailable, so no reconnect is armed.\n * Scheduled on {@link timers}.\n */\n bridgeSilenceMs?: number;\n /**\n * The bounded handoff queue (ADR-0049 invariant 9). While the handoff window is open — after a relocation\n * notice, before the replacement pipe's handshake completes — new data-path ops are QUEUED, not posted.\n * `cap` overflow or `deadlineMs` expiry fails queued ops with `EngineRelocatedError(\"not-dispatched\")` (they\n * never left the tab, so they are safe to retry). Defaults: `cap` 256, `deadlineMs` 15000. The deadline is\n * scheduled on {@link timers}.\n */\n handoffQueue?: { cap?: number; deadlineMs?: number };\n /**\n * Injectable timers for the handoff-queue deadline and the bridge-silence reconnect (ADR-0049 step 7) — the\n * same deterministic-test seam `engine-router.ts` exposes. Defaults to `globalThis.setTimeout`/`clearTimeout`.\n */\n timers?: AttachClientTimers;\n /**\n * The elected engine worker OVERRIDE (ADR-0049 D5). In `elected-worker` placement (a router-only SharedWorker)\n * the tab's election coordinator spawns the real engine as a dedicated `Worker`. NORMALLY NO WIRING IS NEEDED:\n * the worker entry is dual-scope (one file serves both homes), the SharedWorker reports its own script URL in the\n * placement reply, and the winning tab constructs the engine as `new Worker(swScriptUrl, { type: \"module\" })`\n * itself. Supply this override ONLY for entries that cannot be reconstructed from their URL as a module worker\n * (classic-script workers, `blob:`/`data:` URLs, CSP constraints); wrap the constructed worker with\n * {@link wrapEngineWorker}. When election is required but NEITHER a derivable URL NOR this override is available,\n * attach fails with the typed {@link ElectedEngineUnconstructibleError} — never a silent no-engine attach.\n */\n createEngineWorker?: () => ElectedEngineWorker;\n /**\n * The opt-in engine-construction EXECUTION LIMIT (ADR-0049 D5) as this tab carries it — every tab attaching to a\n * store MUST carry the SAME value the worker was constructed with (`ExecutionLimitMismatchError` on a mismatch).\n * DISABLED by default (`undefined` / absent `maxDispatchMs`) — no finite worst-case query duration exists, so\n * enabling the limit (which converts slow to terminated by policy) is a deliberate consumer choice. When\n * `maxDispatchMs` is set AND this tab is on an elected per-tab pipe, a dispatched RPC still outstanding past the\n * limit is reported to the router as an `overdue-dispatch` (the router then probes the engine's control channel;\n * a WASM-blocked engine cannot answer → the leader retires + respawns it). ELECTED PLACEMENT ONLY — on SW-direct\n * the option is rejected as unsupported during attach rather than silently ignored.\n */\n executionLimit?: ExecutionLimitConfig;\n /**\n * The leader-keepalive ping cadence (ms) the election coordinator uses (ADR-0049 step 8). Default 20000. The\n * keepalive is the ONE standing timer that detects SharedWorker death (unanswered pings) → reconstruct via the\n * {@link worker} factory + re-announce the still-live engine. Lower it to detect SW death faster.\n */\n keepaliveIntervalMs?: number;\n /** Consecutive unanswered keepalive pings before SharedWorker reconstruction (ADR-0049 step 8). Default 2. */\n keepaliveMissThreshold?: number;\n /**\n * Await the VFS ownership release after a deliberate engine termination (ADR-0049 step 8). Defaults to the\n * documented no-op {@link resolvedOwnershipRelease} — the HONEST MINIMUM (step 11b follow-up 1): the\n * OPFS-repacked VFS enforces ownership with EXCLUSIVE OPFS sync-access handles (`StoreOwnedError` /\n * `STORE_OWNED`), NOT a Web Lock, so there is no lock name to `navigator.locks.request(..., { ifAvailable })`\n * against here. The bounded wait therefore lives in the SUCCESSOR'S OPEN PATH: the respawned elected engine\n * worker's own `createOpfsRepacked` open throws the owned-store contention error and is retried with backoff\n * (the `openWithBoundedRetries` wrapper in `createClientPGlite`) until the dead worker's agent releases the\n * handle — exactly the fault-matrix row \"VFS ownership-lock release lag → successor open retries on contention\n * until clear, bounded, then boot failure\". Supply a custom async wait only to inject a real probe (tests do).\n */\n awaitOwnershipRelease?: () => Promise<void>;\n /**\n * @internal test seam (ADR-0049 step 10b): override the election coordinator's IO — the Web Locks surface and\n * the page-lifecycle subscription. Production reads `navigator.locks` structurally and subscribes to real\n * `pagehide`/`pageshow`. Injected so the election wiring is unit-testable with a fake locks (no real\n * `navigator.locks` under Bun).\n */\n electionIo?: {\n locks?: CoordinatorDeps[\"locks\"];\n pageLifecycle?: CoordinatorDeps[\"pageLifecycle\"];\n };\n /**\n * @internal test seam (ADR-0049 step 10b): override the destruction effects the ATTACHED `destroy()` runs\n * after it detaches. Production builds real OPFS + meta-record + idb effects from the store path\n * ({@link createStoreDestructionEffects}); injected so the supervised-destroy path is unit-testable with fake\n * effects (effect-order assertions, ownership-lock-lag retry).\n */\n createDestructionEffects?: (storePath: string) => DestructionEffects;\n}\n\n/**\n * The worker-attached client: `SyncClient`'s shape, worker-proxied, plus `notifyAuthChanged` (re-push the\n * token after an app auth-state change, ADR-0032 decision 3). One-shot Drizzle reads\n * (`query`/`queryRow`/`queryRaw`/`queryRawRow`) and `ensureSynced` ARE proxied to the worker; the members\n * that throw are the structurally unproxiable ones — `pglite`, `destroy`, `dropReadCache`, `isSynced`, and\n * `drizzle.transaction()`.\n */\nexport type AttachedSyncClient<TRegistry extends SyncTableRegistry> = SyncClient<TRegistry> & {\n notifyAuthChanged: () => void;\n /**\n * Forward the app's Offline toggle to the worker (ADR-0032 S3). The worker owns convergence, so the\n * tab cannot gate a local trigger; this sends `set-online`, which suppresses/resumes the worker's flush\n * passes (resuming fires one immediate pass). The in-process client gates its own `autoSync` instead.\n */\n setOnline: (online: boolean) => void;\n};\n\n/**\n * The IO a shared election coordinator is built from (ADR-0049 step 8) — the subset both {@link attachSyncClient}\n * and the elected {@link provisionSyncWorker} pass so ONE coordinator serves a tab's whole (provision + attach)\n * lifecycle per store (invariant 2 — never self-queued). A module-level builder (not a per-call closure) so both\n * entry points construct the identical coordinator.\n */\ninterface ElectedCoordinatorParams {\n storePath: string;\n /** The SW control port the coordinator posts announce/keepalive on (the FIRST creator's connection). */\n controlPort: BridgePort;\n createEngineWorker: () => ElectedEngineWorker;\n /** The SharedWorker reconstruction factory (ADR-0049 D5) — drives the keepalive SW-death recovery. Absent for a\n bare-instance input, where reconstruction is structurally unavailable. */\n swFactory?: () => WorkerLike;\n /** The tab's wire storage declaration (ADR-0050) — posted FIRST on every reconstructed SW port, before the\n coordinator's announce/keepalive traffic, so a fresh bootstrap binds and routes instead of refusing. */\n storage?: SyncStorageDeclaration;\n electionIo?: AttachSyncClientOptions<SyncTableRegistry>[\"electionIo\"];\n awaitOwnershipRelease?: () => Promise<void>;\n timers: AttachClientTimers;\n pageLifecycle?: CoordinatorDeps[\"pageLifecycle\"];\n keepaliveIntervalMs?: number;\n keepaliveMissThreshold?: number;\n}\n\n/**\n * Build the tab's election coordinator over a SW control port. The spawn adapter mints the announce control\n * channel and delivers its ENGINE end to the freshly-spawned worker; `createControlChannel` yields the SAME\n * channel so `announce` transfers the ROUTER end to the SharedWorker; a re-announce WITHOUT a respawn (keepalive\n * SW reconstruction) re-delivers a fresh engine-end to the retained live engine (step 11b follow-up 2).\n */\nfunction buildElectedCoordinator(params: ElectedCoordinatorParams): ElectionCoordinator {\n const factory = params.createEngineWorker;\n let pendingChannel: MessageChannel | undefined;\n let liveEngine: ElectedEngineWorker | undefined;\n const locks = params.electionIo?.locks ??\n (globalThis as { navigator?: { locks?: CoordinatorDeps[\"locks\"] } }).navigator?.locks ?? {\n request: () => Promise.resolve(),\n };\n const deps: CoordinatorDeps = {\n locks,\n spawnEngineWorker: () => {\n const engine = factory();\n liveEngine = engine;\n const channel = new MessageChannel();\n pendingChannel = channel;\n engine.deliverControlPort(channel.port2);\n return { terminate: () => engine.terminate(), onError: (listener) => engine.onError(listener) };\n },\n createControlChannel: () => {\n if (pendingChannel !== undefined) {\n const channel = pendingChannel;\n pendingChannel = undefined;\n return { port1: channel.port1, port2: channel.port2 };\n }\n const channel = new MessageChannel();\n liveEngine?.deliverControlPort(channel.port2);\n return { port1: channel.port1, port2: channel.port2 };\n },\n swPort: params.controlPort as unknown as SwBridgePort,\n ...(params.swFactory\n ? {\n reconstructSw: () => {\n const port = resolvePort({ worker: params.swFactory! });\n // ADR-0050: the reconstructed SharedWorker is a fresh bootstrap — declare before the coordinator's\n // announce rides this port, or the bootstrap refuses/queues nothing and recovery hangs.\n port.postMessage({ [DECLARATION_KEY]: params.storage ?? {} });\n return port as unknown as SwBridgePort;\n },\n }\n : {}),\n awaitOwnershipRelease: params.awaitOwnershipRelease ?? resolvedOwnershipRelease,\n timers: params.timers,\n ...(params.pageLifecycle ? { pageLifecycle: params.pageLifecycle } : {}),\n };\n return createElectionCoordinator(deps, {\n storePath: params.storePath,\n ...(params.keepaliveIntervalMs != null ? { keepaliveIntervalMs: params.keepaliveIntervalMs } : {}),\n ...(params.keepaliveMissThreshold != null ? { keepaliveMissThreshold: params.keepaliveMissThreshold } : {}),\n });\n}\n\n/**\n * Per-store SHARED election coordinators (ADR-0049 step 8 — \"one coordinator per tab per store; provision and\n * attach share it\"). Populated ONLY by an elected {@link provisionSyncWorker}; a later {@link attachSyncClient}\n * on the SAME store (same page realm) ADOPTS it (`claimForAttach` — no second lock request, no second engine,\n * invariant 2). Empty when no provision ran, so attach-only flows never touch it (no shared coordinator to adopt). Keyed\n * by store path; ref-counted so it clears once every provision claim + adopting attach has released.\n */\nconst sharedCoordinators = new Map<\n string,\n {\n coordinator: ElectionCoordinator;\n refs: number;\n /** Release the provision claim and cancel its expiry after an explicit construction-identity retirement. */\n releaseProvision?: () => void;\n /**\n * The provision's live engine pipe, held for HANDOVER (ADR-0049 step 8). The router mints exactly ONE proxy\n * pipe per SW connection; when provision and attach share one port (the documented ordered-messages contract,\n * e.g. the board), that pipe is delivered during provisioning — so the adopting attach must receive THIS pipe\n * rather than wait for a `connect-port` that will never be re-sent. Cleared on take; closed if never taken.\n */\n provisionPipe?: { pipe: BridgePort; identity: EngineIdentity };\n }\n>();\n\n/** Adopt an existing per-store coordinator (incrementing its ref), or register a freshly-built one. */\nfunction adoptOrRegisterCoordinator(storePath: string, build: () => ElectionCoordinator): ElectionCoordinator {\n let entry = sharedCoordinators.get(storePath);\n if (entry === undefined) {\n entry = { coordinator: build(), refs: 0 };\n sharedCoordinators.set(storePath, entry);\n }\n entry.refs += 1;\n return entry.coordinator;\n}\n\n/** Look up an already-registered per-store coordinator WITHOUT registering one (attach's adopt-if-present probe). */\nfunction lookupSharedCoordinator(storePath: string): ElectionCoordinator | undefined {\n return sharedCoordinators.get(storePath)?.coordinator;\n}\n\n/** Increment the ref of an already-registered coordinator (an adopting attach); no-op if none is registered. */\nfunction retainSharedCoordinator(storePath: string): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry !== undefined) entry.refs += 1;\n}\n\n/** Release one ref; the entry clears at zero so a later provision/attach starts a fresh coordinator. */\nfunction releaseSharedCoordinator(storePath: string): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry === undefined) return;\n entry.refs -= 1;\n if (entry.refs <= 0) {\n entry.provisionPipe?.pipe.close?.();\n sharedCoordinators.delete(storePath);\n }\n}\n\n/** Stash the provision's engine pipe for the adopting attach's handover; no-op when no entry is registered. */\nfunction stashProvisionPipe(storePath: string, pipe: BridgePort, identity: EngineIdentity): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry !== undefined) entry.provisionPipe = { pipe, identity };\n}\n\n/** Take (and clear) the stashed provision pipe — exactly one adopting attach may consume it. */\nfunction takeProvisionPipe(storePath: string): { pipe: BridgePort; identity: EngineIdentity } | undefined {\n const entry = sharedCoordinators.get(storePath);\n const stashed = entry?.provisionPipe;\n if (entry !== undefined) delete entry.provisionPipe;\n return stashed;\n}\n\n/** Record the provision claim's explicit release companion on its shared coordinator entry. */\nfunction setProvisionRelease(storePath: string, release: () => void): void {\n const entry = sharedCoordinators.get(storePath);\n if (entry !== undefined) entry.releaseProvision = release;\n}\n\nexport async function attachSyncClient<const TRegistry extends SyncTableRegistry>(\n options: AttachSyncClientOptions<TRegistry>,\n): Promise<AttachedSyncClient<TRegistry>> {\n const codec = options.codec ?? identityCodec;\n const port = resolvePort(options);\n // The SharedWorker reconstruction factory (ADR-0049 D5), or undefined for a bare-instance/port input. Drives the\n // bridge-silence reconnect and the coordinator's keepalive SW-reconstruction; both re-invoke it for a fresh\n // SharedWorker. Absent → reconstruction is structurally unavailable and those recovery paths are simply not armed.\n const workerFactory = workerFactoryOf(options.worker);\n\n // ─── ADR-0049 placement seams (data-port indirection, handoff window, reconnect) ──────────────────\n // `controlPort` permanently carries the `{ pgx0049 }` control plane (relocation notices + `connect-port`);\n // `dataPort` starts AS the control port (SW-direct / declared-idbfs / no-pgx0049: the data path never leaves the SW port) and SWAPS to a\n // transferred pipe on `connect-port`. Every data-path send goes through `currentDataPort()` so the pending\n // maps stay in place across a swap (invariant 6 — one direct pipe per tab; the router never sees payloads).\n let controlPort: BridgePort = port;\n let dataPort: BridgePort = port;\n const currentDataPort = (): BridgePort => dataPort;\n const timers: AttachClientTimers = options.timers ?? {\n setTimeout: (fn, ms) => globalThis.setTimeout(fn, ms),\n clearTimeout: (handle) => globalThis.clearTimeout(handle as ReturnType<typeof globalThis.setTimeout>),\n };\n // The current engine identity (invariant 7 — the pair), set on each accepted `connect-port`; `hasPipe` marks\n // that the data path has left the control port. The handoff window (`windowOpen`) queues new ops.\n let currentEngineIdentity: EngineIdentity | undefined;\n let hasPipe = false;\n let windowOpen = false;\n // Bounded handoff queue (invariant 9): thunks deferred while the window is open, each carrying a `reject` so\n // cap-overflow / deadline-expiry can fail the caller with `EngineRelocatedError(\"not-dispatched\")`.\n const handoffQueue: Array<{ dispatch: () => void; reject: (error: Error) => void }> = [];\n const queueCap = options.handoffQueue?.cap ?? 256;\n const queueDeadlineMs = options.handoffQueue?.deadlineMs ?? 15000;\n let queueDeadlineHandle: unknown;\n // Bridge-silence reconnect (D5): armed on each dispatch when `bridgeSilenceMs` + a factory are set; ONE\n // attempt. `bridgeSeenSinceArm` distinguishes a live-but-slow engine from true silence.\n let silenceHandle: unknown;\n let bridgeSeenSinceArm = false;\n let reconnecting = false;\n // ─── ADR-0049 election + supervised-destroy state ─────────────────────────────────────────────────\n // The tab's election coordinator (created lazily on a router-only `electionRequired` placement reply — the\n // elected engine factory is the `createEngineWorker` override or the URL-derived default) + its released-on-detach\n // claim; and the pending destroy peer-count verdict resolver (the SharedWorker answers a `{ [DESTROY_QUERY_KEY] }`\n // query with the attached-tab count).\n let electionCoordinator: ElectionCoordinator | undefined;\n let releaseElectionClaim: (() => void) | undefined;\n let destroyVerdictResolver: ((peers: number) => void) | undefined;\n let placementResult: PlacementQueryResult | undefined;\n let swTeardownAckResolver: ((error?: BridgeErrorWire) => void) | undefined;\n let swTeardownIdentity: EngineIdentity | undefined;\n // Set to the store path when this attach ADOPTED a shared (provision-registered) coordinator — so detach\n // releases the shared ref (ref-counted registry cleanup). Undefined when this tab built its own coordinator.\n let adoptedSharedCoordinatorStore: string | undefined;\n // The placement decision is single-shot: once we act on the first `electionRequired` reply we ignore any repeat.\n let placementDecided = false;\n // Settles when the FIRST placement reply arrives (the bootstrap meta listener answers the query in BOTH SW\n // modes) — or REJECTS typed when the worker refuses this tab's storage declaration (ADR-0050), which arrives\n // in place of the placement reply. Every boot awaits it before the first handshake — see the send site.\n let resolvePlacementKnown: (() => void) | undefined;\n let rejectPlacementKnown: ((error: Error) => void) | undefined;\n const placementKnown = new Promise<void>((resolve, reject) => {\n resolvePlacementKnown = resolve;\n rejectPlacementKnown = reject;\n });\n // A refusal may land after a detach already settled the boot path — never an unhandled rejection.\n void placementKnown.catch(() => undefined);\n // The restore artifact rides EXACTLY ONE handshake — its ArrayBuffer detaches on first post, so a resend\n // would carry an empty buffer. Set the moment a handshake actually carries it (see `runAttachHandshake`).\n let restoreConsumed = false;\n\n // ─── ADR-0049 first-attach gate (placement-query-FIRST ordering — elected-mode ack routing) ───────\n // `attachSyncClient` no longer gates on the SW-port attach ack: a router-only SharedWorker (elected-worker home)\n // is payload-blind and DROPS the bridge `attach`, so that ack would never come there. Instead the attach resolves\n // when the FIRST attach ack lands from EITHER home — the in-scope SW engine (SW-direct / declared-idbfs / no-SW\n // baseline) OR the elected engine over the per-tab pipe (`onConnectPort`, after election delivers `connect-port`).\n // It REJECTS on a boot-failure ack, on detach, or — when election is required but the engine worker cannot be\n // constructed — with the typed {@link ElectedEngineUnconstructibleError} (a WIRING failure, never a hang). With a\n // constructible engine, the coordinator's own election spawns it and delivers the pipe, so no attach deadline exists.\n let firstAttachSettled = false;\n let resolveFirstAttach!: () => void;\n let rejectFirstAttach!: (error: Error) => void;\n const firstAttachReady = new Promise<void>((resolve, reject) => {\n resolveFirstAttach = resolve;\n rejectFirstAttach = reject;\n });\n void firstAttachReady.catch(() => undefined);\n const settleFirstAttach = (): void => {\n if (firstAttachSettled) return;\n firstAttachSettled = true;\n resolveFirstAttach();\n };\n const failFirstAttach = (error: Error): void => {\n if (firstAttachSettled) return;\n firstAttachSettled = true;\n rejectFirstAttach(error);\n };\n\n // ─── Correlation + subscription bookkeeping ──────────────────────────────────────────────────────\n let nextId = 0;\n const newId = (prefix: string) => `${prefix}-${++nextId}`;\n // `kind` (ADR-0049 invariant 5): a lost response on a MUTATION settles `outcome: \"unknown\"`, on a READ\n // `outcome: \"not-dispatched\"` (safe to repeat). Stamped at every `rpc` call site from {@link MUTATION_RPC_OPS}.\n const rpcPending = new Map<\n string,\n { resolve: (value: unknown) => void; reject: (error: Error) => void; kind: \"read\" | \"mutation\" }\n >();\n const initialPending = new Map<\n string,\n { resolve: (payload: LiveInitialPayload) => void; reject: (error: Error) => void }\n >();\n const diffHandlers = new Map<string, (diff: Omit<LiveDiffPayload, \"queryId\">) => void>();\n // Live subscriptions that have completed their initial snapshot (keyed by queryId) — re-issued through the\n // same subscribe machinery on a pipe swap so live queries re-establish (invariant 5; ADR-0041 re-attach).\n const activeSubscriptions = new Map<string, { resubscribe: () => void }>();\n // Resolvers for per-subscription `hydrated` promises, keyed by queryId. The worker posts\n // `live-hydrated` on the same port as the diff stream, strictly after the catch-up rows — so\n // resolution here guarantees the rows have already been applied by the materializer.\n const hydratedPending = new Map<string, () => void>();\n // Set once this tab detaches (explicit `stop()` OR a terminal `pagehide`). Guards NEW operations (they\n // reject at once) and lets `detachFromWorker` settle every outstanding promise — the port listener is torn\n // down on detach, so an unsettled `rpc`/`live-initial` waiter would otherwise hang forever (ADR-0040 P2).\n let detached = false;\n const detachError = () => new Error(\"[pgxsinkit] client detached — the tab released its worker attachment\");\n\n // ─── Status + readiness ──────────────────────────────────────────────────────────────────────────\n const status: SyncRuntimeStatus = { phase: \"booting\", isRunning: false };\n let resolveReady!: () => void;\n // FIX 2: `ready` gains a reject path so a detach BEFORE initial sync settles it (an attached client stopped\n // pre-ready would otherwise leave `client.ready` / `client.start()` pending forever). Guarded below.\n let rejectReady!: (error: unknown) => void;\n const ready = new Promise<void>((resolve, reject) => {\n resolveReady = resolve;\n rejectReady = reject;\n });\n void ready.catch(() => undefined);\n let readyResolved = false;\n const readyGroups = new Set<string>();\n const groupWaiters = new Map<string, Array<() => void>>();\n\n // ─── Auth: push at attach + on notifyAuthChanged, answer pull-requests ────────────────────────────\n const pushToken = async () => {\n const token = options.getToken ? await options.getToken() : null;\n postBridgeMessage(currentDataPort(), codec, \"token-push\", token);\n };\n const answerPull = async (requestId: string) => {\n const token = options.getToken ? await options.getToken() : null;\n postBridgeMessage(currentDataPort(), codec, \"token-response\", { requestId, token });\n };\n\n // ─── Inbound message routing ─────────────────────────────────────────────────────────────────────\n const markReady = () => {\n if (readyResolved) return;\n readyResolved = true;\n resolveReady();\n };\n // Record a group as ready and settle any waiters — shared by the discrete `groupReady` edge and the\n // status snapshot's `status.groups` merge (ADR-0032 FIX 4), so a tab attaching after the edge fired\n // still resolves `client.groupReady(table)` off the snapshot it gets at attach.\n const markGroupReady = (groupKey: string) => {\n readyGroups.add(groupKey);\n const waiters = groupWaiters.get(groupKey);\n if (waiters) {\n groupWaiters.delete(groupKey);\n for (const resolve of waiters) resolve();\n }\n };\n const onEvent = (event: BridgeEvent) => {\n switch (event.kind) {\n case \"status\": {\n Object.assign(status, event.status);\n options.onStatusChange?.(event.status);\n // Match the in-process contract EXACTLY (ADR-0032 FIX 3): `ready` resolves ONLY from phase\n // \"ready\" (all eager groups caught up, or the syncEnabled:false path). `auth-needed`/`degraded`\n // do NOT resolve it — an engine stuck retrying auth keeps `ready` pending, as in-process.\n if (event.status.phase === \"ready\") markReady();\n // Late-attach group merge (ADR-0032 FIX 4): fold every already-ready group from the snapshot.\n for (const [groupKey, ready] of Object.entries(event.status.groups ?? {})) {\n if (ready) markGroupReady(groupKey);\n }\n break;\n }\n case \"groupReady\": {\n markGroupReady(event.groupKey);\n break;\n }\n case \"milestone\": {\n // Staged boot readiness (ADR-0041 stage 2): the engine crossed a background stage while this tab was\n // attached. Idempotent with the ack's late-attach fold — whichever observes it first wins.\n if (event.stage === \"writeReady\") settleWriteReady();\n else if (event.stage === \"bootSettled\") settleBootSettled();\n break;\n }\n case \"milestone-error\": {\n // The background write/sync tail rejected a downstream stage (ADR-0041): fail the matching stage so a\n // gated write / `bootSettled` awaiter fails loudly. `localReadReady` and the resolved attach are\n // unaffected — the engine reached local-read readiness before the tail failed.\n if (event.stage === \"writeReady\") failWriteReady(rebuildError(event.error));\n else if (event.stage === \"bootSettled\") failBootSettled(rebuildError(event.error));\n break;\n }\n case \"conflict\":\n options.onConflict?.(event.details as MutationDetail[]);\n break;\n case \"quarantine\":\n options.onQuarantine?.(event.details as MutationDetail[]);\n break;\n case \"reject\":\n options.onReject?.(event.details as MutationDetail[]);\n break;\n case \"schema-change\":\n options.onSchemaChange?.(event.event as LocalStoreVersionEvent);\n break;\n case \"sync-error\":\n options.onSyncError?.(new Error(event.message));\n break;\n case \"boot-report\":\n // Boot observability (ADR-0034): the one-shot push for a tab attached at finalize. A late tab never\n // gets this event and pulls the report via `client.bootReport()` instead.\n options.onBootReport?.(event.report);\n break;\n case \"debug\": {\n // Re-print the worker's rail line gated on THIS tab's own flag, origin-tagged with the worker's\n // monotonic stamp (ADR-0032 decision 7) — a SharedWorker's own console is otherwise invisible.\n if ((globalThis as { __pgxsinkitDebug?: boolean }).__pgxsinkitDebug === true) {\n const line = `[pgxsinkit·w ${event.stamp.toFixed(0)}ms] ${event.line}`;\n if (event.data) console.debug(line, event.data);\n else console.debug(line);\n }\n break;\n }\n case \"timing\":\n break;\n default:\n break;\n }\n };\n\n const listener = (message: { data: unknown }) => {\n if (!isBridgeEnvelope(message.data)) return;\n // Any bridge traffic on the data port proves the engine is answering — clears the bridge-silence suspicion\n // (ADR-0049 D5), so a live-but-slow engine is never mistaken for a dead SharedWorker.\n bridgeSeenSinceArm = true;\n const envelope = message.data;\n const payload = codec.decode(envelope.payload);\n switch (envelope.type) {\n case \"attach-ack\": {\n const ack = payload as AttachAckPayload;\n // A LOCAL-READ-CORE boot failure crosses in the ack's `error` (ADR-0032 FIX 1): reject the handshake\n // so `attachSyncClient` rejects instead of hanging forever. On success, the engine reached\n // `localReadReady` — resolve that stage now (the ack fires AT localReadReady, ADR-0041 Option B) and\n // fold any downstream milestones/failures the tail already crossed (a late attach). `engineReady`\n // covers a LATE attach whose engine already fired its monotonic `ready` before this ack (FIX 3).\n if (ack.error) {\n const settle = pendingAttachAck;\n pendingAttachAck = null;\n const bootError = rebuildError(ack.error);\n settle?.reject(bootError);\n // A boot-failure ack on the FIRST attach (SW-direct) fails `attachSyncClient` (invariant: never hand out\n // a client whose engine failed to boot); a no-op once the first attach already settled (a re-attack ack).\n failFirstAttach(bootError);\n } else {\n if (ack.engineReady) markReady();\n resolveLocalReadReady();\n // Late-attach milestone fold: the stage may have already crossed (or failed) before this tab\n // attached, in which case there is no broadcast to catch — settle it straight from the ack.\n if (ack.writeReady) settleWriteReady();\n if (ack.writeReadyError) failWriteReady(rebuildError(ack.writeReadyError));\n if (ack.bootSettled) settleBootSettled();\n if (ack.bootSettledError) failBootSettled(rebuildError(ack.bootSettledError));\n const settle = pendingAttachAck;\n pendingAttachAck = null;\n settle?.resolve(ack);\n // The first attach ack from EITHER home (SW-direct engine, or the elected engine over the pipe) resolves\n // `attachSyncClient`. Idempotent — a re-attach ack (pipe swap / reconnect) is a no-op here.\n settleFirstAttach();\n }\n break;\n }\n case \"token-request\":\n void answerPull((payload as TokenRequestPayload).requestId);\n break;\n case \"rpc-result\": {\n const id = envelope.id;\n if (id == null) break;\n const result = payload as RpcResultPayload;\n const pending = rpcPending.get(id);\n if (pending) {\n rpcPending.delete(id);\n clearOverdue(id);\n if (result.ok) pending.resolve(result.value);\n else pending.reject(rebuildRpcError(result.error));\n break;\n }\n // A failed `subscribe` is reported as an `rpc-result` correlated by the subscribe's envelope id\n // (the worker has no client to hand an initial snapshot), so route the miss to the initial waiter\n // (ADR-0032 FIX 2). A successful subscribe never lands here — it resolves via `live-initial`.\n const initial = initialPending.get(id);\n if (initial && !result.ok) {\n initialPending.delete(id);\n initial.reject(rebuildRpcError(result.error));\n }\n break;\n }\n case \"live-initial\": {\n const id = envelope.id;\n const initial = payload as LiveInitialPayload;\n if (id != null) {\n const pending = initialPending.get(id);\n if (pending) {\n initialPending.delete(id);\n pending.resolve(initial);\n }\n }\n break;\n }\n case \"live-diff\": {\n const diff = payload as LiveDiffPayload;\n diffHandlers.get(diff.queryId)?.(diff);\n break;\n }\n case \"live-hydrated\": {\n const { queryId } = payload as LiveHydratedPayload;\n hydratedPending.get(queryId)?.();\n hydratedPending.delete(queryId);\n break;\n }\n case \"event\":\n onEvent(payload as BridgeEvent);\n break;\n default:\n break;\n }\n };\n // ─── ADR-0049 control-plane listener (the `{ pgx0049 }` envelope) ─────────────────────────────────\n // Lives on the CONTROL port for this tab's whole lifetime. It reacts to exactly the placement messages: a\n // `connect-port` (with a transferred pipe) swaps the data path; a `leader-granted`/`engine-retiring` notice\n // opens the handoff window. Foreign traffic (data-path bridge envelopes, anything else) is untouched — the\n // control plane is INERT until pgx0049 traffic arrives, so a plain SW-port attach is pure data-path passthrough.\n const controlListener = (event: { data: unknown; ports?: readonly BridgePort[] }) => {\n // ADR-0049 step 10b: the SharedWorker's RAW placement reply + destroy peer-count verdict (distinct envelope\n // keys, NOT `pgx0049` control messages). Handle those first, then fall through to the control envelope.\n const placementResult = readPlacementResult(event.data);\n if (placementResult !== undefined) {\n onPlacementResult(placementResult);\n return;\n }\n // ADR-0050: the worker refused this tab's storage declaration (explicit conflict with the bound/static\n // declaration, or engine-bound traffic before the declaration). It arrives IN PLACE of the placement\n // reply, so fail the boot typed and loudly — never a hang, never a silently different storage mode.\n const declarationRefusal = readDeclarationRefusal(event.data);\n if (declarationRefusal !== undefined) {\n const refusal = new StorageDeclarationRefusedError(declarationRefusal.message);\n rejectPlacementKnown?.(refusal);\n failFirstAttach(refusal);\n return;\n }\n const destroyPeers = readDestroyVerdict(event.data);\n if (destroyPeers !== undefined) {\n destroyVerdictResolver?.(destroyPeers);\n return;\n }\n const control = readControlEnvelope(event.data);\n if (control === undefined) return;\n switch (control.type) {\n case \"connect-port\":\n void onConnectPort(control.identity, event.ports?.[0]);\n break;\n case \"control-ack\":\n if (\n control.pingId === -1 &&\n swTeardownIdentity !== undefined &&\n engineIdentityEquals(control.identity, swTeardownIdentity)\n ) {\n swTeardownAckResolver?.(control.error);\n }\n break;\n case \"leader-granted\":\n case \"engine-retiring\":\n onRelocationNotice(control);\n break;\n default:\n break;\n }\n };\n\n // The bridge listener starts on the data port (initially === the control port); the control listener stays on\n // the control port. In the no-pgx0049 case both sit on the one `port` and coexist (each ignores the other's\n // traffic), so the data path is unchanged.\n dataPort.addEventListener(\"message\", listener);\n dataPort.start?.();\n controlPort.addEventListener(\"message\", controlListener);\n controlPort.start?.();\n\n // ─── Data-port swap + handoff-queue + reconnect machinery (ADR-0049) ──────────────────────────────\n /** Move the bridge listener onto `next`; close the previous pipe when replacing one (never the control port). */\n const swapDataPort = (next: BridgePort, closePrev: boolean): void => {\n const prev = dataPort;\n if (prev === next) return;\n next.addEventListener(\"message\", listener);\n next.start?.();\n prev.removeEventListener(\"message\", listener);\n // The control port keeps carrying `{ pgx0049 }` and MUST NOT be closed on the first swap; a replaced pipe is\n // dead and IS closed (invariant 5 — old-pipe pendings settled, the pipe closed, never replayed).\n if (closePrev && prev !== controlPort) prev.close?.();\n dataPort = next;\n };\n\n /**\n * Settle EVERY in-flight pending op by outcome (ADR-0049 invariant 5) — used on a relocation notice, a pipe\n * replacement, and a reconnect. A MUTATION whose response is lost is `\"unknown\"` (its journal update may\n * exist; inspect/reconcile, never auto-retry); a dispatched READ is `\"not-dispatched\"` — the name means\n * \"safe to retry\" (a read cannot double-apply; ADR-0049 D10: \"dispatched reads are safe to repeat — caller\n * policy\"). Live-query initial pendings are reads → `\"not-dispatched\"`; `hydrated` promises are doneness\n * signals with no reject path, so they RESOLVE (the file's existing convention on teardown), and re-subscribe\n * re-hydrates. Nothing is ever auto-retried here.\n */\n const settleInFlight = (): void => {\n for (const [id, pending] of rpcPending) {\n rpcPending.delete(id);\n clearOverdue(id);\n pending.reject(new EngineRelocatedError(pending.kind === \"mutation\" ? \"unknown\" : \"not-dispatched\"));\n }\n for (const [id, pending] of initialPending) {\n initialPending.delete(id);\n pending.reject(new EngineRelocatedError(\"not-dispatched\"));\n }\n for (const resolve of hydratedPending.values()) resolve();\n hydratedPending.clear();\n };\n\n const clearQueueDeadline = (): void => {\n if (queueDeadlineHandle !== undefined) {\n timers.clearTimeout(queueDeadlineHandle);\n queueDeadlineHandle = undefined;\n }\n };\n const armQueueDeadline = (): void => {\n if (queueDeadlineHandle !== undefined) return;\n queueDeadlineHandle = timers.setTimeout(() => {\n queueDeadlineHandle = undefined;\n // The window outlived the deadline — the queued work never left the tab, so fail it \"not-dispatched\".\n const items = handoffQueue.splice(0);\n for (const item of items) item.reject(new EngineRelocatedError(\"not-dispatched\"));\n }, queueDeadlineMs);\n };\n /** Enqueue a deferred data-path op while the window is open; cap overflow fails it \"not-dispatched\" at once. */\n const enqueue = (dispatch: () => void, reject: (error: Error) => void): void => {\n if (handoffQueue.length >= queueCap) {\n reject(new EngineRelocatedError(\"not-dispatched\"));\n return;\n }\n handoffQueue.push({ dispatch, reject });\n armQueueDeadline();\n };\n /** Flush the queue in order after a successful re-attach; clears the deadline. */\n const flushQueue = (): void => {\n clearQueueDeadline();\n const items = handoffQueue.splice(0);\n for (const item of items) item.dispatch();\n };\n\n const resubscribeAll = (): void => {\n for (const sub of activeSubscriptions.values()) sub.resubscribe();\n };\n\n /** A relocation notice opens the handoff window: settle in-flight per invariant 5, then QUEUE new calls. */\n function onRelocationNotice(control: EngineControlMessage): void {\n if (detached) return;\n // `engine-retiring` is identity-tagged: ignore a STALE one (a superseded engine) once we have an identity;\n // `leader-granted` is untagged and always applies (it precedes any engine).\n if (\n control.type === \"engine-retiring\" &&\n currentEngineIdentity !== undefined &&\n isStaleIdentity(currentEngineIdentity, control.identity)\n ) {\n return;\n }\n if (windowOpen) return;\n windowOpen = true;\n settleInFlight();\n armQueueDeadline();\n }\n\n /**\n * A `connect-port` delivers a transferred pipe (invariant 6). The FIRST one swaps the data path off the\n * control port and re-attaches over the pipe. A SUBSEQUENT one under a NEWER identity is a pipe REPLACEMENT\n * (a new SharedWorker handing fresh pipes): settle old-pipe in-flight, close the old pipe, swap, re-attach,\n * flush the queue, and re-subscribe every live query.\n */\n async function onConnectPort(identity: EngineIdentity, pipe: BridgePort | undefined): Promise<void> {\n if (detached || pipe === undefined) return;\n // A duplicate for the SAME identity we already piped is a no-op (never re-pipe the same engine).\n if (currentEngineIdentity !== undefined && engineIdentityEquals(currentEngineIdentity, identity)) return;\n const replacing = hasPipe;\n // Hold the window open across the swap+handshake so calls issued mid-flight queue rather than race.\n windowOpen = true;\n if (replacing) settleInFlight();\n currentEngineIdentity = identity;\n swapDataPort(pipe, replacing);\n hasPipe = true;\n try {\n // `includeRestore: true` — in elected mode THIS is the engine's boot attach, so the restore artifact\n // (withheld from the router-dropped SW-port handshake) rides here, over the direct tab↔engine pipe.\n // The `restoreConsumed` guard makes it first-carry-only: a pipe REPLACEMENT re-attach never re-sends.\n await runAttachHandshake(pipe, true);\n } catch {\n // A failed re-attach leaves the window open; a later notice / connect-port can retry. Never auto-retried.\n return;\n }\n windowOpen = false;\n flushQueue();\n resubscribeAll();\n }\n\n /** Arm the bridge-silence timer after a dispatch (D5) — only when a deadline AND a SharedWorker factory exist. */\n const armSilence = (): void => {\n if (options.bridgeSilenceMs === undefined || workerFactory === undefined) return;\n if (silenceHandle !== undefined || detached) return;\n bridgeSeenSinceArm = false;\n silenceHandle = timers.setTimeout(() => {\n silenceHandle = undefined;\n if (detached) return;\n // A pending op survived the deadline with NO bridge traffic since it was posted → the transport looks\n // dead. Reconnect ONCE. If traffic WAS seen but ops are still pending, re-arm (a slow-but-live engine).\n if (!bridgeSeenSinceArm && rpcPending.size > 0) void reconnect();\n else if (rpcPending.size > 0) armSilence();\n }, options.bridgeSilenceMs);\n };\n\n /**\n * ONE bridge-silence reconnect attempt (ADR-0049 D5): construct a fresh SharedWorker via the worker FACTORY, move\n * both listeners to its port, settle the presumed-dead transport's in-flight per invariant 5, re-run the attach\n * handshake, then flush + re-subscribe. With a bare-instance input (no factory) this is unreachable — reconstruction\n * is structurally unavailable. Never more than one concurrent attempt.\n */\n async function reconnect(): Promise<void> {\n if (reconnecting || detached || workerFactory === undefined) return;\n reconnecting = true;\n let newPort: BridgePort;\n try {\n newPort = resolvePort({ worker: workerFactory });\n } catch {\n reconnecting = false;\n return;\n }\n settleInFlight();\n dataPort.removeEventListener(\"message\", listener);\n controlPort.removeEventListener(\"message\", controlListener);\n controlPort = newPort;\n dataPort = newPort;\n hasPipe = false;\n currentEngineIdentity = undefined;\n windowOpen = true;\n newPort.addEventListener(\"message\", listener);\n newPort.addEventListener(\"message\", controlListener);\n newPort.start?.();\n // ADR-0050: the reconstructed SharedWorker may be a FRESH bootstrap whose placement is still pending —\n // every port must declare before any engine-bound message. The declaration precedes the attach on the same\n // port, and the bootstrap queues the attach until placement resolves (no placement round-trip needed here).\n newPort.postMessage({ [DECLARATION_KEY]: options.storage ?? {} });\n try {\n await runAttachHandshake(newPort, false);\n } catch {\n reconnecting = false;\n return;\n }\n windowOpen = false;\n flushQueue();\n resubscribeAll();\n reconnecting = false;\n }\n\n // ─── ADR-0049 election wiring + supervised destroy ────────────────────────────────────────────────\n /** The store PATH this tab owns — the identity every store-IO surface (OPFS namespaces, meta record, idb db, leader lock) derives from. */\n const resolveDestroyStorePath = (): string => options.storePath ?? options.storeId ?? \"pgxsinkit-overlay-v1\";\n // The elected engine worker factory for THIS attach (ADR-0049 D5): the `createEngineWorker` OVERRIDE, else the\n // default derived from the SharedWorker's reported script URL (`new Worker(url, { type: \"module\" })`). Resolved on\n // the `electionRequired` reply; `undefined` means neither is available — a WIRING failure, not a fallback.\n let electedEngineFactory: (() => ElectedEngineWorker) | undefined;\n\n /**\n * The SharedWorker reported the engine home. In `elected-worker` (router-only) mode this tab must elect its own\n * engine: resolve the engine factory (the `createEngineWorker` override, else the URL-derived default), build the\n * coordinator (once), and take one attach claim. When NEITHER a derivable URL NOR an override is available the\n * engine is genuinely unconstructible on a handle-denied home — a WIRING failure, so the attach fails with the\n * typed {@link ElectedEngineUnconstructibleError} (never a silent no-engine attach). `shared-worker` (SW-direct /\n * declared-idbfs) needs no election.\n */\n function onPlacementResult(result: PlacementQueryResult): void {\n if (detached || placementDecided) return;\n placementDecided = true;\n placementResult = result;\n resolvePlacementKnown?.();\n // SW-direct / declared-idbfs (or a non-placement transport that never replies): the SW-port attach ack gates the flow.\n if (!result.electionRequired) return;\n // Elected-worker (router-only): resolve the engine factory. Auto-derivation from the reported script URL is the\n // default (dual-scope entry); the `createEngineWorker` override wins where an entry is not URL-reconstructible.\n electedEngineFactory = options.createEngineWorker ?? deriveEngineWorkerFactory(result.swScriptUrl);\n if (electedEngineFactory === undefined) {\n // The capability is PRESENT (this home requires election) but the engine cannot be constructed — a wiring\n // defect. Fail the attach typed; never a silent no-engine attach and never a storage downgrade (ADR-0049 D1).\n failFirstAttach(\n new ElectedEngineUnconstructibleError(\n result.swScriptUrl === undefined\n ? \"the SharedWorker reported no derivable script URL and no `createEngineWorker` override was supplied\"\n : \"no `Worker` constructor is available in this scope to derive the module engine and no override was supplied\",\n ),\n );\n return;\n }\n // ADOPT an existing PROVISION grant for this store if one is registered (ADR-0049 step 8, fault row\n // \"provision then attach, same tab → attach adopts the provision grant; never self-queued\"): reuse the same\n // coordinator + its already-granted lock + already-spawned engine — `claimForAttach` adds NO second lock\n // request and spawns NO second engine (invariant 2). The router pipes this tab's OWN connection to that engine\n // and the boot adopts the provisioned store (no double initdb). Absent → build this tab's own coordinator.\n const storePath = resolveDestroyStorePath();\n const adopted = lookupSharedCoordinator(storePath);\n if (adopted !== undefined) {\n retainSharedCoordinator(storePath);\n adoptedSharedCoordinatorStore = storePath;\n electionCoordinator = adopted;\n } else {\n electionCoordinator = buildElectionCoordinator();\n }\n releaseElectionClaim = electionCoordinator.claimForAttach();\n // Provision-pipe HANDOVER (ADR-0049 step 8): when this attach shares its SW port with the provision that\n // registered the adopted coordinator, the router's one-and-only pipe for this connection was already\n // delivered during provisioning — feed it into the normal connect-port path instead of waiting for a\n // re-send that never comes. On a fresh (non-shared) port the stash is empty and the router's ordinary\n // late-joiner `connect-port` drives the handshake as usual.\n if (adopted !== undefined) {\n const stashed = takeProvisionPipe(storePath);\n if (stashed !== undefined) void onConnectPort(stashed.identity, stashed.pipe);\n }\n }\n\n /**\n * SW-direct stores are owned by the in-scope host, not an elected coordinator. Ask that host to quiesce and\n * close, then await its reserved teardown ack before detaching this tab and deleting the store. A timeout is\n * deliberately not treated as proof of worker death: destruction still runs and its bounded ownership retry\n * reports an honest failure while the durable `deleting` phase remains recoverable.\n */\n const awaitSharedHostTeardown = async (): Promise<void> => {\n const placement = placementResult;\n if (placement?.engineHome !== \"shared-worker\") return;\n const identity: EngineIdentity = { swInstanceId: placement.swInstanceId, generation: 0 };\n await new Promise<void>((resolve, reject) => {\n let settled = false;\n const timeout = timers.setTimeout(() => {\n if (settled) return;\n settled = true;\n swTeardownAckResolver = undefined;\n swTeardownIdentity = undefined;\n resolve();\n }, 5_000);\n swTeardownIdentity = identity;\n swTeardownAckResolver = (error) => {\n if (settled) return;\n settled = true;\n timers.clearTimeout(timeout);\n swTeardownAckResolver = undefined;\n swTeardownIdentity = undefined;\n if (error) reject(new Error(`[pgxsinkit] SW-direct host teardown failed: ${error.message}`));\n else resolve();\n };\n controlPort.postMessage(wrapControlEnvelope({ type: \"engine-teardown\", identity }));\n });\n };\n\n /**\n * Construct the tab's election coordinator over the SW control port. The spawn adapter creates the announce\n * control channel and delivers its ENGINE end (`port2`) to the freshly-spawned worker (fixing step-8's\n * \"port2 went nowhere\"); `createControlChannel` then returns the SAME channel so the coordinator's `announce`\n * transfers the ROUTER end (`port1`) to the SharedWorker. `navigator.locks` is read structurally (injectable\n * for tests); the page-lifecycle subscription is the real `pagehide`/`pageshow` (also injectable).\n */\n function buildElectionCoordinator(): ElectionCoordinator {\n return buildElectedCoordinator({\n storePath: resolveDestroyStorePath(),\n controlPort,\n createEngineWorker: electedEngineFactory!,\n ...(workerFactory ? { swFactory: workerFactory } : {}),\n ...(options.storage ? { storage: options.storage } : {}),\n ...(options.electionIo ? { electionIo: options.electionIo } : {}),\n ...(options.awaitOwnershipRelease ? { awaitOwnershipRelease: options.awaitOwnershipRelease } : {}),\n timers,\n ...(pageLifecycle ? { pageLifecycle } : {}),\n ...(options.keepaliveIntervalMs != null ? { keepaliveIntervalMs: options.keepaliveIntervalMs } : {}),\n ...(options.keepaliveMissThreshold != null ? { keepaliveMissThreshold: options.keepaliveMissThreshold } : {}),\n });\n }\n\n /** Ask the SharedWorker how many tabs are attached (this one included) — the destroy peer-refusal gate. */\n const queryDestroyPeers = (): Promise<number> =>\n new Promise<number>((resolve, reject) => {\n const timeout = timers.setTimeout(() => {\n destroyVerdictResolver = undefined;\n reject(new Error(\"[pgxsinkit] destroy() timed out waiting for the SharedWorker peer-count verdict.\"));\n }, options.handoffQueue?.deadlineMs ?? 15000);\n destroyVerdictResolver = (peers) => {\n timers.clearTimeout(timeout);\n destroyVerdictResolver = undefined;\n resolve(peers);\n };\n controlPort.postMessage({ [DESTROY_QUERY_KEY]: true });\n });\n\n // ─── ADR-0049 D5: execution-limit OVERDUE-DISPATCH reporting (tab side) ────────────────────────────\n // When `executionLimit.maxDispatchMs` is set and this tab holds a per-tab pipe (elected engine), a dispatched\n // RPC still pending past the limit is reported ONCE to the router as an identity-tagged `overdue-dispatch`. The\n // router then probes the engine control channel; a WASM-blocked engine cannot answer on its event loop, so the\n // router (past its probe threshold) fans `engine-retiring` and the leader terminates + respawns it. The router\n // NEVER treats slow-below-threshold as death (a long query under the limit runs to completion). Per-id timers,\n // cleared on settlement; reported on the CONTROL port (where the router listens), stamped with the current\n // engine identity so the router discards a stale report. SW-direct has no pipe/identity, so it never arms.\n const overdueMs = options.executionLimit?.maxDispatchMs;\n const overdueTimers = new Map<string, unknown>();\n const clearOverdue = (id: string): void => {\n const handle = overdueTimers.get(id);\n if (handle !== undefined) {\n timers.clearTimeout(handle);\n overdueTimers.delete(id);\n }\n };\n const clearAllOverdue = (): void => {\n for (const handle of overdueTimers.values()) timers.clearTimeout(handle);\n overdueTimers.clear();\n };\n const armOverdue = (id: string): void => {\n if (overdueMs === undefined) return;\n overdueTimers.set(\n id,\n timers.setTimeout(() => {\n overdueTimers.delete(id);\n // Report only while the op is genuinely still outstanding on a live pipe (we know the engine identity).\n if (detached || !rpcPending.has(id) || currentEngineIdentity === undefined) return;\n controlPort.postMessage(\n wrapControlEnvelope({\n type: \"overdue-dispatch\",\n identity: currentEngineIdentity,\n elapsedMs: overdueMs,\n }),\n );\n }, overdueMs),\n );\n };\n\n // ─── RPC helper ──────────────────────────────────────────────────────────────────────────────────\n const rpc = <T>(op: RpcOp, args: unknown[]): Promise<T> => {\n // A detached client has no live port listener, so a worker reply could never resolve this — reject at\n // once rather than register a forever-pending waiter (ADR-0040 P2).\n if (detached) return Promise.reject(detachError());\n const kind: \"read\" | \"mutation\" = MUTATION_RPC_OPS.has(op) ? \"mutation\" : \"read\";\n return new Promise<T>((resolve, reject) => {\n const dispatch = () => {\n const id = newId(\"rpc\");\n rpcPending.set(id, { resolve: resolve as (value: unknown) => void, reject, kind });\n postBridgeMessage(currentDataPort(), codec, \"rpc\", { op, args }, id);\n armSilence();\n armOverdue(id);\n };\n // While the handoff window is open, QUEUE rather than post (invariant 9); otherwise dispatch immediately.\n if (windowOpen) enqueue(dispatch, reject);\n else dispatch();\n });\n };\n\n // ─── Attach handshake ────────────────────────────────────────────────────────────────────────────\n // Re-entrant (ADR-0049): the SAME handshake runs for the FIRST attach and for every re-attach (pipe swap,\n // reconnect). `pendingAttachAck` holds whichever handshake is currently awaiting its `attach-ack`; the bridge\n // listener settles it. `runAttachHandshake` posts `attach` over a target port and awaits the ack.\n let pendingAttachAck: { resolve: (ack: AttachAckPayload) => void; reject: (error: Error) => void } | null = null;\n const runAttachHandshake = (target: BridgePort, includeRestore: boolean): Promise<AttachAckPayload> =>\n new Promise<AttachAckPayload>((resolve, reject) => {\n // The restore artifact rides at most ONE handshake ever (`restoreConsumed`): posting transfers (detaches)\n // its ArrayBuffer, so any later handshake would carry an empty husk. The caller chooses the target that\n // actually reaches the engine home; this guard makes a second carry structurally impossible.\n const carryRestore = includeRestore && restoreWire !== undefined && !restoreConsumed;\n if (carryRestore) restoreConsumed = true;\n pendingAttachAck = { resolve, reject };\n postBridgeMessage(\n target,\n codec,\n \"attach\",\n buildAttachPayload(carryRestore),\n undefined,\n carryRestore && restoreWire ? [restoreWire.buffer] : undefined,\n );\n });\n\n // ADR-0041 stage 2 — staged boot readiness on the worker-attached client. The `attach-ack` fires AT the\n // engine's `localReadReady` (the Option B contract), so this client resolves `attachSyncClient` there and\n // `localReadReady` is settled off the ack. `writeReady`/`bootSettled` cross in the engine's background tail:\n // they resolve off the `milestone` broadcast when this tab is attached as the stage fires, OR off the ack's\n // late-attach fold when the stage had already fired before this tab attached — one engine crosses each stage\n // once, so both routes observe the same monotonic sequence. A tail failure rejects the matching stage via\n // the `milestone-error` broadcast / the ack's stage-error fold, so a gated write or a `bootSettled` awaiter\n // fails loudly rather than hanging. All guarded so a rejection on an unconsumed stage is never unhandled.\n let resolveLocalReadReady!: () => void;\n const localReadReady = new Promise<void>((resolve) => {\n resolveLocalReadReady = resolve;\n });\n let resolveWriteReady!: () => void;\n let rejectWriteReady!: (error: unknown) => void;\n const writeReady = new Promise<void>((resolve, reject) => {\n resolveWriteReady = resolve;\n rejectWriteReady = reject;\n });\n let resolveBootSettled!: () => void;\n let rejectBootSettled!: (error: unknown) => void;\n const bootSettled = new Promise<void>((resolve, reject) => {\n resolveBootSettled = resolve;\n rejectBootSettled = reject;\n });\n void localReadReady.catch(() => undefined);\n void writeReady.catch(() => undefined);\n void bootSettled.catch(() => undefined);\n // Idempotent settlers — a stage may be signalled by BOTH the ack fold and a milestone event (or by a\n // detach), and must settle exactly once. `localReadReady` never rejects (a local-read-core failure rejects\n // the attach handshake instead, so this client is never handed out).\n let writeReadySettled = false;\n let bootSettledSettled = false;\n const settleWriteReady = () => {\n if (writeReadySettled) return;\n writeReadySettled = true;\n resolveWriteReady();\n };\n const failWriteReady = (error: unknown) => {\n if (writeReadySettled) return;\n writeReadySettled = true;\n rejectWriteReady(error);\n };\n const settleBootSettled = () => {\n if (bootSettledSettled) return;\n bootSettledSettled = true;\n resolveBootSettled();\n };\n const failBootSettled = (error: unknown) => {\n if (bootSettledSettled) return;\n bootSettledSettled = true;\n rejectBootSettled(error);\n };\n\n // ─── Detach (explicit stop AND page teardown) ──────────────────────────────────────────────────────\n // The platform fires NO close event on a SharedWorker port — a tab that simply closes would leave its\n // subscriptions (and their per-write rerun cost) alive in the worker for the worker's whole lifetime\n // (ADR-0040 decision 1; surfaced by the two-tab board e2e). So the same detach runs from `stop()` AND from\n // `pagehide` with `persisted === false` — the terminal signal of a real close/navigate-away. A\n // bfcache-parked page (`persisted === true`) keeps its attachment: its port survives parking and resumes\n // on restore, so detaching there would strand the restored page. Idempotent — pagehide then stop is safe.\n //\n // Installed BEFORE the attach handshake is posted/awaited (ADR-0040 P2): a tab that closes DURING a slow\n // worker boot must still send `detach` and reject the pending attach-ack, rather than leaving the worker\n // holding stale port/token bookkeeping for a page that is already gone. Pre-ack every pending map below is\n // empty, so the settlement loops are no-ops except for the attach-ack rejection.\n const detachFromWorker = (): void => {\n if (detached) return;\n detached = true;\n status.isRunning = false;\n // Detach THIS tab; the worker engine keeps running for other tabs (ADR-0032 decision 2). Sent on the\n // CURRENT data port (ADR-0049: the pipe once swapped, else the control port).\n for (const queryId of diffHandlers.keys()) postBridgeMessage(currentDataPort(), codec, \"unsubscribe\", { queryId });\n diffHandlers.clear();\n activeSubscriptions.clear();\n postBridgeMessage(currentDataPort(), codec, \"detach\", null);\n // ADR-0049 D8: tell the SharedWorker ROUTER this tab is gone, on the CONTROL port — the `detach` above rode\n // the per-tab PIPE, which the router never sees, so its `tabCount` (the destroy peer-refusal input) would\n // otherwise never fall. A `pgx0049` control envelope (the router stays payload-blind); harmless on a\n // non-placement transport (ignored) and when the control port IS the data port (SW-direct).\n controlPort.postMessage(wrapControlEnvelope({ type: \"tab-detach\" }));\n // Settle every tab-side promise now the port listener is about to go (ADR-0040 P2) — otherwise an\n // operation still awaiting a worker reply hangs forever. RPCs and initial subscribes promise DATA, so\n // REJECT them (fabricating a value is worse than a clear failure); hydration and group-ready waiters are\n // DONENESS signals, so RESOLVE them (their awaiters are void-chained hook code that should settle, not\n // throw). The attach-ack is rejected too so a detach DURING boot rejects `attachSyncClient` (a no-op once\n // it has already settled).\n const settleAttachAck = pendingAttachAck;\n pendingAttachAck = null;\n settleAttachAck?.reject(detachError());\n // ADR-0041 (FIX A): reject EVERY still-pending readiness STAGE with ONE typed `ClientDisposedError`, so\n // `instanceof ClientDisposedError` behaves identically in worker and in-process mode (the class doc + the\n // in-process client already promise the typed error on disposal). `detachError()` stays for RPC/subscription\n // rejections below, where the more specific \"client detached\" message is useful for a data operation.\n // `localReadReady` is left as-is: pre-ack it never resolved (the attach itself rejected); post-ack it already\n // resolved. The `milestone-error` path is untouched — that is a genuine engine failure, not disposal.\n const disposedError = new ClientDisposedError();\n // ADR-0049: a detach BEFORE the first attach ack settles fails `attachSyncClient` (a detach-during-boot rejects\n // the attach rather than leaving it pending) — with the SAME \"client detached\" error the pre-firstAttachReady\n // handshake rejection used, preserving the ADR-0040 P2 contract (idempotent once the attach already resolved).\n failFirstAttach(detachError());\n failWriteReady(disposedError);\n failBootSettled(disposedError);\n // The attached `ready` had NO reject path — a detach BEFORE initial sync would otherwise leave\n // `client.ready` / `client.start()` pending forever. Settle it once with the same disposed error.\n if (!readyResolved) {\n readyResolved = true;\n rejectReady(disposedError);\n }\n for (const pending of rpcPending.values()) pending.reject(detachError());\n rpcPending.clear();\n clearAllOverdue();\n for (const pending of initialPending.values()) pending.reject(detachError());\n initialPending.clear();\n for (const resolve of hydratedPending.values()) resolve();\n hydratedPending.clear();\n for (const waiters of groupWaiters.values()) for (const resolve of waiters) resolve();\n groupWaiters.clear();\n // ADR-0049: queued handoff ops settle with the detach error (rule 5), and the placement timers are cleared.\n const queued = handoffQueue.splice(0);\n for (const item of queued) item.reject(detachError());\n clearQueueDeadline();\n // ADR-0049 step 10b: release this tab's leader-lock claim (invariant 2 — one claim per attachment, released\n // on detach). Idempotent; a no-op when this tab never elected (SW-direct / no factory).\n releaseElectionClaim?.();\n releaseElectionClaim = undefined;\n // Release this tab's ref on an ADOPTED shared coordinator (ref-counted registry cleanup); no-op otherwise.\n if (adoptedSharedCoordinatorStore !== undefined) {\n releaseSharedCoordinator(adoptedSharedCoordinatorStore);\n adoptedSharedCoordinatorStore = undefined;\n }\n if (silenceHandle !== undefined) {\n timers.clearTimeout(silenceHandle);\n silenceHandle = undefined;\n }\n if (pagehideListener) pageWindow?.removeEventListener(\"pagehide\", pagehideListener);\n // Tear down BOTH listeners: the bridge listener on the data port, the control listener on the control port.\n dataPort.removeEventListener(\"message\", listener);\n controlPort.removeEventListener(\"message\", controlListener);\n dataPort.close?.();\n if (controlPort !== dataPort) controlPort.close?.();\n };\n // Structural window guard — this file compiles without the DOM lib (it also runs under tests/workers).\n interface PageLifecycleWindowLike {\n addEventListener(type: \"pagehide\" | \"pageshow\", handler: (event: { persisted: boolean }) => void): void;\n removeEventListener(type: \"pagehide\" | \"pageshow\", handler: (event: { persisted: boolean }) => void): void;\n }\n const pageWindow = (globalThis as { window?: PageLifecycleWindowLike }).window;\n const pagehideListener = pageWindow\n ? (event: { persisted: boolean }) => {\n if (!event.persisted) detachFromWorker();\n }\n : undefined;\n if (pagehideListener) pageWindow?.addEventListener(\"pagehide\", pagehideListener);\n // ADR-0049 step 10b: the real page-lifecycle subscription the election coordinator's BFCache hooks use\n // (`pagehide.persisted` → release authority + retire; `pageshow` → re-queue + re-attach). Structural window\n // check, exactly like the detach `pagehide` above; injectable (`electionIo.pageLifecycle`) for tests.\n const pageLifecycle: CoordinatorDeps[\"pageLifecycle\"] =\n options.electionIo?.pageLifecycle ??\n (pageWindow\n ? {\n onPageHide: (listener) => pageWindow.addEventListener(\"pagehide\", (event) => listener(event.persisted)),\n onPageShow: (listener) => pageWindow.addEventListener(\"pageshow\", () => listener()),\n }\n : undefined);\n\n const initialToken = options.getToken ? await options.getToken() : null;\n // The testing memory-backend override travels as an explicit wire field, not the symbol marker — a symbol\n // does not survive `postMessage` structured clone (ADR-0036). Read it off the spread helper's options here.\n const memoryOverride = readTestStoreMarker(options) === \"memory\";\n // Restore (ADR-0035 decision 6): a `File`/`Blob` cannot cross as a transferable, so decompose it into a\n // zero-copy `ArrayBuffer` + name/mime (the `ExportArtefactWire` pattern in reverse) and list the buffer on\n // the attach `postMessage`'s transfer list. Read the bytes BEFORE building the payload (async).\n const restoreWire: RestoreArtefactWire | undefined = options.restoreFrom\n ? {\n buffer: await options.restoreFrom.arrayBuffer(),\n fileName: options.restoreFrom instanceof File ? options.restoreFrom.name : \"restore.pgdata.tar\",\n mimeType: options.restoreFrom.type || \"application/octet-stream\",\n }\n : undefined;\n // The attach payload builder — reused by the FIRST attach and every re-attach (pipe swap / reconnect). Restore\n // rides ONLY the one handshake that reaches the engine home (SW port in SW-direct, first pipe attach when\n // elected — see the send sites); `runAttachHandshake`'s `restoreConsumed` guard makes any later carry\n // structurally impossible (the buffer is transferred/detached, and you cannot restore into a running store).\n function buildAttachPayload(includeRestore: boolean): AttachPayload {\n return {\n token: initialToken,\n ...(options.storeId ? { storeId: options.storeId } : {}),\n ...(options.storePath ? { storePath: options.storePath } : {}),\n // ADR-0050: the wire storage declaration also rides the attach payload, so the ENGINE binds it\n // (durability included) wherever it runs — the pre-placement declaration message only steers placement.\n ...(options.storage ? { storage: options.storage } : {}),\n ...(memoryOverride ? { testStoreBackend: \"memory\" as const } : {}),\n ...(options.executionLimit ? { executionLimit: options.executionLimit } : {}),\n ...(includeRestore && restoreWire ? { restore: restoreWire } : {}),\n ...(options.syncEnabled != null || options.role != null || options.freshStore != null\n ? {\n config: {\n ...(options.syncEnabled != null ? { syncEnabled: options.syncEnabled } : {}),\n ...(options.role != null ? { role: options.role } : {}),\n ...(options.freshStore != null ? { freshStore: options.freshStore } : {}),\n },\n }\n : {}),\n };\n }\n // ─── ADR-0050 declaration-FIRST, then placement-query, then handshake ─────────────────────────────\n // Post the storage DECLARATION MESSAGE first — always, even empty (`{}` = \"no opinion\") — because a\n // registry-silent worker DEFERS its placement decision until the first declaration arrives (`backend:\n // \"idbfs\"` must skip the probe, so the declaration must precede the decision). Then the placement query\n // (ADR-0049): a router-only SharedWorker (elected-worker home) is payload-blind and DROPS the bridge\n // `attach`, so an SW-port ack could never gate the flow — but the bootstrap meta listener answers the\n // placement query in BOTH SW modes, so this reliably drives election. In SW-direct / declared-idbfs (and\n // the no-placement / plain-port case) the reply is `electionRequired: false` (or absent) and the SW-port\n // attach below acks normally — a plain in-scope host attach.\n controlPort.postMessage({ [DECLARATION_KEY]: options.storage ?? {} });\n controlPort.postMessage({ [PLACEMENT_QUERY_KEY]: true });\n // EVERY boot awaits the placement reply before the first handshake (ADR-0050). The worker only installs the\n // engine listener on this port once placement resolves and the port's declaration is accepted, so an attach\n // posted earlier would be refused as a protocol violation — and the reply's slot is also where a storage\n // DECLARATION REFUSAL arrives (typed boot failure instead of a reply). This costs no real latency: the old\n // fire-and-forget attach queued browser-side behind the very same placement decision. Restore-bearing boots\n // additionally depend on this ordering for artifact routing: the restore's ArrayBuffer detaches on first\n // post, and in elected mode the router-only SharedWorker silently DROPS bridge `attach` envelopes — so the\n // restore is carried on the SW-port handshake only when the in-scope host IS the engine (SW-direct /\n // declared-idbfs), and on the first per-tab PIPE handshake (`onConnectPort`) when the engine is elected.\n try {\n await placementKnown;\n } catch (error) {\n // A typed declaration refusal (never a plain transport error): run the full detach so both listeners and\n // the pagehide handler are removed, then propagate — the boot fails loudly with the refusal.\n detachFromWorker();\n throw error;\n }\n // Send the tab's attach handshake — placement is KNOWN here (awaited above). SW-direct / plain / no-reply:\n // the current data port reaches the in-scope engine, which acks it (restore included). Elected\n // (`electionRequired`): the engine-reaching handshake is the per-tab PIPE one (`onConnectPort`, or the\n // adoption handover of a stashed provision pipe); the SW-port post below is the router-dropped\n // fire-and-forget (payload-blind — never taught to answer bridge envelopes), kept so `firstAttachReady` can\n // settle off whichever port answers first. The ONE case that must not post is elected mode with the data\n // path ALREADY swapped onto an adopted pipe — there the post would reach the live engine as a DUPLICATE\n // attach (a second boot) instead of being dropped.\n const handshakePort = currentDataPort();\n if (placementResult?.electionRequired !== true || handshakePort === controlPort) {\n void runAttachHandshake(handshakePort, placementResult?.electionRequired !== true).catch(() => undefined);\n }\n try {\n await firstAttachReady;\n } catch (error) {\n // The engine boot failed (ADR-0032 FIX 1), a terminal pagehide rejected the ack mid-boot (ADR-0040 P2), or a\n // degraded election never delivered a pipe: run the full detach so BOTH listeners AND the pagehide handler are\n // removed (no leaks), then propagate. Idempotent — a pagehide that already detached makes this a cheap no-op.\n detachFromWorker();\n throw error;\n }\n status.isRunning = true;\n\n // ─── Live-rows seam (ADR-0032 S2 §4) ─────────────────────────────────────────────────────────────\n const subscribeLiveRows = async <TRow extends Record<string, unknown>>(\n input: SubscribeLiveRowsInput,\n onRows: (rows: TRow[]) => void,\n ): Promise<LiveRowsSubscription<TRow>> => {\n // A detached client has no port listener, so `live-initial` could never arrive — reject at once rather\n // than register a forever-pending initial waiter (ADR-0040 P2).\n if (detached) throw detachError();\n const queryId = newId(\"live\");\n const materializer = new LiveRowsMaterializer<TRow>(input.pkColumns);\n diffHandlers.set(queryId, (diff) => {\n onRows(materializer.apply(diff));\n });\n // The subscribe payload — reused by the initial subscribe AND by the ADR-0049 re-subscribe on a pipe swap.\n const subscribePayload = {\n queryId,\n sql: input.sql,\n params: [...input.params],\n ...(input.fields ? { fields: [...input.fields] } : {}),\n ...(input.pkColumns ? { pkColumns: [...input.pkColumns] } : {}),\n ...(input.use ? { use: [...input.use] } : {}),\n // Per-subscription keep-alive hint (ADR-0040 decision 4) forwarded to the worker's manager.\n ...(input.keepAliveMs != null ? { keepAliveMs: input.keepAliveMs } : {}),\n };\n let initial: LiveInitialPayload;\n try {\n initial = await new Promise<LiveInitialPayload>((resolve, reject) => {\n const id = newId(\"sub\");\n initialPending.set(id, { resolve, reject });\n // While the handoff window is open, QUEUE the subscribe (invariant 9); otherwise post at once.\n const dispatch = () => postBridgeMessage(currentDataPort(), codec, \"subscribe\", subscribePayload, id);\n if (windowOpen) {\n enqueue(dispatch, (error) => {\n initialPending.delete(id);\n reject(error);\n });\n } else {\n dispatch();\n }\n });\n } catch (error) {\n // The worker rejected the subscribe (invalid SQL, etc.); the initial-payload waiter rejected via the\n // `rpc-result` route (ADR-0032 FIX 2). Drop the pre-registered diff handler so no orphan survives.\n diffHandlers.delete(queryId);\n throw error;\n }\n const initialRows = materializer.seed(initial.rows as TRow[]);\n // Register the live query for ADR-0049 re-subscribe: on a pipe swap, re-issue the SAME subscribe (same\n // queryId → diffs still route to the same materializer/handler) and re-seed the materializer off the fresh\n // snapshot. This is the re-attach re-establishment of live queries (ADR-0041 staged readiness); its\n // multi-tab integration coverage is step 12. A rejected re-subscribe leaves the existing rows in place.\n const resubscribe = () => {\n const rid = newId(\"sub\");\n initialPending.set(rid, {\n resolve: (fresh) => {\n onRows(materializer.seed(fresh.rows as TRow[]));\n },\n reject: () => undefined,\n });\n postBridgeMessage(currentDataPort(), codec, \"subscribe\", subscribePayload, rid);\n };\n activeSubscriptions.set(queryId, { resubscribe });\n // Pending groups present → build the `hydrated` promise the worker settles via `live-hydrated` (posted\n // after the catch-up rows on the same port — rows-before-signal). A missing/empty `hydratingTables`\n // means every referenced group (eager OR lazy) was already ready (steady state) or sync is disabled:\n // no hydration is pending, so no promise. Resolved on unsubscribe too, so an abandoned subscription\n // never leaves a forever-pending promise behind.\n let hydrated: Promise<void> | undefined;\n if (initial.hydratingTables && initial.hydratingTables.length > 0) {\n hydrated = new Promise<void>((resolve) => {\n hydratedPending.set(queryId, resolve);\n });\n }\n return {\n initialRows,\n unsubscribe: () => {\n diffHandlers.delete(queryId);\n activeSubscriptions.delete(queryId);\n hydratedPending.get(queryId)?.();\n hydratedPending.delete(queryId);\n postBridgeMessage(currentDataPort(), codec, \"unsubscribe\", { queryId });\n },\n // The lazy relations the worker's guard activated for this query (observability). `hydrated` — driven\n // by `hydratingTables`, not this — resolves once every pending group's caught-up rows are delivered.\n ...(initial.lazyTables ? { lazyTables: initial.lazyTables } : {}),\n ...(hydrated ? { hydrated } : {}),\n };\n };\n\n // ─── Assembled client ────────────────────────────────────────────────────────────────────────────\n const notSupported = (name: string) => (): never => {\n throw new Error(\n `[pgxsinkit] ${name} is not available on a worker-attached client: the tab holds no local PGlite. ` +\n `Direct store access (client.pglite) and store-lifecycle ops (destroy/dropReadCache) have no tab-local ` +\n `implementation. One-shot Drizzle reads (query/queryRow/queryRaw/queryRawRow), lazy activation ` +\n `(ensureSynced), and the write API ARE proxied to the worker.`,\n );\n };\n\n // A tab has no local store to run a read transaction against — every bridge executor's `transaction` throws.\n const noBridgeTransaction = (): never => {\n throw new Error(\n \"[pgxsinkit] client.drizzle.transaction() is not available on a worker-attached client: a read \" +\n \"transaction needs a local PGlite the tab does not have. Use one-shot reads (client.query) instead.\",\n );\n };\n // The ONE encoder of the `guardedQuery` positional wire tuple ({@link GuardedQueryWireArgs}): both tab-side\n // senders (the bridge executor below and `guardedRawQuery`) route through this so the shape is written once\n // and shares its contract with the worker-side decoder (`defineSyncWorker` types the decode against the same\n // type). The optional trailing `use` is appended only when present — never a spread of `undefined`.\n const guardedQueryArgs = (\n sql: string,\n params: unknown[] | undefined,\n rowMode: \"array\" | \"object\" | undefined,\n use?: readonly string[],\n ): GuardedQueryWireArgs => {\n // `rowMode` is only included when set (exactOptionalPropertyTypes: no `{ rowMode: undefined }`).\n const options = rowMode ? { rowMode } : {};\n return use ? [sql, params, options, use] : [sql, params, options];\n };\n // A `ClientPGlite`-shaped bridge executor Drizzle runs reads against (ADR-0032 decision 4). Drizzle's pglite\n // driver calls only `client.query` for reads and `client.transaction` for `.transaction()`. `query` routes\n // to the worker's `guardedQuery` RPC (stripping drizzle's non-serializable `parsers` to just `rowMode`; the\n // worker re-applies drizzle's identity parsers) and returns the full `Results` so Drizzle's mapping runs on\n // the tab. `use` (a raw-fragment's undetectable lazy relations, ADR-0021) is baked into the closure per read —\n // see `bridgeReadDrizzle` — NOT stashed on a shared field: a shared stash races, because Drizzle executes\n // the builder in a microtask AFTER `queryRaw` returns, so a plain `query` issued synchronously in between\n // would drain its executor first and consume the wrong call's `use`. A per-read scoped executor cannot\n // cross-contaminate.\n const makeBridgeExecutor = (use?: readonly string[]): ClientPGlite =>\n ({\n query: (sql: string, params?: unknown[], options?: { rowMode?: \"array\" | \"object\" }): Promise<Results> =>\n rpc<Results>(\"guardedQuery\", guardedQueryArgs(sql, params, options?.rowMode, use)),\n transaction: noBridgeTransaction,\n }) as unknown as ClientPGlite;\n // The base (no-`use`) bridge database `client.drizzle` exposes, plus the cached factory that mints a fresh\n // database over a per-read `use`-carrying executor (the schema/relations are computed ONCE, ADR-0032\n // decision 4). `views` are unchanged.\n const { drizzle, views, drizzleFor } = buildRegistryReadHandles(options.registry, makeBridgeExecutor());\n // Build a `use`-scoped Drizzle for one `queryRaw`/`queryRawRow` call and run its builder against a shallow\n // clone of the client whose `drizzle` is that scoped db. The clone is safe: every client method is an arrow\n // closing over this scope (no `this`), so spreading preserves behaviour and only `drizzle` is swapped.\n const bridgeReadDrizzle = (use?: readonly string[]) => drizzleFor(makeBridgeExecutor(use));\n\n const groupKeyForTable = (table: SyncTableName<TRegistry>): string | undefined => {\n const entry = options.registry[table];\n return entry?.consistencyGroup ?? entry?.shape?.shapeKey;\n };\n\n const client: AttachedSyncClient<TRegistry> = {\n drizzle,\n views,\n // The tab has no local PGlite; reads go through the live-rows bridge. Touching `.pglite` is a misuse\n // — the real trap is installed as a NON-ENUMERABLE throwing getter after this literal (see below).\n pglite: undefined as never,\n tables: Object.fromEntries(\n Object.keys(options.registry).map((tableKey) => [\n tableKey,\n {\n key: tableKey,\n mode: options.registry[tableKey as SyncTableName<TRegistry>]!.mode,\n create: (input: unknown) => rpc<void>(\"create\", [tableKey, input]),\n update: (entityKey: Record<string, string>, patch: unknown) =>\n rpc<void>(\"update\", [tableKey, entityKey, patch]),\n delete: (entityKey: Record<string, string>) => rpc<void>(\"delete\", [tableKey, entityKey]),\n },\n ]),\n ) as SyncClient<TRegistry>[\"tables\"],\n localReadReady,\n writeReady,\n bootSettled,\n ready,\n status,\n start: async () => {\n await ready;\n },\n // The tab facade holds no local engine — its \"activity\" is the worker bridge. Synchronously detaching it\n // (idempotent, no await) IS the tab-side halt: it stops posting/subscribing on the pipe and settles every\n // pending promise, the analogue of aborting the in-process engine's streams. `stop()` does the same.\n haltActivity: () => {\n detachFromWorker();\n },\n stop: async () => {\n detachFromWorker();\n },\n // ADR-0049 step 10b — SUPERVISED destroy from the attached facade. The SUPERVISOR is the TAB context, which\n // survives engine shutdown BY CONSTRUCTION: it detaches the engine, then runs the destructive lifecycle\n // itself (the tab has full OPFS/IndexedDB access). Ordering, per the plan's D8 fault rows:\n // 1. PEER REFUSAL FIRST — the SharedWorker alone knows the attached-tab count; more than one tab attached\n // (this one + a peer) → `StoreDestroyRefusedError` (close peers first). Runs BEFORE detach + any effect.\n // 2. REFUSE-IF-OWED (unless `force`) — a cheap journal read via the `diagnostics` RPC while still attached\n // (one round-trip; the honest minimum — the tab has no local journal). `force` skips it.\n // 3. DETACH, then run the destruction (set `deleting` → delete sentinel → delete backend store → delete\n // meta record) with a bounded ownership-lock-lag retry on the backend delete (the just-detached engine's\n // VFS ownership lock may lag). The initiating call resolves from the tab supervisor (invariant 13).\n destroy: async (destroyOptions) => {\n if (detached) throw detachError();\n const peers = await queryDestroyPeers();\n if (peers > 1) throw new StoreDestroyRefusedError(peers);\n if (!destroyOptions?.force) {\n const { mutation } = await client.diagnostics();\n const owed =\n mutation.pendingCount +\n mutation.sendingCount +\n mutation.failedCount +\n mutation.quarantinedCount +\n mutation.conflictedCount;\n if (owed > 0) {\n throw new Error(\n `destroy() refused: ${owed} mutation(s) still owed to the server. Flush them first or call destroy({ force: true }).`,\n );\n }\n }\n const storePath = resolveDestroyStorePath();\n // ADR-0049 D8 ordering (elected placement): RETIRE this tab's own elected engine and AWAIT its teardown —\n // the point its EXCLUSIVE OPFS sync-access handle is provably released — BEFORE deleting. The engine is a\n // dedicated Worker torn down ASYNCHRONOUSLY via the coordinator's retirement handshake; without this\n // barrier `deleteBackendStore` raced that release and failed `NoModificationAllowedError`. Run it while the\n // control channel is still up (before detach closes the SW port). A no-op when this tab holds no engine.\n if (electionCoordinator !== undefined) await electionCoordinator.retireEngine();\n else await awaitSharedHostTeardown();\n // Detach the engine FIRST — the supervisor is this tab, which outlives the engine. Idempotent.\n detachFromWorker();\n const effects = options.createDestructionEffects?.(storePath) ?? createStoreDestructionEffects(storePath);\n await runStoreDestruction(effects);\n },\n dropReadCache: notSupported(\"client.dropReadCache\"),\n flush: (table) => rpc<void>(\"flush\", [table]),\n reconcile: (table) => rpc<void>(\"reconcile\", [table]),\n retryFailed: (table) => rpc<void>(\"retryFailed\", [table]),\n recoverSending: (table) => rpc<void>(\"recoverSending\", [table]),\n readMutationDetails: (table) => rpc<MutationDetail[]>(\"readMutationDetails\", [table]),\n // Inspection reads run in the worker (ADR-0032 S2) — the same surface as the in-process client. `pglite`\n // itself stays blocked (below); these route the raw statement over the RPC round-trip instead.\n rawQuery: (sql, params, options) => rpc<Results>(\"rawQuery\", [sql, params, options]),\n rawExec: (sql, options) => rpc<Results[]>(\"rawExec\", [sql, options]),\n // The GUARDED raw-SQL read (ADR-0032 decision 4) — the seam the worker host dispatches `guardedQuery` to.\n // Unlike `rawQuery` (raw inspection, no guard), this routes to the worker's `guardedRawQuery`, so the read\n // gate + lazy-group guard run worker-side. Only `rowMode` crosses in the options (see the bridge executor).\n guardedRawQuery: (sql, params, options, use) =>\n rpc<Results>(\"guardedQuery\", guardedQueryArgs(sql, params, options?.rowMode, use)),\n mutate: {\n create: (table, input) => rpc<void>(\"create\", [table, input]),\n update: (table, entityKey, patch) => rpc<void>(\"update\", [table, entityKey, patch]),\n delete: (table, entityKey) => rpc<void>(\"delete\", [table, entityKey]),\n batch: (items) => rpc<void>(\"batch\", [items]),\n },\n discardConflict: (table, entityKey) => rpc<void>(\"discardConflict\", [table, entityKey]),\n discardQuarantined: (table, entityKey) => rpc<void>(\"discardQuarantined\", [table, entityKey]),\n diagnostics: (table) => rpc<{ mutation: MutationDiagnostics }>(\"diagnostics\", [table]),\n // The registry-wide mutation-status API (slice 4) over the SAME factory the in-process client uses,\n // wired to this facade's shared seams: the live-rows bridge (`subscribeLiveRows`) and the one-shot\n // `rawQuery` RPC. No new bridge message — `client.mutations` behaves identically to the in-process client.\n mutations: createMutationsApi({\n registry: options.registry,\n subscribeLiveRows,\n query: (sql, params) => rpc<Results>(\"rawQuery\", [sql, params]),\n }),\n // One-shot Drizzle reads (ADR-0032 decision 4) — proxied, mirroring the in-process shapes exactly. `build`\n // runs against a client whose `drizzle` is a bridge database, so awaiting the builder executes the read via\n // the `guardedQuery` RPC: the read gate + lazy-group guard run worker-side (no tab-side `prepareQuery`) and\n // Drizzle's own mapping runs on the tab. The pure `query`/`queryRow` need no `use` (the worker's SQL scan\n // finds every relation) and run against the base `client`. `queryRaw`/`queryRawRow` may embed a raw\n // fragment naming a lazy relation the scan cannot see, so each runs against a `{ ...client, drizzle }`\n // clone whose drizzle carries THAT call's `use` in its own executor — no shared state, no cross-read race.\n query: (build) => Promise.resolve(build(client)),\n queryRow: async (build) => {\n const rows = await build(client);\n return rows[0] ?? null;\n },\n queryRaw: ({ build, use }) => Promise.resolve(build({ ...client, drizzle: bridgeReadDrizzle(use) })),\n queryRawRow: async ({ build, use }) => {\n const rows = await build({ ...client, drizzle: bridgeReadDrizzle(use) });\n return rows[0] ?? null;\n },\n // Lazy activation (ADR-0021) over the shared engine — a plain RPC. Activation is engine-WIDE, but unlike\n // `desync` it is additive and idempotent: starting a group another tab already activated is a no-op, and\n // it never reverts or truncates, so there is no cross-tab footgun. Resolves once the group's stream is\n // started (catch-up may still be in flight — await `groupReady` for that), exactly as in-process.\n ensureSynced: (keys) => rpc<void>(\"ensureSynced\", [keys]),\n // `isSynced` is the SYNCHRONOUS peek in-process (`isTableStarted` — is the group's stream STARTED). It\n // cannot be an RPC (its signature returns a boolean, not a promise), and the tab's cached state cannot\n // answer it: the bridge delivers per-group CATCH-UP readiness (`status.groups` / `groupReady`), which is\n // strictly weaker than activation-started — an activated-but-not-yet-caught-up lazy group reads as\n // not-ready, the very case `isSynced` exists to distinguish. So no faithful synchronous answer is derivable.\n isSynced: () => {\n throw new Error(\n \"[pgxsinkit] client.isSynced is not available on a worker-attached client: it is a SYNCHRONOUS \" +\n \"activation-STARTED peek (in-process: isTableStarted), but the tab caches only per-group CATCH-UP \" +\n \"readiness (status.groups / groupReady) — an activated-but-not-caught-up group reads as not-ready — \" +\n \"so a faithful synchronous answer cannot be derived, and a synchronous method cannot be an RPC. Use \" +\n \"client.groupReady(table) for catch-up completion, and client.ensureSynced([...]) to activate a lazy relation.\",\n );\n },\n // In SharedWorker mode the engine is SHARED, so a desync from one tab reverts the consistency group for\n // EVERY attached tab — inherent to desync's group-wide semantics (that footgun is why the narrower\n // `discardEphemeral` exists). The RPC runs the worker's real `desync` (same refusals as in-process).\n desync: (key) => rpc<void>(\"desync\", [key]),\n // Scoped, multi-tab-safe finalize (ADR-0021): drops an ephemeral relation's local rows and reverts it to\n // dormant. Safe under a shared engine because an ephemeral window is per-delivery-session and inherently\n // single-consumer; the RPC runs the worker's real `discardEphemeral` (refuses persistent members).\n discardEphemeral: (key) => rpc<void>(\"discardEphemeral\", [key]),\n // The worker activates lazy relations inside its `subscribe` handler (via the `use` hint), so the tab's\n // `prepareQuery` is a no-op — the live-rows subscription is already guarded worker-side (ADR-0021).\n // Empty `lazyTables`: the real scan's keys travel back on the subscription itself (`live-initial`).\n prepareQuery: async () => ({ lazyTables: [] }),\n // The worker computes the pending hydrating tables inside its `subscribe` handler (on its owned client)\n // and reports them back on `live-initial` (`hydratingTables`), so the tab-side seam is a no-op here.\n hydratingTablesFor: () => [],\n transaction: async ({ mode }: { mode: WriteMode }, run) => {\n // Collect the unit's mutations tab-side (the run callback cannot cross the wire), then RPC the\n // serialized items + mode; the worker replays them into a real `client.transaction` (matching acks).\n const collected: MutationBatchItem<TRegistry>[] = [];\n const txTables = Object.fromEntries(\n Object.keys(options.registry).map((tableKey) => [\n tableKey,\n {\n create: (input: unknown) => {\n collected.push({ table: tableKey, kind: \"create\", input } as MutationBatchItem<TRegistry>);\n },\n update: (entityKey: Record<string, string>, patch: unknown) => {\n collected.push({ table: tableKey, kind: \"update\", entityKey, patch } as MutationBatchItem<TRegistry>);\n },\n updateBlind: (entityKey: Record<string, string>, patch: unknown) => {\n // ADR-0022 addendum: the `blind` flag rides the serialized item across the wire; the worker\n // replays it through `client.transaction`'s `updateBlind`, identical to the in-process client.\n collected.push({\n table: tableKey,\n kind: \"update\",\n entityKey,\n patch,\n blind: true,\n } as MutationBatchItem<TRegistry>);\n },\n delete: (entityKey: Record<string, string>) => {\n collected.push({ table: tableKey, kind: \"delete\", entityKey } as MutationBatchItem<TRegistry>);\n },\n },\n ]),\n ) as SyncTransaction<TRegistry>[\"tables\"];\n await run({ tables: txTables });\n if (collected.length === 0) return { acks: [] };\n return rpc<SyncTransactionResult>(\"transaction\", [{ mode, items: collected }]);\n },\n groupReady: async (table) => {\n // A detached client will never receive further `groupReady`/status edges — reject at once rather than\n // register a waiter that detach already drained (ADR-0040 P2).\n if (detached) throw detachError();\n const groupKey = groupKeyForTable(table);\n if (groupKey == null || readyGroups.has(groupKey)) return;\n await new Promise<void>((resolve) => {\n const waiters = groupWaiters.get(groupKey) ?? [];\n waiters.push(resolve);\n groupWaiters.set(groupKey, waiters);\n });\n },\n subscribeLiveRows,\n // Boot observability (ADR-0034): pull the worker engine's stored boot report over the bridge — returns\n // the same report regardless of when this tab attached (a late tab reads a boot that predates it).\n bootReport: () => rpc<BootReport | null>(\"bootReport\", []),\n // Live-query diagnostics (ADR-0040 decision 5): pull the worker manager's per-entry snapshot over the\n // bridge (digests + counts only — plain objects that structured-clone across the wire).\n liveQueryDiagnostics: () => rpc<LiveQueryDiagnostics[]>(\"liveQueryDiagnostics\", []),\n // Store backup (ADR-0035): the worker runs the live export on its owned client (its lifecycle slot\n // serialises it against every tab). The dump crosses back as a transferred `ArrayBuffer`; rebuild the\n // `File` tab-side from the wire form — NOT in the notSupported set (unlike the local `pglite` reads).\n exportStore: async (exportOptions?: StoreExportOptions): Promise<StoreExportResult> => {\n const wire = await rpc<ExportArtefactWire>(\"exportStore\", [exportOptions]);\n return {\n file: new File([wire.buffer], wire.fileName, { type: wire.mimeType }),\n // The wire carries the discriminated union; `exportStore` always round-trips a store-backup report.\n report: wire.report as StoreExportResult[\"report\"],\n };\n },\n // Diagnostic dump (ADR-0035): the worker runs the throwaway-clone dump on its owned client (same\n // lifecycle slot as every tab). The SQL crosses back as the same transferred `ArrayBuffer`; rebuild the\n // `File` tab-side. NOT in the notSupported set (unlike the local `pglite` reads).\n exportDiagnostics: async (exportOptions?: DiagnosticExportOptions): Promise<DiagnosticExportResult> => {\n const wire = await rpc<ExportArtefactWire>(\"exportDiagnostics\", [exportOptions]);\n return {\n file: new File([wire.buffer], wire.fileName, { type: wire.mimeType }),\n // The wire carries the discriminated union; `exportDiagnostics` always round-trips a diagnostic-dump report.\n report: wire.report as DiagnosticExportResult[\"report\"],\n };\n },\n // Data export (ADR-0035): the worker runs the drain-guarded `pg_dump -t` export on its owned client (same\n // lifecycle slot as every tab). The portable SQL crosses back as the same transferred `ArrayBuffer`;\n // rebuild the `File` tab-side. A `DataExportDrainError` surfaces as the rejected RPC (deserialised tab-side).\n exportData: async (exportOptions?: DataExportOptions): Promise<DataExportResult> => {\n const wire = await rpc<ExportArtefactWire>(\"exportData\", [exportOptions]);\n return {\n file: new File([wire.buffer], wire.fileName, { type: wire.mimeType }),\n // The wire carries the discriminated union; `exportData` always round-trips a data-export report.\n report: wire.report as DataExportResult[\"report\"],\n };\n },\n notifyAuthChanged: () => {\n void pushToken();\n },\n setOnline: (online: boolean) => {\n postBridgeMessage(currentDataPort(), codec, \"set-online\", { online });\n },\n };\n\n // The `pglite` misuse trap MUST be a NON-ENUMERABLE throwing getter, never an enumerable property\n // holding a throw-on-get Proxy: host tooling reflects over the client wherever the app hands it around\n // (React 19.2's dev-build render logging serializes prop diffs property-by-property — observed crashing\n // a <SyncClientProvider client={...}> re-render — and console inspection / object spreads do the same),\n // and an enumerable trap turns that passive reflection into a crash. Non-enumerable keeps the trap out\n // of every enumeration path while a direct `client.pglite` touch still throws the misuse error.\n Object.defineProperty(client, \"pglite\", {\n get: notSupported(\"client.pglite\"),\n enumerable: false,\n configurable: true,\n });\n\n return client;\n}\n\n/** {@link provisionSyncWorker} options — attach's transport/store/factory seams, plus the provision expiry. */\nexport type ProvisionSyncWorkerOptions<TRegistry extends SyncTableRegistry> = Pick<\n AttachSyncClientOptions<TRegistry>,\n | \"worker\"\n | \"port\"\n | \"storeId\"\n | \"storePath\"\n | \"storage\"\n | \"codec\"\n | \"createEngineWorker\"\n | \"electionIo\"\n | \"awaitOwnershipRelease\"\n | \"timers\"\n> & {\n /**\n * How long (ms) the elected-mode provision claim (and its shared-coordinator ref) is held before an abandoned\n * warmed provision auto-retires (ADR-0049 step 8, \"abandoned warmed provision → claim expiry\"). Default 60000.\n * A later {@link attachSyncClient} on the same store ADOPTS the grant within this window (adding its own claim,\n * so the engine outlives the expiry). Inert on SW-direct.\n */\n provisionExpiryMs?: number;\n};\n\n/**\n * Pre-spawn a worker's store WITHOUT attaching (ADR-0032 decision 5). Sent at the board's login screen against a\n * freshly-named spare `SharedWorker`: the worker runs PGlite `create`/initdb only and holds the raw store idle\n * until the real {@link attachSyncClient} claim adopts it. Resolves when the worker acks the provision (its initdb\n * settled); rejects only if the worker reports the create failed — the caller treats either outcome as best-effort,\n * since attach falls back to a fresh create regardless.\n *\n * Routed through the SAME placement-query-first flow as {@link attachSyncClient} (ADR-0049 step 8): a SW-direct\n * (or declared-idbfs) SharedWorker takes the `provision` bridge envelope on the SW port; a\n * router-only (`electionRequired`) SharedWorker DROPS bridge envelopes, so provision drives the election\n * coordinator's PROVISION CLAIM (expiry-bounded) and delivers the `provision` over the elected engine's per-tab\n * PIPE. The coordinator is REGISTERED per store so a later attach on the same tab ADOPTS the grant — no second\n * lock, no second engine, no double initdb (invariant 2). Elected mode REQUIRES a {@link createEngineWorker}\n * factory (mirroring attach); its absence is a clear rejection, never a hang.\n */\nexport function provisionSyncWorker<const TRegistry extends SyncTableRegistry>(\n options: ProvisionSyncWorkerOptions<TRegistry>,\n): Promise<void> {\n const codec = options.codec ?? identityCodec;\n const port = resolvePort(options);\n const timers: AttachClientTimers = options.timers ?? {\n setTimeout: (fn, ms) => globalThis.setTimeout(fn, ms),\n clearTimeout: (handle) => globalThis.clearTimeout(handle as ReturnType<typeof globalThis.setTimeout>),\n };\n const storePath = options.storePath ?? options.storeId ?? \"pgxsinkit-overlay-v1\";\n // The testing memory-backend override travels as an explicit wire field (a symbol does not survive structured\n // clone, ADR-0036) — read it off the spread helper's options and forward it to the worker.\n const memoryOverride = readTestStoreMarker(options) === \"memory\";\n const provisionPayload = {\n ...(options.storeId ? { storeId: options.storeId } : {}),\n ...(options.storePath ? { storePath: options.storePath } : {}),\n // ADR-0050: the wire storage declaration rides the provision payload too, so the mint's durability comes\n // from the store's bound declaration wherever the engine runs.\n ...(options.storage ? { storage: options.storage } : {}),\n ...(memoryOverride ? { testStoreBackend: \"memory\" as const } : {}),\n };\n const pageLifecycle = readDefaultPageLifecycle();\n\n const provision = new Promise<void>((resolve, reject) => {\n let settled = false;\n const ackRemovers: Array<() => void> = [];\n const controlListener = (event: { data: unknown; ports?: readonly BridgePort[] }): void => {\n const placement = readPlacementResult(event.data);\n if (placement !== undefined) {\n onPlacement(placement);\n return;\n }\n // ADR-0050: the worker refused this provision's storage declaration — it arrives in place of the\n // placement reply, so the provision fails typed and loudly (never a hang, never a silent mode).\n const declarationRefusal = readDeclarationRefusal(event.data);\n if (declarationRefusal !== undefined) {\n settle(() => reject(new StorageDeclarationRefusedError(declarationRefusal.message)));\n return;\n }\n const control = readControlEnvelope(event.data);\n if (control?.type === \"connect-port\") onProvisionPipe(event.ports?.[0], control.identity);\n };\n const settle = (fn: () => void): void => {\n if (settled) return;\n settled = true;\n port.removeEventListener(\"message\", controlListener);\n for (const remove of ackRemovers) remove();\n fn();\n };\n\n // Await `provision-ack` on whichever port carries it: the SW port (SW-direct) or the elected engine's pipe.\n // In elected mode the SW-port `provision` is dropped by the router, so its ack never comes — the pipe's does.\n const awaitAckOn = (ackPort: BridgePort): void => {\n const ackListener = (message: { data: unknown }): void => {\n if (!isBridgeEnvelope(message.data) || message.data.type !== \"provision-ack\") return;\n const ack = codec.decode(message.data.payload) as ProvisionAckPayload;\n settle(() => (ack.ok ? resolve() : reject(new Error(ack.error?.message ?? \"worker provision failed\"))));\n };\n ackPort.addEventListener(\"message\", ackListener);\n ackPort.start?.();\n ackRemovers.push(() => ackPort.removeEventListener(\"message\", ackListener));\n };\n const postProvisionOn = (target: BridgePort): void => {\n awaitAckOn(target);\n postBridgeMessage(target, codec, \"provision\", provisionPayload);\n };\n\n let placementDecided = false;\n let piped = false;\n const onProvisionPipe = (pipe: BridgePort | undefined, identity: EngineIdentity): void => {\n if (piped || pipe === undefined) return;\n piped = true;\n // The router piped this provision connection to the elected engine — deliver the `provision` over the pipe,\n // and STASH the pipe on the shared coordinator entry: the router mints one pipe per SW connection, so when a\n // later attach adopts this grant on the SAME port (the board's ordered-messages contract) it must receive\n // THIS pipe by handover — no second `connect-port` will ever arrive for an already-piped tab.\n stashProvisionPipe(storePath, pipe, identity);\n postProvisionOn(pipe);\n };\n\n const onPlacement = (result: PlacementQueryResult): void => {\n if (placementDecided) return;\n placementDecided = true;\n // SW-direct (or a plain host, which answers the placement query itself): the worker installs the engine\n // listener on this port only once placement resolves and the declaration is accepted (ADR-0050), so the\n // `provision` is posted NOW — on the reply — never fire-and-forget before it.\n if (!result.electionRequired) {\n postProvisionOn(port);\n return;\n }\n // Elected (router-only): the SW drops the `provision` bridge envelope, so ELECT and provision over the pipe.\n // Resolve the engine factory exactly as attach does — the `createEngineWorker` override, else the default\n // derived from the SharedWorker's reported script URL (dual-scope entry). Neither available → a WIRING failure.\n const engineFactory = options.createEngineWorker ?? deriveEngineWorkerFactory(result.swScriptUrl);\n if (engineFactory === undefined) {\n settle(() =>\n reject(\n new ElectedEngineUnconstructibleError(\n result.swScriptUrl === undefined\n ? \"provisionSyncWorker: the SharedWorker reported no derivable script URL and no `createEngineWorker` override was supplied\"\n : \"provisionSyncWorker: no `Worker` constructor is available in this scope to derive the module engine and no override was supplied\",\n ),\n ),\n );\n return;\n }\n const provisionSwFactory = workerFactoryOf(options.worker);\n const coordinator = adoptOrRegisterCoordinator(storePath, () =>\n buildElectedCoordinator({\n storePath,\n controlPort: port,\n createEngineWorker: engineFactory,\n ...(provisionSwFactory ? { swFactory: provisionSwFactory } : {}),\n ...(options.storage ? { storage: options.storage } : {}),\n ...(options.electionIo ? { electionIo: options.electionIo } : {}),\n ...(options.awaitOwnershipRelease ? { awaitOwnershipRelease: options.awaitOwnershipRelease } : {}),\n timers,\n ...(pageLifecycle ? { pageLifecycle } : {}),\n }),\n );\n // The PROVISION CLAIM elects → the coordinator spawns the engine + announces; the router pipes this\n // connection (→ `onProvisionPipe`). Bound by expiry: an abandoned warmed provision auto-retires (its claim\n // AND its shared-coordinator ref release together), so a store nobody adopts never pins the leader lock.\n const releaseProvisionClaim = coordinator.claimForProvision();\n const expiryMs = options.provisionExpiryMs ?? 60_000;\n let released = false;\n const expiryHandle = timers.setTimeout(() => {\n if (released) return;\n released = true;\n const entry = sharedCoordinators.get(storePath);\n if (entry?.releaseProvision === releaseProvision) delete entry.releaseProvision;\n releaseProvisionClaim();\n releaseSharedCoordinator(storePath);\n }, expiryMs);\n const releaseProvision = (): void => {\n if (released) return;\n released = true;\n timers.clearTimeout(expiryHandle);\n releaseProvisionClaim();\n };\n setProvisionRelease(storePath, releaseProvision);\n };\n\n port.addEventListener(\"message\", controlListener);\n port.start?.();\n // Declaration-FIRST, then placement query (ADR-0050, mirroring attach): the declaration message unblocks a\n // registry-silent worker's deferred placement decision, and the query is answered in BOTH SW modes by the\n // bootstrap meta listener. The `provision` itself is posted ON the placement reply (`onPlacement`): SW-direct\n // takes it on this port; a router-only SW would drop it, so elected mode delivers it over the pipe instead.\n port.postMessage({ [DECLARATION_KEY]: options.storage ?? {} });\n port.postMessage({ [PLACEMENT_QUERY_KEY]: true });\n });\n return provision;\n}\n\n/** Resolve the default page-lifecycle subscription off `globalThis.window` (structural, no DOM lib) — for the\n elected provision coordinator's BFCache hooks; `undefined` in a non-window scope. Mirrors the attach client. */\nfunction readDefaultPageLifecycle(): CoordinatorDeps[\"pageLifecycle\"] {\n interface PageLifecycleWindowLike {\n addEventListener(type: \"pagehide\" | \"pageshow\", handler: (event: { persisted: boolean }) => void): void;\n }\n const pageWindow = (globalThis as { window?: PageLifecycleWindowLike }).window;\n if (!pageWindow) return undefined;\n return {\n onPageHide: (listener) => pageWindow.addEventListener(\"pagehide\", (event) => listener(event.persisted)),\n onPageShow: (listener) => pageWindow.addEventListener(\"pageshow\", () => listener()),\n };\n}\n\n/**\n * Resolve the transport port from the options: an explicit port, or a worker input (ADR-0049 D5) that is EITHER a\n * FACTORY `() => WorkerLike` (invoked here for a fresh instance — the reconnect/reconstruct callers pass the factory\n * so each call yields a new SharedWorker) OR a bare instance. From the instance: a SharedWorker's `.port`, or a\n * Worker itself (which IS the port).\n */\nfunction resolvePort(options: { port?: BridgePort; worker?: (() => WorkerLike) | WorkerLike }): BridgePort {\n if (options.port) return options.port;\n const worker = typeof options.worker === \"function\" ? (options.worker as () => WorkerLike)() : options.worker;\n if (!worker) throw new Error(\"attachSyncClient: provide a `worker` or a `port`.\");\n if (worker.port) return worker.port;\n if (worker.postMessage && worker.addEventListener && worker.removeEventListener) {\n return worker as BridgePort;\n }\n throw new Error(\"attachSyncClient: the provided `worker` is neither a Worker nor a SharedWorker port.\");\n}\n\n/**\n * The SharedWorker reconstruction FACTORY, or `undefined` when the input is a bare instance/port (ADR-0049 D5). A\n * factory input (`worker: () => SharedWorker`) makes SharedWorker-death recovery a guarantee — the bridge-silence\n * reconnect and the keepalive reconstruction re-invoke it. A bare-instance input has none: reconstruction is\n * structurally unavailable (a SharedWorker cannot be rebuilt from itself), so those paths are simply not armed.\n */\nfunction workerFactoryOf(worker: (() => WorkerLike) | WorkerLike | undefined): (() => WorkerLike) | undefined {\n return typeof worker === \"function\" ? (worker as () => WorkerLike) : undefined;\n}\n\n/**\n * Auto-derive the elected engine worker factory from the SharedWorker's reported script URL (ADR-0049 D5). The\n * worker entry is dual-scope, so `new Worker(swScriptUrl, { type: \"module\" })` boots the SAME entry as a dedicated\n * engine — no consumer wiring. Returns `undefined` when there is no derivable URL or no `Worker` constructor in\n * scope (a plain test scope); the caller then requires the `createEngineWorker` override or fails typed.\n */\nfunction deriveEngineWorkerFactory(swScriptUrl: string | undefined): (() => ElectedEngineWorker) | undefined {\n if (swScriptUrl === undefined) return undefined;\n const WorkerCtor = (globalThis as { Worker?: new (url: string, options?: { type?: \"module\" }) => WorkerLike }).Worker;\n if (WorkerCtor === undefined) return undefined;\n return () => wrapEngineWorker(new WorkerCtor(swScriptUrl, { type: \"module\" }));\n}\n\n/**\n * Rebuild an Error from the bridge's serialized {@link BridgeErrorWire} shape, carrying `name` and `detail`\n * through. Restoring `name` is what keeps a typed worker-side failure (e.g. a restore refused with\n * `RestoreTargetExistsError`) detectable by the consumer without message matching.\n */\nfunction rebuildError(error: RpcResultPayload[\"error\"]): Error {\n if (error && \"detail\" in error) {\n const mismatch = executionLimitMismatchFromWire(error.detail);\n if (mismatch !== undefined) return mismatch;\n }\n const rebuilt = new Error(error?.message ?? \"worker rpc failed\");\n if (error?.name !== undefined) {\n rebuilt.name = error.name;\n }\n if (error && \"detail\" in error && error.detail !== undefined) {\n (rebuilt as Error & { detail?: unknown }).detail = error.detail;\n }\n return rebuilt;\n}\n\n/**\n * Rebuild an RPC/subscribe error, reconstructing the typed {@link EngineRelocatedError} when the bridge error's\n * `detail` carries the clone-safe `{ code: \"engine-relocated\", outcome }` wire form (ADR-0049 D10). This is the\n * attach-side reconstruction seam: a relocation failure crossing the pipe as a bridge error surfaces to the\n * consumer as an `instanceof EngineRelocatedError` with the honest `outcome`. Any other detail rebuilds as a\n * plain error carrying its `detail` (unchanged behavior).\n */\nfunction rebuildRpcError(error: RpcResultPayload[\"error\"]): Error {\n if (error && \"detail\" in error) {\n const relocated = engineRelocatedFromWire(error.detail);\n if (relocated !== undefined) return relocated;\n }\n return rebuildError(error);\n}\n",
52
52
  "import { PGlite, type PGliteOptions, type QueryOptions, type Results } from \"@electric-sql/pglite\";\nimport { live, type PGliteWithLive } from \"@electric-sql/pglite/live\";\nimport type { PgliteDatabase } from \"drizzle-orm/pglite\";\nimport { drizzle } from \"drizzle-orm/pglite\";\nimport { defineRelations } from \"drizzle-orm/relations\";\n\nimport type {\n MutationAck,\n MutationDiagnostics,\n MutationSummary,\n RegistryRelations,\n RegistryTables,\n RegistryViews,\n SyncConfigInput,\n SyncRuntimeStatus,\n SyncTableCreateInput,\n SyncTableEntry,\n SyncStorageDeclaration,\n SyncTableName,\n SyncTableRegistry,\n SyncTableUpdateInput,\n StorageDurability,\n WriteMode,\n} from \"@pgxsinkit/contracts\";\nimport {\n fingerprintRegistry,\n getSyncRegistrySchema,\n getSyncRegistryStorage,\n isClaimsDependentRowFilter,\n resolveStorageDeclaration,\n} from \"@pgxsinkit/contracts\";\n// Type-only import (erased at runtime): the opfs-repacked factory's option/return types for the `opfs://`\n// branch. The factory VALUE is loaded lazily via dynamic `import()` inside that branch so a Bun unit test\n// mocking `@electric-sql/pglite` never evaluates the factory's `class ... extends PGlite` module top level.\nimport type { CreateOpfsRepackedPGliteOptions, OpfsRepackedPGlite } from \"@pgxsinkit/pglite-opfs-repacked\";\n\nimport {\n type AdoptionDeclaration,\n type AdoptionEffects,\n adoptionEligible,\n type AdoptionOutcome,\n buildAdoptionEffects,\n runAdoptionTransition,\n runManualAdoption,\n} from \"./adoption\";\nimport { type BootReport, type BootReportBuilder, createBootReportBuilder } from \"./boot-report\";\nimport { type ConvergenceDriver, type ConvergenceTrigger, createConvergenceDriver } from \"./convergence\";\nimport { syncDebug, timeAsync } from \"./debug\";\nimport { describeErrorChain } from \"./error-chain\";\nimport { type DataExportOptions, type DataExportResult, performDataExport } from \"./export-data\";\nimport { type DiagnosticExportOptions, type DiagnosticExportResult, performDiagnosticExport } from \"./export-dump\";\nimport { performStoreExport, type StoreExportOptions, type StoreExportResult } from \"./export-store\";\nimport {\n assertLazyRefsActivated,\n buildLazyGuardIndex,\n findReferencedLazyKeysInSql,\n findReferencedSyncedKeysInSql,\n} from \"./lazy-guard\";\nimport { createLifecycleSlot } from \"./lifecycle-slot\";\nimport { wrapLiveQueryForMaterialization } from \"./live-rows-sql\";\nimport {\n type LocalStoreVersionEvent,\n clearLazyGroupActivation,\n readActivatedLazyGroups,\n readStoredLocalSchemaFingerprint,\n reconcileLocalStoreVersion,\n writeLazyGroupActivation,\n writeStoredLocalSchemaFingerprint,\n} from \"./local-store\";\nimport {\n createMutationRuntime,\n type MutationBatchItem,\n type MutationDetail,\n type MutationKind,\n type WriteUnit,\n} from \"./mutation\";\nimport { createMutationsApi, type MutationsApi } from \"./mutations-api\";\nimport { createOpfsEffects, type OpfsEffectsDeps } from \"./opfs-effects\";\nimport {\n buildDataExportCloneCleanupSql,\n buildDataExportEnumHeaderSql,\n buildDesyncTableSql,\n buildDropReadCacheSql,\n buildLocalMetaBootstrapSql,\n buildWipeLocalStoreSql,\n collectDataExportSyncedTableNames,\n computeLocalSchemaFingerprint,\n generateDurableLocalSchemaSql,\n generateEphemeralLocalSchemaSql,\n generateLocalSchemaSql,\n} from \"./schema\";\nimport { startConfiguredSync } from \"./shape-sync\";\nimport {\n recoverDeniedBootDeletion,\n resolveStoreBoot,\n type ResolvedStorageBackend,\n type StoreBootResolution,\n} from \"./store-boot\";\nimport { runCommitmentBarrier } from \"./store-lifecycle\";\nimport {\n idbStoreExists as defaultIdbStoreExists,\n type StoreBootVerdict,\n type StoreMetaDeps,\n type StoreMetaPhase,\n writeStoreMetaRecord,\n} from \"./store-meta\";\nimport {\n classifyNonPersistentDataDir,\n NonPersistentStoreError,\n normaliseStorePathInput,\n readTestStoreMarker,\n resolveStoreDataDir,\n RestoreTargetExistsError,\n storeIndexedDbDatabaseName,\n storeTargetExists,\n type StorePathInput,\n} from \"./store-path\";\nimport { createSyncEngine, type SyncEngine } from \"./sync\";\nimport { buildShapeHeaders } from \"./sync-auth\";\nimport { LiveRowsMaterializer } from \"./worker/live-diff\";\nimport {\n createLiveQueryManager,\n type LiveQueryDiagnostics,\n type LiveQueryManager,\n validateLiveQueryPolicy,\n} from \"./worker/live-query-manager\";\n\nexport { generateLocalSchemaSql };\nexport { wrapLiveQueryForMaterialization } from \"./live-rows-sql\";\nexport type { BootReport } from \"./boot-report\";\nexport {\n type CloneDumpPhases,\n type CloneDumpResult,\n type DiagnosticExportDeps,\n type DiagnosticExportOptions,\n type DiagnosticExportResult,\n performDiagnosticExport,\n runThrowawayCloneDump,\n} from \"./export-dump\";\nexport {\n type DataExportDeps,\n DataExportDrainError,\n type DataExportOptions,\n type DataExportResult,\n DEFAULT_DRAIN_TIMEOUT_MS,\n type DrainJournalOption,\n type DrainJournalOptions,\n performDataExport,\n} from \"./export-data\";\nexport {\n type DataExportReport,\n deriveStoreId,\n type DiagnosticDumpReport,\n type ExportReport,\n type ExportReportCommon,\n performDatadirDump,\n performStoreExport,\n type StoreBackupReport,\n type StoreExportDeps,\n type StoreExportOptions,\n type StoreExportResult,\n} from \"./export-store\";\nexport {\n type AdoptionDeclaration,\n type AdoptionEffects,\n adoptionEligible,\n type AdoptionOutcome,\n runAdoptionTransition,\n runManualAdoption,\n} from \"./adoption\";\nexport { createLifecycleSlot, LifecycleBusyError, type LifecycleSlot } from \"./lifecycle-slot\";\nexport {\n destroyStoreArtifacts,\n type ElectedEngineWorker,\n ElectedEngineUnconstructibleError,\n quiesceStoreWorker,\n StoreDestroyRefusedError,\n type StoreDestructionRetryOptions,\n type StoreWorkerQuiesceOptions,\n type StoreWorkerQuiesceOutcome,\n wrapEngineWorker,\n} from \"./worker/attach-sync-client\";\nexport {\n ENGINE_RELOCATED_CODE,\n EngineRelocatedError,\n type EngineRelocatedOutcome,\n type ExecutionLimitConfig,\n ExecutionLimitMismatchError,\n} from \"./worker/engine-control\";\nexport { createOpfsEffects, type OpfsEffects, type OpfsEffectsDeps } from \"./opfs-effects\";\nexport {\n resolveStoreBoot,\n type ResolvedStorageBackend,\n type ResolveStoreBootOptions,\n type StoreBootResolution,\n} from \"./store-boot\";\nexport {\n InvalidStorePathError,\n NonPersistentStoreError,\n resolveStoreDataDir,\n RestoreTargetExistsError,\n storeIndexedDbDatabaseName,\n storeTargetExists,\n} from \"./store-path\";\nexport {\n type ConvergenceClient,\n type ConvergenceDriver,\n type ConvergenceDriverOptions,\n type ConvergenceTrigger,\n createBrowserConvergenceTrigger,\n createConvergenceDriver,\n createIntervalConvergenceTrigger,\n} from \"./convergence\";\nexport { instrumentShapeFetch, setSyncDebugSink, syncDebug, timeAsync } from \"./debug\";\nexport {\n type AttachedSyncClient,\n attachSyncClient,\n type AttachSyncClientOptions,\n provisionSyncWorker,\n} from \"./worker/attach-sync-client\";\nexport { defineSyncWorker, type DefineSyncWorkerOptions, type SyncWorkerHost } from \"./worker/define-sync-worker\";\nexport {\n computeLiveDiff,\n type LiveDiffState,\n LiveRowsMaterializer,\n rowKey,\n seedLiveDiffState,\n} from \"./worker/live-diff\";\nexport type { LiveQueryDiagnostics };\nexport { createWorkerTokenCache, type WorkerTokenCache } from \"./worker/token-cache\";\nexport {\n type AttachAckPayload,\n type AttachPayload,\n type AuthTokenSnapshot,\n BRIDGE_CHANNEL,\n BRIDGE_PROTOCOL_VERSION,\n type BridgeCodec,\n type BridgeEnvelope,\n type BridgeEvent,\n type BridgeMessageType,\n type BridgePort,\n type BridgeTransferable,\n encodeEnvelope,\n type ExportArtefactWire,\n identityCodec,\n isBridgeEnvelope,\n type LiveDiffPayload,\n type LiveInitialPayload,\n postBridgeMessage,\n type ProvisionAckPayload,\n type ProvisionPayload,\n type RpcOp,\n type RpcPayload,\n type RpcResultPayload,\n type SetOnlinePayload,\n type SubscribePayload,\n type TokenRequestPayload,\n type TokenResponsePayload,\n type WakePayload,\n} from \"./worker/protocol\";\nexport {\n assertLazyRefsActivated,\n buildLazyGuardIndex,\n findReferencedLazyKeysInSql,\n findReferencedSyncedKeysInSql,\n type LazyGuardIndex,\n LazyRelationNotActivatedError,\n} from \"./lazy-guard\";\nexport {\n type AllMutationsView,\n getAllMutationsView,\n getJournalTable,\n getLocalMetaTable,\n getOverlayTable,\n getReadModelView,\n getSyncedLocalTable,\n getSyncStateView,\n type JournalTable,\n type LocalMetaTable,\n type OverlayTable,\n type ReadModelView,\n type SyncStateView,\n} from \"./local-tables\";\nexport {\n createMutationsApi,\n type MutationListOptions,\n type MutationListSubscription,\n type MutationsApi,\n type MutationsApiDeps,\n type MutationSummaryDetail,\n type MutationSummarySubscription,\n} from \"./mutations-api\";\nexport type { LocalStoreVersionEvent };\n\n/**\n * A write-path method was invoked against a client whose `writeReady` stage has not resolved and the caller\n * opted out of awaiting it (ADR-0041). pgxsinkit's own write methods always `await writeReady` internally, so\n * this is NEVER thrown on the stage-1 default path. It is **reserved for the stage-2 opt-out surface** — the\n * ADR's typed pre-`writeReady` rejection for a consumer who chooses not to await — so a pre-`writeReady` write\n * fails loudly rather than silently no-oping. Exported now so that surface is a non-breaking addition later.\n */\nexport class WriteNotReadyError extends Error {\n constructor() {\n super(\n \"pgxsinkit: write attempted before `writeReady` resolved. Await `client.writeReady` (the default write \" +\n \"methods do this for you) before enqueuing, or gate the write on it.\",\n );\n this.name = \"WriteNotReadyError\";\n }\n}\n\n/**\n * The client was stopped/destroyed (or its worker attachment detached) before a boot stage it exposed could\n * resolve (ADR-0041 FIX 2). `stop()`/`destroy()` reject the still-pending `writeReady` and `ready` with this so\n * a parked mutation or an `await client.ready` / `client.start()` fails FAST rather than hanging forever after\n * teardown. `bootSettled` still RESOLVES (it means \"teardown completion\", not \"boot succeeded\").\n */\nexport class ClientDisposedError extends Error {\n constructor() {\n super(\"pgxsinkit: the client was stopped/destroyed before this readiness stage resolved.\");\n this.name = \"ClientDisposedError\";\n }\n}\n\n// The store carries PGlite's own `live` extension (a genuine create-time extension) plus the pgxsinkit\n// sync engine's namespace, attached post-create by `createSyncClient` as the `electric` property (ADR-0032\n// S1) — no longer a create-time extension. The `electric` part is derived from `createSyncEngine`'s real\n// return so the type follows the attached object.\nexport type ClientPGlite = PGliteWithLive & { electric: SyncEngine[\"namespace\"] };\n\n/**\n * The pre-warmed PGlite boot assets (the WASM modules + filesystem bundle), consumed by\n * {@link createClientPGlite} / {@link CreateSyncClientOptions.pgliteBootAssets}. The host fetches +\n * compiles these on an earlier screen and hands the promise in, so `PGlite.create` skips its own lazy\n * asset load — see the field's JSDoc for the accelerator geometry.\n */\nexport interface PgliteBootAssets {\n pgliteWasmModule?: WebAssembly.Module;\n initdbWasmModule?: WebAssembly.Module;\n fsBundle?: Blob;\n}\n\n/** Options for {@link createClientPGlite}. */\nexport interface CreateClientPGliteOptions {\n /**\n * Pre-warmed PGlite boot assets (see {@link CreateSyncClientOptions.pgliteBootAssets}). Awaited and\n * passed into `PGlite.create`; a rejected warm is caught to `undefined` (falls back to PGlite's own\n * asset load), so it never fails the create.\n */\n bootAssets?: Promise<PgliteBootAssets>;\n /**\n * @internal Toolkit-internal durability carrier (ADR-0047), NOT a public per-open knob. Durability is\n * registry-declared: {@link createSyncClient} resolves `storage.durability ?? \"relaxed\"` off its registry\n * and threads the resolved mode in here — the ONE resolution point — for every mint it funnels through this\n * factory (its own boot, the worker provision/spare mint, the pre-expose idb drain read). Defaults to\n * `\"relaxed\"` when absent and is stamped onto the `boot pglite.create` rail (ADR-0047 D3). On idb, relaxed\n * returns before the whole-datadir snapshot flush and schedules it asynchronously; strict keeps that\n * synchronous snapshot (~100–200ms per statement). On OPFS-repacked the package factory keeps PGlite on its\n * awaited host path: relaxed routine sync asserts health without an ordinary physical flush, while strict\n * flushes arena data before metadata. Initialization, activation, and open-state close retain strict\n * ordering in both OPFS modes.\n */\n durability?: StorageDurability;\n /**\n * @internal Test-only storage-backend override (ADR-0036). `\"memory\"` resolves the store to a\n * scheme-selected in-memory store — the sanctioned unit-test/ephemeral lane. Never a product\n * configuration: reached only through `@pgxsinkit/client/testing`, never consumer-facing.\n */\n backendOverride?: \"memory\";\n /**\n * A store-backup tarball to seed the new store from (ADR-0035 decision 6, restore) — a `File`/`Blob` as\n * produced by {@link SyncClient.exportStore}. Passed straight to PGlite's `loadDataDir`, so the created\n * store boots ON the backup's datadir. Restore is a CREATION-path feature: the caller (`createSyncClient`)\n * has already proven the target does not yet exist ({@link storeTargetExists}); this option carries no\n * freshness check of its own. A corrupt/foreign tarball surfaces as a PGlite boot failure here.\n */\n restoreFrom?: File | Blob;\n /**\n * @internal ADR-0049 (capability-driven engine placement) step 10a: the placement probe's result, threaded\n * from the caller (the boot path resolves it via {@link resolveStoreBoot}). Default `false` keeps today's\n * behavior BYTE-IDENTICAL — the store resolves to `idb://` / `file://` / `memory://` exactly as before.\n * `true` resolves the browser store to `opfs://`, which routes to the opfs-repacked factory below.\n */\n hasOpfsSyncAccess?: boolean;\n /**\n * @internal ADR-0049 step 10a: the opfs-repacked factory + store-directory seam, injectable so Bun unit\n * tests exercise the `opfs://` branch WITHOUT loading real WASM/OPFS. In production both default to the real\n * implementations (`createOpfsRepackedPGlite` via a lazy `import()`, and the OPFS effects' store directory\n * handle). Never consumer-facing.\n */\n pgliteFactories?: {\n /** The opfs-repacked PGlite factory; defaults to a lazily-imported `createOpfsRepackedPGlite`. */\n createOpfsRepacked?: (options: CreateOpfsRepackedPGliteOptions) => Promise<OpfsRepackedPGlite>;\n /** The create-if-absent store directory handle for the factory; defaults to the real OPFS effects. */\n getStoreDirectoryHandle?: () => Promise<unknown>;\n /** Backoff between bounded open retries (ms); defaults to a small real delay. Tests pass `0`. */\n retryDelayMs?: number;\n };\n}\n\n/**\n * Bounded open-retry budget for the opfs-repacked factory. Covers BOTH transient UnknownError-class failures AND\n * the ADR-0049 fault-matrix \"VFS ownership-lock release lag → successor open retries on contention until clear,\n * bounded, then boot failure\": when a leader engine is DELIBERATELY terminated (execution-limit verdict) while\n * BUSY, `worker.terminate()` cannot interrupt synchronous WASM, so the dying worker holds its EXCLUSIVE OPFS\n * sync-access handle until its in-flight op finishes and the agent tears down — the successor (respawned in the\n * same tab, immediately, since `awaitOwnershipRelease` is the documented no-op) must retry its open across that\n * lag. The budget below (linear backoff: 100·(1+…+9) ≈ 4.5 s) spans a realistic release lag; a hang longer than\n * the budget still fails closed (bounded), never a stranded half-open store.\n */\nconst OPFS_OPEN_ATTEMPTS = 10;\n/** Default backoff between opfs open retries (ms); grows linearly per attempt (ADR-0049 ownership-release lag). */\nconst OPFS_OPEN_BACKOFF_MS = 100;\n/** The opfs-repacked store extent size (ADR-0049 step 10a). */\nconst OPFS_STORE_EXTENT_SIZE = 65536;\n/**\n * Non-enumerable brand stamped on an opfs-repacked instance {@link createClientPGlite} mints (ADR-0049): the\n * opfs-repacked VFS owns its store on a dedicated OPFS directory and reports NO `dataDir` (a custom VFS, the\n * field is honestly `undefined`), so the BYO \"non-persistent\" guard ({@link classifyNonPersistentDataDir},\n * which reads only `dataDir`) would wrongly reject it as an in-memory default when it is adopted as a\n * `precreatedPglite` (the provision-then-attach path). This brand lets the guard recognise it as PROVABLY\n * persistent. `Symbol.for` so the brand survives even if the instance is inspected via a different module copy.\n */\nconst OPFS_REPACKED_PERSISTENT = Symbol.for(\"pgxsinkit.opfsRepackedPersistent\");\n\n/**\n * Open the opfs-repacked factory with bounded retries (3) and a small linear backoff for transient failures,\n * then propagate the last error — a committed store's final failure is HARD, and an uncommitted candidate's\n * likewise propagates (the caller never exposes an unopened store). Kept simple: retry the whole factory call,\n * always, then throw.\n */\nasync function openWithBoundedRetries<T>(open: () => Promise<T>, backoffMs: number): Promise<T> {\n let lastError: unknown;\n for (let attempt = 1; attempt <= OPFS_OPEN_ATTEMPTS; attempt += 1) {\n try {\n return await open();\n } catch (error) {\n lastError = error;\n if (attempt < OPFS_OPEN_ATTEMPTS && backoffMs > 0) {\n await new Promise<void>((resolve) => setTimeout(resolve, backoffMs * attempt));\n }\n }\n }\n throw lastError;\n}\n\n/**\n * Create the raw local PGlite store the sync client runs on — the SAME `PGlite.create` call\n * {@link createSyncClient} makes internally (the `electric` + `live` extensions, pre-warmed boot-asset\n * consumption, and the `boot pglite.create` rail stamp), extracted so exactly one implementation exists\n * and a host can create the store EAGERLY on an earlier screen. Hand the returned (still-pending)\n * instance to {@link CreateSyncClientOptions.precreatedPglite}: the client then owns schema exec, prepare\n * hooks, journal recovery, and registry reconciliation, exactly as its own `storePath` path does.\n *\n * Takes a plain store path (ADR-0036), never a storage URL — the backend is DERIVED from the engine home\n * (capability-selected opfs-repacked with IndexedDB fallback in a browser, or the filesystem on Bun/Node);\n * a scheme-bearing path throws {@link InvalidStorePathError}.\n * Also accepts the testing helper's output (`createClientPGlite(memoryStoreForTests(\"x\"))`) so a test can\n * mint a memory store without naming a backend.\n *\n * The instance is deliberately **schemaless** — the registry-derived local schema is role/registry\n * dependent, so it is applied post-create by `createSyncClient`. The eager create buys only the expensive\n * initdb (+ persistent-store open), which is the dominant cold-boot cost once the WASM is pre-warmed.\n *\n * `bootAssets` is the pre-warmed WASM/fs bundle (see {@link CreateSyncClientOptions.pgliteBootAssets}); a\n * rejected warm is caught to `undefined`, so PGlite falls back to loading its own assets — never a failure.\n */\nexport async function createClientPGlite(\n store: StorePathInput,\n options?: CreateClientPGliteOptions,\n): Promise<ClientPGlite> {\n // Normalise the store argument to a plain path (+ any internal memory override the testing helper carried),\n // then derive the concrete PGlite dataDir URL (ADR-0036) — the single resolution point. A scheme-bearing/\n // empty storePath throws here, so the old dataDir-URL contract fails loudly, never silently re-interpreted.\n const normalised = normaliseStorePathInput(store);\n const storePath = normalised.storePath;\n const backendOverride = options?.backendOverride ?? normalised.backendOverride;\n // An eager precreate is itself a store mint. Before a denied browser home opens its replacement IDB store,\n // settle any durable `deleting` authority exactly as the ordinary createSyncClient path does. Keeping this at\n // the documented precreate factory protects callers outside defineSyncWorker; the worker provision handler\n // carries the same guard separately because it permits a caller-supplied createPglite factory.\n if (options?.hasOpfsSyncAccess !== true && backendOverride !== \"memory\") {\n await recoverDeniedBootDeletion(storePath);\n }\n // Derive the concrete PGlite dataDir URL (ADR-0036) — the single resolution point. Browser/worker → `idb://`,\n // Bun/Node → `file://`, the sanctioned test lane → `memory://`. A scheme-bearing/empty storePath throws here.\n // ADR-0049 step 10a: when the caller threads the placement probe's grant (`hasOpfsSyncAccess`), the browser\n // store resolves to `opfs://` and routes to the opfs-repacked factory below. Default (undefined/false) leaves\n // this call BYTE-IDENTICAL to today (`resolveStoreDataDir(storePath, backendOverride)`), so no baseline shifts.\n const dataDir = options?.hasOpfsSyncAccess\n ? resolveStoreDataDir(storePath, backendOverride, { hasIndexedDb: true, hasOpfsSyncAccess: true })\n : resolveStoreDataDir(storePath, backendOverride);\n // Stamp the store's scheme on the boot rail (never the full path — it can carry an identity-specific store\n // name): \"idb:\" / \"file:\" / \"memory:\".\n const dataDirScheme = dataDir.slice(0, dataDir.indexOf(\":\") + 1);\n // Resolve any pre-warmed boot assets BEFORE (and outside) the `boot pglite.create` stamp: the\n // fetch+compile was kicked off on an earlier screen, so this await just retrieves the already-settled\n // result and the stamp measures the create itself. A rejected warm is caught to `undefined` so a failed\n // pre-warm silently falls back to PGlite's own asset loading rather than failing the boot.\n const bootAssets = options?.bootAssets ? await options.bootAssets.catch(() => undefined) : undefined;\n // Durability (ADR-0047) is registry-declared and resolved by createSyncClient; the resolved mode is threaded\n // in via the internal `durability` carrier. Every store minting path (createSyncClient's own create, the\n // worker's default createPglite factory, spare/prewarm mints) funnels through this function, so the\n // `?? \"relaxed\"` here is the terminal fallback when no mode was threaded (e.g. an eager caller-owned\n // precreate). Maps to PGlite's `relaxedDurability` boolean (`\"strict\"` → false). On idb the per-query\n // synchronous flush dominates write latency; relaxing it schedules the flush asynchronously instead.\n const relaxedDurability = (options?.durability ?? \"relaxed\") !== \"strict\";\n\n // ADR-0049 step 10a — the `opfs://` branch. PGlite does NOT accept `opfs://` as a dataDir; instead the\n // opfs-repacked factory owns the store on a dedicated OPFS directory. The factory is loaded LAZILY (a\n // dynamic `import()`) and both it and the store-directory handle are injectable (`pgliteFactories`) so a Bun\n // unit test drives this branch with no real WASM/OPFS. Durability maps from the same `relaxedDurability`\n // resolution above (ADR-0047's default logic is untouched): `relaxed` → the factory's `\"relaxed\"`, else\n // `\"strict\"`. The open is retried a bounded number of times for transient failures, then propagates.\n if (dataDir.startsWith(\"opfs://\")) {\n const opfsPglite = (await timeAsync(\n \"boot pglite.create\",\n async () => {\n const createOpfsRepacked =\n options?.pgliteFactories?.createOpfsRepacked ??\n (await import(\"@pgxsinkit/pglite-opfs-repacked\")).createOpfsRepackedPGlite;\n const getStoreDirectoryHandle =\n options?.pgliteFactories?.getStoreDirectoryHandle ??\n (() => createOpfsEffects(storePath).getStoreDirectoryHandle());\n const directory = await getStoreDirectoryHandle();\n return openWithBoundedRetries(\n () =>\n createOpfsRepacked({\n directory: directory as CreateOpfsRepackedPGliteOptions[\"directory\"],\n durability: relaxedDurability ? \"relaxed\" : \"strict\",\n extentSize: OPFS_STORE_EXTENT_SIZE,\n // The store is engine-less by construction (only `live` is a create-time extension); the sync\n // engine attaches post-create (ADR-0032 S1). Restore + pre-warmed boot assets ride the same\n // `pglite` sub-options the idb path uses.\n pglite: {\n ...(bootAssets ?? {}),\n ...(options?.restoreFrom ? { loadDataDir: options.restoreFrom } : {}),\n extensions: { live },\n },\n }),\n options?.pgliteFactories?.retryDelayMs ?? OPFS_OPEN_BACKOFF_MS,\n );\n },\n { ...(dataDirScheme ? { dataDir: dataDirScheme } : {}), relaxedDurability },\n )) as unknown as ClientPGlite;\n // Brand it PROVABLY persistent: the opfs-repacked VFS reports no `dataDir`, so without this the BYO\n // non-persistent guard would reject it when it is adopted as a `precreatedPglite` (provision-then-attach).\n try {\n Object.defineProperty(opfsPglite, OPFS_REPACKED_PERSISTENT, {\n value: true,\n enumerable: false,\n configurable: true,\n });\n } catch {\n // A frozen/exotic instance — the guard still falls back to its dataDir classification (best-effort brand).\n }\n return opfsPglite;\n }\n\n const pglite = (await timeAsync(\n \"boot pglite.create\",\n () => {\n const createOptions: PGliteOptions = {\n ...(bootAssets ?? {}),\n relaxedDurability,\n // Restore (ADR-0035 decision 6): seed the brand-new store from the backup tarball. PGlite's\n // `loadDataDir` unpacks it into the datadir being created, so the store boots ON the backup's bytes —\n // the whole synced cache, Overlay, and Mutation journal that travelled inside it. Absent on a normal\n // create (the store initdbs empty).\n ...(options?.restoreFrom ? { loadDataDir: options.restoreFrom } : {}),\n // Only PGlite's own `live` extension is a create-time extension; the pgxsinkit sync engine is NOT\n // (ADR-0032 S1) — it is a plain module `createSyncClient` attaches post-create as `pg.electric`. So\n // a store minted here is deliberately ENGINE-LESS by construction: a spare/pre-warmed store (e.g.\n // the board's login-screen mint) carries no engine, no shape streams, and no Electric connections\n // until it is claimed and handed to `createSyncClient`.\n extensions: {\n live,\n },\n };\n // idb/file/memory take the dataDir-string form; upstream PGlite's own scheme parser selects the backend.\n return PGlite.create(dataDir, createOptions);\n },\n // Stamp the resolved durability mode + store scheme so every boot-rail capture shows the mode and lane the\n // store was created under (ADR-0047 diagnosability).\n { ...(dataDirScheme ? { dataDir: dataDirScheme } : {}), relaxedDurability },\n // `as unknown as` because the raw store is deliberately engine-less here (only `live` is a create-time\n // extension); `createSyncClient` provisions the `electric` namespace post-create (ADR-0032 S1).\n )) as unknown as ClientPGlite;\n return pglite;\n}\n\n// ─── ADR-0049 step 11b: adoption boot wiring (declaration-gated) ──────────────────────────────────────\n// The pure adoption orchestrator (`adoption.ts`, step 11a) is effect-injected; here we build the REAL effects\n// and CALL the transition at the right point in the boot. The transition runs BEFORE any engine is exposed\n// (invariant 3 — pre-expose exclusivity), consults the declaration FIRST (invariant 4 — default off), and\n// deletes the idb predecessor ONLY after the commitment barrier publishes (invariants 3/4).\n\n/**\n * A store is being actively held by a live in-process client. The manual {@link adoptStore} API is a\n * CREATION-PATH operation (like `restoreFrom`): it must be called INSTEAD of {@link createSyncClient}, never\n * against a store an open client already owns — an idb→opfs migration under a live engine would strand the\n * engine's writes. Detected via a module-level live-store registry (every {@link createSyncClient} that mints a\n * client-owned store registers its path and unregisters on `stop()`/`destroy()`).\n */\nexport class StoreInUseError extends Error {\n constructor(storePath: string) {\n super(\n `[pgxsinkit] adoptStore(${JSON.stringify(storePath)}) refused: a live client is currently holding this ` +\n \"store. Adoption is a creation-path migration — call it INSTEAD of createSyncClient, before any client \" +\n \"opens the store (stop/destroy the existing client first).\",\n );\n this.name = \"StoreInUseError\";\n }\n}\n\n/** The paths of stores currently held by a live in-process client — the {@link adoptStore} live-store guard. */\nconst liveStorePaths = new Set<string>();\n\n/** Internal-only marker for the live adoption executor's inner candidate boot. Never exported or consumer-set. */\nconst ADOPTION_CANDIDATE_BUILD: unique symbol = Symbol(\"pgxsinkit.adoptionCandidateBuild\");\ntype AdoptionCandidateBuildOptions = { [ADOPTION_CANDIDATE_BUILD]?: true };\n/** Internal-only PGlite boundary used by the real adoption recursion test; never exported or consumer-set. */\nconst INTERNAL_PGLITE_CREATE: unique symbol = Symbol(\"pgxsinkit.internalPgliteCreate\");\ntype InternalPgliteCreateOptions = { [INTERNAL_PGLITE_CREATE]?: typeof createClientPGlite };\n\n/**\n * @internal Injectable seams for the boot-time adoption decision (step 11b). Real defaults in production; unit\n * tests inject fakes so the wiring is exercised without real IndexedDB/OPFS/WASM. Shared by the automatic boot\n * path ({@link runBootAdoption}) and the manual {@link adoptStore} API.\n */\nexport interface AdoptionWiringSeams {\n /** Non-creating recordless idb existence check (adoption only ever migrates an EXISTING idb store). */\n idbStoreExists?: (storePath: string) => Promise<boolean>;\n /** The boot classifier + executor (`store-boot.ts`) — its verdict drives {@link adoptionEligible}. */\n resolveStoreBoot?: (storePath: string) => Promise<StoreBootResolution>;\n /** The real {@link AdoptionEffects} factory; injected in tests with recording fakes. */\n buildEffects?: (storePath: string) => AdoptionEffects;\n /** Diagnostics sink; defaults to the boot debug rail. */\n log?: (message: string, data?: Record<string, unknown>) => void;\n /** The store-meta IndexedDB seam (defaults to `globalThis.indexedDB`). */\n meta?: StoreMetaDeps;\n /** The OPFS root seam (defaults to `navigator.storage.getDirectory`). */\n opfs?: OpfsEffectsDeps;\n /** The external PGlite create boundary; the real adoption transition and inner createSyncClient remain intact. */\n createPglite?: typeof createClientPGlite;\n /** The live-store guard the manual {@link adoptStore} consults (defaults to the module-level registry). */\n isStoreLive?: (storePath: string) => boolean;\n}\n\n/** The bootstrap context an adoption transition's real effects need (registry + endpoints + auth + gate). */\ninterface AdoptionBootContext<TRegistry extends SyncTableRegistry> {\n registry: TRegistry;\n electricUrl: string;\n batchWriteUrl: string;\n getAuthToken?: () => Promise<string | undefined>;\n requestHeaders?: Record<string, string>;\n /** The effective app-level sync toggle — a `false` here fails the gate (adoption cannot reconstruct offline-by-config). */\n syncEnabled: boolean;\n /** Bounded wait for the eager Consistency groups' initial catch-up before the gate fails (offline/unauthorized). */\n gateDeadlineMs?: number;\n meta?: StoreMetaDeps;\n opfs?: OpfsEffectsDeps;\n createPglite?: typeof createClientPGlite;\n}\n\n/** Delete-if-present the store's PGlite idb database; only `onsuccess` proves completion. */\nfunction deleteAdoptionIdbPredecessor(storePath: string, meta?: StoreMetaDeps): Promise<void> {\n const idb =\n meta != null && \"indexedDB\" in meta\n ? (meta.indexedDB as unknown as IdbDeleteLike | undefined)\n : (globalThis as { indexedDB?: IdbDeleteLike }).indexedDB;\n if (idb?.deleteDatabase == null) return Promise.resolve();\n const name = storeIndexedDbDatabaseName(storePath);\n return new Promise<void>((resolve, reject) => {\n let settled = false;\n let timeout: ReturnType<typeof setTimeout> | undefined;\n const finish = (error?: unknown) => {\n if (settled) return;\n settled = true;\n if (timeout !== undefined) clearTimeout(timeout);\n if (error === undefined) resolve();\n else reject(error);\n };\n let request: {\n error?: unknown;\n onsuccess: (() => void) | null;\n onerror: (() => void) | null;\n onblocked?: (() => void) | null;\n };\n try {\n request = idb.deleteDatabase(name);\n } catch (error) {\n finish(error);\n return;\n }\n request.onsuccess = () => finish();\n request.onerror = () => finish(request.error ?? new Error(`indexedDB deletion failed for ${name}`));\n // `blocked` is nonterminal: the queued request may still succeed after the blocker closes. Do not lie to\n // the adoption transition by reporting predecessor cleanup complete before `onsuccess`.\n request.onblocked = () => undefined;\n timeout = setTimeout(() => finish(new Error(`indexedDB deletion timed out while blocked for ${name}`)), 5_000);\n });\n}\n\n/** The minimal structural `indexedDB.deleteDatabase` surface (no DOM lib) — mirrors `store-boot.ts`. */\ninterface IdbDeleteLike {\n deleteDatabase(name: string): {\n error?: unknown;\n onsuccess: (() => void) | null;\n onerror: (() => void) | null;\n onblocked?: (() => void) | null;\n };\n}\n\n/**\n * Build the REAL {@link AdoptionEffects} the transition drives (step 11b). The idb engine is booted PRE-EXPOSE\n * (never surfaced) solely to read the drain journal; the opfs candidate is built via the normal server bootstrap\n * (`createSyncClient` with `syncEnabled: true`, `freshStore: true`, adoption OFF so it never recurses) and gated\n * on the eager Consistency groups' catch-up; the shared commitment barrier (`runCommitmentBarrier`) commits it;\n * only THEN is the idb predecessor deleted.\n */\nfunction buildRealAdoptionEffects<TRegistry extends SyncTableRegistry>(\n storePath: string,\n ctx: AdoptionBootContext<TRegistry>,\n): AdoptionEffects {\n const opfs = createOpfsEffects(storePath, ctx.opfs);\n const createPglite = ctx.createPglite ?? createClientPGlite;\n const setPhase = (phase: StoreMetaPhase): Promise<void> =>\n writeStoreMetaRecord(storePath, { phase, updatedAt: Date.now() }, ctx.meta);\n return buildAdoptionEffects({\n async readIdbJournal() {\n // Open the idb engine PRE-EXPOSE (strict durability, no opfs grant → idb backend) solely to read the drain\n // journal. Never surfaced to tabs (invariant 3). Because this is a READ-ONLY drain probe (no write ever\n // reaches it), the engine is CLOSED here — releasing every idb handle so a deferred (`journal-owed`) boot\n // can re-open the store cleanly, and so the drained path deletes the idb database with nothing holding it.\n // `strictSyncAndCloseIdb` is therefore a no-op below: the \"strict close\" is trivially satisfied — an\n // unwritten engine has nothing to flush, and the handle is already released.\n const idbPglite = await createPglite(storePath, { durability: \"strict\" });\n try {\n const runtime = createMutationRuntime({\n db: idbPglite,\n registry: ctx.registry,\n batchWriteUrl: ctx.batchWriteUrl,\n ownsMetaTable: true,\n });\n const stats = await runtime.readMutationStats();\n return {\n pending: stats.pendingCount,\n sending: stats.sendingCount,\n acked: stats.ackedCount,\n failed: stats.failedCount,\n quarantined: stats.quarantinedCount,\n conflicted: stats.conflictedCount,\n rejected: stats.rejectedCount,\n };\n } finally {\n await idbPglite.close();\n }\n },\n setPhase,\n async buildCandidate() {\n // Adoption reconstructs from the server — a sync-disabled boot cannot: fail the gate BEFORE minting.\n if (!ctx.syncEnabled) {\n throw new Error(\n \"[pgxsinkit] adoption gate unmet: sync is disabled (`syncEnabled: false`), so the opfs successor \" +\n \"cannot be reconstructed online. The idb store stays authoritative.\",\n );\n }\n // Build the opfs candidate via the NORMAL server bootstrap path (its own `createClientPGlite` mints the\n // opfs store at the store directory). `freshStore: true` overlaps catch-up with the local phases; adoption\n // is OFF so this never recurses; the phase stays `adopting` (set by the caller) for crash recovery.\n const candidate = await createSyncClient<TRegistry>({\n registry: ctx.registry,\n electricUrl: ctx.electricUrl,\n batchWriteUrl: ctx.batchWriteUrl,\n storePath,\n hasOpfsSyncAccess: true,\n freshStore: true,\n syncEnabled: true,\n // Durability is registry-declared (ADR-0047): this candidate boot resolves it from `ctx.registry`, the\n // SAME registry as the store it succeeds, so the opfs successor is minted under the declared mode.\n [ADOPTION_CANDIDATE_BUILD]: true,\n [INTERNAL_PGLITE_CREATE]: createPglite,\n ...(ctx.getAuthToken ? { getAuthToken: ctx.getAuthToken } : {}),\n ...(ctx.requestHeaders ? { requestHeaders: ctx.requestHeaders } : {}),\n } as CreateSyncClientOptions<TRegistry> & AdoptionCandidateBuildOptions & InternalPgliteCreateOptions);\n const strictSync = (candidate.pglite as unknown as { strictSync?: () => Promise<void> }).strictSync;\n if (typeof strictSync !== \"function\") {\n await candidate.stop().catch(() => undefined);\n throw new Error(\n \"[pgxsinkit] adoption: the candidate store does not expose `strictSync()` — the commitment barrier \" +\n \"requires an OPFS-repacked engine (data-before-authority, invariant 3).\",\n );\n }\n return {\n ready: candidate.ready,\n strictSync: () => strictSync.call(candidate.pglite),\n close: () => candidate.stop(),\n };\n },\n publishSentinel: () => opfs.publishSentinel(),\n deleteSentinel: () => opfs.deleteSentinel(),\n deleteStoreDirectory: () => opfs.deleteStoreDirectory(),\n deleteIdbPredecessor: () => deleteAdoptionIdbPredecessor(storePath, ctx.meta),\n ...(ctx.gateDeadlineMs != null ? { gateDeadlineMs: ctx.gateDeadlineMs } : {}),\n });\n}\n\n/** The default real seams for the adoption boot decision (production wiring). */\nfunction realAdoptionSeams<TRegistry extends SyncTableRegistry>(\n ctx: AdoptionBootContext<TRegistry>,\n seams?: AdoptionWiringSeams,\n): Required<Pick<AdoptionWiringSeams, \"idbStoreExists\" | \"resolveStoreBoot\" | \"buildEffects\" | \"log\">> {\n return {\n idbStoreExists: seams?.idbStoreExists ?? ((sp: string) => defaultIdbStoreExists(sp, ctx.meta)),\n resolveStoreBoot:\n seams?.resolveStoreBoot ??\n ((sp: string) =>\n resolveStoreBoot(sp, {\n hasOpfsSyncAccess: true,\n ...(ctx.meta || ctx.opfs\n ? { deps: { ...(ctx.meta ? { meta: ctx.meta } : {}), ...(ctx.opfs ? { opfs: ctx.opfs } : {}) } }\n : {}),\n })),\n buildEffects: seams?.buildEffects ?? ((sp: string) => buildRealAdoptionEffects(sp, ctx)),\n log: seams?.log ?? ((message, data) => syncDebug(message, data)),\n };\n}\n\n/**\n * @internal The boot-time AUTOMATIC adoption decision (step 11b). Returns whether the subsequent client-owned\n * mint should open the OPFS backend (`bootHasOpfs`) after any adoption transition ran. Adoption ONLY ever\n * migrates an EXISTING idb store (a committed-opfs or virgin store has no idb predecessor), so a non-creating\n * idb existence check gates the whole path; then the boot classifier's verdict drives {@link adoptionEligible}.\n * On `adopted: true` the opfs successor is committed and the mint opens it; on any `adopted: false` (owed\n * journal / gate unmet / barrier failed) the idb store stays authoritative and the mint opens idb.\n */\nexport async function runBootAdoption<TRegistry extends SyncTableRegistry>(\n storePath: string,\n declaration: AdoptionDeclaration,\n ctx: AdoptionBootContext<TRegistry>,\n seamsOverride?: AdoptionWiringSeams,\n): Promise<{ bootHasOpfs: boolean; outcome?: AdoptionOutcome }> {\n const seams = realAdoptionSeams(ctx, seamsOverride);\n // Adoption migrates an EXISTING idb store; nothing to adopt otherwise (committed-opfs / virgin have no idb).\n if (!(await seams.idbStoreExists(storePath))) return { bootHasOpfs: true };\n const resolution = await seams.resolveStoreBoot(storePath);\n const verdict = resolution.verdict;\n if (verdict === undefined || !adoptionEligible(declaration, verdict, true)) {\n // The classifier already executed any recovery (e.g. an interrupted adoption). Honour its resolved backend.\n const bootHasOpfs = resolution.storageBackend === \"opfs-repacked\";\n seams.log(\"boot adoption not eligible — using the classifier's resolved backend\", {\n action: verdict?.action,\n storageBackend: resolution.storageBackend,\n });\n return { bootHasOpfs };\n }\n const outcome = await runAdoptionTransition(declaration, seams.buildEffects(storePath));\n if (outcome.adopted) {\n seams.log(\"boot adoption committed the opfs successor; idb predecessor deleted\", {\n ...(outcome.predecessorCleanupPending ? { predecessorCleanupPending: outcome.predecessorCleanupPending } : {}),\n });\n return { bootHasOpfs: true, outcome };\n }\n seams.log(\"boot adoption deferred/failed — idb stays authoritative\", {\n reason: outcome.reason,\n ...(outcome.error ? { error: outcome.error } : {}),\n });\n return { bootHasOpfs: false, outcome };\n}\n\n// ─── ADR-0049 step 11c: FRESH/RESTORE commitment boot wiring ───────────────────────────────────────────\n// Step 11b wired the DECLARATION-gated adoption transition; it left one gap (its own commit message names it):\n// a virgin (or restored) opfs boot minted `opfs://` straight through `resolveStoreDataDir` WITHOUT the phase\n// machine — no candidate record, no commitment barrier, no sentinel. That violated invariant 3 (an uncommitted\n// candidate is never exposed to writes; commitment precedes exposure — D7) and invariant 12 (record written at\n// creation, completed before exposure). This wiring closes it: EVERY browser opfs boot the client owns now\n// routes through the boot phase machine, and a fresh/restore candidate is committed by the shared barrier\n// BEFORE exposure. It COMPOSES with 11b — the declared-adoption-on-idb-store decision runs FIRST; this path\n// runs only when the opfs grant survives it (so an already-committed successor resolves `open-committed` with\n// no re-commit, and a deferred adoption's `false` grant short-circuits to idb).\n\n/**\n * @internal Injectable seams for the FRESH/RESTORE commitment boot wiring (step 11c). Real defaults in\n * production (`globalThis.indexedDB` / `navigator.storage`); unit tests inject fakes so the phase machine and\n * the commitment barrier are exercised without real IndexedDB / OPFS / WASM. Mirrors {@link AdoptionWiringSeams}:\n * the IO surfaces are faked, the barrier runs over the REAL `resolveStoreBoot` / `createOpfsEffects` /\n * `writeStoreMetaRecord` so the record-before-directory ordering and the sentinel/phase writes are real.\n */\nexport interface FreshCommitmentSeams {\n /** The boot classifier + executor (`store-boot.ts`); its verdict decides whether a candidate needs the barrier. */\n resolveStoreBoot?: (storePath: string) => Promise<StoreBootResolution>;\n /** Diagnostics sink; defaults to the boot debug rail. */\n log?: (message: string, data?: Record<string, unknown>) => void;\n /** The store-meta IndexedDB seam (defaults to `globalThis.indexedDB`). */\n meta?: StoreMetaDeps;\n /** The OPFS root seam (defaults to `navigator.storage.getDirectory`). */\n opfs?: OpfsEffectsDeps;\n /** The recordless non-creating idb existence check (defaults to store-meta's `idbStoreExists`). */\n idbExists?: (storePath: string) => Promise<boolean>;\n}\n\n/** The PRE-MINT outcome of {@link resolveFreshBoot}: the resolved backend and whether the milestone owes a barrier. */\nexport interface FreshBootResolution {\n /** Whether the client-owned mint should open the OPFS backend (a classification landing on idb flips this false). */\n bootHasOpfs: boolean;\n /** The resolved backend, for diagnostics (ADR-0049). */\n storageBackend: ResolvedStorageBackend;\n /** The executed boot verdict (absent on the short-circuited non-opfs path). */\n verdict?: StoreBootVerdict;\n /**\n * Whether an UNCOMMITTED opfs candidate was stood up that the shared commitment barrier must promote at the\n * local-init milestone ({@link runFreshCommitmentBarrier}) BEFORE exposure. True only for the two fresh\n * candidate verdicts (`virgin-create` / `delete-candidate-and-rebuild`) landing on `opfs-repacked`; a\n * committed store (`open-committed` / `repair-record-then-open-committed`) is already committed (no re-run).\n */\n needsCommitmentBarrier: boolean;\n}\n\n/**\n * Map a resolved PGlite dataDir URL to the ADR-0049 decision 12 `storageBackend` diagnostic — the inverse of\n * {@link resolveStoreDataDir}'s scheme selection (`opfs://` → opfs-repacked, `idb://` → idbfs, `file://` →\n * filesystem, `memory://` → memory). Used to stamp the BootReport at the single client-owned mint seam. Returns\n * `undefined` for an unrecognised scheme (a BYO instance whose dataDir the toolkit never minted — e.g. an\n * opfs-repacked wrapper that does not self-report an `opfs://` dataDir), so the field is then honestly omitted.\n */\nfunction storageBackendFromDataDir(dataDir: string | undefined): NonNullable<BootReport[\"storageBackend\"]> | undefined {\n if (dataDir == null) return undefined;\n if (dataDir.startsWith(\"opfs://\")) return \"opfs-repacked\";\n if (dataDir.startsWith(\"idb://\")) return \"idbfs\";\n if (dataDir.startsWith(\"file://\")) return \"filesystem\";\n if (dataDir.startsWith(\"memory://\")) return \"memory\";\n return undefined;\n}\n\n/** Does a boot verdict stand up an UNCOMMITTED opfs candidate the commitment barrier must promote (invariant 3)? */\nfunction verdictNeedsCommitmentBarrier(\n verdict: StoreBootVerdict | undefined,\n storageBackend: ResolvedStorageBackend,\n): boolean {\n if (storageBackend !== \"opfs-repacked\") return false;\n return verdict?.action === \"virgin-create\" || verdict?.action === \"delete-candidate-and-rebuild\";\n}\n\n/**\n * @internal ADR-0049 step 11c — Phase 1 (PRE-MINT). Route a client-owned OPFS-home boot through the boot phase\n * machine ({@link resolveStoreBoot}) so: a virgin/restore boot stands up an UNCOMMITTED opfs candidate (record\n * BEFORE directory, invariant 12); a committed store resolves `open-committed` (no barrier re-run); a recordless\n * idb store (adoption not declared) downgrades to idb (invariant 14 — never a fresh opfs mint over an existing\n * idb store's data); and an interrupted destruction/adoption/candidate is recovered by the classifier itself. Returns\n * whether the mint opens opfs and whether the local-init milestone must run the commitment barrier. A `false`\n * `hasOpfsSyncAccess` SHORT-CIRCUITS (an idbfs/file home opens directly — the opfs commitment phase machine never\n * runs), which is also how this composes with 11b: a deferred/failed adoption flips the grant to `false`.\n */\nexport async function resolveFreshBoot(\n storePath: string,\n hasOpfsSyncAccess: boolean,\n backendOverride: \"memory\" | undefined,\n seams?: FreshCommitmentSeams,\n): Promise<FreshBootResolution> {\n // Guard: only the browser opfs engine home routes through the phase machine. No grant (or the memory test\n // lane, which has no meta machinery) → the idb/file/memory path is untouched except that a browser denied\n // boot must finish an already-authorized `deleting` handoff before it creates a replacement IDB store.\n if (!hasOpfsSyncAccess || backendOverride === \"memory\") {\n if (!hasOpfsSyncAccess && backendOverride !== \"memory\") await recoverDeniedBootDeletion(storePath);\n return {\n bootHasOpfs: false,\n storageBackend: backendOverride === \"memory\" ? \"memory\" : \"idbfs\",\n needsCommitmentBarrier: false,\n };\n }\n const runResolve =\n seams?.resolveStoreBoot ??\n ((sp: string) =>\n resolveStoreBoot(sp, {\n hasOpfsSyncAccess: true,\n ...(seams?.meta || seams?.opfs || seams?.idbExists\n ? {\n deps: {\n ...(seams?.meta ? { meta: seams.meta } : {}),\n ...(seams?.opfs ? { opfs: seams.opfs } : {}),\n ...(seams?.idbExists ? { idbExists: seams.idbExists } : {}),\n },\n }\n : {}),\n }));\n const resolution = await runResolve(storePath);\n const bootHasOpfs = resolution.storageBackend === \"opfs-repacked\";\n const needsCommitmentBarrier = verdictNeedsCommitmentBarrier(resolution.verdict, resolution.storageBackend);\n (seams?.log ?? ((message, data) => syncDebug(message, data)))(\"boot fresh commitment resolved the boot backend\", {\n action: resolution.verdict?.action,\n storageBackend: resolution.storageBackend,\n needsCommitmentBarrier,\n });\n return {\n bootHasOpfs,\n storageBackend: resolution.storageBackend,\n ...(resolution.verdict ? { verdict: resolution.verdict } : {}),\n needsCommitmentBarrier,\n };\n}\n\n/**\n * @internal ADR-0049 step 11c — Phase 2 (LOCAL-INIT MILESTONE, PRE-EXPOSE). Run the shared commitment barrier\n * ({@link runCommitmentBarrier}: `strictSync()` returns with VFS health good → publish the sentinel →\n * `opfs-committed` phase) over the live engine's `strictSync()`. The caller invokes this ONLY after the\n * FRESH/RESTORE provenance gate has passed (successful local initialization/recovery — the local-read core is\n * proven; D7 requires NO server for fresh/restore) and BEFORE exposure. A throw PROPAGATES out of the boot: the\n * barrier is all-or-nothing, so nothing is published, the `opfs-candidate` record survives, and the next boot's\n * classifier tears the candidate down and rebuilds (`delete-candidate-and-rebuild`) — nothing was ever exposed,\n * nothing strands (invariant 3). Real effects run over `createOpfsEffects` + `writeStoreMetaRecord`, injectable\n * for unit tests via {@link FreshCommitmentSeams}.\n */\n/**\n * Extract the live engine's `strictSync()` from an opfs-repacked store for the commitment barrier (mirrors the\n * adoption path's `commitCandidate`). The commitment barrier requires it (data-before-authority, invariant 3);\n * a store that does not expose it is not an OPFS-repacked engine, which is a boot invariant violation.\n */\nfunction resolveEngineStrictSync(pglite: ClientPGlite): () => Promise<void> {\n const strictSync = (pglite as unknown as { strictSync?: () => Promise<void> }).strictSync;\n if (typeof strictSync !== \"function\") {\n throw new Error(\n \"[pgxsinkit] fresh commitment: the opfs store does not expose `strictSync()` — the commitment barrier \" +\n \"requires an OPFS-repacked engine (data-before-authority, invariant 3).\",\n );\n }\n return () => strictSync.call(pglite);\n}\n\nexport async function runFreshCommitmentBarrier(\n storePath: string,\n strictSyncReturns: () => Promise<void>,\n seams?: FreshCommitmentSeams,\n): Promise<void> {\n const opfs = createOpfsEffects(storePath, seams?.opfs);\n await runCommitmentBarrier({\n strictSyncReturns,\n publishSentinel: () => opfs.publishSentinel(),\n setPhase: (phase) => writeStoreMetaRecord(storePath, { phase, updatedAt: Date.now() }, seams?.meta),\n });\n (seams?.log ?? ((message, data) => syncDebug(message, data)))(\n \"boot fresh commitment barrier committed the opfs store\",\n {\n storePath,\n },\n );\n}\n\n/**\n * Format an opfs open failure into the VERBATIM `Name: message` the `storageFallbackReason` diagnostic carries\n * (ADR-0049 decision 12). A non-Error throw is stringified.\n */\nfunction formatOpenFailureReason(error: unknown): string {\n if (error instanceof Error) return `${error.name || \"Error\"}: ${error.message}`;\n return String(error);\n}\n\n/**\n * @internal ADR-0049 D6 — the VIRGIN-UNCREATABLE session idbfs fallback (plan step 13 gap; plan fault row \"opfs\n * uncreatable, virgin → Session idbfs fallback after bounded retries, record written\"). The COUNTERPART to\n * {@link runFreshCommitmentBarrier}: instead of committing a candidate that opened, this handles a candidate\n * that could NOT open. When the client-owned opfs mint exhausts {@link openWithBoundedRetries} on a\n * VIRGIN/candidate boot, tear the never-committed candidate down and re-mint on idbfs FOR THIS SESSION. Returns\n * the verbatim open-failure reason (`Name: message`) the caller stamps via the step-13 `storageFallbackReason`\n * seam.\n *\n * APPLIES ONLY to the positive-absence virgin/candidate path. {@link createSyncClient} gates this on\n * `commitmentBarrierPending` (= {@link FreshBootResolution.needsCommitmentBarrier}), which is true ONLY for\n * `virgin-create` / `delete-candidate-and-rebuild` landing on opfs — a boot that published NO sentinel and holds\n * an unexposed candidate. A COMMITTED store (record `opfs-committed`, or a present sentinel reading committed →\n * `open-committed` / `repair-record-then-open-committed`) owes NO barrier, so the gate is false and its open\n * failure PROPAGATES HARD (CONTEXT § \"Commitment marker\": \"once committed, any opfs boot failure is a hard\n * failure\"; accepted-risk register). This function is therefore never reached for a committed store.\n *\n * Teardown: delete-if-present the sentinel (a stale sentinel is impossible before the barrier, but symmetric\n * with `delete-candidate-and-rebuild`) AND the candidate directory, then set the meta record to\n * `idb-authoritative` — NOT delete it.\n *\n * STICKINESS (reconciling the plan's D6 \"non-sticky, opfs retried next boot\" verdict with the LATER phase\n * machine): the record is the first-use authority, and an idb fallback store IS a recorded idb store (boot\n * classification 7's caution / invariant 14 — the same as the no-handle virgin path, which already records\n * `idb-authoritative`). So the next boot classifies `boot-idb-authoritative` (classification 5) and boots idb;\n * it does NOT loop through virgin re-creation each boot. Retry-to-opfs is the DESIGNED non-destructive ADOPTION\n * re-entry (a declared consumer re-adopts to opfs on a later drained boot) — the phase machine's intended,\n * supervised re-entry — rather than a destructive per-boot re-probe. This keeps the fault row true (\"record\n * written\") and the fault-row semantics honest for the composition actually shipped.\n */\nexport async function fallbackVirginCandidateToIdb(\n storePath: string,\n openError: unknown,\n seams?: FreshCommitmentSeams,\n): Promise<string> {\n const opfs = createOpfsEffects(storePath, seams?.opfs);\n await opfs.deleteSentinel();\n await opfs.deleteStoreDirectory();\n await writeStoreMetaRecord(storePath, { phase: \"idb-authoritative\", updatedAt: Date.now() }, seams?.meta);\n const reason = formatOpenFailureReason(openError);\n (seams?.log ?? ((message, data) => syncDebug(message, data)))(\n \"boot fresh commitment: opfs candidate uncreatable after bounded retries — session idbfs fallback\",\n { storePath, reason },\n );\n return reason;\n}\n\n/** Options for the manual {@link adoptStore} API — the creation-path adoption trigger. */\nexport interface AdoptStoreOptions<TRegistry extends SyncTableRegistry> {\n registry: TRegistry;\n electricUrl: string;\n batchWriteUrl: string;\n /** The store to adopt (a plain path/name; the idb predecessor is migrated to a committed OPFS successor). */\n storePath?: string;\n getAuthToken?: () => Promise<string | undefined>;\n requestHeaders?: Record<string, string>;\n syncEnabled?: boolean;\n /** Bounded wait (ms) for the eager Consistency groups' catch-up before the gate fails closed. */\n gateDeadlineMs?: number;\n /** @internal test seams (fake effects / idb existence / meta+opfs IO). */\n seams?: AdoptionWiringSeams;\n}\n\n/**\n * The MANUAL adoption API (ADR-0049 D7, plan step 11b): migrate an EXISTING idb-authoritative store into a\n * committed OPFS successor ON DEMAND, without the automatic {@link CreateSyncClientOptions.adoption} declaration\n * — the consumer's explicit call IS the authorization (they were told to export/migrate any local-only data\n * first). Like `restoreFrom` it is a CREATION-PATH operation: call it INSTEAD of {@link createSyncClient},\n * before any client opens the store — it REFUSES with {@link StoreInUseError} while a live in-process client\n * holds the store. The drain predicate still gates it (a store that owes the server work is not adoptable), and\n * every failure recovery is identical to the automatic path (idb stays authoritative; nothing strands).\n */\nexport async function adoptStore<const TRegistry extends SyncTableRegistry>(\n options: AdoptStoreOptions<TRegistry>,\n): Promise<AdoptionOutcome> {\n const storePath = options.storePath ?? \"pgxsinkit-overlay-v1\";\n const isStoreLive = options.seams?.isStoreLive ?? ((sp: string) => liveStorePaths.has(sp));\n if (isStoreLive(storePath)) throw new StoreInUseError(storePath);\n const ctx: AdoptionBootContext<TRegistry> = {\n registry: options.registry,\n electricUrl: options.electricUrl,\n batchWriteUrl: options.batchWriteUrl,\n ...(options.getAuthToken ? { getAuthToken: options.getAuthToken } : {}),\n ...(options.requestHeaders ? { requestHeaders: options.requestHeaders } : {}),\n syncEnabled: options.syncEnabled ?? true,\n ...(options.gateDeadlineMs != null ? { gateDeadlineMs: options.gateDeadlineMs } : {}),\n ...(options.seams?.meta ? { meta: options.seams.meta } : {}),\n ...(options.seams?.opfs ? { opfs: options.seams.opfs } : {}),\n ...(options.seams?.createPglite ? { createPglite: options.seams.createPglite } : {}),\n };\n const effects = options.seams?.buildEffects?.(storePath) ?? buildRealAdoptionEffects(storePath, ctx);\n return runManualAdoption(effects);\n}\n\nexport interface CreateSyncClientOptions<TRegistry extends SyncTableRegistry> {\n registry: TRegistry;\n electricUrl: string;\n batchWriteUrl: string;\n getAuthToken?: () => Promise<string | undefined>;\n /**\n * Static headers added to **every** read-shape and write request, alongside the per-request\n * `Authorization` (which always wins). The toolkit is agnostic about deployment-gateway\n * credentials, so this is the seam for them — e.g. a Supabase Cloud `apikey` header the platform\n * function gateway expects. Sent even when no `getAuthToken` is supplied.\n */\n requestHeaders?: Record<string, string>;\n /**\n * Extra static headers sent on the **write** path only (the mutation-flush POST), merged over\n * {@link requestHeaders} (`{...requestHeaders, ...writeRequestHeaders}`). Read/shape requests never\n * see these. The seam exists because the two ingress points have opposite geometry: the write\n * function is DB-bound, so pinning it to the database's region (e.g. an `x-region` header) keeps its\n * chatty function→DB protocol on a ~1ms loop; the read proxy's upstream is a globally-distributed\n * CDN (Electric Cloud), so pinning reads away from the caller pays intercontinental round trips per\n * catch-up hop. Put region/DB-affinity headers here; keep gateway credentials the reads also need\n * (e.g. `apikey`) in the shared {@link requestHeaders}.\n */\n writeRequestHeaders?: Record<string, string>;\n syncEnabled?: boolean;\n /**\n * The local store's name (ADR-0036) — a PLAIN path/name, never a PGlite storage URL. The storage backend\n * is DERIVED from the engine home (capability-selected opfs-repacked with IndexedDB fallback in a browser,\n * or the filesystem on Bun/Node); a\n * scheme-bearing string (anything containing `://`) is rejected with {@link InvalidStorePathError}\n * at boot. Defaults to a built-in overlay store name when omitted. A memory-backed store is not a product\n * configuration — for the test/ephemeral lane, spread `memoryStoreForTests(...)` from\n * `@pgxsinkit/client/testing` instead of naming one here.\n */\n storePath?: string;\n /**\n * @internal Toolkit-internal WIRE-declaration carrier (ADR-0050), NOT a public per-boot knob. The worker\n * host threads the store's BOUND storage declaration (registry static + the first payload's wire\n * declaration + defaults) in here, and this boot's single storage resolution point folds it with the\n * registry's own static declaration — an explicit disagreement is a typed\n * `StorageDeclarationRefusedError` (the worker handlers refuse conflicts before this ever throws).\n * In-process consumers never set it: their registry IS the declaration.\n */\n storage?: SyncStorageDeclaration;\n /**\n * ADR-0049 D1: the placement probe's OPFS-sync-access grant, threaded from the SharedWorker's engine home\n * (`defineSyncWorker`'s SW-direct bootstrap) into this boot so the client-owned create opens the OPFS-repacked\n * backend. Absent/false is the honest IDBFS home — the declared `backend: \"idbfs\"` mode or a capability-absence\n * fallback (a main thread can never hold handles either). Forwarded verbatim to {@link createClientPGlite}, which\n * resolves the actual dataDir from it.\n */\n hasOpfsSyncAccess?: boolean;\n /**\n * ADR-0049 (capability-driven engine placement) decision 7, plan step 11b: the consumer's explicit\n * reconstructibility DECLARATION authorizing AUTOMATIC adoption of an existing idb-authoritative store into a\n * committed OPFS successor. DEFAULT OFF (`undefined`) — hook absence is NEVER authority (`rawExec` writes\n * documented local-only state on any store), so only this explicit `\"server-reconstructible\"` value (or the\n * manual {@link adoptStore} API) authorizes deleting the idb predecessor. Honoured ONLY on the browser\n * OPFS-home boot path (when {@link hasOpfsSyncAccess} is granted and the client owns the create — never the\n * BYO-instance / restore paths): a boot that finds an idb-authoritative store runs the pre-expose drain check,\n * reconstructs the successor through the Adoption-bootstrap gate (authorized online reconstruction — the eager\n * Consistency groups' initial catch-up), commits it via the strict barrier, and only then deletes the idb\n * predecessor. Any deferral/failure (owed journal, gate unmet, barrier failed) leaves the idb store\n * authoritative and boots it normally.\n */\n adoption?: AdoptionDeclaration;\n /**\n * Pre-warmed PGlite boot assets (the WASM modules + filesystem bundle), awaited and passed straight\n * into `PGlite.create`. The intent is to hide PGlite's ~2.5s cold `boot pglite.create` cost —\n * dominated by the WASM fetch+compile — behind user think-time: the host starts fetching/compiling\n * these on an earlier screen (e.g. the login/identity picker) and hands the still-pending promise\n * here, so by the time a store is opened the assets are already resolved and `PGlite.create` skips\n * its own lazy asset load. Ignored when {@link pgliteInstance} is supplied (the caller owns that\n * instance's boot). A rejected/failed warm is caught to `undefined` and never fails the boot — PGlite\n * falls back to loading its own assets, so this is a pure best-effort accelerator.\n */\n pgliteBootAssets?: Promise<PgliteBootAssets>;\n resetSubscriptionKeys?: string[];\n prepareLocalDbBeforeSchema?: (pglite: ClientPGlite) => Promise<void>;\n prepareLocalDbAfterSchema?: (pglite: ClientPGlite) => Promise<void>;\n onStatusChange?: (status: SyncRuntimeStatus) => void;\n onTableInitialSync?: (tableKey: string) => void;\n /**\n * A fully-provisioned PGlite instance the CALLER owns end-to-end. The client runs NONE of its\n * post-create boot steps against it — no schema exec, prepare hooks, or registry reconciliation\n * (journal recovery still runs, as it does on every path). Use it only when the caller has already\n * applied the registry schema itself. Contrast the three PGlite-provenance seams:\n * - {@link storePath} (default) — the client creates the store AND runs every post-create step.\n * - {@link precreatedPglite} — the caller creates the raw store (via {@link createClientPGlite}), but\n * the client still runs every post-create step (schema, prepare hooks, and reconciliation), exactly as\n * `storePath` does.\n * - `pgliteInstance` — the caller creates AND provisions the store; the client runs none of them.\n *\n * A caller-owned instance is REFUSED with {@link NonPersistentStoreError} if it is provably\n * non-persistent (a `new PGlite()` default, or an in-memory store) — pgxsinkit's durability semantics\n * assume a persisted store (ADR-0036). Acknowledge a deliberate test store by spreading\n * `testStoreAcknowledgment()` from `@pgxsinkit/client/testing`.\n *\n * Mutually exclusive with {@link precreatedPglite} (supplying both throws).\n */\n pgliteInstance?: ClientPGlite;\n /**\n * A raw PGlite instance the caller created EAGERLY (via {@link createClientPGlite}) — typically on an\n * earlier screen, to hide the ~1.9s cold `initdb`/IDBFS open behind user think-time — but for which the\n * client still owns EVERYTHING else: schema exec, prepare hooks, journal recovery, and registry\n * reconciliation all run exactly as on the {@link storePath} path. This is the difference from\n * {@link pgliteInstance} (which skips schema, prepare hooks, and reconciliation because the caller owns\n * them); see that\n * option's JSDoc for the three-way distinction.\n *\n * The promise form lets the still-pending eager create be handed straight in. Precedence/validation:\n * - Supplying both this and {@link pgliteInstance} throws — they claim different ownership.\n * - {@link storePath} is used ONLY as the fallback store name if this promise REJECTS: a failed eager\n * create is caught, logged on the boot rail, and the normal `storePath` create path runs instead (also\n * consuming {@link pgliteBootAssets} if provided). The pattern is a pure accelerator, never a boot\n * dependency.\n * - A successfully-adopted instance is subject to the same {@link NonPersistentStoreError} refusal as\n * {@link pgliteInstance} (checked after resolution, so the refusal propagates rather than being\n * swallowed by the reject-fallback).\n */\n precreatedPglite?: Promise<ClientPGlite>;\n /**\n * Restore the store from a **store backup** (ADR-0035 decision 6) — a `File`/`Blob` tarball as produced by\n * {@link SyncClient.exportStore}. The client creates its store with the backup handed to PGlite's\n * `loadDataDir`, so it boots ON the backup's datadir (synced cache + Overlay + Mutation journal, all the\n * bytes that travelled inside it). Three restore-only rules apply, none of them optional:\n *\n * - **Fresh target only.** Refused with {@link RestoreTargetExistsError} if a store already exists at the\n * resolved {@link storePath} — restore never overlays a live store (that would corrupt the datadir); the\n * remedy is a deliberate {@link SyncClient.destroy} of the existing store first.\n * - **Comes online iff the recovered journal is clean (ADR-0046).** If journal recovery found NOTHING to\n * quarantine — an empty recovered journal, the guaranteed-clean server-built bootstrap-artifact case — the\n * restore boots ONLINE, honouring {@link syncEnabled}/{@link autoSync} exactly as a normal boot (streams,\n * flush, convergence). If recovered mutations were quarantined, the boot stays OFFLINE (no shape streams,\n * no read fetch, no flush): the app inspects {@link SyncClient.diagnostics}, releases/discards the\n * quarantined rows, then a subsequent NORMAL boot of the (now-persisted) store brings sync online.\n * `loadDataDir` happens exactly once, on this restore boot. An explicit `syncEnabled: false` keeps it offline.\n * - **Journal quarantined.** Every non-terminal recovered row (`pending`/`sending`/`failed`) is moved to\n * `quarantined` — nothing recovered from a backup auto-flushes (the write path has no `mutationId` dedupe\n * ledger, so replay is unsafe on last-write-wins tables). Release (`retryFailed`) or discard\n * (`discardQuarantined`) them explicitly. When this pass quarantines nothing, the restore comes online (above).\n *\n * Mutually exclusive with {@link pgliteInstance} AND {@link precreatedPglite} — restore owns the store's\n * creation (`loadDataDir` is a create-time seed), so a caller-supplied instance conflicts (supplying either\n * with `restoreFrom` throws).\n */\n restoreFrom?: File | Blob;\n /**\n * PROVABLY-fresh store hint (ADR-0032 S4 / backlog-0003): the caller guarantees this store is brand-new\n * and schemaless — no prior schema, no synced rows, no persisted subscription state. When set (and sync\n * is enabled, and the client owns schema exec — i.e. not the {@link pgliteInstance} path), the shape\n * catch-up is started BEFORE the local boot phases (schema exec, journal recovery, and registry\n * reconciliation) and buffered in memory, with commits gated until those phases finish — so the network\n * catch-up overlaps them instead of running strictly after. On a far-from-database caller this collapses\n * boot from `local-phases + catch-up` toward `max(local-phases, catch-up)`.\n *\n * MUST be set only when freshness is proven, never derived by probing — a claimed schemaless spare (the\n * board's claim path knows: a claimed spare is always fresh; a mapped/returning store never is). A wrong\n * `true` on a warm store would start the streams from offset 0 and skip the subscription-state read,\n * re-snapshotting instead of resuming. Absent/false → the exact sequential path (the default, correct for\n * every warm store).\n */\n freshStore?: boolean;\n /**\n * Hard cap on send attempts before a still-failing mutation is quarantined\n * (ADR-0005 congestion policy). Defaults to the library's built-in cap.\n */\n maxMutationAttempts?: number;\n /**\n * Invoked when mutations are quarantined (permanently rejected by the server, terminal). The library\n * surfaces them here rather than silently dropping or retry-looping (ADR-0006). Surface, then either\n * re-author + resubmit or roll back via {@link SyncClient.discardQuarantined} — which clears the kept\n * overlay + quarantined journal rows so the entity accepts new mutations again.\n */\n onQuarantine?: (quarantined: MutationDetail[]) => void | Promise<void>;\n /**\n * Invoked when mutations are `conflicted` — a stale write the server declined under the\n * `reject-if-stale` Conflict policy (ADR-0015). The optimistic Overlay is kept, so the app shows a\n * resolution/diff UI and resolves each as a new write (`mutate.update`) or `discardConflict`s it.\n */\n onConflict?: (conflicted: MutationDetail[]) => void | Promise<void>;\n /**\n * Invoked when a pessimistic write-unit is `rejected` (ADR-0022) — a business decline from the\n * authoritative endpoint (capacity/quota/uniqueness). The inverse of `onConflict`: the optimistic Overlay\n * was auto-discarded for the whole unit, so the app surfaces the typed reason rather than a resolve UI.\n */\n onReject?: (rejected: MutationDetail[]) => void | Promise<void>;\n /**\n * Invoked when a supported store's registry fingerprint changes. `rebuilt` means the clean read cache was\n * rebuilt at the new shape; `deferred` means local mutations are still owed and must drain first.\n */\n onSchemaChange?: (event: LocalStoreVersionEvent) => void | Promise<void>;\n /**\n * Opt-in convergence driver (ADR-0005). Supply a {@link ConvergenceTrigger} (e.g.\n * `createBrowserConvergenceTrigger()`) and the client drives `flush`/`reconcile`/`retryFailed`\n * on the trigger's schedule, started once sync is ready and stopped on `stop()`/`destroy()`.\n * Omit it for fully-manual convergence (the mechanism primitives stay public either way).\n */\n autoSync?: ConvergenceTrigger;\n /** Invoked after each automatic convergence pass with its error, or `null` on success (only when `autoSync` is set). */\n onConvergencePass?: (error: unknown) => void;\n /**\n * Invoked when a read-path sync commit fails after exhausting its retries (ADR-0009 decision 5).\n * The runtime enters the `degraded` phase and holds the read cache at the last applied commit\n * instead of silently diverging from the server; recovery is a later commit or a restart/refetch.\n */\n onSyncError?: (error: Error) => void;\n /**\n * Boot observability (ADR-0034): invoked exactly once, at boot completion, with the finalized\n * {@link BootReport}. The push counterpart of {@link SyncClient.bootReport} (the pull) for consumers that\n * want the numbers without polling — dashboards, CI budget gates. Never fired before initial sync; a\n * `stop()`/`destroy()` before then means it never fires.\n */\n onBootReport?: (report: BootReport) => void;\n /**\n * @internal Boot mode stamped into the {@link BootReport} (ADR-0034). `defineSyncWorker` sets `\"worker\"`;\n * absent → `\"in-process\"`. Not a behavior knob — it only labels the report.\n */\n bootMode?: BootReport[\"mode\"];\n /**\n * @internal Engine home stamped into the {@link BootReport} (ADR-0049 decision 12). Threaded by\n * `defineSyncWorker` from the SharedWorker placement decision — `\"shared-worker\"` (SW-direct) or\n * `\"elected-worker\"`. Absent only for a plain non-worker scope that cannot derive a browser engine home; the\n * in-process client stamps `\"in-process\"` itself. Report-label only.\n */\n engineHome?: BootReport[\"engineHome\"];\n /**\n * @internal Capability-absence fallback reason stamped into the {@link BootReport} (ADR-0049 D1/D12). Threaded\n * by `defineSyncWorker` when the placement bootstrap opened the in-SharedWorker IDBFS engine because OPFS was\n * CAPABLE but no home could hold sync-access handles (every probe denied / the OPFS API absent). Unlike the\n * client's own internal fallback reasons (adoption-deferred, recordless-idb — set only under a granted probe),\n * this externally-supplied reason is stamped verbatim on an idbfs boot. Absent on a granted opfs boot and on the\n * declared `backend: \"idbfs\"` mode (that is the data contract, not a fallback). Report-label only.\n */\n storageFallbackReason?: string;\n /**\n * @internal Provision timing for a boot that ADOPTS a pre-provisioned store (ADR-0034). When the store was\n * minted ahead of boot (a spare's off-thread initdb), the provisioner stamps its create cost and ready\n * time here; the boot reports them as {@link BootReport.provision} and sets `phases.pgliteCreateMs = null`.\n * A promise because the stamp settles with the spare's `create`. Only honoured on the {@link precreatedPglite}\n * adoption path (ignored on a fallback create). `provisionReadyAt` must share this process's monotonic clock.\n */\n provisionStamp?: Promise<{ initdbMs: number; provisionReadyAt: number }>;\n /**\n * Bounded zero-subscriber keep-alive for the live-query manager (ADR-0040 decision 4) — same block as\n * {@link DefineSyncWorkerOptions.liveQueries}. Takes effect in BOTH client forms: the in-process client\n * now owns its own manager (decision 6), so this policy governs its live-query dedup and retention just as\n * it does the worker's. Defaults: `defaultKeepAliveMs` 0 (tear a query down the instant its last consumer\n * leaves), `maxRetainedQueries` 16, `maxRetainedRows` 50_000.\n */\n liveQueries?: {\n defaultKeepAliveMs?: number;\n maxRetainedQueries?: number;\n maxRetainedRows?: number;\n };\n}\n\nexport interface SyncClientTableHandle<TRegistry extends SyncTableRegistry, TKey extends SyncTableName<TRegistry>> {\n key: TKey;\n mode: TRegistry[TKey][\"mode\"];\n create: (input: SyncTableCreateInput<TRegistry, TKey>) => Promise<void>;\n update: (entityKey: Record<string, string>, patch: SyncTableUpdateInput<TRegistry, TKey>) => Promise<void>;\n delete: (entityKey: Record<string, string>) => Promise<void>;\n}\n\n/**\n * A table handle inside a {@link SyncClient.transaction} block (ADR-0022 §2). It *collects* mutations into\n * the open write-unit rather than enqueuing each immediately; the whole set is enqueued atomically when the\n * block's callback returns. The calls are synchronous (collection only) — no per-call await needed.\n */\nexport interface SyncTransactionTableHandle<\n TRegistry extends SyncTableRegistry,\n TKey extends SyncTableName<TRegistry>,\n> {\n create: (input: SyncTableCreateInput<TRegistry, TKey>) => void;\n update: (entityKey: Record<string, string>, patch: SyncTableUpdateInput<TRegistry, TKey>) => void;\n delete: (entityKey: Record<string, string>) => void;\n /**\n * An **update-by-key with no local base row** (ADR-0022 addendum). Ordinary `update` requires the entity\n * to be present in the actor's local read model (it seeds the optimistic overlay and captures the base\n * server version); `updateBlind` skips that presence check and writes NO overlay — nothing appears in the\n * read model. Use it when the write target is deliberately EXCLUDED from your read shape (a write-only\n * flow, or an anonymity-scoped moderation write whose row streams only to a different projection), so there\n * is no local row to update and nothing to show optimistically.\n *\n * **Pessimistic-only.** The /unit expander is authoritative for the outcome, so a blind write is meaningful\n * only inside a `transaction({ mode: \"pessimistic\" })` block (or over a statically-pessimistic table). An\n * optimistic-routed blind write has nothing to converge and THROWS at enqueue.\n *\n * The acked journal row **retires without a synced echo** (no visible row ever converges for it), so it does\n * not linger — unlike the seed-a-phantom-row workaround this replaces, whose acked row + overlay lingered\n * forever behind the echo barrier. A `conflicted` blind write stays dischargeable via `discardConflict`; a\n * `rejected` one is surfaced via `onReject`, both with no overlay to clean up.\n */\n updateBlind: (entityKey: Record<string, string>, patch: SyncTableUpdateInput<TRegistry, TKey>) => void;\n}\n\n/** The handle passed to a {@link SyncClient.transaction} callback: collecting table handles for the unit. */\nexport interface SyncTransaction<TRegistry extends SyncTableRegistry> {\n tables: { [TKey in SyncTableName<TRegistry>]: SyncTransactionTableHandle<TRegistry, TKey> };\n}\n\n/**\n * The result of a {@link SyncClient.transaction}. A `pessimistic` block carries the authoritative server\n * `acks` (each `acked` / `conflicted` / `rejected`); an `optimistic` block enqueues atomically and flushes\n * in the background, so its `acks` are empty.\n */\nexport interface SyncTransactionResult {\n acks: MutationAck[];\n}\n\n/** Minimal shape of a Drizzle select builder: inspectable via `.toSQL()` and awaitable for its rows. */\nexport interface DrizzleQueryBuilder<TRows extends readonly unknown[]> extends PromiseLike<TRows> {\n toSQL(): { sql: string; params: unknown[] };\n}\n\n/**\n * The builder callback for a guarded read (ADR-0021): it receives the client and returns a Drizzle\n * select builder. Reach relations through `c.views` / `c.drizzle` / a directly-imported synced table.\n */\nexport type GuardedQueryFn<TRegistry extends SyncTableRegistry, TRows extends readonly unknown[]> = (\n client: SyncClient<TRegistry>,\n) => DrizzleQueryBuilder<TRows>;\n\n/**\n * A guarded query whose builder MAY embed a raw `sql` template fragment (ADR-0021). A raw fragment can\n * name a lazy relation as a bare/unquoted identifier the compiled-SQL scan cannot see, so declare those\n * relations in `use` — they are activated and awaited before the query runs. Pure-Drizzle reads need no\n * `use` (the scan detects every relation): pass the builder callback directly to `client.query`.\n */\nexport interface GuardedRawQuerySpec<TRegistry extends SyncTableRegistry, TRows extends readonly unknown[]> {\n use?: readonly SyncTableName<TRegistry>[];\n build: GuardedQueryFn<TRegistry, TRows>;\n}\n\n/**\n * Inputs to the read-path safety seam {@link SyncClient.prepareQuery}. The lazy relations a query reads\n * are detected by scanning the compiled `sql` (union with the optional explicit `use`), then activated.\n * Shared by the live React hooks and the non-live facade.\n */\nexport interface PrepareQueryInput<TRegistry extends SyncTableRegistry> {\n /** The compiled (parameterised) Drizzle SQL the query will run — the scan's ground-truth target. */\n sql: string;\n /** Lazy relations to also activate, beyond those scanned from `sql` — a pre-activation hint, not required. */\n use?: readonly SyncTableName<TRegistry>[];\n}\n\n/**\n * The narrow live-rows seam (ADR-0032 S2 §4) both client modes implement so the `@pgxsinkit/react` hooks\n * work against either. Input for a reactive subscription: the compiled SQL + params (from a Drizzle\n * builder's `.toSQL()` or a raw string) and the result's `pkColumns` (drives worker-side diff keying;\n * omit for a keyless query). The in-process client runs it directly over `pglite.live`; the worker-attached\n * client runs the live query in the worker and streams DIFFs across the bridge.\n */\nexport interface SubscribeLiveRowsInput {\n sql: string;\n params: readonly unknown[];\n /**\n * The unique output aliases to render the query's columns under so it is SAFE TO MATERIALISE, in the\n * compiled SQL's column order (one per output column). Drizzle emits no output aliases, so a JOIN whose\n * tables share a column name compiles to duplicate output names — which PGlite's `live` extension\n * refuses to materialise (`column \"title\" specified more than once`) and which silently collapse\n * same-named columns even in a plain query. When supplied, the seam wraps the query so every output\n * column gets its alias and rows come back KEYED BY THESE ALIASES; the consumer's row-mapper must read\n * by alias (the `@pgxsinkit/react` hooks do). Omit for a raw or non-colliding query — the seam then\n * leaves the SQL untouched and rows stay keyed by the underlying column names.\n */\n fields?: readonly string[];\n /**\n * The result's PK columns — the diff-keying identity across the bridge (§4). Omit for a keyless query.\n * When {@link fields} is supplied the result columns are the aliases, so a PK column here must be named\n * by its ALIAS (the aliased result column), not the underlying source column.\n */\n pkColumns?: readonly string[];\n /**\n * Lazy relations (ADR-0021) to activate before the query runs — forwarded to the worker so it can\n * `prepareQuery` before registering the live query (the tab's own `prepareQuery` is a no-op against the\n * worker bridge). Ignored by the in-process client, whose `prepareQuery` already ran on the tab.\n */\n use?: readonly string[];\n /**\n * Per-subscription keep-alive hint (ms) for the live-query manager (ADR-0040 decision 4): retain this\n * query's shared registration for the grace period after its last consumer leaves, so a re-mount reuses it\n * verbatim (no re-materialization). Honoured in BOTH modes — the worker manager and the in-process manager\n * (decision 6). Bounded by the `liveQueries` policy budgets. Absent → no hint.\n */\n keepAliveMs?: number;\n}\n\n/** A handle to a live-rows subscription: the initial ordered snapshot plus an idempotent unsubscribe. */\nexport interface LiveRowsSubscription<TRow> {\n initialRows: TRow[];\n unsubscribe: () => void;\n /**\n * The `lazy` relations the query reads (the guard's scan) — the relations held out of the eager boot\n * set. Activation (stream start) completed before the subscription registered. Informational only:\n * {@link hydrated} — not this — reflects catch-up completion, and it now spans eager groups too.\n */\n lazyTables?: readonly string[];\n /**\n * Present when the query reads ANY consistency group (eager OR lazy) that was NOT YET caught up at\n * subscribe time: resolves once every such group has completed its initial catch-up AND this\n * subscription has already delivered rows reflecting it (the seam refreshes the live query after\n * catch-up, then resolves — rows-before-signal is guaranteed, so flipping a UI out of its loading state\n * on this promise can never flash a false \"empty\"). Absent when every referenced group is already ready\n * at subscribe time (the steady-state fast path — no extra refresh) or sync is disabled. Offline note:\n * stays pending until the catch-up truly completes — gate empty-state COPY on it, not data access (rows\n * flow regardless).\n */\n hydrated?: Promise<void>;\n}\n\n/**\n * Result of {@link SyncClient.prepareQuery}: the `lazy` relations the guard scanned out of the SQL\n * (∪ the explicit `use`) and activated. Activation means the group's STREAM IS STARTED — reads are\n * safe from the tripwire — not that its initial catch-up has completed; await\n * {@link SyncClient.groupReady} per key for that (see ADR-0021 / ADR-0032 decision 6).\n *\n * Parameterized by the TABLE-NAME UNION, not the registry: `keyof TRegistry` in an output position\n * would make the registry parameter contravariant, and `SyncClient<ConcreteRegistry>` would stop\n * being assignable to bare-`SyncTableRegistry` supertypes — the erasure pattern consumer seams rely\n * on. A name union in output position keeps the whole client covariant in its registry.\n */\nexport interface PreparedQueryResult<TTable extends string = string> {\n lazyTables: readonly TTable[];\n}\n\nexport interface SyncClient<TRegistry extends SyncTableRegistry> {\n drizzle: PgliteDatabase<RegistryRelations<TRegistry>>;\n pglite: ClientPGlite;\n views: RegistryViews<TRegistry>;\n tables: {\n [TKey in SyncTableName<TRegistry>]: SyncClientTableHandle<TRegistry, TKey>;\n };\n /**\n * Local-read readiness (ADR-0041): resolves once PGlite is open, the durable schema is ready, registry\n * reconciliation has completed, and the drizzle read\n * facade is built — so cached rows are queryable. Resolving this stage requires NO write runtime, NO sync\n * start, and NO network I/O, so an offline boot resolves it promptly. Under the ADR-0041 Option B contract\n * `createSyncClient()` (and, in stage 2, `attachSyncClient()`) resolves at exactly this stage; the write and\n * sync tail continues in the background. Monotonic and idempotent.\n */\n localReadReady: Promise<void>;\n /**\n * Write readiness (ADR-0041): resolves once the mutation runtime is constructed and boot recovery has\n * completed (plus restore quarantine on a restore boot) — enqueue is safe. Every write-path method awaits\n * this internally, so a write issued the instant `localReadReady` resolves completes once `writeReady`\n * lands rather than failing opaquely. Resolves with NO network I/O. Monotonic and idempotent.\n */\n writeReady: Promise<void>;\n /**\n * @internal Boot-settled signal (ADR-0041): resolves at today's full in-process resolution point — the\n * write runtime, boot recovery, and sync START have all run (initial catch-up is NOT awaited; that is\n * `ready`). The worker bridge awaits this before `attach-ack` so worker-mode external timing is unchanged\n * in stage 1; stage 2 replaces it with per-stage milestone messages. Not part of the supported public\n * surface — a diagnostics/bridge hook only.\n */\n bootSettled: Promise<void>;\n ready: Promise<void>;\n status: SyncRuntimeStatus;\n start: () => Promise<void>;\n /**\n * Synchronously abort all sync/write activity (in-flight write fetches, shape-stream long-polls, convergence\n * scheduling) without awaiting. Idempotent. The first action of every teardown path — stop()/destroy() call it,\n * and the SharedWorker host calls it before draining subscribes / disposing live queries so no teardown step\n * races a still-live engine. Not a substitute for stop()/destroy(): the awaited teardown (unsubscribe, dispose,\n * pglite.close) still follows. Callers rarely invoke it directly.\n */\n haltActivity: () => void;\n stop: () => Promise<void>;\n /**\n * Wipe the entire local store (synced cache + overlay + journal) and close the handle\n * (ADR-0005). Refuses if mutations are still owed to the server unless `force` is set, so\n * it never silently drops un-flushed writes. Distinct from `stop()`, which only halts sync.\n * Runs under the single lifecycle slot (ADR-0035 decision 4): a concurrent export — or another\n * `destroy`/`discardEphemeral`/`dropReadCache` — rejects with a {@link LifecycleBusyError} rather\n * than interleaving the wipe with a running export.\n */\n destroy: (options?: { force?: boolean }) => Promise<void>;\n /**\n * Drop and rebuild the reconstructible synced read cache, preserving the overlay and\n * mutation journal (ADR-0006). The next sync refills it. Use to recover from a corrupt or\n * stale read cache without losing un-flushed writes. Runs under the single lifecycle slot\n * (ADR-0035 decision 4) — it drops and rebuilds the synced tables, so an export must not capture a\n * half-rebuilt cache; a concurrent export (or `destroy`/`discardEphemeral`) rejects with a\n * {@link LifecycleBusyError}.\n */\n dropReadCache: () => Promise<void>;\n flush: (table?: SyncTableName<TRegistry>) => Promise<void>;\n reconcile: (table?: SyncTableName<TRegistry>) => Promise<void>;\n retryFailed: (table?: SyncTableName<TRegistry>) => Promise<void>;\n recoverSending: (table?: SyncTableName<TRegistry>) => Promise<void>;\n readMutationDetails: (table?: SyncTableName<TRegistry>) => Promise<MutationDetail[]>;\n mutate: {\n create: <TKey extends SyncTableName<TRegistry>>(\n table: TKey,\n input: SyncTableCreateInput<TRegistry, TKey>,\n ) => Promise<void>;\n update: <TKey extends SyncTableName<TRegistry>>(\n table: TKey,\n entityKey: Record<string, string>,\n patch: SyncTableUpdateInput<TRegistry, TKey>,\n ) => Promise<void>;\n delete: <TKey extends SyncTableName<TRegistry>>(table: TKey, entityKey: Record<string, string>) => Promise<void>;\n batch: (items: ReadonlyArray<MutationBatchItem<TRegistry>>) => Promise<void>;\n };\n /**\n * Discard a `conflicted` entity (ADR-0015): clear its conflicted journal entry and kept optimistic\n * Overlay, so the Read model falls back to the synced (server) value. Use when the user abandons a\n * stale edit instead of resolving it as a new write.\n */\n discardConflict: <TKey extends SyncTableName<TRegistry>>(\n table: TKey,\n entityKey: Record<string, string>,\n ) => Promise<void>;\n /**\n * Discard a `quarantined` entity (ADR-0006): clear its quarantined journal entry and kept optimistic\n * Overlay, so the Read model falls back to the synced (server) value. The rollback path for a write\n * the server permanently rejected — e.g. an RLS policy denial (42501) routed to quarantine. After the\n * discard the phantom optimistic row is gone and the entity accepts new mutations again (no longer\n * blocked behind the quarantined head). Symmetric to {@link SyncClient.discardConflict}; the overlay\n * is kept when another still-owed write depends on it. No-op for an entity with no quarantined entry.\n */\n discardQuarantined: <TKey extends SyncTableName<TRegistry>>(\n table: TKey,\n entityKey: Record<string, string>,\n ) => Promise<void>;\n diagnostics: (table?: SyncTableName<TRegistry>) => Promise<{ mutation: MutationDiagnostics }>;\n /**\n * The registry-wide reactive mutation-status surface: a global per-status summary and a\n * filtered normalized detail list over EVERY writable journal, each available one-shot or as a live\n * subscription. Identical on the in-process and worker-attached client. Render a global sync indicator with\n * ONE `subscribeSummary` instead of one journal live query per writable table; consumers never touch the\n * generated journal relation names. See {@link MutationsApi}.\n */\n mutations: MutationsApi<TRegistry>;\n /**\n * The INSPECTION read surface (debug pages, REPLs, ad-hoc counts) — identical on the in-process and\n * worker-attached client (on the latter the statement runs in the worker). The statement runs raw\n * against the local store: it BYPASSES the mutation journal and optimistic overlay, and any write it\n * issues stays local and will NOT converge. For app data reads prefer the live-rows hooks /\n * {@link subscribeLiveRows} (or the guarded {@link query} family); reach for this only to look at the\n * store, not to read app state or mutate it.\n */\n rawQuery: (sql: string, params?: unknown[], options?: RawQueryOptions) => Promise<Results>;\n /** {@link rawQuery} for multi-statement SQL, returning one {@link Results} per statement. */\n rawExec: (sql: string, options?: RawQueryOptions) => Promise<Results[]>;\n /**\n * @internal The worker host's guarded one-shot read seam (ADR-0032 decision 4): {@link rawQuery} PLUS the\n * ADR-0041 read gate and the ADR-0021 lazy-group guard, sharing one gate+guard core with the in-process\n * `query`/`queryRaw` builder path so the two entry points can never drift on guard semantics.\n * `defineSyncWorker` dispatches the `guardedQuery` RpcOp to this on its owned in-process client; the attach\n * client's Drizzle-over-bridge compiles the SQL on the tab and routes the read here so the guard runs\n * worker-side. Accepts the full PGlite {@link QueryOptions} (the worker re-applies drizzle's identity\n * parsers here — temporal OIDs + numeric[]) plus the raw-fragment `use` list. NOT part of the app-facing\n * read surface — reach for {@link query} / {@link queryRaw} instead; kept `@internal` (above) and excluded\n * from the generated API docs (typedoc excludeInternal).\n */\n guardedRawQuery: (\n sql: string,\n params?: unknown[],\n options?: QueryOptions,\n use?: readonly SyncTableName<TRegistry>[],\n ) => Promise<Results>;\n /**\n * Run a one-shot (non-live) typed **pure-Drizzle** query with the lazy-relation safety net (ADR-0021).\n * Pass the builder callback directly — pgxsinkit scans the compiled SQL and activates + awaits every\n * lazy relation it reads (FROM, JOIN, subquery, WHERE) before it runs, and the tripwire rejects any\n * lazy relation the SQL still references but that is not active, so the result is never silently\n * empty/stale. The guaranteed-safe alternative to a bare `client.drizzle` read. If the builder embeds\n * a raw `sql` template fragment, use {@link queryRaw} and declare the lazy relations in `use`.\n */\n query: <TRows extends readonly unknown[]>(build: GuardedQueryFn<TRegistry, TRows>) => Promise<TRows>;\n /** {@link query} returning the first row, or null when empty. */\n queryRow: <TRows extends readonly unknown[]>(\n build: GuardedQueryFn<TRegistry, TRows>,\n ) => Promise<TRows[number] | null>;\n /**\n * {@link query} for a builder that embeds a raw `sql` template fragment (ADR-0021). The compiled-SQL\n * scan can miss a lazy relation named as a bare/unquoted identifier inside raw SQL, so declare those\n * in `use` — they are activated and awaited before the query runs. Pure-Drizzle reads should use\n * {@link query} instead (no `use` needed).\n */\n queryRaw: <TRows extends readonly unknown[]>(spec: GuardedRawQuerySpec<TRegistry, TRows>) => Promise<TRows>;\n /** {@link queryRaw} returning the first row, or null when empty. */\n queryRawRow: <TRows extends readonly unknown[]>(\n spec: GuardedRawQuerySpec<TRegistry, TRows>,\n ) => Promise<TRows[number] | null>;\n /**\n * Activate one or more lazy relations (ADR-0021): open their consistency-group subscription if held\n * out of the eager boot, resolving once each group's STREAM IS STARTED — reads are then tripwire-safe,\n * but the initial catch-up may still be in flight (local rows can be legitimately empty/stale until it\n * lands; await {@link groupReady} per relation for catch-up completion — deliberately separate so an\n * offline client still reads its persisted local rows instead of hanging on the network). Idempotent —\n * eager or already-started relations resolve immediately. Use to pre-activate before a\n * raw/`client.drizzle` read, or as the manual escape hatch the tripwire points to.\n */\n ensureSynced: (keys: readonly SyncTableName<TRegistry>[]) => Promise<void>;\n /**\n * Whether a relation's group has started and hydrated (ADR-0021). False for a still-dormant `lazy`\n * relation; true for eager relations once boot completes (and always when sync is disabled).\n */\n isSynced: (key: SyncTableName<TRegistry>) => boolean;\n /**\n * Revert a `lazy` relation to dormant (ADR-0021 §2) — the inverse of on-demand activation: stop its\n * consistency group's stream, clear any persisted `lazy + persistent` activation (so the next boot\n * holds it dormant again), and clean-truncate its local read cache. A later reference re-activates it\n * from scratch. Refuses when the relation is `eager` (always-on, would immediately re-sync) or owes\n * the server unsettled writes (the truncate would drop them — flush or discard first). The reclaim\n * primitive a host wires to navigation/idle for a rarely-opened lazy view; for an `ephemeral`\n * relation, idle-eviction is otherwise automatic at session end.\n */\n desync: (key: SyncTableName<TRegistry>) => Promise<void>;\n /**\n * Drop an **ephemeral** relation's local rows and revert it to dormant (ADR-0021) — the narrow,\n * scoped twin of {@link desync}. It runs the identical group-teardown machinery (stop the group stream,\n * clear the persisted lazy activation, reset the persisted subscription, clean-truncate every member),\n * but under a STRICTER gate: EVERY member of the relation's consistency group must be `retention:\n * \"ephemeral\"` — it refuses (naming the offender) if any member is persistent. Where a `desync` from one\n * tab reverts the shared group for every attached tab (the SharedWorker footgun), `discardEphemeral` is\n * safe under multi-tab because an ephemeral window is per-delivery-session and inherently single-consumer\n * — nothing durable, and no other tab, depends on it. Refuses an `eager` relation (always-on, would\n * immediately re-sync) and a group that owes the server unsettled writes, exactly as `desync` does. The\n * finalize primitive for a secure-delivery window: drop the local rows at session end without touching a\n * durable relation. Note the drop is local-lifecycle only: a later re-subscription re-activates the lazy\n * group and re-streams whatever the SERVER still serves — post-finalize non-redelivery is the server\n * gate's guarantee (e.g. a consumed server-owned cursor), not this method's. Runs under the single\n * lifecycle slot (ADR-0035 decision 4): a concurrent export (or `destroy`/`dropReadCache`) rejects with a\n * {@link LifecycleBusyError} rather than interleaving the cache truncate with a running export.\n */\n discardEphemeral: (key: SyncTableName<TRegistry>) => Promise<void>;\n /**\n * The read-path safety seam (ADR-0021): scan the compiled `sql` for the lazy relations it reads\n * (∪ the optional `use`) and activate them — so a lazy relation auto-activates on *any* reference\n * (FROM, JOIN, subquery, WHERE). Resolves once it is safe to run the query (streams started, tripwire\n * satisfied) and returns the activated keys ({@link PreparedQueryResult}) so a consumer can further\n * await {@link groupReady} per key for catch-up completion — the React hooks drive `hydrating` off\n * exactly that. A backstop throws {@link LazyRelationNotActivatedError} only if a referenced relation\n * could not be activated. Exposed for the React live hooks (which own their query build);\n * `query`/`queryRow` are the higher-level non-live wrappers. Raw, non-Drizzle SQL is out of scope —\n * pass `use`, or `ensureSynced` first.\n */\n prepareQuery: (input: PrepareQueryInput<TRegistry>) => Promise<PreparedQueryResult<SyncTableName<TRegistry>>>;\n /**\n * Author an atomic write-**unit** (ADR-0022 §2). The callback receives collecting table handles; every\n * mutation it issues is tagged into one unit and enqueued atomically when the callback returns.\n *\n * - `mode: \"pessimistic\"` — **server-authoritative**: the unit flush-routes to the authoritative endpoint\n * and this call resolves only once the server has decided. The result's `acks` carry each member's\n * outcome — `acked`, `conflicted` (overlay kept, ADR-0015), or `rejected` (overlay auto-discarded for\n * the whole unit, surfaced via `onReject`, ADR-0022 §4). Throws on transport failure (overlay kept). A\n * pessimistic block may also issue {@link SyncTransactionTableHandle.updateBlind} — an update-by-key with\n * no local base row and no overlay, for a write target excluded from the actor's read shape.\n * - `mode: \"optimistic\"` — an atomic batch enqueue that flushes in the background (empty `acks`).\n */\n transaction: (\n options: { mode: WriteMode },\n run: (tx: SyncTransaction<TRegistry>) => void | Promise<void>,\n ) => Promise<SyncTransactionResult>;\n /**\n * Per-group readiness (ADR-0032 decision 6): a promise resolving the moment the given table's\n * consistency group is up-to-date. Resolves immediately for an already-ready (or sync-disabled)\n * group; stays pending for a still-dormant `lazy` relation until it is activated and caught up. The\n * opt-in progressive-paint signal beside the all-eager-groups `ready` gate. `status.groups` carries the\n * same readiness as a synchronous snapshot.\n */\n groupReady: (table: SyncTableName<TRegistry>) => Promise<void>;\n /**\n * The referenced consistency groups' member tables that are NOT YET caught up at call time (ADR-0021 /\n * ADR-0032 decision 6): scan the compiled SQL for every synced relation the query reads (∪ `use`), map\n * each to its consistency group, and return those whose group has not completed its initial catch-up.\n * Empty when sync is disabled OR every referenced group is already ready — the steady-state fast path in\n * which the live-rows seam builds no `hydrated` promise. The seam (and the worker bridge) use this to gate\n * `hydrating` uniformly across eager AND lazy groups; ACTIVATION is separate and stays lazy-only. Returns\n * plain table-name strings (not `keyof TRegistry`) to keep the client covariant in its registry.\n */\n hydratingTablesFor: (query: { sql: string; use?: readonly string[] }) => readonly string[];\n /**\n * The live-rows seam (ADR-0032 S2 §4): register a reactive query and receive its initial ordered\n * snapshot plus subsequent updates via `onRows`. The React live hooks consume THIS (not `pglite.live`\n * directly), so they run unchanged against both the in-process client (which implements it over\n * `pglite.live`) and the worker-attached client (which implements it over the bridge). Prefer the\n * higher-level `@pgxsinkit/react` hooks; this is the lower-level primitive they build on.\n */\n subscribeLiveRows: <TRow extends Record<string, unknown> = Record<string, unknown>>(\n input: SubscribeLiveRowsInput,\n onRows: (rows: TRow[]) => void,\n ) => Promise<LiveRowsSubscription<TRow>>;\n /**\n * Boot observability (ADR-0034): the engine's most recent COMPLETED boot report, or `null` before the\n * first boot finalizes (and after a `stop()`/`destroy()` that preceded initial sync). Pull — so a\n * late-attaching tab can read a boot that predates it; in worker mode it round-trips to the worker's\n * stored report. The push counterpart is the `onBootReport` client option.\n */\n bootReport: () => Promise<BootReport | null>;\n /**\n * Live-query diagnostics (ADR-0040 decision 5): a point-in-time snapshot of the live-query manager's\n * entries — opaque fingerprint digests plus counts/timings only, NEVER SQL, params, or row values. Both\n * client forms return the real snapshot: in WORKER mode this pulls the worker manager's snapshot over the\n * bridge; the IN-PROCESS client returns its own manager's snapshot directly.\n */\n liveQueryDiagnostics: () => Promise<LiveQueryDiagnostics[]>;\n /**\n * Take a **store backup** (ADR-0035): a full-fidelity, PGlite-restorable tarball of the whole local\n * store — synced cache, Overlay, and Mutation journal (unflushed writes included) — via PGlite's\n * `dumpDataDir`. Taken LIVE (a `CHECKPOINT` serialised behind engine work, then the dump; no engine\n * suspension, no tab disruption), so it never blocks and is the only lossless export an offline device\n * with unflushed writes can take. Awaits engine-ready rather than rejecting during boot, then runs under\n * the single lifecycle slot: a second export (or, later, `destroy`/`discardEphemeral`) attempted while\n * one is in flight rejects immediately with a {@link LifecycleBusyError} — retry once it settles.\n * Resolves to the artefact `File` plus an {@link ExportReport} (phase timings + a diagnostics snapshot).\n */\n exportStore: (options?: StoreExportOptions) => Promise<StoreExportResult>;\n /**\n * Take a **diagnostic dump** (ADR-0035): human-readable SQL of EVERYTHING the store holds — synced tables,\n * the `_overlay`/`_mutations` journal (unflushed writes included — the evidence a diagnostic exists for),\n * the `pgxsinkit` metadata schema, the read-model views, and the reconcile functions/triggers — via\n * `pg_dump`. To keep `pg_dump`'s `DEALLOCATE ALL` away from the live engine, the dump runs against a\n * memory-backed THROWAWAY clone booted from a live datadir dump (ADR-0035 addendum): the running store is\n * never suspended and no tab is disrupted. Awaits engine-ready rather than rejecting during boot, then\n * runs under the single lifecycle slot — a concurrent export (or `destroy`/`discardEphemeral`) rejects\n * immediately with a {@link LifecycleBusyError}. Resolves to the SQL `File` (`application/sql`) plus a\n * {@link DiagnosticDumpReport} (phase timings + a diagnostics snapshot). Active ephemeral (`pg_temp`)\n * clusters are absent by construction (ADR-0035 decision 5 — `pg_dump` ignores temp objects).\n */\n exportDiagnostics: (options?: DiagnosticExportOptions) => Promise<DiagnosticExportResult>;\n /**\n * Take a **data export** (ADR-0035): the PORTABLE artefact — the synced tables and the enum types they\n * depend on, schema + data, nothing of pgxsinkit's machinery — as SQL loadable into a vanilla Postgres. It\n * is a generated enum DDL header concatenated ahead of `pg_dump -t <table> ... --no-owner` (one `-t` per\n * physical synced table; ephemeral/read-projection entries excluded by construction), run against the same\n * memory-backed THROWAWAY clone the diagnostic dump uses — so the live engine is never touched.\n *\n * Unlike the other two exports it GUARDS the journal (decision 3): a strict export requires a DRAINED\n * journal — all mutation counts zero, including `acked` writes whose synced echo has not landed (they live\n * only in the Overlay). The drain flushes drainable rows and awaits convergence up to\n * `drainJournal.timeoutMs` (default `15_000`); non-drainable states (`failed`/`quarantined`/`conflicted`)\n * fail FAST with a {@link DataExportDrainError} carrying the diagnostics. `drainJournal: false` is the\n * escape hatch — export synced state as-is (unflushed writes absent; `report.escapeHatch` records it). An\n * offline device with a clean journal exports strictly and instantly; one with a dirty journal cannot\n * produce a strict export (its lossless option is `exportStore`).\n *\n * Awaits engine-ready rather than rejecting during boot, then runs the whole drain+dump under the single\n * lifecycle slot — a concurrent export (or `destroy`/`discardEphemeral`) rejects with a\n * {@link LifecycleBusyError}. Resolves to the SQL `File` (`application/sql`) plus a {@link DataExportReport}\n * (drain + clone-pipeline phase timings, the applied `-t` table list, and the escape-hatch flag).\n */\n exportData: (options?: DataExportOptions) => Promise<DataExportResult>;\n}\n\nexport type { MutationBatchItem, MutationDetail, MutationDiagnostics, MutationKind, MutationSummary };\n\n/**\n * The structured-clone-safe subset of PGlite's `QueryOptions` the inspection surface carries. Kept\n * narrow ON PURPOSE: on a worker-attached client the options object crosses the bridge via\n * `postMessage`, so function-valued options (`parsers`, `serializers`, `onNotice`) can never be part\n * of this contract. `rowMode: \"array\"` is what `@electric-sql/pglite-repl` asks for on every exec.\n */\nexport interface RawQueryOptions {\n rowMode?: \"object\" | \"array\";\n}\n\n/** The `{ query, exec }` duck `@electric-sql/pglite-repl` drives, backed by a client's inspection surface. */\nexport interface ReplInspectionSurface {\n query: (sql: string, params?: unknown[], options?: RawQueryOptions) => Promise<Results>;\n exec: (sql: string, options?: RawQueryOptions) => Promise<Results[]>;\n}\n\n/**\n * Shape a {@link SyncClient}'s inspection surface (`rawQuery`/`rawExec`) as the `{ query, exec }` duck\n * `@electric-sql/pglite-repl` needs. Identical on the in-process and worker-attached client — on the latter\n * each statement routes through the worker bridge, so the REPL works even though `client.pglite` is\n * unavailable. Cast the result at the `<Repl pg={...}>` prop (the REPL types the prop as a full `PGlite`).\n * The surface is registry-independent, so it accepts any client's `rawQuery`/`rawExec` pair.\n */\nexport function replAdapter(\n client: Pick<SyncClient<SyncTableRegistry>, \"rawQuery\" | \"rawExec\">,\n): ReplInspectionSurface {\n return {\n // Thread the options through UNMODIFIED — the REPL execs with `{ rowMode: \"array\" }` and renders\n // each row with `row.map`, so dropping the options here breaks every REPL statement.\n query: (sql, params, options) => client.rawQuery(sql, params, options),\n exec: (sql, options) => client.rawExec(sql, options),\n };\n}\n\nexport async function createSyncClient<const TRegistry extends SyncTableRegistry>(\n options: CreateSyncClientOptions<TRegistry>,\n): Promise<SyncClient<TRegistry>> {\n // The outer adoption transition owns the durable `adopting` phase and final commitment barrier. Its inner\n // candidate boot must mint only candidate bytes; re-entering the ordinary phase machine would classify the\n // live `adopting` record as crash recovery and tear the candidate down underneath itself.\n const adoptionCandidateBuild =\n (options as CreateSyncClientOptions<TRegistry> & AdoptionCandidateBuildOptions)[ADOPTION_CANDIDATE_BUILD] === true;\n const createPglite =\n (options as CreateSyncClientOptions<TRegistry> & InternalPgliteCreateOptions)[INTERNAL_PGLITE_CREATE] ??\n createClientPGlite;\n // Fail fast on a bad keep-alive policy — before any PGlite boot work (ADR-0040 decision 4 — bounded).\n validateLiveQueryPolicy(options.liveQueries);\n const status: SyncRuntimeStatus = {\n phase: \"booting\",\n isRunning: false,\n };\n\n let resolveReady!: () => void;\n let rejectReady!: (error: unknown) => void;\n const ready = new Promise<void>((resolve, reject) => {\n resolveReady = resolve;\n rejectReady = reject;\n });\n\n // Staged boot readiness (ADR-0041). Three monotonic, idempotent stages resolved as the boot crosses them:\n // - `localReadReady`: local-read core done (schema + registry reconcile + drizzle facade) — zero network.\n // - `writeReady`: mutation runtime + boot recovery (+ restore quarantine) done — enqueue is safe.\n // - `bootSettled`: today's full resolution point (sync START done). The worker bridge awaits it (stage 1).\n // Under the Option B contract this function RESOLVES at `localReadReady` and runs the write/sync tail in the\n // background, so a returning offline consumer gets a readable client without waiting on the network. Each\n // stage's rejection is guarded (below) so an unconsumed stage never surfaces as an unhandled rejection —\n // real awaiters still observe the failure.\n // `localReadReady` has no reject binding: a local-read-core failure throws straight out of this async\n // function (so the returned promise rejects, exactly as a pre-ADR-0041 boot failure did) before the client\n // is handed out, leaving `localReadReady` pending on a store nobody holds — no awaiter, no leak.\n let resolveLocalReadReady!: () => void;\n const localReadReady = new Promise<void>((resolve) => {\n resolveLocalReadReady = resolve;\n });\n let resolveWriteReady!: () => void;\n let rejectWriteReady!: (error: unknown) => void;\n const writeReady = new Promise<void>((resolve, reject) => {\n resolveWriteReady = resolve;\n rejectWriteReady = reject;\n });\n let resolveBootSettled!: () => void;\n let rejectBootSettled!: (error: unknown) => void;\n const bootSettled = new Promise<void>((resolve, reject) => {\n resolveBootSettled = resolve;\n rejectBootSettled = reject;\n });\n\n if (options.pgliteInstance && options.precreatedPglite) {\n throw new Error(\n \"createSyncClient: pass at most one of `pgliteInstance` or `precreatedPglite` — they claim different ownership of the post-create boot steps (schema exec, prepare hooks, and registry reconciliation).\",\n );\n }\n\n // Restore (ADR-0035 decision 6) owns the store's CREATION — the backup tarball is a `loadDataDir` seed on\n // the fresh store — so it cannot coexist with a caller-supplied instance (which claims the store already\n // exists and is provisioned). Fail loudly rather than silently ignore one.\n const restoreBoot = options.restoreFrom != null;\n if (restoreBoot && (options.pgliteInstance || options.precreatedPglite)) {\n throw new Error(\n \"createSyncClient: `restoreFrom` is mutually exclusive with `pgliteInstance` / `precreatedPglite` — restore boots a brand-new store from the backup (a create-time `loadDataDir` seed), so it cannot adopt a caller-owned instance. Drop the instance option, or drop `restoreFrom` (ADR-0035).\",\n );\n }\n\n // Restore boots start offline and DEFER the sync-enable decision until AFTER journal recovery (ADR-0046,\n // refining ADR-0035 decision 6): a restore comes online iff recovery found NOTHING to quarantine — an empty\n // recovered journal, the guaranteed-clean server-built bootstrap-artifact case — and stays offline (today's\n // behaviour) when recovered mutations were quarantined, because a replayed write is unsafe without a dedupe\n // ledger. The decision is taken in the restore recovery block below (it needs the quarantine count) and\n // honours an explicit `syncEnabled: false`. A normal boot resolves its final value here, up front.\n let syncEnabled = restoreBoot ? false : (options.syncEnabled ?? true);\n // ADR-0032 S4 overlap flag. A restore starts `syncEnabled: false` here, so it never takes the overlap\n // prefetch path (a restore also never presents a fresh spare store); the flag stays `false` for the whole\n // boot even when the restore later comes online (which uses the sequential sync-start path, not overlap).\n const overlapPrefetch = syncEnabled && options.freshStore === true && !options.pgliteInstance;\n // How the store presents at boot (ADR-0034 `storeKind`): a restore boot seeds a brand-new store from a\n // backup; otherwise the caller's fresh-store hint (the same signal as `freshStore`) marks a fresh spare;\n // everything else is a warm (existing persisted) store. Restore wins — a restore boot is never \"fresh\".\n const storeKind: BootReport[\"storeKind\"] = restoreBoot ? \"restored\" : options.freshStore === true ? \"fresh\" : \"warm\";\n\n // Engine home for the report (ADR-0049 decision 12): the in-process client is always `\"in-process\"`; a worker\n // boot carries the placement `engineHome` the worker threaded in (`\"shared-worker\"` / `\"elected-worker\"`), or\n // omits it (undefined) when that scope never ran the placement probe (a dedicated elected-engine worker).\n const bootMode: BootReport[\"mode\"] = options.bootMode ?? \"in-process\";\n const engineHome: BootReport[\"engineHome\"] | undefined = bootMode === \"worker\" ? options.engineHome : \"in-process\";\n\n // Boot observability (ADR-0034): build a structured report across the boot, finalized once at initial\n // sync. Created FIRST so its monotonic anchor precedes every timed phase (including the PGlite create).\n const bootReportBuilder: BootReportBuilder = createBootReportBuilder({\n mode: bootMode,\n freshStore: options.freshStore === true,\n storeKind,\n ...(engineHome != null ? { engineHome } : {}),\n overlapPrefetch,\n registryFingerprint: fingerprintRegistry(options.registry),\n });\n // The single engine lifecycle slot (ADR-0035 decision 4). The three exports plus the destructive\n // lifecycle ops — `destroy()`, `discardEphemeral()`, and `dropReadCache()` — all serialise through it,\n // so a wipe/rebuild can never interleave a running export (nor vice versa): the slot rejects the second\n // entrant with a typed LifecycleBusyError in either direction.\n const lifecycleSlot = createLifecycleSlot();\n\n let finalizedBootReport: BootReport | null = null;\n const finalizeBootReport = () => {\n if (finalizedBootReport) return;\n finalizedBootReport = bootReportBuilder.finalize();\n options.onBootReport?.(finalizedBootReport);\n };\n\n // The testing marker (ADR-0036 decision 3), read once off the options object: `\"memory\"` selects the\n // memory backend for a client-owned create AND acknowledges the BYO seam; `\"acknowledged\"` only unlocks\n // the BYO refusal. Absent for every production consumer — the marker rides in only via\n // `@pgxsinkit/client/testing`, never named in a public type.\n const testStoreMarker = readTestStoreMarker(options);\n const backendOverride = testStoreMarker === \"memory\" ? (\"memory\" as const) : undefined;\n\n // Bind the create options once for the two client-owned create paths (fresh `storePath`, and the\n // `precreatedPglite` reject-fallback), so both consume the same pre-warm + resolve the same backend.\n // ADR-0049 step 11b: the OPFS-home grant the client-owned mint opens under. Starts at the placement probe's\n // value and is ADJUSTED DOWN to `false` by a deferred/failed adoption (the idb store stays authoritative), or\n // kept `true` when adoption commits the opfs successor (the mint opens the now-committed store). Read at mint\n // time by `timedCreate` below, so the adoption block can settle it before the create runs.\n let bootHasOpfsSyncAccess = options.hasOpfsSyncAccess === true;\n // ADR-0049 step 11c: set by the pre-mint fresh-boot phase machine when it stands up an UNCOMMITTED opfs\n // candidate (virgin/restore) that the shared commitment barrier must promote BEFORE exposure. Read at the\n // local-init milestone below, so a fresh/restore boot commits (strictSync → sentinel → opfs-committed) before\n // `localReadReady` resolves and the client is handed out (invariant 3 — commitment precedes exposure).\n let commitmentBarrierPending = false;\n // ADR-0049 decision 12 `storageFallbackReason`: the verbatim reason an opfs-CAPABLE boot (the probe granted)\n // nonetheless opened idb. `probeGranted` is the entering grant; a fallback is `probeGranted && !bootHasOpfs...`\n // once the adoption + fresh phase machine has settled (never on a plain idb boot, where `probeGranted` is false).\n const probeGranted = options.hasOpfsSyncAccess === true;\n let storageFallbackReason: string | undefined;\n // Durability (ADR-0047 D2 + ADR-0050): resolve the store's declared mode ONCE here — this is the single\n // resolution point — from the registry's static declaration folded with the worker-threaded wire\n // declaration (`options.storage`, the ADR-0050 internal carrier; absent for in-process consumers). An\n // explicit disagreement is a typed refusal (the worker handlers refuse conflicts before this throws).\n // The resolved mode threads into every client-owned mint (its own boot create and the precreated-reject\n // fallback) via the internal carrier on `createClientPGlite`; no open site takes a durability option, so\n // no mint can contradict the data contract.\n const resolvedDurability: StorageDurability = resolveStorageDeclaration(\n getSyncRegistryStorage(options.registry),\n options.storage,\n ).durability;\n const createClientOptions: CreateClientPGliteOptions = {\n ...(options.pgliteBootAssets ? { bootAssets: options.pgliteBootAssets } : {}),\n ...(backendOverride ? { backendOverride } : {}),\n durability: resolvedDurability,\n // Restore (ADR-0035 decision 6): seed the fresh store from the backup via `loadDataDir`. Restore is\n // mutually exclusive with the BYO instance seams (checked above), so it only ever rides a client-owned\n // create — never the adopt paths, which leave `restoreFrom` unread.\n ...(restoreBoot ? { restoreFrom: options.restoreFrom } : {}),\n };\n const fallbackStorePath = options.storePath ?? \"pgxsinkit-overlay-v1\";\n let openedStorageBackend: NonNullable<BootReport[\"storageBackend\"]> | undefined;\n\n // Fresh-target gate (ADR-0035 decision 6): restore refuses a store that already exists — it boots a\n // brand-new store and never overlays a live one. Checked BEFORE the create so we never touch (let alone\n // half-write) an existing datadir. The memory test lane is fresh by construction, so the probe is a no-op.\n if (restoreBoot) {\n const targetExists = await storeTargetExists(\n fallbackStorePath,\n backendOverride,\n bootHasOpfsSyncAccess ? { hasIndexedDb: true, hasOpfsSyncAccess: true } : undefined,\n );\n if (targetExists) {\n throw new RestoreTargetExistsError(fallbackStorePath);\n }\n }\n // Time a client-owned `createClientPGlite` into `phases.pgliteCreateMs`; an ADOPTED store (spare or\n // caller-supplied) leaves it `null` (create ran elsewhere — see the provision block below).\n const timedCreate = async (): Promise<ClientPGlite> => {\n const startedAt = performance.now();\n // ADR-0049 step 10b/11b: the OPFS-home grant is spread in at MINT time (not baked into `createClientOptions`),\n // so a boot adoption that ran just above can settle `bootHasOpfsSyncAccess` first — opening the committed\n // opfs successor (adopted) or the idb store (adoption deferred/failed). Default absent keeps today's backend.\n // ADR-0049 decision 12: this is the SINGLE client-owned mint seam, so stamp `storageBackend` from the resolved\n // dataDir scheme here — the same resolution `createClientPGlite` performs, so the diagnostic never diverges\n // from the backend actually opened. Covers every client-owned mint (in-process, worker, precreated-fallback).\n const resolvedDataDir = bootHasOpfsSyncAccess\n ? resolveStoreDataDir(fallbackStorePath, backendOverride, { hasIndexedDb: true, hasOpfsSyncAccess: true })\n : resolveStoreDataDir(fallbackStorePath, backendOverride);\n const created = await createPglite(fallbackStorePath, {\n ...createClientOptions,\n ...(bootHasOpfsSyncAccess ? { hasOpfsSyncAccess: true } : {}),\n });\n // ADR-0049 decision 12: stamp `storageBackend` only AFTER a SUCCESSFUL open (first-wins). A failed opfs open\n // — the virgin-uncreatable session idbfs fallback below re-mints on idb — therefore never stamps\n // `opfs-repacked`; the idb re-mint's `idbfs` is the one that lands, honestly reflecting the backend opened.\n const mintedBackend = storageBackendFromDataDir(resolvedDataDir);\n if (mintedBackend) {\n openedStorageBackend = mintedBackend;\n bootReportBuilder.setStorageBackend(mintedBackend);\n }\n bootReportBuilder.setPgliteCreateMs(performance.now() - startedAt);\n return created;\n };\n\n // ADR-0049 step 11b — AUTOMATIC adoption (declaration-gated, default off). Honoured ONLY on the client-owned\n // storePath create in a browser OPFS engine home (`bootHasOpfsSyncAccess`), never the BYO / restore paths: a\n // boot that finds an existing idb-authoritative store runs the pre-expose drain check, reconstructs the opfs\n // successor through the Adoption-bootstrap gate, commits it, and deletes the idb predecessor. Any deferral or\n // failure leaves the idb store authoritative — `bootHasOpfsSyncAccess` is flipped to false so the mint opens\n // idb. Runs before the create, so `timedCreate` opens whichever backend the transition settled on.\n const runBootAdoptionIfDeclared = async (): Promise<void> => {\n if (!bootHasOpfsSyncAccess || options.adoption !== \"server-reconstructible\" || restoreBoot) return;\n const { bootHasOpfs, outcome } = await runBootAdoption(fallbackStorePath, options.adoption, {\n registry: options.registry,\n electricUrl: options.electricUrl,\n batchWriteUrl: options.batchWriteUrl,\n ...(options.getAuthToken ? { getAuthToken: options.getAuthToken } : {}),\n ...(options.requestHeaders ? { requestHeaders: options.requestHeaders } : {}),\n syncEnabled: options.syncEnabled ?? true,\n });\n bootHasOpfsSyncAccess = bootHasOpfs;\n // ADR-0049 decision 12: a declared adoption that DEFERRED/FAILED left idb authoritative — an opfs-capable boot\n // that opened idb. Record the verbatim reason (the outcome's own classification) as the fallback reason.\n if (!bootHasOpfs && outcome && outcome.adopted === false) {\n storageFallbackReason = `adoption deferred (${outcome.reason})`;\n }\n };\n\n // Refuse a caller-owned instance that is PROVABLY non-persistent (ADR-0036 decision 4), unless a testing\n // acknowledgment is present. `classifyNonPersistentDataDir` inspects the instance's own dataDir (the\n // `ClientPGlite` interface hides it, so via a narrow cast) — the two provably-non-persistent shapes are\n // an undefined dataDir (PGlite's in-memory default) and an explicit memory store. Checked AFTER a\n // successful resolution of the BYO promise, so the refusal PROPAGATES rather than being swallowed by the\n // `precreatedPglite` reject-fallback below (which only catches a create that never produced a store).\n const refuseIfNonPersistent = (instance: ClientPGlite): void => {\n if (testStoreMarker !== undefined) return; // a deliberate test store — acknowledged.\n // An opfs-repacked instance is PROVABLY persistent (a dedicated OPFS directory) yet reports no `dataDir`\n // (custom VFS), so honour its brand before the dataDir classification — otherwise adopting a provisioned\n // opfs store (provision-then-attach, ADR-0049) would be wrongly refused as an in-memory default.\n if ((instance as Record<symbol, unknown>)[OPFS_REPACKED_PERSISTENT] === true) return;\n const observedDataDir = (instance as { dataDir?: string }).dataDir;\n // The two provably-non-persistent shapes: an undefined dataDir (a raw `new PGlite()` in-memory default)\n // and a `memory://` store. Every store the funnel mints carries a real `idb://`/`file://` dataDir string.\n const observed = classifyNonPersistentDataDir(observedDataDir);\n if (observed !== null) throw new NonPersistentStoreError(observed);\n };\n\n // The complete client-owned open path. Both an ordinary `storePath` boot and a rejected precreated\n // accelerator MUST enter here: recovery/adoption/classification precede every persistent mint. Keeping the\n // flow in one closure prevents a rejected eager create from bypassing live `deleting` authority or the OPFS\n // commitment phase machine by jumping straight to `timedCreate()`.\n const openOwnedStore = async (): Promise<ClientPGlite> => {\n // A capability-denied browser may inherit an interrupted destroy from an earlier granted engine home.\n // Resolve that authority before any replacement IDB store is minted; ordinary denied boots with no\n // `deleting` record remain unchanged apart from the bounded meta read.\n if (!bootHasOpfsSyncAccess && backendOverride !== \"memory\") {\n await recoverDeniedBootDeletion(fallbackStorePath);\n }\n // ADR-0049 step 11b: run the declaration-gated automatic adoption BEFORE the client-owned mint, so the mint\n // opens the committed opfs successor (adopted) or the still-authoritative idb store (deferred/failed). This\n // COMPOSES with step 11c below: adoption (declared, on an existing idb store) settles `bootHasOpfsSyncAccess`\n // FIRST; only then does the fresh/restore phase machine run.\n if (!adoptionCandidateBuild) await runBootAdoptionIfDeclared();\n // ADR-0049 step 11c: when the opfs grant survives adoption, route the client-owned mint through the boot\n // PHASE MACHINE (invariants 3/12/14). A virgin/restore boot stands up an UNCOMMITTED opfs candidate (record\n // BEFORE directory) and flags the commitment barrier for the local-init milestone; a committed store resolves\n // `open-committed` (no re-run — composes with an adoption that just committed); a recordless idb store (adoption\n // not declared) downgrades to idb (never a fresh opfs mint over an existing idb store's data). A `false` grant (probe denied\n // OR adoption deferred/failed) SHORT-CIRCUITS — the idbfs home opens directly, without the opfs commitment phase machine.\n if (adoptionCandidateBuild) {\n // The predecessor remains authoritative and its journal was proven drained before the outer transition\n // entered `adopting`. Remove any sentinel-less residue from an earlier authorized destruction, then create\n // the directory the candidate factory will open. No meta write and no commitment here: the outer adoption\n // transition owns both.\n const opfs = createOpfsEffects(fallbackStorePath);\n await opfs.deleteSentinel();\n await opfs.deleteStoreDirectory();\n await opfs.getStoreDirectoryHandle();\n } else if (bootHasOpfsSyncAccess) {\n const fresh = await resolveFreshBoot(fallbackStorePath, bootHasOpfsSyncAccess, backendOverride);\n // ADR-0049 decision 12: the phase machine downgraded a granted opfs boot to idb (invariant 14 — an existing\n // idb store is opened in place, never overwritten by a fresh opfs mint). That is an opfs-capable-boot-on-idb\n // fallback; record its verbatim verdict as the reason (only when adoption did not already set one).\n if (!fresh.bootHasOpfs && storageFallbackReason == null) {\n storageFallbackReason = `recordless idb store opened in place (invariant 14; verdict ${fresh.verdict?.action ?? \"unknown\"})`;\n }\n bootHasOpfsSyncAccess = fresh.bootHasOpfs;\n commitmentBarrierPending = fresh.needsCommitmentBarrier;\n }\n // ADR-0049 D6 — the VIRGIN-UNCREATABLE session idbfs fallback (plan step 13 gap; fault row \"opfs uncreatable,\n // virgin → Session idbfs fallback after bounded retries, record written\"). A VIRGIN/candidate opfs boot\n // (`commitmentBarrierPending` true — phase opfs-candidate, NO sentinel ever published) that cannot OPEN the\n // opfs store after `openWithBoundedRetries` exhausts tears the never-committed candidate down and re-mints on\n // idbfs FOR THIS SESSION ({@link fallbackVirginCandidateToIdb}: record → idb-authoritative, directory\n // deleted). A COMMITTED store's open failure is HARD: `commitmentBarrierPending` is false for\n // `open-committed` / `repair-record-then-open-committed` (record committed OR sentinel present), so the catch\n // is not even entered and the failure propagates. The fallback is thus reachable ONLY on positive proof of\n // absence (the virgin/candidate path), never over a committed store.\n if (commitmentBarrierPending) {\n try {\n return await timedCreate();\n } catch (openError) {\n storageFallbackReason = await fallbackVirginCandidateToIdb(fallbackStorePath, openError);\n bootHasOpfsSyncAccess = false;\n commitmentBarrierPending = false;\n return timedCreate();\n }\n }\n return timedCreate();\n };\n\n let pglite: ClientPGlite;\n // Whether the boot adopted the caller's `precreatedPglite` (vs. falling back to a fresh create) — gates\n // whether the provision stamp is honoured (ADR-0034).\n let adoptedPrecreated = false;\n if (options.pgliteInstance) {\n // The caller created AND provisioned this store; the client runs NONE of the post-create boot steps\n // (schema, prepare hooks, and reconciliation) — see the `pgliteInstance` JSDoc. No create here →\n // `pgliteCreateMs` null.\n refuseIfNonPersistent(options.pgliteInstance);\n pglite = options.pgliteInstance;\n } else if (options.precreatedPglite) {\n // The caller created the raw store eagerly via `createClientPGlite`; the client still owns every\n // post-create step below. A REJECTED eager create must never fail the boot: fall back to the normal\n // `storePath` create, so the pattern stays a pure accelerator. Reify the promise's outcome first, THEN\n // branch — so the {@link NonPersistentStoreError} refusal runs on a SUCCESSFULLY resolved instance,\n // outside any catch, and PROPAGATES (never swallowed by the reject-fallback, which is only for a create\n // that never produced a store).\n const outcome = await options.precreatedPglite.then(\n (instance) => ({ ok: true as const, instance }),\n (error: unknown) => ({ ok: false as const, error }),\n );\n if (outcome.ok) {\n refuseIfNonPersistent(outcome.instance);\n pglite = outcome.instance;\n adoptedPrecreated = true;\n } else {\n syncDebug(\"boot precreated pglite rejected — falling back to storePath create\", {\n error: outcome.error instanceof Error ? outcome.error.message : String(outcome.error),\n });\n pglite = await openOwnedStore();\n }\n } else {\n pglite = await openOwnedStore();\n }\n // ADR-0049 decision 12: stamp the fallback reason once the mint's backend is settled. Guarded on `probeGranted`\n // (an opfs-capable boot) — a plain idb boot never enters the adoption/fresh phase machine, so it never sets one.\n if (probeGranted && !bootHasOpfsSyncAccess && backendOverride !== \"memory\" && storageFallbackReason != null) {\n bootReportBuilder.setStorageFallbackReason(storageFallbackReason);\n }\n // ADR-0049 D1/D12 capability-absence fallback: `defineSyncWorker`'s placement bootstrap opened the in-SW IDBFS\n // engine because OPFS was CAPABLE but no home could hold handles. That boot enters here with `hasOpfsSyncAccess`\n // FALSE (so the internal `probeGranted` guard above never fires), so stamp the externally-supplied reason here on\n // the idbfs mint. `setStorageFallbackReason` is first-wins, so an internal reason already set is never clobbered.\n if (options.storageFallbackReason != null && backendOverride !== \"memory\" && !bootHasOpfsSyncAccess) {\n bootReportBuilder.setStorageFallbackReason(options.storageFallbackReason);\n }\n // ADR-0049 decision 12: a BYO instance / adopted-precreated store was created OUTSIDE the mint seam, so derive\n // its `storageBackend` from the instance's own dataDir where recognisable; an opfs-repacked wrapper (or an\n // unknown scheme) leaves it omitted (`setStorageBackend` is first-wins, so a fallback-create is never clobbered).\n if (options.pgliteInstance != null || adoptedPrecreated) {\n const byoBackend = storageBackendFromDataDir((pglite as { dataDir?: string }).dataDir);\n if (byoBackend) {\n openedStorageBackend = byoBackend;\n bootReportBuilder.setStorageBackend(byoBackend);\n }\n }\n // ADR-0049 step 11b: register the client-owned store path in the live-store guard so the manual `adoptStore`\n // API refuses to migrate a store an open client already holds (`StoreInUseError`). BYO instances the caller\n // owns are not registered (the caller manages their lifecycle). Unregistered on `stop()`/`destroy()` below.\n const ownsStoreLifecycle = !options.pgliteInstance;\n if (ownsStoreLifecycle) liveStorePaths.add(fallbackStorePath);\n\n // Provision block (ADR-0034): when the boot adopted a pre-provisioned store and the provisioner stamped\n // its create timing, report the spare's initdb cost + how long it sat ready, and leave `pgliteCreateMs`\n // null (the create was paid at provision time, off this boot's clock).\n if (adoptedPrecreated && options.provisionStamp) {\n const stamp = await options.provisionStamp.catch(() => null);\n if (stamp) {\n bootReportBuilder.setProvision({\n initdbMs: stamp.initdbMs,\n provisionedMsBeforeBoot: Math.max(0, bootReportBuilder.bootStartPerf - stamp.provisionReadyAt),\n });\n }\n }\n\n // Attach the sync engine explicitly, over the already-created instance, on ALL three provenance paths\n // (pgliteInstance, precreatedPglite, storePath) — ADR-0032 S1. The engine is no longer a create-time\n // extension, so the raw store (a `createClientPGlite` mint, or a caller's own instance) carries no\n // `electric` namespace until this point; the property assignment gives `ClientPGlite` its exact former\n // structural shape (live + electric) so every `pglite.electric.…` call site is unchanged. It is attached\n // BEFORE the schema/prepare steps below so a `prepareLocalDbAfterSchema` hook sees the same `.electric` it did when\n // the extension provided it at create time. `engine.close` (the former extension close hook — abort every\n // shape stream) is kept private to this client and run explicitly by `stop`/`destroy` at the same moment\n // `pglite.close()` used to trigger it.\n const engine: SyncEngine = await createSyncEngine(pglite);\n (pglite as { electric: SyncEngine[\"namespace\"] }).electric = engine.namespace;\n\n // Whether the read path's first initial sync has completed, so a recovery from `auth-needed` returns to\n // the right steady-state phase (`ready` if already caught up, else `syncing`).\n let initialSyncCompleted = false;\n // Why the runtime is `degraded` (#4). A read-stream error degraded clears on the next successful batch; a\n // commit-failure degraded is sticky (a fetch can succeed while applies still fail), so a bare\n // `onSyncActivity` must not clear it.\n let degradedReason: \"stream\" | \"commit\" | null = null;\n\n // ─── Fresh-store prefetch overlap (ADR-0032 S4 / backlog-0003) ─────────────────────────────────────\n // On a PROVABLY-FRESH store (the caller's `freshStore` hint — a claimed schemaless spare) the shape\n // catch-up needs none of the local boot phases, so start it NOW and gate its commits on `dbReady`, which\n // we resolve once schema exec + journal recovery + registry reconciliation complete. The network then\n // overlaps those phases instead of running strictly after them. Gated to the schema-owning paths (the\n // `pgliteInstance` path runs no schema step, so it has nothing to hide); warm stores keep the exact\n // sequential path. See the `freshStore` option's JSDoc for who sets the hint (the board's claim path).\n // (`overlapPrefetch` is computed once up front — see the boot-report builder above.)\n let openDbGate: () => void = () => {};\n const dbReady = overlapPrefetch\n ? new Promise<void>((resolve) => {\n openDbGate = resolve;\n })\n : null;\n\n // The sync-start options, built once and used by BOTH the overlap early-start and the sequential start —\n // the only per-call difference is the promoted-lazy set (empty on a fresh store) and the overlap gate.\n const buildStartOptions = (promotedGroups: ReadonlySet<string>): Parameters<typeof startConfiguredSync>[1] => ({\n syncConfig: buildSyncConfigFromRegistry(options.registry, options.electricUrl),\n registry: options.registry,\n promotedGroups,\n ...(dbReady ? { dbReady } : {}),\n // Boot observability (ADR-0034): the collector opens a per-boot-group accumulator (rows/requests/fetch/\n // apply wall) for the eager + promoted groups; lazy on-demand starts get none, so they never enter the report.\n bootCollector: bootReportBuilder,\n // Persist a durable lazy group's activation on first on-demand start, so the next boot promotes it.\n onLazyActivated: (groupKey) => {\n void writeLazyGroupActivation(pglite, options.registry, groupKey);\n },\n // The read path resolves the token per request (ADR-0013), not frozen at boot — so a long-lived session\n // never wedges on JWT expiry. Read and write share one token lifecycle.\n ...(options.getAuthToken || options.requestHeaders\n ? {\n shapeHeaders: buildShapeHeaders({\n ...(options.getAuthToken ? { getAuthToken: options.getAuthToken } : {}),\n ...(options.requestHeaders ? { requestHeaders: options.requestHeaders } : {}),\n }),\n }\n : {}),\n ...(options.onTableInitialSync ? { onTableInitialSync: options.onTableInitialSync } : {}),\n // Per-group readiness (ADR-0032 decision 6): mirror each group's catch-up into `status.groups` and\n // re-emit, so an app can drive progressive per-group paint off `status` (and `client.groupReady`).\n onGroupReady: (groupKey) => {\n status.groups = { ...(status.groups ?? {}), [groupKey]: true };\n options.onStatusChange?.(status);\n },\n onInitialSync: () => {\n initialSyncCompleted = true;\n status.phase = \"ready\";\n options.onStatusChange?.(status);\n // Boot complete: the first initial sync landed and `ready` is about to resolve. One monotonic stamp\n // closes the boot rail opened by `boot pglite.create` (the stamp itself is the number).\n syncDebug(\"boot client ready\");\n // Boot observability (ADR-0034): finalize the report at exactly this moment — the `boot client ready`\n // rail line — and fire the one-shot `onBootReport` push. Idempotent, so the sync-disabled path's own\n // finalize below never double-fires it.\n finalizeBootReport();\n resolveReady();\n },\n onSyncError: (error) => {\n // A sync commit exhausted its retries (ADR-0009 decision 5): go degraded and surface it, rather than\n // letting the read cache silently diverge from the server. Sticky (see below).\n status.phase = \"degraded\";\n degradedReason = \"commit\";\n // The cause chain, not just the wrapper: a drizzle \"Failed query\" message hides the actual\n // database error (SQLSTATE, detail) on `.cause`.\n status.lastError = describeErrorChain(error);\n options.onStatusChange?.(status);\n options.onSyncError?.(error);\n },\n // #4: a terminal/transient NON-auth read-stream error → `degraded`, so the runtime never keeps reporting\n // healthy while the read stream has stalled. Does not override the more-actionable `auth-needed`, nor a\n // commit-failure degraded. Cleared on the next successful batch below.\n onReadStreamError: (error) => {\n // Never mask the more-actionable auth-needed, nor a sticky commit-failure degraded (its lastError is\n // the more serious signal — a stream blip must not overwrite it).\n if (status.phase === \"auth-needed\") return;\n if (status.phase === \"degraded\" && degradedReason === \"commit\") return;\n // Enter, or refresh, a stream-degraded status. Refreshing keeps `lastError` pointing at the most\n // recent stream fault (and re-emits) rather than freezing on the first one, so a stream that fails one\n // way then another reports the current cause (observability).\n status.phase = \"degraded\";\n degradedReason = \"stream\";\n status.lastError = describeErrorChain(error);\n options.onStatusChange?.(status);\n },\n // Clear a recoverable status (auth-needed, or a read-stream degraded) the moment a batch is delivered\n // again. A commit-failure degraded is NOT cleared here — a fetch can succeed while applies keep failing,\n // so only `onSyncError` clearing (a clean commit) would lift it.\n onSyncActivity: () => {\n if (status.phase === \"auth-needed\" || (status.phase === \"degraded\" && degradedReason === \"stream\")) {\n degradedReason = null;\n status.phase = initialSyncCompleted ? \"ready\" : \"syncing\";\n options.onStatusChange?.(status);\n }\n },\n // ADR-0013 Phase 3: surface a persistent read-path auth failure as a distinct `auth-needed` status (the\n // app prompts re-login) while the stream keeps retrying for a fresh token. Only wired when a token\n // provider exists — without one there is no auth lifecycle to track.\n ...(options.getAuthToken\n ? {\n onAuthError: () => {\n if (status.phase !== \"auth-needed\") {\n status.phase = \"auth-needed\";\n options.onStatusChange?.(status);\n }\n },\n }\n : {}),\n });\n\n // Overlap: kick the shape streams off BEFORE schema exec (they buffer catch-up into the memory inbox,\n // commits gated on `dbReady`). A fresh store has no persisted lazy activations and no subscriptions to\n // reset, so both DB reads the sequential path makes first are skipped here.\n let earlySync: ReturnType<typeof startConfiguredSync> | null = null;\n let earlySyncStartedAt = 0;\n if (overlapPrefetch) {\n status.isRunning = true;\n status.phase = \"syncing\";\n options.onStatusChange?.(status);\n earlySyncStartedAt = performance.now();\n earlySync = startConfiguredSync(\n pglite as unknown as Parameters<typeof startConfiguredSync>[0],\n buildStartOptions(new Set()),\n );\n }\n\n if (!options.pgliteInstance) {\n if (options.prepareLocalDbBeforeSchema) {\n const prepareBeforeSchema = options.prepareLocalDbBeforeSchema;\n await bootReportBuilder.phase(\"prepare\", \"boot prepare(before-schema)\", () => prepareBeforeSchema(pglite));\n }\n\n // Durable-schema fingerprint fast path. The whole block stays inside the\n // `schemaExec` phase so `schemaExecMs` remains comparable across the fast (skip) and full (replay) paths.\n await bootReportBuilder.phase(\"schemaExec\", \"boot local schema\", async () => {\n // (2) The minimal bootstrap first — one small crossing so the `local_schema_fingerprint` read/write\n // below has its `pgxsinkit_local_meta` table before the durable replay is decided.\n await pglite.exec(buildLocalMetaBootstrapSql(options.registry));\n\n // (3) Generate the durable SQL (JS-only) and hash it; compare with the stored fingerprint.\n const currentFingerprint = computeLocalSchemaFingerprint(options.registry);\n const storedFingerprint = await readStoredLocalSchemaFingerprint(pglite, options.registry);\n\n if (storedFingerprint === currentFingerprint) {\n // (4a) Match → SKIP the durable replay entirely; the persisted durable schema is already current.\n bootReportBuilder.setSchemaFastPath({ skipped: true, fingerprintMatch: true });\n } else {\n // (4b) Absent/mismatch → replay the durable schema, then stamp the fingerprint after success.\n await pglite.exec(generateDurableLocalSchemaSql(options.registry));\n await writeStoredLocalSchemaFingerprint(pglite, options.registry, currentFingerprint);\n bootReportBuilder.setSchemaFastPath({ skipped: false, fingerprintMatch: false });\n }\n\n // (5) ALWAYS apply the ephemeral schema (TEMP relations die with the old engine), skipping the\n // crossing when the registry declares no ephemeral entry (the generator returns \"\").\n const ephemeralSql = generateEphemeralLocalSchemaSql(options.registry);\n if (ephemeralSql.length > 0) {\n await pglite.exec(ephemeralSql);\n }\n });\n\n if (options.prepareLocalDbAfterSchema) {\n const prepareLocalDbAfterSchema = options.prepareLocalDbAfterSchema;\n await bootReportBuilder.phase(\"prepare\", \"boot prepare(local-db)\", () => prepareLocalDbAfterSchema(pglite));\n }\n }\n\n // The write path's headers are the shared base plus the write-only overrides (region/DB-affinity):\n // `{...requestHeaders, ...writeRequestHeaders}`. The read/shape path keeps `requestHeaders` alone\n // (below), so `writeRequestHeaders` never reach reads — the two ingress points pin independently.\n const writePathHeaders =\n options.requestHeaders || options.writeRequestHeaders\n ? { ...(options.requestHeaders ?? {}), ...(options.writeRequestHeaders ?? {}) }\n : undefined;\n\n // ADR-0039: an ordinary optimistic write activates its target's lazy consistency group (a write is a\n // reference, and a reference activates — the read path already does this). The runtime reports the\n // non-blind table keys per enqueue; this indirection is assigned once `ensureSynced`/`lazyGuardIndex`\n // exist below (a write never fires during boot, so it is a harmless no-op until then).\n let activateOrdinaryWriteTables: ((tables: readonly string[]) => void) | null = null;\n const mutationRuntime = createMutationRuntime({\n db: pglite,\n registry: options.registry,\n batchWriteUrl: options.batchWriteUrl,\n // pgxsinkit owns the local schema (and the `pgxsinkit_local_meta` marker table) unless the caller\n // supplied their own PGlite — then the marker is never touched and recovery runs unconditionally.\n ownsMetaTable: !options.pgliteInstance,\n onOrdinaryEnqueue: (tables) => activateOrdinaryWriteTables?.(tables),\n ...(options.getAuthToken ? { getAuthToken: options.getAuthToken } : {}),\n ...(writePathHeaders ? { requestHeaders: writePathHeaders } : {}),\n ...(options.maxMutationAttempts != null ? { maxMutationAttempts: options.maxMutationAttempts } : {}),\n ...(options.onQuarantine ? { onQuarantine: options.onQuarantine } : {}),\n ...(options.onConflict ? { onConflict: options.onConflict } : {}),\n ...(options.onReject ? { onReject: options.onReject } : {}),\n });\n\n // Activation buffer (ADR-0041): a read (`ensureSynced`) OR a write (`onOrdinaryEnqueue`) can reference a\n // lazy group after `localReadReady` but BEFORE `sync` is wired (the Option B window). With a null `sync` the\n // seams cannot start a group, so BOTH feed this one buffer; the tail replays it once sync is wired, so the\n // activation is never LOST across the staged split (ADR-0039 semantics preserved). Null once replayed (or on\n // a tail failure — see the tail's rejection handler).\n let pendingActivations: Set<string> | null = new Set();\n\n let versionEvent: LocalStoreVersionEvent | null = null;\n\n // Boot recovery (ADR-0005) driven by the durable recovery marker (slice 2), PLUS the restore quarantine\n // (ADR-0035 decision 6, gated on `restoreBoot` inside `runBootRecovery`). Hoisted so the restore path runs\n // it BEFORE read exposure (the ADR-0041 invariant) and the normal path defers it to the background write\n // tail. `runBootRecovery` owns the full decision — marker read, skip/unconditional/transactional recovery, restore\n // quarantine, marker clear — and returns the honest `warmBoot` outcome (ADR-0034).\n const runBootRecoveryStage = async (): Promise<void> => {\n const recoveryOutcome = await bootReportBuilder.phase(\"journalRecovery\", \"boot journal recovery\", () =>\n mutationRuntime.runBootRecovery({ ownsMetaTable: !options.pgliteInstance, restore: restoreBoot }),\n );\n bootReportBuilder.setJournalRecovery(recoveryOutcome);\n };\n\n const runReconcileStage = async (): Promise<void> => {\n if (options.pgliteInstance) return;\n versionEvent = await bootReportBuilder.phase(\"storeVersionReconcile\", \"boot store-version reconcile\", () =>\n reconcileLocalStoreVersion({\n db: pglite,\n registry: options.registry,\n runtime: mutationRuntime,\n ...(options.onSchemaChange ? { onSchemaChange: options.onSchemaChange } : {}),\n }),\n );\n };\n\n if (restoreBoot) {\n // Restore invariant (ADR-0041): quarantine every recovered write before exposing a read facade.\n // `localReadReady` and `writeReady` therefore coincide on a restore boot.\n await runBootRecoveryStage();\n\n // ADR-0046: with recovery + quarantine complete, decide whether this restore comes online. The restore\n // quarantine pass parked every recovered non-terminal write (pending/sending/failed) as `quarantined`, so a\n // zero quarantined count means the backup's journal was CLEAN — the server-built bootstrap-artifact case —\n // and sync may start exactly as a normal boot would. A non-zero count keeps the boot offline (the protective\n // ADR-0035 rule, now applied only where it protects) until the app releases the rows; a subsequent normal\n // boot then brings sync online. An explicit `syncEnabled: false` is always honoured (stays offline).\n const recoveredQuarantined = (await mutationRuntime.readMutationStats()).quarantinedCount;\n if (recoveredQuarantined === 0 && options.syncEnabled !== false) {\n syncEnabled = options.syncEnabled ?? true;\n syncDebug(\"boot restore comes online — recovered journal was clean (nothing to quarantine)\");\n } else if (recoveredQuarantined > 0) {\n syncDebug(\n \"boot restore stays offline — recovered journal mutations were quarantined; release/discard them and a subsequent normal boot brings sync online\",\n { quarantinedCount: recoveredQuarantined, syncEnabledOption: options.syncEnabled ?? null },\n );\n }\n await runReconcileStage();\n } else {\n await runReconcileStage();\n }\n\n const drizzleDb = createDrizzleDatabase(pglite, buildSchema(options.registry));\n // Static index of the registry's lazy relations (ADR-0021), driving the read-path safety net.\n const lazyGuardIndex = buildLazyGuardIndex(options.registry);\n\n let sync: Awaited<ReturnType<typeof startConfiguredSync>> | null = null;\n let convergenceDriver: ConvergenceDriver | null = null;\n\n // Lifecycle guard (ADR-0041): `stop()`/`destroy()` can now be called while the background write/sync tail is\n // still in flight (React StrictMode mount/unmount is the canonical case). `disposed` lets the tail bail at\n // each stage boundary — before setting `isRunning`, before starting sync — so no shape stream starts after a\n // stop; and `stop`/`destroy` await `bootSettled` before teardown so the tail can never exec against a\n // closing PGlite.\n let disposed = false;\n // Resolves the moment `sync` is wired (and the activation buffer replayed); rejects if the boot is disposed\n // or the tail fails before wiring — so a read seam awaiting it in the pre-wire window unblocks rather than\n // hanging. On a sync-DISABLED boot it resolves at tail end (reads short-circuit before awaiting it anyway).\n let resolveSyncWired!: () => void;\n let rejectSyncWired!: (error: unknown) => void;\n const syncWired = new Promise<void>((resolve, reject) => {\n resolveSyncWired = resolve;\n rejectSyncWired = reject;\n });\n void syncWired.catch(() => undefined);\n // True once `sync` is genuinely wired — the read seams use this (not just `sync != null`) plus `syncEnabled`\n // to tell \"sync disabled\" (trivially ready) apart from \"sync pending\" (not yet ready / hydrating).\n const isSyncPending = (): boolean => syncEnabled && sync == null && !disposed;\n\n // Quiesce the background write/sync tail before a teardown (ADR-0041 BLOCKER 2). `stop()`/`destroy()` can be\n // called while the tail is still in flight (React StrictMode mount/unmount). Flag disposal so the tail bails\n // at its next stage boundary (never starting sync after this), gracefully release any read seam parked on\n // `syncWired` (it then falls through to the local-only path), then AWAIT `bootSettled` — swallowing a tail\n // failure — so the tail has fully SETTLED before teardown touches the engine/PGlite. Any sync the tail did\n // manage to start is assigned to `sync` by the time this resolves, for the caller's `sync?.unsubscribe()`.\n const quiesceTailForTeardown = async (): Promise<void> => {\n disposed = true;\n // ADR-0049 step 11b: release the live-store guard so a later manual `adoptStore` on this path is permitted\n // once this client is torn down (delete-if-present; a BYO-instance boot never registered, so it is a no-op).\n liveStorePaths.delete(fallbackStorePath);\n // FIX 2: a stopped client can never reach `writeReady` / `ready`, so reject them (idempotent — a race with\n // the tail's own resolve is settled first-wins; a normal stop AFTER boot is a no-op on the already-resolved\n // promises) so a parked mutation or an `await ready` / `start()` fails FAST rather than hanging past\n // teardown. `bootSettled` still RESOLVES below as teardown completion. Both are guarded by the\n // `.catch(() => undefined)` at construction, so an unconsumed rejection never leaks.\n const disposedError = new ClientDisposedError();\n rejectWriteReady(disposedError);\n rejectReady(disposedError);\n resolveSyncWired();\n await bootSettled.catch(() => undefined);\n };\n\n // Synchronously halt ALL sync/write ACTIVITY without awaiting anything — the first action of every teardown\n // entry point (stop()/destroy() here, and the SharedWorker host's closeHost, which calls this before it drains\n // pending subscribes or disposes live queries). Abort the mutation runtime's in-flight write fetches + any\n // stalled auth resolve, abort every shape-stream long-poll (engine.close's AbortControllers fire synchronously),\n // and stop convergence scheduling (the in-flight pass then settles fast — its fetch is aborted). Idempotent.\n // Without this, a teardown step that runs BEFORE the streams are aborted (live-query dispose, pending-subscribe\n // drain) races an engine still committing shape data and never settles. The full AWAITED teardown still runs\n // after; this only guarantees the network + scheduling are already dead when it does.\n const haltActivity = (): void => {\n disposed = true;\n mutationRuntime.abortInFlight();\n void engine.close();\n void convergenceDriver?.stop();\n };\n\n // The write/sync activation tail (ADR-0041 decision 3). On a NORMAL boot this runs in the BACKGROUND after\n // `localReadReady` resolves, so `createSyncClient` resolves at `localReadReady` (the Option B contract). On a\n // restore boot recovery already ran in the core, so the tail only opens the (unused) gate and settles. It\n // resolves `bootSettled` — today's full resolution point (sync START done; initial catch-up is NOT awaited,\n // that is `ready`), which the worker bridge awaits so worker-mode external timing is unchanged in stage 1.\n const runWriteAndSyncTail = async (): Promise<void> => {\n // Bail if the client was stopped before the tail even started (StrictMode mount/unmount): no write runtime\n // activation, no sync start. `bootSettled` still resolves (this returns), unblocking `stop()`'s await.\n if (disposed) return;\n // Normal boot: recovery runs here (restore already ran it in the core, before read exposure).\n if (!restoreBoot) {\n await runBootRecoveryStage();\n }\n if (disposed) return;\n // Write runtime + boot recovery complete — enqueue is safe. Stamp + resolve `writeReady` (idempotent: on a\n // restore boot it already resolved in the core alongside `localReadReady`).\n bootReportBuilder.setWriteReadyMs(performance.now() - bootReportBuilder.bootStartPerf);\n resolveWriteReady();\n\n // Do NOT set `isRunning` / start sync after a stop (BLOCKER 2): bail here so no shape stream is ever\n // started once teardown has begun.\n if (disposed) return;\n status.isRunning = true;\n\n // Open the overlap commit gate now the local store is ready (schema exec + journal recovery + reconcile\n // done): the catch-up the streams prefetched during those phases now drains in one commit train. A no-op\n // on the sequential path (`openDbGate` is the empty default there).\n openDbGate();\n\n if (syncEnabled) {\n if (earlySync) {\n // Overlap path: the shape streams have been prefetching since before schema exec; adopt the handle\n // (it resolves as soon as the streams are subscribed — catch-up drains via the gate just lifted, and\n // `onInitialSync` still gates `ready` on a fully-consistent first paint). The construction was kicked\n // off before schema exec, so time it here (concurrent-segment wall) into `phases.syncStartMs`.\n sync = await earlySync;\n bootReportBuilder.setSyncStartMs(performance.now() - earlySyncStartedAt);\n bootReportBuilder.markSyncStartDone();\n } else {\n // Sequential path (warm store / no fresh hint): apply any explicit subscription resets, promote\n // durable lazy groups, then start (catch-up strictly after the local phases).\n const resetKeys =\n versionEvent?.status === \"rebuilt\"\n ? [...(options.resetSubscriptionKeys ?? []), ...allGroupSubscriptionKeys(options.registry)]\n : options.resetSubscriptionKeys;\n await resetSubscriptionsIfRequested(pglite, resetKeys);\n // Re-check after the awaited reset: a stop during it must still abort BEFORE the network shape streams\n // start (BLOCKER 2 — cannot start sync after stop).\n if (disposed) return;\n\n status.phase = \"syncing\";\n options.onStatusChange?.(status);\n\n // Promote any `lazy + persistent` group activated on a previous boot back into the eager set\n // (ADR-0021 §2); the sync engine does no DB read of its own.\n const promotedGroups = await readActivatedLazyGroups(pglite, options.registry);\n if (disposed) return;\n\n sync = await bootReportBuilder.phase(\"syncStart\", \"boot sync start\", () =>\n startConfiguredSync(\n pglite as unknown as Parameters<typeof startConfiguredSync>[0],\n buildStartOptions(promotedGroups),\n ),\n );\n bootReportBuilder.markSyncStartDone();\n }\n // If a stop landed DURING the sync-start await, unsubscribe the just-started streams here rather than\n // leaving them running (stop read `sync` as null before this assignment), then bail.\n if (disposed) {\n sync?.unsubscribe();\n sync = null;\n return;\n }\n } else {\n status.phase = \"ready\";\n options.onStatusChange?.(status);\n // Sync disabled: there is no `onInitialSync` gate, but boot IS complete — finalize the report at the\n // same moment `ready` resolves (ADR-0034). Idempotent with the sync path's finalize.\n finalizeBootReport();\n resolveReady();\n }\n\n // ADR-0039/0041: replay every activation (read via `ensureSynced` AND write via `onOrdinaryEnqueue`)\n // buffered while `sync` was still null. Now `sync` is wired, re-issuing them through `ensureSynced` starts\n // the referenced groups — the activation is preserved, never lost across the split. Awaited so the groups\n // are STARTED before `syncWired` resolves (a `ensureSynced`/`prepareQuery` awaiter then sees them active).\n const buffered = pendingActivations;\n pendingActivations = null;\n if (sync != null && buffered && buffered.size > 0) {\n await ensureSynced([...buffered] as SyncTableName<TRegistry>[]);\n }\n // Sync is wired (or disabled and boot complete): unblock any read seam that parked on `syncWired`.\n resolveSyncWired();\n };\n\n // Convergence driver (ADR-0035 decision 6 / ADR-0046): a restore boot that STAYS offline (recovered journal\n // quarantined) never stands up the driver, so an `autoSync` trigger drives NO flush/reconcile passes — the\n // quarantined rows must stay put until the app releases them and a normal boot goes online. A restore that\n // came online (clean recovered journal) is treated exactly like a normal online boot and DOES get the driver.\n // On every non-restore boot the gate is unchanged (`!restoreBoot` is true regardless of `syncEnabled`).\n if (options.autoSync && (!restoreBoot || syncEnabled)) {\n convergenceDriver = createConvergenceDriver({\n client: {\n flush: () => mutationRuntime.flush(),\n reconcile: () => mutationRuntime.reconcile(),\n },\n trigger: options.autoSync,\n ...(options.onConvergencePass ? { onPass: options.onConvergencePass } : {}),\n });\n\n // Start driving convergence once the initial sync is ready, so a pass never races the first shape load.\n // stop()/destroy() halt it. `ready` is now rejectable (ADR-0041: the background tail rejects it on\n // failure), so the rejection handler keeps the driver un-started and off the unhandled-rejection path.\n void ready.then(\n () => convergenceDriver?.start(),\n () => undefined,\n );\n }\n\n // Event-driven convergence: the moment a mutation is enqueued, ask the driver to run a pass so the\n // write flushes immediately rather than waiting for the trigger's next interval tick. This is what\n // lets the interval be a rare fallback (and so run far less often). No-op when `autoSync` is off — the\n // caller drives `flush`/`reconcile` itself.\n const requestConvergence = () => convergenceDriver?.requestPass();\n // Every write-path method gates on `writeReady` (ADR-0041): a write issued the instant `localReadReady`\n // resolves awaits the write runtime + boot recovery rather than racing an unfinished boot or failing\n // opaquely. `writeReady` is already resolved on the steady-state client, so this is a settled-promise await.\n const mutate: SyncClient<TRegistry>[\"mutate\"] = {\n create: async (table, input) => {\n await writeReady;\n await mutationRuntime.create(table, input);\n requestConvergence();\n },\n update: async (table, entityKey, patch) => {\n await writeReady;\n await mutationRuntime.update(table, entityKey, patch);\n requestConvergence();\n },\n delete: async (table, entityKey) => {\n await writeReady;\n await mutationRuntime.delete(table, entityKey);\n requestConvergence();\n },\n batch: async (items) => {\n await writeReady;\n await mutationRuntime.batch(items);\n requestConvergence();\n },\n };\n\n // ─── Anonymous-activation diagnostic (ADR-0039) ────────────────────────────────────────────────\n // Per group key, whether ANY member's row filter denies (or cannot serve) an unauthenticated caller,\n // plus its member registry keys (for the warning). The registry is static and the group→member map is\n // fixed once sync is running, so it is computed once and cached.\n type GroupClaimsInfo = { claimsDependent: boolean; memberKeys: string[] };\n let groupClaimsInfoCache: Map<string, GroupClaimsInfo> | null = null;\n const groupClaimsInfoFor = (activeSync: NonNullable<typeof sync>): Map<string, GroupClaimsInfo> => {\n if (groupClaimsInfoCache != null) return groupClaimsInfoCache;\n const map = new Map<string, GroupClaimsInfo>();\n for (const key of Object.keys(options.registry) as SyncTableName<TRegistry>[]) {\n const groupKey = activeSync.groupKeyForTable(key as string);\n if (groupKey == null) continue;\n const entry = options.registry[key] as SyncTableEntry;\n const info = map.get(groupKey) ?? { claimsDependent: false, memberKeys: [] };\n info.memberKeys.push(key as string);\n if (isClaimsDependentRowFilter(entry.shape?.rowFilter)) info.claimsDependent = true;\n map.set(groupKey, info);\n }\n groupClaimsInfoCache = map;\n return map;\n };\n // One warning per group key, ever (a claims-denied group activated with no token opens an empty\n // subscription by construction, so repeated activations must not spam).\n const anonymousActivationWarned = new Set<string>();\n const warnIfAnonymousClaimsDependentActivation = (activeSync: NonNullable<typeof sync>, groupKey: string) => {\n if (anonymousActivationWarned.has(groupKey)) return;\n const info = groupClaimsInfoFor(activeSync).get(groupKey);\n if (info == null || !info.claimsDependent) return;\n // Fire-and-forget: activation never blocks or fails on the token probe (a rejected `getAuthToken`\n // is swallowed into a syncDebug line). The dedupe Set is checked+set synchronously around the warn,\n // so concurrent activations still emit at most one console.warn.\n void (async () => {\n try {\n const token = options.getAuthToken ? await options.getAuthToken() : undefined;\n if (token != null && token !== \"\") return;\n if (anonymousActivationWarned.has(groupKey)) return;\n anonymousActivationWarned.add(groupKey);\n console.warn(\n `pgxsinkit: activating the lazy group [${info.memberKeys.join(\", \")}] with no auth token — its ` +\n `row filter denies unauthenticated callers, so this opens an empty subscription. Gate the first ` +\n `query on auth (e.g. the React hooks' \\`ready\\` option) so the group activates with real claims.`,\n );\n syncDebug(\"anonymous activation of a claims-dependent lazy group\", {\n groupKey,\n tables: info.memberKeys,\n });\n } catch (error) {\n syncDebug(\"anonymous-activation auth probe failed\", { groupKey, error });\n }\n })();\n };\n\n // ─── Lazy-relation activation + the declared-safe query facade (ADR-0021) ──────────────────────\n const ensureSynced: SyncClient<TRegistry>[\"ensureSynced\"] = async (keys) => {\n if (keys.length === 0) return;\n // Sync PENDING (ADR-0041 Option B window): `sync` is not yet wired but the boot IS syncing. Record the\n // keys in the shared buffer AND await `syncWired` — the tail replays the buffer and STARTS the groups\n // before resolving `syncWired`, so on return the relations are genuinely active (the tripwire passes).\n // Distinct from sync DISABLED, which falls through to the trivially-active local-only path below.\n if (sync == null && isSyncPending()) {\n if (pendingActivations != null) for (const key of keys) pendingActivations.add(key);\n await syncWired;\n }\n const activeSync = sync;\n // Sync disabled → local-only (or the client was disposed before wiring): every relation is trivially\n // \"synced\" — reads hit whatever is local, so there is nothing to start.\n if (activeSync == null) return;\n const groupKeys = new Set<string>();\n for (const key of keys) {\n const groupKey = activeSync.groupKeyForTable(key);\n if (groupKey == null) continue;\n // Diagnostic at the activation choke point (ADR-0039): only for a group not yet started — an\n // already-active group has already paid (or dodged) this check. Write-triggered activation flows\n // through here too, so the warning fires for writes as well as reads.\n if (!activeSync.isTableStarted(key)) {\n warnIfAnonymousClaimsDependentActivation(activeSync, groupKey);\n }\n groupKeys.add(groupKey);\n }\n await Promise.all([...groupKeys].map((groupKey) => activeSync.ensureGroupStarted(groupKey)));\n };\n\n // ADR-0039: now `ensureSynced` + `lazyGuardIndex` exist, wire the ordinary-write activation. Filter the\n // reported tables to the lazy ones, then fire-and-forget `ensureSynced` — enqueue never blocks on the\n // network, and a failed start self-heals on the group's next activation (a `.catch` keeps the rejection\n // off the unhandled-rejection path).\n activateOrdinaryWriteTables = (tables) => {\n // ADR-0041: a write can land after `writeReady` but before `sync` is wired. Buffer the reported tables\n // (the tail replays them once sync is up) so the activation is never lost — this seam is fire-and-forget\n // (`onOrdinaryEnqueue` has a sync signature), so it cannot await `syncWired` the way `ensureSynced` does.\n if (sync == null) {\n if (pendingActivations != null) for (const table of tables) pendingActivations.add(table);\n return;\n }\n const lazyTables = tables.filter((table) => lazyGuardIndex.lazyKeys.has(table)) as SyncTableName<TRegistry>[];\n if (lazyTables.length === 0) return;\n void ensureSynced(lazyTables).catch((error) => {\n syncDebug(\"write-triggered lazy activation failed\", { tables: lazyTables, error });\n });\n };\n\n // Per-table catch-up completion (ADR-0032 decision 6) — the body of `client.groupReady`, hoisted so the\n // live-rows seam can also await it when building a subscription's `hydrated` promise.\n const groupReadyForTable = async (table: SyncTableName<TRegistry>): Promise<void> => {\n // Sync PENDING (ADR-0041): wait for sync to wire before its catch-up can even be evaluated, so a group\n // referenced in the pre-wire window retains its catch-up meaning rather than resolving instantly.\n if (sync == null && isSyncPending()) {\n await syncWired;\n }\n const activeSync = sync;\n // Sync disabled → local-only (or disposed before wiring): every relation is trivially \"ready\".\n if (activeSync == null) return;\n const groupKey = activeSync.groupKeyForTable(table as string);\n if (groupKey == null) return;\n await activeSync.groupReady(groupKey);\n };\n\n // Synchronous peek at a table's consistency-group catch-up (ADR-0032 decision 6) — the counterpart of\n // `groupReadyForTable`, hoisted so the live-rows seam can compute the STEADY-STATE fast path: when every\n // referenced group is already ready at subscribe time, no `hydrated` promise is built (no extra refresh).\n const isGroupReadyForTable = (table: string): boolean => {\n const activeSync = sync;\n if (activeSync == null) {\n // Sync PENDING (ADR-0041): not yet wired → the group is NOT ready (its catch-up has not run). Sync\n // DISABLED → local-only, trivially ready.\n return !isSyncPending();\n }\n const groupKey = activeSync.groupKeyForTable(table);\n // No consistency group (unknown/writeonly) → nothing to await; treat as ready.\n if (groupKey == null) return true;\n return activeSync.isGroupReady(groupKey);\n };\n\n // The referenced synced tables whose consistency group is NOT YET caught up (ADR-0021/0032): scan the\n // compiled SQL for every synced relation the query reads (∪ the explicit `use`), then keep only those\n // whose group is still catching up. Empty when sync is DISABLED or every referenced group is already ready\n // — the steady-state fast path, where the live-rows seam builds no `hydrated` promise. When sync is PENDING\n // (ADR-0041 window) every referenced synced group is not-yet-ready, so all are returned as hydrating.\n const hydratingTablesFor = (query: { sql: string; use?: readonly string[] }): string[] => {\n // Sync disabled → nothing hydrates. Sync pending → every referenced synced group is hydrating (below).\n if (sync == null && !isSyncPending()) return [];\n const referenced = new Set<string>(query.use ?? []);\n for (const key of findReferencedSyncedKeysInSql(query.sql, lazyGuardIndex)) referenced.add(key);\n return [...referenced].filter((table) => !isGroupReadyForTable(table));\n };\n\n const isSynced: SyncClient<TRegistry>[\"isSynced\"] = (key) => {\n const activeSync = sync;\n if (activeSync == null) {\n // Sync PENDING (ADR-0041): not yet wired → the relation is not started (dormant). Sync DISABLED →\n // local-only, so nothing is \"dormant\".\n return !isSyncPending();\n }\n return activeSync.isTableStarted(key);\n };\n\n // ADR-0021 §2/§4: the tables of `entry`'s consistency GROUP — a group is one subscription / one\n // transaction frontier, so reverting one member to dormant reverts them all (a table with no\n // `consistencyGroup` is its own singleton group).\n const groupTableKeysFor = (key: SyncTableName<TRegistry>, entry: SyncTableEntry): SyncTableName<TRegistry>[] => {\n const targetGroup = entry.consistencyGroup;\n return (\n targetGroup == null\n ? [key]\n : (Object.keys(options.registry) as SyncTableName<TRegistry>[]).filter(\n (candidate) => options.registry[candidate]!.consistencyGroup === targetGroup,\n )\n ) as SyncTableName<TRegistry>[];\n };\n\n // The shared group-teardown body of {@link desync} and {@link discardEphemeral} (ADR-0021 §2/§4). Both\n // revert a lazy relation's whole consistency group to dormant: refuse if any writable member owes\n // unsettled writes, stop the group stream, clear the persisted lazy activation, delete the persisted\n // Electric subscription (so re-activation re-streams from scratch), then clean-truncate every member's\n // local cluster. `label` names the calling primitive in the owed-writes refusal so each keeps its own\n // diagnostic (desync stays byte-identical). Callers apply their own lazy/retention gates BEFORE this.\n const tearDownLazyGroup = async (key: SyncTableName<TRegistry>, entry: SyncTableEntry, label: string) => {\n const groupTableKeys = groupTableKeysFor(key, entry);\n\n // Refuse if ANY writable member owes the server unsent/unsettled writes: the truncate clears the\n // journal, so dropping un-acked local intent would be silent data loss. Flush (or discard) those first.\n let owed = 0;\n for (const member of groupTableKeys) {\n if (options.registry[member]!.mode === \"readonly\") continue;\n const stats = await mutationRuntime.readMutationStats(member);\n owed +=\n stats.pendingCount + stats.sendingCount + stats.failedCount + stats.quarantinedCount + stats.conflictedCount;\n }\n if (owed > 0) {\n throw new Error(\n `${label}('${String(key)}') refused: ${owed} unsettled mutation(s) in the group's local journal. Flush or discard them first.`,\n );\n }\n\n const activeSync = sync;\n // The group key IS the Electric subscription key (`consistencyGroup ?? shapeKey`); fall back to the\n // registry derivation when sync is disabled.\n const groupKey = activeSync?.groupKeyForTable(key) ?? entry.consistencyGroup ?? entry.shape?.shapeKey;\n // Stop the stream BEFORE truncating so a live shape can't re-populate the rows we just cleared, and\n // revert the durable promotion (a no-op for ephemeral, which never persisted a flag) so the next boot\n // holds the relation dormant again.\n if (activeSync != null && groupKey != null) activeSync.stopGroup(groupKey);\n if (groupKey != null) await clearLazyGroupActivation(pglite, options.registry, groupKey);\n // CRITICAL: delete the group's persisted Electric subscription so a later re-activation re-streams the\n // shape from scratch. Without this it would resume from the old cursor and never re-send the rows we\n // truncate below — leaving the relation permanently missing its pre-desync data.\n if (groupKey != null) await resetSubscriptionsIfRequested(pglite, [groupKey]);\n // Clean-truncate every member's local cluster.\n for (const member of groupTableKeys) {\n await pglite.exec(buildDesyncTableSql(options.registry, member as string));\n }\n };\n\n const desync: SyncClient<TRegistry>[\"desync\"] = async (key) => {\n // ADR-0041 (SHOULD-FIX 5): a destructive group-teardown reads the journal and stops a group's stream, so\n // it must not race the background tail's recovery updates / subscription reset / sync start. Gate on\n // `bootSettled` — these are rare admin ops, so the stronger gate is correct (a tail failure rejects here).\n await bootSettled;\n const entry = options.registry[key];\n if (entry == null) throw new Error(`desync: unknown table ${String(key)}`);\n if (entry.subscription !== \"lazy\") {\n throw new Error(\n `desync('${String(key)}') refused: only a lazy relation can be desynced — an eager relation is always-on and would immediately re-sync.`,\n );\n }\n await tearDownLazyGroup(key, entry, \"desync\");\n };\n\n const discardEphemeral: SyncClient<TRegistry>[\"discardEphemeral\"] = async (key) => {\n // ADR-0041 (SHOULD-FIX 5): gate the destructive teardown on `bootSettled` so it never races the tail.\n await bootSettled;\n return (\n // Run inside the SAME lifecycle slot the exports use (ADR-0035 decision 4): discardEphemeral\n // clean-truncates an ephemeral group's local cache, so an export must never interleave it (nor it an\n // export) — the slot's typed LifecycleBusyError fires in both directions. The existing lazy/ephemeral\n // gates below stay EXACTLY as they were, now inside the slot run. (`desync` is deliberately NOT slotted:\n // only the ADR-0035-named destructive ops — destroy/discardEphemeral/dropReadCache — serialise here.)\n lifecycleSlot.run(\"discardEphemeral\", async () => {\n const entry = options.registry[key];\n if (entry == null) throw new Error(`discardEphemeral: unknown table ${String(key)}`);\n // Keep the lazy gate desync has: eager+ephemeral is NOT forbidden by the type system (retention and\n // subscription are independent scalars on the entry — see contracts config.ts / registry.ts), and an\n // eager relation would immediately re-stream, so the same refusal applies here.\n if (entry.subscription !== \"lazy\") {\n throw new Error(\n `discardEphemeral('${String(key)}') refused: only a lazy relation can be discarded — an eager relation is always-on and would immediately re-sync.`,\n );\n }\n // STRICTER gate than desync: every member of the consistency group must be ephemeral. Retention is read\n // as `entry.retention ?? \"persistent\"` (absent → persistent, matching validateRegistryLifecycleGroups and\n // the schema generator); a read PROJECTION surfaces its declared retention on the same `retention` field\n // (withRetention/asEphemeral/defineReadProjection all set it), so this one read covers tables and\n // projections alike. Refuse (naming the offender) if any member is persistent — discardEphemeral is the\n // multi-tab-safe primitive for per-delivery-session windows, and truncating a persistent member's cache\n // would drop durable local data; use desync for a persistent lazy relation.\n for (const member of groupTableKeysFor(key, entry)) {\n if ((options.registry[member]!.retention ?? \"persistent\") !== \"ephemeral\") {\n throw new Error(\n `discardEphemeral('${String(key)}') refused: group member '${String(member)}' is persistent — ` +\n `discardEphemeral only drops an ephemeral relation's local rows. Use desync for a persistent lazy relation.`,\n );\n }\n }\n await tearDownLazyGroup(key, entry, \"discardEphemeral\");\n })\n );\n };\n\n const transaction: SyncClient<TRegistry>[\"transaction\"] = async ({ mode }, run) => {\n // Write-path gate (ADR-0041): the atomic unit enqueues + (pessimistic) flushes, so await `writeReady`.\n await writeReady;\n // The block's table handles only COLLECT mutations; the whole set is enqueued atomically as one unit.\n const collected: MutationBatchItem<TRegistry>[] = [];\n const txTables = Object.fromEntries(\n Object.keys(options.registry).map((tableKey) => [\n tableKey,\n {\n create: (input: unknown) => {\n collected.push({ table: tableKey, kind: \"create\", input } as MutationBatchItem<TRegistry>);\n },\n update: (entityKey: Record<string, string>, patch: unknown) => {\n collected.push({ table: tableKey, kind: \"update\", entityKey, patch } as MutationBatchItem<TRegistry>);\n },\n updateBlind: (entityKey: Record<string, string>, patch: unknown) => {\n collected.push({\n table: tableKey,\n kind: \"update\",\n entityKey,\n patch,\n blind: true,\n } as MutationBatchItem<TRegistry>);\n },\n delete: (entityKey: Record<string, string>) => {\n collected.push({ table: tableKey, kind: \"delete\", entityKey } as MutationBatchItem<TRegistry>);\n },\n },\n ]),\n ) as SyncTransaction<TRegistry>[\"tables\"];\n\n await run({ tables: txTables });\n\n if (collected.length === 0) {\n return { acks: [] };\n }\n\n const unit: WriteUnit = { id: globalThis.crypto.randomUUID(), mode };\n await mutationRuntime.batch(collected, unit);\n\n if (mode === \"optimistic\") {\n // An atomic batch enqueue; the background convergence loop flushes it (no foreground answer).\n void mutationRuntime.flush();\n return { acks: [] };\n }\n\n // Pessimistic: flush-route this unit to the authoritative endpoint and await the per-mutation result.\n return await mutationRuntime.flushUnit(unit.id);\n };\n\n const prepareQuery: SyncClient<TRegistry>[\"prepareQuery\"] = async ({ sql, use }) => {\n // Scan the compiled SQL for the lazy relations it reads (∪ the explicit `use`) and activate them.\n // The compiled SQL is ground truth and Drizzle quotes every relation, so any reference — FROM, JOIN,\n // subquery, WHERE — is caught; over-matching is bounded and harmless (one spurious persistent\n // subscription at worst, never a wrong result). Detection and activation are one step (ADR-0021).\n const toActivate = new Set<string>(use ?? []);\n for (const key of findReferencedLazyKeysInSql(sql, lazyGuardIndex)) toActivate.add(key);\n const lazyTables = [...toActivate] as SyncTableName<TRegistry>[];\n await ensureSynced(lazyTables);\n // Backstop: if a referenced lazy relation is somehow still not active (a failed start, or no group),\n // throw rather than let the query read empty/stale. In the normal path everything scanned was just\n // activated, so this passes.\n assertLazyRefsActivated({\n sql,\n index: lazyGuardIndex,\n isActive: (key) => isSynced(key as SyncTableName<TRegistry>),\n });\n // Activated = streams started, NOT caught up. Hand back the keys so consumers (the React hooks'\n // `hydrating`) can await `groupReady` per key without blocking the read on the network.\n return { lazyTables };\n };\n\n // The single gate+guard core shared by BOTH one-shot read entry points (the in-process drizzle-builder path\n // below and the worker-reachable `guardedRawQuery`), so the read gate and lazy-group guard can never drift\n // between modes. Given the query's compiled SQL (∪ `use`): read gate first, then the lazy-group guard.\n const gateAndGuardRead = async (sql: string, use?: readonly SyncTableName<TRegistry>[]): Promise<void> => {\n // Read gate (ADR-0041): a query must not run against a store whose local-read core has not finished. On\n // the in-process client this is a settled-promise await (the client is handed out at `localReadReady`),\n // but it is cheap and keeps the read path safe if a caller retained a query builder across the boundary.\n await localReadReady;\n // Lazy-group guard (ADR-0021): scan the compiled SQL (∪ `use`) for lazy relations it reads and activate +\n // await them before the query runs, so a lazy relation is never read empty/stale.\n await prepareQuery({ sql, ...(use ? { use } : {}) });\n };\n\n const runGuardedQuery = async <TRows extends readonly unknown[]>(\n build: GuardedQueryFn<TRegistry, TRows>,\n use?: readonly SyncTableName<TRegistry>[],\n ): Promise<TRows> => {\n // Building the drizzle query is pure construction (no DB I/O — it only compiles to SQL), so compile first,\n // then run the shared gate+guard on that SQL, then hand back the still-unexecuted builder (its `await`\n // executes via the local drizzle exactly as before — return shape unchanged).\n const builder = build(client);\n await gateAndGuardRead(builder.toSQL().sql, use);\n return builder;\n };\n\n // The worker host's guarded one-shot read (ADR-0032 decision 4) — `rawQuery` PLUS the shared gate+guard.\n // `defineSyncWorker`'s `guardedQuery` handler calls this on its owned in-process client (re-applying\n // drizzle's identity parsers — temporal OIDs + numeric[] — in `options` first, since that parser map cannot cross the bridge);\n // the attach client's Drizzle-over-bridge routes reads here. Returns the full PGlite `Results` so drizzle's\n // own result mapping runs on the tab.\n const guardedRawQuery: SyncClient<TRegistry>[\"guardedRawQuery\"] = async (sql, params, options, use) => {\n await gateAndGuardRead(sql, use);\n return pglite.query(sql, params as unknown[] | undefined, options);\n };\n\n // The live-query manager (ADR-0040) — the SAME module the worker uses (decision 6), so the in-process\n // client gets one lifecycle contract: dedup of identical concurrent subscriptions within this client,\n // bounded zero-subscriber keep-alive (`options.liveQueries`), and awaited teardown (decision 1 — `dispose()`\n // settles every un-awaited unsubscribe before `pglite.close()`, subsuming the old pending-teardowns set).\n // It cannot dedup across tabs (that is the worker's job) but keeps the contract identical across both forms.\n const liveManager: LiveQueryManager = createLiveQueryManager({\n live: pglite.live,\n ...(options.liveQueries ? { policy: options.liveQueries } : {}),\n });\n\n const client: SyncClient<TRegistry> = {\n drizzle: drizzleDb,\n pglite,\n views: buildViews(options.registry),\n tables: Object.fromEntries(\n Object.keys(options.registry).map((tableKey) => [\n tableKey,\n {\n key: tableKey,\n mode: options.registry[tableKey as SyncTableName<TRegistry>]!.mode,\n create: (input: SyncTableCreateInput<TRegistry, typeof tableKey>) =>\n mutate.create(tableKey as SyncTableName<TRegistry>, input),\n update: (entityKey: Record<string, string>, patch: SyncTableUpdateInput<TRegistry, typeof tableKey>) =>\n mutate.update(tableKey as SyncTableName<TRegistry>, entityKey, patch),\n delete: (entityKey: Record<string, string>) => mutate.delete(tableKey as SyncTableName<TRegistry>, entityKey),\n },\n ]),\n ) as SyncClient<TRegistry>[\"tables\"],\n localReadReady,\n writeReady,\n bootSettled,\n ready,\n status,\n start: async () => {\n await ready;\n },\n haltActivity,\n stop: async () => {\n // Halt all activity FIRST (see haltActivity) — before any await.\n haltActivity();\n // ADR-0041: quiesce the background boot tail FIRST — flag disposal (so it never starts sync after this)\n // and await its settlement — so no shape stream is left running and nothing execs against the closing\n // PGlite. Any sync the tail started before disposal is now in `sync` for the unsubscribe below.\n await quiesceTailForTeardown();\n // Await any in-flight convergence pass before closing PGlite, so a pass never queries a\n // closed handle.\n await convergenceDriver?.stop();\n sync?.unsubscribe();\n status.isRunning = false;\n options.onStatusChange?.(status);\n // Tear the engine down (abort every shape stream) immediately before closing the DB — the exact\n // point PGlite's own close used to invoke the former extension's close hook (ADR-0032 S1). Order\n // preserved: convergence stop → sync unsubscribe → status → engine close → pglite close.\n await engine.close();\n // Dispose the live-query manager before closing PGlite (ADR-0040 decisions 1 & 6): it cancels any\n // keep-alive timers and awaits every in-flight live `unsubscribe()`, so none races `pglite.close()`.\n await liveManager.dispose();\n await pglite.close();\n },\n destroy: (destroyOptions) =>\n // Run inside the SAME lifecycle slot the exports use (ADR-0035 decision 4), so a destructive wipe can\n // never interleave a running export (nor an export interleave this wipe) — the slot's typed\n // LifecycleBusyError fires in both directions. The refuse-if-owed guard stays EXACTLY as it was, now\n // inside the slot run.\n lifecycleSlot.run(\"destroy\", async () => {\n // Halt all activity FIRST (see haltActivity) — before any await.\n haltActivity();\n // ADR-0041: quiesce the background boot tail BEFORE the owed-mutations read and the wipe, so neither\n // races the tail's recovery journal updates / sync start (BLOCKER 2). After this the tail has settled.\n await quiesceTailForTeardown();\n if (!destroyOptions?.force) {\n const stats = await mutationRuntime.readMutationStats();\n const owed =\n stats.pendingCount +\n stats.sendingCount +\n stats.failedCount +\n stats.quarantinedCount +\n stats.conflictedCount;\n\n if (owed > 0) {\n throw new Error(\n `destroy() refused: ${owed} mutation(s) still owed to the server. Flush them first or call destroy({ force: true }).`,\n );\n }\n }\n\n // Drain any in-flight convergence pass before wiping, so a pass never writes into a store\n // being torn down underneath it.\n await convergenceDriver?.stop();\n sync?.unsubscribe();\n status.isRunning = false;\n options.onStatusChange?.(status);\n await pglite.exec(buildWipeLocalStoreSql(options.registry));\n // Same teardown ordering as `stop`: abort the engine's streams before closing the DB, the moment\n // the former extension close hook fired during `pglite.close()` (ADR-0032 S1).\n await engine.close();\n // Dispose the live-query manager before closing PGlite — same close-vs-unsubscribe hang guard as\n // `stop()` (ADR-0040 decisions 1 & 6).\n await liveManager.dispose();\n await pglite.close();\n // ADR-0049 step 10b: phase-aware destructive lifecycle. The wipe + close above cleared the local store;\n // now finish the store-meta / OPFS-namespace side. Every recorded browser store runs the full destructive\n // lifecycle (set `deleting` → delete commitment\n // sentinel → delete both possible backend stores → delete meta). Wiping application tables and closing\n // PGlite do NOT delete its IndexedDB database; retaining that shell would make the next granted boot\n // classify it as an existing recordless idb store instead of a genuinely fresh path. A recordless lifecycle-owned\n // IDB store therefore enters the same machine; memory, filesystem, non-browser, and caller-owned stores\n // have no toolkit browser authority to finish.\n const { readStoreMetaRecord } = await import(\"./store-meta\");\n const metaResult = await readStoreMetaRecord(fallbackStorePath);\n // A recordless fixed IDB store is still lifecycle-owned: wiping tables does not delete its\n // database shell, so it must enter the same supervised deletion machine. Memory/filesystem and\n // caller-owned instances stay outside this browser authority mechanism.\n if (\n (typeof metaResult === \"object\" && metaResult !== null) ||\n (ownsStoreLifecycle && openedStorageBackend === \"idbfs\")\n ) {\n const { runStoreDestruction, createStoreDestructionEffects } = await import(\"./worker/attach-sync-client\");\n await runStoreDestruction(createStoreDestructionEffects(fallbackStorePath));\n }\n }),\n dropReadCache: async () => {\n // ADR-0041 (SHOULD-FIX 5): the drop+rebuild resets subscriptions and rewrites the read cache, so it must\n // not race the background tail's sync start / subscription reset. Gate on `bootSettled` first.\n await bootSettled;\n return (\n // Under the SAME lifecycle slot as the exports (ADR-0035 decision 4). WHY dropReadCache is slotted and\n // not just destroy/discardEphemeral: it DROPS and rebuilds the synced read-cache tables, so an export\n // racing it would capture a half-rebuilt cache in the artefact (some tables dropped, some re-created,\n // none re-streamed yet). The slot makes the drop+rebuild atomic against any concurrent export.\n lifecycleSlot.run(\"dropReadCache\", async () => {\n await pglite.exec(buildDropReadCacheSql(options.registry));\n await pglite.exec(generateLocalSchemaSql(options.registry));\n // A full durable-schema exec re-stamps the durable-schema fingerprint (slice 3): exec and stamp\n // travel together so the next boot's fast path can trust the rebuilt cache's fingerprint.\n await writeStoredLocalSchemaFingerprint(\n pglite,\n options.registry,\n computeLocalSchemaFingerprint(options.registry),\n );\n // Reset the Electric subscriptions so the rebuilt synced tables re-stream from scratch\n // rather than the bookkeeping believing they are already caught up (ADR-0006).\n await resetSubscriptionsIfRequested(pglite, allGroupSubscriptionKeys(options.registry));\n })\n );\n },\n // Write-path methods gate on `writeReady` (ADR-0041): each enqueues, drains, or mutates a journal, so\n // none may run before the write runtime + boot recovery have completed. `writeReady` is already resolved\n // on the steady-state client, so these are settled-promise awaits.\n flush: async (table) => {\n await writeReady;\n return mutationRuntime.flush(table);\n },\n reconcile: async (table) => {\n await writeReady;\n return mutationRuntime.reconcile(table);\n },\n retryFailed: async (table) => {\n await writeReady;\n return mutationRuntime.retryFailed(table);\n },\n recoverSending: async (table) => {\n await writeReady;\n return mutationRuntime.recoverSending(table);\n },\n // NIT 7 (ADR-0041): these are READ diagnostics, deliberately UNGATED so they work at `localReadReady`. In\n // the narrow pre-`writeReady` window they may observe pre-recovery `sending` rows (boot recovery lifts\n // `sending → pending`), i.e. the honest current journal state before recovery has run — not a bug.\n readMutationDetails: (table) => mutationRuntime.readMutationDetails(table),\n mutate,\n discardConflict: async (table, entityKey) => {\n await writeReady;\n return mutationRuntime.discardConflict(table, entityKey);\n },\n discardQuarantined: async (table, entityKey) => {\n await writeReady;\n return mutationRuntime.discardQuarantined(table, entityKey);\n },\n // See the `readMutationDetails` note: a read, ungated, so pre-`writeReady` it may show pre-recovery counts.\n diagnostics: async (table) => ({\n mutation: await mutationRuntime.readMutationStats(table),\n }),\n // The registry-wide mutation-status API (slice 4). Assigned just below the object so it can close over\n // this client's own `subscribeLiveRows` + `pglite.query` seams — the SAME factory the worker facade uses.\n mutations: undefined as unknown as MutationsApi<TRegistry>,\n // Inspection surface (see the interface doc): straight through to the underlying store, no journal /\n // overlay involvement. The worker facade runs the identical call inside the worker's own client.\n rawQuery: (sql, params, options) => pglite.query(sql, params as unknown[] | undefined, options),\n rawExec: (sql, options) => pglite.exec(sql, options),\n // @internal: the guarded raw-SQL read the worker host dispatches `guardedQuery` to (ADR-0032 decision 4).\n guardedRawQuery,\n query: (build) => runGuardedQuery(build),\n queryRow: async (build) => {\n const rows = await runGuardedQuery(build);\n return rows[0] ?? null;\n },\n queryRaw: (spec) => runGuardedQuery(spec.build, spec.use),\n queryRawRow: async (spec) => {\n const rows = await runGuardedQuery(spec.build, spec.use);\n return rows[0] ?? null;\n },\n ensureSynced,\n isSynced,\n desync,\n discardEphemeral,\n prepareQuery,\n transaction,\n groupReady: groupReadyForTable,\n hydratingTablesFor,\n // The live-rows seam, now delegated to the shared `LiveQueryManager` (ADR-0040 decision 6) — identical\n // contract to the pre-adoption inline `pglite.live.query` seam, but with dedup of identical concurrent\n // subscriptions, keep-alive (`keepAliveMs`), and awaited teardown for free. The manager delivers a diff\n // stream (`deliverInitial` + `deliverDiff`); we fold it back into FULL ordered row arrays with a\n // per-subscription `LiveRowsMaterializer` (the SAME piece `attachSyncClient` uses tab-side), so the\n // public `onRows(rows)` / `initialRows` contract is byte-unchanged — and unchanged rows now keep `===`\n // identity across diffs (a bonus the raw `results.rows` path did not give). Keyless (no `pkColumns`)\n // exactly as the inline seam was: PGlite's `live.query` + the manager's value-identity diff.\n subscribeLiveRows: async ({ sql, params, fields, use, keepAliveMs }, onRows) => {\n // Read gate (ADR-0041): do not register a live query before the local-read core has finished (a\n // settled-promise await on the steady-state client — cheap, and stage-2-safe).\n await localReadReady;\n // Render the query safe to materialise: a JOIN with same-named columns fails `live.query`'s\n // temp-view creation (`column \"title\" specified more than once`) unless every output column has a\n // unique alias. No `fields` → SQL unchanged (the default name-keyed row shape). The wrap stays\n // caller-side (ADR-0040 decision 3): the manager receives POST-WRAP SQL.\n const materialSql = wrapLiveQueryForMaterialization(sql, fields);\n // Keyless materializer (matches the inline seam, which never passed pkColumns): initial rows seed it;\n // each diff folds into a fresh ordered array whose unchanged rows keep their object identity.\n const materializer = new LiveRowsMaterializer<Record<string, unknown>>(undefined);\n const subscription = await liveManager.subscribe(\n { materialSql, params: params as unknown[] },\n {\n // The initial snapshot is returned via `initialRows`, NOT `onRows` (which fires on CHANGES only) —\n // so `deliverInitial` just seeds the materializer; `initialRows` is read from it below.\n deliverInitial: (rows) => {\n materializer.seed(rows);\n },\n deliverDiff: (diff) => {\n onRows(materializer.apply(diff) as never);\n },\n },\n keepAliveMs != null ? { keepAliveMs } : undefined,\n );\n // Seeded synchronously by `deliverInitial` during `subscribe` above.\n const initialRows = materializer.current();\n let unsubscribed = false;\n // The query's lazy relations (guard scan ∪ `use`; the caller's `prepareQuery` already activated them)\n // are surfaced as `lazyTables` for observability — the relations held out of the eager boot set.\n const lazySet = new Set<string>(use ?? []);\n for (const key of findReferencedLazyKeysInSql(sql, lazyGuardIndex)) lazySet.add(key);\n const lazyTables = [...lazySet];\n // Hydration spans EVERY referenced consistency group (eager AND lazy): the tables whose group is not\n // yet caught up at subscribe time. Empty (steady state / sync disabled) → NO `hydrated` promise, so a\n // post-boot subscription pays no extra refresh (exactly today's eager-only behaviour). Otherwise build\n // `hydrated` with rows-before-signal ordering: await the pending groups' catch-up, refresh the live\n // query (the manager's coalesced refresh; its listener delivers the caught-up rows as a diff → onRows,\n // synchronously inside the refresh), THEN resolve — so a UI flipping out of its loading state on this\n // promise can never flash a false empty.\n const hydratingTables = hydratingTablesFor({ sql, ...(use ? { use } : {}) });\n const hydrated =\n hydratingTables.length > 0\n ? Promise.all(hydratingTables.map((table) => groupReadyForTable(table as SyncTableName<TRegistry>)))\n .then(async () => {\n if (!unsubscribed) await subscription.refresh();\n })\n .catch(() => undefined)\n : undefined;\n return {\n initialRows: initialRows as never,\n unsubscribe: () => {\n unsubscribed = true;\n // Non-blocking for the caller; the manager retains the teardown promise so `dispose()` (called by\n // `stop()`/`destroy()`) awaits it before closing PGlite (ADR-0040 decision 1 — the close race).\n void subscription.unsubscribe();\n },\n ...(lazyTables.length > 0 ? { lazyTables } : {}),\n ...(hydrated ? { hydrated } : {}),\n };\n },\n // Boot observability (ADR-0034): the finalized report (null before initial sync completes / after an\n // early stop). Resolves from the builder-owned ref this client holds — no round trip in-process.\n bootReport: async () => finalizedBootReport,\n // Live-query diagnostics (ADR-0040 decisions 5 & 6): the in-process client now owns a real manager, so\n // this returns its live snapshot (digests + counts/timings only — never SQL/params/rows).\n liveQueryDiagnostics: async () => liveManager.snapshot(),\n exportStore: async (exportOptions) => {\n // Await engine-ready first (ADR-0035: exports wait out a boot rather than rejecting during it), THEN\n // take the lifecycle slot — a concurrent export/lifecycle op is refused with a typed busy error.\n await ready;\n // Name the backup from the configured plain store PATH (ADR-0036), never the PGlite instance's\n // resolved dataDir URL — a resolved URL is internal plumbing and must not leak into an artefact name\n // as something to imitate. The store id is the path's last segment (see `deriveStoreId`).\n return lifecycleSlot.run(\"exportStore\", () =>\n performStoreExport(\n {\n pglite,\n readMutationStats: () => mutationRuntime.readMutationStats(),\n ...(options.storePath != null ? { storePath: options.storePath } : {}),\n },\n exportOptions,\n ),\n );\n },\n exportDiagnostics: async (exportOptions) => {\n // Same lifecycle discipline as `exportStore` (ADR-0035): await engine-ready first (wait out a boot\n // rather than reject during it), THEN take the single slot so a concurrent export/lifecycle op is\n // refused with a typed busy error. The diagnostic dump runs the live datadir dump on `pglite`, then\n // clones it in memory — the live engine every reference here holds is never closed (the addendum's\n // whole reason for the throwaway clone over the abandoned suspend/reopen seam).\n await ready;\n return lifecycleSlot.run(\"exportDiagnostics\", () =>\n performDiagnosticExport(\n {\n pglite,\n readMutationStats: () => mutationRuntime.readMutationStats(),\n ...(options.storePath != null ? { storePath: options.storePath } : {}),\n },\n exportOptions,\n ),\n );\n },\n exportData: async (exportOptions) => {\n // Same lifecycle discipline (ADR-0035): await engine-ready first (wait out a boot rather than reject),\n // THEN take the single slot. The DRAIN runs inside the slot (the caller-side placement decision 3\n // makes): flush needs the running engine and is not lifecycle-exclusive, but the artefact must be\n // taken right after the drain, so export owns the store's lifecycle for the whole drain+dump. The\n // `-t` allowlist + enum header are resolved from the registry through the SAME projection the DDL\n // generator uses — never re-derived by string convention.\n await ready;\n return lifecycleSlot.run(\"exportData\", () =>\n performDataExport(\n {\n pglite,\n readMutationStats: () => mutationRuntime.readMutationStats(),\n flush: () => mutationRuntime.flush(),\n syncedTableNames: collectDataExportSyncedTableNames(options.registry),\n enumHeaderSql: buildDataExportEnumHeaderSql(options.registry),\n cloneCleanupSql: buildDataExportCloneCleanupSql(options.registry),\n ...(options.storePath != null ? { storePath: options.storePath } : {}),\n },\n exportOptions,\n ),\n );\n },\n };\n\n // Wire the mutation-status API over this client's shared seams (slice 4): its live-rows seam (over\n // `pglite.live` via the manager) and its one-shot `pglite.query`. The worker facade wires the SAME factory\n // over the bridge, so `client.mutations` behaves identically in both modes.\n client.mutations = createMutationsApi({\n registry: options.registry,\n subscribeLiveRows: client.subscribeLiveRows,\n query: (sql, params) => pglite.query<Record<string, unknown>>(sql, params),\n });\n\n // ─── ADR-0049 step 11c: FRESH/RESTORE commitment barrier — the LOCAL-INIT MILESTONE, PRE-EXPOSE ──────────\n // This is the earliest airtight local-initialization milestone (the FRESH/RESTORE provenance gate, D7 — NO\n // server): the durable schema and registry reconciliation (and, on a restore boot, recovery + quarantine)\n // have completed, and the drizzle read facade + client are built — the store is proven initialized. If\n // the pre-mint phase machine stood up an uncommitted opfs candidate, run the shared commitment barrier\n // (strictSync → sentinel → opfs-committed) NOW, BEFORE `resolveLocalReadReady()` resolves and the client is\n // handed out. A throw propagates straight out of this async function (exactly as a local-read-core failure\n // does — see `localReadReady`'s no-reject-binding rationale above): the returned promise rejects, the client\n // is NEVER exposed, nothing is published, the `opfs-candidate` record survives, and the next boot's classifier\n // tears the candidate down and rebuilds (invariant 3 — an uncommitted candidate is never exposed to writes).\n if (commitmentBarrierPending) {\n await runFreshCommitmentBarrier(fallbackStorePath, resolveEngineStrictSync(pglite));\n }\n\n // ─── Local-read core complete → resolve `localReadReady`, then run the write/sync tail in the background ──\n // (ADR-0041 Option B.) The durable schema and registry reconciliation are complete, and the drizzle\n // read facade + client are built — cached reads are safe now, with ZERO network. Stamp + resolve\n // `localReadReady`; on a restore boot `writeReady` coincides (recovery + quarantine already ran in the core,\n // before this read exposure — the ADR-0041 invariant). This function then RESOLVES at `localReadReady`.\n bootReportBuilder.setLocalReadReadyMs(performance.now() - bootReportBuilder.bootStartPerf);\n resolveLocalReadReady();\n if (restoreBoot) {\n bootReportBuilder.setWriteReadyMs(performance.now() - bootReportBuilder.bootStartPerf);\n resolveWriteReady();\n }\n\n // Guard the downstream stages so a tail failure on an UNCONSUMED stage (e.g. `bootSettled` in-process, where\n // only the worker awaits it) never surfaces as an unhandled rejection — a real awaiter still observes it.\n void writeReady.catch(() => undefined);\n void bootSettled.catch(() => undefined);\n void ready.catch(() => undefined);\n\n // Kick the write/sync tail (background). Its completion is today's full resolution point → `bootSettled`. A\n // tail failure lands AFTER `localReadReady` resolved, so it can no longer reject this function's returned\n // promise (as a pre-ADR-0041 boot failure would); surface it on every still-pending downstream stage instead\n // so their awaiters (a gated write, `ready`, the worker's `bootSettled`) fail loudly rather than hang.\n void runWriteAndSyncTail().then(\n () => {\n resolveBootSettled();\n // Belt-and-braces: if a `disposed` bail returned before the replay, drop the buffer so it cannot leak or\n // keep collecting (steady-state activations go straight through `ensureSynced` once `sync` is wired).\n pendingActivations = null;\n resolveSyncWired();\n },\n (error: unknown) => {\n syncDebug(\"boot write/sync tail failed after localReadReady\", { error });\n // SHOULD-FIX 4: the tail failed at/before sync start, so buffered activations can never be replayed —\n // null the buffer (bounded, no unbounded growth) and name the loss on the debug rail.\n if (pendingActivations != null && pendingActivations.size > 0) {\n syncDebug(\"boot tail failure dropped buffered activations\", { tables: [...pendingActivations] });\n }\n pendingActivations = null;\n // NIT 8: surface a signal beyond the stage rejections — move the runtime to `degraded` so a consumer\n // watching `status`/`onStatusChange` sees the boot failed, not just an awaiter of a stage promise.\n status.phase = \"degraded\";\n status.lastError = describeErrorChain(error);\n options.onStatusChange?.(status);\n rejectWriteReady(error);\n rejectReady(error);\n rejectBootSettled(error);\n // Unblock any read seam parked on `syncWired` — it will see `sync == null` and fall back to local-only.\n rejectSyncWired(error);\n },\n );\n\n return client;\n}\n\n/**\n * Every persisted subscription key declared by the registry — one per consistency group (ADR-0009\n * decision 2), not per table. Grouped tables share a subscription-state row keyed by their group;\n * ungrouped tables are singleton groups keyed by their own `shapeKey`. Deduped, since several tables\n * collapse onto one group key.\n */\nfunction allGroupSubscriptionKeys<TRegistry extends SyncTableRegistry>(registry: TRegistry): string[] {\n const keys = Object.values(registry)\n .filter((entry) => typeof entry.shape?.shapeKey === \"string\" && entry.shape.shapeKey.length > 0)\n .map((entry) => entry.consistencyGroup ?? entry.shape!.shapeKey);\n return [...new Set(keys)];\n}\n\nasync function resetSubscriptionsIfRequested(pglite: ClientPGlite, keys: string[] | undefined) {\n if (!keys || keys.length === 0) {\n return;\n }\n\n const uniqueKeys = [...new Set(keys.map((key) => key.trim()).filter((key) => key.length > 0))];\n\n if (uniqueKeys.length === 0) {\n return;\n }\n\n await pglite.electric.initMetadataTables();\n await Promise.all(uniqueKeys.map((key) => pglite.electric.deleteSubscription(key)));\n}\n\nfunction createDrizzleDatabase<TRegistry extends SyncTableRegistry>(\n client: ClientPGlite,\n schema: RegistryTables<TRegistry>,\n) {\n const relations = defineRelations(schema) as RegistryRelations<TRegistry>;\n\n const createDatabase = drizzle as unknown as (config: {\n client: ClientPGlite;\n relations: RegistryRelations<TRegistry>;\n }) => PgliteDatabase<RegistryRelations<TRegistry>>;\n\n return createDatabase({ client, relations });\n}\n\nfunction buildSchema<TRegistry extends SyncTableRegistry>(registry: TRegistry) {\n return Object.fromEntries(\n Object.entries(registry).map(([key, entry]) => [key, entry.table]),\n ) as RegistryTables<TRegistry>;\n}\n\nfunction buildViews<TRegistry extends SyncTableRegistry>(registry: TRegistry) {\n return Object.fromEntries(\n Object.entries(registry).flatMap(([key, entry]) => (entry.view != null ? [[key, entry.view]] : [])),\n ) as RegistryViews<TRegistry>;\n}\n\n/**\n * The tab-side READ handles a worker-attached client exposes (ADR-0032 S2/decision 4): a Drizzle instance\n * plus the registry views. `createSyncClient`'s SAME builders, so a query built on either client compiles\n * identically. The `client` argument is the executor Drizzle runs against:\n * - Omit it (the default `{}` stub) for a BUILD-ONLY instance — Drizzle only compiles to SQL (`.toSQL()`)\n * and the stub is never invoked; used where execution happens elsewhere (e.g. the live-rows bridge).\n * - Pass a `ClientPGlite`-shaped BRIDGE executor (its `query` routes to the worker's `guardedQuery` RPC) so\n * that awaiting a builder executes through the bridge and Drizzle's own result mapping (relational/nested\n * queries included) runs on the tab — the one-shot read path `attachSyncClient` wires (ADR-0032 decision 4).\n */\nexport function buildRegistryReadHandles<TRegistry extends SyncTableRegistry>(\n registry: TRegistry,\n client: ClientPGlite = {} as ClientPGlite,\n): {\n drizzle: PgliteDatabase<RegistryRelations<TRegistry>>;\n views: RegistryViews<TRegistry>;\n /**\n * A drizzle-database FACTORY over this registry's schema (ADR-0032 decision 4): `(client) => db`, reusing\n * the schema + relations computed ONCE here so a caller can cheaply build additional per-executor databases\n * without recomputing them. `attachSyncClient` uses it to give each `queryRaw`/`queryRawRow` its OWN\n * bridge executor carrying that call's `use` — a scoped db, never a shared mutable stash (no read races).\n */\n drizzleFor: (client: ClientPGlite) => PgliteDatabase<RegistryRelations<TRegistry>>;\n} {\n const drizzleFor = buildRegistryDrizzleFactory(registry);\n return {\n drizzle: drizzleFor(client),\n views: buildViews(registry),\n drizzleFor,\n };\n}\n\n/**\n * Compute a registry's Drizzle schema + relations ONCE and return a `(client) => db` factory over them\n * (ADR-0032 decision 4). Splitting this out of {@link buildRegistryReadHandles} lets `attachSyncClient` build\n * one base bridge database plus a fresh per-read database (each over its own executor) without paying the\n * schema/relations construction on every read — only the `client` binding differs between them.\n */\nfunction buildRegistryDrizzleFactory<TRegistry extends SyncTableRegistry>(\n registry: TRegistry,\n): (client: ClientPGlite) => PgliteDatabase<RegistryRelations<TRegistry>> {\n const relations = defineRelations(buildSchema(registry)) as RegistryRelations<TRegistry>;\n const createDatabase = drizzle as unknown as (config: {\n client: ClientPGlite;\n relations: RegistryRelations<TRegistry>;\n }) => PgliteDatabase<RegistryRelations<TRegistry>>;\n return (client) => createDatabase({ client, relations });\n}\n\nfunction buildSyncConfigFromRegistry<TRegistry extends SyncTableRegistry>(\n registry: TRegistry,\n electricUrl: string,\n): SyncConfigInput {\n return {\n electricUrl,\n localSchema: getSyncRegistrySchema(registry),\n tables: Object.fromEntries(Object.entries(registry).map(([key, entry]) => [key, buildSyncTableInput(entry, key)])),\n };\n}\n\nfunction buildSyncTableInput(entry: SyncTableEntry, tableKey: string) {\n const clientProjection = getClientProjection(entry, tableKey);\n\n return {\n name: tableKey,\n mode: entry.mode,\n primaryKey: entry.primaryKey,\n ...(entry.shape !== undefined ? { shape: entry.shape } : {}),\n clientProjection,\n // The read-path apply ladder (strategy + json casts) is resolved by the engine directly from the\n // registry entry via `resolveApplyTarget` (ADR-0029 D1/D2) — `deriveSyncColumnTypes` /\n // `classifyTableApplyStrategy` on the model, never carried through this config surface.\n // Carry the consistency group (ADR-0009 decision 2) so the sync starter buckets grouped tables\n // onto one MultiShapeStream; absent → singleton group.\n ...(entry.consistencyGroup ? { consistencyGroup: entry.consistencyGroup } : {}),\n // Carry the lifecycle axes (ADR-0021) so the sync starter can hold lazy groups out of the eager\n // boot set and provision ephemeral clusters as TEMP; absent → eager/persistent (today's path).\n ...(entry.subscription ? { subscription: entry.subscription } : {}),\n ...(entry.retention ? { retention: entry.retention } : {}),\n };\n}\n\nfunction getClientProjection(entry: SyncTableEntry, tableKey: string) {\n if (!entry.clientProjection) {\n throw new Error(`clientProjection is required for client table ${tableKey}`);\n }\n\n return entry.clientProjection;\n}\n"
53
53
  ],
54
- "mappings": ";;;;;;;;;;;;;;;;;;;AA4DA,eAAsB,oBAAoB,CAAC,SAAkD;AAAA,EAC3F,MAAM,QAAQ,kBAAkB;AAAA,EAChC,MAAM,QAAQ,gBAAgB;AAAA,EAC9B,MAAM,QAAQ,SAAS,gBAAgB;AAAA;AA6BzC,eAAsB,mBAAmB,CAAC,SAA+C;AAAA,EACvF,MAAM,QAAQ,qBAAqB;AAAA,EACnC,MAAM,QAAQ,qBAAqB;AAAA;AAmCrC,eAAsB,cAAc,CAAC,SAA4C;AAAA,EAC/E,MAAM,QAAQ,eAAe;AAAA,EAC7B,MAAM,QAAQ,mBAAmB;AAAA,EACjC,MAAM,QAAQ,iBAAiB;AAAA;AAUjC,eAAsB,cAAc,CAAC,SAA4C;AAAA,EAC/E,MAAM,QAAQ,SAAS,UAAU;AAAA,EACjC,MAAM,eAAe,OAAO;AAAA;AA4BvB,SAAS,wBAAwB,CAAC,KAA4D;AAAA,EACnG,OAAO,IAAI,kBAAkB,EAAE,QAAQ,oBAAoB,IAAI,EAAE,QAAQ,uBAAuB;AAAA;AAkBlG,eAAsB,gBAAgB,CAAC,SAAmD;AAAA,EACxF,MAAM,QAAQ,SAAS,gBAAgB;AAAA,EACvC,MAAM,QAAQ,qBAAqB;AAAA;AA+B9B,SAAS,kBAAkB,CAAC,QAAsC;AAAA,EACvE,OAAO,OAAO,UAAU,OAAO,UAAU,OAAO,SAAS,OAAO,cAAc,OAAO,eAAe;AAAA;;;ACrItG,eAAe,iBAAiB,CAAC,OAAsB,YAAmC;AAAA,EACxF,IAAI;AAAA,EACJ,MAAM,WAAW,IAAI,QAAe,CAAC,GAAG,WAAW;AAA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