omni-notify-mcp 1.3.492 → 1.3.494

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.
@@ -14,7 +14,7 @@ import { homedir } from "os";
14
14
  import { join } from "path";
15
15
  import { setTimeout as delay } from "node:timers/promises";
16
16
  import { choicesOf, StreamedReply } from "./messaging/messenger.js";
17
- import { GatewayError, readGatewaySettings } from "./notify.js";
17
+ import { GatewayError, readGatewaySettings } from "./gatewaySettings.js";
18
18
  import { toolLine } from "./shared/toolLine.js";
19
19
  export const AGENT_PREFIX = "!";
20
20
  /** The key of Meni's direct-message chat with the bot on Slack (#4453): one conversation, as his Telegram chat is; a Slack channel thread keeps its own. */
package/dist/daemon.js CHANGED
@@ -12,7 +12,7 @@ import { spawn } from "child_process";
12
12
  import { createWriteStream, existsSync, readFileSync, mkdirSync, renameSync } from "fs";
13
13
  import { join } from "path";
14
14
  import { fileURLToPath } from "url";
15
- import { DAEMON_BEAT_PATH, CONFIG_DIR, DAEMON_TAG, PACKAGE_VERSION, startNotifyServer, takePendingInbox, writeRecordFile, yieldGateway } from "./notify.js";
15
+ import { DAEMON_BEAT_PATH, CONFIG_DIR, DAEMON_TAG, PACKAGE_VERSION, smsReachesOwner, startNotifyServer, takePendingInbox, textOwner, writeRecordFile, yieldGateway } from "./notify.js";
16
16
  import { startNotifyDoor } from "./gateway/notifyDoor.js";
17
17
  import { announceTakeover, inThisBoot } from "./shared/webhost/originHandover.js";
18
18
  import { TunnelRunner } from "./gateway/tunnel.js";
@@ -140,7 +140,11 @@ 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),
143
+ bindDoor: async (settings) => {
144
+ // #4247 — the sign-in doors text Meni's code through notify, handed in here so passkeyDoor imports no notification code.
145
+ (await import("./gateway/passkeyDoor.js")).setOwnerTexter({ reaches: smsReachesOwner, text: textOwner });
146
+ return (await import("./gateway/restDoor.js")).startRestDoor(settings);
147
+ },
144
148
  findOtherOwner: async (port) => (await import("./gateway/lanProbe.js")).findOtherBn(port),
