omni-notify-mcp 1.3.429 → 1.3.431

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/dist/notify.js CHANGED
@@ -1284,17 +1284,8 @@ async function startTelegramListener() {
1284
1284
  const ackText = ruling === undefined ? ingestChatEntry(entry) : unruledWords ? `${ruling}\n\n${ingestChatEntry(entry)}` : ruling;
1285
1285
  if (masterMuted())
1286
1286
  continue;
1287
- // OWNER: ITER/LOOP — a non-2xx does not reject a fetch, so a refused acknowledgement would read as delivered; this frame reports it and the next update is read.
1288
- await postTelegramMessage(tgApi(token, "sendMessage"), { chat_id: fromChatId, text: ackText, reply_to_message_id: msg.message_id }, telegramParseMode(cfg))
1289
- .then(async ({ response: r, unformatted }) => {
1290
- if (r.ok) {
1291
- if (unformatted)
1292
- log("→", "telegram:ack", `acknowledgement to ${fromChatId} went out UNFORMATTED — Telegram refused the formatting (can't parse entities)`, tag);
1293
- return;
1294
- }
1295
- log("→", "telegram:ack", `NOT DELIVERED to ${fromChatId} for message ${msg.message_id}: ${await telegramSendErrorHint(r)}`, tag);
1296
- })
1297
- .catch((err) => {
1287
+ // OWNER: ITER/LOOP — the acknowledgement goes out through the one guarded send, so a channel switched off while this long-poll was in flight sends nothing, and a non-2xx or a refusal is reported by this frame (#4451); the next update is read.
1288
+ await telegramSendTo(token, fromChatId, ackText, msg.message_id).catch((err) => {
1298
1289
  log("→", "telegram:ack", `NOT DELIVERED to ${fromChatId} for message ${msg.message_id}: ${err instanceof Error ? err.message : String(err)}`, tag);
1299
1290
  });
1300
1291
  }
@@ -1795,7 +1786,8 @@ function slackRecordFailed(err) {
1795
1786
  slackLastError = err instanceof Error ? err.message : String(err);
1796
1787
  }
1797
1788
  async function slackPost(text) {
1798
- if (masterMuted())
1789
+ // A channel switched off in settings carries no acknowledgement or command answer either (#4451), the same as its thread replies.
1790
+ if (masterMuted() || loadConfig().slack?.enabled !== true)
1799
1791
  return;
1800
1792
  try {
1801
1793
  await slackSend(text);
@@ -2348,7 +2340,8 @@ export function createMcpServer(clientId, sessionTag) {
2348
2340
  // #1213: and that question is answered by a REAL transport result, never by
2349
2341
  // whether a token is present — a revoked token satisfied the config check
2350
2342
  // for four months and every question rode it into the void.
2351
- const askCandidates = ["telegram"];
2343
+ // #4451: only a channel that is switched on, with its token and chats, is a candidate — measureReach alone reads the token, so a Telegram switched off in settings was still probed, found alive, and asked through.
2344
+ const askCandidates = probeableChannels(cfg);
2352
2345
  const askSkipNotes = [];
2353
2346
  const askFormatNotes = [];
2354
2347
  // Measured now, per candidate: what cannot carry is absent from `canCarry`.
@@ -217,6 +217,19 @@ function saveTheme(theme) {
217
217
  fs.writeFileSync(staged, JSON.stringify(PROCESS.theme));
218
218
  fs.renameSync(staged, THEME_FILE);
219
219
  }
220
+ /**
221
+ * #3894 (BullseyeBacklog) — A POST A PANEL SENDS AS ITS JSON BYTES REACHES A BROWSER AS THE MESSAGE THEY ENCODE. A panel whose
222
+ * post is megabytes hands VS Code the UTF-8 bytes of its JSON (`{ type, jsonBytes: Uint8Array }`), which VS Code carries to
223
+ * its webview as they are instead of walking the object on the extension host. A browser is sent JSON text, so the mirror
224
+ * decodes those bytes back into the message they hold before it frames it — read here only when a browser is listening.
225
+ */
226
+ function asPosted(message) {
227
+ const bytes = message?.jsonBytes;
228
+ if (!(bytes instanceof Uint8Array)) {
229
+ return message;
230
+ }
231
+ return JSON.parse(Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString("utf8"));
232
+ }
220
233
  function postFrame(message, roots) {
221
234
  return JSON.stringify({ type: "post", message: JSON.parse(repoint(JSON.stringify(message), roots)) });
222
235
  }
@@ -602,7 +615,7 @@ class Page {
602
615
  if (this.mirror !== from || ready.length === 0) {
603
616
  return;
604
617
  }
605
- postTo(ready, message, from.roots());
618
+ postTo(ready, asPosted(message), from.roots());
606
619
  }
607
620
  received(socket, text) {
608
621
  let frame;
@@ -1426,4 +1439,4 @@ function startWebHost(options) {
1426
1439
  void INSTANCE.start(options);
1427
1440
  return { dispose: () => INSTANCE.stop() };
1428
1441
  }
1429
- module.exports = { DEFAULT_THEME, WebHost, ServiceHost, MirroredWebview, ServedWebview, startWebHost, actWindows, listWebUis, saveTheme, readTheme, webDocument, repoint, fileOfResourcePath, sha256 };
1442
+ module.exports = { asPosted, DEFAULT_THEME, WebHost, ServiceHost, MirroredWebview, ServedWebview, startWebHost, actWindows, listWebUis, saveTheme, readTheme, webDocument, repoint, fileOfResourcePath, sha256 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.429",
3
+ "version": "1.3.431",
4
4
  "homepage": "https://www.npmjs.com/package/omni-notify-mcp",
5
5
  "description": "Reach your AI agents from anywhere — and let them reach you. One resident process on 127.0.0.1:7475 serves the whole tool surface to Claude Code, GitHub Copilot Chat and Codex: desktop, Telegram, Slack, ntfy, Discord, Teams and SMS are configured in one file, and agents notify you when long work finishes or a decision is needed, ask you a question and wait for your answer, and receive and reply to the messages you send them — with Do Not Disturb and idle detection deciding what actually gets through.",
6
6
  "main": "dist/daemon.js",