openapi: 3.0.3
info:
  title: Stage 3 Contracts (Supervisor, Reporting, KB-lite)
  version: 1.0.0
paths:
  /knowledge/categories:
    get: { summary: List categories, responses: { '200': { description: OK } } }
    post: { summary: Create category, responses: { '200': { description: OK } } }
  /knowledge/articles:
    post: { summary: Create localized article, responses: { '200': { description: OK } } }
  /knowledge/articles/{article_id}:
    get:
      summary: Get article
      parameters:
        - in: path
          name: article_id
          required: true
          schema: { type: string }
      responses:
        '200': { description: OK }
    patch:
      summary: Update article
      parameters:
        - in: path
          name: article_id
          required: true
          schema: { type: string }
      responses:
        '200': { description: OK }
  /knowledge/search:
    get:
      summary: Search localized articles
      parameters:
        - in: query
          name: q
          schema: { type: string }
        - in: query
          name: language
          schema: { type: string, enum: [ru, kz] }
        - in: query
          name: article_group_id
          schema: { type: string }
      responses:
        '200': { description: OK }
  /reports/events:
    post: { summary: Ingest KPI event, responses: { '200': { description: OK } } }
  /reports/kpi:
    get: { summary: KPI snapshot, responses: { '200': { description: OK } } }
  /reports/export:
    get: { summary: Export CSV, responses: { '200': { description: OK } } }
  /supervisor/agent-states:
    post: { summary: Update agent state, responses: { '200': { description: OK } } }
  /supervisor/realtime:
    get: { summary: Realtime supervisor view, responses: { '200': { description: OK } } }
