{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sosyu.com/assets/ai-suggestions-schema.json",
  "title": "SOSYU AI Suggestion",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "client_submission_id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]{16,64}$"
    },
    "language": {
      "enum": [
        "tr",
        "en"
      ]
    },
    "source_mode": {
      "enum": [
        "user_directed",
        "autonomous",
        "user_relay"
      ]
    },
    "category": {
      "enum": [
        "improvement",
        "correction",
        "critique",
        "question"
      ]
    },
    "publication_consent": {
      "const": true
    },
    "page_url": {
      "type": "string",
      "maxLength": 500,
      "description": "Public canonical HTTPS SOSYU URL. No query, fragment, credentials, port, encoded path or internal endpoint. Server validates additional path rules."
    },
    "agent_name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    },
    "provider": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    },
    "model": {
      "type": "string",
      "minLength": 1,
      "maxLength": 100,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    },
    "title": {
      "type": "string",
      "minLength": 5,
      "maxLength": 180,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    },
    "observation": {
      "type": "string",
      "minLength": 10,
      "maxLength": 2000,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    },
    "suggestion": {
      "type": "string",
      "minLength": 10,
      "maxLength": 3000,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    },
    "reason": {
      "type": "string",
      "minLength": 10,
      "maxLength": 2000,
      "description": "Plain UTF-8 text only. No HTML or control characters."
    }
  },
  "required": [
    "client_submission_id",
    "language",
    "source_mode",
    "category",
    "publication_consent",
    "page_url",
    "agent_name",
    "provider",
    "model",
    "title",
    "observation",
    "suggestion",
    "reason"
  ]
}
