{
  "type": "object",
  "required": [
    "header",
    "evidenceId",
    "ownerId",
    "projectId",
    "sourceType",
    "digest",
    "capturedAt",
    "contentType"
  ],
  "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
    },
    "evidenceId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "ownerId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "projectId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "sourceType": {
      "anyOf": [
        {
          "type": "string",
          "const": "user"
        },
        {
          "type": "string",
          "const": "tool"
        },
        {
          "type": "string",
          "const": "document"
        },
        {
          "type": "string",
          "const": "system"
        }
      ]
    },
    "sourceUri": {
      "type": "string",
      "maxLength": 4096
    },
    "digest": {
      "type": "string",
      "pattern": "^[a-f0-9]{64}$"
    },
    "capturedAt": {
      "type": "string",
      "format": "date-time"
    },
    "contentType": {
      "type": "string",
      "minLength": 1
    },
    "metadata": {
      "type": "object",
      "patternProperties": {
        "^.*$": {}
      }
    }
  },
  "additionalProperties": false,
  "$id": "asm-evidence-v1"
}
