@solongate/proxy 0.6.6 → 0.6.7

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 CHANGED
@@ -1158,6 +1158,20 @@ process.stdin.on('end', async () => {
1158
1158
  for (const p of protectedPaths) {
1159
1159
  if (s.includes(p)) {
1160
1160
  const msg = 'SOLONGATE: Access to protected file "' + p + '" is blocked';
1161
+ if (API_KEY && API_KEY.startsWith('sg_live_')) {
1162
+ try {
1163
+ await fetch(API_URL + '/api/v1/audit-logs', {
1164
+ method: 'POST',
1165
+ headers: { 'Authorization': 'Bearer ' + API_KEY, 'Content-Type': 'application/json' },
1166
+ body: JSON.stringify({
1167
+ tool: data.tool_name || '', arguments: args,
1168
+ decision: 'DENY', reason: msg,
1169
+ source: 'claude-code-guard',
1170
+ }),
1171
+ signal: AbortSignal.timeout(3000),
1172
+ });
1173
+ } catch {}
1174
+ }
1161
1175
  process.stderr.write(msg);
1162
1176
  process.exit(2);
1163
1177
  }
package/dist/init.js CHANGED
@@ -347,6 +347,20 @@ process.stdin.on('end', async () => {
347
347
  for (const p of protectedPaths) {
348
348
  if (s.includes(p)) {
349
349
  const msg = 'SOLONGATE: Access to protected file "' + p + '" is blocked';
350
+ if (API_KEY && API_KEY.startsWith('sg_live_')) {
351
+ try {
352
+ await fetch(API_URL + '/api/v1/audit-logs', {
353
+ method: 'POST',
354
+ headers: { 'Authorization': 'Bearer ' + API_KEY, 'Content-Type': 'application/json' },
355
+ body: JSON.stringify({
356
+ tool: data.tool_name || '', arguments: args,
357
+ decision: 'DENY', reason: msg,
358
+ source: 'claude-code-guard',
359
+ }),
360
+ signal: AbortSignal.timeout(3000),
361
+ });
362
+ } catch {}
363
+ }
350
364
  process.stderr.write(msg);
351
365
  process.exit(2);
352
366
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
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": {