{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agent4-io/json-schema/agent4-io-my-doc-detail-out-schema.json",
  "title": "MyDocDetailOut",
  "description": "文档详情：入库到底产出了什么。\n\n「状态是 ready」和「这份文件被读懂了」是两回事——前者只说明切片落库了。\n用户没有办法看到切成了几块、每块是什么、抽出了哪些实体，于是「知识星云里没有我的东西」\n这类问题无从自查。这个接口就是把那层黑箱打开。",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/agent4-io-api-openapi.json#/components/schemas/MyDocDetailOut",
  "properties": {
    "id": {
      "type": "string",
      "title": "Id"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "source": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Source"
    },
    "tags": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Tags",
      "default": []
    },
    "chunks": {
      "type": "integer",
      "title": "Chunks"
    },
    "embedded": {
      "type": "integer",
      "title": "Embedded"
    },
    "ready": {
      "type": "boolean",
      "title": "Ready"
    },
    "status": {
      "type": "string",
      "title": "Status"
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error"
    },
    "pages_total": {
      "type": "integer",
      "title": "Pages Total",
      "default": 0
    },
    "pages_done": {
      "type": "integer",
      "title": "Pages Done",
      "default": 0
    },
    "embed_total": {
      "type": "integer",
      "title": "Embed Total",
      "default": 0
    },
    "embed_done": {
      "type": "integer",
      "title": "Embed Done",
      "default": 0
    },
    "can_retry": {
      "type": "boolean",
      "title": "Can Retry",
      "default": true
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At"
    },
    "chunk_list": {
      "items": {
        "$ref": "#/$defs/DocChunkOut"
      },
      "type": "array",
      "title": "Chunk List",
      "default": []
    },
    "entities": {
      "items": {
        "$ref": "#/$defs/DocEntityOut"
      },
      "type": "array",
      "title": "Entities",
      "default": []
    }
  },
  "type": "object",
  "required": [
    "id",
    "chunks",
    "embedded",
    "ready",
    "status",
    "created_at"
  ],
  "$defs": {
    "DocChunkOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "preview": {
          "type": "string",
          "title": "Preview"
        },
        "chars": {
          "type": "integer",
          "title": "Chars"
        },
        "embedded": {
          "type": "boolean",
          "title": "Embedded"
        }
      },
      "type": "object",
      "required": [
        "id",
        "preview",
        "chars",
        "embedded"
      ],
      "title": "DocChunkOut",
      "description": "一个切片的摘要。正文只给前若干字——详情页是给人扫一眼「切成了什么」，不是全文阅读器。"
    },
    "DocEntityOut": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "kind": {
          "type": "string",
          "title": "Kind"
        },
        "mentions": {
          "type": "integer",
          "title": "Mentions"
        }
      },
      "type": "object",
      "required": [
        "id",
        "name",
        "kind",
        "mentions"
      ],
      "title": "DocEntityOut"
    }
  }
}