omni-notify-mcp 1.3.379 → 1.3.381

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.
@@ -203,7 +203,7 @@ function startSignIn() { if (token) resumeSignIn().catch(recheckSignIn); else si
203
203
  * own full interactive CLI, so what was the record's reading view is the terminal itself. Its ONE creation control (the
204
204
  * New form and `POST /v1/conversations`) is NOT carried either: the native CLI page's New Agent is the one way to
205
205
  * create an agent. The functions here rely on the page's shared `el`, `api`, `base`, `main`, `show` and `storedStamp`,
206
- * provided by the page's own script, and on the header buttons it builds (`btnBack`, `btnShelf`).
206
+ * provided by the page's own script, and on the header button it builds (`btnBack`).
207
207
  */
208
208
  export const CONVERSATIONS_VIEWS = `
209
209
  /** The one way this page puts text on the clipboard, calling back with what happened. */
@@ -295,11 +295,8 @@ function projectPicker(c, folders, after) {
295
295
  return box;
296
296
  }
297
297
 
298
- async function listView(shelf) {
299
- var archived = shelf === "archived";
300
- var mine = show(archived ? "archived" : "list", archived ? "Archived" : "Conversations");
301
- // Shown on the live list only (#3610): on the archived shelf the control that returns to the live list takes its place.
302
- btnShelf.onclick = function () { go("archived"); };
298
+ async function listView() {
299
+ var mine = show("list", "Conversations");
303
300
  var timer;
304
301
  var rows = [];
305
302
  var sort = { key: "updated", dir: -1 };
@@ -465,7 +462,7 @@ async function listView(shelf) {
465
462
  return;
466
463
  }
467
464
  if (col.plain) {
468
- // ONE action row for every session (#3614, #3916): Open, Stop, Archive/Restore, Delete, then the project slot.
465
+ // ONE action row for every session (#3614, #3916): Open, Stop, Delete, then the project slot.
469
466
  var actrow = el("div", "actrow");
470
467
  var acts = el("div", "acts");
471
468
  var open = el("button", "", "📂 Open");
@@ -479,11 +476,9 @@ async function listView(shelf) {
479
476
  };
480
477
  acts.append(halt);
481
478
  node.halt = halt;
482
- var move = el("button", "", archived ? "Restore" : "Archive");
483
- move.onclick = function (e) { e.stopPropagation(); act(move, "POST", "/v1/conversations/" + node.c.id + (archived ? "/unarchive" : "/archive")); };
484
479
  var drop = el("button", "bad", "Delete");
485
480
  drop.onclick = function (e) { e.stopPropagation(); act(drop, "POST", "/v1/conversations/" + node.c.id + "/delete"); };
486
- acts.append(move, drop);
481
+ acts.append(drop);
487
482
  actrow.append(acts);
488
483
  node.pick = projectPicker(node.c, folders, paint);
489
484
  actrow.append(node.pick);
@@ -538,7 +533,7 @@ async function listView(shelf) {
538
533
  if (shown.length === 0) {
539
534
  if (emptyRow === null) {
540
535
  emptyRow = el("tr");
541
- var cell = el("td", "empty", archived ? "Nothing archived." : "No conversations yet. Open one from the CLI page.");
536
+ var cell = el("td", "empty", "No conversations yet. Open one from the CLI page.");
542
537
  cell.colSpan = cols.length;
543
538
  emptyRow.append(cell);
544
539
  }
@@ -556,7 +551,7 @@ async function listView(shelf) {
556
551
  shown.forEach(function (c) { if (picked[c.id]) n++; });
557
552
  countEl.textContent = n === 0 ? "Select conversations to act on them." : n + " selected";
558
553
  if (selectAll !== null) { selectAll.checked = shown.length > 0 && n === shown.length; selectAll.indeterminate = n > 0 && n < shown.length; }
559
- [buttons.move, buttons.delete, buttons.clear].forEach(function (b) { if (b) b.disabled = n === 0; });
554
+ [buttons.delete, buttons.clear].forEach(function (b) { if (b) b.disabled = n === 0; });
560
555
  // Stop is offered only when at least one picked row has something to stop (#3614): a conversation already stopped has none.
561
556
  if (buttons.stop) buttons.stop.disabled = !shown.some(function (c) { return picked[c.id] === true && stoppable(c); });
562
557
  };
@@ -575,16 +570,16 @@ async function listView(shelf) {
575
570
  if (chosen.length === 0) return;
576
571
  // The batch applies to each row the SAME act that row's own button applies (#3614).
577
572
  var call = function (c) {
578
- if (which !== "stop") return api("POST", "/v1/conversations/" + c.id + (which === "delete" ? "/delete" : archived ? "/unarchive" : "/archive"));
573
+ if (which !== "stop") return api("POST", "/v1/conversations/" + c.id + "/delete");
579
574
  return api("DELETE", "/v1/conversations/" + c.id);
580
575
  };
581
- var word = which === "stop" ? "stopped" : which === "delete" ? "deleted" : archived ? "restored" : "archived";
576
+ var word = which === "stop" ? "stopped" : "deleted";
582
577
  // A row with nothing to stop is left alone and named as having nothing to stop — never called and then reported as
583
578
  // a failure for refusing, which is what a 404 for an already-ended CLI would look like (#3614).
584
579
  var acts = which === "stop" ? chosen.filter(stoppable) : chosen;
585
580
  var untouched = chosen.filter(function (c) { return !acts.includes(c); });
586
581
  noticeEl.className = "notice";
587
- noticeEl.textContent = (which === "delete" ? "Deleting " : which === "stop" ? "Stopping " : which === "move" ? (archived ? "Restoring " : "Archiving ") : "Working on ") + acts.length + (acts.length === 1 ? " conversation…" : " conversations…");
582
+ noticeEl.textContent = (which === "delete" ? "Deleting " : which === "stop" ? "Stopping " : "Working on ") + acts.length + (acts.length === 1 ? " conversation…" : " conversations…");
588
583
  var done = 0, failed = [];
589
584
  for (var i = 0; i < acts.length; i++) {
590
585
  markRowFailed(acts[i].id, null);
@@ -615,8 +610,7 @@ async function listView(shelf) {
615
610
  bar.append(b);
616
611
  return b;
617
612
  };
618
- if (!archived) mkButton("Stop", "", "stop");
619
- mkButton(archived ? "Restore" : "Archive", "", "move");
613
+ mkButton("Stop", "", "stop");
620
614
  mkButton("Delete", "bad", "delete");
621
615
  buttons.clear = el("button", "", "Clear");
622
616
  buttons.clear.disabled = true;
@@ -667,23 +661,12 @@ async function listView(shelf) {
667
661
  layout();
668
662
  };
669
663
 
670
- // 🔴 #4160 — the live list carries the count of archived conversations on the control that opens them, per provider in its hover.
671
- var countArchived = function () {
672
- return api("GET", "/v1/conversations?shelf=archived").then(function (data) {
673
- if (mine !== view) return;
674
- var by = {};
675
- data.conversations.forEach(function (c) { by[c.provider] = (by[c.provider] || 0) + 1; });
676
- btnShelf.textContent = "🗂️ Archived" + (data.conversations.length > 0 ? " · " + data.conversations.length : "");
677
- btnShelf.title = "Show the archived conversations" + Object.keys(by).sort().map(function (p) { return "\\n• " + p + ": " + by[p]; }).join("");
678
- });
679
- };
680
664
  var paint = function () {
681
- return api("GET", "/v1/conversations" + (archived ? "?shelf=archived" : "")).then(function (data) {
665
+ return api("GET", "/v1/conversations").then(function (data) {
682
666
  if (mine !== view) return;
683
667
  rows = data.conversations.slice();
684
668
  if (table === null) build();
685
669
  render();
686
- if (!archived) return countArchived();
687
670
  });
688
671
  };
689
672
  var again = function () { timer = setTimeout(run, 8000); };
@@ -50,14 +50,14 @@ main.cli-style .badge.history{color:#c3cad6;border-color:#3a4150;background:tran
50
50
  .line .tm table{border-collapse:collapse;width:100%}
51
51
  .line .tm td{padding:1px 4px;border-top:1px solid #2a303c;vertical-align:top;overflow-wrap:anywhere}
52
52
  main.cli-style p.system{color:var(--mut)}
53
- </style></head><body><header><button id="back" hidden>Back</button><h1 id="title">Conversations</h1><a href="/settings" style="color:inherit">⚙️ Settings</a><a href="/public-access" style="color:inherit">🌐 Public access</a><button id="newagent" hidden>+ New Agent</button><button id="convs" hidden title="Back to the live Conversations list">📋 Conversations</button><button id="shelf" hidden title="Show the archived conversations">🗂️ Archived</button><button id="logout" hidden>🚪 Logout</button></header>
53
+ </style></head><body><header><button id="back" hidden>Back</button><h1 id="title">Conversations</h1><a href="/settings" style="color:inherit">⚙️ Settings</a><a href="/public-access" style="color:inherit">🌐 Public access</a><button id="newagent" hidden>+ New Agent</button><button id="convs" hidden title="Back to the live Conversations list">📋 Conversations</button><button id="logout" hidden>🚪 Logout</button></header>
54
54
  ${servingLine()}<div id="status" role="status" hidden></div><main id="main"></main>
55
55
  <script>${js}
56
56
  ${fit}
57
57
  ${uni}</script><script>${PASSKEY_SCRIPT}
58
58
  ${SIGN_IN_SCRIPT}
59
59
  var main=document.getElementById("main"),note=document.getElementById("status"),title=document.getElementById("title");
60
- var btnBack=document.getElementById("back"),btnShelf=document.getElementById("shelf");
60
+ var btnBack=document.getElementById("back");
61
61
  var btnNew=document.getElementById("newagent"),btnConvs=document.getElementById("convs");
62
62
  var view=0,sent={},listResize=null,terminal,fitAddon,socket,reconnect,observer,arrival=null;
63
63
  var AGENTS = ${JSON.stringify(PROVIDER_CHOICES)};
@@ -77,14 +77,11 @@ function show(name,heading){
77
77
  view++;
78
78
  if(name!=="terminal"){clearTimeout(reconnect);if(socket){socket.onclose=null;socket.close();socket=null;}if(observer){observer.disconnect();observer=null;}if(terminal){terminal.dispose();terminal=null;}main.style.display="";main.style.flexDirection="";}
79
79
  title.textContent=heading;
80
- var inList=name==="list"||name==="archived";
80
+ var inList=name==="list";
81
81
  btnBack.hidden=inList||name==="signin";
82
82
  btnNew.hidden=!inList;
83
- // The control that returns to the live Conversations list is on screen everywhere it leads somewhere (#3610): the
84
- // archived shelf and every conversation view carry it, so Archived never leaves the browser's own Back as the only way out.
83
+ // Every conversation view carries the control that returns to the live Conversations list (#3610), so the browser's own Back is never the only way out.
85
84
  btnConvs.hidden=name==="signin"||name==="list";
86
- // The shelf control is shown only where it changes the shelf; on the archived shelf it would be a button that does nothing.
87
- btnShelf.hidden=name!=="list";
88
85
  note.hidden=name!=="terminal"&&name!=="new";
89
86
  btnLogout.hidden=name==="signin";
90
87
  expiryNotice.hidden=name==="signin";
@@ -119,7 +116,6 @@ function swap(name,id){
119
116
  }
120
117
  function render(state){
121
118
  if(state.view==="list")return listView();
122
- if(state.view==="archived")return listView("archived");
123
119
  if(state.view==="new")return newAgentView();
124
120
  return openRecordView(state.view,state.id);
125
121
  }
@@ -3238,6 +3238,11 @@ export function daemonWorkers(home = claudeHome()) {
3238
3238
  return "torn";
3239
3239
  return roster === "gone" ? new Map() : new Map(Object.entries(roster.workers));
3240
3240
  }
3241
+ /** 🔴 #4192 — whether Claude Code's daemon holds `jobId`, or its roster is mid-rewrite and so is read as holding it: the daemon's own roster, never the session registry, decides if a worker still needs its stop. */
3242
+ export function daemonHolds(jobId, home = claudeHome()) {
3243
+ const held = daemonWorkers(home);
3244
+ return held === "torn" || held.has(jobId);
3245
+ }
3241
3246
  // GATE: how long a stop waits for Claude Code's daemon to take the worker off its roster after `claude stop` answered — the daemon confirms the stop first and rewrites the roster after; past it the stop is read as not taken
3242
3247
  const DAEMON_RELEASE_WAIT_MS = 5_000;
3243
3248
  /** 🔴 #4192 — whether the daemon still holds `jobId` once it has had its wait to let it go; a torn roster is read again. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.379",
3
+ "version": "1.3.381",
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",