{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "revisionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 512,
      "pattern": "^[^\\s]+$"
    },
    "context": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "project",
            "project_review_session"
          ]
        },
        "id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        }
      },
      "required": [
        "type",
        "id"
      ]
    },
    "kind": {
      "type": "string",
      "enum": [
        "requirement",
        "claim",
        "evidence"
      ]
    },
    "actor": {
      "$ref": "#/components/schemas/ProjectAgentActor"
    },
    "title": {
      "type": "string",
      "maxLength": 200
    },
    "version": {
      "type": "integer",
      "minimum": 1,
      "maximum": 9007199254740991
    },
    "archived": {
      "type": "boolean"
    },
    "contentSha256": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "createdAt": {
      "type": "string",
      "maxLength": 40
    },
    "targets": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectAgentExactTarget"
      },
      "maxItems": 100,
      "minItems": 1
    },
    "relations": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "requirement",
                  "claim",
                  "evidence"
                ]
              },
              "revisionId": {
                "type": "string",
                "minLength": 1,
                "maxLength": 512,
                "pattern": "^[^\\s]+$"
              }
            },
            "required": [
              "kind",
              "revisionId"
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "resource"
                ]
              },
              "target": {
                "$ref": "#/components/schemas/ProjectAgentExactTarget"
              }
            },
            "required": [
              "kind",
              "target"
            ]
          }
        ]
      },
      "maxItems": 100,
      "minItems": 0
    },
    "expectedOutcomeMarkdown": {
      "type": "string",
      "maxLength": 32768
    },
    "acceptanceScope": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ProjectAgentExactTarget"
      },
      "maxItems": 100,
      "minItems": 1
    },
    "statementMarkdown": {
      "type": "string",
      "maxLength": 32768
    },
    "evidenceRevisionIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 512,
        "pattern": "^[^\\s]+$"
      },
      "maxItems": 100,
      "minItems": 0
    },
    "requirementRevisionIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 512,
        "pattern": "^[^\\s]+$"
      },
      "maxItems": 100,
      "minItems": 0
    },
    "source": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "supplied"
            },
            "report": {
              "anyOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512,
                      "pattern": "^[^\\s]+$"
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "html",
                        "xml",
                        "json",
                        "log"
                      ]
                    },
                    "capturedSha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "capturedBytes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 262144
                    },
                    "sanitizedSha256": {
                      "type": "string",
                      "pattern": "^[a-f0-9]{64}$"
                    },
                    "sanitizedBytes": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 262144
                    },
                    "diagnostics": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "maxItems": 100,
                      "minItems": 0
                    },
                    "expiresAt": {
                      "type": "string",
                      "maxLength": 40
                    }
                  },
                  "required": [
                    "id",
                    "format",
                    "capturedSha256",
                    "capturedBytes",
                    "sanitizedSha256",
                    "sanitizedBytes",
                    "diagnostics",
                    "expiresAt"
                  ]
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "kind",
            "report"
          ]
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "kind": {
              "const": "provider_reference"
            },
            "provider": {
              "type": "string",
              "enum": [
                "github",
                "azure_devops"
              ]
            },
            "runId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 512,
              "pattern": "^[^\\s]+$"
            },
            "commitSha": {
              "type": "string",
              "pattern": "^[a-f0-9]{40,64}$"
            }
          },
          "required": [
            "kind",
            "provider",
            "runId",
            "commitSha"
          ]
        }
      ]
    },
    "result": {
      "type": "string",
      "enum": [
        "passed",
        "failed",
        "unknown"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "reported",
        "referenced",
        "observed",
        "provider_verified",
        "failed",
        "missing",
        "stale",
        "conflicting",
        "restricted",
        "unknown",
        "pending",
        "canceled",
        "unsupported",
        "mismatched",
        "inaccessible"
      ]
    },
    "provenance": {
      "type": "string",
      "enum": [
        "reported",
        "observed",
        "provider_verified"
      ]
    },
    "currency": {
      "type": "string",
      "enum": [
        "current",
        "stale",
        "revoked"
      ]
    },
    "observedAt": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 40
        },
        {
          "type": "null"
        }
      ]
    },
    "providerReceiptId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "providerVerificationId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 512,
          "pattern": "^[^\\s]+$"
        },
        {
          "type": "null"
        }
      ]
    },
    "acceptance": {
      "const": "not_assessed"
    }
  },
  "required": [
    "id",
    "revisionId",
    "context",
    "kind",
    "actor",
    "title",
    "version",
    "archived",
    "contentSha256",
    "createdAt",
    "targets",
    "relations",
    "status",
    "provenance",
    "currency",
    "observedAt",
    "providerReceiptId",
    "acceptance"
  ]
}