omni-notify-mcp 1.3.416 → 1.3.417

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.
@@ -2843,13 +2843,19 @@ function withdrawUntilAsked(board, e, now, why) {
2843
2843
  export async function clearStoryQueue(board, since) {
2844
2844
  return withQueueLock(board, Date.now(), async () => {
2845
2845
  const store = readQueueStore(board);
2846
+ const his = new Set(store.entries.filter((e) => (e.state === "queued" || e.state === "retrying") && hisOwn(e)));
2847
+ const untaken = new Set(requestedStories(board).filter((id) => {
2848
+ const r = readableRequest(board, id);
2849
+ // NULL-OK: field pressedAt is OPTIONAL and therefore it is ok to check for NULL
2850
+ return r !== undefined && r.origin === "press" && r.eligible && r.pressedAt !== undefined && (r.forced ?? r.pressedAt) > priorAuthorityOf(store.entries.find((e) => e.storyId === id));
2851
+ }));
2846
2852
  // NULL-OK: field worker/archivedSessions/handStop is OPTIONAL and therefore it is ok to check for NULL
2847
- const kept = store.entries.filter((e) => e.worker !== undefined || e.archivedSessions !== undefined || e.handStop !== undefined || (e.forceEventAt ?? 0) >= since);
2848
- const working = new Set(kept.filter((e) => e.state === "starting" || e.state === "running" || (e.forceEventAt ?? 0) >= since).map((e) => e.storyId));
2853
+ const kept = store.entries.filter((e) => e.worker !== undefined || e.archivedSessions !== undefined || e.handStop !== undefined || (e.forceEventAt ?? 0) >= since || his.has(e));
2854
+ const working = new Set([...kept.filter((e) => e.state === "starting" || e.state === "running" || (e.forceEventAt ?? 0) >= since || his.has(e)).map((e) => e.storyId), ...untaken]);
2849
2855
  let removed = store.entries.length - kept.length;
2850
2856
  const now = Date.now();
2851
2857
  for (const e of kept) {
2852
- if ((e.forceEventAt ?? 0) >= since)
2858
+ if ((e.forceEventAt ?? 0) >= since || his.has(e) || untaken.has(e.storyId))
2853
2859
  continue;
2854
2860
  e.landedAt = Math.max(e.landedAt ?? 0, since);
2855
2861
  delete e.forced;
@@ -3007,6 +3013,7 @@ function refusalOf(r) {
3007
3013
  return `provider "${r.provider}" is not started by this queue — choose Claude, Copilot, Codex, OpenCode or AUTO`;
3008
3014
  return undefined;
3009
3015
  }
3016
+ const priorAuthorityOf = (e) => Math.max(e?.startPressedAt ?? 0, e?.handStop?.at ?? 0, e?.worker?.startedAt ?? 0, e?.forceStartedAt ?? 0, e?.forceEventAt ?? 0);
3010
3017
  /** One request applied to the store: an entry made, updated, withdrawn or put back in line; answers the refusal when it cannot be queued. */
3011
3018
  function applyRequest(store, r, now) {
3012
3019
  const refused = refusalOf(r);
@@ -3016,7 +3023,7 @@ function applyRequest(store, r, now) {
3016
3023
  if (e?.requestId === r.requestId)
3017
3024
  return undefined;
3018
3025
  const intentAt = r.forced ?? r.pressedAt;
3019
- const priorAuthority = Math.max(e?.startPressedAt ?? 0, e?.handStop?.at ?? 0, e?.worker?.startedAt ?? 0, e?.forceStartedAt ?? 0, e?.forceEventAt ?? 0);
3026
+ const priorAuthority = priorAuthorityOf(e);
3020
3027
  const freshForce = r.forced !== undefined && r.forced > priorAuthority;
3021
3028
  const fields = { title: r.title, pri: r.pri, effort: r.effort, provider: r.provider, model: r.model, name: r.name, brief: r.brief, eligible: r.eligible, why: r.why };
3022
3029
  // NULL-OK: field e is OPTIONAL and therefore it is ok to check for NULL
@@ -274,6 +274,7 @@ const CONNECTION_SOURCE = String.raw `(function () {
274
274
  found = document.createElement("div");
275
275
  found.id = COVER;
276
276
  found.setAttribute("role", "alert");
277
+ found.setAttribute("data-be-notice", "own");
277
278
  found.style.cssText = "position:fixed;inset:0;z-index:2147483647;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.6);cursor:not-allowed;padding:16px;box-sizing:border-box";
278
279
  var word = document.createElement("div");
279
280
  word.className = "__bullseye-notice-text";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.416",
3
+ "version": "1.3.417",
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",