polydev-ai 1.8.43 → 1.8.45

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.
@@ -521,6 +521,7 @@ class StdioMCPWrapper {
521
521
 
522
522
  // Force detection using CLI Manager (no remote API calls)
523
523
  const results = await this.cliManager.forceCliDetection(providerId);
524
+ console.error(`[Stdio Wrapper] CLI detection results:`, JSON.stringify(results, null, 2));
524
525
 
525
526
  // Save status locally to file-based cache
526
527
  await this.saveLocalCliStatus(results);
@@ -658,7 +659,10 @@ class StdioMCPWrapper {
658
659
  if (allProviders.length === 0) {
659
660
  // Fallback: use legacy CLI-only flow
660
661
  console.error(`[Stdio Wrapper] No allProviders, using legacy CLI-only flow`);
661
- const userOrder = this.userProviderOrder || ['claude_code', 'codex_cli', 'gemini_cli'];
662
+ // NOTE: Use length check because empty array [] is truthy in JS
663
+ const userOrder = (this.userProviderOrder && this.userProviderOrder.length > 0)
664
+ ? this.userProviderOrder
665
+ : ['claude_code', 'codex_cli', 'gemini_cli'];
662
666
  const cliProviders = userOrder.slice(0, maxPerspectives).filter(p => availableClis.includes(p));
663
667
 
664
668
  const cliPromises = cliProviders.map(async (providerId) => {
@@ -803,12 +807,16 @@ class StdioMCPWrapper {
803
807
  }
804
808
 
805
809
  const results = await this.cliManager.forceCliDetection();
810
+ console.error(`[Stdio Wrapper] CLI detection results:`, JSON.stringify(results, null, 2));
806
811
  const availableProviders = [];
807
812
  const unavailableProviders = [];
808
813
 
809
814
  // Use user's provider order from dashboard (fetched via model-preferences API)
810
- // Falls back to default order if not yet loaded
811
- const priorityOrder = this.userProviderOrder || ['claude_code', 'codex_cli', 'gemini_cli'];
815
+ // Falls back to default order if not yet loaded or empty
816
+ // NOTE: Use length check because empty array [] is truthy in JS
817
+ const priorityOrder = (this.userProviderOrder && this.userProviderOrder.length > 0)
818
+ ? this.userProviderOrder
819
+ : ['claude_code', 'codex_cli', 'gemini_cli'];
812
820
  console.error(`[Stdio Wrapper] Using provider order: ${priorityOrder.join(' > ')}`);
813
821
 
814
822
  for (const providerId of priorityOrder) {
@@ -1555,7 +1563,10 @@ class StdioMCPWrapper {
1555
1563
  // Cache provider order from user's dashboard (respects display_order)
1556
1564
  // This determines which CLIs/APIs to use first
1557
1565
  // IMPORTANT: This is cached alongside modelPreferences and restored when cache is used
1558
- this.userProviderOrder = result.providerOrder || ['claude_code', 'codex_cli', 'gemini_cli'];
1566
+ // NOTE: Use length check because empty array [] is truthy in JS
1567
+ this.userProviderOrder = (result.providerOrder && result.providerOrder.length > 0)
1568
+ ? result.providerOrder
1569
+ : ['claude_code', 'codex_cli', 'gemini_cli'];
1559
1570
 
1560
1571
  // NEW: Cache full list of all providers (CLI + API-only) from dashboard
1561
1572
  // Format: [{ provider: 'openai', model: 'gpt-52-codex', cliId: 'codex_cli' }, { provider: 'x-ai', model: 'grok-4', cliId: null }, ...]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.8.43",
3
+ "version": "1.8.45",
4
4
  "mcpName": "io.github.backspacevenkat/perspectives",
5
5
  "description": "Agentic workflow assistant with CLI integration - get diverse perspectives from multiple LLMs when stuck or need enhanced reasoning",
6
6
  "keywords": [