polydev-ai 1.8.46 → 1.8.50

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.
@@ -733,14 +733,19 @@ class StdioMCPWrapper {
733
733
  const successfulLocalCount = localResults.filter(r => r.success).length;
734
734
  const failedCliCount = localResults.filter(r => !r.success).length;
735
735
 
736
- // Need API for: API-only providers + failed CLIs
736
+ // Need API for: remaining perspectives to reach maxPerspectives
737
+ // OLD (WRONG): const remainingPerspectives = apiOnlyCount + failedCliCount;
738
+ // This was wrong because if allProviders was empty, apiOnlyCount=0 and we'd get too few perspectives
739
+ // NEW (CORRECT): Always try to fill up to maxPerspectives from remote API
737
740
  const apiOnlyCount = (this._apiOnlyProviders || []).length;
738
- const remainingPerspectives = apiOnlyCount + failedCliCount;
741
+ const remainingPerspectives = Math.max(0, maxPerspectives - successfulLocalCount);
742
+
743
+ console.error(`[Stdio Wrapper] Perspectives breakdown: ${successfulLocalCount} successful CLI, ${failedCliCount} failed CLI, ${apiOnlyCount} API-only, need ${remainingPerspectives} more from remote (target: ${maxPerspectives})`);
739
744
 
740
745
  // Get remote perspectives for API-only providers and failed CLIs
741
746
  let perspectivesResult;
742
747
  if (remainingPerspectives > 0) {
743
- console.error(`[Stdio Wrapper] Need ${remainingPerspectives} perspectives from remote API (${apiOnlyCount} API-only + ${failedCliCount} failed CLIs)`);
748
+ console.error(`[Stdio Wrapper] Calling remote API for ${remainingPerspectives} more perspectives (have ${successfulLocalCount}/${maxPerspectives})`);
744
749
 
745
750
  // Pass API-only provider info to help remote API choose correct models
746
751
  const apiProvidersInfo = (this._apiOnlyProviders || []).map(p => ({
@@ -752,7 +757,7 @@ class StdioMCPWrapper {
752
757
  // We do NOT call reportCliResultsToServer() here to avoid duplicate logs
753
758
  perspectivesResult = await this.callPerspectivesForCli(args, localResults, remainingPerspectives, apiProvidersInfo);
754
759
  } else {
755
- console.error(`[Stdio Wrapper] Already have ${successfulLocalCount} perspectives from CLIs, skipping remote call`);
760
+ console.error(`[Stdio Wrapper] Already have ${successfulLocalCount} perspectives (max: ${maxPerspectives})`);
756
761
 
757
762
  // ONLY report CLI results when NOT calling remote API
758
763
  // (When we call remote API, it handles logging CLI + API results together)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.8.46",
3
+ "version": "1.8.50",
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": [