@erdoai/cli 0.66.0 → 0.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +12 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -464,7 +464,7 @@ var ErdoClient = class {
464
464
  `/v1/evals/suites/${encodeURIComponent(slug)}/cases/${encodeURIComponent(caseName)}`
465
465
  );
466
466
  }
467
- runEvalSuite(slug, concurrency, commitSha, frontendCommitSha, backendCommitSha, source, modelOverride) {
467
+ runEvalSuite(slug, concurrency, commitSha, frontendCommitSha, backendCommitSha, source, modelOverride, rotateCases) {
468
468
  return this.request(
469
469
  "POST",
470
470
  `/v1/evals/suites/${encodeURIComponent(slug)}/run`,
@@ -474,7 +474,8 @@ var ErdoClient = class {
474
474
  frontend_commit_sha: frontendCommitSha,
475
475
  backend_commit_sha: backendCommitSha,
476
476
  source,
477
- model_override: modelOverride
477
+ model_override: modelOverride,
478
+ rotate_cases: rotateCases
478
479
  }
479
480
  );
480
481
  }
@@ -2551,7 +2552,13 @@ evalCmd.command("create <name>").description("Create a suite (in the active org)
2551
2552
  }
2552
2553
  }
2553
2554
  );
2554
- evalCmd.command("run <slug>").description("Run a suite; --watch polls until it completes").option("-w, --watch", "poll until the run finishes and print results").option("-c, --concurrency <n>", "parallel cases", (v) => parseInt(v, 10)).option("--commit-sha <sha>", "full 40-character Git commit SHA to associate with the run").option("--frontend-commit-sha <sha>", "frontend revision in the evaluated production snapshot").option("--backend-commit-sha <sha>", "backend revision in the evaluated production snapshot").option("--source <source>", "staff-only run source: post_deploy, nightly, or rollback").option("--model <model>", "pin the suite's agent to a model for this run (e.g. glm-5.3) \u2014 for model comparisons").action(async (slug, opts) => {
2555
+ evalCmd.command("run <slug>").description("Run a suite; --watch polls until it completes").option("-w, --watch", "poll until the run finishes and print results").option("-c, --concurrency <n>", "parallel cases", (v) => parseInt(v, 10)).option("--commit-sha <sha>", "full 40-character Git commit SHA to associate with the run").option("--frontend-commit-sha <sha>", "frontend revision in the evaluated production snapshot").option("--backend-commit-sha <sha>", "backend revision in the evaluated production snapshot").option("--source <source>", "staff-only run source: post_deploy, nightly, or rollback").option("--model <model>", "pin the suite's agent to a model for this run (e.g. glm-5.3) \u2014 for model comparisons").option("--rotate-cases <n>", "run a rotating subset of n cases (deterministic per suite + UTC day) instead of all cases", (v) => {
2556
+ const parsed = parseInt(v, 10);
2557
+ if (isNaN(parsed) || parsed < 0) {
2558
+ throw new Error(`--rotate-cases must be a non-negative integer, got "${v}"`);
2559
+ }
2560
+ return parsed;
2561
+ }).action(async (slug, opts) => {
2555
2562
  try {
2556
2563
  const api = new ErdoClient();
2557
2564
  const { suite } = await api.getEvalSuite(slug);
@@ -2574,7 +2581,8 @@ evalCmd.command("run <slug>").description("Run a suite; --watch polls until it c
2574
2581
  opts.frontendCommitSha,
2575
2582
  opts.backendCommitSha,
2576
2583
  opts.source,
2577
- opts.model
2584
+ opts.model,
2585
+ opts.rotateCases
2578
2586
  );
2579
2587
  console.log(`run_id: ${run_id}`);
2580
2588
  if (!opts.watch) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.66.0",
3
+ "version": "0.67.0",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {