omni-notify-mcp 1.3.295 → 1.3.297

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.
Files changed (2) hide show
  1. package/dist/notify.js +4 -3
  2. package/package.json +1 -1
package/dist/notify.js CHANGED
@@ -12,7 +12,6 @@
12
12
  */
13
13
  import { randomUUID, createHash } from "crypto";
14
14
  import { createServer as createNetServer } from "net";
15
- import { Server as HttpServer } from "http";
16
15
  import { readFileSync, writeFileSync, existsSync, mkdirSync, readdirSync, statSync, unlinkSync, renameSync, watch } from "fs";
17
16
  import { homedir, networkInterfaces, hostname, tmpdir } from "os";
18
17
  import { join, basename, dirname } from "path";
@@ -2537,6 +2536,7 @@ let lastOtherBn = "";
2537
2536
  let lastProbeFailure = "";
2538
2537
  let ownershipAttempting = false;
2539
2538
  let door;
2539
+ const doorConnections = new Set();
2540
2540
  let supersededSaid = false;
2541
2541
  /**
2542
2542
  * Once the extension installs a newer build, this process is superseded and the gateway passes to the installed build:
@@ -2593,6 +2593,7 @@ function tryOwnGateway(polling, host) {
2593
2593
  }
2594
2594
  lastOtherBn = "";
2595
2595
  door = await bindGatewayPort();
2596
+ door.on("connection", (socket) => { doorConnections.add(socket); socket.once("close", () => doorConnections.delete(socket)); });
2596
2597
  const owned = readGatewaySettings();
2597
2598
  if (owned)
2598
2599
  host.onDoorOwned?.(owned.port);
@@ -2625,8 +2626,8 @@ async function stepAside(polling, host) {
2625
2626
  door = undefined;
2626
2627
  await new Promise((resolve, reject) => {
2627
2628
  held.close((err) => (err ? reject(err) : resolve()));
2628
- if (held instanceof HttpServer)
2629
- held.closeAllConnections();
2629
+ for (const socket of doorConnections)
2630
+ socket.destroy();
2630
2631
  });
2631
2632
  log("·", "listener", `this process (pid ${process.pid}, build ${PACKAGE_VERSION}) handed the gateway over to the installed build`);
2632
2633
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.295",
3
+ "version": "1.3.297",
4
4
  "description": "Reach your AI agents from anywhere — and let them reach you. One stdio process 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/index.js",
6
6
  "type": "module",