omni-notify-mcp 1.3.362 → 1.3.363

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.
@@ -1793,6 +1793,9 @@ export class OpenCodeTurn extends JsonlCliTurn {
1793
1793
  export const STORY_QUEUE_WIRE = 1;
1794
1794
  const PRI_ORDER = ["P0", "P1", "P2", "P3", "P4", "P5"];
1795
1795
  const EFFORT_ORDER = ["XS", "S", "M", "L", "XL"];
1796
+ /** 🔴 #4116 — the act a blocked worker waits on, in words. */
1797
+ // NULL-OK: field needs is OPTIONAL and therefore it is ok to check for NULL
1798
+ export const blockedAct = (worker) => (worker.needs === undefined ? "an act its job record does not name" : worker.needs);
1796
1799
  export const storyQueueDir = (board) => path.join(board, ".fleetview", "queue");
1797
1800
  const requestFile = (board, id) => path.join(storyQueueDir(board), "requests", `${id}.json`);
1798
1801
  const ackFile = (board, id) => path.join(storyQueueDir(board), "acks", `${id}.json`);
@@ -2143,7 +2146,7 @@ function afterWorker(e, now, why, retried = true) {
2143
2146
  /**
2144
2147
  * 🔴 ONE PASS OF FLEETVIEW'S STORY QUEUE ON ONE BOARD, under its lock: every request BB wrote is applied and acknowledged,
2145
2148
  * every worker is checked (a story shipped closes its entry; a worker that ended with the story still open is started
2146
- * again after its backoff), and the entries first in line are started while the machine runs fewer lanes than Meni's
2149
+ * again after its backoff), and the entries first in line are started while the board runs fewer lanes than Meni's
2147
2150
  * limit. An entry is written `starting` BEFORE its worker is launched, so a crash mid-start is found by its story on the
2148
2151
  * next pass and never gets a second worker.
2149
2152
  */
@@ -2215,6 +2218,25 @@ export async function driveStoryQueue(board, world, now) {
2215
2218
  e.state = "running";
2216
2219
  step(e, now, "started", w.why);
2217
2220
  }
2221
+ // NULL-OK: field worker is OPTIONAL and therefore it is ok to check for NULL
2222
+ if (e.worker !== undefined && ((w.blocked === true) !== (e.worker.blocked === true) || w.needs !== e.worker.needs)) {
2223
+ if (w.blocked === true) {
2224
+ e.worker.blocked = true;
2225
+ // NULL-OK: field needs is OPTIONAL and therefore it is ok to check for NULL
2226
+ if (w.needs === undefined)
2227
+ delete e.worker.needs;
2228
+ else
2229
+ e.worker.needs = w.needs;
2230
+ e.why = `its ${e.provider} worker ${e.worker.jobId} stopped and needs an act before it goes on: ${blockedAct(e.worker)}`;
2231
+ step(e, now, "blocked", e.why);
2232
+ }
2233
+ else {
2234
+ delete e.worker.blocked;
2235
+ delete e.worker.needs;
2236
+ e.why = w.why;
2237
+ step(e, now, "progress", `its worker ${e.worker.jobId} works again — ${w.why}`);
2238
+ }
2239
+ }
2218
2240
  if (w.progressAt !== undefined && e.worker !== undefined && w.progressAt !== e.worker.progressAt) {
2219
2241
  if (e.worker.progressAt === undefined)
2220
2242
  step(e, now, "progress", `its work first moved at ${new Date(w.progressAt).toISOString()}`);
@@ -2371,16 +2393,22 @@ const mtimeOf = (file) => {
2371
2393
  /** A story worker's liveness: a `claude --bg` job whose session a live process runs, with the moment its transcript last moved. */
2372
2394
  export function storyWorkerLiveness(worker, now, home = claudeHome()) {
2373
2395
  const job = jobRecordOf(worker.jobId, home);
2396
+ // NULL-OK: field needs is OPTIONAL and therefore it is ok to check for NULL
2397
+ const asLastRead = worker.blocked === true ? { blocked: true, ...(worker.needs === undefined ? {} : { needs: worker.needs }) } : {};
2374
2398
  if (job === "torn")
2375
- return { alive: true, why: `its job ${worker.jobId}'s record was caught mid-rewrite, so it is read again on the next pass` };
2399
+ return { alive: true, ...asLastRead, why: `its job ${worker.jobId}'s record was caught mid-rewrite, so it is read again on the next pass` };
2376
2400
  if (job === "gone")
2377
2401
  return { alive: false, why: `its job ${worker.jobId} is no longer on Claude Code's record` };
2378
2402
  const at = job.linkScanPath === undefined ? undefined : mtimeOf(job.linkScanPath);
2379
2403
  const progress = at === undefined ? {} : { progressAt: at };
2380
2404
  if (job.state === "done" || job.state === "stopped")
2381
2405
  return { alive: false, ...progress, why: `its job ${worker.jobId} ended ${job.state}` };
2382
- if (liveClaudeSessions(home).has(job.sessionId))
2406
+ if (liveClaudeSessions(home).has(job.sessionId)) {
2407
+ // NULL-OK: field needs is OPTIONAL and therefore it is ok to check for NULL
2408
+ if (job.state === "blocked")
2409
+ return { alive: true, ...progress, blocked: true, ...(job.needs === undefined ? {} : { needs: job.needs }), why: `its job ${worker.jobId} is blocked` };
2383
2410
  return { alive: true, ...progress, why: `its job ${worker.jobId} runs as session ${job.sessionId} (${job.state})` };
2411
+ }
2384
2412
  if (now - worker.startedAt < WORKER_START_GRACE_MS)
2385
2413
  return { alive: true, ...progress, why: `its job ${worker.jobId} was started ${Math.round((now - worker.startedAt) / 1000)}s ago and its process has not recorded itself yet` };
2386
2414
  return { alive: false, ...progress, why: `its job ${worker.jobId} reads ${job.state}, but no process on this machine runs session ${job.sessionId}` };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.362",
3
+ "version": "1.3.363",
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",