polydev-ai 1.10.10 → 1.10.11

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.
Files changed (2) hide show
  1. package/lib/cliManager.js +17 -1
  2. package/package.json +1 -1
package/lib/cliManager.js CHANGED
@@ -687,6 +687,17 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
687
687
  // Special handling for Claude Code JSON output
688
688
  if (providerId === 'claude_code') {
689
689
  const jsonResult = this.parseClaudeCodeJsonResponse(result.stdout || '');
690
+ if (jsonResult && jsonResult.is_error) {
691
+ // CLI returned a structured error (e.g., "Invalid API key", "Failed to authenticate")
692
+ console.error(`[Polydev CLI] Claude Code CLI error: ${jsonResult.error}`);
693
+ return {
694
+ success: false,
695
+ error: `CLI error: ${jsonResult.error}`,
696
+ latency_ms: Date.now() - startTime,
697
+ provider: providerId,
698
+ timestamp: new Date()
699
+ };
700
+ }
690
701
  if (jsonResult) {
691
702
  console.log(`[Polydev CLI] Claude Code detected model: ${jsonResult.model_used} (from JSON output)`);
692
703
  return {
@@ -1043,7 +1054,12 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
1043
1054
  if (json.type !== 'result' || !json.result) {
1044
1055
  return null;
1045
1056
  }
1046
-
1057
+
1058
+ // Check if CLI reported an error (e.g., "Invalid API key", "Failed to authenticate")
1059
+ if (json.is_error) {
1060
+ return { is_error: true, error: json.result };
1061
+ }
1062
+
1047
1063
  // Extract content
1048
1064
  const content = json.result;
1049
1065
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.10.10",
3
+ "version": "1.10.11",
4
4
  "engines": {
5
5
  "node": ">=20.x <=22.x"
6
6
  },