omni-notify-mcp 1.3.391 → 1.3.393

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.
@@ -53,7 +53,13 @@ main.cli-style .badge.history{color:#c3cad6;border-color:#3a4150;background:tran
53
53
  .line .tm table{border-collapse:collapse;width:100%}
54
54
  .line .tm td{padding:1px 4px;border-top:1px solid #2a303c;vertical-align:top;overflow-wrap:anywhere}
55
55
  main.cli-style p.system{color:var(--mut)}
56
- @media(max-width:480px) and (pointer:coarse){header{flex-wrap:nowrap}main{padding:6px}.setup select,.setup input{flex:1 1 100%;min-height:40px}.setup.toolbar{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch}.setup.toolbar>*{flex:none}#status{padding:2px 8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.origin{display:inline-flex;align-items:center;min-height:32px}}
56
+ @media(max-width:480px) and (pointer:coarse){header{flex-wrap:nowrap}main{padding:6px}.setup select,.setup input{flex:1 1 100%;min-height:40px}#status{padding:2px 8px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.origin{display:inline-flex;align-items:center;min-height:32px}}
57
+ /* A phone's CLI view shows the terminal and its few controls and nothing wider than the glass: the account links, the delivery panel and the build line belong to the list, and the toolbar wraps, its buttons icon-only. */
58
+ body.phone.term header>a,body.phone.term #convs,body.phone.term #logout,body.phone.term #serving,body.phone.term #notification-status{display:none!important}
59
+ body.phone.term header{overflow:visible;flex-wrap:nowrap}body.phone.term header h1{flex:1 1 0;min-width:0;max-width:none}
60
+ body.phone.term .setup.toolbar{flex-wrap:wrap;overflow:visible;gap:6px}body.phone .toolbar .lbl{display:none}body.phone .toolbar button{min-width:44px;justify-content:center}
61
+ body.phone.term #status{display:block;-webkit-line-clamp:unset;overflow:visible}
62
+ body.phone.term header,body.phone.term #status,body.phone.term .toolbar{zoom:var(--k,1)}
57
63
  </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>
58
64
  ${servingLine()}<div id="status" role="status" hidden></div><main id="main"></main>
59
65
  <script>${js}
@@ -63,7 +69,15 @@ ${SIGN_IN_SCRIPT}
63
69
  var main=document.getElementById("main"),note=document.getElementById("status"),title=document.getElementById("title");
64
70
  var btnBack=document.getElementById("back");
65
71
  var btnNew=document.getElementById("newagent"),btnConvs=document.getElementById("convs");
72
+ // A phone is a touch screen no wider than 600px on its short side. Its normal mode lays the page out at the screen's own width; its desktop-site mode lays it out wider and shrinks it to the glass, so everything the page draws outside the terminal is scaled up by that ratio and the terminal's font with it.
73
+ var phone,phoneScale,refit=function(){};
74
+ function sizePhone(){
75
+ phone=matchMedia("(pointer:coarse)").matches&&Math.min(screen.width,screen.height)<=600;phoneScale=phone?Math.min(3,Math.max(1,innerWidth/screen.width)):1;
76
+ document.body.classList.toggle("phone",phone);document.documentElement.style.setProperty("--k",String(phoneScale));
77
+ if(terminal&&terminal.options.fontSize!==Math.round(15*phoneScale)){terminal.options.fontSize=Math.round(15*phoneScale);refit();}
78
+ }
66
79
  var view=0,sent={},listResize=null,terminal,fitAddon,socket,reconnect,observer,arrival=null;
80
+ sizePhone();window.addEventListener("resize",sizePhone);
67
81
  var AGENTS = ${JSON.stringify(PROVIDER_CHOICES)};
68
82
  var storedStamp = ${storedStamp.toString()};
69
83
  // The panel that hosts this page (#2726) hands its token over once in the URL fragment, which no request and no
@@ -78,6 +92,9 @@ if(deepLink.get("view")&&deepLink.get("id")){arrival={view:deepLink.get("view"),
78
92
 
79
93
  function el(tag,cls,content){var node=document.createElement(tag);if(cls)node.className=cls;if(content!==undefined)node.textContent=content;return node;}
80
94
 
95
+ /** A toolbar button: its icon always, its words beside it except on a phone, where the icon alone keeps every control on the screen. */
96
+ function tool(icon,label,cls){var b=el("button",cls,icon);b.append(" ",el("span","lbl",label));b.setAttribute("aria-label",label);return b;}
97
+
81
98
  function show(name,heading){
82
99
  view++;
83
100
  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="";}
@@ -91,6 +108,7 @@ function show(name,heading){
91
108
  btnLogout.hidden=name==="signin";
92
109
  expiryNotice.hidden=name==="signin";
93
110
  main.classList.toggle("scroll",name!=="terminal");
111
+ document.body.classList.toggle("term",name==="terminal");
94
112
  main.classList.toggle("cli-style",name==="terminal"||name==="gone");
95
113
  document.body.classList.toggle("wide",inList);
96
114
  main.replaceChildren();
@@ -208,8 +226,8 @@ async function newAgentView(){
208
226
  }
209
227
 
210
228
  async function cliAttach(id,origin){
211
- var mine=show("terminal","Native CLI · "+id),toolbar=el("div","setup toolbar"),back=el("button","","↩ Back"),reattach=el("button","","🔌 Reattach"),copy=el("button","","⧉ Copy selection"),latest=el("button","latest","↓ Newest"),close=el("button","","⏹ 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);
212
- terminal=new Terminal({cursorBlink:true,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);
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);
213
231
  terminal.loadAddon(new Unicode11Addon.Unicode11Addon());terminal.unicode.activeVersion="11";
214
232
  terminal.open(host);terminal.textarea.enterKeyHint="send";terminal.focus();var term=terminal;
215
233
  // Reading back through the scrollback is the reader's own act, so it is never taken away from them: output arriving
@@ -277,7 +295,8 @@ async function cliAttach(id,origin){
277
295
  event.preventDefault();event.stopImmediatePropagation();upload(files);term.focus();
278
296
  },true);
279
297
  term.onData(function(data){ordered(id,"input",{data:data});});term.onBinary(function(data){ordered(id,"input",{data:btoa(data),binary:true});});
280
- observer=new ResizeObserver(function(){if(mine!==view||!socket||socket.readyState!==WebSocket.OPEN)return;fitAddon.fit();ordered(id,"resize",{cols:term.cols,rows:term.rows});});
298
+ 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);
281
300
  reattach.onclick=function(){cliAttach(id,origin);};
282
301
  back.onclick=goBack;
283
302
  close.onclick=async function(){close.disabled=true;try{await api("DELETE","/v1/terminals/"+id);swap("list");}catch(error){close.disabled=false;fail(error);}};
@@ -288,7 +307,7 @@ async function cliAttach(id,origin){
288
307
  var ws=new WebSocket((location.protocol==="https:"?"wss://":"ws://")+location.host+"/v1/terminals/"+id+"/ws",["bn-terminal","bn-bearer."+token]);socket=ws;
289
308
  var frames=Promise.resolve();
290
309
  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();};
291
- 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+" · "+frame.project+(frame.ended?" · CLI ended":" · connected")+(frame.failure?" · "+frame.failure:"")+(fileNotice?" · "+fileNotice:"");}).catch(fail);};
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);};
292
311
  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);};
293
312
  ws.onerror=function(){note.textContent="Terminal connection failed. Reconnecting…";};
294
313
  }