@sma1lboy/kobe 0.8.136 → 0.8.137

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,12 +2,26 @@
2
2
 
3
3
  The published Rove CLI and PureTUI package.
4
4
 
5
+ Install it any of these ways:
6
+
7
+ ```bash
8
+ curl -fsSL https://rove.sma1lboy.me/install.sh | sh # installs Bun if needed, then Rove
9
+ npm install -g @sma1lboy/rove # npm
10
+ bun install -g @sma1lboy/rove # bun
11
+ npx @sma1lboy/rove # no install
12
+ ```
13
+
14
+ Then:
15
+
5
16
  ```bash
6
- bun install -g @sma1lboy/rove
7
17
  rove add /path/to/repo
8
18
  rove
9
19
  ```
10
20
 
21
+ The CLI runs on the Bun runtime. The published `rove` / `kobe` bins are node
22
+ launchers that re-exec through Bun, so an `npm install -g` or `npx` on a
23
+ machine without Bun still ends up with a working Rove.
24
+
11
25
  The package also keeps `kobe` as a compatibility alias. Both executable names
12
26
  copy supported legacy state into `~/.rove` and `~/.config/rove` without deleting
13
27
  or overwriting the old files; daemon-owned stores wait until the legacy writer
package/dist/cli/index.js CHANGED
@@ -297,7 +297,7 @@ ${G}
297
297
  `)}let z=rz0();for(let G of DT()){if(X&&G.vendor==="claude")continue;let W=G.globalSettingsPath();if(!W)continue;await G.installActivityHooks(W,{toolEvents:z}),await G.installWorktreeWatchHook(W)}await ym()}catch{}}function rz0(){try{for(let $ of V5().plugins){if(!$.enabled)continue;try{if(BZ($.root).manifest.events.some((Z)=>Z.on.startsWith("tool.")))return!0}catch{}}}catch{}return!1}async function ym(){let $=oz0();if($.length===0)return;let Z=x5(Rm),J=new Set([fm()]),X=az0(Z);if(X)J.add(X);for(let z of $)for(let G of J)await z.removeWorktreeSyncHook(G);if(Z!=="off")X6(Rm,"off")}async function sz0(){let $=DT().find((J)=>J.vendor==="claude"),Z=$?.globalSettingsPath();if(!$||!Z){process.stdout.write(`rove hook cleanup: no Claude hook adapter \u2014 nothing to do.
298
298
  `);return}await $.removeActivityHooks(Z),await $.removeWorktreeWatchHook(Z),process.stdout.write([`rove hook cleanup: removed Rove's settings-managed hooks from ${Z}.`,"Only Rove's own entries were touched; your other hooks are intact.","The Claude Code plugin's hooks.json now carries these events (if the plugin","is not installed, the next Rove launch reinstalls the settings-managed set).",""].join(`
299
299
  `))}async function tz0($){await ym(),process.stdout.write(["rove hook setup is deprecated and now a no-op (cleanup only).","","The old external-worktree sync used a global WorktreeCreate hook, which is","a VCS provider hook \u2014 its presence broke `claude --worktree` / EnterWorktree","in every repo. Any hook Rove previously installed has been removed.","","Sync is now automatic: a `claude --worktree` (or any session) started in a","worktree under a repo Rove already tracks is adopted as a task on launch.","To adopt existing worktrees on demand, use the New Task dialog or `rove adopt`.",""].join(`
