omni-notify-mcp 1.3.327 → 1.3.328

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
@@ -13,7 +13,7 @@ import { spawn } from "child_process";
13
13
  import { existsSync, readFileSync, renameSync, writeFileSync, mkdirSync } from "fs";
14
14
  import { join } from "path";
15
15
  import { fileURLToPath } from "url";
16
- import { DAEMON_BEAT_PATH, CONFIG_DIR, PACKAGE_VERSION, startNotifyServer, yieldGateway } from "./notify.js";
16
+ import { DAEMON_BEAT_PATH, CONFIG_DIR, DAEMON_TAG, PACKAGE_VERSION, startNotifyServer, yieldGateway } from "./notify.js";
17
17
  import { startNotifyDoor } from "./gateway/notifyDoor.js";
18
18
  import { announceTakeover, inThisBoot } from "./shared/webhost/originHandover.js";
19
19
  import { TunnelRunner } from "./gateway/tunnel.js";
@@ -113,7 +113,7 @@ let handedOver;
113
113
  // Only the daemon that owns the gateway port runs the connector and publishes its state: a dormant one has nothing for it to reach.
114
114
  const tunnel = new TunnelRunner();
115
115
  startNotifyServer({
116
- clientId: "always-on", tag: "always-on", queueOnly: true, emit: async () => { },
116
+ clientId: DAEMON_TAG, tag: DAEMON_TAG, queueOnly: true, emit: async () => { },
117
117
  onDoorOwned: (port) => {
118
118
  tunnel.beat(port);
119
119
  setInterval(() => tunnel.beat(port), HEARTBEAT_MS);
package/dist/notify.js CHANGED
@@ -681,6 +681,9 @@ function takeWaitersFor(entryTag) {
681
681
  // because the channel push is unacknowledged and Claude Code drops it silently.
682
682
  const inboxDeliveredTo = new Map();
683
683
  const deliveredKey = (tag) => tag ?? "*";
684
+ export const DAEMON_TAG = "daemon";
685
+ const OLD_DAEMON_TAG = "always-on";
686
+ const readerKeys = (tag) => (tag === DAEMON_TAG ? [deliveredKey(tag), OLD_DAEMON_TAG] : [deliveredKey(tag)]);
684
687
  const entryKey = (entry) => `${entry.ts}\u0000${entry.tag ?? ""}\u0000${entry.text}`;
685
688
  function alreadyDelivered(entry, tag) {
686
689
  return inboxDeliveredTo.get(entryKey(entry))?.has(deliveredKey(tag)) ?? false;
@@ -740,7 +743,7 @@ function restoreInboxQueue() {
740
743
  function takeSharedEntriesForSelf(saved) {
741
744
  const mine = [];
742
745
  for (const { deliveredTo, ...entry } of saved) {
743
- if (deliveredTo.includes(deliveredKey(SELF_TAG)) || alreadyDelivered(entry, SELF_TAG))
746
+ if (readerKeys(SELF_TAG).some((key) => deliveredTo.includes(key)) || alreadyDelivered(entry, SELF_TAG))
744
747
  continue;
745
748
  // The daemon is the machine's queue: it holds every chat's undelivered entry in memory, tagged ones
746
749
  // included, because the HTTP chats it serves are the only readers of a tagged entry and each drains its own by
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.327",
3
+ "version": "1.3.328",
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",