voracode 0.0.1
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/LICENSE +21 -0
- package/README.md +146 -0
- package/dist/main.js +2842 -0
- package/package.json +57 -0
- package/src/cli/audit.ts +34 -0
- package/src/cli/config.ts +54 -0
- package/src/cli/doctor.ts +61 -0
- package/src/cli/init.ts +62 -0
- package/src/cli/key.ts +67 -0
- package/src/cli/lite.ts +65 -0
- package/src/cli/mcp.ts +221 -0
- package/src/cli/model.ts +103 -0
- package/src/cli/plugin.ts +49 -0
- package/src/cli/pro.ts +97 -0
- package/src/cli/run.ts +101 -0
- package/src/cli/session.ts +138 -0
- package/src/cli/skill.ts +156 -0
- package/src/cli/stats.ts +16 -0
- package/src/cli/update.ts +28 -0
- package/src/engine/agent.ts +256 -0
- package/src/engine/sub-agent.ts +122 -0
- package/src/main.ts +77 -0
- package/src/models/adapters/all-providers.ts +302 -0
- package/src/models/router.ts +426 -0
- package/src/security/owasp.ts +254 -0
- package/src/session/manager.ts +118 -0
- package/src/skills/self-improve/engine.ts +336 -0
- package/src/storage/config.ts +213 -0
- package/src/storage/database.ts +253 -0
- package/src/storage/mcp-config.ts +170 -0
- package/src/tools/executor.ts +362 -0
- package/src/ui/theme.ts +163 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VORACODE All Providers — Every AI/LLM provider adapter
|
|
3
|
+
*
|
|
4
|
+
* Users can bring ANY API key and it works.
|
|
5
|
+
* Includes: chat, completion, embedding providers.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import type { ChatMessage, ChatOptions, ChatResponse } from "../router";
|
|
9
|
+
|
|
10
|
+
// ── Every provider we support ──
|
|
11
|
+
|
|
12
|
+
export interface ProviderConfig {
|
|
13
|
+
name: string;
|
|
14
|
+
protocol: "openai" | "anthropic" | "google" | "aws" | "azure" | "cohere" | "mistral" | "together" | "custom";
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
apiKeyEnv: string[];
|
|
17
|
+
models: string[];
|
|
18
|
+
freeTier?: string;
|
|
19
|
+
notes?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export const ALL_PROVIDERS: ProviderConfig[] = [
|
|
23
|
+
// ─── MAJOR PLATFORMS ───
|
|
24
|
+
{
|
|
25
|
+
name: "openai",
|
|
26
|
+
protocol: "openai",
|
|
27
|
+
baseUrl: "https://api.openai.com/v1",
|
|
28
|
+
apiKeyEnv: ["OPENAI_API_KEY", "OPENAI_KEY"],
|
|
29
|
+
models: ["gpt-4o", "gpt-4o-mini", "o3-mini", "o1", "gpt-4-turbo", "gpt-3.5-turbo"],
|
|
30
|
+
notes: "OpenAI chat models",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "anthropic",
|
|
34
|
+
protocol: "anthropic",
|
|
35
|
+
baseUrl: "https://api.anthropic.com/v1",
|
|
36
|
+
apiKeyEnv: ["ANTHROPIC_API_KEY", "ANTHROPIC_KEY"],
|
|
37
|
+
models: ["claude-sonnet-4", "claude-opus-4", "claude-haiku-4", "claude-sonnet-3.5"],
|
|
38
|
+
notes: "Claude models",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "google",
|
|
42
|
+
protocol: "google",
|
|
43
|
+
baseUrl: "https://generativelanguage.googleapis.com/v1beta",
|
|
44
|
+
apiKeyEnv: ["GOOGLE_API_KEY", "GEMINI_API_KEY"],
|
|
45
|
+
models: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-1.5-pro", "gemini-1.5-flash"],
|
|
46
|
+
freeTier: "60 requests/min free tier",
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
// ─── OPEN SOURCE PROVIDERS ───
|
|
50
|
+
{
|
|
51
|
+
name: "deepseek",
|
|
52
|
+
protocol: "openai",
|
|
53
|
+
baseUrl: "https://api.deepseek.com/v1",
|
|
54
|
+
apiKeyEnv: ["DEEPSEEK_API_KEY", "DEEPSEEK_KEY"],
|
|
55
|
+
models: ["deepseek-chat", "deepseek-v4-flash", "deepseek-v4-pro", "deepseek-coder"],
|
|
56
|
+
freeTier: "$0.14/M input tokens",
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "groq",
|
|
60
|
+
protocol: "openai",
|
|
61
|
+
baseUrl: "https://api.groq.com/openai/v1",
|
|
62
|
+
apiKeyEnv: ["GROQ_API_KEY", "GROQ_KEY"],
|
|
63
|
+
models: ["llama-3.3-70b", "llama-3.1-8b", "mixtral-8x7b", "qwen-32b", "gemma-2-9b"],
|
|
64
|
+
freeTier: "500K tokens/day free",
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "mistral",
|
|
68
|
+
protocol: "openai",
|
|
69
|
+
baseUrl: "https://api.mistral.ai/v1",
|
|
70
|
+
apiKeyEnv: ["MISTRAL_API_KEY", "MISTRAL_KEY"],
|
|
71
|
+
models: ["mistral-large", "mistral-medium", "codestral", "ministral-8b"],
|
|
72
|
+
freeTier: "Free tier available",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "together",
|
|
76
|
+
protocol: "openai",
|
|
77
|
+
baseUrl: "https://api.together.xyz/v1",
|
|
78
|
+
apiKeyEnv: ["TOGETHER_API_KEY", "TOGETHER_KEY"],
|
|
79
|
+
models: ["llama-3.3-70b", "qwen-2.5-72b", "mixtral-8x22b", "deepseek-v3"],
|
|
80
|
+
notes: "200+ open-source models",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "ollama",
|
|
84
|
+
protocol: "openai",
|
|
85
|
+
baseUrl: "http://localhost:11434/v1",
|
|
86
|
+
apiKeyEnv: [],
|
|
87
|
+
models: ["llama3.2", "mistral", "deepseek-coder-v2", "qwen2.5-coder", "phi-4", "gemma-2"],
|
|
88
|
+
freeTier: "100% free, local inference",
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// ─── GATEWAYS / AGGREGATORS ───
|
|
92
|
+
{
|
|
93
|
+
name: "openrouter",
|
|
94
|
+
protocol: "openai",
|
|
95
|
+
baseUrl: "https://openrouter.ai/api/v1",
|
|
96
|
+
apiKeyEnv: ["OPENROUTER_API_KEY"],
|
|
97
|
+
models: ["openrouter/auto", "openai/gpt-4o", "anthropic/claude-sonnet-4"],
|
|
98
|
+
freeTier: "25+ free models, 50 reqs/day",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "huggingface",
|
|
102
|
+
protocol: "openai",
|
|
103
|
+
baseUrl: "https://router.huggingface.co/v1",
|
|
104
|
+
apiKeyEnv: ["HF_API_KEY", "HUGGINGFACE_KEY", "HUGGING_FACE_TOKEN"],
|
|
105
|
+
models: ["HuggingFaceH4/zephyr-7b-beta", "meta-llama/Llama-3.3-70B-Instruct"],
|
|
106
|
+
freeTier: "Generous free tier",
|
|
107
|
+
},
|
|
108
|
+
|
|
109
|
+
// ─── CLOUD PROVIDERS ───
|
|
110
|
+
{
|
|
111
|
+
name: "fireworks",
|
|
112
|
+
protocol: "openai",
|
|
113
|
+
baseUrl: "https://api.fireworks.ai/inference/v1",
|
|
114
|
+
apiKeyEnv: ["FIREWORKS_API_KEY", "FIREWORKS_KEY"],
|
|
115
|
+
models: ["llama-v3p3-70b-instruct", "llama-v3p1-405b-instruct", "deepseek-v3"],
|
|
116
|
+
notes: "High-speed inference",
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "cerebras",
|
|
120
|
+
protocol: "openai",
|
|
121
|
+
baseUrl: "https://api.cerebras.ai/v1",
|
|
122
|
+
apiKeyEnv: ["CEREBRAS_API_KEY"],
|
|
123
|
+
models: ["llama-3.3-70b", "llama-3.1-8b"],
|
|
124
|
+
notes: "Fastest inference speed",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "sambanova",
|
|
128
|
+
protocol: "openai",
|
|
129
|
+
baseUrl: "https://api.sambanova.ai/v1",
|
|
130
|
+
apiKeyEnv: ["SAMBANOVA_API_KEY"],
|
|
131
|
+
models: ["llama-3.3-70b", "qwen-2.5-72b"],
|
|
132
|
+
notes: "SN40L chip inference",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "cloudflare",
|
|
136
|
+
protocol: "openai",
|
|
137
|
+
baseUrl: "https://api.cloudflare.com/client/v4/ai",
|
|
138
|
+
apiKeyEnv: ["CLOUDFLARE_API_KEY"],
|
|
139
|
+
models: ["@cf/meta/llama-3.3-70b", "@hf/thebloke/llama-2-7b"],
|
|
140
|
+
freeTier: "Workers AI free tier",
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
// ─── ENTERPRISE / CLOUD ───
|
|
144
|
+
{
|
|
145
|
+
name: "azure",
|
|
146
|
+
protocol: "azure",
|
|
147
|
+
baseUrl: "https://YOUR_RESOURCE.openai.azure.com",
|
|
148
|
+
apiKeyEnv: ["AZURE_OPENAI_KEY", "AZURE_API_KEY"],
|
|
149
|
+
models: ["gpt-4o", "gpt-4-turbo", "gpt-35-turbo"],
|
|
150
|
+
notes: "Requires Azure endpoint URL",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "aws",
|
|
154
|
+
protocol: "aws",
|
|
155
|
+
baseUrl: "https://bedrock-runtime.YOUR_REGION.amazonaws.com",
|
|
156
|
+
apiKeyEnv: ["AWS_ACCESS_KEY_ID", "AWS_SECRET_ACCESS_KEY"],
|
|
157
|
+
models: ["claude-sonnet-4", "llama-3.3-70b", "mistral-large"],
|
|
158
|
+
notes: "Bedrock requires AWS credentials",
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "gcp",
|
|
162
|
+
protocol: "google",
|
|
163
|
+
baseUrl: "https://us-central1-aiplatform.googleapis.com/v1",
|
|
164
|
+
apiKeyEnv: ["GCP_API_KEY", "VERTEX_API_KEY"],
|
|
165
|
+
models: ["gemini-2.5-pro", "claude-sonnet-4"],
|
|
166
|
+
notes: "Vertex AI endpoint",
|
|
167
|
+
},
|
|
168
|
+
|
|
169
|
+
// ─── SPECIALIZED ───
|
|
170
|
+
{
|
|
171
|
+
name: "cohere",
|
|
172
|
+
protocol: "custom",
|
|
173
|
+
baseUrl: "https://api.cohere.ai/v1",
|
|
174
|
+
apiKeyEnv: ["COHERE_API_KEY"],
|
|
175
|
+
models: ["command-r-plus", "command-r", "command-nightly"],
|
|
176
|
+
notes: "RAG-focused models",
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "xai",
|
|
180
|
+
protocol: "openai",
|
|
181
|
+
baseUrl: "https://api.x.ai/v1",
|
|
182
|
+
apiKeyEnv: ["XAI_API_KEY", "GROK_API_KEY"],
|
|
183
|
+
models: ["grok-3", "grok-2"],
|
|
184
|
+
notes: "xAI Grok models",
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
name: "replicate",
|
|
188
|
+
protocol: "openai",
|
|
189
|
+
baseUrl: "https://api.replicate.com/v1",
|
|
190
|
+
apiKeyEnv: ["REPLICATE_API_KEY"],
|
|
191
|
+
models: ["llama-3.3-70b", "deepseek-v3", "qwen-2.5-72b"],
|
|
192
|
+
notes: "Community models",
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
name: "perplexity",
|
|
196
|
+
protocol: "openai",
|
|
197
|
+
baseUrl: "https://api.perplexity.ai/v1",
|
|
198
|
+
apiKeyEnv: ["PERPLEXITY_API_KEY"],
|
|
199
|
+
models: ["sonar-pro", "sonar-small"],
|
|
200
|
+
notes: "Search-augmented models",
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "deepinfra",
|
|
204
|
+
protocol: "openai",
|
|
205
|
+
baseUrl: "https://api.deepinfra.com/v1/openai",
|
|
206
|
+
apiKeyEnv: ["DEEPINFRA_API_KEY"],
|
|
207
|
+
models: ["llama-3.3-70b", "mixtral-8x22b", "qwen-2.5-72b"],
|
|
208
|
+
freeTier: "Free tier available",
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "anyscale",
|
|
212
|
+
protocol: "openai",
|
|
213
|
+
baseUrl: "https://api.endpoints.anyscale.com/v1",
|
|
214
|
+
apiKeyEnv: ["ANYSCALE_API_KEY"],
|
|
215
|
+
models: ["llama-3.3-70b", "mixtral-8x7b"],
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "lepton",
|
|
219
|
+
protocol: "openai",
|
|
220
|
+
baseUrl: "https://llama3-3-70b.lepton.run/api/v1",
|
|
221
|
+
apiKeyEnv: ["LEPTON_API_KEY"],
|
|
222
|
+
models: ["llama-3.3-70b", "qwen-2.5-72b"],
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "nvidia",
|
|
226
|
+
protocol: "openai",
|
|
227
|
+
baseUrl: "https://integrate.api.nvidia.com/v1",
|
|
228
|
+
apiKeyEnv: ["NVIDIA_API_KEY"],
|
|
229
|
+
models: ["nvidia/nemotron-3-ultra-550b", "nvidia/nemotron-3-super-120b"],
|
|
230
|
+
freeTier: "Free trial, rate limited",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "github",
|
|
234
|
+
protocol: "openai",
|
|
235
|
+
baseUrl: "https://models.inference.ai.azure.com",
|
|
236
|
+
apiKeyEnv: ["GITHUB_TOKEN"],
|
|
237
|
+
models: ["gpt-4o", "gpt-4o-mini", "phi-4"],
|
|
238
|
+
freeTier: "Free via GitHub Models",
|
|
239
|
+
},
|
|
240
|
+
];
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Built-in MCP Servers — 35 production-ready MCP servers
|
|
244
|
+
*/
|
|
245
|
+
export const BUILTIN_MCP_SERVERS = [
|
|
246
|
+
// ─── FILE SYSTEM ───
|
|
247
|
+
{ name: "filesystem", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "."], description: "File system operations" },
|
|
248
|
+
{ name: "git", transport: "stdio" as const, command: "uvx", args: ["mcp-server-git", "--repository", "."], description: "Git operations" },
|
|
249
|
+
{ name: "memory", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-memory"], description: "Knowledge graph memory" },
|
|
250
|
+
{ name: "fetch", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-fetch"], description: "Web content fetching" },
|
|
251
|
+
{ name: "sequential-thinking", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-sequential-thinking"], description: "Step-by-step reasoning" },
|
|
252
|
+
{ name: "time", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-time"], description: "Time and timezone" },
|
|
253
|
+
|
|
254
|
+
// ─── DATABASES ───
|
|
255
|
+
{ name: "postgres", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"], description: "PostgreSQL read-only access" },
|
|
256
|
+
{ name: "sqlite", transport: "stdio" as const, command: "uvx", args: ["mcp-server-sqlite", "--db", "./data.db"], description: "SQLite database" },
|
|
257
|
+
{ name: "redis", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-redis"], description: "Redis key-value store" },
|
|
258
|
+
{ name: "supabase", transport: "http" as const, url: "https://mcp.supabase.com/v1", description: "Supabase database access" },
|
|
259
|
+
|
|
260
|
+
// ─── VERSION CONTROL ───
|
|
261
|
+
{ name: "github", transport: "http" as const, url: "https://api.githubcopilot.com/mcp/", description: "GitHub API access" },
|
|
262
|
+
{ name: "gitlab", transport: "http" as const, url: "https://mcp.gitlab.com/v1", description: "GitLab API access" },
|
|
263
|
+
|
|
264
|
+
// ─── PROJECT MANAGEMENT ───
|
|
265
|
+
{ name: "linear", transport: "http" as const, url: "https://mcp.linear.app/v1", description: "Linear issue tracking" },
|
|
266
|
+
{ name: "jira", transport: "http" as const, url: "https://mcp.atlassian.com/jira/v1", description: "JIRA project management" },
|
|
267
|
+
{ name: "asana", transport: "http" as const, url: "https://mcp.asana.com/v1", description: "Asana task management" },
|
|
268
|
+
{ name: "notion", transport: "http" as const, url: "https://mcp.notion.com/v1", description: "Notion workspace access" },
|
|
269
|
+
|
|
270
|
+
// ─── COMMUNICATION ───
|
|
271
|
+
{ name: "slack", transport: "http" as const, url: "https://mcp.slack.com/v1", description: "Slack messaging" },
|
|
272
|
+
{ name: "discord", transport: "http" as const, url: "https://mcp.discord.com/v1", description: "Discord messaging" },
|
|
273
|
+
{ name: "telegram", transport: "http" as const, url: "https://mcp.telegram.org/v1", description: "Telegram messaging" },
|
|
274
|
+
|
|
275
|
+
// ─── MONITORING ───
|
|
276
|
+
{ name: "sentry", transport: "http" as const, url: "https://mcp.sentry.dev/mcp", description: "Error monitoring" },
|
|
277
|
+
{ name: "datadog", transport: "http" as const, url: "https://mcp.datadoghq.com/v1", description: "Datadog monitoring" },
|
|
278
|
+
{ name: "grafana", transport: "http" as const, url: "https://mcp.grafana.com/v1", description: "Grafana dashboards" },
|
|
279
|
+
|
|
280
|
+
// ─── SEARCH ───
|
|
281
|
+
{ name: "brave-search", transport: "stdio" as const, command: "npx", args: ["-y", "@anthropic-ai/mcp-server-brave-search"], description: "Web search via Brave" },
|
|
282
|
+
{ name: "exa-search", transport: "http" as const, url: "https://mcp.exa.ai/v1", description: "AI-powered search" },
|
|
283
|
+
|
|
284
|
+
// ─── CLOUD INFRA ───
|
|
285
|
+
{ name: "aws-s3", transport: "stdio" as const, command: "npx", args: ["-y", "@anthropic-ai/mcp-server-aws-s3"], description: "AWS S3 file operations" },
|
|
286
|
+
{ name: "cloudflare", transport: "http" as const, url: "https://mcp.cloudflare.com/v1", description: "Cloudflare API" },
|
|
287
|
+
{ name: "vercel", transport: "http" as const, url: "https://mcp.vercel.com/v1", description: "Vercel deployment" },
|
|
288
|
+
|
|
289
|
+
// ─── AI / MACHINE LEARNING ───
|
|
290
|
+
{ name: "huggingface", transport: "http" as const, url: "https://mcp.huggingface.co/v1", description: "HuggingFace models" },
|
|
291
|
+
{ name: "modal", transport: "http" as const, url: "https://mcp.modal.com/v1", description: "Modal serverless compute" },
|
|
292
|
+
{ name: "replicate", transport: "http" as const, url: "https://mcp.replicate.com/v1", description: "Replicate model inference" },
|
|
293
|
+
|
|
294
|
+
// ─── BROWSER / TESTING ───
|
|
295
|
+
{ name: "puppeteer", transport: "stdio" as const, command: "npx", args: ["-y", "@modelcontextprotocol/server-puppeteer"], description: "Browser automation" },
|
|
296
|
+
{ name: "playwright", transport: "stdio" as const, command: "npx", args: ["-y", "@anthropic-ai/mcp-server-playwright"], description: "End-to-end testing" },
|
|
297
|
+
{ name: "browserbase", transport: "http" as const, url: "https://mcp.browserbase.com/v1", description: "Cloud browser access" },
|
|
298
|
+
|
|
299
|
+
// ─── PAYMENTS / FINANCE ───
|
|
300
|
+
{ name: "stripe", transport: "http" as const, url: "https://mcp.stripe.com/v1", description: "Stripe payment processing" },
|
|
301
|
+
{ name: "plaid", transport: "http" as const, url: "https://mcp.plaid.com/v1", description: "Financial data access" },
|
|
302
|
+
];
|