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.
@@ -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
- * Returns timeout in ms (2.5x the average, with min 30s and max 400s)
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
- // 2.5x average, clamped between 30s and 400s
2832
- const adaptive = Math.min(400000, Math.max(30000, Math.round(avg * 2.5)));
2833
- console.error(`[Stdio Wrapper] Adaptive timeout for ${cliId}: ${adaptive}ms (avg: ${Math.round(avg)}ms from ${times.length} samples)`);
2834
- return adaptive;
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.9.34",
3
+ "version": "1.9.35",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },