omni-notify-mcp 1.3.337 → 1.3.339

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/README.md CHANGED
@@ -46,16 +46,15 @@ Beyond notifications, BullseyeNotify runs a full interactive agent CLI on your m
46
46
  `omni-notify-mcp` **is** the notification server. In the shipped VS Code extension one
47
47
  copy of it runs at login and serves a single door on loopback
48
48
  (`http://127.0.0.1:7475/mcp`); Claude Code and VS Code / Copilot Chat are pointed at
49
- that door, so neither spawns a child per session. The same source is also a plain stdio
50
- server for anything that can only spawn one:
49
+ that door, so neither spawns a child per session. That door is the only way in — there
50
+ is no stdio mode. Started by hand with no argument, the server serves the same door:
51
51
 
52
52
  ```bash
53
- node dist/index.js # the stdio entry; a stdio host spawns this and holds its pipe
53
+ node dist/daemon.js # serves http://127.0.0.1:7475/mcp
54
54
  ```
55
55
 
56
56
  The config is a plain file (below), and the editor-side panel that edits it lives in
57
- the VS Code extension. A stdio host's copy exits when its host goes away; the resident
58
- process the extension starts does not — it belongs to no window and outlives them all.
57
+ the VS Code extension. The resident process belongs to no window and outlives them all.
59
58
 
60
59
  > **Build note.** `package.json` is deliberately tracked here (see `.gitignore`), so
61
60
  > `bin`, `main` and the build scripts are all in git. The published package declares
@@ -82,16 +81,6 @@ serves:
82
81
  }
83
82
  ```
84
83
 
85
- A host that can only spawn a stdio server takes the mirrored bundle instead, starting
86
- its own child per session:
87
-
88
- ```json
89
- {
90
- "mcpServers": {
91
- "notify": { "type": "stdio", "command": "node", "args": ["<globalStorage>/dist/index.mjs"] }
92
- }
93
- }
94
- ```
95
84
 
96
85
  ## MCP wiring
97
86
 
@@ -104,10 +93,10 @@ window start so a machine registered by an older release converges on its own:
104
93
  | **VS Code / GitHub Copilot Chat** | the extension's `contributes.mcpServerDefinitionProviders` **and** the workspace's `.vscode/mcp.json` | `servers.notify` |
105
94
 
106
95
  Both point at the door the copy bundled inside the extension serves. Any other host is
107
- wired by hand, with either entry from *Quick start* — for **Codex** that is
108
- `~/.codex/config.toml` under `[mcp_servers.notify]`, `command`/`args` naming the mirrored
109
- bundle. A `notify` entry that differs from ours is yours and is left untouched; a build
110
- that bundled no server registers nothing and says so.
96
+ wired by hand to that same door — for **Codex** that is `~/.codex/config.toml` under
97
+ `[mcp_servers.notify]`, `url = "http://127.0.0.1:7475/mcp"`. A host that can only spawn
98
+ a stdio server cannot reach notify. A `notify` entry that differs from ours is yours and
99
+ is left untouched; a build that bundled no server registers nothing and says so.
111
100
 
112
101
  ## Tools
113
102
 
package/dist/daemon.js CHANGED
@@ -2,27 +2,25 @@
2
2
  /**
3
3
  * notify's daemon — the one process per machine, started by the boot supervisor.
4
4
  *
5
- * It runs the same server code as the stdio bridge (`startNotifyServer`) with no MCP client attached, so it
6
- * competes for the gateway port like every other BN process, and the one that binds it polls the channels,
7
- * serves the REST/MCP door and runs the agent conversations whether or not any agent session is open. Everything it hears lands in the shared inbox
8
- * files under the config dir, which every bridge already reads: nothing is held only in its memory, so a
9
- * restart of this process loses no message. The stdio bridge keeps working with this process up or down.
10
- * It also binds the chat-tool door (127.0.0.1:7475), so it is what an HTTP-attached chat talks to.
5
+ * It is the only mode BN runs in: started with no argument it serves the chat-tool door on 127.0.0.1:7475, which every
6
+ * MCP host is pointed at. It runs the server code (`startNotifyServer`) with no MCP client attached, so it competes for
7
+ * the gateway port like every other BN process, and the one that binds it polls the channels, serves the REST/MCP door
8
+ * and runs the agent conversations whether or not any agent session is open. Everything it hears lands in the shared
9
+ * inbox files under the config dir: nothing is held only in its memory, so a restart of this process loses no message.
11
10
  */
12
11
  import { spawn } from "child_process";
13
- import { existsSync, readFileSync, renameSync, writeFileSync, mkdirSync } from "fs";
12
+ import { existsSync, readFileSync, mkdirSync } from "fs";
14
13
  import { join } from "path";
15
14
  import { fileURLToPath } from "url";
16
15
  import { DAEMON_BEAT_PATH, CONFIG_DIR, DAEMON_TAG, PACKAGE_VERSION, startNotifyServer, takePendingInbox, yieldGateway } from "./notify.js";
17
16
  import { startNotifyDoor } from "./gateway/notifyDoor.js";
17
+ import { writeRecordFile } from "./gateway/conversations.js";
18
18
  import { announceTakeover, inThisBoot } from "./shared/webhost/originHandover.js";
19
19
  import { TunnelRunner } from "./gateway/tunnel.js";
20
20
  const HEARTBEAT_MS = 10_000;
21
21
  function beat(pid = process.pid) {
22
22
  mkdirSync(CONFIG_DIR, { recursive: true });
23
- const staged = `${DAEMON_BEAT_PATH}.${process.pid}.tmp`;
24
- writeFileSync(staged, JSON.stringify({ pid, at: Date.now(), version: PACKAGE_VERSION }));
25
- renameSync(staged, DAEMON_BEAT_PATH);
23
+ writeRecordFile(DAEMON_BEAT_PATH, JSON.stringify({ pid, at: Date.now(), version: PACKAGE_VERSION }));
26
24
  }
27
25
  /** The boot supervisor's login entry: launchd's label and systemd's unit. */
28
26
  const ENTRY_LABEL = "com.bullseye.BullseyeMcpOrigins";
@@ -91,7 +89,7 @@ if (stoppedByHand()) {
91
89
  const takeover = process.argv.includes("--takeover");
92
90
  /** Whether this process writes the heartbeat: the next release only from the moment it holds the chat door, so a takeover that never lands leaves the serving build's beat alone; and a build that let the door go no longer, so the release that took it is the one beat. */
93
91
  let beating = !takeover;
94
- // The server's own timers are unref'd because a bridge lives as long as its stdin; this process lives until it is stopped.
92
+ // The server's own timers are unref'd, so this beat and the door hold the process until it is stopped.
95
93
  if (beating)
96
94
  beat();
97
95
  /** Each tick reads the Stop first, beating or not: a press in a window that may not end this process — the boot task's, in session 0, or one still draining its gateway after a hand-over — stops it all the same, within one tick. */
@@ -103,7 +103,7 @@ function dropStaged(staged) {
103
103
  const code = err.code ?? "";
104
104
  if (!RENAME_REFUSED.has(code))
105
105
  throw err;
106
- process.stderr.write(`[agent-gateway] the staged record ${staged} could not be removed (${code}) — this process's next write of it replaces the file\n`);
106
+ process.stderr.write(`[store] the staged file ${staged} could not be removed (${code}) — this process's next write of it replaces the file\n`);
107
107
  }
