> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interchange.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get inventory source diagnostics

> Get recent call health, latency, timeout, failure, and prior-window movement diagnostics for a storefront inventory source.



## OpenAPI

````yaml /v2/storefront-api-v2.yaml get /inventory-sources/{sourceId}/diagnostics
openapi: 3.0.0
info:
  title: Scope3 Storefront API
  version: 2.0.0
  description: |-
    REST API for partners to manage storefronts, inventory sources, and billing.

    ## Authentication

    All endpoints require a Bearer token in the Authorization header:
    ```
    Authorization: Bearer your-api-key
    ```

    ## Base URL

    `https://api.interchange.io/api/v2/storefront`

    ## For AI Agents

    AI agents can use the MCP endpoint at `/mcp/v2/storefront` with three tools:
    - `initialize`: Start an MCP session
    - `api_call`: Make REST API calls
    - `ask_about_capability`: Learn about API features
servers:
  - url: https://api.interchange.io/api/v2/storefront
    description: Production server
security: []
tags:
  - name: Account
    description: Account management, service tokens, and preferences
  - name: Storefront
    description: Manage storefront and inventory sources
  - name: Storefront Agents
    description: List and manage registered sales, signals, and outcomes agents
  - name: Storefront Activity
    description: Audit log of configuration and inventory changes on the storefront
  - name: Storefront Billing
    description: Payout bank details and billing configuration for storefronts
  - name: AI Usage
    description: Storefront AI token usage visibility by model
  - name: MCP
    description: Model Context Protocol endpoints
