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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nofax",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
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.5' },
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: true, destructiveHint: false, idempotentHint: true, openWorldHint: true }
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
- await deps.sendResponseConfirmationImpl({
225
- config: current,
226
- response,
227
- title: request.kind === 'approval' ? 'Approval' : request.kind === 'refinement' ? 'Refinement' : 'Choice'
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();