OptionalelementRegistry used to translate runtime extension envelopes to the v3 wire format.
OptionalisTerminal close codes that count toward the consecutive-authentication
failure bound. Default: 4401.
OptionalisClose codes the transport will NOT reconnect from itself; the manager
rebuilds the transport and client with freshly resolved credentials.
Default: application close codes 4000-4999, matching
WebSocketTransport's default shouldReconnect.
OptionallayersEnables versioned layer-definition sync. The manager owns one
LayerLedger for its whole lifetime and passes it to every client it
builds, so version counters and tombstones survive credential rebuilds
and locally-newer records are re-pushed after each reconnect snapshot.
OptionalmaxConsecutive auth closes before settling on denied. Default: 4.
OptionalonOptionalonOptional observer for raw transport frames. It is subscribed before the
internal SyncClient on every transport, so it sees each frame before
the client applies it to the store. It must not throw.
OptionalpluginsOptionalresolveOptionalresolveAuthoritative bootstrap/reconcile hook, forwarded to every SyncClient
the manager creates. The manager keeps one hub-knowledge set for its
whole lifetime and starts rebuilt clients in reconcile mode, so
hubKnown classification and deleted-while-away semantics stay correct
across credential rebuilds.
Resolves the connection endpoint. Called once per connect cycle, so an
expired token is refreshed by returning a fresh result. Return a plain URL
(credentials in the query, the legacy form) or { url, protocols } to
offer subprotocols — bearerSubprotocols(token) keeps the token out of
the URL. Return null (or throw) to signal a mint failure; the manager
retries with exponential backoff.
OptionalretryFirst retry delay for failed connect cycles. Default: 1000ms.
OptionalretryRetry delay cap. Default: 15000ms.
OptionaltransportDI seam for tests; defaults to (url, protocols) => new WebSocketTransport(url, { protocols }).
Stable client identity. It must not change across reconnects and, for authenticated relays, must equal the server-authenticated user id so ownership authorization and reconnect echo-suppression keep working. When Plugins may impose additional identity constraints.