polydev-ai 1.10.17 → 1.10.18
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/mcp/stdio-wrapper.js +12 -5
- package/package.json +1 -1
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -3026,15 +3026,22 @@ To re-login: /polydev:login`
|
|
|
3026
3026
|
* Always uses 400s to ensure local CLIs get full time budget before falling back to credits
|
|
3027
3027
|
*/
|
|
3028
3028
|
getAdaptiveTimeout(cliId, defaultTimeout = 400000) {
|
|
3029
|
+
// Per-CLI timeout caps: Codex is consistently slower, don't let it block results
|
|
3030
|
+
const maxTimeouts = {
|
|
3031
|
+
'codex_cli': 120000, // 120s — Codex exec is slow
|
|
3032
|
+
'claude_code': 400000, // 400s — Claude needs time for agentic web search
|
|
3033
|
+
'gemini_cli': 300000, // 300s — Gemini is generally fast
|
|
3034
|
+
};
|
|
3035
|
+
const maxTimeout = maxTimeouts[cliId] || defaultTimeout;
|
|
3036
|
+
|
|
3029
3037
|
const times = this.cliResponseTimes[cliId];
|
|
3030
3038
|
if (!times || times.length === 0) {
|
|
3031
|
-
|
|
3039
|
+
console.error(`[Stdio Wrapper] CLI timeout for ${cliId}: ${maxTimeout / 1000}s (no history)`);
|
|
3040
|
+
return maxTimeout;
|
|
3032
3041
|
}
|
|
3033
3042
|
const avg = times.reduce((a, b) => a + b, 0) / times.length;
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
console.error(`[Stdio Wrapper] CLI timeout for ${cliId}: 400s (avg response: ${Math.round(avg)}ms from ${times.length} samples)`);
|
|
3037
|
-
return 400000;
|
|
3043
|
+
console.error(`[Stdio Wrapper] CLI timeout for ${cliId}: ${maxTimeout / 1000}s (avg response: ${Math.round(avg)}ms from ${times.length} samples)`);
|
|
3044
|
+
return maxTimeout;
|
|
3038
3045
|
}
|
|
3039
3046
|
|
|
3040
3047
|
/**
|