polydev-ai 1.10.16 → 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/lib/cliManager.js CHANGED
@@ -56,7 +56,7 @@ class CLIManager {
56
56
  chat: [],
57
57
  version: ['--version'],
58
58
  auth_status: ['--print', 'test auth'], // Use --print to test auth
59
- test_prompt: ['--print', '--output-format', 'json', '--max-turns', '3'] // JSON output, limit agentic loops
59
+ test_prompt: ['--print', '--output-format', 'json', '--dangerously-skip-permissions'] // JSON output, skip permission prompts for server-side usage
60
60
  },
61
61
  install_instructions: 'Install via: npm install -g @anthropic-ai/claude-code',
62
62
  auth_instructions: 'Authenticate with Claude Code'
@@ -1138,8 +1138,8 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1138
1138
 
1139
1139
  // Add standard flags and prompt
1140
1140
  args.push(
1141
- '--sandbox',
1142
- 'workspace-write',
1141
+ '--full-auto',
1142
+ '--ephemeral',
1143
1143
  '--skip-git-repo-check',
1144
1144
  '--cd',
1145
1145
  workingDir,
@@ -1169,6 +1169,8 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1169
1169
  NO_COLOR: '1',
1170
1170
  TERM: 'dumb',
1171
1171
  NONINTERACTIVE: '1',
1172
+ // Prevent shell init scripts from hanging (GitHub issue #7353)
1173
+ BASH_ENV: '/dev/null',
1172
1174
  // Prevent browser opening (OAuth, updates, etc.)
1173
1175
  NO_BROWSER: '1',
1174
1176
  BROWSER: 'echo',
@@ -1429,7 +1431,7 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1429
1431
  */
1430
1432
  buildStreamingArgs(providerId, prompt, model = null) {
1431
1433
  if (providerId === 'claude_code') {
1432
- const args = ['-p', '--output-format', 'stream-json', '--verbose', '--include-partial-messages', '--max-turns', '3'];
1434
+ const args = ['-p', '--output-format', 'stream-json', '--verbose', '--include-partial-messages', '--dangerously-skip-permissions'];
1433
1435
 
1434
1436
  // Add model flag if specified
1435
1437
  if (model) {
@@ -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
- return defaultTimeout; // No history, use default (400s)
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
- // Always use 400s local CLIs should get full time budget
3035
- // Complex prompts need the full timeout; premature timeouts waste credits
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
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.10.16",
3
+ "version": "1.10.18",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },