{
  "$defs": {
    "EvaluationSource": {
      "additionalProperties": false,
      "properties": {
        "artifact_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Artifact Index Sha256",
          "type": "string"
        },
        "candidate_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Candidate Id",
          "type": "string"
        },
        "contract_version": {
          "const": "1.0.0",
          "default": "1.0.0",
          "title": "Contract Version",
          "type": "string"
        },
        "input_snapshot_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Input Snapshot Sha256",
          "type": "string"
        },
        "manifest_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Manifest Sha256",
          "type": "string"
        },
        "result_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Result Index Sha256",
          "type": "string"
        },
        "run_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Run Id",
          "type": "string"
        }
      },
      "required": [
        "candidate_id",
        "run_id",
        "manifest_sha256",
        "input_snapshot_sha256",
        "result_index_sha256",
        "artifact_index_sha256"
      ],
      "title": "EvaluationSource",
      "type": "object"
    },
    "ReviewTransition": {
      "additionalProperties": false,
      "properties": {
        "from_state": {
          "anyOf": [
            {
              "enum": [
                "prepared",
                "blind_complete",
                "scored",
                "reconciled",
                "incomplete",
                "failed"
              ],
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "From State"
        },
        "previous_revision_sha256": {
          "anyOf": [
            {
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Previous Revision Sha256"
        },
        "sequence": {
          "minimum": 0,
          "title": "Sequence",
          "type": "integer"
        },
        "to_state": {
          "enum": [
            "prepared",
            "blind_complete",
            "scored",
            "reconciled",
            "incomplete",
            "failed"
          ],
          "title": "To State",
          "type": "string"
        }
      },
      "required": [
        "sequence",
        "from_state",
        "to_state"
      ],
      "title": "ReviewTransition",
      "type": "object"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:evaluation-review-manifest",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "agent_identity": {
      "anyOf": [
        {
          "maxLength": 200,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Agent Identity"
    },
    "assessment_sha256": {
      "anyOf": [
        {
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Assessment Sha256"
    },
    "blind_review_sha256": {
      "anyOf": [
        {
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Blind Review Sha256"
    },
    "neutral_packet_sha256": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Neutral Packet Sha256",
      "type": "string"
    },
    "reconciliation_sha256": {
      "anyOf": [
        {
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Reconciliation Sha256"
    },
    "review_id": {
      "maxLength": 128,
      "minLength": 1,
      "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
      "title": "Review Id",
      "type": "string"
    },
    "schema_kind": {
      "const": "evaluation_review_manifest",
      "default": "evaluation_review_manifest",
      "title": "Schema Kind",
      "type": "string"
    },
    "schema_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Schema Version",
      "type": "string"
    },
    "skill_version": {
      "maxLength": 64,
      "minLength": 1,
      "title": "Skill Version",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/EvaluationSource"
    },
    "state": {
      "enum": [
        "prepared",
        "blind_complete",
        "scored",
        "reconciled",
        "incomplete",
        "failed"
      ],
      "title": "State",
      "type": "string"
    },
    "transition": {
      "$ref": "#/$defs/ReviewTransition"
    }
  },
  "required": [
    "review_id",
    "source",
    "skill_version",
    "state",
    "transition",
    "neutral_packet_sha256"
  ],
  "title": "ReviewManifest",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
