Schema

The JSON Schema of the protocol: every message, command and event as a machine-readable contract, with a download and a readable view.

The schema describes the shape of every message: which fields exist, their types, and which fields are required. It does not describe the rules, such as the order of events or how a digest is computed. Those are in the other pages of this specification.

How to use it

  • Download the file and load it into any JSON Schema validator. The document uses draft 2020-12.
  • Generate types from it in your language.
  • Check your own messages against the envelopes and the definitions. A message that is valid here will be accepted by the server.

Unknown fields must be ignored by readers. The schema therefore does not forbid extra fields, so newer servers can add optional fields without breaking your client.

The schema

Download the JSON Schema (robotelos-protocol-v1.schema.json, draft 2020-12) · view it in the repository

Message envelopes

Every message is one of three objects: a request, a response or a push. Their schemas are Request, Response and Push.

Event content by type

An event's content depends on its type. The schema maps each type to its content definition.

Event typeContent definition
robotelos.conversationConversationContent
robotelos.messageMessageContent
robotelos.obligationObligationContent
robotelos.outcomeOutcomeContent
robotelos.participantParticipantContent
robotelos.surfaceSurfaceContent

Command content by type

Command typeContent definitionTarget definition
robotelos.answer_obligationAnswerObligationContentAnswerObligationTarget
robotelos.create_conversationCreateConversationContent—
robotelos.submit_messageSubmitMessageContent—
robotelos.update_participantUpdateParticipantContentUpdateParticipantTarget

Definitions

Each definition is an object with the fields listed below. Fields marked required must be present; the others are optional.

