{
  "openapi": "3.0.3",
  "info": {
    "title": "Rundial API",
    "version": "1.0.0",
    "description": "Bounded Rundial /api/v1 contract. SSE is signal-only; data rows are pulled through bounded query endpoints."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:8787"
    }
  ],
  "paths": {
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "getOpenApiDocument",
        "tags": [
          "docs"
        ],
        "summary": "OpenAPI 3.0 contract document.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": {}
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/docs": {
      "get": {
        "operationId": "getApiDocs",
        "tags": [
          "docs"
        ],
        "summary": "HTML API documentation entry point.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/setup/status": {
      "get": {
        "operationId": "getSetupStatus",
        "tags": [
          "setup"
        ],
        "summary": "Deployment setup readiness status.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ready",
                        "degraded",
                        "blocked"
                      ]
                    },
                    "timestamp": {
                      "type": "string",
                      "minLength": 1
                    },
                    "dependencies": {
                      "type": "object",
                      "properties": {
                        "api": {
                          "type": "object",
                          "properties": {
                            "level": {
                              "type": "string",
                              "enum": [
                                "ok",
                                "warning",
                                "error",
                                "not_configured"
                              ]
                            },
                            "detail": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "hint": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512,
                              "nullable": true
                            }
                          },
                          "required": [
                            "level",
                            "detail",
                            "hint"
                          ],
                          "additionalProperties": false
                        },
                        "convex": {
                          "type": "object",
                          "properties": {
                            "level": {
                              "type": "string",
                              "enum": [
                                "ok",
                                "warning",
                                "error",
                                "not_configured"
                              ]
                            },
                            "detail": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "hint": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512,
                              "nullable": true
                            }
                          },
                          "required": [
                            "level",
                            "detail",
                            "hint"
                          ],
                          "additionalProperties": false
                        },
                        "clickhouse": {
                          "type": "object",
                          "properties": {
                            "level": {
                              "type": "string",
                              "enum": [
                                "ok",
                                "warning",
                                "error",
                                "not_configured"
                              ]
                            },
                            "detail": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "hint": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512,
                              "nullable": true
                            }
                          },
                          "required": [
                            "level",
                            "detail",
                            "hint"
                          ],
                          "additionalProperties": false
                        },
                        "objectStorage": {
                          "type": "object",
                          "properties": {
                            "level": {
                              "type": "string",
                              "enum": [
                                "ok",
                                "warning",
                                "error",
                                "not_configured"
                              ]
                            },
                            "detail": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "hint": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512,
                              "nullable": true
                            }
                          },
                          "required": [
                            "level",
                            "detail",
                            "hint"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "api",
                        "convex",
                        "clickhouse",
                        "objectStorage"
                      ],
                      "additionalProperties": false
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "disabled",
                            "dev",
                            "better_auth",
                            "workos"
                          ]
                        },
                        "provider": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "credentialsEnabled": {
                          "type": "boolean"
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "ok",
                            "warning",
                            "error",
                            "not_configured"
                          ]
                        },
                        "detail": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "hint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        }
                      },
                      "required": [
                        "mode",
                        "provider",
                        "credentialsEnabled",
                        "level",
                        "detail",
                        "hint"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "timestamp",
                    "dependencies",
                    "auth"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/limits/policy": {
      "get": {
        "operationId": "getLimitsPolicy",
        "tags": [
          "limits"
        ],
        "summary": "Runtime boundedness and feature policy.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "query": {
                      "type": "object",
                      "properties": {
                        "apiQueryMaxBytes": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "apiIngestMaxBytes": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "querySeriesMaxSourcePoints": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "streamMaxRunIds": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "apiQueryMaxBytes",
                        "apiIngestMaxBytes",
                        "querySeriesMaxSourcePoints",
                        "streamMaxRunIds"
                      ],
                      "additionalProperties": false
                    },
                    "metrics": {
                      "type": "object",
                      "properties": {
                        "maxIngestPointsPerBatch": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxSeriesPerRequest": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxPointsPerSeries": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxSeriesRangeMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxMetricKeyDiscoveryLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxIngestPointsPerBatch",
                        "maxSeriesPerRequest",
                        "maxPointsPerSeries",
                        "maxSeriesRangeMs",
                        "maxMetricKeyDiscoveryLimit"
                      ],
                      "additionalProperties": false
                    },
                    "logs": {
                      "type": "object",
                      "properties": {
                        "maxIngestLinesPerBatch": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxMessageLength": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxQueryLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "defaultQueryLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxQueryRangeMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "maxTextFilterLength": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxIngestLinesPerBatch",
                        "maxMessageLength",
                        "maxQueryLimit",
                        "defaultQueryLimit",
                        "maxQueryRangeMs",
                        "maxTextFilterLength"
                      ],
                      "additionalProperties": false
                    },
                    "compare": {
                      "type": "object",
                      "properties": {
                        "maxRunsPerCompare": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxSeriesPerRequest": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxPointsPerSeries": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxRunsPerCompare",
                        "maxSeriesPerRequest",
                        "maxPointsPerSeries"
                      ],
                      "additionalProperties": false
                    },
                    "export": {
                      "type": "object",
                      "properties": {
                        "maxPageSize": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "defaultPageSize": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxPageSize",
                        "defaultPageSize"
                      ],
                      "additionalProperties": false
                    },
                    "artifacts": {
                      "type": "object",
                      "properties": {
                        "maxFilesPerArtifact": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxFileSizeBytes": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxListLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "defaultUrlTtlSeconds": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "checkpointRetentionKeepLast": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxFilesPerArtifact",
                        "maxFileSizeBytes",
                        "maxListLimit",
                        "defaultUrlTtlSeconds",
                        "checkpointRetentionKeepLast"
                      ],
                      "additionalProperties": false
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "logs": {
                          "type": "boolean"
                        },
                        "artifacts": {
                          "type": "boolean"
                        },
                        "traces": {
                          "type": "boolean"
                        },
                        "evals": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "logs",
                        "artifacts",
                        "traces",
                        "evals"
                      ],
                      "additionalProperties": false
                    },
                    "metadata": {
                      "type": "object",
                      "properties": {
                        "maxPageSize": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "defaultPageSize": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxRunQueryLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "defaultRunQueryLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxPageSize",
                        "defaultPageSize",
                        "maxRunQueryLimit",
                        "defaultRunQueryLimit"
                      ],
                      "additionalProperties": false
                    },
                    "webhooks": {
                      "type": "object",
                      "properties": {
                        "maxListLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxDeliveryListLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "maxListLimit",
                        "maxDeliveryListLimit"
                      ],
                      "additionalProperties": false
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "disabled",
                            "dev",
                            "better_auth",
                            "workos"
                          ]
                        },
                        "sessionTtlMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "loginWindowMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "loginMaxAttempts": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "loginLockoutMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "mode",
                        "sessionTtlMs",
                        "loginWindowMs",
                        "loginMaxAttempts",
                        "loginLockoutMs"
                      ],
                      "additionalProperties": false
                    },
                    "rateLimit": {
                      "type": "object",
                      "properties": {
                        "windowMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "ingestMaxRequests": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "queryMaxRequests": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "mutationMaxRequests": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "maxBuckets": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "windowMs",
                        "ingestMaxRequests",
                        "queryMaxRequests",
                        "mutationMaxRequests",
                        "maxBuckets"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "query",
                    "metrics",
                    "logs",
                    "compare",
                    "export",
                    "artifacts",
                    "features",
                    "metadata",
                    "webhooks",
                    "auth",
                    "rateLimit"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/cli/capabilities": {
      "get": {
        "operationId": "getCliCapabilities",
        "tags": [
          "cli"
        ],
        "summary": "CLI capability discovery.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "version": {
                      "type": "number",
                      "enum": [
                        1
                      ]
                    },
                    "serverTimeMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "auth": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "disabled",
                            "dev",
                            "better_auth",
                            "workos"
                          ]
                        },
                        "providers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "credentials",
                              "google",
                              "github",
                              "workos"
                            ]
                          },
                          "maxItems": 4
                        },
                        "credentialsLoginEnabled": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "mode",
                        "providers",
                        "credentialsLoginEnabled"
                      ],
                      "additionalProperties": false
                    },
                    "features": {
                      "type": "object",
                      "properties": {
                        "whoami": {
                          "type": "boolean"
                        },
                        "workspaceDiscovery": {
                          "type": "boolean"
                        },
                        "resolveRunTarget": {
                          "type": "boolean"
                        },
                        "slugApiKeys": {
                          "type": "boolean"
                        },
                        "personalAccessTokens": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "whoami",
                        "workspaceDiscovery",
                        "resolveRunTarget",
                        "slugApiKeys",
                        "personalAccessTokens"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "version",
                    "serverTimeMs",
                    "auth",
                    "features"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/auth/providers": {
      "get": {
        "operationId": "getAuthProviders",
        "tags": [
          "auth"
        ],
        "summary": "Authentication provider discovery.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "providers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "enum": [
                              "credentials",
                              "google",
                              "github",
                              "workos"
                            ]
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "enabled": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "enabled"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 4
                    },
                    "sdkCapabilities": {
                      "type": "object",
                      "properties": {
                        "evalObservationIdentityVersion": {
                          "type": "number",
                          "enum": [
                            2
                          ]
                        }
                      },
                      "required": [
                        "evalObservationIdentityVersion"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "providers"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/auth/session": {
      "get": {
        "operationId": "getAuthSession",
        "tags": [
          "auth"
        ],
        "summary": "Current session.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "user": {
                          "type": "object",
                          "properties": {
                            "userId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "email": {
                              "type": "string",
                              "format": "email",
                              "maxLength": 320
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 128,
                              "nullable": true
                            },
                            "avatarUrl": {
                              "type": "string",
                              "format": "uri",
                              "maxLength": 2048,
                              "nullable": true
                            }
                          },
                          "required": [
                            "userId",
                            "email",
                            "name",
                            "avatarUrl"
                          ],
                          "additionalProperties": false
                        },
                        "memberships": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "orgId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "workspaceSlug": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128,
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                              },
                              "orgName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "owner",
                                  "admin",
                                  "member",
                                  "viewer"
                                ]
                              }
                            },
                            "required": [
                              "orgId",
                              "orgName",
                              "role"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 100
                        },
                        "capabilities": {
                          "type": "object",
                          "properties": {
                            "canView": {
                              "type": "boolean"
                            },
                            "canWrite": {
                              "type": "boolean"
                            },
                            "canManageKeys": {
                              "type": "boolean"
                            },
                            "canManageMembers": {
                              "type": "boolean"
                            },
                            "canDelete": {
                              "type": "boolean"
                            },
                            "effectiveRole": {
                              "type": "string",
                              "enum": [
                                "owner",
                                "admin",
                                "member",
                                "viewer"
                              ],
                              "nullable": true
                            }
                          },
                          "required": [
                            "canView",
                            "canWrite",
                            "canManageKeys",
                            "canManageMembers",
                            "canDelete",
                            "effectiveRole"
                          ],
                          "additionalProperties": false
                        },
                        "activeOrgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "authenticated",
                        "user",
                        "memberships",
                        "capabilities",
                        "activeOrgId",
                        "expiresAtMs"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "type": "boolean",
                          "enum": [
                            false
                          ]
                        }
                      },
                      "required": [
                        "authenticated"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/auth/whoami": {
      "get": {
        "operationId": "getWhoami",
        "tags": [
          "auth"
        ],
        "summary": "Current user or API-key principal.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "principal": {
                          "type": "string",
                          "enum": [
                            "user"
                          ]
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "disabled",
                            "dev",
                            "better_auth",
                            "workos"
                          ]
                        },
                        "subjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 128,
                          "nullable": true
                        },
                        "workspace": {
                          "type": "object",
                          "properties": {
                            "orgId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "workspaceSlug": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "orgId",
                            "workspaceSlug",
                            "name"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "authenticated",
                        "principal",
                        "mode",
                        "subjectId",
                        "email",
                        "name",
                        "workspace"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "type": "boolean",
                          "enum": [
                            true
                          ]
                        },
                        "principal": {
                          "type": "string",
                          "enum": [
                            "api_key"
                          ]
                        },
                        "mode": {
                          "type": "string",
                          "enum": [
                            "disabled",
                            "dev",
                            "better_auth",
                            "workos"
                          ]
                        },
                        "keyId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "principalType": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent"
                          ],
                          "default": "user"
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "project:read",
                              "metrics:write",
                              "logs:write",
                              "traces:write",
                              "artifacts:write",
                              "evals:write",
                              "exports:read",
                              "stream:read"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 16
                        },
                        "workspace": {
                          "type": "object",
                          "properties": {
                            "orgId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "workspaceSlug": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "orgId",
                            "workspaceSlug",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        "project": {
                          "type": "object",
                          "properties": {
                            "projectId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "projectSlug": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128,
                              "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "projectId",
                            "projectSlug",
                            "name"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "authenticated",
                        "principal",
                        "mode",
                        "keyId",
                        "scopes",
                        "workspace",
                        "project"
                      ],
                      "additionalProperties": false
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "operationId": "logout",
        "tags": [
          "auth"
        ],
        "summary": "Idempotent logout.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/auth/login/{provider}": {
      "get": {
        "operationId": "startProviderLogin",
        "tags": [
          "auth"
        ],
        "summary": "Start redirect-based provider login.",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "redirectTo": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 2048
                    }
                  },
                  "required": [
                    "redirectTo"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/auth/login/credentials": {
      "post": {
        "operationId": "loginWithCredentials",
        "tags": [
          "auth"
        ],
        "summary": "Credentials login.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  },
                  "password": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "email",
                  "password"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "redirectTo": {
                      "type": "string",
                      "maxLength": 2048
                    }
                  },
                  "required": [
                    "status"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/account": {
      "get": {
        "operationId": "getAccount",
        "tags": [
          "account"
        ],
        "summary": "Get the current account profile, session, memberships, and preferences.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "email": {
                      "type": "string",
                      "format": "email"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256,
                      "nullable": true
                    },
                    "authMode": {
                      "type": "string",
                      "enum": [
                        "disabled",
                        "dev",
                        "better_auth",
                        "workos"
                      ]
                    },
                    "authProvider": {
                      "type": "string",
                      "enum": [
                        "credentials",
                        "workos",
                        "dev",
                        "disabled"
                      ]
                    },
                    "memberships": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                            "nullable": true
                          },
                          "orgName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ]
                          }
                        },
                        "required": [
                          "orgId",
                          "workspaceSlug",
                          "orgName",
                          "projectId",
                          "role"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "capabilities": {
                      "type": "object",
                      "properties": {
                        "canChangePassword": {
                          "type": "boolean"
                        },
                        "canManagePersonalTokens": {
                          "type": "boolean"
                        },
                        "canRevokeOtherSessions": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "canChangePassword",
                        "canManagePersonalTokens",
                        "canRevokeOtherSessions"
                      ],
                      "additionalProperties": false
                    },
                    "session": {
                      "type": "object",
                      "properties": {
                        "authenticated": {
                          "type": "boolean"
                        },
                        "principal": {
                          "type": "string",
                          "enum": [
                            "session",
                            "personal_access_token"
                          ]
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "activeSessionCount": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "canRevokeOtherSessions": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "authenticated",
                        "principal",
                        "expiresAtMs",
                        "activeSessionCount",
                        "canRevokeOtherSessions"
                      ],
                      "additionalProperties": false
                    },
                    "preferences": {
                      "type": "object",
                      "properties": {
                        "defaultWorkspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "defaultProjectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "timezone": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "tableDensity": {
                          "type": "string",
                          "enum": [
                            "compact",
                            "comfortable"
                          ]
                        },
                        "chartRangeDefault": {
                          "type": "string",
                          "enum": [
                            "run",
                            "1h",
                            "6h",
                            "24h",
                            "7d"
                          ]
                        }
                      },
                      "required": [
                        "defaultWorkspaceSlug",
                        "defaultProjectSlug",
                        "timezone",
                        "tableDensity",
                        "chartRangeDefault"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "subjectId",
                    "email",
                    "name",
                    "authMode",
                    "authProvider",
                    "memberships",
                    "capabilities",
                    "session",
                    "preferences"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      }
    },
    "/api/v1/account/preferences": {
      "patch": {
        "operationId": "updateAccountPreferences",
        "tags": [
          "account"
        ],
        "summary": "Update current account preferences.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "defaultWorkspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  },
                  "defaultProjectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  },
                  "timezone": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "tableDensity": {
                    "type": "string",
                    "enum": [
                      "compact",
                      "comfortable"
                    ]
                  },
                  "chartRangeDefault": {
                    "type": "string",
                    "enum": [
                      "run",
                      "1h",
                      "6h",
                      "24h",
                      "7d"
                    ]
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "preferences": {
                      "type": "object",
                      "properties": {
                        "defaultWorkspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "defaultProjectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "timezone": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "tableDensity": {
                          "type": "string",
                          "enum": [
                            "compact",
                            "comfortable"
                          ]
                        },
                        "chartRangeDefault": {
                          "type": "string",
                          "enum": [
                            "run",
                            "1h",
                            "6h",
                            "24h",
                            "7d"
                          ]
                        }
                      },
                      "required": [
                        "defaultWorkspaceSlug",
                        "defaultProjectSlug",
                        "timezone",
                        "tableDensity",
                        "chartRangeDefault"
                      ],
                      "additionalProperties": false
                    },
                    "updatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "preferences",
                    "updatedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      }
    },
    "/api/v1/account/sessions/revoke-all": {
      "post": {
        "operationId": "revokeAccountSessions",
        "tags": [
          "account"
        ],
        "summary": "Revoke all sessions for the current account.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "revokedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sessionsRevoked": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "subjectId",
                    "revokedAtMs",
                    "sessionsRevoked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      }
    },
    "/api/v1/account/password/change": {
      "post": {
        "operationId": "changeAccountPassword",
        "tags": [
          "account"
        ],
        "summary": "Change the current account password.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "currentPassword": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "newPassword": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 256
                  }
                },
                "required": [
                  "currentPassword",
                  "newPassword"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "rotatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sessionsRevoked": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "subjectId",
                    "rotatedAtMs",
                    "sessionsRevoked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      }
    },
    "/api/v1/account/personal-tokens": {
      "get": {
        "operationId": "listPersonalAccessTokens",
        "tags": [
          "account"
        ],
        "summary": "List personal access tokens for the current account.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "tokens": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "tokenId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "subjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "tokenPrefix": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 32
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "workspace:read",
                                "project:read",
                                "runs:read",
                                "metrics:read",
                                "logs:read",
                                "traces:read",
                                "artifacts:read",
                                "evals:read",
                                "exports:read"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 9
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          },
                          "lastUsedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "tokenId",
                          "subjectId",
                          "tokenPrefix",
                          "label",
                          "scopes",
                          "createdAtMs",
                          "expiresAtMs",
                          "lastUsedAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "tokens"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      },
      "post": {
        "operationId": "createPersonalAccessToken",
        "tags": [
          "account"
        ],
        "summary": "Create a personal access token for the current account.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "workspace:read",
                        "project:read",
                        "runs:read",
                        "metrics:read",
                        "logs:read",
                        "traces:read",
                        "artifacts:read",
                        "evals:read",
                        "exports:read"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 9
                  },
                  "expiresAtMs": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  }
                },
                "required": [
                  "scopes",
                  "expiresAtMs"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "personalToken": {
                      "type": "object",
                      "properties": {
                        "tokenId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "subjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "tokenPrefix": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 32
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "workspace:read",
                              "project:read",
                              "runs:read",
                              "metrics:read",
                              "logs:read",
                              "traces:read",
                              "artifacts:read",
                              "evals:read",
                              "exports:read"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 9
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "lastUsedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "token": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "tokenId",
                        "subjectId",
                        "tokenPrefix",
                        "label",
                        "scopes",
                        "createdAtMs",
                        "expiresAtMs",
                        "lastUsedAtMs",
                        "revokedAtMs",
                        "token"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "personalToken"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      }
    },
    "/api/v1/account/personal-tokens/{tokenId}/revoke": {
      "post": {
        "operationId": "revokePersonalAccessToken",
        "tags": [
          "account"
        ],
        "summary": "Revoke a personal access token for the current account.",
        "parameters": [
          {
            "name": "tokenId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "tokenId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "revokedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "tokenId",
                    "revokedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": true
      }
    },
    "/api/v1/runs/resolve-target": {
      "post": {
        "operationId": "resolveRunTarget",
        "tags": [
          "runs"
        ],
        "summary": "Resolve workspace/project slugs to run target IDs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspace": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "project": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "workspace",
                  "project"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orgId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1
                    },
                    "workspaceName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "orgId",
                    "workspaceSlug",
                    "workspaceName",
                    "projectSlug",
                    "projectName",
                    "projectId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/runs/start": {
      "post": {
        "operationId": "startRun",
        "tags": [
          "runs"
        ],
        "summary": "Start or resume a run.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "training",
                      "agent",
                      "eval"
                    ],
                    "default": "training"
                  },
                  "resume": {
                    "type": "string",
                    "enum": [
                      "never",
                      "allow",
                      "must"
                    ],
                    "default": "never"
                  },
                  "runName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "group": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "jobType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "maxItems": 20
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2048
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "enum": [
                            "null"
                          ],
                          "nullable": true
                        }
                      ]
                    }
                  },
                  "client": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "version": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "name",
                      "version"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "projectId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "training",
                        "agent",
                        "eval"
                      ],
                      "default": "training"
                    },
                    "createdBy": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "service"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "displayName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "runName": {
                      "type": "string",
                      "nullable": true
                    },
                    "group": {
                      "type": "string",
                      "maxLength": 128,
                      "nullable": true
                    },
                    "jobType": {
                      "type": "string",
                      "maxLength": 64,
                      "nullable": true
                    },
                    "resume": {
                      "type": "object",
                      "properties": {
                        "mode": {
                          "type": "string",
                          "enum": [
                            "never",
                            "allow",
                            "must"
                          ]
                        },
                        "attached": {
                          "type": "boolean"
                        },
                        "reopenedTerminal": {
                          "type": "boolean"
                        },
                        "resumeCount": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "mode",
                        "attached",
                        "reopenedTerminal",
                        "resumeCount"
                      ],
                      "additionalProperties": false
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "dev",
                        "prod"
                      ]
                    },
                    "stream": {
                      "type": "object",
                      "properties": {
                        "metricsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "logsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "artifactsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "statusGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "tracesGeneration": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        },
                        "evalsGeneration": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        }
                      },
                      "required": [
                        "metricsGeneration",
                        "logsGeneration",
                        "artifactsGeneration",
                        "statusGeneration"
                      ],
                      "additionalProperties": false
                    },
                    "createdAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "runId",
                    "projectId",
                    "runName",
                    "resume",
                    "mode",
                    "stream",
                    "createdAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/runs/{runId}/status": {
      "post": {
        "operationId": "updateRunStatus",
        "tags": [
          "runs"
        ],
        "summary": "Update run lifecycle status.",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "completed",
                      "failed",
                      "aborted"
                    ]
                  },
                  "finishedAtMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "previousStatus": {
                      "type": "string",
                      "enum": [
                        "running",
                        "completed",
                        "failed",
                        "aborted"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "completed",
                        "failed",
                        "aborted"
                      ]
                    },
                    "finishedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "updatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "reason": {
                      "type": "string",
                      "maxLength": 512,
                      "nullable": true
                    }
                  },
                  "required": [
                    "runId",
                    "projectId",
                    "previousStatus",
                    "status",
                    "finishedAtMs",
                    "updatedAtMs",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/runs/{runId}/config": {
      "post": {
        "operationId": "updateRunConfig",
        "tags": [
          "runs"
        ],
        "summary": "Update bounded run config.",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "config": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2048
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "enum": [
                            "null"
                          ],
                          "nullable": true
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "config"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "runId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "completed",
                        "failed",
                        "aborted"
                      ]
                    },
                    "updatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "config": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2048
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "enum": [
                              "null"
                            ],
                            "nullable": true
                          }
                        ]
                      }
                    }
                  },
                  "required": [
                    "runId",
                    "projectId",
                    "status",
                    "updatedAtMs",
                    "config"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/orgs/{orgId}/runs/reconcile-stale": {
      "post": {
        "operationId": "reconcileStaleRuns",
        "tags": [
          "runs"
        ],
        "summary": "Reconcile stale running runs.",
        "parameters": [
          {
            "name": "orgId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "staleAfterMs": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 2592000000,
                    "default": 3600000
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 500,
                    "default": 100
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "staleThresholdMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "reconciled": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "runId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "orgId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "previousStatus": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "runId",
                          "projectId",
                          "orgId",
                          "previousStatus",
                          "status",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 500
                    }
                  },
                  "required": [
                    "status",
                    "staleThresholdMs",
                    "reconciled",
                    "runs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/ingest/metrics": {
      "post": {
        "operationId": "ingestMetrics",
        "tags": [
          "metrics"
        ],
        "summary": "Ingest a bounded metrics batch.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "points": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "metricKey": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "step": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "timestampMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "value": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "projectId",
                        "runId",
                        "metricKey",
                        "step",
                        "timestampMs",
                        "value"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  },
                  "clientDiagnostics": {
                    "type": "object",
                    "properties": {
                      "capturedAtMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "queueDepth": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsQueueFull": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsSpoolEviction": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsNonRetryable": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsRetryExhausted": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsNonFinite": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "nonFiniteDroppedByMetric": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        }
                      },
                      "spoolSegments": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "spoolBytes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1099511627776
                      },
                      "retryAttempts": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "failedFlushAttempts": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "systemSamplesCollected": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "systemSamplesSkippedBackpressure": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "logLinesTruncated": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "droppedLogLinesQueueFull": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "droppedLogLinesInvalid": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      }
                    },
                    "required": [
                      "capturedAtMs",
                      "queueDepth",
                      "droppedPoints",
                      "droppedPointsQueueFull",
                      "droppedPointsSpoolEviction",
                      "droppedPointsNonRetryable",
                      "droppedPointsRetryExhausted",
                      "droppedPointsNonFinite",
                      "nonFiniteDroppedByMetric",
                      "spoolSegments",
                      "spoolBytes",
                      "retryAttempts",
                      "failedFlushAttempts"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "points"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    }
                  },
                  "required": [
                    "accepted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/series": {
      "post": {
        "operationId": "querySeries",
        "tags": [
          "metrics"
        ],
        "summary": "Query bounded metric series.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "metricKeys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "minItems": 1,
                    "maxItems": 8
                  },
                  "range": {
                    "type": "string",
                    "enum": [
                      "full_run",
                      "window"
                    ]
                  },
                  "startMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "endMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "maxPointsPerSeries": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 2000,
                    "default": 500
                  },
                  "order": {
                    "type": "string",
                    "enum": [
                      "asc",
                      "desc"
                    ],
                    "default": "asc"
                  },
                  "metricsGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "metricKeys"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "range": {
                      "type": "string",
                      "enum": [
                        "full_run",
                        "window"
                      ]
                    },
                    "startMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "maxPointsPerSeries": {
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "minimum": 0,
                      "maximum": 2000
                    },
                    "series": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "metricKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "points": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "step": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "timestampMs": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "value": {
                                  "type": "number"
                                }
                              },
                              "required": [
                                "step",
                                "timestampMs",
                                "value"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 2000
                          },
                          "summary": {
                            "type": "object",
                            "properties": {
                              "scope": {
                                "type": "string",
                                "enum": [
                                  "selected_range"
                                ]
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "first": {
                                "type": "object",
                                "properties": {
                                  "step": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "timestampMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "value": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "step",
                                  "timestampMs",
                                  "value"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              },
                              "latest": {
                                "type": "object",
                                "properties": {
                                  "step": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "timestampMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "value": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "step",
                                  "timestampMs",
                                  "value"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              },
                              "min": {
                                "type": "object",
                                "properties": {
                                  "step": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "timestampMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "value": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "step",
                                  "timestampMs",
                                  "value"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              },
                              "max": {
                                "type": "object",
                                "properties": {
                                  "step": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "timestampMs": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "value": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "step",
                                  "timestampMs",
                                  "value"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              }
                            },
                            "required": [
                              "scope",
                              "count",
                              "first",
                              "latest",
                              "min",
                              "max"
                            ],
                            "additionalProperties": false
                          },
                          "sourcePoints": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "sampled": {
                            "type": "boolean"
                          },
                          "truncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "metricKey",
                          "points",
                          "sourcePoints",
                          "sampled",
                          "truncated"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 8
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "range",
                    "startMs",
                    "endMs",
                    "maxPointsPerSeries",
                    "series"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/metrics/keys": {
      "get": {
        "operationId": "getMetricKeys",
        "tags": [
          "metrics"
        ],
        "summary": "Discover bounded metric keys.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "nullable": true
                    },
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "metricKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "points": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "firstTimestampMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "lastTimestampMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "metricKey",
                          "points",
                          "firstTimestampMs",
                          "lastTimestampMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 500
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 500
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 500
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "keys",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/stream": {
      "get": {
        "operationId": "streamGenerations",
        "tags": [
          "stream"
        ],
        "summary": "Signal-only SSE stream.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "eventId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "metricsGeneration": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "logsGeneration": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "artifactsGeneration": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "statusGeneration": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "tracesGeneration": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "evalsGeneration": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "emittedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "eventId",
                    "runId",
                    "metricsGeneration",
                    "logsGeneration",
                    "artifactsGeneration",
                    "statusGeneration",
                    "emittedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/compare": {
      "post": {
        "operationId": "queryCompare",
        "tags": [
          "compare"
        ],
        "summary": "Query bounded multi-run comparison.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "minItems": 1,
                    "maxItems": 12
                  },
                  "metricKeys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "minItems": 1,
                    "maxItems": 8
                  },
                  "range": {
                    "type": "string",
                    "enum": [
                      "full_run",
                      "window"
                    ]
                  },
                  "startMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "endMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "maxPointsPerSeries": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 2000,
                    "default": 500
                  },
                  "order": {
                    "type": "string",
                    "enum": [
                      "asc",
                      "desc"
                    ],
                    "default": "asc"
                  }
                },
                "required": [
                  "projectId",
                  "runIds",
                  "metricKeys"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "maxItems": 12
                    },
                    "metricKeys": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "maxItems": 8
                    },
                    "range": {
                      "type": "string",
                      "enum": [
                        "full_run",
                        "window"
                      ]
                    },
                    "startMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "maxPointsPerSeries": {
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "minimum": 0,
                      "maximum": 2000
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "series": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "metricKey": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "points": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "step": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "timestampMs": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "value": {
                                        "type": "number"
                                      }
                                    },
                                    "required": [
                                      "step",
                                      "timestampMs",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 2000
                                },
                                "summary": {
                                  "type": "object",
                                  "properties": {
                                    "scope": {
                                      "type": "string",
                                      "enum": [
                                        "selected_range"
                                      ]
                                    },
                                    "count": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "first": {
                                      "type": "object",
                                      "properties": {
                                        "step": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "timestampMs": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "step",
                                        "timestampMs",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "nullable": true
                                    },
                                    "latest": {
                                      "type": "object",
                                      "properties": {
                                        "step": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "timestampMs": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "step",
                                        "timestampMs",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "nullable": true
                                    },
                                    "min": {
                                      "type": "object",
                                      "properties": {
                                        "step": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "timestampMs": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "step",
                                        "timestampMs",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "nullable": true
                                    },
                                    "max": {
                                      "type": "object",
                                      "properties": {
                                        "step": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "timestampMs": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "step",
                                        "timestampMs",
                                        "value"
                                      ],
                                      "additionalProperties": false,
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "scope",
                                    "count",
                                    "first",
                                    "latest",
                                    "min",
                                    "max"
                                  ],
                                  "additionalProperties": false
                                },
                                "sourcePoints": {
                                  "type": "integer",
                                  "minimum": 0
                                },
                                "sampled": {
                                  "type": "boolean"
                                },
                                "truncated": {
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "metricKey",
                                "points",
                                "sourcePoints",
                                "sampled",
                                "truncated"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 8
                          }
                        },
                        "required": [
                          "runId",
                          "series"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 12
                    }
                  },
                  "required": [
                    "projectId",
                    "runIds",
                    "metricKeys",
                    "range",
                    "startMs",
                    "endMs",
                    "maxPointsPerSeries",
                    "runs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/export/metrics": {
      "post": {
        "operationId": "exportMetrics",
        "tags": [
          "export"
        ],
        "summary": "Export paged metrics.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "metricKeys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "minItems": 1,
                    "maxItems": 8
                  },
                  "startMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "endMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 5000,
                    "default": 1000
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "csv"
                    ],
                    "default": "json"
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "startMs",
                  "endMs"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "startMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "metricKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "step": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "metricKey",
                          "step",
                          "timestampMs",
                          "value"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 5000
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 5000
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 5000
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "startMs",
                    "endMs",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/export/logs": {
      "post": {
        "operationId": "exportLogs",
        "tags": [
          "export"
        ],
        "summary": "Export paged logs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "startMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "endMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 5000,
                    "default": 1000
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "format": {
                    "type": "string",
                    "enum": [
                      "json",
                      "csv"
                    ],
                    "default": "json"
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "startMs",
                  "endMs"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "startMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "level": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 16
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "timestampMs",
                          "sequence",
                          "level",
                          "message"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 5000
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 5000
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 5000
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "startMs",
                    "endMs",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/ingest/logs": {
      "post": {
        "operationId": "ingestLogs",
        "tags": [
          "logs"
        ],
        "summary": "Ingest a bounded log batch.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lines": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "timestampMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "sequence": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "level": {
                          "type": "string",
                          "enum": [
                            "trace",
                            "debug",
                            "info",
                            "warn",
                            "error",
                            "fatal"
                          ],
                          "default": "info"
                        },
                        "message": {
                          "type": "string"
                        },
                        "truncated": {
                          "type": "boolean",
                          "default": false
                        }
                      },
                      "required": [
                        "projectId",
                        "runId",
                        "timestampMs",
                        "sequence",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  },
                  "clientDiagnostics": {
                    "type": "object",
                    "properties": {
                      "capturedAtMs": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "queueDepth": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPoints": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsQueueFull": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsSpoolEviction": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsNonRetryable": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsRetryExhausted": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "droppedPointsNonFinite": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "nonFiniteDroppedByMetric": {
                        "type": "object",
                        "additionalProperties": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        }
                      },
                      "spoolSegments": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "spoolBytes": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1099511627776
                      },
                      "retryAttempts": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "failedFlushAttempts": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000
                      },
                      "systemSamplesCollected": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "systemSamplesSkippedBackpressure": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "logLinesTruncated": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "droppedLogLinesQueueFull": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      },
                      "droppedLogLinesInvalid": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 1000000000,
                        "default": 0
                      }
                    },
                    "required": [
                      "capturedAtMs",
                      "queueDepth",
                      "droppedPoints",
                      "droppedPointsQueueFull",
                      "droppedPointsSpoolEviction",
                      "droppedPointsNonRetryable",
                      "droppedPointsRetryExhausted",
                      "droppedPointsNonFinite",
                      "nonFiniteDroppedByMetric",
                      "spoolSegments",
                      "spoolBytes",
                      "retryAttempts",
                      "failedFlushAttempts"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "lines"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    }
                  },
                  "required": [
                    "accepted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/logs": {
      "post": {
        "operationId": "queryLogs",
        "tags": [
          "logs"
        ],
        "summary": "Query bounded log rows.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "startMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "endMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "minLevel": {
                    "type": "string",
                    "enum": [
                      "trace",
                      "debug",
                      "info",
                      "warn",
                      "error",
                      "fatal"
                    ],
                    "default": "trace"
                  },
                  "text": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "default": 200
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "order": {
                    "type": "string",
                    "enum": [
                      "asc",
                      "desc"
                    ],
                    "default": "desc"
                  },
                  "logsGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "startMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "sequence": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "level": {
                            "type": "string",
                            "enum": [
                              "trace",
                              "debug",
                              "info",
                              "warn",
                              "error",
                              "fatal"
                            ]
                          },
                          "message": {
                            "type": "string"
                          },
                          "truncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "timestampMs",
                          "sequence",
                          "level",
                          "message",
                          "truncated"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 1000
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 1000
                        },
                        "requestedLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "limitClamped": {
                          "type": "boolean"
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "requestedLimit",
                        "limitClamped",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "startMs",
                    "endMs",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/initiate": {
      "post": {
        "operationId": "initiateArtifactUpload",
        "tags": [
          "artifacts"
        ],
        "summary": "Initiate artifact upload.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "artifactType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64
                  },
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[a-zA-Z0-9_.-]+$"
                    },
                    "maxItems": 16
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "anyOf": [
                        {
                          "type": "string",
                          "maxLength": 2048
                        },
                        {
                          "type": "number"
                        },
                        {
                          "type": "boolean"
                        },
                        {
                          "enum": [
                            "null"
                          ],
                          "nullable": true
                        }
                      ]
                    }
                  },
                  "retentionPolicy": {
                    "type": "object",
                    "properties": {
                      "strategy": {
                        "type": "string",
                        "enum": [
                          "keep_last"
                        ]
                      },
                      "keepLast": {
                        "type": "integer",
                        "exclusiveMinimum": true,
                        "minimum": 0,
                        "maximum": 100
                      }
                    },
                    "required": [
                      "strategy",
                      "keepLast"
                    ],
                    "additionalProperties": false
                  },
                  "files": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "sizeBytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 5368709120
                        },
                        "sha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "contentType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        }
                      },
                      "required": [
                        "path",
                        "sizeBytes",
                        "sha256"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 100
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "name",
                  "files"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "artifactId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "uploadId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "manifestHash": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "expiresAtMs": {
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "minimum": 0
                    },
                    "files": {
                      "type": "array",
                      "items": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "sizeBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 5368709120
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "uploadStrategy": {
                                "type": "string",
                                "enum": [
                                  "single"
                                ]
                              },
                              "method": {
                                "type": "string",
                                "enum": [
                                  "PUT"
                                ]
                              },
                              "url": {
                                "type": "string",
                                "format": "uri",
                                "maxLength": 8192
                              },
                              "expiresAtMs": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0
                              },
                              "requiredHeaders": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              }
                            },
                            "required": [
                              "path",
                              "sizeBytes",
                              "sha256",
                              "uploadStrategy",
                              "method",
                              "url",
                              "expiresAtMs",
                              "requiredHeaders"
                            ],
                            "additionalProperties": false
                          },
                          {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "sizeBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 5368709120
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "uploadStrategy": {
                                "type": "string",
                                "enum": [
                                  "multipart"
                                ]
                              },
                              "multipartUploadId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              },
                              "partSizeBytes": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0,
                                "maximum": 16777216
                              },
                              "expiresAtMs": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0
                              },
                              "parts": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "partNumber": {
                                      "type": "integer",
                                      "exclusiveMinimum": true,
                                      "minimum": 0,
                                      "maximum": 320
                                    },
                                    "method": {
                                      "type": "string",
                                      "enum": [
                                        "PUT"
                                      ]
                                    },
                                    "url": {
                                      "type": "string",
                                      "format": "uri",
                                      "maxLength": 8192
                                    },
                                    "expiresAtMs": {
                                      "type": "integer",
                                      "exclusiveMinimum": true,
                                      "minimum": 0
                                    },
                                    "requiredHeaders": {
                                      "type": "object",
                                      "additionalProperties": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      }
                                    },
                                    "offsetBytes": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 5368709120
                                    },
                                    "sizeBytes": {
                                      "type": "integer",
                                      "exclusiveMinimum": true,
                                      "minimum": 0,
                                      "maximum": 16777216
                                    }
                                  },
                                  "required": [
                                    "partNumber",
                                    "method",
                                    "url",
                                    "expiresAtMs",
                                    "requiredHeaders",
                                    "offsetBytes",
                                    "sizeBytes"
                                  ],
                                  "additionalProperties": false
                                },
                                "minItems": 1,
                                "maxItems": 320
                              }
                            },
                            "required": [
                              "path",
                              "sizeBytes",
                              "sha256",
                              "uploadStrategy",
                              "multipartUploadId",
                              "partSizeBytes",
                              "expiresAtMs",
                              "parts"
                            ],
                            "additionalProperties": false
                          }
                        ]
                      },
                      "minItems": 1,
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "artifactId",
                    "uploadId",
                    "name",
                    "manifestHash",
                    "expiresAtMs",
                    "files"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/finalize": {
      "post": {
        "operationId": "finalizeArtifactUpload",
        "tags": [
          "artifacts"
        ],
        "summary": "Finalize artifact upload.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "artifactId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "uploadId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "multipartParts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "path": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "parts": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "partNumber": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0,
                                "maximum": 320
                              },
                              "etag": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              }
                            },
                            "required": [
                              "partNumber",
                              "etag"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 320
                        }
                      },
                      "required": [
                        "path",
                        "parts"
                      ],
                      "additionalProperties": false
                    },
                    "maxItems": 100
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "artifactId",
                  "uploadId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "artifact": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "artifactType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "nullable": true
                        },
                        "aliases": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[a-zA-Z0-9_.-]+$"
                          },
                          "maxItems": 16
                        },
                        "retentionPolicy": {
                          "type": "object",
                          "properties": {
                            "strategy": {
                              "type": "string",
                              "enum": [
                                "keep_last"
                              ]
                            },
                            "keepLast": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "minimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "strategy",
                            "keepLast"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "manifestHash": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "fileCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "totalSizeBytes": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "finalizedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "sizeBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 5368709120
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "contentType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "storageVersionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "path",
                              "sizeBytes",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 100
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2048
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "enum": [
                                  "null"
                                ],
                                "nullable": true
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "artifactId",
                        "projectId",
                        "runId",
                        "name",
                        "artifactType",
                        "aliases",
                        "retentionPolicy",
                        "version",
                        "manifestHash",
                        "fileCount",
                        "totalSizeBytes",
                        "createdAtMs",
                        "finalizedAtMs",
                        "files",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    "deduped": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "artifact",
                    "deduped"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/list": {
      "post": {
        "operationId": "listArtifacts",
        "tags": [
          "artifacts"
        ],
        "summary": "List run artifacts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 25
                  }
                },
                "required": [
                  "projectId",
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "artifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "artifactType": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "nullable": true
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[a-zA-Z0-9_.-]+$"
                            },
                            "maxItems": 16
                          },
                          "retentionPolicy": {
                            "type": "object",
                            "properties": {
                              "strategy": {
                                "type": "string",
                                "enum": [
                                  "keep_last"
                                ]
                              },
                              "keepLast": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0,
                                "maximum": 100
                              }
                            },
                            "required": [
                              "strategy",
                              "keepLast"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          },
                          "manifestHash": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "fileCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "totalSizeBytes": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "finalizedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "artifactId",
                          "projectId",
                          "runId",
                          "name",
                          "artifactType",
                          "aliases",
                          "retentionPolicy",
                          "version",
                          "manifestHash",
                          "fileCount",
                          "totalSizeBytes",
                          "createdAtMs",
                          "finalizedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "artifacts",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/lineage": {
      "post": {
        "operationId": "listArtifactLineage",
        "tags": [
          "artifacts"
        ],
        "summary": "List artifact lineage.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 25
                  }
                },
                "required": [
                  "projectId",
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "produced": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "artifact": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "nullable": true
                              },
                              "aliases": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[a-zA-Z0-9_.-]+$"
                                },
                                "maxItems": 16
                              },
                              "retentionPolicy": {
                                "type": "object",
                                "properties": {
                                  "strategy": {
                                    "type": "string",
                                    "enum": [
                                      "keep_last"
                                    ]
                                  },
                                  "keepLast": {
                                    "type": "integer",
                                    "exclusiveMinimum": true,
                                    "minimum": 0,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "strategy",
                                  "keepLast"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0
                              },
                              "manifestHash": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "fileCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "totalSizeBytes": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAtMs": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "finalizedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "files": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "path": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 512
                                    },
                                    "sizeBytes": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 5368709120
                                    },
                                    "sha256": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "contentType": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "storageVersionId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1024
                                    }
                                  },
                                  "required": [
                                    "path",
                                    "sizeBytes",
                                    "sha256"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 100
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 2048
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "enum": [
                                        "null"
                                      ],
                                      "nullable": true
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "artifactId",
                              "projectId",
                              "runId",
                              "name",
                              "artifactType",
                              "aliases",
                              "retentionPolicy",
                              "version",
                              "manifestHash",
                              "fileCount",
                              "totalSizeBytes",
                              "createdAtMs",
                              "finalizedAtMs",
                              "files",
                              "metadata"
                            ],
                            "additionalProperties": false
                          },
                          "consumers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "artifactId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "producerRunId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "consumerRunId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "createdAtMs": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "projectId",
                                "artifactId",
                                "producerRunId",
                                "consumerRunId",
                                "createdAtMs"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 100
                          },
                          "consumersTruncated": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "artifact",
                          "consumers",
                          "consumersTruncated"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "consumed": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "artifact": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "nullable": true
                              },
                              "aliases": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[a-zA-Z0-9_.-]+$"
                                },
                                "maxItems": 16
                              },
                              "retentionPolicy": {
                                "type": "object",
                                "properties": {
                                  "strategy": {
                                    "type": "string",
                                    "enum": [
                                      "keep_last"
                                    ]
                                  },
                                  "keepLast": {
                                    "type": "integer",
                                    "exclusiveMinimum": true,
                                    "minimum": 0,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "strategy",
                                  "keepLast"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0
                              },
                              "manifestHash": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "fileCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "totalSizeBytes": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAtMs": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "finalizedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "files": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "path": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 512
                                    },
                                    "sizeBytes": {
                                      "type": "integer",
                                      "minimum": 0,
                                      "maximum": 5368709120
                                    },
                                    "sha256": {
                                      "type": "string",
                                      "pattern": "^[a-f0-9]{64}$"
                                    },
                                    "contentType": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "storageVersionId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 1024
                                    }
                                  },
                                  "required": [
                                    "path",
                                    "sizeBytes",
                                    "sha256"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 100
                              },
                              "metadata": {
                                "type": "object",
                                "additionalProperties": {
                                  "anyOf": [
                                    {
                                      "type": "string",
                                      "maxLength": 2048
                                    },
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "boolean"
                                    },
                                    {
                                      "enum": [
                                        "null"
                                      ],
                                      "nullable": true
                                    }
                                  ]
                                }
                              }
                            },
                            "required": [
                              "artifactId",
                              "projectId",
                              "runId",
                              "name",
                              "artifactType",
                              "aliases",
                              "retentionPolicy",
                              "version",
                              "manifestHash",
                              "fileCount",
                              "totalSizeBytes",
                              "createdAtMs",
                              "finalizedAtMs",
                              "files",
                              "metadata"
                            ],
                            "additionalProperties": false
                          },
                          "lineage": {
                            "type": "object",
                            "properties": {
                              "projectId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "producerRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "consumerRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "createdAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "projectId",
                              "artifactId",
                              "producerRunId",
                              "consumerRunId",
                              "createdAtMs"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "artifact",
                          "lineage"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "consumedFromDeletedSources": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "artifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "producerRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "consumerRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "projectId",
                          "artifactId",
                          "producerRunId",
                          "consumerRunId",
                          "createdAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "producedReturned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "consumedReturned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "producedTruncated": {
                          "type": "boolean"
                        },
                        "consumedTruncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "producedReturned",
                        "consumedReturned",
                        "producedTruncated",
                        "consumedTruncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "produced",
                    "consumed",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/project/list": {
      "post": {
        "operationId": "listProjectArtifacts",
        "tags": [
          "artifacts"
        ],
        "summary": "List project artifacts.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 25
                  }
                },
                "required": [
                  "projectId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "artifacts": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "artifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "artifactType": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "nullable": true
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[a-zA-Z0-9_.-]+$"
                            },
                            "maxItems": 16
                          },
                          "retentionPolicy": {
                            "type": "object",
                            "properties": {
                              "strategy": {
                                "type": "string",
                                "enum": [
                                  "keep_last"
                                ]
                              },
                              "keepLast": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0,
                                "maximum": 100
                              }
                            },
                            "required": [
                              "strategy",
                              "keepLast"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "version": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          },
                          "manifestHash": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "fileCount": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "totalSizeBytes": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "finalizedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "files": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "path": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "sizeBytes": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 5368709120
                                },
                                "sha256": {
                                  "type": "string",
                                  "pattern": "^[a-f0-9]{64}$"
                                },
                                "contentType": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "storageVersionId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 1024
                                }
                              },
                              "required": [
                                "path",
                                "sizeBytes",
                                "sha256"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 100
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 2048
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "enum": [
                                    "null"
                                  ],
                                  "nullable": true
                                }
                              ]
                            }
                          }
                        },
                        "required": [
                          "artifactId",
                          "projectId",
                          "runId",
                          "name",
                          "artifactType",
                          "aliases",
                          "retentionPolicy",
                          "version",
                          "manifestHash",
                          "fileCount",
                          "totalSizeBytes",
                          "createdAtMs",
                          "finalizedAtMs",
                          "files",
                          "metadata"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "artifacts",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/get": {
      "post": {
        "operationId": "getArtifact",
        "tags": [
          "artifacts"
        ],
        "summary": "Get artifact detail.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "artifactId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "artifactId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "artifact": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "artifactType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "nullable": true
                        },
                        "aliases": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[a-zA-Z0-9_.-]+$"
                          },
                          "maxItems": 16
                        },
                        "retentionPolicy": {
                          "type": "object",
                          "properties": {
                            "strategy": {
                              "type": "string",
                              "enum": [
                                "keep_last"
                              ]
                            },
                            "keepLast": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "minimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "strategy",
                            "keepLast"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "manifestHash": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "fileCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "totalSizeBytes": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "finalizedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "sizeBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 5368709120
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "contentType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "storageVersionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "path",
                              "sizeBytes",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 100
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2048
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "enum": [
                                  "null"
                                ],
                                "nullable": true
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "artifactId",
                        "projectId",
                        "runId",
                        "name",
                        "artifactType",
                        "aliases",
                        "retentionPolicy",
                        "version",
                        "manifestHash",
                        "fileCount",
                        "totalSizeBytes",
                        "createdAtMs",
                        "finalizedAtMs",
                        "files",
                        "metadata"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "artifact"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/download": {
      "post": {
        "operationId": "downloadArtifactFile",
        "tags": [
          "artifacts"
        ],
        "summary": "Create a scoped artifact download URL.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "artifactId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "path": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "artifactId",
                  "path"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "artifactId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "path": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 512
                    },
                    "method": {
                      "type": "string",
                      "enum": [
                        "GET"
                      ]
                    },
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "maxLength": 8192
                    },
                    "expiresAtMs": {
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "minimum": 0
                    }
                  },
                  "required": [
                    "artifactId",
                    "path",
                    "method",
                    "url",
                    "expiresAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/artifacts/use": {
      "post": {
        "operationId": "useArtifact",
        "tags": [
          "artifacts"
        ],
        "summary": "Record artifact consumption.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "artifactRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "artifactRef"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "artifact": {
                      "type": "object",
                      "properties": {
                        "artifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "artifactType": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "nullable": true
                        },
                        "aliases": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[a-zA-Z0-9_.-]+$"
                          },
                          "maxItems": 16
                        },
                        "retentionPolicy": {
                          "type": "object",
                          "properties": {
                            "strategy": {
                              "type": "string",
                              "enum": [
                                "keep_last"
                              ]
                            },
                            "keepLast": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "minimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "strategy",
                            "keepLast"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "version": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "manifestHash": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "fileCount": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "totalSizeBytes": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "finalizedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "files": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "sizeBytes": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 5368709120
                              },
                              "sha256": {
                                "type": "string",
                                "pattern": "^[a-f0-9]{64}$"
                              },
                              "contentType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "storageVersionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 1024
                              }
                            },
                            "required": [
                              "path",
                              "sizeBytes",
                              "sha256"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 100
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2048
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "enum": [
                                  "null"
                                ],
                                "nullable": true
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "artifactId",
                        "projectId",
                        "runId",
                        "name",
                        "artifactType",
                        "aliases",
                        "retentionPolicy",
                        "version",
                        "manifestHash",
                        "fileCount",
                        "totalSizeBytes",
                        "createdAtMs",
                        "finalizedAtMs",
                        "files",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    "lineage": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "artifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "producerRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "consumerRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "projectId",
                        "artifactId",
                        "producerRunId",
                        "consumerRunId",
                        "createdAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "artifact",
                    "lineage"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/ingest/media": {
      "post": {
        "operationId": "ingestMedia",
        "tags": [
          "media"
        ],
        "summary": "Ingest bounded media manifests.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "items": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "mediaKey": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "mediaType": {
                          "type": "string",
                          "enum": [
                            "image",
                            "table"
                          ]
                        },
                        "step": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "timestampMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "artifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "artifactVersion": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "artifactPath": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "artifactSha256": {
                          "type": "string",
                          "pattern": "^[a-f0-9]{64}$"
                        },
                        "caption": {
                          "type": "string",
                          "maxLength": 512,
                          "nullable": true
                        },
                        "width": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100000,
                          "nullable": true
                        },
                        "height": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100000,
                          "nullable": true
                        },
                        "tableRows": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 10000,
                          "nullable": true
                        },
                        "tableColumns": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 256,
                          "nullable": true
                        },
                        "metadata": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 1024
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "enum": [
                                  "null"
                                ],
                                "nullable": true
                              }
                            ]
                          }
                        }
                      },
                      "required": [
                        "projectId",
                        "runId",
                        "mediaKey",
                        "mediaType",
                        "step",
                        "timestampMs",
                        "artifactId",
                        "artifactVersion",
                        "artifactPath",
                        "artifactSha256",
                        "caption",
                        "width",
                        "height",
                        "tableRows",
                        "tableColumns",
                        "metadata"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 256
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "items"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "accepted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 256
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "accepted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/media": {
      "post": {
        "operationId": "queryMedia",
        "tags": [
          "media"
        ],
        "summary": "Query bounded media manifests.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "mediaKeys": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "minItems": 1,
                    "maxItems": 32
                  },
                  "mediaTypes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "image",
                        "table"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 2
                  },
                  "step": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 256,
                    "default": 64
                  }
                },
                "required": [
                  "projectId",
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "mediaKey": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "mediaType": {
                            "type": "string",
                            "enum": [
                              "image",
                              "table"
                            ]
                          },
                          "step": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "artifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "artifactVersion": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          },
                          "artifactPath": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "artifactSha256": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$"
                          },
                          "caption": {
                            "type": "string",
                            "maxLength": 512,
                            "nullable": true
                          },
                          "width": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "maximum": 100000,
                            "nullable": true
                          },
                          "height": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "maximum": 100000,
                            "nullable": true
                          },
                          "tableRows": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 10000,
                            "nullable": true
                          },
                          "tableColumns": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 256,
                            "nullable": true
                          },
                          "metadata": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 1024
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "enum": [
                                    "null"
                                  ],
                                  "nullable": true
                                }
                              ]
                            }
                          },
                          "rowId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          }
                        },
                        "required": [
                          "projectId",
                          "runId",
                          "mediaKey",
                          "mediaType",
                          "step",
                          "timestampMs",
                          "artifactId",
                          "artifactVersion",
                          "artifactPath",
                          "artifactSha256",
                          "caption",
                          "width",
                          "height",
                          "tableRows",
                          "tableColumns",
                          "metadata",
                          "rowId"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 256
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 256
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 256
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "items",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/ingest/traces": {
      "post": {
        "operationId": "ingestTraces",
        "tags": [
          "traces"
        ],
        "summary": "Ingest bounded native trace spans.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "spans": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "parentSpanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "internal",
                            "server",
                            "client",
                            "producer",
                            "consumer",
                            "tool"
                          ]
                        },
                        "startNs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ]
                        },
                        "endNs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ],
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "unset",
                            "ok",
                            "error"
                          ]
                        },
                        "attrsJson": {
                          "type": "string",
                          "default": "{}"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "timestampNs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$",
                                    "minLength": 1,
                                    "maxLength": 20
                                  }
                                ]
                              },
                              "attrsJson": {
                                "type": "string",
                                "default": "{}"
                              }
                            },
                            "required": [
                              "name",
                              "timestampNs"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 128,
                          "default": []
                        },
                        "model": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "genAiSystem": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "tokensIn": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ],
                          "nullable": true
                        },
                        "tokensOut": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ],
                          "nullable": true
                        },
                        "costUsd": {
                          "type": "number",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "projectId",
                        "runId",
                        "traceId",
                        "spanId",
                        "parentSpanId",
                        "name",
                        "kind",
                        "startNs",
                        "endNs",
                        "status"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  }
                },
                "required": [
                  "spans"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    }
                  },
                  "required": [
                    "accepted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/ingest/otlp/v1/traces": {
      "post": {
        "operationId": "ingestOtlpTraces",
        "tags": [
          "traces"
        ],
        "summary": "Ingest OTLP/HTTP JSON traces.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "additionalProperties": {},
                "description": "OTLP JSON trace export request body."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    },
                    "runIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "maxItems": 64
                    },
                    "autoCreatedRunIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "maxItems": 64
                    }
                  },
                  "required": [
                    "accepted",
                    "runIds",
                    "autoCreatedRunIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false,
        "x-rundial-placeholder-contract": true
      }
    },
    "/api/v1/query/traces": {
      "post": {
        "operationId": "queryTraces",
        "tags": [
          "traces"
        ],
        "summary": "Query bounded trace summaries.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "startMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "endMs": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 50
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "tracesGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "runId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "startMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "endMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "traces": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "spanCount": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "firstStartNs": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d+$",
                                "minLength": 1,
                                "maxLength": 20
                              }
                            ]
                          },
                          "lastEndNs": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d+$",
                                "minLength": 1,
                                "maxLength": 20
                              }
                            ],
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          }
                        },
                        "required": [
                          "projectId",
                          "runId",
                          "traceId",
                          "spanCount",
                          "firstStartNs",
                          "lastEndNs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "startMs",
                    "endMs",
                    "traces",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/traces/tree": {
      "post": {
        "operationId": "queryTraceTree",
        "tags": [
          "traces"
        ],
        "summary": "Query a bounded trace tree page.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "traceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "parentSpanId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "nullable": true
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 2000,
                    "default": 500
                  },
                  "tracesGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "traceId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "traceId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "parentSpanId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "nullable": true
                    },
                    "spans": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "spanId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "parentSpanId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "internal",
                              "server",
                              "client",
                              "producer",
                              "consumer",
                              "tool"
                            ]
                          },
                          "startNs": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d+$",
                                "minLength": 1,
                                "maxLength": 20
                              }
                            ]
                          },
                          "endNs": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d+$",
                                "minLength": 1,
                                "maxLength": 20
                              }
                            ],
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "unset",
                              "ok",
                              "error"
                            ]
                          },
                          "attrsJson": {
                            "type": "string",
                            "default": "{}"
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "timestampNs": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\d+$",
                                      "minLength": 1,
                                      "maxLength": 20
                                    }
                                  ]
                                },
                                "attrsJson": {
                                  "type": "string",
                                  "default": "{}"
                                }
                              },
                              "required": [
                                "name",
                                "timestampNs"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 128,
                            "default": []
                          },
                          "model": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "genAiSystem": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "tokensIn": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d+$",
                                "minLength": 1,
                                "maxLength": 20
                              }
                            ],
                            "nullable": true
                          },
                          "tokensOut": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": 0
                              },
                              {
                                "type": "string",
                                "pattern": "^\\d+$",
                                "minLength": 1,
                                "maxLength": 20
                              }
                            ],
                            "nullable": true
                          },
                          "costUsd": {
                            "type": "number",
                            "minimum": 0,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          }
                        },
                        "required": [
                          "projectId",
                          "runId",
                          "traceId",
                          "spanId",
                          "parentSpanId",
                          "name",
                          "kind",
                          "startNs",
                          "endNs",
                          "status"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 2000
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "truncated": {
                          "type": "boolean"
                        },
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 2000
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2000
                        }
                      },
                      "required": [
                        "truncated",
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "traceId",
                    "parentSpanId",
                    "spans",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/traces/span": {
      "post": {
        "operationId": "queryTraceSpan",
        "tags": [
          "traces"
        ],
        "summary": "Query one trace span detail.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "traceId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "spanId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "tracesGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "runId",
                  "traceId",
                  "spanId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "traceId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "spanId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "span": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "spanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "parentSpanId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "internal",
                            "server",
                            "client",
                            "producer",
                            "consumer",
                            "tool"
                          ]
                        },
                        "startNs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ]
                        },
                        "endNs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ],
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "unset",
                            "ok",
                            "error"
                          ]
                        },
                        "attrsJson": {
                          "type": "string",
                          "default": "{}"
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "timestampNs": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  {
                                    "type": "string",
                                    "pattern": "^\\d+$",
                                    "minLength": 1,
                                    "maxLength": 20
                                  }
                                ]
                              },
                              "attrsJson": {
                                "type": "string",
                                "default": "{}"
                              }
                            },
                            "required": [
                              "name",
                              "timestampNs"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 128,
                          "default": []
                        },
                        "model": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "genAiSystem": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "tokensIn": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ],
                          "nullable": true
                        },
                        "tokensOut": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": 0
                            },
                            {
                              "type": "string",
                              "pattern": "^\\d+$",
                              "minLength": 1,
                              "maxLength": 20
                            }
                          ],
                          "nullable": true
                        },
                        "costUsd": {
                          "type": "number",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "projectId",
                        "runId",
                        "traceId",
                        "spanId",
                        "parentSpanId",
                        "name",
                        "kind",
                        "startNs",
                        "endNs",
                        "status"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "evidenceLinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "rundial.evidence_ref"
                            ]
                          },
                          "artifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "artifactVersion": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "nullable": true
                          },
                          "path": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "sizeBytes": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$",
                            "nullable": true
                          },
                          "contentType": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "GET"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "maxLength": 8192
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          }
                        },
                        "required": [
                          "kind",
                          "artifactId",
                          "path",
                          "method",
                          "url",
                          "expiresAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 64,
                      "default": []
                    }
                  },
                  "required": [
                    "projectId",
                    "runId",
                    "traceId",
                    "spanId",
                    "span"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/suites": {
      "post": {
        "operationId": "createEvalSuite",
        "tags": [
          "evals"
        ],
        "summary": "Create eval suite metadata.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orgId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4096
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "capability",
                      "behavioral",
                      "safety",
                      "regression",
                      "benchmark",
                      "product_quality",
                      "cost_latency",
                      "custom"
                    ],
                    "default": "custom"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "workspace",
                      "project"
                    ],
                    "default": "project"
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "objective": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "dataset": {
                    "type": "object",
                    "properties": {
                      "datasetId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "version": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[a-zA-Z0-9_.:-]+$"
                      },
                      "artifactRef": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      }
                    },
                    "required": [
                      "name",
                      "version",
                      "artifactRef"
                    ],
                    "additionalProperties": false
                  },
                  "scorers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 32
                  },
                  "aggregationPolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "gatePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "targetSchema": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "runner": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "evidencePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "limits": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "reproducibility": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "orgId",
                  "projectId",
                  "name",
                  "dataset",
                  "scorers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "artifactRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "datasetId",
                        "name",
                        "version",
                        "artifactRef",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "dataset",
                    "suite"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/suites/{suiteId}/versions": {
      "post": {
        "operationId": "createEvalSuiteVersion",
        "tags": [
          "evals"
        ],
        "summary": "Create an immutable eval suite version.",
        "parameters": [
          {
            "name": "suiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orgId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "objective": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "datasetRefs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "minItems": 1,
                    "maxItems": 16
                  },
                  "scorerRefs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 32
                  },
                  "aggregationPolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "gatePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "targetSchema": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "runner": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "evidencePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "limits": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "reproducibility": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "deprecated",
                      "archived"
                    ],
                    "default": "active"
                  }
                },
                "required": [
                  "orgId",
                  "projectId",
                  "suiteId",
                  "version",
                  "objective",
                  "datasetRefs",
                  "scorerRefs"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "suiteVersion"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/targets": {
      "post": {
        "operationId": "createEvalTarget",
        "tags": [
          "evals"
        ],
        "summary": "Create eval target metadata.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orgId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "rundial_checkpoint",
                      "rundial_model_version",
                      "external_model",
                      "deployment",
                      "endpoint",
                      "agent",
                      "custom"
                    ],
                    "default": "custom"
                  },
                  "spec": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  },
                  "modelRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "rundial_checkpoint",
                          "rundial_model_version",
                          "external_model",
                          "deployment",
                          "endpoint",
                          "agent",
                          "custom"
                        ]
                      },
                      "runId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "artifactRef": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      "modelVersionId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "externalId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "label"
                    ],
                    "additionalProperties": false
                  },
                  "sourceRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "sourceArtifactId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "fingerprint": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "orgId",
                  "projectId",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/runs": {
      "post": {
        "operationId": "createEvalRun",
        "tags": [
          "evals"
        ],
        "summary": "Create eval run metadata.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "orgId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "baselineEvalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "evalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  }
                },
                "required": [
                  "orgId",
                  "projectId",
                  "suiteId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "evalRun": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "evalRunId",
                        "runId",
                        "suiteId",
                        "datasetId",
                        "datasetVersion",
                        "config",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "evalRun"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/results": {
      "post": {
        "operationId": "ingestEvalResults",
        "tags": [
          "evals"
        ],
        "summary": "Ingest bounded immutable eval observations. SDK eval protocol 2 requires stable observationId; protocol 1 with explicit identity remains accepted. Legacy identity-less retries require explicit migration.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "evalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "rows": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "observationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "replicateId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$",
                          "default": "0"
                        },
                        "revision": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 2147483647,
                          "default": 0
                        },
                        "objective": {
                          "type": "string",
                          "enum": [
                            "maximize",
                            "minimize"
                          ],
                          "default": "maximize"
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "exampleId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "scorer": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "score": {
                          "type": "number"
                        },
                        "passed": {
                          "type": "boolean"
                        },
                        "traceId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "evidenceRef": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "path": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            }
                          },
                          "required": [
                            "artifactId",
                            "path"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "meta": {
                          "type": "object",
                          "additionalProperties": {},
                          "default": {}
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "observationId",
                        "evalRunId",
                        "exampleId",
                        "scorer",
                        "score",
                        "passed"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 1000
                  }
                },
                "required": [
                  "projectId",
                  "evalRunId",
                  "rows"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accepted": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 1000
                    },
                    "rejected": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "index": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 999
                          },
                          "exampleId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "evidenceRef": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "artifactId",
                              "path"
                            ],
                            "additionalProperties": false
                          },
                          "reason": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "index",
                          "reason"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 1000
                    }
                  },
                  "required": [
                    "accepted",
                    "rejected"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/runs/by-run/{runId}": {
      "get": {
        "operationId": "getEvalRunByRunId",
        "tags": [
          "evals"
        ],
        "summary": "Get eval metadata by backing run ID.",
        "parameters": [
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "evalRun": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "evalRunId",
                        "runId",
                        "suiteId",
                        "datasetId",
                        "datasetVersion",
                        "config",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "dataset": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "artifactRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "datasetId",
                        "name",
                        "version",
                        "artifactRef",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "evalRun",
                    "suite",
                    "dataset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/runs/{evalRunId}": {
      "get": {
        "operationId": "getEvalRun",
        "tags": [
          "evals"
        ],
        "summary": "Get eval metadata by eval run ID.",
        "parameters": [
          {
            "name": "evalRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "evalRun": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "evalRunId",
                        "runId",
                        "suiteId",
                        "datasetId",
                        "datasetVersion",
                        "config",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "dataset": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "artifactRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "datasetId",
                        "name",
                        "version",
                        "artifactRef",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "evalRun",
                    "suite",
                    "dataset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/evals/targets/{targetId}": {
      "get": {
        "operationId": "getEvalTarget",
        "tags": [
          "evals"
        ],
        "summary": "Get eval target metadata.",
        "parameters": [
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/suites": {
      "post": {
        "operationId": "listEvalSuites",
        "tags": [
          "evals"
        ],
        "summary": "List bounded eval suites.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "required": [
                  "projectId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "slug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 4096,
                            "nullable": true
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "capability",
                              "behavioral",
                              "safety",
                              "regression",
                              "benchmark",
                              "product_quality",
                              "cost_latency",
                              "custom"
                            ],
                            "default": "custom"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "workspace",
                              "project"
                            ],
                            "default": "project"
                          },
                          "latestVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "scorers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "kind": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "config": {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 1,
                            "maxItems": 32
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "suiteId",
                          "name",
                          "datasetId",
                          "datasetVersion",
                          "scorers",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suites",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/suite-versions": {
      "post": {
        "operationId": "listEvalSuiteVersions",
        "tags": [
          "evals"
        ],
        "summary": "List bounded eval suite versions.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "deprecated",
                      "archived"
                    ]
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "required": [
                  "projectId",
                  "suiteId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suiteId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suiteVersions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "version": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "objective": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096
                          },
                          "datasetRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "maxItems": 16
                          },
                          "scorerRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "kind": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "config": {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 1,
                            "maxItems": 32
                          },
                          "aggregationPolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "gatePolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "targetSchema": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "runner": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "evidencePolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "limits": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "reproducibility": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "deprecated",
                              "archived"
                            ]
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "suiteId",
                          "suiteVersionId",
                          "version",
                          "objective",
                          "datasetRefs",
                          "scorerRefs",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suiteId",
                    "suiteVersions",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/targets": {
      "post": {
        "operationId": "listEvalTargets",
        "tags": [
          "evals"
        ],
        "summary": "List bounded eval targets.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "rundial_checkpoint",
                      "rundial_model_version",
                      "external_model",
                      "deployment",
                      "endpoint",
                      "agent",
                      "custom"
                    ]
                  },
                  "sourceRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "sourceArtifactId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "required": [
                  "projectId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "rundial_checkpoint",
                              "rundial_model_version",
                              "external_model",
                              "deployment",
                              "endpoint",
                              "agent",
                              "custom"
                            ]
                          },
                          "spec": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "modelRef": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "rundial_checkpoint",
                                  "rundial_model_version",
                                  "external_model",
                                  "deployment",
                                  "endpoint",
                                  "agent",
                                  "custom"
                                ]
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "modelVersionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "externalId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              }
                            },
                            "required": [
                              "kind",
                              "label"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "sourceRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "sourceArtifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "fingerprint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "archivedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "targetId",
                          "name",
                          "kind",
                          "spec",
                          "fingerprint",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "targets",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/runs": {
      "post": {
        "operationId": "listEvalRuns",
        "tags": [
          "evals"
        ],
        "summary": "List bounded eval runs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "targetModelRef": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 512
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 100,
                    "default": 50
                  }
                },
                "required": [
                  "projectId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suiteId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "nullable": true
                    },
                    "evalRuns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "baselineEvalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "config": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "scoreSummary": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "scorerId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "scorerName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "displayName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "scoreKind": {
                                  "type": "string",
                                  "enum": [
                                    "accuracy",
                                    "pass_rate",
                                    "exact_match",
                                    "f1",
                                    "precision",
                                    "recall",
                                    "numeric",
                                    "judge_score",
                                    "categorical",
                                    "severity",
                                    "cost",
                                    "latency",
                                    "throughput",
                                    "perplexity",
                                    "time_horizon",
                                    "label_distribution",
                                    "custom"
                                  ]
                                },
                                "value": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "valueLabel": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "ratio",
                                    "percent",
                                    "count",
                                    "ms",
                                    "seconds",
                                    "tokens",
                                    "usd",
                                    "severity",
                                    "label",
                                    "custom"
                                  ]
                                },
                                "aggregation": {
                                  "type": "string",
                                  "enum": [
                                    "mean",
                                    "weighted_mean",
                                    "micro_average",
                                    "macro_average",
                                    "median",
                                    "p50",
                                    "p90",
                                    "p95",
                                    "p99",
                                    "sum",
                                    "min",
                                    "max",
                                    "count",
                                    "pass_rate",
                                    "worst_severity",
                                    "custom"
                                  ]
                                },
                                "higherIsBetter": {
                                  "type": "boolean"
                                },
                                "objective": {
                                  "type": "string",
                                  "enum": [
                                    "maximize",
                                    "minimize",
                                    "meet_threshold",
                                    "informational"
                                  ]
                                },
                                "threshold": {
                                  "type": "object",
                                  "properties": {
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        ">=",
                                        ">",
                                        "<=",
                                        "<",
                                        "==",
                                        "!="
                                      ]
                                    },
                                    "value": {
                                      "type": "number"
                                    },
                                    "unit": {
                                      "type": "string",
                                      "enum": [
                                        "ratio",
                                        "percent",
                                        "count",
                                        "ms",
                                        "seconds",
                                        "tokens",
                                        "usd",
                                        "severity",
                                        "label",
                                        "custom"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "suite",
                                        "project_gate",
                                        "workspace_policy",
                                        "release_gate"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "op",
                                    "value",
                                    "unit",
                                    "source"
                                  ],
                                  "additionalProperties": false
                                },
                                "passed": {
                                  "type": "boolean",
                                  "nullable": true
                                },
                                "baselineDelta": {
                                  "type": "object",
                                  "properties": {
                                    "baselineEvalRunId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineTargetId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineValue": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "absolute": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "relativePct": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "improvement",
                                        "regression",
                                        "tie",
                                        "tradeoff",
                                        "unknown"
                                      ]
                                    },
                                    "significant": {
                                      "type": "boolean",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "baselineEvalRunId",
                                    "baselineTargetId",
                                    "baselineValue",
                                    "absolute",
                                    "relativePct",
                                    "direction",
                                    "significant"
                                  ],
                                  "additionalProperties": false
                                },
                                "severity": {
                                  "type": "object",
                                  "properties": {
                                    "band": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "worstBand": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "countsByBand": {
                                      "type": "object",
                                      "properties": {
                                        "none": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "low": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "medium": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "high": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "critical": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      },
                                      "required": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "band",
                                    "worstBand",
                                    "countsByBand"
                                  ],
                                  "additionalProperties": false
                                },
                                "evidence": {
                                  "type": "object",
                                  "properties": {
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "scoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "unscoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "passCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "failCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "traceCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "evidenceRefCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "sampleCount",
                                    "scoredCount",
                                    "unscoredCount",
                                    "traceCount",
                                    "evidenceRefCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "uncertainty": {
                                  "type": "object",
                                  "properties": {
                                    "stderr": {
                                      "type": "number"
                                    },
                                    "ciLow": {
                                      "type": "number"
                                    },
                                    "ciHigh": {
                                      "type": "number"
                                    },
                                    "method": {
                                      "type": "string",
                                      "enum": [
                                        "stderr",
                                        "bootstrap",
                                        "binomial",
                                        "custom"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "breakdowns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "dimension": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      },
                                      "value": {
                                        "type": "number",
                                        "nullable": true
                                      },
                                      "sampleCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "dimension",
                                      "key",
                                      "value",
                                      "sampleCount"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32,
                                  "default": []
                                }
                              },
                              "required": [
                                "scorerId",
                                "scorerName",
                                "displayName",
                                "scoreKind",
                                "value",
                                "unit",
                                "aggregation",
                                "higherIsBetter",
                                "objective",
                                "passed",
                                "evidence"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 64,
                            "default": []
                          },
                          "gateSummary": {
                            "type": "object",
                            "properties": {
                              "gateId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "warning",
                                  "not_evaluated"
                                ]
                              },
                              "blocking": {
                                "type": "boolean"
                              },
                              "failedScorers": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "maxItems": 64
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "maxItems": 32
                              },
                              "baselineEvalRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "evaluatedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "gateId",
                              "status",
                              "blocking",
                              "failedScorers",
                              "warnings",
                              "evaluatedAtMs"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "evalRunId",
                          "runId",
                          "suiteId",
                          "datasetId",
                          "datasetVersion",
                          "config",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suiteId",
                    "evalRuns",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/scorecard": {
      "post": {
        "operationId": "queryEvalScorecard",
        "tags": [
          "evals"
        ],
        "summary": "Query bounded eval scorecard.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "evalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "evalsGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "evalRunId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "evalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "scorers": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "count": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "meanScore": {
                            "type": "number",
                            "nullable": true
                          },
                          "passRate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "nullable": true
                          },
                          "histogram": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "minScore": {
                                  "type": "number"
                                },
                                "maxScore": {
                                  "type": "number"
                                },
                                "count": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "minScore",
                                "maxScore",
                                "count"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 20
                          }
                        },
                        "required": [
                          "scorer",
                          "count",
                          "meanScore",
                          "passRate",
                          "histogram"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 64
                    },
                    "scoreSummary": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "scorerId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "scorerName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "displayName": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scoreKind": {
                            "type": "string",
                            "enum": [
                              "accuracy",
                              "pass_rate",
                              "exact_match",
                              "f1",
                              "precision",
                              "recall",
                              "numeric",
                              "judge_score",
                              "categorical",
                              "severity",
                              "cost",
                              "latency",
                              "throughput",
                              "perplexity",
                              "time_horizon",
                              "label_distribution",
                              "custom"
                            ]
                          },
                          "value": {
                            "type": "number",
                            "nullable": true
                          },
                          "valueLabel": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "ratio",
                              "percent",
                              "count",
                              "ms",
                              "seconds",
                              "tokens",
                              "usd",
                              "severity",
                              "label",
                              "custom"
                            ]
                          },
                          "aggregation": {
                            "type": "string",
                            "enum": [
                              "mean",
                              "weighted_mean",
                              "micro_average",
                              "macro_average",
                              "median",
                              "p50",
                              "p90",
                              "p95",
                              "p99",
                              "sum",
                              "min",
                              "max",
                              "count",
                              "pass_rate",
                              "worst_severity",
                              "custom"
                            ]
                          },
                          "higherIsBetter": {
                            "type": "boolean"
                          },
                          "objective": {
                            "type": "string",
                            "enum": [
                              "maximize",
                              "minimize",
                              "meet_threshold",
                              "informational"
                            ]
                          },
                          "threshold": {
                            "type": "object",
                            "properties": {
                              "op": {
                                "type": "string",
                                "enum": [
                                  ">=",
                                  ">",
                                  "<=",
                                  "<",
                                  "==",
                                  "!="
                                ]
                              },
                              "value": {
                                "type": "number"
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "source": {
                                "type": "string",
                                "enum": [
                                  "suite",
                                  "project_gate",
                                  "workspace_policy",
                                  "release_gate"
                                ]
                              }
                            },
                            "required": [
                              "op",
                              "value",
                              "unit",
                              "source"
                            ],
                            "additionalProperties": false
                          },
                          "passed": {
                            "type": "boolean",
                            "nullable": true
                          },
                          "baselineDelta": {
                            "type": "object",
                            "properties": {
                              "baselineEvalRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "baselineTargetId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "baselineValue": {
                                "type": "number",
                                "nullable": true
                              },
                              "absolute": {
                                "type": "number",
                                "nullable": true
                              },
                              "relativePct": {
                                "type": "number",
                                "nullable": true
                              },
                              "direction": {
                                "type": "string",
                                "enum": [
                                  "improvement",
                                  "regression",
                                  "tie",
                                  "tradeoff",
                                  "unknown"
                                ]
                              },
                              "significant": {
                                "type": "boolean",
                                "nullable": true
                              }
                            },
                            "required": [
                              "baselineEvalRunId",
                              "baselineTargetId",
                              "baselineValue",
                              "absolute",
                              "relativePct",
                              "direction",
                              "significant"
                            ],
                            "additionalProperties": false
                          },
                          "severity": {
                            "type": "object",
                            "properties": {
                              "band": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "low",
                                  "medium",
                                  "high",
                                  "critical"
                                ]
                              },
                              "worstBand": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "low",
                                  "medium",
                                  "high",
                                  "critical"
                                ]
                              },
                              "countsByBand": {
                                "type": "object",
                                "properties": {
                                  "none": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "low": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "medium": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "high": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "critical": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "none",
                                  "low",
                                  "medium",
                                  "high",
                                  "critical"
                                ],
                                "additionalProperties": false
                              }
                            },
                            "required": [
                              "band",
                              "worstBand",
                              "countsByBand"
                            ],
                            "additionalProperties": false
                          },
                          "evidence": {
                            "type": "object",
                            "properties": {
                              "sampleCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "scoredCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "unscoredCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "passCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "failCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "traceCount": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "evidenceRefCount": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "sampleCount",
                              "scoredCount",
                              "unscoredCount",
                              "traceCount",
                              "evidenceRefCount"
                            ],
                            "additionalProperties": false
                          },
                          "uncertainty": {
                            "type": "object",
                            "properties": {
                              "stderr": {
                                "type": "number"
                              },
                              "ciLow": {
                                "type": "number"
                              },
                              "ciHigh": {
                                "type": "number"
                              },
                              "method": {
                                "type": "string",
                                "enum": [
                                  "stderr",
                                  "bootstrap",
                                  "binomial",
                                  "custom"
                                ]
                              }
                            },
                            "additionalProperties": false
                          },
                          "breakdowns": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "dimension": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "key": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "value": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "sampleCount": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "dimension",
                                "key",
                                "value",
                                "sampleCount"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 32,
                            "default": []
                          }
                        },
                        "required": [
                          "scorerId",
                          "scorerName",
                          "displayName",
                          "scoreKind",
                          "value",
                          "unit",
                          "aggregation",
                          "higherIsBetter",
                          "objective",
                          "passed",
                          "evidence"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 64,
                      "default": []
                    },
                    "gateSummary": {
                      "type": "object",
                      "properties": {
                        "gateId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "passed",
                            "failed",
                            "warning",
                            "not_evaluated"
                          ]
                        },
                        "blocking": {
                          "type": "boolean"
                        },
                        "failedScorers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "maxItems": 64
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "maxItems": 32
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evaluatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "gateId",
                        "status",
                        "blocking",
                        "failedScorers",
                        "warnings",
                        "evaluatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "projectId",
                    "evalRunId",
                    "scorers"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/drilldown": {
      "post": {
        "operationId": "queryEvalDrilldown",
        "tags": [
          "evals"
        ],
        "summary": "Query bounded eval drilldown rows.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "evalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scorer": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "passed": {
                    "type": "boolean"
                  },
                  "minScore": {
                    "type": "number"
                  },
                  "maxScore": {
                    "type": "number"
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 200,
                    "default": 100
                  },
                  "evalsGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "evalRunId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "evalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "observationId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "replicateId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 2147483647
                          },
                          "objective": {
                            "type": "string",
                            "enum": [
                              "maximize",
                              "minimize"
                            ]
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "exampleId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "score": {
                            "type": "number"
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "evidenceRef": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "artifactId",
                              "path"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "meta": {
                            "type": "object",
                            "additionalProperties": {},
                            "default": {}
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "evalRunId",
                          "exampleId",
                          "scorer",
                          "score",
                          "passed",
                          "projectId",
                          "timestampMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 200
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8192,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "evalRunId",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/query/evals/diff": {
      "post": {
        "operationId": "queryEvalDiff",
        "tags": [
          "evals"
        ],
        "summary": "Query bounded eval run diff.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "baselineEvalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "candidateEvalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scorer": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 200,
                    "default": 100
                  },
                  "evalsGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "baselineEvalRunId",
                  "candidateEvalRunId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalRows": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "totalRegressions": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "snapshotAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "baselineEvalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "candidateEvalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "exampleId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetId": {
                            "type": "string",
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "maxLength": 128
                          },
                          "replicateId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "paired",
                              "added",
                              "removed"
                            ]
                          },
                          "objective": {
                            "type": "string",
                            "enum": [
                              "maximize",
                              "minimize"
                            ]
                          },
                          "baselineScore": {
                            "type": "number",
                            "nullable": true
                          },
                          "candidateScore": {
                            "type": "number",
                            "nullable": true
                          },
                          "delta": {
                            "type": "number",
                            "nullable": true
                          },
                          "baselinePassed": {
                            "type": "boolean",
                            "nullable": true
                          },
                          "candidatePassed": {
                            "type": "boolean",
                            "nullable": true
                          },
                          "regressed": {
                            "type": "boolean"
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "evidenceRef": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "artifactId",
                              "path"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "baselineCreatedBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "candidateCreatedBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          }
                        },
                        "required": [
                          "exampleId",
                          "scorer",
                          "baselineScore",
                          "candidateScore",
                          "delta",
                          "baselinePassed",
                          "candidatePassed",
                          "regressed"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 200
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8192,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "baselineEvalRunId",
                    "candidateEvalRunId",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/overview": {
      "get": {
        "operationId": "getProjectEvalOverview",
        "tags": [
          "evals"
        ],
        "summary": "Get bounded project eval overview.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "slug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 4096,
                            "nullable": true
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "capability",
                              "behavioral",
                              "safety",
                              "regression",
                              "benchmark",
                              "product_quality",
                              "cost_latency",
                              "custom"
                            ],
                            "default": "custom"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "workspace",
                              "project"
                            ],
                            "default": "project"
                          },
                          "latestVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "scorers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "kind": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "config": {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 1,
                            "maxItems": 32
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "suiteId",
                          "name",
                          "datasetId",
                          "datasetVersion",
                          "scorers",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "recentEvalRuns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "baselineEvalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "config": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "scoreSummary": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "scorerId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "scorerName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "displayName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "scoreKind": {
                                  "type": "string",
                                  "enum": [
                                    "accuracy",
                                    "pass_rate",
                                    "exact_match",
                                    "f1",
                                    "precision",
                                    "recall",
                                    "numeric",
                                    "judge_score",
                                    "categorical",
                                    "severity",
                                    "cost",
                                    "latency",
                                    "throughput",
                                    "perplexity",
                                    "time_horizon",
                                    "label_distribution",
                                    "custom"
                                  ]
                                },
                                "value": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "valueLabel": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "ratio",
                                    "percent",
                                    "count",
                                    "ms",
                                    "seconds",
                                    "tokens",
                                    "usd",
                                    "severity",
                                    "label",
                                    "custom"
                                  ]
                                },
                                "aggregation": {
                                  "type": "string",
                                  "enum": [
                                    "mean",
                                    "weighted_mean",
                                    "micro_average",
                                    "macro_average",
                                    "median",
                                    "p50",
                                    "p90",
                                    "p95",
                                    "p99",
                                    "sum",
                                    "min",
                                    "max",
                                    "count",
                                    "pass_rate",
                                    "worst_severity",
                                    "custom"
                                  ]
                                },
                                "higherIsBetter": {
                                  "type": "boolean"
                                },
                                "objective": {
                                  "type": "string",
                                  "enum": [
                                    "maximize",
                                    "minimize",
                                    "meet_threshold",
                                    "informational"
                                  ]
                                },
                                "threshold": {
                                  "type": "object",
                                  "properties": {
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        ">=",
                                        ">",
                                        "<=",
                                        "<",
                                        "==",
                                        "!="
                                      ]
                                    },
                                    "value": {
                                      "type": "number"
                                    },
                                    "unit": {
                                      "type": "string",
                                      "enum": [
                                        "ratio",
                                        "percent",
                                        "count",
                                        "ms",
                                        "seconds",
                                        "tokens",
                                        "usd",
                                        "severity",
                                        "label",
                                        "custom"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "suite",
                                        "project_gate",
                                        "workspace_policy",
                                        "release_gate"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "op",
                                    "value",
                                    "unit",
                                    "source"
                                  ],
                                  "additionalProperties": false
                                },
                                "passed": {
                                  "type": "boolean",
                                  "nullable": true
                                },
                                "baselineDelta": {
                                  "type": "object",
                                  "properties": {
                                    "baselineEvalRunId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineTargetId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineValue": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "absolute": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "relativePct": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "improvement",
                                        "regression",
                                        "tie",
                                        "tradeoff",
                                        "unknown"
                                      ]
                                    },
                                    "significant": {
                                      "type": "boolean",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "baselineEvalRunId",
                                    "baselineTargetId",
                                    "baselineValue",
                                    "absolute",
                                    "relativePct",
                                    "direction",
                                    "significant"
                                  ],
                                  "additionalProperties": false
                                },
                                "severity": {
                                  "type": "object",
                                  "properties": {
                                    "band": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "worstBand": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "countsByBand": {
                                      "type": "object",
                                      "properties": {
                                        "none": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "low": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "medium": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "high": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "critical": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      },
                                      "required": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "band",
                                    "worstBand",
                                    "countsByBand"
                                  ],
                                  "additionalProperties": false
                                },
                                "evidence": {
                                  "type": "object",
                                  "properties": {
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "scoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "unscoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "passCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "failCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "traceCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "evidenceRefCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "sampleCount",
                                    "scoredCount",
                                    "unscoredCount",
                                    "traceCount",
                                    "evidenceRefCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "uncertainty": {
                                  "type": "object",
                                  "properties": {
                                    "stderr": {
                                      "type": "number"
                                    },
                                    "ciLow": {
                                      "type": "number"
                                    },
                                    "ciHigh": {
                                      "type": "number"
                                    },
                                    "method": {
                                      "type": "string",
                                      "enum": [
                                        "stderr",
                                        "bootstrap",
                                        "binomial",
                                        "custom"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "breakdowns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "dimension": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      },
                                      "value": {
                                        "type": "number",
                                        "nullable": true
                                      },
                                      "sampleCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "dimension",
                                      "key",
                                      "value",
                                      "sampleCount"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32,
                                  "default": []
                                }
                              },
                              "required": [
                                "scorerId",
                                "scorerName",
                                "displayName",
                                "scoreKind",
                                "value",
                                "unit",
                                "aggregation",
                                "higherIsBetter",
                                "objective",
                                "passed",
                                "evidence"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 64,
                            "default": []
                          },
                          "gateSummary": {
                            "type": "object",
                            "properties": {
                              "gateId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "warning",
                                  "not_evaluated"
                                ]
                              },
                              "blocking": {
                                "type": "boolean"
                              },
                              "failedScorers": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "maxItems": 64
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "maxItems": 32
                              },
                              "baselineEvalRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "evaluatedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "gateId",
                              "status",
                              "blocking",
                              "failedScorers",
                              "warnings",
                              "evaluatedAtMs"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "evalRunId",
                          "runId",
                          "suiteId",
                          "datasetId",
                          "datasetVersion",
                          "config",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "rundial_checkpoint",
                              "rundial_model_version",
                              "external_model",
                              "deployment",
                              "endpoint",
                              "agent",
                              "custom"
                            ]
                          },
                          "spec": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "modelRef": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "rundial_checkpoint",
                                  "rundial_model_version",
                                  "external_model",
                                  "deployment",
                                  "endpoint",
                                  "agent",
                                  "custom"
                                ]
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "modelVersionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "externalId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              }
                            },
                            "required": [
                              "kind",
                              "label"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "sourceRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "sourceArtifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "fingerprint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "archivedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "targetId",
                          "name",
                          "kind",
                          "spec",
                          "fingerprint",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "gates": {
                      "type": "object",
                      "properties": {
                        "passed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "failed": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "warning": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "notEvaluated": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "passed",
                        "failed",
                        "warning",
                        "notEvaluated"
                      ],
                      "additionalProperties": false
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "limit"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suites",
                    "recentEvalRuns",
                    "targets",
                    "gates",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/suites": {
      "post": {
        "operationId": "createProjectEvalSuite",
        "tags": [
          "evals"
        ],
        "summary": "Create a project eval suite and initial immutable version.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "slug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 4096
                  },
                  "category": {
                    "type": "string",
                    "enum": [
                      "capability",
                      "behavioral",
                      "safety",
                      "regression",
                      "benchmark",
                      "product_quality",
                      "cost_latency",
                      "custom"
                    ],
                    "default": "custom"
                  },
                  "visibility": {
                    "type": "string",
                    "enum": [
                      "workspace",
                      "project"
                    ],
                    "default": "project"
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "objective": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "dataset": {
                    "type": "object",
                    "properties": {
                      "datasetId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "version": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128,
                        "pattern": "^[a-zA-Z0-9_.:-]+$"
                      },
                      "artifactRef": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      }
                    },
                    "required": [
                      "name",
                      "version",
                      "artifactRef"
                    ],
                    "additionalProperties": false
                  },
                  "scorers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 32
                  },
                  "aggregationPolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "gatePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "targetSchema": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "runner": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "evidencePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "limits": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "reproducibility": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "name",
                  "dataset",
                  "scorers"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "dataset": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "artifactRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "datasetId",
                        "name",
                        "version",
                        "artifactRef",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "dataset",
                    "suite"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listProjectEvalSuites",
        "tags": [
          "evals"
        ],
        "summary": "List bounded project eval suites.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suites": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "slug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                            "nullable": true
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "description": {
                            "type": "string",
                            "maxLength": 4096,
                            "nullable": true
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "capability",
                              "behavioral",
                              "safety",
                              "regression",
                              "benchmark",
                              "product_quality",
                              "cost_latency",
                              "custom"
                            ],
                            "default": "custom"
                          },
                          "visibility": {
                            "type": "string",
                            "enum": [
                              "workspace",
                              "project"
                            ],
                            "default": "project"
                          },
                          "latestVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "scorers": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "kind": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "config": {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 1,
                            "maxItems": 32
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "suiteId",
                          "name",
                          "datasetId",
                          "datasetVersion",
                          "scorers",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suites",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/suites/{suiteId}/versions": {
      "post": {
        "operationId": "createProjectEvalSuiteVersion",
        "tags": [
          "evals"
        ],
        "summary": "Create an immutable version for a project eval suite.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "suiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "version": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "objective": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 4096
                  },
                  "datasetRefs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": {}
                    },
                    "minItems": 1,
                    "maxItems": 16
                  },
                  "scorerRefs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    },
                    "minItems": 1,
                    "maxItems": 32
                  },
                  "aggregationPolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "gatePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "targetSchema": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "runner": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "evidencePolicy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "limits": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "reproducibility": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "draft",
                      "active",
                      "deprecated",
                      "archived"
                    ],
                    "default": "active"
                  }
                },
                "required": [
                  "version",
                  "objective",
                  "datasetRefs",
                  "scorerRefs"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "suiteVersion"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listProjectEvalSuiteVersions",
        "tags": [
          "evals"
        ],
        "summary": "List bounded versions for a project eval suite.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "suiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suiteId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suiteVersions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "version": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "objective": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096
                          },
                          "datasetRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "maxItems": 16
                          },
                          "scorerRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "kind": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "config": {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 1,
                            "maxItems": 32
                          },
                          "aggregationPolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "gatePolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "targetSchema": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "runner": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "evidencePolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "limits": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "reproducibility": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "deprecated",
                              "archived"
                            ]
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "suiteId",
                          "suiteVersionId",
                          "version",
                          "objective",
                          "datasetRefs",
                          "scorerRefs",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suiteId",
                    "suiteVersions",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/suites/{suiteId}": {
      "get": {
        "operationId": "getProjectEvalSuite",
        "tags": [
          "evals"
        ],
        "summary": "Get one project eval suite and bounded versions.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "suiteId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "suiteVersions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "version": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "objective": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 4096
                          },
                          "datasetRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "additionalProperties": {}
                            },
                            "maxItems": 16
                          },
                          "scorerRefs": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "kind": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "config": {
                                  "type": "object",
                                  "additionalProperties": {}
                                }
                              },
                              "required": [
                                "name"
                              ],
                              "additionalProperties": false
                            },
                            "minItems": 1,
                            "maxItems": 32
                          },
                          "aggregationPolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "gatePolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "targetSchema": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "runner": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "evidencePolicy": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "limits": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "reproducibility": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "draft",
                              "active",
                              "deprecated",
                              "archived"
                            ]
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "suiteId",
                          "suiteVersionId",
                          "version",
                          "objective",
                          "datasetRefs",
                          "scorerRefs",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suite",
                    "suiteVersions",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/targets": {
      "post": {
        "operationId": "createProjectEvalTarget",
        "tags": [
          "evals"
        ],
        "summary": "Create a versioned project eval target.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "kind": {
                    "type": "string",
                    "enum": [
                      "rundial_checkpoint",
                      "rundial_model_version",
                      "external_model",
                      "deployment",
                      "endpoint",
                      "agent",
                      "custom"
                    ],
                    "default": "custom"
                  },
                  "spec": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  },
                  "modelRef": {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "enum": [
                          "rundial_checkpoint",
                          "rundial_model_version",
                          "external_model",
                          "deployment",
                          "endpoint",
                          "agent",
                          "custom"
                        ]
                      },
                      "runId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "artifactRef": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      "modelVersionId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "externalId": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 256
                      }
                    },
                    "required": [
                      "kind",
                      "label"
                    ],
                    "additionalProperties": false
                  },
                  "sourceRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "sourceArtifactId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "fingerprint": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listProjectEvalTargets",
        "tags": [
          "evals"
        ],
        "summary": "List bounded project eval targets.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "targets": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "rundial_checkpoint",
                              "rundial_model_version",
                              "external_model",
                              "deployment",
                              "endpoint",
                              "agent",
                              "custom"
                            ]
                          },
                          "spec": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "modelRef": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "rundial_checkpoint",
                                  "rundial_model_version",
                                  "external_model",
                                  "deployment",
                                  "endpoint",
                                  "agent",
                                  "custom"
                                ]
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactRef": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "modelVersionId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "externalId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              }
                            },
                            "required": [
                              "kind",
                              "label"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "sourceRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "sourceArtifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "fingerprint": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "archivedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "targetId",
                          "name",
                          "kind",
                          "spec",
                          "fingerprint",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "targets",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/targets/{targetId}": {
      "get": {
        "operationId": "getProjectEvalTarget",
        "tags": [
          "evals"
        ],
        "summary": "Get one project eval target.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "targetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "target"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/runs": {
      "get": {
        "operationId": "listProjectEvalRuns",
        "tags": [
          "evals"
        ],
        "summary": "List bounded project eval runs.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "suiteId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "nullable": true
                    },
                    "evalRuns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "baselineEvalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "config": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "scoreSummary": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "scorerId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "scorerName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "displayName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "scoreKind": {
                                  "type": "string",
                                  "enum": [
                                    "accuracy",
                                    "pass_rate",
                                    "exact_match",
                                    "f1",
                                    "precision",
                                    "recall",
                                    "numeric",
                                    "judge_score",
                                    "categorical",
                                    "severity",
                                    "cost",
                                    "latency",
                                    "throughput",
                                    "perplexity",
                                    "time_horizon",
                                    "label_distribution",
                                    "custom"
                                  ]
                                },
                                "value": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "valueLabel": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "ratio",
                                    "percent",
                                    "count",
                                    "ms",
                                    "seconds",
                                    "tokens",
                                    "usd",
                                    "severity",
                                    "label",
                                    "custom"
                                  ]
                                },
                                "aggregation": {
                                  "type": "string",
                                  "enum": [
                                    "mean",
                                    "weighted_mean",
                                    "micro_average",
                                    "macro_average",
                                    "median",
                                    "p50",
                                    "p90",
                                    "p95",
                                    "p99",
                                    "sum",
                                    "min",
                                    "max",
                                    "count",
                                    "pass_rate",
                                    "worst_severity",
                                    "custom"
                                  ]
                                },
                                "higherIsBetter": {
                                  "type": "boolean"
                                },
                                "objective": {
                                  "type": "string",
                                  "enum": [
                                    "maximize",
                                    "minimize",
                                    "meet_threshold",
                                    "informational"
                                  ]
                                },
                                "threshold": {
                                  "type": "object",
                                  "properties": {
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        ">=",
                                        ">",
                                        "<=",
                                        "<",
                                        "==",
                                        "!="
                                      ]
                                    },
                                    "value": {
                                      "type": "number"
                                    },
                                    "unit": {
                                      "type": "string",
                                      "enum": [
                                        "ratio",
                                        "percent",
                                        "count",
                                        "ms",
                                        "seconds",
                                        "tokens",
                                        "usd",
                                        "severity",
                                        "label",
                                        "custom"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "suite",
                                        "project_gate",
                                        "workspace_policy",
                                        "release_gate"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "op",
                                    "value",
                                    "unit",
                                    "source"
                                  ],
                                  "additionalProperties": false
                                },
                                "passed": {
                                  "type": "boolean",
                                  "nullable": true
                                },
                                "baselineDelta": {
                                  "type": "object",
                                  "properties": {
                                    "baselineEvalRunId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineTargetId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineValue": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "absolute": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "relativePct": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "improvement",
                                        "regression",
                                        "tie",
                                        "tradeoff",
                                        "unknown"
                                      ]
                                    },
                                    "significant": {
                                      "type": "boolean",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "baselineEvalRunId",
                                    "baselineTargetId",
                                    "baselineValue",
                                    "absolute",
                                    "relativePct",
                                    "direction",
                                    "significant"
                                  ],
                                  "additionalProperties": false
                                },
                                "severity": {
                                  "type": "object",
                                  "properties": {
                                    "band": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "worstBand": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "countsByBand": {
                                      "type": "object",
                                      "properties": {
                                        "none": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "low": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "medium": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "high": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "critical": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      },
                                      "required": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "band",
                                    "worstBand",
                                    "countsByBand"
                                  ],
                                  "additionalProperties": false
                                },
                                "evidence": {
                                  "type": "object",
                                  "properties": {
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "scoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "unscoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "passCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "failCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "traceCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "evidenceRefCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "sampleCount",
                                    "scoredCount",
                                    "unscoredCount",
                                    "traceCount",
                                    "evidenceRefCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "uncertainty": {
                                  "type": "object",
                                  "properties": {
                                    "stderr": {
                                      "type": "number"
                                    },
                                    "ciLow": {
                                      "type": "number"
                                    },
                                    "ciHigh": {
                                      "type": "number"
                                    },
                                    "method": {
                                      "type": "string",
                                      "enum": [
                                        "stderr",
                                        "bootstrap",
                                        "binomial",
                                        "custom"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "breakdowns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "dimension": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      },
                                      "value": {
                                        "type": "number",
                                        "nullable": true
                                      },
                                      "sampleCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "dimension",
                                      "key",
                                      "value",
                                      "sampleCount"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32,
                                  "default": []
                                }
                              },
                              "required": [
                                "scorerId",
                                "scorerName",
                                "displayName",
                                "scoreKind",
                                "value",
                                "unit",
                                "aggregation",
                                "higherIsBetter",
                                "objective",
                                "passed",
                                "evidence"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 64,
                            "default": []
                          },
                          "gateSummary": {
                            "type": "object",
                            "properties": {
                              "gateId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "warning",
                                  "not_evaluated"
                                ]
                              },
                              "blocking": {
                                "type": "boolean"
                              },
                              "failedScorers": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "maxItems": 64
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "maxItems": 32
                              },
                              "baselineEvalRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "evaluatedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "gateId",
                              "status",
                              "blocking",
                              "failedScorers",
                              "warnings",
                              "evaluatedAtMs"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "evalRunId",
                          "runId",
                          "suiteId",
                          "datasetId",
                          "datasetVersion",
                          "config",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "suiteId",
                    "evalRuns",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "runProjectEval",
        "tags": [
          "evals"
        ],
        "summary": "Create a project eval run from an immutable suite version and target.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "targetId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "baselineEvalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "runId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "evalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "config": {
                    "type": "object",
                    "additionalProperties": {},
                    "default": {}
                  }
                },
                "required": [
                  "suiteId",
                  "suiteVersionId",
                  "targetId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "evalRun": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "evalRunId",
                        "runId",
                        "suiteId",
                        "datasetId",
                        "datasetVersion",
                        "config",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "run": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "training",
                            "agent",
                            "eval"
                          ],
                          "default": "training"
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "runName": {
                          "type": "string",
                          "maxLength": 128,
                          "nullable": true
                        },
                        "group": {
                          "type": "string",
                          "maxLength": 128,
                          "nullable": true
                        },
                        "jobType": {
                          "type": "string",
                          "maxLength": 64,
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "resumeCount": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "startedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "finishedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "tags": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "maxItems": 32
                        },
                        "note": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 2048
                              },
                              {
                                "type": "number"
                              },
                              {
                                "type": "boolean"
                              },
                              {
                                "enum": [
                                  "null"
                                ],
                                "nullable": true
                              }
                            ]
                          }
                        },
                        "stream": {
                          "type": "object",
                          "properties": {
                            "metricsGeneration": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "logsGeneration": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "artifactsGeneration": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "statusGeneration": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "tracesGeneration": {
                              "type": "integer",
                              "minimum": 0,
                              "default": 0
                            },
                            "evalsGeneration": {
                              "type": "integer",
                              "minimum": 0,
                              "default": 0
                            }
                          },
                          "required": [
                            "metricsGeneration",
                            "logsGeneration",
                            "artifactsGeneration",
                            "statusGeneration"
                          ],
                          "additionalProperties": false
                        },
                        "clientDiagnostics": {
                          "type": "object",
                          "properties": {
                            "capturedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "queueDepth": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "droppedPoints": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "droppedPointsQueueFull": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "droppedPointsSpoolEviction": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "droppedPointsNonRetryable": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "droppedPointsRetryExhausted": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "droppedPointsNonFinite": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "nonFiniteDroppedByMetric": {
                              "type": "object",
                              "additionalProperties": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 1000000000
                              }
                            },
                            "spoolSegments": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "spoolBytes": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1099511627776
                            },
                            "retryAttempts": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "failedFlushAttempts": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000
                            },
                            "systemSamplesCollected": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000,
                              "default": 0
                            },
                            "systemSamplesSkippedBackpressure": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000,
                              "default": 0
                            },
                            "logLinesTruncated": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000,
                              "default": 0
                            },
                            "droppedLogLinesQueueFull": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000,
                              "default": 0
                            },
                            "droppedLogLinesInvalid": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 1000000000,
                              "default": 0
                            }
                          },
                          "required": [
                            "capturedAtMs",
                            "queueDepth",
                            "droppedPoints",
                            "droppedPointsQueueFull",
                            "droppedPointsSpoolEviction",
                            "droppedPointsNonRetryable",
                            "droppedPointsRetryExhausted",
                            "droppedPointsNonFinite",
                            "nonFiniteDroppedByMetric",
                            "spoolSegments",
                            "spoolBytes",
                            "retryAttempts",
                            "failedFlushAttempts"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "runId",
                        "runName",
                        "status",
                        "createdAtMs",
                        "startedAtMs",
                        "finishedAtMs",
                        "updatedAtMs",
                        "tags",
                        "note",
                        "archivedAtMs",
                        "deletedAtMs",
                        "config",
                        "stream"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "evalRun",
                    "run"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/runs/{evalRunId}": {
      "get": {
        "operationId": "getProjectEvalRun",
        "tags": [
          "evals"
        ],
        "summary": "Get one project eval run.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "evalRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "evalRun": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "evalRunId",
                        "runId",
                        "suiteId",
                        "datasetId",
                        "datasetVersion",
                        "config",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "dataset": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "artifactRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "datasetId",
                        "name",
                        "version",
                        "artifactRef",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "evalRun",
                    "suite",
                    "dataset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/runs/{evalRunId}/scorecard": {
      "get": {
        "operationId": "getProjectEvalScorecard",
        "tags": [
          "evals"
        ],
        "summary": "Get one project eval run with bounded scorecard aggregates.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "evalRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "evalRun": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "runId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "config": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "completed",
                            "failed",
                            "aborted"
                          ]
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "evalRunId",
                        "runId",
                        "suiteId",
                        "datasetId",
                        "datasetVersion",
                        "config",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suite": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "slug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:[-_][a-z0-9]+)*$",
                          "nullable": true
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 4096,
                          "nullable": true
                        },
                        "category": {
                          "type": "string",
                          "enum": [
                            "capability",
                            "behavioral",
                            "safety",
                            "regression",
                            "benchmark",
                            "product_quality",
                            "cost_latency",
                            "custom"
                          ],
                          "default": "custom"
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "project"
                          ],
                          "default": "project"
                        },
                        "latestVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetVersion": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "name",
                        "datasetId",
                        "datasetVersion",
                        "scorers",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "suiteVersion": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "objective": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 4096
                        },
                        "datasetRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "maxItems": 16
                        },
                        "scorerRefs": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "kind": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64
                              },
                              "config": {
                                "type": "object",
                                "additionalProperties": {}
                              }
                            },
                            "required": [
                              "name"
                            ],
                            "additionalProperties": false
                          },
                          "minItems": 1,
                          "maxItems": 32
                        },
                        "aggregationPolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "gatePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "targetSchema": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "runner": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "evidencePolicy": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "limits": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "reproducibility": {
                          "type": "object",
                          "additionalProperties": {},
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "draft",
                            "active",
                            "deprecated",
                            "archived"
                          ]
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "suiteId",
                        "suiteVersionId",
                        "version",
                        "objective",
                        "datasetRefs",
                        "scorerRefs",
                        "status",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "target": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "targetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "kind": {
                          "type": "string",
                          "enum": [
                            "rundial_checkpoint",
                            "rundial_model_version",
                            "external_model",
                            "deployment",
                            "endpoint",
                            "agent",
                            "custom"
                          ]
                        },
                        "spec": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "modelRef": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "rundial_checkpoint",
                                "rundial_model_version",
                                "external_model",
                                "deployment",
                                "endpoint",
                                "agent",
                                "custom"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactRef": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "modelVersionId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "externalId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 512
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            }
                          },
                          "required": [
                            "kind",
                            "label"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "sourceRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "sourceArtifactId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "fingerprint": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdBy": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "user",
                                "agent",
                                "service"
                              ]
                            },
                            "id": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256
                            },
                            "displayName": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 256,
                              "nullable": true
                            }
                          },
                          "required": [
                            "kind",
                            "id"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "targetId",
                        "name",
                        "kind",
                        "spec",
                        "fingerprint",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "dataset": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "datasetId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-zA-Z0-9_.:-]+$"
                        },
                        "artifactRef": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "datasetId",
                        "name",
                        "version",
                        "artifactRef",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "scorecard": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "scorers": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorer": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "meanScore": {
                                "type": "number",
                                "nullable": true
                              },
                              "passRate": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1,
                                "nullable": true
                              },
                              "histogram": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "minScore": {
                                      "type": "number"
                                    },
                                    "maxScore": {
                                      "type": "number"
                                    },
                                    "count": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "minScore",
                                    "maxScore",
                                    "count"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 20
                              }
                            },
                            "required": [
                              "scorer",
                              "count",
                              "meanScore",
                              "passRate",
                              "histogram"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64
                        },
                        "scoreSummary": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "scorerId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "scorerName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "scoreKind": {
                                "type": "string",
                                "enum": [
                                  "accuracy",
                                  "pass_rate",
                                  "exact_match",
                                  "f1",
                                  "precision",
                                  "recall",
                                  "numeric",
                                  "judge_score",
                                  "categorical",
                                  "severity",
                                  "cost",
                                  "latency",
                                  "throughput",
                                  "perplexity",
                                  "time_horizon",
                                  "label_distribution",
                                  "custom"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              },
                              "valueLabel": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "unit": {
                                "type": "string",
                                "enum": [
                                  "ratio",
                                  "percent",
                                  "count",
                                  "ms",
                                  "seconds",
                                  "tokens",
                                  "usd",
                                  "severity",
                                  "label",
                                  "custom"
                                ]
                              },
                              "aggregation": {
                                "type": "string",
                                "enum": [
                                  "mean",
                                  "weighted_mean",
                                  "micro_average",
                                  "macro_average",
                                  "median",
                                  "p50",
                                  "p90",
                                  "p95",
                                  "p99",
                                  "sum",
                                  "min",
                                  "max",
                                  "count",
                                  "pass_rate",
                                  "worst_severity",
                                  "custom"
                                ]
                              },
                              "higherIsBetter": {
                                "type": "boolean"
                              },
                              "objective": {
                                "type": "string",
                                "enum": [
                                  "maximize",
                                  "minimize",
                                  "meet_threshold",
                                  "informational"
                                ]
                              },
                              "threshold": {
                                "type": "object",
                                "properties": {
                                  "op": {
                                    "type": "string",
                                    "enum": [
                                      ">=",
                                      ">",
                                      "<=",
                                      "<",
                                      "==",
                                      "!="
                                    ]
                                  },
                                  "value": {
                                    "type": "number"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "enum": [
                                      "ratio",
                                      "percent",
                                      "count",
                                      "ms",
                                      "seconds",
                                      "tokens",
                                      "usd",
                                      "severity",
                                      "label",
                                      "custom"
                                    ]
                                  },
                                  "source": {
                                    "type": "string",
                                    "enum": [
                                      "suite",
                                      "project_gate",
                                      "workspace_policy",
                                      "release_gate"
                                    ]
                                  }
                                },
                                "required": [
                                  "op",
                                  "value",
                                  "unit",
                                  "source"
                                ],
                                "additionalProperties": false
                              },
                              "passed": {
                                "type": "boolean",
                                "nullable": true
                              },
                              "baselineDelta": {
                                "type": "object",
                                "properties": {
                                  "baselineEvalRunId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineTargetId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 128
                                  },
                                  "baselineValue": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "absolute": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "relativePct": {
                                    "type": "number",
                                    "nullable": true
                                  },
                                  "direction": {
                                    "type": "string",
                                    "enum": [
                                      "improvement",
                                      "regression",
                                      "tie",
                                      "tradeoff",
                                      "unknown"
                                    ]
                                  },
                                  "significant": {
                                    "type": "boolean",
                                    "nullable": true
                                  }
                                },
                                "required": [
                                  "baselineEvalRunId",
                                  "baselineTargetId",
                                  "baselineValue",
                                  "absolute",
                                  "relativePct",
                                  "direction",
                                  "significant"
                                ],
                                "additionalProperties": false
                              },
                              "severity": {
                                "type": "object",
                                "properties": {
                                  "band": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "worstBand": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ]
                                  },
                                  "countsByBand": {
                                    "type": "object",
                                    "properties": {
                                      "none": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "low": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "medium": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "high": {
                                        "type": "integer",
                                        "minimum": 0
                                      },
                                      "critical": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "none",
                                      "low",
                                      "medium",
                                      "high",
                                      "critical"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "required": [
                                  "band",
                                  "worstBand",
                                  "countsByBand"
                                ],
                                "additionalProperties": false
                              },
                              "evidence": {
                                "type": "object",
                                "properties": {
                                  "sampleCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "scoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "unscoredCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "passCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "failCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "traceCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  },
                                  "evidenceRefCount": {
                                    "type": "integer",
                                    "minimum": 0
                                  }
                                },
                                "required": [
                                  "sampleCount",
                                  "scoredCount",
                                  "unscoredCount",
                                  "traceCount",
                                  "evidenceRefCount"
                                ],
                                "additionalProperties": false
                              },
                              "uncertainty": {
                                "type": "object",
                                "properties": {
                                  "stderr": {
                                    "type": "number"
                                  },
                                  "ciLow": {
                                    "type": "number"
                                  },
                                  "ciHigh": {
                                    "type": "number"
                                  },
                                  "method": {
                                    "type": "string",
                                    "enum": [
                                      "stderr",
                                      "bootstrap",
                                      "binomial",
                                      "custom"
                                    ]
                                  }
                                },
                                "additionalProperties": false
                              },
                              "breakdowns": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "dimension": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "key": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "value": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "dimension",
                                    "key",
                                    "value",
                                    "sampleCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "maxItems": 32,
                                "default": []
                              }
                            },
                            "required": [
                              "scorerId",
                              "scorerName",
                              "displayName",
                              "scoreKind",
                              "value",
                              "unit",
                              "aggregation",
                              "higherIsBetter",
                              "objective",
                              "passed",
                              "evidence"
                            ],
                            "additionalProperties": false
                          },
                          "maxItems": 64,
                          "default": []
                        },
                        "gateSummary": {
                          "type": "object",
                          "properties": {
                            "gateId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "status": {
                              "type": "string",
                              "enum": [
                                "passed",
                                "failed",
                                "warning",
                                "not_evaluated"
                              ]
                            },
                            "blocking": {
                              "type": "boolean"
                            },
                            "failedScorers": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "maxItems": 64
                            },
                            "warnings": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              },
                              "maxItems": 32
                            },
                            "baselineEvalRunId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "evaluatedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "gateId",
                            "status",
                            "blocking",
                            "failedScorers",
                            "warnings",
                            "evaluatedAtMs"
                          ],
                          "additionalProperties": false,
                          "nullable": true
                        }
                      },
                      "required": [
                        "projectId",
                        "evalRunId",
                        "scorers"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "evalRun",
                    "suite",
                    "dataset",
                    "scorecard"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/runs/{evalRunId}/results": {
      "get": {
        "operationId": "listProjectEvalResults",
        "tags": [
          "evals"
        ],
        "summary": "List bounded per-example eval result rows.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "evalRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "evalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "observationId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "replicateId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 2147483647
                          },
                          "objective": {
                            "type": "string",
                            "enum": [
                              "maximize",
                              "minimize"
                            ]
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "exampleId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "score": {
                            "type": "number"
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "evidenceRef": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "artifactId",
                              "path"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "meta": {
                            "type": "object",
                            "additionalProperties": {},
                            "default": {}
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "evalRunId",
                          "exampleId",
                          "scorer",
                          "score",
                          "passed",
                          "projectId",
                          "timestampMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 200
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8192,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "evalRunId",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/compare": {
      "post": {
        "operationId": "compareProjectEvals",
        "tags": [
          "evals"
        ],
        "summary": "Compare two project eval runs with bounded per-example rows.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baselineEvalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "candidateEvalRunId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scorer": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "cursor": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 8192
                  },
                  "limit": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 200,
                    "default": 100
                  },
                  "evalsGeneration": {
                    "type": "integer",
                    "minimum": 0
                  }
                },
                "required": [
                  "baselineEvalRunId",
                  "candidateEvalRunId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "totalRows": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "totalRegressions": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "snapshotAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "baselineEvalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "candidateEvalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "exampleId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetId": {
                            "type": "string",
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "maxLength": 128
                          },
                          "replicateId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "paired",
                              "added",
                              "removed"
                            ]
                          },
                          "objective": {
                            "type": "string",
                            "enum": [
                              "maximize",
                              "minimize"
                            ]
                          },
                          "baselineScore": {
                            "type": "number",
                            "nullable": true
                          },
                          "candidateScore": {
                            "type": "number",
                            "nullable": true
                          },
                          "delta": {
                            "type": "number",
                            "nullable": true
                          },
                          "baselinePassed": {
                            "type": "boolean",
                            "nullable": true
                          },
                          "candidatePassed": {
                            "type": "boolean",
                            "nullable": true
                          },
                          "regressed": {
                            "type": "boolean"
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "evidenceRef": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "artifactId",
                              "path"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "baselineCreatedBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "candidateCreatedBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          }
                        },
                        "required": [
                          "exampleId",
                          "scorer",
                          "baselineScore",
                          "candidateScore",
                          "delta",
                          "baselinePassed",
                          "candidatePassed",
                          "regressed"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 200
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 8192,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "baselineEvalRunId",
                    "candidateEvalRunId",
                    "rows",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/gates": {
      "post": {
        "operationId": "createProjectEvalGate",
        "tags": [
          "evals"
        ],
        "summary": "Create a reusable project eval gate policy.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "gateId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "suiteVersionId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "policy": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "blocking": {
                    "type": "boolean",
                    "default": true
                  }
                },
                "required": [
                  "name",
                  "policy"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gate": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "gateId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "suiteId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "suiteVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "policy": {
                          "type": "object",
                          "additionalProperties": {}
                        },
                        "blocking": {
                          "type": "boolean"
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "projectId",
                        "gateId",
                        "name",
                        "policy",
                        "blocking",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "gate"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listProjectEvalGates",
        "tags": [
          "evals"
        ],
        "summary": "List bounded project eval gate summaries.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "gates": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "gateSummary": {
                            "type": "object",
                            "properties": {
                              "gateId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "warning",
                                  "not_evaluated"
                                ]
                              },
                              "blocking": {
                                "type": "boolean"
                              },
                              "failedScorers": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "maxItems": 64
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "maxItems": 32
                              },
                              "baselineEvalRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "evaluatedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "gateId",
                              "status",
                              "blocking",
                              "failedScorers",
                              "warnings",
                              "evaluatedAtMs"
                            ],
                            "additionalProperties": false
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "evalRunId",
                          "runId",
                          "suiteId",
                          "gateSummary",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "gates",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/runs/{evalRunId}/gate": {
      "get": {
        "operationId": "getProjectEvalGate",
        "tags": [
          "evals"
        ],
        "summary": "Get one project eval gate summary.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "evalRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "evalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "gateSummary": {
                      "type": "object",
                      "properties": {
                        "gateId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "passed",
                            "failed",
                            "warning",
                            "not_evaluated"
                          ]
                        },
                        "blocking": {
                          "type": "boolean"
                        },
                        "failedScorers": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "maxItems": 64
                        },
                        "warnings": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "maxItems": 32
                        },
                        "baselineEvalRunId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "evaluatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "gateId",
                        "status",
                        "blocking",
                        "failedScorers",
                        "warnings",
                        "evaluatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "projectId",
                    "evalRunId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/evals/runs/{evalRunId}/results/{exampleId}/evidence": {
      "get": {
        "operationId": "queryProjectEvalEvidence",
        "tags": [
          "evals"
        ],
        "summary": "Query bounded per-example eval evidence.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "evalRunId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "exampleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "evalRunId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "exampleId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "rows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "observationId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "replicateId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "revision": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 2147483647
                          },
                          "objective": {
                            "type": "string",
                            "enum": [
                              "maximize",
                              "minimize"
                            ]
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "exampleId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "scorer": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "score": {
                            "type": "number"
                          },
                          "passed": {
                            "type": "boolean"
                          },
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "evidenceRef": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "path": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 512
                              }
                            },
                            "required": [
                              "artifactId",
                              "path"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "meta": {
                            "type": "object",
                            "additionalProperties": {},
                            "default": {}
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "timestampMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "evalRunId",
                          "exampleId",
                          "scorer",
                          "score",
                          "passed",
                          "projectId",
                          "timestampMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 32
                    },
                    "traces": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "traceId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "spans": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "projectId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "runId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "traceId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "spanId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "parentSpanId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128,
                                  "nullable": true
                                },
                                "name": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "kind": {
                                  "type": "string",
                                  "enum": [
                                    "internal",
                                    "server",
                                    "client",
                                    "producer",
                                    "consumer",
                                    "tool"
                                  ]
                                },
                                "startNs": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\d+$",
                                      "minLength": 1,
                                      "maxLength": 20
                                    }
                                  ]
                                },
                                "endNs": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\d+$",
                                      "minLength": 1,
                                      "maxLength": 20
                                    }
                                  ],
                                  "nullable": true
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "unset",
                                    "ok",
                                    "error"
                                  ]
                                },
                                "attrsJson": {
                                  "type": "string",
                                  "default": "{}"
                                },
                                "events": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "name": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      },
                                      "timestampNs": {
                                        "anyOf": [
                                          {
                                            "type": "integer",
                                            "minimum": 0
                                          },
                                          {
                                            "type": "string",
                                            "pattern": "^\\d+$",
                                            "minLength": 1,
                                            "maxLength": 20
                                          }
                                        ]
                                      },
                                      "attrsJson": {
                                        "type": "string",
                                        "default": "{}"
                                      }
                                    },
                                    "required": [
                                      "name",
                                      "timestampNs"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 128,
                                  "default": []
                                },
                                "model": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256,
                                  "nullable": true
                                },
                                "genAiSystem": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128,
                                  "nullable": true
                                },
                                "tokensIn": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\d+$",
                                      "minLength": 1,
                                      "maxLength": 20
                                    }
                                  ],
                                  "nullable": true
                                },
                                "tokensOut": {
                                  "anyOf": [
                                    {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    {
                                      "type": "string",
                                      "pattern": "^\\d+$",
                                      "minLength": 1,
                                      "maxLength": 20
                                    }
                                  ],
                                  "nullable": true
                                },
                                "costUsd": {
                                  "type": "number",
                                  "minimum": 0,
                                  "nullable": true
                                },
                                "createdBy": {
                                  "type": "object",
                                  "properties": {
                                    "kind": {
                                      "type": "string",
                                      "enum": [
                                        "user",
                                        "agent",
                                        "service"
                                      ]
                                    },
                                    "id": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256
                                    },
                                    "displayName": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 256,
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "kind",
                                    "id"
                                  ],
                                  "additionalProperties": false,
                                  "nullable": true
                                }
                              },
                              "required": [
                                "projectId",
                                "runId",
                                "traceId",
                                "spanId",
                                "parentSpanId",
                                "name",
                                "kind",
                                "startNs",
                                "endNs",
                                "status"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 128
                          },
                          "page": {
                            "type": "object",
                            "properties": {
                              "truncated": {
                                "type": "boolean"
                              },
                              "hasMore": {
                                "type": "boolean"
                              },
                              "nextCursor": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 8192,
                                "nullable": true
                              },
                              "limit": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0,
                                "maximum": 128
                              },
                              "returned": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 128
                              }
                            },
                            "required": [
                              "truncated",
                              "hasMore",
                              "nextCursor",
                              "limit",
                              "returned"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "traceId",
                          "spans",
                          "page"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 8
                    },
                    "evidenceLinks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "rundial.evidence_ref"
                            ]
                          },
                          "artifactId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "artifactVersion": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "nullable": true
                          },
                          "path": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 512
                          },
                          "key": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "sizeBytes": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "sha256": {
                            "type": "string",
                            "pattern": "^[a-f0-9]{64}$",
                            "nullable": true
                          },
                          "contentType": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "method": {
                            "type": "string",
                            "enum": [
                              "GET"
                            ]
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "maxLength": 8192
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          }
                        },
                        "required": [
                          "kind",
                          "artifactId",
                          "path",
                          "method",
                          "url",
                          "expiresAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 32
                    }
                  },
                  "required": [
                    "projectId",
                    "evalRunId",
                    "runId",
                    "exampleId",
                    "rows",
                    "traces",
                    "evidenceLinks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces": {
      "get": {
        "operationId": "listAccessibleWorkspaces",
        "tags": [
          "metadata"
        ],
        "summary": "List accessible workspaces.",
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaces": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ],
                            "nullable": true
                          }
                        },
                        "required": [
                          "orgId",
                          "workspaceSlug",
                          "name",
                          "role"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaces",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "createWorkspace",
        "tags": [
          "admin"
        ],
        "summary": "Create a workspace.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "initialProjectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "initialProjectName": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "initialProjectDescription": {
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": [
                  "workspaceSlug",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "sessionMaxTtlMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "name",
                        "sessionMaxTtlMs",
                        "archivedAtMs",
                        "deletedAtMs",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "initialProject": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 2048,
                          "nullable": true
                        },
                        "runCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "projectId",
                        "projectSlug",
                        "name",
                        "description",
                        "runCount",
                        "archivedAtMs",
                        "deletedAtMs",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "workspace",
                    "initialProject"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects": {
      "get": {
        "operationId": "listWorkspaceProjects",
        "tags": [
          "metadata"
        ],
        "summary": "List workspace projects.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "sort": {
                      "type": "string",
                      "enum": [
                        "updated",
                        "name",
                        "runs"
                      ]
                    },
                    "projects": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "projectSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "runCount": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "workspaceSlug",
                          "projectSlug",
                          "name",
                          "createdAtMs",
                          "updatedAtMs",
                          "runCount"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    },
                    "count": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "estimated": {
                          "type": "boolean"
                        },
                        "scanLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        }
                      },
                      "required": [
                        "total",
                        "estimated",
                        "scanLimit"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "orgId",
                    "sort",
                    "projects",
                    "page",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "createWorkspaceProject",
        "tags": [
          "admin"
        ],
        "summary": "Create a project.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2048
                  }
                },
                "required": [
                  "projectSlug",
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 2048,
                          "nullable": true
                        },
                        "runCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "projectId",
                        "projectSlug",
                        "name",
                        "description",
                        "runCount",
                        "archivedAtMs",
                        "deletedAtMs",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "project"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}": {
      "get": {
        "operationId": "getWorkspaceProject",
        "tags": [
          "metadata"
        ],
        "summary": "Get project details.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "createdAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "updatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "runCount": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "orgId",
                    "projectId",
                    "workspaceSlug",
                    "projectSlug",
                    "name",
                    "createdAtMs",
                    "updatedAtMs",
                    "runCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "patch": {
        "operationId": "updateWorkspaceProject",
        "tags": [
          "admin"
        ],
        "summary": "Update project settings.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2048,
                    "nullable": true
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "project": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "description": {
                          "type": "string",
                          "maxLength": 2048,
                          "nullable": true
                        },
                        "runCount": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "projectId",
                        "projectSlug",
                        "name",
                        "description",
                        "runCount",
                        "archivedAtMs",
                        "deletedAtMs",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "project"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "delete": {
        "operationId": "deleteWorkspaceProject",
        "tags": [
          "admin"
        ],
        "summary": "Delete a project.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "deletedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "projectSlug",
                    "deletedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/runs": {
      "get": {
        "operationId": "listWorkspaceProjectRuns",
        "tags": [
          "metadata"
        ],
        "summary": "List project runs.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "order": {
                      "type": "string",
                      "enum": [
                        "asc",
                        "desc"
                      ]
                    },
                    "orderBy": {
                      "type": "string",
                      "enum": [
                        "runId"
                      ]
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "training",
                              "agent",
                              "eval"
                            ],
                            "default": "training"
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "runName": {
                            "type": "string",
                            "maxLength": 128,
                            "nullable": true
                          },
                          "group": {
                            "type": "string",
                            "maxLength": 128,
                            "nullable": true
                          },
                          "jobType": {
                            "type": "string",
                            "maxLength": 64,
                            "nullable": true
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "maxItems": 32,
                            "default": []
                          },
                          "config": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 256
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "enum": [
                                    "null"
                                  ],
                                  "nullable": true
                                }
                              ]
                            },
                            "default": {}
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "resumeCount": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "startedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "finishedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "archivedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "summaryMetric": {
                            "type": "object",
                            "properties": {
                              "metricKey": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "agg": {
                                "type": "string",
                                "enum": [
                                  "min",
                                  "max",
                                  "last"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              }
                            },
                            "required": [
                              "metricKey",
                              "agg",
                              "value"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "runId",
                          "runName",
                          "status",
                          "createdAtMs",
                          "startedAtMs",
                          "finishedAtMs",
                          "updatedAtMs",
                          "archivedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "projectSlug",
                    "orgId",
                    "projectId",
                    "order",
                    "orderBy",
                    "runs",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/runs/query": {
      "get": {
        "operationId": "queryWorkspaceProjectRuns",
        "tags": [
          "metadata"
        ],
        "summary": "Search and filter project runs.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "order": {
                      "type": "string",
                      "enum": [
                        "asc",
                        "desc"
                      ]
                    },
                    "orderBy": {
                      "type": "string",
                      "enum": [
                        "runId",
                        "startedAtMs",
                        "updatedAtMs",
                        "runName"
                      ]
                    },
                    "summaryMetric": {
                      "type": "object",
                      "properties": {
                        "metricKey": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "agg": {
                          "type": "string",
                          "enum": [
                            "min",
                            "max",
                            "last"
                          ]
                        }
                      },
                      "required": [
                        "metricKey",
                        "agg"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "runs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "kind": {
                            "type": "string",
                            "enum": [
                              "training",
                              "agent",
                              "eval"
                            ],
                            "default": "training"
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "runName": {
                            "type": "string",
                            "maxLength": 128,
                            "nullable": true
                          },
                          "group": {
                            "type": "string",
                            "maxLength": 128,
                            "nullable": true
                          },
                          "jobType": {
                            "type": "string",
                            "maxLength": 64,
                            "nullable": true
                          },
                          "tags": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64
                            },
                            "maxItems": 32,
                            "default": []
                          },
                          "config": {
                            "type": "object",
                            "additionalProperties": {
                              "anyOf": [
                                {
                                  "type": "string",
                                  "maxLength": 256
                                },
                                {
                                  "type": "number"
                                },
                                {
                                  "type": "boolean"
                                },
                                {
                                  "enum": [
                                    "null"
                                  ],
                                  "nullable": true
                                }
                              ]
                            },
                            "default": {}
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "resumeCount": {
                            "type": "integer",
                            "minimum": 0,
                            "default": 0
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "startedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "finishedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "archivedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "summaryMetric": {
                            "type": "object",
                            "properties": {
                              "metricKey": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "agg": {
                                "type": "string",
                                "enum": [
                                  "min",
                                  "max",
                                  "last"
                                ]
                              },
                              "value": {
                                "type": "number",
                                "nullable": true
                              }
                            },
                            "required": [
                              "metricKey",
                              "agg",
                              "value"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "runId",
                          "runName",
                          "status",
                          "createdAtMs",
                          "startedAtMs",
                          "finishedAtMs",
                          "updatedAtMs",
                          "archivedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 200
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    },
                    "count": {
                      "type": "object",
                      "properties": {
                        "total": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "estimated": {
                          "type": "boolean"
                        },
                        "scanLimit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "scanLimited": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "total",
                        "estimated",
                        "scanLimit"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "projectSlug",
                    "orgId",
                    "projectId",
                    "order",
                    "orderBy",
                    "runs",
                    "page",
                    "count"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/runs/{runId}": {
      "get": {
        "operationId": "getWorkspaceProjectRun",
        "tags": [
          "metadata"
        ],
        "summary": "Get run details.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "training",
                        "agent",
                        "eval"
                      ],
                      "default": "training"
                    },
                    "agentId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "nullable": true
                    },
                    "createdBy": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "service"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "displayName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "runName": {
                      "type": "string",
                      "maxLength": 128,
                      "nullable": true
                    },
                    "group": {
                      "type": "string",
                      "maxLength": 128,
                      "nullable": true
                    },
                    "jobType": {
                      "type": "string",
                      "maxLength": 64,
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "completed",
                        "failed",
                        "aborted"
                      ]
                    },
                    "resumeCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "createdAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "startedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "updatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 32
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 4096,
                      "nullable": true
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "deletedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "config": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2048
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "enum": [
                              "null"
                            ],
                            "nullable": true
                          }
                        ]
                      }
                    },
                    "stream": {
                      "type": "object",
                      "properties": {
                        "metricsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "logsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "artifactsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "statusGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "tracesGeneration": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        },
                        "evalsGeneration": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        }
                      },
                      "required": [
                        "metricsGeneration",
                        "logsGeneration",
                        "artifactsGeneration",
                        "statusGeneration"
                      ],
                      "additionalProperties": false
                    },
                    "clientDiagnostics": {
                      "type": "object",
                      "properties": {
                        "capturedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "queueDepth": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPoints": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsQueueFull": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsSpoolEviction": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsNonRetryable": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsRetryExhausted": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsNonFinite": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "nonFiniteDroppedByMetric": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000000
                          }
                        },
                        "spoolSegments": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "spoolBytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1099511627776
                        },
                        "retryAttempts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "failedFlushAttempts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "systemSamplesCollected": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "systemSamplesSkippedBackpressure": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "logLinesTruncated": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "droppedLogLinesQueueFull": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "droppedLogLinesInvalid": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        }
                      },
                      "required": [
                        "capturedAtMs",
                        "queueDepth",
                        "droppedPoints",
                        "droppedPointsQueueFull",
                        "droppedPointsSpoolEviction",
                        "droppedPointsNonRetryable",
                        "droppedPointsRetryExhausted",
                        "droppedPointsNonFinite",
                        "nonFiniteDroppedByMetric",
                        "spoolSegments",
                        "spoolBytes",
                        "retryAttempts",
                        "failedFlushAttempts"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    }
                  },
                  "required": [
                    "orgId",
                    "projectId",
                    "runId",
                    "runName",
                    "status",
                    "createdAtMs",
                    "startedAtMs",
                    "finishedAtMs",
                    "updatedAtMs",
                    "tags",
                    "note",
                    "archivedAtMs",
                    "deletedAtMs",
                    "config",
                    "stream",
                    "workspaceSlug",
                    "projectSlug"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "patch": {
        "operationId": "updateWorkspaceProjectRun",
        "tags": [
          "metadata"
        ],
        "summary": "Update run tags and note.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64
                    },
                    "maxItems": 32
                  },
                  "note": {
                    "type": "string",
                    "maxLength": 4096,
                    "nullable": true
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "training",
                        "agent",
                        "eval"
                      ],
                      "default": "training"
                    },
                    "agentId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "nullable": true
                    },
                    "createdBy": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent",
                            "service"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "displayName": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        }
                      },
                      "required": [
                        "kind",
                        "id"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "runName": {
                      "type": "string",
                      "maxLength": 128,
                      "nullable": true
                    },
                    "group": {
                      "type": "string",
                      "maxLength": 128,
                      "nullable": true
                    },
                    "jobType": {
                      "type": "string",
                      "maxLength": 64,
                      "nullable": true
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "running",
                        "completed",
                        "failed",
                        "aborted"
                      ]
                    },
                    "resumeCount": {
                      "type": "integer",
                      "minimum": 0,
                      "default": 0
                    },
                    "createdAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "startedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "finishedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "updatedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "tags": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "maxItems": 32
                    },
                    "note": {
                      "type": "string",
                      "maxLength": 4096,
                      "nullable": true
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "deletedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    },
                    "config": {
                      "type": "object",
                      "additionalProperties": {
                        "anyOf": [
                          {
                            "type": "string",
                            "maxLength": 2048
                          },
                          {
                            "type": "number"
                          },
                          {
                            "type": "boolean"
                          },
                          {
                            "enum": [
                              "null"
                            ],
                            "nullable": true
                          }
                        ]
                      }
                    },
                    "stream": {
                      "type": "object",
                      "properties": {
                        "metricsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "logsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "artifactsGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "statusGeneration": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "tracesGeneration": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        },
                        "evalsGeneration": {
                          "type": "integer",
                          "minimum": 0,
                          "default": 0
                        }
                      },
                      "required": [
                        "metricsGeneration",
                        "logsGeneration",
                        "artifactsGeneration",
                        "statusGeneration"
                      ],
                      "additionalProperties": false
                    },
                    "clientDiagnostics": {
                      "type": "object",
                      "properties": {
                        "capturedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "queueDepth": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPoints": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsQueueFull": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsSpoolEviction": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsNonRetryable": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsRetryExhausted": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "droppedPointsNonFinite": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "nonFiniteDroppedByMetric": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 1000000000
                          }
                        },
                        "spoolSegments": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "spoolBytes": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1099511627776
                        },
                        "retryAttempts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "failedFlushAttempts": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000
                        },
                        "systemSamplesCollected": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "systemSamplesSkippedBackpressure": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "logLinesTruncated": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "droppedLogLinesQueueFull": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        },
                        "droppedLogLinesInvalid": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 1000000000,
                          "default": 0
                        }
                      },
                      "required": [
                        "capturedAtMs",
                        "queueDepth",
                        "droppedPoints",
                        "droppedPointsQueueFull",
                        "droppedPointsSpoolEviction",
                        "droppedPointsNonRetryable",
                        "droppedPointsRetryExhausted",
                        "droppedPointsNonFinite",
                        "nonFiniteDroppedByMetric",
                        "spoolSegments",
                        "spoolBytes",
                        "retryAttempts",
                        "failedFlushAttempts"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    }
                  },
                  "required": [
                    "orgId",
                    "projectId",
                    "runId",
                    "runName",
                    "status",
                    "createdAtMs",
                    "startedAtMs",
                    "finishedAtMs",
                    "updatedAtMs",
                    "tags",
                    "note",
                    "archivedAtMs",
                    "deletedAtMs",
                    "config",
                    "stream",
                    "workspaceSlug",
                    "projectSlug"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "delete": {
        "operationId": "deleteWorkspaceProjectRun",
        "tags": [
          "metadata"
        ],
        "summary": "Delete a run and schedule telemetry cleanup.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "delete_scheduled"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "deletedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "telemetryDelete": {
                      "type": "object",
                      "properties": {
                        "metrics": {
                          "type": "string",
                          "enum": [
                            "scheduled"
                          ]
                        },
                        "logs": {
                          "type": "string",
                          "enum": [
                            "scheduled"
                          ]
                        },
                        "traces": {
                          "type": "string",
                          "enum": [
                            "scheduled"
                          ]
                        },
                        "media": {
                          "type": "string",
                          "enum": [
                            "scheduled"
                          ]
                        },
                        "evals": {
                          "type": "string",
                          "enum": [
                            "scheduled",
                            "skipped"
                          ]
                        },
                        "artifacts": {
                          "type": "string",
                          "enum": [
                            "deleted",
                            "skipped",
                            "scheduled"
                          ]
                        }
                      },
                      "required": [
                        "metrics",
                        "logs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "projectSlug",
                    "runId",
                    "deletedAtMs",
                    "telemetryDelete"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/models": {
      "get": {
        "operationId": "listProjectModels",
        "tags": [
          "models"
        ],
        "summary": "List checkpoint-backed model versions.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "models": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "modelVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "version": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "source": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "checkpoint_artifact"
                                ]
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              }
                            },
                            "required": [
                              "kind",
                              "runId",
                              "artifactId"
                            ],
                            "additionalProperties": false
                          },
                          "aliases": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "pattern": "^[a-zA-Z0-9_.-]+$"
                            },
                            "maxItems": 16
                          },
                          "artifact": {
                            "type": "object",
                            "properties": {
                              "artifactId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "projectId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "runId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "artifactType": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "nullable": true
                              },
                              "aliases": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[a-zA-Z0-9_.-]+$"
                                },
                                "maxItems": 16
                              },
                              "retentionPolicy": {
                                "type": "object",
                                "properties": {
                                  "strategy": {
                                    "type": "string",
                                    "enum": [
                                      "keep_last"
                                    ]
                                  },
                                  "keepLast": {
                                    "type": "integer",
                                    "exclusiveMinimum": true,
                                    "minimum": 0,
                                    "maximum": 100
                                  }
                                },
                                "required": [
                                  "strategy",
                                  "keepLast"
                                ],
                                "additionalProperties": false,
                                "nullable": true
                              },
                              "version": {
                                "type": "integer",
                                "exclusiveMinimum": true,
                                "minimum": 0
                              },
                              "manifestHash": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "fileCount": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "totalSizeBytes": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "createdAtMs": {
                                "type": "integer",
                                "minimum": 0
                              },
                              "finalizedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "artifactId",
                              "projectId",
                              "runId",
                              "name",
                              "artifactType",
                              "aliases",
                              "retentionPolicy",
                              "version",
                              "manifestHash",
                              "fileCount",
                              "totalSizeBytes",
                              "createdAtMs",
                              "finalizedAtMs"
                            ],
                            "additionalProperties": false
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "projectId",
                          "modelVersionId",
                          "name",
                          "version",
                          "source",
                          "aliases",
                          "artifact",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 512,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "models",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/models/{modelVersionId}": {
      "get": {
        "operationId": "getProjectModel",
        "tags": [
          "models"
        ],
        "summary": "Get checkpoint-backed model version detail.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "modelVersionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "modelVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "checkpoint_artifact"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "kind",
                            "runId",
                            "artifactId"
                          ],
                          "additionalProperties": false
                        },
                        "aliases": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[a-zA-Z0-9_.-]+$"
                          },
                          "maxItems": 16
                        },
                        "artifact": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactType": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "nullable": true
                            },
                            "aliases": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z0-9_.-]+$"
                              },
                              "maxItems": 16
                            },
                            "retentionPolicy": {
                              "type": "object",
                              "properties": {
                                "strategy": {
                                  "type": "string",
                                  "enum": [
                                    "keep_last"
                                  ]
                                },
                                "keepLast": {
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "minimum": 0,
                                  "maximum": 100
                                }
                              },
                              "required": [
                                "strategy",
                                "keepLast"
                              ],
                              "additionalProperties": false,
                              "nullable": true
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "minimum": 0
                            },
                            "manifestHash": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "fileCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "totalSizeBytes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "createdAtMs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "finalizedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "files": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "path": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 512
                                  },
                                  "sizeBytes": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 5368709120
                                  },
                                  "sha256": {
                                    "type": "string",
                                    "pattern": "^[a-f0-9]{64}$"
                                  },
                                  "contentType": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 256
                                  },
                                  "storageVersionId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                },
                                "required": [
                                  "path",
                                  "sizeBytes",
                                  "sha256"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 100
                            },
                            "metadata": {
                              "type": "object",
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "enum": [
                                      "null"
                                    ],
                                    "nullable": true
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "artifactId",
                            "projectId",
                            "runId",
                            "name",
                            "artifactType",
                            "aliases",
                            "retentionPolicy",
                            "version",
                            "manifestHash",
                            "fileCount",
                            "totalSizeBytes",
                            "createdAtMs",
                            "finalizedAtMs",
                            "files",
                            "metadata"
                          ],
                          "additionalProperties": false
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "projectId",
                        "modelVersionId",
                        "name",
                        "version",
                        "source",
                        "aliases",
                        "artifact",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    }
                  },
                  "required": [
                    "model"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/models/{modelVersionId}/evals": {
      "get": {
        "operationId": "listProjectModelEvals",
        "tags": [
          "models"
        ],
        "summary": "List eval runs for a checkpoint-backed model version.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "modelVersionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "modelVersionId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "model": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "modelVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "checkpoint_artifact"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "kind",
                            "runId",
                            "artifactId"
                          ],
                          "additionalProperties": false
                        },
                        "aliases": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[a-zA-Z0-9_.-]+$"
                          },
                          "maxItems": 16
                        },
                        "artifact": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactType": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "nullable": true
                            },
                            "aliases": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z0-9_.-]+$"
                              },
                              "maxItems": 16
                            },
                            "retentionPolicy": {
                              "type": "object",
                              "properties": {
                                "strategy": {
                                  "type": "string",
                                  "enum": [
                                    "keep_last"
                                  ]
                                },
                                "keepLast": {
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "minimum": 0,
                                  "maximum": 100
                                }
                              },
                              "required": [
                                "strategy",
                                "keepLast"
                              ],
                              "additionalProperties": false,
                              "nullable": true
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "minimum": 0
                            },
                            "manifestHash": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "fileCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "totalSizeBytes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "createdAtMs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "finalizedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "artifactId",
                            "projectId",
                            "runId",
                            "name",
                            "artifactType",
                            "aliases",
                            "retentionPolicy",
                            "version",
                            "manifestHash",
                            "fileCount",
                            "totalSizeBytes",
                            "createdAtMs",
                            "finalizedAtMs"
                          ],
                          "additionalProperties": false
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "projectId",
                        "modelVersionId",
                        "name",
                        "version",
                        "source",
                        "aliases",
                        "artifact",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false,
                      "nullable": true
                    },
                    "evalRuns": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "evalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "runId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "suiteVersionId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "baselineEvalRunId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "datasetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "datasetVersion": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-zA-Z0-9_.:-]+$"
                          },
                          "config": {
                            "type": "object",
                            "additionalProperties": {}
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "running",
                              "completed",
                              "failed",
                              "aborted"
                            ]
                          },
                          "scoreSummary": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "scorerId": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "scorerName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "displayName": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                },
                                "scoreKind": {
                                  "type": "string",
                                  "enum": [
                                    "accuracy",
                                    "pass_rate",
                                    "exact_match",
                                    "f1",
                                    "precision",
                                    "recall",
                                    "numeric",
                                    "judge_score",
                                    "categorical",
                                    "severity",
                                    "cost",
                                    "latency",
                                    "throughput",
                                    "perplexity",
                                    "time_horizon",
                                    "label_distribution",
                                    "custom"
                                  ]
                                },
                                "value": {
                                  "type": "number",
                                  "nullable": true
                                },
                                "valueLabel": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "unit": {
                                  "type": "string",
                                  "enum": [
                                    "ratio",
                                    "percent",
                                    "count",
                                    "ms",
                                    "seconds",
                                    "tokens",
                                    "usd",
                                    "severity",
                                    "label",
                                    "custom"
                                  ]
                                },
                                "aggregation": {
                                  "type": "string",
                                  "enum": [
                                    "mean",
                                    "weighted_mean",
                                    "micro_average",
                                    "macro_average",
                                    "median",
                                    "p50",
                                    "p90",
                                    "p95",
                                    "p99",
                                    "sum",
                                    "min",
                                    "max",
                                    "count",
                                    "pass_rate",
                                    "worst_severity",
                                    "custom"
                                  ]
                                },
                                "higherIsBetter": {
                                  "type": "boolean"
                                },
                                "objective": {
                                  "type": "string",
                                  "enum": [
                                    "maximize",
                                    "minimize",
                                    "meet_threshold",
                                    "informational"
                                  ]
                                },
                                "threshold": {
                                  "type": "object",
                                  "properties": {
                                    "op": {
                                      "type": "string",
                                      "enum": [
                                        ">=",
                                        ">",
                                        "<=",
                                        "<",
                                        "==",
                                        "!="
                                      ]
                                    },
                                    "value": {
                                      "type": "number"
                                    },
                                    "unit": {
                                      "type": "string",
                                      "enum": [
                                        "ratio",
                                        "percent",
                                        "count",
                                        "ms",
                                        "seconds",
                                        "tokens",
                                        "usd",
                                        "severity",
                                        "label",
                                        "custom"
                                      ]
                                    },
                                    "source": {
                                      "type": "string",
                                      "enum": [
                                        "suite",
                                        "project_gate",
                                        "workspace_policy",
                                        "release_gate"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "op",
                                    "value",
                                    "unit",
                                    "source"
                                  ],
                                  "additionalProperties": false
                                },
                                "passed": {
                                  "type": "boolean",
                                  "nullable": true
                                },
                                "baselineDelta": {
                                  "type": "object",
                                  "properties": {
                                    "baselineEvalRunId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineTargetId": {
                                      "type": "string",
                                      "minLength": 1,
                                      "maxLength": 128
                                    },
                                    "baselineValue": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "absolute": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "relativePct": {
                                      "type": "number",
                                      "nullable": true
                                    },
                                    "direction": {
                                      "type": "string",
                                      "enum": [
                                        "improvement",
                                        "regression",
                                        "tie",
                                        "tradeoff",
                                        "unknown"
                                      ]
                                    },
                                    "significant": {
                                      "type": "boolean",
                                      "nullable": true
                                    }
                                  },
                                  "required": [
                                    "baselineEvalRunId",
                                    "baselineTargetId",
                                    "baselineValue",
                                    "absolute",
                                    "relativePct",
                                    "direction",
                                    "significant"
                                  ],
                                  "additionalProperties": false
                                },
                                "severity": {
                                  "type": "object",
                                  "properties": {
                                    "band": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "worstBand": {
                                      "type": "string",
                                      "enum": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ]
                                    },
                                    "countsByBand": {
                                      "type": "object",
                                      "properties": {
                                        "none": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "low": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "medium": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "high": {
                                          "type": "integer",
                                          "minimum": 0
                                        },
                                        "critical": {
                                          "type": "integer",
                                          "minimum": 0
                                        }
                                      },
                                      "required": [
                                        "none",
                                        "low",
                                        "medium",
                                        "high",
                                        "critical"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "required": [
                                    "band",
                                    "worstBand",
                                    "countsByBand"
                                  ],
                                  "additionalProperties": false
                                },
                                "evidence": {
                                  "type": "object",
                                  "properties": {
                                    "sampleCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "scoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "unscoredCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "passCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "failCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "traceCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    },
                                    "evidenceRefCount": {
                                      "type": "integer",
                                      "minimum": 0
                                    }
                                  },
                                  "required": [
                                    "sampleCount",
                                    "scoredCount",
                                    "unscoredCount",
                                    "traceCount",
                                    "evidenceRefCount"
                                  ],
                                  "additionalProperties": false
                                },
                                "uncertainty": {
                                  "type": "object",
                                  "properties": {
                                    "stderr": {
                                      "type": "number"
                                    },
                                    "ciLow": {
                                      "type": "number"
                                    },
                                    "ciHigh": {
                                      "type": "number"
                                    },
                                    "method": {
                                      "type": "string",
                                      "enum": [
                                        "stderr",
                                        "bootstrap",
                                        "binomial",
                                        "custom"
                                      ]
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "breakdowns": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "dimension": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 128
                                      },
                                      "key": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 256
                                      },
                                      "value": {
                                        "type": "number",
                                        "nullable": true
                                      },
                                      "sampleCount": {
                                        "type": "integer",
                                        "minimum": 0
                                      }
                                    },
                                    "required": [
                                      "dimension",
                                      "key",
                                      "value",
                                      "sampleCount"
                                    ],
                                    "additionalProperties": false
                                  },
                                  "maxItems": 32,
                                  "default": []
                                }
                              },
                              "required": [
                                "scorerId",
                                "scorerName",
                                "displayName",
                                "scoreKind",
                                "value",
                                "unit",
                                "aggregation",
                                "higherIsBetter",
                                "objective",
                                "passed",
                                "evidence"
                              ],
                              "additionalProperties": false
                            },
                            "maxItems": 64,
                            "default": []
                          },
                          "gateSummary": {
                            "type": "object",
                            "properties": {
                              "gateId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "status": {
                                "type": "string",
                                "enum": [
                                  "passed",
                                  "failed",
                                  "warning",
                                  "not_evaluated"
                                ]
                              },
                              "blocking": {
                                "type": "boolean"
                              },
                              "failedScorers": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 128
                                },
                                "maxItems": 64
                              },
                              "warnings": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 512
                                },
                                "maxItems": 32
                              },
                              "baselineEvalRunId": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 128
                              },
                              "evaluatedAtMs": {
                                "type": "integer",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "gateId",
                              "status",
                              "blocking",
                              "failedScorers",
                              "warnings",
                              "evaluatedAtMs"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdBy": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "user",
                                  "agent",
                                  "service"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256
                              },
                              "displayName": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "nullable": true
                              }
                            },
                            "required": [
                              "kind",
                              "id"
                            ],
                            "additionalProperties": false,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "projectId",
                          "evalRunId",
                          "runId",
                          "suiteId",
                          "datasetId",
                          "datasetVersion",
                          "config",
                          "status",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "truncated": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "limit",
                        "returned",
                        "truncated"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "projectId",
                    "modelVersionId",
                    "model",
                    "evalRuns",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/models/{modelVersionId}/aliases": {
      "post": {
        "operationId": "updateProjectModelAliases",
        "tags": [
          "models"
        ],
        "summary": "Update aliases for a checkpoint-backed model artifact.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "modelVersionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "aliases": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[a-zA-Z0-9_.-]+$"
                    },
                    "maxItems": 16
                  }
                },
                "required": [
                  "aliases"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "object",
                      "properties": {
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "modelVersionId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "version": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "source": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "checkpoint_artifact"
                              ]
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            }
                          },
                          "required": [
                            "kind",
                            "runId",
                            "artifactId"
                          ],
                          "additionalProperties": false
                        },
                        "aliases": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64,
                            "pattern": "^[a-zA-Z0-9_.-]+$"
                          },
                          "maxItems": 16
                        },
                        "artifact": {
                          "type": "object",
                          "properties": {
                            "artifactId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "projectId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "runId": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "name": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "artifactType": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "nullable": true
                            },
                            "aliases": {
                              "type": "array",
                              "items": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 64,
                                "pattern": "^[a-zA-Z0-9_.-]+$"
                              },
                              "maxItems": 16
                            },
                            "retentionPolicy": {
                              "type": "object",
                              "properties": {
                                "strategy": {
                                  "type": "string",
                                  "enum": [
                                    "keep_last"
                                  ]
                                },
                                "keepLast": {
                                  "type": "integer",
                                  "exclusiveMinimum": true,
                                  "minimum": 0,
                                  "maximum": 100
                                }
                              },
                              "required": [
                                "strategy",
                                "keepLast"
                              ],
                              "additionalProperties": false,
                              "nullable": true
                            },
                            "version": {
                              "type": "integer",
                              "exclusiveMinimum": true,
                              "minimum": 0
                            },
                            "manifestHash": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 128
                            },
                            "fileCount": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "totalSizeBytes": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "createdAtMs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "finalizedAtMs": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "files": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "path": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 512
                                  },
                                  "sizeBytes": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 5368709120
                                  },
                                  "sha256": {
                                    "type": "string",
                                    "pattern": "^[a-f0-9]{64}$"
                                  },
                                  "contentType": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 256
                                  },
                                  "storageVersionId": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 1024
                                  }
                                },
                                "required": [
                                  "path",
                                  "sizeBytes",
                                  "sha256"
                                ],
                                "additionalProperties": false
                              },
                              "maxItems": 100
                            },
                            "metadata": {
                              "type": "object",
                              "additionalProperties": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "maxLength": 2048
                                  },
                                  {
                                    "type": "number"
                                  },
                                  {
                                    "type": "boolean"
                                  },
                                  {
                                    "enum": [
                                      "null"
                                    ],
                                    "nullable": true
                                  }
                                ]
                              }
                            }
                          },
                          "required": [
                            "artifactId",
                            "projectId",
                            "runId",
                            "name",
                            "artifactType",
                            "aliases",
                            "retentionPolicy",
                            "version",
                            "manifestHash",
                            "fileCount",
                            "totalSizeBytes",
                            "createdAtMs",
                            "finalizedAtMs",
                            "files",
                            "metadata"
                          ],
                          "additionalProperties": false
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "projectId",
                        "modelVersionId",
                        "name",
                        "version",
                        "source",
                        "aliases",
                        "artifact",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "model"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/runs/{runId}/archive": {
      "post": {
        "operationId": "archiveWorkspaceProjectRun",
        "tags": [
          "metadata"
        ],
        "summary": "Archive a run.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "projectSlug",
                    "runId",
                    "archivedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/runs/{runId}/unarchive": {
      "post": {
        "operationId": "unarchiveWorkspaceProjectRun",
        "tags": [
          "metadata"
        ],
        "summary": "Unarchive a run.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "runId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "projectSlug",
                    "runId",
                    "archivedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}": {
      "get": {
        "operationId": "getWorkspace",
        "tags": [
          "admin"
        ],
        "summary": "Get workspace admin summary.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "sessionMaxTtlMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "name",
                        "sessionMaxTtlMs",
                        "archivedAtMs",
                        "deletedAtMs",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspace"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "patch": {
        "operationId": "updateWorkspace",
        "tags": [
          "admin"
        ],
        "summary": "Update workspace settings.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "sessionMaxTtlMs": {
                    "type": "integer",
                    "minimum": 900000,
                    "maximum": 2592000000,
                    "nullable": true
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspace": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "sessionMaxTtlMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "archivedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "deletedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "name",
                        "sessionMaxTtlMs",
                        "archivedAtMs",
                        "deletedAtMs",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspace"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "delete": {
        "operationId": "deleteWorkspace",
        "tags": [
          "admin"
        ],
        "summary": "Delete a workspace.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "deletedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "deletedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/access-summary": {
      "get": {
        "operationId": "getWorkspaceAccessSummary",
        "tags": [
          "admin"
        ],
        "summary": "Get bounded workspace access and credential summary.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "scanLimit": {
                      "type": "integer",
                      "exclusiveMinimum": true,
                      "minimum": 0,
                      "maximum": 2000
                    },
                    "counts": {
                      "type": "object",
                      "properties": {
                        "members": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "pendingInvitations": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "projects": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "projectIngestionKeys": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "agents": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "agentKeys": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "webhooks": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        },
                        "recentAuditEvents": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "estimated": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "value",
                            "estimated"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "members",
                        "pendingInvitations",
                        "projects",
                        "projectIngestionKeys",
                        "agents",
                        "agentKeys",
                        "webhooks",
                        "recentAuditEvents"
                      ],
                      "additionalProperties": false
                    },
                    "risks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "level": {
                            "type": "string",
                            "enum": [
                              "info",
                              "warning",
                              "critical"
                            ]
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 96
                          },
                          "detail": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          }
                        },
                        "required": [
                          "level",
                          "label",
                          "detail"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 16
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "scanLimit",
                    "counts",
                    "risks"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/archive": {
      "post": {
        "operationId": "archiveWorkspace",
        "tags": [
          "admin"
        ],
        "summary": "Archive a workspace.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "archivedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/unarchive": {
      "post": {
        "operationId": "unarchiveWorkspace",
        "tags": [
          "admin"
        ],
        "summary": "Unarchive a workspace.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "archivedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/archive": {
      "post": {
        "operationId": "archiveWorkspaceProject",
        "tags": [
          "admin"
        ],
        "summary": "Archive a project.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "projectSlug",
                    "archivedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/unarchive": {
      "post": {
        "operationId": "unarchiveWorkspaceProject",
        "tags": [
          "admin"
        ],
        "summary": "Unarchive a project.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "projectSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "archivedAtMs": {
                      "type": "integer",
                      "minimum": 0,
                      "nullable": true
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "projectSlug",
                    "archivedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/members": {
      "get": {
        "operationId": "listProjectMembers",
        "tags": [
          "admin"
        ],
        "summary": "List project access grants.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "subjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "email": {
                            "type": "string",
                            "maxLength": 320,
                            "nullable": true
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ]
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "projectSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                            "nullable": true
                          },
                          "grantedBySubjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "grantedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "workspaceSlug",
                          "subjectId",
                          "name",
                          "email",
                          "role",
                          "projectId",
                          "projectSlug",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "members",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "upsertProjectMembership",
        "tags": [
          "admin"
        ],
        "summary": "Create or update a project access grant.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subjectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "viewer"
                    ]
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  }
                },
                "required": [
                  "subjectId",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "membership": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "subjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "email": {
                          "type": "string",
                          "maxLength": 320,
                          "nullable": true
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "grantedBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "grantedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "subjectId",
                        "name",
                        "email",
                        "role",
                        "projectId",
                        "projectSlug",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "membership"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/members/{subjectId}": {
      "delete": {
        "operationId": "removeProjectMembership",
        "tags": [
          "admin"
        ],
        "summary": "Remove a project access grant.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "removed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "status",
                    "removed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/invitations": {
      "post": {
        "operationId": "createProjectInvitation",
        "tags": [
          "admin"
        ],
        "summary": "Create a project-scoped invitation.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "viewer"
                    ]
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 90,
                    "default": 7
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "invitationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "emailNormalized": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "resentAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "acceptedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "invitationId",
                        "orgId",
                        "workspaceSlug",
                        "email",
                        "emailNormalized",
                        "role",
                        "projectId",
                        "projectSlug",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "expiresAtMs",
                        "resentAtMs",
                        "acceptedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "invitation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listProjectInvitations",
        "tags": [
          "admin"
        ],
        "summary": "List project-scoped invitations.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "invitations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "invitationId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "email": {
                            "type": "string",
                            "format": "email",
                            "maxLength": 320
                          },
                          "emailNormalized": {
                            "type": "string",
                            "format": "email",
                            "maxLength": 320
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ]
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "projectSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "revoked",
                              "expired"
                            ]
                          },
                          "createdBySubjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          },
                          "resentAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "acceptedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "invitationId",
                          "orgId",
                          "workspaceSlug",
                          "email",
                          "emailNormalized",
                          "role",
                          "projectId",
                          "projectSlug",
                          "status",
                          "createdBySubjectId",
                          "createdAtMs",
                          "updatedAtMs",
                          "expiresAtMs",
                          "resentAtMs",
                          "acceptedAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "invitations",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/invitations/{invitationId}/revoke": {
      "post": {
        "operationId": "revokeProjectInvitation",
        "tags": [
          "admin"
        ],
        "summary": "Revoke a project-scoped invitation.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "invitationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "emailNormalized": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "resentAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "acceptedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "invitationId",
                        "orgId",
                        "workspaceSlug",
                        "email",
                        "emailNormalized",
                        "role",
                        "projectId",
                        "projectSlug",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "expiresAtMs",
                        "resentAtMs",
                        "acceptedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "invitation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/members": {
      "get": {
        "operationId": "listWorkspaceMembers",
        "tags": [
          "admin"
        ],
        "summary": "List workspace members.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "members": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "subjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "email": {
                            "type": "string",
                            "maxLength": 320,
                            "nullable": true
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ]
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "projectSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                            "nullable": true
                          },
                          "grantedBySubjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "grantedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "workspaceSlug",
                          "subjectId",
                          "name",
                          "email",
                          "role",
                          "projectId",
                          "projectSlug",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "members",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "upsertWorkspaceMembership",
        "tags": [
          "admin"
        ],
        "summary": "Create or update workspace membership.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subjectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "viewer"
                    ]
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  }
                },
                "required": [
                  "subjectId",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "membership": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "subjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "email": {
                          "type": "string",
                          "maxLength": 320,
                          "nullable": true
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "grantedBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "grantedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "subjectId",
                        "name",
                        "email",
                        "role",
                        "projectId",
                        "projectSlug",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "membership"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/members/{subjectId}": {
      "delete": {
        "operationId": "removeWorkspaceMembership",
        "tags": [
          "admin"
        ],
        "summary": "Remove workspace membership.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "removed": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "status",
                    "removed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/ownership/transfer": {
      "post": {
        "operationId": "transferWorkspaceOwnership",
        "tags": [
          "admin"
        ],
        "summary": "Transfer workspace ownership.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subjectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "subjectId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "previousOwnerSubjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "newOwnerSubjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 256
                    },
                    "transferredAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "workspaceSlug",
                    "previousOwnerSubjectId",
                    "newOwnerSubjectId",
                    "transferredAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/invitations": {
      "post": {
        "operationId": "createInvitation",
        "tags": [
          "admin"
        ],
        "summary": "Create workspace invitation.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "maxLength": 320
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member",
                      "viewer"
                    ]
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "nullable": true
                  },
                  "expiresInDays": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0,
                    "maximum": 90,
                    "default": 7
                  }
                },
                "required": [
                  "email",
                  "role"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "invitationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "emailNormalized": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "resentAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "acceptedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "invitationId",
                        "orgId",
                        "workspaceSlug",
                        "email",
                        "emailNormalized",
                        "role",
                        "projectId",
                        "projectSlug",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "expiresAtMs",
                        "resentAtMs",
                        "acceptedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "invitation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listInvitations",
        "tags": [
          "admin"
        ],
        "summary": "List workspace invitations.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "invitations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "invitationId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "email": {
                            "type": "string",
                            "format": "email",
                            "maxLength": 320
                          },
                          "emailNormalized": {
                            "type": "string",
                            "format": "email",
                            "maxLength": 320
                          },
                          "role": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "admin",
                              "member",
                              "viewer"
                            ]
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "projectSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                            "nullable": true
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "pending",
                              "accepted",
                              "revoked",
                              "expired"
                            ]
                          },
                          "createdBySubjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0
                          },
                          "resentAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "acceptedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "invitationId",
                          "orgId",
                          "workspaceSlug",
                          "email",
                          "emailNormalized",
                          "role",
                          "projectId",
                          "projectSlug",
                          "status",
                          "createdBySubjectId",
                          "createdAtMs",
                          "updatedAtMs",
                          "expiresAtMs",
                          "resentAtMs",
                          "acceptedAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 100
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "invitations",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/invitations/{invitationId}/resend": {
      "post": {
        "operationId": "resendInvitation",
        "tags": [
          "admin"
        ],
        "summary": "Resend workspace invitation.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "invitationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "emailNormalized": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "resentAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "acceptedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "invitationId",
                        "orgId",
                        "workspaceSlug",
                        "email",
                        "emailNormalized",
                        "role",
                        "projectId",
                        "projectSlug",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "expiresAtMs",
                        "resentAtMs",
                        "acceptedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "invitation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/invitations/{invitationId}/revoke": {
      "post": {
        "operationId": "revokeInvitation",
        "tags": [
          "admin"
        ],
        "summary": "Revoke workspace invitation.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "invitationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "emailNormalized": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "resentAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "acceptedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "invitationId",
                        "orgId",
                        "workspaceSlug",
                        "email",
                        "emailNormalized",
                        "role",
                        "projectId",
                        "projectSlug",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "expiresAtMs",
                        "resentAtMs",
                        "acceptedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "invitation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/invitations/{invitationId}/accept": {
      "post": {
        "operationId": "acceptInvitation",
        "tags": [
          "admin"
        ],
        "summary": "Accept workspace invitation.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "invitationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invitation": {
                      "type": "object",
                      "properties": {
                        "invitationId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "email": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "emailNormalized": {
                          "type": "string",
                          "format": "email",
                          "maxLength": 320
                        },
                        "role": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member",
                            "viewer"
                          ]
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "projectSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "nullable": true
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "accepted",
                            "revoked",
                            "expired"
                          ]
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0
                        },
                        "resentAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "acceptedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "invitationId",
                        "orgId",
                        "workspaceSlug",
                        "email",
                        "emailNormalized",
                        "role",
                        "projectId",
                        "projectSlug",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "expiresAtMs",
                        "resentAtMs",
                        "acceptedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "invitation"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/projects/{projectId}/api-keys": {
      "post": {
        "operationId": "createProjectApiKey",
        "tags": [
          "auth"
        ],
        "summary": "Create project API key compatibility route.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "project:read",
                        "metrics:write",
                        "logs:write",
                        "traces:write",
                        "artifacts:write",
                        "evals:write",
                        "exports:read",
                        "stream:read"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 16
                  },
                  "expiresAtMs": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  }
                },
                "required": [
                  "projectId",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "keyId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "principalType": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent"
                          ],
                          "default": "user"
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "project:read",
                              "metrics:write",
                              "logs:write",
                              "traces:write",
                              "artifacts:write",
                              "evals:write",
                              "exports:read",
                              "stream:read"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 16
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "token": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "keyId",
                        "orgId",
                        "projectId",
                        "label",
                        "scopes",
                        "createdAtMs",
                        "expiresAtMs",
                        "revokedAtMs",
                        "token"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "apiKey"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listProjectApiKeys",
        "tags": [
          "auth"
        ],
        "summary": "List project API keys compatibility route.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "keyId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "principalType": {
                            "type": "string",
                            "enum": [
                              "user",
                              "agent"
                            ],
                            "default": "user"
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "project:read",
                                "metrics:write",
                                "logs:write",
                                "traces:write",
                                "artifacts:write",
                                "evals:write",
                                "exports:read",
                                "stream:read"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 16
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "nullable": true
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "keyId",
                          "orgId",
                          "projectId",
                          "label",
                          "scopes",
                          "createdAtMs",
                          "expiresAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "projectId",
                    "keys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/projects/{projectId}/api-keys/{keyId}/revoke": {
      "post": {
        "operationId": "revokeProjectApiKey",
        "tags": [
          "auth"
        ],
        "summary": "Revoke project API key compatibility route.",
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "keyId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "projectId",
                  "keyId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "keyId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "revokedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "keyId",
                    "revokedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/api-keys": {
      "post": {
        "operationId": "createWorkspaceProjectApiKey",
        "tags": [
          "auth"
        ],
        "summary": "Create project API key.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "project:read",
                        "metrics:write",
                        "logs:write",
                        "traces:write",
                        "artifacts:write",
                        "evals:write",
                        "exports:read",
                        "stream:read"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 16
                  },
                  "expiresAtMs": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  }
                },
                "required": [
                  "workspaceSlug",
                  "projectSlug",
                  "scopes"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "keyId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "principalType": {
                          "type": "string",
                          "enum": [
                            "user",
                            "agent"
                          ],
                          "default": "user"
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "project:read",
                              "metrics:write",
                              "logs:write",
                              "traces:write",
                              "artifacts:write",
                              "evals:write",
                              "exports:read",
                              "stream:read"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 16
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "token": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "keyId",
                        "orgId",
                        "projectId",
                        "label",
                        "scopes",
                        "createdAtMs",
                        "expiresAtMs",
                        "revokedAtMs",
                        "token"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "apiKey"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listWorkspaceProjectApiKeys",
        "tags": [
          "auth"
        ],
        "summary": "List project API keys.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "projectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "keyId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "principalType": {
                            "type": "string",
                            "enum": [
                              "user",
                              "agent"
                            ],
                            "default": "user"
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "project:read",
                                "metrics:write",
                                "logs:write",
                                "traces:write",
                                "artifacts:write",
                                "evals:write",
                                "exports:read",
                                "stream:read"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 16
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "nullable": true
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "keyId",
                          "orgId",
                          "projectId",
                          "label",
                          "scopes",
                          "createdAtMs",
                          "expiresAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "projectId",
                    "keys"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/projects/{projectSlug}/api-keys/{keyId}/revoke": {
      "post": {
        "operationId": "revokeWorkspaceProjectApiKey",
        "tags": [
          "auth"
        ],
        "summary": "Revoke project API key.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "projectSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "keyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "keyId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "workspaceSlug",
                  "projectSlug",
                  "keyId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "keyId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "revokedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "keyId",
                    "revokedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/agents": {
      "get": {
        "operationId": "listWorkspaceAgents",
        "tags": [
          "agents"
        ],
        "summary": "List agent principals.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "agents": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "name": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "active",
                              "revoked"
                            ]
                          },
                          "ownerScope": {
                            "type": "string",
                            "enum": [
                              "workspace",
                              "user"
                            ],
                            "default": "workspace"
                          },
                          "ownerSubjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256,
                            "nullable": true
                          },
                          "createdBySubjectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "orgId",
                          "agentId",
                          "name",
                          "status",
                          "createdBySubjectId",
                          "createdAtMs",
                          "updatedAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "orgId",
                    "agents",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "createAgent",
        "tags": [
          "agents"
        ],
        "summary": "Create agent principal.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "ownerScope": {
                    "type": "string",
                    "enum": [
                      "workspace",
                      "user"
                    ],
                    "default": "user"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "revoked"
                          ]
                        },
                        "ownerScope": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "user"
                          ],
                          "default": "workspace"
                        },
                        "ownerSubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "orgId",
                        "agentId",
                        "name",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "agent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/agents/{agentId}/revoke": {
      "post": {
        "operationId": "revokeAgent",
        "tags": [
          "agents"
        ],
        "summary": "Revoke agent principal.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "agentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "workspaceSlug",
                  "agentId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "revoked"
                          ]
                        },
                        "ownerScope": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "user"
                          ],
                          "default": "workspace"
                        },
                        "ownerSubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "orgId",
                        "agentId",
                        "name",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    },
                    "revokedKeyIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 128
                      },
                      "maxItems": 100
                    }
                  },
                  "required": [
                    "status",
                    "agent",
                    "revokedKeyIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/agents/{agentId}/promote": {
      "post": {
        "operationId": "promoteAgent",
        "tags": [
          "agents"
        ],
        "summary": "Promote a personal agent to workspace ownership.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "agentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  }
                },
                "required": [
                  "workspaceSlug",
                  "agentId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "agent": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "name": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "active",
                            "revoked"
                          ]
                        },
                        "ownerScope": {
                          "type": "string",
                          "enum": [
                            "workspace",
                            "user"
                          ],
                          "default": "workspace"
                        },
                        "ownerSubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256,
                          "nullable": true
                        },
                        "createdBySubjectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 256
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        }
                      },
                      "required": [
                        "orgId",
                        "agentId",
                        "name",
                        "status",
                        "createdBySubjectId",
                        "createdAtMs",
                        "updatedAtMs",
                        "revokedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "status",
                    "agent"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/agents/{agentId}/api-keys": {
      "post": {
        "operationId": "createAgentApiKey",
        "tags": [
          "agents"
        ],
        "summary": "Create agent API key.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspaceSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "agentId": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "projectSlug": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                  },
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "scopes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "project:read",
                        "metrics:write",
                        "logs:write",
                        "traces:write",
                        "artifacts:write",
                        "evals:write",
                        "exports:read",
                        "stream:read"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 16
                  },
                  "expiresAtMs": {
                    "type": "integer",
                    "exclusiveMinimum": true,
                    "minimum": 0
                  }
                },
                "required": [
                  "workspaceSlug",
                  "agentId",
                  "projectSlug"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiKey": {
                      "type": "object",
                      "properties": {
                        "keyId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "projectId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "principalType": {
                          "type": "string",
                          "enum": [
                            "agent"
                          ]
                        },
                        "agentId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "nullable": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "project:read",
                              "metrics:write",
                              "logs:write",
                              "traces:write",
                              "artifacts:write",
                              "evals:write",
                              "exports:read",
                              "stream:read"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 16
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "expiresAtMs": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "revokedAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "token": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "keyId",
                        "orgId",
                        "projectId",
                        "principalType",
                        "agentId",
                        "label",
                        "scopes",
                        "createdAtMs",
                        "expiresAtMs",
                        "revokedAtMs",
                        "token"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "apiKey"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "get": {
        "operationId": "listAgentApiKeys",
        "tags": [
          "agents"
        ],
        "summary": "List agent API keys.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "agentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "agentId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "keys": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "keyId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "principalType": {
                            "type": "string",
                            "enum": [
                              "user",
                              "agent"
                            ],
                            "default": "user"
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "scopes": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "project:read",
                                "metrics:write",
                                "logs:write",
                                "traces:write",
                                "artifacts:write",
                                "evals:write",
                                "exports:read",
                                "stream:read"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 16
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "expiresAtMs": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "nullable": true
                          },
                          "revokedAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          }
                        },
                        "required": [
                          "keyId",
                          "orgId",
                          "projectId",
                          "label",
                          "scopes",
                          "createdAtMs",
                          "expiresAtMs",
                          "revokedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "orgId",
                    "agentId",
                    "keys",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/audit": {
      "get": {
        "operationId": "listWorkspaceAuditEvents",
        "tags": [
          "agents"
        ],
        "summary": "List bounded workspace audit events.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "events": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "eventId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "actorKind": {
                            "type": "string",
                            "enum": [
                              "user",
                              "api_key",
                              "agent",
                              "system"
                            ]
                          },
                          "actorId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "action": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "targetKind": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 64
                          },
                          "targetId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "projectId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "agentId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "details": {
                            "type": "object",
                            "additionalProperties": {},
                            "nullable": true
                          }
                        },
                        "required": [
                          "orgId",
                          "eventId",
                          "actorKind",
                          "actorId",
                          "action",
                          "targetKind",
                          "targetId",
                          "projectId",
                          "agentId",
                          "createdAtMs",
                          "details"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "orgId",
                    "events",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/webhooks": {
      "get": {
        "operationId": "listWebhooks",
        "tags": [
          "webhooks"
        ],
        "summary": "List workspace webhook configs.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "webhooks": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "workspaceSlug": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128,
                            "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                          },
                          "webhookId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "label": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "url": {
                            "type": "string",
                            "format": "uri",
                            "maxLength": 2048
                          },
                          "events": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "run.finished",
                                "run.failed",
                                "run.stalled",
                                "eval.regression"
                              ]
                            },
                            "minItems": 1,
                            "maxItems": 4
                          },
                          "enabled": {
                            "type": "boolean"
                          },
                          "slackCompatible": {
                            "type": "boolean"
                          },
                          "secretConfigured": {
                            "type": "boolean"
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "lastDeliveryStatus": {
                            "type": "string",
                            "enum": [
                              "delivered",
                              "dead_letter"
                            ],
                            "nullable": true
                          },
                          "lastDeliveryAtMs": {
                            "type": "integer",
                            "minimum": 0,
                            "nullable": true
                          },
                          "lastError": {
                            "type": "string",
                            "maxLength": 512,
                            "nullable": true
                          }
                        },
                        "required": [
                          "orgId",
                          "workspaceSlug",
                          "webhookId",
                          "label",
                          "url",
                          "events",
                          "enabled",
                          "slackCompatible",
                          "secretConfigured",
                          "createdAtMs",
                          "updatedAtMs",
                          "lastDeliveryStatus",
                          "lastDeliveryAtMs",
                          "lastError"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 50
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "orgId",
                    "webhooks",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "post": {
        "operationId": "createWebhook",
        "tags": [
          "webhooks"
        ],
        "summary": "Create workspace webhook config.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "secret": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 256
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "run.finished",
                        "run.failed",
                        "run.stalled",
                        "eval.regression"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 4
                  },
                  "enabled": {
                    "type": "boolean",
                    "default": true
                  },
                  "slackCompatible": {
                    "type": "boolean",
                    "default": false
                  }
                },
                "required": [
                  "label",
                  "url",
                  "secret",
                  "events"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "webhookId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "maxLength": 2048
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "run.finished",
                              "run.failed",
                              "run.stalled",
                              "eval.regression"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 4
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "slackCompatible": {
                          "type": "boolean"
                        },
                        "secretConfigured": {
                          "type": "boolean"
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "lastDeliveryStatus": {
                          "type": "string",
                          "enum": [
                            "delivered",
                            "dead_letter"
                          ],
                          "nullable": true
                        },
                        "lastDeliveryAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "lastError": {
                          "type": "string",
                          "maxLength": 512,
                          "nullable": true
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "webhookId",
                        "label",
                        "url",
                        "events",
                        "enabled",
                        "slackCompatible",
                        "secretConfigured",
                        "createdAtMs",
                        "updatedAtMs",
                        "lastDeliveryStatus",
                        "lastDeliveryAtMs",
                        "lastError"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "webhook"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/webhooks/{webhookId}": {
      "patch": {
        "operationId": "updateWebhook",
        "tags": [
          "webhooks"
        ],
        "summary": "Update workspace webhook config.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 128
                  },
                  "url": {
                    "type": "string",
                    "format": "uri",
                    "maxLength": 2048
                  },
                  "secret": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 256
                  },
                  "events": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "run.finished",
                        "run.failed",
                        "run.stalled",
                        "eval.regression"
                      ]
                    },
                    "minItems": 1,
                    "maxItems": 4
                  },
                  "enabled": {
                    "type": "boolean"
                  },
                  "slackCompatible": {
                    "type": "boolean"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhook": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "workspaceSlug": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                        },
                        "webhookId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "maxLength": 2048
                        },
                        "events": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "enum": [
                              "run.finished",
                              "run.failed",
                              "run.stalled",
                              "eval.regression"
                            ]
                          },
                          "minItems": 1,
                          "maxItems": 4
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "slackCompatible": {
                          "type": "boolean"
                        },
                        "secretConfigured": {
                          "type": "boolean"
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "lastDeliveryStatus": {
                          "type": "string",
                          "enum": [
                            "delivered",
                            "dead_letter"
                          ],
                          "nullable": true
                        },
                        "lastDeliveryAtMs": {
                          "type": "integer",
                          "minimum": 0,
                          "nullable": true
                        },
                        "lastError": {
                          "type": "string",
                          "maxLength": 512,
                          "nullable": true
                        }
                      },
                      "required": [
                        "orgId",
                        "workspaceSlug",
                        "webhookId",
                        "label",
                        "url",
                        "events",
                        "enabled",
                        "slackCompatible",
                        "secretConfigured",
                        "createdAtMs",
                        "updatedAtMs",
                        "lastDeliveryStatus",
                        "lastDeliveryAtMs",
                        "lastError"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "webhook"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      },
      "delete": {
        "operationId": "deleteWebhook",
        "tags": [
          "webhooks"
        ],
        "summary": "Delete workspace webhook config.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "webhookId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "deletedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "webhookId",
                    "deletedAtMs"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/webhooks/{webhookId}/test": {
      "post": {
        "operationId": "testWebhook",
        "tags": [
          "webhooks"
        ],
        "summary": "Send a test webhook delivery.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "delivery": {
                      "type": "object",
                      "properties": {
                        "orgId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "webhookId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "deliveryId": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 128
                        },
                        "eventType": {
                          "type": "string",
                          "enum": [
                            "run.finished",
                            "run.failed",
                            "run.stalled",
                            "eval.regression",
                            "webhook.test"
                          ]
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "delivered",
                            "dead_letter"
                          ]
                        },
                        "attempts": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 3
                        },
                        "statusCode": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "nullable": true
                        },
                        "error": {
                          "type": "string",
                          "maxLength": 512,
                          "nullable": true
                        },
                        "createdAtMs": {
                          "type": "integer",
                          "minimum": 0
                        },
                        "updatedAtMs": {
                          "type": "integer",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "orgId",
                        "webhookId",
                        "deliveryId",
                        "eventType",
                        "status",
                        "attempts",
                        "statusCode",
                        "error",
                        "createdAtMs",
                        "updatedAtMs"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "delivery"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/webhook-deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "tags": [
          "webhooks"
        ],
        "summary": "List bounded workspace webhook delivery records.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "workspaceSlug": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128,
                      "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
                    },
                    "orgId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "deliveries": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "orgId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "webhookId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "deliveryId": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 128
                          },
                          "eventType": {
                            "type": "string",
                            "enum": [
                              "run.finished",
                              "run.failed",
                              "run.stalled",
                              "eval.regression",
                              "webhook.test"
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "delivered",
                              "dead_letter"
                            ]
                          },
                          "attempts": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "maximum": 3
                          },
                          "statusCode": {
                            "type": "integer",
                            "exclusiveMinimum": true,
                            "minimum": 0,
                            "nullable": true
                          },
                          "error": {
                            "type": "string",
                            "maxLength": 512,
                            "nullable": true
                          },
                          "createdAtMs": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "updatedAtMs": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "orgId",
                          "webhookId",
                          "deliveryId",
                          "eventType",
                          "status",
                          "attempts",
                          "statusCode",
                          "error",
                          "createdAtMs",
                          "updatedAtMs"
                        ],
                        "additionalProperties": false
                      },
                      "maxItems": 100
                    },
                    "page": {
                      "type": "object",
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 1024,
                          "nullable": true
                        },
                        "limit": {
                          "type": "integer",
                          "exclusiveMinimum": true,
                          "minimum": 0,
                          "maximum": 200
                        },
                        "returned": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 200
                        }
                      },
                      "required": [
                        "hasMore",
                        "nextCursor",
                        "limit",
                        "returned"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "workspaceSlug",
                    "orgId",
                    "deliveries",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/accounts/{subjectId}/password/reset": {
      "post": {
        "operationId": "adminResetPassword",
        "tags": [
          "account"
        ],
        "summary": "Reset a workspace account password.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "newPassword": {
                    "type": "string",
                    "minLength": 8,
                    "maxLength": 256
                  },
                  "revokeSessions": {
                    "type": "boolean",
                    "default": true
                  },
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "required": [
                  "newPassword"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "resetAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sessionsRevoked": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "subjectId",
                    "resetAtMs",
                    "sessionsRevoked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/accounts/{subjectId}/disable": {
      "post": {
        "operationId": "disableAccount",
        "tags": [
          "account"
        ],
        "summary": "Disable a workspace account.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "changedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sessionsRevoked": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "subjectId",
                    "active",
                    "changedAtMs",
                    "sessionsRevoked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/accounts/{subjectId}/reactivate": {
      "post": {
        "operationId": "reactivateAccount",
        "tags": [
          "account"
        ],
        "summary": "Reactivate a workspace account.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 256
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "active": {
                      "type": "boolean"
                    },
                    "changedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sessionsRevoked": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "subjectId",
                    "active",
                    "changedAtMs",
                    "sessionsRevoked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    },
    "/api/v1/workspaces/{workspaceSlug}/accounts/{subjectId}/force-signout": {
      "post": {
        "operationId": "forceSignOutAccount",
        "tags": [
          "account"
        ],
        "summary": "Force sign-out for a workspace account.",
        "parameters": [
          {
            "name": "workspaceSlug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "ok"
                      ]
                    },
                    "subjectId": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 128
                    },
                    "revokedAtMs": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "sessionsRevoked": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "status",
                    "subjectId",
                    "revokedAtMs",
                    "sessionsRevoked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "default": {
            "description": "Stable Rundial error envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "error"
                      ]
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "INVALID_REQUEST",
                            "REQUEST_TIMEOUT",
                            "PAYLOAD_TOO_LARGE",
                            "UNSUPPORTED_ENCODING",
                            "UNAUTHORIZED",
                            "FORBIDDEN",
                            "NOT_FOUND",
                            "CONFLICT",
                            "RATE_LIMITED",
                            "INTERNAL_ERROR",
                            "DEV_MODE_REQUIRED",
                            "AUTH_BOOTSTRAP_REQUIRED"
                          ]
                        },
                        "message": {
                          "type": "string",
                          "minLength": 1
                        },
                        "details": {}
                      },
                      "required": [
                        "code",
                        "message"
                      ],
                      "additionalProperties": false
                    },
                    "requestId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "status",
                    "error",
                    "requestId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "x-rundial-requires-auth": false
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "better-auth.session_token"
      }
    }
  }
}
