@livx.cc/agentx 0.99.133 → 0.99.135
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/cli.js +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5607,12 +5607,12 @@ var Agent = class _Agent {
|
|
|
5607
5607
|
}
|
|
5608
5608
|
const sc = err?.statusCode;
|
|
5609
5609
|
const serverSide = sc >= 500 || sc === 408 || /Service Unavailable|overloaded|Internal server error|Bad gateway|Gateway time/i.test(String(err?.message ?? ""));
|
|
5610
|
-
const network = !sc && /ECONNRESET|ECONNREFUSED|ETIMEDOUT|ENOTFOUND|EAI_AGAIN|EPIPE|socket hang up|fetch failed|network|terminated|UND_ERR/i.test(String(err?.message ?? err?.code ?? err));
|
|
5610
|
+
const network = !sc && /ECONNRESET|ECONNREFUSED|ETIMEDOUT|ENOTFOUND|EAI_AGAIN|EPIPE|socket hang up|socket connection was closed|closed unexpectedly|premature close|fetch failed|network|terminated|UND_ERR/i.test(String(err?.message ?? err?.code ?? err));
|
|
5611
5611
|
const stalled = err?.code === "stall";
|
|
5612
5612
|
const empty = err?.code === "empty" || err?.code === "cursor_silent";
|
|
5613
5613
|
const maxAttempts = empty ? Math.max(o.emptyRetries, 0) : 2;
|
|
5614
|
-
const replaysTool = stalled && this.toolRanThisAttempt;
|
|
5615
|
-
if (replaysTool) log9.warn(
|
|
5614
|
+
const replaysTool = (stalled || network) && this.toolRanThisAttempt;
|
|
5615
|
+
if (replaysTool) log9.warn(`model ${stalled ? "stall" : "network drop"} after tool(s) already ran this step \u2014 not retrying (a retry would replay them)`);
|
|
5616
5616
|
const transient = !o.signal?.aborted && !isAbortError(err) && !replaysTool && attempt < maxAttempts && (network || serverSide || stalled || empty);
|
|
5617
5617
|
if (!transient) throw err;
|
|
5618
5618
|
const waitMs = (empty ? o.emptyRetryBaseMs : 1e3) * (attempt + 1);
|