replywizard-whatsapp-mcp 0.6.1 → 0.6.3

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 CHANGED
@@ -42,14 +42,15 @@ lifted into its own repository without touching the extension.
42
42
  | `save_template` | write | Saves a message template to Reply Wizard's Templates. |
43
43
  | `send_message` | send | Puts text in one chat's message box under a bar naming the app and the chat, with Send and Discard. **Sent only if you press Send** within about 45 seconds; otherwise it stays as an ordinary draft. Needs `chatId`, `expectName` (the chat's name exactly as `list_chats` gave it) and `text`. Only to chats where the other person has written, at most 10 an hour and 50 a day, never the same text to many chats, groups only if you allow them. The `replywizard` command line does not offer it. |
44
44
 
45
- **Write tools (0.5.0) are off until you allow them.** They need Reply Wizard 3.5.9 or later and the
46
- switch "Let AI assistants save and draft" on the extension's WhatsApp MCP tab. Until then every call
47
- answers with a sentence saying so and changes nothing. Every attempt, allowed or refused, is listed on
45
+ **Write tools (0.5.0) follow a switch in the extension.** They need Reply Wizard 3.5.9 or later and the
46
+ switch "Let AI assistants save and draft" on the extension's WhatsApp MCP tab, which is on from Reply
47
+ Wizard 3.6.11 (off until you allowed it before that). With it off every call answers with a sentence
48
+ saying so and changes nothing. Every attempt, allowed or refused, is listed on
48
49
  that tab, and none of the three can send a message.
49
50
 
50
51
  **`send_message` (Reply Wizard 3.6.7 or later) has its own switch.** It needs "Let AI assistants save
51
- and draft" and then "Let AI assistants send messages" (both off by default; groups need "Also in group
52
- chats" too). Even with both on, nothing is sent until you press Send on the bar in WhatsApp Web. Out of
52
+ and draft" and then "Let AI assistants send messages" (both on by default from Reply Wizard 3.6.11, off before it; groups need "Also in group
53
+ chats", also on by default from 3.6.11). Even with both on, nothing is sent until you press Send on the bar in WhatsApp Web. Out of
53
54
  the box, Reply Wizard never sends a message.
54
55
 
55
56
  Value tools reuse the extension's existing AI/STT configuration; **your API keys never leave the
@@ -114,7 +115,9 @@ nothing the agent reads. The **Copy Antigravity config** button gives you the JS
114
115
  `--add-mcp` line is still printed on the tab, labelled for what it does, for anyone who wants
115
116
  the entry in the editor's own MCP panel as well.
116
117
 
117
- **Staying connected (0.6.1).** The daemon closes a session that has been quiet for 10 minutes and, with no browser connected, exits after 30. Up to 0.6.0 the connector your AI app launches kept one session for life, so the first request after a quiet spell answered "The Reply Wizard MCP daemon is not reachable" until you restarted the app's MCP server. From 0.6.1 the connector opens a new session, or starts the daemon again, and sends the request once more, with nothing for you to do; the daemon answers an unknown session with HTTP 404, as the MCP specification asks, so apps that connect over HTTP directly start a new session too; the daemon stays up while a paired browser is connected; and a freshly started daemon waits up to 40 seconds for the browser before answering "not connected", inside the request's own time budget.
118
+ **Staying connected (0.6.1, 0.6.2).** The daemon closes a session that has been quiet for 10 minutes and, with no browser connected, exits after 30. Up to 0.6.0 the connector your AI app launches kept one session for life, so the first request after a quiet spell answered "The Reply Wizard MCP daemon is not reachable" until you restarted the app's MCP server. From 0.6.1 the connector opens a new session, or starts the daemon again, and sends the request once more, with nothing for you to do; the daemon answers an unknown session with HTTP 404, as the MCP specification asks, so apps that connect over HTTP directly start a new session too; the daemon stays up while a paired browser is connected; and a freshly started daemon waits up to 40 seconds for the browser before answering "not connected", inside the request's own time budget. 0.6.2 fixes one case: a reconnect whose first message could not be sent used to end the connector process; it now fails that one request and the next request tries again.
119
+
120
+ **Help text (0.6.3).** No change in behaviour: this README and `replywizard --help` now say that the saving, drafting and sending switches are on by default from Reply Wizard 3.6.11, which is live on the Chrome Web Store.
118
121
 
