{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://know-your-agent.ru/kya-profile.schema.json",
 "title": "KYA-профиль ИИ-агента 0.1 (черновик)",
 "description": "Открытый черновик know-your-agent.ru, CC BY 4.0. Не стандарт.",
 "type": "object",
 "required": [
  "kya_version",
  "agent",
  "owner",
  "readiness",
  "generated_at"
 ],
 "properties": {
  "kya_version": {
   "const": "0.1"
  },
  "agent": {
   "type": "object",
   "properties": {
    "name": {
     "type": [
      "string",
      "null"
     ]
    },
    "version": {
     "type": [
      "string",
      "null"
     ]
    }
   }
  },
  "owner": {
   "type": "object",
   "properties": {
    "name": {
     "type": [
      "string",
      "null"
     ]
    },
    "inn": {
     "type": [
      "string",
      "null"
     ],
     "pattern": "^(\\d{10}|\\d{12})$"
    },
    "contact": {
     "type": [
      "string",
      "null"
     ]
    }
   }
  },
  "passport": {
   "type": [
    "string",
    "null"
   ]
  },
  "registry": {
   "type": [
    "string",
    "null"
   ]
  },
  "mandate": {
   "type": "object",
   "properties": {
    "actions": {
     "type": "array",
     "items": {
      "type": "string"
     }
    },
    "limit": {
     "type": [
      "string",
      "null"
     ]
    },
    "until": {
     "type": [
      "string",
      "null"
     ]
    },
    "revoke": {
     "type": [
      "string",
      "null"
     ]
    }
   }
  },
  "trace": {
   "type": "object",
   "properties": {
    "user_agent": {
     "type": [
      "string",
      "null"
     ]
    },
    "log": {
     "type": "boolean"
    },
    "signed_requests": {
     "type": "boolean"
    }
   }
  },
  "readiness": {
   "type": "object",
   "properties": {
    "kto": {
     "enum": [
      "готово",
      "частично",
      "не готово"
     ]
    },
    "polnomochiya": {
     "enum": [
      "готово",
      "частично",
      "не готово"
     ]
    },
    "sled": {
     "enum": [
      "готово",
      "частично",
      "не готово"
     ]
    }
   }
  },
  "generated_at": {
   "type": "string",
   "format": "date-time"
  },
  "generator": {
   "type": "string"
  }
 }
}