@sma1lboy/rove 0.9.310-nightly.20261128 → 0.9.310

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 (250) hide show
  1. package/dist/cli/{chunk-rrtbrnsm.js → chunk-06cpc990.js} +1 -1
  2. package/dist/cli/chunk-0ccgkp9z.js +2 -0
  3. package/dist/cli/{chunk-qjq62kcb.js → chunk-0mdzphdz.js} +1 -1
  4. package/dist/cli/chunk-0rfd9c8r.js +9 -0
  5. package/dist/cli/{chunk-n7wa2g9g.js → chunk-0rfkgmns.js} +1 -1
  6. package/dist/cli/{chunk-0gdrrkeb.js → chunk-0x3vfkz9.js} +1 -1
  7. package/dist/cli/chunk-0xn13zhr.js +2 -0
  8. package/dist/cli/{chunk-aw9y2ecv.js → chunk-11vgtrm4.js} +1 -1
  9. package/dist/cli/{chunk-7akh6mpq.js → chunk-12qq8r81.js} +1 -1
  10. package/dist/cli/chunk-140pf8yx.js +77 -0
  11. package/dist/cli/chunk-152tg65q.js +2 -0
  12. package/dist/cli/chunk-17b3wpdk.js +2 -0
  13. package/dist/cli/chunk-1thazzyj.js +2 -0
  14. package/dist/cli/chunk-1wpwxcg9.js +3 -0
  15. package/dist/cli/chunk-22knrp3g.js +2 -0
  16. package/dist/cli/{chunk-xpf5znba.js → chunk-29ftjs96.js} +1 -1
  17. package/dist/cli/{chunk-v73jr6d3.js → chunk-2vk65d66.js} +1 -1
  18. package/dist/cli/{chunk-0pd79pqm.js → chunk-361acgxq.js} +1 -1
  19. package/dist/cli/{chunk-7qqg543d.js → chunk-36qsn2v8.js} +1 -1
  20. package/dist/cli/{chunk-8vhda57t.js → chunk-39txvrcs.js} +1 -1
  21. package/dist/cli/{chunk-ndjs6pfx.js → chunk-3d6caevx.js} +1 -1
  22. package/dist/cli/chunk-3fzrgjxr.js +13 -0
  23. package/dist/cli/{chunk-vr3hz387.js → chunk-3kraw5fh.js} +1 -1
  24. package/dist/cli/chunk-3vhhs2ye.js +2 -0
  25. package/dist/cli/chunk-3wkjeqt5.js +19 -0
  26. package/dist/cli/{chunk-th94kgx8.js → chunk-3yd8nyv6.js} +2 -2
  27. package/dist/cli/chunk-451z1265.js +19 -0
  28. package/dist/cli/chunk-4csg29es.js +3 -0
  29. package/dist/cli/chunk-4g1466qe.js +2 -0
  30. package/dist/cli/{chunk-d527kp0a.js → chunk-4y536nwm.js} +1 -1
  31. package/dist/cli/chunk-599msv9a.js +2 -0
  32. package/dist/cli/{chunk-94v7fkbx.js → chunk-5jevazzh.js} +2 -2
  33. package/dist/cli/chunk-5p2hhjje.js +3 -0
  34. package/dist/cli/{chunk-e5rhtk39.js → chunk-5sb5cgsx.js} +1 -1
  35. package/dist/cli/{chunk-7za2saew.js → chunk-65nm1v5h.js} +1 -1
  36. package/dist/cli/{chunk-bccq9wmd.js → chunk-69cqwz53.js} +1 -1
  37. package/dist/cli/{chunk-t0m58ycm.js → chunk-6f6b9zxx.js} +1 -1
  38. package/dist/cli/{chunk-f3bfy4jj.js → chunk-6qp32yje.js} +1 -1
  39. package/dist/cli/{chunk-zren8xsj.js → chunk-6t1yxx9x.js} +1 -1
  40. package/dist/cli/{chunk-nsscv6nb.js → chunk-76snhsy7.js} +1 -1
  41. package/dist/cli/{chunk-9avew3w0.js → chunk-7709m234.js} +1 -1
  42. package/dist/cli/{chunk-br2ehnve.js → chunk-7fw390kp.js} +1 -1
  43. package/dist/cli/{chunk-9h9kbx1m.js → chunk-7vassnhs.js} +3 -3
  44. package/dist/cli/chunk-887ysmy5.js +2 -0
  45. package/dist/cli/{chunk-bp4wst6z.js → chunk-89xz7kc8.js} +1 -1
  46. package/dist/cli/chunk-8akyzrjc.js +2 -0
  47. package/dist/cli/chunk-8byrmc70.js +3 -0
  48. package/dist/cli/{chunk-ys6md651.js → chunk-8ca4esh6.js} +1 -1
  49. package/dist/cli/{chunk-vf138rbf.js → chunk-8y9de8mg.js} +2 -2
  50. package/dist/cli/chunk-96wm6gt4.js +7 -0
  51. package/dist/cli/{chunk-2d0yz3mg.js → chunk-97fhq6zk.js} +1 -1
  52. package/dist/cli/chunk-9qye1syf.js +3 -0
  53. package/dist/cli/{chunk-e6wjt3e2.js → chunk-a2m6sk0n.js} +1 -1
  54. package/dist/cli/chunk-a2rxzyy4.js +2 -0
  55. package/dist/cli/chunk-asnjgz5a.js +4 -0
  56. package/dist/cli/chunk-aterhn60.js +3 -0
  57. package/dist/cli/chunk-ay3c35g5.js +2 -0
  58. package/dist/cli/{chunk-1kf56h0r.js → chunk-b3nrywgm.js} +1 -1
  59. package/dist/cli/{chunk-fg8d4z6c.js → chunk-bche07fb.js} +1 -1
  60. package/dist/cli/{chunk-5nwcwk6x.js → chunk-bsprr76b.js} +1 -1
  61. package/dist/cli/{chunk-jpc5yh8e.js → chunk-bwgtbaex.js} +1 -1
  62. package/dist/cli/chunk-bxabhkaq.js +21 -0
  63. package/dist/cli/{chunk-se483mcw.js → chunk-bz3p5vp1.js} +3 -3
  64. package/dist/cli/chunk-bzqjk9fb.js +3 -0
  65. package/dist/cli/chunk-c4c03wnz.js +3 -0
  66. package/dist/cli/{chunk-kqb8dd6n.js → chunk-cjzyc7cn.js} +12 -10
  67. package/dist/cli/{chunk-b550dwkd.js → chunk-cq4fym60.js} +1 -1
  68. package/dist/cli/{chunk-6d49rhme.js → chunk-cqazrkzw.js} +1 -1
  69. package/dist/cli/{chunk-vnp1k7ek.js → chunk-d3sgpjj6.js} +1 -1
  70. package/dist/cli/{chunk-rzem07e4.js → chunk-d5gtdecq.js} +1 -1
  71. package/dist/cli/chunk-de89aagk.js +6 -0
  72. package/dist/cli/chunk-ecdnw5xe.js +70 -0
  73. package/dist/cli/{chunk-sgnm8v1a.js → chunk-ehssspvr.js} +1 -1
  74. package/dist/cli/{chunk-ytrktnmv.js → chunk-emzt8crt.js} +1 -1
  75. package/dist/cli/{chunk-pnv7anct.js → chunk-ene2k7kb.js} +1 -1
  76. package/dist/cli/{chunk-a5p8fvpv.js → chunk-ep7abg35.js} +1 -1
  77. package/dist/cli/{chunk-7h5xfs5r.js → chunk-etj5h8hg.js} +2 -2
  78. package/dist/cli/chunk-ex2qtjt3.js +3 -0
  79. package/dist/cli/chunk-expgczbc.js +2 -0
  80. package/dist/cli/{chunk-9bq5e4fm.js → chunk-ez623zqp.js} +1 -1
  81. package/dist/cli/chunk-fads90r0.js +2 -0
  82. package/dist/cli/chunk-fdajxdht.js +2 -0
  83. package/dist/cli/{chunk-rbfah7j1.js → chunk-fwrpg1q9.js} +1 -1
  84. package/dist/cli/{chunk-mq9ng0qf.js → chunk-fyxfgkrw.js} +1 -1
  85. package/dist/cli/{chunk-b8xsf17w.js → chunk-fzc40zx7.js} +1 -1
  86. package/dist/cli/{chunk-s2wr6rc2.js → chunk-fzkq16qb.js} +1 -1
  87. package/dist/cli/chunk-g9qssqb7.js +2 -0
  88. package/dist/cli/{chunk-ekp98v7y.js → chunk-gf37e6ty.js} +1 -1
  89. package/dist/cli/chunk-gfsgk1n8.js +2 -0
  90. package/dist/cli/{chunk-8gy5m5s9.js → chunk-gvxchzch.js} +2 -2
  91. package/dist/cli/chunk-gxwy1r9a.js +382 -0
  92. package/dist/cli/{chunk-0ceg9qrt.js → chunk-hedp76tw.js} +1 -1
  93. package/dist/cli/{chunk-xttwk07t.js → chunk-hvz45y6d.js} +1 -1
  94. package/dist/cli/chunk-hwckecfa.js +2 -0
  95. package/dist/cli/{chunk-r987rn4r.js → chunk-j0s13v56.js} +1 -1
  96. package/dist/cli/chunk-j25b1ggg.js +2 -0
  97. package/dist/cli/{chunk-mapwzp5d.js → chunk-j6g8jmke.js} +2 -2
  98. package/dist/cli/chunk-j8r8q5z8.js +8 -0
  99. package/dist/cli/chunk-jgkjfqm9.js +4 -0
  100. package/dist/cli/{chunk-fexbzt63.js → chunk-jpa26n83.js} +1 -1
  101. package/dist/cli/chunk-jx3zndsh.js +2 -0
  102. package/dist/cli/chunk-jykxdtad.js +3 -0
  103. package/dist/cli/{chunk-73a9kk03.js → chunk-jyrmdx8f.js} +1 -1
  104. package/dist/cli/{chunk-fkz86c53.js → chunk-k1pk159f.js} +1 -1
  105. package/dist/cli/{chunk-4q5gbyhd.js → chunk-kmfas00z.js} +1 -1
  106. package/dist/cli/{chunk-szdzakrk.js → chunk-kpq28cbh.js} +1 -1
  107. package/dist/cli/chunk-kzcd7vdj.js +189 -0
  108. package/dist/cli/chunk-m0kprsxc.js +2 -0
  109. package/dist/cli/chunk-m932h3dx.js +30 -0
  110. package/dist/cli/{chunk-r5c51qqp.js → chunk-mp535p99.js} +1 -1
  111. package/dist/cli/chunk-mpmsc9s5.js +2 -0
  112. package/dist/cli/{chunk-dmb3y33d.js → chunk-n9d40jze.js} +1 -1
  113. package/dist/cli/{chunk-0b9dhq9b.js → chunk-navavqt2.js} +1 -1
  114. package/dist/cli/chunk-nf7pks44.js +2 -0
  115. package/dist/cli/chunk-pgaf0wqj.js +2 -0
  116. package/dist/cli/chunk-pp771snb.js +3 -0
  117. package/dist/cli/{chunk-3k56eqyb.js → chunk-pw0fvd64.js} +2 -2
  118. package/dist/cli/{chunk-55h581rc.js → chunk-qbmdpbdg.js} +1 -1
  119. package/dist/cli/chunk-qe7m3bwf.js +2 -0
  120. package/dist/cli/{chunk-6x4h80aw.js → chunk-qsfc7q9h.js} +1 -1
  121. package/dist/cli/chunk-r9n3asjx.js +2 -0
  122. package/dist/cli/{chunk-7v2m50tf.js → chunk-rr97z89e.js} +1 -1
  123. package/dist/cli/{chunk-sae6zcnq.js → chunk-rt4bsvd5.js} +1 -1
  124. package/dist/cli/chunk-sd3e5htq.js +2 -0
  125. package/dist/cli/{chunk-rzskspr8.js → chunk-spr6z826.js} +1 -1
  126. package/dist/cli/{chunk-jmx0vbra.js → chunk-t2f0xqyk.js} +2 -2
  127. package/dist/cli/chunk-t9vpmnbc.js +7 -0
  128. package/dist/cli/{chunk-mwnx6dk0.js → chunk-teq8p5rp.js} +4 -4
  129. package/dist/cli/{chunk-ebd4hnwk.js → chunk-tswzvtsy.js} +1 -1
  130. package/dist/cli/chunk-tzhfek18.js +34 -0
  131. package/dist/cli/{chunk-b4fqpvf8.js → chunk-v29v0cgd.js} +1 -1
  132. package/dist/cli/chunk-v2vs5nzx.js +2 -0
  133. package/dist/cli/{chunk-brk45qrp.js → chunk-v72qzktg.js} +1 -1
  134. package/dist/cli/chunk-vg3tyctk.js +2 -0
  135. package/dist/cli/chunk-vpy8tvfy.js +6 -0
  136. package/dist/cli/{chunk-eh7gh2nd.js → chunk-w3dpq6aj.js} +3 -3
  137. package/dist/cli/chunk-w70anvs6.js +3 -0
  138. package/dist/cli/chunk-wcjpanrw.js +51 -0
  139. package/dist/cli/{chunk-ay4k354s.js → chunk-wjmte4f0.js} +1 -1
  140. package/dist/cli/chunk-wth84cjn.js +3 -0
  141. package/dist/cli/chunk-wx3pr38x.js +2 -0
  142. package/dist/cli/{chunk-zw0k97mj.js → chunk-xc2zndmb.js} +1 -1
  143. package/dist/cli/chunk-xff3eqbv.js +2 -0
  144. package/dist/cli/chunk-xq2tazj5.js +2 -0
  145. package/dist/cli/{chunk-wdsbprdp.js → chunk-y4bhq88n.js} +1 -1
  146. package/dist/cli/{chunk-a833bpk3.js → chunk-y6eqz5pa.js} +1 -1
  147. package/dist/cli/{chunk-mm9rcced.js → chunk-ydxq51g3.js} +1 -1
  148. package/dist/cli/{chunk-nkgfr338.js → chunk-yg74j7kp.js} +1 -1
  149. package/dist/cli/{chunk-gpsj28xq.js → chunk-ygdxgp8r.js} +1 -1
  150. package/dist/cli/{chunk-h9hve3q0.js → chunk-ymmzwv5w.js} +2 -2
  151. package/dist/cli/{chunk-g883a7np.js → chunk-yn7y3epg.js} +1 -1
  152. package/dist/cli/chunk-ynwk3ep3.js +2 -0
  153. package/dist/cli/chunk-ypbh8ra4.js +8 -0
  154. package/dist/cli/{chunk-243dk7qd.js → chunk-z343ngx6.js} +1 -1
  155. package/dist/cli/{chunk-tdxr7vsr.js → chunk-z3cje8hk.js} +1 -1
  156. package/dist/cli/{chunk-q11wjx9d.js → chunk-z4nk2g47.js} +1 -1
  157. package/dist/cli/{chunk-18jk12bw.js → chunk-z6k53zqj.js} +1 -1
  158. package/dist/cli/chunk-z7dzpnyt.js +2 -0
  159. package/dist/cli/{chunk-h3fhg0k6.js → chunk-z98zs1h3.js} +2 -2
  160. package/dist/cli/chunk-z9c475xb.js +1 -0
  161. package/dist/cli/chunk-zg76y0bt.js +2 -0
  162. package/dist/cli/{chunk-sxpb2rv2.js → chunk-zgmnse5q.js} +1 -1
  163. package/dist/cli/chunk-zknvzer3.js +3 -0
  164. package/dist/cli/{chunk-1tqdxper.js → chunk-zpwg3eh0.js} +1 -1
  165. package/dist/cli/{chunk-e62x3fgv.js → chunk-zswn8skz.js} +1 -1
  166. package/dist/cli/index.js +7 -7
  167. package/dist/cli/pty-host-node.mjs +1 -1
  168. package/dist/cli/rove-run.js +1 -1
  169. package/dist/cli/rove.js +5 -5
  170. package/dist/completions/rove.bash +5 -3
  171. package/dist/completions/rove.fish +6 -2
  172. package/dist/completions/rove.zsh +5 -3
  173. package/dist/skills/rove/SKILL.md +21 -1
  174. package/dist/skills/rove/references/api-flags.md +21 -7
  175. package/dist/web/assets/index-BWayUsdy.css +1 -0
  176. package/dist/web/assets/index-D7OcIn1Q.js +113 -0
  177. package/dist/web/assets/term-mount-CSGanVNa.js +94 -0
  178. package/dist/web/index.html +2 -2
  179. package/dist/web/relay/index.html +12 -12
  180. package/dist/web/relay-client/assets/index-B307rVpU.js +264 -0
  181. package/dist/web/relay-client/assets/index-T6nIyGrP.css +1 -0
  182. package/dist/web/relay-client/index.html +2 -2
  183. package/package.json +7 -7
  184. package/dist/cli/chunk-0ft14bvv.js +0 -2
  185. package/dist/cli/chunk-0fymskqv.js +0 -2
  186. package/dist/cli/chunk-0x5c0fps.js +0 -2
  187. package/dist/cli/chunk-1z684jqw.js +0 -7
  188. package/dist/cli/chunk-22zaracj.js +0 -2
  189. package/dist/cli/chunk-35bm2hhp.js +0 -3
  190. package/dist/cli/chunk-43z1kjw1.js +0 -34
  191. package/dist/cli/chunk-452h1mje.js +0 -4
  192. package/dist/cli/chunk-4bje4rs5.js +0 -2
  193. package/dist/cli/chunk-4nwydt5r.js +0 -70
  194. package/dist/cli/chunk-5fn27ykb.js +0 -3
  195. package/dist/cli/chunk-686h761b.js +0 -2
  196. package/dist/cli/chunk-6ev3tb6p.js +0 -2
  197. package/dist/cli/chunk-6rpzvsp9.js +0 -2
  198. package/dist/cli/chunk-6rtxkaq4.js +0 -62
  199. package/dist/cli/chunk-7q0tgnka.js +0 -2
  200. package/dist/cli/chunk-7xzsssdb.js +0 -2
  201. package/dist/cli/chunk-7yx30m9p.js +0 -2
  202. package/dist/cli/chunk-88c4frwd.js +0 -2
  203. package/dist/cli/chunk-8jp0h0cb.js +0 -3
  204. package/dist/cli/chunk-9hkf3fxt.js +0 -2
  205. package/dist/cli/chunk-9tfh7fm8.js +0 -2
  206. package/dist/cli/chunk-a1cdvvjj.js +0 -3
  207. package/dist/cli/chunk-b926z6ts.js +0 -3
  208. package/dist/cli/chunk-c9c6yczz.js +0 -3
  209. package/dist/cli/chunk-cq5bvzpw.js +0 -2
  210. package/dist/cli/chunk-dsqcwtw5.js +0 -5
  211. package/dist/cli/chunk-e3d8k6yn.js +0 -173
  212. package/dist/cli/chunk-ea6nmvhb.js +0 -6
  213. package/dist/cli/chunk-en31v4c6.js +0 -2
  214. package/dist/cli/chunk-ex4q79hw.js +0 -4
  215. package/dist/cli/chunk-f7h3mzk0.js +0 -3
  216. package/dist/cli/chunk-feq3nytk.js +0 -3
  217. package/dist/cli/chunk-g2brwxbt.js +0 -2
  218. package/dist/cli/chunk-g6wzch69.js +0 -162
  219. package/dist/cli/chunk-gpdrhahv.js +0 -2
  220. package/dist/cli/chunk-h0yvntcq.js +0 -3
  221. package/dist/cli/chunk-hy1pkmfa.js +0 -2
  222. package/dist/cli/chunk-jrrq9k1b.js +0 -212
  223. package/dist/cli/chunk-khfwvz0g.js +0 -2
  224. package/dist/cli/chunk-kknejavp.js +0 -2
  225. package/dist/cli/chunk-m00ftggk.js +0 -11
  226. package/dist/cli/chunk-mktg22yf.js +0 -13
  227. package/dist/cli/chunk-mxr7n23g.js +0 -2
  228. package/dist/cli/chunk-nr7gk1r6.js +0 -2
  229. package/dist/cli/chunk-p90ne1pc.js +0 -4
  230. package/dist/cli/chunk-pmfkzjj4.js +0 -2
  231. package/dist/cli/chunk-qwkgksrt.js +0 -2
  232. package/dist/cli/chunk-r1zy756y.js +0 -2
  233. package/dist/cli/chunk-rf82fyrx.js +0 -2
  234. package/dist/cli/chunk-rv0c3aje.js +0 -2
  235. package/dist/cli/chunk-s0y3qw79.js +0 -2
  236. package/dist/cli/chunk-tm6vvy5t.js +0 -3
  237. package/dist/cli/chunk-tsyz1xr8.js +0 -2
  238. package/dist/cli/chunk-vfc9k4b9.js +0 -5
  239. package/dist/cli/chunk-wgyhtgeq.js +0 -2
  240. package/dist/cli/chunk-yecvqy0c.js +0 -2
  241. package/dist/cli/chunk-yz9erpjc.js +0 -2
  242. package/dist/cli/chunk-zhjd9pvc.js +0 -2
  243. package/dist/cli/chunk-zmk4q05h.js +0 -2
  244. package/dist/cli/chunk-zwbnsf1p.js +0 -8
  245. package/dist/cli/chunk-zy7m8fm9.js +0 -2
  246. package/dist/web/assets/index-BJEFhpXi.css +0 -1
  247. package/dist/web/assets/index-D7VnKpGY.js +0 -100
  248. package/dist/web/assets/term-mount-DBU4rcMr.js +0 -94
  249. package/dist/web/relay-client/assets/index-D9PRsWzW.js +0 -251
  250. package/dist/web/relay-client/assets/index-Dk042dEU.css +0 -1
