omni-notify-mcp 1.3.446 β†’ 1.3.447

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.
@@ -109,6 +109,8 @@ body.phone.term header,body.phone.term #status,body.phone.term #keybar{zoom:var(
109
109
  body.phone.term #keybar{display:flex}
110
110
  #keybar button{flex:1 1 0;min-width:40px;height:32px;min-height:32px;padding:0 4px;font-size:13px;line-height:1;justify-content:center;touch-action:manipulation;-webkit-user-select:none;user-select:none}
111
111
  #keybar button.armed{background:#2f6b45;border-color:#7ee2a8;color:#fff}
112
+ #typeahead{position:absolute;inset:0;z-index:5;pointer-events:none}
113
+ #typeahead span{position:absolute;text-align:center;overflow:hidden;white-space:pre;background:#101217;color:#d6dbe6;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,Roboto Mono,DejaVu Sans Mono,monospace}#typeahead .caret{background:#d6dbe6}
112
114
  </style></head><body><header><button id="back" hidden aria-label="Back">β€Ή<span class="lbl"> Back</span></button><button id="convs" class="tab" hidden aria-label="Conversations">πŸ’¬<span class="lbl"> Conversations</span></button><a class="tab" href="/settings">βš™οΈ<span class="lbl"> Settings</span></a><a class="tab" href="/public-access">🌐<span class="lbl"> Public access</span></a><h1 id="title">Conversations</h1><span class="grow"></span><span id="tools" class="tools toolbar"></span><button id="newagent" class="go keep" hidden>οΌ‹<span class="lbl"> New Agent</span></button><button id="logout" hidden aria-label="Logout">πŸšͺ<span class="lbl"> Logout</span></button></header>
113
115
  <div id="status" role="status"></div>${servingLine()}<main id="main"></main><div id="keybar" hidden></div>
114
116
  <script>${CONNECTION_SOURCE}</script><script>${js}
