Extends · closed
args.| opCount Advisory count of logical operations, which can exceed the list length for run-length ops. | optional | |
| ops Operations applied in order when the document is replayed. | of ⟨Block = ⟨Block⟩⟩ | optional |
The change body is where the editing happens in a Change: an ordered list of operations that the daemon applies one after another when it replays the document. Everything else in a Change is bookkeeping about where the body fits in the history.
This page defines the change/body struct, the payload inside a Change blob. Its formal schema is attached as the schemaDefinition in this document's metadata, so the app can show it.
ops is the list of operations, each a map tagged with a type. Order matters. Each op receives an id made of the Change's timestamp, its position in this list and the signer, and later ops in the same Change may refer back to earlier ones by position. opCount is a hint for consumers. Some ops are run-length encoded (one MoveBlocks can place many blocks), so the number of logical operations may exceed the number of list items. The daemon and the SDK write it, and nothing reads it today.
A minimal body, which the daemon's PrepareChange emits for the Seed app, has moves first, then deletions, then one SetAttributes for all metadata, then one ReplaceBlock per changed block. Documents explains why.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime