rovecode 0.4.0-beta.2 → 0.4.0-beta.3

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 (189) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +13 -0
  3. package/dist/cli/app-j6gn14w3.js +2 -0
  4. package/dist/cli/{ask-user-p8hq4xgj.js → ask-user-cwstt8fz.js} +1 -1
  5. package/dist/cli/auth-login-9bbp9915.js +2 -0
  6. package/dist/cli/{bench-xv3ypwev.js → bench-16zqdms5.js} +1 -1
  7. package/dist/cli/catalog-1xchffa4.js +2 -0
  8. package/dist/cli/cli-1n1zb64f.js +2 -0
  9. package/dist/cli/client-2t9gjkck.js +2 -0
  10. package/dist/cli/{commands-3p7e4xxs.js → commands-exafvm2b.js} +1 -1
  11. package/dist/cli/connect-6zde0kn3.js +2 -0
  12. package/dist/cli/{context-cmd-eqxmxhzq.js → context-cmd-5t43wgqt.js} +1 -1
  13. package/dist/cli/context-report-kt01pw8y.js +2 -0
  14. package/dist/cli/{count-remote-mby98cd0.js → count-remote-ap7x3vh6.js} +1 -1
  15. package/dist/cli/{design-122y0axd.js → design-ne5zszyh.js} +1 -1
  16. package/dist/cli/dispatch-2r5myxye.js +2 -0
  17. package/dist/cli/doctor-ws4fh4tn.js +3 -0
  18. package/dist/cli/{executor-ftvg6tsy.js → executor-bdrjn634.js} +1 -1
  19. package/dist/cli/export-1mxb9g5p.js +2 -0
  20. package/dist/cli/{files-cez9a96p.js → files-g104xghh.js} +1 -1
  21. package/dist/cli/gauntlet-07xrjpj7.js +2 -0
  22. package/dist/cli/{gauntlet-runner-r515m7kk.js → gauntlet-runner-xvy64436.js} +1 -1
  23. package/dist/cli/{gauntlet-wave3-bnkjk2v2.js → gauntlet-wave3-jm91yt5w.js} +1 -1
  24. package/dist/cli/{gauntlet-wave4-acs9s60q.js → gauntlet-wave4-r13py7p1.js} +1 -1
  25. package/dist/cli/hashline-znvrat11.js +2 -0
  26. package/dist/cli/http-xafw6fsh.js +143 -0
  27. package/dist/cli/{index-z5qt1s76.js → index-1sgjm25y.js} +1 -1
  28. package/dist/cli/init-g2m0tn4m.js +51 -0
  29. package/dist/cli/install-avaqjjqq.js +2 -0
  30. package/dist/cli/loop-mmpfft01.js +2 -0
  31. package/dist/cli/{main-a3f51n0x.js → main-0904f6ps.js} +1 -1
  32. package/dist/cli/{main-f33fc5je.js → main-0ab9fc26.js} +2 -2
  33. package/dist/cli/{main-n6qrdbmy.js → main-0mtcdbs7.js} +2 -2
  34. package/dist/cli/main-0z1w2zsg.js +3 -0
  35. package/dist/cli/{main-rvetps99.js → main-1dchs7xv.js} +2 -2
  36. package/dist/cli/{main-rpg7h8mb.js → main-1ereejm1.js} +2 -2
  37. package/dist/cli/{main-6vjeds42.js → main-1k1kw6b5.js} +2 -2
  38. package/dist/cli/{main-hrrvcfan.js → main-27y4sm2k.js} +2 -2
  39. package/dist/cli/{main-8c1tbazx.js → main-2wwjex5j.js} +2 -2
  40. package/dist/cli/main-2yfck9b5.js +3 -0
  41. package/dist/cli/main-2zmzgkwh.js +3 -0
  42. package/dist/cli/{main-xt9zc3n6.js → main-351pz3z7.js} +1 -1
  43. package/dist/cli/{main-kba6zeyd.js → main-3gjqfh7a.js} +1 -1
  44. package/dist/cli/{main-s4bb0jav.js → main-3nf3kgve.js} +1 -1
  45. package/dist/cli/{main-2z3dek0b.js → main-3pjrb2hd.js} +1 -1
  46. package/dist/cli/{main-qj2djy17.js → main-3rxcvgna.js} +3 -3
  47. package/dist/cli/{main-9a9rnh47.js → main-4b3jgy66.js} +1 -1
  48. package/dist/cli/{main-6dtqmbt6.js → main-4wndhjdc.js} +1 -1
  49. package/dist/cli/{main-9ht36z12.js → main-4xcmvxnk.js} +2 -2
  50. package/dist/cli/{main-vp2dfb7s.js → main-5tbz0wbz.js} +2 -2
  51. package/dist/cli/{main-wpkyraxh.js → main-5ywnwthm.js} +2 -2
  52. package/dist/cli/{main-yrjt2sqt.js → main-6b62vkz0.js} +2 -2
  53. package/dist/cli/{main-2zgsknth.js → main-6dnk69vp.js} +1 -1
  54. package/dist/cli/{main-nvc3yjay.js → main-6genrmhs.js} +2 -2
  55. package/dist/cli/{main-rsy72qmw.js → main-73g7eff4.js} +2 -2
  56. package/dist/cli/{main-jak598k9.js → main-7c5thhjd.js} +1 -1
  57. package/dist/cli/{main-y5c82rxr.js → main-7rn6bqje.js} +1 -1
  58. package/dist/cli/{main-4p4e2w7x.js → main-80haw7qk.js} +2 -2
  59. package/dist/cli/{main-01pv9206.js → main-875s60s2.js} +2 -2
  60. package/dist/cli/{main-ywbxshqc.js → main-8kjxbpw4.js} +1 -1
  61. package/dist/cli/{main-1ztz6fkj.js → main-90ds1z4e.js} +1 -1
  62. package/dist/cli/{main-mjt2p7aj.js → main-9etavkew.js} +1 -1
  63. package/dist/cli/main-a9njrkk1.js +3 -0
  64. package/dist/cli/{main-fvnpq46y.js → main-aecrjq2d.js} +2 -2
  65. package/dist/cli/{main-23q7cmww.js → main-ck9asesq.js} +2 -2
  66. package/dist/cli/{main-wqt32p5x.js → main-cta9racd.js} +2 -2
  67. package/dist/cli/{main-wm997zjx.js → main-ddv7j2ag.js} +1 -1
  68. package/dist/cli/{main-ntqef02r.js → main-dfreez27.js} +1 -1
  69. package/dist/cli/{main-m8vm17zq.js → main-f7rw7des.js} +1 -1
  70. package/dist/cli/{main-rebtt91r.js → main-ggcn7rd7.js} +2 -2
  71. package/dist/cli/{main-gbbty4d4.js → main-gzkmycnv.js} +1 -1
  72. package/dist/cli/{main-vxnwe5xx.js → main-hq51jg8v.js} +2 -2
  73. package/dist/cli/{main-vqbr22sz.js → main-jft389w9.js} +2 -2
  74. package/dist/cli/{main-qvarybsp.js → main-k1eqkg83.js} +2 -2
  75. package/dist/cli/{main-2wyax8k9.js → main-k2y8a2aw.js} +2 -2
  76. package/dist/cli/main-kcpbykxz.js +4 -0
  77. package/dist/cli/{main-45rn3trk.js → main-kd488vje.js} +1 -1
  78. package/dist/cli/main-kh32yvgk.js +5 -0
  79. package/dist/cli/{main-z13755t8.js → main-kqxnqjnv.js} +4 -4
  80. package/dist/cli/{main-b8zq261k.js → main-kyn0xnsg.js} +2 -2
  81. package/dist/cli/{main-evgz4mp5.js → main-m1kk6fp5.js} +1 -1
  82. package/dist/cli/{main-5py0rkmc.js → main-mv40pcr2.js} +1 -1
  83. package/dist/cli/{main-vhrrq337.js → main-n0t3973w.js} +1 -1
  84. package/dist/cli/{main-s9v8k74e.js → main-pknhvrmj.js} +2 -2
  85. package/dist/cli/{main-kwwsz6rq.js → main-pn1w7a7j.js} +2 -2
  86. package/dist/cli/{main-6h9x282m.js → main-prxxs70n.js} +2 -2
  87. package/dist/cli/{main-2rzbexn2.js → main-q3vsesf9.js} +1 -1
  88. package/dist/cli/{main-gth53dnt.js → main-rdgdw24b.js} +7 -7
  89. package/dist/cli/{main-4y0tnfpa.js → main-rfth4tbm.js} +1 -1
  90. package/dist/cli/{main-wk2csfnj.js → main-rg0wn0xf.js} +2 -2
  91. package/dist/cli/{main-xx2z3zh5.js → main-sdmxhtv8.js} +1 -1
  92. package/dist/cli/{main-mg9b20ac.js → main-skbp13js.js} +1 -1
  93. package/dist/cli/{main-xfekqh9m.js → main-t4xnd213.js} +1 -1
  94. package/dist/cli/{main-7kt6r53y.js → main-vqak588n.js} +2 -2
  95. package/dist/cli/{main-hqbz10aw.js → main-w2n1303f.js} +1 -1
  96. package/dist/cli/{main-na7wse0x.js → main-wbrdspr2.js} +2 -2
  97. package/dist/cli/{main-a2yfvcy9.js → main-wsrg79c1.js} +2 -2
  98. package/dist/cli/{main-hzwtsb2m.js → main-x4r0fne4.js} +2 -2
  99. package/dist/cli/{main-78gq4bt9.js → main-xea2f3tn.js} +1 -1
  100. package/dist/cli/{main-v8y60bb2.js → main-xg704a3c.js} +1 -1
  101. package/dist/cli/{main-p0cfn6nr.js → main-xvnrabfp.js} +2 -2
  102. package/dist/cli/{main-45ejth3a.js → main-xy53xf0r.js} +2 -2
  103. package/dist/cli/{main-x9ct6y1a.js → main-y1fqy60y.js} +2 -2
  104. package/dist/cli/{main-j7ttv0sd.js → main-yn8cd281.js} +4 -4
  105. package/dist/cli/{main-zc7pyrbj.js → main-yr0ksc0h.js} +1 -1
  106. package/dist/cli/{main-tkgarpjj.js → main-z2ex2vyf.js} +2 -2
  107. package/dist/cli/{main-mgb9ccnx.js → main-z3aayzvq.js} +1 -1
  108. package/dist/cli/{main-tjvwmscs.js → main-zaqh35jg.js} +2 -2
  109. package/dist/cli/{main-edxc3yzt.js → main-zc2e8e46.js} +2 -2
  110. package/dist/cli/{main-bxtvnf6d.js → main-zzrfw6cf.js} +2 -2
  111. package/dist/cli/main.js +5 -4
  112. package/dist/cli/{market-cmd-bm5xvn9f.js → market-cmd-e14kmx9n.js} +2 -2
  113. package/dist/cli/{mcp-login-bthtfpt7.js → mcp-login-wq7ktdek.js} +1 -1
  114. package/dist/cli/mcp-market-cmd-9mg3jecy.js +2 -0
  115. package/dist/cli/{notify-54v5z9dz.js → notify-b7qc0cjb.js} +1 -1
  116. package/dist/cli/{oauth-g5gme95c.js → oauth-z8whcgfx.js} +1 -1
  117. package/dist/cli/{output-satndjap.js → output-b3ewj3ps.js} +1 -1
  118. package/dist/cli/{profiles-sfhpbq3m.js → profiles-6mr5he5e.js} +1 -1
  119. package/dist/cli/{provider-config-hv3xtdt4.js → provider-config-g7j42q8x.js} +1 -1
  120. package/dist/cli/provider-jr1y8vvm.js +2 -0
  121. package/dist/cli/registry-s8yk86g0.js +2 -0
  122. package/dist/cli/{registry-fh0hdnyn.js → registry-t6p8d4mn.js} +1 -1
  123. package/dist/cli/{repl-t4z03mqq.js → repl-bajwe1mh.js} +1 -1
  124. package/dist/cli/{resume-fqt4chg8.js → resume-rwn9nz7y.js} +1 -1
  125. package/dist/cli/run-flags-nah7ndpt.js +2 -0
  126. package/dist/cli/runtime-n7gafzhb.js +2 -0
  127. package/dist/cli/{sandbox-config-g4qxd7y5.js → sandbox-config-emdy18x4.js} +1 -1
  128. package/dist/cli/{server-r0b6bksk.js → server-b0nvs2bn.js} +1 -1
  129. package/dist/cli/session-arg-y75wd4kj.js +2 -0
  130. package/dist/cli/session-j62evmjq.js +2 -0
  131. package/dist/cli/{sessions-cmd-adw7svfn.js → sessions-cmd-tsnwz0ns.js} +1 -1
  132. package/dist/cli/{settings-y9rzcqx8.js → settings-df10wfez.js} +1 -1
  133. package/dist/cli/{setup-jmbr11j0.js → setup-jzvv72fg.js} +1 -1
  134. package/dist/cli/{sextant-smoke-tcth0vea.js → sextant-smoke-37m81ke6.js} +1 -1
  135. package/dist/cli/{skills-cmd-zbdy99v6.js → skills-cmd-gjxnxnhx.js} +1 -1
  136. package/dist/cli/smoke-p7748apt.js +8 -0
  137. package/dist/cli/{start-chat-p01cdks3.js → start-chat-s4st3mm0.js} +3 -3
  138. package/dist/cli/stream-gmeyewds.js +2 -0
  139. package/dist/cli/task-gh0kkp3n.js +2 -0
  140. package/dist/cli/tasks-z1kfpe8e.js +2 -0
  141. package/dist/cli/{thinking-a5ngvqyh.js → thinking-0eqkrz6t.js} +1 -1
  142. package/dist/cli/{todo-1wxpcecx.js → todo-5brcrt9m.js} +1 -1
  143. package/dist/cli/{tools-x1tj4fxm.js → tools-7pzm0vj9.js} +1 -1
  144. package/dist/cli/{tools-2ftsya7w.js → tools-s635p6s8.js} +1 -1
  145. package/dist/cli/trust-cmd-cjav8zgm.js +2 -0
  146. package/dist/cli/{update-check-ygt3vd7m.js → update-check-pt31bm2f.js} +1 -1
  147. package/dist/cli/{update-cmd-v23qhr8c.js → update-cmd-tk131s9t.js} +1 -1
  148. package/dist/cli/{voice-g1gtck92.js → voice-56nabd8d.js} +1 -1
  149. package/dist/cli/{webfetch-0nnrjgb5.js → webfetch-xd8q596m.js} +1 -1
  150. package/dist/cli/{websearch-f0vr2p7d.js → websearch-5hkf98k1.js} +1 -1
  151. package/dist/cli/workflow-cmd-cy3cvzjp.js +4 -0
  152. package/dist/cli/{workspace-9rq1w4ta.js → workspace-q10g5z3e.js} +1 -1
  153. package/dist/lib/index.js +44 -44
  154. package/dist/lib/plugins.js +54 -5
  155. package/dist/lib/public-api.js +15 -15
  156. package/dist/lib/sdk.js +360 -0
  157. package/package.json +3 -2
  158. package/dist/cli/app-dybnr56b.js +0 -2
  159. package/dist/cli/auth-login-ewpgw5sm.js +0 -2
  160. package/dist/cli/catalog-737wb2s0.js +0 -2
  161. package/dist/cli/cli-arhg40m0.js +0 -2
  162. package/dist/cli/client-cf2pxx8q.js +0 -2
  163. package/dist/cli/connect-3q93d7cb.js +0 -2
  164. package/dist/cli/context-report-hbw9zfes.js +0 -2
  165. package/dist/cli/dispatch-b4egzvvh.js +0 -2
  166. package/dist/cli/doctor-x4jkv72e.js +0 -3
  167. package/dist/cli/export-pdgdhkch.js +0 -2
  168. package/dist/cli/gauntlet-r3xxaszc.js +0 -2
  169. package/dist/cli/hashline-ewg5hbe3.js +0 -2
  170. package/dist/cli/http-n0kehsk8.js +0 -5
  171. package/dist/cli/install-80mp63kx.js +0 -2
  172. package/dist/cli/loop-12twjcat.js +0 -2
  173. package/dist/cli/main-7jd5vh3x.js +0 -4
  174. package/dist/cli/main-mg4f96e1.js +0 -3
  175. package/dist/cli/main-wgph00xf.js +0 -5
  176. package/dist/cli/main-ys6zj3yr.js +0 -3
  177. package/dist/cli/mcp-market-cmd-mbeshfyd.js +0 -2
  178. package/dist/cli/provider-kwzq6g84.js +0 -2
  179. package/dist/cli/registry-y1y8e94r.js +0 -2
  180. package/dist/cli/run-flags-rysbag9t.js +0 -2
  181. package/dist/cli/runtime-j19fjbsa.js +0 -2
  182. package/dist/cli/session-arg-txmn5g4x.js +0 -2
  183. package/dist/cli/session-ed250d9j.js +0 -2
  184. package/dist/cli/smoke-1bg937kx.js +0 -8
  185. package/dist/cli/stream-4wmyaypz.js +0 -2
  186. package/dist/cli/task-eg4s093s.js +0 -2
  187. package/dist/cli/tasks-12v9rr9k.js +0 -2
  188. package/dist/cli/trust-cmd-hccxehzb.js +0 -2
  189. package/dist/rovecode.exe +0 -4
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{wm as Yq,xm as o}from"./main-ys6zj3yr.js";import{xn as W}from"./main-qsevpgsv.js";import{join as n}from"path";var A=["\u2591","\u2592","\u2593","\u2588"],O=[["\u2588\u2580\u2588","\u2588\u2580\u2584"],["\u2588\u2580\u2588","\u2588\u2584\u2588"],["\u2588 \u2588","\u2580\u2584\u2580"],["\u2588\u2580\u2580","\u2588\u2584\u2584"],["\u2588\u2580\u2580","\u2588\u2584\u2584"],["\u2588\u2580\u2588","\u2588\u2584\u2588"],["\u2588\u2580\u2584","\u2588\u2584\u2580"],["\u2588\u2580\u2580","\u2588\u2584\u2584"]],C=O.length*4-1;var b=C+8+(C+8)%2;var Gq=[" \u256D\u2500\u256E\u256D\u2500\u2500\u256E\u256D\u2500\u256E "," \u256D\u256F \u2570\u256F \u2570\u256F \u2570\u2500\u256E "," \u256D\u256F \u2570\u256E "," \u2502 \u2502 "," \u2570\u256E \u256D\u256F "," \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F "],M={EYE_L:6,EYE_R:12,MOUTH:9,EYE_ROW:3,MOUTH_ROW:4},U=Gq.map((q,J)=>{let G=[...q];if(J===M.EYE_ROW)G[M.EYE_L]="\u2022",G[M.EYE_R]="\u2022";if(J===M.MOUTH_ROW)G[M.MOUTH]="\u25E1";return G.join("")});var Jq=U.length-1,g=O.length+A.length-1,T=Math.ceil(b/2/3),p=U.length,h=[3,2,3],D=g+T+p+h.length;function Qq(q){let J=q-g-T-p,G=J>=0?h[Math.min(J,h.length-1)]:void 0,X=["",""];return O.forEach((j,V)=>{let $=G??Math.max(0,Math.min(A.length-1,q-V)),Y=A[$];for(let y of[0,1])X[y]+=(X[y].length>0?" ":"")+j[y].replaceAll("\u2588",Y)}),X}function a(q){return Math.max(0,Math.min(U.length,q-g-T))}function Vq(q){let J=a(q),G=U.slice(1,Math.max(0,J));return[...G,...Array.from({length:Jq-G.length},()=>"")]}function Xq(q,J){if(a(J)===0||q.length===0)return q;let G=Math.max(0,Math.floor((q.length-18)/2)),X=U[0],j=[...q];return[...X].forEach((V,$)=>{if(V!==" "&&G+$<j.length)j[G+$]=V}),j.join("")}function Zq(q){let J=q-g;if(J<0)return["",""];let G=Math.min(b/2,Math.max(0,J)*3);if(G===0)return["",""];let X="\u2500".repeat(Math.max(0,G-1)),j=Math.max(0,b-G*2),V=($,Y)=>`${$}${X}${" ".repeat(j)}${X}${Y}`;return[V("\u256D","\u256E"),V("\u2570","\u256F")]}var w=7+(U.length-1);function L(q,J){return q>=b+2&&J>=w+2}var u="\x1B[2J\x1B[H",c="\x1B[?25l",$q="\x1B[?25h";function l(q){let J=q.size??(()=>({columns:q.columns??80,rows:q.rows??24})),G=J();if(!q.tty||!L(G.columns,G.rows))return{status:()=>{},animationDone:Promise.resolve(),done:Promise.resolve(),finish:()=>{}};let X=q.setInterval??setInterval,j=q.clearInterval??((Q)=>clearInterval(Q)),V=0,$="",Y=!1,y=!1,x=0,Z=null,z=G,N,f=()=>{},F=new Promise((Q)=>{f=Q}),H=()=>{},I=new Promise((Q)=>{H=Q}),_=()=>$&&y&&!Y?`${$} ${"\xB7".repeat(x+1)}`:$,P=(Q,k)=>{let K=[...Q.replace(/\s+/g," ")].slice(0,Math.max(0,k-2)).join("");return" ".repeat(Math.max(0,Math.floor((k-K.length)/2)))+K},v=()=>{let{columns:Q,rows:k}=z=J();if(!L(Q,k)){q.write(u+c);return}let K=(B)=>" ".repeat(Math.max(0,Math.floor((Q-B)/2))),E=K(C),S=K(b),r=S+" ".repeat(Math.max(0,Math.floor((b-18)/2))),i=`
2
+ import{Th as Yq,Uh as o}from"./main-0z1w2zsg.js";import{xn as W}from"./main-qsevpgsv.js";import{join as n}from"path";var A=["\u2591","\u2592","\u2593","\u2588"],O=[["\u2588\u2580\u2588","\u2588\u2580\u2584"],["\u2588\u2580\u2588","\u2588\u2584\u2588"],["\u2588 \u2588","\u2580\u2584\u2580"],["\u2588\u2580\u2580","\u2588\u2584\u2584"],["\u2588\u2580\u2580","\u2588\u2584\u2584"],["\u2588\u2580\u2588","\u2588\u2584\u2588"],["\u2588\u2580\u2584","\u2588\u2584\u2580"],["\u2588\u2580\u2580","\u2588\u2584\u2584"]],C=O.length*4-1;var b=C+8+(C+8)%2;var Gq=[" \u256D\u2500\u256E\u256D\u2500\u2500\u256E\u256D\u2500\u256E "," \u256D\u256F \u2570\u256F \u2570\u256F \u2570\u2500\u256E "," \u256D\u256F \u2570\u256E "," \u2502 \u2502 "," \u2570\u256E \u256D\u256F "," \u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F "],M={EYE_L:6,EYE_R:12,MOUTH:9,EYE_ROW:3,MOUTH_ROW:4},U=Gq.map((q,J)=>{let G=[...q];if(J===M.EYE_ROW)G[M.EYE_L]="\u2022",G[M.EYE_R]="\u2022";if(J===M.MOUTH_ROW)G[M.MOUTH]="\u25E1";return G.join("")});var Jq=U.length-1,g=O.length+A.length-1,T=Math.ceil(b/2/3),p=U.length,h=[3,2,3],D=g+T+p+h.length;function Qq(q){let J=q-g-T-p,G=J>=0?h[Math.min(J,h.length-1)]:void 0,X=["",""];return O.forEach((j,V)=>{let $=G??Math.max(0,Math.min(A.length-1,q-V)),Y=A[$];for(let y of[0,1])X[y]+=(X[y].length>0?" ":"")+j[y].replaceAll("\u2588",Y)}),X}function a(q){return Math.max(0,Math.min(U.length,q-g-T))}function Vq(q){let J=a(q),G=U.slice(1,Math.max(0,J));return[...G,...Array.from({length:Jq-G.length},()=>"")]}function Xq(q,J){if(a(J)===0||q.length===0)return q;let G=Math.max(0,Math.floor((q.length-18)/2)),X=U[0],j=[...q];return[...X].forEach((V,$)=>{if(V!==" "&&G+$<j.length)j[G+$]=V}),j.join("")}function Zq(q){let J=q-g;if(J<0)return["",""];let G=Math.min(b/2,Math.max(0,J)*3);if(G===0)return["",""];let X="\u2500".repeat(Math.max(0,G-1)),j=Math.max(0,b-G*2),V=($,Y)=>`${$}${X}${" ".repeat(j)}${X}${Y}`;return[V("\u256D","\u256E"),V("\u2570","\u256F")]}var w=7+(U.length-1);function L(q,J){return q>=b+2&&J>=w+2}var u="\x1B[2J\x1B[H",c="\x1B[?25l",$q="\x1B[?25h";function l(q){let J=q.size??(()=>({columns:q.columns??80,rows:q.rows??24})),G=J();if(!q.tty||!L(G.columns,G.rows))return{status:()=>{},animationDone:Promise.resolve(),done:Promise.resolve(),finish:()=>{}};let X=q.setInterval??setInterval,j=q.clearInterval??((Q)=>clearInterval(Q)),V=0,$="",Y=!1,y=!1,x=0,Z=null,z=G,N,f=()=>{},F=new Promise((Q)=>{f=Q}),H=()=>{},I=new Promise((Q)=>{H=Q}),_=()=>$&&y&&!Y?`${$} ${"\xB7".repeat(x+1)}`:$,P=(Q,k)=>{let K=[...Q.replace(/\s+/g," ")].slice(0,Math.max(0,k-2)).join("");return" ".repeat(Math.max(0,Math.floor((k-K.length)/2)))+K},v=()=>{let{columns:Q,rows:k}=z=J();if(!L(Q,k)){q.write(u+c);return}let K=(B)=>" ".repeat(Math.max(0,Math.floor((Q-B)/2))),E=K(C),S=K(b),r=S+" ".repeat(Math.max(0,Math.floor((b-18)/2))),i=`
3
3
  `.repeat(Math.max(0,Math.floor((k-w)/2))),[s,e]=Qq(V),[t,qq]=Zq(V),d=(B)=>B.length>0?`${S}${B}`:"";q.write([u,c,i,`${d(Xq(t,V))}
4
4
  `,Vq(V).map((B)=>`${B.length>0?r+B:""}
5
5
  `).join(""),`
@@ -8,5 +8,5 @@ ${E}${e}
8
8
  `,`${P(q.version??"",Q)}
9
9
  `,`${P(_(),Q)}
10
10
  `,`${d(qq)}
11
- `].join(""))},m=()=>{if(Y)return;let Q=J();if(Q.columns!==z.columns||Q.rows!==z.rows){v();return}if(!L(Q.columns,Q.rows))return;let k=Math.max(0,Math.floor((Q.rows-w)/2))+w-1,K=String.fromCharCode(27);q.write(`${K}[${k};1H${K}[2K${P(_(),Q.columns)}`)},R=()=>{if(Y)return;Y=!0,j(Z),N?.(),V=D,$="",v(),q.write(`${$q}${u}`),H(),f()};return v(),N=q.onResize?.(()=>{if(!Y)v()}),Z=X(()=>{if(Y)return;if(V<D){if(V+=1,v(),V===D)H()}else if(!q.holdUntilReady)R();else j(Z),y=!0,m(),Z=X(()=>{x=(x+1)%3,m()},500)},q.frameMs??Math.round(1100/D)),{status:(Q)=>{if(!Y&&Q!==$)$=Q,m()},animationDone:I,done:F,finish:R}}Yq();async function Hq(q,J=process.argv){if(q.plain){let[{runRepl:Z},{parseAddDirs:z},{resolveBoot:N}]=await Promise.all([import("./repl-t4z03mqq.js"),import("./run-flags-rysbag9t.js"),import("./resume-fqt4chg8.js")]);N(J,n(process.cwd(),".rovecode","sessions")),await Z({yolo:q.yolo,addDirs:z(J)});return}let G=l({write:(Z)=>{process.stdout.write(Z)},tty:process.stdout.isTTY===!0&&!J.includes("--no-intro")&&process.env.ROVECODE_INTRO!=="0",version:o.version,holdUntilReady:!0,size:()=>({columns:process.stdout.columns||80,rows:process.stdout.rows||24}),onResize:(Z)=>{return process.stdout.on("resize",Z),()=>{process.stdout.off("resize",Z)}}}),X=new AbortController,j=130,V=()=>{j=130,X.abort(Error("startup interrupted"))},$=()=>{j=143,X.abort(Error("startup terminated"))},Y=()=>{G.finish(),process.off("SIGINT",V),process.off("SIGTERM",$)};process.once("exit",Y),process.once("SIGINT",V),process.once("SIGTERM",$);let y=Number(process.env._ROVECODE_BOOT_T0??-1),x=(Z)=>{if(y>=0)process.stderr.write(`[boot] +${Date.now()-y}ms ${Z}
12
- `)};try{x("intro started"),G.status("loading modules");let[{runTui:Z},{interactiveRenderer:z},{parseAddDirs:N},{resolveBoot:f}]=await Promise.all([import("./app-dybnr56b.js"),import("./notify-54v5z9dz.js"),import("./run-flags-rysbag9t.js"),import("./resume-fqt4chg8.js")]);X.signal.throwIfAborted(),x("surface modules loaded"),G.status("opening session");let F=process.cwd(),H=f(J,n(F,".rovecode","sessions")),I=N(J);await Z({yolo:q.yolo,acceptEdits:q.acceptEdits,...q.effort!==void 0?{effort:q.effort}:{},sessionId:H.id,...H.note!==void 0?{bootNote:H.note}:{},renderer:z(q,process.env,process.stdout,process.stdin,F),...q.pet!==void 0?{pet:q.pet}:{},...I.length>0?{addDirs:I}:{},startup:{status:G.status,finish:Y,animationDone:G.animationDone,signal:X.signal}})}catch(Z){if(X.signal.aborted){process.exitCode=j;return}throw Z}finally{Y(),process.off("exit",Y)}}export{Hq as startChat};
11
+ `].join(""))},m=()=>{if(Y)return;let Q=J();if(Q.columns!==z.columns||Q.rows!==z.rows){v();return}if(!L(Q.columns,Q.rows))return;let k=Math.max(0,Math.floor((Q.rows-w)/2))+w-1,K=String.fromCharCode(27);q.write(`${K}[${k};1H${K}[2K${P(_(),Q.columns)}`)},R=()=>{if(Y)return;Y=!0,j(Z),N?.(),V=D,$="",v(),q.write(`${$q}${u}`),H(),f()};return v(),N=q.onResize?.(()=>{if(!Y)v()}),Z=X(()=>{if(Y)return;if(V<D){if(V+=1,v(),V===D)H()}else if(!q.holdUntilReady)R();else j(Z),y=!0,m(),Z=X(()=>{x=(x+1)%3,m()},500)},q.frameMs??Math.round(1100/D)),{status:(Q)=>{if(!Y&&Q!==$)$=Q,m()},animationDone:I,done:F,finish:R}}Yq();async function Hq(q,J=process.argv){if(q.plain){let[{runRepl:Z},{parseAddDirs:z},{resolveBoot:N}]=await Promise.all([import("./repl-bajwe1mh.js"),import("./run-flags-nah7ndpt.js"),import("./resume-rwn9nz7y.js")]);N(J,n(process.cwd(),".rovecode","sessions")),await Z({yolo:q.yolo,addDirs:z(J)});return}let G=l({write:(Z)=>{process.stdout.write(Z)},tty:process.stdout.isTTY===!0&&!J.includes("--no-intro")&&process.env.ROVECODE_INTRO!=="0",version:o.version,holdUntilReady:!0,size:()=>({columns:process.stdout.columns||80,rows:process.stdout.rows||24}),onResize:(Z)=>{return process.stdout.on("resize",Z),()=>{process.stdout.off("resize",Z)}}}),X=new AbortController,j=130,V=()=>{j=130,X.abort(Error("startup interrupted"))},$=()=>{j=143,X.abort(Error("startup terminated"))},Y=()=>{G.finish(),process.off("SIGINT",V),process.off("SIGTERM",$)};process.once("exit",Y),process.once("SIGINT",V),process.once("SIGTERM",$);let y=Number(process.env._ROVECODE_BOOT_T0??-1),x=(Z)=>{if(y>=0)process.stderr.write(`[boot] +${Date.now()-y}ms ${Z}
12
+ `)};try{x("intro started"),G.status("loading modules");let[{runTui:Z},{interactiveRenderer:z},{parseAddDirs:N},{resolveBoot:f}]=await Promise.all([import("./app-j6gn14w3.js"),import("./notify-b7qc0cjb.js"),import("./run-flags-nah7ndpt.js"),import("./resume-rwn9nz7y.js")]);X.signal.throwIfAborted(),x("surface modules loaded"),G.status("opening session");let F=process.cwd(),H=f(J,n(F,".rovecode","sessions")),I=N(J);await Z({yolo:q.yolo,acceptEdits:q.acceptEdits,...q.effort!==void 0?{effort:q.effort}:{},sessionId:H.id,...H.note!==void 0?{bootNote:H.note}:{},renderer:z(q,process.env,process.stdout,process.stdin,F),...q.pet!==void 0?{pet:q.pet}:{},...I.length>0?{addDirs:I}:{},startup:{status:G.status,finish:Y,animationDone:G.animationDone,signal:X.signal}})}catch(Z){if(X.signal.aborted){process.exitCode=j;return}throw Z}finally{Y(),process.off("exit",Y)}}export{Hq as startChat};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ai as j,Bi as k,Ci as l,Di as m,Ei as n,Fi as o,Gi as p,Hi as q,Ii as r,Ji as s,Ki as t,Li as u,Mi as v,Ni as w,wi as f,xi as g,yi as h,zi as i}from"./main-k2y8a2aw.js";import{Pi as c,Ri as d,Si as e}from"./main-875s60s2.js";import"./main-sdmxhtv8.js";import"./main-pknhvrmj.js";import{mj as a,nj as b}from"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-9etavkew.js";import"./main-q3vsesf9.js";import"./main-xg704a3c.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{j as wantsStreaming,u as toolTurn,d as toOpenAiToolSchemas,c as toOpenAiMessages,e as toAnthropicMessages,a as thinkingBudget,t as textTurn,l as shapeKey,k as shapeByModel,v as resolveProvider,i as providerStreaming,h as providerStream,p as openaiCompatStreaming,o as openaiCompatStream,s as mockStream,w as listBuiltinProviders,f as fetchModels,g as clearModelsCache,b as anthropicThinking,q as anthropicStreaming,r as anthropicStream,n as anthropicShapeFor,m as anthropicMaxTokens};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{de as a,ee as b,fe as c,ge as d}from"./main-wsrg79c1.js";import"./main-rdgdw24b.js";import"./main-3pjrb2hd.js";import"./main-dfreez27.js";import"./main-3gjqfh7a.js";import"./main-gzkmycnv.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{c as createTaskTool,d as createTaskStatusTool,b as MAX_WAIT_MS,a as DEFAULT_WAIT_MS};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ke as a,Le as b,Me as c,Ne as d,Oe as e,Pe as f,Qe as g,Re as h,Se as i,Te as j}from"./main-rdgdw24b.js";import"./main-3pjrb2hd.js";import"./main-dfreez27.js";import"./main-3gjqfh7a.js";import"./main-gzkmycnv.js";import"./main-3rxcvgna.js";import"./main-4wndhjdc.js";import"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";j();export{b as tasksMaxFromEnv,d as taskNote,g as summariseBatch,c as isTerminal,e as formatTaskList,h as batchNote,i as TaskManager,a as DEFAULT_TASKS_MAX,f as BATCH_LABEL_MAX};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ki as a,Li as b,Mi as c,Ni as d,Oi as e,Pi as f,Qi as g}from"./main-6vjeds42.js";import"./main-1ztz6fkj.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{e as thinkingTable,g as thinkingReport,d as thinkingPlan,f as thinkingLine,a as thinkingBudget,c as dialectFor,b as anthropicThinking};
2
+ import{mj as a,nj as b,oj as c,pj as d,qj as e,rj as f,sj as g}from"./main-1k1kw6b5.js";import"./main-90ds1z4e.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{e as thinkingTable,g as thinkingReport,d as thinkingPlan,f as thinkingLine,a as thinkingBudget,c as dialectFor,b as anthropicThinking};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Af as o,Bf as p,Cf as q,mf as a,nf as b,of as c,pf as d,qf as e,rf as f,sf as g,tf as h,uf as i,vf as j,wf as k,xf as l,yf as m,zf as n}from"./main-xfekqh9m.js";import"./main-qsevpgsv.js";q();export{g as validateTodos,n as todoWriteTool,p as todoTools,m as todoStatusLabel,o as todoReadTool,j as todoCounts,i as saveTodos,k as renderTodos,l as planReminder,h as loadTodos,a as TODO_STATUSES,b as TODO_PRIORITIES,f as TODOS_FILE,c as MAX_TODOS,d as MAX_ID_CHARS,e as MAX_CONTENT_CHARS};
2
+ import{cg as a,dg as b,eg as c,fg as d,gg as e,hg as f,ig as g,jg as h,kg as i,lg as j,mg as k,ng as l,og as m,pg as n,qg as o,rg as p,sg as q}from"./main-t4xnd213.js";import"./main-qsevpgsv.js";q();export{g as validateTodos,n as todoWriteTool,p as todoTools,m as todoStatusLabel,o as todoReadTool,j as todoCounts,i as saveTodos,k as renderTodos,l as planReminder,h as loadTodos,a as TODO_STATUSES,b as TODO_PRIORITIES,f as TODOS_FILE,c as MAX_TODOS,d as MAX_ID_CHARS,e as MAX_CONTENT_CHARS};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{De as a,Ee as b,Fe as c}from"./main-9a9rnh47.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{b as turnFailures,a as resetTurnFailureCount,c as memoryEditTool};
2
+ import{tf as a,uf as b,vf as c}from"./main-4b3jgy66.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";export{b as turnFailures,a as resetTurnFailureCount,c as memoryEditTool};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{nl as a,ol as b,pl as c,ql as d,rl as e}from"./main-rebtt91r.js";import"./main-a3f51n0x.js";import"./main-5py0rkmc.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";e();export{b as evaluatePermissions,d as describeResource,c as ToolRegistry,a as ABORTED_TOOL_RESULT};
2
+ import{Nl as a,Ol as b,Pl as c,Ql as d,Rl as e}from"./main-ggcn7rd7.js";import"./main-0904f6ps.js";import"./main-mv40pcr2.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";e();export{b as evaluatePermissions,d as describeResource,c as ToolRegistry,a as ABORTED_TOOL_RESULT};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ra as O,sa as F,ta as P,ua as Q}from"./main-zc2e8e46.js";import"./main-prxxs70n.js";import"./main-n0t3973w.js";import"./main-7rn6bqje.js";import{$m as Z,Lm as N}from"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-nqveez48.js";import"./main-qsevpgsv.js";Z();var M=["usage: rovecode trust list this repo's gated files with what they would do, then approve them (asks on a TTY)"," rovecode trust --yes approve without asking (after reading `trust show`)"," rovecode trust show list only \u2014 nothing changes"," rovecode trust untrust withdraw the approval; the files contribute nothing again until trusted"," gated: .rovecode/settings.json (verify, lsp, notify_command) \xB7 .rovecode/hooks.ts|js \xB7 .rovecode/sandbox.json \xB7 .rovecode/mcp.json \xB7 .mcp.json"," the store is ~/.rovecode/plugins.json (path \u2192 sha256): any edit to a file asks again"];async function H(I,V=process.cwd(),D={}){let x=D.out??((k)=>console.log(k)),J=D.err??((k)=>console.error(k)),K=D.home??N(),W=I.filter((k)=>!k.startsWith("--")),X=I.includes("--yes"),z=W[0]??"";if(z==="-h"||z==="help"||I.includes("--help")){for(let k of M)x(k);return 0}if(z!==""&&z!=="show"&&z!=="untrust"){J(`unknown trust command "${z}"`);for(let k of M)J(k);return 2}let C=O(V,K);if(z==="show"){for(let k of F(C))x(k);return 0}if(z==="untrust"){for(let k of Q(K,C))x(k);return 0}if(C.length===0){for(let k of F(C))x(k);return 1}for(let k of F(C))x(k);if(!X){if(!(D.tty??process.stdin.isTTY===!0))return J("nothing trusted: no terminal to confirm on \u2014 re-run with --yes after reading the lines above"),1;if(!await(D.confirm??((Y)=>confirm(Y)))("trust these files as they are now? [y/N]"))return x("nothing trusted"),1}for(let k of P(K,C))x(k);return x("restart rovecode to apply \u2014 an edit to any of these files asks again"),0}export{H as cmdTrust,M as TRUST_USAGE};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Kh as a,Lh as b,Mh as c}from"./main-wm997zjx.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{c as updateLine,a as isNewer,b as checkForUpdate};
2
+ import{Yh as a,Zh as b,_h as c}from"./main-ddv7j2ag.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";export{c as updateLine,a as isNewer,b as checkForUpdate};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Lh as P,Mh as Z}from"./main-wm997zjx.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";import{existsSync as B}from"fs";import{join as G}from"path";import{existsSync as I}from"fs";import{join as N,sep as X}from"path";var _="/$bunfs/";function $(A){let z=A.entry.replace(/\\/g,"/");if(z.includes(_)||A.exec!==void 0&&A.exec.replace(/\\/g,"/").includes(_))return{mode:"binary"};let D=z.lastIndexOf("/node_modules/");if(D>=0){let E=z.slice(D+14),J=E.split("/"),H=E.startsWith("@")?J.slice(0,2):J.slice(0,1),K=z.slice(0,D)+"/node_modules/"+H.join("/"),Q=A.npmGlobalPrefix?.replace(/\\/g,"/").replace(/\/$/,""),T=Q!==void 0?K.toLowerCase().startsWith((Q+"/node_modules/").toLowerCase()):void 0;return{mode:"npm",root:K,...T!==void 0?{npmGlobal:T}:{}}}for(let E of O(A.entry))if(I(N(E,".git")))return{mode:"source",root:E};return{mode:"unknown"}}function O(A){let z=[],D=A.includes(X)||A.includes("/")?A.replace(/\\/g,"/").split("/").slice(0,-1).join("/"):".";for(let E=0;E<6&&D.length>0;E++){z.push(D.replace(/\//g,X));let J=D.split("/").slice(0,-1).join("/");if(J===D)break;D=J}return z}function Y(A,z){if(z==="beta"||z==="latest")return z;return A.includes("-")?"beta":"latest"}function q(A,z){let D=Y(z.currentVersion,z.channel);switch(A.mode){case"npm":{let E=`rovecode@${D}`;if(A.npmGlobal===!1&&A.root){let J=A.root.replace(/\\/g,"/"),H=J.lastIndexOf("/node_modules/"),K=H>0?J.slice(0,H).replace(/\//g,X):void 0;return{mode:"npm",channel:D,commands:[["npm","install",E]],...K?{cwd:K}:{}}}return{mode:"npm",channel:D,commands:[["npm","install","-g",E]]}}case"source":{let E=[["git","pull","--ff-only"],["bun","install"]];if(z.distBuilt===!0)E.push(["bun","run","build:cli"]);return{mode:"source",channel:D,commands:E,...A.root?{cwd:A.root}:{}}}case"binary":return{mode:"binary",channel:D,commands:[],manual:"a compiled binary does not replace itself yet \u2014 download the new artifact from the releases page (https://github.com/9Code-Labs/rovecode-community/releases) and swap the file"};default:return{mode:"unknown",channel:D,commands:[],manual:"cannot tell how this copy was installed \u2014 update it the way you installed it (npm: `npm install -g rovecode@"+D+"`; source: `git pull && bun install`)"}}}async function M(A,z,D){let E=[];if(A.commands.length===0)return{ok:!1,detail:A.manual??"nothing to run",ran:E};let J=A.commands;if(A.mode==="npm"&&z.npmGlobal===void 0&&z.root&&D.npmGlobalPrefix){let H=(await D.npmGlobalPrefix())?.replace(/\\/g,"/").replace(/\/$/,"");if(H){let K=z.root.replace(/\\/g,"/").toLowerCase().startsWith((H+"/node_modules/").toLowerCase()),Q=A.commands[0][A.commands[0].length-1];J=K?[["npm","install","-g",Q]]:[["npm","install",Q]]}}for(let H of J){D.log?.(`$ ${H.join(" ")}`);let K;try{K=await D.spawn(H,A.cwd)}catch(Q){return{ok:!1,detail:`${H[0]} failed to start: ${Q instanceof Error?Q.message:String(Q)}`,ran:E}}if(E.push(H.join(" ")),K.code!==0)return{ok:!1,detail:`${H.join(" ")} exited ${K.code}: ${V(K.out)}`,ran:E}}return{ok:!0,detail:"updated \u2014 restart rovecode to run the new version",ran:E}}function V(A,z=400){let D=A.trim();return D.length>z?"\u2026"+D.slice(-z):D}var R=process.platform==="win32"?"npm.cmd":"npm";async function L(A,z){let D=A[0]==="npm"?[R,...A.slice(1)]:A,E=Bun.spawn(D,{cwd:z,stdout:"pipe",stderr:"pipe"}),[J,H]=await Promise.all([new Response(E.stdout).text(),new Response(E.stderr).text()]);return{code:await E.exited,out:J+H}}async function b(){try{let A=Bun.spawn([R,"prefix","-g"],{stdout:"pipe",stderr:"ignore"}),z=(await new Response(A.stdout).text()).trim();return await A.exited,z.length>0?z:void 0}catch{return}}async function j(A,z){let D=A.includes("--check"),E=A.includes("--channel")?A[A.indexOf("--channel")+1]:"auto";if(E!=="auto"&&E!=="beta"&&E!=="latest")return z.log("error: --channel must be beta, latest or auto"),2;let J=await P(z.version,D?{cacheOnly:!0}:{});if(D)return z.log(Z(J,!0)??`up to date (${z.version})`),0;if(!J.newer)return z.log(J.latest===void 0?`no newer release is known (${Z(J,!0)??`current: ${z.version}`})`:`up to date (${z.version})`),0;let H=z.deps?.install??$({entry:z.entry}),K=H.mode==="source"&&H.root!==void 0&&B(G(H.root,"dist","cli","main.js")),Q=q(H,{currentVersion:z.version,channel:E,distBuilt:K});if(z.log(`update available: ${z.version} \u2192 ${J.latest} \xB7 this copy is a ${H.mode} install \xB7 channel ${Q.channel} (${Y(z.version,E)} follows the running version)`),Q.commands.length===0)return z.log(Q.manual??"nothing to run"),1;let T=await M(Q,H,{spawn:z.deps?.spawn??L,npmGlobalPrefix:z.deps?.prefix??b,log:z.log});return z.log(T.ok?T.detail:`update failed: ${T.detail}`),T.ok?0:1}async function g(A,z,D){return j(A,{version:z,entry:D,log:(E)=>console.log(E)})}export{j as updateFlow,g as cmdUpdate};
2
+ import{Zh as P,_h as Z}from"./main-ddv7j2ag.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import"./main-qsevpgsv.js";import{existsSync as B}from"fs";import{join as G}from"path";import{existsSync as I}from"fs";import{join as N,sep as X}from"path";var _="/$bunfs/";function $(A){let z=A.entry.replace(/\\/g,"/");if(z.includes(_)||A.exec!==void 0&&A.exec.replace(/\\/g,"/").includes(_))return{mode:"binary"};let D=z.lastIndexOf("/node_modules/");if(D>=0){let E=z.slice(D+14),J=E.split("/"),H=E.startsWith("@")?J.slice(0,2):J.slice(0,1),K=z.slice(0,D)+"/node_modules/"+H.join("/"),Q=A.npmGlobalPrefix?.replace(/\\/g,"/").replace(/\/$/,""),T=Q!==void 0?K.toLowerCase().startsWith((Q+"/node_modules/").toLowerCase()):void 0;return{mode:"npm",root:K,...T!==void 0?{npmGlobal:T}:{}}}for(let E of O(A.entry))if(I(N(E,".git")))return{mode:"source",root:E};return{mode:"unknown"}}function O(A){let z=[],D=A.includes(X)||A.includes("/")?A.replace(/\\/g,"/").split("/").slice(0,-1).join("/"):".";for(let E=0;E<6&&D.length>0;E++){z.push(D.replace(/\//g,X));let J=D.split("/").slice(0,-1).join("/");if(J===D)break;D=J}return z}function Y(A,z){if(z==="beta"||z==="latest")return z;return A.includes("-")?"beta":"latest"}function q(A,z){let D=Y(z.currentVersion,z.channel);switch(A.mode){case"npm":{let E=`rovecode@${D}`;if(A.npmGlobal===!1&&A.root){let J=A.root.replace(/\\/g,"/"),H=J.lastIndexOf("/node_modules/"),K=H>0?J.slice(0,H).replace(/\//g,X):void 0;return{mode:"npm",channel:D,commands:[["npm","install",E]],...K?{cwd:K}:{}}}return{mode:"npm",channel:D,commands:[["npm","install","-g",E]]}}case"source":{let E=[["git","pull","--ff-only"],["bun","install"]];if(z.distBuilt===!0)E.push(["bun","run","build:cli"]);return{mode:"source",channel:D,commands:E,...A.root?{cwd:A.root}:{}}}case"binary":return{mode:"binary",channel:D,commands:[],manual:"a compiled binary does not replace itself yet \u2014 download the new artifact from the releases page (https://github.com/9Code-Labs/rovecode-community/releases) and swap the file"};default:return{mode:"unknown",channel:D,commands:[],manual:"cannot tell how this copy was installed \u2014 update it the way you installed it (npm: `npm install -g rovecode@"+D+"`; source: `git pull && bun install`)"}}}async function M(A,z,D){let E=[];if(A.commands.length===0)return{ok:!1,detail:A.manual??"nothing to run",ran:E};let J=A.commands;if(A.mode==="npm"&&z.npmGlobal===void 0&&z.root&&D.npmGlobalPrefix){let H=(await D.npmGlobalPrefix())?.replace(/\\/g,"/").replace(/\/$/,"");if(H){let K=z.root.replace(/\\/g,"/").toLowerCase().startsWith((H+"/node_modules/").toLowerCase()),Q=A.commands[0][A.commands[0].length-1];J=K?[["npm","install","-g",Q]]:[["npm","install",Q]]}}for(let H of J){D.log?.(`$ ${H.join(" ")}`);let K;try{K=await D.spawn(H,A.cwd)}catch(Q){return{ok:!1,detail:`${H[0]} failed to start: ${Q instanceof Error?Q.message:String(Q)}`,ran:E}}if(E.push(H.join(" ")),K.code!==0)return{ok:!1,detail:`${H.join(" ")} exited ${K.code}: ${V(K.out)}`,ran:E}}return{ok:!0,detail:"updated \u2014 restart rovecode to run the new version",ran:E}}function V(A,z=400){let D=A.trim();return D.length>z?"\u2026"+D.slice(-z):D}var R=process.platform==="win32"?"npm.cmd":"npm";async function L(A,z){let D=A[0]==="npm"?[R,...A.slice(1)]:A,E=Bun.spawn(D,{cwd:z,stdout:"pipe",stderr:"pipe"}),[J,H]=await Promise.all([new Response(E.stdout).text(),new Response(E.stderr).text()]);return{code:await E.exited,out:J+H}}async function b(){try{let A=Bun.spawn([R,"prefix","-g"],{stdout:"pipe",stderr:"ignore"}),z=(await new Response(A.stdout).text()).trim();return await A.exited,z.length>0?z:void 0}catch{return}}async function j(A,z){let D=A.includes("--check"),E=A.includes("--channel")?A[A.indexOf("--channel")+1]:"auto";if(E!=="auto"&&E!=="beta"&&E!=="latest")return z.log("error: --channel must be beta, latest or auto"),2;let J=await P(z.version,D?{cacheOnly:!0}:{});if(D)return z.log(Z(J,!0)??`up to date (${z.version})`),0;if(!J.newer)return z.log(J.latest===void 0?`no newer release is known (${Z(J,!0)??`current: ${z.version}`})`:`up to date (${z.version})`),0;let H=z.deps?.install??$({entry:z.entry}),K=H.mode==="source"&&H.root!==void 0&&B(G(H.root,"dist","cli","main.js")),Q=q(H,{currentVersion:z.version,channel:E,distBuilt:K});if(z.log(`update available: ${z.version} \u2192 ${J.latest} \xB7 this copy is a ${H.mode} install \xB7 channel ${Q.channel} (${Y(z.version,E)} follows the running version)`),Q.commands.length===0)return z.log(Q.manual??"nothing to run"),1;let T=await M(Q,H,{spawn:z.deps?.spawn??L,npmGlobalPrefix:z.deps?.prefix??b,log:z.log});return z.log(T.ok?T.detail:`update failed: ${T.detail}`),T.ok?0:1}async function g(A,z,D){return j(A,{version:z,entry:D,log:(E)=>console.log(E)})}export{j as updateFlow,g as cmdUpdate};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Fj as a,Gj as b,Hj as c,Ij as d,Jj as e,Kj as f,Lj as g,Mj as h,Nj as i,Oj as j,Pj as k,Qj as l,Rj as m,Sj as n,Tj as o,Uj as p,Vj as q,Wj as r}from"./main-ywbxshqc.js";import"./main-qsevpgsv.js";r();export{l as welcomeCard,m as resumedLine,i as noModelHint,h as next,o as modeSwitchNote,f as modeMeaning,e as modeLabelShort,d as modeLabel,k as loadedLine,n as effortNote,p as acceptEditsNote,g as NEXT,b as MODE_AUTO,a as MODE_ASK,c as MODE_ACCEPT,j as MOCK_PROVIDER_TEXT,q as EMPTY};
2
+ import{dk as a,ek as b,fk as c,gk as d,hk as e,ik as f,jk as g,kk as h,lk as i,mk as j,nk as k,ok as l,pk as m,qk as n,rk as o,sk as p,tk as q,uk as r}from"./main-8kjxbpw4.js";import"./main-qsevpgsv.js";r();export{l as welcomeCard,m as resumedLine,i as noModelHint,h as next,o as modeSwitchNote,f as modeMeaning,e as modeLabelShort,d as modeLabel,k as loadedLine,n as effortNote,p as acceptEditsNote,g as NEXT,b as MODE_AUTO,a as MODE_ASK,c as MODE_ACCEPT,j as MOCK_PROVIDER_TEXT,q as EMPTY};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ge as a,He as b,Ie as c,Je as d,Ke as e,Le as f,Me as g,Ne as h,Oe as i,Pe as j,Qe as k,Re as l,Se as m,Te as n}from"./main-mg9b20ac.js";import"./main-qsevpgsv.js";export{n as webFetchTool,j as ssrfDenyReason,l as readBounded,g as isPrivateAddress,h as dnsResolver,m as createWebFetchTool,f as clampChars,i as canonicalHost,k as abortable,e as TIMEOUT_DEFAULT_MS,d as MAX_REDIRECTS,a as MAX_BYTES,b as CHARS_DEFAULT,c as CHARS_CAP};
2
+ import{Af as e,Bf as f,Cf as g,Df as h,Ef as i,Ff as j,Gf as k,Hf as l,If as m,Jf as n,wf as a,xf as b,yf as c,zf as d}from"./main-skbp13js.js";import"./main-qsevpgsv.js";export{n as webFetchTool,j as ssrfDenyReason,l as readBounded,g as isPrivateAddress,h as dnsResolver,m as createWebFetchTool,f as clampChars,i as canonicalHost,k as abortable,e as TIMEOUT_DEFAULT_MS,d as MAX_REDIRECTS,a as MAX_BYTES,b as CHARS_DEFAULT,c as CHARS_CAP};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$d as q,Ld as a,Md as b,Nd as c,Od as d,Pd as e,Qd as f,Rd as g,Sd as h,Td as i,Ud as j,Vd as k,Wd as l,Xd as m,Yd as n,Zd as o,_d as p,ae as r}from"./main-yrjt2sqt.js";import"./main-mg9b20ac.js";import"./main-ys6zj3yr.js";import"./main-qsevpgsv.js";export{r as webSearchTool,o as parseResultsText,m as parseMcpBody,n as parseExaContext,p as formatResults,q as createWebSearchTool,l as clampResults,g as URL_CHARS,f as TITLE_CHARS,k as TIMEOUT_DEFAULT_MS,e as SNIPPET_CHARS,b as RESULTS_DEFAULT,c as RESULTS_CAP,d as QUERY_CHARS,h as OUTPUT_CHARS_CAP,j as MAX_REDIRECTS,i as MAX_BYTES,a as ENDPOINT};
2
+ import{Ae as n,Be as o,Ce as p,De as q,Ee as r,ne as a,oe as b,pe as c,qe as d,re as e,se as f,te as g,ue as h,ve as i,we as j,xe as k,ye as l,ze as m}from"./main-6b62vkz0.js";import"./main-skbp13js.js";import"./main-0z1w2zsg.js";import"./main-qsevpgsv.js";export{r as webSearchTool,o as parseResultsText,m as parseMcpBody,n as parseExaContext,p as formatResults,q as createWebSearchTool,l as clampResults,g as URL_CHARS,f as TITLE_CHARS,k as TIMEOUT_DEFAULT_MS,e as SNIPPET_CHARS,b as RESULTS_DEFAULT,c as RESULTS_CAP,d as QUERY_CHARS,h as OUTPUT_CHARS_CAP,j as MAX_REDIRECTS,i as MAX_BYTES,a as ENDPOINT};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{ya as I}from"./main-4xcmvxnk.js";import"./main-sdmxhtv8.js";import"./main-8kjxbpw4.js";import"./main-2yeveeve.js";import"./main-0jys2ccn.js";import{xn as u}from"./main-qsevpgsv.js";import{join as c,resolve as d}from"path";import{appendFileSync as x,existsSync as F,mkdirSync as k,readFileSync as h,readdirSync as f}from"fs";import{join as v}from"path";function W(B){if(!B.name||typeof B.name!=="string")throw Error("workflow needs a name");let Q=Object.keys(B.steps??{});if(Q.length===0)throw Error("workflow needs at least one step");for(let[N,Y]of Object.entries(B.steps)){if(Y.kind!=="agent"&&Y.kind!=="gate")throw Error(`step '${N}': kind must be "agent" | "gate"`);if(Y.kind==="agent"&&(typeof Y.goal!=="string"||Y.goal.trim()===""))throw Error(`step '${N}': agent step needs a goal`);for(let Z of Y.after??[]){if(!(Z in B.steps))throw Error(`step '${N}': unknown dependency '${Z}'`);if(Z===N)throw Error(`step '${N}': cannot depend on itself`)}}let H=new Map,M=(N,Y)=>{let Z=H.get(N)??0;if(Z===2)return;if(Z===1)throw Error(`workflow has a cycle: ${[...Y,N].join(" \u2192 ")}`);H.set(N,1);for(let _ of B.steps[N].after??[])M(_,[...Y,N]);H.set(N,2)};for(let N of Q)M(N,[]);return B}function l(B,Q){return v(B,`${Q}.jsonl`)}function S(B){let Q=new Map;if(!F(B))return Q;for(let H of h(B,"utf8").split(`
3
+ `)){if(H.trim()==="")continue;try{let M=JSON.parse(H);if(M.type==="step"&&M.status==="done")Q.set(M.step,M.summary??"")}catch{}}return Q}async function y(B,Q,H={}){W(B);let M=H.runId??`wf-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,6)}`,N=H.dir??v(process.cwd(),".rovecode","workflows");k(N,{recursive:!0});let Y=l(N,M),Z=S(Y),_=(z)=>{H.emit?.(z)},b=Math.max(1,H.maxConcurrency??3),E=Math.max(1,B.retry?.maxAttempts??1),P=B.budget?.maxTokens,$=new Map(Object.entries(B.steps)),X={},J=new Set,O=new Set,T=new Set,j={input:0,output:0},R=0;for(let[z,G]of Z)J.add(z),X[z]={status:"done",summary:G,attempts:0};_({type:"workflow_started",runId:M,name:B.name,steps:$.size});let q=(z)=>(z.after??[]).every((G)=>J.has(G)),K=(z)=>(z.after??[]).some((G)=>O.has(G)),L=(z)=>{try{x(Y,JSON.stringify(z)+`
4
+ `)}catch{}},w=async(z,G)=>{T.add(z);try{if(G.kind==="gate"){if(_({type:"gate_waiting",runId:M,step:z,prompt:G.prompt}),H.signal?.aborted?!1:await Q.askGate(G.prompt))J.add(z),X[z]={status:"done",summary:"approved",attempts:1},L({v:1,type:"step",step:z,status:"done",summary:"approved"}),_({type:"step_done",runId:M,step:z,summary:"approved"});else O.add(z),X[z]={status:"failed",error:"gate rejected",attempts:1},_({type:"step_failed",runId:M,step:z,error:"gate rejected",attempt:1});return}let U=0,A="unknown";while(U<E){if(U++,H.signal?.aborted){Q.cancelAgent?.(z),O.add(z),X[z]={status:"failed",error:"cancelled",attempts:U};return}_({type:"step_started",runId:M,step:z,attempt:U});let V=await Q.runAgent({...G,name:z});if(V.usage)j.input+=V.usage.input,j.output+=V.usage.output,R+=V.usage.input+V.usage.output;if(V.ok){J.add(z),X[z]={status:"done",summary:V.summary,attempts:U},L({v:1,type:"step",step:z,status:"done",summary:V.summary}),_({type:"step_done",runId:M,step:z,summary:V.summary});return}A=V.summary,_({type:"step_failed",runId:M,step:z,error:V.summary,attempt:U})}O.add(z),X[z]={status:"failed",error:A,attempts:U},L({v:1,type:"step",step:z,status:"failed",error:A})}finally{T.delete(z)}},C=new Set,D="done";for(;;){if(H.signal?.aborted)D="cancelled";if(P!==void 0&&R>=P)D="budget";let z=D!=="done",G=!1;if(!z&&O.size===0)for(let[U,A]of $){if(J.has(U)||O.has(U)||T.has(U)||X[U]!==void 0)continue;if(!q(A))continue;if(T.size>=b)break;let V=w(U,A);C.add(V),V.finally(()=>C.delete(V)),G=!0}if(O.size>0){for(let[U,A]of $)if(X[U]===void 0&&!T.has(U)&&(K(A)||!q(A))){if((A.after??[]).length>0)X[U]={status:"skipped",error:"upstream failed",attempts:0}}}if(C.size===0){if(!G)break}else await Promise.race(C)}for(let[z]of $)if(X[z]===void 0)X[z]={status:"skipped",error:D==="done"?"dependency failed":D,attempts:0};if(O.size>0&&D==="done")D="failed";return _({type:"workflow_done",runId:M,status:D}),{runId:M,status:D,steps:X,usage:j}}function g(B){if(!F(B))return[];let Q=[];try{Q=f(B)}catch{return[]}return Q.filter((H)=>H.endsWith(".jsonl")).map((H)=>({runId:H.slice(0,-6),done:[...S(v(B,H)).keys()]})).sort((H,M)=>H.runId.localeCompare(M.runId))}async function n(B){let[Q,...H]=B,M=process.cwd(),N=c(M,".rovecode","workflows");if(Q==="list"){let q=g(N);if(process.argv.includes("--json"))return console.log(JSON.stringify({runs:q},null,2)),0;if(q.length===0)return console.log(`no workflow runs in ${N}`),0;for(let K of q)console.log(`${K.runId} done: ${K.done.length>0?K.done.join(", "):"(none)"}`);return 0}if(Q!=="run"||H[0]===void 0)return console.error("usage: rovecode workflow run <file.ts> [--resume <runId>] [--json] | rovecode workflow list"),2;let Y=d(M,H[0]),Z;try{let q=await import(Y);if(!q.default)throw Error("the file must `export default defineWorkflow({\u2026})`");Z=W(q.default)}catch(q){return console.error(`error: ${q instanceof Error?q.message:String(q)}`),2}let _=process.argv.indexOf("--resume"),b=_!==-1?process.argv[_+1]:void 0,E=process.argv.includes("--json"),{bootRuntime:P}=await import("./runtime-n7gafzhb.js"),$=await P(),X=async(q)=>{return $.tasks.cancelAll(),await $.tasks.drain(2000),await $.hooks.close(),await $.mcp?.close().catch(()=>{}),process.exit(q)},J=$.noProviderReason();if(J!==null&&process.env.ROVECODE_MOCK!=="1")return console.error(`error: ${J}`),X(2);let O=process.stdin.isTTY===!0,R=await y(Z,{runAgent:async(q)=>{let K=$.tasks.start({agent:q.agent??"main",goal:q.goal},{label:`${Z.name}/${q.name}`});if(!K.ok)return{ok:!1,summary:K.reason};let L=await $.tasks.result(K.id);if(!L)return{ok:!1,summary:"task vanished"};return{ok:L.status==="done",summary:L.summary??L.error??L.status,...L.usage!==void 0?{usage:L.usage}:{}}},askGate:async(q)=>{if(!O)return console.error(`gate '${q}': no TTY \u2014 rejected (run workflows with gates interactively)`),!1;let K=(await I(`gate [${Z.name}]: ${q} [y/N] `)).trim().toLowerCase();return K==="y"||K==="yes"},cancelAgent:()=>{$.tasks.cancelAll()}},{dir:N,emit:(q)=>{if(E){console.log(JSON.stringify(q));return}if(q.type==="workflow_started")console.log(`workflow ${q.name} (${q.runId}) \u2014 ${q.steps} steps`);else if(q.type==="step_started")console.log(` \u25B8 ${q.step} (attempt ${q.attempt})`);else if(q.type==="step_done")console.log(` \u2713 ${q.step} \u2014 ${String(q.summary??"").slice(0,120)}`);else if(q.type==="step_failed")console.error(` \u2717 ${q.step} \u2014 ${String(q.error??"").slice(0,120)}`);else if(q.type==="gate_waiting");else if(q.type==="workflow_done")console.log(`workflow ${q.status} (${q.runId})`)},...b!==void 0?{runId:b}:{}});if(E)console.log(JSON.stringify({runId:R.runId,status:R.status,steps:R.steps,usage:R.usage},null,2));return X(R.status==="done"?0:1)}export{n as cmdWorkflow};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Al as i,Bl as j,Cl as k,Dl as l,sl as a,tl as b,ul as c,vl as d,wl as e,xl as f,yl as g,zl as h}from"./main-a3f51n0x.js";import"./main-qsevpgsv.js";l();export{c as toolPath,h as rootProblem,j as resolveRoots,e as outsideWorkspace,g as outsidePrompt,d as isInside,f as externalResource,b as canonical,k as WorkspaceRoots,i as WorkspaceRootError,a as EXTERNAL_ACTION};
2
+ import{$l as j,Sl as a,Tl as b,Ul as c,Vl as d,Wl as e,Xl as f,Yl as g,Zl as h,_l as i,am as k,bm as l}from"./main-0904f6ps.js";import"./main-qsevpgsv.js";l();export{c as toolPath,h as rootProblem,j as resolveRoots,e as outsideWorkspace,g as outsidePrompt,d as isInside,f as externalResource,b as canonical,k as WorkspaceRoots,i as WorkspaceRootError,a as EXTERNAL_ACTION};