{
  "type": "object",
  "required": [
    "header",
    "feedbackId",
    "targetType",
    "targetId",
    "rating",
    "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
    },
    "feedbackId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "targetType": {
      "anyOf": [
        {
          "type": "string",
          "const": "memory"
        },
        {
          "type": "string",
          "const": "retrieval"
        },
        {
          "type": "string",
          "const": "action"
        }
      ]
    },
    "targetId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "rating": {
      "anyOf": [
        {
          "type": "string",
          "const": "positive"
        },
        {
          "type": "string",
          "const": "negative"
        },
        {
          "type": "string",
          "const": "correction"
        }
      ]
    },
    "comment": {
      "type": "string",
      "maxLength": 8000
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false,
  "$id": "asm-feedback-v1"
}
