{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://robotnewsnetwork.com/schema/rnn.packet.v1.json",
  "title": "RNN Agent Packet",
  "type": "object",
  "required": [
    "schema",
    "id",
    "humanBrief",
    "agentSummary",
    "claim",
    "source",
    "confidence",
    "limits",
    "verifyAt"
  ],
  "properties": {
    "schema": {
      "const": "rnn.packet.v1"
    },
    "id": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "url": {
      "type": "string",
      "format": "uri"
    },
    "externalUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "humanBrief": {
      "type": "string"
    },
    "agentSummary": {
      "type": "string"
    },
    "claim": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "priority": {
      "type": "string"
    },
    "whatChanged": {
      "type": "string"
    },
    "affectedSystems": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "recommendedAction": {
      "type": "string"
    },
    "urgency": {
      "type": [
        "string",
        "null"
      ]
    },
    "expiresOrRecheckAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "entities": {
      "type": "array",
      "items": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "required": [
              "name",
              "slug"
            ],
            "properties": {
              "name": {
                "type": "string"
              },
              "slug": {
                "type": "string"
              },
              "type": {
                "type": "string"
              },
              "basis": {
                "type": "string"
              }
            },
            "additionalProperties": true
          }
        ]
      }
    },
    "confidence": {
      "type": "object",
      "required": [
        "label",
        "basis"
      ],
      "properties": {
        "label": {
          "type": "string"
        },
        "basis": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "profile": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "sourceIdentity": {
              "type": "string"
            },
            "extraction": {
              "type": "string"
            },
            "temporal": {
              "type": "string"
            },
            "corroboration": {
              "type": "string"
            },
            "verificationStatus": {
              "type": "string"
            }
          },
          "additionalProperties": true
        }
      },
      "additionalProperties": true
    },
    "source": {
      "type": "object",
      "required": [
        "name",
        "status"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "url": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "feedUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        },
        "status": {
          "type": "string"
        }
      },
      "additionalProperties": true
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "machineReadable": {
      "type": "boolean"
    },
    "timestamps": {
      "type": "object",
      "properties": {
        "publishedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "modifiedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "staleAfter": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "additionalProperties": false
    },
    "links": {
      "type": "object",
      "properties": {
        "html": {
          "type": "string"
        },
        "json": {
          "type": "string"
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "format": "uri"
        }
      },
      "additionalProperties": false
    },
    "limits": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "verifyAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "sourceReviewUrl": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "updateHistory": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "at",
          "note"
        ],
        "properties": {
          "at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "note": {
            "type": "string"
          }
        },
        "additionalProperties": true
      }
    }
  },
  "additionalProperties": true
}