@supatest/cli 0.0.23 → 0.0.24
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 +16 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3952,7 +3952,7 @@ var CLI_VERSION;
|
|
|
3952
3952
|
var init_version = __esm({
|
|
3953
3953
|
"src/version.ts"() {
|
|
3954
3954
|
"use strict";
|
|
3955
|
-
CLI_VERSION = "0.0.
|
|
3955
|
+
CLI_VERSION = "0.0.24";
|
|
3956
3956
|
}
|
|
3957
3957
|
});
|
|
3958
3958
|
|
|
@@ -5004,11 +5004,23 @@ ${projectInstructions}`,
|
|
|
5004
5004
|
resultText = msg.result || resultText;
|
|
5005
5005
|
} else {
|
|
5006
5006
|
hasError = true;
|
|
5007
|
-
if (
|
|
5007
|
+
if (msg.subtype === "error_max_turns") {
|
|
5008
|
+
const maxTurnsError = `Agent stopped after ${msg.num_turns} turns (max iterations reached). Use --max-iterations to increase the limit.`;
|
|
5009
|
+
errors.push(maxTurnsError);
|
|
5010
|
+
this.presenter.onError(maxTurnsError);
|
|
5011
|
+
} else if (msg.subtype === "error_max_budget_usd") {
|
|
5012
|
+
const budgetError = "Agent stopped: budget limit exceeded.";
|
|
5013
|
+
errors.push(budgetError);
|
|
5014
|
+
this.presenter.onError(budgetError);
|
|
5015
|
+
} else if ("errors" in msg && Array.isArray(msg.errors)) {
|
|
5008
5016
|
errors.push(...msg.errors);
|
|
5009
5017
|
for (const error of msg.errors) {
|
|
5010
5018
|
this.presenter.onError(error);
|
|
5011
5019
|
}
|
|
5020
|
+
} else {
|
|
5021
|
+
const unknownError = `Agent stopped unexpectedly (${msg.subtype || "unknown reason"})`;
|
|
5022
|
+
errors.push(unknownError);
|
|
5023
|
+
this.presenter.onError(unknownError);
|
|
5012
5024
|
}
|
|
5013
5025
|
}
|
|
5014
5026
|
} else if (msg.type === "user") {
|
|
@@ -5301,7 +5313,7 @@ var init_react = __esm({
|
|
|
5301
5313
|
}
|
|
5302
5314
|
onUsageUpdate(usage) {
|
|
5303
5315
|
const contextWindow = CONTEXT_WINDOWS[usage.model] || 2e5;
|
|
5304
|
-
const contextTokens = usage.inputTokens + usage.cacheReadTokens
|
|
5316
|
+
const contextTokens = usage.inputTokens + usage.cacheReadTokens;
|
|
5305
5317
|
const contextPct = contextTokens / contextWindow * 100;
|
|
5306
5318
|
this.callbacks.setUsageStats((prev) => {
|
|
5307
5319
|
if (prev && prev.inputTokens > contextTokens) {
|
|
@@ -5346,7 +5358,7 @@ var init_react = __esm({
|
|
|
5346
5358
|
if (result.usage) {
|
|
5347
5359
|
const usage = result.usage;
|
|
5348
5360
|
const contextWindow = CONTEXT_WINDOWS[usage.model] || 2e5;
|
|
5349
|
-
const contextTokens = usage.inputTokens + usage.cacheReadTokens
|
|
5361
|
+
const contextTokens = usage.inputTokens + usage.cacheReadTokens;
|
|
5350
5362
|
const contextPct = contextTokens / contextWindow * 100;
|
|
5351
5363
|
this.callbacks.setUsageStats((prev) => {
|
|
5352
5364
|
if (prev && prev.inputTokens > contextTokens) {
|