300
- `))}var dz0=500,lz0="worktree-created",Rm="externalWorktreeSync";var PT=l(()=>{T2();wQ();vJ();jT();_T();C4();D7();u4()});var jj;var bm=l(()=>{jj={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.8.136",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://github.com/Sma1lboy/rove#readme",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react-task-dialogs":"KOBE_DEV=1 bun ./src/tui-react/component/mock-dialogs-host.tsx","dev:mock-react-filetree":"KOBE_DEV=1 bun ./src/tui-react/panes/filetree/mock-host.tsx","dev:mock-react-sidebar":"KOBE_DEV=1 bun ./src/tui-react/panes/sidebar/mock-host.tsx","dev:mock-react-terminal":"KOBE_DEV=1 bun ./src/tui-react/panes/terminal/mock-host.tsx","dev:mock-react-dialogs":"KOBE_DEV=1 bun ./src/tui-react/mock/dialogs-host.tsx","dev:mock-react-workspace":"KOBE_DEV=1 bun ./src/tui-react/workspace/mock-host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:with-web":"bun run build",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.14","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","kobe-web":"workspace:*","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]}});var km={};P$(km,{repoSlug:()=>fY,releasePageUrl:()=>wT,recommendedGlobalInstallCommand:()=>ST,isNewerSemver:()=>RT,fetchReleaseSummaries:()=>GF,fetchReleaseNotesRange:()=>ET,fetchReleaseNotes:()=>IT,compareSemver:()=>V3,checkLatestVersion:()=>yY,breakingVersionsCrossed:()=>YF,UPDATE_SCRIPT_URL:()=>Vj,UPDATE_COMMAND:()=>OZ,PACKAGE_NAME:()=>TT,CURRENT_VERSION:()=>R$,BREAKING_VERSIONS:()=>uJ});function fY(){let $=jj.repository?.url;if(!$)return null;let Z=$.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!Z||!Z[1]||!Z[2])return null;return`${Z[1]}/${Z[2]}`}function ST(){return`npm install -g ${TT}@latest`}function YF($,Z,J=uJ){let[X,z]=V3($,Z)<=0?[$,Z]:[Z,$];return J.filter((G)=>V3(G,X)>0&&V3(G,z)<=0)}async function $Y0($){let Z=new AbortController,J=setTimeout(()=>Z.abort(),_j);try{let X=$.replace("/","%2F"),z=await fetch(`https://registry.npmjs.org/${X}/latest`,{signal:Z.signal,headers:{accept:"application/json"}});if(!z.ok)return null;let G=await z.json();if(typeof G.version!=="string")return null;return G.version}catch{return null}finally{clearTimeout(J)}}function RT($,Z){return V3($,Z)>0}function V3($,Z){let J=(G)=>G.split("-")[0]??G,X=J($).split(".").map((G)=>Number.parseInt(G,10)),z=J(Z).split(".").map((G)=>Number.parseInt(G,10));for(let G=0;G<3;G++){let W=X[G]??0,H=z[G]??0;if(Number.isNaN(W)||Number.isNaN(H))return 0;if(W>H)return 1;if(W<H)return-1}return 0}async function yY($={}){let Z=process.env.KOBE_FAKE_UPDATE;if(Z)return{current:R$,latest:Z,hasUpdate:RT(Z,R$)};if(PH()&&!$.force)return null;let J=await $Y0(TT);if(!J)return null;return{current:R$,latest:J,hasUpdate:RT(J,R$)}}function vm($){if(typeof $!=="string")return null;return $.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function IT($){let Z=fY();if(!Z)return null;let J=`v${$}`,X=new AbortController,z=setTimeout(()=>X.abort(),_j);try{let G=await fetch(`https://api.github.com/repos/${Z}/releases/tags/${J}`,{signal:X.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!G.ok)return null;let W=await G.json();if(typeof W.body!=="string"||typeof W.html_url!=="string")return null;return{body:W.body,url:W.html_url,version:$}}catch{return null}finally{clearTimeout(z)}}async function ET($){let Z=fY();if(!Z)return[];let J=$.limit??100,X=new AbortController,z=setTimeout(()=>X.abort(),_j);try{let G=await fetch(`https://api.github.com/repos/${Z}/releases?per_page=${J}`,{signal:X.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!G.ok)return[];let W=await G.json();if(!Array.isArray(W))return[];return W.map((H)=>{let U=vm(H.tag_name);if(!U||typeof H.html_url!=="string"||typeof H.body!=="string")return null;if(V3(U,$.current)<=0)return null;if(V3(U,$.latest)>0)return null;return{version:U,url:H.html_url,body:H.body}}).filter((H)=>H!==null)}catch{return[]}finally{clearTimeout(z)}}async function GF($=12){let Z=fY();if(!Z)return[];let J=new AbortController,X=setTimeout(()=>J.abort(),_j);try{let z=await fetch(`https://api.github.com/repos/${Z}/releases?per_page=${$}`,{signal:J.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!z.ok)return[];let G=await z.json();if(!Array.isArray(G))return[];return G.map((W)=>{let H=vm(W.tag_name);if(!H||typeof W.html_url!=="string")return null;return{version:H,url:W.html_url}}).filter((W)=>W!==null)}catch{return[]}finally{clearTimeout(X)}}function wT($){let Z=fY();if(!Z)return null;return`https://github.com/${Z}/releases/tag/v${$}`}var R$,TT,Vj="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",OZ,uJ,_j=3000;var d8=l(()=>{bm();j5();R$=jj.version,TT=jj.name;OZ=`curl -fsSL ${Vj} | sh`;uJ=[]});var hm={};P$(hm,{stampResetGate:()=>Cj,resetGateBlockers:()=>mm,enforceResetGate:()=>fT,LAST_RUN_VERSION_KEY:()=>xT});function mm($,Z=R$,J=uJ){if(typeof $!=="string"||$.length===0)return[];let[X,z]=V3($,Z)<=0?[$,Z]:[Z,$];return J.filter((G)=>V3(G,X)>0&&V3(G,z)<=0)}function fT(){let $=$$(),Z=N4()[xT],J=mm(Z);if(J.length>0){let X=typeof Z==="string"?Z:"unknown";console.error([`${$} ${R$}: cannot start \u2014 version ${J.join(", ")} introduced breaking changes`,`(last run: ${X}). Your daemon/session state may be incompatible.`,"","Run:",` ${$} reset # stop daemon + PTY host + sessions (tasks kept)`,` ${$} reset --hard # additionally wipe the task index + UI state`,"","Then relaunch Rove. Worktrees are never touched."].join(`
300
+ `))}var dz0=500,lz0="worktree-created",Rm="externalWorktreeSync";var PT=l(()=>{T2();wQ();vJ();jT();_T();C4();D7();u4()});var jj;var bm=l(()=>{jj={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.8.137",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://github.com/Sma1lboy/rove#readme",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:mock-react-task-dialogs":"KOBE_DEV=1 bun ./src/tui-react/component/mock-dialogs-host.tsx","dev:mock-react-filetree":"KOBE_DEV=1 bun ./src/tui-react/panes/filetree/mock-host.tsx","dev:mock-react-sidebar":"KOBE_DEV=1 bun ./src/tui-react/panes/sidebar/mock-host.tsx","dev:mock-react-terminal":"KOBE_DEV=1 bun ./src/tui-react/panes/terminal/mock-host.tsx","dev:mock-react-dialogs":"KOBE_DEV=1 bun ./src/tui-react/mock/dialogs-host.tsx","dev:mock-react-workspace":"KOBE_DEV=1 bun ./src/tui-react/workspace/mock-host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:with-web":"bun run build",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.14","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","kobe-web":"workspace:*","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]}});var km={};P$(km,{repoSlug:()=>fY,releasePageUrl:()=>wT,recommendedGlobalInstallCommand:()=>ST,isNewerSemver:()=>RT,fetchReleaseSummaries:()=>GF,fetchReleaseNotesRange:()=>ET,fetchReleaseNotes:()=>IT,compareSemver:()=>V3,checkLatestVersion:()=>yY,breakingVersionsCrossed:()=>YF,UPDATE_SCRIPT_URL:()=>Vj,UPDATE_COMMAND:()=>OZ,PACKAGE_NAME:()=>TT,CURRENT_VERSION:()=>R$,BREAKING_VERSIONS:()=>uJ});function fY(){let $=jj.repository?.url;if(!$)return null;let Z=$.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!Z||!Z[1]||!Z[2])return null;return`${Z[1]}/${Z[2]}`}function ST(){return`npm install -g ${TT}@latest`}function YF($,Z,J=uJ){let[X,z]=V3($,Z)<=0?[$,Z]:[Z,$];return J.filter((G)=>V3(G,X)>0&&V3(G,z)<=0)}async function $Y0($){let Z=new AbortController,J=setTimeout(()=>Z.abort(),_j);try{let X=$.replace("/","%2F"),z=await fetch(`https://registry.npmjs.org/${X}/latest`,{signal:Z.signal,headers:{accept:"application/json"}});if(!z.ok)return null;let G=await z.json();if(typeof G.version!=="string")return null;return G.version}catch{return null}finally{clearTimeout(J)}}function RT($,Z){return V3($,Z)>0}function V3($,Z){let J=(G)=>G.split("-")[0]??G,X=J($).split(".").map((G)=>Number.parseInt(G,10)),z=J(Z).split(".").map((G)=>Number.parseInt(G,10));for(let G=0;G<3;G++){let W=X[G]??0,H=z[G]??0;if(Number.isNaN(W)||Number.isNaN(H))return 0;if(W>H)return 1;if(W<H)return-1}return 0}async function yY($={}){let Z=process.env.KOBE_FAKE_UPDATE;if(Z)return{current:R$,latest:Z,hasUpdate:RT(Z,R$)};if(PH()&&!$.force)return null;let J=await $Y0(TT);if(!J)return null;return{current:R$,latest:J,hasUpdate:RT(J,R$)}}function vm($){if(typeof $!=="string")return null;return $.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function IT($){let Z=fY();if(!Z)return null;let J=`v${$}`,X=new AbortController,z=setTimeout(()=>X.abort(),_j);try{let G=await fetch(`https://api.github.com/repos/${Z}/releases/tags/${J}`,{signal:X.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!G.ok)return null;let W=await G.json();if(typeof W.body!=="string"||typeof W.html_url!=="string")return null;return{body:W.body,url:W.html_url,version:$}}catch{return null}finally{clearTimeout(z)}}async function ET($){let Z=fY();if(!Z)return[];let J=$.limit??100,X=new AbortController,z=setTimeout(()=>X.abort(),_j);try{let G=await fetch(`https://api.github.com/repos/${Z}/releases?per_page=${J}`,{signal:X.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!G.ok)return[];let W=await G.json();if(!Array.isArray(W))return[];return W.map((H)=>{let U=vm(H.tag_name);if(!U||typeof H.html_url!=="string"||typeof H.body!=="string")return null;if(V3(U,$.current)<=0)return null;if(V3(U,$.latest)>0)return null;return{version:U,url:H.html_url,body:H.body}}).filter((H)=>H!==null)}catch{return[]}finally{clearTimeout(z)}}async function GF($=12){let Z=fY();if(!Z)return[];let J=new AbortController,X=setTimeout(()=>J.abort(),_j);try{let z=await fetch(`https://api.github.com/repos/${Z}/releases?per_page=${$}`,{signal:J.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!z.ok)return[];let G=await z.json();if(!Array.isArray(G))return[];return G.map((W)=>{let H=vm(W.tag_name);if(!H||typeof W.html_url!=="string")return null;return{version:H,url:W.html_url}}).filter((W)=>W!==null)}catch{return[]}finally{clearTimeout(X)}}function wT($){let Z=fY();if(!Z)return null;return`https://github.com/${Z}/releases/tag/v${$}`}var R$,TT,Vj="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",OZ,uJ,_j=3000;var d8=l(()=>{bm();j5();R$=jj.version,TT=jj.name;OZ=`curl -fsSL ${Vj} | sh`;uJ=[]});var hm={};P$(hm,{stampResetGate:()=>Cj,resetGateBlockers:()=>mm,enforceResetGate:()=>fT,LAST_RUN_VERSION_KEY:()=>xT});function mm($,Z=R$,J=uJ){if(typeof $!=="string"||$.length===0)return[];let[X,z]=V3($,Z)<=0?[$,Z]:[Z,$];return J.filter((G)=>V3(G,X)>0&&V3(G,z)<=0)}function fT(){let $=$$(),Z=N4()[xT],J=mm(Z);if(J.length>0){let X=typeof Z==="string"?Z:"unknown";console.error([`${$} ${R$}: cannot start \u2014 version ${J.join(", ")} introduced breaking changes`,`(last run: ${X}). Your daemon/session state may be incompatible.`,"","Run:",` ${$} reset # stop daemon + PTY host + sessions (tasks kept)`,` ${$} reset --hard # additionally wipe the task index + UI state`,"","Then relaunch Rove. Worktrees are never touched."].join(`
301
301
  `)),process.exit(1)}if(Z!==R$)Cj()}function Cj(){try{S2({[xT]:R$})}catch{}}var xT="app.lastRunVersion";var Dj=l(()=>{I2();d8();u4()});import{existsSync as cm,readFileSync as ZY0}from"fs";import{homedir as JY0}from"os";import{join as dm,resolve as um}from"path";import{fileURLToPath as XY0}from"url";function bT($=process.env){return`${$$($)} skill install`}function Aj(){let $=XY0(import.meta.url);return[um($,"../../../../../.agents/skills/kobe"),um($,"../../skills/rove")].find((J)=>cm(dm(J,"SKILL.md")))??null}function Pj($={}){let Z=$.source!==void 0?$.source:Aj(),J=$.agent===void 0?[]:typeof $.agent==="string"?[$.agent]:$.agent;return["skills","add",Z??zY0,"--skill",e3,...$.global===!1?[]:["--global"],...J.flatMap((X)=>["--agent",X])]}function gY($={}){return`npx ${Pj($).join(" ")}`}async function vT($,Z){return await Bun.spawn(["npx",...Pj({...$===void 0?{}:{agent:$},global:Z})],{stdin:"inherit",stdout:"inherit",stderr:"inherit"}).exited}function Rj($={}){let Z=$.home??JY0(),J=$.cwd??process.cwd();return[Z,J].flatMap((X)=>QY0.map((z)=>dm(X,z)))}function YY0($){let Z=$.match(/(?:rove|kobe)-skill-version:\s*(\d+)/);return Z?Number.parseInt(Z[1],10):null}function WF($){let Z=Rj($).find((z)=>cm(z));if(!Z)return{installed:!1,installedVersion:null,currentVersion:yT,stale:!1};let J=null;try{J=YY0(ZY0(Z,"utf8"))}catch{J=null}let X=J===null||J<yT;return{installed:!0,installedVersion:J,currentVersion:yT,stale:X}}function GY0(){return new Promise(($)=>{process.stdin.resume(),process.stdin.once("data",(Z)=>{process.stdin.pause(),$(String(Z))})})}async function lm($={}){let{isRovePluginEnabled:Z}=await Promise.resolve().then(() => (Oj(),Lj));if(Z())return;let J=$$(),X=bT(),z=WF();if(!z.installed){if(x5(gT)==="1")return;X6(gT,"1"),process.stderr.write(`
302
302
  ${J}: the Rove agent skill isn't installed \u2014 install it so your coding agent can drive Rove via \`${J} api\`:
303
303
  ${X}