Sync / foldkit-sync/journal

Accepted

interface · packages/sync/src/journal.ts:741

interface Accepted {
  readonly store: StoreCapabilities
  readonly serve: (socket: HostSocket) => void
  readonly abandon: () => void
}

An upgrade documentHost accepted. Exactly one of the two must follow: serve once the runtime has opened the socket, or abandon when it never will (the client left, the runtime refused the handshake), which releases what the upgrade built.

Members

Accepted.store

property · packages/sync/src/journal.ts:749

readonly store: StoreCapabilities

What the store under this host's journal guarantees of concurrent writes: the host is the authoritative replica, and takes its declaration from the journal it runs on (Journal.store), serializable over SQLite per transaction and over D1 per statement. The host refuses a store that cannot hold the document's laws before it accepts (a 500).

Accepted.serve

property · packages/sync/src/journal.ts:750

readonly serve: (socket: HostSocket) => void

Accepted.abandon

property · packages/sync/src/journal.ts:751

readonly abandon: () => void