openapi: 3.1.0
info:
  title: ESGPilot Public API
  version: 0.1.0
  description: Public, agent-readable API for Clean news, customer matched news, observation pool items, daily briefs, sources, and runtime status.
paths:
  /api/public/items:
    get:
      summary: List Clean, Matched, or Watchlist Chinese news items
      parameters:
        - name: mode
          in: query
          schema:
            type: string
            enum: [matched, clean, all, watchlist]
            default: matched
        - name: client
          in: query
          schema:
            type: string
            default: xiaomi
        - name: q
          in: query
          schema:
            type: string
        - name: take
          in: query
          schema:
            type: integer
            default: 50
      responses:
        "200":
          description: Chinese display-ready news items
  /api/public/daily:
    get:
      summary: Get latest or dated ESG daily brief
      parameters:
        - name: client
          in: query
          schema:
            type: string
            default: xiaomi
        - name: date
          in: query
          schema:
            type: string
      responses:
        "200":
          description: Daily JSON brief
  /api/public/daily/{date}:
    get:
      summary: Get daily brief by date
      parameters:
        - name: date
          in: path
          required: true
          schema:
            type: string
        - name: client
          in: query
          schema:
            type: string
            default: xiaomi
      responses:
        "200":
          description: Daily JSON brief
  /api/public/dailies:
    get:
      summary: List daily brief archive
      responses:
        "200":
          description: Daily archive
  /api/public/sources:
    get:
      summary: List enabled sources and source policy
      responses:
        "200":
          description: Source registry
  /api/public/status:
    get:
      summary: Runtime and display quality status
      responses:
        "200":
          description: Runtime status