@@ -1,6 +0,0 @@
1
- // @bun
2
- import{DAEMON_CHANNELS}from"./chunk-96kvwzj8.js";import{logClientError}from"./chunk-d527kp0a.js";import{samePath}from"./chunk-pn5ygqn6.js";import{preRenameRuntimePaths}from"./chunk-g6wb8p4p.js";import{readRoveEnv}from"./chunk-nc46gddg.js";import{connect}from"net";import{StringDecoder}from"string_decoder";function automationRunNeedsAttention(status){return status==="dispatch_failed"||status==="skipped_unavailable"||status==="script_failed"}var ROUTINE_RESPONSE_MAX_CHARS=32000,ROUTINE_RESPONSE_WINDOW_MS=7200000;function routineRunResponseState(run,nowMs){if(run.response)return"responded";if(run.status!=="dispatched"&&run.status!=="revived")return null;if(run.deliveryStatus==="quiet")return null;if(run.deliveryStatus==="missing")return"missing";if(run.deliveryStatus==="awaiting")return"awaiting";return nowMs-Date.parse(run.at)>ROUTINE_RESPONSE_WINDOW_MS?"missing":"awaiting"}var GATE_QUESTION_MAX=500,GATE_CONTEXT_MAX=4000,GATE_OPTIONS_MAX=6;function gateInboxKey(gateId){return`\x00gate\x00${gateId}`}var ATTENTION_INBOX_STATES=["turn_complete","permission_needed","error","rate_limited","dead","restored","routine_failed","report_missing","decision_needed"];function isRoutineInboxState(state){return state==="routine_failed"}function isAttentionInboxState(value){return typeof value==="string"&&ATTENTION_INBOX_STATES.includes(value)}function attentionInboxItemKey(item){if(isRoutineInboxState(item.state)&&item.detail?.routine)return`\x00${item.state}\x00${item.detail.routine.automationId}`;if(item.state==="report_missing"&&item.detail?.delivery)return`\x00delivery\x00${item.detail.delivery.id}`;if(item.state==="decision_needed"&&item.detail?.gate)return gateInboxKey(item.detail.gate.id);return`${item.taskId}\x00${item.tabId??""}`}var DELIVERY_OUTCOMES=["done","partial","blocked","failed"],DELIVERY_SUMMARY_MAX_CHARS=32000,DELIVERY_EVIDENCE_MAX_ITEMS=50,DELIVERY_EVIDENCE_MAX_CHARS=2000,DELIVERY_NEXT_MAX_CHARS=4000,DELIVERY_PROMPT_HEAD_CHARS=200,MAX_DELIVERIES_PER_TASK=50,DELIVERY_STALL_MS=600000;function deliveryFooter(deliveryId,api){return`[ROVE] When this turn ends, report: ${api} report --delivery ${deliveryId} --outcome done|partial|blocked|failed --summary \u2026 [--evidence \u2026]\u2026 [--next \u2026]`}var SKIP_REASONS=["task-missing","awaiting-owner","report-missing","quota","engine-error","engine-dead","awaiting-permission","busy"],SHOULD_RUN_SKIP_EXIT_CODE=3;function parseSkipVerdict(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let raw=value;if(raw.run!==!1||!SKIP_REASONS.includes(raw.reason))return;let text=(v)=>typeof v==="string"&&v.length>0?v:void 0;return{run:!1,reason:raw.reason,...text(raw.detail)?{detail:raw.detail}:{},...text(raw.until)?{until:raw.until}:{},...Array.isArray(raw.gateIds)?{gateIds:raw.gateIds.filter((g)=>typeof g==="string")}:{}}}var CHANNEL_NAMES=DAEMON_CHANNELS;var CHANNEL_NAME_SET=new Set(CHANNEL_NAMES);function isChannelName(value){return typeof value==="string"&&CHANNEL_NAME_SET.has(value)}function normalizeChannelFilter(value){if(!Array.isArray(value))return null;let set=new Set;for(let name of value)if(isChannelName(name))set.add(name);return set.size>0?set:null}var DAEMON_PROTOCOL_VERSION=5,MIN_COMPATIBLE_PROTOCOL_VERSION=2;function isProtocolCompatible(args){return args.remoteVersion>=args.localMin&&args.localVersion>=args.remoteMin}function isDaemonVersionStale(daemonVersion,clientVersion){if(!daemonVersion)return!1;return daemonVersion!==clientVersion}function isForeignDaemonHome(daemonHome,clientHome){if(!daemonHome)return!1;return!samePath(daemonHome,clientHome)}var BLOCKING_RPCS=new Set(["api.invoke","ui.prompt","task.land","workitem.start","automation.runNow","task.startScheduledNow","task.resumeQuota","pr.rerunFailedChecks","pr.reviewComments","task.ensureWorktree","task.spawn","project.ensure","task.moveToProject","worktree.discoverAdoptable","worktree.adopt","worktree.list","worktree.remove","task.checkpoint","task.rewind","task.exportBranch"]),PTY_STOP_REFUSED="PtyStopRefused";function frameToLine(frame){return`${JSON.stringify(frame)}
3
- `}class RpcTimeoutError extends Error{constructor(name,timeoutMs){super(`daemon rpc "${name}" timed out after ${timeoutMs}ms (daemon wedged?)`);this.name="RpcTimeoutError"}}function rpcTimeoutMs(){let raw=readRoveEnv("RPC_TIMEOUT_MS")?.trim();if(raw){let parsed=Number.parseInt(raw,10);if(Number.isFinite(parsed))return parsed}return 20000}class ConnectTimeoutError extends Error{constructor(socketPath,timeoutMs){super(`connecting to ${socketPath} timed out after ${timeoutMs}ms \u2014 nothing accepted the connection (daemon or PTY host not listening at that address)`);this.name="ConnectTimeoutError"}}function connectTimeoutMs(){let raw=readRoveEnv("CONNECT_TIMEOUT_MS")?.trim();if(raw){let parsed=Number.parseInt(raw,10);if(Number.isFinite(parsed))return parsed}return 5000}class RoveDaemonClient{socketPath;socket=null;buffer="";nextId=1;pending=new Map;handlers=new Map;lifecycleHandlers=new Map;connecting=null;disposed=!1;taskListInflight=null;constructor(socketPath){this.socketPath=socketPath}connect(){if(this.socket)return Promise.resolve();if(this.disposed)return Promise.reject(Error("daemon client disposed"));if(this.connecting)return this.connecting;let p=this.openSocketWithFallback();this.connecting=p;let cleanup=()=>{if(this.connecting===p)this.connecting=null};return p.then(cleanup,cleanup),p}get isDisposed(){return this.disposed}close(){this.disposed=!0,this.socket?.end(),this.socket=null,this.failPending()}forceDisconnect(){let socket=this.socket;if(!socket)return;this.socket=null,socket.destroy(),this.failPending()}failPending(){if(this.pending.size===0)return;let err=Error("daemon connection closed");for(let pending of this.pending.values()){if(pending.timer)clearTimeout(pending.timer);pending.reject(err)}this.pending.clear()}on(name,handler){let set=this.handlers.get(name);if(!set)set=new Set,this.handlers.set(name,set);return set.add(handler),()=>{if(set?.delete(handler),set?.size===0)this.handlers.delete(name)}}onChannel(channel,handler){return this.on(channel,(frame)=>handler(frame.payload))}subscribe(opts={}){let payload={};if(opts.channels)payload.channels=opts.channels;if(opts.role)payload.role=opts.role;if(opts.cellPixelSize)payload.cellPixelWidth=opts.cellPixelSize.width,payload.cellPixelHeight=opts.cellPixelSize.height;return this.request("subscribe",payload)}onLifecycle(name,handler){let set=this.lifecycleHandlers.get(name);if(!set)set=new Set,this.lifecycleHandlers.set(name,set);return set.add(handler),()=>{if(set?.delete(handler),set?.size===0)this.lifecycleHandlers.delete(name)}}request(name,payload){if(name!=="task.list")return this.taskListInflight=null,this.send(name,payload);if(!this.taskListInflight){let p=this.send(name,payload);this.taskListInflight=p;let clear=()=>{if(this.taskListInflight===p)this.taskListInflight=null};p.then(clear,clear)}return this.taskListInflight}async send(name,payload){await this.connect();let socket=this.socket;if(!socket)throw Error("daemon connection is not open");let id=String(this.nextId++),promise=new Promise((resolve,reject)=>{let entry={resolve:(value)=>resolve(value),reject},timeoutMs=rpcTimeoutMs();if(timeoutMs>0&&!BLOCKING_RPCS.has(name))entry.timer=setTimeout(()=>this.onRequestTimeout(id,name,timeoutMs),timeoutMs);this.pending.set(id,entry)});return socket.write(frameToLine({type:"request",id,name,payload})),promise}onRequestTimeout(id,name,timeoutMs){let pending=this.pending.get(id);if(!pending)return;this.pending.delete(id),pending.reject(new RpcTimeoutError(name,timeoutMs)),this.forceDisconnect(),this.emitLifecycle("close")}async openSocketWithFallback(){try{await this.openSocket(this.socketPath);return}catch(err){if(!(err instanceof Error)||!("code"in err)||!["ENOENT","ECONNREFUSED"].includes(String(err.code)))throw err;for(let path of preRenameRuntimePaths(this.socketPath)){if(this.disposed)throw err;try{await this.openSocket(path);return}catch{}}throw err}}openSocket(path){return new Promise((resolve,reject)=>{let socket=connect(path);this.socket=socket;let timeoutMs=connectTimeoutMs(),timer;if(timeoutMs>0)timer=setTimeout(()=>{if(socket.off("connect",onConnect),socket.off("error",onError),socket.destroy(),this.socket===socket)this.socket=null;reject(new ConnectTimeoutError(this.socketPath,timeoutMs))},timeoutMs);let onConnect=()=>{if(timer)clearTimeout(timer);socket.off("error",onError),socket.on("error",()=>socket.destroy()),resolve()},onError=(err)=>{if(timer)clearTimeout(timer);if(socket.off("connect",onConnect),this.socket===socket)this.socket=null;reject(err)};socket.once("connect",onConnect),socket.once("error",onError);let decoder=new StringDecoder("utf8");this.buffer="",socket.on("data",(chunk)=>this.onData(decoder.write(chunk))),socket.on("close",()=>this.onSocketClose(socket))})}onSocketClose(which){if(this.socket!==which)return;this.socket=null,this.failPending(),this.emitLifecycle("close")}emitLifecycle(name){for(let handler of this.lifecycleHandlers.get(name)??[])try{handler()}catch(err){console.error(`[rove] lifecycle handler for "${name}" threw:`,err)}}onData(chunk){this.buffer+=chunk;let nl=this.buffer.indexOf(`
4
- `);while(nl!==-1){let line=this.buffer.slice(0,nl);if(this.buffer=this.buffer.slice(nl+1),line.trim().length>0)this.onLine(line);nl=this.buffer.indexOf(`
5
- `)}}onLine(line){let frame;try{frame=JSON.parse(line)}catch(err){logClientError("client-frame",err);return}if(frame.type==="event"){this.emit(frame);return}if(frame.type!=="response")return;let pending=this.pending.get(frame.id);if(!pending)return;if(this.pending.delete(frame.id),pending.timer)clearTimeout(pending.timer);if(frame.error){let err=Error(frame.error.message);if(frame.error.name)err.name=frame.error.name;if(frame.error.data!==void 0)err.data=frame.error.data;pending.reject(err)}else pending.resolve(frame.payload)}emit(frame){for(let handler of this.handlers.get(frame.name)??[])try{handler(frame)}catch(err){logClientError("client-event",err)}for(let handler of this.handlers.get("*")??[])try{handler(frame)}catch(err){logClientError("client-event",err)}}}
6
- export{automationRunNeedsAttention,ROUTINE_RESPONSE_MAX_CHARS,routineRunResponseState,GATE_QUESTION_MAX,GATE_CONTEXT_MAX,GATE_OPTIONS_MAX,isRoutineInboxState,isAttentionInboxState,attentionInboxItemKey,DELIVERY_OUTCOMES,DELIVERY_SUMMARY_MAX_CHARS,DELIVERY_EVIDENCE_MAX_ITEMS,DELIVERY_EVIDENCE_MAX_CHARS,DELIVERY_NEXT_MAX_CHARS,DELIVERY_PROMPT_HEAD_CHARS,MAX_DELIVERIES_PER_TASK,DELIVERY_STALL_MS,deliveryFooter,SKIP_REASONS,SHOULD_RUN_SKIP_EXIT_CODE,parseSkipVerdict,CHANNEL_NAMES,normalizeChannelFilter,DAEMON_PROTOCOL_VERSION,MIN_COMPATIBLE_PROTOCOL_VERSION,isProtocolCompatible,isDaemonVersionStale,isForeignDaemonHome,PTY_STOP_REFUSED,frameToLine,RpcTimeoutError,ConnectTimeoutError,RoveDaemonClient};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{awaitEngineProcess,awaitPasteReady,deliverToHostedKey,ensureHostedEngine,ensureHostedSessionHost,findHostedEngineKey,hostedSessionFailureLine,hostedTaskKeys,isHostedTaskKey,killHostedSessions,listHostedSessions,listHostedSessionsOrNull,openHostedSessionHost,pastePromptWhenEngineUp,sessionArgvNamesEngine,writeHostedPrompt,writeHostedPromptIfLive}from"./chunk-3k56eqyb.js";import"./chunk-feq3nytk.js";import"./chunk-ebd4hnwk.js";import"./chunk-bccq9wmd.js";import"./chunk-mqfvzdpr.js";import"./chunk-szdzakrk.js";import"./chunk-hpay0ax8.js";import"./chunk-tteswdyf.js";import"./chunk-55h581rc.js";import"./chunk-rxqdw6s5.js";import"./chunk-tn9gtf18.js";import"./chunk-vnp1k7ek.js";import"./chunk-c9c6yczz.js";import"./chunk-gpsj28xq.js";import"./chunk-drhwacg1.js";import"./chunk-wrqv141p.js";import"./chunk-p90ne1pc.js";import"./chunk-e3d8k6yn.js";import"./chunk-jrrq9k1b.js";import"./chunk-7v2m50tf.js";import"./chunk-f60hmm20.js";import"./chunk-03ab55aq.js";import"./chunk-w7zv47mp.js";import"./chunk-ve196r2v.js";import"./chunk-nr7c9q0j.js";import"./chunk-r478tzjz.js";import"./chunk-0b9dhq9b.js";import"./chunk-rrtbrnsm.js";import"./chunk-zw0k97mj.js";import"./chunk-1tqdxper.js";import"./chunk-ea6nmvhb.js";import"./chunk-96kvwzj8.js";import"./chunk-etfh8f4z.js";import"./chunk-f7h3mzk0.js";import"./chunk-h8qg9v95.js";import"./chunk-78y80xe8.js";import"./chunk-0zs13rdq.js";import"./chunk-tm6vvy5t.js";import"./chunk-wx77yjhc.js";import"./chunk-7akh6mpq.js";import"./chunk-mktg22yf.js";import"./chunk-dsqcwtw5.js";import"./chunk-vfc9k4b9.js";import"./chunk-6hjt5an9.js";import"./chunk-ptyqj15s.js";import"./chunk-5fn27ykb.js";import"./chunk-7za2saew.js";import"./chunk-sckqk79z.js";import"./chunk-d527kp0a.js";import"./chunk-w2czjjxy.js";import"./chunk-8q0nmdh3.js";import"./chunk-pn5ygqn6.js";import"./chunk-a6z2ggxd.js";import"./chunk-8rxg12aj.js";import"./chunk-rzskspr8.js";import"./chunk-mm9rcced.js";import"./chunk-yt15y085.js";import"./chunk-8gy5m5s9.js";import"./chunk-pzbcbmm4.js";import"./chunk-4ctx6hst.js";import"./chunk-g6wb8p4p.js";import"./chunk-nc46gddg.js";import"./chunk-ksx55wt3.js";import"./chunk-91sykzqq.js";export{writeHostedPromptIfLive,writeHostedPrompt,sessionArgvNamesEngine,pastePromptWhenEngineUp,openHostedSessionHost,listHostedSessionsOrNull,listHostedSessions,killHostedSessions,isHostedTaskKey,hostedTaskKeys,hostedSessionFailureLine,findHostedEngineKey,ensureHostedSessionHost,ensureHostedEngine,deliverToHostedKey,awaitPasteReady,awaitEngineProcess};
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{normalizeHex}from"./chunk-vnp1k7ek.js";import{userThemesDir,validateTheme}from"./chunk-c9c6yczz.js";import{existsSync,mkdirSync,writeFileSync}from"fs";import{join}from"path";var ANSI_NAMES=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function color(raw){let value=(raw.trim().split(/\s+/)[0]??"").replace(/^["']|["']$/g,"");return normalizeHex(value.startsWith("#")?value:`#${value}`)}function normalizeKey(raw){return raw.trim().replace(/^.*[.*]/,"").replace(/[-_]/g,"").toLowerCase()}function splitLine(line){let trimmed=line.trim();if(trimmed===""||trimmed.startsWith("#")||trimmed.startsWith("!")||trimmed.startsWith(";"))return null;let m=/^([^\s=:]+)\s*(?:[=:]\s*|\s+)(.+)$/.exec(trimmed);return m?[m[1],m[2].trim()]:null}function parseTerminalScheme(text){let background=null,foreground=null,ansi=Array(16).fill(void 0);for(let line of text.split(/\r?\n/)){let pair=splitLine(line);if(!pair)continue;let key=normalizeKey(pair[0]),value=pair[1];if(key==="palette"){let m=/^(\d{1,2})\s*[=:]\s*(\S+)/.exec(value),index=m?Number(m[1]):-1,hex2=m?color(m[2]):null;if(hex2&&index>=0&&index<16)ansi[index]=hex2;continue}let indexed=/^color(\d{1,2})$/.exec(key);if(indexed){let index=Number(indexed[1]),hex2=color(value);if(hex2&&index<16)ansi[index]=hex2;continue}if(key!=="background"&&key!=="foreground")continue;let hex=color(value);if(!hex)continue;if(key==="background")background=hex;else foreground=hex}if(!background||!foreground)return null;return{background,foreground,ansi}}function mix(from,to,amount){let channel=(hex,i)=>Number.parseInt(hex.slice(1+i*2,3+i*2),16),out="#";for(let i=0;i<3;i++){let value=Math.round(channel(from,i)+(channel(to,i)-channel(from,i))*amount);out+=value.toString(16).padStart(2,"0")}return out}function themeFromTerminalScheme(scheme){let defs={background:scheme.background,foreground:scheme.foreground};scheme.ansi.forEach((hex,i)=>{if(hex)defs[ANSI_NAMES[i]]=hex});let{background:bg,foreground:fg}=scheme;defs.panel=mix(bg,fg,0.04),defs.element=mix(bg,fg,0.08),defs.menu=mix(bg,fg,0.12),defs.borderSubtle=mix(bg,fg,0.14),defs.border=mix(bg,fg,0.24),defs.borderActive=mix(bg,fg,0.5),defs.muted=mix(fg,bg,0.35),defs.subtle=mix(fg,bg,0.55);let theme={text:"foreground",textMuted:"muted",background:"background",backgroundPanel:"panel",backgroundElement:"element",backgroundMenu:"menu",backgroundDialog:"panel",border:"border",borderActive:"borderActive",borderSubtle:"borderSubtle",diffContext:"muted",diffHunkHeader:"muted",markdownText:"foreground",markdownBlockQuote:"muted",markdownHorizontalRule:"muted",markdownCodeBlock:"foreground",syntaxComment:"subtle",syntaxVariable:"foreground",syntaxPunctuation:"foreground",selectedListItemText:"background"},hues=[["primary","blue","brightBlue"],["secondary","magenta","brightMagenta"],["accent","cyan","brightCyan"],["error","red","brightRed"],["warning","yellow","brightYellow"],["success","green","brightGreen"],["info","cyan","brightCyan"],["diffAdded","green","brightGreen"],["diffRemoved","red","brightRed"],["markdownHeading","blue","brightBlue"],["markdownLink","cyan","brightCyan"],["markdownLinkText","blue","brightBlue"],["markdownCode","green","brightGreen"],["markdownEmph","yellow","brightYellow"],["markdownStrong","magenta","brightMagenta"],["markdownListItem","cyan","brightCyan"],["syntaxKeyword","magenta","brightMagenta"],["syntaxFunction","blue","brightBlue"],["syntaxString","green","brightGreen"],["syntaxNumber","yellow","brightYellow"],["syntaxType","cyan","brightCyan"],["syntaxOperator","cyan","brightCyan"]];for(let[slot,...names]of hues){let name=names.find((n)=>defs[n]);if(name)theme[slot]=name}if(defs.green)defs.addedBg=mix(bg,defs.green,0.16);if(defs.red)defs.removedBg=mix(bg,defs.red,0.16);if(defs.addedBg)theme.diffAddedBg="addedBg";if(defs.removedBg)theme.diffRemovedBg="removedBg";let ref=(name)=>`scheme.${name}`;return{defs:Object.fromEntries(Object.entries(defs).map(([name,hex])=>[ref(name),hex])),theme:Object.fromEntries(Object.entries(theme).map(([slot,name])=>[slot,ref(name)]))}}var HOSTED_THEMES=["catppuccin","dracula","everforest","gruvbox","kanagawa","nord","opencode","osaka-jade","rose-pine","solarized"],hostedThemeUrl=(name)=>`https://rove.run/themes/${name}.json`;class ThemeInstallError extends Error{}function parseTheme(text){let parsed;try{parsed=JSON.parse(text)}catch(err){throw new ThemeInstallError(`source is not valid JSON: ${err instanceof Error?err.message:String(err)}`)}let result=validateTheme(parsed);if(!result.ok)throw new ThemeInstallError(`source is not a valid Rove theme: ${result.reason}`);return result.theme}function parseThemeSource(text){if(text.trimStart().startsWith("{"))return{theme:parseTheme(text),fromScheme:!1};let scheme=parseTerminalScheme(text);if(!scheme)throw new ThemeInstallError("source is neither a Rove theme JSON nor a terminal color scheme (no `background` and `foreground` colors)");return{theme:parseTheme(JSON.stringify(themeFromTerminalScheme(scheme))),fromScheme:!0}}function isThemeName(name){return!!name&&/^[a-zA-Z0-9._-]+$/.test(name)&&name!=="."&&name!==".."}function writeUserTheme(name,theme,force){if(!isThemeName(name))throw new ThemeInstallError(`invalid theme name "${name}" (use letters, digits, '.', '_', '-')`);let dir=userThemesDir();mkdirSync(dir,{recursive:!0});let dest=join(dir,`${name}.json`);if(existsSync(dest)&&!force)throw new ThemeInstallError(`${dest} already exists (pass --force to overwrite)`);return writeFileSync(dest,`${JSON.stringify(theme,null,2)}
3
- `,"utf8"),dest}
4
- export{HOSTED_THEMES,hostedThemeUrl,ThemeInstallError,parseTheme,parseThemeSource,isThemeName,writeUserTheme};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{recordSpawn}from"./chunk-h8qg9v95.js";import{projectRejection}from"./chunk-tm6vvy5t.js";import{getPersistedBool,loadStateFile,patchStateFile,readSavedRepos,updateStateFile}from"./chunk-7akh6mpq.js";import{pathIdentity,samePath}from"./chunk-pn5ygqn6.js";import{kvStatePath}from"./chunk-pzbcbmm4.js";import{execFile,spawnSync}from"child_process";import{existsSync,realpathSync}from"fs";import{promisify}from"util";function isRemoteRepoKey(key){return key.startsWith("ssh://")}function isRemoteProjectsEnabled(){return getPersistedBool("experimental.remoteProjects",!1)}function remoteRepoKey(host,user,port,basePath){let authority=port?`${user}@${host}:${port}`:`${user}@${host}`,base=(basePath??"").trim().replace(/\/+$/,"");if(!base)return`ssh://${authority}`;return`ssh://${authority}${base.startsWith("/")?base:`/${base}`}`}function readRemoteRepos(state){let raw=state.remoteRepos;if(!raw||typeof raw!=="object"||Array.isArray(raw))return{};return raw}function getRemoteRepoConfig(key){return readRemoteRepos(loadStateFile())[key]??null}function getRemoteRepos(){return readRemoteRepos(loadStateFile())}function addRemoteRepo(config){let key=remoteRepoKey(config.host,config.user,config.port,config.basePath),added=!1;return updateStateFile((state)=>{let repos={...readRemoteRepos(state)},legacyKey=remoteRepoKey(config.host,config.user,config.port);if(key!==legacyKey&&repos[legacyKey]?.basePath===config.basePath)key=legacyKey;repos[key]=config,state.remoteRepos=repos;let saved=readSavedRepos(state);if(added=!saved.includes(key),added)state.savedRepos=[...saved,key];return}),{key,added}}var run=promisify(execFile);function resolveRepoRoot(absPath){if(isRemoteRepoKey(absPath))return absPath;recordSpawn("repos.resolveRepoRoot",["git","rev-parse","--show-toplevel"],absPath);let r=spawnSync("git",["rev-parse","--show-toplevel"],{cwd:absPath,encoding:"utf8",shell:!1});if(r.status!==0)return absPath;let top=(r.stdout??"").trim();if(!top)return absPath;try{if(realpathSync(absPath)===realpathSync(top))return absPath}catch{}return top}function isGitRepo(absPath){if(isRemoteRepoKey(absPath))return!1;recordSpawn("repos.isGitRepo",["git","rev-parse","--is-inside-work-tree"],absPath);let r=spawnSync("git",["rev-parse","--is-inside-work-tree"],{cwd:absPath,encoding:"utf8",shell:!1});return r.status===0&&(r.stdout??"").trim()==="true"}function isValidBranchName(branch){return spawnSync("git",["check-ref-format","--branch",branch],{encoding:"utf8",shell:!1}).status===0}function resolveMainRepoRoot(absPath){if(isRemoteRepoKey(absPath))return absPath;recordSpawn("repos.resolveMainRepoRoot",["git","worktree","list","--porcelain"],absPath);let r=spawnSync("git",["worktree","list","--porcelain"],{cwd:absPath,encoding:"utf8",shell:!1});if(r.status!==0)return resolveRepoRoot(absPath);return(r.stdout??"").split(/\r?\n/).find((line)=>line.startsWith("worktree "))?.slice(9).trim()||resolveRepoRoot(absPath)}async function inspectRepo(absPath){if(isRemoteRepoKey(absPath))return{root:absPath,usable:!0};recordSpawn("repos.inspectRepo",["git","worktree","list","--porcelain"],absPath);let stdout="",ok=!0;try{stdout=(await run("git",["worktree","list","--porcelain"],{cwd:absPath,encoding:"utf8"})).stdout}catch{ok=!1}let first=stdout.split(/\r?\n/).find((line)=>line.startsWith("worktree "))?.slice(9).trim(),usable=ok&&!/^bare$/m.test(stdout);return{root:usable&&first||absPath,usable}}function statePath(){return kvStatePath()}function storedRepos(){return readSavedRepos(loadStateFile())}function getSavedRepos(){return storedRepos().filter((repo)=>isRemoteRepoKey(repo)||existsSync(repo))}function getPersistedString(key){let value=loadStateFile()[key];return typeof value==="string"?value:void 0}function getPersistedValue(key){return loadStateFile()[key]}function setPersistedString(key,value){patchStateFile({[key]:value})}function getCustomEngineIds(){let raw=loadStateFile().customEngineIds;if(!Array.isArray(raw))return[];return raw.filter((s)=>typeof s==="string"&&s.trim().length>0)}function getDisabledEngineIds(){let raw=loadStateFile().disabledEngineIds;if(!Array.isArray(raw))return[];return raw.filter((s)=>typeof s==="string"&&s.trim().length>0)}function addSavedRepo(absPath,opts={}){let normalized=resolveMainRepoRoot(absPath),rejected=opts.skipGate?null:projectRejection(normalized,isGitRepo,opts.intent??"explicit");if(rejected)return{added:!1,path:normalized,total:storedRepos().length,rejected};let result={added:!1,path:normalized,total:0};return updateStateFile((state)=>{let cur=readSavedRepos(state);if(cur.some((repo)=>samePath(repo,normalized)))return result={added:!1,path:normalized,total:cur.length},!1;state.savedRepos=[...cur,normalized],result={added:!0,path:normalized,total:cur.length+1};return}),result}function backfillSavedReposFromProjects(mainRepos){let added=[];for(let repo of mainRepos)if(addSavedRepo(repo,{intent:"explicit"}).added)added.push(repo);return added}function normalizeSavedRepos(){let cur=storedRepos(),seen=new Set,next=[],changed=!1;for(let p of cur){let top=resolveMainRepoRoot(p);if(top!==p)changed=!0;if(seen.has(pathIdentity(top))){changed=!0;continue}seen.add(pathIdentity(top)),next.push(top)}if(!changed)return;patchStateFile({savedRepos:next})}function readRepoConfigs(state){let raw=state.repoConfigs;if(!raw||typeof raw!=="object"||Array.isArray(raw))return{};return raw}function samePathResolved(left,right){if(samePath(left,right))return!0;try{return realpathSync(left)===realpathSync(right)}catch{return!1}}function coerceOverride(entry){if(!entry||typeof entry!=="object")return{};let e=entry;return{initScript:typeof e.initScript==="string"&&e.initScript.length>0?e.initScript:void 0,initPrompt:typeof e.initPrompt==="string"&&e.initPrompt.length>0?e.initPrompt:void 0}}function getRepoInitOverride(repoRoot){let configs=readRepoConfigs(loadStateFile()),keys=Object.keys(configs);if(keys.length===0)return{};let direct=keys.find((key2)=>samePathResolved(key2,repoRoot));if(direct)return coerceOverride(configs[direct]);let normalized=resolveRepoRoot(repoRoot),key=keys.find((key2)=>samePathResolved(key2,normalized))??normalized;return coerceOverride(configs[key])}function setRepoInitOverride(repoRoot,patch){let resolved=resolveRepoRoot(repoRoot),next={};return updateStateFile((state)=>{let configs={...readRepoConfigs(state)},normalized=Object.keys(configs).find((key)=>samePathResolved(key,resolved))??resolved,cur=coerceOverride(configs[normalized]),nextScript=patch.initScript===void 0?cur.initScript:patch.initScript||void 0,nextPrompt=patch.initPrompt===void 0?cur.initPrompt:patch.initPrompt||void 0;if(next={...nextScript?{initScript:nextScript}:{},...nextPrompt?{initPrompt:nextPrompt}:{}},!next.initScript&&!next.initPrompt){let{[normalized]:_dropped,...rest}=configs;state.repoConfigs=rest}else configs[normalized]=next,state.repoConfigs=configs;return}),next}function removeSavedRepo(absPath){let result={removed:!1,path:absPath,total:0};return updateStateFile((state)=>{let cur=readSavedRepos(state);if(!cur.some((repo)=>samePath(repo,absPath)))return result={removed:!1,path:absPath,total:cur.length},!1;let remaining=cur.filter((p)=>!samePath(p,absPath));if(state.savedRepos=remaining,isRemoteRepoKey(absPath)){let remotes=readRemoteRepos(state);if(absPath in remotes){let next={...remotes};delete next[absPath],state.remoteRepos=next}}result={removed:!0,path:absPath,total:remaining.length};return}),result}
3
- export{isRemoteRepoKey,isRemoteProjectsEnabled,remoteRepoKey,getRemoteRepoConfig,getRemoteRepos,addRemoteRepo,resolveRepoRoot,isGitRepo,isValidBranchName,resolveMainRepoRoot,inspectRepo,statePath,storedRepos,getSavedRepos,getPersistedString,getPersistedValue,setPersistedString,getCustomEngineIds,getDisabledEngineIds,addSavedRepo,backfillSavedReposFromProjects,normalizeSavedRepos,getRepoInitOverride,setRepoInitOverride,removeSavedRepo};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{vendorFromArgv}from"./chunk-p90ne1pc.js";import{engineEntry}from"./chunk-e3d8k6yn.js";import{isContribEngine}from"./chunk-jrrq9k1b.js";import{getCustomEngineIds,getPersistedString}from"./chunk-f7h3mzk0.js";import{argvHasFlag}from"./chunk-78y80xe8.js";import{getPersistedBool}from"./chunk-7akh6mpq.js";import{roveCliInvocation}from"./chunk-6hjt5an9.js";import{BUILTIN_VENDORS,coerceVendorId,isBuiltinVendor}from"./chunk-8q0nmdh3.js";var PERMISSION_BYPASS_KEY="engines.permissionBypass";function permissionBypassEnabled(){return getPersistedBool(PERMISSION_BYPASS_KEY,!0)}function engineCommandKey(vendor){return`engineCommand.${vendor}`}function engineNameKey(vendor){return`engineName.${vendor}`}function engineDisplayName(vendor){return getPersistedString(engineNameKey(vendor))?.trim()||engineEntry(vendor).displayName}function humanizeSlug(id){return id.split(/[-_]+/).filter((word)=>word.length>0).map((word)=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}function engineRenamedFrom(vendor,override){let name=override.trim(),base=engineEntry(vendor).displayName;if(!name||name===base||name===humanizeSlug(vendor))return;return base}function defaultEngineCommand(vendor){return engineEntry(coerceVendorId(vendor)).defaultCommand}function parseEngineCommand(command){let out=[],token="",hasToken=!1,quote=null;for(let ch of command){if(quote){if(ch===quote)quote=null;else token+=ch;continue}if(ch==='"'||ch==="'"){quote=ch,hasToken=!0;continue}if(/\s/.test(ch)){if(hasToken)out.push(token),token="",hasToken=!1;continue}token+=ch,hasToken=!0}if(hasToken)out.push(token);return out}function interactiveEngineCommand(vendor,effort,model){let v=coerceVendorId(vendor),override=getPersistedString(engineCommandKey(v))?.trim(),base=(()=>{if(override){let argv=parseEngineCommand(override);if(argv.length>0)return argv}return defaultEngineCommand(v)})();return withEngineHostedArgs(withEngineModel(withEngineEffort(base,v,effort),v,model),v)}function withEngineHostedArgs(argv,vendor){let entry=engineEntry(coerceVendorId(vendor)),bypass=entry.permissionBypass,bypassed=bypass&&permissionBypassEnabled()&&!bypass.present.some((f)=>argvHasFlag(argv,f))?bypass.argv(argv):argv,args=entry.terminalTitle?.launchArgs,titled=args&&args.length>0?[...bypassed,...args]:bypassed;return entry.hostedStartArgv?.(titled)??titled}function withEngineEffort(argv,vendor,effort){let trimmed=effort?.trim();if(!trimmed)return argv;let entry=engineEntry(coerceVendorId(vendor));if(!entry.effortLevels?.includes(trimmed))return argv;return entry.effortArgv?.(argv,trimmed)??argv}function withEngineModel(argv,vendor,model){let trimmed=model?.trim();if(!trimmed)return argv;return engineEntry(coerceVendorId(vendor)).modelArgv?.(argv,trimmed)??argv}function roveApiInvocation(){let quote=(a)=>/^[A-Za-z0-9_/.:=-]+$/.test(a)?a:`'${a.replace(/'/g,"'\\''")}'`;try{return[...roveCliInvocation(),"api"].map(quote).join(" ")}catch{return"rove api"}}import{randomUUID}from"crypto";function hasFlag(argv,flag){return argv.some((a)=>a===flag||a.startsWith(`${flag}=`))}function controlsOwnSession(identity,argv){return(identity?.sessionControlFlags??[]).some((flag)=>hasFlag(argv,flag))}function pinSessionArgv(identity,argv,sessionId){if(!identity?.pinFlag)return argv;if(controlsOwnSession(identity,argv))return argv;return[...argv,identity.pinFlag,sessionId]}function acceptsPinnedSession(identity,argv){return!!identity?.pinFlag&&!controlsOwnSession(identity,argv)}function resumeSessionArgv(identity,base,sessionId){if(!sessionId||!identity?.resumeArgv)return null;if(controlsOwnSession(identity,base))return null;return identity.resumeArgv(base,sessionId)}function pickUnclaimedSessionId(ids,claimed){for(let i=ids.length-1;i>=0;i--){let id=ids[i];if(id&&!claimed.has(id))return id}return null}function forkSessionArgvFor(identity,base,sourceId,newId){if(!sourceId||!identity?.forkArgv)return null;if(controlsOwnSession(identity,base))return null;return identity.forkArgv(base,sourceId,newId)}function acceptsSessionFork(identity){return!!identity?.forkArgv}var GENERIC_PROTOCOL="generic",ENGINE_PROTOCOLS=BUILTIN_VENDORS;function engineProtocolKey(id){return`engineProtocol.${id}`}function getEngineProtocol(id){if(isBuiltinVendor(id)||isContribEngine(id))return id;let raw=getPersistedString(engineProtocolKey(id))?.trim();return raw&&ENGINE_PROTOCOLS.includes(raw)?raw:void 0}function isPresetId(id){return isBuiltinVendor(id)||isContribEngine(id)||getCustomEngineIds().includes(id)}function listPresetIds(){return[...new Set([...BUILTIN_VENDORS,...getCustomEngineIds()])]}function describePreset(id){let command=getPersistedString(engineCommandKey(id))?.trim()||defaultEngineCommand(id).join(" ");return{id,name:engineDisplayName(id),command,protocol:getEngineProtocol(id)??GENERIC_PROTOCOL,builtin:isBuiltinVendor(id)}}function listEnginePresets(){return listPresetIds().map(describePreset)}function resolveCommandProtocol(command){let trimmed=command?.trim();if(!trimmed)return GENERIC_PROTOCOL;if(isPresetId(trimmed))return getEngineProtocol(trimmed)??GENERIC_PROTOCOL;let fromArgv=vendorFromArgv(trimmed);if(fromArgv)return fromArgv;let argv0=parseEngineCommand(trimmed)[0];if(argv0)for(let id of getCustomEngineIds()){let preset=getPersistedString(engineCommandKey(id))?.trim();if(preset&&parseEngineCommand(preset)[0]===argv0)return getEngineProtocol(id)??GENERIC_PROTOCOL}return GENERIC_PROTOCOL}function engineLaunchArgv(spec){let command=spec.command?.trim();if(!command)return interactiveEngineCommand(spec.vendor,spec.effort,spec.model);let vendor=(isPresetId(command)?getEngineProtocol(command):void 0)??resolveCommandProtocol(command),base=isPresetId(command)?presetBaseArgv(command):(()=>{let argv=parseEngineCommand(command);return argv.length>0?argv:null})();if(!base)return interactiveEngineCommand(spec.vendor,spec.effort,spec.model);return withEngineHostedArgs(withEngineModel(withEngineEffort(base,vendor,spec.effort),vendor,spec.model),vendor)}function presetBaseArgv(id){let override=getPersistedString(engineCommandKey(id))?.trim();if(override){let argv=parseEngineCommand(override);if(argv.length>0)return argv}return defaultEngineCommand(id)}function sessionProtocol(vendor){let id=vendor?.trim();if(!id)return"claude";return getEngineProtocol(id)??id}function protocolEntry(vendor){return engineEntry(sessionProtocol(vendor))}function withPinnedSessionId(argv,vendor,newId=randomUUID){let identity=engineEntry(sessionProtocol(vendor)).sessionIdentity;if(!acceptsPinnedSession(identity,argv))return{argv,sessionId:null};let sessionId=newId();return{argv:pinSessionArgv(identity,argv,sessionId),sessionId}}function engineResumeArgv(base,vendor,sessionId){return resumeSessionArgv(engineEntry(sessionProtocol(vendor)).sessionIdentity,base,sessionId)}function engineCanFork(vendor){return acceptsSessionFork(engineEntry(sessionProtocol(vendor)).sessionIdentity)}function engineForkArgv(base,vendor,sourceId,newId){return forkSessionArgvFor(engineEntry(sessionProtocol(vendor)).sessionIdentity,base,sourceId,newId)}
3
- export{PERMISSION_BYPASS_KEY,engineCommandKey,engineNameKey,engineDisplayName,humanizeSlug,engineRenamedFrom,defaultEngineCommand,interactiveEngineCommand,roveApiInvocation,pickUnclaimedSessionId,GENERIC_PROTOCOL,ENGINE_PROTOCOLS,engineProtocolKey,getEngineProtocol,listPresetIds,describePreset,listEnginePresets,resolveCommandProtocol,engineLaunchArgv,sessionProtocol,protocolEntry,withPinnedSessionId,engineResumeArgv,engineCanFork,engineForkArgv};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{parsePorcelain,pickPushedChanges,readWorktreeChanges,sameWorktreeChanges}from"./chunk-ytrktnmv.js";import"./chunk-fxpbaff2.js";import"./chunk-dmzg9zdc.js";import"./chunk-9k0r47z3.js";import"./chunk-h8qg9v95.js";import"./chunk-91sykzqq.js";export{sameWorktreeChanges,readWorktreeChanges,pickPushedChanges,parsePorcelain};