@solongate/proxy 0.81.5 → 0.81.6

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/audit.mjs +4 -0
  2. package/package.json +1 -1
package/hooks/audit.mjs CHANGED
@@ -497,6 +497,10 @@ try { input += readFileSync(0, 'utf-8'); } catch {}
497
497
  if (tr && typeof tr === 'object' && typeof tr.stdout === 'string') updated = { ...tr, stdout: out };
498
498
  else if (tr && typeof tr === 'object' && typeof tr.content === 'string') updated = { ...tr, content: out };
499
499
  else if (tr && typeof tr === 'object' && Array.isArray(tr.content)) updated = { ...tr, content: [{ type: 'text', text: out }] };
500
+ // Read / NotebookRead nest the file body at file.content. It's a STRUCTURED
501
+ // result, so a bare-string replacement is rejected ("PostToolUse:Read hook
502
+ // warning") and the raw secret leaks through — preserve the shape instead.
503
+ else if (tr && typeof tr === 'object' && tr.file && typeof tr.file.content === 'string') updated = { ...tr, file: { ...tr.file, content: out } };
500
504
  else updated = out;
501
505
  EMITTED_PAYLOAD = JSON.stringify({
502
506
  hookSpecificOutput: { hookEventName: 'PostToolUse', updatedToolOutput: updated },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solongate/proxy",
3
- "version": "0.81.5",
3
+ "version": "0.81.6",
4
4
  "description": "AI tool security proxy: protect any AI tool server with customizable policies, path/command constraints, rate limiting, and audit logging. No code changes required.",
5
5
  "type": "module",
6
6
  "bin": {