nofax 0.2.19 → 0.2.21
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 +1 -1
- package/src/cli.mjs +10 -1
- package/src/mcp-server.mjs +1 -1
- package/src/ntfy.mjs +3 -3
- package/src/protocol.mjs +3 -1
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -196,7 +196,16 @@ export async function runCli(args, overrides = {}) {
|
|
|
196
196
|
if (command === 'hook') {
|
|
197
197
|
const adapter = args[1];
|
|
198
198
|
if (!adapter) throw new Error('NOFAX_HOOK_REQUIRED');
|
|
199
|
-
|
|
199
|
+
try {
|
|
200
|
+
return await runHook(adapter, deps);
|
|
201
|
+
} catch (error) {
|
|
202
|
+
if (adapter === 'gemini') {
|
|
203
|
+
deps.stderr.write(`nofax: ${error.message}\n`);
|
|
204
|
+
writeJson(deps.stdout, { decision: 'ask' });
|
|
205
|
+
return 0;
|
|
206
|
+
}
|
|
207
|
+
throw error;
|
|
208
|
+
}
|
|
200
209
|
}
|
|
201
210
|
|
|
202
211
|
throw new Error(`NOFAX_UNKNOWN_COMMAND:${command}`);
|
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.21' },
|
|
78
78
|
{ instructions: SERVER_INSTRUCTIONS }
|
|
79
79
|
);
|
|
80
80
|
|
package/src/ntfy.mjs
CHANGED
|
@@ -179,9 +179,9 @@ export async function sendResponseConfirmation({ config, response, kind, title =
|
|
|
179
179
|
await sendNotification({
|
|
180
180
|
config,
|
|
181
181
|
title: `${confirmationTitle} - ${title}`,
|
|
182
|
-
message: response.decision === 'refine'
|
|
183
|
-
|
|
184
|
-
|
|
182
|
+
message: kind !== 'choice' && response.decision === 'refine'
|
|
183
|
+
? 'Your refinement was sent back to the agent.'
|
|
184
|
+
: `Nofax recorded: ${response.decision}`,
|
|
185
185
|
priority: 2,
|
|
186
186
|
tags: [tag],
|
|
187
187
|
fetchImpl
|
package/src/protocol.mjs
CHANGED
|
@@ -185,7 +185,9 @@ export function redactAndBound(value, options = {}) {
|
|
|
185
185
|
? value.name
|
|
186
186
|
: typeof value.key === 'string'
|
|
187
187
|
? value.key
|
|
188
|
-
:
|
|
188
|
+
: typeof value.header === 'string'
|
|
189
|
+
? value.header
|
|
190
|
+
: null;
|
|
189
191
|
const redactEntryValue = entryName !== null && isSecretKey(entryName);
|
|
190
192
|
|
|
191
193
|
const out = {};
|