@sma1lboy/rove 0.9.283 → 0.9.284-next.136

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.
Files changed (162) hide show
  1. package/dist/cli/{chunk-tay29xzx.js → chunk-0hc53k74.js} +1 -1
  2. package/dist/cli/{chunk-ve2jj5qv.js → chunk-0ppfr3vm.js} +1 -1
  3. package/dist/cli/{chunk-nf1gqqv8.js → chunk-0xh1e21e.js} +1 -1
  4. package/dist/cli/{chunk-4gjj2ed9.js → chunk-11nf15ht.js} +1 -1
  5. package/dist/cli/chunk-11wyec8z.js +2 -0
  6. package/dist/cli/{chunk-mt0mh96t.js → chunk-1e0v0ycz.js} +2 -2
  7. package/dist/cli/{chunk-0sy3bez6.js → chunk-1k7f137x.js} +1 -1
  8. package/dist/cli/{chunk-p4aqy3sm.js → chunk-1rs3dmwz.js} +1 -1
  9. package/dist/cli/{chunk-p5pebhe6.js → chunk-2xtk4ch2.js} +2 -2
  10. package/dist/cli/{chunk-37pwx1a7.js → chunk-36f8xr65.js} +1 -1
  11. package/dist/cli/{chunk-x5swq8ar.js → chunk-3a12v30f.js} +1 -1
  12. package/dist/cli/{chunk-28mm4k8b.js → chunk-3j3ms4fx.js} +1 -1
  13. package/dist/cli/{chunk-afhnm3e4.js → chunk-46c20c2s.js} +1 -1
  14. package/dist/cli/{chunk-b1zg5jnk.js → chunk-4khwsrwk.js} +1 -1
  15. package/dist/cli/{chunk-hcrpbx9x.js → chunk-4qg325ww.js} +2 -2
  16. package/dist/cli/{chunk-trw076nv.js → chunk-4qy2mvd5.js} +1 -1
  17. package/dist/cli/{chunk-0r1jf8m9.js → chunk-55ajzrj6.js} +1 -1
  18. package/dist/cli/{chunk-c69xdgfz.js → chunk-5c2syc7e.js} +2 -2
  19. package/dist/cli/{chunk-r4bwm4zh.js → chunk-5jpfg8kz.js} +1 -1
  20. package/dist/cli/{chunk-8ac8k0ba.js → chunk-5smmarfy.js} +1 -1
  21. package/dist/cli/{chunk-mcbxrpwg.js → chunk-6b3s6fqq.js} +1 -1
  22. package/dist/cli/{chunk-q2r4qavc.js → chunk-6nsjckc5.js} +1 -1
  23. package/dist/cli/{chunk-131bpjms.js → chunk-6tg9h05d.js} +1 -1
  24. package/dist/cli/{chunk-d9fx9282.js → chunk-6z1a05bz.js} +1 -1
  25. package/dist/cli/{chunk-bxg7y1qk.js → chunk-7vt1bf35.js} +5 -5
  26. package/dist/cli/{chunk-kd8j15cg.js → chunk-87rkqyr3.js} +1 -1
  27. package/dist/cli/{chunk-94t488yj.js → chunk-8d4v27ez.js} +1 -1
  28. package/dist/cli/{chunk-cacct9gd.js → chunk-9wd57t3j.js} +1 -1
  29. package/dist/cli/chunk-9xax0901.js +2 -0
  30. package/dist/cli/{chunk-4zmhzb28.js → chunk-9y17mj2r.js} +1 -1
  31. package/dist/cli/{chunk-s7ttzm9a.js → chunk-9y803nx4.js} +1 -1
  32. package/dist/cli/{chunk-g2yf429k.js → chunk-a7pygqgw.js} +1 -1
  33. package/dist/cli/chunk-a9867184.js +2 -0
  34. package/dist/cli/{chunk-9q43btkf.js → chunk-acqqhrjb.js} +1 -1
  35. package/dist/cli/{chunk-nzf76wa4.js → chunk-adr12wp8.js} +2 -2
  36. package/dist/cli/{chunk-1c6yk07x.js → chunk-af5a4v8t.js} +1 -1
  37. package/dist/cli/{chunk-69f84j0j.js → chunk-ah04qzfd.js} +1 -1
  38. package/dist/cli/chunk-bg2ypp04.js +3 -0
  39. package/dist/cli/chunk-bjhx1nav.js +2 -0
  40. package/dist/cli/{chunk-fd3gswsr.js → chunk-bxqdxv63.js} +1 -1
  41. package/dist/cli/{chunk-1gxnd3qq.js → chunk-ca5fmepn.js} +1 -1
  42. package/dist/cli/chunk-chzxsqth.js +2 -0
  43. package/dist/cli/chunk-d79vm3bt.js +20 -0
  44. package/dist/cli/chunk-dcnyp3qq.js +62 -0
  45. package/dist/cli/{chunk-tckyb2xt.js → chunk-dcw40f11.js} +1 -1
  46. package/dist/cli/chunk-dgjnak3n.js +2 -0
  47. package/dist/cli/chunk-dp0m6jrg.js +2 -0
  48. package/dist/cli/{chunk-gr0ffx3f.js → chunk-dxwjx5d1.js} +1 -1
  49. package/dist/cli/chunk-e0z123ad.js +2 -0
  50. package/dist/cli/{chunk-qnv8ggxh.js → chunk-e1c6909n.js} +1 -1
  51. package/dist/cli/{chunk-yz859e8t.js → chunk-e23n32hv.js} +1 -1
  52. package/dist/cli/{chunk-5mhf43dx.js → chunk-e5crm07d.js} +1 -1
  53. package/dist/cli/{chunk-dce6ytw0.js → chunk-ebb8z47a.js} +1 -1
  54. package/dist/cli/{chunk-60kx1j7x.js → chunk-ee9nm38f.js} +6 -7
  55. package/dist/cli/{chunk-xs6w6ekc.js → chunk-ejytsv0b.js} +2 -2
  56. package/dist/cli/{chunk-1masf4pj.js → chunk-em75b155.js} +1 -1
  57. package/dist/cli/{chunk-jfbfasx0.js → chunk-f050r8jy.js} +1 -1
  58. package/dist/cli/chunk-f535feph.js +2 -0
  59. package/dist/cli/{chunk-62z7016x.js → chunk-f6qne8f1.js} +1 -1
  60. package/dist/cli/{chunk-mejxvvzb.js → chunk-fq8sbarx.js} +1 -1
  61. package/dist/cli/chunk-fsqgs1p1.js +2 -0
  62. package/dist/cli/{chunk-xdqj48wx.js → chunk-fxqgvjtt.js} +1 -1
  63. package/dist/cli/chunk-g1er3ctd.js +2 -0
  64. package/dist/cli/{chunk-qnpkhvrn.js → chunk-g2f96z6s.js} +1 -1
  65. package/dist/cli/{chunk-ar3mt81z.js → chunk-gca19v0w.js} +1 -1
  66. package/dist/cli/{chunk-an97ga8b.js → chunk-ghww7w7x.js} +1 -1
  67. package/dist/cli/chunk-gpq30qgy.js +2 -0
  68. package/dist/cli/chunk-gqqtkwkq.js +2 -0
  69. package/dist/cli/{chunk-dxacz9ba.js → chunk-gvzr7jxt.js} +1 -1
  70. package/dist/cli/{chunk-gfdd2jbp.js → chunk-h37tqrdb.js} +1 -1
  71. package/dist/cli/{chunk-8ttn73cv.js → chunk-hk0zbk3t.js} +1 -1
  72. package/dist/cli/chunk-hp2p26w1.js +2 -0
  73. package/dist/cli/{chunk-jadjn49m.js → chunk-j1rsp5pc.js} +1 -1
  74. package/dist/cli/{chunk-2r1fgng9.js → chunk-jrzh4yv6.js} +1 -1
  75. package/dist/cli/{chunk-sttpyf2b.js → chunk-jy0kms4j.js} +1 -1
  76. package/dist/cli/chunk-jzsngv31.js +3 -0
  77. package/dist/cli/{chunk-xj8bma5k.js → chunk-k2p7at32.js} +1 -1
  78. package/dist/cli/chunk-m3rjakc6.js +2 -0
  79. package/dist/cli/{chunk-mhft316g.js → chunk-m9gvs19s.js} +1 -1
  80. package/dist/cli/chunk-ma00xdy2.js +2 -0
  81. package/dist/cli/{chunk-pmwk2etg.js → chunk-mdfm45fx.js} +1 -1
  82. package/dist/cli/chunk-nkfqg6e2.js +2 -0
  83. package/dist/cli/{chunk-paashxkd.js → chunk-ntqg38ke.js} +1 -1
  84. package/dist/cli/{chunk-jkssty8x.js → chunk-p1pbtfa5.js} +1 -1
  85. package/dist/cli/chunk-pk2w9dtp.js +2 -0
  86. package/dist/cli/{chunk-abate6bw.js → chunk-qap0g8v4.js} +1 -1
  87. package/dist/cli/chunk-qknyztxj.js +2 -0
  88. package/dist/cli/{chunk-ee8917py.js → chunk-qq1q07tz.js} +1 -1
  89. package/dist/cli/{chunk-8y10pmkf.js → chunk-qq2mjph2.js} +1 -1
  90. package/dist/cli/{chunk-cye56q32.js → chunk-r02sre5z.js} +3 -3
  91. package/dist/cli/{chunk-991x8tw6.js → chunk-r1r83d2r.js} +1 -1
  92. package/dist/cli/chunk-ratr5ew6.js +2 -0
  93. package/dist/cli/{chunk-5a6rkz1s.js → chunk-rg38rkr1.js} +1 -1
  94. package/dist/cli/{chunk-gygdyf0s.js → chunk-rja9tf6j.js} +1 -1
  95. package/dist/cli/{chunk-7mwvvj46.js → chunk-rz8319pe.js} +1 -1
  96. package/dist/cli/{chunk-bbq6wc47.js → chunk-s62qg37a.js} +1 -1
  97. package/dist/cli/{chunk-wcq8k0j6.js → chunk-sdcb3ttr.js} +1 -1
  98. package/dist/cli/chunk-sdqvrj4w.js +2 -0
  99. package/dist/cli/{chunk-bwxmrwb1.js → chunk-t183jy5m.js} +1 -1
  100. package/dist/cli/{chunk-g6jregtt.js → chunk-t8j9csw2.js} +3 -3
  101. package/dist/cli/{chunk-hptxcj03.js → chunk-txy0xkks.js} +2 -2
  102. package/dist/cli/chunk-v765ej4f.js +2 -0
  103. package/dist/cli/{chunk-90dkv2mn.js → chunk-w1evhnvr.js} +1 -1
  104. package/dist/cli/{chunk-v883qbhk.js → chunk-w6me6vm2.js} +1 -1
  105. package/dist/cli/{chunk-d9x7zeh7.js → chunk-w7sb3jmd.js} +1 -1
  106. package/dist/cli/chunk-w8a3gsvw.js +2 -0
  107. package/dist/cli/{chunk-q89yrevw.js → chunk-wgyfwry1.js} +1 -1
  108. package/dist/cli/{chunk-3wsjbxd7.js → chunk-wxb38172.js} +1 -1
  109. package/dist/cli/{chunk-ks5g5ee2.js → chunk-x02jmqj1.js} +1 -1
  110. package/dist/cli/{chunk-53pn0a9z.js → chunk-x1d70j6f.js} +1 -1
  111. package/dist/cli/chunk-x652sy0y.js +2 -0
  112. package/dist/cli/{chunk-r0qhywyp.js → chunk-x6k5tgzz.js} +1 -1
  113. package/dist/cli/{chunk-f9x0n7kr.js → chunk-xenhysr0.js} +1 -1
  114. package/dist/cli/{chunk-fx2e7z2s.js → chunk-xhzbynky.js} +1 -1
  115. package/dist/cli/{chunk-gq7s8vp3.js → chunk-xtbjzbyn.js} +1 -1
  116. package/dist/cli/{chunk-kfr8dm31.js → chunk-y343681c.js} +1 -1
  117. package/dist/cli/chunk-y8b2p44q.js +1 -1
  118. package/dist/cli/chunk-yb75pw36.js +2 -0
  119. package/dist/cli/{chunk-5jbfscxy.js → chunk-ycqt3445.js} +1 -1
  120. package/dist/cli/{chunk-1kxnpa9w.js → chunk-yeysn5x1.js} +3 -3
  121. package/dist/cli/{chunk-mdebknyq.js → chunk-yjeh02k3.js} +1 -1
  122. package/dist/cli/{chunk-tpc0002n.js → chunk-yv77a1p9.js} +1 -1
  123. package/dist/cli/{chunk-22emnsn5.js → chunk-z46zwmyq.js} +1 -1
  124. package/dist/cli/{chunk-ee5a0pka.js → chunk-z6t0rmg1.js} +6 -4
  125. package/dist/cli/index.js +7 -7
  126. package/dist/cli/rove-run.js +1 -1
  127. package/dist/cli/rove.js +6 -6
  128. package/dist/skills/rove/SKILL.md +40 -20
  129. package/dist/skills/rove/references/api-flags.md +15 -11
  130. package/dist/web/assets/{index-Cd9SayTz.js → index-CJt_9NpJ.js} +4 -4
  131. package/dist/web/assets/{term-mount-aQMkgSR7.js → term-mount-BhfGkya5.js} +1 -1
  132. package/dist/web/index.html +1 -1
  133. package/package.json +2 -1
  134. package/dist/cli/chunk-0jdvy6hk.js +0 -2
  135. package/dist/cli/chunk-2vkxtms5.js +0 -20
  136. package/dist/cli/chunk-335g4j0y.js +0 -2
  137. package/dist/cli/chunk-5yfffvqe.js +0 -2
  138. package/dist/cli/chunk-7zh7adny.js +0 -2
  139. package/dist/cli/chunk-81q3t424.js +0 -2
  140. package/dist/cli/chunk-8h94w236.js +0 -2
  141. package/dist/cli/chunk-cxef4y2s.js +0 -2
  142. package/dist/cli/chunk-dxwmnww0.js +0 -2
  143. package/dist/cli/chunk-e3jddh9d.js +0 -2
  144. package/dist/cli/chunk-g5sx5knm.js +0 -2
  145. package/dist/cli/chunk-k5arcpfm.js +0 -2
  146. package/dist/cli/chunk-k5pd6q0r.js +0 -2
  147. package/dist/cli/chunk-mkb5mmmw.js +0 -2
  148. package/dist/cli/chunk-nka82csc.js +0 -2
  149. package/dist/cli/chunk-nn130cde.js +0 -2
  150. package/dist/cli/chunk-np319fys.js +0 -2
  151. package/dist/cli/chunk-pzy7fe5e.js +0 -3
  152. package/dist/cli/chunk-q23gw6np.js +0 -2
  153. package/dist/cli/chunk-s61xd58f.js +0 -2
  154. package/dist/cli/chunk-s88gxrtj.js +0 -2
  155. package/dist/cli/chunk-sfrsqpvn.js +0 -2
  156. package/dist/cli/chunk-tjh04p1x.js +0 -2
  157. package/dist/cli/chunk-w1rgfjkp.js +0 -2
  158. package/dist/cli/chunk-x1jxxmtc.js +0 -3
  159. package/dist/cli/chunk-y57tnbwp.js +0 -2
  160. package/dist/cli/chunk-z16wb344.js +0 -2
  161. package/dist/cli/chunk-z3hfz52n.js +0 -2
  162. package/dist/cli/chunk-zw9w8wbk.js +0 -63
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./index-Cd9SayTz.js";var f=0,p=0,m=0,h=0,g;(e=>{function t(e,t,n,r){return r===void 0?`#${x(e)}${x(t)}${x(n)}`:`#${x(e)}${x(t)}${x(n)}${x(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(g||={});var _;(e=>{function t(e,t){if(h=(t.rgba&255)/255,h===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return f=a+Math.round((n-a)*h),p=o+Math.round((r-o)*h),m=s+Math.round((i-s)*h),{css:g.toCss(f,p,m),rgba:g.toRgba(f,p,m)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=b.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return g.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[f,p,m]=b.toChannels(t),{css:g.toCss(f,p,m),rgba:t}}e.opaque=i;function a(e,t){return h=Math.round(t*255),[f,p,m]=b.toChannels(e.rgba),{css:g.toCss(f,p,m,h),rgba:g.toRgba(f,p,m,h)}}e.opacity=a;function o(e,t){return h=e.rgba&255,a(e,h*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(_||={});var v;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return f=parseInt(e.slice(1,2).repeat(2),16),p=parseInt(e.slice(2,3).repeat(2),16),m=parseInt(e.slice(3,4).repeat(2),16),g.toColor(f,p,m);case 5:return f=parseInt(e.slice(1,2).repeat(2),16),p=parseInt(e.slice(2,3).repeat(2),16),m=parseInt(e.slice(3,4).repeat(2),16),h=parseInt(e.slice(4,5).repeat(2),16),g.toColor(f,p,m,h);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return f=parseInt(r[1]),p=parseInt(r[2]),m=parseInt(r[3]),h=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),g.toColor(f,p,m,h);if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[f,p,m,h]=t.getImageData(0,0,1,1).data,h!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:g.toRgba(f,p,m,h),css:e}}e.toColor=r})(v||={});var y;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(y||={});var b;(e=>{function t(e,t){if(h=(t&255)/255,h===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return f=a+Math.round((n-a)*h),p=o+Math.round((r-o)*h),m=s+Math.round((i-s)*h),g.toRgba(f,p,m)}e.blend=t;function n(e,t,n){let a=y.relativeLuminance(e>>8),o=y.relativeLuminance(t>>8);if(S(a,o)<n){if(o<a){let o=r(e,t,n),s=S(a,y.relativeLuminance(o>>8));if(s<n){let r=i(e,t,n);return s>S(a,y.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=S(a,y.relativeLuminance(s>>8));if(c<n){let i=r(e,t,n);return c>S(a,y.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));for(;l<n&&(o>0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));for(;l<n&&(o<255||s<255||c<255);)o=Math.min(255,o+Math.ceil((255-o)*.1)),s=Math.min(255,s+Math.ceil((255-s)*.1)),c=Math.min(255,c+Math.ceil((255-c)*.1)),l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(b||={});function x(e){let t=e.toString(16);return t.length<2?`0`+t:t}function S(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var ee=Object.freeze((()=>{let e=[v.toColor(`#2e3436`),v.toColor(`#cc0000`),v.toColor(`#4e9a06`),v.toColor(`#c4a000`),v.toColor(`#3465a4`),v.toColor(`#75507b`),v.toColor(`#06989a`),v.toColor(`#d3d7cf`),v.toColor(`#555753`),v.toColor(`#ef2929`),v.toColor(`#8ae234`),v.toColor(`#fce94f`),v.toColor(`#729fcf`),v.toColor(`#ad7fa8`),v.toColor(`#34e2e2`),v.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:g.toCss(r,i,a),rgba:g.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:g.toCss(n,n,n),rgba:g.toRgba(n,n,n)})}return e})());function C(e,t,n){return Math.max(t,Math.min(e,n))}function te(e){switch(e){case`&`:return`&amp;`;case`<`:return`&lt;`}return e}var w=class{constructor(e){this._buffer=e}serialize(e,t){let n=this._buffer.getNullCell(),r=this._buffer.getNullCell(),i=n,a=e.start.y,o=e.end.y,s=e.start.x,c=e.end.x;this._beforeSerialize(o-a,a,o);for(let t=a;t<=o;t++){let a=this._buffer.getLine(t);if(a){let o=t===e.start.y?s:0,l=t===e.end.y?c:a.length;for(let e=o;e<l;e++){let o=a.getCell(e,i===n?r:n);if(!o){console.warn(`Can't get cell at row=${t}, col=${e}`);continue}this._nextCell(o,i,t,e),i=o}}this._rowEnd(t,t===o)}return this._afterSerialize(),this._serializeString(t)}_nextCell(e,t,n,r){}_rowEnd(e,t){}_beforeSerialize(e,t,n){}_afterSerialize(){}_serializeString(e){return``}};function T(e,t){return e.getFgColorMode()===t.getFgColorMode()&&e.getFgColor()===t.getFgColor()}function E(e,t){return e.getBgColorMode()===t.getBgColorMode()&&e.getBgColor()===t.getBgColor()}function D(e,t){return e.isInverse()===t.isInverse()&&e.isBold()===t.isBold()&&e.isUnderline()===t.isUnderline()&&e.isOverline()===t.isOverline()&&e.isBlink()===t.isBlink()&&e.isInvisible()===t.isInvisible()&&e.isItalic()===t.isItalic()&&e.isDim()===t.isDim()&&e.isStrikethrough()===t.isStrikethrough()}var ne=class extends w{constructor(e,t){super(e),this._terminal=t,this._rowIndex=0,this._allRows=[],this._allRowSeparators=[],this._currentRow=``,this._nullCellCount=0,this._cursorStyle=this._buffer.getNullCell(),this._cursorStyleRow=0,this._cursorStyleCol=0,this._backgroundCell=this._buffer.getNullCell(),this._firstRow=0,this._lastCursorRow=0,this._lastCursorCol=0,this._lastContentCursorRow=0,this._lastContentCursorCol=0,this._thisRowLastChar=this._buffer.getNullCell(),this._thisRowLastSecondChar=this._buffer.getNullCell(),this._nextRowFirstChar=this._buffer.getNullCell()}_beforeSerialize(e,t,n){this._allRows=Array(e),this._lastContentCursorRow=t,this._lastCursorRow=t,this._firstRow=t}_rowEnd(e,t){this._nullCellCount>0&&!E(this._cursorStyle,this._backgroundCell)&&(this._currentRow+=`\x1B[${this._nullCellCount}X`);let n=``;if(!t){e-this._firstRow>=this._terminal.rows&&this._buffer.getLine(this._cursorStyleRow)?.getCell(this._cursorStyleCol,this._backgroundCell);let t=this._buffer.getLine(e),r=this._buffer.getLine(e+1);if(!r.isWrapped)n=`\r
1
+ import{a as e,c as t,d as n,f as r,i,l as a,n as o,o as s,r as c,s as l,t as u,u as d}from"./index-CJt_9NpJ.js";var f=0,p=0,m=0,h=0,g;(e=>{function t(e,t,n,r){return r===void 0?`#${x(e)}${x(t)}${x(n)}`:`#${x(e)}${x(t)}${x(n)}${x(r)}`}e.toCss=t;function n(e,t,n,r=255){return(e<<24|t<<16|n<<8|r)>>>0}e.toRgba=n;function r(t,n,r,i){return{css:e.toCss(t,n,r,i),rgba:e.toRgba(t,n,r,i)}}e.toColor=r})(g||={});var _;(e=>{function t(e,t){if(h=(t.rgba&255)/255,h===1)return{css:t.css,rgba:t.rgba};let n=t.rgba>>24&255,r=t.rgba>>16&255,i=t.rgba>>8&255,a=e.rgba>>24&255,o=e.rgba>>16&255,s=e.rgba>>8&255;return f=a+Math.round((n-a)*h),p=o+Math.round((r-o)*h),m=s+Math.round((i-s)*h),{css:g.toCss(f,p,m),rgba:g.toRgba(f,p,m)}}e.blend=t;function n(e){return(e.rgba&255)==255}e.isOpaque=n;function r(e,t,n){let r=b.ensureContrastRatio(e.rgba,t.rgba,n);if(r)return g.toColor(r>>24&255,r>>16&255,r>>8&255)}e.ensureContrastRatio=r;function i(e){let t=(e.rgba|255)>>>0;return[f,p,m]=b.toChannels(t),{css:g.toCss(f,p,m),rgba:t}}e.opaque=i;function a(e,t){return h=Math.round(t*255),[f,p,m]=b.toChannels(e.rgba),{css:g.toCss(f,p,m,h),rgba:g.toRgba(f,p,m,h)}}e.opacity=a;function o(e,t){return h=e.rgba&255,a(e,h*t/255)}e.multiplyOpacity=o;function s(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]}e.toColorRGB=s})(_||={});var v;(e=>{let t,n;try{let e=document.createElement(`canvas`);e.width=1,e.height=1;let r=e.getContext(`2d`,{willReadFrequently:!0});r&&(t=r,t.globalCompositeOperation=`copy`,n=t.createLinearGradient(0,0,1,1))}catch{}function r(e){if(e.match(/#[\da-f]{3,8}/i))switch(e.length){case 4:return f=parseInt(e.slice(1,2).repeat(2),16),p=parseInt(e.slice(2,3).repeat(2),16),m=parseInt(e.slice(3,4).repeat(2),16),g.toColor(f,p,m);case 5:return f=parseInt(e.slice(1,2).repeat(2),16),p=parseInt(e.slice(2,3).repeat(2),16),m=parseInt(e.slice(3,4).repeat(2),16),h=parseInt(e.slice(4,5).repeat(2),16),g.toColor(f,p,m,h);case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}let r=e.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(r)return f=parseInt(r[1]),p=parseInt(r[2]),m=parseInt(r[3]),h=Math.round((r[5]===void 0?1:parseFloat(r[5]))*255),g.toColor(f,p,m,h);if(!t||!n||(t.fillStyle=n,t.fillStyle=e,typeof t.fillStyle!=`string`)||(t.fillRect(0,0,1,1),[f,p,m,h]=t.getImageData(0,0,1,1).data,h!==255))throw Error(`css.toColor: Unsupported css format`);return{rgba:g.toRgba(f,p,m,h),css:e}}e.toColor=r})(v||={});var y;(e=>{function t(e){return n(e>>16&255,e>>8&255,e&255)}e.relativeLuminance=t;function n(e,t,n){let r=e/255,i=t/255,a=n/255,o=r<=.03928?r/12.92:((r+.055)/1.055)**2.4,s=i<=.03928?i/12.92:((i+.055)/1.055)**2.4,c=a<=.03928?a/12.92:((a+.055)/1.055)**2.4;return o*.2126+s*.7152+c*.0722}e.relativeLuminance2=n})(y||={});var b;(e=>{function t(e,t){if(h=(t&255)/255,h===1)return t;let n=t>>24&255,r=t>>16&255,i=t>>8&255,a=e>>24&255,o=e>>16&255,s=e>>8&255;return f=a+Math.round((n-a)*h),p=o+Math.round((r-o)*h),m=s+Math.round((i-s)*h),g.toRgba(f,p,m)}e.blend=t;function n(e,t,n){let a=y.relativeLuminance(e>>8),o=y.relativeLuminance(t>>8);if(S(a,o)<n){if(o<a){let o=r(e,t,n),s=S(a,y.relativeLuminance(o>>8));if(s<n){let r=i(e,t,n);return s>S(a,y.relativeLuminance(r>>8))?o:r}return o}let s=i(e,t,n),c=S(a,y.relativeLuminance(s>>8));if(c<n){let i=r(e,t,n);return c>S(a,y.relativeLuminance(i>>8))?s:i}return s}}e.ensureContrastRatio=n;function r(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));for(;l<n&&(o>0||s>0||c>0);)o-=Math.max(0,Math.ceil(o*.1)),s-=Math.max(0,Math.ceil(s*.1)),c-=Math.max(0,Math.ceil(c*.1)),l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.reduceLuminance=r;function i(e,t,n){let r=e>>24&255,i=e>>16&255,a=e>>8&255,o=t>>24&255,s=t>>16&255,c=t>>8&255,l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));for(;l<n&&(o<255||s<255||c<255);)o=Math.min(255,o+Math.ceil((255-o)*.1)),s=Math.min(255,s+Math.ceil((255-s)*.1)),c=Math.min(255,c+Math.ceil((255-c)*.1)),l=S(y.relativeLuminance2(o,s,c),y.relativeLuminance2(r,i,a));return(o<<24|s<<16|c<<8|255)>>>0}e.increaseLuminance=i;function a(e){return[e>>24&255,e>>16&255,e>>8&255,e&255]}e.toChannels=a})(b||={});function x(e){let t=e.toString(16);return t.length<2?`0`+t:t}function S(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var ee=Object.freeze((()=>{let e=[v.toColor(`#2e3436`),v.toColor(`#cc0000`),v.toColor(`#4e9a06`),v.toColor(`#c4a000`),v.toColor(`#3465a4`),v.toColor(`#75507b`),v.toColor(`#06989a`),v.toColor(`#d3d7cf`),v.toColor(`#555753`),v.toColor(`#ef2929`),v.toColor(`#8ae234`),v.toColor(`#fce94f`),v.toColor(`#729fcf`),v.toColor(`#ad7fa8`),v.toColor(`#34e2e2`),v.toColor(`#eeeeec`)],t=[0,95,135,175,215,255];for(let n=0;n<216;n++){let r=t[n/36%6|0],i=t[n/6%6|0],a=t[n%6];e.push({css:g.toCss(r,i,a),rgba:g.toRgba(r,i,a)})}for(let t=0;t<24;t++){let n=8+t*10;e.push({css:g.toCss(n,n,n),rgba:g.toRgba(n,n,n)})}return e})());function C(e,t,n){return Math.max(t,Math.min(e,n))}function te(e){switch(e){case`&`:return`&amp;`;case`<`:return`&lt;`}return e}var w=class{constructor(e){this._buffer=e}serialize(e,t){let n=this._buffer.getNullCell(),r=this._buffer.getNullCell(),i=n,a=e.start.y,o=e.end.y,s=e.start.x,c=e.end.x;this._beforeSerialize(o-a,a,o);for(let t=a;t<=o;t++){let a=this._buffer.getLine(t);if(a){let o=t===e.start.y?s:0,l=t===e.end.y?c:a.length;for(let e=o;e<l;e++){let o=a.getCell(e,i===n?r:n);if(!o){console.warn(`Can't get cell at row=${t}, col=${e}`);continue}this._nextCell(o,i,t,e),i=o}}this._rowEnd(t,t===o)}return this._afterSerialize(),this._serializeString(t)}_nextCell(e,t,n,r){}_rowEnd(e,t){}_beforeSerialize(e,t,n){}_afterSerialize(){}_serializeString(e){return``}};function T(e,t){return e.getFgColorMode()===t.getFgColorMode()&&e.getFgColor()===t.getFgColor()}function E(e,t){return e.getBgColorMode()===t.getBgColorMode()&&e.getBgColor()===t.getBgColor()}function D(e,t){return e.isInverse()===t.isInverse()&&e.isBold()===t.isBold()&&e.isUnderline()===t.isUnderline()&&e.isOverline()===t.isOverline()&&e.isBlink()===t.isBlink()&&e.isInvisible()===t.isInvisible()&&e.isItalic()===t.isItalic()&&e.isDim()===t.isDim()&&e.isStrikethrough()===t.isStrikethrough()}var ne=class extends w{constructor(e,t){super(e),this._terminal=t,this._rowIndex=0,this._allRows=[],this._allRowSeparators=[],this._currentRow=``,this._nullCellCount=0,this._cursorStyle=this._buffer.getNullCell(),this._cursorStyleRow=0,this._cursorStyleCol=0,this._backgroundCell=this._buffer.getNullCell(),this._firstRow=0,this._lastCursorRow=0,this._lastCursorCol=0,this._lastContentCursorRow=0,this._lastContentCursorCol=0,this._thisRowLastChar=this._buffer.getNullCell(),this._thisRowLastSecondChar=this._buffer.getNullCell(),this._nextRowFirstChar=this._buffer.getNullCell()}_beforeSerialize(e,t,n){this._allRows=Array(e),this._lastContentCursorRow=t,this._lastCursorRow=t,this._firstRow=t}_rowEnd(e,t){this._nullCellCount>0&&!E(this._cursorStyle,this._backgroundCell)&&(this._currentRow+=`\x1B[${this._nullCellCount}X`);let n=``;if(!t){e-this._firstRow>=this._terminal.rows&&this._buffer.getLine(this._cursorStyleRow)?.getCell(this._cursorStyleCol,this._backgroundCell);let t=this._buffer.getLine(e),r=this._buffer.getLine(e+1);if(!r.isWrapped)n=`\r
2
2
  `,this._lastCursorRow=e+1,this._lastCursorCol=0;else{n=``;let i=t.getCell(t.length-1,this._thisRowLastChar),a=t.getCell(t.length-2,this._thisRowLastSecondChar),o=r.getCell(0,this._nextRowFirstChar),s=o.getWidth()>1,c=!1;(o.getChars()&&s?this._nullCellCount<=1:this._nullCellCount<=0)&&((i.getChars()||i.getWidth()===0)&&E(i,o)&&(c=!0),s&&(a.getChars()||a.getWidth()===0)&&E(i,o)&&E(a,o)&&(c=!0)),c||(n=`-`.repeat(this._nullCellCount+1),n+=`\x1B[1D\x1B[1X`,this._nullCellCount>0&&(n+=`\x1B[A`,n+=`\x1B[${t.length-this._nullCellCount}C`,n+=`\x1B[${this._nullCellCount}X`,n+=`\x1B[${t.length-this._nullCellCount}D`,n+=`\x1B[B`),this._lastContentCursorRow=e+1,this._lastContentCursorCol=0,this._lastCursorRow=e+1,this._lastCursorCol=0)}}this._allRows[this._rowIndex]=this._currentRow,this._allRowSeparators[this._rowIndex++]=n,this._currentRow=``,this._nullCellCount=0}_diffStyle(e,t){let n=[],r=!T(e,t),i=!E(e,t),a=!D(e,t);if(r||i||a){if(e.isAttributeDefault())t.isAttributeDefault()||n.push(0);else{if(r){let t=e.getFgColor();e.isFgRGB()?n.push(38,2,t>>>16&255,t>>>8&255,t&255):e.isFgPalette()?t>=16?n.push(38,5,t):n.push(t&8?90+(t&7):30+(t&7)):n.push(39)}if(i){let t=e.getBgColor();e.isBgRGB()?n.push(48,2,t>>>16&255,t>>>8&255,t&255):e.isBgPalette()?t>=16?n.push(48,5,t):n.push(t&8?100+(t&7):40+(t&7)):n.push(49)}a&&(e.isInverse()!==t.isInverse()&&n.push(e.isInverse()?7:27),e.isBold()!==t.isBold()&&n.push(e.isBold()?1:22),e.isUnderline()!==t.isUnderline()&&n.push(e.isUnderline()?4:24),e.isOverline()!==t.isOverline()&&n.push(e.isOverline()?53:55),e.isBlink()!==t.isBlink()&&n.push(e.isBlink()?5:25),e.isInvisible()!==t.isInvisible()&&n.push(e.isInvisible()?8:28),e.isItalic()!==t.isItalic()&&n.push(e.isItalic()?3:23),e.isDim()!==t.isDim()&&n.push(e.isDim()?2:22),e.isStrikethrough()!==t.isStrikethrough()&&n.push(e.isStrikethrough()?9:29))}}return n}_nextCell(e,t,n,r){if(e.getWidth()===0)return;let i=e.getChars()===``,a=this._diffStyle(e,this._cursorStyle);if(i?!E(this._cursorStyle,e):a.length>0){this._nullCellCount>0&&(E(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._lastContentCursorRow=this._lastCursorRow=n,this._lastContentCursorCol=this._lastCursorCol=r,this._currentRow+=`\x1B[${a.join(`;`)}m`;let e=this._buffer.getLine(n);e!==void 0&&(e.getCell(r,this._cursorStyle),this._cursorStyleRow=n,this._cursorStyleCol=r)}i?this._nullCellCount+=e.getWidth():(this._nullCellCount>0&&(E(this._cursorStyle,this._backgroundCell)||(this._currentRow+=`\x1B[${this._nullCellCount}X`),this._currentRow+=`\x1B[${this._nullCellCount}C`,this._nullCellCount=0),this._currentRow+=e.getChars(),this._lastContentCursorRow=this._lastCursorRow=n,this._lastContentCursorCol=this._lastCursorCol=r+e.getWidth())}_serializeString(e){let t=this._allRows.length;this._buffer.length-this._firstRow<=this._terminal.rows&&(t=this._lastContentCursorRow+1-this._firstRow,this._lastCursorCol=this._lastContentCursorCol,this._lastCursorRow=this._lastContentCursorRow);let n=``;for(let e=0;e<t;e++)n+=this._allRows[e],e+1<t&&(n+=this._allRowSeparators[e]);if(!e){let e=this._buffer.baseY+this._buffer.cursorY,t=this._buffer.cursorX;(e!==this._lastCursorRow||t!==this._lastCursorCol)&&((e=>{e>0?n+=`\x1B[${e}B`:e<0&&(n+=`\x1B[${-e}A`)})(e-this._lastCursorRow),(e=>{e>0?n+=`\x1B[${e}C`:e<0&&(n+=`\x1B[${-e}D`)})(t-this._lastCursorCol))}let r=this._terminal._core._inputHandler._curAttrData,i=this._diffStyle(r,this._cursorStyle);return i.length>0&&(n+=`\x1B[${i.join(`;`)}m`),n}},re=class{activate(e){this._terminal=e}_serializeBufferByScrollback(e,t,n){let r=t.length,i=n===void 0?r:C(n+e.rows,0,r);return this._serializeBufferByRange(e,t,{start:r-i,end:r-1},!1)}_serializeBufferByRange(e,t,n,r){return new ne(t,e).serialize({start:{x:0,y:typeof n.start==`number`?n.start:n.start.line},end:{x:e.cols,y:typeof n.end==`number`?n.end:n.end.line}},r)}_serializeBufferAsHTML(e,t){let n=e.buffer.active,r=new ie(n,e,t),i=t.onlySelection??!1,a=t.range;if(a)return r.serialize({start:{x:a.startCol,y:(a.startLine,a.startLine)},end:{x:e.cols,y:(a.endLine,a.endLine)}});if(!i){let i=n.length,a=t.scrollback,o=a===void 0?i:C(a+e.rows,0,i);return r.serialize({start:{x:0,y:i-o},end:{x:e.cols,y:i-1}})}let o=this._terminal?.getSelectionPosition();return o===void 0?``:r.serialize({start:{x:o.start.x,y:o.start.y},end:{x:o.end.x,y:o.end.y}})}_serializeModes(e){let t=``,n=e.modes;if(n.applicationCursorKeysMode&&(t+=`\x1B[?1h`),n.applicationKeypadMode&&(t+=`\x1B[?66h`),n.bracketedPasteMode&&(t+=`\x1B[?2004h`),n.insertMode&&(t+=`\x1B[4h`),n.originMode&&(t+=`\x1B[?6h`),n.reverseWraparoundMode&&(t+=`\x1B[?45h`),n.sendFocusMode&&(t+=`\x1B[?1004h`),n.wraparoundMode===!1&&(t+=`\x1B[?7l`),n.mouseTrackingMode!==`none`)switch(n.mouseTrackingMode){case`x10`:t+=`\x1B[?9h`;break;case`vt200`:t+=`\x1B[?1000h`;break;case`drag`:t+=`\x1B[?1002h`;break;case`any`:t+=`\x1B[?1003h`}return t}serialize(e){if(!this._terminal)throw Error(`Cannot use addon until it has been loaded`);let t=e?.range?this._serializeBufferByRange(this._terminal,this._terminal.buffer.normal,e.range,!0):this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.normal,e?.scrollback);if(!e?.excludeAltBuffer&&this._terminal.buffer.active.type===`alternate`){let e=this._serializeBufferByScrollback(this._terminal,this._terminal.buffer.alternate,void 0);t+=`\x1B[?1049h\x1B[H${e}`}return e?.excludeModes||(t+=this._serializeModes(this._terminal)),t}serializeAsHTML(e){if(!this._terminal)throw Error(`Cannot use addon until it has been loaded`);return this._serializeBufferAsHTML(this._terminal,e||{})}dispose(){}},ie=class extends w{constructor(e,t,n){super(e),this._terminal=t,this._options=n,this._currentRow=``,this._htmlContent=``,this._ansiColors=t._core._themeService?t._core._themeService.colors.ansi:ee}_padStart(e,t,n){return t>>=0,n??=` `,e.length>t?e:(t-=e.length,t>n.length&&(n+=n.repeat(t/n.length)),n.slice(0,t)+e)}_beforeSerialize(e,t,n){this._htmlContent+=`<html><body><!--StartFragment--><pre>`;let r=`#000000`,i=`#ffffff`;(this._options.includeGlobalBackground??!1)&&(r=this._terminal.options.theme?.foreground??`#ffffff`,i=this._terminal.options.theme?.background??`#000000`);let a=[];a.push(`color: `+r+`;`),a.push(`background-color: `+i+`;`),a.push(`font-family: `+this._terminal.options.fontFamily+`;`),a.push(`font-size: `+this._terminal.options.fontSize+`px;`),this._htmlContent+=`<div style='`+a.join(` `)+`'>`}_afterSerialize(){this._htmlContent+=`</div>`,this._htmlContent+=`</pre><!--EndFragment--></body></html>`}_rowEnd(e,t){this._htmlContent+=`<div><span>`+this._currentRow+`</span></div>`,this._currentRow=``}_getHexColor(e,t){let n=t?e.getFgColor():e.getBgColor();if(t?e.isFgRGB():e.isBgRGB())return`#`+[n>>16&255,n>>8&255,n&255].map(e=>this._padStart(e.toString(16),2,`0`)).join(``);if(t?e.isFgPalette():e.isBgPalette())return this._ansiColors[n].css}_diffStyle(e,t){let n=[],r=!T(e,t),i=!E(e,t),a=!D(e,t);if(r||i||a){let t=this._getHexColor(e,!0);t&&n.push(`color: `+t+`;`);let r=this._getHexColor(e,!1);return r&&n.push(`background-color: `+r+`;`),e.isInverse()&&n.push(`color: #000000; background-color: #BFBFBF;`),e.isBold()&&n.push(`font-weight: bold;`),e.isUnderline()&&e.isOverline()?n.push(`text-decoration: overline underline;`):e.isUnderline()?n.push(`text-decoration: underline;`):e.isOverline()&&n.push(`text-decoration: overline;`),e.isBlink()&&n.push(`text-decoration: blink;`),e.isInvisible()&&n.push(`visibility: hidden;`),e.isItalic()&&n.push(`font-style: italic;`),e.isDim()&&n.push(`opacity: 0.5;`),e.isStrikethrough()&&n.push(`text-decoration: line-through;`),n}}_nextCell(e,t,n,r){if(e.getWidth()===0)return;let i=e.getChars()===``,a=this._diffStyle(e,t);a&&(this._currentRow+=a.length===0?`</span><span>`:`</span><span style='`+a.join(` `)+`'>`),i?this._currentRow+=` `:this._currentRow+=te(e.getChars())}_serializeString(){return this._htmlContent}},O=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],k=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],A;function ae(e,t){let n=0,r=t.length-1,i;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=n;)if(i=n+r>>1,e>t[i][1])n=i+1;else if(e<t[i][0])r=i-1;else return!0;return!1}var oe=class{constructor(){if(this.version=`6`,!A){A=new Uint8Array(65536),A.fill(1),A[0]=0,A.fill(0,1,32),A.fill(0,127,160),A.fill(2,4352,4448),A[9001]=2,A[9002]=2,A.fill(2,11904,42192),A[12351]=1,A.fill(2,44032,55204),A.fill(2,63744,64256),A.fill(2,65040,65050),A.fill(2,65072,65136),A.fill(2,65280,65377),A.fill(2,65504,65511);for(let e=0;e<O.length;++e)A.fill(0,O[e][0],O[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?A[e]:ae(e,k)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let n=this.wcwidth(e),r=n===0&&t!==0;if(r){let e=We.extractWidth(t);e===0?r=!1:e>n&&(n=e)}return We.createPropertyValue(0,n,r)}},se=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?fe.isErrorNoTelemetry(e)?new fe(e.message+`
3
3
 
4
4
  `+e.stack):Error(e.message+`
@@ -11,7 +11,7 @@
11
11
  <meta name="apple-mobile-web-app-capable" content="yes" />
12
12
  <meta name="apple-mobile-web-app-title" content="rove" />
13
13
  <title>rove</title>
14
- <script type="module" crossorigin src="/assets/index-Cd9SayTz.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-CJt_9NpJ.js"></script>
15
15
  <link rel="stylesheet" crossorigin href="/assets/index-JwS03jgI.css">
16
16
  </head>
17
17
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@sma1lboy/rove",
4
- "version": "0.9.283",
4
+ "version": "0.9.284-next.136",
5
5
  "description": "Rove: all your coding agents, in one place. An agentic development environment (ADE) for your terminal: Claude Code, Codex, Copilot and more, side by side in isolated worktrees, handing tasks to each other.",
6
6
  "keywords": [
7
7
  "terminal",
@@ -63,6 +63,7 @@
63
63
  "check-i18n": "bun run scripts/check-i18n.ts",
64
64
  "test": "bun run test:fast && bun run test:socket",
65
65
  "perf:golden": "bun scripts/perf-golden.ts",
66
+ "rove-bench": "bun --conditions=browser scripts/rove-bench.ts",
66
67
  "pty:soak": "bun scripts/pty-soak.ts",
67
68
  "test:fast": "vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8",
68
69
  "test:socket": "ROVE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests",
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{NoopHookAdapter,activityHookAdapters,createEngineHookAdapter}from"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{createEngineHookAdapter,activityHookAdapters,NoopHookAdapter};
@@ -1,20 +0,0 @@
1
- // @bun
2
- import{FINISHED_ALERTS_KEY,RoveKeymap,SIDEBAR_COLLAPSED_KEY,SIDEBAR_WIDTH_KEY,TOAST_DURATION_MS,ZEN_ACTIVE_KEY,addUnread,armPrefixNow,bindingReachability,configurePrefix,currentPrefixConfiguration,dispatchKeyEvent,inputPassthroughReachable,insertRegistration,invokeArmedPrefixAction,isCtrlModifierKeyName,osc9,persistedSoundVolume,prefixHudHideDirect,prefixHudShowDirect,readKeybindingsFile,removeUnread,resetKeybindingsFileCache,resetPrefixConfiguration,resetPrefixState,resolveUserKeybindings,shouldAlert,shouldPlaySound,shouldShowToast}from"./chunk-bbq6wc47.js";import{$Fragment,$jsx,$jsxs,createRoot,flushSync,useRenderer}from"./chunk-rsdykw6f.js";import{require_react_production}from"./chunk-2wd4744g.js";import{RemoteOrchestrator}from"./chunk-gr0ffx3f.js";import{isUnpublishedStateKey}from"./chunk-cpgnm1xr.js";import{updaterShell,updaterShellFailureHint}from"./chunk-v883qbhk.js";import{BUNDLED_THEMES,DEFAULT_THEME,DEFAULT_THEME_MODE,applyDisplayOverlay,readPersistedUiPrefs,resolveTheme,resolveThemeMode}from"./chunk-k1m1c0yc.js";import{loadUserThemes}from"./chunk-kxp04jnp.js";import{TERMINAL_TABS_PREFIX}from"./chunk-mdc7b01e.js";import{connectIfRunning}from"./chunk-5mhf43dx.js";import{CURRENT_VERSION}from"./chunk-pzy7fe5e.js";import{tildify}from"./chunk-2r1fgng9.js";import{loadStateFile,patchStateFile,readStateFileStrict,replaceStateFile}from"./chunk-32j6y5d1.js";import{localeState,setLocaleLang,t}from"./chunk-4wq1jsve.js";import{isLocaleId}from"./chunk-af60qacx.js";import{createStateCell,profileMark,profileTick,recentStateChangesForDiagnostics,renderProfileOn}from"./chunk-cmp64q4j.js";import{kvStatePath}from"./chunk-z1nj22va.js";import{installClientCrashHandlers,logClient,logClientError,setClientLogContext}from"./chunk-0g4wc808.js";import{__toESM}from"./chunk-91sykzqq.js";import{RGBA}from"@opentui/core";var import_react3=__toESM(require_react_production(),1);var import_react=__toESM(require_react_production(),1);function useAccessor(state){return import_react.useSyncExternalStore(state.subscribe,state.get,state.get)}var store=createStateCell({themes:{...BUNDLED_THEMES},active:DEFAULT_THEME,mode:DEFAULT_THEME_MODE,transparentBackground:!0,focusAccent:"primary"});function listThemes(){return Object.keys(store.get().themes)}function hasTheme(name){return Boolean(store.get().themes[name])}function addTheme(name,theme){if(!name)return!1;if(!theme||typeof theme!=="object"||!theme.theme)return!1;return store.update((s)=>({...s,themes:{...s.themes,[name]:theme}})),!0}function selectedTheme(){return store.get().active}function setTheme(name){if(!hasTheme(name))return!1;return store.update((s)=>({...s,active:name})),!0}function transparentBackground(){return store.get().transparentBackground}function setTransparentBackground(v){store.update((s)=>({...s,transparentBackground:v}))}function focusAccent(){return store.get().focusAccent}function setFocusAccent(v){store.update((s)=>({...s,focusAccent:v}))}function themeMode(){return store.get().mode}function setThemeMode(mode){store.update((s)=>({...s,mode}))}var ThemeContext=import_react3.createContext(null),HOST_PALETTE_QUERY_TIMEOUT_MS=2000;function resolveActive(state,mode){let active=state.themes[state.active];if(active)return resolveTheme(active,mode);let fallback=state.themes[DEFAULT_THEME]??Object.values(state.themes)[0];if(!fallback)return resolveTheme({theme:{background:"#000000",text:"#ffffff"}},mode);return resolveTheme(fallback,mode)}function useHostThemeMode(renderer){let[mode,setMode]=import_react3.useState(()=>renderer?.themeMode??null);return import_react3.useEffect(()=>{if(!renderer)return;let onChange=(next)=>setMode(next);return renderer.on("theme_mode",onChange),setMode(renderer.themeMode),()=>{renderer.off("theme_mode",onChange)}},[renderer]),mode}function ThemeProvider(props){import_react3.useMemo(()=>{store.update((s)=>({...s,mode:props.mode??s.mode,active:props.theme&&s.themes[props.theme]?props.theme:s.active}))},[]);let state=useAccessor(store),renderer=useRenderer(),hostMode=useHostThemeMode(renderer),mode=resolveThemeMode(state.mode,hostMode),[hostBackground,setHostBackground]=import_react3.useState(null);import_react3.useEffect(()=>{if(!state.transparentBackground)return;if(renderer?.screenMode==="split-footer")return;if(!renderer)return;let cancelled=!1;return renderer.getPalette({timeout:HOST_PALETTE_QUERY_TIMEOUT_MS}).then((colors)=>{if(cancelled||!colors.defaultBackground)return;setHostBackground(RGBA.fromHex(colors.defaultBackground))}).catch(()=>{}),()=>{cancelled=!0}},[renderer,state.transparentBackground]);let theme=import_react3.useMemo(()=>applyDisplayOverlay(resolveActive(state,mode),state.focusAccent,state.transparentBackground,hostBackground??void 0),[state,mode,hostBackground]);import_react3.useEffect(()=>{if(renderer?.screenMode==="split-footer")return;renderer?.setBackgroundColor(theme.background??RGBA.fromInts(0,0,0))},[renderer,theme]);let value=import_react3.useMemo(()=>({theme,selected:state.active,transparentBackground:state.transparentBackground,focusAccent:state.focusAccent,modePreference:state.mode,mode:()=>mode,set(name){if(!hasTheme(name))return!1;return store.update((s)=>({...s,active:name})),!0},setMode(next){store.update((s)=>({...s,mode:next}))},setTransparentBackground(v){store.update((s)=>({...s,transparentBackground:v}))},setFocusAccent(v){store.update((s)=>({...s,focusAccent:v}))},preview:(options)=>applyDisplayOverlay(resolveActive({...state,active:options.themeName},resolveThemeMode(options.themeMode,hostMode)),options.focusAccent,options.transparentBackground,hostBackground??void 0),all:listThemes,has:hasTheme}),[theme,state,mode,hostMode,hostBackground]);return $jsx(ThemeContext.Provider,{value,children:props.children})}function useTheme(){let value=import_react3.useContext(ThemeContext);if(!value)throw Error("Theme context must be used within a context provider");return value}var import_react4=__toESM(require_react_production(),1);function useLang(){return useAccessor(localeState())}function useT(){let lang=useLang();return import_react4.useCallback((key,params)=>t(key,params),[lang])}var import_react7=__toESM(require_react_production(),1);var CTRL_HOLD_THRESHOLD_MS=400;function createCtrlHoldDetector(callbacks){let state={kind:"idle"},held=new Set,reset=()=>{if(state.kind==="pending")clearTimeout(state.timer);if(state.kind==="visible")callbacks.onHide();state={kind:"idle"}},cancel=()=>{reset(),held.clear()};return{keypress:(event)=>{if(!isCtrlModifierKeyName(event.name)){cancel();return}if(event.eventType==="repeat"&&held.has(event.name))return;if(event.eventType!=="press")return;if(held.add(event.name),state.kind!=="idle")return;state={kind:"pending",timer:setTimeout(()=>{state={kind:"visible"},callbacks.onReveal()},CTRL_HOLD_THRESHOLD_MS)}},keyrelease:(event)=>{if(!isCtrlModifierKeyName(event.name)||event.eventType!=="release")return;if(held.delete(event.name),held.size===0)reset()},cancel}}function availableActions(stack){let seen=new Set,actions=[],passthrough=inputPassthroughReachable(stack);for(let registration of[...stack].reverse()){let config=registration.config();if(config.enabled===!1)continue;for(let binding of config.bindings){if(binding.prefix&&currentPrefixConfiguration().key===null)continue;if(binding.yieldToPassthrough&&passthrough)continue;let chord=`${binding.prefix===!0}:${binding.key}`;if(seen.has(chord))continue;if(seen.add(chord),binding.id&&binding.action)actions.push({owner:registration.id,binding})}if(config.modal)break}return actions}function capturePaletteActions(stack){let seen=new Set;return availableActions(stack).flatMap(({owner,binding})=>{let id=binding.id;if(!id||id==="palette.open"||seen.has(id))return[];return seen.add(id),[{id,key:binding.key,prefix:binding.prefix===!0,run:()=>{let live=availableActions(stack).find((entry)=>entry.owner===owner&&entry.binding.id===id&&entry.binding.key===binding.key&&entry.binding.prefix===binding.prefix);if(!live?.binding.action)return!1;return live.binding.action.run(),!0}}]})}function bindByIds(handlers){let out=[];for(let id in handlers){let handler=handlers[id];if(!handler)continue;let action=typeof handler==="function"?void 0:handler,cmd=typeof handler==="function"?handler:()=>handler.run(),binding=findBinding(id),chords=binding?.keys??[],prefixChords=binding?.prefixKeys??[];if(chords.length===0&&prefixChords.length===0){console.warn(`[rove/keybindings] bindByIds: id="${id}" has no chords (or doesn't exist in RoveKeymap)`);continue}chords.forEach((key,slot)=>out.push({key,cmd,action,slot,id,yieldToPassthrough:binding?.yieldToPassthrough})),prefixChords.forEach((key,slot)=>out.push({key,prefix:!0,cmd,action,slot,id}))}return out}var KEYMAP_DEFAULTS=new Map(RoveKeymap.map((b)=>[b.id,{keys:[...b.keys],prefixKeys:b.prefixKeys&&[...b.prefixKeys],hint:b.hint?{...b.hint}:void 0}]));function defaultChordsOf(id){return KEYMAP_DEFAULTS.get(id)?.keys??[]}function resetKeymapToDefaults(){for(let row of RoveKeymap){let def=KEYMAP_DEFAULTS.get(row.id);if(!def)continue;let mutable=row;mutable.keys=[...def.keys],mutable.prefixKeys=def.prefixKeys&&[...def.prefixKeys],mutable.hint=def.hint?{...def.hint}:void 0}}var keymapVersionValue=0,keymapVersionListeners=new Set;function keymapVersion(){return keymapVersionValue}function subscribeKeymapVersion(listener){return keymapVersionListeners.add(listener),()=>{keymapVersionListeners.delete(listener)}}function bumpKeymapVersion(){keymapVersionValue+=1;for(let listener of[...keymapVersionListeners])listener()}var KEYMAP_BY_ID=new Map(RoveKeymap.map((b)=>[b.id,b]));function findBinding(id){return KEYMAP_BY_ID.get(id)}var MODIFIER_GLYPH={ctrl:"\u2303",control:"\u2303",alt:"\u2325",opt:"\u2325",option:"\u2325",shift:"\u21E7",cmd:"\u2318",command:"\u2318",meta:"\u2318",super:"\u2318"},KEY_GLYPH={enter:"\u23CE",return:"\u23CE",esc:"\u238B",escape:"\u238B",space:"\u2423",up:"\u2191",down:"\u2193",left:"\u2190",right:"\u2192",backspace:"\u232B",delete:"\u2326",del:"\u2326",pgup:"\u21DE",pageup:"\u21DE",pgdn:"\u21DF",pagedown:"\u21DF",home:"\u2196",end:"\u2198"};function formatKey(k,upper){if(k.includes("/"))return k.split("/").map((part)=>formatKey(part,upper)).join("/");let low=k.toLowerCase();if(low==="tab")return"tab";let named=KEY_GLYPH[low];if(named)return named;if(/^f\d{1,2}$/.test(low))return low.toUpperCase();if(!upper)return k;if(/^[a-z]$/.test(low))return k.toUpperCase();return k.replace(/[a-z]+/gi,(run)=>run.toUpperCase())}function formatChord(chord,prefixGlyph="\u2303A"){let s=chord.trim();if(!s)return s;let pm=/^prefix\s+(.+)$/i.exec(s);if(pm){let suffix=pm[1]??"";return`${prefixGlyph} ${suffix.includes("+")?formatChord(suffix,prefixGlyph):formatKey(suffix,!0)}`}let parts=s.split("+");if(parts.length===1)return formatKey(parts[0]??"",!1);let key=parts[parts.length-1]??"";return`${parts.slice(0,-1).map((p)=>MODIFIER_GLYPH[p.toLowerCase().trim()]??p).join("")} ${formatKey(key,!0)}`}var DIRECT_GUIDE_PREFIX_ACTION_ID="prefix.moreCommands",CTRL_FOLLOW_UP_CHORD=/^ctrl\+[^+]+$/;function ctrlFollowUpKey(chord){return CTRL_FOLLOW_UP_CHORD.test(chord)?chord.slice(5):null}function shortcutCaption(input){let binding=findBinding(input.bindingId);if(!binding)return null;if(input.reachability.direct.has(input.bindingId)){let direct=binding.keys[0];if(direct)return formatChord(direct)}if(input.prefixKey&&input.reachability.prefix.has(input.bindingId)){let stroke=binding.prefixKeys?.[0];if(stroke)return`${formatChord(input.prefixKey)} ${formatChord(stroke)}`}return null}function directGuideOptions(reachability,prefixKey){let options=RoveKeymap.filter((binding)=>reachability.direct.has(binding.id)).flatMap((binding)=>{let strokes=binding.keys.flatMap((chord)=>ctrlFollowUpKey(chord)??[]);if(strokes.length>2)return[{stroke:`${strokes[0]}-${strokes.at(-1)}`,action:binding.id}];return strokes.map((stroke)=>({stroke,action:binding.id}))}),prefixStroke=prefixKey?ctrlFollowUpKey(prefixKey):null;if(prefixStroke&&reachability.prefix.size>0)options.push({stroke:prefixStroke,action:DIRECT_GUIDE_PREFIX_ACTION_ID});return options}var import_react5=__toESM(require_react_production(),1);function useLatest(value){let ref=import_react5.useRef(value);return ref.current=value,ref}var ModalScopeContext=import_react7.createContext(null),nextId=1,stack=[],installedRenderer=null,installed=null,listener=null,releaseListener=null,ctrlHoldDetector=null,supersededRenderers=new WeakSet;function ensureInstalled(renderer){if(!renderer)throw Error("useBindings: no renderer in scope; call inside a component rendered by @opentui/react.");if(installedRenderer===renderer)return;if(supersededRenderers.has(renderer))return;if(installed&&listener)installed.off("keypress",listener);if(installed&&releaseListener)installed.off("keyrelease",releaseListener);if(ctrlHoldDetector?.cancel(),installedRenderer)supersededRenderers.add(installedRenderer);stack.length=0,resetPrefixState(),installedRenderer=renderer,installed=renderer.keyInput,ctrlHoldDetector=createCtrlHoldDetector({onReveal:()=>{resetPrefixState();let options=directGuideOptions(bindingReachability(stack),currentPrefixConfiguration().key);if(options.length>0)prefixHudShowDirect(options)},onHide:prefixHudHideDirect}),listener=(evt)=>{profileTick("key"),ctrlHoldDetector?.keypress(evt),dispatchKeyEvent(stack,evt,Date.now(),{flushSync})},releaseListener=(evt)=>ctrlHoldDetector?.keyrelease(evt),installed.on("keypress",listener),installed.on("keyrelease",releaseListener)}function modalActive(){return stack.some((r)=>r.modalOwner!==void 0)}function currentBindingReachability(){return bindingReachability(stack)}function armPrefixFromCurrentStack(){return armPrefixNow(stack)}function invokeArmedPrefixActionFromCurrentStack(actionId,stroke){return invokeArmedPrefixAction(stack,actionId,stroke)}var stackVersion=0,stackListeners=new Set;function bumpStackVersion(){prefixHudHideDirect(),stackVersion++;for(let listener2 of stackListeners)listener2()}function bindingReachabilitySignature(config){let bindings=config.bindings.map((binding)=>[binding.id??"",binding.key,binding.prefix===!0?"p":"d",binding.passthrough===!0?"i":"u"].join(":")).join("|");return`${config.enabled===!1?"off":"on"};${config.modal===!0?"modal":"plain"};${bindings}`}function subscribeBindingStack(listener2){return stackListeners.add(listener2),()=>{stackListeners.delete(listener2)}}function useBindingStackVersion(){return import_react7.useSyncExternalStore((onChange)=>{return stackListeners.add(onChange),()=>stackListeners.delete(onChange)},()=>stackVersion)}function useBindings(config,opts){let renderer=useRenderer();ensureInstalled(renderer);let configRef=useLatest(config),scope=import_react7.useContext(ModalScopeContext),reachabilitySignature=bindingReachabilitySignature(config()),previousReachabilitySignature=import_react7.useRef(reachabilitySignature);import_react7.useEffect(()=>{if(previousReachabilitySignature.current===reachabilitySignature)return;previousReachabilitySignature.current=reachabilitySignature,bumpStackVersion()},[reachabilitySignature]),import_react7.useEffect(()=>{if(supersededRenderers.has(renderer))return;if(opts?.modalOwner!==void 0)resetPrefixState();let reg={config:()=>configRef.current(),id:nextId++,modalOwner:opts?.modalOwner,modalMember:opts?.modalOwner===void 0?scope??void 0:void 0};return insertRegistration(stack,reg),bumpStackVersion(),()=>{let i=stack.findIndex((r)=>r.id===reg.id);if(i>=0)stack.splice(i,1);bumpStackVersion()}},[])}function pageCloseBindings(cmd){return[{key:"escape",cmd},{key:"q",cmd},{key:"ctrl+c",cmd}]}function currentPaletteActions(){return capturePaletteActions(stack)}import{createCliRenderer}from"@opentui/core";var import_react21=__toESM(require_react_production(),1);async function connectPaneOrchestrator(options={}){let tag=options.logTag??"orch-connect",connect=options.connect??connectIfRunning,remote=null;try{let client=await connect();if(!client)return logClient(tag,"no daemon running \u2014 caller degrades"),null;return remote=new RemoteOrchestrator(client,{...options.orchestratorOptions,channels:options.channels}),await remote.init(),remote}catch(err){return logClientError(tag,err),remote?.dispose(),null}}var cached=null;function applyUserKeybindings(){if(cached)return cached;let{report,prefix}=resolveUserKeybindings(readKeybindingsFile(),RoveKeymap,process.platform);if(report.exists)configurePrefix(prefix);for(let w of report.warnings)console.warn(`[rove/keybindings] ${w}`);return cached=report,cached}function pluginKeybindings(){return userKeybindingsReport().plugins}function userKeybindingsReport(){return cached??applyUserKeybindings()}function reloadUserKeybindings(){cached=null,resetKeybindingsFileCache(),resetKeymapToDefaults(),resetPrefixConfiguration();let report=applyUserKeybindings();return bumpKeymapVersion(),report}var UI_PREFS_FOCUS_ACCENT_SLOTS=["primary","success","info"];var UI_PREFS_THEME_MODES=["dark","light","auto"];function applyUiPrefs(target,prefs){if(typeof prefs.theme==="string"&&prefs.theme.length>0&&prefs.theme!==target.selectedTheme()){if(!target.hasTheme(prefs.theme))target.reloadUserThemes();if(target.hasTheme(prefs.theme))target.setTheme(prefs.theme)}if(prefs.themeMode===null||typeof prefs.themeMode==="string"){let mode=normalizeThemeMode(prefs.themeMode);if(mode&&mode!==target.themeMode())target.setThemeMode(mode)}if(typeof prefs.transparentBackground==="boolean"&&prefs.transparentBackground!==target.transparentBackground())target.setTransparentBackground(prefs.transparentBackground);if(prefs.focusAccent===null||typeof prefs.focusAccent==="string"){let slot=normalizeFocusAccent(prefs.focusAccent);if(slot&&slot!==target.focusAccent())target.setFocusAccent(slot)}}function normalizeFocusAccent(value){if(value===null)return"primary";return UI_PREFS_FOCUS_ACCENT_SLOTS.includes(value)?value:null}function normalizeThemeMode(value){if(value===null)return"dark";return UI_PREFS_THEME_MODES.includes(value)?value:null}var STALL_HEARTBEAT_MS=1000,STALL_THRESHOLD_MS=2000;function stallReport(gapMs,mem,heartbeatMs=STALL_HEARTBEAT_MS,thresholdMs=STALL_THRESHOLD_MS){let stallMs=gapMs-heartbeatMs;if(stallMs<thresholdMs)return null;let mb=(n)=>Math.round(n/1048576);return`event loop stalled ~${stallMs}ms \u2014 rss=${mb(mem.rss)}MB heapUsed=${mb(mem.heapUsed)}MB`}function installEventLoopStallTelemetry(){let last=Date.now(),timer=setInterval(()=>{let now=Date.now(),gap=now-last;last=now;let report=stallReport(gap,process.memoryUsage());if(report)logClient("stall",report)},STALL_HEARTBEAT_MS);return timer.unref?.(),()=>clearInterval(timer)}var KITTY_KEYBOARD={};function hostTargetFps(){return 60}function hostRenderOptions(onDestroy){let base={backgroundColor:"transparent",externalOutputMode:"passthrough",exitOnCtrlC:!1,screenMode:"alternate-screen",useKittyKeyboard:KITTY_KEYBOARD,targetFps:hostTargetFps()};return onDestroy?{...base,onDestroy}:base}function inlineRenderOptions(heightRows,onDestroy){let base={backgroundColor:"transparent",exitOnCtrlC:!1,screenMode:"split-footer",footerHeight:heightRows,useKittyKeyboard:KITTY_KEYBOARD};return onDestroy?{...base,onDestroy}:base}function installExitRestoreBackstop(renderer){process.on("exit",()=>renderer.destroy())}var BRACKETED_PASTE_ON="\x1B[?2004h",BRACKETED_PASTE_OFF="\x1B[?2004l";function installBracketedPasteMode(stdout=process.stdout){if(!stdout.isTTY)return()=>{};let write=(seq)=>{try{stdout.write(seq)}catch{}};write(BRACKETED_PASTE_ON);let restored=!1,restore=()=>{if(restored)return;restored=!0,write(BRACKETED_PASTE_OFF)};return process.on("exit",restore),restore}var exitCriticalWork=new Set;async function whenExitReady(){while(exitCriticalWork.size>0)await Promise.allSettled([...exitCriticalWork])}function installPaneExitBackstop(opts={}){let ceilingMs=opts.ceilingMs??5000,exit=opts.exit??((code)=>process.exit(code)),exitScheduled=!1,exited=!1,exitOnce=()=>{if(exited)return;exited=!0,exit(0)},scheduleExit=()=>{if(exitScheduled)return;exitScheduled=!0;let ceiling=setTimeout(()=>{console.error(`[rove] exit backstop: ${exitCriticalWork.size} task(s) still in flight after ${ceilingMs}ms \u2014 exiting anyway`),exitOnce()},ceilingMs);ceiling.unref?.(),whenExitReady().then(()=>{clearTimeout(ceiling),exitOnce()})};for(let signal of["SIGHUP","SIGTERM","SIGINT"])process.on(signal,scheduleExit)}function installOrphanExitWatchdog(intervalMs=5000){let timer=setInterval(()=>{if(process.ppid===1)process.exit(0)},intervalMs);return timer.unref?.(),()=>clearInterval(timer)}var SYNC_START=Buffer.from("\x1B[?2026h"),SYNC_END=Buffer.from("\x1B[?2026l");class ImeAnchorController{owner=null;anchor=null;claim(owner,anchor){this.owner=owner,this.anchor={x:Math.max(0,Math.trunc(anchor.x)),y:Math.max(0,Math.trunc(anchor.y))}}release(owner){if(this.owner!==owner)return!1;return this.owner=null,this.anchor=null,!0}current(){return this.anchor}}var imeAnchorController=new ImeAnchorController;class ImeAnchorFrameTransformer{controller;pending=Buffer.alloc(0);frame=Buffer.alloc(0);constructor(controller){this.controller=controller}push(chunk){let data=this.pending.length>0?Buffer.concat([this.pending,chunk]):chunk;this.pending=Buffer.alloc(0);let output=[],offset=0;while(offset<data.length){if(this.frame.length===0){let start=data.indexOf(SYNC_START,offset);if(start<0){let tail2=data.subarray(offset),pendingLength2=longestMarkerPrefixSuffix(tail2,[SYNC_START]),safeLength2=tail2.length-pendingLength2;if(safeLength2>0)output.push(tail2.subarray(0,safeLength2));if(pendingLength2>0)this.pending=Buffer.from(tail2.subarray(safeLength2));break}if(start>offset)output.push(data.subarray(offset,start));this.frame=Buffer.from(SYNC_START),offset=start+SYNC_START.length;continue}let end=data.indexOf(SYNC_END,offset),restart=data.indexOf(SYNC_START,offset);if(restart>=0&&(end<0||restart<end)){this.frame=Buffer.from(SYNC_START),offset=restart+SYNC_START.length;continue}if(end>=0){if(end>offset)this.frame=Buffer.concat([this.frame,data.subarray(offset,end)]);output.push(this.frame);let anchor=this.controller.current();if(anchor)output.push(Buffer.from(`\x1B[${anchor.y+1};${anchor.x+1}H\x1B[?25l`));output.push(SYNC_END),this.frame=Buffer.alloc(0),offset=end+SYNC_END.length;continue}let tail=data.subarray(offset),pendingLength=longestMarkerPrefixSuffix(tail,[SYNC_START,SYNC_END]),safeLength=tail.length-pendingLength;if(safeLength>0)this.frame=Buffer.concat([this.frame,tail.subarray(0,safeLength)]);if(pendingLength>0)this.pending=Buffer.from(tail.subarray(safeLength));break}return output.length>0?Buffer.concat(output):Buffer.alloc(0)}flush(){if(this.frame.length>0)return this.frame=Buffer.alloc(0),this.pending=Buffer.alloc(0),Buffer.alloc(0);let pending=this.pending;return this.pending=Buffer.alloc(0),pending}}function longestMarkerPrefixSuffix(bytes,markers){let max=Math.min(bytes.length,Math.max(...markers.map((marker)=>marker.length-1)));for(let length=max;length>0;length-=1){let suffix=bytes.subarray(bytes.length-length);if(markers.some((marker)=>length<marker.length&&suffix.equals(marker.subarray(0,length))))return length}return 0}function asBuffer(chunk,encodingOrCallback){if(typeof chunk!=="string")return Buffer.from(chunk);let encoding=typeof encodingOrCallback==="string"?encodingOrCallback:void 0;return Buffer.from(chunk,encoding)}function writeCallback(encodingOrCallback,maybeCallback){return typeof encodingOrCallback==="function"?encodingOrCallback:maybeCallback}function createImeAnchoredOutput(target,controller=imeAnchorController){let transformer=new ImeAnchorFrameTransformer(controller),exposedWrite=(chunk,encodingOrCallback,maybeCallback)=>{let transformed=transformer.push(asBuffer(chunk,encodingOrCallback)),callback=writeCallback(encodingOrCallback,maybeCallback);if(transformed.length===0){if(callback)queueMicrotask(()=>callback(null));return!0}return callback?target.write(transformed,callback):target.write(transformed)};return{stdout:new Proxy(target,{get(stream,property){if(property==="write")return exposedWrite;let value=Reflect.get(stream,property,stream);return typeof value==="function"?value.bind(stream):value},set(stream,property,value){if(property==="write")return exposedWrite=value,!0;return Reflect.set(stream,property,value,stream)}}),flush(){let pending=transformer.flush();if(pending.length>0)target.write(pending)}}}var IME_ANCHOR_PLATFORMS=new Set(["darwin","win32"]);function createHostImeOutput(opts){if(!IME_ANCHOR_PLATFORMS.has(opts.platform)||!opts.fullscreen)return{active:!1,rendererOptions:{},attach:()=>()=>{},flush:()=>{}};let output=createImeAnchoredOutput(opts.stdout,opts.controller);return{active:!0,rendererOptions:{stdout:output.stdout,remote:!1},attach:(renderer)=>installRendererResizeForwarder(renderer,opts.stdout),flush:()=>output.flush()}}function installRendererResizeForwarder(renderer,terminal,signals=process){let onResize=()=>{let{columns:width,rows:height}=terminal;if(!width||!height)return;renderer.resize(width,height)};return signals.on("SIGWINCH",onResize),()=>signals.removeListener("SIGWINCH",onResize)}function needsScreenSelfHeal(platform){return platform==="win32"}function requestFullRepaint(renderer){if(renderer.screenMode!=="alternate-screen")return!1;let internals=renderer;return internals.forceFullRepaintRequested=!0,renderer.requestRender(),!0}function writeThroughRenderer(renderer,chunk,fallback=process.stdout){let writeOut=renderer?.writeOut;try{if(typeof writeOut==="function")writeOut.call(renderer,chunk);else fallback.write(chunk)}catch{}}function redrawScreen(renderer){if(renderer.screenMode!=="alternate-screen")return!1;return writeThroughRenderer(renderer,"\x1B[H\x1B[2J"),requestFullRepaint(renderer)}function installScreenSelfHeal(opts){let platform=opts.platform??process.platform;if(!needsScreenSelfHeal(platform))return()=>{};let{renderer}=opts,repaint=()=>{requestFullRepaint(renderer)};return renderer.on("resize",repaint),renderer.on("focus",repaint),()=>{renderer.off("resize",repaint),renderer.off("focus",repaint)}}var import_react9=__toESM(require_react_production(),1);var PANE_ORDER=["sidebar","workspace","files","terminal"],FocusContext=import_react9.createContext(null);function FocusProvider(props){let[focused,setFocusedState]=import_react9.useState(props.initial??"sidebar"),renderer=useRenderer(),focusedRef=useLatest(focused),setFocused=import_react9.useCallback((pane)=>{if(focusedRef.current===pane)return;let current=renderer?.currentFocusedRenderable;if(current&&!current.isDestroyed)try{current.blur()}catch{}setFocusedState(pane)},[renderer]),cycle=import_react9.useCallback((delta)=>{let next=(PANE_ORDER.indexOf(focusedRef.current)+delta+PANE_ORDER.length)%PANE_ORDER.length;setFocused(PANE_ORDER[next])},[setFocused]),value=import_react9.useMemo(()=>({focused,is:(pane)=>focused===pane,setFocused,cycle}),[focused,setFocused,cycle]);return $jsx(FocusContext.Provider,{value,children:props.children})}function useFocus(){let ctx=import_react9.useContext(FocusContext);if(!ctx)throw Error("useFocus: must be called inside <FocusProvider>. See src/tui-react/context/focus.tsx.");return ctx}function useOptionalFocus(){return import_react9.useContext(FocusContext)}var import_react10=__toESM(require_react_production(),1);var WRITE_DEBOUNCE_MS=250,PER_WINDOW_KEYS=new Set([SIDEBAR_COLLAPSED_KEY,SIDEBAR_WIDTH_KEY,ZEN_ACTIVE_KEY]);function createKvCore(){let store2=createStateCell(loadStateFile(),"kv.snapshot"),dirtyKeys=new Set,quiet=new Map,seeded=new Map,writeTimer=null,errorListeners=new Set,reportedKeys=new Set;function reportWriteError(err){let fresh=[...dirtyKeys].filter((key)=>!reportedKeys.has(key));if(fresh.length===0)return;for(let key of fresh)reportedKeys.add(key);let failure={keys:fresh,file:kvStatePath(),error:err};for(let listener2 of errorListeners)listener2(failure)}function writeNow(label){if(dirtyKeys.size===0)return!0;try{let patch={},snap=store2.get();for(let key of dirtyKeys)patch[key]=quiet.has(key)?quiet.get(key):snap[key];return patchStateFile(patch,"strict"),dirtyKeys.clear(),reportedKeys.clear(),!0}catch(err){return console.error(`[rove] kv ${label} failed:`,err),reportWriteError(err),!1}}function cancelTimer(){if(writeTimer)clearTimeout(writeTimer),writeTimer=null}function scheduleWrite(){cancelTimer(),writeTimer=setTimeout(()=>{writeTimer=null,writeNow("write")},WRITE_DEBOUNCE_MS)}function merge(fresh,keepQuiet){let before=store2.get(),next={...fresh};for(let[key,value]of seeded)if(next[key]===void 0)next[key]=value;for(let key of dirtyKeys)if(before[key]===void 0)delete next[key];else next[key]=before[key];let quietChanged=!1;for(let key of[...quiet.keys()]){if(dirtyKeys.has(key))continue;if(!keepQuiet||JSON.stringify(quiet.get(key))!==JSON.stringify(fresh[key])){quietChanged=!0,quiet.delete(key);continue}if(before[key]===void 0)delete next[key];else next[key]=before[key]}if(dirtyKeys.size>0)scheduleWrite();let changed=0;for(let key of new Set([...Object.keys(before),...Object.keys(next)]))if(JSON.stringify(before[key])!==JSON.stringify(next[key]))changed++;if(changed>0||quietChanged)store2.set(next);return changed}return{snapshot:store2.get,subscribe:store2.subscribe,get(key,defaultValue){return(quiet.has(key)?quiet.get(key):store2.get()[key])??defaultValue},set(key,value){if(key.startsWith(TERMINAL_TABS_PREFIX)){logClientError("kv",Error(`refused a local write of ${key}: tabs go through the daemon`));return}quiet.delete(key),store2.update((s)=>{if(value!==void 0)return{...s,[key]:value};if(!(key in s))return s;let next={...s};return delete next[key],next}),dirtyKeys.add(key),scheduleWrite()},setQuiet(key,value){quiet.set(key,value),dirtyKeys.add(key),scheduleWrite()},seed(key,value){if(!seeded.has(key))seeded.set(key,value);if(quiet.has(key)||store2.get()[key]!==void 0)return;store2.update((s)=>({...s,[key]:value}))},flush(){return cancelTimer(),writeNow("flush")},clear(){try{replaceStateFile({})}catch(err){return console.error("[rove] kv clear write failed:",err),!1}return cancelTimer(),dirtyKeys.clear(),reportedKeys.clear(),quiet.clear(),store2.set({}),!0},reload(){try{return readStateFileStrict(),cancelTimer(),writeNow("reload flush"),{ok:!0,changed:merge(readStateFileStrict(),!1)}}catch(error){return{ok:!1,error}}},follow(shared){let next={...shared};for(let key of PER_WINDOW_KEYS)delete next[key];for(let[key,value]of Object.entries(store2.get()))if(isUnpublishedStateKey(key)||PER_WINDOW_KEYS.has(key))next[key]=value;merge(next,!0)},onWriteError(listener2){return errorListeners.add(listener2),()=>{errorListeners.delete(listener2)}}}}var Ctx=import_react10.createContext(null);function KVProvider(props){let[core]=import_react10.useState(createKvCore),snapshot=import_react10.useSyncExternalStore(core.subscribe,core.snapshot,core.snapshot);import_react10.useEffect(()=>{let flush=()=>{core.flush()};return process.on("exit",flush),()=>{process.off("exit",flush)}},[core]);let value=import_react10.useMemo(()=>({ready:!0,store:snapshot,signal(name,defaultValue){return core.seed(name,defaultValue),[()=>core.get(name)??defaultValue,(next)=>core.set(name,next)]},get:core.get,set:core.set,setQuiet:core.setQuiet,flush:core.flush,clear:core.clear,reload:core.reload,follow:core.follow,onWriteError:core.onWriteError}),[core,snapshot]);return $jsx(Ctx.Provider,{value,children:props.children})}function useKV(){let value=import_react10.useContext(Ctx);if(!value)throw Error("KV context must be used within a context provider");return value}function useOptionalKV(){return import_react10.useContext(Ctx)??null}var import_react13=__toESM(require_react_production(),1);var import_react12=__toESM(require_react_production(),1);import{existsSync,mkdirSync}from"fs";import{tmpdir}from"os";import{basename,delimiter,extname,isAbsolute,join,resolve}from"path";var pulse_default="../pulse-ynhb2ave.wav";function scaleWavVolume(wav,volume){let gain=Math.min(1,Math.max(0,volume));if(wav.length<12)return null;if(wav.readUInt32BE(0)!==1380533830||wav.readUInt32BE(8)!==1463899717)return null;let bitsPerSample,format,data;for(let offset=12;offset+8<=wav.length;){let id=wav.readUInt32BE(offset),size=wav.readUInt32LE(offset+4),start=offset+8,end=start+size;if(size<0||end>wav.length)return null;if(id===1718449184){if(size<16)return null;format=wav.readUInt16LE(start),bitsPerSample=wav.readUInt16LE(start+14)}else if(id===1684108385)data={start,end};offset=end+size%2}if(format!==1||bitsPerSample!==16||!data)return null;if((data.end-data.start)%2!==0)return null;let out=Buffer.from(wav);if(gain===1)return out;for(let i=data.start;i<data.end;i+=2){let scaled=Math.round(out.readInt16LE(i)*gain);out.writeInt16LE(Math.min(32767,Math.max(-32768,scaled)),i)}return out}var pulseAsset=isAbsolute(pulse_default)?pulse_default:resolve(import.meta.dir,pulse_default),DIR=join(tmpdir(),"rove-sfx"),PLAYERS=["ffplay","mpv","mpg123","mpg321","mplayer","afplay","play","omxplayer","aplay","cmdmp3","cvlc","powershell.exe"];function args(player,file){if(player==="ffplay")return[player,"-autoexit","-nodisp",file];if(player==="mpv")return[player,"--no-video","--audio-display=no",file];if(player==="mplayer")return[player,"-vo","null",file];if(player==="cvlc")return[player,"--play-and-exit",file];if(player==="powershell.exe")return[player,"-c",`(New-Object Media.SoundPlayer '${file.replace(/'/g,"''")}').PlaySync()`];return[player,file]}var cachedPlayer,cachedPaths=new Map;function pathDirs(rawPath,delim=delimiter){return rawPath.split(delim).filter(Boolean)}function pickPlayer(){if(cachedPlayer!==void 0)return cachedPlayer;let segments=pathDirs(process.env.PATH??"");return cachedPlayer=PLAYERS.find((p)=>segments.some((dir)=>existsSync(join(dir,p))))??null,cachedPlayer}function assetNameFor(assetPath,volume){let name=basename(assetPath),ext=extname(name);return`${name.slice(0,name.length-ext.length)}@${Math.round(volume*100)}${ext}`}async function ensureAsset(volume){let cached2=cachedPaths.get(volume);if(cached2)return cached2;let pending=(async()=>{mkdirSync(DIR,{recursive:!0});let dest=join(DIR,assetNameFor(pulseAsset,volume)),out=Bun.file(dest);if(await out.exists())return dest;let source=Buffer.from(await Bun.file(pulseAsset).arrayBuffer());return await Bun.write(out,scaleWavVolume(source,volume)??source),dest})();return cachedPaths.set(volume,pending),pending}function pulse(volume=persistedSoundVolume()){if(!(volume>0))return;let player=pickPlayer();if(!player)return;ensureAsset(volume).then((path)=>{try{Bun.spawn(args(player,path),{stdin:"ignore",stdout:"ignore",stderr:"ignore"}).unref?.()}catch{}}).catch(()=>{return})}var ctx=import_react12.createContext(null);function NotificationsProvider(props){let[toasts,setToasts]=import_react12.useState([]),[unread,setUnread]=import_react12.useState(new Map),kv=useOptionalKV(),renderer=useRenderer(),snapshot=import_react12.useMemo(()=>loadStateFile(),[]),prefs=import_react12.useMemo(()=>({"notifications.sound.enabled":kv?.get("notifications.sound.enabled")??snapshot["notifications.sound.enabled"],"notifications.toast.enabled":kv?.get("notifications.toast.enabled")??snapshot["notifications.toast.enabled"],[FINISHED_ALERTS_KEY]:kv?.get(FINISHED_ALERTS_KEY)??snapshot[FINISHED_ALERTS_KEY]}),[kv,snapshot]),counter=import_react12.useRef(0),timers=import_react12.useRef(new Set);import_react12.useEffect(()=>()=>{for(let id of timers.current)clearTimeout(id);timers.current.clear()},[]);let dismiss=import_react12.useCallback((id)=>{setToasts((prev)=>prev.filter((t2)=>t2.id!==id))},[]),notify=import_react12.useCallback((input)=>{if(setUnread((prev)=>addUnread(prev,input)),!shouldAlert(input,prefs[FINISHED_ALERTS_KEY]!==!1))return;let soundEnabled=prefs["notifications.sound.enabled"]!==!1;if(shouldPlaySound(input,soundEnabled))writeThroughRenderer(renderer,`\x07${osc9(`Rove \u2014 ${input.title}`)}`),pulse();let toastEnabled=prefs["notifications.toast.enabled"]!==!1;if(shouldShowToast(input.kind,toastEnabled)){let id=++counter.current;setToasts((prev)=>[...prev,{id,...input}]);let timer=setTimeout(()=>{timers.current.delete(timer),dismiss(id)},TOAST_DURATION_MS);timers.current.add(timer)}},[prefs,dismiss,renderer]),markRead=import_react12.useCallback((taskId,tabId)=>{setUnread((prev)=>removeUnread(prev,taskId,tabId))},[]),value=import_react12.useMemo(()=>({toasts,unread,notify,dismiss,markRead}),[toasts,unread,notify,dismiss,markRead]);return $jsx(ctx.Provider,{value,children:props.children})}function useNotifications(){let value=import_react12.useContext(ctx);if(!value)throw Error("useNotifications must be used within a NotificationsProvider");return value}function useOptionalNotifications(){return import_react12.useContext(ctx)}function KvWriteErrorToasts(){let kv=useOptionalKV(),notifications=useOptionalNotifications();return import_react13.useEffect(()=>{if(!kv||!notifications)return;return kv.onWriteError((failure)=>{notifications.notify({taskId:"",tabId:"",kind:"error",title:t("settings.stateWrite.failedTitle"),body:t("settings.stateWrite.failedBody",{file:tildify(failure.file),keys:failure.keys.join(", ")})})})},[kv,notifications]),null}var import_react17=__toESM(require_react_production(),1);function isNarrowWidth(cols){return cols<70}function narrowSurface(args2){if(args2.focusedPane==="sidebar")return"sidebar";return args2.hasSelection||args2.hasOpenPage?"content":"sidebar"}var import_react15=__toESM(require_react_production(),1);var stores=new WeakMap;function terminalSizeStore(source){let existing=stores.get(source);if(existing)return existing;let listeners=new Set,size={width:source.width,height:source.height},notify=()=>{for(let listener2 of listeners)listener2()},store2={subscribe(listener2){if(listeners.add(listener2),listeners.size===1)source.on("resize",notify);return()=>{if(listeners.delete(listener2),listeners.size===0)source.off("resize",notify)}},snapshot(){if(size.width!==source.width||size.height!==source.height)size={width:source.width,height:source.height};return size}};return stores.set(source,store2),store2}function useTerminalSize(){let store2=terminalSizeStore(useRenderer());return import_react15.useSyncExternalStore(store2.subscribe,store2.snapshot)}function useDialogPaddingX(){let dims=useTerminalSize();return isNarrowWidth(dims.width)?1:2}var DIALOG_CONTENT_OPACITY=0.5,TRANSPARENT_DIALOG_CONTENT_OPACITY=0.75;function Dialog(props){let dimensions=useTerminalSize(),{theme}=useTheme(),renderer=useRenderer(),dismissRef=import_react17.useRef(!1),width=props.size==="xlarge"?140:props.size==="large"?110:props.size==="small"?50:80,VERTICAL_MARGIN=2,upperFifth=props.placement==="upper-fifth"&&!isNarrowWidth(dimensions.width),headerTop=Math.max(2,Math.floor(dimensions.height/5)),cardTop=upperFifth?Math.max(2,headerTop-1):0,maxCardHeight=Math.max(8,upperFifth?dimensions.height-cardTop-2:dimensions.height-4);return $jsx("box",{onMouseDown:()=>{dismissRef.current=!!renderer?.getSelection()},onMouseUp:()=>{if(dismissRef.current){dismissRef.current=!1;return}props.onClose?.()},width:dimensions.width,height:dimensions.height,alignItems:"center",justifyContent:upperFifth?"flex-start":"center",paddingTop:cardTop,position:"absolute",zIndex:3000,left:0,top:0,shouldFill:!1,children:$jsx("box",{onMouseUp:(e)=>{dismissRef.current=!1,e.stopPropagation()},width,maxWidth:dimensions.width-2,maxHeight:maxCardHeight,flexShrink:1,flexGrow:0,backgroundColor:theme.backgroundDialog,paddingTop:1,children:props.children})})}var entrySeq=0,ctx2=import_react17.createContext(null);function DialogProvider(props){let[stack2,setStack]=import_react17.useState([]),[size,setSize]=import_react17.useState("medium"),[placement,setPlacement]=import_react17.useState("center"),renderer=useRenderer(),{transparentBackground:transparentBackground2}=useTheme(),focusRef=import_react17.useRef(null),refocusTimer=import_react17.useRef(null);import_react17.useEffect(()=>()=>{if(refocusTimer.current)clearTimeout(refocusTimer.current)},[]);let refocus=import_react17.useCallback(()=>{if(refocusTimer.current)clearTimeout(refocusTimer.current);refocusTimer.current=setTimeout(()=>{let focus=focusRef.current;if(!focus||focus.isDestroyed)return;function find(item){for(let child of item.getChildren()){if(child===focus)return!0;if(find(child))return!0}return!1}let root=renderer?.root;if(!root)return;if(!find(root))return;focus.focus()},1)},[renderer]),stackRef=useLatest(stack2),captureFocusIfFirst=import_react17.useCallback(()=>{if(refocusTimer.current)clearTimeout(refocusTimer.current);if(stackRef.current.length===0)focusRef.current=renderer?.currentFocusedRenderable??null,focusRef.current?.blur()},[renderer]),dismissTop=import_react17.useCallback(()=>{let selection=renderer?.getSelection();if(selection){if(renderer?.clearSelection(),selection.getSelectedText())return}stackRef.current.at(-1)?.onClose?.(),setStack((s)=>s.slice(0,-1)),refocus()},[renderer,refocus]),value=import_react17.useMemo(()=>({clear(options){for(let item of stackRef.current)item.onClose?.();if(setSize("medium"),setPlacement("center"),setStack([]),options?.refocus===!1)focusRef.current=null;else refocus()},replace(thunk,onClose){captureFocusIfFirst();for(let item of stackRef.current)item.onClose?.();setSize("medium"),setPlacement("center"),setStack([{key:++entrySeq,element:thunk,onClose}])},push(thunk,onClose){captureFocusIfFirst(),setStack((s)=>[...s,{key:++entrySeq,element:thunk,onClose}])},pop(){if(stackRef.current.at(-1)?.onClose?.(),setStack((s)=>s.slice(0,-1)),stackRef.current.length<=1)refocus()},get stack(){return stackRef.current},get size(){return size},setSize,get placement(){return placement},setPlacement}),[stack2,size,placement,refocus,captureFocusIfFirst]),top=stack2.at(-1),contentOpacity=top?transparentBackground2?TRANSPARENT_DIALOG_CONTENT_OPACITY:DIALOG_CONTENT_OPACITY:1;return $jsxs(ctx2.Provider,{value,children:[$jsx("box",{flexGrow:1,backgroundColor:top&&!transparentBackground2?"black":"transparent",children:$jsx("box",{flexGrow:1,opacity:contentOpacity,children:props.children})}),$jsx("box",{position:"absolute",zIndex:3000,children:top?$jsxs(ModalScopeContext,{value:MODAL_SCOPE,children:[$jsx(ModalBarrier,{dismissTop}),$jsx(Dialog,{onClose:()=>value.clear(),size,placement,children:top.element()},top.key)]}):null})]})}var MODAL_SCOPE=Symbol("rove.dialog.modal");function ModalBarrier(props){return useBindings(()=>({modal:!0,bindings:[{key:"escape",cmd:props.dismissTop},{key:"ctrl+c",cmd:props.dismissTop}]}),{modalOwner:MODAL_SCOPE}),null}function useDialog(){let value=import_react17.useContext(ctx2);if(!value)throw Error("useDialog must be used within a DialogProvider");return value}function useOptionalDialog(){return import_react17.useContext(ctx2)}function showDialog(dialog,body,opts){return new Promise((resolve2)=>{let settled=!1,finish=(value)=>{if(settled)return;settled=!0,resolve2(value),dialog.clear()};if(dialog.replace(()=>body(finish),()=>{if(settled)return;settled=!0,resolve2(void 0)}),opts?.size)dialog.setSize(opts.size)})}var import_react18=__toESM(require_react_production(),1);function PaneCrashFallback(props){let{theme}=useTheme(),t2=useT(),sizing=props.width===void 0?{flexGrow:1}:{width:props.width,flexShrink:0};return $jsxs("box",{...sizing,flexDirection:"column",backgroundColor:theme.background,paddingLeft:1,paddingTop:1,gap:1,children:[$jsx("text",{fg:theme.error,wrapMode:"word",children:props.region?t2("common.paneCrash.regionTitle",{region:t2(`common.paneCrash.region.${props.region}`)}):t2("common.paneCrash.title")}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t2(props.region?"common.paneCrash.regionHint":"common.paneCrash.hint")}),$jsx("text",{fg:theme.focusAccent,onMouseUp:props.onRetry,children:t2("common.paneCrash.retry")})]})}function formatPaneCrashDiagnostic(region,error,info){let base=error instanceof Error?error.stack??error.message:String(error),componentStack=info.componentStack?.trim()||"(unavailable)",stateChanges=recentStateChangesForDiagnostics();return`region: ${region??"root"}
3
- ${base}
4
- React component stack:
5
- ${componentStack}
6
- Recent state changes:
7
- ${stateChanges.length>0?stateChanges.join(`
8
- `):"(none recorded)"}`}function sameKeys(a,b){if(a===b)return!0;if(!a||!b||a.length!==b.length)return!1;return a.every((value,i)=>Object.is(value,b[i]))}class PaneErrorBoundary extends import_react18.Component{state={error:null};static getDerivedStateFromError(error){return{error}}componentDidCatch(error,info){logClientError("pane-crash",formatPaneCrashDiagnostic(this.props.region,error,info))}componentDidUpdate(prev){if(this.state.error!==null&&!sameKeys(prev.resetKeys,this.props.resetKeys))this.setState({error:null})}retry=()=>this.setState({error:null});render(){if(this.state.error!==null)return $jsx(PaneCrashFallback,{region:this.props.region,width:this.props.width,onRetry:this.retry});return this.props.children}}var import_react19=__toESM(require_react_production(),1);function countCommit(id){profileTick(`commit.${id}`)}function RenderProfiler(props){if(!renderProfileOn)return props.children;return $jsx(import_react19.Profiler,{id:props.id,onRender:countCommit,children:props.children})}var FALLBACK_THEME=DEFAULT_THEME,themeTarget={selectedTheme,hasTheme,setTheme,reloadUserThemes:()=>{for(let{name,theme}of loadUserThemes())addTheme(name,theme)},themeMode,setThemeMode,transparentBackground,setTransparentBackground,focusAccent,setFocusAccent};function UiPrefsSync(){let follow=useOptionalKV()?.follow;return import_react21.useEffect(()=>{let disposed=!1,orch=null,disposers=[];return(async()=>{let remote=await connectPaneOrchestrator({logTag:"ui-prefs",channels:follow?["ui-prefs","keybindings","state"]:["ui-prefs","keybindings"]});if(!remote)return;if(disposed){remote.dispose();return}orch=remote;let applyPrefs=(payload)=>{if(!payload)return;if(applyUiPrefs(themeTarget,payload),isLocaleId(payload.locale))setLocaleLang(payload.locale)},prefsStore=remote.uiPrefsStore();if(applyPrefs(prefsStore.get()),disposers.push(prefsStore.subscribe(()=>applyPrefs(prefsStore.get()))),follow){let shared=remote.rawChannelSignal("state"),adopt=()=>{let state=shared.get()?.state;if(state&&typeof state==="object"&&!Array.isArray(state))follow(state)};adopt(),disposers.push(shared.subscribe(adopt))}let revStore=remote.keybindingsRevStore(),lastKeybindingsRev=revStore.get();disposers.push(revStore.subscribe(()=>{let rev=revStore.get();if(rev==null||rev===lastKeybindingsRev)return;let isFirst=lastKeybindingsRev===null;if(lastKeybindingsRev=rev,!isFirst)reloadUserKeybindings()}))})(),()=>{disposed=!0;for(let dispose of disposers)dispose();orch?.dispose()}},[follow]),null}async function bootPaneHost(opts){if(opts.logContext)setClientLogContext(opts.logContext);installClientCrashHandlers(),applyUserKeybindings();for(let{name,theme}of loadUserThemes())addTheme(name,theme);let prefs=readPersistedUiPrefs(FALLBACK_THEME,hasTheme);applyUiPrefs(themeTarget,{theme:prefs.theme,themeMode:prefs.themeMode,transparentBackground:prefs.transparent,focusAccent:prefs.focusAccent}),setLocaleLang(prefs.locale);let kv=opts.providers?.kv??!1,focus=opts.providers?.focus??!0,notifications=opts.providers?.notifications??!1,screen=await opts.setup(prefs),imeOutput=createHostImeOutput({platform:process.platform,fullscreen:opts.inlineRows===void 0,stdout:process.stdout}),detachImeOutput=()=>{},onDestroy=()=>{detachImeOutput(),imeOutput.flush(),screen.onDestroy?.()},renderer=await createCliRenderer({...opts.inlineRows!==void 0?inlineRenderOptions(opts.inlineRows,onDestroy):hostRenderOptions(onDestroy),...imeOutput.rendererOptions});if(detachImeOutput=imeOutput.attach(renderer),installScreenSelfHeal({renderer}),renderProfileOn)renderer.setFrameCallback(async()=>{profileMark("firstFrame"),profileTick("frame")});let body=$jsxs($Fragment,{children:[$jsx(UiPrefsSync,{}),$jsx(KvWriteErrorToasts,{}),$jsx(PaneErrorBoundary,{children:$jsx(RenderProfiler,{id:"root",children:screen.root()})})]}),withDialog=$jsx(DialogProvider,{children:notifications?$jsx(NotificationsProvider,{children:body}):body}),withFocus=focus?$jsx(FocusProvider,{initial:"sidebar",children:withDialog}):withDialog,withKv=kv?$jsx(KVProvider,{children:withFocus}):withFocus;createRoot(renderer).render($jsx(ThemeProvider,{theme:prefs.theme,children:withKv})),installExitRestoreBackstop(renderer),installBracketedPasteMode(),installPaneExitBackstop(),installOrphanExitWatchdog(),installEventLoopStallTelemetry()}var import_react22=__toESM(require_react_production(),1);import{SyntaxStyle}from"@opentui/core";var INLINE_LINK=/\[([^\]]*)\]\([^)]*\)/g;function releaseNotesMarkdown(body){return body.replace(/\r\n/g,`
9
- `).replace(INLINE_LINK,"$1").trim()}function buildReleaseNotesStyle(theme){let heading={fg:theme.accent,bold:!0},code={fg:theme.info};return SyntaxStyle.fromStyles({"markup.heading":heading,"markup.heading.1":heading,"markup.heading.2":heading,"markup.heading.3":heading,"markup.heading.4":heading,"markup.heading.5":heading,"markup.heading.6":heading,"markup.strong":{fg:theme.text,bold:!0},"markup.italic":{italic:!0},"markup.strikethrough":{fg:theme.textMuted,dim:!0},"markup.raw":code,"markup.raw.block":code,"markup.list":{fg:theme.textMuted},"markup.list.checked":{fg:theme.success},"markup.list.unchecked":{fg:theme.textMuted},"markup.quote":{fg:theme.textMuted,italic:!0},"markup.link":{fg:theme.info},"markup.link.label":{fg:theme.info},"markup.link.url":{fg:theme.textMuted,dim:!0}})}function ReleaseNotesBody(props){let content=import_react22.useMemo(()=>releaseNotesMarkdown(props.body),[props.body]);return $jsx(MarkdownText,{content})}function MarkdownText(props){let{theme}=useTheme(),syntaxStyle=import_react22.useMemo(()=>buildReleaseNotesStyle(theme),[theme]);return $jsx("markdown",{content:props.content,syntaxStyle,fg:theme.text})}import{spawnSync}from"child_process";function waitForKeypress(){if(!process.stdin.isTTY)return Promise.resolve();return new Promise((resolve2)=>{let stdin=process.stdin,done=()=>{stdin.off("data",done),stdin.setRawMode?.(!1),stdin.pause(),resolve2()};stdin.setRawMode?.(!0),stdin.resume(),stdin.once("data",done)})}async function runShellUpdater(opts){opts.renderer?.destroy(),process.stdout.write(`
10
- rove ${CURRENT_VERSION} -> ${opts.targetLabel}
11
- `),process.stdout.write(`running: ${opts.command}
12
-
13
- `);let shell=updaterShell(),result=spawnSync(shell,["-c",opts.command],{stdio:"inherit"}),code=result.status??(result.error?1:0);if(result.error){process.stderr.write(`
14
- rove update: failed to start updater (${shell}): ${result.error.message}
15
- `);let hint=updaterShellFailureHint();if(hint)process.stderr.write(hint)}process.stdout.write(code===0?`
16
- ${opts.t("update.updateComplete")}
17
- `:`
18
- ${opts.t("update.updateFailed",{code:String(code)})}
19
- `),process.stdout.write(opts.t("update.pressAnyKey")),await waitForKeypress(),process.exit(code)}
20
- export{useAccessor,useTheme,useT,bindByIds,defaultChordsOf,keymapVersion,subscribeKeymapVersion,findBinding,pluginKeybindings,userKeybindingsReport,reloadUserKeybindings,hostTargetFps,imeAnchorController,redrawScreen,useLatest,useFocus,useOptionalFocus,useKV,useOptionalKV,useNotifications,useOptionalNotifications,formatChord,DIRECT_GUIDE_PREFIX_ACTION_ID,shortcutCaption,modalActive,currentBindingReachability,armPrefixFromCurrentStack,invokeArmedPrefixActionFromCurrentStack,subscribeBindingStack,useBindingStackVersion,useBindings,pageCloseBindings,currentPaletteActions,isNarrowWidth,narrowSurface,useTerminalSize,useDialogPaddingX,useDialog,useOptionalDialog,showDialog,PaneErrorBoundary,RenderProfiler,bootPaneHost,ReleaseNotesBody,MarkdownText,runShellUpdater};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{MachineFeed,decodeMachines}from"./chunk-fx2e7z2s.js";import"./chunk-g2yf429k.js";import"./chunk-gr0ffx3f.js";import"./chunk-6xr1prk6.js";import"./chunk-atn06ncf.js";import"./chunk-pmwk2etg.js";import"./chunk-sq6zj3fb.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-0r1jf8m9.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-6xppe9bj.js";import"./chunk-pzy7fe5e.js";import"./chunk-32j6y5d1.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-7kysxgbq.js";import"./chunk-xy8be792.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{decodeMachines,MachineFeed};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{parsePorcelain,pickPushedChanges,readWorktreeChanges,sameWorktreeChanges}from"./chunk-0r1jf8m9.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-6xppe9bj.js";import"./chunk-91sykzqq.js";export{sameWorktreeChanges,readWorktreeChanges,pickPushedChanges,parsePorcelain};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{argvToParams,booleanFlagsOf,callVerb,errorBody,errorEnvelope,executeVerb,paramsToFlags,repeatableFlagsOf,runVerb,successEnvelope,toApiError}from"./chunk-mdebknyq.js";import"./chunk-bxg7y1qk.js";import"./chunk-afhnm3e4.js";import"./chunk-jadjn49m.js";import"./chunk-1gxnd3qq.js";import"./chunk-q89yrevw.js";import"./chunk-xdqj48wx.js";import"./chunk-cacct9gd.js";import"./chunk-pm91e38v.js";import"./chunk-2xsxcdp6.js";import"./chunk-17e2tgyg.js";import"./chunk-ee8917py.js";import"./chunk-q8ffd1pc.js";import"./chunk-4hestsjp.js";import"./chunk-qgrg9a5n.js";import"./chunk-2bgmby1d.js";import"./chunk-0sy3bez6.js";import"./chunk-5mhvjytn.js";import"./chunk-atn06ncf.js";import"./chunk-mejxvvzb.js";import"./chunk-1masf4pj.js";import"./chunk-pmwk2etg.js";import"./chunk-vp29jgbt.js";import"./chunk-gq36nzg8.js";import"./chunk-sq6zj3fb.js";import"./chunk-qkehg2c1.js";import"./chunk-x5swq8ar.js";import"./chunk-kd8j15cg.js";import"./chunk-gfdd2jbp.js";import"./chunk-w77s2df8.js";import"./chunk-mqfvzdpr.js";import"./chunk-k1m1c0yc.js";import"./chunk-rxqdw6s5.js";import"./chunk-8ng1756g.js";import"./chunk-kxp04jnp.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-etfh8f4z.js";import"./chunk-8ttn73cv.js";import"./chunk-gygdyf0s.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-kg9kmwt9.js";import"./chunk-6xppe9bj.js";import"./chunk-pzy7fe5e.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{toApiError,successEnvelope,runVerb,repeatableFlagsOf,paramsToFlags,executeVerb,errorEnvelope,errorBody,callVerb,booleanFlagsOf,argvToParams};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{PS_PROBE_TIMEOUT_MS,engineProcessIn,foregroundEngine,foregroundEngineIn,hasAncestor,parsePsSnapshot,psSnapshot,psSnapshotWith,shareInflight,vendorFromArgv}from"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import{PsProbeUnavailableError}from"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{vendorFromArgv,shareInflight,psSnapshotWith,psSnapshot,parsePsSnapshot,hasAncestor,foregroundEngineIn,foregroundEngine,engineProcessIn,PsProbeUnavailableError,PS_PROBE_TIMEOUT_MS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{TaskIndexStore}from"./chunk-69f84j0j.js";import"./chunk-qkehg2c1.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{TaskIndexStore};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{machineTasks}from"./chunk-1masf4pj.js";import{dedupeMachines,listMachines}from"./chunk-pmwk2etg.js";import"./chunk-vp29jgbt.js";import"./chunk-gq36nzg8.js";import"./chunk-sq6zj3fb.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";async function mergeTaskList(local){let machines=dedupeMachines(listMachines());if(machines.length===0)return local;let tasks=(local.tasks??[]).map((task)=>({...task,origin:{machineId:"local",hostLabel:"local"}}));for(let entry of machines){let remote=await machineTasks(entry);if(!remote)continue;let hostLabel=entry.alias;for(let task of remote)tasks.push({...task,origin:{machineId:entry.alias,hostLabel}})}return{tasks}}export{mergeTaskList};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Orchestrator}from"./chunk-yz859e8t.js";import"./chunk-qnv8ggxh.js";import"./chunk-c1dz3qg3.js";import"./chunk-jkssty8x.js";import"./chunk-4dt1gfb3.js";import{PLACEHOLDER_TASK_TITLE}from"./chunk-2xsxcdp6.js";import"./chunk-ee8917py.js";import"./chunk-gq36nzg8.js";import"./chunk-mqfvzdpr.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-2tfnscxk.js";import"./chunk-8ttn73cv.js";import"./chunk-gygdyf0s.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-xmwp6je4.js";import"./chunk-6xppe9bj.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-cmp64q4j.js";import"./chunk-7kysxgbq.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{PLACEHOLDER_TASK_TITLE,Orchestrator};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{isPathLikeArg,runOpenDirectory}from"./chunk-mt0mh96t.js";import"./chunk-2r1fgng9.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-pn5ygqn6.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{runOpenDirectory,isPathLikeArg};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{installSkillNow,refreshSkillStatus,skillMissing,startSkillStatus}from"./chunk-94t488yj.js";import"./chunk-4zmhzb28.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-cmp64q4j.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{startSkillStatus,skillMissing,refreshSkillStatus,installSkillNow};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{connectIfRunning}from"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import{__require}from"./chunk-91sykzqq.js";async function openLocalOrchestrator(){let{TaskIndexStore}=await import("./chunk-8h94w236.js"),{GitWorktreeManager}=await import("./chunk-mkb5mmmw.js"),{Orchestrator}=await import("./chunk-dxwmnww0.js"),store=new TaskIndexStore;return await store.load(),new Orchestrator({store,worktrees:new GitWorktreeManager})}async function withDaemonOrLocal(bridge){let client=await connectIfRunning();if(client)try{return await bridge.daemon(client)}finally{client.close()}let orch=await openLocalOrchestrator();return bridge.local(orch)}export{withDaemonOrLocal,openLocalOrchestrator};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ENGINE_NOT_OBSERVED_REASON,ENGINE_START_POLL_MS,ENGINE_START_PROBE_MS,deliverHostedPrompt,deliverToKey,ensurePtyHost,findEngineKey,isTaskKey,killTaskSessions,listSessions,listSessionsOrNull,openPtyHost,outcomeFields,taskKeys}from"./chunk-x5swq8ar.js";import"./chunk-kd8j15cg.js";import"./chunk-gfdd2jbp.js";import"./chunk-w77s2df8.js";import"./chunk-mqfvzdpr.js";import"./chunk-k1m1c0yc.js";import"./chunk-rxqdw6s5.js";import"./chunk-8ng1756g.js";import"./chunk-kxp04jnp.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-etfh8f4z.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{taskKeys,outcomeFields,openPtyHost,listSessionsOrNull,listSessions,killTaskSessions,isTaskKey,findEngineKey,ensurePtyHost,deliverToKey,deliverHostedPrompt,ENGINE_START_PROBE_MS,ENGINE_START_POLL_MS,ENGINE_NOT_OBSERVED_REASON};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{GitWorktreeManager}from"./chunk-jkssty8x.js";import"./chunk-ee8917py.js";import"./chunk-gq36nzg8.js";import"./chunk-catrr0z3.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-gygdyf0s.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-xmwp6je4.js";import"./chunk-6xppe9bj.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-7kysxgbq.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{GitWorktreeManager};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ensurePluginEnginesLoaded,loadPluginEngines,registeredEngineIds,reloadPluginEngines}from"./chunk-jadjn49m.js";import"./chunk-0sy3bez6.js";import"./chunk-j1z9kgyd.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-96kvwzj8.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{reloadPluginEngines,registeredEngineIds,loadPluginEngines,ensurePluginEnginesLoaded};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{API_VERBS,VERBS,VERB_ALIASES,VERB_GROUPS,findVerb,unknownVerbError}from"./chunk-bxg7y1qk.js";import"./chunk-afhnm3e4.js";import"./chunk-jadjn49m.js";import"./chunk-1gxnd3qq.js";import"./chunk-q89yrevw.js";import"./chunk-xdqj48wx.js";import"./chunk-cacct9gd.js";import"./chunk-pm91e38v.js";import"./chunk-2xsxcdp6.js";import"./chunk-17e2tgyg.js";import"./chunk-ee8917py.js";import"./chunk-q8ffd1pc.js";import"./chunk-4hestsjp.js";import"./chunk-qgrg9a5n.js";import"./chunk-2bgmby1d.js";import"./chunk-0sy3bez6.js";import"./chunk-5mhvjytn.js";import"./chunk-atn06ncf.js";import"./chunk-mejxvvzb.js";import"./chunk-1masf4pj.js";import"./chunk-pmwk2etg.js";import"./chunk-vp29jgbt.js";import"./chunk-gq36nzg8.js";import"./chunk-sq6zj3fb.js";import"./chunk-qkehg2c1.js";import"./chunk-x5swq8ar.js";import"./chunk-kd8j15cg.js";import"./chunk-gfdd2jbp.js";import"./chunk-w77s2df8.js";import"./chunk-mqfvzdpr.js";import"./chunk-k1m1c0yc.js";import"./chunk-rxqdw6s5.js";import"./chunk-8ng1756g.js";import"./chunk-kxp04jnp.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-etfh8f4z.js";import"./chunk-8ttn73cv.js";import"./chunk-gygdyf0s.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-kg9kmwt9.js";import"./chunk-6xppe9bj.js";import"./chunk-pzy7fe5e.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{unknownVerbError,findVerb,VERB_GROUPS,VERB_ALIASES,VERBS,API_VERBS};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{execHostForRepo,execHostForWorktreePath,localSpawnCwd,remoteKeyForRepo,remoteSpecFromConfig,worktreeUsable}from"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-7kysxgbq.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{worktreeUsable,remoteSpecFromConfig,remoteKeyForRepo,localSpawnCwd,execHostForWorktreePath,execHostForRepo};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{isDev}from"./chunk-z1nj22va.js";import{fileURLToPath}from"url";var package_default={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.283",description:"Rove: all your coding agents, in one place. An agentic development environment (ADE) for your terminal: Claude Code, Codex, Copilot and more, side by side in isolated worktrees, handing tasks to each other.",keywords:["terminal","tui","cli","ade","agentic-development-environment","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{rove:"dist/cli/rove.js"},files:["dist/cli","dist/completions","dist/web","dist/web-ui","dist/skills","dist/voice","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:mock":"ROVE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:rubric":"bun run scripts/build-tier-rubric.ts",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"ROVE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"ROVE_INCLUDE_SOCKET=1 ROVE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"ROVE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun scripts/render-track.mjs",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0",react:"^19.2.8","smol-toml":"^1.7.1",ws:"^8.21.3"},optionalDependencies:{"node-pty":"^1.1.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/rove-daemon":"0.7.23","@tsconfig/bun":"1.0.11","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","react-devtools-core":"^7.0.1","rove-bridge":"0.0.44","rove-weixin":"0.0.44",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]};var RELEASE_CHANNELS=["latest","next","nightly"],DEFAULT_RELEASE_CHANNEL="latest";function channelFor(version){let dash=version.indexOf("-"),tag=dash===-1?void 0:version.slice(dash+1).split(".")[0];return tag==="nightly"||tag==="next"?tag:"latest"}var CURRENT_VERSION=package_default.version,PACKAGE_NAME=package_default.name;function repoSlug(){let url=package_default.repository?.url;if(!url)return null;let m=url.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!m||!m[1]||!m[2])return null;return`${m[1]}/${m[2]}`}var UPDATE_SCRIPT_URL="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",UPDATE_COMMAND=`curl -fsSL ${UPDATE_SCRIPT_URL} | sh`;function updateCommandFor(target){return target===void 0||target===DEFAULT_RELEASE_CHANNEL?UPDATE_COMMAND:`${UPDATE_COMMAND} -s -- ${target}`}function owningNpmPrefix(modulePath=fileURLToPath(import.meta.url)){let at=modulePath.indexOf("/lib/node_modules/");if(at<=0)return null;return modulePath.slice(0,at)}function recommendedGlobalInstallCommand(prefix=owningNpmPrefix()){let target=`${PACKAGE_NAME}@latest`;return prefix===null?`npm install -g ${target}`:`npm install -g --prefix ${prefix} ${target}`}var BREAKING_VERSIONS=[];function breakingVersionsCrossed(from,to,breaking=BREAKING_VERSIONS){let[lo,hi]=compareSemver(from,to)<=0?[from,to]:[to,from];return breaking.filter((b)=>compareSemver(b,lo)>0&&compareSemver(b,hi)<=0)}var FETCH_TIMEOUT_MS=3000,PACKUMENT_TIMEOUT_MS=15000;function channelOf(version=CURRENT_VERSION){return channelFor(version)}async function fetchLatestFromRegistry(packageName,channel){let ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let encoded=packageName.replace("/","%2F"),res=await fetch(`https://registry.npmjs.org/${encoded}/${channel}`,{signal:ctrl.signal,headers:{accept:"application/json"}});if(!res.ok)return null;let body=await res.json();if(typeof body.version!=="string")return null;return body.version}catch{return null}finally{clearTimeout(timer)}}async function fetchPublishedAt(packageName,version){let ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),PACKUMENT_TIMEOUT_MS);try{let encoded=packageName.replace("/","%2F"),res=await fetch(`https://registry.npmjs.org/${encoded}`,{signal:ctrl.signal,headers:{accept:"application/json"}});if(!res.ok)return null;let stamp=(await res.json()).time?.[version],ms=typeof stamp==="string"?Date.parse(stamp):Number.NaN;return Number.isFinite(ms)?ms:null}catch{return null}finally{clearTimeout(timer)}}function isNewerSemver(latest,current){let core=compareSemver(latest,current);if(core!==0)return core>0;return comparePrerelease(prereleaseOf(latest),prereleaseOf(current))>0}function prereleaseOf(version){let dash=version.indexOf("-");return dash===-1?void 0:version.slice(dash+1)||void 0}function comparePrerelease(a,b){if(a===b)return 0;if(a===void 0)return 1;if(b===void 0)return-1;let aParts=a.split("."),bParts=b.split(".");for(let i=0;i<Math.max(aParts.length,bParts.length);i++){let av=aParts[i],bv=bParts[i];if(av===void 0)return-1;if(bv===void 0)return 1;if(av===bv)continue;let an=/^\d+$/.test(av)?Number.parseInt(av,10):null,bn=/^\d+$/.test(bv)?Number.parseInt(bv,10):null;if(an!==null&&bn!==null)return an>bn?1:-1;if(an!==null)return-1;if(bn!==null)return 1;return av>bv?1:-1}return 0}function compareSemver(aVersion,bVersion){let norm=(v)=>v.split("-")[0]??v,a=norm(aVersion).split(".").map((s)=>Number.parseInt(s,10)),b=norm(bVersion).split(".").map((s)=>Number.parseInt(s,10));for(let i=0;i<3;i++){let av=a[i]??0,bv=b[i]??0;if(Number.isNaN(av)||Number.isNaN(bv))return 0;if(av>bv)return 1;if(av<bv)return-1}return 0}async function checkLatestVersion(opts={}){let channel=opts.channel??channelOf(),fake=process.env.ROVE_FAKE_UPDATE;if(fake)return{current:CURRENT_VERSION,latest:fake,hasUpdate:isNewerSemver(fake,CURRENT_VERSION),channel};if(isDev()&&!opts.force)return null;let latest=await fetchLatestFromRegistry(PACKAGE_NAME,channel);if(!latest)return null;let hasUpdate=isNewerSemver(latest,CURRENT_VERSION),minAgeMs=(opts.minAgeHours??0)*3600000;if(hasUpdate&&minAgeMs>0){let publishedAt=await fetchPublishedAt(PACKAGE_NAME,latest),now=(opts.now??Date.now)();if(publishedAt!==null&&now-publishedAt<minAgeMs)hasUpdate=!1}return{current:CURRENT_VERSION,latest,hasUpdate,channel}}function versionFromTagName(tagName){if(typeof tagName!=="string")return null;return tagName.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}var ZH_NOTES_ASSET="release-notes.zh.md";async function notesBody(release,locale,signal){if(locale!=="zh"||!Array.isArray(release.assets))return release.body;let asset=release.assets.find((a)=>a.name===ZH_NOTES_ASSET);if(typeof asset?.browser_download_url!=="string")return release.body;try{let res=await fetch(asset.browser_download_url,{signal}),text=res.ok?await res.text():"";return text.trim()?text:release.body}catch{return release.body}}async function fetchReleaseNotes(version,locale="en"){let slug=repoSlug();if(!slug)return null;let tag=`v${version}`,ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let res=await fetch(`https://api.github.com/repos/${slug}/releases/tags/${tag}`,{signal:ctrl.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!res.ok)return null;let body=await res.json();if(typeof body.body!=="string"||typeof body.html_url!=="string")return null;return{body:await notesBody({...body,body:body.body},locale,ctrl.signal),url:body.html_url,version}}catch{return null}finally{clearTimeout(timer)}}async function fetchReleaseNotesRange(args){let slug=repoSlug();if(!slug)return[];let limit=args.limit??100,ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let res=await fetch(`https://api.github.com/repos/${slug}/releases?per_page=${limit}`,{signal:ctrl.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!res.ok)return[];let body=await res.json();if(!Array.isArray(body))return[];let inRange=body.flatMap((release)=>{let version=versionFromTagName(release.tag_name);if(!version||typeof release.html_url!=="string"||typeof release.body!=="string")return[];if(compareSemver(version,args.current)<=0)return[];if(compareSemver(version,args.latest)>0)return[];return[{version,url:release.html_url,release:{...release,body:release.body}}]});return await Promise.all(inRange.map(async({version,url,release})=>({version,url,body:await notesBody(release,args.locale??"en",ctrl.signal)})))}catch{return[]}finally{clearTimeout(timer)}}async function fetchReleaseSummaries(limit=12){let slug=repoSlug();if(!slug)return[];let ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let res=await fetch(`https://api.github.com/repos/${slug}/releases?per_page=${limit}`,{signal:ctrl.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!res.ok)return[];let body=await res.json();if(!Array.isArray(body))return[];return body.map((release)=>{let version=versionFromTagName(release.tag_name);if(!version||typeof release.html_url!=="string")return null;return{version,url:release.html_url}}).filter((release)=>release!==null)}catch{return[]}finally{clearTimeout(timer)}}function releasePageUrl(version){let slug=repoSlug();if(!slug)return null;return`https://github.com/${slug}/releases/tag/v${version}`}
3
- export{package_default,RELEASE_CHANNELS,DEFAULT_RELEASE_CHANNEL,CURRENT_VERSION,PACKAGE_NAME,repoSlug,UPDATE_SCRIPT_URL,UPDATE_COMMAND,updateCommandFor,owningNpmPrefix,recommendedGlobalInstallCommand,BREAKING_VERSIONS,breakingVersionsCrossed,channelOf,isNewerSemver,compareSemver,checkLatestVersion,ZH_NOTES_ASSET,fetchReleaseNotes,fetchReleaseNotesRange,fetchReleaseSummaries,releasePageUrl};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{AUTO_MACHINE,LOCAL_MACHINE,forwardVerb,invokeRouted,machineDaemonSocket,machinePtySocket,machineTasks,pickMachine,repoHosts,repoWanted,requireMachine,routeTarget}from"./chunk-1masf4pj.js";import"./chunk-pmwk2etg.js";import"./chunk-vp29jgbt.js";import"./chunk-gq36nzg8.js";import"./chunk-sq6zj3fb.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{routeTarget,requireMachine,repoWanted,repoHosts,pickMachine,machineTasks,machinePtySocket,machineDaemonSocket,invokeRouted,forwardVerb,LOCAL_MACHINE,AUTO_MACHINE};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{invokeVerb,runApiSubcommand}from"./chunk-nzf76wa4.js";import{executeVerb,toApiError}from"./chunk-mdebknyq.js";import{API_SCHEMA_VERSION,API_VERBS,VERBS,VERB_GROUPS,VerbArgs,apiUsage,buildCountPlan,defaultApiRuntime,deliverPrompt,findVerb,fullSchema,parseAgentsSpec,parseFlags,schemaIndex,validateAgainstSpec,verbHelp,verbSchema}from"./chunk-bxg7y1qk.js";import"./chunk-afhnm3e4.js";import"./chunk-jadjn49m.js";import"./chunk-1gxnd3qq.js";import"./chunk-q89yrevw.js";import"./chunk-xdqj48wx.js";import"./chunk-cacct9gd.js";import"./chunk-pm91e38v.js";import"./chunk-2xsxcdp6.js";import"./chunk-17e2tgyg.js";import"./chunk-ee8917py.js";import"./chunk-q8ffd1pc.js";import"./chunk-4hestsjp.js";import"./chunk-qgrg9a5n.js";import"./chunk-2bgmby1d.js";import"./chunk-0sy3bez6.js";import"./chunk-5mhvjytn.js";import"./chunk-atn06ncf.js";import"./chunk-mejxvvzb.js";import"./chunk-1masf4pj.js";import"./chunk-pmwk2etg.js";import"./chunk-vp29jgbt.js";import"./chunk-gq36nzg8.js";import"./chunk-sq6zj3fb.js";import"./chunk-qkehg2c1.js";import"./chunk-x5swq8ar.js";import"./chunk-kd8j15cg.js";import"./chunk-gfdd2jbp.js";import"./chunk-w77s2df8.js";import"./chunk-mqfvzdpr.js";import"./chunk-k1m1c0yc.js";import"./chunk-rxqdw6s5.js";import"./chunk-8ng1756g.js";import"./chunk-kxp04jnp.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import{ApiError}from"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-etfh8f4z.js";import"./chunk-8ttn73cv.js";import"./chunk-gygdyf0s.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-kg9kmwt9.js";import"./chunk-6xppe9bj.js";import"./chunk-pzy7fe5e.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{verbSchema,verbHelp,validateAgainstSpec,toApiError,schemaIndex,runApiSubcommand,parseFlags,parseAgentsSpec,invokeVerb,fullSchema,findVerb,executeVerb,deliverPrompt,defaultApiRuntime,buildCountPlan,apiUsage,VerbArgs,VERB_GROUPS,VERBS,ApiError,API_VERBS,API_SCHEMA_VERSION};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ensureForwards,startTunnel}from"./chunk-pmwk2etg.js";import"./chunk-sq6zj3fb.js";import"./chunk-y1xnjx8x.js";import"./chunk-32j6y5d1.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-7kysxgbq.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{startTunnel,ensureForwards};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{detectLegacyInstalls,isRovePluginEnabled,migrationHint}from"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{migrationHint,isRovePluginEnabled,detectLegacyInstalls};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ensureGlobalRoveHooks,readStdinText,readTextWithTimeout,runHookSubcommand}from"./chunk-p4aqy3sm.js";import"./chunk-17e2tgyg.js";import"./chunk-2bgmby1d.js";import"./chunk-0sy3bez6.js";import"./chunk-j1z9kgyd.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-zsfyj36g.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{runHookSubcommand,readTextWithTimeout,readStdinText,ensureGlobalRoveHooks};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{publishRoveTerminalTitle}from"./chunk-3aqhytyy.js";import{ensureGlobalRoveHooks}from"./chunk-p4aqy3sm.js";import{LAST_RUN_VERSION_KEY,enforceResetGate}from"./chunk-dxacz9ba.js";import"./chunk-17e2tgyg.js";import"./chunk-2bgmby1d.js";import"./chunk-0sy3bez6.js";import"./chunk-j1z9kgyd.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import{CURRENT_VERSION,compareSemver}from"./chunk-pzy7fe5e.js";import"./chunk-zsfyj36g.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import{detectShell}from"./chunk-fd3gswsr.js";import"./chunk-e4fp3w22.js";import"./chunk-nbcm8d58.js";import{loadStateFile,patchStateFile}from"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import{__require}from"./chunk-91sykzqq.js";var WELCOMED_KEY="welcomed";function shouldWelcome(state){if(state[WELCOMED_KEY]===!0)return!1;return typeof state[LAST_RUN_VERSION_KEY]!=="string"}function takeWelcome(){if(!shouldWelcome(loadStateFile()))return null;try{patchStateFile({[WELCOMED_KEY]:!0})}catch{}return{shell:detectShell()}}var WHATS_NEW_SEEN_KEY="app.whatsNewSeenVersion";function whatsNewFromVersion(state,current=CURRENT_VERSION){let stamped=state[WHATS_NEW_SEEN_KEY]??state[LAST_RUN_VERSION_KEY];if(typeof stamped!=="string"||stamped.length===0)return null;return compareSemver(current,stamped)>0?stamped:null}function takeWhatsNew(){let from=whatsNewFromVersion(loadStateFile());try{patchStateFile({[WHATS_NEW_SEEN_KEY]:CURRENT_VERSION})}catch{}return from}async function startTui(){let whatsNewFrom=takeWhatsNew(),welcome=takeWelcome();enforceResetGate(),publishRoveTerminalTitle(),await ensureGlobalRoveHooks();let{loadPluginEngines}=await import("./chunk-nka82csc.js");loadPluginEngines();let{startSkillStatus}=await import("./chunk-g5sx5knm.js");startSkillStatus();let{startWorkspaceHost}=await import("./chunk-60kx1j7x.js");await startWorkspaceHost({whatsNewFrom,welcome})}export{startTui};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{pathSyntax}from"./chunk-pn5ygqn6.js";function childrenOf(tasks,id){return tasks.filter((task)=>task.parentTaskId===id)}function workspaceOwnerId(task){return task.sharesWorkspaceOf??task.id}function isSharedChild(task){return task.sharesWorkspaceOf!==void 0}function lineageRootId(tasks,id){let byId=new Map(tasks.map((task)=>[task.id,task])),seen=new Set,current=id;for(;;){seen.add(current);let up=byId.get(current)?.parentTaskId;if(!up||seen.has(up)||!byId.has(up))return current;current=up}}function subtreeIds(tasks,id){let out=[],seen=new Set,visit=(current)=>{if(seen.has(current))return;seen.add(current);for(let child of childrenOf(tasks,current))visit(child.id);out.push(current)};return visit(id),out}function taskCwd(task){let root=task.worktreePath??"";if(!root||!task.cwdSubpath)return root;return pathSyntax(root).join(root,task.cwdSubpath)}function gitRepoOf(task){return task.gitRepo||task.repo}var MULTI_REPO_CAP=8,REPO_NAME_RE=/^[A-Za-z0-9_][A-Za-z0-9._-]*$/;function repoNameOf(repoPath){return pathSyntax(repoPath).basename(repoPath).replace(/[^A-Za-z0-9._-]/g,"-").replace(/^[.-]+/,"")||"repo"}function uniqueRepoName(name,taken){if(!taken.has(name))return name;for(let n=2;;n++)if(!taken.has(`${name}-${n}`))return`${name}-${n}`}function taskRepos(task,tasks){let extras=(task.sharesWorkspaceOf&&tasks?.find((t)=>t.id===task.sharesWorkspaceOf)||task).extraRepos??[],primaryRepo=gitRepoOf(task);return[{name:uniqueRepoName(repoNameOf(primaryRepo),new Set(extras.map((e)=>e.name))),repo:primaryRepo,branch:task.branch,worktreePath:task.worktreePath??"",...task.baseRef?{baseRef:task.baseRef}:{},...task.prStatus?{prStatus:task.prStatus}:{},primary:!0},...extras.map((e)=>({name:e.name,repo:e.repo,branch:e.branch,worktreePath:e.worktreePath,...e.baseRef?{baseRef:e.baseRef}:{},...e.prStatus?{prStatus:e.prStatus}:{},primary:!1}))]}function taskWorktreePaths(task,tasks){return taskRepos(task,tasks).map((r)=>r.worktreePath).filter((p)=>p.length>0)}function prRank(pr){if(pr.checkState==="failing")return 0;if(pr.checkState==="pending")return 1;return pr.lifecycle==="merged"?3:2}function rollupPr(task){let worst;for(let pr of[task.prStatus,...(task.extraRepos??[]).map((e)=>e.prStatus)])if(pr&&(!worst||prRank(pr)<prRank(worst)))worst=pr;return worst}function pickRepos(task,only){let all=taskRepos(task);if(!only)return all;let picked=all.filter((r)=>r.name===only);if(picked.length===0)throw Error(`UNKNOWN_REPO: no repo named '${only}' in this task (repos: ${all.map((r)=>r.name).join(", ")})`);return picked}var WORKSPACE_BACKEND_IDS=["git-worktree","borrowed","cow-clone","layerfs"];function isWorkspaceBackendId(value){return typeof value==="string"&&WORKSPACE_BACKEND_IDS.includes(value)}var GIT_WORKTREE={fork:"committed",checkpoint:!0,cheapClone:!1,ownsBranch:!0,ownsDirectory:!0,interactive:!0},WORKSPACE_CAPABILITIES={"git-worktree":GIT_WORKTREE,borrowed:{fork:"committed",checkpoint:!1,cheapClone:!1,ownsBranch:!1,ownsDirectory:!1,interactive:!0},"cow-clone":{...GIT_WORKTREE,fork:"with-uncommitted",cheapClone:!0},layerfs:{...GIT_WORKTREE,cheapClone:!0,ownsBranch:!1,interactive:!1}};function workspaceBackendId(task){if(task.workspace)return task.workspace.backend;return task.kind==="main"||task.kind==="dir"?"borrowed":"git-worktree"}function workspaceCapabilities(task){return WORKSPACE_CAPABILITIES[workspaceBackendId(task)]}var SESSION_PR_CAP=20,GITHUB_PR_URL=/^https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)(?:[/?#].*)?$/i;function canonicalPrUrl(input){let m=GITHUB_PR_URL.exec(input.trim());if(!m)return;let[,owner,repo,number]=m;return`https://github.com/${owner}/${repo}/pull/${Number(number)}`}var MAX_NOTES=20000;class TodoRefusedError extends Error{code;constructor(code,message){super(message);this.code=code;this.name="TodoRefusedError"}}function cleanText(raw){let text=raw.replace(/\s+/g," ").trim();if(text.length===0)throw new TodoRefusedError("TODO_EMPTY","a todo needs some text");if(text.length>500)throw new TodoRefusedError("TODO_TOO_LONG","a todo is at most 500 characters");return text}function nextId(todos){return`t${todos.reduce((max,todo)=>Math.max(max,Number(todo.id.slice(1))||0),0)+1}`}function applyTodoOps(todos,ops){let list=[...todos],find=(id)=>{let at=list.findIndex((todo)=>todo.id===id);if(at<0)throw new TodoRefusedError("TODO_NOT_FOUND",`no todo ${id}`);return at};for(let op of ops)if(op.op==="add"){if(list.length>=100)throw new TodoRefusedError("TODO_LIMIT","a task holds at most 100 todos");list.push({id:nextId(list),text:cleanText(op.text),done:!1})}else if(op.op==="check"){let at=find(op.id);list[at]={...list[at],done:op.done}}else if(op.op==="edit"){let at=find(op.id);list[at]={...list[at],text:cleanText(op.text)}}else list.splice(find(op.id),1);return list}function checkNotes(notes){if(notes.length>20000)throw new TodoRefusedError("NOTES_TOO_LONG","notes are at most 20000 characters");return notes}function coerceTodos(value){if(!Array.isArray(value))return;let out=[];for(let item of value.slice(0,100)){let v=item;if(typeof v?.id==="string"&&/^t\d+$/.test(v.id)&&typeof v.text==="string"&&v.text.trim().length>0)out.push({id:v.id,text:v.text.slice(0,500),done:v.done===!0})}return out.length>0?out:void 0}function todoCount(todos){if(!todos||todos.length===0)return null;return{done:todos.filter((todo)=>todo.done).length,total:todos.length}}function parseTodoOps(value){if(!Array.isArray(value))throw new TodoRefusedError("TODO_EMPTY","ops must be a list");return value.map((raw)=>{let v=raw,id=typeof v?.id==="string"?v.id:"",text=typeof v?.text==="string"?v.text:"";if(v?.op==="add")return{op:"add",text};if(v?.op==="edit")return{op:"edit",id,text};if(v?.op==="remove")return{op:"remove",id};if(v?.op==="check"&&typeof v.done==="boolean")return{op:"check",id,done:v.done};throw new TodoRefusedError("TODO_EMPTY","each op is add, check, edit or remove")})}
3
- export{SESSION_PR_CAP,canonicalPrUrl,MAX_NOTES,TodoRefusedError,applyTodoOps,checkNotes,coerceTodos,todoCount,parseTodoOps,childrenOf,workspaceOwnerId,isSharedChild,lineageRootId,subtreeIds,taskCwd,gitRepoOf,MULTI_REPO_CAP,REPO_NAME_RE,repoNameOf,uniqueRepoName,taskRepos,taskWorktreePaths,rollupPr,pickRepos,isWorkspaceBackendId,WORKSPACE_CAPABILITIES,workspaceBackendId,workspaceCapabilities};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{INBOUND_CLASSES,INBOUND_KEY,deniedClasses,inboundClassOf,inboundRefusal,setInbound}from"./chunk-5a6rkz1s.js";import"./chunk-bxg7y1qk.js";import"./chunk-afhnm3e4.js";import"./chunk-jadjn49m.js";import"./chunk-1gxnd3qq.js";import"./chunk-q89yrevw.js";import"./chunk-xdqj48wx.js";import"./chunk-cacct9gd.js";import"./chunk-pm91e38v.js";import"./chunk-2xsxcdp6.js";import"./chunk-17e2tgyg.js";import"./chunk-ee8917py.js";import"./chunk-q8ffd1pc.js";import"./chunk-4hestsjp.js";import"./chunk-qgrg9a5n.js";import"./chunk-2bgmby1d.js";import"./chunk-0sy3bez6.js";import"./chunk-5mhvjytn.js";import"./chunk-atn06ncf.js";import"./chunk-mejxvvzb.js";import"./chunk-1masf4pj.js";import"./chunk-pmwk2etg.js";import"./chunk-vp29jgbt.js";import"./chunk-gq36nzg8.js";import"./chunk-sq6zj3fb.js";import"./chunk-qkehg2c1.js";import"./chunk-x5swq8ar.js";import"./chunk-kd8j15cg.js";import"./chunk-gfdd2jbp.js";import"./chunk-w77s2df8.js";import"./chunk-mqfvzdpr.js";import"./chunk-k1m1c0yc.js";import"./chunk-rxqdw6s5.js";import"./chunk-8ng1756g.js";import"./chunk-kxp04jnp.js";import"./chunk-xj8bma5k.js";import"./chunk-ee5a0pka.js";import"./chunk-c69xdgfz.js";import"./chunk-r5j8fycq.js";import"./chunk-xfgqae9t.js";import"./chunk-j1z9kgyd.js";import"./chunk-g9ba25q5.js";import"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-mdc7b01e.js";import"./chunk-tn9gtf18.js";import"./chunk-22emnsn5.js";import"./chunk-sak1tphp.js";import"./chunk-y1xnjx8x.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-dce6ytw0.js";import"./chunk-q2r4qavc.js";import"./chunk-2tfnscxk.js";import"./chunk-jfbfasx0.js";import"./chunk-w7zv47mp.js";import"./chunk-etfh8f4z.js";import"./chunk-8ttn73cv.js";import"./chunk-gygdyf0s.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-kg9kmwt9.js";import"./chunk-6xppe9bj.js";import"./chunk-pzy7fe5e.js";import"./chunk-zsfyj36g.js";import"./chunk-2r1fgng9.js";import"./chunk-2brn8e1y.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-4wq1jsve.js";import"./chunk-af60qacx.js";import"./chunk-cmp64q4j.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-ve2jj5qv.js";import"./chunk-ks5g5ee2.js";import"./chunk-7kysxgbq.js";import"./chunk-62z7016x.js";import"./chunk-x1jxxmtc.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-7ghwdjdc.js";import"./chunk-8t7qbr1e.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-pxk2c2vj.js";import"./chunk-91sykzqq.js";export{setInbound,inboundRefusal,inboundClassOf,deniedClasses,INBOUND_KEY,INBOUND_CLASSES};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{openDaemonSession,resolveActiveTaskId}from"./chunk-1gxnd3qq.js";import"./chunk-5mhf43dx.js";import"./chunk-ar3mt81z.js";import"./chunk-s7ttzm9a.js";import"./chunk-8y10pmkf.js";import"./chunk-96kvwzj8.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{resolveActiveTaskId,openDaemonSession};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{describeRepoInitSources,missingDependenciesCoda,resolveEngineLaunchInit,resolveRepoInit}from"./chunk-paashxkd.js";import"./chunk-hpay0ax8.js";import"./chunk-catrr0z3.js";import"./chunk-gygdyf0s.js";import"./chunk-40dgv828.js";import"./chunk-7mwvvj46.js";import"./chunk-32j6y5d1.js";import"./chunk-bejhca6z.js";import"./chunk-br8r72bf.js";import"./chunk-yt15y085.js";import"./chunk-z1nj22va.js";import"./chunk-zt7wfnva.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{resolveRepoInit,resolveEngineLaunchInit,missingDependenciesCoda,describeRepoInitSources};