type: object
description: |
    Knowledge-base statistics — total document and chunk counts plus a
    per-source-type breakdown. Returned by `GET /admin/kb/stats`. Counts are
    computed live from `kb_documents` / `kb_chunks`.
required: [documents, chunks, bySource]
properties:
    documents:
        type: integer
        description: Total documents indexed.
    chunks:
        type: integer
        description: Total chunks (post-splitting) across all documents.
    bySource:
        type: object
        description: Document count keyed by `sourceType`.
        additionalProperties: { type: integer }
example:
    documents: 1842
    chunks: 21407
    bySource:
        document: 312
        github: 1290
        discord: 240
