{
  "$ref": "#/definitions/ReticleMessage",
  "definitions": {
    "ReticleMessage": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "hello"
            },
            "protocolVersion": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1
            },
            "sessionId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "url": {
              "type": "string",
              "maxLength": 4096
            },
            "title": {
              "type": "string",
              "maxLength": 512
            },
            "projectId": {
              "$ref": "#/definitions/ReticleMessage/anyOf/0/properties/sessionId"
            },
            "adapters": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 128
              },
              "maxItems": 32
            },
            "token": {
              "type": "string",
              "maxLength": 512
            },
            "platform": {
              "type": "string",
              "enum": [
                "web",
                "webview",
                "native",
                "service"
              ]
            },
            "channels": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ui",
                  "net",
                  "state",
                  "signal",
                  "log",
                  "route",
                  "storage",
                  "time",
                  "visual"
                ]
              },
              "maxItems": 32
            },
            "commands": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 512
              },
              "maxItems": 32
            },
            "contractParts": {
              "type": "object",
              "properties": {
                "commands": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 128
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 128
                },
                "actions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 128
                }
              },
              "required": [
                "commands",
                "events",
                "actions"
              ],
              "additionalProperties": false
            },
            "hasCapabilities": {
              "type": "boolean"
            },
            "captureBodies": {
              "type": "boolean"
            },
            "sourceMapping": {
              "type": "boolean"
            },
            "sdkVersion": {
              "type": "string",
              "maxLength": 128
            },
            "contract": {
              "type": "string",
              "maxLength": 128
            },
            "redactKeys": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "maxItems": 64
            }
          },
          "required": [
            "kind",
            "protocolVersion",
            "sessionId",
            "url",
            "title",
            "adapters"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "command"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "sessionId": {
              "$ref": "#/definitions/ReticleMessage/anyOf/0/properties/sessionId"
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "args": {
              "type": "object",
              "additionalProperties": {},
              "default": {}
            }
          },
          "required": [
            "kind",
            "id",
            "name"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "command_result"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "ok": {
              "type": "boolean"
            },
            "result": {},
            "error": {
              "type": "string",
              "maxLength": 4096
            }
          },
          "required": [
            "kind",
            "id",
            "ok"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "const": "event"
            },
            "event": {
              "type": "object",
              "properties": {
                "t": {
                  "type": "number"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dom.added",
                    "dom.removed",
                    "dom.attr",
                    "dom.text",
                    "net.request",
                    "net.pending",
                    "net.stream",
                    "perf",
                    "route.change",
                    "console.log",
                    "console.warn",
                    "console.error",
                    "console.info",
                    "console.debug",
                    "error.uncaught",
                    "visible.shown",
                    "anim.start",
                    "anim.end",
                    "scroll.position",
                    "reveal.shown",
                    "signal",
                    "state.change",
                    "storage.change",
                    "page.health",
                    "context.opened",
                    "dialog.opened",
                    "render.commit",
                    "focus.change",
                    "flow.recorded",
                    "transport.overflow",
                    "truncated",
                    "blind-spot",
                    "sdk.failed",
                    "net.detail",
                    "human.control",
                    "human.mark",
                    "download"
                  ]
                },
                "sessionId": {
                  "$ref": "#/definitions/ReticleMessage/anyOf/0/properties/sessionId"
                },
                "ref": {
                  "type": "string",
                  "maxLength": 128
                },
                "seq": {
                  "type": "integer",
                  "minimum": 0
                },
                "actionId": {
                  "$ref": "#/definitions/ReticleMessage/anyOf/3/properties/event/properties/ref"
                },
                "attribution": {
                  "type": "string",
                  "enum": [
                    "window"
                  ]
                },
                "documentId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8
                },
                "editEpoch": {
                  "type": "integer",
                  "minimum": 0
                },
                "data": {
                  "type": "object",
                  "additionalProperties": {},
                  "default": {}
                }
              },
              "required": [
                "t",
                "type",
                "sessionId"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "kind",
            "event"
          ],
          "additionalProperties": false
        }
      ]
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
