nofax 0.2.8 → 0.2.9
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/README.md +1 -1
- package/package.json +1 -1
- package/src/adapters/gemini.mjs +2 -2
- package/src/mcp-server.mjs +1 -1
- package/src/protocol.mjs +1 -1
package/README.md
CHANGED
|
@@ -198,7 +198,7 @@ Current Gemini CLI builds expose a synchronous `BeforeTool` hook that can allow
|
|
|
198
198
|
}
|
|
199
199
|
```
|
|
200
200
|
|
|
201
|
-
`BeforeTool` waits for an explicit Nofax Allow/Deny result. A Nofax timeout or transport failure
|
|
201
|
+
`BeforeTool` waits for an explicit Nofax Allow/Deny result. A Nofax timeout or transport failure returns Gemini's `ask` decision, forcing the native interactive confirmation instead of allowing an auto-approval policy to treat the missing Nofax decision as permission. The `Notification` hook remains advisory and is forwarded only as a phone notification.
|
|
202
202
|
|
|
203
203
|
Adjust the matcher to the tools you want Nofax to gate. Keep the hook timeout longer than Nofax's configured approval timeout (`timeoutSeconds`, 300 seconds by default).
|
|
204
204
|
|
package/package.json
CHANGED
package/src/adapters/gemini.mjs
CHANGED
|
@@ -49,9 +49,9 @@ export async function handleGeminiHook(input, {
|
|
|
49
49
|
if (result.decision === 'deny') {
|
|
50
50
|
return { decision: 'deny', reason: 'Denied remotely via Nofax.' };
|
|
51
51
|
}
|
|
52
|
-
return {};
|
|
52
|
+
return { decision: 'ask' };
|
|
53
53
|
} catch (error) {
|
|
54
54
|
onError(error);
|
|
55
|
-
return {};
|
|
55
|
+
return { decision: 'ask' };
|
|
56
56
|
}
|
|
57
57
|
}
|
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.9' },
|
|
78
78
|
{ instructions: SERVER_INSTRUCTIONS }
|
|
79
79
|
);
|
|
80
80
|
|
package/src/protocol.mjs
CHANGED
|
@@ -108,7 +108,7 @@ export function parseResponseMessage(message, { requestId, allowed }) {
|
|
|
108
108
|
if (typeof parsed.text !== 'string') return null;
|
|
109
109
|
const text = parsed.text.trim();
|
|
110
110
|
if (!text) return null;
|
|
111
|
-
return { decision: 'refine', text:
|
|
111
|
+
return { decision: 'refine', text: text.slice(0, MAX_RESPONSE_TEXT) };
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
return { decision: parsed.decision };
|