polydev-ai 1.8.41 → 1.8.43
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/mcp/stdio-wrapper.js +23 -1
- package/package.json +3 -2
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -265,7 +265,14 @@ class StdioMCPWrapper {
|
|
|
265
265
|
// Smart refresh scheduler (will be started after initialization)
|
|
266
266
|
this.refreshScheduler = null;
|
|
267
267
|
|
|
268
|
-
//
|
|
268
|
+
// CLI detection readiness tracking - requests will wait for this
|
|
269
|
+
// Create the promise NOW in constructor so it exists before any requests arrive
|
|
270
|
+
this._cliDetectionComplete = false;
|
|
271
|
+
this._cliDetectionReady = new Promise((resolve) => {
|
|
272
|
+
this._cliDetectionResolver = resolve;
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
// Cache for user model preferences
|
|
269
276
|
this.userModelPreferences = null;
|
|
270
277
|
this.perspectivesPerMessage = 2; // Default to 2 perspectives
|
|
271
278
|
this.modelPreferencesCacheTime = null;
|
|
@@ -788,6 +795,13 @@ class StdioMCPWrapper {
|
|
|
788
795
|
*/
|
|
789
796
|
async getAllAvailableProviders() {
|
|
790
797
|
try {
|
|
798
|
+
// Wait for initial CLI detection to complete if it's still running
|
|
799
|
+
if (this._cliDetectionReady && !this._cliDetectionComplete) {
|
|
800
|
+
console.error('[Stdio Wrapper] Waiting for initial CLI detection to complete...');
|
|
801
|
+
await this._cliDetectionReady;
|
|
802
|
+
console.error('[Stdio Wrapper] CLI detection ready, proceeding with request');
|
|
803
|
+
}
|
|
804
|
+
|
|
791
805
|
const results = await this.cliManager.forceCliDetection();
|
|
792
806
|
const availableProviders = [];
|
|
793
807
|
const unavailableProviders = [];
|
|
@@ -1645,15 +1659,23 @@ class StdioMCPWrapper {
|
|
|
1645
1659
|
console.error('Stdio MCP Wrapper ready and listening on stdin...');
|
|
1646
1660
|
|
|
1647
1661
|
// Run initial CLI detection in the background so MCP handshake isn't blocked.
|
|
1662
|
+
// The promise was already created in constructor so requests will wait for it
|
|
1648
1663
|
console.error('[Stdio Wrapper] Running initial CLI detection...');
|
|
1664
|
+
|
|
1649
1665
|
this.localForceCliDetection({})
|
|
1650
1666
|
.then(() => {
|
|
1651
1667
|
console.error('[Stdio Wrapper] Initial CLI detection completed');
|
|
1668
|
+
this._cliDetectionComplete = true;
|
|
1652
1669
|
})
|
|
1653
1670
|
.catch((error) => {
|
|
1654
1671
|
console.error('[Stdio Wrapper] Initial CLI detection failed:', error);
|
|
1672
|
+
this._cliDetectionComplete = true; // Mark complete even on failure
|
|
1655
1673
|
})
|
|
1656
1674
|
.finally(() => {
|
|
1675
|
+
// Resolve the readiness promise so waiting requests can proceed
|
|
1676
|
+
if (this._cliDetectionResolver) {
|
|
1677
|
+
this._cliDetectionResolver();
|
|
1678
|
+
}
|
|
1657
1679
|
// Start smart refresh scheduler after initial detection attempt
|
|
1658
1680
|
this.startSmartRefreshScheduler();
|
|
1659
1681
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polydev-ai",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.43",
|
|
4
|
+
"mcpName": "io.github.backspacevenkat/perspectives",
|
|
4
5
|
"description": "Agentic workflow assistant with CLI integration - get diverse perspectives from multiple LLMs when stuck or need enhanced reasoning",
|
|
5
6
|
"keywords": [
|
|
6
7
|
"mcp",
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
"lucide-react": "^0.542.0",
|
|
68
69
|
"marked": "^16.2.1",
|
|
69
70
|
"next": "^15.5.7",
|
|
70
|
-
"polydev-ai": "^1.8.
|
|
71
|
+
"polydev-ai": "^1.8.42",
|
|
71
72
|
"posthog-js": "^1.157.2",
|
|
72
73
|
"prismjs": "^1.30.0",
|
|
73
74
|
"react": "^18.3.1",
|