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

# Create a normalized agent evidence record

> Requires scopes: traces:write



## OpenAPI

````yaml /api-reference/openapi.json post /api/agent-evidence/{resource}
openapi: 3.1.0
info:
  title: EvalGate API
  version: 3.7.6
  description: EvalGate API. See docs/api-contract.md for stability commitments.
servers:
  - url: https://evalgate.com
    description: Production
  - url: http://localhost:3000
    description: Local
security: []
paths:
  /api/agent-evidence/{resource}:
    post:
      tags:
        - agent evidence
      summary: Create a normalized agent evidence record
      description: 'Requires scopes: traces:write'
      operationId: post_agent_evidence_resource
      parameters:
        - name: resource
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostApiAgentEvidenceResourceRequest'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PostApiAgentEvidenceResourceResponse201ApplicationJson
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
      security:
        - bearerAuth:
            - traces:write
components:
  schemas:
    PostApiAgentEvidenceResourceRequest:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/JsonValue'
    PostApiAgentEvidenceResourceResponse201ApplicationJson:
      oneOf:
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            workspaceKey:
              type: string
            owner:
              oneOf:
                - type: 'null'
                - type: string
            dataClasses:
              type: array
              items:
                type: string
            defaultEnvironment:
              type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - workspaceKey
            - owner
            - dataClasses
            - defaultEnvironment
            - metadata
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              type: number
            branchKey:
              type: string
            baseBranchId:
              oneOf:
                - type: 'null'
                - type: number
            version:
              type: number
            riskTier:
              type: string
            snapshotHash:
              oneOf:
                - type: 'null'
                - type: string
            snapshot:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    parentBranchId:
                      oneOf:
                        - type: 'null'
                        - type: number
                    headCommitHash:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            approvedBy:
              oneOf:
                - type: 'null'
                - type: string
            mergedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            supersededBy:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - metadata
            - workspaceId
            - branchKey
            - baseBranchId
            - version
            - riskTier
            - snapshotHash
            - snapshot
            - approvedBy
            - mergedAt
            - supersededBy
        - type: object
          properties:
            domain:
              oneOf:
                - type: 'null'
                - type: string
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            owner:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    owner:
                      type: string
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            version:
              type: number
            approvedBy:
              oneOf:
                - type: 'null'
                - type: string
            mergedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            supersededBy:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            systemKey:
              type: string
            businessGoal:
              oneOf:
                - type: 'null'
                - type: string
            criticality:
              type: string
          additionalProperties: false
          required:
            - domain
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - owner
            - metadata
            - workspaceId
            - version
            - approvedBy
            - mergedAt
            - supersededBy
            - branchId
            - systemKey
            - businessGoal
            - criticality
        - type: object
          properties:
            status:
              type: string
            title:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            owner:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                    notes:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              type: number
            version:
              type: number
            riskTier:
              type: string
            approvedBy:
              oneOf:
                - type: 'null'
                - type: string
            mergedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            supersededBy:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            state:
              type: string
            coverage:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    covered:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    coverageRate:
                      type: number
                    gaps:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            requirementKey:
              type: string
            requirementText:
              type: string
            requirementType:
              type: string
            autonomyLevel:
              type: string
            acceptanceCriteria:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    criteria:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              description:
                                type: string
                              verified:
                                oneOf:
                                  - type: boolean
                                    enum:
                                      - false
                                  - type: boolean
                                    enum:
                                      - true
                            additionalProperties: false
                            required:
                              - description
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evalProgramIds:
              type: array
              items:
                type: number
            policyGateIds:
              type: array
              items:
                type: number
            monitorIds:
              type: array
              items:
                type: number
            businessMetrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    metrics:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                              target:
                                type: string
                              current:
                                type: string
                            additionalProperties: false
                            required:
                              - name
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            qualityCaseId:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - status
            - title
            - id
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - owner
            - metadata
            - workspaceId
            - version
            - riskTier
            - approvedBy
            - mergedAt
            - supersededBy
            - branchId
            - aiSystemId
            - state
            - coverage
            - evidenceItemIds
            - requirementKey
            - requirementText
            - requirementType
            - autonomyLevel
            - acceptanceCriteria
            - evalProgramIds
            - policyGateIds
            - monitorIds
            - businessMetrics
            - qualityCaseId
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            resolvedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              type: number
            branchId:
              type: number
            subjectType:
              type: string
            subjectId:
              type: string
            resolvedBy:
              oneOf:
                - type: 'null'
                - type: string
            evidenceItemIds:
              type: array
              items:
                type: number
            diffPayload:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    field:
                      type: string
                    oldValue:
                      $ref: '#/components/schemas/JsonValue'
                    newValue:
                      $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            body:
              type: string
            requiredReviewerRole:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - status
            - id
            - createdAt
            - organizationId
            - createdBy
            - resolvedAt
            - metadata
            - workspaceId
            - branchId
            - subjectType
            - subjectId
            - resolvedBy
            - evidenceItemIds
            - diffPayload
            - body
            - requiredReviewerRole
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            environment:
              type: string
            policyVersion:
              type: string
            profileKey:
              type: string
            allowedSideEffectClasses:
              type: array
              items:
                type: string
            allowedRuntimeKeys:
              type: array
              items:
                type: string
            allowedConnectorKeys:
              type: array
              items:
                type: string
            allowedActions:
              type: array
              items:
                type: string
            blockedActions:
              type: array
              items:
                type: string
            humanApprovalRequiredFor:
              type: array
              items:
                type: string
            maxRiskTier:
              type: string
            rules:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    maxCallsPerHour:
                      type: number
                    maxCostPerDayUsd:
                      type: number
                    allowedDataClasses:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - metadata
            - aiSystemId
            - environment
            - policyVersion
            - profileKey
            - allowedSideEffectClasses
            - allowedRuntimeKeys
            - allowedConnectorKeys
            - allowedActions
            - blockedActions
            - humanApprovalRequiredFor
            - maxRiskTier
            - rules
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            version:
              oneOf:
                - type: 'null'
                - type: string
            riskTier:
              type: string
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            environment:
              type: string
            config:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    model:
                      type: string
                    temperature:
                      type: number
                    maxTokens:
                      type: number
                    tools:
                      type: array
                      items:
                        type: string
                    systemPrompt:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            configHash:
              oneOf:
                - type: 'null'
                - type: string
            capabilities:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    supportsStreaming:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    supportsVision:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    supportsToolUse:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    supportsParallel:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    supportsJsonMode:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    maxContextTokens:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: string
            runtimeKey:
              type: string
            vendor:
              type: string
            runtimeType:
              type: string
            permissionProfileDbId:
              oneOf:
                - type: 'null'
                - type: number
            instrumentation:
              type: object
              properties:
                mode:
                  oneOf:
                    - type: string
                      enum:
                        - manual
                    - type: string
                      enum:
                        - webhook
                    - type: string
                      enum:
                        - sdk
                    - type: string
                      enum:
                        - cli_wrapper
                    - type: string
                      enum:
                        - otel
                otel:
                  oneOf:
                    - type: boolean
                      enum:
                        - false
                    - type: boolean
                      enum:
                        - true
                stdoutCapture:
                  oneOf:
                    - type: boolean
                      enum:
                        - false
                    - type: boolean
                      enum:
                        - true
                fileDiffCapture:
                  oneOf:
                    - type: boolean
                      enum:
                        - false
                    - type: boolean
                      enum:
                        - true
                sideEffectLedger:
                  oneOf:
                    - type: boolean
                      enum:
                        - false
                    - type: boolean
                      enum:
                        - true
              additionalProperties: false
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - metadata
            - version
            - riskTier
            - aiSystemId
            - environment
            - config
            - configHash
            - capabilities
            - permissionProfileId
            - runtimeKey
            - vendor
            - runtimeType
            - permissionProfileDbId
            - instrumentation
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            version:
              type: number
            riskTier:
              type: string
            approvedBy:
              oneOf:
                - type: 'null'
                - type: string
            mergedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            supersededBy:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            environment:
              type: string
            budget:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    dailyCostUsd:
                      type: number
                    monthlyCostUsd:
                      type: number
                    maxInstances:
                      type: number
                    maxRunsPerDay:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            evidenceItemIds:
              type: array
              items:
                type: number
            autonomyLevel:
              type: string
            fleetKey:
              type: string
            dynamicCohortQuery:
              oneOf:
                - type: 'null'
                - type: string
            runtimeIds:
              type: array
              items:
                type: number
            connectorIds:
              allOf:
                - type: array
                  items:
                    type: string
                - type: array
                  items:
                    type: number
            rollup:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    lastRunAt:
                      type: string
                    successRate:
                      type: number
                    totalInstances:
                      type: number
                    activeInstances:
                      type: number
                    totalRuns:
                      type: number
                    avgCostPerRun:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - metadata
            - workspaceId
            - version
            - riskTier
            - approvedBy
            - mergedAt
            - supersededBy
            - branchId
            - aiSystemId
            - environment
            - budget
            - permissionProfileId
            - evidenceItemIds
            - autonomyLevel
            - fleetKey
            - dynamicCohortQuery
            - runtimeIds
            - connectorIds
            - rollup
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            definition:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    environment:
                      type: string
                    autonomyLevel:
                      type: string
                    runtimeIds:
                      type: array
                      items:
                        type: number
                    filterExpression:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            rollup:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    totalRuns:
                      type: number
                    instanceCount:
                      type: number
                    activeCount:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            fleetId:
              type: number
            cohortKey:
              type: string
            lastComputedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - metadata
            - workspaceId
            - definition
            - rollup
            - fleetId
            - cohortKey
            - lastComputedAt
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            version:
              type: number
            riskTier:
              type: string
            approvedBy:
              oneOf:
                - type: 'null'
                - type: string
            mergedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            supersededBy:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            config:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    model:
                      type: string
                    temperature:
                      type: number
                    maxTokens:
                      type: number
                    tools:
                      type: array
                      items:
                        type: string
                    systemPrompt:
                      type: string
                    maxRetries:
                      type: number
                    timeout:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            promptHash:
              oneOf:
                - type: 'null'
                - type: string
            configHash:
              oneOf:
                - type: 'null'
                - type: string
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            autonomyLevel:
              type: string
            connectorIds:
              type: array
              items:
                type: number
            fleetId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            templateKey:
              type: string
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - description
            - createdBy
            - metadata
            - workspaceId
            - version
            - riskTier
            - approvedBy
            - mergedAt
            - supersededBy
            - branchId
            - config
            - promptHash
            - configHash
            - permissionProfileId
            - autonomyLevel
            - connectorIds
            - fleetId
            - runtimeId
            - templateKey
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              oneOf:
                - type: 'null'
                - type: string
            identity:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    environment:
                      type: string
                    endpoint:
                      type: string
                    agentName:
                      type: string
                    agentVersion:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                    lastSeenVersion:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            environment:
              type: string
            instanceKey:
              type: string
            promptHash:
              oneOf:
                - type: 'null'
                - type: string
            gitSha:
              oneOf:
                - type: 'null'
                - type: string
            identityHash:
              oneOf:
                - type: 'null'
                - type: string
            lastSeenAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            configHash:
              oneOf:
                - type: 'null'
                - type: string
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            fleetId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            templateId:
              oneOf:
                - type: 'null'
                - type: number
            executableHash:
              oneOf:
                - type: 'null'
                - type: string
            containerImageHash:
              oneOf:
                - type: 'null'
                - type: string
            attestation:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    signatureHash:
                      type: string
                    policyVersion:
                      type: string
                    attestedAt:
                      type: string
                    attestedBy:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - status
            - id
            - name
            - identity
            - createdAt
            - updatedAt
            - organizationId
            - metadata
            - workspaceId
            - aiSystemId
            - environment
            - instanceKey
            - promptHash
            - gitSha
            - identityHash
            - lastSeenAt
            - configHash
            - permissionProfileId
            - fleetId
            - runtimeId
            - templateId
            - executableHash
            - containerImageHash
            - attestation
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                    changelog:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            version:
              oneOf:
                - type: 'null'
                - type: string
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            environment:
              type: string
            promptHash:
              oneOf:
                - type: 'null'
                - type: string
            configHash:
              type: string
            isCurrent:
              type: boolean
            runtimeId:
              type: number
            versionKey:
              type: string
            modelProvider:
              oneOf:
                - type: 'null'
                - type: string
            modelName:
              oneOf:
                - type: 'null'
                - type: string
            dependencySnapshot:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    dependencies:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                              version:
                                type: string
                              hash:
                                type: string
                            additionalProperties: false
                            required:
                              - name
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            configSnapshot:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    model:
                      type: string
                    temperature:
                      type: number
                    maxTokens:
                      type: number
                    tools:
                      type: array
                      items:
                        type: string
                    systemPrompt:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - createdBy
            - metadata
            - version
            - aiSystemId
            - environment
            - promptHash
            - configHash
            - isCurrent
            - runtimeId
            - versionKey
            - modelProvider
            - modelName
            - dependencySnapshot
            - configSnapshot
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            dataClasses:
              type: array
              items:
                type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                    documentationUrl:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            riskTier:
              type: string
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            provider:
              type: string
            manifestHash:
              oneOf:
                - type: 'null'
                - type: string
            requiresHumanApproval:
              type: array
              items:
                type: string
            capabilities:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    rateLimitPerMinute:
                      type: number
                    supportsStreaming:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    supportsBatching:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    supportsPagination:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            outputSchema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                    schemaVersion:
                      type: number
                    required:
                      type: array
                      items:
                        type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            inputSchema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                    schemaVersion:
                      type: number
                    required:
                      type: array
                      items:
                        type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            allowedActions:
              type: array
              items:
                type: string
            blockedActions:
              type: array
              items:
                type: string
            connectorKey:
              type: string
            connectorType:
              type: string
            providerKeyId:
              oneOf:
                - type: 'null'
                - type: number
            openApiSpecHash:
              oneOf:
                - type: 'null'
                - type: string
            sideEffectPolicy:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    sideEffectClass:
                      oneOf:
                        - type: string
                          enum:
                            - none
                        - type: string
                          enum:
                            - read_only
                        - type: string
                          enum:
                            - mutates_state
                        - type: string
                          enum:
                            - external_call
                        - type: string
                          enum:
                            - destructive
                    requiresApproval:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    rollbackAvailable:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            authScopes:
              type: array
              items:
                type: string
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - dataClasses
            - metadata
            - riskTier
            - aiSystemId
            - provider
            - manifestHash
            - requiresHumanApproval
            - capabilities
            - outputSchema
            - inputSchema
            - allowedActions
            - blockedActions
            - connectorKey
            - connectorType
            - providerKeyId
            - openApiSpecHash
            - sideEffectPolicy
            - authScopes
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            manifestHash:
              type: string
            resourceCount:
              type: number
            schemaHash:
              oneOf:
                - type: 'null'
                - type: string
            isCurrent:
              type: boolean
            authScopes:
              type: array
              items:
                type: string
            connectorId:
              type: number
            snapshotKey:
              type: string
            manifestVersion:
              oneOf:
                - type: 'null'
                - type: string
            toolCount:
              type: number
            toolSchemas:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                    schemaVersion:
                      type: number
                    required:
                      type: array
                      items:
                        type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            resources:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    resources:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                              type:
                                type: string
                              methods:
                                type: array
                                items:
                                  type: string
                            additionalProperties: false
                            required:
                              - name
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            readinessStatus:
              type: string
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - manifestHash
            - resourceCount
            - schemaHash
            - isCurrent
            - authScopes
            - connectorId
            - snapshotKey
            - manifestVersion
            - toolCount
            - toolSchemas
            - resources
            - readinessStatus
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            mode:
              type: string
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    reason:
                      type: string
                    issuedBy:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            expiresAt:
              type: string
              format: date-time
            scope:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    expiresAt:
                      type: string
                    permissions:
                      type: array
                      items:
                        type: string
                    resourceIds:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            tokenHash:
              oneOf:
                - type: 'null'
                - type: string
            revokedBy:
              oneOf:
                - type: 'null'
                - type: string
            revokedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            issuedAt:
              type: string
              format: date-time
            revocationReason:
              oneOf:
                - type: 'null'
                - type: string
            credentialHash:
              type: string
            fleetId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            agentInstanceId:
              oneOf:
                - type: 'null'
                - type: number
            grantKey:
              type: string
            issuedBy:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - status
            - id
            - mode
            - organizationId
            - metadata
            - workspaceId
            - aiSystemId
            - expiresAt
            - scope
            - tokenHash
            - revokedBy
            - revokedAt
            - policyDecisionId
            - permissionProfileId
            - issuedAt
            - revocationReason
            - credentialHash
            - fleetId
            - runtimeId
            - connectorId
            - agentInstanceId
            - grantKey
            - issuedBy
        - type: object
          properties:
            id:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    source:
                      type: string
                    receivedAt:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            source:
              type: string
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            idempotencyKey:
              oneOf:
                - type: 'null'
                - type: string
            payload:
              allOf:
                - type: object
                  properties:
                    data:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                    schemaVersion:
                      type: number
                    eventType:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            eventType:
              type: string
            payloadHash:
              type: string
            receivedAt:
              type: string
              format: date-time
            redactionState:
              type: string
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            retentionExpiresAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
          additionalProperties: false
          required:
            - id
            - organizationId
            - metadata
            - aiSystemId
            - traceId
            - source
            - spanId
            - idempotencyKey
            - payload
            - eventType
            - payloadHash
            - receivedAt
            - redactionState
            - runtimeId
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - retentionExpiresAt
        - type: object
          properties:
            id:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            occurredAt:
              type: string
              format: date-time
            eventKey:
              type: string
            payload:
              allOf:
                - type: object
                  properties:
                    data:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                    schemaVersion:
                      type: number
                    eventType:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            eventType:
              type: string
            payloadHash:
              type: string
            evidenceItemIds:
              type: array
              items:
                type: number
            sideEffectLedgerIds:
              type: array
              items:
                type: number
            workflowRunId:
              oneOf:
                - type: 'null'
                - type: number
            fleetId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            agentInstanceId:
              oneOf:
                - type: 'null'
                - type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            agentTemplateId:
              oneOf:
                - type: 'null'
                - type: number
            rawEventId:
              oneOf:
                - type: 'null'
                - type: number
            orchestrationKey:
              type: string
            definitionVersion:
              oneOf:
                - type: 'null'
                - type: string
            graphHash:
              oneOf:
                - type: 'null'
                - type: string
            stateHash:
              oneOf:
                - type: 'null'
                - type: string
            checkpointHash:
              oneOf:
                - type: 'null'
                - type: string
            parentEventKey:
              oneOf:
                - type: 'null'
                - type: string
            policyDecisionIds:
              type: array
              items:
                type: number
          additionalProperties: false
          required:
            - id
            - organizationId
            - metadata
            - workspaceId
            - branchId
            - aiSystemId
            - occurredAt
            - eventKey
            - payload
            - eventType
            - payloadHash
            - evidenceItemIds
            - sideEffectLedgerIds
            - workflowRunId
            - fleetId
            - runtimeId
            - connectorId
            - agentInstanceId
            - requirementId
            - agentTemplateId
            - rawEventId
            - orchestrationKey
            - definitionVersion
            - graphHash
            - stateHash
            - checkpointHash
            - parentEventKey
            - policyDecisionIds
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            startedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            completedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            requestHash:
              type: string
            responseHash:
              oneOf:
                - type: 'null'
                - type: string
            requestPreview:
              oneOf:
                - type: 'null'
                - allOf:
                    - type: object
                      properties:
                        schemaVersion:
                          type: number
                        truncated:
                          oneOf:
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                        preview:
                          type: string
                      additionalProperties: false
                    - type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
            responsePreview:
              oneOf:
                - type: 'null'
                - allOf:
                    - type: object
                      properties:
                        schemaVersion:
                          type: number
                        truncated:
                          oneOf:
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                        preview:
                          type: string
                      additionalProperties: false
                    - type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
            latencyMs:
              oneOf:
                - type: 'null'
                - type: number
            errorCode:
              oneOf:
                - type: 'null'
                - type: string
            errorMessage:
              oneOf:
                - type: 'null'
                - type: string
            operation:
              type: string
            sideEffectClass:
              type: string
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            workflowRunId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeKey:
              oneOf:
                - type: 'null'
                - type: string
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorKey:
              oneOf:
                - type: 'null'
                - type: string
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            rawEventId:
              oneOf:
                - type: 'null'
                - type: number
            invocationId:
              oneOf:
                - type: 'null'
                - type: string
            toolName:
              type: string
            cost:
              oneOf:
                - type: 'null'
                - type: string
            policyDecision:
              type: string
          additionalProperties: false
          required:
            - status
            - id
            - createdAt
            - organizationId
            - metadata
            - aiSystemId
            - startedAt
            - completedAt
            - traceId
            - spanId
            - requestHash
            - responseHash
            - requestPreview
            - responsePreview
            - latencyMs
            - errorCode
            - errorMessage
            - operation
            - sideEffectClass
            - permissionProfileId
            - workflowRunId
            - runtimeKey
            - runtimeId
            - connectorKey
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - rawEventId
            - invocationId
            - toolName
            - cost
            - policyDecision
        - type: object
          properties:
            status:
              type: string
            severity:
              type: string
            summary:
              oneOf:
                - type: 'null'
                - allOf:
                    - type: object
                      properties:
                        schemaVersion:
                          type: number
                        changesDescription:
                          type: string
                        affectedResources:
                          type: array
                          items:
                            type: string
                      additionalProperties: false
                    - type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            evidence:
              type: array
              items:
                type: string
            occurredAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            idempotencyKey:
              oneOf:
                - type: 'null'
                - type: string
            evidenceHash:
              oneOf:
                - type: 'null'
                - type: string
            resourceType:
              type: string
            actor:
              type: string
            operation:
              type: string
            resourceId:
              oneOf:
                - type: 'null'
                - type: string
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            tool:
              type: string
            workflowRunId:
              oneOf:
                - type: 'null'
                - type: number
            diffHash:
              oneOf:
                - type: 'null'
                - type: string
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            rollbackAvailable:
              type: boolean
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            rawEventId:
              oneOf:
                - type: 'null'
                - type: number
            policyDecision:
              type: string
            toolInvocationEvidenceId:
              oneOf:
                - type: 'null'
                - type: number
            actionDigest:
              type: string
            effectType:
              type: string
            targetRefHash:
              oneOf:
                - type: 'null'
                - type: string
            beforeSnapshotHash:
              oneOf:
                - type: 'null'
                - type: string
            afterSnapshotHash:
              oneOf:
                - type: 'null'
                - type: string
            approvalState:
              type: string
            verificationResult:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - status
            - severity
            - summary
            - id
            - createdAt
            - organizationId
            - metadata
            - aiSystemId
            - evidence
            - occurredAt
            - traceId
            - spanId
            - idempotencyKey
            - evidenceHash
            - resourceType
            - actor
            - operation
            - resourceId
            - permissionProfileId
            - tool
            - workflowRunId
            - diffHash
            - runtimeId
            - rollbackAvailable
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - rawEventId
            - policyDecision
            - toolInvocationEvidenceId
            - actionDigest
            - effectType
            - targetRefHash
            - beforeSnapshotHash
            - afterSnapshotHash
            - approvalState
            - verificationResult
        - type: object
          properties:
            input:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    context:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                    question:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            decision:
              type: string
            severity:
              type: string
            reasonCode:
              oneOf:
                - type: 'null'
                - type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            reason:
              oneOf:
                - type: 'null'
                - type: string
            inputHash:
              oneOf:
                - type: 'null'
                - type: string
            policyVersion:
              type: string
            question:
              type: string
            decidedAt:
              type: string
              format: date-time
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            evidenceItemIds:
              type: array
              items:
                type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            rawEventId:
              oneOf:
                - type: 'null'
                - type: number
            toolInvocationEvidenceId:
              oneOf:
                - type: 'null'
                - type: number
            sideEffectLedgerId:
              oneOf:
                - type: 'null'
                - type: number
            decisionKey:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - input
            - decision
            - severity
            - reasonCode
            - id
            - createdAt
            - organizationId
            - metadata
            - aiSystemId
            - reason
            - inputHash
            - policyVersion
            - question
            - decidedAt
            - permissionProfileId
            - evidenceItemIds
            - runtimeId
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - rawEventId
            - toolInvocationEvidenceId
            - sideEffectLedgerId
            - decisionKey
        - type: object
          properties:
            evaluationId:
              oneOf:
                - type: 'null'
                - type: number
            confidence:
              oneOf:
                - type: 'null'
                - type: number
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    tags:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            kind:
              type: string
            contentHash:
              type: string
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            source:
              type: string
            score:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            evaluationRunId:
              oneOf:
                - type: 'null'
                - type: number
            subjectType:
              type: string
            subjectId:
              oneOf:
                - type: 'null'
                - type: string
            redactionState:
              type: string
            testResultId:
              oneOf:
                - type: 'null'
                - type: number
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            workflowRunId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            rawEventId:
              oneOf:
                - type: 'null'
                - type: number
            preview:
              oneOf:
                - type: 'null'
                - allOf:
                    - type: object
                      properties:
                        schemaVersion:
                          type: number
                        truncated:
                          oneOf:
                            - type: boolean
                              enum:
                                - false
                            - type: boolean
                              enum:
                                - true
                        preview:
                          type: string
                      additionalProperties: false
                    - type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
            toolInvocationEvidenceId:
              oneOf:
                - type: 'null'
                - type: number
            sideEffectLedgerId:
              oneOf:
                - type: 'null'
                - type: number
            evidenceKey:
              oneOf:
                - type: 'null'
                - type: string
            storageUri:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - evaluationId
            - confidence
            - id
            - createdAt
            - organizationId
            - metadata
            - aiSystemId
            - kind
            - contentHash
            - traceId
            - source
            - score
            - spanId
            - evaluationRunId
            - subjectType
            - subjectId
            - redactionState
            - testResultId
            - policyDecisionId
            - workflowRunId
            - runtimeId
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - rawEventId
            - preview
            - toolInvocationEvidenceId
            - sideEffectLedgerId
            - evidenceKey
            - storageUri
        - type: object
          properties:
            status:
              type: string
            title:
              type: string
            confidence:
              type: number
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            approvals:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    approvals:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              approver:
                                type: string
                              decision:
                                type: string
                              approvedAt:
                                type: string
                            additionalProperties: false
                            required:
                              - approver
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            caseKey:
              type: string
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            supportingEvidenceItemIds:
              type: array
              items:
                type: number
            knownRisks:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    risks:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              description:
                                type: string
                              severity:
                                oneOf:
                                  - type: string
                                    enum:
                                      - low
                                  - type: string
                                    enum:
                                      - medium
                                  - type: string
                                    enum:
                                      - high
                                  - type: string
                                    enum:
                                      - critical
                              mitigation:
                                type: string
                            additionalProperties: false
                            required:
                              - description
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            restrictions:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    restrictions:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              type:
                                type: string
                              description:
                                type: string
                            additionalProperties: false
                            required:
                              - type
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            nextReviewAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            report:
              allOf:
                - type: object
                  properties:
                    summary:
                      type: string
                    schemaVersion:
                      type: number
                    findings:
                      type: array
                      items:
                        type: string
                    recommendations:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - status
            - title
            - confidence
            - id
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - aiSystemId
            - approvals
            - caseKey
            - runtimeId
            - connectorId
            - supportingEvidenceItemIds
            - knownRisks
            - restrictions
            - nextReviewAt
            - report
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            coverage:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    coverageRate:
                      type: number
                    coveredSteps:
                      type: number
                    totalSteps:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            orchestrationKey:
              oneOf:
                - type: 'null'
                - type: string
            graphHash:
              oneOf:
                - type: 'null'
                - type: string
            orchestrationId:
              oneOf:
                - type: 'null'
                - type: number
            chainKey:
              type: string
            graph:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    nodes:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: string
                              primitiveStepId:
                                type: number
                            additionalProperties: false
                            required:
                              - id
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                    edges:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              from:
                                type: string
                              to:
                                type: string
                            additionalProperties: false
                            required:
                              - from
                              - to
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            primitiveTypes:
              type: array
              items:
                type: string
            gateSummary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    passed:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    gateResults:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              passed:
                                type: boolean
                              gate:
                                type: string
                              details:
                                type: string
                            additionalProperties: false
                            required:
                              - passed
                              - gate
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - metadata
            - workspaceId
            - branchId
            - aiSystemId
            - coverage
            - evidenceItemIds
            - requirementId
            - orchestrationKey
            - graphHash
            - orchestrationId
            - chainKey
            - graph
            - primitiveTypes
            - gateSummary
        - type: object
          properties:
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            branchId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            configHash:
              oneOf:
                - type: 'null'
                - type: string
            outputSchema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                    schemaVersion:
                      type: number
                    required:
                      type: array
                      items:
                        type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            inputSchema:
              allOf:
                - type: object
                  properties:
                    type:
                      type: string
                    schemaVersion:
                      type: number
                    required:
                      type: array
                      items:
                        type: string
                    properties:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            orchestrationId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveChainId:
              oneOf:
                - type: 'null'
                - type: number
            stepKey:
              oneOf:
                - type: 'null'
                - type: string
            primitiveType:
              type: string
            policyRefs:
              type: array
              items:
                type: string
            evalRefs:
              type: array
              items:
                type: string
            monitorRefs:
              type: array
              items:
                type: string
          additionalProperties: false
          required:
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - metadata
            - workspaceId
            - branchId
            - aiSystemId
            - configHash
            - outputSchema
            - inputSchema
            - requirementId
            - orchestrationId
            - primitiveChainId
            - stepKey
            - primitiveType
            - policyRefs
            - evalRefs
            - monitorRefs
        - type: object
          properties:
            failureMode:
              oneOf:
                - type: 'null'
                - type: string
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            startedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            completedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            score:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            inputHash:
              oneOf:
                - type: 'null'
                - type: string
            costUsd:
              oneOf:
                - type: 'null'
                - type: string
            latencyMs:
              oneOf:
                - type: 'null'
                - type: number
            outputHash:
              oneOf:
                - type: 'null'
                - type: string
            runId:
              oneOf:
                - type: 'null'
                - type: string
            evidenceRefs:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
            configHash:
              oneOf:
                - type: 'null'
                - type: string
            primitiveStepId:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - failureMode
            - status
            - id
            - createdAt
            - organizationId
            - metadata
            - startedAt
            - completedAt
            - traceId
            - score
            - spanId
            - inputHash
            - costUsd
            - latencyMs
            - outputHash
            - runId
            - evidenceRefs
            - configHash
            - primitiveStepId
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            costUsd:
              oneOf:
                - type: 'null'
                - type: string
            latencyMs:
              oneOf:
                - type: 'null'
                - type: number
            queryHash:
              type: string
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            corpusRefs:
              type: array
              items:
                type: string
            candidateCount:
              type: number
            selectedCount:
              type: number
            candidatesJsonRedacted:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    candidates:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              score:
                                type: number
                              sourceHash:
                                type: string
                              rank:
                                type: number
                            additionalProperties: false
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            selectedSourceHashes:
              type: array
              items:
                type: string
            permissionDecision:
              type: string
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    precision:
                      type: number
                    candidateCount:
                      type: number
                    selectedCount:
                      type: number
                    recall:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - costUsd
            - latencyMs
            - queryHash
            - requirementId
            - primitiveStepRunId
            - corpusRefs
            - candidateCount
            - selectedCount
            - candidatesJsonRedacted
            - selectedSourceHashes
            - permissionDecision
            - metricsJson
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            costUsd:
              oneOf:
                - type: 'null'
                - type: string
            latencyMs:
              oneOf:
                - type: 'null'
                - type: number
            queryHash:
              type: string
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            candidateCount:
              type: number
            selectedCount:
              type: number
            candidatesJsonRedacted:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    candidates:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              sourceHash:
                                type: string
                              originalRank:
                                type: number
                              rerankedRank:
                                type: number
                            additionalProperties: false
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            metricsJson:
              allOf:
                - type: object
                  properties:
                    map:
                      type: number
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    ndcg:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            retrievalRunId:
              oneOf:
                - type: 'null'
                - type: number
            rerankerProvider:
              oneOf:
                - type: 'null'
                - type: string
            rerankerModel:
              oneOf:
                - type: 'null'
                - type: string
            rerankerConfigHash:
              oneOf:
                - type: 'null'
                - type: string
            scoresJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    scores:
                      type: array
                      items:
                        type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            finalOrderHash:
              type: string
            labelsAvailable:
              type: boolean
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - costUsd
            - latencyMs
            - queryHash
            - requirementId
            - primitiveStepRunId
            - candidateCount
            - selectedCount
            - candidatesJsonRedacted
            - metricsJson
            - retrievalRunId
            - rerankerProvider
            - rerankerModel
            - rerankerConfigHash
            - scoresJson
            - finalOrderHash
            - labelsAvailable
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            tokenCount:
              type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    tokenCount:
                      type: number
                    droppedSources:
                      type: number
                    includedSources:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            sourceChunkIds:
              type: array
              items:
                type: string
            sourceHashes:
              type: array
              items:
                type: string
            contextHash:
              type: string
            droppedSources:
              type: array
              items:
                type: string
            includedSources:
              type: array
              items:
                type: string
            sensitiveDataFlags:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          type:
                            type: string
                          found:
                            oneOf:
                              - type: boolean
                                enum:
                                  - false
                              - type: boolean
                                enum:
                                  - true
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
            staleSourceFlags:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          sourceId:
                            type: string
                          staleAt:
                            type: string
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
            instructionHierarchyHash:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - tokenCount
            - requirementId
            - primitiveStepRunId
            - metricsJson
            - sourceChunkIds
            - sourceHashes
            - contextHash
            - droppedSources
            - includedSources
            - sensitiveDataFlags
            - staleSourceFlags
            - instructionHierarchyHash
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            planHash:
              type: string
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    subtaskCount:
                      type: number
                    maxDepth:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            subtasksJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    subtasks:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              id:
                                type: string
                              description:
                                type: string
                              dependencies:
                                type: array
                                items:
                                  type: string
                            additionalProperties: false
                            required:
                              - id
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            dependencyGraphHash:
              oneOf:
                - type: 'null'
                - type: string
            stopConditionsHash:
              oneOf:
                - type: 'null'
                - type: string
            successCriteriaHash:
              oneOf:
                - type: 'null'
                - type: string
            unsafePlannedActions:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          reason:
                            type: string
                          action:
                            type: string
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
            missingApprovalSteps:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          step:
                            type: string
                          requiredApprover:
                            type: string
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - planHash
            - traceId
            - spanId
            - requirementId
            - primitiveStepRunId
            - metricsJson
            - subtasksJson
            - dependencyGraphHash
            - stopConditionsHash
            - successCriteriaHash
            - unsafePlannedActions
            - missingApprovalSteps
        - type: object
          properties:
            confidence:
              oneOf:
                - type: 'null'
                - type: number
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    confidence:
                      type: number
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            decisionHash:
              type: string
            routeType:
              type: string
            selectedRuntimeId:
              oneOf:
                - type: 'null'
                - type: number
            selectedFleetId:
              oneOf:
                - type: 'null'
                - type: number
            selectedAgentInstanceId:
              oneOf:
                - type: 'null'
                - type: number
            candidateRoutesJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    candidates:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              score:
                                type: number
                              reason:
                                type: string
                              fleetId:
                                type: number
                              runtimeId:
                                type: number
                            additionalProperties: false
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            fallbackUsed:
              type: boolean
          additionalProperties: false
          required:
            - confidence
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - requirementId
            - primitiveStepRunId
            - metricsJson
            - decisionHash
            - routeType
            - selectedRuntimeId
            - selectedFleetId
            - selectedAgentInstanceId
            - candidateRoutesJson
            - fallbackUsed
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    candidateCount:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            decisionHash:
              type: string
            selectedTool:
              type: string
            selectedConnectorKey:
              oneOf:
                - type: 'null'
                - type: string
            candidateToolsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    candidates:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              tool:
                                type: string
                              score:
                                type: number
                              reason:
                                type: string
                              connectorKey:
                                type: string
                            additionalProperties: false
                            required:
                              - tool
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            rejectedTools:
              type: array
              items:
                type: string
            selectionReason:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - policyDecisionId
            - connectorId
            - requirementId
            - primitiveStepRunId
            - metricsJson
            - decisionHash
            - selectedTool
            - selectedConnectorKey
            - candidateToolsJson
            - rejectedTools
            - selectionReason
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            payloadHash:
              type: string
            schemaHash:
              oneOf:
                - type: 'null'
                - type: string
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            toolInvocationEvidenceId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    fieldCount:
                      type: number
                    requiredFieldCount:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            payloadJsonRedacted:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    arguments:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            schemaValid:
              type: boolean
            requiredFieldsComplete:
              type: boolean
            invalidPayloadRate:
              oneOf:
                - type: 'null'
                - type: string
            overbroadQuery:
              type: boolean
            injectionVulnerability:
              type: boolean
            sensitiveDataMisuse:
              type: boolean
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - payloadHash
            - schemaHash
            - requirementId
            - toolInvocationEvidenceId
            - primitiveStepRunId
            - metricsJson
            - payloadJsonRedacted
            - schemaValid
            - requiredFieldsComplete
            - invalidPayloadRate
            - overbroadQuery
            - injectionVulnerability
            - sensitiveDataMisuse
        - type: object
          properties:
            verdict:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            score:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            inputHash:
              oneOf:
                - type: 'null'
                - type: string
            outputHash:
              oneOf:
                - type: 'null'
                - type: string
            evidenceItemIds:
              type: array
              items:
                type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    score:
                      type: number
                    latencyMs:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            verificationType:
              type: string
            verifierModel:
              oneOf:
                - type: 'null'
                - type: string
            verifierConfigHash:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - verdict
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - score
            - spanId
            - inputHash
            - outputHash
            - evidenceItemIds
            - requirementId
            - primitiveStepRunId
            - metricsJson
            - verificationType
            - verifierModel
            - verifierConfigHash
        - type: object
          properties:
            evaluationId:
              oneOf:
                - type: 'null'
                - type: number
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            score:
              oneOf:
                - type: 'null'
                - type: number
            evaluationRunId:
              oneOf:
                - type: 'null'
                - type: number
            threshold:
              oneOf:
                - type: 'null'
                - type: string
            testResultId:
              oneOf:
                - type: 'null'
                - type: number
            metricName:
              type: string
            evidenceItemIds:
              type: array
              items:
                type: number
            passed:
              type: boolean
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            metricsJson:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    score:
                      type: number
                    threshold:
                      type: number
                    details:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evalType:
              type: string
          additionalProperties: false
          required:
            - evaluationId
            - id
            - createdAt
            - organizationId
            - metadata
            - score
            - evaluationRunId
            - threshold
            - testResultId
            - metricName
            - evidenceItemIds
            - passed
            - primitiveStepRunId
            - metricsJson
            - evalType
        - type: object
          properties:
            failureMode:
              type: string
            status:
              type: string
            severity:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            description:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidence:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    traceIds:
                      type: array
                      items:
                        type: string
                    output:
                      type: string
                    spanIds:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            failureKey:
              type: string
            suggestedRegressionCase:
              allOf:
                - type: object
                  properties:
                    input:
                      type: string
                    schemaVersion:
                      type: number
                    expectedBehavior:
                      type: string
                    assertions:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - failureMode
            - status
            - severity
            - id
            - createdAt
            - organizationId
            - description
            - metadata
            - evidence
            - primitiveStepRunId
            - failureKey
            - suggestedRegressionCase
        - type: object
          properties:
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    latencyMs:
                      type: number
                    passRate:
                      type: number
                    avgScore:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            coverage:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    total:
                      type: number
                    covered:
                      type: number
                    coverageRate:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            qualityCaseId:
              oneOf:
                - type: 'null'
                - type: number
            snapshotKey:
              type: string
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            gateSummary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    passed:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    gates:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                              passed:
                                type: boolean
                              details:
                                type: string
                            additionalProperties: false
                            required:
                              - name
                              - passed
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            primitiveChainId:
              oneOf:
                - type: 'null'
                - type: number
            failureSummary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    totalFailures:
                      type: number
                    byMode:
                      type: object
                      additionalProperties:
                        type: number
                    bySeverity:
                      type: object
                      additionalProperties:
                        type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - id
            - createdAt
            - organizationId
            - metadata
            - workspaceId
            - aiSystemId
            - metrics
            - bucketStart
            - coverage
            - evidenceItemIds
            - qualityCaseId
            - snapshotKey
            - requirementId
            - gateSummary
            - primitiveChainId
            - failureSummary
        - type: object
          properties:
            failureMode:
              oneOf:
                - type: 'null'
                - type: string
            evaluationId:
              oneOf:
                - type: 'null'
                - type: number
            evalCaseId:
              oneOf:
                - type: 'null'
                - type: number
            confidence:
              type: number
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            evaluationRunId:
              oneOf:
                - type: 'null'
                - type: number
            testResultId:
              oneOf:
                - type: 'null'
                - type: number
            evidenceRefs:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          type:
                            type: string
                          id:
                            type: string
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
            primitiveStepId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveType:
              oneOf:
                - type: 'null'
                - type: string
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            rootCauseSummary:
              type: string
            baselineComparison:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    delta:
                      type: number
                    baselineScore:
                      type: number
                    currentScore:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            riskLevel:
              type: string
            impactEstimate:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    affectedUsers:
                      type: number
                    affectedRuns:
                      type: number
                    severityScore:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            suggestedActions:
              allOf:
                - type: array
                  items:
                    allOf:
                      - type: object
                        properties:
                          action:
                            type: string
                          priority:
                            type: string
                        additionalProperties: false
                      - type: object
                        additionalProperties:
                          $ref: '#/components/schemas/JsonValue'
                - type: array
                  items:
                    type: string
            decisionRecommendation:
              type: string
          additionalProperties: false
          required:
            - failureMode
            - evaluationId
            - evalCaseId
            - confidence
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - evaluationRunId
            - testResultId
            - evidenceRefs
            - primitiveStepId
            - primitiveType
            - primitiveStepRunId
            - rootCauseSummary
            - baselineComparison
            - riskLevel
            - impactEstimate
            - suggestedActions
            - decisionRecommendation
        - type: object
          properties:
            evaluationId:
              oneOf:
                - type: 'null'
                - type: number
            sourceType:
              type: string
            sourceId:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            evaluationRunId:
              oneOf:
                - type: 'null'
                - type: number
            payloadHash:
              oneOf:
                - type: 'null'
                - type: string
            testResultId:
              oneOf:
                - type: 'null'
                - type: number
            targetType:
              type: string
            properties:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    strength:
                      type: number
                    correlation:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            relation:
              type: string
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            graphKey:
              oneOf:
                - type: 'null'
                - type: string
            evalExplanationId:
              oneOf:
                - type: 'null'
                - type: number
            targetId:
              type: string
            evidenceStrength:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - evaluationId
            - sourceType
            - sourceId
            - id
            - createdAt
            - organizationId
            - metadata
            - traceId
            - spanId
            - evaluationRunId
            - payloadHash
            - testResultId
            - targetType
            - properties
            - relation
            - primitiveStepRunId
            - graphKey
            - evalExplanationId
            - targetId
            - evidenceStrength
        - type: object
          properties:
            failureMode:
              type: string
            status:
              type: string
            decision:
              type: string
            evaluationId:
              oneOf:
                - type: 'null'
                - type: number
            severity:
              type: string
            title:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            owner:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            evidence:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    traceIds:
                      type: array
                      items:
                        type: string
                    output:
                      type: string
                    testResultIds:
                      type: array
                      items:
                        type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            evaluationRunId:
              oneOf:
                - type: 'null'
                - type: number
            testResultId:
              oneOf:
                - type: 'null'
                - type: number
            primitiveStepRunId:
              oneOf:
                - type: 'null'
                - type: number
            failureKey:
              type: string
            evalExplanationId:
              oneOf:
                - type: 'null'
                - type: number
            systemName:
              oneOf:
                - type: 'null'
                - type: string
            evalProgramName:
              oneOf:
                - type: 'null'
                - type: string
            affectedTraces:
              allOf:
                - type: array
                  items:
                    type: number
                - type: array
                  items:
                    type: string
            suggestedFix:
              oneOf:
                - type: 'null'
                - type: string
            gateImpact:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - failureMode
            - status
            - decision
            - evaluationId
            - severity
            - title
            - id
            - createdAt
            - updatedAt
            - organizationId
            - owner
            - metadata
            - workspaceId
            - aiSystemId
            - evidence
            - traceId
            - evaluationRunId
            - testResultId
            - primitiveStepRunId
            - failureKey
            - evalExplanationId
            - systemName
            - evalProgramName
            - affectedTraces
            - suggestedFix
            - gateImpact
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            name:
              type: string
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    description:
                      type: string
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    costUsd:
                      type: number
                    latencyMs:
                      type: number
                    successRate:
                      type: number
                    accuracy:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            runtimeIds:
              type: array
              items:
                type: number
            benchmarkKey:
              type: string
            taskPackHash:
              type: string
            taskPack:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    tasks:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              input:
                                type: string
                              id:
                                type: string
                              expectedOutput:
                                type: string
                              metadata:
                                type: object
                                additionalProperties:
                                  $ref: '#/components/schemas/JsonValue'
                            additionalProperties: false
                            required:
                              - input
                              - id
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            winnerRuntimeId:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - status
            - id
            - name
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - metrics
            - evidenceItemIds
            - runtimeIds
            - benchmarkKey
            - taskPackHash
            - taskPack
            - winnerRuntimeId
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            updatedAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            manifestHash:
              oneOf:
                - type: 'null'
                - type: string
            score:
              type: number
            checks:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    checks:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              name:
                                type: string
                              passed:
                                type: boolean
                              details:
                                type: string
                            additionalProperties: false
                            required:
                              - name
                              - passed
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            findings:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    findings:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              severity:
                                oneOf:
                                  - type: string
                                    enum:
                                      - low
                                  - type: string
                                    enum:
                                      - medium
                                  - type: string
                                    enum:
                                      - high
                                  - type: string
                                    enum:
                                      - critical
                              description:
                                type: string
                              recommendation:
                                type: string
                            additionalProperties: false
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            reportKey:
              type: string
          additionalProperties: false
          required:
            - status
            - id
            - createdAt
            - updatedAt
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - manifestHash
            - score
            - checks
            - evidenceItemIds
            - connectorId
            - findings
            - reportKey
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            startedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            completedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            inputHash:
              type: string
            result:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    outcome:
                      type: string
                    sideEffects:
                      type: array
                      items:
                        type: string
                    differences:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              field:
                                type: string
                              expected:
                                $ref: '#/components/schemas/JsonValue'
                              actual:
                                $ref: '#/components/schemas/JsonValue'
                            additionalProperties: false
                            required:
                              - field
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            plan:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    steps:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              action:
                                type: string
                              expected:
                                type: string
                              target:
                                type: string
                            additionalProperties: false
                            required:
                              - action
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            permissionProfileId:
              oneOf:
                - type: 'null'
                - type: number
            evidenceItemIds:
              type: array
              items:
                type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            simulationKey:
              type: string
            targetAction:
              type: string
            simulationSupported:
              type: boolean
          additionalProperties: false
          required:
            - status
            - id
            - createdAt
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - startedAt
            - completedAt
            - inputHash
            - result
            - policyDecisionId
            - plan
            - permissionProfileId
            - evidenceItemIds
            - runtimeId
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - simulationKey
            - targetAction
            - simulationSupported
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            startedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            completedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            traceId:
              oneOf:
                - type: 'null'
                - type: number
            spanId:
              oneOf:
                - type: 'null'
                - type: number
            inputHash:
              oneOf:
                - type: 'null'
                - type: string
            result:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    reproduced:
                      oneOf:
                        - type: boolean
                          enum:
                            - false
                        - type: boolean
                          enum:
                            - true
                    differences:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              field:
                                type: string
                              original:
                                $ref: '#/components/schemas/JsonValue'
                              replayed:
                                $ref: '#/components/schemas/JsonValue'
                            additionalProperties: false
                            required:
                              - field
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            context:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    originalTraceId:
                      type: number
                    originalRunId:
                      type: string
                    inputSnapshot:
                      type: object
                      additionalProperties:
                        $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            targetType:
              type: string
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeVersionId:
              oneOf:
                - type: 'null'
                - type: number
            connectorManifestSnapshotId:
              oneOf:
                - type: 'null'
                - type: number
            toolInvocationEvidenceId:
              oneOf:
                - type: 'null'
                - type: number
            targetId:
              type: string
            replayKey:
              type: string
            reproducible:
              type: boolean
          additionalProperties: false
          required:
            - status
            - id
            - createdAt
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - startedAt
            - completedAt
            - traceId
            - spanId
            - inputHash
            - result
            - policyDecisionId
            - context
            - evidenceItemIds
            - targetType
            - runtimeId
            - connectorId
            - runtimeVersionId
            - connectorManifestSnapshotId
            - toolInvocationEvidenceId
            - targetId
            - replayKey
            - reproducible
        - type: object
          properties:
            id:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            reviewerId:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    approvalType:
                      type: string
                    urgency:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            expiresAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            reason:
              oneOf:
                - type: 'null'
                - type: string
            state:
              type: string
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            decidedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            toolInvocationEvidenceId:
              oneOf:
                - type: 'null'
                - type: number
            sideEffectLedgerId:
              oneOf:
                - type: 'null'
                - type: number
            simulationRunId:
              oneOf:
                - type: 'null'
                - type: number
            approvalKey:
              type: string
            requestedBy:
              oneOf:
                - type: 'null'
                - type: string
            requestedAt:
              type: string
              format: date-time
          additionalProperties: false
          required:
            - id
            - organizationId
            - reviewerId
            - metadata
            - aiSystemId
            - expiresAt
            - reason
            - state
            - policyDecisionId
            - decidedAt
            - evidenceItemIds
            - runtimeId
            - connectorId
            - toolInvocationEvidenceId
            - sideEffectLedgerId
            - simulationRunId
            - approvalKey
            - requestedBy
            - requestedAt
        - type: object
          properties:
            status:
              type: string
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            manifestHash:
              oneOf:
                - type: 'null'
                - type: string
            completedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            format:
              type: string
            manifest:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    evidenceCount:
                      type: number
                    chapters:
                      type: array
                      items:
                        allOf:
                          - type: object
                            properties:
                              title:
                                type: string
                              evidenceItemIds:
                                type: array
                                items:
                                  type: number
                            additionalProperties: false
                            required:
                              - title
                          - type: object
                            additionalProperties:
                              $ref: '#/components/schemas/JsonValue'
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            qualityCaseId:
              oneOf:
                - type: 'null'
                - type: number
            storageUri:
              oneOf:
                - type: 'null'
                - type: string
            exportKey:
              type: string
          additionalProperties: false
          required:
            - status
            - id
            - createdAt
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - manifestHash
            - completedAt
            - format
            - manifest
            - evidenceItemIds
            - qualityCaseId
            - storageUri
            - exportKey
        - type: object
          properties:
            severity:
              type: string
            id:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            startedAt:
              type: string
              format: date-time
            reason:
              oneOf:
                - type: 'null'
                - type: string
            state:
              type: string
            policyDecisionId:
              oneOf:
                - type: 'null'
                - type: number
            trigger:
              type: string
            targetType:
              type: string
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            targetId:
              type: string
            quarantineKey:
              type: string
            triggerPayload:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    source:
                      type: string
                    policyDecisionId:
                      type: number
                    anomalyId:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            readOnlyAllowed:
              type: boolean
            endedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            endedBy:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - severity
            - id
            - organizationId
            - createdBy
            - metadata
            - aiSystemId
            - startedAt
            - reason
            - state
            - policyDecisionId
            - trigger
            - targetType
            - runtimeId
            - connectorId
            - targetId
            - quarantineKey
            - triggerPayload
            - readOnlyAllowed
            - endedAt
            - endedBy
        - type: object
          properties:
            status:
              type: string
            severity:
              type: string
            title:
              type: string
            id:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            resolvedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            trigger:
              type: string
            evidenceItemIds:
              type: array
              items:
                type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            policyDecisionIds:
              type: array
              items:
                type: number
            quarantineStateId:
              oneOf:
                - type: 'null'
                - type: number
            incidentKey:
              type: string
            openedAt:
              type: string
              format: date-time
          additionalProperties: false
          required:
            - status
            - severity
            - title
            - id
            - organizationId
            - createdBy
            - resolvedAt
            - metadata
            - aiSystemId
            - trigger
            - evidenceItemIds
            - runtimeId
            - connectorId
            - policyDecisionIds
            - quarantineStateId
            - incidentKey
            - openedAt
        - type: object
          properties:
            status:
              type: string
            severity:
              type: string
            id:
              type: number
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            createdBy:
              oneOf:
                - type: 'null'
                - type: string
            resolvedAt:
              oneOf:
                - type: 'null'
                - type: string
                  format: date-time
            metadata:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            aiSystemId:
              oneOf:
                - type: 'null'
                - type: number
            detectedAt:
              type: string
              format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            fleetId:
              oneOf:
                - type: 'null'
                - type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
            agentInstanceId:
              oneOf:
                - type: 'null'
                - type: number
            recommendation:
              allOf:
                - type: object
                  properties:
                    severity:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    schemaVersion:
                      type: number
                    reason:
                      type: string
                    action:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            quarantineStateId:
              oneOf:
                - type: 'null'
                - type: number
            incidentId:
              oneOf:
                - type: 'null'
                - type: number
            anomalyKey:
              type: string
            anomalyType:
              type: string
            signals:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    threshold:
                      type: number
                    detectedAt:
                      type: string
                    observed:
                      type: number
                    signalType:
                      type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            recommendedEnforcement:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - status
            - severity
            - id
            - organizationId
            - createdBy
            - resolvedAt
            - metadata
            - workspaceId
            - aiSystemId
            - detectedAt
            - evidenceItemIds
            - fleetId
            - runtimeId
            - connectorId
            - agentInstanceId
            - recommendation
            - quarantineStateId
            - incidentId
            - anomalyKey
            - anomalyType
            - signals
            - recommendedEnforcement
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            fleetId:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - bucketStart
            - evidenceItemIds
            - fleetId
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            connectorId:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - bucketStart
            - evidenceItemIds
            - connectorId
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            runtimeId:
              oneOf:
                - type: 'null'
                - type: number
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - bucketStart
            - evidenceItemIds
            - runtimeId
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            evidenceItemIds:
              type: array
              items:
                type: number
            requirementId:
              oneOf:
                - type: 'null'
                - type: number
            bucketDate:
              type: string
              format: date-time
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - evidenceItemIds
            - requirementId
            - bucketDate
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            scopeType:
              type: string
            scopeId:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - bucketStart
            - evidenceItemIds
            - scopeType
            - scopeId
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            sideEffectClass:
              type: string
            evidenceItemIds:
              type: array
              items:
                type: number
            scopeType:
              type: string
            scopeId:
              oneOf:
                - type: 'null'
                - type: string
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - bucketStart
            - sideEffectClass
            - evidenceItemIds
            - scopeType
            - scopeId
        - type: object
          properties:
            summary:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            id:
              type: number
            createdAt:
              type: string
              format: date-time
            organizationId:
              $ref: '#/components/schemas/OrganizationId'
            workspaceId:
              oneOf:
                - type: 'null'
                - type: number
            metrics:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    successCount:
                      type: number
                    count:
                      type: number
                    successRate:
                      type: number
                    failureCount:
                      type: number
                    avgLatencyMs:
                      type: number
                    avgCostUsd:
                      type: number
                    totalCostUsd:
                      type: number
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
            bucketStart:
              type: string
              format: date-time
            evidenceItemIds:
              type: array
              items:
                type: number
            snapshotKey:
              type: string
            readinessScore:
              type: number
            roiScore:
              type: number
            riskScore:
              type: number
            autonomyScore:
              type: number
            evidenceFreshnessScore:
              type: number
            recommendedActions:
              allOf:
                - type: object
                  properties:
                    schemaVersion:
                      type: number
                    riskLevel:
                      oneOf:
                        - type: string
                          enum:
                            - low
                        - type: string
                          enum:
                            - medium
                        - type: string
                          enum:
                            - high
                        - type: string
                          enum:
                            - critical
                    highlights:
                      type: array
                      items:
                        type: string
                    keyFindings:
                      type: array
                      items:
                        type: string
                  additionalProperties: false
                - type: object
                  additionalProperties:
                    $ref: '#/components/schemas/JsonValue'
          additionalProperties: false
          required:
            - summary
            - id
            - createdAt
            - organizationId
            - workspaceId
            - metrics
            - bucketStart
            - evidenceItemIds
            - snapshotKey
            - readinessScore
            - roiScore
            - riskScore
            - autonomyScore
            - evidenceFreshnessScore
            - recommendedActions
    JsonValue:
      oneOf:
        - type: 'null'
        - type: boolean
        - type: number
        - type: string
        - type: array
          items:
            $ref: '#/components/schemas/JsonValue'
        - type: object
          additionalProperties:
            $ref: '#/components/schemas/JsonValue'
    OrganizationId:
      type: string
      format: uuid
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - UNAUTHORIZED
                - FORBIDDEN
                - NOT_FOUND
                - VALIDATION_ERROR
                - RATE_LIMITED
                - CONFLICT
                - INTERNAL_ERROR
                - SERVICE_UNAVAILABLE
                - QUOTA_EXCEEDED
                - NO_ORG_MEMBERSHIP
                - CROSS_ORG_REFERENCE
                - INCOMPLETE
                - MALFORMED
            message:
              type: string
            details: {}
            requestId:
              type: string
              format: uuid
          required:
            - code
            - message
      required:
        - error
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    RateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key or Session Token

````