{
  "type": "object",
  "required": [
    "header",
    "snapshotId",
    "sessionId",
    "sequence",
    "state",
    "digest",
    "createdAt"
  ],
  "properties": {
    "header": {
      "type": "object",
      "required": [
        "namespace",
        "major",
        "minor"
      ],
      "properties": {
        "namespace": {
          "type": "string",
          "const": "ai.aletheion.asm"
        },
        "major": {
          "type": "number",
          "const": 1
        },
        "minor": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "snapshotId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "sessionId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "sequence": {
      "type": "integer",
      "minimum": 0
    },
    "state": {
      "type": "object",
      "patternProperties": {
        "^.*$": {}
      }
    },
    "digest": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "$id": "asm-state-snapshot-v1"
}