108
108
  }
109
109
  /**
@@ -116,7 +116,7 @@ function dropStaged(staged) {
116
116
  function writeMeta(meta) {
117
117
  writeRecordFile(metaPath(meta.id), JSON.stringify(meta, null, 2));
118
118
  }
119
- /** Writes one store file of the agent dir the way a record is written: staged beside itself and renamed over the old one, a refused rename tried again. */
119
+ /** Writes one store file — an agent-dir record, or the daemon's heartbeat in the config dir — the way a record is written: staged beside itself and renamed over the old one, a refused rename tried again. */
120
120
  export function writeRecordFile(final, text) {
121
121
  const staged = `${final}.${process.pid}.tmp`;
122
122
  for (let attempt = 0;; attempt++) {
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.337",
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
- "main": "dist/index.js",
3
+ "version": "1.3.339",
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
+ "main": "dist/daemon.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "omni-notify-mcp": "dist/index.js"
8
+ "omni-notify-mcp": "dist/daemon.js"
9
9
  },
10
10
  "license": "MIT",
11
11
  "engines": {
@@ -16,7 +16,7 @@
16
16
  "prebuild": "npm run sync-shared",
17
17
  "build": "tsc && node -e \"require('fs').copyFileSync('src/shared/webhost/package.json','dist/shared/webhost/package.json')\"",
18
18
  "build:extension": "node vscode-extension/esbuild.js",
19
- "start": "node dist/index.js",
19
+ "start": "node dist/daemon.js",
20
20
  "test": "npm run build && npm run build:extension && node tests/run-tests.js",
21
21
  "test:files": "node tests/run-tests.js"
22
22
  },