{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "StoryLocator": {
      "description": "Story scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "body"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "headerFooterSlot"
            },
            "section": {
              "$ref": "#/$defs/SectionAddress"
            },
            "headerFooterKind": {
              "enum": [
                "header",
                "footer"
              ]
            },
            "variant": {
              "enum": [
                "default",
                "first",
                "even"
              ]
            },
            "resolution": {
              "enum": [
                "effective",
                "explicit"
              ]
            },
            "onWrite": {
              "enum": [
                "materializeIfInherited",
                "editResolvedPart",
                "error"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "section",
            "headerFooterKind",
            "variant"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "headerFooterPart"
            },
            "refId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "refId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "footnote"
            },
            "noteId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "noteId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "endnote"
            },
            "noteId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "noteId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            },
            "storyType": {
              "const": "textbox"
            },
            "textboxId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "storyType",
            "textboxId"
          ]
        }
      ]
    },
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    },
    "SelectionTarget": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "selection"
        },
        "start": {
          "$ref": "#/$defs/SelectionPoint"
        },
        "end": {
          "$ref": "#/$defs/SelectionPoint"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        },
        "coordinateSpace": {
          "$ref": "#/$defs/TextCoordinateSpace"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "start",
        "end"
      ]
    },
    "SelectionPoint": {
      "description": "A point in the document. Use {kind:'text', blockId, offset} for character positions or {kind:'nodeEdge', node:{kind:'block', nodeType, nodeId}, edge:'before'|'after'} for block boundaries.",
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "text"
            },
            "blockId": {
              "type": "string"
            },
            "offset": {
              "type": "integer",
              "minimum": 0
            },
            "story": {
              "$ref": "#/$defs/StoryLocator"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "blockId",
            "offset"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "nodeEdge"
            },
            "node": {
              "$ref": "#/$defs/SelectionEdgeNodeAddress"
            },
            "edge": {
              "enum": [
                "before",
                "after"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "node",
            "edge"
          ]
        }
      ]
    },
    "SelectionEdgeNodeAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "enum": [
            "paragraph",
            "heading",
            "table",
            "tableOfContents",
            "sdt",
            "image"
          ]
        },
        "nodeId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "TextCoordinateSpace": {
      "enum": [
        "visible",
        "tracked"
      ]
    },
    "BlockNodeAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "enum": [
            "paragraph",
            "heading",
            "listItem",
            "table",
            "tableRow",
            "tableCell",
            "tableOfContents",
            "image",
            "sdt"
          ]
        },
        "nodeId": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    },
    "SDProjectionReviewMode": {
      "enum": [
        "final",
        "original",
        "redline"
      ]
    },
    "SDProjectionScope": {
      "oneOf": [
        {
          "$ref": "#/$defs/BlockNodeAddress"
        },
        {
          "$ref": "#/$defs/SelectionTarget"
        }
      ]
    },
    "TextAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "text"
        },
        "blockId": {
          "type": "string"
        },
        "range": {
          "$ref": "#/$defs/Range"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "blockId",
        "range"
      ]
    },
    "Range": {
      "type": "object",
      "properties": {
        "start": {
          "type": "integer"
        },
        "end": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "required": [
        "start",
        "end"
      ]
    },
    "SDInboundInlineNode": {
      "oneOf": [
        {
          "$ref": "#/$defs/SDInboundRun"
        },
        {
          "$ref": "#/$defs/SDInboundHyperlink"
        },
        {
          "$ref": "#/$defs/SDInboundLineBreak"
        }
      ]
    },
    "SDInboundRun": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "run"
        },
        "run": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "styleRef": {
              "type": "string"
            },
            "props": {
              "$ref": "#/$defs/SDInboundRunProps"
            }
          },
          "additionalProperties": false,
          "required": [
            "text"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "run"
      ]
    },
    "SDInboundRunProps": {
      "type": "object",
      "properties": {
        "bold": {
          "type": "boolean"
        },
        "italic": {
          "type": "boolean"
        },
        "underline": {
          "$ref": "#/$defs/SDInboundUnderline"
        },
        "strikethrough": {
          "type": "boolean"
        },
        "color": {
          "$ref": "#/$defs/SDInboundColor"
        },
        "highlight": {
          "const": "yellow"
        },
        "shading": {
          "$ref": "#/$defs/SDInboundShading"
        },
        "fontSize": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "fontFamily": {
          "type": "string",
          "minLength": 1
        },
        "verticalAlign": {
          "enum": [
            "baseline",
            "superscript",
            "subscript"
          ]
        }
      },
      "additionalProperties": false
    },
    "SDInboundUnderline": {
      "type": "object",
      "properties": {
        "style": {
          "const": "single"
        }
      },
      "additionalProperties": false
    },
    "SDInboundColor": {
      "type": "object",
      "properties": {
        "model": {
          "const": "rgb"
        },
        "value": {
          "type": "string",
          "pattern": "^[0-9A-Fa-f]{6}$"
        }
      },
      "additionalProperties": false,
      "required": [
        "model",
        "value"
      ]
    },
    "SDInboundShading": {
      "type": "object",
      "properties": {
        "pattern": {
          "type": "string"
        },
        "fill": {
          "$ref": "#/$defs/SDInboundColor"
        },
        "color": {
          "$ref": "#/$defs/SDInboundColor"
        }
      },
      "additionalProperties": false
    },
    "SDInboundHyperlink": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "hyperlink"
        },
        "hyperlink": {
          "type": "object",
          "properties": {
            "href": {
              "type": "string",
              "pattern": "^(?:[Hh][Tt][Tt][Pp][Ss]?:|[Mm][Aa][Ii][Ll][Tt][Oo]:)"
            },
            "tooltip": {
              "type": "string"
            },
            "targetFrame": {
              "type": "string"
            },
            "history": {
              "type": "boolean"
            },
            "inlines": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/SDInboundHyperlinkLeaf"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "href",
            "inlines"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "hyperlink"
      ]
    },
    "SDInboundHyperlinkLeaf": {
      "oneOf": [
        {
          "$ref": "#/$defs/SDInboundRun"
        },
        {
          "$ref": "#/$defs/SDInboundLineBreak"
        }
      ]
    },
    "SDInboundLineBreak": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "lineBreak"
        },
        "lineBreak": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "lineBreak"
      ]
    },
    "SDInboundParagraphProps": {
      "type": "object",
      "properties": {
        "alignment": {
          "enum": [
            "left",
            "center",
            "right",
            "justify"
          ]
        },
        "indent": {
          "$ref": "#/$defs/SDInboundParagraphIndent"
        },
        "spacing": {
          "$ref": "#/$defs/SDInboundParagraphSpacing"
        }
      },
      "additionalProperties": false
    },
    "SDInboundParagraphIndent": {
      "type": "object",
      "properties": {
        "start": {
          "type": "number"
        },
        "end": {
          "type": "number"
        },
        "left": {
          "type": "number"
        },
        "right": {
          "type": "number"
        },
        "firstLine": {
          "type": "number"
        },
        "hanging": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "SDInboundParagraphSpacing": {
      "type": "object",
      "properties": {
        "before": {
          "type": "number"
        },
        "after": {
          "type": "number"
        },
        "line": {
          "type": "number"
        },
        "lineRule": {
          "enum": [
            "auto",
            "exact",
            "atLeast"
          ]
        }
      },
      "additionalProperties": false
    },
    "SDInboundListLevel": {
      "type": "object",
      "properties": {
        "level": {
          "type": "integer",
          "minimum": 0,
          "maximum": 8
        },
        "kind": {
          "enum": [
            "ordered",
            "bullet"
          ]
        },
        "format": {
          "enum": [
            "decimal",
            "lowerLetter",
            "upperLetter",
            "lowerRoman",
            "upperRoman"
          ]
        },
        "text": {
          "type": "string",
          "pattern": "^%[1-9][.)]$"
        },
        "start": {
          "type": "integer",
          "minimum": 1
        }
      },
      "additionalProperties": false,
      "required": [
        "level",
        "kind"
      ]
    },
    "SDInboundListItem": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "level": {
          "type": "integer",
          "minimum": 0,
          "maximum": 8
        },
        "path": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 0
          }
        },
        "marker": {
          "type": "string"
        },
        "content": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SDInboundContentNode"
          },
          "minItems": 1
        }
      },
      "additionalProperties": false,
      "required": [
        "level",
        "content"
      ]
    },
    "SDInboundContentNode": {
      "oneOf": [
        {
          "$ref": "#/$defs/SDInboundParagraph"
        },
        {
          "$ref": "#/$defs/SDInboundHeading"
        },
        {
          "$ref": "#/$defs/SDInboundList"
        },
        {
          "$ref": "#/$defs/SDInboundTable"
        },
        {
          "$ref": "#/$defs/SDInboundHorizontalRule"
        }
      ]
    },
    "SDInboundParagraph": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "paragraph"
        },
        "paragraph": {
          "type": "object",
          "properties": {
            "inlines": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/SDInboundInlineNode"
              }
            },
            "styleRef": {
              "type": "string"
            },
            "props": {
              "$ref": "#/$defs/SDInboundParagraphProps"
            }
          },
          "additionalProperties": false,
          "required": [
            "inlines"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "paragraph"
      ]
    },
    "SDInboundHeading": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "heading"
        },
        "heading": {
          "type": "object",
          "properties": {
            "level": {
              "type": "integer",
              "minimum": 1,
              "maximum": 6
            },
            "inlines": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/SDInboundInlineNode"
              }
            },
            "styleRef": {
              "type": "string"
            },
            "props": {
              "$ref": "#/$defs/SDInboundParagraphProps"
            }
          },
          "additionalProperties": false,
          "required": [
            "level",
            "inlines"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "heading"
      ]
    },
    "SDInboundList": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "list"
        },
        "list": {
          "type": "object",
          "properties": {
            "levels": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/SDInboundListLevel"
              }
            },
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/SDInboundListItem"
              },
              "minItems": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "items"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "list"
      ]
    },
    "SDInboundTable": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "table"
        },
        "table": {
          "type": "object",
          "properties": {
            "rows": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "cells": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "props": {
                          "$ref": "#/$defs/SDInboundCellProps"
                        },
                        "colSpan": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "rowSpan": {
                          "type": "integer",
                          "minimum": 1
                        },
                        "header": {
                          "type": "boolean"
                        },
                        "content": {
                          "type": "array",
                          "items": {
                            "$ref": "#/$defs/SDInboundContentNode"
                          },
                          "minItems": 1
                        }
                      },
                      "additionalProperties": false,
                      "required": [
                        "content"
                      ]
                    },
                    "minItems": 1
                  }
                },
                "additionalProperties": false,
                "required": [
                  "cells"
                ]
              },
              "minItems": 1
            }
          },
          "additionalProperties": false,
          "required": [
            "rows"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "table"
      ]
    },
    "SDInboundCellProps": {
      "type": "object",
      "properties": {
        "verticalAlign": {
          "enum": [
            "top",
            "center",
            "bottom"
          ]
        },
        "shading": {
          "$ref": "#/$defs/SDInboundColor"
        },
        "padding": {
          "$ref": "#/$defs/SDInboundCellPadding"
        }
      },
      "additionalProperties": false
    },
    "SDInboundCellPadding": {
      "type": "object",
      "properties": {
        "top": {
          "type": "number",
          "minimum": 0
        },
        "right": {
          "type": "number",
          "minimum": 0
        },
        "bottom": {
          "type": "number",
          "minimum": 0
        },
        "left": {
          "type": "number",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "SDInboundHorizontalRule": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "kind": {
          "const": "horizontalRule"
        },
        "horizontalRule": {
          "type": "object",
          "properties": {},
          "additionalProperties": false
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "horizontalRule"
      ]
    },
    "TextMutationRange": {
      "type": "object",
      "properties": {
        "from": {
          "type": "integer"
        },
        "to": {
          "type": "integer"
        }
      },
      "additionalProperties": false,
      "required": [
        "from",
        "to"
      ]
    },
    "SDResolvedProjectionScope": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "story"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "block"
            },
            "target": {
              "$ref": "#/$defs/BlockNodeAddress"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "target"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "range"
            },
            "target": {
              "$ref": "#/$defs/SelectionTarget"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "target"
          ]
        }
      ]
    },
    "SDContentProjectionResult": {
      "type": "object",
      "properties": {
        "format": {
          "$ref": "#/$defs/SDProjectionFormat"
        },
        "content": {
          "type": "string"
        },
        "status": {
          "$ref": "#/$defs/SDProjectionStatus"
        },
        "outcome": {
          "enum": [
            "preserved",
            "preserved-with-warnings",
            "simplified",
            "rejected",
            "no-op",
            "invalid-target",
            "outdated"
          ]
        },
        "reviewMode": {
          "$ref": "#/$defs/SDProjectionReviewMode"
        },
        "evaluatedRevision": {
          "type": "string"
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        },
        "scope": {
          "$ref": "#/$defs/SDResolvedProjectionScope"
        },
        "lossy": {
          "type": "boolean"
        },
        "diagnostics": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SDProjectionDiagnostic"
          }
        },
        "blocks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SDProjectionBlockMapEntry"
          }
        },
        "annotations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SDProjectionAnnotation"
          }
        },
        "sourceMap": {
          "$ref": "#/$defs/SDProjectionSourceMap"
        }
      },
      "additionalProperties": false,
      "required": [
        "format",
        "content",
        "status",
        "outcome",
        "reviewMode",
        "evaluatedRevision",
        "story",
        "scope",
        "lossy",
        "diagnostics",
        "blocks",
        "annotations"
      ]
    },
    "SDProjectionFormat": {
      "enum": [
        "html",
        "markdown"
      ]
    },
    "SDProjectionStatus": {
      "enum": [
        "success",
        "warning",
        "failed"
      ]
    },
    "SDProjectionDiagnostic": {
      "type": "object",
      "properties": {
        "code": {
          "enum": [
            "projection-normalized-construct",
            "projection-downgraded-construct",
            "projection-unsupported-construct",
            "projection-placeholder-emitted",
            "projection-annotation-omitted",
            "projection-numbering-unresolved",
            "projection-source-coverage-incomplete",
            "projection-scope-unsupported",
            "projection-limit-exceeded",
            "projection-revision-changed",
            "projection-malformed-source"
          ]
        },
        "severity": {
          "enum": [
            "error",
            "warning",
            "info"
          ]
        },
        "message": {
          "type": "string"
        },
        "path": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ]
          }
        },
        "construct": {
          "$ref": "#/$defs/SDProjectionConstruct"
        },
        "disposition": {
          "$ref": "#/$defs/SDProjectionDisposition"
        },
        "lossy": {
          "type": "boolean"
        },
        "source": {
          "type": "object",
          "properties": {
            "story": {
              "$ref": "#/$defs/StoryLocator"
            },
            "blockId": {
              "type": "string"
            },
            "range": {
              "$ref": "#/$defs/Range"
            },
            "coordinateSpace": {
              "const": "tracked"
            },
            "changeIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "commentIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "additionalProperties": false,
          "required": [
            "story"
          ]
        },
        "output": {
          "type": "object",
          "properties": {
            "format": {
              "$ref": "#/$defs/SDProjectionFormat"
            },
            "range": {
              "$ref": "#/$defs/Range"
            }
          },
          "additionalProperties": false,
          "required": [
            "format"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "code",
        "severity",
        "message",
        "construct",
        "disposition",
        "lossy",
        "source"
      ]
    },
    "SDProjectionConstruct": {
      "enum": [
        "document",
        "source",
        "text",
        "paragraph",
        "emptyParagraph",
        "softBreak",
        "lineBreak",
        "heading",
        "bold",
        "italic",
        "underline",
        "strike",
        "hyperlink",
        "list",
        "listLabel",
        "table",
        "tableHeader",
        "tableRow",
        "tableCell",
        "colSpan",
        "rowSpan",
        "horizontalRule",
        "inlineCode",
        "codeBlock",
        "image",
        "field",
        "contentControl",
        "math",
        "drawing",
        "embeddedObject",
        "sectionBreak",
        "pageBreak",
        "columnBreak",
        "trackedChange",
        "comment",
        "scope",
        "placeholder"
      ]
    },
    "SDProjectionDisposition": {
      "enum": [
        "preserved",
        "normalized",
        "downgraded",
        "placeholder",
        "omitted",
        "rejected"
      ]
    },
    "SDProjectionBlockMapEntry": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "nodeType": {
              "enum": [
                "paragraph",
                "heading",
                "listItem",
                "table",
                "tableRow",
                "tableCell",
                "tableOfContents",
                "image",
                "sdt"
              ]
            },
            "output": {
              "$ref": "#/$defs/Range"
            },
            "parentBlockId": {
              "type": "string"
            },
            "changeIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "commentIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "identity": {
              "const": "public"
            },
            "blockId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "nodeType",
            "output",
            "identity",
            "blockId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "nodeType": {
              "enum": [
                "paragraph",
                "heading",
                "listItem",
                "table",
                "tableRow",
                "tableCell",
                "tableOfContents",
                "image",
                "sdt"
              ]
            },
            "output": {
              "$ref": "#/$defs/Range"
            },
            "parentBlockId": {
              "type": "string"
            },
            "changeIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "commentIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "identity": {
              "const": "unavailable"
            },
            "identityUnavailableReason": {
              "const": "positionDerivedFallback"
            }
          },
          "additionalProperties": false,
          "required": [
            "nodeType",
            "output",
            "identity",
            "identityUnavailableReason"
          ]
        }
      ]
    },
    "SDProjectionAnnotation": {
      "type": "object",
      "properties": {
        "kind": {
          "enum": [
            "trackedChange",
            "comment"
          ]
        },
        "id": {
          "type": "string"
        },
        "blockIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "sourceTarget": {
          "$ref": "#/$defs/TextTarget"
        },
        "outputRanges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Range"
          }
        },
        "status": {
          "enum": [
            "emitted",
            "partiallyEmitted",
            "omitted"
          ]
        },
        "omittedReason": {
          "enum": [
            "reviewMode",
            "unsupported"
          ]
        },
        "side": {
          "enum": [
            "inserted",
            "deleted",
            "source",
            "destination",
            "formatting"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "id",
        "blockIds",
        "outputRanges",
        "status"
      ]
    },
    "TextTarget": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "text"
        },
        "segments": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextSegment"
          },
          "minItems": 1
        },
        "story": {
          "$ref": "#/$defs/StoryLocator"
        },
        "coordinateSpace": {
          "$ref": "#/$defs/TextCoordinateSpace"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "segments"
      ]
    },
    "TextSegment": {
      "type": "object",
      "properties": {
        "blockId": {
          "type": "string"
        },
        "range": {
          "$ref": "#/$defs/Range"
        }
      },
      "additionalProperties": false,
      "required": [
        "blockId",
        "range"
      ]
    },
    "SDProjectionSourceMap": {
      "type": "object",
      "properties": {
        "version": {
          "const": "sd-projection-source-map/1"
        },
        "outputCoordinateSpace": {
          "const": "utf16"
        },
        "sourceCoordinateSpace": {
          "const": "tracked"
        },
        "entries": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/SDProjectionSourceMapTextEntry"
              },
              {
                "$ref": "#/$defs/SDProjectionSourceMapSyntheticEntry"
              }
            ]
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "version",
        "outputCoordinateSpace",
        "sourceCoordinateSpace",
        "entries"
      ]
    },
    "SDProjectionSourceMapTextEntry": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "text"
        },
        "output": {
          "$ref": "#/$defs/Range"
        },
        "source": {
          "$ref": "#/$defs/TextTarget"
        },
        "blockId": {
          "type": "string"
        },
        "changeIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "commentIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "output",
        "source",
        "blockId"
      ]
    },
    "SDProjectionSourceMapSyntheticEntry": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "synthetic"
            },
            "output": {
              "$ref": "#/$defs/Range"
            },
            "role": {
              "enum": [
                "listLabel",
                "placeholder"
              ]
            },
            "changeIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "commentIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "identity": {
              "const": "public"
            },
            "blockId": {
              "type": "string"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "output",
            "role",
            "identity",
            "blockId"
          ]
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "synthetic"
            },
            "output": {
              "$ref": "#/$defs/Range"
            },
            "role": {
              "enum": [
                "listLabel",
                "placeholder"
              ]
            },
            "changeIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "commentIds": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "identity": {
              "const": "unavailable"
            },
            "identityUnavailableReason": {
              "const": "positionDerivedFallback"
            }
          },
          "additionalProperties": false,
          "required": [
            "kind",
            "output",
            "role",
            "identity",
            "identityUnavailableReason"
          ]
        }
      ]
    }
  },
  "operationId": "capabilities.check",
  "schemas": {
    "input": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "operation": {
              "const": "insert"
            },
            "input": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "in": {
                      "$ref": "#/$defs/StoryLocator"
                    },
                    "target": {
                      "oneOf": [
                        {
                          "$ref": "#/$defs/SelectionTarget"
                        },
                        {
                          "$ref": "#/$defs/BlockNodeAddress"
                        }
                      ]
                    },
                    "value": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "html",
                        "markdown"
                      ]
                    },
                    "placement": {
                      "enum": [
                        "before",
                        "after",
                        "insideStart",
                        "insideEnd"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "target",
                    "value",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "in": {
                      "$ref": "#/$defs/StoryLocator"
                    },
                    "ref": {
                      "type": "string",
                      "minLength": 1
                    },
                    "value": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "html",
                        "markdown"
                      ]
                    },
                    "placement": {
                      "enum": [
                        "before",
                        "after",
                        "insideStart",
                        "insideEnd"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "ref",
                    "value",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "in": {
                      "$ref": "#/$defs/StoryLocator"
                    },
                    "value": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "html",
                        "markdown"
                      ]
                    },
                    "placement": {
                      "enum": [
                        "before",
                        "after",
                        "insideStart",
                        "insideEnd"
                      ]
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "value",
                    "type"
                  ]
                }
              ]
            },
            "options": {
              "type": "object",
              "properties": {
                "changeMode": {
                  "enum": [
                    "direct",
                    "tracked"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false,
          "required": [
            "operation",
            "input"
          ]
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "const": "replace"
            },
            "input": {
              "oneOf": [
                {
                  "type": "object",
                  "properties": {
                    "in": {
                      "$ref": "#/$defs/StoryLocator"
                    },
                    "target": {
                      "oneOf": [
                        {
                          "$ref": "#/$defs/SelectionTarget"
                        },
                        {
                          "$ref": "#/$defs/BlockNodeAddress"
                        }
                      ]
                    },
                    "value": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "html",
                        "markdown"
                      ]
                    },
                    "nestingPolicy": {
                      "type": "object",
                      "properties": {
                        "tables": {
                          "enum": [
                            "forbid",
                            "allow"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "target",
                    "value",
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "in": {
                      "$ref": "#/$defs/StoryLocator"
                    },
                    "ref": {
                      "type": "string",
                      "minLength": 1
                    },
                    "value": {
                      "type": "string"
                    },
                    "type": {
                      "enum": [
                        "html",
                        "markdown"
                      ]
                    },
                    "nestingPolicy": {
                      "type": "object",
                      "properties": {
                        "tables": {
                          "enum": [
                            "forbid",
                            "allow"
                          ]
                        }
                      },
                      "additionalProperties": false,
                      "description": "Controls nesting behavior. tables: 'allow' permits inserting tables inside other tables."
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "ref",
                    "value",
                    "type"
                  ]
                }
              ]
            },
            "options": {
              "type": "object",
              "properties": {
                "changeMode": {
                  "enum": [
                    "direct",
                    "tracked"
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false,
          "required": [
            "operation",
            "input"
          ]
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "const": "projectHtml"
            },
            "input": {
              "type": "object",
              "properties": {
                "in": {
                  "$ref": "#/$defs/StoryLocator"
                },
                "reviewMode": {
                  "$ref": "#/$defs/SDProjectionReviewMode"
                },
                "scope": {
                  "$ref": "#/$defs/SDProjectionScope"
                },
                "includeSourceMap": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false,
          "required": [
            "operation"
          ]
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "const": "projectMarkdown"
            },
            "input": {
              "type": "object",
              "properties": {
                "in": {
                  "$ref": "#/$defs/StoryLocator"
                },
                "reviewMode": {
                  "$ref": "#/$defs/SDProjectionReviewMode"
                },
                "scope": {
                  "$ref": "#/$defs/SDProjectionScope"
                },
                "includeSourceMap": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false
            }
          },
          "additionalProperties": false,
          "required": [
            "operation"
          ]
        }
      ]
    },
    "output": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "operation": {
              "enum": [
                "insert",
                "replace"
              ]
            },
            "format": {
              "enum": [
                "html",
                "markdown"
              ]
            },
            "supported": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "preserved",
                "preserved-with-warnings",
                "simplified",
                "rejected",
                "no-op",
                "invalid-target",
                "outdated"
              ]
            },
            "evaluatedRevision": {
              "type": "string"
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "path": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  }
                },
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/$defs/BlockNodeAddress"
                    },
                    {
                      "$ref": "#/$defs/TextAddress"
                    },
                    {
                      "$ref": "#/$defs/SelectionTarget"
                    }
                  ]
                },
                "details": {}
              },
              "additionalProperties": false,
              "required": [
                "code",
                "message"
              ]
            },
            "wouldChange": {
              "type": "boolean"
            },
            "conversion": {
              "type": "object",
              "properties": {
                "format": {
                  "enum": [
                    "html",
                    "markdown"
                  ]
                },
                "lossy": {
                  "type": "boolean"
                },
                "diagnostics": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "enum": [
                          "conversion-normalized-construct",
                          "conversion-unsupported-construct",
                          "conversion-dropped-style",
                          "conversion-unsafe-content",
                          "conversion-unsafe-url",
                          "conversion-source-limit-exceeded",
                          "conversion-depth-limit-exceeded",
                          "conversion-malformed-input",
                          "conversion-empty-result"
                        ]
                      },
                      "severity": {
                        "enum": [
                          "error",
                          "warning",
                          "info"
                        ]
                      },
                      "message": {
                        "type": "string"
                      },
                      "path": {
                        "type": "array",
                        "items": {
                          "oneOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "integer"
                            }
                          ]
                        }
                      },
                      "construct": {
                        "enum": [
                          "document",
                          "source",
                          "text",
                          "paragraph",
                          "emptyParagraph",
                          "softBreak",
                          "lineBreak",
                          "heading",
                          "bold",
                          "italic",
                          "underline",
                          "strike",
                          "hyperlink",
                          "list",
                          "table",
                          "tableHeader",
                          "colSpan",
                          "rowSpan",
                          "horizontalRule",
                          "inlineCode",
                          "codeBlock",
                          "blockquote",
                          "taskList",
                          "image",
                          "footnote",
                          "rawHtml",
                          "unknownWrapper",
                          "script",
                          "style",
                          "eventHandler"
                        ]
                      },
                      "disposition": {
                        "enum": [
                          "preserved",
                          "normalized",
                          "downgraded",
                          "dropped",
                          "rejected"
                        ]
                      },
                      "lossy": {
                        "type": "boolean"
                      },
                      "source": {
                        "type": "object",
                        "properties": {
                          "format": {
                            "enum": [
                              "html",
                              "markdown"
                            ]
                          },
                          "range": {
                            "type": "object",
                            "properties": {
                              "startOffset": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "endOffset": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "startLine": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "startColumn": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "endLine": {
                                "type": "integer",
                                "minimum": 1
                              },
                              "endColumn": {
                                "type": "integer",
                                "minimum": 1
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "startOffset",
                              "endOffset"
                            ]
                          }
                        },
                        "additionalProperties": false,
                        "required": [
                          "format"
                        ]
                      }
                    },
                    "additionalProperties": false,
                    "required": [
                      "code",
                      "severity",
                      "message",
                      "construct",
                      "disposition",
                      "lossy",
                      "source"
                    ]
                  }
                }
              },
              "additionalProperties": false,
              "required": [
                "format",
                "lossy",
                "diagnostics"
              ]
            },
            "plan": {
              "type": "object",
              "properties": {
                "fragment": {
                  "oneOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "kind": {
                              "const": "paragraph"
                            },
                            "paragraph": {
                              "type": "object",
                              "properties": {
                                "inlines": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/SDInboundInlineNode"
                                  }
                                },
                                "styleRef": {
                                  "type": "string"
                                },
                                "props": {
                                  "$ref": "#/$defs/SDInboundParagraphProps"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "inlines"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "paragraph"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "kind": {
                              "const": "heading"
                            },
                            "heading": {
                              "type": "object",
                              "properties": {
                                "level": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 6
                                },
                                "inlines": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/SDInboundInlineNode"
                                  }
                                },
                                "styleRef": {
                                  "type": "string"
                                },
                                "props": {
                                  "$ref": "#/$defs/SDInboundParagraphProps"
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "level",
                                "inlines"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "heading"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "kind": {
                              "const": "list"
                            },
                            "list": {
                              "type": "object",
                              "properties": {
                                "levels": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/SDInboundListLevel"
                                  }
                                },
                                "items": {
                                  "type": "array",
                                  "items": {
                                    "$ref": "#/$defs/SDInboundListItem"
                                  },
                                  "minItems": 1
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "items"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "list"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "kind": {
                              "const": "table"
                            },
                            "table": {
                              "type": "object",
                              "properties": {
                                "rows": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "string"
                                      },
                                      "cells": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "id": {
                                              "type": "string"
                                            },
                                            "props": {
                                              "$ref": "#/$defs/SDInboundCellProps"
                                            },
                                            "colSpan": {
                                              "type": "integer",
                                              "minimum": 1
                                            },
                                            "rowSpan": {
                                              "type": "integer",
                                              "minimum": 1
                                            },
                                            "header": {
                                              "type": "boolean"
                                            },
                                            "content": {
                                              "type": "array",
                                              "items": {
                                                "$ref": "#/$defs/SDInboundContentNode"
                                              },
                                              "minItems": 1
                                            }
                                          },
                                          "additionalProperties": false,
                                          "required": [
                                            "content"
                                          ]
                                        },
                                        "minItems": 1
                                      }
                                    },
                                    "additionalProperties": false,
                                    "required": [
                                      "cells"
                                    ]
                                  },
                                  "minItems": 1
                                }
                              },
                              "additionalProperties": false,
                              "required": [
                                "rows"
                              ]
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "table"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "kind": {
                              "const": "horizontalRule"
                            },
                            "horizontalRule": {
                              "type": "object",
                              "properties": {},
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "horizontalRule"
                          ]
                        }
                      ]
                    },
                    {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "const": "paragraph"
                              },
                              "paragraph": {
                                "type": "object",
                                "properties": {
                                  "inlines": {
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/$defs/SDInboundInlineNode"
                                    }
                                  },
                                  "styleRef": {
                                    "type": "string"
                                  },
                                  "props": {
                                    "$ref": "#/$defs/SDInboundParagraphProps"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "inlines"
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "kind",
                              "paragraph"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "const": "heading"
                              },
                              "heading": {
                                "type": "object",
                                "properties": {
                                  "level": {
                                    "type": "integer",
                                    "minimum": 1,
                                    "maximum": 6
                                  },
                                  "inlines": {
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/$defs/SDInboundInlineNode"
                                    }
                                  },
                                  "styleRef": {
                                    "type": "string"
                                  },
                                  "props": {
                                    "$ref": "#/$defs/SDInboundParagraphProps"
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "level",
                                  "inlines"
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "kind",
                              "heading"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "const": "list"
                              },
                              "list": {
                                "type": "object",
                                "properties": {
                                  "levels": {
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/$defs/SDInboundListLevel"
                                    }
                                  },
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "$ref": "#/$defs/SDInboundListItem"
                                    },
                                    "minItems": 1
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "items"
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "kind",
                              "list"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "const": "table"
                              },
                              "table": {
                                "type": "object",
                                "properties": {
                                  "rows": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "cells": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "id": {
                                                "type": "string"
                                              },
                                              "props": {
                                                "$ref": "#/$defs/SDInboundCellProps"
                                              },
                                              "colSpan": {
                                                "type": "integer",
                                                "minimum": 1
                                              },
                                              "rowSpan": {
                                                "type": "integer",
                                                "minimum": 1
                                              },
                                              "header": {
                                                "type": "boolean"
                                              },
                                              "content": {
                                                "type": "array",
                                                "items": {
                                                  "$ref": "#/$defs/SDInboundContentNode"
                                                },
                                                "minItems": 1
                                              }
                                            },
                                            "additionalProperties": false,
                                            "required": [
                                              "content"
                                            ]
                                          },
                                          "minItems": 1
                                        }
                                      },
                                      "additionalProperties": false,
                                      "required": [
                                        "cells"
                                      ]
                                    },
                                    "minItems": 1
                                  }
                                },
                                "additionalProperties": false,
                                "required": [
                                  "rows"
                                ]
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "kind",
                              "table"
                            ]
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "kind": {
                                "const": "horizontalRule"
                              },
                              "horizontalRule": {
                                "type": "object",
                                "properties": {},
                                "additionalProperties": false
                              }
                            },
                            "additionalProperties": false,
                            "required": [
                              "kind",
                              "horizontalRule"
                            ]
                          }
                        ]
                      },
                      "minItems": 1
                    }
                  ]
                },
                "resolution": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "oneOf": [
                        {
                          "$ref": "#/$defs/TextAddress"
                        },
                        {
                          "$ref": "#/$defs/BlockNodeAddress"
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "const": "story"
                            },
                            "storyType": {
                              "const": "body"
                            }
                          },
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "storyType"
                          ]
                        }
                      ]
                    },
                    "range": {
                      "$ref": "#/$defs/TextMutationRange"
                    },
                    "selectionTarget": {
                      "$ref": "#/$defs/SelectionTarget"
                    }
                  },
                  "additionalProperties": false,
                  "required": [
                    "target",
                    "range"
                  ]
                },
                "changeMode": {
                  "enum": [
                    "direct",
                    "tracked"
                  ]
                },
                "atomic": {
                  "const": true
                }
              },
              "additionalProperties": false,
              "required": [
                "fragment",
                "resolution",
                "changeMode",
                "atomic"
              ]
            },
            "guard": {
              "type": "object",
              "properties": {
                "version": {
                  "const": "sd-html-markdown-check/1"
                },
                "operation": {
                  "enum": [
                    "insert",
                    "replace"
                  ]
                },
                "evaluatedRevision": {
                  "type": "string"
                },
                "requestSha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                },
                "analysisSha256": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{64}$"
                }
              },
              "additionalProperties": false,
              "required": [
                "version",
                "operation",
                "evaluatedRevision",
                "requestSha256",
                "analysisSha256"
              ]
            }
          },
          "additionalProperties": false,
          "required": [
            "operation",
            "format",
            "supported",
            "outcome",
            "evaluatedRevision",
            "wouldChange",
            "conversion"
          ]
        },
        {
          "type": "object",
          "properties": {
            "operation": {
              "enum": [
                "projectHtml",
                "projectMarkdown"
              ]
            },
            "format": {
              "enum": [
                "html",
                "markdown"
              ]
            },
            "supported": {
              "type": "boolean"
            },
            "outcome": {
              "enum": [
                "preserved",
                "preserved-with-warnings",
                "simplified",
                "rejected",
                "no-op",
                "invalid-target",
                "outdated"
              ]
            },
            "evaluatedRevision": {
              "type": "string"
            },
            "failure": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "path": {
                  "type": "array",
                  "items": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "integer"
                      }
                    ]
                  }
                },
                "target": {
                  "oneOf": [
                    {
                      "$ref": "#/$defs/BlockNodeAddress"
                    },
                    {
                      "$ref": "#/$defs/TextAddress"
                    },
                    {
                      "$ref": "#/$defs/SelectionTarget"
                    }
                  ]
                },
                "details": {}
              },
              "additionalProperties": false,
              "required": [
                "code",
                "message"
              ]
            },
            "plan": {
              "type": "object",
              "properties": {
                "reviewMode": {
                  "$ref": "#/$defs/SDProjectionReviewMode"
                },
                "story": {
                  "$ref": "#/$defs/StoryLocator"
                },
                "scope": {
                  "$ref": "#/$defs/SDResolvedProjectionScope"
                },
                "includeSourceMap": {
                  "type": "boolean"
                }
              },
              "additionalProperties": false,
              "required": [
                "reviewMode",
                "story",
                "scope",
                "includeSourceMap"
              ]
            },
            "projection": {
              "$ref": "#/$defs/SDContentProjectionResult"
            }
          },
          "additionalProperties": false,
          "required": [
            "operation",
            "format",
            "supported",
            "outcome",
            "evaluatedRevision"
          ]
        }
      ]
    }
  }
}
