{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://hai.ai/schemas/message/v1/message.schema.json",
  "title": "Message",
  "description": "A signed, immutable message about a task",
  "allOf": [
    {
      "$ref": "https://hai.ai/schemas/header/v1/header.schema.json"
    },
    {
      "type": "object",
      "properties": {
        "threadID": {
          "type": "string",
          "hai": "base"
        },
        "to": {
          "type": "array",
          "hai": "agent",
          "description": "list of addressees, optional  ",
          "items": {
            "type": "string"
          }
        },
        "from": {
          "type": "array",
          "hai": "agent",
          "description": "list of addressees, optional  ",
          "items": {
            "type": "string"
          }
        },
        "content": {
          "description": "body , subject etc",
          "hai": "agent",
          "type": "object"
        },
        "jacsMessagePreviousId": {
          "type": "string",
          "format": "uuid",
          "description": "UUID of the previous message in this thread for ordering.",
          "hai": "meta"
        },
        "attachments": {
          "type": "array",
          "description": "list of files  ",
          "items": {
            "$ref": "https://hai.ai/schemas/components/files/v1/files.schema.json"
          }
        }
      }
    }
  ],
  "required": [
    "to",
    "from",
    "content"
  ]
}
