You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Integrates the Subduction sync engine
(github.com/inkandswitch/subduction) directly into the core
automerge-repo package as a new sync source alongside the legacy
StorageSubsystem + NetworkSubsystem path.
Why integrate rather than wrap: Subduction's sedimentree-based,
fingerprint-driven sync model needs hooks into document lifecycle
events that the existing DocumentSource interface already provides.
Folding it into core (under packages/automerge-repo/src/subduction/)
means consumers install one package and Wasm modules auto-init via
the fullfat entrypoint.
What lands in this commit:
- src/subduction/source.ts -- SubductionSource implements
DocumentSource. Owns the per-doc SedimentreeEntry map, manages a
throttled #save with a single-flight gate, derives fragment
boundary requests, and drains commits via flush().
- src/subduction/storage.ts -- SubductionStorageBridge wraps any
StorageAdapterInterface to implement Subduction's
SedimentreeStorage. Tracks pending writes per SedimentreeId so
awaitSettled(sids?) can be scoped.
- src/subduction/network.ts -- websocket-transport adapter for
Subduction's Transport interface, with reconnect.
- src/subduction/helpers.ts -- DocumentId <-> SedimentreeId
conversions (zero-pad 16-byte DocIds to 32-byte SedimentreeIds);
automergeMeta() symbol-introspection helper to access Automerge's
internal handle.
- Persistent and in-memory signers; isomorphic-ws transport.
- IDB batching + SharedWorker compatibility for browser usage.
- Ephemeral message support routed through Subduction so peers
connected only via websocket still receive ephemerals.
- Examples (react-counter, react-todo, react-use-presence,
svelte-counter, sync-server) ported to the new repo.
- Subduction-tagged npm dist-tag, Nix flake updates, .npmrc.
Includes the Subduction batching API hookup (commits/fragments
batched into a single round-trip on the wasm boundary) and
NetworkAdapterInterface.state for observing adapter state changes
from the bridge.
Squashed from 21 work-in-progress commits (initial port through
"Add NetworkAdapterInterface.state"); see refs/backup/subductionjs-
original-tip for the unsquashed history.
0 commit comments