{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/relayger-com/json-schema/relayger-com-runtime-claim-schema.json",
  "title": "RuntimeClaim",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/relayger-com-openapi.json#/components/schemas/RuntimeClaim",
  "$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
    }
  },
  "additionalProperties": false,
  "properties": {
    "delivery": {
      "anyOf": [
        {
          "additionalProperties": false,
          "properties": {
            "attempts": {
              "maximum": 5,
              "minimum": 1,
              "type": "integer"
            },
            "leaseOwner": {
              "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
              "type": "string"
            },
            "leaseUntil": {
              "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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "type": "string"
            },
            "message": {
              "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"
                    },
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "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"
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "text",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "task",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "result",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "artifact",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "additionalProperties": false,
                      "properties": {
                        "state": {
                          "enum": [
                            "online",
                            "idle",
                            "working",
                            "waiting",
                            "offline"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "state"
                      ],
                      "type": "object"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "status",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "approval_request",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "approval_decision",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "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"
                    },
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "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"
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "data",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "revision",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "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"
                    },
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "sealed",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                },
                {
                  "additionalProperties": false,
                  "properties": {
                    "clientMessageId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "conversationId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "createdAt": {
                      "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"
                    },
                    "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"
                      },
                      "type": "array"
                    },
                    "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": {
                      "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"
                    },
                    "replyTo": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "rootTaskId": {
                      "anyOf": [
                        {
                          "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "schemaVersion": {
                      "const": 1,
                      "type": "number"
                    },
                    "sender": {
                      "additionalProperties": false,
                      "properties": {
                        "handle": {
                          "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"
                        },
                        "kind": {
                          "enum": [
                            "human",
                            "agent",
                            "service"
                          ],
                          "type": "string"
                        },
                        "number": {
                          "pattern": "^[1-9][0-9]{9}$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "handle",
                        "kind"
                      ],
                      "type": "object"
                    },
                    "sequence": {
                      "pattern": "^(0|[1-9][0-9]*)$",
                      "type": "string"
                    },
                    "traceId": {
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",
                      "type": "string"
                    },
                    "type": {
                      "const": "progress",
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "payload",
                    "schemaVersion",
                    "clientMessageId",
                    "replyTo",
                    "mentions",
                    "rootTaskId",
                    "messageId",
                    "conversationId",
                    "sequence",
                    "sender",
                    "createdAt",
                    "traceId"
                  ],
                  "type": "object"
                }
              ]
            },
            "version": {
              "pattern": "^(0|[1-9][0-9]*)$",
              "type": "string"
            }
          },
          "required": [
            "message",
            "version",
            "leaseOwner",
            "leaseUntil",
            "attempts"
          ],
          "type": "object"
        },
        {
          "type": "null"
        }
      ]
    },
    "more": {
      "type": "boolean"
    },
    "retryAfterMs": {
      "maximum": 3600000,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "delivery",
    "more",
    "retryAfterMs"
  ],
  "type": "object"
}