Returns the current snapshot to send when another peer asks for state. Called inside an effect after the deterministic jitter has elapsed, so it sees the latest committed state.
OptionalenabledDisable when the consumer hasn't initialised state yet (e.g. the file id isn't known). The hook becomes a no-op while disabled.
Local user's id. Used to address responses and apply jitter.
OptionalrequestMaximum jitter window (ms) before answering a state-request. Each
peer picks a deterministic offset within this window based on a
hash of its localUserId, so the peer set fans out responses
instead of stampeding the requester.
Base topic for this protocol's state exchange. Two topics are
derived: ${topicPrefix}.state-request and ${topicPrefix}.state-response.
Use the same prefix the protocol's other relay topics share, e.g.
'hiyve.annotations' or 'hiyve.collab.polls'.
Called for every snapshot the local peer receives in response to its own request. Expected to be idempotent — multiple peers may answer the same request.