{
"id": "page.corvus.core",
"defs": {
"run": {
"type": "object",
"required": [
"opId",
"atomIdx",
"value"
],
"properties": {
"opId": {
"type": "string",
"description": "the op hash of the op that minted the run"
},
"value": {
"type": "unknown",
"description": "The run's payload — a string for text sequences (one atom per character), an array for list sequences (one atom per element)."
},
"atomIdx": {
"type": "integer",
"description": "the index of the first atom in the run (inclusive)"
}
},
"description": "A contiguous range of live atoms in a `#sq`"
},
"set": {
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"ref": "#setItem",
"type": "ref"
},
"description": "The OR-set as items"
}
},
"description": "OR-set materialization."
},
"counter": {
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"type": "integer",
"description": "Sum of applied increment deltas. May be negative."
}
},
"description": "PN-counter materialization."
},
"setItem": {
"type": "object",
"required": [
"value",
"opId",
"removed"
],
"properties": {
"opId": {
"type": "string",
"description": "the op id of the operation that last updated this item in the set"
},
"value": {
"type": "unknown",
"description": "The value of the OR-set item"
},
"removed": {
"type": "boolean",
"description": "whether the item is removed"
}
},
"description": "An OR-set item"
},
"register": {
"type": "object",
"required": [
"value",
"opId"
],
"properties": {
"opId": {
"type": "string",
"description": "the op hash of the op that last wrote to the register"
},
"value": {
"type": "unknown",
"description": "Committed value (LWW winner)."
}
},
"description": "LWW scalar register materialization."
},
"sequence": {
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"refs": [
"#run",
"#tombstone"
],
"type": "union",
"closed": true
},
"description": "The sequence as runs and tombstones in document order."
}
},
"description": "RGA sequence materialization (text or list)."
},
"tombstone": {
"type": "object",
"required": [
"opId",
"atomIdx",
"length"
],
"properties": {
"opId": {
"type": "string",
"description": "the op id of the operation that minted the tombstone"
},
"length": {
"type": "integer",
"description": "Number of consecutive tombstoned atoms in the range."
},
"atomIdx": {
"type": "integer",
"description": "the index of the first atom in the tombstone"
}
},
"description": "A contiguous range of deleted atoms in a `#sq`"
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"description": "Shared primitives used across the corvus lexicons: id types (`#opId`, `#atomId`), the generic value primitives the applier materializes scalar / counter / set / sequence fields into (`#register`, `#counter`, `#orSet`, `#seq`), and the supporting types for `#seq` (`#run`, `#tombstone`). The `#block` def captures the envelope shape every variant in `page.corvus.block` inlines (`id`, `parent`, `afterSibling`); `#children` is a sentinel referenced by `editableAs` on ordered-children fields. Variants in `page.corvus.block` declare each editable field's primitive shape via `editableAs`; the applier materializes the field into a `page.corvus.materialized#blockProperty` using the named primitive."
}