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.
- package/README.md +168 -111
- package/lib/cliManager.ts +755 -0
- package/lib/smartCliCache.ts +189 -0
- package/lib/universalMemoryExtractor.js +607 -0
- package/lib/zeroKnowledgeEncryption.js +289 -0
- package/mcp/README.md +160 -0
- package/mcp/cliManager.js +715 -0
- package/mcp/package.json +47 -0
- package/mcp/server.js +959 -0
- package/{stdio-wrapper.js → mcp/stdio-wrapper.js} +41 -20
- package/package.json +85 -29
- /package/{cliManager.js → lib/cliManager.js} +0 -0
- /package/{manifest.json → mcp/manifest.json} +0 -0
package/README.md
CHANGED
|
@@ -1,160 +1,217 @@
|
|
|
1
|
-
# Polydev AI
|
|
1
|
+
# Polydev AI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Advanced Model Context Protocol Platform with Multi-LLM Integrations**
|
|
4
|
+
|
|
5
|
+
[polydev.ai](https://polydev.ai) | Live Platform
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
Polydev AI is an advanced Model Context Protocol (MCP) platform providing comprehensive multi-LLM integrations, subscription-based CLI access, OAuth bridges, and advanced tooling for AI development.
|
|
4
12
|
|
|
5
13
|
## Features
|
|
6
14
|
|
|
7
|
-
|
|
8
|
-
- 🔧 **Local CLI Detection**: Automatically detect and use Claude Code, Codex CLI, Gemini CLI
|
|
9
|
-
- ⚡ **Smart Caching**: Intelligent refresh intervals based on CLI status
|
|
10
|
-
- 🔄 **Fallback Support**: Local CLI + remote perspectives for comprehensive responses
|
|
11
|
-
- 🔐 **Secure**: Token-based authentication with your Polydev account
|
|
15
|
+
### 🤖 Comprehensive LLM Integration
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
- **API-Based Providers**: Direct integration with 8+ providers (Anthropic, OpenAI, Google, etc.)
|
|
18
|
+
- **Subscription-Based CLI Access**: Use your existing ChatGPT Plus, Claude Pro, GitHub Copilot subscriptions
|
|
19
|
+
- **Unified Interface**: Single API for all providers with consistent streaming responses
|
|
20
|
+
- **Auto-Detection**: Automatic CLI tool discovery and path configuration
|
|
14
21
|
|
|
15
|
-
###
|
|
22
|
+
### 🔧 CLI Provider Support
|
|
16
23
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
24
|
+
| Provider | Integration | Authentication |
|
|
25
|
+
|----------|-------------|----------------|
|
|
26
|
+
| **Codex CLI** | Access GPT-5 with high reasoning | ChatGPT Plus subscription |
|
|
27
|
+
| **Claude Code CLI** | Claude via Anthropic | Anthropic Pro subscription |
|
|
28
|
+
| **Gemini CLI** | Google Cloud | Google Cloud authentication |
|
|
29
|
+
| **GitHub Copilot** | VS Code Language Model API | GitHub Copilot subscription |
|
|
20
30
|
|
|
21
|
-
|
|
22
|
-
npx polydev-ai
|
|
23
|
-
```
|
|
31
|
+
### 🛠 Advanced Tooling
|
|
24
32
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{
|
|
31
|
-
"mcpServers": {
|
|
32
|
-
"polydev": {
|
|
33
|
-
"command": "npx",
|
|
34
|
-
"args": ["polydev-ai"],
|
|
35
|
-
"env": {
|
|
36
|
-
"POLYDEV_USER_TOKEN": "your_token_here"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
```
|
|
33
|
+
- **Model Context Protocol (MCP)**: Hosted MCP server with OAuth authentication
|
|
34
|
+
- **Multi-Authentication**: Both OAuth and API token support for maximum flexibility
|
|
35
|
+
- **Process Execution**: Cross-platform CLI management with timeout handling
|
|
36
|
+
- **Path Auto-Discovery**: Smart detection of CLI installations across Windows, macOS, Linux
|
|
37
|
+
- **Real-time Status**: Live CLI availability and authentication checking
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
### 🔒 Security & Authentication
|
|
44
40
|
|
|
45
|
-
|
|
41
|
+
- **Encrypted Storage**: Browser-based API key encryption using SubtleCrypto API
|
|
42
|
+
- **OAuth Bridges**: Secure authentication flows
|
|
43
|
+
- **Subscription Auth**: No API costs - use existing subscriptions
|
|
44
|
+
- **Local Storage**: Keys never leave your device
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
2. Go to your dashboard and copy your MCP token
|
|
49
|
-
3. Set the environment variable:
|
|
46
|
+
### 📊 Monitoring & Analytics
|
|
50
47
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
- **PostHog Integration**: Advanced user analytics and feature tracking
|
|
49
|
+
- **BetterStack Monitoring**: System health and performance monitoring
|
|
50
|
+
- **Upstash Redis**: High-performance caching layer
|
|
51
|
+
- **Supabase Auth**: Robust authentication system
|
|
54
52
|
|
|
55
|
-
|
|
53
|
+
## Tech Stack
|
|
56
54
|
|
|
57
|
-
|
|
55
|
+
| Layer | Technology |
|
|
56
|
+
|-------|------------|
|
|
57
|
+
| **Frontend** | Next.js 15 (App Router), React 18, TypeScript, Tailwind CSS, shadcn/ui |
|
|
58
|
+
| **Backend** | Supabase (PostgreSQL + Auth), Upstash Redis |
|
|
59
|
+
| **AI Integration** | Custom TypeScript handlers for 8+ LLM providers |
|
|
60
|
+
| **CLI Integration** | Cross-platform process execution utilities |
|
|
61
|
+
| **Streaming** | Server-Sent Events for real-time responses |
|
|
62
|
+
| **Monitoring** | PostHog Analytics, BetterStack |
|
|
58
63
|
|
|
59
|
-
|
|
60
|
-
"polydev": {
|
|
61
|
-
"disabled": false,
|
|
62
|
-
"timeout": 120,
|
|
63
|
-
"type": "http",
|
|
64
|
-
"url": "https://www.polydev.ai/api/mcp"
|
|
65
|
-
},
|
|
66
|
-
```
|
|
64
|
+
## Supported LLM Providers
|
|
67
65
|
|
|
68
|
-
|
|
66
|
+
| Provider | Models | Context Window | Features |
|
|
67
|
+
|----------|--------|----------------|----------|
|
|
68
|
+
| **Anthropic** | Claude 3.5 Sonnet, Haiku, Opus | 200K tokens | Best for reasoning and code |
|
|
69
|
+
| **OpenAI** | GPT-4o, GPT-4 Turbo, GPT-3.5 | 128K tokens | Versatile, widely adopted |
|
|
70
|
+
| **Google Gemini** | Gemini 1.5 Pro, Flash | 1M+ tokens | Large context window |
|
|
71
|
+
| **OpenRouter** | 100+ models | Varies | Access to multiple providers |
|
|
72
|
+
| **Groq** | Open-source models | Varies | Ultra-fast inference |
|
|
73
|
+
| **Perplexity** | Search-optimized models | Varies | AI search and reasoning |
|
|
74
|
+
| **DeepSeek** | Reasoning models | Varies | Advanced reasoning capabilities |
|
|
75
|
+
| **Mistral AI** | European AI models | Varies | Strong performance, EU-based |
|
|
69
76
|
|
|
70
|
-
|
|
71
|
-
- `force_cli_detection` - Force detection of local CLI tools
|
|
72
|
-
- `get_cli_status` - Check status of CLI tools (Claude Code, Codex, Gemini)
|
|
73
|
-
- `send_cli_prompt` - Send prompts to local CLI with perspectives fallback
|
|
77
|
+
## MCP Tools Available
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
- **Research**: Exa (web search), DeepWiki, Context7
|
|
80
|
+
- **Storage**: Supabase, Upstash Redis, Memory (knowledge graph)
|
|
81
|
+
- **Development**: GitHub, Git, Filesystem
|
|
82
|
+
- **Infrastructure**: Vercel, Stripe
|
|
83
|
+
- **AI**: Polydev (multi-model consultation)
|
|
84
|
+
- **Communication**: Resend (email)
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
## Architecture
|
|
78
87
|
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
```
|
|
89
|
+
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
|
|
90
|
+
│ Frontend UI │────│ Process Utils │────│ CLI Tools │
|
|
91
|
+
│ (React/TS) │ │ (Node.js) │ │ (External) │
|
|
92
|
+
└─────────────────┘ └──────────────────┘ └─────────────────┘
|
|
93
|
+
│ │ │
|
|
94
|
+
│ │ │
|
|
95
|
+
▼ ▼ ▼
|
|
96
|
+
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
|
|
97
|
+
│ LLM Service │ │ CLI Handlers │ │ Subscriptions │
|
|
98
|
+
│ (Unified API) │ │ (Per Provider) │ │ (ChatGPT+, etc) │
|
|
99
|
+
└─────────────────┘ └──────────────────┘ └─────────────────┘
|
|
100
|
+
│ │
|
|
101
|
+
│ │
|
|
102
|
+
▼ ▼
|
|
103
|
+
┌─────────────────┐ ┌──────────────────┐
|
|
104
|
+
│ Supabase │ │ MCP Platform │
|
|
105
|
+
│ (Auth + DB) │ │ (16+ Tools) │
|
|
106
|
+
└─────────────────┘ └──────────────────┘
|
|
85
107
|
```
|
|
86
108
|
|
|
87
|
-
|
|
109
|
+
## Quick Start
|
|
88
110
|
|
|
89
|
-
|
|
90
|
-
// Check all CLI tools
|
|
91
|
-
await get_cli_status({})
|
|
111
|
+
### Prerequisites
|
|
92
112
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
113
|
+
- Node.js 18+
|
|
114
|
+
- npm or yarn package manager
|
|
115
|
+
- (Optional) CLI tools for subscription-based access:
|
|
116
|
+
- Codex CLI for ChatGPT Plus integration
|
|
117
|
+
- Claude Code CLI for Anthropic Pro integration
|
|
118
|
+
- Gemini CLI for Google Cloud integration
|
|
119
|
+
- VS Code with GitHub Copilot for Copilot integration
|
|
96
120
|
|
|
97
|
-
###
|
|
121
|
+
### Installation
|
|
98
122
|
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
mode: "args"
|
|
104
|
-
})
|
|
105
|
-
```
|
|
123
|
+
```bash
|
|
124
|
+
# Clone the repository
|
|
125
|
+
git clone https://github.com/backspacevenkat/polydev-ai.git
|
|
126
|
+
cd polydev-ai
|
|
106
127
|
|
|
107
|
-
|
|
128
|
+
# Install dependencies
|
|
129
|
+
npm install
|
|
108
130
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
- **Gemini CLI** (`gemini`) - Google's Gemini CLI
|
|
131
|
+
# Configure environment variables
|
|
132
|
+
cp .env.example .env.local
|
|
112
133
|
|
|
113
|
-
|
|
134
|
+
# Start development server
|
|
135
|
+
npm run dev
|
|
136
|
+
```
|
|
114
137
|
|
|
115
|
-
|
|
138
|
+
Open the application at http://localhost:3000
|
|
116
139
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
140
|
+
### Quick Configuration
|
|
141
|
+
|
|
142
|
+
1. **API Key Setup**: Go to Settings → API Keys tab to configure traditional API access
|
|
143
|
+
2. **CLI Setup**: Go to Settings → CLI Subscriptions tab to set up subscription-based access
|
|
144
|
+
3. **Provider Selection**: Choose your preferred LLM provider from the dropdown
|
|
145
|
+
4. **Test Integration**: Use the chat interface to test your configuration
|
|
121
146
|
|
|
122
147
|
## Environment Variables
|
|
123
148
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
149
|
+
```env
|
|
150
|
+
# Supabase
|
|
151
|
+
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
|
|
152
|
+
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
|
|
153
|
+
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
|
|
154
|
+
|
|
155
|
+
# PostHog Analytics
|
|
156
|
+
NEXT_PUBLIC_POSTHOG_KEY=your_posthog_key
|
|
157
|
+
NEXT_PUBLIC_POSTHOG_HOST=https://us.i.posthog.com
|
|
129
158
|
|
|
130
|
-
|
|
159
|
+
# Upstash Redis
|
|
160
|
+
UPSTASH_REDIS_REST_URL=your_upstash_redis_url
|
|
161
|
+
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token
|
|
162
|
+
|
|
163
|
+
# BetterStack Logging
|
|
164
|
+
BETTERSTACK_LOGS_TOKEN=your_betterstack_token
|
|
165
|
+
```
|
|
131
166
|
|
|
132
|
-
|
|
167
|
+
## CLI Provider Setup
|
|
133
168
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
169
|
+
### Codex CLI (ChatGPT Plus Integration)
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Install and authenticate
|
|
173
|
+
codex auth
|
|
174
|
+
codex --version
|
|
175
|
+
```
|
|
137
176
|
|
|
138
|
-
###
|
|
177
|
+
### Claude Code CLI (Anthropic Pro Integration)
|
|
139
178
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
179
|
+
```bash
|
|
180
|
+
# Install and authenticate
|
|
181
|
+
claude login
|
|
182
|
+
claude --version
|
|
183
|
+
```
|
|
143
184
|
|
|
144
|
-
###
|
|
185
|
+
### Gemini CLI (Google Cloud Integration)
|
|
145
186
|
|
|
146
187
|
```bash
|
|
147
|
-
#
|
|
148
|
-
|
|
149
|
-
|
|
188
|
+
# Install Google Cloud SDK and authenticate
|
|
189
|
+
gcloud auth login
|
|
190
|
+
gcloud auth application-default login
|
|
150
191
|
```
|
|
151
192
|
|
|
152
|
-
|
|
193
|
+
### GitHub Copilot Integration
|
|
194
|
+
|
|
195
|
+
1. Install VS Code with GitHub Copilot extension
|
|
196
|
+
2. Sign in with your GitHub account that has Copilot access
|
|
197
|
+
3. The application will detect VS Code and Copilot availability automatically
|
|
198
|
+
|
|
199
|
+
## Development Status
|
|
153
200
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
201
|
+
**Current Status**: Active Development
|
|
202
|
+
|
|
203
|
+
The platform is fully functional for:
|
|
204
|
+
- Multi-LLM chat interface with streaming
|
|
205
|
+
- API key management with client-side encryption
|
|
206
|
+
- CLI subscription integration
|
|
207
|
+
- MCP server with 16+ tools
|
|
208
|
+
- Real-time streaming responses
|
|
157
209
|
|
|
158
210
|
## License
|
|
159
211
|
|
|
160
|
-
MIT
|
|
212
|
+
MIT
|
|
213
|
+
|
|
214
|
+
## Links
|
|
215
|
+
|
|
216
|
+
- **Website**: [polydev.ai](https://polydev.ai)
|
|
217
|
+
- **Repository**: [github.com/backspacevenkat/polydev-ai](https://github.com/backspacevenkat/polydev-ai)
|