omni-notify-mcp 1.3.499 → 1.3.501
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/chunk.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { decisionLink } from "./messaging/decisionDigit.js";
|
|
1
2
|
export const NOTIFY_CHUNK_LIMIT = 500;
|
|
2
3
|
function packChunks(message, body, wordAware) {
|
|
3
4
|
const chunks = [];
|
|
@@ -24,18 +25,30 @@ export function withLead(lead, text) {
|
|
|
24
25
|
export function splitForNotify(message, limit = NOTIFY_CHUNK_LIMIT) {
|
|
25
26
|
if (message.length <= limit)
|
|
26
27
|
return [message];
|
|
28
|
+
// #5063 — a board decision carries its decision link inside the text, and his reply is read against the very part he replied
|
|
29
|
+
// to (notify.ts:1416 → decisionDigit.ts:39). A plain split could strand the link in one part (the words in another), so a
|
|
30
|
+
// reply to the words half found no link and ruled nothing. Every part of a decision notice is sent carrying that link: each
|
|
31
|
+
// part reserves room for it and, if the split left the link out, the link is appended — so a reply to ANY part resolves.
|
|
32
|
+
const link = decisionLink(message);
|
|
33
|
+
const tail = link === undefined ? "" : `\n🔗 ${link}`;
|
|
27
34
|
let parts = Math.ceil(message.length / limit);
|
|
28
35
|
for (;;) {
|
|
29
36
|
const reserve = `(${parts}/${parts}) `.length;
|
|
30
|
-
const needed = Math.ceil(message.length / Math.max(1, limit - reserve));
|
|
37
|
+
const needed = Math.ceil(message.length / Math.max(1, limit - reserve - tail.length));
|
|
31
38
|
if (needed <= parts)
|
|
32
39
|
break;
|
|
33
40
|
parts = needed;
|
|
34
41
|
}
|
|
35
|
-
const body = Math.max(1, limit - `(${parts}/${parts}) `.length);
|
|
42
|
+
const body = Math.max(1, limit - `(${parts}/${parts}) `.length - tail.length);
|
|
36
43
|
let chunks = packChunks(message, body, true);
|
|
37
44
|
if (chunks.length > parts)
|
|
38
45
|
chunks = packChunks(message, body, false);
|
|
39
46
|
const total = chunks.length;
|
|
40
|
-
return chunks.map((chunk, i) =>
|
|
47
|
+
return chunks.map((chunk, i) => {
|
|
48
|
+
const part = withLead(`(${i + 1}/${total})`, chunk);
|
|
49
|
+
if (link === undefined || part.includes(link))
|
|
50
|
+
return part;
|
|
51
|
+
// the split left this part without the link (the footer glyph stranded from its URL): drop the orphaned glyph and carry the link itself
|
|
52
|
+
return `${part.replace(/\s*🔗\s*$/, "")}${tail}`;
|
|
53
|
+
});
|
|
41
54
|
}
|
|
@@ -118,6 +118,10 @@ const PICKER_SOURCE = String.raw `
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
var framedPage = new URLSearchParams(window.location.search).get("bullseye-framed") !== null;
|
|
121
|
+
// #4960 — a framed page tells the window that framed it that it is really up, the instant its own scripts run; the window keeps the frame only on that word, so a frame that never comes up (its service down, or a page the service refuses) leaves the window's own page in place, never a blank.
|
|
122
|
+
if (framedPage && window.parent !== window) {
|
|
123
|
+
window.parent.postMessage({ type: "__bullseyeFramedReady" }, "*");
|
|
124
|
+
}
|
|
121
125
|
var workspaceRead = 0;
|
|
122
126
|
var barColours = "background:#252526;color:#ccc";
|
|
123
127
|
var workspaceBarStyle = "display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;align-items:center;box-sizing:border-box;min-height:24px;max-width:100%;overflow:hidden;font:12px system-ui,sans-serif;" + barColours + ";border-bottom:1px solid #454545;padding:2px 8px;pointer-events:auto";
|
|
@@ -899,8 +903,17 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
899
903
|
var pickedFrame = "";
|
|
900
904
|
var FRAME_ID = "__bullseye-workspace-frame";
|
|
901
905
|
var HIDE_ID = "__bullseye-cover-hides-page";
|
|
906
|
+
var FRAMED_READY_MS = 8000;
|
|
907
|
+
var framedReadyTimer = 0;
|
|
902
908
|
var watched = null;
|
|
903
909
|
var workspaceSize = null;
|
|
910
|
+
// #4960 — the framed page's own word that it is up arrives the instant its scripts run; it cancels the wait that would otherwise put the window's own page back.
|
|
911
|
+
function framedUp() {
|
|
912
|
+
if (framedReadyTimer !== 0) {
|
|
913
|
+
window.clearTimeout(framedReadyTimer);
|
|
914
|
+
framedReadyTimer = 0;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
904
917
|
var pickerNavigate = function () {
|
|
905
918
|
cover(pickedFrame);
|
|
906
919
|
};
|
|
@@ -935,6 +948,7 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
935
948
|
var frame = document.getElementById(FRAME_ID);
|
|
936
949
|
var bar = document.getElementById("bullseye-workspace");
|
|
937
950
|
if (url === "") {
|
|
951
|
+
framedUp();
|
|
938
952
|
if (frame !== null) {
|
|
939
953
|
frame.remove();
|
|
940
954
|
document.documentElement.style.overflow = "";
|
|
@@ -955,7 +969,14 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
955
969
|
frame.setAttribute("title", "The picked workspace, drawn by its service");
|
|
956
970
|
document.body.appendChild(frame);
|
|
957
971
|
}
|
|
958
|
-
if (frame.getAttribute("src") !== src)
|
|
972
|
+
if (frame.getAttribute("src") !== src) {
|
|
973
|
+
frame.setAttribute("src", src);
|
|
974
|
+
// #4960 — a frame that never comes up (its service down, or a page the service refuses) must not leave the body hidden over a blank: the framed page says it is up within this wait, or the window's own page comes back.
|
|
975
|
+
framedUp();
|
|
976
|
+
framedReadyTimer = window.setTimeout(function () { cover(""); }, FRAMED_READY_MS);
|
|
977
|
+
}
|
|
978
|
+
// #4960/#234 — belt and suspenders: a browser that does fire the frame's own load error puts the window's page back at once, alongside the framed page's own word above.
|
|
979
|
+
frame.onerror = function () { cover(""); };
|
|
959
980
|
document.documentElement.style.overflow = "hidden";
|
|
960
981
|
if (document.getElementById(HIDE_ID) === null) {
|
|
961
982
|
var hide = document.createElement("style");
|
|
@@ -973,6 +994,10 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
973
994
|
};
|
|
974
995
|
window.addEventListener("message", function (event) {
|
|
975
996
|
var reply = event.data;
|
|
997
|
+
if (reply?.type === "__bullseyeFramedReady") {
|
|
998
|
+
framedUp();
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
976
1001
|
if (reply?.type === "__bullseyeWorkspaceRefresh" && api !== undefined) {
|
|
977
1002
|
workspacePicker();
|
|
978
1003
|
return;
|
package/dist/notify.js
CHANGED
|
@@ -3180,7 +3180,10 @@ async function sendChunked(message, priority, clientId) {
|
|
|
3180
3180
|
const buttons = decisionButtons(message);
|
|
3181
3181
|
const topic = topicOfMessage(message);
|
|
3182
3182
|
for (const [i, chunk] of parts.entries()) {
|
|
3183
|
-
|
|
3183
|
+
// #5063 — the buttons ride on EVERY part, not only the last: splitForNotify puts the decision link on every part too, so a
|
|
3184
|
+
// tap on any part's buttons resolves the decision (buttonPick reads the link off the message the button sits on). Attaching
|
|
3185
|
+
// them to the last part alone left every earlier part a dead end for both a tap and a reply.
|
|
3186
|
+
outcomes.push(await sendNotification(withLead(`[${clientId}]`, chunk), priority, clientId, buttons, topic === undefined ? undefined : { ...topic, ships: topic.ships && i === parts.length - 1 }));
|
|
3184
3187
|
}
|
|
3185
3188
|
return outcomes;
|
|
3186
3189
|
}
|
|
@@ -135,6 +135,7 @@ function servedWorkspace(page) {
|
|
|
135
135
|
let picked;
|
|
136
136
|
return {
|
|
137
137
|
framed: true,
|
|
138
|
+
own: true,
|
|
138
139
|
read: () => {
|
|
139
140
|
if (picked !== undefined)
|
|
140
141
|
return picked;
|
|
@@ -363,7 +364,8 @@ class MirroredWebview {
|
|
|
363
364
|
search.sort();
|
|
364
365
|
return search.toString() === wanted.toString();
|
|
365
366
|
});
|
|
366
|
-
|
|
367
|
+
// #4960 — the own workspace is normally drawn locally, so it is not framed; a panel whose body IS the frame (`own`) frames it too, and then the served page is what he reads and presses in the window.
|
|
368
|
+
const frame = this.workspace.framed !== true || selected === undefined || (selected[0] === this.page.host.label && this.workspace.own !== true) ? "" : selected[1][this.page.name];
|
|
367
369
|
return { extension: this.page.host.extension, current: selected === undefined ? "" : selected[0], workspaces, frame };
|
|
368
370
|
}
|
|
369
371
|
async workspaceRequest(message) {
|
|
@@ -118,6 +118,10 @@ const PICKER_SOURCE = String.raw `
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
var framedPage = new URLSearchParams(window.location.search).get("bullseye-framed") !== null;
|
|
121
|
+
// #4960 — a framed page tells the window that framed it that it is really up, the instant its own scripts run; the window keeps the frame only on that word, so a frame that never comes up (its service down, or a page the service refuses) leaves the window's own page in place, never a blank.
|
|
122
|
+
if (framedPage && window.parent !== window) {
|
|
123
|
+
window.parent.postMessage({ type: "__bullseyeFramedReady" }, "*");
|
|
124
|
+
}
|
|
121
125
|
var workspaceRead = 0;
|
|
122
126
|
var barColours = "background:#252526;color:#ccc";
|
|
123
127
|
var workspaceBarStyle = "display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:8px;align-items:center;box-sizing:border-box;min-height:24px;max-width:100%;overflow:hidden;font:12px system-ui,sans-serif;" + barColours + ";border-bottom:1px solid #454545;padding:2px 8px;pointer-events:auto";
|
|
@@ -899,8 +903,17 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
899
903
|
var pickedFrame = "";
|
|
900
904
|
var FRAME_ID = "__bullseye-workspace-frame";
|
|
901
905
|
var HIDE_ID = "__bullseye-cover-hides-page";
|
|
906
|
+
var FRAMED_READY_MS = 8000;
|
|
907
|
+
var framedReadyTimer = 0;
|
|
902
908
|
var watched = null;
|
|
903
909
|
var workspaceSize = null;
|
|
910
|
+
// #4960 — the framed page's own word that it is up arrives the instant its scripts run; it cancels the wait that would otherwise put the window's own page back.
|
|
911
|
+
function framedUp() {
|
|
912
|
+
if (framedReadyTimer !== 0) {
|
|
913
|
+
window.clearTimeout(framedReadyTimer);
|
|
914
|
+
framedReadyTimer = 0;
|
|
915
|
+
}
|
|
916
|
+
}
|
|
904
917
|
var pickerNavigate = function () {
|
|
905
918
|
cover(pickedFrame);
|
|
906
919
|
};
|
|
@@ -935,6 +948,7 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
935
948
|
var frame = document.getElementById(FRAME_ID);
|
|
936
949
|
var bar = document.getElementById("bullseye-workspace");
|
|
937
950
|
if (url === "") {
|
|
951
|
+
framedUp();
|
|
938
952
|
if (frame !== null) {
|
|
939
953
|
frame.remove();
|
|
940
954
|
document.documentElement.style.overflow = "";
|
|
@@ -955,7 +969,14 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
955
969
|
frame.setAttribute("title", "The picked workspace, drawn by its service");
|
|
956
970
|
document.body.appendChild(frame);
|
|
957
971
|
}
|
|
958
|
-
if (frame.getAttribute("src") !== src)
|
|
972
|
+
if (frame.getAttribute("src") !== src) {
|
|
973
|
+
frame.setAttribute("src", src);
|
|
974
|
+
// #4960 — a frame that never comes up (its service down, or a page the service refuses) must not leave the body hidden over a blank: the framed page says it is up within this wait, or the window's own page comes back.
|
|
975
|
+
framedUp();
|
|
976
|
+
framedReadyTimer = window.setTimeout(function () { cover(""); }, FRAMED_READY_MS);
|
|
977
|
+
}
|
|
978
|
+
// #4960/#234 — belt and suspenders: a browser that does fire the frame's own load error puts the window's page back at once, alongside the framed page's own word above.
|
|
979
|
+
frame.onerror = function () { cover(""); };
|
|
959
980
|
document.documentElement.style.overflow = "hidden";
|
|
960
981
|
if (document.getElementById(HIDE_ID) === null) {
|
|
961
982
|
var hide = document.createElement("style");
|
|
@@ -973,6 +994,10 @@ const NATIVE_PICKER_SOURCE = String.raw `(function () {
|
|
|
973
994
|
};
|
|
974
995
|
window.addEventListener("message", function (event) {
|
|
975
996
|
var reply = event.data;
|
|
997
|
+
if (reply?.type === "__bullseyeFramedReady") {
|
|
998
|
+
framedUp();
|
|
999
|
+
return;
|
|
1000
|
+
}
|
|
976
1001
|
if (reply?.type === "__bullseyeWorkspaceRefresh" && api !== undefined) {
|
|
977
1002
|
workspacePicker();
|
|
978
1003
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-notify-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.501",
|
|
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",
|