polydev-ai 1.8.32 → 1.8.33
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 +26 -18
- package/package.json +4 -4
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -6,6 +6,12 @@ const path = require('path');
|
|
|
6
6
|
const os = require('os');
|
|
7
7
|
const { CLIManager } = require('../lib/cliManager');
|
|
8
8
|
|
|
9
|
+
// MCP stdio servers must only emit JSON-RPC on stdout.
|
|
10
|
+
// Redirect any accidental console output to stderr to avoid handshake failures.
|
|
11
|
+
console.log = console.error;
|
|
12
|
+
console.info = console.error;
|
|
13
|
+
console.debug = console.error;
|
|
14
|
+
|
|
9
15
|
// Simple .env file loader (no external dependencies)
|
|
10
16
|
function loadEnvFile(filePath) {
|
|
11
17
|
try {
|
|
@@ -1564,20 +1570,8 @@ class StdioMCPWrapper {
|
|
|
1564
1570
|
}
|
|
1565
1571
|
|
|
1566
1572
|
async start() {
|
|
1567
|
-
console.
|
|
1568
|
-
|
|
1569
|
-
// Run initial CLI detection on startup
|
|
1570
|
-
console.error('[Stdio Wrapper] Running initial CLI detection...');
|
|
1571
|
-
try {
|
|
1572
|
-
await this.localForceCliDetection({});
|
|
1573
|
-
console.error('[Stdio Wrapper] Initial CLI detection completed');
|
|
1574
|
-
} catch (error) {
|
|
1575
|
-
console.error('[Stdio Wrapper] Initial CLI detection failed:', error);
|
|
1576
|
-
}
|
|
1577
|
-
|
|
1578
|
-
// Start smart refresh scheduler for automatic updates
|
|
1579
|
-
this.startSmartRefreshScheduler();
|
|
1580
|
-
|
|
1573
|
+
console.error('Starting Polydev Stdio MCP Wrapper...');
|
|
1574
|
+
|
|
1581
1575
|
process.stdin.setEncoding('utf8');
|
|
1582
1576
|
let buffer = '';
|
|
1583
1577
|
|
|
@@ -1601,25 +1595,39 @@ class StdioMCPWrapper {
|
|
|
1601
1595
|
});
|
|
1602
1596
|
|
|
1603
1597
|
process.stdin.on('end', () => {
|
|
1604
|
-
console.
|
|
1598
|
+
console.error('Stdio MCP Wrapper shutting down...');
|
|
1605
1599
|
this.stopSmartRefreshScheduler();
|
|
1606
1600
|
process.exit(0);
|
|
1607
1601
|
});
|
|
1608
1602
|
|
|
1609
1603
|
// Handle process signals
|
|
1610
1604
|
process.on('SIGINT', () => {
|
|
1611
|
-
console.
|
|
1605
|
+
console.error('Received SIGINT, shutting down...');
|
|
1612
1606
|
this.stopSmartRefreshScheduler();
|
|
1613
1607
|
process.exit(0);
|
|
1614
1608
|
});
|
|
1615
1609
|
|
|
1616
1610
|
process.on('SIGTERM', () => {
|
|
1617
|
-
console.
|
|
1611
|
+
console.error('Received SIGTERM, shutting down...');
|
|
1618
1612
|
this.stopSmartRefreshScheduler();
|
|
1619
1613
|
process.exit(0);
|
|
1620
1614
|
});
|
|
1621
1615
|
|
|
1622
|
-
console.
|
|
1616
|
+
console.error('Stdio MCP Wrapper ready and listening on stdin...');
|
|
1617
|
+
|
|
1618
|
+
// Run initial CLI detection in the background so MCP handshake isn't blocked.
|
|
1619
|
+
console.error('[Stdio Wrapper] Running initial CLI detection...');
|
|
1620
|
+
this.localForceCliDetection({})
|
|
1621
|
+
.then(() => {
|
|
1622
|
+
console.error('[Stdio Wrapper] Initial CLI detection completed');
|
|
1623
|
+
})
|
|
1624
|
+
.catch((error) => {
|
|
1625
|
+
console.error('[Stdio Wrapper] Initial CLI detection failed:', error);
|
|
1626
|
+
})
|
|
1627
|
+
.finally(() => {
|
|
1628
|
+
// Start smart refresh scheduler after initial detection attempt
|
|
1629
|
+
this.startSmartRefreshScheduler();
|
|
1630
|
+
});
|
|
1623
1631
|
}
|
|
1624
1632
|
}
|
|
1625
1633
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polydev-ai",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.33",
|
|
4
4
|
"description": "Agentic workflow assistant with CLI integration - get diverse perspectives from multiple LLMs when stuck or need enhanced reasoning",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"author": "Polydev AI",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"private": false,
|
|
19
|
-
"main": "mcp/
|
|
19
|
+
"main": "mcp/server.js",
|
|
20
20
|
"bin": {
|
|
21
21
|
"polydev-stdio": "mcp/stdio-wrapper.js"
|
|
22
22
|
},
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"repository": {
|
|
45
45
|
"type": "git",
|
|
46
|
-
"url": "
|
|
46
|
+
"url": "https://github.com/polydev-ai/perspectives-mcp.git"
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://polydev.ai",
|
|
49
49
|
"bugs": {
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"lucide-react": "^0.542.0",
|
|
68
68
|
"marked": "^16.2.1",
|
|
69
69
|
"next": "^15.5.7",
|
|
70
|
-
"polydev-ai": "^1.8.
|
|
70
|
+
"polydev-ai": "^1.8.31",
|
|
71
71
|
"posthog-js": "^1.157.2",
|
|
72
72
|
"prismjs": "^1.30.0",
|
|
73
73
|
"react": "^18.3.1",
|