"/admin/workers/status":
    get:
        tags: [Workers]
        operationId: getWorkersStatus
        summary: Live worker thread status
        description: |
            Returns the list of currently-active and recently-completed background workers
            (Big Order sync, shipper queue refresh, Shippo analytics, KB ingest, CSV exports,
            etc.) tracked by `setupWorkerTracking()`. Recently-completed workers are
            auto-pruned from the response after 60 seconds.
        responses:
            "200":
                description: Worker tracking snapshot.
                content:
                    application/json:
                        schema:
                            type: object
                            required: [workers]
                            properties:
                                workers:
                                    type: array
                                    items:
                                        type: object
                                        required: [name, startedBy, startedAt, durationMs, status]
                                        properties:
                                            name:
                                                type: string
                                                description: Worker task name (e.g. `SyncBigOrders`, `RefreshShipperQueue`).
                                            startedBy:
                                                type: string
                                                description: Requesting account id / username.
                                            startedAt:
                                                type: string
                                                format: date-time
                                            durationMs:
                                                type: integer
                                                description: Live for active workers; frozen at completion for finished ones.
                                            status:
                                                type: string
                                                enum: [running, completed, failed]
                                            completedAt:
                                                type: [string, "null"]
                                                format: date-time
            "401": { $ref: "../admin-api.yaml#/components/responses/Unauthorized" }
            "403": { $ref: "../admin-api.yaml#/components/responses/Forbidden" }
        x-access-policies: [Fabricator, FabricatorReadOnly, Admin]
        x-scopes: ["admin:all"]
