@brainbase-labs/cli 0.25.0-eng1209.10 → 0.25.0-eng1209.11
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 +33 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36008,7 +36008,7 @@ function padStart(s, n) {
|
|
|
36008
36008
|
// package.json
|
|
36009
36009
|
var package_default = {
|
|
36010
36010
|
name: "@brainbase-labs/cli",
|
|
36011
|
-
version: "0.25.0-eng1209.
|
|
36011
|
+
version: "0.25.0-eng1209.11",
|
|
36012
36012
|
description: "Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).",
|
|
36013
36013
|
type: "module",
|
|
36014
36014
|
bin: {
|
|
@@ -78498,6 +78498,7 @@ var MAX_ALLOWED_EVIDENCE_IDS = 1e4;
|
|
|
78498
78498
|
var COMMAND_PROCESS_MARKER_ENV = "BRAINBASE_BENCHMARK_COMMAND_MARKER";
|
|
78499
78499
|
var COMMAND_PROCESS_POLL_MS = 10;
|
|
78500
78500
|
var COMMAND_PROCESS_CLEANUP_MS = 500;
|
|
78501
|
+
var JUDGE_ERROR_PREFIX = "BRAINBASE_BENCHMARK_JUDGE_ERROR_V1:";
|
|
78501
78502
|
var RESERVED_WORKSPACE_PATHS = new Set([
|
|
78502
78503
|
".brainbase",
|
|
78503
78504
|
".git",
|
|
@@ -78873,6 +78874,7 @@ var BENCHMARK_CAPABILITIES = {
|
|
|
78873
78874
|
"remote_input_references_v1",
|
|
78874
78875
|
"archive_file_materials_v1",
|
|
78875
78876
|
"structured_criterion_results_v1",
|
|
78877
|
+
"structured_judge_errors_v1",
|
|
78876
78878
|
"multiple_sandbox_commands_v1",
|
|
78877
78879
|
"sandbox_command_workspace_modes_v1",
|
|
78878
78880
|
"candidate_outputs_v1",
|
|
@@ -80687,6 +80689,29 @@ var CriteriaResultFileSchema = exports_external.object({
|
|
|
80687
80689
|
});
|
|
80688
80690
|
}
|
|
80689
80691
|
});
|
|
80692
|
+
var JudgeErrorSchema = exports_external.object({
|
|
80693
|
+
code: exports_external.enum([
|
|
80694
|
+
"judge_provider_quota_exhausted",
|
|
80695
|
+
"judge_rate_limited",
|
|
80696
|
+
"judge_provider_authentication_failed",
|
|
80697
|
+
"judge_provider_unavailable",
|
|
80698
|
+
"judge_request_failed"
|
|
80699
|
+
]),
|
|
80700
|
+
message: exports_external.string().min(1).max(500)
|
|
80701
|
+
}).strict();
|
|
80702
|
+
function structuredJudgeError(stderr) {
|
|
80703
|
+
for (const line of stderr.toString("utf8").split(/\r?\n/).reverse()) {
|
|
80704
|
+
const marker = line.indexOf(JUDGE_ERROR_PREFIX);
|
|
80705
|
+
if (marker < 0)
|
|
80706
|
+
continue;
|
|
80707
|
+
try {
|
|
80708
|
+
const parsed = JudgeErrorSchema.safeParse(JSON.parse(line.slice(marker + JUDGE_ERROR_PREFIX.length)));
|
|
80709
|
+
if (parsed.success)
|
|
80710
|
+
return parsed.data;
|
|
80711
|
+
} catch {}
|
|
80712
|
+
}
|
|
80713
|
+
return null;
|
|
80714
|
+
}
|
|
80690
80715
|
function readCriterionResults(resultPath, criterionKeys, allowedEvidenceIds, spec, additionalSecrets = []) {
|
|
80691
80716
|
let opened;
|
|
80692
80717
|
try {
|
|
@@ -80933,7 +80958,13 @@ async function evaluateOne(evaluator, spec, manifest, frozenWorkspaceRoot, final
|
|
|
80933
80958
|
try {
|
|
80934
80959
|
criterionResults = evaluator.criterion_keys && criterionResultPath ? readCriterionResults(criterionResultPath, evaluator.criterion_keys, evaluator.allowed_evidence_ids ?? [], spec, result2.redactions) : undefined;
|
|
80935
80960
|
} catch (error2) {
|
|
80936
|
-
|
|
80961
|
+
let normalized = stableError(error2);
|
|
80962
|
+
if (normalized?.code === "missing_criterion_result" && result2.exitCode !== 0) {
|
|
80963
|
+
normalized = structuredJudgeError(result2.stderr) ?? {
|
|
80964
|
+
code: "command_terminated",
|
|
80965
|
+
message: "sandbox evaluator terminated before writing its criterion result"
|
|
80966
|
+
};
|
|
80967
|
+
}
|
|
80937
80968
|
return {
|
|
80938
80969
|
...base2,
|
|
80939
80970
|
status: "errored",
|