omni-notify-mcp 1.3.393 → 1.3.395
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/gateway/terminalPage.js +24 -10
- package/dist/shared/agentSession.js +56 -37
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ import { PASSKEY_SCRIPT } from "./passkeyDoor.js";
|
|
|
6
6
|
import { PROVIDER_CHOICES } from "./conversationOwner.js";
|
|
7
7
|
import { notificationStatusScript } from "./panelPage.js";
|
|
8
8
|
import { ICON_HEAD } from "./iconDoor.js";
|
|
9
|
-
import { CLI_SCROLLBACK_LINES } from "../shared/conversation/nativeTerminal.js";
|
|
9
|
+
import { CLI_SCROLLBACK_LINES, CLI_WINDOWS_PTY } from "../shared/conversation/nativeTerminal.js";
|
|
10
10
|
const require = createRequire(import.meta.url);
|
|
11
11
|
function asset(name, installed) {
|
|
12
12
|
const packaged = new URL("../vendor/terminal/" + name, import.meta.url);
|
|
@@ -227,7 +227,7 @@ async function newAgentView(){
|
|
|
227
227
|
|
|
228
228
|
async function cliAttach(id,origin){
|
|
229
229
|
var mine=show("terminal","Native CLI · "+(phone?id.slice(0,8):id)),toolbar=el("div","setup toolbar"),back=tool("↩","Back",""),reattach=tool("🔌","Reattach",""),copy=tool("⧉","Copy selection",""),latest=tool("↓","Newest","latest"),close=tool("⏹","Close CLI",""),host=el("div");host.id="terminal";main.style.display="flex";main.style.flexDirection="column";host.style.flex="1";host.style.minHeight="0";toolbar.append(back,reattach,copy,latest,close,el("span","origin",origin));main.append(toolbar,host);
|
|
230
|
-
terminal=new Terminal({cursorBlink:true,fontSize:Math.round(15*phoneScale),fontFamily:"ui-monospace,SFMono-Regular,Menlo,Consolas,Roboto Mono,DejaVu Sans Mono,monospace",scrollback:${CLI_SCROLLBACK_LINES},theme:{background:"#101217"},allowProposedApi:true});fitAddon=new FitAddon.FitAddon();terminal.loadAddon(fitAddon);
|
|
230
|
+
terminal=new Terminal({cursorBlink:true,fontSize:Math.round(15*phoneScale),fontFamily:"ui-monospace,SFMono-Regular,Menlo,Consolas,Roboto Mono,DejaVu Sans Mono,monospace",scrollback:${CLI_SCROLLBACK_LINES},windowsPty:${JSON.stringify(CLI_WINDOWS_PTY)},theme:{background:"#101217"},allowProposedApi:true});fitAddon=new FitAddon.FitAddon();terminal.loadAddon(fitAddon);
|
|
231
231
|
terminal.loadAddon(new Unicode11Addon.Unicode11Addon());terminal.unicode.activeVersion="11";
|
|
232
232
|
terminal.open(host);terminal.textarea.enterKeyHint="send";terminal.focus();var term=terminal;
|
|
233
233
|
// Reading back through the scrollback is the reader's own act, so it is never taken away from them: output arriving
|
|
@@ -237,18 +237,32 @@ async function cliAttach(id,origin){
|
|
|
237
237
|
var atNewest=function(){var b=term.buffer.active;return b.viewportY>=b.baseY;};
|
|
238
238
|
var syncLatest=function(){latest.hidden=atNewest();};
|
|
239
239
|
latest.onclick=function(){term.scrollToBottom();term.focus();syncLatest();};
|
|
240
|
-
var swipeY=0,swipeX=0,swipeTravel=0;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
var touch=event.touches[0],dy=swipeY-touch.clientY,dx=swipeX-touch.clientX;swipeY=touch.clientY;swipeX=touch.clientX;
|
|
244
|
-
if(Math.abs(dx)>Math.abs(dy))return;
|
|
245
|
-
event.preventDefault();event.stopPropagation();swipeTravel+=dy;
|
|
240
|
+
var swipeY=0,swipeX=0,swipeTravel=0,swipeAt=0,swipeSpeed=0,glide=0;
|
|
241
|
+
function pan(dy){
|
|
242
|
+
swipeTravel+=dy;
|
|
246
243
|
while(Math.abs(swipeTravel)>=20){
|
|
247
244
|
var down=swipeTravel>0;swipeTravel-=down?20:-20;
|
|
248
245
|
if(term.modes.mouseTrackingMode==="none"){if(term.buffer.active.type==="alternate")ordered(id,"input",{data:(term.modes.applicationCursorKeysMode?"\\x1bO":"\\x1b[")+(down?"B":"A")});else term.scrollLines(down?1:-1);}
|
|
249
246
|
else ordered(id,"input",{data:"\\x1b[<"+(down?65:64)+";"+Math.ceil(term.cols/2)+";"+Math.ceil(term.rows/2)+"M"});
|
|
250
247
|
}
|
|
248
|
+
}
|
|
249
|
+
// A phone's own scroller keeps gliding after the finger lifts, at the speed the finger left with, and slows to a stop:
|
|
250
|
+
// the release velocity (px/ms, smoothed over the last moves) decays by a constant factor per millisecond.
|
|
251
|
+
function stopGlide(){if(glide){cancelAnimationFrame(glide);glide=0;}}
|
|
252
|
+
function startGlide(){
|
|
253
|
+
var last=performance.now(),speed=swipeSpeed;
|
|
254
|
+
if(performance.now()-swipeAt>80||Math.abs(speed)<0.05)return;
|
|
255
|
+
var tick=function(now){if(mine!==view){glide=0;return;}var dt=Math.max(now-last,0);last=Math.max(now,last);pan(speed*dt);speed*=Math.pow(0.995,dt);if(Math.abs(speed)<0.02){glide=0;return;}glide=requestAnimationFrame(tick);};
|
|
256
|
+
glide=requestAnimationFrame(tick);
|
|
257
|
+
}
|
|
258
|
+
host.addEventListener("touchstart",function(event){stopGlide();swipeY=event.touches[0].clientY;swipeX=event.touches[0].clientX;swipeTravel=0;swipeSpeed=0;swipeAt=performance.now();},{passive:true,capture:true});
|
|
259
|
+
host.addEventListener("touchmove",function(event){
|
|
260
|
+
var touch=event.touches[0],dy=swipeY-touch.clientY,dx=swipeX-touch.clientX,now=performance.now(),dt=Math.max(now-swipeAt,1);swipeY=touch.clientY;swipeX=touch.clientX;
|
|
261
|
+
if(Math.abs(dx)>Math.abs(dy))return;
|
|
262
|
+
event.preventDefault();event.stopPropagation();swipeSpeed=0.7*swipeSpeed+0.3*(dy/dt);swipeAt=now;pan(dy);
|
|
251
263
|
},{passive:false,capture:true});
|
|
264
|
+
host.addEventListener("touchend",startGlide,{passive:true,capture:true});
|
|
265
|
+
host.addEventListener("touchcancel",stopGlide,{passive:true,capture:true});
|
|
252
266
|
term.onScroll(syncLatest);
|
|
253
267
|
term.onWriteParsed(syncLatest);
|
|
254
268
|
// xterm turns every keystroke into the CLI's input, so Ctrl+C and Ctrl+V never reach the browser's own clipboard.
|
|
@@ -296,7 +310,7 @@ async function cliAttach(id,origin){
|
|
|
296
310
|
},true);
|
|
297
311
|
term.onData(function(data){ordered(id,"input",{data:data});});term.onBinary(function(data){ordered(id,"input",{data:btoa(data),binary:true});});
|
|
298
312
|
refit=function(){if(mine!==view||!socket||socket.readyState!==WebSocket.OPEN)return;fitAddon.fit();ordered(id,"resize",{cols:term.cols,rows:term.rows});};
|
|
299
|
-
observer=new ResizeObserver(refit);
|
|
313
|
+
if(observer)observer.disconnect();observer=new ResizeObserver(refit);host.addEventListener("pointerdown",refit);host.addEventListener("touchstart",refit,{passive:true});var wake=function(){if(!document.hidden)refit();},off=observer.disconnect.bind(observer);window.addEventListener("focus",wake);document.addEventListener("visibilitychange",wake);observer.disconnect=function(){window.removeEventListener("focus",wake);document.removeEventListener("visibilitychange",wake);off();};
|
|
300
314
|
reattach.onclick=function(){cliAttach(id,origin);};
|
|
301
315
|
back.onclick=goBack;
|
|
302
316
|
close.onclick=async function(){close.disabled=true;try{await api("DELETE","/v1/terminals/"+id);swap("list");}catch(error){close.disabled=false;fail(error);}};
|
|
@@ -307,7 +321,7 @@ async function cliAttach(id,origin){
|
|
|
307
321
|
var ws=new WebSocket((location.protocol==="https:"?"wss://":"ws://")+location.host+"/v1/terminals/"+id+"/ws",["bn-terminal","bn-bearer."+token]);socket=ws;
|
|
308
322
|
var frames=Promise.resolve();
|
|
309
323
|
ws.onopen=function(){if(mine!==view){ws.close();return;}term.options.disableStdin=false;fitAddon.fit();ordered(id,"resize",{cols:term.cols,rows:term.rows});term.focus();};
|
|
310
|
-
ws.onmessage=function(event){frames=frames.then(async function(){if(mine!==view)return;var frame=JSON.parse(event.data);if(frame.files){fileNotice=frame.error||"Sent to CLI: "+frame.paths.join(" · ");note.textContent=fileNotice;return;}if(frame.error){note.textContent=frame.error;return;}if(frame.reset)term.reset();await new Promise(function(done){term.write(frame.data,done);});if(mine!==view)return;note.textContent=frame.provider+" · "+(phone?base(frame.project):frame.project)+(frame.ended?" · CLI ended":" · connected")+(frame.failure?" · "+frame.failure:"")+(fileNotice?" · "+fileNotice:"");}).catch(fail);};
|
|
324
|
+
ws.onmessage=function(event){frames=frames.then(async function(){if(mine!==view)return;var frame=JSON.parse(event.data);if(frame.files){fileNotice=frame.error||"Sent to CLI: "+frame.paths.join(" · ");note.textContent=fileNotice;return;}if(frame.error){note.textContent=frame.error;return;}var behind=frame.reset?term.buffer.active.baseY-term.buffer.active.viewportY:0;if(frame.reset)term.reset();await new Promise(function(done){term.write(frame.data,done);});if(mine!==view)return;if(behind>0)term.scrollLines(-behind);note.textContent=frame.provider+" · "+(phone?base(frame.project):frame.project)+(frame.ended?" · CLI ended":" · connected")+(frame.failure?" · "+frame.failure:"")+(fileNotice?" · "+fileNotice:"");}).catch(fail);};
|
|
311
325
|
ws.onclose=function(event){if(mine!==view)return;term.options.disableStdin=true;if(event.code===1000){note.textContent="CLI ended.";return;}if(event.code===1008){note.textContent="Disconnected: "+event.reason+". Press Reattach or sign in again.";return;}note.textContent="Disconnected. Reattaching to the same CLI…";reconnect=setTimeout(connect,1000);};
|
|
312
326
|
ws.onerror=function(){note.textContent="Terminal connection failed. Reconnecting…";};
|
|
313
327
|
}
|
|
@@ -2830,6 +2830,8 @@ export async function recordQueueNativeStopResult(board, tokens, result, now) {
|
|
|
2830
2830
|
});
|
|
2831
2831
|
}
|
|
2832
2832
|
const IN_LINE = new Set(["queued", "starting", "running", "retrying", "failed"]);
|
|
2833
|
+
/** The states that wait to be started: his places count among these only, so a story that started or finished never shifts a place he chose. */
|
|
2834
|
+
const WAITING_STATES = new Set(["queued", "retrying", "failed"]);
|
|
2833
2835
|
const rankIn = (order, value) => order.indexOf(value);
|
|
2834
2836
|
/**
|
|
2835
2837
|
* The queue's order: automatic entries P0 → P5, then XS → XL inside a priority, then arrival; each entry he placed sits at
|
|
@@ -2837,19 +2839,21 @@ const rankIn = (order, value) => order.indexOf(value);
|
|
|
2837
2839
|
*/
|
|
2838
2840
|
export function queueOrder(store) {
|
|
2839
2841
|
const line = store.entries.filter((e) => IN_LINE.has(e.state));
|
|
2840
|
-
const
|
|
2841
|
-
const
|
|
2842
|
-
const
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2842
|
+
const byPriority = (x, y) => rankIn(PRI_ORDER, x.pri) - rankIn(PRI_ORDER, y.pri) || rankIn(EFFORT_ORDER, x.effort) - rankIn(EFFORT_ORDER, y.effort) || x.seq - y.seq;
|
|
2843
|
+
const started = line.filter((e) => !WAITING_STATES.has(e.state)).sort(byPriority);
|
|
2844
|
+
const waiting = line.filter((e) => WAITING_STATES.has(e.state));
|
|
2845
|
+
const placed = waiting.filter((e) => e.manual !== undefined).sort((x, y) => x.manual - y.manual || x.seq - y.seq);
|
|
2846
|
+
return [...started, ...placed, ...waiting.filter((e) => e.manual === undefined).sort(byPriority)];
|
|
2847
|
+
}
|
|
2848
|
+
/** His order of the waiting stories: each is stamped with its place in `order`, so the order holds whichever story starts, finishes or arrives — a story he never placed waits behind the ones he ordered, by priority and size. */
|
|
2849
|
+
function stampOrder(order) {
|
|
2850
|
+
order.forEach((e, place) => { e.manual = place; });
|
|
2846
2851
|
}
|
|
2847
|
-
/** His placement of `e` at the 0-based place `k
|
|
2852
|
+
/** His placement of `e` at the 0-based place `k` among the waiting stories (a place past the line is its end). */
|
|
2848
2853
|
function placeAt(store, e, k) {
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
e.manual = k;
|
|
2854
|
+
const rest = queueOrder(store).filter((x) => x !== e && WAITING_STATES.has(x.state));
|
|
2855
|
+
rest.splice(Math.min(k, rest.length), 0, e);
|
|
2856
|
+
stampOrder(rest);
|
|
2853
2857
|
}
|
|
2854
2858
|
const step = (e, at, stage, detail) => {
|
|
2855
2859
|
const last = e.trace[e.trace.length - 1];
|
|
@@ -3095,6 +3099,8 @@ export const RETRY_BASE_MS = 60_000;
|
|
|
3095
3099
|
export const REARM_BASE_MS = RETRY_BASE_MS * 2 ** WORKER_ATTEMPTS;
|
|
3096
3100
|
// GATE: how many times the wait before a given-up story is offered again doubles — past it the story is offered every REARM_BASE_MS * 2^REARM_DOUBLINGS (32 min), so an open story is never left unworked for good
|
|
3097
3101
|
export const REARM_DOUBLINGS = 2;
|
|
3102
|
+
// GATE: how long a done story's archived Claude Code conversation is kept after its archive — past it the queue deletes every file of it, and a story that comes back later starts afresh
|
|
3103
|
+
export const ARCHIVE_KEPT_DAYS = 7;
|
|
3098
3104
|
/** 🔴 #4123 — how long after the queue gave up on a story it is offered to the line again. */
|
|
3099
3105
|
export const rearmDelayMs = (attempts) => REARM_BASE_MS * 2 ** Math.min(Math.max(attempts - WORKER_ATTEMPTS, 0), REARM_DOUBLINGS);
|
|
3100
3106
|
/** The acks the passes' requests call for: one per request read, carrying its entry's state and place, rewritten only when one of them changed. */
|
|
@@ -3242,6 +3248,24 @@ const inArchive = (worker) => worker !== undefined && (worker.archivedAt !== und
|
|
|
3242
3248
|
/** 🔴 #4188 — a queued row that keeps a parked worker no process runs: it waits in line, to be woken in its own session — it is no running worker, and it has one to wake. */
|
|
3243
3249
|
// NULL-OK: field parkedAt is OPTIONAL and therefore it is ok to check for NULL
|
|
3244
3250
|
const parkedInLine = (e) => e.state === "queued" && e.worker?.parkedAt !== undefined && !inArchive(e.worker);
|
|
3251
|
+
/**
|
|
3252
|
+
* 🔴 #4234 — why a done story's archived Claude Code conversations are past the days they are kept, or undefined while they are not:
|
|
3253
|
+
* an archived worker ages from its own archive, and an entry left holding only archived sessions from the last thing that happened
|
|
3254
|
+
* to it — a refusal of its own delete is no such thing. A Codex worker's archive is Codex's own, brought back through its thread, so it never ages out here.
|
|
3255
|
+
*/
|
|
3256
|
+
function agedOutWhy(e, now) {
|
|
3257
|
+
const worker = e.worker;
|
|
3258
|
+
// NULL-OK: field worker is OPTIONAL and therefore it is ok to check for NULL
|
|
3259
|
+
if (worker !== undefined && (worker.provider !== "claude" || worker.session === undefined))
|
|
3260
|
+
return undefined;
|
|
3261
|
+
// NULL-OK: field worker is OPTIONAL and therefore it is ok to check for NULL
|
|
3262
|
+
const since = worker === undefined ? e.trace.slice().reverse().find((t) => t.stage !== "archive-refused").at : worker.archivedAt;
|
|
3263
|
+
if (now < since + ARCHIVE_KEPT_DAYS * 86_400_000)
|
|
3264
|
+
return undefined;
|
|
3265
|
+
const day = new Date(since).toISOString().slice(0, 10);
|
|
3266
|
+
// NULL-OK: field worker is OPTIONAL and therefore it is ok to check for NULL
|
|
3267
|
+
return `${worker === undefined ? `nothing has happened to it since ${day}` : `its conversation was archived on ${day}`}, past the ${ARCHIVE_KEPT_DAYS} days an archive is kept`;
|
|
3268
|
+
}
|
|
3245
3269
|
/** 🔴 #4143 — an archive or bring-back is tried at once, and one that was refused only after the wake's wait for its run of refusals. */
|
|
3246
3270
|
// NULL-OK: field archiveRefused is OPTIONAL and therefore it is ok to check for NULL
|
|
3247
3271
|
const archiveDue = (holder, now) => holder.archiveRefused === undefined || now >= holder.archiveRefused.at + wakeDelayMs(holder.archiveRefused.times - 1);
|
|
@@ -3328,7 +3352,7 @@ export async function driveStoryQueue(board, world, now) {
|
|
|
3328
3352
|
// NULL-OK: field holder is OPTIONAL and therefore it is ok to check for NULL
|
|
3329
3353
|
if (!IN_LINE.has(e.state) && holder !== undefined && archiveDue(holder, now)) {
|
|
3330
3354
|
const worker = e.worker;
|
|
3331
|
-
const cold = world.coldWhy(e.storyId);
|
|
3355
|
+
const cold = world.coldWhy(e.storyId) ?? agedOutWhy(e, now);
|
|
3332
3356
|
// NULL-OK: field cold is OPTIONAL and therefore it is ok to check for NULL
|
|
3333
3357
|
if (cold !== undefined) {
|
|
3334
3358
|
// NULL-OK: field worker is OPTIONAL and therefore it is ok to check for NULL
|
|
@@ -3762,6 +3786,7 @@ export async function driveStoryQueue(board, world, now) {
|
|
|
3762
3786
|
save();
|
|
3763
3787
|
// NULL-OK: field stopped is OPTIONAL and therefore it is ok to check for NULL
|
|
3764
3788
|
const halted = store.stopped === undefined ? undefined : `the queue is stopped (${store.stopped.by}), so nothing more starts or wakes until ▶ Run`;
|
|
3789
|
+
let lanes = world.lanesRunning();
|
|
3765
3790
|
for (const e of queueOrder(store)) {
|
|
3766
3791
|
try {
|
|
3767
3792
|
const sessionId = wakeable.get(e);
|
|
@@ -3783,6 +3808,11 @@ export async function driveStoryQueue(board, world, now) {
|
|
|
3783
3808
|
unwoken(`its worker ${parked.jobId} is parked, and ${halted}`);
|
|
3784
3809
|
continue;
|
|
3785
3810
|
}
|
|
3811
|
+
if (lanes >= world.limit && e.forced !== true) {
|
|
3812
|
+
unwoken(`its worker ${parked.jobId} is parked, and ${lanes} lanes run with this workspace's lane limit at ${world.limit}, so it is woken when one finishes`);
|
|
3813
|
+
continue;
|
|
3814
|
+
}
|
|
3815
|
+
lanes += 1;
|
|
3786
3816
|
const wakes = (parked.wakes ?? 0) + 1;
|
|
3787
3817
|
try {
|
|
3788
3818
|
const woken = await world.wake(e, board, sessionId, wakeMessage(e.storyId), worker => { e.worker = worker; save(); });
|
|
@@ -3919,6 +3949,11 @@ export async function driveStoryQueue(board, world, now) {
|
|
|
3919
3949
|
continue;
|
|
3920
3950
|
}
|
|
3921
3951
|
}
|
|
3952
|
+
if (lanes >= world.limit && e.forced !== true) {
|
|
3953
|
+
holdBack(e, now, "held-back", `${lanes} lanes run and this workspace's lane limit is ${world.limit}, so it starts when one finishes`);
|
|
3954
|
+
continue;
|
|
3955
|
+
}
|
|
3956
|
+
lanes += 1;
|
|
3922
3957
|
world.seat(e);
|
|
3923
3958
|
// NULL-OK: field forcedBy is OPTIONAL and therefore it is ok to check for NULL
|
|
3924
3959
|
const forcer = e.forcedBy ?? "an unrecorded presser's";
|
|
@@ -4111,51 +4146,35 @@ export async function placeStory(board, storyId, place, now, by) {
|
|
|
4111
4146
|
if (place === "auto")
|
|
4112
4147
|
delete e.manual;
|
|
4113
4148
|
else
|
|
4114
|
-
placeAt(store, e, place);
|
|
4149
|
+
placeAt(store, e, Math.max(0, place - store.entries.filter((x) => IN_LINE.has(x.state) && !WAITING_STATES.has(x.state)).length));
|
|
4115
4150
|
step(e, now, "placed", place === "auto" ? `${by} move handed it back to priority and size` : `${by} move put it at place ${place + 1}`);
|
|
4116
4151
|
writeStore(board, store);
|
|
4117
4152
|
return e;
|
|
4118
4153
|
});
|
|
4119
4154
|
}
|
|
4120
|
-
const WAITING_STATES = new Set(["queued", "retrying", "failed"]);
|
|
4121
4155
|
/**
|
|
4122
4156
|
* 🔴 #4354 — HIS MOVE OF ONE OR SEVERAL WAITING STORIES, ATOMIC AND MINIMAL: under ONE lock the line is read, `decide` is handed the waiting
|
|
4123
4157
|
* stories (the ones named in `visible` when given) in their order and answers the new order and which stories moved, and the store is
|
|
4124
4158
|
* written ONCE with each moved story, and each story he placed before, put at the place it holds in the new line — so a queue pass never
|
|
4125
4159
|
* reads half a move, and a story that arrives later still sorts by priority and size around the places he pinned. Throws {@link NotInQueue}
|
|
4126
|
-
* for a story the line does not wait on
|
|
4160
|
+
* for a story the line does not wait on; a move that changes nothing writes nothing; answers the new waiting order.
|
|
4127
4161
|
*/
|
|
4128
4162
|
export async function placeWaiting(board, now, by, decide, visible) {
|
|
4129
4163
|
return withQueueLock(board, now, async () => {
|
|
4130
4164
|
const store = readQueueStore(board);
|
|
4131
|
-
const line = queueOrder(store);
|
|
4132
|
-
const waiting = line.filter((e) =>
|
|
4165
|
+
const line = queueOrder(store).filter((e) => WAITING_STATES.has(e.state));
|
|
4166
|
+
const waiting = line.filter((e) => visible === undefined || visible.includes(e.storyId)).map((e) => e.storyId);
|
|
4133
4167
|
const { next, moved } = decide(waiting);
|
|
4134
4168
|
for (const id of moved)
|
|
4135
4169
|
if (!waiting.includes(id))
|
|
4136
4170
|
throw new NotInQueue(board, id);
|
|
4171
|
+
if (next.join() === waiting.join())
|
|
4172
|
+
return waiting;
|
|
4137
4173
|
const refill = next.slice();
|
|
4138
|
-
const
|
|
4139
|
-
|
|
4140
|
-
const place = (target, ids) => {
|
|
4141
|
-
for (const id of [...ids].sort((a, b) => slotOf.get(a) - slotOf.get(b)))
|
|
4142
|
-
placeAt(target, target.entries.find((x) => x.storyId === id && IN_LINE.has(x.state)), slotOf.get(id));
|
|
4143
|
-
};
|
|
4144
|
-
const wanted = (target) => queueOrder(target).filter((e) => waiting.includes(e.storyId)).map((e) => e.storyId).join() === next.join();
|
|
4145
|
-
const placed = new Set([...moved, ...line.filter((e) => e.manual !== undefined).map((e) => e.storyId)]);
|
|
4146
|
-
let pins = placed;
|
|
4147
|
-
const probe = structuredClone(store);
|
|
4148
|
-
place(probe, pins);
|
|
4149
|
-
if (!wanted(probe)) {
|
|
4150
|
-
pins = new Set([...placed, ...waiting]);
|
|
4151
|
-
const all = structuredClone(store);
|
|
4152
|
-
place(all, pins);
|
|
4153
|
-
if (!wanted(all))
|
|
4154
|
-
throw new StoryPressRefused(`the new order of ${next.map((id) => `#${id}`).join(", ")} could not be held by the line as it stands, so nothing was moved`);
|
|
4155
|
-
}
|
|
4156
|
-
place(store, pins);
|
|
4174
|
+
const ordered = line.map((e) => (waiting.includes(e.storyId) ? refill.shift() : e.storyId));
|
|
4175
|
+
stampOrder(ordered.map((id) => line.find((e) => e.storyId === id)));
|
|
4157
4176
|
for (const id of moved)
|
|
4158
|
-
step(
|
|
4177
|
+
step(line.find((e) => e.storyId === id), now, "placed", `${by} move put it at place ${ordered.indexOf(id) + 1}`);
|
|
4159
4178
|
writeStore(board, store);
|
|
4160
4179
|
return queueOrder(store).filter((e) => waiting.includes(e.storyId)).map((e) => e.storyId);
|
|
4161
4180
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omni-notify-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.395",
|
|
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",
|