DefinitionFieldsRequired
AnswerObligationContentanswer request_digestanswer
AnswerObligationTargetexpected_version obligation_idobligation_id expected_version
Commandcommand_id content conversation_id target typecommand_id type
ConversationContentcaller_class channel conversation_version home_account kind labels predecessor successor titlekind conversation_version home_account
CreateConversationContentkind participants titlekind participants
Discoveryeffects_mode environment protocol_versions transportsprotocol_versions transports
EphemeralFrameconversation_id data key kindconversation_id kind key
Eventcontent conversation_id created_at event_id relations sender state_key type unsignedevent_id conversation_id type sender created_at content
Framecursor event typetype cursor event
FramesPushconversation_id frames up_to_dateconversation_id frames
GetReceiptRequestcommandcommand
InitializeRequestcapabilities client conversation_versions protocol_versionsprotocol_versions client
InitializeResultagreed capabilities conversation_versions downgrades principal protocol_version server session_expires_atprotocol_version conversation_versions server principal capabilities agreed downgrades
MessageContentagent mentions modality partsparts
ObligationContentanswer expires_at kind options prompt raised_by responders status target versionkind version status raised_by responders prompt
OutcomeContentparts statusstatus
ParticipantContentagent display kind membership owner role verificationkind role membership verification
Pushbody pushpush body
ReadAfterRequestconversation_id cursor limitconversation_id cursor
ReadAfterResultcursor frames more resnapshot_reason up_to_datecursor
Receiptcommand_id conversation_id disposition error events frames receipt_idreceipt_id command_id disposition
RefreshAuthRequesttokentoken
RefreshAuthResultsession_expires_at—
Requestbody id op traceid op
ResnapshotRequiredconversation_id reasonconversation_id reason
Responseerror id ok resultid ok
Snapshotconversation_version cursor state timeline typetype cursor conversation_version state timeline
SubmitMessageContentmentions parts relationsparts
SubscribeRequestconversation_id cursorconversation_id
SubscribeResultcursor resnapshot_reason resumed snapshot up_to_date—
SurfaceContentanchor_event_id catalog_id fallback format messages obligation_id revisionformat catalog_id revision messages fallback
UnsubscribeRequestconversation_idconversation_id
UpdateParticipantContentagent_id display membership rolemembership
UpdateParticipantTargetparticipant_id—
Show the full schema
{
  "$defs": {
    "AnswerObligationContent": {
      "additionalProperties": false,
      "properties": {
        "answer": {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string"
            },
            "option_id": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "via_event": {
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": "object"
        },
        "request_digest": {
          "type": "string"
        }
      },
      "required": [
        "answer"
      ],
      "type": "object"
    },
    "AnswerObligationTarget": {
      "additionalProperties": false,
      "properties": {
        "expected_version": {
          "type": "integer"
        },
        "obligation_id": {
          "type": "string"
        }
      },
      "required": [
        "obligation_id",
        "expected_version"
      ],
      "type": "object"
    },
    "Command": {
      "additionalProperties": false,
      "properties": {
        "command_id": {
          "type": "string"
        },
        "content": {
          "description": "Any JSON value."
        },
        "conversation_id": {
          "type": "string"
        },
        "target": {
          "description": "Any JSON value."
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "command_id",
        "type"
      ],
      "type": "object",
      "x-robotelos-content-by-type": {
        "robotelos.answer_obligation": {
          "$ref": "#/$defs/AnswerObligationContent"
        },
        "robotelos.create_conversation": {
          "$ref": "#/$defs/CreateConversationContent"
        },
        "robotelos.submit_message": {
          "$ref": "#/$defs/SubmitMessageContent"
        },
        "robotelos.update_participant": {
          "$ref": "#/$defs/UpdateParticipantContent"
        }
      },
      "x-robotelos-target-by-type": {
        "robotelos.answer_obligation": {
          "$ref": "#/$defs/AnswerObligationTarget"
        },
        "robotelos.update_participant": {
          "$ref": "#/$defs/UpdateParticipantTarget"
        }
      }
    },
    "ConversationContent": {
      "additionalProperties": false,
      "properties": {
        "caller_class": {
          "type": "string"
        },
        "channel": {
          "type": "string"
        },
        "conversation_version": {
          "type": "integer"
        },
        "home_account": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "labels": {
          "additionalProperties": {
            "type": "string"
          },
          "type": "object"
        },
        "predecessor": {
          "type": "string"
        },
        "successor": {
          "type": "string"
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "conversation_version",
        "home_account"
      ],
      "type": "object"
    },
    "CreateConversationContent": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "type": "string"
        },
        "participants": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "agent_id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "participants"
      ],
      "type": "object"
    },
    "Discovery": {
      "additionalProperties": false,
      "properties": {
        "effects_mode": {
          "type": "string"
        },
        "environment": {
          "type": "string"
        },
        "protocol_versions": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "transports": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "transport": {
                "type": "string"
              },
              "url": {
                "type": "string"
              }
            },
            "required": [
              "transport",
              "url"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        }
      },
      "required": [
        "protocol_versions",
        "transports"
      ],
      "type": "object"
    },
    "EphemeralFrame": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "data": {
          "description": "Any JSON value."
        },
        "key": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "kind",
        "key"
      ],
      "type": "object"
    },
    "Event": {
      "additionalProperties": false,
      "properties": {
        "content": {
          "description": "Any JSON value."
        },
        "conversation_id": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "event_id": {
          "type": "string"
        },
        "relations": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "event_id": {
                "type": "string"
              },
              "rel_type": {
                "type": "string"
              }
            },
            "required": [
              "event_id",
              "rel_type"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "sender": {
          "type": "string"
        },
        "state_key": {
          "type": [
            "null",
            "string"
          ]
        },
        "type": {
          "type": "string"
        },
        "unsigned": {
          "additionalProperties": false,
          "properties": {
            "command_id": {
              "type": "string"
            }
          },
          "type": [
            "null",
            "object"
          ]
        }
      },
      "required": [
        "event_id",
        "conversation_id",
        "type",
        "sender",
        "created_at",
        "content"
      ],
      "type": "object",
      "x-robotelos-content-by-type": {
        "robotelos.conversation": {
          "$ref": "#/$defs/ConversationContent"
        },
        "robotelos.message": {
          "$ref": "#/$defs/MessageContent"
        },
        "robotelos.obligation": {
          "$ref": "#/$defs/ObligationContent"
        },
        "robotelos.outcome": {
          "$ref": "#/$defs/OutcomeContent"
        },
        "robotelos.participant": {
          "$ref": "#/$defs/ParticipantContent"
        },
        "robotelos.surface": {
          "$ref": "#/$defs/SurfaceContent"
        }
      }
    },
    "Frame": {
      "additionalProperties": false,
      "properties": {
        "cursor": {
          "additionalProperties": false,
          "properties": {
            "epoch": {
              "type": "string"
            },
            "projection_id": {
              "type": "string"
            },
            "sequence": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "projection_id",
            "epoch",
            "sequence"
          ],
          "type": "object"
        },
        "event": {
          "additionalProperties": false,
          "properties": {
            "content": {
              "description": "Any JSON value."
            },
            "conversation_id": {
              "type": "string"
            },
            "created_at": {
              "type": "string"
            },
            "event_id": {
              "type": "string"
            },
            "relations": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "event_id": {
                    "type": "string"
                  },
                  "rel_type": {
                    "type": "string"
                  }
                },
                "required": [
                  "event_id",
                  "rel_type"
                ],
                "type": "object"
              },
              "type": [
                "null",
                "array"
              ]
            },
            "sender": {
              "type": "string"
            },
            "state_key": {
              "type": [
                "null",
                "string"
              ]
            },
            "type": {
              "type": "string"
            },
            "unsigned": {
              "additionalProperties": false,
              "properties": {
                "command_id": {
                  "type": "string"
                }
              },
              "type": [
                "null",
                "object"
              ]
            }
          },
          "required": [
            "event_id",
            "conversation_id",
            "type",
            "sender",
            "created_at",
            "content"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "cursor",
        "event"
      ],
      "type": "object"
    },
    "FramesPush": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "frames": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "cursor": {
                "additionalProperties": false,
                "properties": {
                  "epoch": {
                    "type": "string"
                  },
                  "projection_id": {
                    "type": "string"
                  },
                  "sequence": {
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "projection_id",
                  "epoch",
                  "sequence"
                ],
                "type": "object"
              },
              "event": {
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "description": "Any JSON value."
                  },
                  "conversation_id": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "relations": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "event_id": {
                          "type": "string"
                        },
                        "rel_type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "event_id",
                        "rel_type"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "null",
                      "array"
                    ]
                  },
                  "sender": {
                    "type": "string"
                  },
                  "state_key": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "type": {
                    "type": "string"
                  },
                  "unsigned": {
                    "additionalProperties": false,
                    "properties": {
                      "command_id": {
                        "type": "string"
                      }
                    },
                    "type": [
                      "null",
                      "object"
                    ]
                  }
                },
                "required": [
                  "event_id",
                  "conversation_id",
                  "type",
                  "sender",
                  "created_at",
                  "content"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "cursor",
              "event"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "up_to_date": {
          "type": "boolean"
        }
      },
      "required": [
        "conversation_id",
        "frames"
      ],
      "type": "object"
    },
    "GetReceiptRequest": {
      "additionalProperties": false,
      "properties": {
        "command": {
          "additionalProperties": false,
          "properties": {
            "command_id": {
              "type": "string"
            },
            "content": {
              "description": "Any JSON value."
            },
            "conversation_id": {
              "type": "string"
            },
            "target": {
              "description": "Any JSON value."
            },
            "type": {
              "type": "string"
            }
          },
          "required": [
            "command_id",
            "type"
          ],
          "type": "object"
        }
      },
      "required": [
        "command"
      ],
      "type": "object"
    },
    "InitializeRequest": {
      "additionalProperties": false,
      "properties": {
        "capabilities": {
          "description": "Any JSON value."
        },
        "client": {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        },
        "conversation_versions": {
          "items": {
            "type": "integer"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "protocol_versions": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        }
      },
      "required": [
        "protocol_versions",
        "client"
      ],
      "type": "object"
    },
    "InitializeResult": {
      "additionalProperties": false,
      "properties": {
        "agreed": {
          "additionalProperties": {
            "description": "Any JSON value."
          },
          "type": "object"
        },
        "capabilities": {
          "additionalProperties": false,
          "properties": {
            "features": {
              "items": {
                "type": "string"
              },
              "type": [
                "null",
                "array"
              ]
            },
            "limits": {
              "additionalProperties": false,
              "properties": {
                "max_event_bytes": {
                  "type": "integer"
                },
                "max_mentions": {
                  "type": "integer"
                },
                "max_message_bytes": {
                  "type": "integer"
                },
                "max_parts": {
                  "type": "integer"
                },
                "max_relations": {
                  "type": "integer"
                },
                "page_size": {
                  "type": "integer"
                }
              },
              "required": [
                "max_message_bytes",
                "max_event_bytes",
                "max_parts",
                "max_mentions",
                "max_relations",
                "page_size"
              ],
              "type": "object"
            }
          },
          "required": [
            "limits",
            "features"
          ],
          "type": "object"
        },
        "conversation_versions": {
          "items": {
            "type": "integer"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "downgrades": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "principal": {
          "type": "string"
        },
        "protocol_version": {
          "type": "string"
        },
        "server": {
          "additionalProperties": false,
          "properties": {
            "name": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "name",
            "version"
          ],
          "type": "object"
        },
        "session_expires_at": {
          "type": "string"
        }
      },
      "required": [
        "protocol_version",
        "conversation_versions",
        "server",
        "principal",
        "capabilities",
        "agreed",
        "downgrades"
      ],
      "type": "object"
    },
    "MessageContent": {
      "additionalProperties": false,
      "properties": {
        "agent": {
          "additionalProperties": false,
          "properties": {
            "agent_id": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "agent_id"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "mentions": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "modality": {
          "type": "string"
        },
        "parts": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "data": {
                "description": "Any JSON value."
              },
              "mediaType": {
                "type": "string"
              },
              "raw": {
                "contentEncoding": "base64",
                "type": "string"
              },
              "text": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        }
      },
      "required": [
        "parts"
      ],
      "type": "object"
    },
    "ObligationContent": {
      "additionalProperties": false,
      "properties": {
        "answer": {
          "additionalProperties": false,
          "properties": {
            "kind": {
              "type": "string"
            },
            "option_id": {
              "type": "string"
            },
            "source": {
              "type": "string"
            },
            "via_event": {
              "type": "string"
            }
          },
          "required": [
            "kind"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "expires_at": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "options": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "description": {
                "type": "string"
              },
              "id": {
                "type": "string"
              },
              "label": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "label"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "prompt": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "data": {
                "description": "Any JSON value."
              },
              "mediaType": {
                "type": "string"
              },
              "raw": {
                "contentEncoding": "base64",
                "type": "string"
              },
              "text": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "raised_by": {
          "type": "string"
        },
        "responders": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "status": {
          "type": "string"
        },
        "target": {
          "additionalProperties": false,
          "properties": {
            "effective_digest": {
              "type": "string"
            },
            "operation_ref": {
              "type": "string"
            },
            "summary": {
              "type": "string"
            }
          },
          "required": [
            "operation_ref",
            "effective_digest",
            "summary"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "version": {
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "version",
        "status",
        "raised_by",
        "responders",
        "prompt"
      ],
      "type": "object"
    },
    "OutcomeContent": {
      "additionalProperties": false,
      "properties": {
        "parts": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "data": {
                "description": "Any JSON value."
              },
              "mediaType": {
                "type": "string"
              },
              "raw": {
                "contentEncoding": "base64",
                "type": "string"
              },
              "text": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "status": {
          "type": "string"
        }
      },
      "required": [
        "status"
      ],
      "type": "object"
    },
    "ParticipantContent": {
      "additionalProperties": false,
      "properties": {
        "agent": {
          "additionalProperties": false,
          "properties": {
            "agent_id": {
              "type": "string"
            },
            "version": {
              "type": "string"
            }
          },
          "required": [
            "agent_id"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "display": {
          "type": "string"
        },
        "kind": {
          "type": "string"
        },
        "membership": {
          "type": "string"
        },
        "owner": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "verification": {
          "type": "string"
        }
      },
      "required": [
        "kind",
        "role",
        "membership",
        "verification"
      ],
      "type": "object"
    },
    "Push": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "description": "Any JSON value."
        },
        "push": {
          "type": "string"
        }
      },
      "required": [
        "push",
        "body"
      ],
      "type": "object"
    },
    "ReadAfterRequest": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "cursor": {
          "additionalProperties": false,
          "properties": {
            "epoch": {
              "type": "string"
            },
            "projection_id": {
              "type": "string"
            },
            "sequence": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "projection_id",
            "epoch",
            "sequence"
          ],
          "type": "object"
        },
        "limit": {
          "type": "integer"
        }
      },
      "required": [
        "conversation_id",
        "cursor"
      ],
      "type": "object"
    },
    "ReadAfterResult": {
      "additionalProperties": false,
      "properties": {
        "cursor": {
          "additionalProperties": false,
          "properties": {
            "epoch": {
              "type": "string"
            },
            "projection_id": {
              "type": "string"
            },
            "sequence": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "projection_id",
            "epoch",
            "sequence"
          ],
          "type": "object"
        },
        "frames": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "cursor": {
                "additionalProperties": false,
                "properties": {
                  "epoch": {
                    "type": "string"
                  },
                  "projection_id": {
                    "type": "string"
                  },
                  "sequence": {
                    "minimum": 0,
                    "type": "integer"
                  }
                },
                "required": [
                  "projection_id",
                  "epoch",
                  "sequence"
                ],
                "type": "object"
              },
              "event": {
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "description": "Any JSON value."
                  },
                  "conversation_id": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "relations": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "event_id": {
                          "type": "string"
                        },
                        "rel_type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "event_id",
                        "rel_type"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "null",
                      "array"
                    ]
                  },
                  "sender": {
                    "type": "string"
                  },
                  "state_key": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "type": {
                    "type": "string"
                  },
                  "unsigned": {
                    "additionalProperties": false,
                    "properties": {
                      "command_id": {
                        "type": "string"
                      }
                    },
                    "type": [
                      "null",
                      "object"
                    ]
                  }
                },
                "required": [
                  "event_id",
                  "conversation_id",
                  "type",
                  "sender",
                  "created_at",
                  "content"
                ],
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "cursor",
              "event"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "more": {
          "type": "boolean"
        },
        "resnapshot_reason": {
          "type": "string"
        },
        "up_to_date": {
          "type": "boolean"
        }
      },
      "required": [
        "cursor"
      ],
      "type": "object"
    },
    "Receipt": {
      "additionalProperties": false,
      "properties": {
        "command_id": {
          "type": "string"
        },
        "conversation_id": {
          "type": "string"
        },
        "disposition": {
          "type": "string"
        },
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "retry_after_ms": {
              "type": "integer"
            },
            "retryable": {
              "type": "boolean"
            },
            "successor": {
              "type": "string"
            }
          },
          "required": [
            "code"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "events": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "frames": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "projection_id": {
                "type": "string"
              },
              "sequence": {
                "minimum": 0,
                "type": "integer"
              }
            },
            "required": [
              "projection_id",
              "sequence"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "receipt_id": {
          "type": "string"
        }
      },
      "required": [
        "receipt_id",
        "command_id",
        "disposition"
      ],
      "type": "object"
    },
    "RefreshAuthRequest": {
      "additionalProperties": false,
      "properties": {
        "token": {
          "type": "string"
        }
      },
      "required": [
        "token"
      ],
      "type": "object"
    },
    "RefreshAuthResult": {
      "additionalProperties": false,
      "properties": {
        "session_expires_at": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Request": {
      "additionalProperties": false,
      "properties": {
        "body": {
          "description": "Any JSON value."
        },
        "id": {
          "type": "string"
        },
        "op": {
          "type": "string"
        },
        "trace": {
          "additionalProperties": false,
          "properties": {
            "traceparent": {
              "type": "string"
            },
            "tracestate": {
              "type": "string"
            }
          },
          "required": [
            "traceparent"
          ],
          "type": [
            "null",
            "object"
          ]
        }
      },
      "required": [
        "id",
        "op"
      ],
      "type": "object"
    },
    "ResnapshotRequired": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "reason": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id",
        "reason"
      ],
      "type": "object"
    },
    "Response": {
      "additionalProperties": false,
      "properties": {
        "error": {
          "additionalProperties": false,
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "retry_after_ms": {
              "type": "integer"
            },
            "retryable": {
              "type": "boolean"
            },
            "successor": {
              "type": "string"
            }
          },
          "required": [
            "code"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "id": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "result": {
          "description": "Any JSON value."
        }
      },
      "required": [
        "id",
        "ok"
      ],
      "type": "object"
    },
    "Snapshot": {
      "additionalProperties": false,
      "properties": {
        "conversation_version": {
          "type": "integer"
        },
        "cursor": {
          "additionalProperties": false,
          "properties": {
            "epoch": {
              "type": "string"
            },
            "projection_id": {
              "type": "string"
            },
            "sequence": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "projection_id",
            "epoch",
            "sequence"
          ],
          "type": "object"
        },
        "state": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "content": {
                "description": "Any JSON value."
              },
              "conversation_id": {
                "type": "string"
              },
              "created_at": {
                "type": "string"
              },
              "event_id": {
                "type": "string"
              },
              "relations": {
                "items": {
                  "additionalProperties": false,
                  "properties": {
                    "event_id": {
                      "type": "string"
                    },
                    "rel_type": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "event_id",
                    "rel_type"
                  ],
                  "type": "object"
                },
                "type": [
                  "null",
                  "array"
                ]
              },
              "sender": {
                "type": "string"
              },
              "state_key": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "type": {
                "type": "string"
              },
              "unsigned": {
                "additionalProperties": false,
                "properties": {
                  "command_id": {
                    "type": "string"
                  }
                },
                "type": [
                  "null",
                  "object"
                ]
              }
            },
            "required": [
              "event_id",
              "conversation_id",
              "type",
              "sender",
              "created_at",
              "content"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "timeline": {
          "additionalProperties": false,
          "properties": {
            "events": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "description": "Any JSON value."
                  },
                  "conversation_id": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "relations": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "event_id": {
                          "type": "string"
                        },
                        "rel_type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "event_id",
                        "rel_type"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "null",
                      "array"
                    ]
                  },
                  "sender": {
                    "type": "string"
                  },
                  "state_key": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "type": {
                    "type": "string"
                  },
                  "unsigned": {
                    "additionalProperties": false,
                    "properties": {
                      "command_id": {
                        "type": "string"
                      }
                    },
                    "type": [
                      "null",
                      "object"
                    ]
                  }
                },
                "required": [
                  "event_id",
                  "conversation_id",
                  "type",
                  "sender",
                  "created_at",
                  "content"
                ],
                "type": "object"
              },
              "type": [
                "null",
                "array"
              ]
            },
            "older_token": {
              "type": "string"
            }
          },
          "required": [
            "events"
          ],
          "type": "object"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "type",
        "cursor",
        "conversation_version",
        "state",
        "timeline"
      ],
      "type": "object"
    },
    "SubmitMessageContent": {
      "additionalProperties": false,
      "properties": {
        "mentions": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "parts": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "data": {
                "description": "Any JSON value."
              },
              "mediaType": {
                "type": "string"
              },
              "raw": {
                "contentEncoding": "base64",
                "type": "string"
              },
              "text": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "relations": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "event_id": {
                "type": "string"
              },
              "rel_type": {
                "type": "string"
              }
            },
            "required": [
              "event_id",
              "rel_type"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        }
      },
      "required": [
        "parts"
      ],
      "type": "object"
    },
    "SubscribeRequest": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        },
        "cursor": {
          "additionalProperties": false,
          "properties": {
            "epoch": {
              "type": "string"
            },
            "projection_id": {
              "type": "string"
            },
            "sequence": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "projection_id",
            "epoch",
            "sequence"
          ],
          "type": [
            "null",
            "object"
          ]
        }
      },
      "required": [
        "conversation_id"
      ],
      "type": "object"
    },
    "SubscribeResult": {
      "additionalProperties": false,
      "properties": {
        "cursor": {
          "additionalProperties": false,
          "properties": {
            "epoch": {
              "type": "string"
            },
            "projection_id": {
              "type": "string"
            },
            "sequence": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "projection_id",
            "epoch",
            "sequence"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "resnapshot_reason": {
          "type": "string"
        },
        "resumed": {
          "type": "boolean"
        },
        "snapshot": {
          "additionalProperties": false,
          "properties": {
            "conversation_version": {
              "type": "integer"
            },
            "cursor": {
              "additionalProperties": false,
              "properties": {
                "epoch": {
                  "type": "string"
                },
                "projection_id": {
                  "type": "string"
                },
                "sequence": {
                  "minimum": 0,
                  "type": "integer"
                }
              },
              "required": [
                "projection_id",
                "epoch",
                "sequence"
              ],
              "type": "object"
            },
            "state": {
              "items": {
                "additionalProperties": false,
                "properties": {
                  "content": {
                    "description": "Any JSON value."
                  },
                  "conversation_id": {
                    "type": "string"
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "event_id": {
                    "type": "string"
                  },
                  "relations": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "event_id": {
                          "type": "string"
                        },
                        "rel_type": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "event_id",
                        "rel_type"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "null",
                      "array"
                    ]
                  },
                  "sender": {
                    "type": "string"
                  },
                  "state_key": {
                    "type": [
                      "null",
                      "string"
                    ]
                  },
                  "type": {
                    "type": "string"
                  },
                  "unsigned": {
                    "additionalProperties": false,
                    "properties": {
                      "command_id": {
                        "type": "string"
                      }
                    },
                    "type": [
                      "null",
                      "object"
                    ]
                  }
                },
                "required": [
                  "event_id",
                  "conversation_id",
                  "type",
                  "sender",
                  "created_at",
                  "content"
                ],
                "type": "object"
              },
              "type": [
                "null",
                "array"
              ]
            },
            "timeline": {
              "additionalProperties": false,
              "properties": {
                "events": {
                  "items": {
                    "additionalProperties": false,
                    "properties": {
                      "content": {
                        "description": "Any JSON value."
                      },
                      "conversation_id": {
                        "type": "string"
                      },
                      "created_at": {
                        "type": "string"
                      },
                      "event_id": {
                        "type": "string"
                      },
                      "relations": {
                        "items": {
                          "additionalProperties": false,
                          "properties": {
                            "event_id": {
                              "type": "string"
                            },
                            "rel_type": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "event_id",
                            "rel_type"
                          ],
                          "type": "object"
                        },
                        "type": [
                          "null",
                          "array"
                        ]
                      },
                      "sender": {
                        "type": "string"
                      },
                      "state_key": {
                        "type": [
                          "null",
                          "string"
                        ]
                      },
                      "type": {
                        "type": "string"
                      },
                      "unsigned": {
                        "additionalProperties": false,
                        "properties": {
                          "command_id": {
                            "type": "string"
                          }
                        },
                        "type": [
                          "null",
                          "object"
                        ]
                      }
                    },
                    "required": [
                      "event_id",
                      "conversation_id",
                      "type",
                      "sender",
                      "created_at",
                      "content"
                    ],
                    "type": "object"
                  },
                  "type": [
                    "null",
                    "array"
                  ]
                },
                "older_token": {
                  "type": "string"
                }
              },
              "required": [
                "events"
              ],
              "type": "object"
            },
            "type": {
              "type": "string"
            }
          },
          "required": [
            "type",
            "cursor",
            "conversation_version",
            "state",
            "timeline"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "up_to_date": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "SurfaceContent": {
      "additionalProperties": false,
      "properties": {
        "anchor_event_id": {
          "type": "string"
        },
        "catalog_id": {
          "type": "string"
        },
        "fallback": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "data": {
                "description": "Any JSON value."
              },
              "mediaType": {
                "type": "string"
              },
              "raw": {
                "contentEncoding": "base64",
                "type": "string"
              },
              "text": {
                "type": [
                  "null",
                  "string"
                ]
              },
              "url": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "format": {
          "type": "string"
        },
        "messages": {
          "items": {
            "description": "Any JSON value."
          },
          "type": [
            "null",
            "array"
          ]
        },
        "obligation_id": {
          "type": "string"
        },
        "revision": {
          "type": "integer"
        }
      },
      "required": [
        "format",
        "catalog_id",
        "revision",
        "messages",
        "fallback"
      ],
      "type": "object"
    },
    "UnsubscribeRequest": {
      "additionalProperties": false,
      "properties": {
        "conversation_id": {
          "type": "string"
        }
      },
      "required": [
        "conversation_id"
      ],
      "type": "object"
    },
    "UpdateParticipantContent": {
      "additionalProperties": false,
      "properties": {
        "agent_id": {
          "type": "string"
        },
        "display": {
          "type": "string"
        },
        "membership": {
          "type": "string"
        },
        "role": {
          "type": "string"
        }
      },
      "required": [
        "membership"
      ],
      "type": "object"
    },
    "UpdateParticipantTarget": {
      "additionalProperties": false,
      "properties": {
        "participant_id": {
          "type": "string"
        }
      },
      "type": "object"
    }
  },
  "$id": "https://github.com/robotelos/robotelos/protocol/schema/robotelos-protocol-v1.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Wire types of MCoP version 1, generated from the Go types in protocol/. Do not edit: run `go run ./protocol/cmd/protocol-schema`.",
  "oneOf": [
    {
      "$ref": "#/$defs/Request"
    },
    {
      "$ref": "#/$defs/Response"
    },
    {
      "$ref": "#/$defs/Push"
    }
  ],
  "title": "Robotelos Conversation Protocol, version 1"
}

Next steps