119
122
  **Budgets (0.6.0).** `transcribe_voice_note` is allowed 160 seconds (voice capture inside the extension takes up to 130), and the host reports its real package version on the handshake and in `replywizard status`.
120
123
 
@@ -320,7 +323,7 @@ client. Printed, the two tell themselves apart.
320
323
 
321
324
  - Binds to `127.0.0.1` only.
322
325
  - No tool runs until the pairing code is confirmed in the extension.
323
- - **Write and send tools are off until you allow them** on the extension's WhatsApp MCP tab. A
326
+ - **Write and send tools follow switches** on the extension's WhatsApp MCP tab (on by default from Reply Wizard 3.6.11; turn any of them off there). A
324
327
  `send_message` call is sent only when you press Send in WhatsApp Web; no tool edits or deletes a
325
328
  message.
326
329
  - Session tokens are stored at `~/.replywizard-mcp/session.json` (mode 600), at most five,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "replywizard-whatsapp-mcp",
3
- "version": "0.6.1",
3
+ "version": "0.6.3",
4
4
  "description": "Local MCP server and command line that expose WhatsApp Web (read + value tools) to AI clients via the Reply Wizard Chrome extension.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -310,7 +310,7 @@ export function helpText() {
310
310
  return req ? `<${p}>` : `[${p}]`;
311
311
  }).join(' ');
312
312
  const value = VALUE_ACTIONS.includes(t.name) ? ' (uses your AI provider)'
313
- : WRITE_ACTIONS.includes(t.name) ? ' (off until you allow it; never sends)' : '';
313
+ : WRITE_ACTIONS.includes(t.name) ? ' (needs the switch on the MCP tab; never sends)' : '';
314
314
  return ` replywizard ${[name, positional].filter(Boolean).join(' ')}${value}`;
315
315
  });
316
316
  return [
package/src/connector.js CHANGED
@@ -241,12 +241,24 @@ export function createDaemonLink({ makeTransport, revive, replyTimeoutMs = 15000
241
241
  await current.start();
242
242
  if (!initRequest) return;
243
243
  const id = `rw-reconnect-${++replays}`;
244
+ let timer = null;
244
245
  const answered = new Promise((resolve, reject) => {
245
246
  internal.set(id, resolve);
246
- setTimeout(() => { if (internal.delete(id)) reject(new Error('the daemon did not answer the new session')); }, replyTimeoutMs).unref?.();
247
+ timer = setTimeout(() => { if (internal.delete(id)) reject(new Error('the daemon did not answer the new session')); }, replyTimeoutMs);
248
+ timer.unref?.();
247
249
  });
248
- await current.send({ ...initRequest, id });
249
- const reply = await answered;
250
+ // If the replayed initialize cannot even be SENT, nothing awaits `answered`, and its timer
251
+ // rejecting later is an unhandled rejection, which ends this process: the AI app would lose
252
+ // the server on exactly the failure this recovery exists for (review 2026-11-08, finding A).
253
+ answered.catch(() => {});
254
+ let reply;
255
+ try {
256
+ await current.send({ ...initRequest, id });
257
+ reply = await answered;
258
+ } finally {
259
+ clearTimeout(timer);
260
+ internal.delete(id);
261
+ }
250
262
  if (reply.error) throw new Error(`the daemon refused the new session: ${reply.error.message}`);
251
263
  if (initialized) await current.send({ jsonrpc: '2.0', method: 'notifications/initialized' });
252
264
  })().finally(() => { recovering = null; });