omni-notify-mcp 1.3.402 → 1.3.404

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
@@ -1111,6 +1111,8 @@ function logTelegramError(msg) {
1111
1111
  }
1112
1112
  }
1113
1113
  async function telegramSendTo(token, chatId, text, replyTo) {
1114
+ if (loadConfig().telegram?.enabled !== true)
1115
+ throw new Error("Telegram is switched off in BN settings, so nothing is sent to it");
1114
1116
  const r = await fetch(tgApi(token, "sendMessage"), {
1115
1117
  method: "POST", headers: { "Content-Type": "application/json" },
1116
1118
  body: JSON.stringify({ chat_id: chatId, text, reply_to_message_id: replyTo }),
@@ -1124,7 +1126,7 @@ async function startTelegramListener() {
1124
1126
  try {
1125
1127
  const cfg = loadConfig();
1126
1128
  const { token, chatIds } = cfg.telegram ?? {};
1127
- if (!token || !Array.isArray(chatIds) || chatIds.length === 0) {
1129
+ if (cfg.telegram?.enabled !== true || !token || !Array.isArray(chatIds) || chatIds.length === 0) {
1128
1130
  await new Promise(r => setTimeout(r, 5000));
1129
1131
  continue;
1130
1132
  }
@@ -1723,6 +1725,8 @@ async function slackPost(text) {
1723
1725
  }
1724
1726
  }
1725
1727
  async function slackPostInThread(token, channel, threadTs, text) {
1728
+ if (loadConfig().slack?.enabled !== true)
1729
+ throw new Error("Slack is switched off in BN settings, so nothing is sent to it");
1726
1730
  const r = await fetch(`${SLACK_API_BASE}/chat.postMessage`, {
1727
1731
  method: "POST",
1728
1732
  headers: { "Content-Type": "application/json; charset=utf-8", Authorization: `Bearer ${token}` },
@@ -277,14 +277,13 @@ const CONNECTION_SOURCE = String.raw `(function () {
277
277
  if (window.bullseyeConnection !== undefined) {
278
278
  return;
279
279
  }
280
- var BAR = "__bullseye-connection";
280
+ var COVER = "__bullseye-connection";
281
281
  var MARKS = { reconnecting: "🔄 RECONNECTING", disconnected: "🔴 DISCONNECTED", live: "✅ LIVE" };
282
- var COLOURS = { reconnecting: "#7a5200", disconnected: "#5a1d1d", live: "#1d5a2c" };
282
+ var COLOURS = { reconnecting: "#7a5200", disconnected: "#8a1f1f", live: "#1d5a2c" };
283
283
  var current = null;
284
284
  var ticker = 0;
285
285
  var clearer = 0;
286
- var dismissed = false;
287
- var lastText = "";
286
+ var stilled = [];
288
287
 
289
288
  function clock(at) {
290
289
  return new Date(at).toLocaleTimeString([], { hour12: false });
@@ -303,86 +302,64 @@ const CONNECTION_SOURCE = String.raw `(function () {
303
302
  return lines.join("\n");
304
303
  }
305
304
 
306
- function bar() {
307
- var found = document.getElementById(BAR);
305
+ function cover() {
306
+ var found = document.getElementById(COVER);
308
307
  if (found !== null) {
309
308
  return found;
310
309
  }
311
310
  found = document.createElement("div");
312
- found.id = BAR;
313
- found.setAttribute("role", "status");
314
- found.style.cssText = "position:fixed;left:0;right:0;bottom:0;z-index:2147483647;display:flex;align-items:center;font:12px system-ui,sans-serif;color:#fff";
315
- var word = document.createElement("span");
311
+ found.id = COVER;
312
+ found.setAttribute("role", "alert");
313
+ found.style.cssText = "position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);cursor:not-allowed;padding:16px;box-sizing:border-box";
314
+ var word = document.createElement("div");
316
315
  word.className = "__bullseye-notice-text";
317
- word.style.cssText = "flex:1;min-width:0;padding:4px 10px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis";
318
- var close = document.createElement("button");
319
- close.type = "button";
320
- close.textContent = "✕";
321
- close.setAttribute("aria-label", "Dismiss");
322
- close.style.cssText = "flex:none;width:40px;height:40px;border:0;background:none;color:inherit;font:16px system-ui,sans-serif;cursor:pointer";
323
- close.addEventListener("click", function () {
324
- dismissed = true;
325
- found.style.display = "none";
326
- });
327
- word.addEventListener("click", function () {
328
- word.style.whiteSpace = word.style.whiteSpace === "pre-wrap" ? "nowrap" : "pre-wrap";
329
- paint();
330
- });
316
+ word.style.cssText = "max-width:100%;padding:18px 28px;border:2px solid #fff;border-radius:12px;box-shadow:0 8px 32px rgba(0,0,0,.6);font:700 clamp(20px,6vw,32px) system-ui,sans-serif;color:#fff;text-align:center;cursor:help";
331
317
  found.appendChild(word);
332
- found.appendChild(close);
333
318
  document.body.appendChild(found);
334
319
  return found;
335
320
  }
336
321
 
337
- function paint() {
338
- var shown = bar();
339
- shown.style.background = COLOURS[current.state];
340
- var tip = reading();
341
- var text = MARKS[current.state] + (shown.firstChild.style.whiteSpace === "pre-wrap" ? "\n" + tip : "");
342
- if (text !== lastText) {
343
- lastText = text;
344
- shown.firstChild.textContent = text;
345
- }
346
- if (shown.firstChild.getAttribute("data-be-tip") !== tip) {
347
- shown.firstChild.setAttribute("data-be-tip", tip);
348
- }
349
- }
350
-
351
- var VEIL = "__bullseye-connection-veil";
352
- var stilled = [];
353
-
354
- function block(state) {
355
- var veil = document.getElementById(VEIL);
356
- if (state === "live") {
357
- if (veil !== null) {
358
- veil.remove();
359
- }
360
- stilled.forEach(function (el) { el.inert = false; });
361
- stilled = [];
362
- return;
322
+ function stillThePage(shown) {
323
+ if (document.activeElement !== null && document.activeElement !== document.body) {
324
+ document.activeElement.blur();
363
325
  }
364
- if (veil === null) {
365
- veil = document.createElement("div");
366
- veil.id = VEIL;
367
- veil.style.cssText = "position:fixed;inset:0;z-index:2147483646;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.55);cursor:not-allowed;font:600 20px system-ui,sans-serif;color:#fff;text-align:center;padding:16px";
368
- document.body.appendChild(veil);
369
- }
370
- veil.textContent = MARKS[state];
371
326
  Array.prototype.forEach.call(document.body.children, function (el) {
372
- if (el.id !== BAR && el.id !== VEIL && !el.inert) {
327
+ if (el !== shown && !el.inert) {
373
328
  el.inert = true;
374
329
  stilled.push(el);
375
330
  }
376
331
  });
377
332
  }
378
333
 
334
+ function paint() {
335
+ var shown = cover();
336
+ var word = shown.firstChild;
337
+ word.style.background = COLOURS[current.state];
338
+ var mark = MARKS[current.state];
339
+ if (word.textContent !== mark) {
340
+ word.textContent = mark;
341
+ }
342
+ var tip = reading();
343
+ if (word.getAttribute("data-be-tip") !== tip) {
344
+ word.setAttribute("data-be-tip", tip);
345
+ }
346
+ stillThePage(shown);
347
+ }
348
+
349
+ function release() {
350
+ var shown = document.getElementById(COVER);
351
+ if (shown !== null) {
352
+ shown.remove();
353
+ }
354
+ stilled.forEach(function (el) { el.inert = false; });
355
+ stilled = [];
356
+ current = null;
357
+ }
358
+
379
359
  function show(state, what, extra) {
380
360
  window.clearTimeout(clearer);
381
361
  var dropped = current !== null && current.state !== "live";
382
- var shown = bar();
383
- shown.style.display = dismissed ? "none" : "flex";
384
362
  current = { state: state, what: what || (current && current.what) || "the live connection to this page's service", since: dropped ? current.since : Date.now(), retryAt: extra.retryAt, why: extra.why };
385
- block(state);
386
363
  paint();
387
364
  window.clearInterval(ticker);
388
365
  ticker = window.setInterval(paint, 1000);
@@ -401,15 +378,7 @@ const CONNECTION_SOURCE = String.raw `(function () {
401
378
  }
402
379
  show("live", current.what, {});
403
380
  window.clearInterval(ticker);
404
- clearer = window.setTimeout(function () {
405
- var shown = document.getElementById(BAR);
406
- if (shown !== null) {
407
- shown.remove();
408
- }
409
- current = null;
410
- dismissed = false;
411
- lastText = "";
412
- }, 1000);
381
+ clearer = window.setTimeout(release, 300);
413
382
  }
414
383
  };
415
384
  })();`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.402",
3
+ "version": "1.3.404",
4
4
  "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.",
5
5
  "main": "dist/daemon.js",
6
6
  "type": "module",