# space.ziran.op

> Published by [lexicons.pds.ziran.space](https://lexicon.garden/identity/did:plc:axdexdy7p7yvuunn2mvuvy32)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:axdexdy7p7yvuunn2mvuvy32/space.ziran.op)
- [Documentation](https://lexicon.garden/lexicon/did:plc:axdexdy7p7yvuunn2mvuvy32/space.ziran.op/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:axdexdy7p7yvuunn2mvuvy32/space.ziran.op/examples)

## Definitions

### `space.ziran.op`

**Type**: `record`

One tp-sync frame for a document, written by any member into their own repo. Ops are never deleted: a document is always rebuildable from an initial checkpoint plus the full op history. Per-author order is the repo's rev order; cross-author order is causal via parents, with deterministic (rev, author) tiebreak between concurrent siblings.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `doc` | `string` (tid) | Yes | rkey of the space.ziran.doc record this op belongs to. |
| `bytes` | `bytes` | Yes | The tp-sync frame payload. |
| `parents` | `array` | Yes | Op-DAG heads the author had seen when this op was created. Empty for a document's first op. |

### `space.ziran.op#parent`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `rkey` | `string` (tid) | Yes | rkey of the parent op record in the author's repo. |
| `author` | `string` (did) | Yes | DID of the parent op's author. |

## Raw Schema

```json
{
  "id": "space.ziran.op",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "doc",
          "parents",
          "bytes"
        ],
        "properties": {
          "doc": {
            "type": "string",
            "format": "tid",
            "description": "rkey of the space.ziran.doc record this op belongs to."
          },
          "bytes": {
            "type": "bytes",
            "maxLength": 1000000,
            "description": "The tp-sync frame payload."
          },
          "parents": {
            "type": "array",
            "items": {
              "ref": "#parent",
              "type": "ref"
            },
            "description": "Op-DAG heads the author had seen when this op was created. Empty for a document's first op."
          }
        }
      },
      "description": "One tp-sync frame for a document, written by any member into their own repo. Ops are never deleted: a document is always rebuildable from an initial checkpoint plus the full op history. Per-author order is the repo's rev order; cross-author order is causal via parents, with deterministic (rev, author) tiebreak between concurrent siblings."
    },
    "parent": {
      "type": "object",
      "required": [
        "author",
        "rkey"
      ],
      "properties": {
        "rkey": {
          "type": "string",
          "format": "tid",
          "description": "rkey of the parent op record in the author's repo."
        },
        "author": {
          "type": "string",
          "format": "did",
          "description": "DID of the parent op's author."
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