paths:
  /inventory-sources/{sourceId}/diagnostics:
    get:
      tags:
        - Storefront
      summary: Get inventory source diagnostics
      description: >-
        Get recent call health, latency, timeout, failure, and prior-window
        movement diagnostics for a storefront inventory source.
      operationId: getInventorySourceDiagnostics
      parameters:
        - in: query
          name: windowHours
          schema:
            description: >-
              Number of trailing hours to analyze for the current diagnostics
              window. The previous comparison window uses the same duration
              immediately before it.
            type: integer
            maximum: 720
            minimum: 1
          description: >-
            Number of trailing hours to analyze for the current diagnostics
            window. The previous comparison window uses the same duration
            immediately before it.
        - in: path
          name: sourceId
          schema:
            description: Inventory source ID
            type: string
            minLength: 1
          required: true
          description: Inventory source ID
      responses:
        '200':
          description: Get inventory source diagnostics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InventorySourceDiagnosticsResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    InventorySourceDiagnosticsResponse:
      description: >-
        Seller-facing diagnostics for a single third-party sales-agent or
        modular inventory source.
      type: object
      properties:
        source:
          type: object
          properties:
            id:
              type: string
            sourceId:
              type: string
            name:
              type: string
            executionType:
              description: >-
                What backs this private upstream inventory source. `AGENT` is an
                external AdCP-compatible sales agent the Merchandising Agent
                connects to; `MANAGED_SALES_AGENT` is an operator-owned ad
                server with Interchange-managed sales-agent plumbing behind it;
                `LINKED_STOREFRONT` is wholesale inventory discovered
                automatically from the ambient pool of LISTED storefronts whose
                computed `canTransact` projection is true (resolved at runtime,
                never persisted as a source row); `MODULAR_SOURCE` is a composed
                inventory source assembled from private modules such as avails,
                booking, trafficking, and reporting. Storefront-level `ADAPTER`
                dispatch is configured on the storefront, not as an inventory
                source.
              type: string
              enum:
                - AGENT
                - MANAGED_SALES_AGENT
                - LINKED_STOREFRONT
                - MODULAR_SOURCE
            status:
              description: Inventory source lifecycle status
              type: string
              enum:
                - PENDING
                - ACTIVE
                - DISABLED
            agentId:
              nullable: true
              type: string
            endpointUrl:
              nullable: true
              type: string
            protocol:
              nullable: true
              type: string
              enum:
                - MCP
                - A2A
            auth:
              type: object
              properties:
                type:
                  nullable: true
                  type: string
                required:
                  type: boolean
                configured:
                  type: boolean
              required:
                - type
                - required
                - configured
              additionalProperties: false
            capabilities:
              type: object
              properties:
                tools:
                  type: array
                  items:
                    type: string
                products:
                  type: string
                  enum:
                    - supported
                    - unsupported
                    - unknown
                createMediaBuy:
                  type: string
                  enum:
                    - supported
                    - unsupported
                    - unknown
                updateMediaBuy:
                  type: string
                  enum:
                    - supported
                    - unsupported
                    - unknown
                signals:
                  type: string
                  enum:
                    - supported
                    - unsupported
                    - unknown
              required:
                - tools
                - products
                - createMediaBuy
                - updateMediaBuy
                - signals
              additionalProperties: false
            health:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - healthy
                    - degraded
                    - unhealthy
                    - unknown
                lastError:
                  nullable: true
                  type: string
                lastErrorCode:
                  nullable: true
                  type: string
                lastErrorAt:
                  nullable: true
                  type: string
                lastSuccessAt:
                  nullable: true
                  type: string
                lastCheckedAt:
                  nullable: true
                  type: string
              required:
                - status
                - lastError
                - lastErrorCode
                - lastErrorAt
                - lastSuccessAt
                - lastCheckedAt
              additionalProperties: false
            capabilityHealth:
              type: object
              properties:
                inventory:
                  type: object
                  properties:
                    status:
                      type: string
                      enum:
                        - healthy
                        - degraded
                        - unhealthy
                        - unknown
                    lastError:
                      nullable: true
                      type: string
                    lastErrorCode:
                      nullable: true
                      type: string
                    lastErrorAt:
                      nullable: true
                      type: string
                    lastSuccessAt:
                      nullable: true
                      type: string
                    lastCheckedAt:
                      nullable: true
                      type: string
                  required:
                    - status
                    - lastError
                    - lastErrorCode
                    - lastErrorAt
                    - lastSuccessAt
                    - lastCheckedAt
                  additionalProperties: false
                reporting:
                  type: object
                  properties:
                    status:
                      type: string
                      enum:
                        - healthy
                        - degraded
                        - unhealthy
                        - unknown
                    lastError:
                      nullable: true
                      type: string
                    lastErrorCode:
                      nullable: true
                      type: string
                    lastErrorAt:
                      nullable: true
                      type: string
                    lastSuccessAt:
                      nullable: true
                      type: string
                    lastCheckedAt:
                      nullable: true
                      type: string
                  required:
                    - status
                    - lastError
                    - lastErrorCode
                    - lastErrorAt
                    - lastSuccessAt
                    - lastCheckedAt
                  additionalProperties: false
              required:
                - inventory
                - reporting
              additionalProperties: false
          required:
            - id
            - sourceId
            - name
            - executionType
            - status
            - agentId
            - endpointUrl
            - protocol
            - auth
            - capabilities
            - health
            - capabilityHealth
          additionalProperties: false
        window:
          type: object
          properties:
            hours:
              type: integer
              maximum: 9007199254740991
              minimum: 1
            startedAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            endedAt:
              type: string
              format: date-time
              pattern: >-
                ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
            sampledActivityCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            activityTruncated:
              type: boolean
            sampledTestRunCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - hours
            - startedAt
            - endedAt
            - sampledActivityCount
            - activityTruncated
            - sampledTestRunCount
          additionalProperties: false
        performance:
          type: object
          properties:
            requestCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            responseCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            exchangeCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            completedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            failedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            inputRequiredCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            pendingCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            rejectedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            timeoutCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            timeoutRate:
              type: number
              minimum: 0
              maximum: 1
            errorRate:
              type: number
              minimum: 0
              maximum: 1
            inputRequiredRate:
              type: number
              minimum: 0
              maximum: 1
            completedRate:
              type: number
              minimum: 0
              maximum: 1
            latencyStatus:
              type: string
              enum:
                - within_threshold
                - over_threshold
                - unknown
            latencyThresholdMs:
              type: integer
              maximum: 9007199254740991
              minimum: 1
            overThresholdCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            staleAsyncResponseCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            p50LatencyMs:
              nullable: true
              type: integer
              minimum: 0
              maximum: 9007199254740991
            p95LatencyMs:
              nullable: true
              type: integer
              minimum: 0
              maximum: 9007199254740991
            p99LatencyMs:
              nullable: true
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unknownLatencyCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - requestCount
            - responseCount
            - exchangeCount
            - completedCount
            - failedCount
            - inputRequiredCount
            - pendingCount
            - rejectedCount
            - timeoutCount
            - timeoutRate
            - errorRate
            - inputRequiredRate
            - completedRate
            - latencyStatus
            - latencyThresholdMs
            - overThresholdCount
            - staleAsyncResponseCount
            - p50LatencyMs
            - p95LatencyMs
            - p99LatencyMs
            - unknownLatencyCount
          additionalProperties: false
        comparison:
          type: object
          properties:
            previousWindow:
              type: object
              properties:
                startedAt:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                endedAt:
                  type: string
                  format: date-time
                  pattern: >-
                    ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                exchangeCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                issueCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                timeoutCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                errorRate:
                  type: number
                  minimum: 0
                  maximum: 1
                p95LatencyMs:
                  nullable: true
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                sampledActivityCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                activityTruncated:
                  type: boolean
              required:
                - startedAt
                - endedAt
                - exchangeCount
                - issueCount
                - timeoutCount
                - errorRate
                - p95LatencyMs
                - sampledActivityCount
                - activityTruncated
              additionalProperties: false
            issueDelta:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            timeoutDelta:
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            errorRateDelta:
              type: number
            p95LatencyDeltaMs:
              nullable: true
              type: integer
              minimum: -9007199254740991
              maximum: 9007199254740991
            trend:
              type: string
              enum:
                - new_issue
                - worse
                - improved
                - recovered
                - unchanged
                - not_enough_data
            summary:
              type: string
          required:
            - previousWindow
            - issueDelta
            - timeoutDelta
            - errorRateDelta
            - p95LatencyDeltaMs
            - trend
            - summary
          additionalProperties: false
        timeline:
          type: array
          items:
            type: object
            properties:
              startedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              endedAt:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              exchangeCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              issueCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              failedCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              rejectedCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              timeoutCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              errorRate:
                type: number
                minimum: 0
                maximum: 1
              p95LatencyMs:
                nullable: true
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - startedAt
              - endedAt
              - exchangeCount
              - issueCount
              - failedCount
              - rejectedCount
              - timeoutCount
              - errorRate
              - p95LatencyMs
            additionalProperties: false
        toolBreakdown:
          type: array
          items:
            type: object
            properties:
              tool:
                type: string
              exchangeCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              completedCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              failedCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              inputRequiredCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              rejectedCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              timeoutCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              p95LatencyMs:
                nullable: true
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - tool
              - exchangeCount
              - completedCount
              - failedCount
              - inputRequiredCount
              - rejectedCount
              - timeoutCount
              - p95LatencyMs
            additionalProperties: false
        discoveryParticipation:
          type: object
          properties:
            calledCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            skippedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            excludedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            timedOutCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            skipReasons:
              type: array
              items:
                type: object
                properties:
                  reason:
                    type: string
                  count:
                    type: integer
                    maximum: 9007199254740991
                    minimum: 1
                required:
                  - reason
                  - count
                additionalProperties: false
          required:
            - calledCount
            - skippedCount
            - excludedCount
            - timedOutCount
            - skipReasons
          additionalProperties: false
        outcomeMix:
          type: object
          properties:
            returnedProductsCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            returnedNoProductsCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            failedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            businessRejectedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            pendingCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            inputRequiredCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            timedOutCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            skippedCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - returnedProductsCount
            - returnedNoProductsCount
            - failedCount
            - businessRejectedCount
            - pendingCount
            - inputRequiredCount
            - timedOutCount
            - skippedCount
          additionalProperties: false
        demandImpact:
          type: object
          properties:
            buyerRequestsAffected:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            missedProductOpportunityCount:
              nullable: true
              type: integer
              minimum: 0
              maximum: 9007199254740991
            notes:
              type: array
              items:
                type: string
          required:
            - buyerRequestsAffected
            - missedProductOpportunityCount
            - notes
          additionalProperties: false
        recentActivity:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
                minimum: -9007199254740991
                maximum: 9007199254740991
              timestamp:
                type: string
                format: date-time
                pattern: >-
                  ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
              tool:
                nullable: true
                type: string
              taskStatus:
                type: string
              activityType:
                type: string
              taskId:
                nullable: true
                type: string
              operationId:
                nullable: true
                type: string
              contextId:
                nullable: true
                type: string
              idempotencyKey:
                nullable: true
                type: string
              debugId:
                nullable: true
                type: string
              traceparent:
                nullable: true
                type: string
              requestId:
                nullable: true
                type: string
              correlationId:
                nullable: true
                type: string
              initiatorEmail:
                nullable: true
                type: string
              origin:
                type: object
                properties:
                  kind:
                    type: string
                    enum:
                      - sandbox_test
                      - live_demand
                  testRunUid:
                    nullable: true
                    type: string
                  testRunStatus:
                    nullable: true
                    type: string
                    enum:
                      - passed
                      - partial
                      - failed
                      - planned
                  testRunToolName:
                    nullable: true
                    type: string
                  testRunCreatedAt:
                    nullable: true
                    type: string
                    format: date-time
                    pattern: >-
                      ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                required:
                  - kind
                  - testRunUid
                  - testRunStatus
                  - testRunToolName
                  - testRunCreatedAt
                additionalProperties: false
              isIssue:
                type: boolean
              summary:
                nullable: true
                type: string
              details:
                nullable: true
                type: object
                properties:
                  payload:
                    type: object
                    additionalProperties: {}
                  relatedRequest:
                    nullable: true
                    type: object
                    properties:
                      timestamp:
                        type: string
                        format: date-time
                        pattern: >-
                          ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      payload:
                        type: object
                        additionalProperties: {}
                    required:
                      - timestamp
                      - payload
                    additionalProperties: false
                required:
                  - payload
                  - relatedRequest
                additionalProperties: false
            required:
              - id
              - timestamp
              - tool
              - taskStatus
              - activityType
              - taskId
              - operationId
              - contextId
              - idempotencyKey
              - debugId
              - traceparent
              - requestId
              - correlationId
              - initiatorEmail
              - origin
              - isIssue
              - summary
              - details
            additionalProperties: false
        diagnosis:
          type: object
          properties:
            severity:
              type: string
              enum:
                - ok
                - warning
                - critical
                - unknown
            owner:
              description: >-
                Who must act on the failure. `seller` for a generic external
                sales agent or an adapter credential issue; `scope3` when an
                official Scope3-hosted adapter runtime is failing (the seller
                cannot and should not fix our infrastructure).
              type: string
              enum:
                - seller
                - scope3
            topCause:
              type: string
            issues:
              type: array
              items:
                type: object
                properties:
                  mode:
                    type: string
                    enum:
                      - disabled_retired
                      - auth_missing
                      - ad_server_connection_blocked
                      - manual_pricing_upload_required
                      - stale_async
                      - async_poll_exhausted
                      - timeout_degraded
                      - source_runtime_error
                      - input_required
                      - business_rejected
                      - readiness_blocker
                  severity:
                    type: string
                    enum:
                      - warning
                      - critical
                  count:
                    type: integer
                    maximum: 9007199254740991
                    minimum: 1
                  summary:
                    type: string
                required:
                  - mode
                  - severity
                  - count
                  - summary
                additionalProperties: false
            nextSteps:
              type: array
              items:
                type: string
            developerHandoff:
              type: object
              properties:
                sourceId:
                  type: string
                sourceName:
                  type: string
                agentId:
                  nullable: true
                  type: string
                endpointUrl:
                  nullable: true
                  type: string
                latestTaskId:
                  nullable: true
                  type: string
                latestOperationId:
                  nullable: true
                  type: string
                latestContextId:
                  nullable: true
                  type: string
                latestIdempotencyKey:
                  nullable: true
                  type: string
                latestDebugId:
                  nullable: true
                  type: string
                latestCorrelationId:
                  nullable: true
                  type: string
                correlationHeaders:
                  nullable: true
                  type: object
                  additionalProperties:
                    type: string
                latestError:
                  nullable: true
                  type: string
              required:
                - sourceId
                - sourceName
                - agentId
                - endpointUrl
                - latestTaskId
                - latestOperationId
                - latestContextId
                - latestIdempotencyKey
                - latestDebugId
                - latestCorrelationId
                - correlationHeaders
                - latestError
              additionalProperties: false
          required:
            - severity
            - owner
            - topCause
            - issues
            - nextSteps
            - developerHandoff
          additionalProperties: false
        docs:
          type: array
          items:
            type: object
            properties:
              label:
                type: string
              url:
                type: string
                format: uri
            required:
              - label
              - url
            additionalProperties: false
      required:
        - source
        - window
        - performance
        - comparison
        - timeline
        - toolBreakdown
        - discoveryParticipation
        - outcomeMix
        - demandImpact
        - recentActivity
        - diagnosis
        - docs
      additionalProperties: false
    ErrorResponse:
      description: Standard error response
      type: object
      properties:
        data:
          type: string
          nullable: true
          enum:
            - null
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - data
        - error
      additionalProperties: false
    ApiError:
      description: Structured error object
      type: object
      properties:
        code:
          description: Machine-readable error code
          type: string
        message:
          description: Human-readable error message
          type: string
        field:
          description: Field path associated with the error
          type: string
        details:
          description: Additional error context
          type: object
          additionalProperties: {}
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key or access token

````