@sma1lboy/rove 0.9.251 → 0.9.253

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 (188) hide show
  1. package/dist/cli/{chunk-9v568ape.js → chunk-02h0488p.js} +1 -1
  2. package/dist/cli/{chunk-r0etyq15.js → chunk-08ycv55d.js} +1 -1
  3. package/dist/cli/{chunk-mdnrrj16.js → chunk-0x7zcw52.js} +1 -1
  4. package/dist/cli/{chunk-gaf6n1ea.js → chunk-19h18xca.js} +1 -1
  5. package/dist/cli/{chunk-84bmcqyz.js → chunk-1mpheecn.js} +1 -1
  6. package/dist/cli/chunk-1qge84t7.js +3 -0
  7. package/dist/cli/{chunk-md094j05.js → chunk-278sc87n.js} +1 -1
  8. package/dist/cli/{chunk-jfnr89qj.js → chunk-2bmebw8q.js} +2 -2
  9. package/dist/cli/{chunk-ncrr0fa3.js → chunk-2nfz06mq.js} +1 -1
  10. package/dist/cli/chunk-34vpdm19.js +2 -0
  11. package/dist/cli/{chunk-qyfmfpjg.js → chunk-3dgghmjv.js} +1 -1
  12. package/dist/cli/chunk-3j1x55tc.js +2 -0
  13. package/dist/cli/{chunk-q854fweb.js → chunk-3jnw3ftt.js} +1 -1
  14. package/dist/cli/chunk-3r4ekafa.js +2 -0
  15. package/dist/cli/{chunk-sgegp9x9.js → chunk-4zhmbqt3.js} +1 -1
  16. package/dist/cli/{chunk-bvqwgrar.js → chunk-65tbvcjj.js} +1 -1
  17. package/dist/cli/{chunk-zcadc92x.js → chunk-67q0qw7z.js} +1 -1
  18. package/dist/cli/{chunk-e1xvz3sv.js → chunk-68gxqtse.js} +1 -1
  19. package/dist/cli/{chunk-kb3zvtkj.js → chunk-6e54q8g5.js} +1 -1
  20. package/dist/cli/chunk-6k424rbf.js +2 -0
  21. package/dist/cli/{chunk-ga5f2pyc.js → chunk-6r84zkcz.js} +1 -1
  22. package/dist/cli/{chunk-s5k3g5ra.js → chunk-6ygwq4w5.js} +1 -1
  23. package/dist/cli/{chunk-cp5jp5mq.js → chunk-75zg2k73.js} +1 -1
  24. package/dist/cli/{chunk-zcwgmz5p.js → chunk-76adkzyf.js} +1 -1
  25. package/dist/cli/{chunk-v312167r.js → chunk-7cd1epfw.js} +1 -1
  26. package/dist/cli/chunk-7ghwdjdc.js +3 -0
  27. package/dist/cli/{chunk-86chrjqr.js → chunk-7hkkjx6g.js} +1 -1
  28. package/dist/cli/{chunk-8sbbzs5g.js → chunk-814ktvx2.js} +1 -1
  29. package/dist/cli/chunk-8je3dmzq.js +2 -0
  30. package/dist/cli/{chunk-719avf77.js → chunk-8wze6dnr.js} +1 -1
  31. package/dist/cli/{chunk-8spmjwwz.js → chunk-97vsqj97.js} +1 -1
  32. package/dist/cli/chunk-9g7gneek.js +30 -0
  33. package/dist/cli/chunk-9jbcfrse.js +2 -0
  34. package/dist/cli/{chunk-m4wy9ja5.js → chunk-9r6x8mh4.js} +1 -1
  35. package/dist/cli/chunk-9vd6fv1k.js +3 -0
  36. package/dist/cli/{chunk-6ahc8w4p.js → chunk-9wkf17yd.js} +1 -1
  37. package/dist/cli/{chunk-7z9yfnjd.js → chunk-ad5gbdcf.js} +1 -1
  38. package/dist/cli/{chunk-vd8qqev9.js → chunk-admwmjjy.js} +1 -1
  39. package/dist/cli/{chunk-tntdcyra.js → chunk-afwh7as3.js} +1 -1
  40. package/dist/cli/{chunk-mq06xpqr.js → chunk-avdg2rrh.js} +1 -1
  41. package/dist/cli/chunk-avz72132.js +3 -0
  42. package/dist/cli/chunk-ax7wzcam.js +2 -0
  43. package/dist/cli/{chunk-zk5qkkb1.js → chunk-axxf5dkq.js} +1 -1
  44. package/dist/cli/{chunk-p2jeq98m.js → chunk-b18pnmsv.js} +1 -1
  45. package/dist/cli/chunk-b1mk33gy.js +2 -0
  46. package/dist/cli/{chunk-a7kq09ke.js → chunk-b31cte10.js} +1 -1
  47. package/dist/cli/{chunk-032g0ahy.js → chunk-b3j5s2jb.js} +1 -1
  48. package/dist/cli/{chunk-2apszxn2.js → chunk-b7xjhgts.js} +1 -1
  49. package/dist/cli/{chunk-jrdwedn2.js → chunk-bdvqjzwh.js} +1 -1
  50. package/dist/cli/chunk-bk4pfjs0.js +31 -0
  51. package/dist/cli/{chunk-fktvtdkb.js → chunk-bphs6am4.js} +1 -1
  52. package/dist/cli/chunk-bq0xsdqx.js +3 -0
  53. package/dist/cli/{chunk-n52x0ehz.js → chunk-c3d36ryd.js} +1 -1
  54. package/dist/cli/chunk-c4e149yb.js +2 -0
  55. package/dist/cli/chunk-cgy92ks5.js +2 -0
  56. package/dist/cli/chunk-cjxvb9vg.js +2 -0
  57. package/dist/cli/{chunk-y5dk90tw.js → chunk-dehnv06q.js} +1 -1
  58. package/dist/cli/{chunk-y1cb8pj5.js → chunk-dk0hffvd.js} +1 -1
  59. package/dist/cli/{chunk-q5bhq11t.js → chunk-dkb8nj75.js} +1 -1
  60. package/dist/cli/chunk-dx72asyw.js +2 -0
  61. package/dist/cli/{chunk-7vv6160d.js → chunk-epyw87gt.js} +1 -1
  62. package/dist/cli/{chunk-s2t9acrv.js → chunk-f6836h0n.js} +1 -1
  63. package/dist/cli/chunk-ffjwgbck.js +3 -0
  64. package/dist/cli/chunk-ft6ftksv.js +2 -0
  65. package/dist/cli/chunk-g3wdrhxk.js +11 -0
  66. package/dist/cli/{chunk-ra40m849.js → chunk-gb3qb83h.js} +1 -1
  67. package/dist/cli/chunk-ghyz3fd7.js +4 -0
  68. package/dist/cli/chunk-gt1vbz3f.js +5 -0
  69. package/dist/cli/{chunk-8ezc1ban.js → chunk-hbq7nqnp.js} +2 -2
  70. package/dist/cli/{chunk-2pen6b1t.js → chunk-hm7t9gkb.js} +1 -1
  71. package/dist/cli/{chunk-ayr5dpgc.js → chunk-hqzgejfj.js} +1 -1
  72. package/dist/cli/{chunk-e003wm6d.js → chunk-j26zqrnq.js} +2 -2
  73. package/dist/cli/{chunk-1tebqkdv.js → chunk-jbqpyp76.js} +1 -1
  74. package/dist/cli/{chunk-daw4mxq3.js → chunk-jk9b9ztf.js} +1 -1
  75. package/dist/cli/{chunk-w2sp489k.js → chunk-k3wzznqw.js} +1 -1
  76. package/dist/cli/{chunk-rhq87p4r.js → chunk-k8dm013e.js} +1 -1
  77. package/dist/cli/{chunk-6ms5chc3.js → chunk-ke3t032y.js} +1 -1
  78. package/dist/cli/{chunk-a7m7w6d1.js → chunk-m6qv5rsv.js} +1 -1
  79. package/dist/cli/{chunk-g5rr5fpn.js → chunk-mrtfvgb2.js} +1 -1
  80. package/dist/cli/{chunk-mnpewdhd.js → chunk-mt8vtz20.js} +2 -2
  81. package/dist/cli/{chunk-dgbcpkr2.js → chunk-mw35vd6g.js} +1 -1
  82. package/dist/cli/{chunk-g872swb8.js → chunk-mwm63vz3.js} +9 -9
  83. package/dist/cli/chunk-my20q579.js +3 -0
  84. package/dist/cli/chunk-n7dtvega.js +2 -0
  85. package/dist/cli/chunk-nhpadsbv.js +2 -0
  86. package/dist/cli/{chunk-6h0n4b5t.js → chunk-p8d9va1w.js} +2 -2
  87. package/dist/cli/{chunk-7j00hbq5.js → chunk-p98w5ffk.js} +1 -1
  88. package/dist/cli/chunk-parvvj8h.js +2 -0
  89. package/dist/cli/{chunk-vwg79maj.js → chunk-pcyatg4b.js} +1 -1
  90. package/dist/cli/{chunk-apfzdw7g.js → chunk-pkq8n3gs.js} +2 -2
  91. package/dist/cli/chunk-pwybgztt.js +2 -0
  92. package/dist/cli/chunk-q1e0qqmd.js +3 -0
  93. package/dist/cli/{chunk-5q08srg6.js → chunk-q349ydch.js} +1 -1
  94. package/dist/cli/chunk-qb6ktr8a.js +2 -0
  95. package/dist/cli/chunk-qc06psqb.js +3 -0
  96. package/dist/cli/{chunk-mw0ysrpd.js → chunk-qk5f6p3e.js} +1 -1
  97. package/dist/cli/chunk-r2pd9tv9.js +3 -0
  98. package/dist/cli/{chunk-h7y9v8k1.js → chunk-r4bn0mtb.js} +1 -1
  99. package/dist/cli/{chunk-5456ttpr.js → chunk-rm2wy5hf.js} +3 -3
  100. package/dist/cli/chunk-rpm771v5.js +15 -0
  101. package/dist/cli/{chunk-8ja7jrhc.js → chunk-s21t29qn.js} +1 -1
  102. package/dist/cli/{chunk-w4cpkhzj.js → chunk-sb2xg6py.js} +2 -2
  103. package/dist/cli/{chunk-963er0h4.js → chunk-sk3h2pzj.js} +3 -3
  104. package/dist/cli/{chunk-nsqsvgry.js → chunk-sncjkw3g.js} +3 -3
  105. package/dist/cli/chunk-t6j3pmpp.js +2 -0
  106. package/dist/cli/{chunk-crdyt04z.js → chunk-tmz0wzq8.js} +1 -1
  107. package/dist/cli/{chunk-w7yg0bbz.js → chunk-tq1hrd9n.js} +1 -1
  108. package/dist/cli/{chunk-x0rvg54z.js → chunk-v0jvt60f.js} +1 -1
  109. package/dist/cli/chunk-v8s0s21v.js +2 -0
  110. package/dist/cli/{chunk-ny12rama.js → chunk-v9avfsxq.js} +1 -1
  111. package/dist/cli/chunk-v9dcyjmj.js +9 -0
  112. package/dist/cli/chunk-vcq9hb2a.js +3 -0
  113. package/dist/cli/chunk-vx4e787s.js +3 -0
  114. package/dist/cli/{chunk-vgknea9y.js → chunk-wbtebbrv.js} +1 -1
  115. package/dist/cli/{chunk-meyfwc50.js → chunk-wkk63qck.js} +1 -1
  116. package/dist/cli/chunk-wq6pfbek.js +6 -0
  117. package/dist/cli/{chunk-nep425b6.js → chunk-x2c8f2qz.js} +1 -1
  118. package/dist/cli/{chunk-0y4qgnby.js → chunk-x5ymh8ev.js} +1 -1
  119. package/dist/cli/{chunk-568q390y.js → chunk-x7r75e3p.js} +2 -2
  120. package/dist/cli/chunk-xg6zg6kz.js +2 -0
  121. package/dist/cli/chunk-xgq5ycyn.js +2 -0
  122. package/dist/cli/{chunk-21ek142k.js → chunk-xkr7fwvb.js} +1 -1
  123. package/dist/cli/{chunk-mv0hp5cv.js → chunk-xmf4053m.js} +1 -1
  124. package/dist/cli/{chunk-gp991c3v.js → chunk-xpxxgzw9.js} +1 -1
  125. package/dist/cli/{chunk-s5a5dyab.js → chunk-y33j54yr.js} +2 -2
  126. package/dist/cli/{chunk-hq9tbzqa.js → chunk-y55zpren.js} +1 -1
  127. package/dist/cli/{chunk-4rx3nhvq.js → chunk-yjk0465m.js} +1 -1
  128. package/dist/cli/chunk-yq99x0r6.js +2 -0
  129. package/dist/cli/{chunk-qstjfseh.js → chunk-yshp8cmx.js} +1 -1
  130. package/dist/cli/chunk-z3zaa155.js +3 -0
  131. package/dist/cli/{chunk-npwzmmv9.js → chunk-z7zm8h1q.js} +2 -2
  132. package/dist/cli/chunk-zfjqy7hp.js +52 -0
  133. package/dist/cli/{chunk-mre9g9vq.js → chunk-zmw0v18d.js} +1 -1
  134. package/dist/cli/chunk-zy20hzvh.js +4 -0
  135. package/dist/cli/index.js +8 -8
  136. package/dist/cli/pty-host-node.mjs +3 -0
  137. package/dist/cli/rove-run.js +1 -1
  138. package/dist/cli/rove.js +1 -1
  139. package/dist/completions/rove.bash +2 -2
  140. package/dist/completions/rove.fish +2 -2
  141. package/dist/completions/rove.zsh +2 -2
  142. package/dist/skills/rove/SKILL.md +50 -2
  143. package/dist/skills/rove/references/api-flags.md +38 -7
  144. package/dist/web/assets/{index-DHlgMx7L.js → index-DmRZRttZ.js} +2 -2
  145. package/dist/web/index.html +1 -1
  146. package/package.json +3 -3
  147. package/dist/cli/chunk-1exaxwyv.js +0 -2
  148. package/dist/cli/chunk-28wjmb9f.js +0 -2
  149. package/dist/cli/chunk-2dpr8gps.js +0 -2
  150. package/dist/cli/chunk-2g2w5vvn.js +0 -2
  151. package/dist/cli/chunk-3msnqacf.js +0 -2
  152. package/dist/cli/chunk-5r71q63g.js +0 -2
  153. package/dist/cli/chunk-6f01fsje.js +0 -2
  154. package/dist/cli/chunk-6rrzq5et.js +0 -3
  155. package/dist/cli/chunk-76n3d9x3.js +0 -2
  156. package/dist/cli/chunk-88czbfqx.js +0 -3
  157. package/dist/cli/chunk-8s0mz115.js +0 -52
  158. package/dist/cli/chunk-964z8ccb.js +0 -3
  159. package/dist/cli/chunk-9h940gnr.js +0 -2
  160. package/dist/cli/chunk-cb1dg7nz.js +0 -2
  161. package/dist/cli/chunk-d99385f2.js +0 -22
  162. package/dist/cli/chunk-dcjxtwdb.js +0 -7
  163. package/dist/cli/chunk-e1x88j3k.js +0 -3
  164. package/dist/cli/chunk-f7rmd4zk.js +0 -6
  165. package/dist/cli/chunk-fsdh66fa.js +0 -2
  166. package/dist/cli/chunk-h9kzwj14.js +0 -2
  167. package/dist/cli/chunk-k9spgfmx.js +0 -3
  168. package/dist/cli/chunk-mf7fb92r.js +0 -2
  169. package/dist/cli/chunk-mnm9n2vr.js +0 -2
  170. package/dist/cli/chunk-nj53wrzz.js +0 -2
  171. package/dist/cli/chunk-nxe45n7k.js +0 -17
  172. package/dist/cli/chunk-pdvyfz3n.js +0 -3
  173. package/dist/cli/chunk-q3xt0mqt.js +0 -3
  174. package/dist/cli/chunk-q6qhk171.js +0 -2
  175. package/dist/cli/chunk-qft75bkm.js +0 -2
  176. package/dist/cli/chunk-qxzrdfh7.js +0 -11
  177. package/dist/cli/chunk-qzsahxd9.js +0 -3
  178. package/dist/cli/chunk-r2c5nbcq.js +0 -4
  179. package/dist/cli/chunk-regtterm.js +0 -9
  180. package/dist/cli/chunk-rf0jrh3q.js +0 -2
  181. package/dist/cli/chunk-rkgnrfga.js +0 -2
  182. package/dist/cli/chunk-rqpwy31f.js +0 -2
  183. package/dist/cli/chunk-rt4tg426.js +0 -4
  184. package/dist/cli/chunk-sqp33pwr.js +0 -2
  185. package/dist/cli/chunk-t33z2kdv.js +0 -3
  186. package/dist/cli/chunk-v6d6kvmk.js +0 -2
  187. package/dist/cli/chunk-x33sm4rp.js +0 -5
  188. package/dist/cli/chunk-yknavm97.js +0 -3
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{openDaemonSession,resolveActiveTaskId}from"./chunk-ayr5dpgc.js";import"./chunk-7z9yfnjd.js";import"./chunk-7j00hbq5.js";import"./chunk-gaf6n1ea.js";import"./chunk-a7kq09ke.js";import"./chunk-yt15y085.js";import"./chunk-s5a5dyab.js";import"./chunk-md094j05.js";import"./chunk-hq9tbzqa.js";import"./chunk-pn5ygqn6.js";import"./chunk-npwzmmv9.js";import"./chunk-b39sdtt0.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{resolveActiveTaskId,openDaemonSession};
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{CLAUDE_HOOK_EVENT_MAP,claudeSettingsPath}from"./chunk-964z8ccb.js";import{hasRoveActivityHooks,isObject}from"./chunk-x33sm4rp.js";import"./chunk-7kysxgbq.js";import"./chunk-qzsahxd9.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-tdhk4dz8.js";import{installedSkillDirs}from"./chunk-6h0n4b5t.js";import"./chunk-21ek142k.js";import"./chunk-40dgv828.js";import"./chunk-3342qzve.js";import"./chunk-zk5qkkb1.js";import"./chunk-mw0ysrpd.js";import"./chunk-a7kq09ke.js";import"./chunk-prqeddy7.js";import"./chunk-zt7wfnva.js";import"./chunk-yt15y085.js";import"./chunk-hq9tbzqa.js";import"./chunk-pn5ygqn6.js";import"./chunk-npwzmmv9.js";import"./chunk-b39sdtt0.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";import{readFileSync}from"fs";import{homedir}from"os";var PLUGIN_NAME="rove";function readSettings(path){try{let parsed=JSON.parse(readFileSync(path,"utf8"));return isObject(parsed)?parsed:null}catch{return null}}function isRovePluginEnabled(settingsFilePath=claudeSettingsPath()){let settings=readSettings(settingsFilePath);if(!settings||!isObject(settings.enabledPlugins))return!1;return Object.entries(settings.enabledPlugins).some(([key,on])=>on===!0&&key.split("@")[0]===PLUGIN_NAME)}function detectLegacyInstalls(opts={}){let settingsFilePath=opts.settingsFilePath??claudeSettingsPath(),home=opts.home??homedir(),settings=readSettings(settingsFilePath),legacyHooks=settings!==null&&(hasRoveActivityHooks(settings,CLAUDE_HOOK_EVENT_MAP)||settingsHasWorktreeWatch(settings)),legacySkillDirs=installedSkillDirs(home);return{legacyHooks,legacySkillDirs}}function settingsHasWorktreeWatch(settings){let hooks=isObject(settings.hooks)?settings.hooks:{};return Object.values(hooks).some((groups)=>Array.isArray(groups)&&groups.some((g)=>isObject(g)&&Array.isArray(g.hooks)&&g.hooks.some((h)=>isObject(h)&&typeof h.command==="string"&&h.command.includes("worktree-created")&&!h.command.includes("CLAUDE_PLUGIN_ROOT"))))}function migrationHint(findings,cliName){if(!findings.legacyHooks&&findings.legacySkillDirs.length===0)return null;let lines=[`${cliName}: the Rove Claude Code plugin is enabled, but legacy installs remain:`];if(findings.legacyHooks)lines.push(" \u2022 ~/.claude/settings.json still has the settings-managed Rove hooks (every event fires TWICE).",` Run \`${cliName} hook cleanup\` to remove them (only Rove's own entries are touched).`);for(let dir of findings.legacySkillDirs)lines.push(` \u2022 legacy skill copy at ${dir} (the plugin bundles the skill \u2014 two copies double-register).`," Remove that directory to keep the plugin's copy only.");return lines.push(" Reading this inside a session? Just ask your agent to run the cleanup for you."),`${lines.join(`
3
- `)}
4
- `}export{migrationHint,isRovePluginEnabled,detectLegacyInstalls};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ReleaseNotesBody,bootPaneHost,pageCloseBindings,runShellUpdater,useBindings,useT,useTheme}from"./chunk-vwg79maj.js";import"./chunk-yknavm97.js";import{$jsx,$jsxs,useRenderer}from"./chunk-29kvfqeh.js";import{require_react_production}from"./chunk-2wd4744g.js";import"./chunk-6rrzq5et.js";import"./chunk-764bsyb0.js";import"./chunk-8sbbzs5g.js";import"./chunk-atn06ncf.js";import"./chunk-zcadc92x.js";import"./chunk-vjvkkrzc.js";import"./chunk-pdvyfz3n.js";import"./chunk-55ajzrj6.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-6xppe9bj.js";import"./chunk-7z9yfnjd.js";import"./chunk-7j00hbq5.js";import"./chunk-gaf6n1ea.js";import"./chunk-ag3txfg2.js";import"./chunk-2brn8e1y.js";import"./chunk-xy8be792.js";import{BREAKING_VERSIONS,CURRENT_VERSION,breakingVersionsCrossed,fetchReleaseNotes,fetchReleaseSummaries,updateCommandFor}from"./chunk-cp5jp5mq.js";import"./chunk-40dgv828.js";import"./chunk-zk5qkkb1.js";import"./chunk-mw0ysrpd.js";import"./chunk-a7kq09ke.js";import"./chunk-prqeddy7.js";import"./chunk-zt7wfnva.js";import"./chunk-yt15y085.js";import"./chunk-032g0ahy.js";import"./chunk-q3xt0mqt.js";import"./chunk-cmp64q4j.js";import"./chunk-s5a5dyab.js";import"./chunk-md094j05.js";import"./chunk-hq9tbzqa.js";import"./chunk-pn5ygqn6.js";import"./chunk-npwzmmv9.js";import"./chunk-b39sdtt0.js";import"./chunk-nc46gddg.js";import{__toESM}from"./chunk-91sykzqq.js";import{TextAttributes}from"@opentui/core";var import_react2=__toESM(require_react_production(),1);var RELEASE_LIMIT=20;function VersionsPage(props){let{theme}=useTheme(),t=useT(),renderer=useRenderer(),[releases,setReleases]=import_react2.useState(null),[cursor,setCursor]=import_react2.useState(0),[notes,setNotes]=import_react2.useState({}),[status,setStatus]=import_react2.useState(null),selected=releases?.[cursor],crossings=selected?breakingVersionsCrossed(CURRENT_VERSION,selected.version):[],loadSummaries=props.fetchSummaries??fetchReleaseSummaries,loadNotes=props.fetchNotes??fetchReleaseNotes;import_react2.useEffect(()=>{loadSummaries(RELEASE_LIMIT).then((fetched)=>setReleases(fetched))},[loadSummaries]);let selectedVersion=selected?.version;import_react2.useEffect(()=>{if(selectedVersion===void 0||notes[selectedVersion]!==void 0)return;setNotes((cache)=>({...cache,[selectedVersion]:"loading"})),loadNotes(selectedVersion).then((fetched)=>{setNotes((cache)=>({...cache,[selectedVersion]:fetched??"missing"}))})},[selectedVersion,notes,loadNotes]);function move(delta){let count=releases?.length??0;if(count===0)return;setCursor((index)=>(index+delta+count)%count)}async function installSelected(){if(!selected)return;setStatus(t("update.statusRunningUpdater")),await new Promise((resolve)=>setTimeout(resolve,30)),await runShellUpdater({renderer,t,targetLabel:selected.version,command:updateCommandFor(selected.version)})}useBindings(()=>({bindings:[{key:"up",cmd:()=>move(-1)},{key:"down",cmd:()=>move(1)},{key:"k",cmd:()=>move(-1)},{key:"j",cmd:()=>move(1)},{key:"return",cmd:()=>void installSelected()},{key:"u",cmd:()=>void installSelected()},...pageCloseBindings(props.onClose)]}));let selectedNotes=selectedVersion===void 0?void 0:notes[selectedVersion];return $jsxs("box",{flexDirection:"column",flexGrow:1,paddingTop:1,paddingLeft:2,paddingRight:2,children:[$jsxs("box",{flexDirection:"row",justifyContent:"space-between",flexShrink:0,children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"none",children:t("update.versions.pageTitle")}),$jsx("text",{fg:theme.textMuted,wrapMode:"none",onMouseUp:props.onClose,children:t("update.versions.closeHint")})]}),$jsxs("box",{flexDirection:"row",flexGrow:1,paddingTop:1,gap:2,children:[$jsxs("box",{flexDirection:"column",width:26,flexShrink:0,children:[releases===null?$jsx("text",{fg:theme.textMuted,children:t("update.versions.loading")}):null,releases!==null&&releases.length===0?$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t("update.versions.unavailable")}):null,(releases??[]).map((release,index)=>{let active=index===cursor,tags=[release.version===CURRENT_VERSION?t("update.versions.tagCurrent"):"",index===0?t("update.versions.tagLatest"):"",BREAKING_VERSIONS.includes(release.version)?t("update.versions.tagBreaking"):""].filter(Boolean).join(" ");return $jsxs("box",{flexDirection:"row",gap:1,paddingLeft:1,backgroundColor:active?theme.primary:void 0,onMouseUp:()=>setCursor(index),children:[$jsxs("text",{fg:active?theme.selectedListItemText:theme.text,attributes:release.version===CURRENT_VERSION?TextAttributes.BOLD:void 0,wrapMode:"none",children:["v",release.version]}),tags?$jsx("text",{fg:active?theme.selectedListItemText:theme.textMuted,wrapMode:"none",children:tags}):null]},release.version)})]}),$jsxs("box",{flexDirection:"column",flexGrow:1,flexShrink:1,children:[$jsx("scrollbox",{flexGrow:1,flexShrink:1,stickyScroll:!1,verticalScrollbarOptions:{trackOptions:{foregroundColor:"transparent"}},children:$jsxs("box",{flexDirection:"column",paddingRight:1,paddingBottom:1,gap:0,children:[selectedNotes==="loading"?$jsx("text",{fg:theme.textMuted,children:t("update.loadingNotes")}):null,selectedNotes==="missing"?$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t("update.notesUnavailable")}):null,selectedNotes!==void 0&&selectedNotes!=="loading"&&selectedNotes!=="missing"?$jsx(ReleaseNotesBody,{body:selectedNotes.body}):null]})}),crossings.length>0?$jsx("text",{fg:theme.warning,wrapMode:"word",children:t("update.versions.breakingWarning",{versions:crossings.join(", ")})}):null]})]}),status?$jsx("text",{fg:theme.info,wrapMode:"word",children:status}):null,$jsx("box",{flexShrink:0,paddingTop:1,children:$jsx("text",{fg:theme.textMuted,attributes:TextAttributes.DIM,wrapMode:"none",children:t("update.versions.footerHint")})})]})}var INLINE_ROWS=24;async function startVersionsHost(){await bootPaneHost({inlineRows:INLINE_ROWS,setup:()=>({root:()=>$jsx(VersionsPage,{onClose:()=>process.exit(0)})})})}export{startVersionsHost,VersionsPage};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{VerbArgs,defaultApiRuntime,findVerb,parseFlags,unknownVerbError,validateAgainstSpec}from"./chunk-regtterm.js";import{ensurePluginEnginesLoaded}from"./chunk-n52x0ehz.js";import{ApiError,cliCaller,splitDaemonCode}from"./chunk-568q390y.js";import{errorMessage}from"./chunk-2brn8e1y.js";import{ROVE_API_VERSION}from"./chunk-md094j05.js";function toApiError(err){if(err instanceof ApiError)return err;let message=errorMessage(err);if(/task not found/i.test(message))return new ApiError(message,"TASK_NOT_FOUND",{hint:"that task id does not exist (deleted or mistyped) \u2014 list live tasks and retry with a real id",nextCommandArgs:["api","list"]});if(/unknown daemon request:/i.test(message))return versionSkewError(message);let coded=splitDaemonCode(message);if(coded)return new ApiError(coded.rest,coded.code);return new ApiError(message,"RPC_ERROR")}function versionSkewError(message){return new ApiError(message,"DAEMON_VERSION_SKEW",{hint:"the running daemon is a different build than this CLI, so it does not serve this verb \u2014 restart the daemon to pick up this build, then retry (if the verb is gone for good, `rove api schema` lists what this daemon actually serves)",nextCommandArgs:["daemon","restart"]})}function errorBody(err){return{message:err.message,code:err.code,...err.data}}function successEnvelope(result){return{apiVersion:ROVE_API_VERSION,ok:!0,result}}function errorEnvelope(err){return{apiVersion:ROVE_API_VERSION,ok:!1,error:errorBody(toApiError(err))}}function flagText(name,type,value){if(typeof value==="string")return value;if(typeof value==="boolean"&&(type==="bool"||type===void 0))return String(value);if(typeof value==="number"&&(type==="int"||type==="uint"||type===void 0))return String(value);if(Array.isArray(value)&&(type==="csv"||type===void 0)){if(!value.every((item)=>typeof item==="string"&&!item.includes(",")))throw new ApiError(`param ${name} must be a list of strings without ","`,"BAD_FLAG");return value.join(",")}throw new ApiError(`param ${name} does not fit its ${type} flag`,"BAD_FLAG")}function paramsToFlags(verb,params){let flags=new Map;for(let[name,value]of Object.entries(params))flags.set(name,flagText(name,verb.flags.find((f)=>f.name===name)?.type,value));return flags}function booleanFlagsOf(verb){return new Set(verb.flags.filter((f)=>f.type==="bool").map((f)=>f.name))}async function callVerb(verb,flags,deps){let caller=deps.caller??cliCaller();try{return await verb.handler({args:new VerbArgs(verb,flags,caller),caller,client:deps.client,runtime:deps.runtime??defaultApiRuntime})}catch(err){throw toApiError(err)}}async function runVerb(verbName,input,deps){ensurePluginEnginesLoaded();let verb=findVerb(verbName);if(!verb)throw unknownVerbError(verbName);if(verb.cliOnly&&!(deps.caller??cliCaller()).cli)throw new ApiError(`"${verbName}" streams over stdout/stdin, so only \`rove api\` can run it`,"CLI_ONLY_VERB",{hint:"run it as a CLI command on the machine whose daemon you are talking to"});let flags="argv"in input?parseFlags(input.argv,booleanFlagsOf(verb)).flags:paramsToFlags(verb,input.params);return validateAgainstSpec(verb,flags),callVerb(verb,flags,deps)}async function executeVerb(verbName,input,deps){try{return successEnvelope(await runVerb(verbName,input,deps))}catch(err){return errorEnvelope(err)}}
3
- export{toApiError,errorBody,successEnvelope,errorEnvelope,paramsToFlags,booleanFlagsOf,callVerb,runVerb,executeVerb};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{NoopHookAdapter,activityHookAdapters,createEngineHookAdapter}from"./chunk-2pen6b1t.js";import"./chunk-2tfnscxk.js";import"./chunk-w4cpkhzj.js";import"./chunk-w7zv47mp.js";import"./chunk-2brn8e1y.js";import"./chunk-964z8ccb.js";import"./chunk-x33sm4rp.js";import"./chunk-7kysxgbq.js";import"./chunk-qzsahxd9.js";import"./chunk-xy8be792.js";import"./chunk-h2m7em1e.js";import"./chunk-tdhk4dz8.js";import"./chunk-21ek142k.js";import"./chunk-40dgv828.js";import"./chunk-3342qzve.js";import"./chunk-zk5qkkb1.js";import"./chunk-mw0ysrpd.js";import"./chunk-a7kq09ke.js";import"./chunk-prqeddy7.js";import"./chunk-zt7wfnva.js";import"./chunk-yt15y085.js";import"./chunk-hq9tbzqa.js";import"./chunk-pn5ygqn6.js";import"./chunk-npwzmmv9.js";import"./chunk-b39sdtt0.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{createEngineHookAdapter,activityHookAdapters,NoopHookAdapter};
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{quoteShellArgv}from"./chunk-7kysxgbq.js";import{acquireWithRetry}from"./chunk-qzsahxd9.js";import{acquireSync,release,releaseSync}from"./chunk-mw0ysrpd.js";import{roveStateDir}from"./chunk-prqeddy7.js";import{ROVE_PRODUCT_NAME}from"./chunk-zt7wfnva.js";function isObject(v){return typeof v==="object"&&v!==null&&!Array.isArray(v)}import{fileURLToPath}from"url";function roveCliInvocation(){let cliName=ROVE_PRODUCT_NAME;if(import.meta.url.endsWith(".js"))return[cliName];let entry=fileURLToPath(new URL(`./${"rove.ts"}`,import.meta.url));return[process.execPath,"--conditions=browser",entry]}function roveHookInvocation(){if(import.meta.url.endsWith(".js"))return[ROVE_PRODUCT_NAME];if(Bun.which(ROVE_PRODUCT_NAME))return[ROVE_PRODUCT_NAME];return roveCliInvocation()}var ROVE_HOOK_VERSION=1;function roveHookArgs(vendor){return["--engine",vendor,"--hook-version",String(ROVE_HOOK_VERSION)]}var GATED_TOOL_VERBS=new Set(["tool-pre","tool-post","tool-failed"]);function parseHookSettings(raw){if(raw===void 0)return{ok:!0,doc:{}};let parsed;try{parsed=JSON.parse(raw)}catch(err){return{ok:!1,reason:`not valid JSON (${err instanceof Error?err.message:String(err)})`}}if(!isObject(parsed))return{ok:!1,reason:"top level is not a JSON object"};if(parsed.hooks===void 0)return{ok:!0,doc:parsed};if(!isObject(parsed.hooks))return{ok:!1,reason:'"hooks" is not an object'};for(let[event,groups]of Object.entries(parsed.hooks)){if(!Array.isArray(groups))return{ok:!1,reason:`"hooks.${event}" is not an array`};let bad=groups.findIndex((group)=>!isObject(group)||!Array.isArray(group.hooks));if(bad>=0)return{ok:!1,reason:`"hooks.${event}[${bad}]" is not an object with a "hooks" array`}}return{ok:!0,doc:parsed}}var HOOK_WORD=String.raw`(?:'(?:[^']|'\\'')*'|"[^"$\x60\\]*"|[A-Za-z0-9_./:=+-]+)`,HOOK_ARGV=new RegExp(`^${HOOK_WORD}(?:[ ]+${HOOK_WORD})*$`),ROVE_HOOK_FLAGS={"--engine":/^[a-z][a-z0-9-]*$/,"--hook-version":/^\d+$/};function isRoveHook(hook,verbs){if(!isObject(hook)||typeof hook.command!=="string")return!1;if(hook.type!==void 0&&hook.type!=="command")return!1;let command=hook.command.replace(/^[ \t]+|[ \t]+$/g,"");if(HOOK_ARGV.exec(command)?.[0]!==command)return!1;let argv=(command.match(new RegExp(HOOK_WORD,"g"))??[]).map((word)=>{if(word.startsWith("'"))return word.slice(1,-1).replaceAll("'\\''","'");if(word.startsWith('"'))return word.slice(1,-1);return word}),executable=argv[0]?.split("/").at(-1),offset=1;if(executable==="bun"||executable==="node"){if(argv[offset]==="--conditions=browser")offset++;let entry=argv[offset]??"";if(!/(?:^|\/)(?:src|dist)\/cli\/(?:rove|rove)\.(?:ts|js)$/.test(entry))return!1;offset++}else if(executable!=="rove"&&executable!=="rove")return!1;if(argv[offset]!=="hook"||!verbs.includes(argv[offset+1]))return!1;let rest=argv.slice(offset+2);for(let i=0;i<rest.length;i+=2){let value=rest[i+1],pattern=ROVE_HOOK_FLAGS[rest[i]??""];if(!pattern||value===void 0||!pattern.test(value))return!1}return!0}function removeRoveHooks(groups,verbs){return groups.flatMap((group)=>{if(!isObject(group)||!Array.isArray(group.hooks))return[group];let kept=group.hooks.filter((hook)=>!isRoveHook(hook,verbs));if(kept.length===group.hooks.length)return[group];return kept.length>0?[{...group,hooks:kept}]:[]})}function hasRoveActivityHooks(current,eventMap){let verbs=eventMap.map((spec)=>spec.verb),hooks=isObject(current.hooks)?current.hooks:{};return Object.values(hooks).some((groups)=>Array.isArray(groups)&&groups.some((group)=>isObject(group)&&Array.isArray(group.hooks)&&group.hooks.some((hook)=>isRoveHook(hook,verbs))))}function hookCommandQuoting(platform=process.platform){return{bareSafe:!0,windows:platform==="win32"}}function buildActivityHooks(eventMap,inv=roveHookInvocation(),opts={}){let out={},quoting=hookCommandQuoting();for(let spec of eventMap){if(opts.buildFilter&&!opts.buildFilter(spec))continue;let{event,matcher,verb}=spec,group={hooks:[{type:"command",command:quoteShellArgv([...inv,"hook",verb,...opts.extraArgs??[]],quoting)}]};if(matcher)group.matcher=matcher;let previous=out[event],groups=Array.isArray(previous)?previous:[];groups.push(group),out[event]=groups}return out}function mergeActivityHooks(current,install,eventMap,inv=roveHookInvocation(),opts={}){let verbs=eventMap.map((spec)=>spec.verb),{hooks:rawHooks,...restSettings}=current,hooks=isObject(rawHooks)?{...rawHooks}:{},built=install?buildActivityHooks(eventMap,inv,opts):{};for(let{event}of eventMap){let groups=hooks[event],prior=Array.isArray(groups)?groups:[],kept=removeRoveHooks(prior,verbs),additions=built[event];if(install&&Array.isArray(additions))kept.push(...additions);if(kept.length>0)hooks[event]=kept;else delete hooks[event]}return Object.keys(hooks).length>0?{...restSettings,hooks}:{...restSettings}}var RETIRED_WATCH_EVENT="PostToolUse";function removeWorktreeWatchHook(current){let{hooks:rawHooks,...restSettings}=current,hooks=isObject(rawHooks)?{...rawHooks}:{},groups=hooks[RETIRED_WATCH_EVENT],prior=Array.isArray(groups)?groups:[],kept=removeRoveHooks(prior,["worktree-created"]);if(kept.length>0)hooks[RETIRED_WATCH_EVENT]=kept;else delete hooks[RETIRED_WATCH_EVENT];return Object.keys(hooks).length>0?{...restSettings,hooks}:{...restSettings}}import{constants,closeSync,fstatSync,openSync,readSync}from"fs";import{open}from"fs/promises";var MAX_ENGINE_FILE_BYTES=104857600,MAX_JSONL_LINE_CHARS=8388608,READ_CHUNK_BYTES=65536,READ_FLAGS=constants.O_RDONLY|constants.O_NONBLOCK;async function readTextFileIfRegular(p,maxBytes=MAX_ENGINE_FILE_BYTES){let file=await open(p,READ_FLAGS);try{let info=await file.stat();if(!info.isFile()||info.size>maxBytes)return null;let chunks=[],total=0;while(total<=maxBytes){let buffer=Buffer.allocUnsafe(Math.min(READ_CHUNK_BYTES,maxBytes+1-total)),{bytesRead}=await file.read(buffer);if(bytesRead===0)return Buffer.concat(chunks,total).toString("utf8");chunks.push(buffer.subarray(0,bytesRead)),total+=bytesRead}return null}finally{await file.close()}}async function readTextFileBounded(p,maxBytes=MAX_ENGINE_FILE_BYTES){return await readTextFileIfRegular(p,maxBytes)??""}async function readFirstLineBounded(p,maxBytes=MAX_JSONL_LINE_CHARS){let file=await open(p,READ_FLAGS);try{if(!(await file.stat()).isFile())return"";let chunks=[],total=0,start=0,nonblank=!1;while(total<=maxBytes){let buffer=Buffer.allocUnsafe(Math.min(16384,maxBytes+1-total)),{bytesRead}=await file.read(buffer);if(!bytesRead)return Buffer.concat(chunks,total).subarray(start).toString("utf8");chunks.push(buffer.subarray(0,bytesRead));let segment=0;for(let i=0;i<bytesRead;i++){if(buffer[i]!==10)continue;nonblank||=buffer.subarray(segment,i).toString("utf8").trim().length>0;let end=total+i;if(end>maxBytes)return"";if(nonblank)return Buffer.concat(chunks,total+bytesRead).subarray(start,end).toString("utf8");start=end+1,segment=i+1}nonblank||=buffer.subarray(segment,bytesRead).toString("utf8").trim().length>0,total+=bytesRead}return""}finally{await file.close()}}function readTextFileSyncBounded(p,maxBytes=MAX_ENGINE_FILE_BYTES){try{return readTextFileIfRegularSync(p,maxBytes)}catch(err){if(err instanceof Error&&"code"in err&&err.code==="ENOENT")return null;throw err}}function readTextFileIfRegularSync(p,maxBytes=MAX_ENGINE_FILE_BYTES){let fd=openSync(p,READ_FLAGS);try{let info=fstatSync(fd);if(!info.isFile()||info.size>maxBytes)return null;let chunks=[],total=0;while(total<=maxBytes){let buffer=Buffer.allocUnsafe(Math.min(READ_CHUNK_BYTES,maxBytes+1-total)),bytesRead=readSync(fd,buffer);if(!bytesRead)return Buffer.concat(chunks,total).toString("utf8");chunks.push(buffer.subarray(0,bytesRead)),total+=bytesRead}return null}finally{closeSync(fd)}}function isJsonlLineWithinBound(line,maxChars=MAX_JSONL_LINE_CHARS){return line.length<=maxChars}import{createHash,randomBytes}from"crypto";import{mkdirSync,renameSync,unlinkSync,writeFileSync}from"fs";import{mkdir,rename,unlink,writeFile}from"fs/promises";import{dirname,join}from"path";var MAX_SHARED_CONFIG_BYTES=8388608;function stagingPath(file){return`${file}.rove-${process.pid}-${randomBytes(6).toString("hex")}.tmp`}function sharedConfigLockPath(file){return join(roveStateDir(),`shared-config-${createHash("sha256").update(file).digest("hex").slice(0,16)}.lock`)}var MAX_ATTEMPTS=5;function readSharedConfigSync(file){try{let raw=readTextFileIfRegularSync(file,MAX_SHARED_CONFIG_BYTES);if(raw===null)throw Error(`Refusing non-regular or oversized config: ${file}`);return raw}catch(err){if(err instanceof Error&&"code"in err&&err.code==="ENOENT")return;throw err}}async function readRaw(file){try{let raw=await readTextFileIfRegular(file,MAX_SHARED_CONFIG_BYTES);if(raw===null)throw Error(`Refusing non-regular or oversized config: ${file}`);return raw}catch(err){if(err instanceof Error&&"code"in err&&err.code==="ENOENT")return;throw err}}function updateSharedJsonSync(file,load,build){let lockPath=sharedConfigLockPath(file),lockToken=acquireSync(lockPath);try{for(let attempt=0;attempt<MAX_ATTEMPTS;attempt++){let before=readSharedConfigSync(file),doc=load(before);if(!doc)return;let text=build(doc);if(text===void 0)return;let tmp=stagingPath(file);try{if(mkdirSync(dirname(file),{recursive:!0}),writeFileSync(tmp,text,{mode:384,flag:"wx"}),readSharedConfigSync(file)===before){renameSync(tmp,file);return}}finally{try{unlinkSync(tmp)}catch{}}}throw Error(`gave up updating ${file} after ${MAX_ATTEMPTS} concurrent writes`)}finally{releaseSync(lockPath,lockToken)}}async function updateSharedJson(file,load,build){let lockPath=sharedConfigLockPath(file),lockToken=await acquireWithRetry(lockPath);try{for(let attempt=0;attempt<MAX_ATTEMPTS;attempt++){let before=await readRaw(file),doc=load(before);if(!doc)return;let text=build(doc);if(text===void 0)return;let tmp=stagingPath(file);try{if(await mkdir(dirname(file),{recursive:!0}),await writeFile(tmp,text,{mode:384,flag:"wx"}),await readRaw(file)===before){await rename(tmp,file);return}}finally{await unlink(tmp).catch(()=>{})}}throw Error(`gave up updating ${file} after ${MAX_ATTEMPTS} concurrent writes`)}finally{await release(lockPath,lockToken)}}async function editJsonSettings(settingsFilePath,transform,parse=parseHookSettings){let rejected;try{await updateSharedJson(settingsFilePath,(raw)=>{let parsed=parse(raw);if(parsed.ok)return parsed.doc;rejected=parsed.reason;return},(current)=>{let next=transform(current),json=JSON.stringify(next,null,2);return json===JSON.stringify(current,null,2)?void 0:`${json}
3
- `})}catch(err){return{ok:!1,file:settingsFilePath,reason:err instanceof Error?err.message:String(err)}}if(rejected!==void 0)return{ok:!1,file:settingsFilePath,reason:rejected};return{ok:!0}}class JsonHookAdapter{supportsHooks(){return!0}activityDetailFromPayload(_kind,_payload){return}sessionFromPayload(_payload){return}supportsWorktreeSync(){return!1}async removeWorktreeSyncHook(_settingsFilePath){}gatedVerbs(){return GATED_TOOL_VERBS}async installActivityHooks(settingsFilePath,opts={}){let gated=this.gatedVerbs(),outcome=await editJsonSettings(settingsFilePath,(cur)=>mergeActivityHooks(cur,!0,this.eventMap,void 0,{extraArgs:roveHookArgs(this.vendor),buildFilter:(spec)=>opts.toolEvents===!0||!gated.has(spec.verb)}));if(!outcome.ok&&!opts.quiet)process.stderr.write(`[rove hooks] ${this.vendor}: skipped ${outcome.file}: ${outcome.reason}
4
- `);return outcome}async removeActivityHooks(settingsFilePath){await editJsonSettings(settingsFilePath,(cur)=>mergeActivityHooks(cur,!1,this.eventMap))}async removeWorktreeWatchHook(settingsFilePath){await editJsonSettings(settingsFilePath,removeWorktreeWatchHook)}hookConfigRefusal(raw){let parsed=parseHookSettings(raw);return parsed.ok?void 0:parsed.reason}}import{homedir}from"os";import path from"path";var VENDOR_HOMES={claude:{envVar:"CLAUDE_CONFIG_DIR",dirName:".claude"},codex:{envVar:"CODEX_HOME",dirName:".codex"},copilot:{envVar:"COPILOT_HOME",dirName:".copilot"},kimi:{envVar:"KIMI_CODE_HOME",dirName:".kimi-code"}},AGENT_DIR_VENDORS={pi:{envVar:"PI_CODING_AGENT_DIR",dirName:".pi"},omp:{envVar:"PI_CODING_AGENT_DIR",dirName:".omp"}},defaultVendorHomeDeps={env:(name)=>process.env[name],home:()=>homedir()};function vendorWriteHomeDeps(home){return home===void 0?defaultVendorHomeDeps:{env:()=>{return},home:()=>home}}function vendorConfigHome(vendor,deps=defaultVendorHomeDeps){let{envVar,dirName}=VENDOR_HOMES[vendor],override=deps.env(envVar)?.trim();if(override)return override;return path.join(deps.home(),dirName)}function vendorAgentDir(vendor,deps=defaultVendorHomeDeps){let{envVar,dirName}=AGENT_DIR_VENDORS[vendor],override=deps.env(envVar)?.trim();if(override)return override;return path.join(deps.home(),dirName,"agent")}function depsOf(env,home){return{env,home:()=>home}}function claudeGlobalConfigPath(env,home){let override=env("CLAUDE_CONFIG_DIR")?.trim();if(override)return path.join(override,".claude.json");return path.join(home,".claude.json")}function codexAuthPath(env,home){return path.join(vendorConfigHome("codex",depsOf(env,home)),"auth.json")}function copilotConfigPath(env,home){return path.join(vendorConfigHome("copilot",depsOf(env,home)),"config.json")}function bobHome(home=homedir()){return path.join(home,".bob")}function bobTrustPath(home){return path.join(bobHome(home),"trustedFolders.json")}function bobDbPath(home){return path.join(bobHome(home),"db","bob.db")}function bobAuthSecretsPath(home){return path.join(bobHome(home),"settings","auth-secrets.json")}function kimiCredentialsPath(env,home){return path.join(vendorConfigHome("kimi",depsOf(env,home)),"credentials","kimi-code.json")}
5
- export{isObject,roveCliInvocation,roveHookInvocation,ROVE_HOOK_VERSION,roveHookArgs,GATED_TOOL_VERBS,isRoveHook,removeRoveHooks,hasRoveActivityHooks,hookCommandQuoting,readTextFileIfRegular,readTextFileBounded,readFirstLineBounded,readTextFileSyncBounded,isJsonlLineWithinBound,readSharedConfigSync,updateSharedJsonSync,editJsonSettings,JsonHookAdapter,vendorWriteHomeDeps,vendorConfigHome,vendorAgentDir,claudeGlobalConfigPath,codexAuthPath,copilotConfigPath,bobTrustPath,bobDbPath,bobAuthSecretsPath,kimiCredentialsPath};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{errorMessage}from"./chunk-2brn8e1y.js";import{loadStateFile}from"./chunk-zk5qkkb1.js";import{isDev,keybindingsConfigPath}from"./chunk-prqeddy7.js";import{createStateCell}from"./chunk-cmp64q4j.js";function hasReachableBinding(snapshot,predicate){for(let i=snapshot.length-1;i>=0;i--){let cfg=snapshot[i]?.config();if(!cfg||cfg.enabled===!1)continue;if(cfg.bindings.some(predicate))return!0;if(cfg.modal)return!1}return!1}var prefixReachable=(snapshot)=>hasReachableBinding(snapshot,(binding)=>binding.prefix===!0),inputPassthroughReachable=(snapshot)=>hasReachableBinding(snapshot,(binding)=>binding.passthrough===!0);function scanReachability(snapshot){let directIds=new Set,prefixIds=new Set,prefixReachable2=!1,inputPassthrough=!1,yieldedDirectIds=new Set,prefixOptions=[],seenPrefixKeys=new Set;for(let i=snapshot.length-1;i>=0;i--){let cfg=snapshot[i]?.config();if(!cfg||cfg.enabled===!1)continue;for(let binding of cfg.bindings){if(binding.passthrough)inputPassthrough=!0;if(binding.prefix===!0){if(prefixReachable2=!0,binding.id)prefixIds.add(binding.id);if(!seenPrefixKeys.has(binding.key))seenPrefixKeys.add(binding.key),prefixOptions.push({stroke:binding.key,action:binding.id??binding.key})}else if(binding.id){if(directIds.add(binding.id),binding.yieldToPassthrough)yieldedDirectIds.add(binding.id)}}if(cfg.modal)break}if(inputPassthrough)for(let id of yieldedDirectIds)directIds.delete(id);return{prefixReachable:prefixReachable2,inputPassthrough,prefixOptions,directIds,prefixIds}}function bindingReachability(snapshot){let{directIds,prefixIds,inputPassthrough}=scanReachability(snapshot);return{direct:directIds,prefix:prefixIds,inputPassthrough}}var PREFIX_HUD_TTL_MS=4000,PREFIX_GUIDE_DELAY_MS=180;var MAX_ENTRIES=3,realClock={now:()=>Date.now(),schedule:(fn,ms)=>{let timer=setTimeout(fn,ms);return()=>clearTimeout(timer)}},clock=realClock;function prefixHudClock(){return clock}var cell=createStateCell({guide:null,entries:[]}),nextEntryId=1,prefixHudState=cell;function prefixHudSetArmed(armed,options=[],armedAt=null){cell.update((current)=>{if(!armed)return current.guide?.kind==="prefix"?{...current,guide:null}:current;return{...current,guide:{kind:"prefix",armedAt:armedAt??clock.now(),options}}})}function prefixHudShowDirect(options){cell.update((current)=>({...current,guide:{kind:"direct",options}}))}function prefixHudHideDirect(){cell.update((current)=>current.guide?.kind==="direct"?{...current,guide:null}:current)}function prefixHudPush(entry){cell.update((current)=>({...current,guide:null,entries:[...current.entries,{...entry,id:nextEntryId++}].slice(-MAX_ENTRIES)}))}function matchKey(evt){let base=[],name=evt.name;if(name)base.push(name);if(name==="return")base.push("enter");if(name==="enter")base.push("return");if(name==="backspace"&&evt.raw==="\b"&&!evt.meta&&!evt.option)base.push("ctrl+h");if(name==="linefeed"&&!evt.meta&&!evt.option)base.push("ctrl+j");let mods=[];if(evt.ctrl)mods.push("ctrl");if(evt.meta||evt.super)mods.push("cmd");if(evt.option)mods.push("alt");let bareShiftChar=evt.shift&&name!==void 0&&name.length===1&&mods.length===0;if(evt.shift&&name&&name.length>1)mods.push("shift");if(mods.length===0){if(bareShiftChar)return[...base.map((n)=>`shift+${n}`),...base];return base}let prefix=`${mods.join("+")}+`,prefixed=base.map((n)=>prefix+n);if(evt.shift&&name!==void 0&&name.length===1&&evt.source==="kitty")return[...base.map((n)=>`${mods.join("+")}+shift+${n}`),...prefixed];return prefixed}var KITTY_MODIFIER_KEY_NAMES=["leftshift","leftctrl","leftalt","leftsuper","lefthyper","leftmeta","rightshift","rightctrl","rightalt","rightsuper","righthyper","rightmeta","iso_level3_shift","iso_level5_shift"],KITTY_MODIFIER_KEYS=new Set(KITTY_MODIFIER_KEY_NAMES);function isKittyModifierKeyName(name){return name!==void 0&&KITTY_MODIFIER_KEYS.has(name)}function isKittyModifierKeyEvent(event){return isKittyModifierKeyName(event.name)}function isCtrlModifierKeyName(name){return name==="leftctrl"||name==="rightctrl"}function prefixAction(run){return{run}}function insertRegistration(stack,reg){if(reg.modalOwner!==void 0){let firstMember=stack.findIndex((r)=>r.modalMember===reg.modalOwner);if(firstMember>=0){stack.splice(firstMember,0,reg);return}}stack.push(reg)}var dispatching=!1,DEFAULT_PREFIX_CONFIGURATION={key:"ctrl+a",timeoutMs:5000},prefixConfiguration={...DEFAULT_PREFIX_CONFIGURATION},prefixArmedAt=null,prefixArmedKey="",prefixArmedOnPassthrough=!1,prefixArmedOptions=[],prefixTimer=null;function configurePrefix(next){prefixConfiguration={...next},resetPrefixState()}function resetPrefixConfiguration(){prefixConfiguration={...DEFAULT_PREFIX_CONFIGURATION},resetPrefixState()}function currentPrefixConfiguration(){return prefixConfiguration}function prefixFirstStrokes(config=prefixConfiguration){if(config.key===null)return[];return[config.key,...config.extraKeys??[]]}function resetPrefixState(){if(prefixTimer!==null)clearTimeout(prefixTimer);prefixTimer=null,prefixArmedAt=null,prefixArmedOnPassthrough=!1,prefixArmedOptions=[],prefixHudSetArmed(!1)}function armPrefix(now,options,inputPassthrough,armedKey=prefixConfiguration.key??""){resetPrefixState(),prefixArmedAt=now,prefixArmedKey=armedKey,prefixArmedOnPassthrough=inputPassthrough,prefixArmedOptions=options.slice(),prefixTimer=setTimeout(resetPrefixState,prefixConfiguration.timeoutMs),prefixHudSetArmed(!0,options,now)}function armPrefixNow(snapshot,now=Date.now()){if(prefixConfiguration.key===null)return!1;let reach=scanReachability(snapshot);if(!reach.prefixReachable)return!1;return armPrefix(now,reach.prefixOptions,reach.inputPassthrough),!0}function invokeArmedPrefixAction(bindingStack,actionId,stroke,now=Date.now()){if(dispatching||prefixArmedAt===null)return!1;let snapshot=bindingStack.slice(),armedPrefixKey=prefixArmedKey,validOption=prefixArmedOptions.some((option)=>option.action===actionId&&option.stroke===stroke),expired=now-prefixArmedAt>prefixConfiguration.timeoutMs,crossedBoundary=inputPassthroughReachable(snapshot)!==prefixArmedOnPassthrough;if(!validOption||expired||crossedBoundary)return resetPrefixState(),!1;let hit=null;for(let i=snapshot.length-1;i>=0;i--){let reg=snapshot[i];if(!reg)continue;let cfg=reg.config();if(cfg.enabled===!1)continue;let candidate=cfg.bindings.find((binding)=>binding.prefix===!0&&binding.key===stroke);if(candidate){if(candidate.id===actionId)hit=candidate;break}if(cfg.modal)break}if(!hit?.action)return resetPrefixState(),!1;resetPrefixState(),dispatching=!0;try{return hit.action.run(),prefixHudPush({prefixKey:armedPrefixKey,stroke,action:actionId,at:now}),!0}finally{dispatching=!1}}var shadowWarned=new Set;function warnShadowedMatch(snapshot,hitIndex,candidates,prefix){for(let j=hitIndex-1;j>=0;j--){let cfg=snapshot[j]?.config();if(!cfg||cfg.enabled===!1)continue;let shadowed=cfg.bindings.find((b)=>Boolean(b.prefix)===prefix&&candidates.includes(b.key));if(shadowed){if(!shadowWarned.has(shadowed.key))shadowWarned.add(shadowed.key),console.error(`[rove keymap] "${shadowed.key}" matched two ENABLED bindings \u2014 the lower one is shadowed by LIFO order. Gate one of them off (see tui-react/lib/keymap.ts header).`);return}if(cfg.modal)return}}function dispatchMode(snapshot,evt,candidates,prefix,runCmd){for(let i=snapshot.length-1;i>=0;i--){let reg=snapshot[i];if(!reg)continue;let cfg=reg.config();if(cfg.enabled===!1)continue;let hit;for(let candidate of candidates)if(hit=cfg.bindings.find((binding)=>Boolean(binding.prefix)===prefix&&binding.key===candidate),hit)break;if(hit){if(hit.yieldToPassthrough&&inputPassthroughReachable(snapshot))continue;if(!cfg.modal&&isDev())warnShadowedMatch(snapshot,i,candidates,prefix);return runCmd(()=>hit.cmd(evt,hit.slot)),hit}if(cfg.modal)return null}return null}function dispatchKeyEvent(bindingStack,evt,now=Date.now(),opts){if(evt.defaultPrevented||dispatching)return!1;if(isKittyModifierKeyName(evt.name))return evt.preventDefault(),!0;let snapshot=bindingStack.slice(),candidates=matchKey(evt),runCmd=opts?.flushSync??((fn)=>fn());dispatching=!0;try{if(prefixArmedAt!==null&&inputPassthroughReachable(snapshot)!==prefixArmedOnPassthrough)resetPrefixState();if(prefixArmedAt!==null){let armedPrefixKey=prefixArmedKey,expired=now-prefixArmedAt>prefixConfiguration.timeoutMs;if(prefixArmedAt=null,expired)resetPrefixState();else{if(candidates.includes("escape"))return resetPrefixState(),evt.preventDefault(),!0;resetPrefixState();let hit=dispatchMode(snapshot,evt,candidates,!0,runCmd);return prefixHudPush({prefixKey:armedPrefixKey,stroke:candidates[0]??"",action:hit?hit.id??hit.key:null,at:now}),evt.preventDefault(),!0}}let firstStroke=prefixFirstStrokes().find((key)=>candidates.includes(key));if(firstStroke!==void 0){if(prefixReachable(snapshot)){let reach=scanReachability(snapshot);return armPrefix(now,reach.prefixOptions,reach.inputPassthrough,firstStroke),evt.preventDefault(),!0}}let direct=dispatchMode(snapshot,evt,candidates,!1,runCmd);if(direct){if(direct.id&&direct.key.includes("+")&&!direct.key.startsWith("shift+"))prefixHudPush({prefixKey:"",stroke:direct.key,action:direct.id??direct.key,at:now});return evt.preventDefault(),!0}return!1}finally{dispatching=!1}}import{existsSync,readFileSync}from"fs";var cached=null;function resetKeybindingsFileCache(){cached=null}function resolveConfigFile(){let canonical=keybindingsConfigPath();if(existsSync(canonical))return{canonical,found:canonical};let yml=canonical.replace(/\.yaml$/,".yml");if(existsSync(yml))return{canonical,found:yml};return{canonical,found:null}}function readKeybindingsFile(){if(cached)return cached;let{canonical,found}=resolveConfigFile();if(!found)return cached={path:canonical,exists:!1,doc:null,warnings:[]},cached;let warnings=[],doc=null;try{let text=readFileSync(found,"utf8");doc=Bun.YAML.parse(text)}catch(err){let msg=errorMessage(err);warnings.push(`could not read/parse ${found}: ${msg}`)}return cached={path:canonical,exists:!0,doc,warnings},cached}var MOD_ALIASES={ctrl:"ctrl",control:"ctrl",ctl:"ctrl",cmd:"cmd",command:"cmd",meta:"cmd",super:"cmd",win:"cmd",alt:"alt",option:"alt",opt:"alt",shift:"shift"},KEY_ALIASES={esc:"escape",spacebar:"space",pgup:"pageup",pgdn:"pagedown",pgdown:"pagedown"},KNOWN_NAMED_KEYS=new Set(["up","down","left","right","pageup","pagedown","home","end","insert","delete","backspace","tab","space","escape","enter","return",...Array.from({length:12},(_,i)=>`f${i+1}`)]),MOD_ORDER=["ctrl","cmd","alt","shift"];function normalizeChord(raw){let rawTrimmed=raw.trim(),upperLetterKey=rawTrimmed.length===1&&rawTrimmed>="A"&&rawTrimmed<="Z",trimmed=raw.trim().toLowerCase();if(!trimmed)return{error:"empty chord"};let parts=trimmed.split("+"),key=parts.pop()??"";if(key===""&&parts.length>0&&parts[parts.length-1]==="")key="+",parts.pop();if(!key)return{error:`"${raw}": no key after the modifiers`};let mods=new Set;for(let part of parts){let mod=MOD_ALIASES[part];if(!mod)return{error:`"${raw}": unknown modifier "${part}" (use ctrl / cmd / alt / shift)`};mods.add(mod)}if(key=KEY_ALIASES[key]??key,upperLetterKey)mods.add("shift");if(mods.has("shift")&&mods.size>1&&key.length===1)return{error:`"${raw}": shift with other modifiers on a single character can never match \u2014 legacy terminals send the same byte with and without shift`};let prefix=MOD_ORDER.filter((m)=>mods.has(m)).join("+"),chord=prefix?`${prefix}+${key}`:key;if(key.length>1&&!KNOWN_NAMED_KEYS.has(key))return{chord,warning:`"${raw}": unrecognized key name "${key}" \u2014 the chord may never fire`};return{chord}}function isRecord(v){return typeof v==="object"&&v!==null&&!Array.isArray(v)}function platformSectionNames(platform){if(platform==="darwin")return["darwin","macos","mac"];if(platform==="win32")return["win32","windows"];return[platform]}function extractBindingsMap(section){if(!isRecord(section))return null;let nested=section.bindings;if(isRecord(nested))return nested;return section}function extractKeybindingOverrides(doc,platform){let warnings=[];if(doc===null||doc===void 0)return{entries:[],prefixEntries:[],warnings};if(!isRecord(doc))return{entries:[],prefixEntries:[],warnings:["config root must be a YAML mapping (e.g. a top-level `bindings:` key)"]};let merged=new Map,prefixMerged=new Map,layers=[];if(doc.bindings!==void 0)if(isRecord(doc.bindings))layers.push(doc.bindings);else warnings.push("`bindings:` must be a mapping of id \u2192 chord(s)");for(let name of platformSectionNames(platform)){let section=doc[name];if(section===void 0)continue;let map=extractBindingsMap(section);if(map)layers.push(map);else warnings.push(`\`${name}:\` must be a mapping (or contain a \`bindings:\` mapping)`)}for(let layer of layers)for(let[id,value]of Object.entries(layer)){let modeValues=isRecord(value)&&(("direct"in value)||("prefix"in value))?[[merged,value.direct],[prefixMerged,value.prefix]]:[[merged,value]];for(let[target,modeValue]of modeValues){if(modeValue===void 0)continue;if(modeValue===null||modeValue===!1||Array.isArray(modeValue)&&modeValue.length===0){target.set(id,[]);continue}let rawChords=typeof modeValue==="string"?[modeValue]:Array.isArray(modeValue)?modeValue:null;if(!rawChords){warnings.push(`${id}: expected a chord string, a list of chords, or null \u2014 got ${typeof modeValue}`);continue}let chords=[],anyError=!1;for(let rawChord of rawChords){if(typeof rawChord!=="string"){warnings.push(`${id}: chord entries must be strings`),anyError=!0;continue}let result=normalizeChord(rawChord);if("error"in result){warnings.push(`${id}: ${result.error}`),anyError=!0;continue}if(result.warning)warnings.push(`${id}: ${result.warning}`);if(!chords.includes(result.chord))chords.push(result.chord)}if(chords.length===0&&anyError){warnings.push(`${id}: no valid chords \u2014 keeping the default`);continue}target.set(id,chords)}}return{entries:Array.from(merged,([id,keys])=>({id,keys})),prefixEntries:Array.from(prefixMerged,([id,keys])=>({id,keys})),warnings}}var FIXED_BINDING_IDS={"diff.review.cursor":"diff-review cursor is a fixed raw binding (j/k), not keymap-driven","diff.review.range":"diff-review range anchor is a fixed raw binding (v), not keymap-driven","diff.review.note":"diff-review note is a fixed raw binding (c), not keymap-driven","diff.review.send":"diff-review send is a fixed raw binding (s), not keymap-driven","diff.review.drop":"diff-review drop-note is a fixed raw binding (x), not keymap-driven","diff.review.reload":"preview reload is a fixed raw binding (r), not keymap-driven"};function pairContract(first,second){let layout=`alternating [${first}, ${second}] pairs`;return{layout,validateCount:(count)=>count>=2&&count%2===0?null:`needs ${layout} (an even number of chords \u2014 got ${count})`}}var SLOT_CONTRACTS={"sidebar.goto":pairContract("top (double-tap)","bottom"),"sidebar.nav":pairContract("down","up"),"files.nav":pairContract("down","up"),"sidebar.search.nav":pairContract("down","up"),"files.hierarchy":pairContract("collapse","expand"),"files.tab":pairContract("previous tab","next tab"),"app.quit":{layout:"[quit confirm, hard exit] (second chord optional)",validateCount:(count)=>count<=2?null:`needs [quit confirm, hard exit] (1 or 2 chords \u2014 got ${count})`}},NO_BARE_LETTER_SCOPES=new Set(["global","workspace","terminal"]);function scopesOverlap(a,b){return a===b||a==="global"||b==="global"}function applyKeymapOverrides(keymap,entries,fixedIds=FIXED_BINDING_IDS){let warnings=[],applied=[];for(let entry of entries){let row=keymap.find((b)=>b.id===entry.id);if(!row){warnings.push(`${entry.id}: unknown binding id (press F1 in Rove for the full list)`);continue}let fixedReason=fixedIds[entry.id];if(fixedReason){warnings.push(`${entry.id}: not customizable \u2014 ${fixedReason}`);continue}if(row.keys.length===0&&row.prefixKeys===void 0){warnings.push(`${entry.id}: not customizable \u2014 the key is handled outside the keymap (doc-only row)`);continue}let contract=SLOT_CONTRACTS[entry.id];if(contract&&entry.keys.length>0){let problem=contract.validateCount(entry.keys.length);if(problem){warnings.push(`${entry.id}: ${problem} \u2014 keeping the default`);continue}}let keys=entry.keys.filter((chord)=>{if((chord.length===1||chord.startsWith("shift+")&&chord.length===7)&&NO_BARE_LETTER_SCOPES.has(row.scope))return warnings.push(`${entry.id}: "${chord}" dropped \u2014 a bare character on a ${row.scope}-scope binding would steal typed input (add a modifier)`),!1;return!0});if(keys.length===0&&entry.keys.length>0){warnings.push(`${entry.id}: no chords survived validation \u2014 keeping the default`);continue}if(contract&&keys.length!==entry.keys.length){warnings.push(`${entry.id}: a dropped chord would shift the slot layout (${contract.layout}) \u2014 keeping the default`);continue}let defaultKeys=row.keys,mutable=row;if(mutable.keys=keys,row.hint)if(keys.length===0)mutable.hint=void 0;else row.hint.keys=keys.join("/");applied.push({id:entry.id,keys,defaultKeys})}for(let change of applied)for(let chord of change.keys){let owner=keymap.find((b)=>b.id===change.id);if(!owner)continue;for(let other of keymap){if(other.id===change.id)continue;if(!other.keys.includes(chord))continue;if(!scopesOverlap(owner.scope,other.scope))continue;warnings.push(`${change.id}: "${chord}" also fires ${other.id} (${other.scope} scope) \u2014 last registration wins; consider a different chord`)}}return{applied,warnings}}var PLATFORM_SECTIONS={darwin:["darwin","macos","mac"],linux:["linux"],win32:["win32","windows"]},VALUE_RE=/^(pane|action):\s*([A-Za-z0-9][A-Za-z0-9._:-]*\.[A-Za-z0-9][A-Za-z0-9_:-]*)$/;function sectionOf(doc,key){if(typeof doc!=="object"||doc===null)return null;let section=doc[key];if(typeof section!=="object"||section===null||Array.isArray(section))return null;return section}function collect(section,into,warnings){for(let[rawChord,rawValue]of Object.entries(section)){if(typeof rawValue!=="string"){warnings.push(`plugins: ${rawChord}: value must be a "pane:<id>" or "action:<id>" string`);continue}let match=rawValue.trim().match(VALUE_RE);if(!match){warnings.push(`plugins: ${rawChord}: \`${rawValue}\` is not pane:<plugin-id>.<local-id> or action:<...>`);continue}let chord=normalizeChord(rawChord);if("error"in chord){warnings.push(`plugins: ${rawChord}: ${chord.error}`);continue}if(chord.warning)warnings.push(`plugins: ${rawChord}: ${chord.warning}`);into.set(chord.chord,{chord:chord.chord,kind:match[1],target:match[2].trim()})}}function extractPluginKeybindings(doc,platform){let warnings=[],byChord=new Map,base=sectionOf(doc,"plugins");if(base)collect(base,byChord,warnings);for(let alias of PLATFORM_SECTIONS[platform]??[]){let overlaySection=sectionOf(doc,alias),overlay=overlaySection?sectionOf(overlaySection,"plugins"):null;if(overlay)collect(overlay,byChord,warnings)}return{entries:[...byChord.values()],warnings}}function isRecord2(value){return typeof value==="object"&&value!==null&&!Array.isArray(value)}function platformKeys(platform){if(platform==="darwin")return["darwin","macos","mac"];if(platform==="win32")return["win32","windows"];return[platform]}function collectEntries(source,warnings){let out=new Map;if(source===void 0)return out;if(!isRecord2(source))return warnings.push("prefix.bindings must be a mapping of binding id to chord(s)"),out;for(let[id,raw]of Object.entries(source)){if(raw===null||Array.isArray(raw)&&raw.length===0){out.set(id,[]);continue}let rawKeys=typeof raw==="string"?[raw]:Array.isArray(raw)?raw:null;if(!rawKeys||rawKeys.some((key)=>typeof key!=="string")){warnings.push(`prefix.bindings.${id} must be a chord string, a string list, null, or []`);continue}let keys=[],anyError=!1;for(let rawKey of rawKeys){let normalized=normalizeChord(rawKey);if("error"in normalized){warnings.push(`prefix.bindings.${id}: ${normalized.error}`),anyError=!0;continue}if(!keys.includes(normalized.chord))keys.push(normalized.chord);if(normalized.warning)warnings.push(`prefix.bindings.${id}: ${normalized.warning}`)}if(keys.length===0&&anyError){warnings.push(`prefix.bindings.${id}: no valid chords \u2014 keeping the default`);continue}out.set(id,keys)}return out}function prefixChord(raw,warnings){let normalized=normalizeChord(raw);if("error"in normalized)warnings.push(`prefix.key: ${normalized.error}`);else if(!normalized.chord.includes("+"))warnings.push("prefix.key must include a modifier");else return normalized.chord;return null}function mergePrefixKey(raw,configuration,warnings){if(raw===null||Array.isArray(raw)&&raw.length===0){configuration.key=null,configuration.extraKeys=void 0;return}let rawKeys=typeof raw==="string"?[raw]:Array.isArray(raw)?raw:null;if(!rawKeys||rawKeys.some((key)=>typeof key!=="string")){warnings.push("prefix.key must be a modifier chord, a list of them, or null");return}let keys=[];for(let rawKey of rawKeys){let chord=prefixChord(rawKey,warnings);if(chord!==null&&!keys.includes(chord))keys.push(chord)}let[primary,...extra]=keys;if(primary===void 0)return;if(configuration.key=primary,extra.length>0)configuration.extraKeys=extra;else configuration.extraKeys=void 0}function mergePrefixBlock(raw,configuration,entries,warnings){if(raw===void 0)return;if(!isRecord2(raw)){warnings.push("prefix must be a mapping");return}if("key"in raw)mergePrefixKey(raw.key,configuration,warnings);if("timeoutMs"in raw)if(typeof raw.timeoutMs!=="number"||!Number.isInteger(raw.timeoutMs)||raw.timeoutMs<100||raw.timeoutMs>1e4)warnings.push("prefix.timeoutMs must be an integer from 100 to 10000");else configuration.timeoutMs=raw.timeoutMs;for(let[id,keys]of collectEntries(raw.bindings,warnings))entries.set(id,keys)}function extractPrefixKeybindings(doc,platform){let configuration={},warnings=[],entries=new Map;if(!isRecord2(doc)){if(doc!==null&&doc!==void 0)warnings.push("keybindings document must be a mapping");return{configuration,entries:[],warnings}}mergePrefixBlock(doc.prefix,configuration,entries,warnings);for(let key of platformKeys(platform)){let overlay=doc[key];if(isRecord2(overlay))mergePrefixBlock(overlay.prefix,configuration,entries,warnings)}return{configuration,entries:[...entries].map(([id,keys])=>({id,keys})),warnings}}function applyPrefixKeymapOverrides(keymap,entries){let applied=[],warnings=[];for(let entry of entries){let row=keymap.find((candidate)=>candidate.id===entry.id);if(!row){warnings.push(`${entry.id}: unknown binding id`);continue}let mutable=row,defaultKeys=[...row.prefixKeys??[]];mutable.prefixKeys=[...entry.keys],applied.push({id:entry.id,keys:[...entry.keys],defaultKeys})}return{applied,warnings}}function resolveUserKeybindings(file,keymap,platform){if(!file.exists)return{report:{path:file.path,exists:!1,applied:[],plugins:[],warnings:[]},prefix:{...DEFAULT_PREFIX_CONFIGURATION}};let warnings=[...file.warnings],extracted=extractKeybindingOverrides(file.doc,platform);warnings.push(...extracted.warnings);let prefix=extractPrefixKeybindings(file.doc,platform);warnings.push(...prefix.warnings);let prefixConfiguration2={...DEFAULT_PREFIX_CONFIGURATION,...prefix.configuration},result=applyKeymapOverrides(keymap,extracted.entries);warnings.push(...result.warnings);let applied=[...result.applied],customPrefix=prefix.configuration.key===void 0?[]:prefixFirstStrokes(prefixConfiguration2);for(let prefixKey of customPrefix){let directOwner=keymap.find((row)=>row.keys.includes(prefixKey));if(directOwner)warnings.push(`prefix.key "${prefixKey}" collides with direct binding ${directOwner.id}`)}let prefixResult=applyPrefixKeymapOverrides(keymap,[...extracted.prefixEntries,...prefix.entries]);warnings.push(...prefixResult.warnings),applied.push(...prefixResult.applied);let plugins=extractPluginKeybindings(file.doc,platform);warnings.push(...plugins.warnings);for(let p of plugins.entries){let owner=keymap.find((row)=>row.keys.includes(p.chord));if(owner)warnings.push(`plugins: ${p.chord} shadows ${owner.id}`)}return{report:{path:file.path,exists:!0,applied,plugins:plugins.entries,warnings},prefix:prefixConfiguration2}}var CHAT_BINDINGS=[{id:"chat.tab.new",scope:"workspace",keys:["ctrl+t"],category:"Workspace",description:"New chat tab",hint:{keys:"ctrl+t"},presentation:"onePress"},{id:"chat.tab.chooseEngine",scope:"workspace",keys:["ctrl+e"],category:"Workspace",description:"New conversation \u2014 engine/shell picker with destination + context toggles",hint:{keys:"ctrl+e"},presentation:"onePress"},{id:"chat.tab.fork",scope:"workspace",keys:[],prefixKeys:["c"],category:"Workspace",description:"Fork this chat into a new tab (same Task directory, keeps the conversation)",hint:{keys:"ctrl+a c"}},{id:"chat.fork.new",scope:"workspace",keys:[],prefixKeys:["f"],category:"Workspace",description:"Quick-fork: create child task seeded with current repo/branch/model",hint:{keys:"ctrl+a f"}},{id:"chat.tab.close",scope:"workspace",keys:["ctrl+w"],prefixKeys:["w"],category:"Workspace",description:"Close chat tab",hint:{keys:"ctrl+w"},presentation:"onePress"},{id:"workspace.reopenSession",scope:"workspace",keys:["return"],category:"Workspace",description:"Reopen a session in a task whose tabs are all closed",hint:{keys:"enter"},presentation:"onePress"},{id:"chat.tab.rename",scope:"workspace",keys:["f2"],category:"Workspace",description:"Rename active chat tab",hint:{keys:"f2"},presentation:"onePress"},{id:"chat.tab.cycle-next",scope:"workspace",keys:["ctrl+]"],category:"Workspace",description:"Next chat tab",hint:{keys:"ctrl+]"},presentation:"onePress"},{id:"chat.tab.cycle-prev",scope:"workspace",keys:["ctrl+["],category:"Workspace",description:"Previous chat tab",hint:{keys:"ctrl+["},presentation:"onePress"},{id:"chat.tab.goto",scope:"workspace",keys:["1","2","3","4","5","6","7","8","9"].map((digit)=>`ctrl+${digit}`),category:"Workspace",description:"Go to chat tab N",hint:{keys:"ctrl+1-9"},presentation:"onePress"},{id:"workspace.split.right",scope:"workspace",keys:["ctrl+\\"],category:"Workspace",description:"Split right",hint:{keys:"ctrl+\\"},presentation:"onePress"},{id:"workspace.split.down",scope:"workspace",keys:["ctrl+="],category:"Workspace",description:"Split down",hint:{keys:"ctrl+="},presentation:"onePress"},{id:"workspace.split.focus-next",scope:"workspace",keys:["f3"],category:"Workspace",description:"Focus next split",hint:{keys:"f3"},presentation:"onePress"},{id:"workspace.split.close",scope:"workspace",keys:["ctrl+w"],prefixKeys:["w"],category:"Workspace",description:"Close active split (tab when unsplit)",hint:{keys:"ctrl+w"},presentation:"onePress"},{id:"workspace.split.rename",scope:"workspace",keys:["f2"],category:"Workspace",description:"Rename active split (tab when unsplit)",hint:{keys:"f2"},presentation:"onePress"}];var FILES_BINDINGS=[{id:"files.nav",scope:"files",keys:["j","k","down","up"],category:"Files",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"files.hierarchy",scope:"files",keys:["h","l","left","right"],category:"Files",description:"Collapse / expand tree level",hint:{keys:"h/l"}},{id:"files.open",scope:"files",keys:["return"],category:"Files",description:"Open file in configured editor (diff when supported)",hint:{keys:"enter"}},{id:"files.tab",scope:"files",keys:["[","]"],category:"Files",description:"Switch tab (cycle All / Changes)",hint:{keys:"[/]"}},{id:"files.refresh",scope:"files",keys:["r"],category:"Files",description:"Refresh",hint:{keys:"r"}},{id:"files.scope",scope:"files",keys:["b"],category:"Files",description:"Toggle Changes scope (working \u2194 branch vs base)",hint:{keys:"b"}},{id:"files.diff",scope:"files",keys:["d"],category:"Files",description:"Open read-only diff in a workspace tab",hint:{keys:"d"}},{id:"files.diffAll",scope:"files",keys:["shift+d"],category:"Files",description:"Open the whole worktree's diff in one workspace tab",hint:{keys:"D"}},{id:"files.openExternal",scope:"files",keys:["o"],category:"Files",description:"Open file in system default app (audio / video / pdf preview)",hint:{keys:"o"}},{id:"files.mention",scope:"files",keys:["a"],category:"Files",description:"Inject @<path> mention into the engine pane",hint:{keys:"a"}},{id:"files.createPR",scope:"global",keys:[],prefixKeys:["p","shift+p"],category:"Files",description:"Ask the agent to create a PR from the current task"},{id:"files.fixChecks",scope:"global",keys:[],prefixKeys:["k"],category:"Files",description:"Ask the agent to fix the failing PR checks"},{id:"files.syncBase",scope:"global",keys:[],prefixKeys:["u"],category:"Files",description:"Merge the base branch into this task's worktree"},{id:"diff.review.cursor",scope:"workspace",keys:[],category:"Diff review",description:"Move the line cursor over the diff",hint:{keys:"j/k"}},{id:"diff.review.range",scope:"workspace",keys:[],category:"Diff review",description:"Toggle range anchor at the cursor",hint:{keys:"v"}},{id:"diff.review.note",scope:"workspace",keys:[],category:"Diff review",description:"Add a review note at the cursor",hint:{keys:"c"}},{id:"diff.review.send",scope:"workspace",keys:[],category:"Diff review",description:"Send all unsent review notes to the engine",hint:{keys:"s"}},{id:"diff.review.drop",scope:"workspace",keys:[],category:"Diff review",description:"Drop the review note the cursor sits inside",hint:{keys:"x"}},{id:"diff.review.reload",scope:"workspace",keys:[],category:"Diff review",description:"Reload the previewed file from disk",hint:{keys:"r"}}];var INBOX_BINDINGS=[{id:"inbox.show",scope:"global",keys:[],prefixKeys:["i"],category:"Global",description:"Open Inbox"},{id:"inbox.nav",scope:"inbox",keys:["j","k","down","up"],category:"Inbox",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"inbox.open",scope:"inbox",keys:["return"],category:"Inbox",description:"Open the selected Task and Terminal Tab",hint:{keys:"enter"}},{id:"inbox.delete",scope:"inbox",keys:["d"],category:"Inbox",description:"Remove the selected Inbox item",hint:{keys:"d"}}];var SIDEBAR_BINDINGS=[{id:"sidebar.nav",scope:"sidebar",keys:["j","k","down","up"],category:"Sidebar",description:"Move cursor up/down",hint:{keys:"j/k"}},{id:"sidebar.select",scope:"sidebar",keys:["return"],category:"Sidebar",description:"Open the selected task",hint:{keys:"enter"}},{id:"sidebar.tree.open",scope:"sidebar",keys:["l","space"],category:"Sidebar",description:"Open the row under the cursor (a tab row enters its chat)",hint:{keys:"l"}},{id:"sidebar.goto",scope:"sidebar",keys:["g","shift+g"],category:"Sidebar",description:"Top / bottom of list (gg or shift-G)"},{id:"sidebar.rename",scope:"sidebar",keys:["r"],category:"Sidebar",description:"Rename task",hint:{keys:"r"}},{id:"sidebar.localMerge",scope:"sidebar",keys:["shift+m"],category:"Sidebar",description:"Reorder row (Shift+M, then j/k)",hint:{keys:"M"}},{id:"sidebar.pin",scope:"sidebar",keys:["shift+p"],category:"Sidebar",description:"Pin / unpin task at top (Shift+P)",hint:{keys:"P"}},{id:"sidebar.sort",scope:"sidebar",keys:["t"],category:"Sidebar",description:"Cycle task sort (default \u2192 recent \u2192 attention \u2192 name)",hint:{keys:"t"}},{id:"sidebar.delete",scope:"sidebar",keys:["d"],category:"Sidebar",description:"Delete task (with confirm)",hint:{keys:"d"}},{id:"sidebar.search.enter",scope:"sidebar",keys:["/"],category:"Sidebar",description:"Search tasks (fuzzy filter)",hint:{keys:"/"}},{id:"sidebar.search.nav",scope:"sidebar",keys:["down","up"],category:"Sidebar",description:"Move highlight in search results"},{id:"sidebar.search.submit",scope:"sidebar",keys:["return"],category:"Sidebar",description:"Select search match and exit search"},{id:"sidebar.search.cancel",scope:"sidebar",keys:["escape"],category:"Sidebar",description:"Cancel search (restore prior selection)"},{id:"tasks.openWorktree",scope:"sidebar",keys:["o"],category:"Tasks pane",description:"Open selected Task directory in your editor",hint:{keys:"o"}},{id:"tasks.renameBranch",scope:"sidebar",keys:["b"],category:"Tasks pane",description:"Rename the selected task's git branch",hint:{keys:"b"}},{id:"tasks.cycleEngine",scope:"sidebar",keys:["v"],category:"Tasks pane",description:"Cycle engine vendor \u2014 applies on reopen",hint:{keys:"v"}},{id:"tasks.update",scope:"sidebar",keys:["u"],category:"Tasks pane",description:"Open the update page \u2014 version check + release notes",hint:{keys:"u"}},{id:"tasks.focusEngine",scope:"sidebar",keys:["right"],category:"Tasks pane",description:"Focus the engine pane of the current window",hint:{keys:"\u2192"}}];var RoveKeymap=[{id:"palette.open",scope:"global",keys:[],prefixKeys:["/"],category:"Global",description:"Search commands"},{id:"help.open",scope:"global",keys:["f1"],category:"Global",description:"Show keybindings help",hint:{keys:"F1"},presentation:"onePress"},{id:"task.new",scope:"sidebar",keys:["n"],category:"Sidebar",description:"New task",hint:{keys:"n"}},{id:"task.new.global",scope:"global",keys:[],prefixKeys:["n"],category:"Global",description:"New task"},{id:"task.openEditor",scope:"global",keys:[],prefixKeys:["o"],category:"Global",description:"Open active Task directory in editor"},{id:"task.moveMode",scope:"global",keys:[],prefixKeys:["m"],category:"Global",description:"Reorder sidebar rows (then j/k)"},{id:"settings.open",scope:"global",keys:[],prefixKeys:[","],category:"Global",description:"Open settings"},{id:"app.refresh",scope:"global",keys:[],prefixKeys:["r"],category:"Global",description:"Refresh Rove onto the installed build (after an update)"},{id:"settings.open.sidebar",scope:"sidebar",keys:["s"],category:"Sidebar",description:"Open settings",hint:{keys:"s"}},{id:"worktrees.open.sidebar",scope:"sidebar",keys:["x"],category:"Sidebar",description:"Open worktrees",hint:{keys:"x"}},{id:"kanban.open",scope:"global",keys:[],prefixKeys:["1"],category:"Global",description:"Open kanban (issues board)"},{id:"automations.open",scope:"global",keys:[],prefixKeys:["2"],category:"Global",description:"Open routines (scheduled tasks)"},{id:"workItems.open",scope:"global",keys:[],prefixKeys:["3"],category:"Global",description:"Open GitHub issues (external tracker)"},{id:"app.quit",scope:"sidebar",keys:["q","ctrl+q"],category:"Sidebar",description:"Quit (with confirm)",hint:{keys:"q"}},{id:"focus.sidebar",scope:"workspace",keys:["ctrl+q"],category:"Workspace",description:"Back to sidebar (tasks)",hint:{keys:"ctrl+q"},presentation:"onePress"},{id:"focus.previous",scope:"global",keys:[],prefixKeys:["h"],category:"Navigation",description:"Focus previous pane (files \u2192 workspace \u2192 sidebar)"},{id:"focus.next",scope:"global",keys:["f4"],prefixKeys:["l"],category:"Navigation",description:"Focus next pane (sidebar \u2192 workspace \u2192 files)",hint:{keys:"f4"},presentation:"onePress"},{id:"attention.next",scope:"global",keys:["f7"],category:"Navigation",description:"Jump to the next available Inbox item",hint:{keys:"f7"},presentation:"onePress"},{id:"workspace.zenToggle",scope:"global",keys:[],prefixKeys:["z"],category:"Navigation",description:"Toggle zen mode (hide the files column)"},{id:"view.redraw",scope:"global",keys:[],prefixKeys:["r"],category:"Global",description:"Redraw the screen"},...SIDEBAR_BINDINGS,...CHAT_BINDINGS,...FILES_BINDINGS,...INBOX_BINDINGS,{id:"terminal.scroll-up",scope:"terminal",keys:["ctrl+pageup"],category:"Terminal",description:"Scroll scrollback up",hint:{keys:"ctrl+pgup"}},{id:"terminal.scroll-down",scope:"terminal",keys:["ctrl+pagedown"],category:"Terminal",description:"Scroll scrollback down"},{id:"terminal.reset",scope:"terminal",keys:["f5"],category:"Terminal",description:"Reset terminal \u2014 kill the current shell and respawn",hint:{keys:"f5"},presentation:"onePress"},{id:"terminal.search",scope:"terminal",keys:[],prefixKeys:["/"],category:"Terminal",description:"Search the scrollback"},{id:"terminal.search.older",scope:"terminal",keys:["up","return"],category:"Terminal",description:"Scrollback search: walk to the older match"},{id:"terminal.search.newer",scope:"terminal",keys:["down"],category:"Terminal",description:"Scrollback search: walk to the newer match"},{id:"terminal.search.cancel",scope:"terminal",keys:["escape"],category:"Terminal",description:"Close scrollback search (restore prior scroll position)"}];var SOUND_VOLUME_KEY="notifications.sound.volume",DEFAULT_SOUND_VOLUME=0.4,SOUND_VOLUME_STEPS=[0.1,0.25,0.4,0.6,0.8,1];function normalizeSoundVolume(value){let n=typeof value==="number"?value:typeof value==="string"?Number.parseFloat(value.trim()):Number.NaN;if(!Number.isFinite(n))return DEFAULT_SOUND_VOLUME;return Math.min(1,Math.max(0,n))}function nextSoundVolume(volume){let current=normalizeSoundVolume(volume),above=SOUND_VOLUME_STEPS.findIndex((step)=>step>current+0.000000001);return SOUND_VOLUME_STEPS[above<0?0:above]}function persistedSoundVolume(){return normalizeSoundVolume(loadStateFile()[SOUND_VOLUME_KEY])}
3
- export{resetKeybindingsFileCache,readKeybindingsFile,inputPassthroughReachable,bindingReachability,isKittyModifierKeyEvent,isCtrlModifierKeyName,PREFIX_HUD_TTL_MS,PREFIX_GUIDE_DELAY_MS,prefixHudClock,prefixHudState,prefixHudShowDirect,prefixHudHideDirect,prefixAction,insertRegistration,DEFAULT_PREFIX_CONFIGURATION,configurePrefix,resetPrefixConfiguration,currentPrefixConfiguration,prefixFirstStrokes,resetPrefixState,armPrefixNow,invokeArmedPrefixAction,dispatchKeyEvent,FIXED_BINDING_IDS,resolveUserKeybindings,RoveKeymap,SOUND_VOLUME_KEY,DEFAULT_SOUND_VOLUME,SOUND_VOLUME_STEPS,normalizeSoundVolume,nextSoundVolume,persistedSoundVolume};