polydev-ai 1.8.59 → 1.8.62
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 +124 -163
- package/lib/cliManager.js +26 -3
- package/mcp/manifest.json +1 -1
- package/mcp/stdio-wrapper.js +29 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,219 +1,180 @@
|
|
|
1
1
|
# Polydev AI
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Multi-model AI perspectives for your coding agents.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Get insights from GPT 5.2, Claude Opus 4.5, Gemini 3, and Grok 4.1 — all through one MCP server.
|
|
6
6
|
|
|
7
|
-
[polydev.
|
|
7
|
+
[](https://www.npmjs.com/package/polydev-ai)
|
|
8
|
+
[](https://polydev.ai/articles/swe-bench-paper)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
10
|
|
|
9
11
|
---
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Why Polydev?
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
**Stop copy-pasting between ChatGPT, Claude, and Gemini.** Get all their perspectives in your IDE with one request.
|
|
14
16
|
|
|
15
|
-
|
|
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 |
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
> *"Different models have different blind spots. Combining their perspectives eliminates yours."*
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
- **Subscription-Based CLI Access**: Use your existing ChatGPT Plus, Claude Pro, GitHub Copilot subscriptions
|
|
21
|
-
- **Unified Interface**: Single API for all providers with consistent streaming responses
|
|
22
|
-
- **Auto-Detection**: Automatic CLI tool discovery and path configuration
|
|
23
|
-
|
|
24
|
-
### 🔧 CLI Provider Support
|
|
25
|
-
|
|
26
|
-
| Provider | Integration | Authentication |
|
|
27
|
-
|----------|-------------|----------------|
|
|
28
|
-
| **Codex CLI** | Access GPT-5 with high reasoning | ChatGPT Plus subscription |
|
|
29
|
-
| **Claude Code CLI** | Claude via Anthropic | Anthropic Pro subscription |
|
|
30
|
-
| **Gemini CLI** | Google Cloud | Google Cloud authentication |
|
|
31
|
-
| **GitHub Copilot** | VS Code Language Model API | GitHub Copilot subscription |
|
|
32
|
-
|
|
33
|
-
### 🛠 Advanced Tooling
|
|
34
|
-
|
|
35
|
-
- **Model Context Protocol (MCP)**: Hosted MCP server with OAuth authentication
|
|
36
|
-
- **Multi-Authentication**: Both OAuth and API token support for maximum flexibility
|
|
37
|
-
- **Process Execution**: Cross-platform CLI management with timeout handling
|
|
38
|
-
- **Path Auto-Discovery**: Smart detection of CLI installations across Windows, macOS, Linux
|
|
39
|
-
- **Real-time Status**: Live CLI availability and authentication checking
|
|
40
|
-
|
|
41
|
-
### 🔒 Security & Authentication
|
|
42
|
-
|
|
43
|
-
- **Encrypted Storage**: Browser-based API key encryption using SubtleCrypto API
|
|
44
|
-
- **OAuth Bridges**: Secure authentication flows
|
|
45
|
-
- **Subscription Auth**: No API costs - use existing subscriptions
|
|
46
|
-
- **Local Storage**: Keys never leave your device
|
|
25
|
+
---
|
|
47
26
|
|
|
48
|
-
|
|
27
|
+
## Quick Start
|
|
49
28
|
|
|
50
|
-
|
|
51
|
-
- **BetterStack Monitoring**: System health and performance monitoring
|
|
52
|
-
- **Upstash Redis**: High-performance caching layer
|
|
53
|
-
- **Supabase Auth**: Robust authentication system
|
|
29
|
+
### 1. Get your free API token
|
|
54
30
|
|
|
55
|
-
|
|
31
|
+
**[polydev.ai/dashboard/mcp-tokens](https://polydev.ai/dashboard/mcp-tokens)**
|
|
56
32
|
|
|
57
|
-
|
|
|
58
|
-
|
|
59
|
-
| **
|
|
60
|
-
| **
|
|
61
|
-
| **AI Integration** | Custom TypeScript handlers for 8+ LLM providers |
|
|
62
|
-
| **CLI Integration** | Cross-platform process execution utilities |
|
|
63
|
-
| **Streaming** | Server-Sent Events for real-time responses |
|
|
64
|
-
| **Monitoring** | PostHog Analytics, BetterStack |
|
|
33
|
+
| Tier | Messages/Month | Price |
|
|
34
|
+
|------|----------------|-------|
|
|
35
|
+
| **Free** | 1,000 | $0 |
|
|
36
|
+
| **Pro** | 10,000 | $19/mo |
|
|
65
37
|
|
|
66
|
-
|
|
38
|
+
### 2. Install
|
|
67
39
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
| **OpenAI** | GPT-4o, GPT-4 Turbo, GPT-3.5 | 128K tokens | Versatile, widely adopted |
|
|
72
|
-
| **Google Gemini** | Gemini 1.5 Pro, Flash | 1M+ tokens | Large context window |
|
|
73
|
-
| **OpenRouter** | 100+ models | Varies | Access to multiple providers |
|
|
74
|
-
| **Groq** | Open-source models | Varies | Ultra-fast inference |
|
|
75
|
-
| **Perplexity** | Search-optimized models | Varies | AI search and reasoning |
|
|
76
|
-
| **DeepSeek** | Reasoning models | Varies | Advanced reasoning capabilities |
|
|
77
|
-
| **Mistral AI** | European AI models | Varies | Strong performance, EU-based |
|
|
40
|
+
```bash
|
|
41
|
+
npx polydev-ai@latest
|
|
42
|
+
```
|
|
78
43
|
|
|
79
|
-
|
|
44
|
+
---
|
|
80
45
|
|
|
81
|
-
|
|
82
|
-
- **Storage**: Supabase, Upstash Redis, Memory (knowledge graph)
|
|
83
|
-
- **Development**: GitHub, Git, Filesystem
|
|
84
|
-
- **Infrastructure**: Vercel, Stripe
|
|
85
|
-
- **AI**: Polydev (multi-model consultation)
|
|
86
|
-
- **Communication**: Resend (email)
|
|
46
|
+
## Setup
|
|
87
47
|
|
|
88
|
-
|
|
48
|
+
### Claude Code
|
|
89
49
|
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
│ Frontend UI │────│ Process Utils │────│ CLI Tools │
|
|
93
|
-
│ (React/TS) │ │ (Node.js) │ │ (External) │
|
|
94
|
-
└─────────────────┘ └──────────────────┘ └─────────────────┘
|
|
95
|
-
│ │ │
|
|
96
|
-
│ │ │
|
|
97
|
-
▼ ▼ ▼
|
|
98
|
-
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
|
|
99
|
-
│ LLM Service │ │ CLI Handlers │ │ Subscriptions │
|
|
100
|
-
│ (Unified API) │ │ (Per Provider) │ │ (ChatGPT+, etc) │
|
|
101
|
-
└─────────────────┘ └──────────────────┘ └─────────────────┘
|
|
102
|
-
│ │
|
|
103
|
-
│ │
|
|
104
|
-
▼ ▼
|
|
105
|
-
┌─────────────────┐ ┌──────────────────┐
|
|
106
|
-
│ Supabase │ │ MCP Platform │
|
|
107
|
-
│ (Auth + DB) │ │ (16+ Tools) │
|
|
108
|
-
└─────────────────┘ └──────────────────┘
|
|
50
|
+
```bash
|
|
51
|
+
claude mcp add polydev -- npx -y polydev-ai@latest
|
|
109
52
|
```
|
|
110
53
|
|
|
111
|
-
|
|
54
|
+
Then set your token:
|
|
55
|
+
```bash
|
|
56
|
+
export POLYDEV_USER_TOKEN="pd_your_token_here"
|
|
57
|
+
```
|
|
112
58
|
|
|
113
|
-
|
|
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
|
+
}
|
|
73
|
+
```
|
|
114
74
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
75
|
+
### Cursor / Windsurf / Cline
|
|
76
|
+
|
|
77
|
+
Add to your MCP config:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"polydev": {
|
|
83
|
+
"command": "npx",
|
|
84
|
+
"args": ["-y", "polydev-ai@latest"],
|
|
85
|
+
"env": {
|
|
86
|
+
"POLYDEV_USER_TOKEN": "pd_your_token_here"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
122
92
|
|
|
123
|
-
###
|
|
93
|
+
### OpenAI Codex CLI
|
|
124
94
|
|
|
125
|
-
|
|
126
|
-
# Clone the repository
|
|
127
|
-
git clone https://github.com/backspacevenkat/polydev-ai.git
|
|
128
|
-
cd polydev-ai
|
|
95
|
+
Add to `~/.codex/config.toml`:
|
|
129
96
|
|
|
130
|
-
|
|
131
|
-
|
|
97
|
+
```toml
|
|
98
|
+
[mcp_servers.polydev]
|
|
99
|
+
command = "npx"
|
|
100
|
+
args = ["-y", "polydev-ai@latest"]
|
|
132
101
|
|
|
133
|
-
|
|
134
|
-
|
|
102
|
+
[mcp_servers.polydev.env]
|
|
103
|
+
POLYDEV_USER_TOKEN = "pd_your_token_here"
|
|
135
104
|
|
|
136
|
-
|
|
137
|
-
|
|
105
|
+
[mcp_servers.polydev.timeouts]
|
|
106
|
+
tool_timeout = 180
|
|
107
|
+
session_timeout = 600
|
|
138
108
|
```
|
|
139
109
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
### Quick Configuration
|
|
143
|
-
|
|
144
|
-
1. **API Key Setup**: Go to Settings → API Keys tab to configure traditional API access
|
|
145
|
-
2. **CLI Setup**: Go to Settings → CLI Subscriptions tab to set up subscription-based access
|
|
146
|
-
3. **Provider Selection**: Choose your preferred LLM provider from the dropdown
|
|
147
|
-
4. **Test Integration**: Use the chat interface to test your configuration
|
|
110
|
+
---
|
|
148
111
|
|
|
149
|
-
##
|
|
112
|
+
## Usage
|
|
150
113
|
|
|
151
|
-
|
|
152
|
-
# Supabase
|
|
153
|
-
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
|
|
154
|
-
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
|
|
155
|
-
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
|
|
114
|
+
Once connected, your agent can call:
|
|
156
115
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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
|
+
```
|
|
160
125
|
|
|
161
|
-
|
|
162
|
-
UPSTASH_REDIS_REST_URL=your_upstash_redis_url
|
|
163
|
-
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token
|
|
126
|
+
Or just mention "polydev" or "perspectives" in your prompt:
|
|
164
127
|
|
|
165
|
-
# BetterStack Logging
|
|
166
|
-
BETTERSTACK_LOGS_TOKEN=your_betterstack_token
|
|
167
128
|
```
|
|
129
|
+
"Use polydev to debug this infinite loop"
|
|
130
|
+
"Get perspectives on: Should I use Redis or PostgreSQL for caching?"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Returns structured perspectives from multiple models with reasoning and recommendations.
|
|
168
134
|
|
|
169
|
-
|
|
135
|
+
---
|
|
170
136
|
|
|
171
|
-
|
|
137
|
+
## How It Works
|
|
172
138
|
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
codex auth
|
|
176
|
-
codex --version
|
|
139
|
+
```
|
|
140
|
+
Your Agent → Polydev → [GPT 5.2, Claude Opus 4.5, Gemini 3, Grok 4.1] → Synthesized Answer
|
|
177
141
|
```
|
|
178
142
|
|
|
179
|
-
|
|
143
|
+
When your AI agent gets stuck, Polydev consults multiple frontier models simultaneously and returns their perspectives. One API call, four expert opinions.
|
|
180
144
|
|
|
181
|
-
|
|
182
|
-
# Install and authenticate
|
|
183
|
-
claude login
|
|
184
|
-
claude --version
|
|
185
|
-
```
|
|
145
|
+
---
|
|
186
146
|
|
|
187
|
-
|
|
147
|
+
## Research
|
|
188
148
|
|
|
189
|
-
|
|
190
|
-
# Install Google Cloud SDK and authenticate
|
|
191
|
-
gcloud auth login
|
|
192
|
-
gcloud auth application-default login
|
|
193
|
-
```
|
|
149
|
+
Our approach achieves **74.6% on SWE-bench Verified** (Resolve@2), matching Claude Opus at 62% lower cost.
|
|
194
150
|
|
|
195
|
-
|
|
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 |
|
|
196
157
|
|
|
197
|
-
|
|
198
|
-
2. Sign in with your GitHub account that has Copilot access
|
|
199
|
-
3. The application will detect VS Code and Copilot availability automatically
|
|
158
|
+
**[Read the full paper →](https://polydev.ai/articles/swe-bench-paper)**
|
|
200
159
|
|
|
201
|
-
|
|
160
|
+
---
|
|
202
161
|
|
|
203
|
-
|
|
162
|
+
## Links
|
|
204
163
|
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
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
|
+
---
|
|
211
170
|
|
|
212
171
|
## License
|
|
213
172
|
|
|
214
|
-
MIT
|
|
173
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
215
174
|
|
|
216
|
-
|
|
175
|
+
---
|
|
217
176
|
|
|
218
|
-
|
|
219
|
-
|
|
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,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polydev-ai",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.62",
|
|
4
|
+
"engines": {
|
|
5
|
+
"node": ">=20.x <=22.x"
|
|
6
|
+
},
|
|
4
7
|
"mcpName": "io.github.backspacevenkat/perspectives",
|
|
5
|
-
"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",
|
|
6
9
|
"keywords": [
|
|
7
10
|
"mcp",
|
|
8
11
|
"model-context-protocol",
|