(target, options = {})
| 177 | } |
| 178 | |
| 179 | async function createStarterBenchmarkConfig(target, options = {}) { |
| 180 | if (!["skill", "plugin"].includes(target.kind)) { |
| 181 | throw new Error("Benchmarking only supports Codex skills and plugins."); |
| 182 | } |
| 183 | |
| 184 | return { |
| 185 | kind: "plugin-eval-benchmark", |
| 186 | schemaVersion: BENCHMARK_SCHEMA_VERSION, |
| 187 | version: BENCHMARK_SCHEMA_VERSION, |
| 188 | targetKind: target.kind, |
| 189 | targetName: target.name, |
| 190 | runner: { |
| 191 | type: "codex-cli", |
| 192 | model: options.model || defaultModelForTarget(target), |
| 193 | sandbox: "workspace-write", |
| 194 | approvalPolicy: "never", |
| 195 | extraArgs: [], |
| 196 | }, |
| 197 | workspace: { |
| 198 | sourcePath: path.resolve(options.sourcePath || process.cwd()), |
| 199 | setupMode: "copy", |
| 200 | preserve: "on-failure", |
| 201 | }, |
| 202 | targetProvisioning: { |
| 203 | mode: defaultTargetProvisioningMode(target), |
| 204 | }, |
| 205 | verifiers: { |
| 206 | commands: [], |
| 207 | }, |
| 208 | notes: [ |
| 209 | "Edit workspace.sourcePath so it points at the repo or template you want Codex to work inside.", |
| 210 | "Edit the scenarios so they match real tasks instead of generic starter prompts.", |
| 211 | "Benchmark means real codex exec runs now. There is no simulated dry-run mode.", |
| 212 | ], |
| 213 | setupQuestions: buildSetupQuestions(target), |
| 214 | scenarios: target.kind === "plugin" ? buildPluginScenarios(target) : buildSkillScenarios(target), |
| 215 | }; |
| 216 | } |
| 217 | |
| 218 | async function loadBenchmarkConfig(target, options = {}) { |
| 219 | if (options.configPath) { |
no test coverage detected