@solongate/proxy 0.7.0 → 0.8.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/dist/init.js CHANGED
@@ -67,18 +67,14 @@ function isAlreadyProtected(server) {
67
67
  function wrapServer(server, policy) {
68
68
  const env = { ...server.env ?? {} };
69
69
  env.SOLONGATE_API_KEY = "${SOLONGATE_API_KEY}";
70
+ const proxyArgs = ["-y", "@solongate/proxy"];
71
+ if (policy) {
72
+ proxyArgs.push("--policy", policy);
73
+ }
74
+ proxyArgs.push("--verbose", "--", server.command, ...server.args ?? []);
70
75
  return {
71
76
  command: "npx",
72
- args: [
73
- "-y",
74
- "@solongate/proxy",
75
- "--policy",
76
- policy,
77
- "--verbose",
78
- "--",
79
- server.command,
80
- ...server.args ?? []
81
- ],
77
+ args: proxyArgs,
82
78
  env
83
79
  };
84
80
  }
@@ -127,8 +123,7 @@ USAGE
127
123
 
128
124
  OPTIONS
129
125
  --config <path> Path to MCP config file (default: auto-detect)
130
- --policy <file> Custom policy JSON file (default: restricted)
131
- Auto-detects policy.json in current directory
126
+ --policy <file> Custom policy JSON file (auto-detects policy.json)
132
127
  --api-key <key> SolonGate API key (sg_live_... or sg_test_...)
133
128
  --all Protect all servers without prompting
134
129
  -h, --help Show this help message
@@ -685,7 +680,7 @@ async function main() {
685
680
  console.log(" Invalid API key format. Must start with sg_live_ or sg_test_");
686
681
  process.exit(1);
687
682
  }
688
- let policyValue = "restricted";
683
+ let policyValue;
689
684
  if (options.policy) {
690
685
  const policyPath = resolve(options.policy);
691
686
  if (existsSync(policyPath)) {
@@ -701,7 +696,7 @@ async function main() {
701
696
  policyValue = "./policy.json";
702
697
  console.log(` Policy: ${defaultPolicy} (auto-detected)`);
703
698
  } else {
704
- console.log(` Policy: restricted (default)`);
699
+ console.log(` Policy: cloud-managed (fetched via API key)`);
705
700
  }
706
701
  }
707
702
  await sleep(300);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.7.0",
3
+ "version": "0.8.1",
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": {