@solongate/proxy 0.25.1 → 0.25.3
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/dist/index.js +14 -3
- package/dist/init.js +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -204,7 +204,15 @@ function parseArgs(argv) {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
if (!aiJudgeApiKey) {
|
|
207
|
-
|
|
207
|
+
const dotenvPath = resolve(".env");
|
|
208
|
+
if (existsSync(dotenvPath)) {
|
|
209
|
+
const dotenvContent = readFileSync(dotenvPath, "utf-8");
|
|
210
|
+
const groqMatch = dotenvContent.match(/^GROQ_API_KEY=(.+)/m);
|
|
211
|
+
if (groqMatch) aiJudgeApiKey = groqMatch[1].trim();
|
|
212
|
+
}
|
|
213
|
+
if (!aiJudgeApiKey) {
|
|
214
|
+
aiJudgeApiKey = process.env.GROQ_API_KEY;
|
|
215
|
+
}
|
|
208
216
|
}
|
|
209
217
|
const aiJudge = aiJudgeEnabled ? {
|
|
210
218
|
enabled: true,
|
|
@@ -612,11 +620,14 @@ function ensureEnvFile() {
|
|
|
612
620
|
const envPath = resolve2(".env");
|
|
613
621
|
if (!existsSync3(envPath)) {
|
|
614
622
|
const envContent = `# SolonGate Configuration
|
|
615
|
-
# Get your API key from: https://dashboard.solongate.com/api-keys
|
|
616
623
|
# IMPORTANT: Never commit this file to git!
|
|
617
624
|
|
|
618
|
-
# Your SolonGate API key \u2014
|
|
625
|
+
# Your SolonGate API key \u2014 get one at https://dashboard.solongate.com
|
|
619
626
|
SOLONGATE_API_KEY=sg_live_your_key_here
|
|
627
|
+
|
|
628
|
+
# AI Judge (semantic security layer) \u2014 get a free key at https://console.groq.com/keys
|
|
629
|
+
# Enable with: npx @solongate/proxy --ai-judge ...
|
|
630
|
+
GROQ_API_KEY=gsk_your_groq_key_here
|
|
620
631
|
`;
|
|
621
632
|
writeFileSync2(envPath, envContent);
|
|
622
633
|
console.log(` Created .env`);
|
package/dist/init.js
CHANGED
|
@@ -283,11 +283,14 @@ function ensureEnvFile() {
|
|
|
283
283
|
const envPath = resolve(".env");
|
|
284
284
|
if (!existsSync(envPath)) {
|
|
285
285
|
const envContent = `# SolonGate Configuration
|
|
286
|
-
# Get your API key from: https://dashboard.solongate.com/api-keys
|
|
287
286
|
# IMPORTANT: Never commit this file to git!
|
|
288
287
|
|
|
289
|
-
# Your SolonGate API key \u2014
|
|
288
|
+
# Your SolonGate API key \u2014 get one at https://dashboard.solongate.com
|
|
290
289
|
SOLONGATE_API_KEY=sg_live_your_key_here
|
|
290
|
+
|
|
291
|
+
# AI Judge (semantic security layer) \u2014 get a free key at https://console.groq.com/keys
|
|
292
|
+
# Enable with: npx @solongate/proxy --ai-judge ...
|
|
293
|
+
GROQ_API_KEY=gsk_your_groq_key_here
|
|
291
294
|
`;
|
|
292
295
|
writeFileSync(envPath, envContent);
|
|
293
296
|
console.log(` Created .env`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.3",
|
|
4
4
|
"description": "MCP security proxy — protect any MCP server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|