{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Skill Integrity Manifest",
  "type": "object",
  "required": [
    "manifest_version",
    "algorithm",
    "root",
    "entries"
  ],
  "properties": {
    "manifest_version": {
      "type": "integer",
      "minimum": 1
    },
    "algorithm": {
      "const": "sha256"
    },
    "root": {
      "const": "skills"
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "path",
          "aggregate_sha256",
          "files"
        ],
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[a-z0-9][a-z0-9-]*$"
          },
          "path": {
            "type": "string",
            "pattern": "^skills/"
          },
          "aggregate_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "files": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "sha256",
                "bytes"
              ],
              "properties": {
                "path": {
                  "type": "string"
                },
                "sha256": {
                  "type": "string",
                  "pattern": "^[a-f0-9]{64}$"
                },
                "bytes": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": false
}