145
149
  onDoorOwned: (port) => {
146
150
  // #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.
@@ -1,4 +1,4 @@
1
- import { PACKAGE_VERSION } from "../notify.js";
1
+ import { PACKAGE_VERSION } from "../gatewaySettings.js";
2
2
  import { ICON_HEAD } from "./iconDoor.js";
3
3
  import { PASSKEY_SCRIPT } from "./passkeyDoor.js";
4
4
  import { PROOF_WAYS } from "./passkeyClient.js";
@@ -6,7 +6,7 @@ import { homedir } from "os";
6
6
  import { dirname, join } from "path";
7
7
  import { fileURLToPath } from "url";
8
8
  import { extensionModule, extensionModulePath } from "./extensionModule.js";
9
- import { CONFIG_DIR, GatewayError } from "../notify.js";
9
+ import { CONFIG_DIR, GatewayError } from "../gatewaySettings.js";
10
10
  const HERE = dirname(fileURLToPath(import.meta.url));
11
11
  const RUNS = join(CONFIG_DIR, "gateway", "installs");
12
12
  const RUN_ID = /^[0-9a-f-]{36}$/;
@@ -1,7 +1,7 @@
1
1
  import { createHash, createHmac, timingSafeEqual } from "crypto";
2
2
  import { existsSync, readFileSync, renameSync, writeFileSync } from "fs";
3
3
  import { join } from "path";
4
- import { CONFIG_DIR, GatewayError } from "../notify.js";
4
+ import { CONFIG_DIR, GatewayError } from "../gatewaySettings.js";
5
5
  import { ICON_HEAD, logoUri } from "./iconDoor.js";
6
6
  import { HOST_RE, LOOPBACK_HOSTS, PASSKEY_SCRIPT, approvalStands, digest, doorState, escapeHtml, mint, fromThisMachine, sessionApproval, tokenProves, tokenStands } from "./passkeyDoor.js";
7
7
  export const MCP_PATH = "/mcp";
@@ -7,7 +7,8 @@
7
7
  import { createHash } from "crypto";
8
8
  import { existsSync, mkdirSync, readFileSync } from "fs";
9
9
  import { dirname, join } from "path";
10
- import { CHAT_PROVIDERS, CONFIG_DIR, GatewayError, deliveryReport, isDndActive, writeRecordFile } from "../notify.js";
10
+ import { CHAT_PROVIDERS, deliveryReport, isDndActive } from "../notify.js";
11
+ import { CONFIG_DIR, GatewayError, writeRecordFile } from "../gatewaySettings.js";
11
12
  import { clusterCall } from "../agentGateway.js";
12
13
  import { MESSENGER_SETUPS } from "../messaging/setup.js";
13
14
  import { extensionModule } from "./extensionModule.js";
@@ -4,7 +4,7 @@
4
4
  * to one (`POST /v1/settings`, `POST /v1/conversation-switch`, `POST /v1/public-access/<step>`). The VS Code panel frames
5
5
  * these very pages, so the panel and a browser with every editor closed show the same thing from the same service.
6
6
  */
7
- import { PACKAGE_HOMEPAGE } from "../notify.js";
7
+ import { PACKAGE_HOMEPAGE } from "../gatewaySettings.js";
8
8
  import { NOTICE_SCRIPT, PAGE_STYLE } from "./chatPage.js";
9
9
  import { ICON_HEAD } from "./iconDoor.js";
10
10
  import { CONNECTION_SOURCE, PICKER_PAGE_SOURCE } from "../shared/webhost/webviewShim.js";
@@ -6,7 +6,7 @@ import { hostname, uptime } from "os";
6
6
  import { join } from "path";
7
7
  import { generateAuthenticationOptions, generateRegistrationOptions, verifyAuthenticationResponse, verifyRegistrationResponse } from "@simplewebauthn/server";
8
8
  import QRCode from "qrcode";
9
- import { CONFIG_DIR, GatewayError, readGatewaySettings, smsReachesOwner, textOwner } from "../notify.js";
9
+ import { CONFIG_DIR, GatewayError, readGatewaySettings } from "../gatewaySettings.js";
10
10
  import { ICON_HEAD } from "./iconDoor.js";
11
11
  const PASSKEY_PREFIX = "/passkey/";
12
12
  const ENROL_PATH = "/passkey/enrol";
@@ -53,6 +53,20 @@ export function ownerRegistry() {
53
53
  return { origins: names.filter((name) => !outside.includes(name)).map((name) => `https://${name}`), rpID, outside };
54
54
  }
55
55
  const OWNER_RP_NAME = "Bullseye";
56
+ let noTexterSaid = false;
57
+ /** No sender handed in: SMS reaches nobody, said ONCE on stderr so a gateway older than setOwnerTexter shows in its log instead of only as a lost SMS sign-in. */
58
+ const NO_TEXTER = {
59
+ reaches: () => {
60
+ if (!noTexterSaid)
61
+ process.stderr.write("[agent-gateway] this process handed the sign-in door no SMS sender (setOwnerTexter), so no code can be texted and SMS sign-ins do not stand; a gateway older than passkeyDoor's setOwnerTexter must be redeployed\n");
62
+ noTexterSaid = true;
63
+ return false;
64
+ },
65
+ text: async () => { throw new Error("this process gave the sign-in door no SMS sender"); },
66
+ };
67
+ let ownerTexter = NO_TEXTER;
68
+ /** Every door in this process texts through the sender its booting process hands in here. */
69
+ export function setOwnerTexter(texter) { ownerTexter = texter; }
56
70
  // GATE: a lock file nobody can read as a lock (half written, damaged) is taken over once it is this old; a readable lock is only ever taken from a holder that is gone.
57
71
  const OWNER_LOCK_UNREADABLE_MS = 30_000;
58
72
  // GATE: a change to a file the doors share (the owner registry, a door's session store) waits this long for another process's change to finish, then answers 409 and changes nothing.
@@ -420,7 +434,7 @@ export function createSignInDoor({ storeFile, product, short, home, host: doorHo
420
434
  if (legacyRetired(store))
421
435
  return false;
422
436
  if (approval === SMS)
423
- return locked(store) && smsReachesOwner();
437
+ return locked(store) && ownerTexter.reaches();
424
438
  // NULL-OK: field authenticator is OPTIONAL and therefore it is ok to check for NULL
425
439
  if (approval.startsWith(AUTHENTICATOR))
426
440
  return store.authenticator !== undefined && `${AUTHENTICATOR}${store.authenticator.id}` === approval;
@@ -467,7 +481,7 @@ export function createSignInDoor({ storeFile, product, short, home, host: doorHo
467
481
  const host = String(req.headers["x-forwarded-host"] ?? req.headers.host ?? "").split(",")[0].trim().replace(/:\d+$/, "").toLowerCase();
468
482
  const retired = legacyRetired(store);
469
483
  const codes = !retired && locked(store);
470
- return { enrolled: locked(store), local: fromThisMachine(req), passkey: (!retired && store.passkeys.some((passkey) => passkey.rpID === host)) || (host === doorHost && ownerCredentials().length > 0), authenticator: codes && store.authenticator !== undefined, sms: codes && smsReachesOwner(), codesShut: codesShut(store) };
484
+ return { enrolled: locked(store), local: fromThisMachine(req), passkey: (!retired && store.passkeys.some((passkey) => passkey.rpID === host)) || (host === doorHost && ownerCredentials().length > 0), authenticator: codes && store.authenticator !== undefined, sms: codes && ownerTexter.reaches(), codesShut: codesShut(store) };
471
485
  }
472
486
  function ownerEnrolTicket(host, replaces) {
473
487
  if (host.toLowerCase() !== doorHost)
@@ -724,7 +738,7 @@ ${locked(store) ? "" : `<p class="mut">Until an owner passkey is registered, not
724
738
  /** Texts a fresh 6-digit code to Meni's mobile; it replaces any earlier one, and only one goes out a minute. */
725
739
  async function smsSend(from) {
726
740
  codesClosed(readStore());
727
- if (!smsReachesOwner())
741
+ if (!ownerTexter.reaches())
728
742
  throw new GatewayError(404, "no SMS channel reaches Meni's mobile");
729
743
  codesOpen(readStore());
730
744
  const now = Date.now();
@@ -737,7 +751,7 @@ ${locked(store) ? "" : `<p class="mut">Until an owner passkey is registered, not
737
751
  textedCode = sent;
738
752
  const minutes = SMS_CODE_LIFETIME_MS / 60_000;
739
753
  try {
740
- await textOwner(`${short} sign-in code: ${code}. It works once, for ${minutes} minutes. If you did not ask for it, someone is at your ${short} sign-in page.`);
754
+ await ownerTexter.text(`${short} sign-in code: ${code}. It works once, for ${minutes} minutes. If you did not ask for it, someone is at your ${short} sign-in page.`);
741
755
  }
742
756
  catch (err) {
743
757
  if (textedCode === sent)
@@ -812,7 +826,7 @@ ${locked(store) ? "" : `<p class="mut">Until an owner passkey is registered, not
812
826
  const enrollments = [...tickets.entries()].filter(([, ticket]) => ticket.exp > now).map(([key, ticket]) => ({ ref: key.slice(0, SESSION_REF_LENGTH), host: ticket.host, exp: ticket.exp }));
813
827
  const registry = ownerRegistry();
814
828
  const owner = { rpID: registry.rpID, origins: registry.origins, outside: registry.outside, legacyRetired: legacyRetired(store), credentials: readOwners().credentials.map(({ id, device, createdAt }) => ({ id, device, createdAt })) };
815
- return { locked: locked(store), sms: smsReachesOwner(), passkeys: store.passkeys.map(({ id, rpID, device, createdAt }) => ({ id, rpID, device, createdAt })), owner, authenticator, sessions, enrollments };
829
+ return { locked: locked(store), sms: ownerTexter.reaches(), passkeys: store.passkeys.map(({ id, rpID, device, createdAt }) => ({ id, rpID, device, createdAt })), owner, authenticator, sessions, enrollments };
816
830
  }
817
831
  /** Revokes one session by its reference, or every session when none is given; the next request carrying it is refused. Returns how many went. */
818
832
  function revokeSessions(ref) {
@@ -12,7 +12,7 @@ import { homedir } from "os";
12
12
  import { basename, dirname, join } from "path";
13
13
  import { execFile } from "child_process";
14
14
  import { promisify } from "util";
15
- import { CONFIG_DIR, GatewayError } from "../notify.js";
15
+ import { CONFIG_DIR, GatewayError } from "../gatewaySettings.js";
16
16
  import { GATEWAY_STATE_FILE, TUNNEL_BINARY } from "./tunnel.js";
17
17
  import { readConfig, writeConfigValue } from "./panel.js";
18
18
  const run = promisify(execFile);
@@ -18,7 +18,7 @@ import { createRequire } from "module";
18
18
  import { isAbsolute, join, relative } from "path";
19
19
  import { createServer, request as httpRequest } from "http";
20
20
  import { WebSocket, WebSocketServer } from "ws";
21
- import { CONFIG_DIR, GatewayError } from "../notify.js";
21
+ import { CONFIG_DIR, GatewayError } from "../gatewaySettings.js";
22
22
  import { CHAT_HEADERS } from "./chatPage.js";
23
23
  import { isIconPath, serveIcon } from "./iconDoor.js";
24
24
  import { MCP_PATH, accessGranted, challenge, grantClient, handleOAuth, isOAuthPath, publicBase } from "./oauthDoor.js";
@@ -13,7 +13,7 @@ import { execFileSync, spawn } from "child_process";
13
13
  import { existsSync, mkdirSync, readFileSync, readlinkSync, renameSync, writeFileSync } from "fs";
14
14
  import { homedir } from "os";
15
15
  import { join } from "path";
16
- import { CONFIG_DIR } from "../notify.js";
16
+ import { CONFIG_DIR } from "../gatewaySettings.js";
17
17
  // Read by src/gateway/publicAccess.ts, which names both paths by the same rule.
18
18
  export const GATEWAY_STATE_FILE = "gateway-state.json";
19
19
  export const TUNNEL_BINARY = join(CONFIG_DIR, "cloudflared", process.platform === "win32" ? "cloudflared.exe" : "cloudflared");
@@ -0,0 +1,68 @@
1
+ /**
2
+ * #4247 — the leaf every BullseyeNotif door shares with notify: where BN's config lives, the gateway's token settings,
3
+ * the refusal type every door answers with, the atomic record write and the installed build's version.
4
+ * It imports nothing of BN's own, so the doors (oauthDoor, restDoor, tunnel, publicAccess, gatewayInstall, panelPage,
5
+ * agentGateway, passkeyDoor) no longer reach into notify.ts for it; passkeyDoor's SMS sender is handed in by the process
6
+ * that boots it (setOwnerTexter), and notifyDoor's one remaining tie to notify.ts is the MCP server it serves.
7
+ * notify.ts re-exports every name here, so a caller that still imports them from notify.js reads the same values.
8
+ */
9
+ import { existsSync, readFileSync, renameSync, rmSync, writeFileSync } from "fs";
10
+ import { homedir } from "os";
11
+ import { join } from "path";
12
+ import { fileURLToPath } from "url";
13
+ export const MANIFEST_PATH = fileURLToPath(new URL("../package.json", import.meta.url));
14
+ /** The build the extension has installed beside this bundle now; it moves when a window activates a newer extension and mirrors it. */
15
+ export function installedVersion() {
16
+ return JSON.parse(readFileSync(MANIFEST_PATH, "utf8")).version;
17
+ }
18
+ /** The build this process is running, read once at load. */
19
+ export const PACKAGE_VERSION = installedVersion();
20
+ export const PACKAGE_HOMEPAGE = JSON.parse(readFileSync(MANIFEST_PATH, "utf8")).homepage;
21
+ export const CONFIG_DIR = process.env.NOTIFY_MCP_CONFIG_DIR || join(homedir(), ".notify-mcp");
22
+ export const CONFIG_PATH = join(CONFIG_DIR, "config.json");
23
+ export const DEFAULT_GATEWAY_PORT = 7470;
24
+ /** A refused request, answered to its caller with this status and these words by whichever door it reached. */
25
+ export class GatewayError extends Error {
26
+ status;
27
+ facts;
28
+ /** `facts` ride beside the words in the refusal's body, so a caller acts on what was refused without parsing the message. */
29
+ constructor(status, message, facts = {}) {
30
+ super(message);
31
+ this.status = status;
32
+ this.facts = facts;
33
+ }
34
+ }
35
+ /** A rename Windows refuses while a reader holds the destination open for a moment. */
36
+ const RENAME_REFUSED = new Set(["EPERM", "EACCES", "EBUSY"]);
37
+ // GATE: five tries, waiting 10, 20, 40 and 80 ms — 150 ms at the outside — so a write a reader's lock refuses for a moment still lands, and one it refuses for good fails exactly as a single attempt did.
38
+ const RENAME_TRIES = 5;
39
+ const RENAME_FIRST_WAIT_MS = 10;
40
+ /** Writes one of BN's own files — config.json, the daemon's beat — staged beside itself and renamed over the old one, so no reader sees half of it; a refused rename is tried again. */
41
+ export function writeRecordFile(final, text) {
42
+ const staged = `${final}.${process.pid}.tmp`;
43
+ for (let attempt = 0;; attempt++) {
44
+ try {
45
+ writeFileSync(staged, text);
46
+ renameSync(staged, final);
47
+ return;
48
+ }
49
+ catch (err) {
50
+ if (!RENAME_REFUSED.has(err.code ?? "") || attempt === RENAME_TRIES - 1) {
51
+ rmSync(staged, { force: true });
52
+ throw err;
53
+ }
54
+ Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, RENAME_FIRST_WAIT_MS << attempt);
55
+ }
56
+ }
57
+ }
58
+ /** The token is mandatory: a door that is open to the home network never starts without one. */
59
+ export function readGatewaySettings() {
60
+ if (!existsSync(CONFIG_PATH))
61
+ return undefined;
62
+ const section = JSON.parse(readFileSync(CONFIG_PATH, "utf8")).agentGateway;
63
+ if (!section || typeof section.token !== "string" || section.token.length === 0)
64
+ return undefined;
65
+ const host = typeof section.host === "string" && section.host.length > 0 ? section.host : undefined;
66
+ const hosts = Array.isArray(section.hosts) && section.hosts.length > 0 ? section.hosts.map(String) : undefined;
67
+ return { token: section.token, port: typeof section.port === "number" ? section.port : DEFAULT_GATEWAY_PORT, ...(host === undefined ? {} : { host }), ...(hosts === undefined ? {} : { hosts }) };
68
+ }
package/dist/notify.js CHANGED
@@ -14,7 +14,6 @@ import { createServer as createNetServer } from "net";
14
14
  import { readFileSync, writeFileSync, existsSync, mkdirSync, mkdtempSync, readdirSync, statSync, unlinkSync, linkSync, renameSync, rmSync, watch } from "fs";
15
15
  import { homedir, networkInterfaces, hostname, tmpdir } from "os";
16
16
  import { join, basename, dirname } from "path";
17
- import { fileURLToPath } from "url";
18
17
  import { spawnSync, spawn } from "child_process";
19
18
  import { PinpointSMSVoiceV2Client, SendTextMessageCommand } from "@aws-sdk/client-pinpoint-sms-voice-v2";
20
19
  import { SQSClient } from "@aws-sdk/client-sqs";
@@ -36,14 +35,9 @@ import { StoryTopics, shippedStory, storyOfMessage } from "./messaging/storyTopi
36
35
  import { BoardDoorRefused, buttonPick, decisionButtons, decisionLink, decisionReply, PICK_DATA, pickByDigit, replySaid } from "./messaging/decisionDigit.js";
37
36
  import { z } from "zod";
38
37
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
39
- const MANIFEST_PATH = fileURLToPath(new URL("../package.json", import.meta.url));
40
- /** The build the extension has installed beside this bundle now; it moves when a window activates a newer extension and mirrors it. */
41
- function installedVersion() {
42
- return JSON.parse(readFileSync(MANIFEST_PATH, "utf8")).version;
43
- }
44
- /** The build this process is running, read once at load. */
45
- export const PACKAGE_VERSION = installedVersion();
46
- export const PACKAGE_HOMEPAGE = JSON.parse(readFileSync(MANIFEST_PATH, "utf8")).homepage;
38
+ import { CONFIG_DIR, CONFIG_PATH, DEFAULT_GATEWAY_PORT, GatewayError, MANIFEST_PATH, PACKAGE_VERSION, installedVersion, readGatewaySettings } from "./gatewaySettings.js";
39
+ // #4247 — these live in the gatewaySettings leaf so the doors can leave this repo without notify.ts; re-exported for every caller that still names notify.js.
40
+ export { CONFIG_DIR, DEFAULT_GATEWAY_PORT, GatewayError, PACKAGE_HOMEPAGE, PACKAGE_VERSION, readGatewaySettings, writeRecordFile } from "./gatewaySettings.js";
47
41
  /**
48
42
  * The identity one chat reports and the tag its messages are routed by: `<machine>-<workspace>[-<session>]`.
49
43
  * The HTTP door derives it from the headers its client sends: the workspace is walked up from the project folder,
@@ -80,54 +74,6 @@ export function sessionIdentity(from) {
80
74
  const session = (from.sessionId ?? "").replace(/[^a-zA-Z0-9]/g, "").toLowerCase().slice(0, 6);
81
75
  return `${cleanId(hostname())}-${workspace || "agent"}${session ? `-${session}` : ""}`;
82
76
  }
83
- export const CONFIG_DIR = process.env.NOTIFY_MCP_CONFIG_DIR || join(homedir(), ".notify-mcp");
84
- const CONFIG_PATH = join(CONFIG_DIR, "config.json");
85
- export const DEFAULT_GATEWAY_PORT = 7470;
86
- /** A refused request, answered to its caller with this status and these words by whichever door it reached. */
87
- export class GatewayError extends Error {
88
- status;
89
- facts;
90
- /** `facts` ride beside the words in the refusal's body, so a caller acts on what was refused without parsing the message. */
91
- constructor(status, message, facts = {}) {
92
- super(message);
93
- this.status = status;
94
- this.facts = facts;
95
- }
96
- }
97
- /** A rename Windows refuses while a reader holds the destination open for a moment. */
98
- const RENAME_REFUSED = new Set(["EPERM", "EACCES", "EBUSY"]);
99
- // GATE: five tries, waiting 10, 20, 40 and 80 ms — 150 ms at the outside — so a write a reader's lock refuses for a moment still lands, and one it refuses for good fails exactly as a single attempt did.
100
- const RENAME_TRIES = 5;
101
- const RENAME_FIRST_WAIT_MS = 10;
102
- /** Writes one of BN's own files — config.json, the daemon's beat — staged beside itself and renamed over the old one, so no reader sees half of it; a refused rename is tried again. */
103
- export function writeRecordFile(final, text) {
104
- const staged = `${final}.${process.pid}.tmp`;
105
- for (let attempt = 0;; attempt++) {
106
- try {
107
- writeFileSync(staged, text);
108
- renameSync(staged, final);
109
- return;
110
- }
111
- catch (err) {
112
- if (!RENAME_REFUSED.has(err.code ?? "") || attempt === RENAME_TRIES - 1) {
113
- rmSync(staged, { force: true });
114
- throw err;
115
- }
116
- Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, RENAME_FIRST_WAIT_MS << attempt);
117
- }
118
- }
119
- }
120
- /** The token is mandatory: a door that is open to the home network never starts without one. */
121
- export function readGatewaySettings() {
122
- if (!existsSync(CONFIG_PATH))
123
- return undefined;
124
- const section = JSON.parse(readFileSync(CONFIG_PATH, "utf8")).agentGateway;
125
- if (!section || typeof section.token !== "string" || section.token.length === 0)
126
- return undefined;
127
- const host = typeof section.host === "string" && section.host.length > 0 ? section.host : undefined;
128
- const hosts = Array.isArray(section.hosts) && section.hosts.length > 0 ? section.hosts.map(String) : undefined;
129
- return { token: section.token, port: typeof section.port === "number" ? section.port : DEFAULT_GATEWAY_PORT, ...(host === undefined ? {} : { host }), ...(hosts === undefined ? {} : { hosts }) };
130
- }
131
77
  // GATE: the Slack API base may be moved ONLY under the test gate, so a suite can drive a real Slack call against a socket it owns; without the gate the value is api.slack.com and no environment can redirect it.
132
78
  const SLACK_API_BASE = process.env.NOTIFY_MCP_TEST_ENDPOINTS === "1" && process.env.NOTIFY_SLACK_API
133
79
  ? process.env.NOTIFY_SLACK_API.replace(/\/+$/, "")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.492",
3
+ "version": "1.3.494",
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",