@@ -297,13 +299,99 @@ async function newAgentView(){
297
299
 
298
300
  async function cliAttach(id,origin){
299
301
  var mine=show("terminal","Native CLI Β· "+(phone?id.slice(0,8):id)),attach=tool("cli-send","πŸ“Ž","Send a file","","Send"),getFile=tool("cli-get","⬇","Get a file","","Get"),copy=tool("cli-copy","⧉",phone?"Copy the screen":"Copy selection","","Copy"),latest=tool("cli-newest","↓","Newest","latest"),reattach=tool("cli-reattach","πŸ”Œ","Reattach",""),close=tool("cli-close","⏹","Close CLI","bad"),host=el("div"),picker=el("input"),sheet=el("div","sheet");
300
- host.id="terminal";picker.type="file";picker.multiple=true;picker.hidden=true;picker.id="attach";sheet.hidden=true;main.style.display="flex";main.style.flexDirection="column";host.style.flex="1";host.style.minHeight="0";
302
+ host.id="terminal";picker.type="file";picker.multiple=true;picker.hidden=true;picker.id="attach";sheet.hidden=true;main.style.display="flex";main.style.flexDirection="column";host.style.flex="1";host.style.minHeight="0";host.style.position="relative";
301
303
  tools.replaceChildren(attach,getFile,copy,latest,reattach,close);main.append(picker,sheet,host);
302
304
  var cli={provider:"",project:"",failure:undefined};
303
305
  liveWatch({verb:"output",says:function(){return (cli.provider?cli.provider+" Β· "+base(cli.project)+" Β· ":"")+origin;},facts:function(){var whole=el("span","idrow"),code=el("code","conv-id",id);whole.append(code,copyControl(id));return [["Conversation",whole],["CLI",cli.provider||"not read yet"],["Folder",cli.project||"not read yet"],["Started by",origin]];}});
304
306
  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);
305
307
  terminal.loadAddon(new Unicode11Addon.Unicode11Addon());terminal.unicode.activeVersion="11";
306
308
  terminal.open(host);terminal.textarea.enterKeyHint="send";terminal.focus();var term=terminal;
309
+ var echo=el("div"),guess=[],wrap=null,popped={},cursorShown=true,hold=0,holdAt="",acked=0,hidden=false;echo.id="typeahead";host.append(echo);
310
+ var ONE_CELL=/^[\\x20-\\x7e\\u00a0-\\u02ff\\u0370-\\u03ff\\u0400-\\u0482\\u048a-\\u052f\\u05d0-\\u05f4\\u2010-\\u2027]$/;
311
+ function drawGuess(){
312
+ var b=term.buffer.active,screen=host.querySelector(".xterm-screen");
313
+ if((!guess.length&&!wrap)||hidden||!screen||b.viewportY!==b.baseY){echo.replaceChildren();return;}
314
+ var box=screen.getBoundingClientRect(),at=host.getBoundingClientRect(),w=box.width/term.cols,h=box.height/term.rows,cells=guess.slice(),caret;
315
+ if(wrap){
316
+ for(var x=wrap.ws;x<term.cols-2;x++)cells.push({row:wrap.row,col:x,ch:" "});
317
+ for(x=0;x<term.cols;x++){var i=x-wrap.indent;cells.push({row:wrap.row+1,col:x,ch:i>=0&&i<wrap.cont.length?wrap.cont[i].ch:" "});}
318
+ caret={row:wrap.row+1,col:wrap.indent+wrap.cont.length};
319
+ }else caret={row:guess[guess.length-1].row,col:guess[guess.length-1].col+1};
320
+ echo.replaceChildren.apply(echo,cells.concat([{row:caret.row,col:caret.col,ch:""}]).map(function(c,i){
321
+ var cell=el("span",i===cells.length?"caret":"",c.ch);cell.dataset.row=String(c.row);cell.dataset.col=String(c.col);
322
+ cell.style.left=(box.left-at.left+c.col*w)+"px";cell.style.top=(box.top-at.top+c.row*h)+"px";cell.style.width=w+"px";cell.style.height=h+"px";cell.style.lineHeight=h+"px";cell.style.fontSize=term.options.fontSize+"px";
323
+ return cell;
324
+ }));
325
+ }
326
+ function cursorAt(){var b=term.buffer.active;return b.cursorX+","+b.cursorY;}
327
+ function forget(){popped={};if(guess.length||wrap){guess=[];wrap=null;drawGuess();}}
328
+ function withhold(id){hold=Math.max(hold,id);holdAt=cursorAt();}
329
+ function drop(){withhold(Math.max(guess.length?guess[guess.length-1].id:0,wrap?wrap.last:0));guess=[];wrap=null;}
330
+ function rowText(row){
331
+ var b=term.buffer.active,line=b.getLine(b.baseY+row),cells=[];
332
+ for(var x=0;x<term.cols-2;x++)cells.push(line.getCell(x).getChars()||" ");
333
+ guess.forEach(function(c){if(c.row===row)cells[c.col]=c.ch;});
334
+ return cells.join("");
335
+ }
336
+ function wrapAt(row,id,ch){
337
+ var text=rowText(row),start=/^(\\S+\\s|\\s+)/.exec(text),indent=start?start[0].length:0;
338
+ if(indent>=term.cols-2||row+1>=term.rows)return false;
339
+ var space=text.lastIndexOf(" "),ws=ch!==" "&&space>=indent?space+1:term.cols-2,cont=[];
340
+ for(var x=ws;x<term.cols-2;x++){var mine=guess.filter(function(c){return c.row===row&&c.col===x;})[0];cont.push({ch:text[x],id:mine?mine.id:0});}
341
+ guess=guess.filter(function(c){return c.row!==row||c.col<ws;});
342
+ var word=cont.length;if(ch!==" ")cont.push({ch:ch,id:id});
343
+ wrap={row:row,ws:ws,indent:indent,word:word,cont:cont,head:text.slice(0,ws),last:id};
344
+ return true;
345
+ }
346
+ function predict(data,id){
347
+ var b=term.buffer.active;data=data.replace(/\\x1b\\[[IO]/g,"");
348
+ for(var i=0;i<data.length;i++){
349
+ var ch=data[i];
350
+ if(hold||b.viewportY!==b.baseY||(!guess.length&&!wrap&&!cursorShown)){withhold(id);break;}
351
+ if(wrap){
352
+ if(ch==="\\x7f"&&wrap.cont.length>wrap.word){wrap.cont.pop();continue;}
353
+ if(!ONE_CELL.test(ch)||ch==="\\x7f"||wrap.indent+wrap.cont.length>=term.cols-2){drop();withhold(id);break;}
354
+ wrap.cont.push({ch:ch,id:id});wrap.last=id;continue;
355
+ }
356
+ if(ch==="\\x7f"){if(!guess.length){withhold(id);break;}var gone=guess.pop();popped[gone.row+","+gone.col]=true;continue;}
357
+ if(!ONE_CELL.test(ch)){withhold(id);break;}
358
+ var at=guess.length?{row:guess[guess.length-1].row,col:guess[guess.length-1].col+1}:{row:b.cursorY,col:b.cursorX},lead=guess.length?null:/^(\\S+\\s|\\s+)/.exec(rowText(at.row));
359
+ if(!guess.length&&(!lead||at.col<lead[0].length)){withhold(id);break;}
360
+ if(at.col>=term.cols-2){if(!wrapAt(at.row,id,ch)){withhold(id);break;}continue;}
361
+ guess.push({row:at.row,col:at.col,ch:ch,id:id,rewrote:popped[at.row+","+at.col]===true});
362
+ }
363
+ drawGuess();
364
+ }
365
+ function wrapped(){
366
+ var b=term.buffer.active,y=b.cursorY,x=b.cursorX,n=x-wrap.indent,line=b.getLine(b.baseY+y),ok=n>=wrap.word&&n<=wrap.cont.length;
367
+ for(var i=0;ok&&i<n;i++)ok=(line.getCell(wrap.indent+i).getChars()||" ")===wrap.cont[i].ch;
368
+ if(ok){
369
+ guess=wrap.cont.slice(n).map(function(c,j){return {row:y,col:x+j,ch:c.ch,id:c.id,rewrote:false};});
370
+ wrap=null;
371
+ if(guess.length&&guess[guess.length-1].col>=term.cols-2)drop();
372
+ return "wrapped";
373
+ }
374
+ if(y!==wrap.row)return "wrong";
375
+ for(i=0;i<Math.min(x,wrap.ws);i++)if((line.getCell(i).getChars()||" ")!==wrap.head[i])return "wrong";
376
+ return "waiting";
377
+ }
378
+ function reconcile(seen){
379
+ if(!cursorShown)return;
380
+ var b=term.buffer.active;
381
+ if(wrap){var state=wrapped();if(state==="wrapped"){popped={};drawGuess();return;}if(state==="wrong"){drop();drawGuess();return;}}
382
+ if(hold&&!wrap){if(!guess.length&&seen>=hold&&cursorAt()!==holdAt){hold=0;hidden=false;}else if(!guess.length)return;}
383
+ if(!guess.length){drawGuess();return;}
384
+ var y=b.cursorY,x=b.cursorX,stale=false;
385
+ while(guess.length){
386
+ var c=guess[0];
387
+ if(c.row!==y||c.col>=x)break;
388
+ if((b.getLine(b.baseY+c.row).getCell(c.col).getChars()||" ")!==c.ch){stale=c.rewrote&&seen<guess[guess.length-1].id;if(!stale)drop();break;}
389
+ guess.shift();if(hold)holdAt=cursorAt();
390
+ }
391
+ if(guess.length&&!stale&&!wrap){if(guess[0].row!==y||guess[0].col!==x)drop();else if(hold&&seen>=hold)hidden=true;}
392
+ if(!guess.length&&!wrap)popped={};
393
+ drawGuess();
394
+ }
307
395
  // Reading back through the scrollback is the reader's own act, so it is never taken away from them: output arriving
308
396
  // while they are scrolled up leaves the view exactly where they put it, and ↓ Newest is the deliberate way back to the
309
397
  // newest line. The control is shown only when there is somewhere to go back to, so it is never a button that does
@@ -337,7 +425,7 @@ async function cliAttach(id,origin){
337
425
  },{passive:false,capture:true});
338
426
  host.addEventListener("touchend",startGlide,{passive:true,capture:true});
339
427
  host.addEventListener("touchcancel",stopGlide,{passive:true,capture:true});
340
- term.onScroll(syncLatest);
428
+ term.onScroll(function(){syncLatest();drawGuess();});
341
429
  term.onWriteParsed(syncLatest);
342
430
  // xterm turns every keystroke into the CLI's input, so Ctrl+C and Ctrl+V never reach the browser's own clipboard.
343
431
  // Returning false hands that one key back to the browser: Ctrl+C copies the selected text and does not interrupt
@@ -435,8 +523,8 @@ async function cliAttach(id,origin){
435
523
  },true);
