omni-notify-mcp 1.3.423 → 1.3.425
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.
|
@@ -74,8 +74,8 @@ function publicBase(request) {
|
|
|
74
74
|
/**
|
|
75
75
|
* The live windows serving `extension` on this machine, grouped by the workspace each runs in: label -> { page -> entry
|
|
76
76
|
* address }. On this machine the address carries that window's key on the loopback port; through the gateway (`base`
|
|
77
|
-
* is its public address)
|
|
78
|
-
* windows on one workspace answer with the newest record.
|
|
77
|
+
* is its public address) only this process's own window is listed, at its public address, because the gateway reaches
|
|
78
|
+
* one port per public host and no other window behind it. Two windows on one workspace answer with the newest record.
|
|
79
79
|
*/
|
|
80
80
|
function workspacesServed(extension, base) {
|
|
81
81
|
const directory = recordDirectory(extension);
|
|
@@ -86,7 +86,7 @@ function workspacesServed(extension, base) {
|
|
|
86
86
|
const newest = new Map();
|
|
87
87
|
for (const name of fs.readdirSync(directory)) {
|
|
88
88
|
const match = /^(\d+)\.json$/.exec(name);
|
|
89
|
-
if (match === null || !alive(Number(match[1]))) {
|
|
89
|
+
if (match === null || !alive(Number(match[1])) || (base !== undefined && Number(match[1]) !== process.pid)) {
|
|
90
90
|
continue;
|
|
91
91
|
}
|
|
92
92
|
let record;
|
|
@@ -108,8 +108,8 @@ function workspacesServed(extension, base) {
|
|
|
108
108
|
served.set(label, Object.fromEntries(Object.entries(record.pages).map(([page, info]) => {
|
|
109
109
|
// NULL-OK: field search is OPTIONAL and therefore it is ok to check for NULL
|
|
110
110
|
const search = info.search ?? "";
|
|
111
|
-
const at = `/${encodeURIComponent(page)}/${search}
|
|
112
|
-
return [page, base === undefined ? `http://127.0.0.1:${record.port}${at}${TOKEN_PARAMETER}=${record.token}` : `${base}${at}
|
|
111
|
+
const at = `/${encodeURIComponent(page)}/${search}`;
|
|
112
|
+
return [page, base === undefined ? `http://127.0.0.1:${record.port}${at}${search === "" ? "?" : "&"}${TOKEN_PARAMETER}=${record.token}` : `${base}${at}`];
|
|
113
113
|
})));
|
|
114
114
|
}
|
|
115
115
|
return served;
|
|
@@ -917,7 +917,17 @@ class WebHost {
|
|
|
917
917
|
}
|
|
918
918
|
const home = url.searchParams.get("bullseye-peek");
|
|
919
919
|
if (home !== null && ROSTER_EXTENSIONS.has(this.extension)) {
|
|
920
|
-
|
|
920
|
+
let back;
|
|
921
|
+
try {
|
|
922
|
+
back = this.peekedFrom(base).get(home)?.[page.name];
|
|
923
|
+
}
|
|
924
|
+
catch (err) {
|
|
925
|
+
if (!(err instanceof SyntaxError))
|
|
926
|
+
throw err;
|
|
927
|
+
// OWNER: the peek read is this request's trigger root — a workspace list that is not defined or cannot be read draws the peek with its reason in place of the way back, and the process serving it goes on.
|
|
928
|
+
return send(response, 200, MIME[".html"], peekedRosterPage(this.label, home, undefined, err.message), { "Cache-Control": "no-store" });
|
|
929
|
+
}
|
|
930
|
+
return send(response, 200, MIME[".html"], peekedRosterPage(this.label, home, back), { "Cache-Control": "no-store" });
|
|
921
931
|
}
|
|
922
932
|
return this.serveDocument(page, response);
|
|
923
933
|
}
|
|
@@ -933,6 +943,11 @@ class WebHost {
|
|
|
933
943
|
listed.set(this.label, windows.get(this.label));
|
|
934
944
|
return listed;
|
|
935
945
|
}
|
|
946
|
+
/** The addresses a peek's way back can name: the service's for an extension whose service draws its pages, else the live windows'. */
|
|
947
|
+
peekedFrom(base) {
|
|
948
|
+
// NULL-OK: field service is OPTIONAL and therefore it is ok to check for NULL
|
|
949
|
+
return this.service === undefined ? workspacesServed(this.extension, base) : this.workspaces(base);
|
|
950
|
+
}
|
|
936
951
|
level() {
|
|
937
952
|
return this.machine ? { machine: true } : {};
|
|
938
953
|
}
|
|
@@ -1180,6 +1195,9 @@ class ServiceHost extends WebHost {
|
|
|
1180
1195
|
workspaces() {
|
|
1181
1196
|
return this.listed();
|
|
1182
1197
|
}
|
|
1198
|
+
peekedFrom() {
|
|
1199
|
+
return this.listed();
|
|
1200
|
+
}
|
|
1183
1201
|
/** The service is on no workspace of its own: with no workspace list to read it is on none. */
|
|
1184
1202
|
ownLabel() {
|
|
1185
1203
|
return "";
|
|
@@ -1211,8 +1229,10 @@ function indexPage(host, base) {
|
|
|
1211
1229
|
}
|
|
1212
1230
|
/** The extensions whose page is a roster of work this window owns: another workspace's roster is not shown from here, so a peek at one answers in words instead of a page that could start work. */
|
|
1213
1231
|
const ROSTER_EXTENSIONS = new Set(["fleetview"]);
|
|
1214
|
-
function peekedRosterPage(label, home, back) {
|
|
1215
|
-
|
|
1232
|
+
function peekedRosterPage(label, home, back, listUnreadable) {
|
|
1233
|
+
// NULL-OK: field listUnreadable is OPTIONAL and therefore it is ok to check for NULL
|
|
1234
|
+
const unread = listUnreadable === undefined ? "" : `<p>🔴 No way back to ${escapeAttribute(home)}: the workspace list cannot be read — ${escapeAttribute(listUnreadable)}</p>`;
|
|
1235
|
+
const link = back === undefined ? unread : `<p><a href="${escapeAttribute(back)}" style="color:#9cdcfe">⬅ Back to ${escapeAttribute(home)}</a></p>`;
|
|
1216
1236
|
return `<!DOCTYPE html><html><head><meta charset="utf-8">${PHONE_VIEWPORT}<title>Fleet · peeking</title></head>
|
|
1217
1237
|
<body style="font:14px system-ui,sans-serif;padding:24px;background:#1e1e1e;color:#ccc"><div style="background:#5a3d00;color:#fff;padding:6px 10px;border-radius:4px">👁 Peeking at ${escapeAttribute(label)} — look only</div>
|
|
1218
1238
|
<p>This workspace's Fleet roster and queue belong to its own VS Code window, and they are not shown from another workspace yet — so there is nothing here to read, and nothing here can start work or reach that window's main.</p>${link}</body></html>`;
|
|
@@ -230,7 +230,7 @@ const PICKER_SOURCE = String.raw `
|
|
|
230
230
|
});
|
|
231
231
|
box.appendChild(choose("👁 Peek ", [""].concat(others), "", function (peeked) {
|
|
232
232
|
if (peeked !== "") {
|
|
233
|
-
pickerNavigate(served.workspaces[peeked][page] + "&bullseye-peek=" + encodeURIComponent(served.current));
|
|
233
|
+
pickerNavigate(served.workspaces[peeked][page] + (served.workspaces[peeked][page].indexOf("?") === -1 ? "?" : "&") + "bullseye-peek=" + encodeURIComponent(served.current));
|
|
234
234
|
}
|
|
235
235
|
}));
|
|
236
236
|
}
|
|
@@ -272,7 +272,10 @@ const CONNECTION_SOURCE = String.raw `(function () {
|
|
|
272
272
|
var current = null;
|
|
273
273
|
var ticker = 0;
|
|
274
274
|
var clearer = 0;
|
|
275
|
+
var pending = 0;
|
|
275
276
|
var stilled = [];
|
|
277
|
+
// GATE: a drop that comes back within this shows nothing at all; only a connection still down after it is covered with RECONNECTING
|
|
278
|
+
var GRACE_MS = 1500;
|
|
276
279
|
|
|
277
280
|
function clock(at) {
|
|
278
281
|
return new Date(at).toLocaleTimeString([], { hour12: false });
|
|
@@ -387,13 +390,26 @@ const CONNECTION_SOURCE = String.raw `(function () {
|
|
|
387
390
|
return Math.min(250 * Math.pow(2, drops), 30000);
|
|
388
391
|
},
|
|
389
392
|
reconnecting: function (what, retryInMs) {
|
|
390
|
-
|
|
393
|
+
var retryAt = Date.now() + retryInMs;
|
|
394
|
+
if (current !== null) {
|
|
395
|
+
show("reconnecting", what, { retryAt: retryAt });
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
if (pending !== 0) {
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
pending = window.setTimeout(function () {
|
|
402
|
+
pending = 0;
|
|
403
|
+
show("reconnecting", what, { retryAt: retryAt });
|
|
404
|
+
}, GRACE_MS);
|
|
391
405
|
},
|
|
392
406
|
signInAgain: function () {
|
|
393
407
|
window.sessionStorage.setItem("bullseye-return-to", window.location.pathname + window.location.search + window.location.hash);
|
|
394
408
|
window.location.assign("/");
|
|
395
409
|
},
|
|
396
410
|
live: function () {
|
|
411
|
+
window.clearTimeout(pending);
|
|
412
|
+
pending = 0;
|
|
397
413
|
if (current === null || current.state === "live") {
|
|
398
414
|
return;
|
|
399
415
|
}
|
|
@@ -630,7 +646,7 @@ const SHIM_SOURCE = CONNECTION_SOURCE + ";" + String.raw `(function () {
|
|
|
630
646
|
// GATE: the page pings this often while visible; a socket a tunnel or a suspended phone tab cut sends no close, and one that hears nothing back is reopened in place
|
|
631
647
|
var BEAT_MS = 20000;
|
|
632
648
|
// GATE: a ping sent on being seen again must come back within this, or the page treats the socket as dead; the steady beat instead ends a socket that heard nothing for a whole beat
|
|
633
|
-
var PING_ANSWER_MS =
|
|
649
|
+
var PING_ANSWER_MS = 2500;
|
|
634
650
|
|
|
635
651
|
var lastBeat = lastHeard;
|
|
636
652
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-notify-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.425",
|
|
4
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
5
|
"main": "dist/daemon.js",
|
|
6
6
|
"type": "module",
|