@ateam-ai/mcp 0.3.36 → 0.3.37
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/package.json +1 -1
- package/src/api.js +7 -1
package/package.json
CHANGED
package/src/api.js
CHANGED
|
@@ -384,7 +384,13 @@ function formatError(method, path, status, body) {
|
|
|
384
384
|
*/
|
|
385
385
|
async function request(method, path, body, sessionId, opts = {}) {
|
|
386
386
|
const timeoutMs = opts.timeoutMs || REQUEST_TIMEOUT_MS;
|
|
387
|
-
|
|
387
|
+
// Default to 2 retries on transient proxy errors (502/504). Existing
|
|
388
|
+
// gate further down only retries on those status codes — real errors
|
|
389
|
+
// (4xx, 5xx other than 502/504) still fail fast on attempt 0. Bumping
|
|
390
|
+
// the default from 0 → 2 protects every wrapper call against a
|
|
391
|
+
// skill-builder mid-restart 502 (bug #6 in parallel-agent feedback)
|
|
392
|
+
// without callers having to remember to pass retries everywhere.
|
|
393
|
+
const maxRetries = opts.retries ?? 2;
|
|
388
394
|
const baseUrl = getBaseUrl(sessionId);
|
|
389
395
|
|
|
390
396
|
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|