pub.chive.annotation.comment

chive.pub

{
  "id": "pub.chive.annotation.comment",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "eprintUri",
          "body",
          "target",
          "createdAt"
        ],
        "properties": {
          "body": {
            "type": "array",
            "items": {
              "refs": [
                "pub.chive.richtext.defs#textItem",
                "pub.chive.richtext.defs#nodeRefItem",
                "pub.chive.richtext.defs#wikidataRefItem",
                "pub.chive.richtext.defs#fieldRefItem",
                "pub.chive.richtext.defs#facetRefItem",
                "pub.chive.richtext.defs#eprintRefItem",
                "pub.chive.richtext.defs#annotationRefItem",
                "pub.chive.richtext.defs#authorRefItem",
                "pub.chive.richtext.defs#mentionItem",
                "pub.chive.richtext.defs#linkItem",
                "pub.chive.richtext.defs#tagItem",
                "pub.chive.richtext.defs#latexItem",
                "pub.chive.richtext.defs#codeBlockItem",
                "pub.chive.richtext.defs#headingItem",
                "pub.chive.richtext.defs#listItem",
                "pub.chive.richtext.defs#blockquoteItem"
              ],
              "type": "union"
            },
            "maxLength": 500,
            "description": "Rich annotation body with formatting and references"
          },
          "target": {
            "ref": "#textSpanTarget",
            "type": "ref",
            "description": "Target text span for the annotation"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          },
          "eprintUri": {
            "type": "string",
            "format": "at-uri",
            "description": "Annotated eprint URI"
          },
          "motivationUri": {
            "type": "string",
            "format": "at-uri",
            "description": "AT-URI of motivation type node (subkind=motivation)"
          },
          "schemaRevision": {
            "type": "integer",
            "minimum": 1,
            "description": "Schema revision this record was created with. Absent means revision 1."
          },
          "parentAnnotation": {
            "type": "string",
            "format": "at-uri",
            "description": "Parent annotation for threading"
          },
          "motivationFallback": {
            "type": "string",
            "description": "Fallback motivation if motivationUri not available",
            "knownValues": [
              "commenting",
              "questioning",
              "highlighting",
              "replying"
            ]
          }
        }
      },
      "description": "Inline annotation on a specific text span in an eprint"
    },
    "boundingRect": {
      "type": "object",
      "required": [
        "x1",
        "y1",
        "x2",
        "y2",
        "width",
        "height",
        "pageNumber"
      ],
      "properties": {
        "x1": {
          "type": "string",
          "description": "Left edge coordinate (as string to preserve float precision)"
        },
        "x2": {
          "type": "string",
          "description": "Right edge coordinate (as string to preserve float precision)"
        },
        "y1": {
          "type": "string",
          "description": "Top edge coordinate (as string to preserve float precision)"
        },
        "y2": {
          "type": "string",
          "description": "Bottom edge coordinate (as string to preserve float precision)"
        },
        "width": {
          "type": "string",
          "description": "Page width reference (as string to preserve float precision)"
        },
        "height": {
          "type": "string",
          "description": "Page height reference (as string to preserve float precision)"
        },
        "pageNumber": {
          "type": "integer",
          "minimum": 1,
          "description": "Page number (1-indexed for the library)"
        }
      },
      "description": "Bounding rectangle coordinates for highlight positioning. All values stored as strings to preserve floating-point precision since ATProto only supports integer type."
    },
    "textSpanTarget": {
      "type": "object",
      "required": [
        "selector"
      ],
      "properties": {
        "selector": {
          "refs": [
            "#textQuoteSelector",
            "#textPositionSelector",
            "#fragmentSelector"
          ],
          "type": "union"
        },
        "refinedBy": {
          "ref": "#positionRefinement",
          "type": "ref",
          "description": "Position refinement with page number and bounding box for visual rendering"
        },
        "versionUri": {
          "type": "string",
          "format": "at-uri",
          "description": "AT-URI of specific eprint version"
        }
      },
      "description": "Target text span for inline annotations (W3C Web Annotation compatible)"
    },
    "fragmentSelector": {
      "type": "object",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "FragmentSelector"
        },
        "value": {
          "type": "string",
          "maxLength": 200,
          "description": "Fragment identifier (e.g., page number, section ID)"
        },
        "conformsTo": {
          "type": "string",
          "format": "uri",
          "description": "Fragment syntax specification"
        }
      },
      "description": "W3C Fragment Selector"
    },
    "textQuoteSelector": {
      "type": "object",
      "required": [
        "type",
        "exact"
      ],
      "properties": {
        "type": {
          "type": "string",
          "const": "TextQuoteSelector"
        },
        "exact": {
          "type": "string",
          "maxLength": 1000
        },
        "prefix": {
          "type": "string",
          "maxLength": 100
        },
        "suffix": {
          "type": "string",
          "maxLength": 100
        }
      },
      "description": "W3C Text Quote Selector"
    },
    "positionRefinement": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "end": {
          "type": "integer",
          "minimum": 0,
          "description": "Approximate character end offset"
        },
        "type": {
          "type": "string",
          "const": "TextPositionSelector"
        },
        "start": {
          "type": "integer",
          "minimum": 0,
          "description": "Approximate character start offset"
        },
        "pageNumber": {
          "type": "integer",
          "minimum": 0,
          "description": "0-indexed page number"
        },
        "boundingRect": {
          "ref": "#boundingRect",
          "type": "ref",
          "description": "Bounding rectangle for visual positioning"
        }
      },
      "description": "Position refinement for precise visual rendering of annotations"
    },
    "textPositionSelector": {
      "type": "object",
      "required": [
        "type",
        "start",
        "end"
      ],
      "properties": {
        "end": {
          "type": "integer",
          "minimum": 0
        },
        "type": {
          "type": "string",
          "const": "TextPositionSelector"
        },
        "start": {
          "type": "integer",
          "minimum": 0
        }
      },
      "description": "W3C Text Position Selector"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}

Validate Record

Validate a record against pub.chive.annotation.comment

Validation Options
Automatically resolve and include external schemas for full validation
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:7natp5xae72bddaqlkef2t4e
CID
bafyreiflluk65y3oi32uinninkjrs3hv3gfeh5isvnli3fjmba7mi2a5zm
Indexed At
2026-05-04 17:29 UTC
AT-URI
at://did:plc:7natp5xae72bddaqlkef2t4e/com.atproto.lexicon.schema/pub.chive.annotation.comment

Referenced Schemas (16)

Lexicon Garden

@