omni-notify-mcp 1.3.312 → 1.3.313
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/agentGateway.js +2 -2
- package/dist/gateway/claudeProvider.js +2 -3
- package/dist/gateway/sessionDriver.js +2 -4
- package/dist/notify.js +1 -1
- package/dist/shared/agentSession.js +0 -1
- package/dist/shared/webhost/bullseyeWebHost.js +26 -0
- package/dist/shared/webhost/webviewShim.js +2 -4
- package/package.json +1 -1
package/dist/agentGateway.js
CHANGED
|
@@ -115,8 +115,8 @@ export class AgentGateway {
|
|
|
115
115
|
return this.driver.quiet() && [...this.turns.values()].every((turns) => turns.size === 0);
|
|
116
116
|
}
|
|
117
117
|
/** Gives the store back when this process hands the gateway over. */
|
|
118
|
-
shutdown() {
|
|
119
|
-
this.driver.shutdown();
|
|
118
|
+
async shutdown() {
|
|
119
|
+
await this.driver.shutdown();
|
|
120
120
|
this.recovered = false;
|
|
121
121
|
}
|
|
122
122
|
/** What this message asks of the agent, or undefined when it is not addressed to it and belongs to the inbox. */
|
|
@@ -318,12 +318,11 @@ class ClaudeSession {
|
|
|
318
318
|
sink.layers(clock.finish(monotonicMs(), this.debugFile));
|
|
319
319
|
this.sink = undefined;
|
|
320
320
|
}
|
|
321
|
-
// A session that was ended reads no record: its answer is refused here, before any record is read for it.
|
|
322
|
-
if (this.warm.stopped)
|
|
323
|
-
throw this.spec.failures.fail("the agent's session was ended");
|
|
324
321
|
// NULL-OK: field unsupported is OPTIONAL and therefore it is ok to check for NULL
|
|
325
322
|
if (this.unsupported !== undefined)
|
|
326
323
|
throw this.spec.failures.fail(`the agent asked BN for "${this.unsupported}", which BN does not answer — the session was ended.`);
|
|
324
|
+
if (this.warm.stopped)
|
|
325
|
+
throw this.spec.failures.fail("the agent's session was ended");
|
|
327
326
|
if (result.stdout === "") {
|
|
328
327
|
const exited = `the agent exited (code ${result.code ?? "none"}) without an answer while ${this.resumes ? "resuming" : "creating"} session ${this.spec.sessionId}${result.stderr.trim() ? `: ${result.stderr.trim().slice(-300)}` : ""}`;
|
|
329
328
|
if (this.resumes && !transcriptWritten(this.spec.sessionId))
|
|
@@ -422,7 +422,7 @@ export class SessionDriver {
|
|
|
422
422
|
quiet() {
|
|
423
423
|
return this.driving.size === 0 && this.waiting.length === 0;
|
|
424
424
|
}
|
|
425
|
-
/** Hands the store back: the beat stops
|
|
425
|
+
/** Hands the store back: the beat stops, every held session's process is ended and awaited, and each conversation keeps its record until the next boot resets it to idle. */
|
|
426
426
|
async shutdown() {
|
|
427
427
|
this.stopping = true;
|
|
428
428
|
this.watcher?.close();
|
|
@@ -1164,7 +1164,6 @@ export class SessionDriver {
|
|
|
1164
1164
|
listener({ ...event, id });
|
|
1165
1165
|
return event;
|
|
1166
1166
|
}
|
|
1167
|
-
/** Ends a session's process and gives its slot back; `keep` leaves the record's own state to the caller that is handing the session over. */
|
|
1168
1167
|
/** Ends the process of a live session and forgets the session; the record is left as its caller sets it. */
|
|
1169
1168
|
endLive(id) {
|
|
1170
1169
|
const live = this.lives.get(id);
|
|
@@ -1182,8 +1181,7 @@ export class SessionDriver {
|
|
|
1182
1181
|
}
|
|
1183
1182
|
/** Ends a session's process and gives its slot back; `keep` leaves the record's own state to the caller that is handing the session over. */
|
|
1184
1183
|
free(id, state) {
|
|
1185
|
-
|
|
1186
|
-
if (this.stopping || this.lives.get(id) === undefined)
|
|
1184
|
+
if (this.stopping || !this.lives.has(id))
|
|
1187
1185
|
return;
|
|
1188
1186
|
this.endLive(id);
|
|
1189
1187
|
if (state !== "keep")
|
package/dist/notify.js
CHANGED
|
@@ -255,7 +255,6 @@ export class WarmSession {
|
|
|
255
255
|
return !this.ended && this.child.exitCode === null && this.child.signalCode === null && this.startError === undefined && this.writeError === undefined;
|
|
256
256
|
}
|
|
257
257
|
read(chunk) {
|
|
258
|
-
// A session that was ended reads nothing more: its state is gone, so no line of its output is handed on.
|
|
259
258
|
if (this.ended)
|
|
260
259
|
return;
|
|
261
260
|
this.lineBuffer += chunk;
|
|
@@ -811,6 +811,32 @@ class WebHost {
|
|
|
811
811
|
if (home !== null && ROSTER_EXTENSIONS.has(this.extension)) {
|
|
812
812
|
return send(response, 200, MIME[".html"], peekedRosterPage(this.label, home, workspacesServed(this.extension, base).get(home)?.[page.name]), { "Cache-Control": "no-store" });
|
|
813
813
|
}
|
|
814
|
+
let chosen = "";
|
|
815
|
+
if (this.currentOf(url.searchParams) === "") {
|
|
816
|
+
try {
|
|
817
|
+
chosen = chosenWorkspace();
|
|
818
|
+
}
|
|
819
|
+
catch (err) {
|
|
820
|
+
if (!(err instanceof SyntaxError) && !(err instanceof TypeError))
|
|
821
|
+
throw err;
|
|
822
|
+
// OWNER: the page request is this read's trigger root — a pick file that is not a label serves the page at its own address, and the picker's own read puts chosenUnreadable on screen.
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
let remembered;
|
|
826
|
+
try {
|
|
827
|
+
// NULL-OK: field workspaces(base).get(chosen) is OPTIONAL and therefore it is ok to check for NULL
|
|
828
|
+
remembered = chosen === "" ? undefined : this.workspaces(base).get(chosen)?.[page.name];
|
|
829
|
+
}
|
|
830
|
+
catch (err) {
|
|
831
|
+
if (!(err instanceof SyntaxError))
|
|
832
|
+
throw err;
|
|
833
|
+
// OWNER: the page request is this read's trigger root — a workspace list that cannot be read serves the page at its own address, and the picker's own read puts listUnreadable on screen.
|
|
834
|
+
remembered = undefined;
|
|
835
|
+
}
|
|
836
|
+
// NULL-OK: field remembered is OPTIONAL and therefore it is ok to check for NULL
|
|
837
|
+
if (remembered !== undefined) {
|
|
838
|
+
return send(response, 302, MIME[".txt"], `moved to ${remembered}`, { Location: remembered, "Cache-Control": "no-store" });
|
|
839
|
+
}
|
|
814
840
|
return this.serveDocument(page, response);
|
|
815
841
|
}
|
|
816
842
|
/** The workspaces a page of this host can switch to: label -> { page -> address }, built on `base` when the request came through the gateway. The workspaces are this window's own and the ones on the workspace list; a live window's record is only the address of that window's pages, never a source of the list. */
|
|
@@ -145,10 +145,8 @@ const PICKER_SOURCE = String.raw `
|
|
|
145
145
|
window.sessionStorage.removeItem(moved);
|
|
146
146
|
}
|
|
147
147
|
var remembered = served.chosen;
|
|
148
|
-
if (served.
|
|
149
|
-
|
|
150
|
-
window.location.assign(served.workspaces[remembered][page]);
|
|
151
|
-
return;
|
|
148
|
+
if (served.chosenUnreadable !== undefined) {
|
|
149
|
+
notice("__bullseye-workspace-pick-unread", "⛔ The workspace you last picked could not be read: " + served.chosenUnreadable + " — pick one in the bar above to replace it");
|
|
152
150
|
}
|
|
153
151
|
if (labels.length <= 1) {
|
|
154
152
|
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.313",
|
|
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",
|