436
524
  var keybar=document.getElementById("keybar"),ctrlHeld=false,ctrlKey=null;
437
525
  function disarm(){ctrlHeld=false;ctrlKey.classList.remove("armed");}
438
- var unacked=[],inputs=0,from=sender+"."+mine;function typed(body){if(term.options.disableStdin){liveNotice("Not sent β€” this CLI is no longer connected. Press πŸ”Œ Reattach.","error");return;}inputs+=1;var sent={id:inputs,frame:JSON.stringify(Object.assign({kind:"input",from:from,id:inputs},body))};unacked.push(sent);if(socket!==null&&socket.readyState===WebSocket.OPEN)socket.send(sent.frame);}
439
- function sendKey(data){if(ctrlHeld){disarm();data=ctrlBarSeq(data);}typed({data:data});}
526
+ var unacked=[],inputs=0,from=sender+"."+mine;function typed(body,mark){if(term.options.disableStdin){liveNotice("Not sent β€” this CLI is no longer connected. Press πŸ”Œ Reattach.","error");return;}inputs+=1;var sent={id:inputs,frame:JSON.stringify(Object.assign({kind:"input",from:from,id:inputs},body))};unacked.push(sent);if(socket!==null&&socket.readyState===WebSocket.OPEN)socket.send(sent.frame);mark(sent.id);}
527
+ function sendKey(data){if(ctrlHeld){disarm();data=ctrlBarSeq(data);}typed({data:data},withhold);}
440
528
  keybar.replaceChildren();keybar.hidden=false;
