{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "memory_revise",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "expectedRevision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "content": {
      "type": "string",
      "minLength": 1,
      "maxLength": 8000
    },
    "kind": {
      "type": "string",
      "enum": ["fact", "constraint", "lesson", "preference", "procedure"]
    },
    "source": {
      "type": "string",
      "minLength": 1,
      "maxLength": 500
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "pinned": {
      "type": "boolean"
    },
    "expiresAt": {
      "anyOf": [
        {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": ["active", "archived"]
    },
    "verified": {
      "type": "boolean",
      "const": true
    }
  },
  "required": ["id", "expectedRevision"],
  "additionalProperties": false
}
