@adhdev/daemon-standalone 0.9.82-rc.7 → 0.9.82-rc.71
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/index.js +24875 -21162
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/index-Bso1b8Lh.css +1 -0
- package/public/assets/index-R9GDvGJ8.js +98 -0
- package/public/assets/{terminal-DCVDkSIp.js → terminal-NZFQPQy6.js} +4 -4
- package/public/assets/{vendor-piMzuE8Y.js → vendor-C7br1-G2.js} +29 -29
- package/public/index.html +3 -3
- package/vendor/mcp-server/index.js +647 -70
- package/vendor/mcp-server/index.js.map +1 -1
- package/public/assets/index-8xD0Z30r.js +0 -98
- package/public/assets/index-B8fg8KB1.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as Q,j as ui}from"./vendor-
|
|
1
|
+
import{r as Q,j as ui}from"./vendor-C7br1-G2.js";/**
|
|
2
2
|
* Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
|
|
3
3
|
* @license MIT
|
|
4
4
|
*
|
|
@@ -109,7 +109,7 @@ void main() {
|
|
|
109
109
|
* Fabrice Bellard's javascript vt100 for jslinux:
|
|
110
110
|
* http://bellard.org/jslinux/
|
|
111
111
|
* Copyright (c) 2011 Fabrice Bellard
|
|
112
|
-
*/var zu=2,Hu=1,Uu=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let e=this._terminal._core;(this._terminal.rows!==t.rows||this._terminal.cols!==t.cols)&&(e._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){var d;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let e=this._terminal.options.scrollback===0?0:((d=this._terminal.options.overviewRuler)==null?void 0:d.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},h=o.top+o.bottom,l=o.right+o.left,a=s-h,c=r-l-e;return{cols:Math.max(zu,Math.floor(c/t.css.cell.width)),rows:Math.max(Hu,Math.floor(a/t.css.cell.height))}}};const Ku=80,Co=32,yo={background:"#0f1117",foreground:"#cdd6f4",cursor:"#f38ba8",cursorAccent:"#0f1117",selectionBackground:"rgba(166, 227, 161, 0.3)",selectionForeground:"#cdd6f4",black:"#45475a",red:"#f38ba8",green:"#a6e3a1",yellow:"#f9e2af",blue:"#89b4fa",magenta:"#cba6f7",cyan:"#94e2d5",white:"#bac2de",brightBlack:"#585b70",brightRed:"#f38ba8",brightGreen:"#a6e3a1",brightYellow:"#f9e2af",brightBlue:"#89b4fa",brightMagenta:"#cba6f7",brightCyan:"#94e2d5",brightWhite:"#a6adc8"},xo=8,ko=14,
|
|
112
|
+
*/var zu=2,Hu=1,Uu=class{activate(t){this._terminal=t}dispose(){}fit(){let t=this.proposeDimensions();if(!t||!this._terminal||isNaN(t.cols)||isNaN(t.rows))return;let e=this._terminal._core;(this._terminal.rows!==t.rows||this._terminal.cols!==t.cols)&&(e._renderService.clear(),this._terminal.resize(t.cols,t.rows))}proposeDimensions(){var d;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let t=this._terminal._core._renderService.dimensions;if(t.css.cell.width===0||t.css.cell.height===0)return;let e=this._terminal.options.scrollback===0?0:((d=this._terminal.options.overviewRuler)==null?void 0:d.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),s=parseInt(i.getPropertyValue("height")),r=Math.max(0,parseInt(i.getPropertyValue("width"))),n=window.getComputedStyle(this._terminal.element),o={top:parseInt(n.getPropertyValue("padding-top")),bottom:parseInt(n.getPropertyValue("padding-bottom")),right:parseInt(n.getPropertyValue("padding-right")),left:parseInt(n.getPropertyValue("padding-left"))},h=o.top+o.bottom,l=o.right+o.left,a=s-h,c=r-l-e;return{cols:Math.max(zu,Math.floor(c/t.css.cell.width)),rows:Math.max(Hu,Math.floor(a/t.css.cell.height))}}};const Ku=/\x1b\]11;[^\x07\x1b]*(?:\x07|\x1b\\)/g,qu=/\x1b\]11;rgb:[0-9a-fA-F]{1,4}\/[0-9a-fA-F]{1,4}\/[0-9a-fA-F]{1,4}/g,Vu=/(^|[\r\n])\]11;rgb:[0-9a-fA-F]{1,4}\/[0-9a-fA-F]{1,4}\/[0-9a-fA-F]{1,4}(?:\x07|\x1b\\)?(?=$|[\r\n])/g,Yu=/\x1b\[[?>][0-9;]*c/g;function Gu(t){return t.replace(Ku,"").replace(qu,"").replace(Vu,"$1").replace(Yu,"")}const ju=80,Co=32,yo={background:"#0f1117",foreground:"#cdd6f4",cursor:"#f38ba8",cursorAccent:"#0f1117",selectionBackground:"rgba(166, 227, 161, 0.3)",selectionForeground:"#cdd6f4",black:"#45475a",red:"#f38ba8",green:"#a6e3a1",yellow:"#f9e2af",blue:"#89b4fa",magenta:"#cba6f7",cyan:"#94e2d5",white:"#bac2de",brightBlack:"#585b70",brightRed:"#f38ba8",brightGreen:"#a6e3a1",brightYellow:"#f9e2af",brightBlue:"#89b4fa",brightMagenta:"#cba6f7",brightCyan:"#94e2d5",brightWhite:"#a6adc8"},xo=8,ko=14,Xu=5e4,Zu=`
|
|
113
113
|
.adhdev-terminal-renderer .xterm-viewport {
|
|
114
114
|
scrollbar-width: thin;
|
|
115
115
|
scrollbar-color: rgba(137, 180, 250, 0.45) rgba(255, 255, 255, 0.04);
|
|
@@ -139,5 +139,5 @@ void main() {
|
|
|
139
139
|
border-radius: 999px;
|
|
140
140
|
border: 2px solid rgba(15, 17, 23, 0.9);
|
|
141
141
|
}
|
|
142
|
-
`;let Lo=!1;const
|
|
143
|
-
`).replace(/[\s\n]+$/g,"")},y=()=>{const g=d.current;if(g){try{g.refresh(0,Math.max(0,g.rows-1))}catch{}S()}},E=g=>{g&&g()&&(v(),y())};return Q.useEffect(()=>{var g,b,T,F;if(C.current=n,!!n){try{(g=d.current)==null||g.blur()}catch{}try{const P=(T=(b=c.current)==null?void 0:b.ownerDocument)==null?void 0:T.activeElement;P instanceof HTMLElement&&((F=c.current)!=null&&F.contains(P))&&P.blur()}catch{}}},[n]),Q.useImperativeHandle(a,()=>({write:(g,b)=>{d.current?d.current.write(g,b):f.current.push({data:g,onProcessed:b})},clear:()=>{d.current?d.current.clear():f.current=[]},reset:()=>{d.current?d.current.reset():f.current=[]},resize:(g,b)=>{d.current&&(d.current.resize(g,b),A.current={cols:g,rows:b},W(()=>{S()}))},fit:()=>m(!0),bumpResize:()=>{o==="fit"?m(!1):W(()=>{y()})},scrollToTop:()=>{const g=(b=4)=>{const T=d.current;if(T){try{T.scrollToTop()}catch{}v(),y(),b>0&&W(()=>g(b-1))}};g()},getSelection:()=>{var g,b;return((b=(g=d.current)==null?void 0:g.getSelection)==null?void 0:b.call(g))||""},getVisibleText:x}),[]),Q.useEffect(()=>{let g=!1,b=null,T=null,F=null,P=null;function V(){var Vr,Yr,Gr,jr,Xr;if(!c.current||g)return;const $=new nd({cols:
|
|
142
|
+
`;let Lo=!1;const Ju=(t,e,i)=>{if(e>=i)return!1;const s=t.buffer.active;if(!s||s.baseY!==i||s.viewportY===e)return!1;try{return t.scrollLines(e-s.viewportY),t.buffer.active.viewportY===e}catch{return!1}},Eo=t=>{const e=t.buffer.active;if(!e)return;const i=e.viewportY,s=e.baseY;if(!(i>=s))return()=>Ju(t,i,s)},Qu=Q.forwardRef(({onInput:t,onResize:e,onViewportMetrics:i,onScrollMetrics:s,fontSize:r=13,readOnly:n=!1,sizingMode:o="measured",className:h,style:l},a)=>{const c=Q.useRef(null),d=Q.useRef(null),u=Q.useRef(null),_=Q.useRef(null),f=Q.useRef([]),w=Q.useRef(null),L=Q.useRef(t),M=Q.useRef(e),R=Q.useRef(i),D=Q.useRef(s),C=Q.useRef(n),A=Q.useRef(null),[I,K]=Q.useState(!1),[j,oe]=Q.useState(null),be=()=>{var g,b;return((b=(g=c.current)==null?void 0:g.ownerDocument)==null?void 0:b.defaultView)||window},W=g=>be().requestAnimationFrame(g),m=(g=!1)=>{var b,T;if(o==="fit")try{(b=u.current)==null||b.fit();const F=d.current;if(!F)return;const{cols:P,rows:V}=F,$=A.current;(g||!$||$.cols!==P||$.rows!==V)&&(A.current={cols:P,rows:V},(T=M.current)==null||T.call(M,P,V))}catch{}};Q.useEffect(()=>{L.current=t},[t]),Q.useEffect(()=>{M.current=e},[e]),Q.useEffect(()=>{R.current=i},[i]),Q.useEffect(()=>{D.current=s},[s]);const p=()=>{var g;return(g=c.current)==null?void 0:g.querySelector(".xterm-viewport")},v=()=>{var V;const g=p();if(!g)return;const b=g.scrollTop,T=g.scrollHeight,F=g.clientHeight,P=T>F+2;(V=D.current)==null||V.call(D,{scrollTop:b,scrollHeight:T,clientHeight:F,canScroll:P,atTop:P&&b<=2})},S=()=>{var V,$,q;const g=(V=c.current)==null?void 0:V.querySelector(".xterm-screen"),b=($=c.current)==null?void 0:$.querySelector(".xterm-viewport"),T=g||b;if(!T)return;let F=Math.max(T.clientWidth||0,T.scrollWidth||0),P=Math.max(T.clientHeight||0,T.scrollHeight||0);F<=0||P<=0||(F+=ko*2,P+=xo*2,(q=R.current)==null||q.call(R,{width:F,height:P}),v())},x=()=>{var V;const g=d.current,b=(V=g==null?void 0:g.buffer)==null?void 0:V.active;if(!g||!b)return"";const T=Math.max(0,b.viewportY||0),F=Math.min(b.length,T+g.rows),P=[];for(let $=T;$<F;$+=1){const q=b.getLine($);P.push((q==null?void 0:q.translateToString(!0))||"")}return P.join(`
|
|
143
|
+
`).replace(/[\s\n]+$/g,"")},y=()=>{const g=d.current;if(g){try{g.refresh(0,Math.max(0,g.rows-1))}catch{}S()}},E=g=>{g&&g()&&(v(),y())};return Q.useEffect(()=>{var g,b,T,F;if(C.current=n,!!n){try{(g=d.current)==null||g.blur()}catch{}try{const P=(T=(b=c.current)==null?void 0:b.ownerDocument)==null?void 0:T.activeElement;P instanceof HTMLElement&&((F=c.current)!=null&&F.contains(P))&&P.blur()}catch{}}},[n]),Q.useImperativeHandle(a,()=>({write:(g,b)=>{d.current?d.current.write(g,b):f.current.push({data:g,onProcessed:b})},clear:()=>{d.current?d.current.clear():f.current=[]},reset:()=>{d.current?d.current.reset():f.current=[]},resize:(g,b)=>{d.current&&(d.current.resize(g,b),A.current={cols:g,rows:b},W(()=>{S()}))},fit:()=>m(!0),bumpResize:()=>{o==="fit"?m(!1):W(()=>{y()})},scrollToTop:()=>{const g=(b=4)=>{const T=d.current;if(T){try{T.scrollToTop()}catch{}v(),y(),b>0&&W(()=>g(b-1))}};g()},getSelection:()=>{var g,b;return((b=(g=d.current)==null?void 0:g.getSelection)==null?void 0:b.call(g))||""},getVisibleText:x}),[]),Q.useEffect(()=>{let g=!1,b=null,T=null,F=null,P=null;function V(){var Vr,Yr,Gr,jr,Xr;if(!c.current||g)return;const $=new nd({cols:ju,rows:Co,cursorBlink:!0,cursorStyle:"bar",cursorWidth:8,fontSize:r,fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', 'Menlo', monospace",fontWeight:"400",letterSpacing:0,lineHeight:1.2,theme:yo,allowTransparency:!0,scrollback:Xu,scrollSensitivity:1.15,fastScrollSensitivity:4,smoothScrollDuration:120,scrollOnUserInput:!1,convertEol:!1,disableStdin:!1});if($.open(c.current),d.current=$,T=$,u.current=null,o==="fit"){const J=new Uu;$.loadAddon(J),u.current=J}const q=(Yr=(Vr=c.current)==null?void 0:Vr.ownerDocument)==null?void 0:Yr.defaultView,Y=((Gr=q==null?void 0:q.location)==null?void 0:Gr.pathname)==="/popout.html"||((Xr=(jr=q==null?void 0:q.location)==null?void 0:jr.pathname)==null?void 0:Xr.endsWith("/popout.html"))||!!(q!=null&&q.opener);let G="dom";if(!Y)try{const J=new Wu;J.onContextLoss(()=>{J.dispose()}),$.loadAddon(J),G="webgl"}catch{}Lo||(Lo=!0,console.info(`[terminal-render-web] renderer=${G}`)),oe(G),b=$.onData(J=>{if(C.current)return;const ae=Gu(J);if(!ae)return;const qe=w.current??Eo($);w.current=null,L.current(ae),E(qe),W(()=>{E(qe)})}),W(()=>{try{m(!0),S(),v(),K(!0),C.current||$.focus();for(const J of f.current)$.write(J.data,J.onProcessed);f.current=[]}catch{}});const X=c.current,pe=p(),Ge=()=>v();pe==null||pe.addEventListener("scroll",Ge,{passive:!0});const Ke=()=>{C.current||(w.current=Eo($)||null)};X.addEventListener("keydown",Ke,{capture:!0}),P=()=>{X.removeEventListener("keydown",Ke,{capture:!0})};let ve=null,z=0;const Lt={passive:!1,capture:!0},Et={passive:!0,capture:!0},ci=J=>{var gt,Mt;const ae=(Mt=(gt=d.current)==null?void 0:gt.buffer)==null?void 0:Mt.active,qe=!!J&&J.scrollHeight>J.clientHeight+2,ft=!!ae&&!!d.current&&ae.length>d.current.rows;return qe||ft},Xt=J=>{var pt;const ae=d.current,qe=Math.max(1,(ae==null?void 0:ae.rows)||Co),ft=J.clientHeight/qe;if(Number.isFinite(ft)&&ft>0)return ft;const gt=(pt=c.current)==null?void 0:pt.querySelector(".xterm-rows > div"),Mt=(gt==null?void 0:gt.getBoundingClientRect().height)||0;return Number.isFinite(Mt)&&Mt>0?Mt:r*1.2},di=J=>{var qe;if(J.touches.length!==1){ve=null,z=0;return}const ae=p();if(!ae||!ci(ae)){ve=null,z=0;return}ve=((qe=J.touches[0])==null?void 0:qe.clientY)??null,z=0},Fi=J=>{var Zr,Jr;if(ve===null||J.touches.length!==1)return;const ae=p(),qe=(Zr=J.touches[0])==null?void 0:Zr.clientY;if(!ae||typeof qe!="number")return;const ft=ve-qe;if(ve=qe,Math.abs(ft)<1)return;const gt=ae.scrollTop,Mt=Math.max(0,ae.scrollHeight-ae.clientHeight);if(ae.scrollTop=Math.max(0,Math.min(Mt,gt+ft)),ae.scrollTop!==gt){J.preventDefault(),z=0,v();return}const pt=d.current,Wi=(Jr=pt==null?void 0:pt.buffer)==null?void 0:Jr.active;if(!pt||!Wi||Wi.length<=pt.rows)return;z+=ft;const ms=Math.trunc(z/Xt(ae));if(ms===0)return;const Xa=Wi.viewportY;try{pt.scrollLines(ms)}catch{}z-=ms*Xt(ae),(Wi.viewportY!==Xa||Math.abs(z)<Xt(ae))&&(J.preventDefault(),v(),y())},Ni=()=>{ve=null,z=0};X.addEventListener("touchstart",di,Et),X.addEventListener("touchmove",Fi,Lt),X.addEventListener("touchend",Ni,Et),X.addEventListener("touchcancel",Ni,Et),F=()=>{pe==null||pe.removeEventListener("scroll",Ge),X.removeEventListener("touchstart",di,Et),X.removeEventListener("touchmove",Fi,Lt),X.removeEventListener("touchend",Ni,Et),X.removeEventListener("touchcancel",Ni,Et)},g&&(F==null||F(),P==null||P(),b.dispose(),$.dispose())}try{V()}catch($){console.error("[terminal-render-web] failed to initialize terminal renderer",$)}return()=>{var $;g=!0,A.current=null,($=_.current)==null||$.disconnect(),_.current=null,b==null||b.dispose(),F==null||F(),P==null||P(),w.current=null,T==null||T.dispose(),d.current=null,u.current=null}},[o]),Q.useEffect(()=>{const g=d.current;if(g){if(g.options.fontSize===r){W(()=>{S()});return}try{g.options.fontSize=r,g.refresh(0,Math.max(0,g.rows-1))}catch{}W(()=>{m(!0),S()})}},[r]),Q.useEffect(()=>{var F,P;if(o!=="fit")return;const g=c.current,b=(P=(F=g==null?void 0:g.ownerDocument)==null?void 0:F.defaultView)==null?void 0:P.ResizeObserver;if(!g||!b)return;const T=new b(V=>{const $=V[0];if(!$)return;const{width:q,height:Y}=$.contentRect;q<=0||Y<=0||W(()=>{m(!1)})});return T.observe(g),_.current=T,()=>{T.disconnect(),_.current===T&&(_.current=null)}},[o]),Q.useEffect(()=>{var F,P,V;const g=(P=(F=c.current)==null?void 0:F.ownerDocument)==null?void 0:P.defaultView,b=(V=c.current)==null?void 0:V.ownerDocument;if(!g||!b)return;const T=()=>{W(()=>{y()})};return g.addEventListener("focus",T),g.addEventListener("resize",T),g.addEventListener("pageshow",T),b.addEventListener("visibilitychange",T),()=>{g.removeEventListener("focus",T),g.removeEventListener("resize",T),g.removeEventListener("pageshow",T),b.removeEventListener("visibilitychange",T)}},[j,o]),ui.jsxs(ui.Fragment,{children:[ui.jsx("style",{children:Zu}),ui.jsx("div",{"data-terminal-renderer":j||"pending",className:["adhdev-terminal-renderer",h].filter(Boolean).join(" "),style:{width:"100%",height:"100%",overflow:"hidden",background:yo.background,padding:`${xo}px ${ko}px`,boxSizing:"border-box",opacity:I?1:0,transition:"opacity 200ms ease",...l},children:ui.jsx("div",{ref:c,className:"adhdev-terminal-renderer-mount h-full w-full",style:{width:"100%",height:"100%",overflow:"hidden"}})})]})});Qu.displayName="GhosttyTerminalView";export{Qu as GhosttyTerminalView,Gu as sanitizeTerminalInputForProvider};
|