nofax 0.2.22 → 0.2.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nofax",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "mcpName": "io.github.AKzar1el/nofax",
5
5
  "description": "Human-in-the-loop approvals and notifications for AI coding agents via CLI, MCP, and agent hooks.",
6
6
  "type": "module",
@@ -74,7 +74,7 @@ const LIST_PENDING_OUTPUT_SCHEMA = z.object({
74
74
 
75
75
  export function buildMcpServer({ handlers = createMcpToolHandlers() } = {}) {
76
76
  const server = new McpServer(
77
- { name: 'nofax', version: '0.2.22' },
77
+ { name: 'nofax', version: '0.2.24' },
78
78
  { instructions: SERVER_INSTRUCTIONS }
79
79
  );
80
80
 
package/src/protocol.mjs CHANGED
@@ -48,11 +48,12 @@ function normalizeSecretKeyName(key) {
48
48
  function isSecretKey(key) {
49
49
  const normalized = normalizeSecretKeyName(key);
50
50
  const lower = normalized.toLowerCase();
51
+ const isAuthHeader = lower === 'auth_header' || lower.endsWith('_auth_header');
51
52
  const isPassphrase = lower === 'passphrase'
52
53
  || lower === 'pass_phrase'
53
54
  || lower.endsWith('_passphrase')
54
55
  || lower.endsWith('_pass_phrase');
55
- return lower === 'auth' || isPassphrase || SECRET_KEY.test(normalized);
56
+ return lower === 'auth' || isAuthHeader || isPassphrase || SECRET_KEY.test(normalized);
56
57
  }
57
58
 
58
59
  function redactSecretText(value) {
@@ -181,18 +182,16 @@ export function redactAndBound(value, options = {}) {
181
182
  ));
182
183
  }
183
184
 
184
- const entryName = typeof value.name === 'string'
185
- ? value.name
186
- : typeof value.key === 'string'
187
- ? value.key
188
- : typeof value.header === 'string'
189
- ? value.header
190
- : null;
185
+ const entryName = Object.entries(value).find(([key, child]) => (
186
+ typeof child === 'string'
187
+ && (key.toLowerCase() === 'name' || key.toLowerCase() === 'key' || key.toLowerCase() === 'header')
188
+ ))?.[1] ?? null;
191
189
  const redactEntryValue = entryName !== null && isSecretKey(entryName);
192
190
 
193
191
  const out = {};
194
192
  for (const [key, child] of Object.entries(value).slice(0, MAX_OBJECT_KEYS)) {
195
- out[key] = isSecretKey(key) || (redactEntryValue && (key === 'value' || key === 'values'))
193
+ const normalizedKey = key.toLowerCase();
194
+ out[key] = isSecretKey(key) || (redactEntryValue && (normalizedKey === 'value' || normalizedKey === 'values'))
196
195
  ? '[REDACTED]'
197
196
  : redactAndBound(child, { seen, depth: depth + 1 });
198
197
  }