441
529
  [NEW_LINE].concat(KEY_BAR.slice(0,7),[{id:"ctrl",label:"Ctrl",title:"Ctrl (sticky)"}],KEY_BAR.slice(7)).forEach(function(key){
442
530
  var b=el("button","",key.label);b.setAttribute("aria-label",key.title);b.type="button";
@@ -445,7 +533,7 @@ async function cliAttach(id,origin){
445
533
  else b.onclick=function(){sendKey(key.seq[term.modes.applicationCursorKeysMode?1:0]);term.focus();};
446
534
  keybar.append(b);
447
535
  });
448
- term.onData(function(data){if(ctrlHeld&&data.length===1){disarm();data=ctrlByte(data);}typed({data:data});});term.onBinary(function(data){typed({data:btoa(data),binary:true});});
536
+ term.onData(function(data){if(ctrlHeld&&data.length===1){disarm();data=ctrlByte(data);}typed({data:data},function(id){predict(data,id);});});term.onBinary(function(data){typed({data:btoa(data),binary:true},withhold);});term.onResize(function(){forget();withhold(inputs);});
449
537
  refit=function(){if(mine!==view||!socket||socket.readyState!==WebSocket.OPEN||host.clientWidth===0||host.clientHeight===0)return;fitAddon.fit();ordered(id,"resize",{cols:term.cols,rows:term.rows});};
450
538
  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();};
451
539
  reattach.onclick=function(){cliAttach(id,origin);};
