polydev-ai 1.4.4 → 1.4.5

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.
@@ -201,34 +201,46 @@ class StdioMCPWrapper {
201
201
 
202
202
  async forwardToRemoteServer(request) {
203
203
  console.error(`[Stdio Wrapper] Forwarding request to remote server`);
204
-
205
- const response = await fetch('https://www.polydev.ai/api/mcp', {
206
- method: 'POST',
207
- headers: {
208
- 'Content-Type': 'application/json',
209
- 'Authorization': `Bearer ${this.userToken}`,
210
- 'User-Agent': 'polydev-stdio-wrapper/1.0.0'
211
- },
212
- body: JSON.stringify(request)
213
- });
214
204
 
215
- if (!response.ok) {
216
- const errorText = await response.text();
217
- console.error(`[Stdio Wrapper] Remote server error: ${response.status} - ${errorText}`);
218
-
205
+ try {
206
+ const response = await fetch('https://www.polydev.ai/api/mcp', {
207
+ method: 'POST',
208
+ headers: {
209
+ 'Content-Type': 'application/json',
210
+ 'Authorization': `Bearer ${this.userToken}`,
211
+ 'User-Agent': 'polydev-stdio-wrapper/1.0.0'
212
+ },
213
+ body: JSON.stringify(request)
214
+ });
215
+
216
+ if (!response.ok) {
217
+ const errorText = await response.text();
218
+ console.error(`[Stdio Wrapper] Remote server error: ${response.status} - ${errorText}`);
219
+
220
+ return {
221
+ jsonrpc: '2.0',
222
+ id: request.id,
223
+ error: {
224
+ code: -32603,
225
+ message: `Remote server error: ${response.status} - ${errorText}`
226
+ }
227
+ };
228
+ }
229
+
230
+ const result = await response.json();
231
+ console.error(`[Stdio Wrapper] Got response from remote server`);
232
+ return result;
233
+ } catch (error) {
234
+ console.error(`[Stdio Wrapper] Network error:`, error.message);
219
235
  return {
220
236
  jsonrpc: '2.0',
221
237
  id: request.id,
222
238
  error: {
223
239
  code: -32603,
224
- message: `Remote server error: ${response.status} - ${errorText}`
240
+ message: `Network error: ${error.message}`
225
241
  }
226
242
  };
227
243
  }
228
-
229
- const result = await response.json();
230
- console.error(`[Stdio Wrapper] Got response from remote server`);
231
- return result;
232
244
  }
233
245
 
234
246
  /**
@@ -556,7 +568,16 @@ class StdioMCPWrapper {
556
568
  };
557
569
 
558
570
  const remoteResponse = await this.forwardToRemoteServer(perspectivesRequest);
559
-
571
+
572
+ // Guard against undefined/null response
573
+ if (!remoteResponse) {
574
+ return {
575
+ success: false,
576
+ error: 'No response from remote server',
577
+ timestamp: new Date().toISOString()
578
+ };
579
+ }
580
+
560
581
  if (remoteResponse.result && remoteResponse.result.content && remoteResponse.result.content[0]) {
561
582
  // The remote response already contains formatted "Multiple AI Perspectives" content
562
583
  // Return it as-is without additional formatting to avoid duplication
package/package.json CHANGED
@@ -1,47 +1,103 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.4.4",
4
- "description": "Get diverse AI perspectives from multiple LLMs via MCP - supports Cline, Claude Code, and other MCP clients",
5
- "main": "stdio-wrapper.js",
6
- "bin": {
7
- "polydev-ai": "./stdio-wrapper.js"
8
- },
9
- "scripts": {
10
- "start": "node server.js",
11
- "test": "node server.js --help"
12
- },
3
+ "version": "1.4.5",
4
+ "description": "Agentic workflow assistant with CLI integration - get diverse perspectives from multiple LLMs when stuck or need enhanced reasoning",
13
5
  "keywords": [
14
6
  "mcp",
15
7
  "model-context-protocol",
16
8
  "ai",
17
- "llm",
18
- "perspectives",
19
- "multi-model",
20
- "cline",
21
9
  "claude",
22
10
  "openai",
23
- "anthropic",
24
- "gemini",
25
- "polydev"
11
+ "perspectives",
12
+ "cli",
13
+ "agent",
14
+ "assistant"
26
15
  ],
27
- "author": "Polydev AI <support@polydev.ai>",
16
+ "author": "Polydev AI",
28
17
  "license": "MIT",
29
- "engines": {
30
- "node": ">=16.0.0"
18
+ "private": false,
19
+ "main": "mcp/server.js",
20
+ "bin": {
21
+ "polydev-stdio": "mcp/stdio-wrapper.js"
31
22
  },
32
23
  "files": [
33
- "stdio-wrapper.js",
34
- "cliManager.js",
35
- "manifest.json",
36
- "README.md"
24
+ "mcp/",
25
+ "lib/",
26
+ "README.md",
27
+ "LICENSE"
37
28
  ],
29
+ "scripts": {
30
+ "dev": "node server.js",
31
+ "build": "next build",
32
+ "start": "node server.js",
33
+ "lint": "next lint",
34
+ "test": "jest",
35
+ "test:watch": "jest --watch",
36
+ "test:coverage": "jest --coverage",
37
+ "test:api": "jest __tests__/api",
38
+ "test:vm": "jest __tests__/api/vm",
39
+ "test:admin": "jest __tests__/api/admin",
40
+ "mcp": "node mcp/server.js",
41
+ "mcp-stdio": "node mcp/stdio-wrapper.js",
42
+ "cli-detect": "node -e \"const CLIManager = require('./lib/cliManager').default; const m = new CLIManager(); m.forceCliDetection().then(console.log);\""
43
+ },
38
44
  "repository": {
39
45
  "type": "git",
40
- "url": "https://github.com/backspacevenkat/polydev-website.git",
41
- "directory": "mcp"
46
+ "url": "https://github.com/polydev-ai/perspectives-mcp.git"
42
47
  },
43
- "homepage": "https://polydev.ai/docs/mcp-integration",
48
+ "homepage": "https://polydev.ai",
44
49
  "bugs": {
45
- "url": "https://github.com/backspacevenkat/polydev-website/issues"
50
+ "url": "https://github.com/polydev-ai/perspectives-mcp/issues"
51
+ },
52
+ "dependencies": {
53
+ "@hello-pangea/dnd": "^18.0.1",
54
+ "@radix-ui/react-dialog": "^1.1.15",
55
+ "@radix-ui/react-progress": "^1.1.7",
56
+ "@radix-ui/react-select": "^2.2.6",
57
+ "@radix-ui/react-slot": "^1.2.3",
58
+ "@radix-ui/react-tabs": "^1.1.13",
59
+ "@supabase/ssr": "^0.4.0",
60
+ "@supabase/supabase-js": "^2.45.0",
61
+ "@upstash/redis": "^1.34.0",
62
+ "class-variance-authority": "^0.7.1",
63
+ "clsx": "^2.1.1",
64
+ "date-fns": "^4.1.0",
65
+ "dotenv": "^17.2.2",
66
+ "framer-motion": "^12.23.22",
67
+ "lucide-react": "^0.542.0",
68
+ "marked": "^16.2.1",
69
+ "next": "^15.5.7",
70
+ "polydev-ai": "^1.2.0",
71
+ "posthog-js": "^1.157.2",
72
+ "prismjs": "^1.30.0",
73
+ "react": "^18.3.1",
74
+ "react-dom": "^18.3.1",
75
+ "resend": "^6.0.2",
76
+ "shelljs": "^0.8.5",
77
+ "sonner": "^2.0.7",
78
+ "stripe": "^18.5.0",
79
+ "tailwind-merge": "^3.3.1",
80
+ "tailwindcss-animate": "^1.0.7",
81
+ "ts-node": "^10.9.2",
82
+ "undici": "^6.21.0",
83
+ "use-debounce": "^10.0.6",
84
+ "which": "^5.0.0"
85
+ },
86
+ "devDependencies": {
87
+ "@testing-library/jest-dom": "^6.9.1",
88
+ "@testing-library/react": "^16.3.0",
89
+ "@types/jest": "^30.0.0",
90
+ "@types/node": "^20.16.1",
91
+ "@types/react": "^18.3.3",
92
+ "@types/react-dom": "^18.3.0",
93
+ "autoprefixer": "^10.4.20",
94
+ "eslint": "^8.57.0",
95
+ "eslint-config-next": "15.0.0",
96
+ "jest": "^30.2.0",
97
+ "jest-environment-jsdom": "^30.2.0",
98
+ "postcss": "^8.4.41",
99
+ "tailwindcss": "^3.4.10",
100
+ "ts-jest": "^29.4.4",
101
+ "typescript": "^5.5.4"
46
102
  }
47
- }
103
+ }
File without changes
File without changes