omni-notify-mcp 1.3.498 → 1.3.500

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.
@@ -118,6 +118,10 @@ const PICKER_SOURCE = String.raw `
118
118
  }
119
119
 
120
120
  var framedPage = new URLSearchParams(window.location.search).get("bullseye-framed") !== null;
121
+ // #4960 — a framed page tells the window that framed it that it is really up, the instant its own scripts run; the window keeps the frame only on that word, so a frame that never comes up (its service down, or a page the service refuses) leaves the window's own page in place, never a blank.
122
+ if (framedPage && window.parent !== window) {
123
+ window.parent.postMessage({ type: "__bullseyeFramedReady" }, "*");
124
+ }
121
125
  var workspaceRead = 0;
122
126
  var barColours = "background:#252526;color:#ccc";
123
127
  var workspaceBarStyle = "display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;align-items:center;box-sizing:border-box;min-height:24px;max-width:100%;overflow:hidden;font:12px system-ui,sans-serif;" + barColours + ";border-bottom:1px solid #454545;padding:2px 8px;pointer-events:auto";
@@ -899,8 +903,17 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
899
903
  var pickedFrame = "";
900
904
  var FRAME_ID = "__bullseye-workspace-frame";
901
905
  var HIDE_ID = "__bullseye-cover-hides-page";
906
+ var FRAMED_READY_MS = 8000;
907
+ var framedReadyTimer = 0;
902
908
  var watched = null;
903
909
  var workspaceSize = null;
910
+ // #4960 — the framed page's own word that it is up arrives the instant its scripts run; it cancels the wait that would otherwise put the window's own page back.
911
+ function framedUp() {
912
+ if (framedReadyTimer !== 0) {
913
+ window.clearTimeout(framedReadyTimer);
914
+ framedReadyTimer = 0;
915
+ }
916
+ }
904
917
  var pickerNavigate = function () {
905
918
  cover(pickedFrame);
906
919
  };
@@ -935,6 +948,7 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
935
948
  var frame = document.getElementById(FRAME_ID);
936
949
  var bar = document.getElementById("bullseye-workspace");
937
950
  if (url === "") {
951
+ framedUp();
938
952
  if (frame !== null) {
939
953
  frame.remove();
940
954
  document.documentElement.style.overflow = "";
@@ -955,7 +969,14 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
955
969
  frame.setAttribute("title", "The picked workspace, drawn by its service");
956
970
  document.body.appendChild(frame);
957
971
  }
958
- if (frame.getAttribute("src") !== src) frame.setAttribute("src", src);
972
+ if (frame.getAttribute("src") !== src) {
973
+ frame.setAttribute("src", src);
974
+ // #4960 — a frame that never comes up (its service down, or a page the service refuses) must not leave the body hidden over a blank: the framed page says it is up within this wait, or the window's own page comes back.
975
+ framedUp();
976
+ framedReadyTimer = window.setTimeout(function () { cover(""); }, FRAMED_READY_MS);
977
+ }
978
+ // #4960/#234 — belt and suspenders: a browser that does fire the frame's own load error puts the window's page back at once, alongside the framed page's own word above.
979
+ frame.onerror = function () { cover(""); };
959
980
  document.documentElement.style.overflow = "hidden";
960
981
  if (document.getElementById(HIDE_ID) === null) {
961
982
  var hide = document.createElement("style");
@@ -973,6 +994,10 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
973
994
  };
974
995
  window.addEventListener("message", function (event) {
975
996
  var reply = event.data;
997
+ if (reply?.type === "__bullseyeFramedReady") {
998
+ framedUp();
999
+ return;
1000
+ }
976
1001
  if (reply?.type === "__bullseyeWorkspaceRefresh" && api !== undefined) {
977
1002
  workspacePicker();
978
1003
  return;
@@ -39,6 +39,7 @@ export function listenForever(platform, sinks, intervalMs, running) {
39
39
  export async function pollForever(source, route, log, intervalMs, running) {
40
40
  let idleReason = "";
41
41
  let errors = 0;
42
+ let failure = "";
42
43
  while (running()) {
43
44
  try {
44
45
  const why = source.idleReason();
@@ -58,14 +59,19 @@ export async function pollForever(source, route, log, intervalMs, running) {
58
59
  if (errors > 0) {
59
60
  log("·", source.name, `recovered after ${errors} attempt(s)`);
60
61
  errors = 0;
62
+ failure = "";
61
63
  }
62
64
  await new Promise((r) => setTimeout(r, intervalMs));
63
65
  }
64
66
  catch (err) {
65
67
  errors++;
66
68
  const delay = Math.min(60_000, 2000 * Math.pow(2, Math.min(5, errors - 1)));
67
- // OWNER: the poll loop is the workflow's trigger root; a failed read is classified by its message, reported, and retried with backoff.
68
- log("·", `${source.name}:error`, `poll attempt ${errors} failed: ${err instanceof Error ? err.message : String(err)} — retrying in ${delay}ms`);
69
+ const why = err instanceof Error ? err.message : String(err);
70
+ // OWNER: the poll loop is the workflow's trigger root; a failed read is classified by its message, retried with backoff, and reported once per DISTINCT failure — a source that stays down on the same reason is one line, never one per attempt.
71
+ if (why !== failure) {
72
+ failure = why;
73
+ log("·", `${source.name}:error`, `poll failed: ${why} — retrying with backoff until it recovers`);
74
+ }
69
75
  await new Promise((r) => setTimeout(r, delay));
70
76
  }
71
77
  }
@@ -135,6 +135,7 @@ function servedWorkspace(page) {
135
135
  let picked;
136
136
  return {
137
137
  framed: true,
138
+ own: true,
138
139
  read: () => {
139
140
  if (picked !== undefined)
140
141
  return picked;
@@ -363,7 +364,8 @@ class MirroredWebview {
363
364
  search.sort();
364
365
  return search.toString() === wanted.toString();
365
366
  });
366
- const frame = this.workspace.framed !== true || selected === undefined || selected[0] === this.page.host.label ? "" : selected[1][this.page.name];
367
+ // #4960 — the own workspace is normally drawn locally, so it is not framed; a panel whose body IS the frame (`own`) frames it too, and then the served page is what he reads and presses in the window.
368
+ const frame = this.workspace.framed !== true || selected === undefined || (selected[0] === this.page.host.label && this.workspace.own !== true) ? "" : selected[1][this.page.name];
367
369
  return { extension: this.page.host.extension, current: selected === undefined ? "" : selected[0], workspaces, frame };
368
370
  }
369
371
  async workspaceRequest(message) {
@@ -118,6 +118,10 @@ const PICKER_SOURCE = String.raw `
118
118
  }
