@solongate/proxy 0.39.0 → 0.40.0
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 +24 -5
- package/dist/init.js +24 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -809,7 +809,7 @@ function installGeminiConfig(clientDir, guardCmd, auditCmd, _stopCmd, wrappedMcp
|
|
|
809
809
|
console.log(` ${existingStr ? "Updated" : "Created"} ${settingsPath}`);
|
|
810
810
|
return "installed";
|
|
811
811
|
}
|
|
812
|
-
function installOpenClawConfig(
|
|
812
|
+
function installOpenClawConfig(_clientDir) {
|
|
813
813
|
const yamlPath = resolve3("openclaw.yaml");
|
|
814
814
|
const pluginLine = "@solongate/openclaw-plugin";
|
|
815
815
|
if (existsSync4(yamlPath)) {
|
|
@@ -817,11 +817,30 @@ function installOpenClawConfig(clientDir) {
|
|
|
817
817
|
if (content.includes(pluginLine)) {
|
|
818
818
|
return "skipped";
|
|
819
819
|
}
|
|
820
|
+
if (content.includes("plugins:")) {
|
|
821
|
+
const updated = content.replace(
|
|
822
|
+
/^(plugins:\s*\n)/m,
|
|
823
|
+
`$1 - "${pluginLine}"
|
|
824
|
+
`
|
|
825
|
+
);
|
|
826
|
+
writeFileSync2(yamlPath, updated);
|
|
827
|
+
} else {
|
|
828
|
+
const separator = content.endsWith("\n") ? "" : "\n";
|
|
829
|
+
writeFileSync2(yamlPath, content + `${separator}
|
|
830
|
+
plugins:
|
|
831
|
+
- "${pluginLine}"
|
|
832
|
+
`);
|
|
833
|
+
}
|
|
834
|
+
} else {
|
|
835
|
+
writeFileSync2(yamlPath, `# OpenClaw configuration
|
|
836
|
+
# SolonGate security plugin \u2014 manage policies at https://dashboard.solongate.com
|
|
837
|
+
|
|
838
|
+
plugins:
|
|
839
|
+
- "${pluginLine}"
|
|
840
|
+
`);
|
|
820
841
|
}
|
|
821
|
-
console.log(`
|
|
822
|
-
console.log(`
|
|
823
|
-
console.log(` - "${pluginLine}"`);
|
|
824
|
-
console.log(` Then: npm install ${pluginLine}`);
|
|
842
|
+
console.log(` Updated openclaw.yaml with SolonGate plugin`);
|
|
843
|
+
console.log(` \u2192 Run: npm install ${pluginLine}`);
|
|
825
844
|
return "installed";
|
|
826
845
|
}
|
|
827
846
|
function ensureEnvFile() {
|
package/dist/init.js
CHANGED
|
@@ -392,7 +392,7 @@ function installGeminiConfig(clientDir, guardCmd, auditCmd, _stopCmd, wrappedMcp
|
|
|
392
392
|
console.log(` ${existingStr ? "Updated" : "Created"} ${settingsPath}`);
|
|
393
393
|
return "installed";
|
|
394
394
|
}
|
|
395
|
-
function installOpenClawConfig(
|
|
395
|
+
function installOpenClawConfig(_clientDir) {
|
|
396
396
|
const yamlPath = resolve("openclaw.yaml");
|
|
397
397
|
const pluginLine = "@solongate/openclaw-plugin";
|
|
398
398
|
if (existsSync(yamlPath)) {
|
|
@@ -400,11 +400,30 @@ function installOpenClawConfig(clientDir) {
|
|
|
400
400
|
if (content.includes(pluginLine)) {
|
|
401
401
|
return "skipped";
|
|
402
402
|
}
|
|
403
|
+
if (content.includes("plugins:")) {
|
|
404
|
+
const updated = content.replace(
|
|
405
|
+
/^(plugins:\s*\n)/m,
|
|
406
|
+
`$1 - "${pluginLine}"
|
|
407
|
+
`
|
|
408
|
+
);
|
|
409
|
+
writeFileSync(yamlPath, updated);
|
|
410
|
+
} else {
|
|
411
|
+
const separator = content.endsWith("\n") ? "" : "\n";
|
|
412
|
+
writeFileSync(yamlPath, content + `${separator}
|
|
413
|
+
plugins:
|
|
414
|
+
- "${pluginLine}"
|
|
415
|
+
`);
|
|
416
|
+
}
|
|
417
|
+
} else {
|
|
418
|
+
writeFileSync(yamlPath, `# OpenClaw configuration
|
|
419
|
+
# SolonGate security plugin \u2014 manage policies at https://dashboard.solongate.com
|
|
420
|
+
|
|
421
|
+
plugins:
|
|
422
|
+
- "${pluginLine}"
|
|
423
|
+
`);
|
|
403
424
|
}
|
|
404
|
-
console.log(`
|
|
405
|
-
console.log(`
|
|
406
|
-
console.log(` - "${pluginLine}"`);
|
|
407
|
-
console.log(` Then: npm install ${pluginLine}`);
|
|
425
|
+
console.log(` Updated openclaw.yaml with SolonGate plugin`);
|
|
426
|
+
console.log(` \u2192 Run: npm install ${pluginLine}`);
|
|
408
427
|
return "installed";
|
|
409
428
|
}
|
|
410
429
|
function ensureEnvFile() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solongate/proxy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.40.0",
|
|
4
4
|
"description": "AI tool security proxy — protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. Zero code changes required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|