nofax 0.2.24 → 0.2.26
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 +2 -2
- package/src/mcp-server.mjs +1 -1
- package/src/protocol.mjs +16 -0
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nofax",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.26",
|
|
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",
|
|
7
7
|
"bin": {
|
|
8
|
-
"nofax": "
|
|
8
|
+
"nofax": "bin/nofax.mjs"
|
|
9
9
|
},
|
|
10
10
|
"exports": {
|
|
11
11
|
".": "./src/index.mjs",
|
package/src/mcp-server.mjs
CHANGED
|
@@ -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.
|
|
77
|
+
{ name: 'nofax', version: '0.2.26' },
|
|
78
78
|
{ instructions: SERVER_INSTRUCTIONS }
|
|
79
79
|
);
|
|
80
80
|
|
package/src/protocol.mjs
CHANGED
|
@@ -79,6 +79,21 @@ function redactSecretText(value) {
|
|
|
79
79
|
'$1$2$3$4[REDACTED]'
|
|
80
80
|
);
|
|
81
81
|
|
|
82
|
+
redacted = redacted.replace(
|
|
83
|
+
/(^|[\r\n]|[({\[,:;])([ \t]*)(["'])((?:proxy[-_])?authorization)\3(\s*[:=]\s*)[^}\])\r\n]*(?=[}\])]|$)/gim,
|
|
84
|
+
'$1$2$3$4$3$5[REDACTED]'
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
redacted = redacted.replace(
|
|
88
|
+
/([({\[,:;][ \t]*)((?:proxy[-_])?authorization)(\s*[:=]\s*)(?!\[REDACTED\]|(?:bearer|basic)\b)[^}\])\r\n]*(?=[}\])]|$)/gi,
|
|
89
|
+
'$1$2$3[REDACTED]'
|
|
90
|
+
);
|
|
91
|
+
|
|
92
|
+
redacted = redacted.replace(
|
|
93
|
+
/([^ \t\r\n=][ \t]+|=)((?:proxy[-_])?authorization)(\s*[:=]\s*)(?!\[REDACTED\]|(?:bearer|basic)\b)[^\r\n]*/gi,
|
|
94
|
+
'$1$2$3[REDACTED]'
|
|
95
|
+
);
|
|
96
|
+
|
|
82
97
|
redacted = redacted.replace(
|
|
83
98
|
/\b((?:proxy[-_])?authorization)(\s*[:=]\s*)(bearer|basic)(\s+)([^\s"'`,;&]+)/gi,
|
|
84
99
|
'$1$2$3$4[REDACTED]'
|
|
@@ -114,6 +129,7 @@ function redactSecretText(value) {
|
|
|
114
129
|
/([A-Za-z][A-Za-z0-9_-]{0,63})(\s*[:=]\s*)([^\s"'`,;&]+)/g,
|
|
115
130
|
(match, key, separator, rawValue) => {
|
|
116
131
|
if (!isSecretKey(key)) return match;
|
|
132
|
+
if (/^\[REDACTED\][}\])]*$/.test(rawValue)) return match;
|
|
117
133
|
if (/authorization$/i.test(normalizeSecretKeyName(key)) && /^(?:bearer|basic)$/i.test(rawValue)) return match;
|
|
118
134
|
return `${key}${separator}[REDACTED]`;
|
|
119
135
|
}
|