agentv 4.5.0 → 4.5.1
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/{chunk-3UST47TW.js → chunk-5DEZ72J3.js} +4 -4
- package/dist/{chunk-3UST47TW.js.map → chunk-5DEZ72J3.js.map} +1 -1
- package/dist/{chunk-TEPYEYPG.js → chunk-7DRAXDVC.js} +42 -15
- package/dist/chunk-7DRAXDVC.js.map +1 -0
- package/dist/{chunk-D7HJ5HME.js → chunk-BQC2CDLN.js} +4 -4
- package/dist/cli.js +3 -3
- package/dist/{dist-FBKKMDHE.js → dist-VWMHFUXR.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{interactive-YAOW6DCC.js → interactive-OG7ZJIHG.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-TEPYEYPG.js.map +0 -1
- /package/dist/{chunk-D7HJ5HME.js.map → chunk-BQC2CDLN.js.map} +0 -0
- /package/dist/{dist-FBKKMDHE.js.map → dist-VWMHFUXR.js.map} +0 -0
- /package/dist/{interactive-YAOW6DCC.js.map → interactive-OG7ZJIHG.js.map} +0 -0
|
@@ -30451,7 +30451,9 @@ async function runEvalCase(options) {
|
|
|
30451
30451
|
});
|
|
30452
30452
|
} catch (error) {
|
|
30453
30453
|
lastError = error;
|
|
30454
|
-
if (
|
|
30454
|
+
if (attempt + 1 < attemptBudget) {
|
|
30455
|
+
const delayMs = retryBackoffMs(attempt);
|
|
30456
|
+
await sleep3(delayMs, signal);
|
|
30455
30457
|
attempt += 1;
|
|
30456
30458
|
continue;
|
|
30457
30459
|
}
|
|
@@ -31147,7 +31149,7 @@ async function invokeProvider(provider, options) {
|
|
|
31147
31149
|
}
|
|
31148
31150
|
}
|
|
31149
31151
|
function buildErrorResult(evalCase, targetName, timestamp, error, promptInputs, provider, failureStage, failureReasonCode, verbose) {
|
|
31150
|
-
const message =
|
|
31152
|
+
const message = extractErrorMessage2(error);
|
|
31151
31153
|
let agentRequest;
|
|
31152
31154
|
let lmRequest;
|
|
31153
31155
|
if (isAgentProvider(provider)) {
|
|
@@ -31264,20 +31266,45 @@ function aggregateEvaluatorTokenUsage(scores) {
|
|
|
31264
31266
|
...hasCached ? { cached } : {}
|
|
31265
31267
|
};
|
|
31266
31268
|
}
|
|
31267
|
-
function
|
|
31268
|
-
if (!error) {
|
|
31269
|
-
return false;
|
|
31270
|
-
}
|
|
31271
|
-
if (typeof DOMException !== "undefined" && error instanceof DOMException && error.name === "AbortError") {
|
|
31272
|
-
return true;
|
|
31273
|
-
}
|
|
31269
|
+
function extractErrorMessage2(error) {
|
|
31274
31270
|
if (error instanceof Error) {
|
|
31275
|
-
|
|
31276
|
-
|
|
31277
|
-
|
|
31271
|
+
return error.message;
|
|
31272
|
+
}
|
|
31273
|
+
if (error !== null && typeof error === "object") {
|
|
31274
|
+
const obj = error;
|
|
31275
|
+
const parts = [];
|
|
31276
|
+
if (typeof obj.message === "string" && obj.message) {
|
|
31277
|
+
parts.push(obj.message);
|
|
31278
|
+
}
|
|
31279
|
+
if (typeof obj.code === "number") {
|
|
31280
|
+
parts.push(`(code ${obj.code})`);
|
|
31281
|
+
}
|
|
31282
|
+
if (parts.length > 0) {
|
|
31283
|
+
return parts.join(" ");
|
|
31284
|
+
}
|
|
31285
|
+
try {
|
|
31286
|
+
return JSON.stringify(error);
|
|
31287
|
+
} catch {
|
|
31288
|
+
}
|
|
31278
31289
|
}
|
|
31279
|
-
|
|
31280
|
-
|
|
31290
|
+
return String(error);
|
|
31291
|
+
}
|
|
31292
|
+
function retryBackoffMs(attempt) {
|
|
31293
|
+
return Math.min(2 ** attempt * 1e3, 3e4);
|
|
31294
|
+
}
|
|
31295
|
+
function sleep3(ms, signal) {
|
|
31296
|
+
if (signal?.aborted) return Promise.resolve();
|
|
31297
|
+
return new Promise((resolve2) => {
|
|
31298
|
+
const timer = setTimeout(resolve2, ms);
|
|
31299
|
+
signal?.addEventListener(
|
|
31300
|
+
"abort",
|
|
31301
|
+
() => {
|
|
31302
|
+
clearTimeout(timer);
|
|
31303
|
+
resolve2();
|
|
31304
|
+
},
|
|
31305
|
+
{ once: true }
|
|
31306
|
+
);
|
|
31307
|
+
});
|
|
31281
31308
|
}
|
|
31282
31309
|
function mapChildResults(children) {
|
|
31283
31310
|
if (!children || children.length === 0) {
|
|
@@ -32744,4 +32771,4 @@ export {
|
|
|
32744
32771
|
readTranscriptFile,
|
|
32745
32772
|
createAgentKernel
|
|
32746
32773
|
};
|
|
32747
|
-
//# sourceMappingURL=chunk-
|
|
32774
|
+
//# sourceMappingURL=chunk-7DRAXDVC.js.map
|