polydev-ai 1.9.34 → 1.9.35
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 +6 -6
- package/package.json +1 -1
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -2820,18 +2820,18 @@ To re-login: /polydev:login`
|
|
|
2820
2820
|
|
|
2821
2821
|
/**
|
|
2822
2822
|
* Get adaptive timeout for a CLI based on historical response times
|
|
2823
|
-
*
|
|
2823
|
+
* Always uses 400s to ensure local CLIs get full time budget before falling back to credits
|
|
2824
2824
|
*/
|
|
2825
2825
|
getAdaptiveTimeout(cliId, defaultTimeout = 400000) {
|
|
2826
2826
|
const times = this.cliResponseTimes[cliId];
|
|
2827
2827
|
if (!times || times.length === 0) {
|
|
2828
|
-
return defaultTimeout; // No history, use default
|
|
2828
|
+
return defaultTimeout; // No history, use default (400s)
|
|
2829
2829
|
}
|
|
2830
2830
|
const avg = times.reduce((a, b) => a + b, 0) / times.length;
|
|
2831
|
-
//
|
|
2832
|
-
|
|
2833
|
-
console.error(`[Stdio Wrapper]
|
|
2834
|
-
return
|
|
2831
|
+
// Always use 400s — local CLIs should get full time budget
|
|
2832
|
+
// Complex prompts need the full timeout; premature timeouts waste credits
|
|
2833
|
+
console.error(`[Stdio Wrapper] CLI timeout for ${cliId}: 400s (avg response: ${Math.round(avg)}ms from ${times.length} samples)`);
|
|
2834
|
+
return 400000;
|
|
2835
2835
|
}
|
|
2836
2836
|
|
|
2837
2837
|
/**
|