nofax 0.2.5 → 0.2.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.
- package/package.json +1 -1
- package/src/mcp-server.mjs +2 -2
- package/src/mcp-tools.mjs +9 -5
package/package.json
CHANGED
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.6' },
|
|
78
78
|
{ instructions: SERVER_INSTRUCTIONS }
|
|
79
79
|
);
|
|
80
80
|
|
|
@@ -156,7 +156,7 @@ export function buildMcpServer({ handlers = createMcpToolHandlers() } = {}) {
|
|
|
156
156
|
waitSeconds: z.number().int().min(1).max(240).optional().describe('Maximum seconds to long-poll during this call; defaults to 240. A timeout still returns pending, never approval.')
|
|
157
157
|
}),
|
|
158
158
|
outputSchema: WAIT_OUTPUT_SCHEMA,
|
|
159
|
-
annotations: { readOnlyHint:
|
|
159
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true }
|
|
160
160
|
},
|
|
161
161
|
async (args) => result(await handlers.waitForResponse(args))
|
|
162
162
|
);
|
package/src/mcp-tools.mjs
CHANGED
|
@@ -221,11 +221,15 @@ export function createMcpToolHandlers(overrides = {}) {
|
|
|
221
221
|
response,
|
|
222
222
|
resolvedAt: new Date(deps.nowImpl()).toISOString()
|
|
223
223
|
});
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
224
|
+
const acceptedResponse = request.decision === response.decision
|
|
225
|
+
&& (request.text ?? undefined) === (response.text ?? undefined);
|
|
226
|
+
if (acceptedResponse) {
|
|
227
|
+
await deps.sendResponseConfirmationImpl({
|
|
228
|
+
config: current,
|
|
229
|
+
response,
|
|
230
|
+
title: request.kind === 'approval' ? 'Approval' : request.kind === 'refinement' ? 'Refinement' : 'Choice'
|
|
231
|
+
});
|
|
232
|
+
}
|
|
229
233
|
return terminalResult(request);
|
|
230
234
|
}
|
|
231
235
|
const remaining = deadline - deps.nowImpl();
|