@@ -463,8 +551,8 @@ async function cliAttach(id,origin){
463
551
  var frames=Promise.resolve(),opened=false;
464
552
  setTimeout(function(){if(mine===view&&socket===ws&&ws.readyState===WebSocket.CONNECTING)abandon(ws,window.bullseyeConnection.failed());},window.bullseyeConnection.limit());
465
553
  ws.onopen=function(){if(mine!==view){ws.close();return;}opened=true;socketDown=false;heard();window.bullseyeConnection.opened(function(){return socket===ws&&ws.readyState===WebSocket.OPEN;},window.bullseyeConnection.live);term.options.disableStdin=false;refit();unacked.forEach(function(sent){ws.send(sent.frame);});term.focus();};
466
- ws.onmessage=function(event){if(socket===ws)heard();var frame=JSON.parse(event.data);if(frame.pong)return;if(frame.ack!==undefined){unacked=unacked.filter(function(sent){return sent.id>frame.ack;});return;}frames=frames.then(async function(){if(mine!==view)return;if(frame.files){if(frame.error)liveNotice(frame.error,"error");else{sentPaths=sentPaths.concat(frame.paths);liveNotice("Sent to CLI: "+frame.paths.map(function(sent){return phone?base(sent):sent;}).join(" Β· "));}return;}if(frame.error){liveNotice(frame.error,"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);cli.provider=frame.provider;cli.project=frame.project;liveRead();if(frame.ended)liveEnded("CLI ended"+(frame.failure?" Β· "+frame.failure:""));else if(frame.failure&&frame.failure!==cli.failure)liveNotice(frame.failure,"error");cli.failure=frame.failure;}).catch(fail);};
467
- ws.onclose=function(event){if(mine!==view)return;var ending=event.code===1000||(event.code===1008&&event.reason==="Sign in again");if(ending){term.options.disableStdin=true;unacked=[];}if(event.code===1000){socketDown=false;window.bullseyeConnection.live();liveEnded("CLI ended");return;}if(event.code===1008&&event.reason==="Sign in again"){socketDown=false;window.bullseyeConnection.live();signIn("Your sign-in expired. Sign in again to return to this CLI.");return;}again(opened?window.bullseyeConnection.closed(reattached):window.bullseyeConnection.failed());};
554
+ ws.onmessage=function(event){if(socket===ws)heard();var frame=JSON.parse(event.data);if(frame.pong)return;if(frame.ack!==undefined){acked=Math.max(acked,frame.ack);unacked=unacked.filter(function(sent){return sent.id>frame.ack;});return;}var seen=acked;frames=frames.then(async function(){if(mine!==view)return;if(frame.files){if(frame.error)liveNotice(frame.error,"error");else{sentPaths=sentPaths.concat(frame.paths);liveNotice("Sent to CLI: "+frame.paths.map(function(sent){return phone?base(sent):sent;}).join(" Β· "));}return;}if(frame.error){liveNotice(frame.error,"error");return;}var behind=frame.reset?term.buffer.active.baseY-term.buffer.active.viewportY:0;if(frame.reset){forget();cursorShown=true;term.reset();}var shown=frame.data.match(/\\x1b\\[\\?25[hl]/g);if(shown)cursorShown=shown[shown.length-1].slice(-1)==="h";await new Promise(function(done){term.write(frame.data,done);});if(mine!==view)return;reconcile(seen);if(behind>0)term.scrollLines(-behind);cli.provider=frame.provider;cli.project=frame.project;liveRead();if(frame.ended){forget();liveEnded("CLI ended"+(frame.failure?" Β· "+frame.failure:""));}else if(frame.failure&&frame.failure!==cli.failure)liveNotice(frame.failure,"error");cli.failure=frame.failure;}).catch(fail);};
555
+ ws.onclose=function(event){if(mine!==view)return;forget();var ending=event.code===1000||(event.code===1008&&event.reason==="Sign in again");if(ending){term.options.disableStdin=true;unacked=[];}if(event.code===1000){socketDown=false;window.bullseyeConnection.live();liveEnded("CLI ended");return;}if(event.code===1008&&event.reason==="Sign in again"){socketDown=false;window.bullseyeConnection.live();signIn("Your sign-in expired. Sign in again to return to this CLI.");return;}again(opened?window.bullseyeConnection.closed(reattached):window.bullseyeConnection.failed());};
468
556
  ws.onerror=function(){socketDown=true;liveFailed("reattaching to the same CLI…");};
469
557
  }
470
558
  // GATE: a reattach's read of its CLI that has not answered in this long is abandoned and asked again with backoff, so a dead link never leaves the page waiting on it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omni-notify-mcp",
3
- "version": "1.3.446",
3
+ "version": "1.3.447",
4
4
  "homepage": "https://www.npmjs.com/package/omni-notify-mcp",
5
5
  "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.",
6
6
  "main": "dist/daemon.js",