replywizard-whatsapp-mcp 0.6.1 → 0.6.2
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/connector.js +15 -3
package/README.md
CHANGED
|
@@ -114,7 +114,7 @@ nothing the agent reads. The **Copy Antigravity config** button gives you the JS
|
|
|
114
114
|
`--add-mcp` line is still printed on the tab, labelled for what it does, for anyone who wants
|
|
115
115
|
the entry in the editor's own MCP panel as well.
|
|
116
116
|
|
|
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.
|
|
117
|
+
**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.
|
|
118
118
|
|
|
119
119
|
**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
120
|
|
package/package.json
CHANGED
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)
|
|
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
|
-
|
|
249
|
-
|
|
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; });
|