{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/devtune/json-schema/devtune-agent-picks-run-detail-schema.json",
  "title": "AgentPicksRunDetail",
  "x-generated": "2026-11-16",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/devtune-openapi.json#/components/schemas/AgentPicksRunDetail",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "run",
    "context",
    "pick",
    "integration",
    "evidence",
    "pagination"
  ],
  "properties": {
    "pagination": {
      "$ref": "#/$defs/ListPagination"
    },
    "run": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "test_id",
        "test_kind",
        "test_status",
        "agent",
        "model",
        "stage",
        "model_calls",
        "repetition",
        "status",
        "created_at",
        "started_at",
        "completed_at",
        "early_stopped",
        "wall_ms",
        "has_error",
        "cell_agreed",
        "origin",
        "series"
      ],
      "properties": {
        "origin": {
          "$ref": "#/$defs/AgentPicksOrigin"
        },
        "series": {
          "$ref": "#/$defs/AgentPicksRunSeries"
        },
        "id": {
          "type": "string",
          "format": "uuid"
        },
        "test_id": {
          "type": "string",
          "format": "uuid"
        },
        "test_kind": {
          "description": "What started the test: manual, scheduled, model_release, starter or retest.",
          "type": "string"
        },
        "test_status": {
          "type": "string",
          "enum": [
            "queued",
            "running",
            "failed",
            "cancelled",
            "completed"
          ]
        },
        "agent": {
          "description": "The coding agent, such as claude_code or codex.",
          "type": "string"
        },
        "stage": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "sandbox",
            "setup",
            "agent",
            "judging",
            null
          ],
          "description": "Current runner stage; null for queued, finished or older runs."
        },
        "model_calls": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Model calls the run made over all attempts; null when no activity was recorded."
        },
        "model": {
          "type": "string"
        },
        "repetition": {
          "description": "Which repetition of its cell the run is, counting from 1. In a re-test that covers several cells, the run's position in the whole re-test, from 1 to 40.",
          "type": "integer"
        },
        "status": {
          "description": "Where the run is. completed, failed and cancelled are final.",
          "type": "string",
          "enum": [
            "queued",
            "running",
            "failed",
            "cancelled",
            "completed"
          ]
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "started_at": {
          "description": "When the run started. Null while it is queued, and for a run cancelled or failed before it started.",
          "type": [
            "string",
            "null"
          ]
        },
        "completed_at": {
          "description": "When the run ended. Null until then.",
          "type": [
            "string",
            "null"
          ]
        },
        "early_stopped": {
          "description": "True when the runner stopped the agent before it exited on its own.",
          "type": "boolean"
        },
        "wall_ms": {
          "description": "How long the agent ran, in milliseconds. Null when not recorded.",
          "type": [
            "number",
            "null"
          ]
        },
        "has_error": {
          "description": "True when the run recorded an error. False for a cell_agreed run, whose cancel is not an error.",
          "type": "boolean"
        },
        "cell_agreed": {
          "description": "True when the run was cancelled before it started because its cell’s first 4 runs picked the same thing. It was not needed: not an error, not missing coverage, and not charged.",
          "type": "boolean"
        }
      }
    },
    "context": {
      "description": "What the run was given. The request, intent, job, classifier version and time limit are as recorded when its test was queued; environment is the catalogue's current entry for the run's test app.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "environment",
        "request",
        "request_withheld",
        "job_withheld",
        "intent",
        "job",
        "classifier_version",
        "agent_timeout_sec"
      ],
      "properties": {
        "environment": {
          "description": "The test app the run used.",
          "anyOf": [
            {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "slug",
                "name",
                "framework"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "slug": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "framework": {
                  "description": "The framework. Null for the empty folder.",
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "request_withheld": {
          "type": "boolean",
          "description": "True when the request text exists but is not returned."
        },
        "job_withheld": {
          "type": "boolean",
          "description": "True when the job description exists but is not returned."
        },
        "request": {
          "description": "Always null: the request text is withheld.",
          "type": [
            "string",
            "null"
          ]
        },
        "intent": {
          "description": "The request intent: recommend, add, hosted or improve. Null when not recorded.",
          "type": [
            "string",
            "null"
          ]
        },
        "job": {
          "description": "Always null: the job description is withheld.",
          "type": [
            "string",
            "null"
          ]
        },
        "classifier_version": {
          "description": "The classifier version the test used. Null when not recorded.",
          "type": [
            "string",
            "null"
          ]
        },
        "agent_timeout_sec": {
          "description": "How long the agent was allowed to run, in seconds. Null when not recorded.",
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "pick": {
      "description": "What the agent picked, as the classifier judged it. Null until the run is classified.",
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "outcome",
            "tool_key",
            "tool_display_name",
            "tool_brand_domain",
            "confidence",
            "classifier_version",
            "classifier_accuracy",
            "category_precision",
            "decided_by",
            "tool_packages",
            "tool_packages_withheld",
            "other_tools",
            "other_tools_withheld",
            "overlapping_tools",
            "custom_job",
            "diff_truncated"
          ],
          "properties": {
            "outcome": {
              "description": "What the agent did: installed, built_its_own, no_provider, other_tool, none or unclassified.",
              "type": "string"
            },
            "tool_key": {
              "description": "The tool the agent installed. Null unless outcome is installed.",
              "type": [
                "string",
                "null"
              ]
            },
            "tool_display_name": {
              "type": [
                "string",
                "null"
              ],
              "description": "That tool's name. Null when there is no tool or no name is recorded."
            },
            "tool_brand_domain": {
              "type": [
                "string",
                "null"
              ],
              "description": "That tool's website domain. Null when none is recorded."
            },
            "confidence": {
              "description": "How sure the classifier was, from 0 to 1. Null when not recorded.",
              "type": [
                "number",
                "null"
              ]
            },
            "classifier_version": {
              "description": "The classifier version that judged the run.",
              "type": "string"
            },
            "classifier_accuracy": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksClassifierAccuracy"
                },
                {
                  "type": "null"
                }
              ]
            },
            "category_precision": {
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksCategoryPrecision"
                },
                {
                  "type": "null"
                }
              ]
            },
            "decided_by": {
              "description": "What decided the outcome, such as package, stated_pick, config or nothing_found. Null when not recorded.",
              "type": [
                "string",
                "null"
              ]
            },
            "statement_index": {
              "type": "integer",
              "minimum": 0,
              "maximum": 10000,
              "description": "Optional sentence index in the redacted final answer; absent when no statement evidence is retained."
            },
            "tool_packages_withheld": {
              "type": "boolean",
              "description": "True when some packages the agent added are left out of tool_packages because they are not the tool's known packages."
            },
            "tool_packages": {
              "description": "The tool's known packages the agent added, as ecosystem:name.",
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "other_tools_withheld": {
              "type": "boolean",
              "description": "True when the agent used other tools, which are not named."
            },
            "other_tools": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Always empty: other tools are withheld."
            },
            "overlapping_tools": {
              "type": "array",
              "description": "When decided_by is ambiguous, the test’s tools the run used, none of which decided the pick; empty otherwise. On a custom job, saying which runs inside the other (signals.yieldsTo) decides such runs in later tests.",
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "tool_key",
                  "display_name"
                ],
                "properties": {
                  "tool_key": {
                    "type": "string",
                    "description": "A tool among several the run installed, when the classifier could not pick one."
                  },
                  "display_name": {
                    "type": "string"
                  }
                }
              }
            },
            "custom_job": {
              "type": "boolean",
              "description": "Whether the run’s test is the project’s own job and that job is still the project’s setup, so its tools and relationships can be edited. False for a ready-made category, and for a job the project has since switched away from."
            },
            "diff_truncated": {
              "description": "True when the agent's code changes were too long to read in full.",
              "type": "boolean"
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "integration": {
      "description": "Recorded observations for the picked tool, independent of the event page. Null for legacy runs or unavailable facts. Archive downloads do not prove installation; docs counts cover recognised documentation hosts/paths under the confirmed vendor domains saved for this run. Request schemes and ports are not retained, so docs identify hosts only. For scheduled project tests and DevTune board tests, registry.latest_version is registry metadata captured before queue insertion, valid only at registry.captured_at; it does not describe current registry state. New on-demand tests, free starter tests and Action re-tests do not capture registry metadata; comparison and deprecation remain unknown with no_snapshot. Previously retained snapshots remain readable. A comparison of differs does not mean outdated. These observations do not establish functional success or working use.",
      "anyOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "version",
            "tool_key",
            "coverage",
            "packages",
            "vendor_commands",
            "docs",
            "truncated"
          ],
          "properties": {
            "version": {
              "type": "integer",
              "const": 2
            },
            "tool_key": {
              "type": "string",
              "description": "The installed tool the observations are about."
            },
            "coverage": {
              "description": "Whether the agent transcript and the network log were captured in full. Where one was not, what it does not show is unknown, not no.",
              "type": "object",
              "additionalProperties": false,
              "required": [
                "transcript",
                "proxy"
              ],
              "properties": {
                "transcript": {
                  "type": "boolean",
                  "description": "True when the agent transcript was captured in full. False when it is missing or incomplete, including an OpenCode run that handed work to a child session."
                },
                "proxy": {
                  "type": "boolean",
                  "description": "True when the run's network log was captured in full. False when it is missing, has an unreadable line or recorded a failed TLS connection."
                }
              }
            },
            "packages": {
              "description": "The tool's packages the run's install log or downloads show, with the version seen. A download alone does not prove an install.",
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "name",
                  "version",
                  "source",
                  "registry"
                ],
                "properties": {
                  "registry": {
                    "description": "How the installed version compares with the package registry.",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "captured_at",
                      "source",
                      "latest_version",
                      "comparison",
                      "comparison_reason",
                      "deprecated",
                      "deprecation_reason"
                    ],
                    "properties": {
                      "captured_at": {
                        "description": "When the registry was read. Null when it was not.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "source": {
                        "description": "The registry read: registry.npmjs.org, pypi.org or rubygems.org. Null when none was.",
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          "registry.npmjs.org",
                          "pypi.org",
                          "rubygems.org",
                          null
                        ]
                      },
                      "latest_version": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The registry's latest version then. Null when the registry did not return one."
                      },
                      "comparison": {
                        "description": "matches_registry_latest, differs, or unknown.",
                        "type": "string",
                        "enum": [
                          "matches_registry_latest",
                          "differs",
                          "unknown"
                        ]
                      },
                      "comparison_reason": {
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unsupported",
                          "wildcard",
                          "malformed",
                          "capped",
                          "timeout",
                          "not_found",
                          "lookup_identity_unknown",
                          "redirected",
                          "no_snapshot",
                          "no_observed_version",
                          "version_not_captured",
                          "non_version",
                          "compared",
                          "version_captured"
                        ]
                      },
                      "deprecated": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Whether npm marks the installed version deprecated. Null when not checked."
                      },
                      "deprecation_reason": {
                        "description": "Why deprecated is what it is.",
                        "type": "string",
                        "enum": [
                          "available",
                          "unavailable",
                          "unsupported",
                          "wildcard",
                          "malformed",
                          "capped",
                          "timeout",
                          "not_found",
                          "lookup_identity_unknown",
                          "redirected",
                          "no_snapshot",
                          "no_observed_version",
                          "version_not_captured",
                          "non_version",
                          "compared",
                          "version_captured"
                        ]
                      }
                    }
                  },
                  "name": {
                    "type": "string"
                  },
                  "version": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The installed version. Null when source is conflicting."
                  },
                  "source": {
                    "description": "Where the version was seen: install_log when the install log names it, download when only a download does, or conflicting when the sightings name different versions and none is clearly the latest.",
                    "type": "string",
                    "enum": [
                      "install_log",
                      "download",
                      "conflicting"
                    ]
                  }
                }
              }
            },
            "vendor_commands": {
              "description": "The tool's own package commands that ran successfully.",
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "package",
                  "count"
                ],
                "properties": {
                  "package": {
                    "type": "string",
                    "description": "The package whose command ran."
                  },
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "How many times it ran successfully."
                  }
                }
              }
            },
            "docs": {
              "description": "Requests for the tool's documentation pages in the run's network log, by host: a docs host such as docs.example.com, or a docs path such as /docs on the tool's domain.",
              "type": "array",
              "maxItems": 100,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "host",
                  "requests",
                  "failures",
                  "repeated_requests"
                ],
                "properties": {
                  "host": {
                    "type": "string"
                  },
                  "requests": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Documentation page requests to it."
                  },
                  "failures": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Of those, failed requests."
                  },
                  "repeated_requests": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Of those, repeats of an earlier request."
                  }
                }
              }
            },
            "truncated": {
              "type": "boolean",
              "description": "True when some observations were left out."
            }
          }
        },
        {
          "type": "null"
        }
      ]
    },
    "evidence": {
      "description": "What the agent did during the run, step by step.",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "availability",
        "items",
        "pagination"
      ],
      "properties": {
        "availability": {
          "description": "recorded when steps are returned, end_of_trail when a later page has none, not_retained when the run kept none.",
          "type": "string",
          "enum": [
            "recorded",
            "not_retained",
            "end_of_trail"
          ]
        },
        "items": {
          "description": "Steps in order.",
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "seq",
              "kind",
              "url",
              "status_code",
              "recorded_at",
              "observed_at",
              "detail"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "seq": {
                "description": "The step's position in the run.",
                "type": "integer"
              },
              "kind": {
                "description": "search, fetch, read, command, install or write.",
                "type": "string",
                "enum": [
                  "search",
                  "fetch",
                  "read",
                  "command",
                  "install",
                  "write"
                ]
              },
              "url": {
                "description": "The origin a fetch went to. Null for other steps.",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status_code": {
                "description": "The HTTP status of a fetch. Null when none.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "recorded_at": {
                "type": "string"
              },
              "observed_at": {
                "description": "When the step happened in the run, in epoch milliseconds. Null for a step from a transcript without timestamps, such as Codex's; a step seen only in the network log keeps its time.",
                "type": [
                  "number",
                  "null"
                ]
              },
              "detail": {
                "description": "What the step shows; most text is withheld.",
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "queries",
                  "path",
                  "packages",
                  "source",
                  "method",
                  "exit_code",
                  "failed",
                  "command_withheld",
                  "text_withheld",
                  "packages_withheld"
                ],
                "properties": {
                  "queries": {
                    "description": "Always empty: search queries are withheld.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "path": {
                    "description": "Always null: file paths are withheld.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "packages": {
                    "description": "For an install, the tool's known packages installed.",
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "source": {
                    "description": "For a fetch, what made it: fetch_tool, command, provider or proxy. Null otherwise.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "method": {
                    "description": "For a fetch the network log recorded, the HTTP method. Null otherwise.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "exit_code": {
                    "description": "For a command, its exit code when the agent reported one. Null otherwise.",
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "failed": {
                    "description": "For a command, whether it failed, when the agent reported its result. Null otherwise.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "text_withheld": {
                    "type": "boolean",
                    "description": "True for a search, read or write, whose text is withheld."
                  },
                  "packages_withheld": {
                    "type": "boolean",
                    "description": "True when an install named packages that are not the tool's known packages."
                  },
                  "command_withheld": {
                    "description": "True for a command or install, whose command line is withheld.",
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "pagination": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "has_more",
            "next_cursor",
            "limit"
          ],
          "properties": {
            "has_more": {
              "description": "More steps follow this page.",
              "type": "boolean"
            },
            "next_cursor": {
              "description": "Pass as cursor to read the next page. Null on the last page.",
              "type": [
                "string",
                "null"
              ]
            },
            "limit": {
              "description": "Steps per page, as requested.",
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        }
      }
    }
  },
  "$defs": {
    "AgentPicksCategoryPrecision": {
      "type": "object",
      "additionalProperties": false,
      "description": "How often the classifier version that judged this run was right in this run's category, measured on a hand-labelled sample of DevTune's own published test runs, not on your runs. precision is right over reported for each outcome kind a category reports; a kind reported fewer than minimum_reported times has a null rate. Null for a category or version with no labelled sample.",
      "required": [
        "classifier_version",
        "category_slug",
        "basis",
        "note",
        "sampled_runs",
        "undecidable_runs",
        "minimum_reported",
        "precision"
      ],
      "properties": {
        "classifier_version": {
          "type": "string",
          "description": "The classifier version the figures are for."
        },
        "category_slug": {
          "type": "string",
          "description": "The category the sample comes from."
        },
        "basis": {
          "type": "string",
          "enum": [
            "labelled_published_runs"
          ]
        },
        "note": {
          "type": "string",
          "description": "The basis, the sample size and the rate threshold, in plain sentences."
        },
        "sampled_runs": {
          "type": "integer",
          "minimum": 0,
          "description": "Runs in the sample, undecidable ones included."
        },
        "undecidable_runs": {
          "type": "integer",
          "minimum": 0,
          "description": "Runs in the sample a person could not decide. They are not counted."
        },
        "minimum_reported": {
          "type": "integer",
          "minimum": 1,
          "description": "How many times an outcome must be reported before it has a rate."
        },
        "precision": {
          "description": "Right over reported, per outcome.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "installed",
            "built_its_own",
            "no_provider",
            "none"
          ],
          "properties": {
            "installed": {
              "$ref": "#/$defs/AgentPicksReportedShare"
            },
            "built_its_own": {
              "$ref": "#/$defs/AgentPicksReportedShare"
            },
            "no_provider": {
              "$ref": "#/$defs/AgentPicksReportedShare"
            },
            "none": {
              "$ref": "#/$defs/AgentPicksReportedShare"
            }
          }
        }
      }
    },
    "AgentPicksClassifierAccuracy": {
      "type": "object",
      "additionalProperties": false,
      "description": "How often the classifier version that judged this run was right on a labelled test set, measured with the rule-based stated-pick judge. Not measured on production runs. precision is right over reported for each outcome kind, null for a kind the classifier never reported on the set; unclassified is decidable cases left unclassified; stated_pick_recall is stated picks found.",
      "required": [
        "classifier_version",
        "basis",
        "note",
        "labelled_cases",
        "decidable_cases",
        "precision",
        "unclassified",
        "stated_pick_recall"
      ],
      "properties": {
        "classifier_version": {
          "type": "string",
          "description": "The classifier version the figures are for."
        },
        "basis": {
          "type": "string",
          "enum": [
            "labelled_test_set"
          ]
        },
        "note": {
          "type": "string",
          "description": "The basis and the set size, in one plain sentence."
        },
        "labelled_cases": {
          "type": "integer",
          "minimum": 0,
          "description": "Cases in the labelled test set."
        },
        "decidable_cases": {
          "type": "integer",
          "minimum": 0,
          "description": "Labelled cases with one right outcome, rather than two tools or too little evidence."
        },
        "precision": {
          "description": "Right over reported, per outcome.",
          "type": "object",
          "additionalProperties": false,
          "required": [
            "installed",
            "stated_pick",
            "built_its_own",
            "no_provider",
            "other_tool",
            "none"
          ],
          "properties": {
            "installed": {
              "description": "Right over reported for installed. Null when the classifier never reported it on the set.",
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksMeasuredShare"
                },
                {
                  "type": "null"
                }
              ]
            },
            "stated_pick": {
              "description": "Right over reported for stated_pick. Null when the classifier never reported it on the set.",
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksMeasuredShare"
                },
                {
                  "type": "null"
                }
              ]
            },
            "built_its_own": {
              "description": "Right over reported for built_its_own. Null when the classifier never reported it on the set.",
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksMeasuredShare"
                },
                {
                  "type": "null"
                }
              ]
            },
            "no_provider": {
              "description": "Right over reported for no_provider. Null when the classifier never reported it on the set.",
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksMeasuredShare"
                },
                {
                  "type": "null"
                }
              ]
            },
            "other_tool": {
              "description": "Right over reported for other_tool. Null when the classifier never reported it on the set.",
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksMeasuredShare"
                },
                {
                  "type": "null"
                }
              ]
            },
            "none": {
              "description": "Right over reported for none. Null when the classifier never reported it on the set.",
              "anyOf": [
                {
                  "$ref": "#/$defs/AgentPicksMeasuredShare"
                },
                {
                  "type": "null"
                }
              ]
            }
          }
        },
        "unclassified": {
          "description": "Decidable cases left unclassified, over decidable cases. Null when the set has no decidable cases.",
          "anyOf": [
            {
              "$ref": "#/$defs/AgentPicksMeasuredShare"
            },
            {
              "type": "null"
            }
          ]
        },
        "stated_pick_recall": {
          "description": "Stated picks found, over the stated-pick cases. Null when the set has no stated-pick cases.",
          "anyOf": [
            {
              "$ref": "#/$defs/AgentPicksMeasuredShare"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "AgentPicksMeasuredShare": {
      "type": "object",
      "additionalProperties": false,
      "description": "count labelled test cases out of of; rate is count / of, rounded to four decimal places.",
      "required": [
        "rate",
        "count",
        "of"
      ],
      "properties": {
        "rate": {
          "type": "number",
          "minimum": 0,
          "maximum": 1,
          "description": "count / of."
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "description": "Labelled cases counted."
        },
        "of": {
          "type": "integer",
          "minimum": 1,
          "description": "Labelled cases the share is over."
        }
      }
    },
    "AgentPicksOrigin": {
      "type": "string",
      "enum": [
        "managed",
        "self_run"
      ],
      "description": "Where the runs ran: managed, in DevTune’s sandboxes, or self_run, on the customer’s own machine with the agentpicks CLI and uploaded. A self-run is never counted in a managed rate."
    },
    "AgentPicksReportedShare": {
      "type": "object",
      "additionalProperties": false,
      "description": "count right out of of runs reported as this outcome. rate is count / of rounded to four decimal places, and null when of is below minimum_reported, too few to state a rate.",
      "required": [
        "rate",
        "count",
        "of"
      ],
      "properties": {
        "rate": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1,
          "description": "count / of. Null when of is below minimum_reported."
        },
        "count": {
          "type": "integer",
          "minimum": 0,
          "description": "Of those runs, the ones a person labelled the same."
        },
        "of": {
          "type": "integer",
          "minimum": 0,
          "description": "Labelled runs the classifier reported as this outcome."
        }
      }
    },
    "AgentPicksRunSeries": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "description": "A self-run run’s series, as its test’s, with the commit it tested. Null for a managed run.",
      "required": [
        "key",
        "period",
        "agent",
        "agent_version",
        "model",
        "stack",
        "lock_digest",
        "repository",
        "category",
        "intent",
        "commit"
      ],
      "properties": {
        "key": {
          "type": "string",
          "description": "The series key: a SHA-256, in hex, of the agent, version, model, starter and lock digest (or repository), category and request intent. Runs with the same key are one series."
        },
        "period": {
          "type": "string",
          "format": "date",
          "description": "The first day of the UTC month the test holds. A series has one test per month."
        },
        "agent": {
          "type": "string",
          "description": "The coding agent the runs used, such as claude_code."
        },
        "agent_version": {
          "type": [
            "string",
            "null"
          ],
          "description": "The agent version installed where the runs ran."
        },
        "model": {
          "type": "string",
          "description": "The model the agent was asked for; default is the agent’s own default."
        },
        "stack": {
          "type": [
            "string",
            "null"
          ],
          "description": "The starter test app the runs were laid down from. Null for a series of runs on the customer’s repository."
        },
        "lock_digest": {
          "type": [
            "string",
            "null"
          ],
          "description": "SHA-256 of the starter’s committed files and lockfiles. Null for a repository series."
        },
        "repository": {
          "type": [
            "string",
            "null"
          ],
          "description": "The customer’s repository, as host and path. Null for a starter series."
        },
        "category": {
          "type": [
            "string",
            "null"
          ],
          "description": "The slug of the category or project job the runs were given a request from."
        },
        "intent": {
          "type": "string",
          "description": "The intent of that request: add, recommend, hosted or improve."
        },
        "commit": {
          "type": [
            "string",
            "null"
          ],
          "description": "The repository commit the run tested. It is not part of the series key, so a series following a branch spans commits. Null for a starter run."
        }
      }
    },
    "ListPagination": {
      "type": "object",
      "properties": {
        "hasMore": {
          "type": "boolean",
          "description": "More rows follow this page."
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ],
          "description": "Pass as cursor to read the next page. Null on the last page."
        }
      },
      "required": [
        "hasMore",
        "nextCursor"
      ]
    }
  }
}