omni-notify-mcp 1.3.491 → 1.3.492

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/daemon.js CHANGED
@@ -140,6 +140,8 @@ let handedOver;
140
140
  const tunnel = new TunnelRunner();
141
141
  const daemonHost = {
142
142
  clientId: DAEMON_TAG, tag: DAEMON_TAG,
143
+ bindDoor: async (settings) => (await import("./gateway/restDoor.js")).startRestDoor(settings),
144
+ findOtherOwner: async (port) => (await import("./gateway/lanProbe.js")).findOtherBn(port),
143
145
  onDoorOwned: (port) => {
144
146
  // #4231 — BN holds no agent CLI: the cluster keeps every chat CLI and its background subagents (#4814), so a BN release never waits on one.
145
147
  tunnel.beat(port, undefined);
package/dist/notify.js CHANGED
@@ -3891,10 +3891,10 @@ function listenBare(port) {
3891
3891
  bare.listen(port, "127.0.0.1", () => resolve(bare));
3892
3892
  });
3893
3893
  }
3894
- async function bindGatewayPort() {
3894
+ async function bindGatewayPort(host) {
3895
3895
  const settings = readGatewaySettings();
3896
3896
  if (settings)
3897
- return (await import("./gateway/restDoor.js")).startRestDoor(settings);
3897
+ return host.bindDoor(settings);
3898
3898
  for (let attempt = 0;; attempt++) {
3899
3899
  try {
3900
3900
  return await listenBare(ownershipPortWithoutDoor(attempt));
@@ -3983,10 +3983,9 @@ function tryOwnGateway(polling, host) {
3983
3983
  ownershipAttempting = true;
3984
3984
  (async () => {
3985
3985
  const port = settings?.port ?? DEFAULT_GATEWAY_PORT;
3986
- const { findOtherBn } = await import("./gateway/lanProbe.js");
3987
3986
  let other;
3988
3987
  try {
3989
- other = await findOtherBn(port);
3988
+ other = await host.findOtherOwner(port);
3990
3989
  }
3991
3990
  catch (err) {
3992
3991
  // OWNER: the probe failed for a reason that is neither "refused" nor "silent" (an unreadable ssh config, say); it is logged as that and the process stays dormant until the next tick reads again.
@@ -4003,7 +4002,7 @@ function tryOwnGateway(polling, host) {
4003
4002
  return;
4004
4003
  }
4005
4004
  lastOtherBn = "";
4006
- door = await bindGatewayPort();
4005
+ door = await bindGatewayPort(host);
4007
4006
  door.on("connection", (socket) => { doorConnections.add(socket); socket.once("close", () => doorConnections.delete(socket)); });
4008
4007
  const owned = readGatewaySettings();
4009
4008
  if (owned)
@@ -6,7 +6,7 @@ const os = require("os");
6
6
  const path = require("path");
7
7
  const zlib = require("zlib");
8
8
  const { CONNECTION_SOURCE, SHIM_SOURCE, NATIVE_PICKER_SOURCE } = require("./webviewShim");
9
- const { workspacesHere } = require("./workspaceList");
9
+ const { workspacesHere, byWorkspaceOrder } = require("./workspaceList");
10
10
  const WS_GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
11
11
  const TOKEN_PARAMETER = "bullseye-token";
12
12
  const PHONE_VIEWPORT = `<meta name="viewport" content="width=device-width, initial-scale=1">`;
@@ -353,7 +353,7 @@ class MirroredWebview {
353
353
  workspaceReading() {
354
354
  // NULL-OK: field workspace.workspaces is OPTIONAL and therefore it is ok to check for NULL
355
355
  const listed = this.workspace.workspaces === undefined ? this.page.host.workspaces() : this.workspace.workspaces();
356
- const workspaces = Object.fromEntries([...listed].sort(([a], [b]) => a.localeCompare(b)));
356
+ const workspaces = Object.fromEntries([...listed].sort(([a], [b]) => byWorkspaceOrder(a, b)));
357
357
  const wanted = new URLSearchParams(this.workspace.read());
358
358
  wanted.sort();
359
359
  const selected = Object.entries(workspaces).find(([, pages]) => {
@@ -918,7 +918,7 @@ class WebHost {
918
918
  let workspaces;
919
919
  let current;
920
920
  try {
921
- workspaces = Object.fromEntries([...this.workspaces(base)].sort(([a], [b]) => a.localeCompare(b)));
921
+ workspaces = Object.fromEntries([...this.workspaces(base)].sort(([a], [b]) => byWorkspaceOrder(a, b)));
922
922
  // NULL-OK: field at is OPTIONAL and therefore it is ok to check for NULL
923
923
  current = this.currentOf(new URLSearchParams(url.searchParams.get("at") ?? ""));
924
924
  }
@@ -1260,32 +1260,32 @@ function indexPage(host, base) {
1260
1260
  const rows = [...host.pages.values()]
1261
1261
  .map((page) => `<li><a href="${escapeAttribute(base === undefined ? page.url : `${base}/${encodeURIComponent(page.name)}/${page.search}`)}">${page.live ? "🟢" : "⚪"} ${escapeAttribute(page.title)}</a></li>`)
1262
1262
  .join("");
1263
- return `<!DOCTYPE html><html><head><meta charset="utf-8">${PHONE_VIEWPORT}<title>${escapeAttribute(host.extension)}</title></head>
1263
+ return `<!DOCTYPE html><html><head><meta charset="utf-8">${PHONE_VIEWPORT}<title>${escapeAttribute(host.extension)}</title></head>
1264
1264
  <body style="font:14px system-ui,sans-serif;padding:24px;background:#1e1e1e;color:#ccc"><div>${escapeAttribute(host.extension)} · ${escapeAttribute(host.label)}</div><ul>${rows}</ul></body></html>`;
1265
1265
  }
1266
1266
  function closedPage(extension, page) {
1267
- return `<!DOCTYPE html><html><head><meta charset="utf-8">${PHONE_VIEWPORT}<title>${escapeAttribute(extension)} · ${escapeAttribute(page.title)}</title></head>
1268
- <body style="font:14px system-ui,sans-serif;padding:24px;background:#1e1e1e;color:#ccc">⚪ ${escapeAttribute(page.title)} is not open in VS Code right now, so there is nothing to show here — this page loads it the moment it opens.<div id="said" style="margin-top:8px"></div>
1269
- <script>${CONNECTION_SOURCE}</script><script>(function () {
1270
- var WHAT = "this page's live connection to its host";
1271
- var kept = window.bullseyeConnection.keep({
1272
- what: WHAT, path: "/__bullseye/health",
1273
- open: function () { return new WebSocket((location.protocol === "https:" ? "wss:" : "ws:") + "//" + location.host + "/__bullseye/ws?page=${encodeURIComponent(page.name)}"); },
1274
- attach: function (connect, later) {
1275
- fetch("/__bullseye/health", { cache: "no-store", signal: AbortSignal.timeout(8000) }).then(function (r) {
1276
- if (r.ok) connect(); else if (r.status === 401) window.bullseyeConnection.signInAgain(); else later();
1277
- }, later);
1278
- },
1279
- opened: function () {
1280
- document.getElementById("said").textContent = "";
1281
- fetch("/__bullseye/health", { cache: "no-store" }).then(function (r) { return r.json(); }).then(function (health) { if (health.pages[${JSON.stringify(page.name)}].live) location.reload(); }, function (error) { console.warn("[Bullseye connection] Page availability unread: " + error.message); });
1282
- },
1283
- message: function (socket, event) { if (JSON.parse(String(event.data)).type === "reload") location.reload(); },
1284
- down: function () { document.getElementById("said").textContent = "⏳ Reconnecting"; },
1285
- closed: function () { return false; },
1286
- ping: function (socket) { socket.send('{"type":"ping"}'); }
1287
- });
1288
- kept.connect();
1267
+ return `<!DOCTYPE html><html><head><meta charset="utf-8">${PHONE_VIEWPORT}<title>${escapeAttribute(extension)} · ${escapeAttribute(page.title)}</title></head>
1268
+ <body style="font:14px system-ui,sans-serif;padding:24px;background:#1e1e1e;color:#ccc">⚪ ${escapeAttribute(page.title)} is not open in VS Code right now, so there is nothing to show here — this page loads it the moment it opens.<div id="said" style="margin-top:8px"></div>
1269
+ <script>${CONNECTION_SOURCE}</script><script>(function () {
1270
+ var WHAT = "this page's live connection to its host";
1271
+ var kept = window.bullseyeConnection.keep({
1272
+ what: WHAT, path: "/__bullseye/health",
1273
+ open: function () { return new WebSocket((location.protocol === "https:" ? "wss:" : "ws:") + "//" + location.host + "/__bullseye/ws?page=${encodeURIComponent(page.name)}"); },
1274
+ attach: function (connect, later) {
1275
+ fetch("/__bullseye/health", { cache: "no-store", signal: AbortSignal.timeout(8000) }).then(function (r) {
1276
+ if (r.ok) connect(); else if (r.status === 401) window.bullseyeConnection.signInAgain(); else later();
1277
+ }, later);
1278
+ },
1279
+ opened: function () {
1280
+ document.getElementById("said").textContent = "";
1281
+ fetch("/__bullseye/health", { cache: "no-store" }).then(function (r) { return r.json(); }).then(function (health) { if (health.pages[${JSON.stringify(page.name)}].live) location.reload(); }, function (error) { console.warn("[Bullseye connection] Page availability unread: " + error.message); });
1282
+ },
1283
+ message: function (socket, event) { if (JSON.parse(String(event.data)).type === "reload") location.reload(); },
1284
+ down: function () { document.getElementById("said").textContent = "⏳ Reconnecting"; },
1285
+ closed: function () { return false; },
1286
+ ping: function (socket) { socket.send('{"type":"ping"}'); }
1287
+ });
1288
+ kept.connect();
1289
1289
  })();</script></body></html>`;
1290
1290
  }
1291
1291
  function codeDefect(err) {
@@ -135,9 +135,22 @@ function readListed(file) {
135
135
  return { label: present ? labelOf(root) : path.basename(root), root, path: entry.path, present };
136
136
  });
137
137
  }
138
- /** @returns {{ label: string, root: string }[]} The named workspaces available on this machine. */
138
+ /** #4934 — the order every workspace picker lists: All first, then AlphaWave, then BullseyeVSC, any other workspace by name, and BullseyeShared last. */
139
+ function workspaceRank(label) {
140
+ if (label.startsWith("🌐"))
141
+ return 0;
142
+ if (label.startsWith("AlphaWave"))
143
+ return 1;
144
+ if (label.startsWith("BullseyeVSC"))
145
+ return 2;
146
+ return label.startsWith("BullseyeShared") ? 4 : 3;
147
+ }
148
+ function byWorkspaceOrder(a, b) {
149
+ return workspaceRank(a) - workspaceRank(b) || a.localeCompare(b);
150
+ }
151
+ /** @returns {{ label: string, root: string }[]} The named workspaces available on this machine, in the order every picker and the All view list them. */
139
152
  function workspacesHere() {
140
- return listedWorkspaces().filter((w) => w.present).map(({ label, root }) => ({ label, root }));
153
+ return listedWorkspaces().filter((w) => w.present).map(({ label, root }) => ({ label, root })).sort((a, b) => byWorkspaceOrder(a.label, b.label));
141
154
  }
142
155
  /** The list a Save is made from, as its bytes on disk: their sha256, or "undefined" when no list is defined. A file that is there but cannot be read THROWS, so no Save can be made from it unseen. */
143
156
  function listBase() {
@@ -835,4 +848,4 @@ function setRemoteHost(typed, enabled) {
835
848
  delete workspaceTurn().remoteHostChoices;
836
849
  return name;
837
850
  }
838
- module.exports = { vscRoot, workspacesFile, publishWorkspaces, WorkspacesUndefined, listedWorkspaces, workspacesHere, listBase, saveWorkspaces, sameRoot, SettingsUndefined, SettingsMoved, SettingsLocked, WorkspaceNotListed, settingsFile, readSettings, savedSettings, AutoStartUnread, savedAutoStart, writeAutoStart, autoStartOnAt, autoStartOff, toolHome, settingsBase, writeSettings, setSettings, publishSettings, alive, sshHostAliases, remoteHostsFile, remoteHostChoices, remoteHosts, setRemoteHost };
851
+ module.exports = { byWorkspaceOrder, vscRoot, workspacesFile, publishWorkspaces, WorkspacesUndefined, listedWorkspaces, workspacesHere, listBase, saveWorkspaces, sameRoot, SettingsUndefined, SettingsMoved, SettingsLocked, WorkspaceNotListed, settingsFile, readSettings, savedSettings, AutoStartUnread, savedAutoStart, writeAutoStart, autoStartOnAt, autoStartOff, toolHome, settingsBase, writeSettings, setSettings, publishSettings, alive, sshHostAliases, remoteHostsFile, remoteHostChoices, remoteHosts, setRemoteHost };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.491",
3
+ "version": "1.3.492",
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",