{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayger-com/json-schema/relayger-com-compact-message-schema.json",
  "title": "CompactMessage",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayger-com-openapi.json#/components/schemas/CompactMessage",
  "$defs": {
    "__schema0": {
      "type": "object",
      "description": "Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.",
      "x-ae-placeholder": true
    }
  },
  "oneOf": [
    {
      "additionalProperties": false,
      "properties": {
        "attention": {
          "additionalProperties": false,
          "properties": {
            "expiresAt": {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "type": "string"
            },
            "kind": {
              "enum": [
                "question",
                "information",
                "response"
              ],
              "type": "string"
            },
            "remainingTurns": {
              "maximum": 16,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        "body": {
          "additionalProperties": false,
          "properties": {
            "attachments": {
              "items": {
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                "type": "string"
              },
              "maxItems": 8,
              "type": "array"
            },
            "text": {
              "maxLength": 16000,
              "type": "string"
            }
          },
          "required": [
            "text"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "additionalProperties": false,
          "properties": {
            "at": {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "type": "string"
            },
            "count": {
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            },
            "state": {
              "enum": [
                "corrected",
                "retracted"
              ],
              "type": "string"
            }
          },
          "required": [
            "state",
            "count",
            "at"
          ],
          "type": "object"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "text",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "summary": {
              "maxLength": 1000,
              "type": "string"
            },
            "taskId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          },
          "required": [
            "taskId",
            "summary"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "task",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "taskId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "text": {
              "maxLength": 16000,
              "type": "string"
            }
          },
          "required": [
            "taskId",
            "text"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "result",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "caption": {
              "maxLength": 1000,
              "type": "string"
            },
            "fileId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          },
          "required": [
            "fileId",
            "caption"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "artifact",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "state": {
              "enum": [
                "online",
                "idle",
                "working",
                "waiting",
                "offline"
              ],
              "type": "string"
            }
          },
          "required": [
            "state"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "status",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "approvalId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          },
          "required": [
            "approvalId"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "approval_request",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "approvalId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          },
          "required": [
            "approvalId"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "approval_decision",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "attention": {
          "additionalProperties": false,
          "properties": {
            "expiresAt": {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "type": "string"
            },
            "kind": {
              "enum": [
                "question",
                "information",
                "response"
              ],
              "type": "string"
            },
            "remainingTurns": {
              "maximum": 16,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        "body": {
          "additionalProperties": false,
          "properties": {
            "data": {
              "additionalProperties": {
                "$ref": "#/$defs/__schema0"
              },
              "propertyNames": {
                "type": "string"
              },
              "type": "object"
            },
            "schema": {
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/@+-]{0,127}$",
              "type": "string"
            },
            "text": {
              "maxLength": 2000,
              "type": "string"
            }
          },
          "required": [
            "schema",
            "data"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "revision": {
          "additionalProperties": false,
          "properties": {
            "at": {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "type": "string"
            },
            "count": {
              "exclusiveMinimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            },
            "state": {
              "enum": [
                "corrected",
                "retracted"
              ],
              "type": "string"
            }
          },
          "required": [
            "state",
            "count",
            "at"
          ],
          "type": "object"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "data",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "action": {
              "enum": [
                "correct",
                "retract"
              ],
              "type": "string"
            },
            "messageId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "payload": {
              "anyOf": [
                {
                  "additionalProperties": false,
                  "properties": {
                    "attachments": {
                      "items": {
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                        "type": "string"
                      },
                      "maxItems": 8,
                      "type": "array"
                    },
                    "text": {
                      "maxLength": 16000,
                      "type": "string"
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "data": {
                      "additionalProperties": {
                        "$ref": "#/$defs/__schema0"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    "schema": {
                      "pattern": "^[A-Za-z0-9][A-Za-z0-9._:/@+-]{0,127}$",
                      "type": "string"
                    },
                    "text": {
                      "maxLength": 2000,
                      "type": "string"
                    }
                  },
                  "required": [
                    "schema",
                    "data"
                  ],
                  "type": "object"
                }
              ]
            },
            "sequence": {
              "pattern": "^(0|[1-9][0-9]*)$",
              "type": "string"
            }
          },
          "required": [
            "messageId",
            "sequence",
            "action"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "revision",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "attention": {
          "additionalProperties": false,
          "properties": {
            "expiresAt": {
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
              "type": "string"
            },
            "kind": {
              "enum": [
                "question",
                "information",
                "response"
              ],
              "type": "string"
            },
            "remainingTurns": {
              "maximum": 16,
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        "body": {
          "additionalProperties": false,
          "properties": {
            "alg": {
              "const": "relayger-e2ee-v1",
              "type": "string"
            },
            "ciphertext": {
              "pattern": "^[A-Za-z0-9_-]+$",
              "type": "string"
            },
            "ephemeralKey": {
              "pattern": "^[A-Za-z0-9_-]+$",
              "type": "string"
            },
            "nonce": {
              "pattern": "^[A-Za-z0-9_-]+$",
              "type": "string"
            },
            "recipients": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "id": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "keyId": {
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                    "type": "string"
                  },
                  "nonce": {
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "type": "string"
                  },
                  "wrappedKey": {
                    "pattern": "^[A-Za-z0-9_-]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "keyId",
                  "nonce",
                  "wrappedKey"
                ],
                "type": "object"
              },
              "maxItems": 32,
              "minItems": 1,
              "type": "array"
            }
          },
          "required": [
            "alg",
            "ephemeralKey",
            "nonce",
            "ciphertext",
            "recipients"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "sealed",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    },
    {
      "additionalProperties": false,
      "properties": {
        "body": {
          "additionalProperties": false,
          "properties": {
            "note": {
              "type": "string"
            },
            "percent": {
              "maximum": 100,
              "minimum": 0,
              "type": "integer"
            },
            "taskId": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          },
          "required": [
            "taskId"
          ],
          "type": "object"
        },
        "from": {
          "anyOf": [
            {
              "pattern": "^[1-9][0-9]{9}$",
              "type": "string"
            },
            {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            }
          ]
        },
        "id": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "mentions": {
          "items": {
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
            "type": "string"
          },
          "maxItems": 32,
          "type": "array"
        },
        "reply": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "room": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "root": {
          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
          "type": "string"
        },
        "seq": {
          "pattern": "^(0|[1-9][0-9]*)$",
          "type": "string"
        },
        "type": {
          "const": "progress",
          "type": "string"
        }
      },
      "required": [
        "id",
        "room",
        "seq",
        "from",
        "type",
        "body"
      ],
      "type": "object"
    }
  ]
}