Repository navigation
v0.28.0
Added
rxdbis an optional peer, loaded lazily inLocalStore.init()/
removeDatabase()andSyncController.start(). A replica-less app installs
without it; an app that replicates adds it explicitly. NewReplicaStorage
andReplicaChangetypes replace therxdbtypes on the public surface, so
the declarations name norxdbtype.test:distfails on a staticrxdbor
@interop/was-sync/rxdbimport indist(WR-44).SyncControllerdeclares the session'swriterIdto the server on every push
(was-sync'swriterIdreplication option, sent as theWriter-Idheader).
The newWasSyncConfig.declareWriterId(defaulttrue) opts out, withholding
the label from the wire while the payload's LWW stamp is unchanged (WR-53).
Changed
-
BREAKING:
isAuthErroris no longer re-exported from the root entry.
Import it from@interop/was-sync/rxdb(WR-44). -
BREAKING:
LocalStore.rxCollectionis@internaland stripped from the
published declarations; its return type is RxDB's. Tests that reached the RxDB
collection through it must go throughLocalStore's own verbs (WR-44). -
resolveSpaceOwnerresolves the owner through wallet-core's
discoverAccountLoginstead of its own fetch, parse, and resolve body; the
location check runs upstream. -
provisionDevGrantspromotes the Space controller through wallet-core's
ensurePromotedSpaceControllerunder the configured Space name, so the
promotion reads first and heals an interrupted run. -
BREAKING: every
edvcollection is read through a verifying descriptor
source under was-client'srequireGovernedpolicy.WasRemoteStoregains
descriptorSource, wallet-core'slogGovernedDescriptorSourceover each
collection'smeta/log(invoked with the collection's own grant), checked
against the Space owner's did:webvh account log. The owner is resolved from
the Space's world-readableid/did.jsonl(resolveSpaceOwner): the log is
fetched, resolved, and the resolved DID's log location is checked against the
URL it was served from. The login-time read, the sync bootstrap's install,
LocalStore's unknown-epoch refresh, andSharedCollectionReaderall acquire
through it; a descriptor is never taken from the Metadata object's
encryptionprojection any more.remoteDescriptorSourceis removed from the
root entry. A collection with no governing log stays fail-closed. The Space
owner's verified view and the chain-head pins are held in memory for the
connected activation on oneSpaceTrustthe login-time read and the sync
bootstrap share (fromGrantstakes it astrust), so the owner's log is
fetched and verified once per activation. A failed Space-owner resolution is
retried on the next read rather than remembered, and a shared collection whose
descriptor read fails surfaces that failure as itself instead of as
SharedCollectionUnavailableError. -
was-client's
UnverifiedDescriptorError(a source that does not verify the
governing log) surfaces as itself at every call site:
SharedCollectionReader.openrethrows it ahead of
SharedCollectionUnavailableError, andLocalStoresurfaces it from the
decrypt that met it and every later one, instead of the envelope's
unknown-epoch error. A governing log the source refuses to adopt (a forged or
discontinuous chain, vh-resource-log'sisResourceLogRefusal) surfaces the
same way at both sites. Any other refresh failure inLocalStoreis logged at
warnand re-asked on the next unknown-epoch decrypt. -
resolveSpaceOwnertakes an optionalpinStore, andcreateSpaceTrust
passes its own, so the owner's account log is checked for chain-head
continuity across resolutions within one activation like every collection log
is. -
createSpaceTrust,SpaceTrust,resolveSpaceOwner, and
acquireGovernedDescriptorare exported from the root entry, so a consumer
building its ownWasRemoteStoreorLocalStorecan share one trust across
stores and build a verifying descriptor source. -
provisionDevGrantsbuilds what a wallet's account genesis builds: a Space
promoted to a did:webvh owner whose log is published atid/did.jsonl, and
every private collection's epoch zero installed as the genesis of its
meta/logthrough the log-governed descriptor store.provisionerDidis now
the did:webvh. The server URL must be one did:webvh accepts (https://, or
http://on the literal hostlocalhost). The Metadata-write probe leaves
encryptionout of the body it writes back, since the server derives it from
the log head. -
Remove
WasRemoteStore.readCollectionEncryption(the Metadata object's
encryptionprojection is no longer read for a descriptor;descriptorSource
is the read) andWasRemoteStore.markCollectionEncryptedwith the sync
bootstrap's{ encryption: { scheme: 'edv' } }declaration write. A
collection is declared encrypted by its governing log's genesis, and one with
no log stays fail-closed under the policy above, so the bare declaration had
nothing left to do. -
Add
@interop/vh-resource-logas a dependency. -
Bump
@interop/was-syncto 0.9.0 and@interop/was-clientto 0.94.0. The ack
write-back now stamps a pushed row'supdatedAt,updatedAtCounter,
originId,createdBy, andmetafrom the write response itself, so a row
this replica created no longer depends on the feed echo for its server stamp
(needs a server answering201/200with a body, was-teaching-server
0.42.0 or later). The replica schema also gains an optional row-level
writerIdat the same schema version, so RxDB refuses to reopen an existing
replica: as with 0.27.0, every remembered browser clears its local data and
logs in again once, and local writes not yet pushed are lost with the old
replica. Nothing in this library reads the push ack, so no code changed.