119
119
 
120
120
  var framedPage = new URLSearchParams(window.location.search).get("bullseye-framed") !== null;
121
+ // #4960 — a framed page tells the window that framed it that it is really up, the instant its own scripts run; the window keeps the frame only on that word, so a frame that never comes up (its service down, or a page the service refuses) leaves the window's own page in place, never a blank.
122
+ if (framedPage && window.parent !== window) {
123
+ window.parent.postMessage({ type: "__bullseyeFramedReady" }, "*");
124
+ }
121
125
  var workspaceRead = 0;
122
126
  var barColours = "background:#252526;color:#ccc";
123
127
  var workspaceBarStyle = "display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;align-items:center;box-sizing:border-box;min-height:24px;max-width:100%;overflow:hidden;font:12px system-ui,sans-serif;" + barColours + ";border-bottom:1px solid #454545;padding:2px 8px;pointer-events:auto";
@@ -899,8 +903,17 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
899
903
  var pickedFrame = "";
900
904
  var FRAME_ID = "__bullseye-workspace-frame";
901
905
  var HIDE_ID = "__bullseye-cover-hides-page";
906
+ var FRAMED_READY_MS = 8000;
907
+ var framedReadyTimer = 0;
902
908
  var watched = null;
903
909
  var workspaceSize = null;
910
+ // #4960 — the framed page's own word that it is up arrives the instant its scripts run; it cancels the wait that would otherwise put the window's own page back.
911
+ function framedUp() {
912
+ if (framedReadyTimer !== 0) {
913
+ window.clearTimeout(framedReadyTimer);
914
+ framedReadyTimer = 0;
915
+ }
916
+ }
904
917
  var pickerNavigate = function () {
905
918
  cover(pickedFrame);
906
919
  };
@@ -935,6 +948,7 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
935
948
  var frame = document.getElementById(FRAME_ID);
936
949
  var bar = document.getElementById("bullseye-workspace");
937
950
  if (url === "") {
951
+ framedUp();
938
952
  if (frame !== null) {
939
953
  frame.remove();
940
954
  document.documentElement.style.overflow = "";
@@ -955,7 +969,14 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
955
969
  frame.setAttribute("title", "The picked workspace, drawn by its service");
956
970
  document.body.appendChild(frame);
957
971
  }
958
- if (frame.getAttribute("src") !== src) frame.setAttribute("src", src);
972
+ if (frame.getAttribute("src") !== src) {
973
+ frame.setAttribute("src", src);
974
+ // #4960 — a frame that never comes up (its service down, or a page the service refuses) must not leave the body hidden over a blank: the framed page says it is up within this wait, or the window's own page comes back.
975
+ framedUp();
976
+ framedReadyTimer = window.setTimeout(function () { cover(""); }, FRAMED_READY_MS);
977
+ }
978
+ // #4960/#234 — belt and suspenders: a browser that does fire the frame's own load error puts the window's page back at once, alongside the framed page's own word above.
979
+ frame.onerror = function () { cover(""); };
959
980
  document.documentElement.style.overflow = "hidden";
960
981
  if (document.getElementById(HIDE_ID) === null) {
961
982
  var hide = document.createElement("style");
@@ -973,6 +994,10 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
973
994
  };
974
995
  window.addEventListener("message", function (event) {
975
996
  var reply = event.data;
997
+ if (reply?.type === "__bullseyeFramedReady") {
998
+ framedUp();
999
+ return;
1000
+ }
976
1001
  if (reply?.type === "__bullseyeWorkspaceRefresh" && api !== undefined) {
977
1002
  workspacePicker();
978
1003
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.498",
3
+ "version": "1.3.500",
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",