polydev-ai 1.8.61 → 1.8.63
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/README.md +133 -15
- package/lib/cliManager.js +26 -3
- package/mcp/manifest.json +1 -1
- package/mcp/stdio-wrapper.js +29 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,30 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
**Multi-model AI perspectives for your coding agents.**
|
|
4
4
|
|
|
5
|
-
Get insights from GPT
|
|
5
|
+
Get insights from GPT 5.2, Claude Opus 4.5, Gemini 3, and Grok 4.1 — all through one MCP server.
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/polydev-ai)
|
|
8
|
+
[](https://polydev.ai/articles/swe-bench-paper)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Why Polydev?
|
|
14
|
+
|
|
15
|
+
**Stop copy-pasting between ChatGPT, Claude, and Gemini.** Get all their perspectives in your IDE with one request.
|
|
16
|
+
|
|
17
|
+
| Metric | Result |
|
|
18
|
+
|--------|--------|
|
|
19
|
+
| **SWE-bench Verified** | 74.6% Resolve@2 |
|
|
20
|
+
| **Cost vs Claude Opus** | 62% lower |
|
|
21
|
+
| **Response time** | 10-40 seconds |
|
|
22
|
+
|
|
23
|
+
> *"Different models have different blind spots. Combining their perspectives eliminates yours."*
|
|
6
24
|
|
|
7
25
|
---
|
|
8
26
|
|
|
9
27
|
## Quick Start
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
npx polydev-ai@latest
|
|
13
|
-
```
|
|
29
|
+
### 1. Get your free API token
|
|
14
30
|
|
|
15
|
-
|
|
31
|
+
**[polydev.ai/dashboard/mcp-tokens](https://polydev.ai/dashboard/mcp-tokens)**
|
|
16
32
|
|
|
17
|
-
|
|
33
|
+
| Tier | Messages/Month | Price |
|
|
34
|
+
|------|----------------|-------|
|
|
35
|
+
| **Free** | 1,000 | $0 |
|
|
36
|
+
| **Pro** | 10,000 | $19/mo |
|
|
18
37
|
|
|
38
|
+
### 2. Install
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx polydev-ai@latest
|
|
19
42
|
```
|
|
20
|
-
|
|
21
|
-
|
|
43
|
+
|
|
44
|
+
---
|
|
22
45
|
|
|
23
46
|
## Setup
|
|
24
47
|
|
|
25
48
|
### Claude Code
|
|
26
49
|
|
|
27
50
|
```bash
|
|
28
|
-
claude mcp add polydev
|
|
51
|
+
claude mcp add polydev -- npx -y polydev-ai@latest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then set your token:
|
|
55
|
+
```bash
|
|
56
|
+
export POLYDEV_USER_TOKEN="pd_your_token_here"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Or add to `~/.claude.json`:
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"mcpServers": {
|
|
64
|
+
"polydev": {
|
|
65
|
+
"command": "npx",
|
|
66
|
+
"args": ["-y", "polydev-ai@latest"],
|
|
67
|
+
"env": {
|
|
68
|
+
"POLYDEV_USER_TOKEN": "pd_your_token_here"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
29
73
|
```
|
|
30
74
|
|
|
31
75
|
### Cursor / Windsurf / Cline
|
|
@@ -35,28 +79,102 @@ Add to your MCP config:
|
|
|
35
79
|
```json
|
|
36
80
|
{
|
|
37
81
|
"mcpServers": {
|
|
38
|
-
"polydev
|
|
82
|
+
"polydev": {
|
|
39
83
|
"command": "npx",
|
|
40
|
-
"args": ["polydev-ai@latest"]
|
|
84
|
+
"args": ["-y", "polydev-ai@latest"],
|
|
85
|
+
"env": {
|
|
86
|
+
"POLYDEV_USER_TOKEN": "pd_your_token_here"
|
|
87
|
+
}
|
|
41
88
|
}
|
|
42
89
|
}
|
|
43
90
|
}
|
|
44
91
|
```
|
|
45
92
|
|
|
93
|
+
### OpenAI Codex CLI
|
|
94
|
+
|
|
95
|
+
Add to `~/.codex/config.toml`:
|
|
96
|
+
|
|
97
|
+
```toml
|
|
98
|
+
[mcp_servers.polydev]
|
|
99
|
+
command = "npx"
|
|
100
|
+
args = ["-y", "polydev-ai@latest"]
|
|
101
|
+
|
|
102
|
+
[mcp_servers.polydev.env]
|
|
103
|
+
POLYDEV_USER_TOKEN = "pd_your_token_here"
|
|
104
|
+
|
|
105
|
+
[mcp_servers.polydev.timeouts]
|
|
106
|
+
tool_timeout = 180
|
|
107
|
+
session_timeout = 600
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
46
112
|
## Usage
|
|
47
113
|
|
|
48
114
|
Once connected, your agent can call:
|
|
49
115
|
|
|
116
|
+
```typescript
|
|
117
|
+
{
|
|
118
|
+
"tool": "get_perspectives",
|
|
119
|
+
"arguments": {
|
|
120
|
+
"prompt": "How should I refactor this authentication flow?",
|
|
121
|
+
"user_token": "pd_your_token_here"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Or just mention "polydev" or "perspectives" in your prompt:
|
|
127
|
+
|
|
50
128
|
```
|
|
51
|
-
|
|
129
|
+
"Use polydev to debug this infinite loop"
|
|
130
|
+
"Get perspectives on: Should I use Redis or PostgreSQL for caching?"
|
|
52
131
|
```
|
|
53
132
|
|
|
54
133
|
Returns structured perspectives from multiple models with reasoning and recommendations.
|
|
55
134
|
|
|
56
|
-
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## How It Works
|
|
138
|
+
|
|
139
|
+
```
|
|
140
|
+
Your Agent → Polydev → [GPT 5.2, Claude Opus 4.5, Gemini 3, Grok 4.1] → Synthesized Answer
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
When your AI agent gets stuck, Polydev consults multiple frontier models simultaneously and returns their perspectives. One API call, four expert opinions.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Research
|
|
148
|
+
|
|
149
|
+
Our approach achieves **74.6% on SWE-bench Verified** (Resolve@2), matching Claude Opus at 62% lower cost.
|
|
150
|
+
|
|
151
|
+
| Approach | Resolution Rate | Cost/Instance |
|
|
152
|
+
|----------|-----------------|---------------|
|
|
153
|
+
| Claude Haiku (baseline) | 64.6% | $0.18 |
|
|
154
|
+
| + Polydev consultation | 66.6% | $0.24 |
|
|
155
|
+
| **Resolve@2 (best of both)** | **74.6%** | $0.37 |
|
|
156
|
+
| Claude Opus (reference) | 74.4% | $0.97 |
|
|
157
|
+
|
|
158
|
+
**[Read the full paper →](https://polydev.ai/articles/swe-bench-paper)**
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Links
|
|
163
|
+
|
|
164
|
+
- **Website:** [polydev.ai](https://polydev.ai)
|
|
165
|
+
- **Dashboard:** [polydev.ai/dashboard](https://polydev.ai/dashboard)
|
|
166
|
+
- **npm:** [npmjs.com/package/polydev-ai](https://www.npmjs.com/package/polydev-ai)
|
|
167
|
+
- **Research:** [SWE-bench Paper](https://polydev.ai/articles/swe-bench-paper)
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## License
|
|
57
172
|
|
|
58
|
-
|
|
173
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
59
174
|
|
|
60
175
|
---
|
|
61
176
|
|
|
62
|
-
|
|
177
|
+
<p align="center">
|
|
178
|
+
<b>Built by <a href="https://polydev.ai">Polydev AI</a></b><br>
|
|
179
|
+
<i>Multi-model consultation for better code</i>
|
|
180
|
+
</p>
|
package/lib/cliManager.js
CHANGED
|
@@ -578,16 +578,39 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
578
578
|
// Build args with model flag if specified
|
|
579
579
|
let args = Array.isArray(promptArgs) ? [...promptArgs] : [];
|
|
580
580
|
|
|
581
|
+
// Normalize model names to CLI-compatible formats
|
|
582
|
+
let cliModel = model;
|
|
583
|
+
if (model && providerId === 'claude_code') {
|
|
584
|
+
// Map common model names to Claude CLI aliases/full names
|
|
585
|
+
const claudeModelMap = {
|
|
586
|
+
'claude-opus-4-5': 'opus',
|
|
587
|
+
'claude-opus-4.5': 'opus',
|
|
588
|
+
'claude-4.5-opus': 'opus',
|
|
589
|
+
'claude-opus-4-5-20250514': 'opus',
|
|
590
|
+
'claude-sonnet-4-5': 'sonnet',
|
|
591
|
+
'claude-sonnet-4.5': 'sonnet',
|
|
592
|
+
'claude-4.5-sonnet': 'sonnet',
|
|
593
|
+
'claude-sonnet-4-5-20250514': 'sonnet',
|
|
594
|
+
'claude-3-5-sonnet': 'sonnet',
|
|
595
|
+
'claude-3-5-haiku': 'haiku',
|
|
596
|
+
'claude-haiku-3-5': 'haiku',
|
|
597
|
+
};
|
|
598
|
+
cliModel = claudeModelMap[model.toLowerCase()] || model;
|
|
599
|
+
if (cliModel !== model) {
|
|
600
|
+
console.log(`[Polydev CLI] Mapped model '${model}' to Claude CLI alias '${cliModel}'`);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
|
|
581
604
|
// Add model flag based on CLI type
|
|
582
|
-
if (
|
|
605
|
+
if (cliModel) {
|
|
583
606
|
if (providerId === 'claude_code') {
|
|
584
607
|
// Claude Code uses --model flag
|
|
585
|
-
args = ['--model',
|
|
608
|
+
args = ['--model', cliModel, ...args, prompt];
|
|
586
609
|
} else if (providerId === 'gemini_cli') {
|
|
587
610
|
// Gemini CLI: -m for model, -p for prompt (headless mode)
|
|
588
611
|
// Add prompt prefix to prevent tool planning in non-interactive mode
|
|
589
612
|
const geminiPrompt = `Answer directly without using any tools, file operations, or searches. Do not say "I will search" or "I will look up". Provide your analysis immediately.\n\n${prompt}`;
|
|
590
|
-
args = ['-m',
|
|
613
|
+
args = ['-m', cliModel, '-p', geminiPrompt];
|
|
591
614
|
} else {
|
|
592
615
|
// Default: just append prompt
|
|
593
616
|
args = [...args, prompt];
|
package/mcp/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polydev-perspectives",
|
|
3
3
|
"version": "1.3.0",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "Multi-model AI perspectives - query GPT 5.2, Claude Opus 4.5, Gemini 3, and Grok 4.1 simultaneously. Get diverse perspectives when stuck or need enhanced reasoning. Achieved 74.6% on SWE-bench Verified.",
|
|
5
5
|
"author": "Polydev AI",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "server.js",
|
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -1706,4 +1706,33 @@ if (require.main === module) {
|
|
|
1706
1706
|
});
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
|
+
/**
|
|
1710
|
+
* Smithery sandbox server factory
|
|
1711
|
+
* Creates a mock server instance for Smithery's capability scanning
|
|
1712
|
+
* This allows Smithery to discover tools/resources without real credentials
|
|
1713
|
+
*/
|
|
1714
|
+
function createSandboxServer() {
|
|
1715
|
+
// Return a minimal server that exposes our tool definitions for scanning
|
|
1716
|
+
// No real API calls will be made - this is just for capability discovery
|
|
1717
|
+
const fs = require('fs');
|
|
1718
|
+
const path = require('path');
|
|
1719
|
+
|
|
1720
|
+
const manifestPath = path.join(__dirname, 'manifest.json');
|
|
1721
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
1722
|
+
|
|
1723
|
+
return {
|
|
1724
|
+
serverInfo: {
|
|
1725
|
+
name: manifest.name,
|
|
1726
|
+
version: manifest.version
|
|
1727
|
+
},
|
|
1728
|
+
capabilities: { tools: {} },
|
|
1729
|
+
tools: manifest.tools.map(tool => ({
|
|
1730
|
+
name: tool.name,
|
|
1731
|
+
description: tool.description,
|
|
1732
|
+
inputSchema: tool.inputSchema
|
|
1733
|
+
}))
|
|
1734
|
+
};
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1709
1737
|
module.exports = StdioMCPWrapper;
|
|
1738
|
+
module.exports.createSandboxServer = createSandboxServer;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polydev-ai",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.63",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.x <=22.x"
|
|
6
6
|
},
|
|
7
7
|
"mcpName": "io.github.backspacevenkat/perspectives",
|
|
8
|
-
"description": "
|
|
8
|
+
"description": "Multi-model AI perspectives for coding agents - query GPT 5.2, Claude Opus 4.5, Gemini 3, and Grok 4.1 simultaneously through one MCP server",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"mcp",
|
|
11
11
|
"model-context-protocol",
|