@solongate/proxy 0.14.0 → 0.14.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.
Files changed (2) hide show
  1. package/hooks/guard.mjs +2 -1
  2. package/package.json +1 -1
package/hooks/guard.mjs CHANGED
@@ -120,7 +120,8 @@ function detectPromptInjection(text, customCategories = [], threshold = 0.5) {
120
120
  if (matched.length === 0) return null;
121
121
  const score = Math.min(1.0, maxWeight + 0.05 * (matched.length - 1));
122
122
  const trustScore = 1.0 - score;
123
- return { score, trustScore, categories: matched, blocked: trustScore < threshold };
123
+ const blocked = Math.round(trustScore * 1000) < Math.round(threshold * 1000);
124
+ return { score, trustScore, categories: matched, blocked };
124
125
  }
125
126
 
126
127
  // ── Glob Matching ──
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.14.0",
3
+ "version": "0.14.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": {