open-agents-ai 0.138.90 → 0.138.92
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 +12 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22868,8 +22868,12 @@ If you're stuck, try a completely different approach. Do NOT repeat what failed
|
|
|
22868
22868
|
break;
|
|
22869
22869
|
}
|
|
22870
22870
|
}
|
|
22871
|
-
|
|
22872
|
-
|
|
22871
|
+
this.emit({
|
|
22872
|
+
type: "error",
|
|
22873
|
+
content: `Backend unavailable \u2014 stopping task. Fix the issue and retry.`,
|
|
22874
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
22875
|
+
});
|
|
22876
|
+
break;
|
|
22873
22877
|
}
|
|
22874
22878
|
response = recovered;
|
|
22875
22879
|
}
|
|
@@ -23407,8 +23411,8 @@ Integrate this guidance into your current approach. Continue working on the task
|
|
|
23407
23411
|
const errMsg2 = reqErr instanceof Error ? reqErr.message : String(reqErr);
|
|
23408
23412
|
const cause2 = reqErr instanceof Error && reqErr.cause ? ` (${reqErr.cause.message ?? ""} ${reqErr.cause?.code ?? ""})` : "";
|
|
23409
23413
|
this.emit({ type: "error", content: `Backend error: ${errMsg2}${cause2}`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
23410
|
-
|
|
23411
|
-
|
|
23414
|
+
this.emit({ type: "error", content: `Backend unavailable \u2014 stopping task.`, timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
23415
|
+
break;
|
|
23412
23416
|
}
|
|
23413
23417
|
response = recovered;
|
|
23414
23418
|
}
|
|
@@ -24717,6 +24721,8 @@ ${transcript}`
|
|
|
24717
24721
|
if (err instanceof Error && err.fatal)
|
|
24718
24722
|
return false;
|
|
24719
24723
|
const msg = err instanceof Error ? err.message : String(err);
|
|
24724
|
+
if (/HTTP 429|429 Too Many|rate.?limit|too many requests/i.test(msg))
|
|
24725
|
+
return true;
|
|
24720
24726
|
if (/Backend HTTP (502|503|504)/i.test(msg))
|
|
24721
24727
|
return true;
|
|
24722
24728
|
if (/fetch failed|ECONNREFUSED|ECONNRESET|ETIMEDOUT|EPIPE|socket hang up/i.test(msg))
|
|
@@ -54472,7 +54478,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
54472
54478
|
if (!self.active)
|
|
54473
54479
|
return origTtyWrite(s, key);
|
|
54474
54480
|
if (key?.name === "backspace" && self.inputStateProvider) {
|
|
54475
|
-
const { cursor } = self.inputStateProvider();
|
|
54481
|
+
const { cursor = 0 } = self.inputStateProvider() ?? {};
|
|
54476
54482
|
if (cursor <= 0)
|
|
54477
54483
|
return;
|
|
54478
54484
|
}
|
|
@@ -54568,7 +54574,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
54568
54574
|
return;
|
|
54569
54575
|
}
|
|
54570
54576
|
if (self.inputStateProvider && (key?.name !== "return" && key?.name !== "enter" && key?.name !== "backspace")) {
|
|
54571
|
-
const { line } = self.inputStateProvider();
|
|
54577
|
+
const { line = "" } = self.inputStateProvider() ?? {};
|
|
54572
54578
|
const w = getTermWidth();
|
|
54573
54579
|
const avail = Math.max(1, w - self.promptWidth);
|
|
54574
54580
|
const currentLines = Math.ceil(Math.max(1, line.length) / avail);
|
package/package.json
CHANGED