{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://instruction.md/specification/1/instruction.schema.json",
  "title": "Instruction authored document",
  "type": "object",
  "properties": {
    "format": {
      "const": "instruction/1"
    },
    "uri": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "front": {
          "type": "object",
          "properties": {
            "spec": {
              "enum": [
                "1",
                1
              ]
            },
            "id": {
              "type": "string"
            },
            "version": {
              "type": "string"
            },
            "title": {
              "type": "string"
            },
            "description": {
              "type": "string"
            },
            "language": {
              "type": "string"
            },
            "license": {
              "type": "string"
            },
            "tags": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "parameters": {
              "type": "object",
              "propertyNames": {
                "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
                  },
                  "type": {
                    "enum": [
                      "string",
                      "number",
                      "integer",
                      "boolean",
                      "enum",
                      "list",
                      "url",
                      "duration"
                    ]
                  },
                  "values": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "default": {},
                  "example": {},
                  "source": {
                    "enum": [
                      "input",
                      "workspace",
                      "identity",
                      "static"
                    ]
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [],
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "type": {
                          "const": "enum"
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    "then": {
                      "required": [
                        "values"
                      ],
                      "properties": {
                        "values": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "minItems": 1
                        }
                      }
                    }
                  }
                ]
              }
            },
            "extends": {
              "type": "array",
              "items": {
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "uri": {
                        "type": "string"
                      },
                      "select": {
                        "$ref": "#/$defs/selector"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "as": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "with": {
                        "type": "object"
                      }
                    },
                    "required": [
                      "uri"
                    ],
                    "additionalProperties": false,
                    "allOf": [
                      {
                        "if": {
                          "properties": {
                            "mode": {
                              "const": "pinned"
                            }
                          },
                          "required": [
                            "mode"
                          ]
                        },
                        "then": {
                          "required": [
                            "sha256"
                          ]
                        }
                      }
                    ]
                  },
                  {
                    "required": [
                      "as"
                    ]
                  }
                ]
              }
            },
            "references": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "uri": {
                    "type": "string"
                  },
                  "select": {
                    "$ref": "#/$defs/selector"
                  },
                  "mode": {
                    "enum": [
                      "live",
                      "pinned"
                    ]
                  },
                  "version": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^sha256:[0-9a-f]{64}$"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "as": {
                    "type": "string",
                    "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                  },
                  "with": {
                    "type": "object"
                  }
                },
                "required": [
                  "uri"
                ],
                "additionalProperties": false,
                "allOf": [
                  {
                    "if": {
                      "properties": {
                        "mode": {
                          "const": "pinned"
                        }
                      },
                      "required": [
                        "mode"
                      ]
                    },
                    "then": {
                      "required": [
                        "sha256"
                      ]
                    }
                  }
                ]
              }
            },
            "extensions": {
              "type": "object",
              "propertyNames": {
                "pattern": "^[a-z][a-z0-9-]*$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "version": {
                    "type": "string"
                  },
                  "required": {
                    "type": "boolean"
                  },
                  "manifest": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string",
                    "pattern": "^sha256:[0-9a-f]{64}$"
                  }
                },
                "required": [
                  "id",
                  "version"
                ],
                "additionalProperties": false
              }
            },
            "resolvers": {
              "type": "object",
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "adapter": {
                    "type": "string"
                  },
                  "account": {
                    "type": "string"
                  }
                },
                "required": [
                  "adapter"
                ],
                "additionalProperties": true
              }
            },
            "exports": {
              "type": "object",
              "propertyNames": {
                "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
              },
              "additionalProperties": {
                "type": "object",
                "properties": {
                  "adapter": {
                    "type": "string"
                  },
                  "profile": {
                    "type": "string"
                  },
                  "bindings": {
                    "type": "object"
                  },
                  "required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "adapter",
                  "profile",
                  "bindings"
                ],
                "additionalProperties": false
              }
            },
            "presentation": {
              "type": "object"
            },
            "requires": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [],
          "additionalProperties": true
        },
        "back": {
          "type": "object"
        }
      },
      "required": [],
      "additionalProperties": false
    },
    "body": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/node"
      }
    }
  },
  "required": [
    "format",
    "body"
  ],
  "additionalProperties": false,
  "$defs": {
    "range": {
      "type": "object",
      "properties": {
        "start": {
          "type": "integer",
          "minimum": 1
        },
        "end": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "start",
        "end"
      ],
      "additionalProperties": false
    },
    "value": {
      "type": "object",
      "properties": {
        "format": {
          "enum": [
            "yaml",
            "json",
            "csv",
            "text",
            "html",
            "code"
          ]
        },
        "source": {
          "type": "string"
        },
        "data": {}
      },
      "required": [
        "format",
        "source"
      ],
      "additionalProperties": false
    },
    "node": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "markdown"
            },
            "source": {
              "type": "string"
            },
            "range": {
              "$ref": "#/$defs/range"
            },
            "instance": {
              "type": "string"
            },
            "attrs": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                }
              },
              "required": [],
              "additionalProperties": false
            }
          },
          "required": [
            "type",
            "source"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "const": "directive"
            },
            "kind": {
              "type": "string",
              "pattern": "^[a-z][a-z0-9-]*(?::[a-z][a-z0-9-]*)?$"
            },
            "form": {
              "enum": [
                "container",
                "leaf",
                "keyword",
                "alert"
              ]
            },
            "attrs": {
              "type": "object"
            },
            "children": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/node"
              }
            },
            "value": {
              "$ref": "#/$defs/value"
            },
            "source": {
              "type": "string"
            },
            "instance": {
              "type": "string"
            },
            "range": {
              "$ref": "#/$defs/range"
            }
          },
          "required": [
            "type",
            "kind",
            "form",
            "attrs"
          ],
          "additionalProperties": false,
          "allOf": [
            {
              "not": {
                "required": [
                  "children",
                  "value"
                ]
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "must"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "never"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "guardrail"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "should"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      },
                      "not": {
                        "type": "boolean"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "may"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "always"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "avoid"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "if": {
                        "type": "string",
                        "pattern": "^[^()\\r\\n]+$"
                      },
                      "because": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "note"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "tip"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "important"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "warning"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "caution"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "info"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "keyword",
                      "alert"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "example"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "avoid": {
                        "type": "boolean"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "instruction"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "context"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "policy"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "scope": {
                        "type": "string"
                      },
                      "authority": {
                        "type": "string"
                      },
                      "source": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "output"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "response-format": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "form"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "param"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string",
                        "pattern": "^[A-Za-z_][A-Za-z0-9_.-]*$"
                      },
                      "type": {
                        "enum": [
                          "string",
                          "number",
                          "integer",
                          "boolean",
                          "enum",
                          "list",
                          "url",
                          "duration"
                        ]
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "default": {},
                      "example": {},
                      "source": {
                        "enum": [
                          "input",
                          "workspace",
                          "identity",
                          "static"
                        ]
                      }
                    },
                    "required": [
                      "name"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    },
                    "allOf": [
                      {
                        "if": {
                          "properties": {
                            "type": {
                              "const": "enum"
                            }
                          },
                          "required": [
                            "type"
                          ]
                        },
                        "then": {
                          "required": [
                            "values"
                          ],
                          "properties": {
                            "values": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "minItems": 1
                            }
                          }
                        }
                      }
                    ]
                  },
                  "form": {
                    "enum": [
                      "leaf"
                    ]
                  }
                },
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "children"
                      ]
                    },
                    {
                      "required": [
                        "value"
                      ]
                    }
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "glossary"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "person"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "role": {
                        "type": "string"
                      },
                      "resolver": {
                        "type": "string"
                      },
                      "account": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "role"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "resolver": {
                        "type": "string"
                      },
                      "account": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "skill"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "trigger": {
                        "type": "string"
                      },
                      "resolver": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "mcp"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "registry": {
                        "type": "string"
                      },
                      "server": {
                        "type": "string"
                      },
                      "account": {
                        "type": "string"
                      },
                      "tools": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "allow": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "deny": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "resolver": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "tool"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "server": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "allow": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "deny": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    },
                    "required": [
                      "id",
                      "server",
                      "name"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "agent"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "protocol": {
                        "type": "string"
                      },
                      "endpoint": {
                        "type": "string"
                      },
                      "binding": {
                        "type": "string"
                      },
                      "tenant": {
                        "type": "string"
                      },
                      "skills": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "resolver": {
                        "type": "string"
                      },
                      "account": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "service"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "resolver": {
                        "type": "string"
                      },
                      "account": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "source"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "resolver": {
                        "type": "string"
                      },
                      "account": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "resource"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "image"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "audio"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "video"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "pdf"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "diagram"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "drawing"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "figure"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "script"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "lang": {
                        "type": "string"
                      },
                      "sandbox": {
                        "type": "string"
                      },
                      "entry": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "data"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json",
                            "csv",
                            "text"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "schedule"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "dialect": {
                        "type": "string"
                      },
                      "adapter": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "schema-sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "id",
                      "dialect"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "workflow"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "dialect": {
                        "type": "string"
                      },
                      "adapter": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "schema-sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "id",
                      "dialect"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "sandbox"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "dialect": {
                        "type": "string"
                      },
                      "adapter": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "schema-sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "test"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "dialect": {
                        "type": "string"
                      },
                      "adapter": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "schema-sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "eval"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "dialect": {
                        "type": "string"
                      },
                      "adapter": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "schema-sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "id"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "config"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "dialect": {
                        "type": "string"
                      },
                      "adapter": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "schema": {
                        "type": "string"
                      },
                      "schema-sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      }
                    },
                    "required": [
                      "id",
                      "dialect"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "properties"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "patch": {
                        "type": "boolean"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "const": "container"
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ],
                  "properties": {
                    "value": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      }
                    }
                  }
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "section"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "columns"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "column"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "span": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "grid"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "columns": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 12
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "card"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "tabs"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "tab"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "steps"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "step"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "details"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "open": {
                        "type": "boolean"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "aside"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      }
                    },
                    "required": [],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "component"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "component": {
                        "type": "string"
                      },
                      "stylesheet": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "component"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "include"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "as": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      }
                    },
                    "required": [
                      "src",
                      "as"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "leaf"
                    ]
                  }
                },
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "children"
                      ]
                    },
                    {
                      "required": [
                        "value"
                      ]
                    }
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "embed"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "media-type": {
                        "type": "string"
                      },
                      "alt": {
                        "type": "string"
                      },
                      "caption": {
                        "type": "string"
                      },
                      "transcript": {
                        "type": "string"
                      },
                      "preview": {
                        "type": "string"
                      },
                      "decorative": {
                        "type": "boolean"
                      },
                      "page": {
                        "type": "integer",
                        "minimum": 1
                      },
                      "start": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "end": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "region": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "src"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container",
                      "leaf"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "replace"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "attrs": {
                      "properties": {
                        "format": {
                          "enum": [
                            "yaml",
                            "json"
                          ]
                        }
                      },
                      "required": [
                        "format"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "value"
                  ]
                },
                "else": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "extend"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      },
                      "position": {
                        "enum": [
                          "prepend",
                          "append"
                        ]
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "container"
                    ]
                  }
                },
                "if": {
                  "properties": {
                    "form": {
                      "enum": [
                        "container",
                        "keyword",
                        "alert"
                      ]
                    }
                  }
                },
                "then": {
                  "required": [
                    "children"
                  ]
                }
              }
            },
            {
              "if": {
                "properties": {
                  "kind": {
                    "const": "remove"
                  }
                },
                "required": [
                  "kind"
                ]
              },
              "then": {
                "properties": {
                  "attrs": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
                      },
                      "title": {
                        "type": "string",
                        "pattern": "^[^\\r\\n]*$"
                      },
                      "class": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "format": {
                        "enum": [
                          "markdown",
                          "yaml",
                          "json",
                          "csv",
                          "text",
                          "html",
                          "code"
                        ]
                      },
                      "verbatim": {
                        "type": "boolean"
                      },
                      "src": {
                        "type": "string"
                      },
                      "ref": {
                        "type": "string"
                      },
                      "mode": {
                        "enum": [
                          "live",
                          "pinned"
                        ]
                      },
                      "version": {
                        "type": "string"
                      },
                      "sha256": {
                        "type": "string",
                        "pattern": "^sha256:[0-9a-f]{64}$"
                      },
                      "required": {
                        "type": "boolean"
                      },
                      "description": {
                        "type": "string"
                      },
                      "style": {
                        "type": "string"
                      },
                      "target": {
                        "type": "string"
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "target"
                    ],
                    "additionalProperties": false,
                    "patternProperties": {
                      "^x-[a-z0-9_.-]+$": {}
                    }
                  },
                  "form": {
                    "enum": [
                      "leaf"
                    ]
                  }
                },
                "not": {
                  "anyOf": [
                    {
                      "required": [
                        "children"
                      ]
                    },
                    {
                      "required": [
                        "value"
                      ]
                    }
                  ]
                }
              }
            }
          ]
        }
      ]
    },
    "selector": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            }
          },
          "required": [
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "heading": {
              "type": "string"
            },
            "occurrence": {
              "type": "integer",
              "minimum": 1
            }
          },
          "required": [
            "heading"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "lines": {
              "type": "array",
              "prefixItems": [
                {
                  "type": "integer",
                  "minimum": 1
                },
                {
                  "type": "integer",
                  "minimum": 1
                }
              ],
              "minItems": 2,
              "maxItems": 2
            }
          },
          "required": [
            "lines"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "pointer": {
              "type": "string",
              "pattern": "^(?:/(?:[^~]|~[01])*)*$"
            }
          },
          "required": [
            "pointer"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "page": {
              "type": "integer",
              "minimum": 1
            }
          },
          "required": [
            "page"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "time": {
              "type": "array",
              "items": {
                "type": "integer",
                "minimum": 0
              },
              "minItems": 2,
              "maxItems": 2
            }
          },
          "required": [
            "time"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "region": {
              "type": "array",
              "items": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "minItems": 4,
              "maxItems": 4
            }
          },
          "required": [
            "region"
          ],
          "additionalProperties": false
        }
      ]
    },
    "reference": {
      "type": "object",
      "properties": {
        "uri": {
          "type": "string"
        },
        "select": {
          "$ref": "#/$defs/selector"
        },
        "mode": {
          "enum": [
            "live",
            "pinned"
          ]
        },
        "version": {
          "type": "string"
        },
        "sha256": {
          "type": "string",
          "pattern": "^sha256:[0-9a-f]{64}$"
        },
        "required": {
          "type": "boolean"
        },
        "as": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
        },
        "with": {
          "type": "object"
        }
      },
      "required": [
        "uri"
      ],
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "properties": {
              "mode": {
                "const": "pinned"
              }
            },
            "required": [
              "mode"
            ]
          },
          "then": {
            "required": [
              "sha256"
            ]
          }
        }
      ]
    }
  }
}
