@brainbase-labs/cli 0.35.0 → 0.37.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.
- package/dist/index.js +30 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36018,7 +36018,7 @@ function padStart(s, n) {
|
|
|
36018
36018
|
// package.json
|
|
36019
36019
|
var package_default = {
|
|
36020
36020
|
name: "@brainbase-labs/cli",
|
|
36021
|
-
version: "0.
|
|
36021
|
+
version: "0.37.0",
|
|
36022
36022
|
description: "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
|
|
36023
36023
|
type: "module",
|
|
36024
36024
|
bin: {
|
|
@@ -85681,9 +85681,12 @@ class BenchmarkApiClient {
|
|
|
85681
85681
|
query: { baseline_target_id: baselineTargetId }
|
|
85682
85682
|
});
|
|
85683
85683
|
}
|
|
85684
|
-
exportRunResults(runId) {
|
|
85684
|
+
exportRunResults(runId, query = {}) {
|
|
85685
85685
|
return this.request(`/runs/${encodeURIComponent(runId)}/results/export`, {
|
|
85686
|
-
mode: "binary"
|
|
85686
|
+
mode: "binary",
|
|
85687
|
+
query: {
|
|
85688
|
+
include_billing_receipts: query.includeBillingReceipts || undefined
|
|
85689
|
+
}
|
|
85687
85690
|
});
|
|
85688
85691
|
}
|
|
85689
85692
|
listTrials(runId, query = {}) {
|
|
@@ -87397,6 +87400,11 @@ var DEFINITIONS = [
|
|
|
87397
87400
|
{ key: "yes", names: ["--yes", "-y"], kind: "boolean" },
|
|
87398
87401
|
{ key: "all", names: ["--all"], kind: "boolean" },
|
|
87399
87402
|
{ key: "force", names: ["--force"], kind: "boolean" },
|
|
87403
|
+
{
|
|
87404
|
+
key: "includeBillingReceipts",
|
|
87405
|
+
names: ["--include-billing-receipts"],
|
|
87406
|
+
kind: "boolean"
|
|
87407
|
+
},
|
|
87400
87408
|
{ key: "archived", names: ["--archived"], kind: "boolean" },
|
|
87401
87409
|
{ key: "preview", names: ["--preview"], kind: "boolean" },
|
|
87402
87410
|
{ key: "watch", names: ["--watch"], kind: "boolean" },
|
|
@@ -87422,6 +87430,7 @@ var DEFINITIONS = [
|
|
|
87422
87430
|
{ key: "name", names: ["--name"], kind: "value" },
|
|
87423
87431
|
{ key: "caseKey", names: ["--case-key"], kind: "value" },
|
|
87424
87432
|
{ key: "revision", names: ["--revision"], kind: "value" },
|
|
87433
|
+
{ key: "runtimeRelease", names: ["--runtime-release"], kind: "value" },
|
|
87425
87434
|
{ key: "case", names: ["--case"], kind: "value", multiple: true },
|
|
87426
87435
|
{
|
|
87427
87436
|
key: "variant",
|
|
@@ -88674,16 +88683,20 @@ function runPlanInput(options, revisionId) {
|
|
|
88674
88683
|
const label = optionalNonblank(options.parsed, "label");
|
|
88675
88684
|
const changeNote = optionalNonblank(options.parsed, "changeNote");
|
|
88676
88685
|
const origin = optionalNonblank(options.parsed, "comparisonOrigin");
|
|
88686
|
+
const runtimeRelease = optionalNonblank(options.parsed, "runtimeRelease");
|
|
88677
88687
|
if (label)
|
|
88678
88688
|
input.label = label;
|
|
88679
88689
|
if (changeNote)
|
|
88680
88690
|
input.change_note = changeNote;
|
|
88681
88691
|
if (origin)
|
|
88682
88692
|
input.comparison_origin_target_id = origin;
|
|
88693
|
+
if (runtimeRelease)
|
|
88694
|
+
input.runtime_release = runtimeRelease;
|
|
88683
88695
|
return input;
|
|
88684
88696
|
}
|
|
88685
88697
|
var RUN_PLAN_OPTIONS = [
|
|
88686
88698
|
"revision",
|
|
88699
|
+
"runtimeRelease",
|
|
88687
88700
|
"case",
|
|
88688
88701
|
"variant",
|
|
88689
88702
|
"repetitions",
|
|
@@ -88695,7 +88708,7 @@ var RUN_PLAN_OPTIONS = [
|
|
|
88695
88708
|
];
|
|
88696
88709
|
async function runPlan(cwd2, argv, deps) {
|
|
88697
88710
|
const options = parseControlOptions(argv, RUN_PLAN_OPTIONS);
|
|
88698
|
-
expectPositionals(options.positionals, 1, 1, "brainbase benchmark run plan <benchmark-id> --revision <revision-id>");
|
|
88711
|
+
expectPositionals(options.positionals, 1, 1, "brainbase benchmark run plan <benchmark-id> --revision <revision-id> [--runtime-release <release-id>]");
|
|
88699
88712
|
const benchmarkId = options.positionals[0];
|
|
88700
88713
|
const input = runPlanInput(options, requiredOption(options.parsed, "revision"));
|
|
88701
88714
|
const { client, output } = context(cwd2, "benchmark run plan", options, deps);
|
|
@@ -88830,7 +88843,7 @@ async function runOneShot(cwd2, argv, deps) {
|
|
|
88830
88843
|
"watch",
|
|
88831
88844
|
"interval"
|
|
88832
88845
|
]);
|
|
88833
|
-
expectPositionals(options.positionals, 1, 1, "brainbase benchmark run <benchmark-id> --yes [--watch]");
|
|
88846
|
+
expectPositionals(options.positionals, 1, 1, "brainbase benchmark run <benchmark-id> --yes [--watch] [--runtime-release <release-id>]");
|
|
88834
88847
|
if (!bool(options.parsed, "yes")) {
|
|
88835
88848
|
throw usageError("--yes is required to start a benchmark run");
|
|
88836
88849
|
}
|
|
@@ -88959,11 +88972,17 @@ async function runArtifacts(cwd2, argv, deps) {
|
|
|
88959
88972
|
}, options);
|
|
88960
88973
|
}
|
|
88961
88974
|
async function runExportResults(cwd2, argv, deps) {
|
|
88962
|
-
const options = parseControlOptions(argv, [
|
|
88963
|
-
|
|
88975
|
+
const options = parseControlOptions(argv, [
|
|
88976
|
+
"output",
|
|
88977
|
+
"force",
|
|
88978
|
+
"includeBillingReceipts"
|
|
88979
|
+
]);
|
|
88980
|
+
expectPositionals(options.positionals, 1, 1, "brainbase benchmark export-results <run-id> [--output <path>] [--include-billing-receipts]");
|
|
88964
88981
|
const runId = options.positionals[0];
|
|
88965
88982
|
const { client, output } = context(cwd2, "benchmark export-results", options, deps);
|
|
88966
|
-
const response = await client.exportRunResults(runId
|
|
88983
|
+
const response = await client.exportRunResults(runId, {
|
|
88984
|
+
includeBillingReceipts: bool(options.parsed, "includeBillingReceipts")
|
|
88985
|
+
});
|
|
88967
88986
|
const fallback = safeExportFilename(response.filename, `benchmark-run-${runId}-results.zip`);
|
|
88968
88987
|
const written = writeBinaryOutput(cwd2, optionalNonblank(options.parsed, "output"), response.bytes, fallback, bool(options.parsed, "force"));
|
|
88969
88988
|
output.result({
|
|
@@ -89149,7 +89168,7 @@ function commandLevelHelp(sub, argv) {
|
|
|
89149
89168
|
return usage(`brainbase benchmark ${sub} <benchmark-id> --expected-version <n>`);
|
|
89150
89169
|
case "run":
|
|
89151
89170
|
if (action === "plan") {
|
|
89152
|
-
return usage("brainbase benchmark run plan <benchmark-id> --revision <revision-id> [--variant <key|key=model|json>] [--case <case-key>] [--idempotency-key <key>]");
|
|
89171
|
+
return usage("brainbase benchmark run plan <benchmark-id> --revision <revision-id> [--runtime-release <release-id>] [--variant <key|key=model|json>] [--case <case-key>] [--idempotency-key <key>]");
|
|
89153
89172
|
}
|
|
89154
89173
|
if (action === "start") {
|
|
89155
89174
|
return usage("brainbase benchmark run start <plan-id> --yes");
|
|
@@ -89166,7 +89185,7 @@ function commandLevelHelp(sub, argv) {
|
|
|
89166
89185
|
if (action === "cancel" || action === "stop" || action === "resume") {
|
|
89167
89186
|
return usage(`brainbase benchmark run ${action} <run-id> --yes`);
|
|
89168
89187
|
}
|
|
89169
|
-
return usage("brainbase benchmark run <benchmark-id> --yes [--revision <revision-id>] [--watch] [--idempotency-key <key>]", "brainbase benchmark run plan <benchmark-id> --revision <revision-id>", "brainbase benchmark run start <plan-id> --yes", "brainbase benchmark run watch <run-id> [--interval-ms <n>]", "brainbase benchmark run list [benchmark-id] [--status <status>] [--limit <n>] [--cursor <cursor>] [--all]", "brainbase benchmark run show <run-id>", "brainbase benchmark run cancel <run-id> --yes", "brainbase benchmark run resume <run-id> --yes");
|
|
89188
|
+
return usage("brainbase benchmark run <benchmark-id> --yes [--revision <revision-id>] [--runtime-release <release-id>] [--watch] [--idempotency-key <key>]", "brainbase benchmark run plan <benchmark-id> --revision <revision-id> [--runtime-release <release-id>]", "brainbase benchmark run start <plan-id> --yes", "brainbase benchmark run watch <run-id> [--interval-ms <n>]", "brainbase benchmark run list [benchmark-id] [--status <status>] [--limit <n>] [--cursor <cursor>] [--all]", "brainbase benchmark run show <run-id>", "brainbase benchmark run cancel <run-id> --yes", "brainbase benchmark run resume <run-id> --yes");
|
|
89170
89189
|
case "results":
|
|
89171
89190
|
return usage("brainbase benchmark results <run-id> [--baseline-target <target-id>]");
|
|
89172
89191
|
case "diagnoses":
|
|
@@ -89176,7 +89195,7 @@ function commandLevelHelp(sub, argv) {
|
|
|
89176
89195
|
case "artifacts":
|
|
89177
89196
|
return usage("brainbase benchmark artifacts <run-id> <attempt-id> [--limit <n>] [--cursor <cursor>] [--all]");
|
|
89178
89197
|
case "export-results":
|
|
89179
|
-
return usage("brainbase benchmark export-results <run-id> [--output <path>] [--force]");
|
|
89198
|
+
return usage("brainbase benchmark export-results <run-id> [--output <path>] [--force] [--include-billing-receipts]");
|
|
89180
89199
|
case "history":
|
|
89181
89200
|
return usage("brainbase benchmark history <benchmark-id> [--limit <n>]");
|
|
89182
89201
|
case "baseline":
|