RoomReplicator
Creates a Quilter over Room.channel(id) in one call.
This is a thin convenience wrapper that eliminates the three-step wiring pattern:
// Before:
Quilter(
replica = ReplicaId(room.selfId.value),
seam = room.channel(channelId),
initial = initial,
messageSerializer = QuiltMessage.serializer(stateSerializer),
scope = scope,
config = config,
)
// After:
RoomReplicator(room, channelId, initial, stateSerializer, scope)The admit-gating guarantee of Room.channel is preserved unchanged — the underlying us.tractat.kuilt.core.Seam only surfaces admitted peers, so this replicator will never send state to unadmitted peers.
Return
a fully wired Quilter<S> whose Quilter.replica is derived from Room.selfId.
Parameters
the Room whose Room.channel provides the admit-gated us.tractat.kuilt.core.Seam.
channel identifier passed to Room.channel. Same id on both sides of a 2-peer room maps to the same logical channel.
the starting state (typically the CRDT's zero / empty value).
a KSerializer for S. The wrapper derives the QuiltMessage envelope serializer internally.
the CoroutineScope for background replication coroutines. In tests pass backgroundScope from kotlinx.coroutines.test.TestScope.
optional tuning; defaults to QuilterConfig production defaults.