@sma1lboy/rove 0.9.190 → 0.9.192
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/dist/cli/chunk-05jej26n.js +3 -0
- package/dist/cli/{chunk-xjnd1hwr.js → chunk-06agxrff.js} +1 -1
- package/dist/cli/{chunk-qvf2zh14.js → chunk-072m1jjt.js} +1 -1
- package/dist/cli/chunk-22jgttzv.js +3 -0
- package/dist/cli/{chunk-j7kh6qj1.js → chunk-2a3ecfth.js} +1 -1
- package/dist/cli/{chunk-p94469k0.js → chunk-2whb5300.js} +1 -1
- package/dist/cli/chunk-3xkh6kf7.js +2 -0
- package/dist/cli/chunk-40dgv828.js +4 -0
- package/dist/cli/{chunk-h3gqr77q.js → chunk-42sc0emk.js} +3 -3
- package/dist/cli/{chunk-2pv5vb5a.js → chunk-4jrad3q0.js} +1 -1
- package/dist/cli/chunk-4kyjgysj.js +3 -0
- package/dist/cli/{chunk-myewhxvp.js → chunk-646ss2m1.js} +1 -1
- package/dist/cli/{chunk-wm14aqwc.js → chunk-65b2xnba.js} +1 -1
- package/dist/cli/chunk-66ay20qj.js +1 -1
- package/dist/cli/{chunk-wdrgfezn.js → chunk-674es6he.js} +1 -1
- package/dist/cli/{chunk-mrszjfxd.js → chunk-6d7rjjbb.js} +1 -1
- package/dist/cli/{chunk-jj4x05y6.js → chunk-6e07s3qj.js} +1 -1
- package/dist/cli/chunk-6ey2nr4j.js +2 -0
- package/dist/cli/chunk-6txd5jtt.js +2 -0
- package/dist/cli/{chunk-pjk7jxjb.js → chunk-6ymf66mq.js} +1 -1
- package/dist/cli/{chunk-nn099hrx.js → chunk-738d2s48.js} +2 -2
- package/dist/cli/chunk-7vjv237v.js +8 -0
- package/dist/cli/chunk-8gmwa1fs.js +2 -0
- package/dist/cli/chunk-9756pmqx.js +2 -0
- package/dist/cli/chunk-9cca6hh0.js +4 -0
- package/dist/cli/chunk-9d4tfysz.js +1 -1
- package/dist/cli/{chunk-px6axbd9.js → chunk-9fc0j6ng.js} +1 -1
- package/dist/cli/{chunk-0pazt6mk.js → chunk-9kf9v85y.js} +1 -1
- package/dist/cli/{chunk-mqh8f3zv.js → chunk-9nv53s3m.js} +1 -1
- package/dist/cli/{chunk-hz8ynrv6.js → chunk-9qf62gnc.js} +1 -1
- package/dist/cli/chunk-9va1mbqk.js +2 -0
- package/dist/cli/{chunk-w4y5cmbs.js → chunk-9vqkh1jv.js} +1 -1
- package/dist/cli/chunk-9ydhv2zb.js +3 -0
- package/dist/cli/{chunk-7jkf3tvr.js → chunk-aep7gvh4.js} +2 -2
- package/dist/cli/chunk-bq9shn2d.js +4 -0
- package/dist/cli/{chunk-j6tmzwc9.js → chunk-c60a4k2q.js} +1 -1
- package/dist/cli/{chunk-kyr0cyq1.js → chunk-c8xm2s8h.js} +1 -1
- package/dist/cli/{chunk-1x7xjh3h.js → chunk-cckrwr2v.js} +1 -1
- package/dist/cli/chunk-d4fvkzp3.js +1 -1
- package/dist/cli/{chunk-ectyq178.js → chunk-d7bdt1td.js} +1 -1
- package/dist/cli/{chunk-mamm5f66.js → chunk-day3fqg9.js} +1 -1
- package/dist/cli/{chunk-rc0sqhdh.js → chunk-dg8bsyb9.js} +1 -1
- package/dist/cli/chunk-e4804kqb.js +2 -0
- package/dist/cli/chunk-ejbhw0y1.js +2 -0
- package/dist/cli/{chunk-p0zrjj7n.js → chunk-f60f0zqm.js} +3 -3
- package/dist/cli/{chunk-hgczkz57.js → chunk-fcd3w4v9.js} +2 -2
- package/dist/cli/{chunk-5ygc7rce.js → chunk-fgn4qk9p.js} +1 -1
- package/dist/cli/{chunk-hex5xwyk.js → chunk-fgx4gnwc.js} +1 -1
- package/dist/cli/{chunk-1mdah6n8.js → chunk-frprsqdw.js} +1 -1
- package/dist/cli/{chunk-ar48zb4b.js → chunk-g1jhm3pb.js} +1 -1
- package/dist/cli/chunk-g8ap5366.js +4 -0
- package/dist/cli/chunk-gg6p708e.js +2 -0
- package/dist/cli/{chunk-9n3agxv0.js → chunk-grdk12w7.js} +1 -1
- package/dist/cli/chunk-hkx2y96a.js +1 -1
- package/dist/cli/{chunk-a0ytx1ab.js → chunk-hxmzxn22.js} +1 -1
- package/dist/cli/{chunk-bkm7vxr5.js → chunk-j5przd8x.js} +1 -1
- package/dist/cli/chunk-k6nxyxyh.js +3 -0
- package/dist/cli/chunk-k9xpebq8.js +1 -1
- package/dist/cli/chunk-kks0vy2x.js +2 -0
- package/dist/cli/{chunk-r9gfh1zz.js → chunk-krpsfcda.js} +1 -1
- package/dist/cli/chunk-kx3kydwv.js +4 -0
- package/dist/cli/{chunk-vvyg65jf.js → chunk-ms69jdrr.js} +1 -1
- package/dist/cli/{chunk-ex0tesmv.js → chunk-ms9pzccb.js} +1 -1
- package/dist/cli/{chunk-dc8hk7a7.js → chunk-n4zhfjrv.js} +1 -1
- package/dist/cli/chunk-na3tmp41.js +2 -0
- package/dist/cli/chunk-ndtbxgyp.js +1 -1
- package/dist/cli/{chunk-86938f2g.js → chunk-np8mrc2m.js} +2 -2
- package/dist/cli/{chunk-61ak2y9n.js → chunk-p4wqpc6a.js} +6 -6
- package/dist/cli/chunk-pf4jey48.js +2 -0
- package/dist/cli/{chunk-hm1fg4b1.js → chunk-pkckq6ns.js} +1 -1
- package/dist/cli/{chunk-p3stdyd2.js → chunk-psgaps88.js} +1 -1
- package/dist/cli/{chunk-gc1x5v4n.js → chunk-qadaqgnz.js} +1 -1
- package/dist/cli/{chunk-0rsjdc2p.js → chunk-r120ye6v.js} +1 -1
- package/dist/cli/{chunk-pdnq8dbm.js → chunk-r92b9j14.js} +1 -1
- package/dist/cli/chunk-s0snbj93.js +2 -0
- package/dist/cli/chunk-s9y0ebgh.js +2 -0
- package/dist/cli/{chunk-8s5yzt7z.js → chunk-sceaevbq.js} +2 -2
- package/dist/cli/{chunk-sms43h4t.js → chunk-sz0fjg3e.js} +1 -1
- package/dist/cli/chunk-tfqyddnn.js +7 -0
- package/dist/cli/{chunk-18rdsr2j.js → chunk-tgafcwp9.js} +1 -1
- package/dist/cli/{chunk-xqdhp9y5.js → chunk-th4jd4sd.js} +2 -2
- package/dist/cli/chunk-ts0078by.js +2 -0
- package/dist/cli/{chunk-92d2t5sk.js → chunk-v3fqkype.js} +1 -1
- package/dist/cli/{chunk-p682ggqt.js → chunk-vas2mpdv.js} +2 -2
- package/dist/cli/chunk-whe3w5jh.js +8 -0
- package/dist/cli/{chunk-r85jw4qg.js → chunk-x2c7ehve.js} +1 -1
- package/dist/cli/{chunk-jpdf97cx.js → chunk-xd9kw4hh.js} +1 -1
- package/dist/cli/{chunk-d3qmrnc6.js → chunk-xdc8zk9x.js} +1 -1
- package/dist/cli/{chunk-f48pdjby.js → chunk-yhhkw0az.js} +1 -1
- package/dist/cli/chunk-yk2q890q.js +2 -0
- package/dist/cli/chunk-yqffntmy.js +2 -0
- package/dist/cli/chunk-yybpg7fh.js +10 -0
- package/dist/cli/{chunk-71k66b8f.js → chunk-zb55a46t.js} +124 -5
- package/dist/cli/{chunk-vhq2dhx2.js → chunk-ztwz2465.js} +1 -1
- package/dist/cli/chunk-zw9q9da9.js +2 -0
- package/dist/cli/index.js +7 -7
- package/dist/cli/kobe.js +1 -1
- package/dist/cli/rove.js +1 -1
- package/dist/completions/kobe.bash +25 -0
- package/dist/completions/kobe.fish +27 -0
- package/dist/completions/kobe.zsh +35 -0
- package/dist/completions/rove.bash +25 -0
- package/dist/completions/rove.fish +27 -0
- package/dist/completions/rove.zsh +35 -0
- package/dist/skills/rove/SKILL.md +1 -1
- package/dist/skills/rove/references/api-flags.md +2 -2
- package/package.json +2 -2
- package/dist/cli/chunk-0waq0d0k.js +0 -2
- package/dist/cli/chunk-16rt509n.js +0 -2
- package/dist/cli/chunk-1b0cmce4.js +0 -2
- package/dist/cli/chunk-2w9pqcc3.js +0 -12
- package/dist/cli/chunk-55qxr553.js +0 -2
- package/dist/cli/chunk-5zh5fcpe.js +0 -4
- package/dist/cli/chunk-8v4hq025.js +0 -2
- package/dist/cli/chunk-9nngww22.js +0 -8
- package/dist/cli/chunk-ba4c8qjw.js +0 -2
- package/dist/cli/chunk-bq3fyc0p.js +0 -3
- package/dist/cli/chunk-bsg826q0.js +0 -2
- package/dist/cli/chunk-bveqt1bn.js +0 -2
- package/dist/cli/chunk-c2aqag1z.js +0 -2
- package/dist/cli/chunk-d6x4gama.js +0 -7
- package/dist/cli/chunk-ejqs2ta9.js +0 -3
- package/dist/cli/chunk-f01z7hw8.js +0 -2
- package/dist/cli/chunk-f62n9xqs.js +0 -2
- package/dist/cli/chunk-g2e1dmxh.js +0 -4
- package/dist/cli/chunk-g6x26jt2.js +0 -2
- package/dist/cli/chunk-gq81y9jt.js +0 -2
- package/dist/cli/chunk-kkt6ct7g.js +0 -4
- package/dist/cli/chunk-nhsr87w7.js +0 -2
- package/dist/cli/chunk-nk1d8t3a.js +0 -3
- package/dist/cli/chunk-p9gnqtfe.js +0 -2
- package/dist/cli/chunk-r8j5zpt9.js +0 -2
- package/dist/cli/chunk-t6mq1dnw.js +0 -3
- package/dist/cli/chunk-w7a39tk8.js +0 -2
- package/dist/cli/chunk-xqw5d5rv.js +0 -3
- package/dist/cli/chunk-zj8y4f4x.js +0 -4
package/dist/cli/rove.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{join as z1}from"node:path";import{createInterface as $1}from"node:readline/promises";import{pathToFileURL as J1}from"node:url";import{spawnSync as j}from"node:child_process";import{constants as m,accessSync as u}from"node:fs";import{homedir as l}from"node:os";import{basename as t,delimiter as o,dirname as r,join as Y}from"node:path";import{fileURLToPath as O}from"node:url";var g={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.
|
|
2
|
+
import{join as z1}from"node:path";import{createInterface as $1}from"node:readline/promises";import{pathToFileURL as J1}from"node:url";import{spawnSync as j}from"node:child_process";import{constants as m,accessSync as u}from"node:fs";import{homedir as l}from"node:os";import{basename as t,delimiter as o,dirname as r,join as Y}from"node:path";import{fileURLToPath as O}from"node:url";var g={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.192",description:"Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/completions","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://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts",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 scripts/render-track.mjs",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8","smol-toml":"^1.7.1",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.19","@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","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]};var C="rove",V="kobe";var T=V;var k=C;var d="ROVE_INVOKED_AS";function F(W=process.env){return W[d]===k?k:T}var x="ROVE_BUN",i="ROVE_NO_BUN_BOOTSTRAP",B="ROVE_SKIP_BUN_CHECK",G=g.engines.bun.match(/\d+\.\d+\.\d+/)?.[0]??"0.0.0",A=(W)=>{try{return u(W,m.X_OK),!0}catch{return!1}},a=(W)=>W==="win32"?"bun.exe":"bun",n=(W)=>{let b=j(W,["--version"],{encoding:"utf8",timeout:5000});if(b.error||b.status!==0)return null;return b.stdout?.split(`
|
|
3
3
|
`)[0]?.trim()??""};function L(W){return W.trim().match(/^v?(\d+\.\d+\.\d+)/)?.[1]??null}function K(W,b=G){let z=L(W),Q=L(b);if(!z||!Q)return!0;let J=z.split(".").map(Number),$=Q.split(".").map(Number);for(let X=0;X<3;X++){let H=J[X]??0,q=$[X]??0;if(H!==q)return H>q}return!0}function P(W=process.env){return W[B]==="1"}function h(W={}){let b=W.env??process.env,z=W.platform??process.platform,Q=W.home??b.HOME??b.USERPROFILE??l(),J=a(z),$=[],X=b[x]?.trim();if(X)$.push(X);for(let U of(b.PATH??b.Path??"").split(o))if(U)$.push(Y(U,J));let H=b.BUN_INSTALL?.trim();if(H)$.push(Y(H,"bin",J));if(Q)$.push(Y(Q,".bun","bin",J));let q=W.launcherDir;if(q)$.push(Y(q,"..","..","node_modules","bun","bin",J)),$.push(Y(q,"..","..","..","bun","bin",J));return $}function e(W={}){let b=W.isExecutable??A;return h(W).find((z)=>b(z))??null}function D(W={}){let b=W.isExecutable??A,z=W.bunVersionOf??n;if(P(W.env??process.env))return{bun:e(W),stale:null,unusable:null};let Q=null,J=null;for(let $ of h(W)){if(!b($))continue;let X=z($);if(X===null){J??=$;continue}if(K(X))return{bun:$,stale:Q,unusable:J};Q??={path:$,version:L(X)??X}}return{bun:null,stale:Q,unusable:J}}function p(W){return r(O(W))}function I(W){return t(O(W)).replace(/\.[cm]?[jt]s$/,"")}function W1(W=process.platform){return W==="win32"?["powershell","-NoProfile","-Command","irm bun.sh/install.ps1 | iex"]:["bash","-c","curl -fsSL https://bun.sh/install | bash"]}function R(W=F(),b=process.platform){let z=b==="win32"?'powershell -c "irm bun.sh/install.ps1 | iex"':"curl -fsSL https://bun.sh/install | bash";return[`${W}: Rove runs on the Bun runtime, and no Bun was found on this machine.`,"","Install Bun, then run this command again:",` ${z}`," npm install -g bun # any platform, if you already have npm","","Or install Bun and Rove together in one step:"," curl -fsSL https://rove.run/install.sh | sh","",`Already have Bun somewhere unusual? Point Rove at it: ${x}=/path/to/bun`,""].join(`
|
|
4
4
|
`)}function w(W,b,z=F()){return[`${z}: this machine's Bun is too old for Rove — found ${b} at ${W}, need ${G} or newer.`,"","Rove's terminals are built on Bun's PTY API. An older Bun ignores it silently,","so every terminal and engine tab would open empty and stay empty.","","Upgrade Bun, then run this command again:"," bun upgrade # Bun installed itself (~/.bun)"," brew upgrade bun # Homebrew"," npm install -g bun@latest # npm-managed Bun","",`Have a newer Bun elsewhere? Point Rove at it: ${x}=/path/to/bun`,`Run on this one anyway (unsupported, terminals will be blank): ${B}=1`,""].join(`
|
|
5
5
|
`)}function y(W,b=F()){return[`${b}: the Bun at ${W} could not be run — \`${W} --version\` failed or never returned.`,"","Rove skipped it rather than starting through it, which would hang or fail","with a message from that binary instead of this one.","","Reinstall Bun, then run this command again:"," curl -fsSL https://bun.sh/install | bash","",`Have a working Bun elsewhere? Point Rove at it: ${x}=/path/to/bun`,""].join(`
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# kobe bash completions
|
|
2
|
+
# Source: kobe completions bash
|
|
3
|
+
|
|
4
|
+
_kobe() {
|
|
5
|
+
local cur prev
|
|
6
|
+
COMPREPLY=()
|
|
7
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
8
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
9
|
+
if [[ ${COMP_CWORD} -eq 1 ]]; then
|
|
10
|
+
COMPREPLY=( $(compgen -W "completions add remove adopt export repo api daemon machine doctor config reset theme skill plugin feedback update" -- "${cur}") )
|
|
11
|
+
return
|
|
12
|
+
fi
|
|
13
|
+
if [[ ${COMP_CWORD} -eq 2 ]]; then
|
|
14
|
+
case "${prev}" in
|
|
15
|
+
api) COMPREPLY=( $(compgen -W "schema engine-list list get-task pty-list collect digest agent-turns inspect read-output watch add send dispatch interrupt note note-list note-delete pane-open pane-close tab-close notify prompt engine-report set-active feedback issue-list issue-create issue-set-status issue-update issue-delete routine-list routine-create routine-update routine-set-enabled routine-delete routine-run-now routine-runs workitem-list workitem-start rename set-branch set-command set-effort set-status pin land delete ensure-worktree remove-worktree discover-adoptable adopt" -- "${cur}") ) ;;
|
|
16
|
+
daemon) COMPREPLY=( $(compgen -W "status start stop restart" -- "${cur}") ) ;;
|
|
17
|
+
machine) COMPREPLY=( $(compgen -W "add remove list" -- "${cur}") ) ;;
|
|
18
|
+
plugin) COMPREPLY=( $(compgen -W "install link list search outdated update enable disable unlink uninstall config-dir log action pane" -- "${cur}") ) ;;
|
|
19
|
+
repo) COMPREPLY=( $(compgen -W "show set unset" -- "${cur}") ) ;;
|
|
20
|
+
skill) COMPREPLY=( $(compgen -W "install status command print" -- "${cur}") ) ;;
|
|
21
|
+
theme) COMPREPLY=( $(compgen -W "list add remove" -- "${cur}") ) ;;
|
|
22
|
+
esac
|
|
23
|
+
fi
|
|
24
|
+
}
|
|
25
|
+
complete -F _kobe kobe
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# kobe fish completions
|
|
2
|
+
# Source: kobe completions fish
|
|
3
|
+
|
|
4
|
+
complete -c kobe -f -n __fish_use_subcommand -a completions
|
|
5
|
+
complete -c kobe -f -n __fish_use_subcommand -a add
|
|
6
|
+
complete -c kobe -f -n __fish_use_subcommand -a remove
|
|
7
|
+
complete -c kobe -f -n __fish_use_subcommand -a adopt
|
|
8
|
+
complete -c kobe -f -n __fish_use_subcommand -a export
|
|
9
|
+
complete -c kobe -f -n __fish_use_subcommand -a repo
|
|
10
|
+
complete -c kobe -f -n __fish_use_subcommand -a api
|
|
11
|
+
complete -c kobe -f -n __fish_use_subcommand -a daemon
|
|
12
|
+
complete -c kobe -f -n __fish_use_subcommand -a machine
|
|
13
|
+
complete -c kobe -f -n __fish_use_subcommand -a doctor
|
|
14
|
+
complete -c kobe -f -n __fish_use_subcommand -a config
|
|
15
|
+
complete -c kobe -f -n __fish_use_subcommand -a reset
|
|
16
|
+
complete -c kobe -f -n __fish_use_subcommand -a theme
|
|
17
|
+
complete -c kobe -f -n __fish_use_subcommand -a skill
|
|
18
|
+
complete -c kobe -f -n __fish_use_subcommand -a plugin
|
|
19
|
+
complete -c kobe -f -n __fish_use_subcommand -a feedback
|
|
20
|
+
complete -c kobe -f -n __fish_use_subcommand -a update
|
|
21
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from api" -a "schema engine-list list get-task pty-list collect digest agent-turns inspect read-output watch add send dispatch interrupt note note-list note-delete pane-open pane-close tab-close notify prompt engine-report set-active feedback issue-list issue-create issue-set-status issue-update issue-delete routine-list routine-create routine-update routine-set-enabled routine-delete routine-run-now routine-runs workitem-list workitem-start rename set-branch set-command set-effort set-status pin land delete ensure-worktree remove-worktree discover-adoptable adopt"
|
|
22
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from daemon" -a "status start stop restart"
|
|
23
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from machine" -a "add remove list"
|
|
24
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from plugin" -a "install link list search outdated update enable disable unlink uninstall config-dir log action pane"
|
|
25
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from repo" -a "show set unset"
|
|
26
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from skill" -a "install status command print"
|
|
27
|
+
complete -c kobe -f -n "__fish_seen_subcommand_from theme" -a "list add remove"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#compdef kobe
|
|
2
|
+
# kobe zsh completions
|
|
3
|
+
# Source: kobe completions zsh
|
|
4
|
+
|
|
5
|
+
_kobe() {
|
|
6
|
+
local -a subcommands verbs
|
|
7
|
+
subcommands=("completions" "add" "remove" "adopt" "export" "repo" "api" "daemon" "machine" "doctor" "config" "reset" "theme" "skill" "plugin" "feedback" "update")
|
|
8
|
+
|
|
9
|
+
if (( CURRENT == 2 )); then
|
|
10
|
+
_describe -t commands 'subcommand' subcommands
|
|
11
|
+
return
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
verbs=()
|
|
15
|
+
case "${words[2]}" in
|
|
16
|
+
api) verbs=("schema" "engine-list" "list" "get-task" "pty-list" "collect" "digest" "agent-turns" "inspect" "read-output" "watch" "add" "send" "dispatch" "interrupt" "note" "note-list" "note-delete" "pane-open" "pane-close" "tab-close" "notify" "prompt" "engine-report" "set-active" "feedback" "issue-list" "issue-create" "issue-set-status" "issue-update" "issue-delete" "routine-list" "routine-create" "routine-update" "routine-set-enabled" "routine-delete" "routine-run-now" "routine-runs" "workitem-list" "workitem-start" "rename" "set-branch" "set-command" "set-effort" "set-status" "pin" "land" "delete" "ensure-worktree" "remove-worktree" "discover-adoptable" "adopt") ;;
|
|
17
|
+
daemon) verbs=("status" "start" "stop" "restart") ;;
|
|
18
|
+
machine) verbs=("add" "remove" "list") ;;
|
|
19
|
+
plugin) verbs=("install" "link" "list" "search" "outdated" "update" "enable" "disable" "unlink" "uninstall" "config-dir" "log" "action" "pane") ;;
|
|
20
|
+
repo) verbs=("show" "set" "unset") ;;
|
|
21
|
+
skill) verbs=("install" "status" "command" "print") ;;
|
|
22
|
+
theme) verbs=("list" "add" "remove") ;;
|
|
23
|
+
esac
|
|
24
|
+
if (( CURRENT == 3 && ${#verbs} > 0 )); then
|
|
25
|
+
_describe -t verbs 'verb' verbs
|
|
26
|
+
fi
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Autoloaded from $fpath -> run as the completion function;
|
|
30
|
+
# sourced directly -> register with compdef instead.
|
|
31
|
+
if [ "${funcstack[1]}" = "_kobe" ]; then
|
|
32
|
+
_kobe "$@"
|
|
33
|
+
elif (( $+functions[compdef] )); then
|
|
34
|
+
compdef _kobe kobe
|
|
35
|
+
fi
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# rove bash completions
|
|
2
|
+
# Source: rove completions bash
|
|
3
|
+
|
|
4
|
+
_rove() {
|
|
5
|
+
local cur prev
|
|
6
|
+
COMPREPLY=()
|
|
7
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
8
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
9
|
+
if [[ ${COMP_CWORD} -eq 1 ]]; then
|
|
10
|
+
COMPREPLY=( $(compgen -W "completions add remove adopt export repo api daemon machine doctor config reset theme skill plugin feedback update" -- "${cur}") )
|
|
11
|
+
return
|
|
12
|
+
fi
|
|
13
|
+
if [[ ${COMP_CWORD} -eq 2 ]]; then
|
|
14
|
+
case "${prev}" in
|
|
15
|
+
api) COMPREPLY=( $(compgen -W "schema engine-list list get-task pty-list collect digest agent-turns inspect read-output watch add send dispatch interrupt note note-list note-delete pane-open pane-close tab-close notify prompt engine-report set-active feedback issue-list issue-create issue-set-status issue-update issue-delete routine-list routine-create routine-update routine-set-enabled routine-delete routine-run-now routine-runs workitem-list workitem-start rename set-branch set-command set-effort set-status pin land delete ensure-worktree remove-worktree discover-adoptable adopt" -- "${cur}") ) ;;
|
|
16
|
+
daemon) COMPREPLY=( $(compgen -W "status start stop restart" -- "${cur}") ) ;;
|
|
17
|
+
machine) COMPREPLY=( $(compgen -W "add remove list" -- "${cur}") ) ;;
|
|
18
|
+
plugin) COMPREPLY=( $(compgen -W "install link list search outdated update enable disable unlink uninstall config-dir log action pane" -- "${cur}") ) ;;
|
|
19
|
+
repo) COMPREPLY=( $(compgen -W "show set unset" -- "${cur}") ) ;;
|
|
20
|
+
skill) COMPREPLY=( $(compgen -W "install status command print" -- "${cur}") ) ;;
|
|
21
|
+
theme) COMPREPLY=( $(compgen -W "list add remove" -- "${cur}") ) ;;
|
|
22
|
+
esac
|
|
23
|
+
fi
|
|
24
|
+
}
|
|
25
|
+
complete -F _rove rove
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# rove fish completions
|
|
2
|
+
# Source: rove completions fish
|
|
3
|
+
|
|
4
|
+
complete -c rove -f -n __fish_use_subcommand -a completions
|
|
5
|
+
complete -c rove -f -n __fish_use_subcommand -a add
|
|
6
|
+
complete -c rove -f -n __fish_use_subcommand -a remove
|
|
7
|
+
complete -c rove -f -n __fish_use_subcommand -a adopt
|
|
8
|
+
complete -c rove -f -n __fish_use_subcommand -a export
|
|
9
|
+
complete -c rove -f -n __fish_use_subcommand -a repo
|
|
10
|
+
complete -c rove -f -n __fish_use_subcommand -a api
|
|
11
|
+
complete -c rove -f -n __fish_use_subcommand -a daemon
|
|
12
|
+
complete -c rove -f -n __fish_use_subcommand -a machine
|
|
13
|
+
complete -c rove -f -n __fish_use_subcommand -a doctor
|
|
14
|
+
complete -c rove -f -n __fish_use_subcommand -a config
|
|
15
|
+
complete -c rove -f -n __fish_use_subcommand -a reset
|
|
16
|
+
complete -c rove -f -n __fish_use_subcommand -a theme
|
|
17
|
+
complete -c rove -f -n __fish_use_subcommand -a skill
|
|
18
|
+
complete -c rove -f -n __fish_use_subcommand -a plugin
|
|
19
|
+
complete -c rove -f -n __fish_use_subcommand -a feedback
|
|
20
|
+
complete -c rove -f -n __fish_use_subcommand -a update
|
|
21
|
+
complete -c rove -f -n "__fish_seen_subcommand_from api" -a "schema engine-list list get-task pty-list collect digest agent-turns inspect read-output watch add send dispatch interrupt note note-list note-delete pane-open pane-close tab-close notify prompt engine-report set-active feedback issue-list issue-create issue-set-status issue-update issue-delete routine-list routine-create routine-update routine-set-enabled routine-delete routine-run-now routine-runs workitem-list workitem-start rename set-branch set-command set-effort set-status pin land delete ensure-worktree remove-worktree discover-adoptable adopt"
|
|
22
|
+
complete -c rove -f -n "__fish_seen_subcommand_from daemon" -a "status start stop restart"
|
|
23
|
+
complete -c rove -f -n "__fish_seen_subcommand_from machine" -a "add remove list"
|
|
24
|
+
complete -c rove -f -n "__fish_seen_subcommand_from plugin" -a "install link list search outdated update enable disable unlink uninstall config-dir log action pane"
|
|
25
|
+
complete -c rove -f -n "__fish_seen_subcommand_from repo" -a "show set unset"
|
|
26
|
+
complete -c rove -f -n "__fish_seen_subcommand_from skill" -a "install status command print"
|
|
27
|
+
complete -c rove -f -n "__fish_seen_subcommand_from theme" -a "list add remove"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#compdef rove
|
|
2
|
+
# rove zsh completions
|
|
3
|
+
# Source: rove completions zsh
|
|
4
|
+
|
|
5
|
+
_rove() {
|
|
6
|
+
local -a subcommands verbs
|
|
7
|
+
subcommands=("completions" "add" "remove" "adopt" "export" "repo" "api" "daemon" "machine" "doctor" "config" "reset" "theme" "skill" "plugin" "feedback" "update")
|
|
8
|
+
|
|
9
|
+
if (( CURRENT == 2 )); then
|
|
10
|
+
_describe -t commands 'subcommand' subcommands
|
|
11
|
+
return
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
verbs=()
|
|
15
|
+
case "${words[2]}" in
|
|
16
|
+
api) verbs=("schema" "engine-list" "list" "get-task" "pty-list" "collect" "digest" "agent-turns" "inspect" "read-output" "watch" "add" "send" "dispatch" "interrupt" "note" "note-list" "note-delete" "pane-open" "pane-close" "tab-close" "notify" "prompt" "engine-report" "set-active" "feedback" "issue-list" "issue-create" "issue-set-status" "issue-update" "issue-delete" "routine-list" "routine-create" "routine-update" "routine-set-enabled" "routine-delete" "routine-run-now" "routine-runs" "workitem-list" "workitem-start" "rename" "set-branch" "set-command" "set-effort" "set-status" "pin" "land" "delete" "ensure-worktree" "remove-worktree" "discover-adoptable" "adopt") ;;
|
|
17
|
+
daemon) verbs=("status" "start" "stop" "restart") ;;
|
|
18
|
+
machine) verbs=("add" "remove" "list") ;;
|
|
19
|
+
plugin) verbs=("install" "link" "list" "search" "outdated" "update" "enable" "disable" "unlink" "uninstall" "config-dir" "log" "action" "pane") ;;
|
|
20
|
+
repo) verbs=("show" "set" "unset") ;;
|
|
21
|
+
skill) verbs=("install" "status" "command" "print") ;;
|
|
22
|
+
theme) verbs=("list" "add" "remove") ;;
|
|
23
|
+
esac
|
|
24
|
+
if (( CURRENT == 3 && ${#verbs} > 0 )); then
|
|
25
|
+
_describe -t verbs 'verb' verbs
|
|
26
|
+
fi
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
# Autoloaded from $fpath -> run as the completion function;
|
|
30
|
+
# sourced directly -> register with compdef instead.
|
|
31
|
+
if [ "${funcstack[1]}" = "_rove" ]; then
|
|
32
|
+
_rove "$@"
|
|
33
|
+
elif (( $+functions[compdef] )); then
|
|
34
|
+
compdef _rove rove
|
|
35
|
+
fi
|
|
@@ -3,7 +3,7 @@ name: rove
|
|
|
3
3
|
description: Use when controlling Rove tasks, parallel coding attempts, hosted agent sessions, task lifecycle, or the daemon-owned issue tracker from a shell. Also the ONLY channel for messaging another agent session on this machine — `rove api send`, never a peer/MCP side channel.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
<!-- rove-skill-version:
|
|
6
|
+
<!-- rove-skill-version: 45 — bump in lockstep with KOBE_SKILL_VERSION (src/lib/skill-install.ts). -->
|
|
7
7
|
|
|
8
8
|
# Rove shell control
|
|
9
9
|
|
|
@@ -230,7 +230,7 @@ own store. These are the INBOUND user reports; Rove issues are the backlog.
|
|
|
230
230
|
```text
|
|
231
231
|
workitem-list --repo(REQ) --state{open|closed|all}(open) --limit(20) --search --assignee
|
|
232
232
|
--label
|
|
233
|
-
workitem-start --repo(REQ) --number(REQ) --vendor{claude|codex|copilot|kimi}
|
|
233
|
+
workitem-start --repo(REQ) --number(REQ) --vendor{claude|codex|copilot|kimi|pi|omp}
|
|
234
234
|
--base-branch
|
|
235
235
|
```
|
|
236
236
|
<!-- generated:end -->
|
|
@@ -253,7 +253,7 @@ it fires with no TUI attached.
|
|
|
253
253
|
```text
|
|
254
254
|
routine-list (none)
|
|
255
255
|
routine-create --repo(REQ) --name(REQ) --prompt|--prompt-file(REQ) --schedule(REQ)
|
|
256
|
-
--vendor{claude|codex|copilot|kimi} --base-branch --precheck
|
|
256
|
+
--vendor{claude|codex|copilot|kimi|pi|omp} --base-branch --precheck
|
|
257
257
|
--precheck-timeout(120) --grace(60) --persistent-session
|
|
258
258
|
--target-task --target-tab --disabled
|
|
259
259
|
routine-update --id(REQ) --name --prompt|--prompt-file --schedule --vendor
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@sma1lboy/rove",
|
|
4
|
-
"version": "0.9.
|
|
4
|
+
"version": "0.9.192",
|
|
5
5
|
"description": "Rove — the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"terminal",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"kobe": "dist/cli/kobe.js",
|
|
26
26
|
"rove": "dist/cli/rove.js"
|
|
27
27
|
},
|
|
28
|
-
"files": ["dist/cli", "dist/web-ui", "dist/skills", "dist/*.wav", "README.md", "LICENSE"],
|
|
28
|
+
"files": ["dist/cli", "dist/completions", "dist/web-ui", "dist/skills", "dist/*.wav", "README.md", "LICENSE"],
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ENGINE_NOT_OBSERVED_REASON,ENGINE_START_POLL_MS,ENGINE_START_PROBE_MS,deliverHostedPrompt,deliverToKey,ensurePtyHost,findEngineKey,isTaskKey,killTaskSessions,listSessions,listSessionsOrNull,openPtyHost,outcomeFields,taskKeys}from"./chunk-ar48zb4b.js";import"./chunk-pjk7jxjb.js";import"./chunk-hz8ynrv6.js";import"./chunk-rc0sqhdh.js";import"./chunk-2apszxn2.js";import"./chunk-g2advs8t.js";import"./chunk-gsy8xfh6.js";import"./chunk-dc8hk7a7.js";import"./chunk-rcyasw34.js";import"./chunk-7q67dz4c.js";import"./chunk-92d2t5sk.js";import"./chunk-hape5vwj.js";import"./chunk-wdrgfezn.js";import"./chunk-r85jw4qg.js";import"./chunk-qvf2zh14.js";import"./chunk-t6mq1dnw.js";import"./chunk-sdyzxayr.js";import"./chunk-b99tf0jr.js";import"./chunk-z7c6nap0.js";import"./chunk-w25b7xxz.js";import"./chunk-f7zjggfv.js";import"./chunk-jvxh93nz.js";import"./chunk-fczqwtmq.js";import"./chunk-te8g5azg.js";import"./chunk-y13681dw.js";import"./chunk-b5mbpv97.js";import"./chunk-re5ke4fz.js";import"./chunk-mnqxgvyb.js";import"./chunk-86938f2g.js";import"./chunk-71k66b8f.js";import"./chunk-khj0apc7.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-pxk2c2vj.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{taskKeys,outcomeFields,openPtyHost,listSessionsOrNull,listSessions,killTaskSessions,isTaskKey,findEngineKey,ensurePtyHost,deliverToKey,deliverHostedPrompt,ENGINE_START_PROBE_MS,ENGINE_START_POLL_MS,ENGINE_NOT_OBSERVED_REASON};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{envReadyForTasks}from"./chunk-9nngww22.js";import{wizardKeyLines}from"./chunk-0rsjdc2p.js";import"./chunk-mrszjfxd.js";import"./chunk-jj4x05y6.js";import"./chunk-18rdsr2j.js";import"./chunk-xqdhp9y5.js";import{$Fragment,$jsx,$jsxs,bootPaneHost,currentPrefixConfiguration,pageCloseBindings,useBindings,useRenderer,useT,useTheme}from"./chunk-h3gqr77q.js";import"./chunk-wm14aqwc.js";import{require_react_production}from"./chunk-a82ec09z.js";import"./chunk-764bsyb0.js";import"./chunk-xqw5d5rv.js";import"./chunk-h4n8ffqy.js";import"./chunk-6xppe9bj.js";import"./chunk-nk1d8t3a.js";import"./chunk-dc8hk7a7.js";import"./chunk-wdrgfezn.js";import"./chunk-r85jw4qg.js";import"./chunk-qvf2zh14.js";import"./chunk-t6mq1dnw.js";import"./chunk-sdyzxayr.js";import"./chunk-z7c6nap0.js";import"./chunk-jvxh93nz.js";import"./chunk-fczqwtmq.js";import"./chunk-te8g5azg.js";import"./chunk-y13681dw.js";import"./chunk-b5mbpv97.js";import"./chunk-re5ke4fz.js";import"./chunk-mnqxgvyb.js";import"./chunk-86938f2g.js";import"./chunk-71k66b8f.js";import"./chunk-khj0apc7.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-pxk2c2vj.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import{__toESM}from"./chunk-wqfp8d9w.js";import{TextAttributes}from"@opentui/core";var import_react2=__toESM(require_react_production(),1);function inlineRowsFor(env){return 15+env.engines.lines.length+envActionKeys(env).length}function envActionKeys(env){let keys=[];if(!env.engines.anyUsable)keys.push("doctor.fix.noEngineAction");if(!env.git.found)keys.push("doctor.fix.gitAction");return keys}function WizardPage(props){let{theme}=useTheme(),t=useT(),renderer=useRenderer(),steps=(props.mode??"full")==="primer"?[]:props.shell===null?["skill"]:["completions","skill"],[stepIndex,setStepIndex]=import_react2.useState(0),[yes,setYes]=import_react2.useState(!0),[answers,setAnswers]=import_react2.useState({}),[page,setPage]=import_react2.useState(steps.length===0?"env":"questions"),step=steps[stepIndex];function finish(finalAnswers){renderer?.destroy(),props.onDone({completions:finalAnswers.completions??!1,skill:finalAnswers.skill??!1})}function confirm(choice=yes){if(page==="env"){setPage("keys");return}if(page==="keys"){finish(answers);return}let next={...answers,[step]:choice};if(setAnswers(next),stepIndex+1>=steps.length){setPage("env");return}setStepIndex(stepIndex+1),setYes(!0)}useBindings(()=>({bindings:[{key:"up",cmd:()=>setYes(!0)},{key:"k",cmd:()=>setYes(!0)},{key:"down",cmd:()=>setYes(!1)},{key:"j",cmd:()=>setYes(!1)},{key:"return",cmd:()=>confirm()},...pageCloseBindings(()=>finish(answers))]}));function questionFor(s){return s==="completions"?t("onboarding.completionsQuestion",{shell:props.shell??""}):t("onboarding.skillQuestion")}let explain=step==="completions"?t("onboarding.completionsExplain"):t("onboarding.skillExplain"),ready=envReadyForTasks(props.env);return $jsxs("box",{flexDirection:"column",flexGrow:1,paddingTop:1,paddingLeft:2,paddingRight:2,children:[$jsx("text",{fg:theme.primary,attributes:TextAttributes.BOLD,wrapMode:"none",children:t("onboarding.title")}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t("onboarding.subtitle")}),$jsxs("box",{flexDirection:"column",paddingTop:1,children:[steps.slice(0,page==="questions"?stepIndex:steps.length).map((answered)=>$jsxs("box",{flexDirection:"row",gap:1,children:[$jsx("text",{fg:theme.success,wrapMode:"none",children:"\u2713"}),$jsx("text",{fg:theme.textMuted,wrapMode:"none",children:questionFor(answered)}),$jsx("text",{fg:theme.text,wrapMode:"none",children:answers[answered]?t("onboarding.optionYes"):t("onboarding.optionNo")})]},answered)),page==="env"?$jsxs("box",{flexDirection:"column",onMouseUp:()=>confirm(),children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"word",children:t("onboarding.envTitle")}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t("onboarding.envExplain")}),$jsxs("box",{flexDirection:"column",paddingTop:1,children:[$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:props.env.git.line}),props.env.engines.lines.map((line)=>$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:line},line))]}),$jsxs("box",{paddingTop:1,flexDirection:"column",children:[$jsx("text",{fg:ready?theme.success:theme.error,wrapMode:"word",children:ready?t("onboarding.envReady"):t("onboarding.envNotReady")}),envActionKeys(props.env).map((key)=>$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:`\u2192 ${t(key)}`},key))]})]}):null,page==="keys"?$jsxs("box",{flexDirection:"column",onMouseUp:()=>confirm(),children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"word",children:t("onboarding.keysTitle")}),wizardKeyLines(currentPrefixConfiguration().key).map((line)=>$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:t(`onboarding.${line.msg}`,line.params)},line.msg))]}):null,page==="questions"?$jsxs($Fragment,{children:[$jsx("text",{fg:theme.text,attributes:TextAttributes.BOLD,wrapMode:"word",children:questionFor(step)}),$jsx("text",{fg:theme.textMuted,wrapMode:"word",children:explain}),[!0,!1].map((option)=>{let active=yes===option;return $jsxs("box",{flexDirection:"row",gap:1,paddingLeft:1,onMouseUp:()=>confirm(option),children:[$jsx("text",{fg:active?theme.primary:theme.textMuted,wrapMode:"none",children:active?"\u276F":" "}),$jsx("text",{fg:active?theme.primary:theme.textMuted,attributes:active?TextAttributes.BOLD:void 0,wrapMode:"none",children:option?t("onboarding.optionYes"):t("onboarding.optionNo")})]},String(option))})]}):null]}),$jsx("box",{paddingTop:1,children:$jsx("text",{fg:theme.textMuted,attributes:TextAttributes.DIM,wrapMode:"none",children:t(page==="keys"?"onboarding.keysLegend":page==="env"?"onboarding.envLegend":"onboarding.legend")})})]})}async function runOnboardingWizard(shell,env,mode){return await new Promise((resolve)=>{bootPaneHost({inlineRows:inlineRowsFor(env),setup:()=>({root:()=>$jsx(WizardPage,{shell,env,mode,onDone:resolve})})})})}export{runOnboardingWizard,WizardPage};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{addRemoteRepo,addSavedRepo,backfillSavedReposFromProjects,getCustomEngineIds,getDisabledEngineIds,getPersistedString,getRemoteRepoConfig,getRemoteRepos,getRepoInitOverride,getSavedRepos,isGitRepo,isRemoteProjectsEnabled,isRemoteRepoKey,isValidBranchName,normalizeSavedRepos,remoteRepoKey,removeSavedRepo,resolveMainRepoRoot,resolveRepoRoot,setPersistedString,setRepoInitOverride,statePath}from"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{statePath,setRepoInitOverride,setPersistedString,resolveRepoRoot,resolveMainRepoRoot,removeSavedRepo,remoteRepoKey,normalizeSavedRepos,isValidBranchName,isRemoteRepoKey,isRemoteProjectsEnabled,isGitRepo,getSavedRepos,getRepoInitOverride,getRemoteRepos,getRemoteRepoConfig,getPersistedString,getDisabledEngineIds,getCustomEngineIds,backfillSavedReposFromProjects,addSavedRepo,addRemoteRepo};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{SUBCOMMAND_VERBS,TOP_LEVEL_SUBCOMMANDS}from"./chunk-fhch0x0q.js";import{activeCliName}from"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-hq4b3fca.js";import{__require}from"./chunk-wqfp8d9w.js";async function collectSubVerbs(){let{API_VERBS}=await import("./chunk-w7a39tk8.js"),merged={...SUBCOMMAND_VERBS,api:API_VERBS};return Object.keys(merged).sort().map((command)=>[command,merged[command]??[]])}function completionUsage(cliName){return[`Usage: ${cliName} completions <bash|zsh|fish>`,"",`Generate a shell completion script for ${cliName} and print it to stdout.`,"","Install:",` zsh source <(${cliName} completions zsh) # one-off, or in ~/.zshrc after compinit`," # or the fpath way:",` # ${cliName} completions zsh > ~/.zsh/completions/_${cliName}`," # fpath=(~/.zsh/completions $fpath) # in ~/.zshrc, BEFORE compinit"," # rm -f ~/.zcompdump && exec zsh # rebuild the completion cache",` bash ${cliName} completions bash > ~/.bash_completion.d/${cliName} # source it from ~/.bashrc`,` fish ${cliName} completions fish > ~/.config/fish/completions/${cliName}.fish`,""].join(`
|
|
3
|
-
`)}function generateBashCompletions(cliName,subVerbs){let subcommands=TOP_LEVEL_SUBCOMMANDS.join(" "),fn=`_${cliName}`;return[`# ${cliName} bash completions`,`# Source: ${cliName} completions bash`,"",`${fn}() {`," local cur prev"," COMPREPLY=()",' cur="${COMP_WORDS[COMP_CWORD]}"',' prev="${COMP_WORDS[COMP_CWORD-1]}"'," if [[ ${COMP_CWORD} -eq 1 ]]; then",` COMPREPLY=( $(compgen -W "${subcommands}" -- "\${cur}") )`," return"," fi"," if [[ ${COMP_CWORD} -eq 2 ]]; then",' case "${prev}" in',...subVerbs.map(([command,verbs])=>` ${command}) COMPREPLY=( $(compgen -W "${verbs.join(" ")}" -- "\${cur}") ) ;;`)," esac"," fi","}",`complete -F ${fn} ${cliName}`,""].join(`
|
|
4
|
-
`)}function generateZshCompletions(cliName,subVerbs){let subcommandsList=TOP_LEVEL_SUBCOMMANDS.map((s)=>`"${s}"`).join(" "),fn=`_${cliName}`;return[`#compdef ${cliName}`,`# ${cliName} zsh completions`,`# Source: ${cliName} completions zsh`,"",`${fn}() {`," local -a subcommands verbs",` subcommands=(${subcommandsList})`,""," if (( CURRENT == 2 )); then"," _describe -t commands 'subcommand' subcommands"," return"," fi",""," verbs=()",' case "${words[2]}" in',...subVerbs.map(([command,verbs])=>` ${command}) verbs=(${verbs.map((v)=>`"${v}"`).join(" ")}) ;;`)," esac"," if (( CURRENT == 3 && ${#verbs} > 0 )); then"," _describe -t verbs 'verb' verbs"," fi","}","","# Autoloaded from $fpath -> run as the completion function;","# sourced directly -> register with compdef instead.",`if [ "\${funcstack[1]}" = "${fn}" ]; then`,` ${fn} "$@"`,"elif (( $+functions[compdef] )); then",` compdef ${fn} ${cliName}`,"fi",""].join(`
|
|
5
|
-
`)}function generateFishCompletions(cliName,subVerbs){let lines=[...TOP_LEVEL_SUBCOMMANDS.map((s)=>`complete -c ${cliName} -f -n __fish_use_subcommand -a ${s}`),...subVerbs.map(([command,verbs])=>`complete -c ${cliName} -f -n "__fish_seen_subcommand_from ${command}" -a "${verbs.join(" ")}"`)];return`# ${cliName} fish completions
|
|
6
|
-
# Source: ${cliName} completions fish
|
|
7
|
-
|
|
8
|
-
${lines.join(`
|
|
9
|
-
`)}
|
|
10
|
-
`}async function runCompletionsSubcommand(rest,cliName=activeCliName()){let shell=rest[0],usage=completionUsage(cliName);if(shell==="--help"||shell==="-h"||shell==="help"){process.stdout.write(usage);return}if(!shell||shell!=="bash"&&shell!=="zsh"&&shell!=="fish")process.stderr.write(`${cliName} completions: unknown shell "${shell}"
|
|
11
|
-
|
|
12
|
-
${usage}`),process.exit(2);let subVerbs=await collectSubVerbs(),script;if(shell==="bash")script=generateBashCompletions(cliName,subVerbs);else if(shell==="zsh")script=generateZshCompletions(cliName,subVerbs);else script=generateFishCompletions(cliName,subVerbs);process.stdout.write(script)}export{runCompletionsSubcommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{getGlobalDefaultVendor,getRepoLastActiveVendor,resolvePreferredVendor,setGlobalDefaultVendor,setRepoLastActiveVendor}from"./chunk-bkm7vxr5.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{setRepoLastActiveVendor,setGlobalDefaultVendor,resolvePreferredVendor,getRepoLastActiveVendor,getGlobalDefaultVendor};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{claudeGlobalConfigPath,codexAuthPath,copilotConfigPath,kimiCredentialsPath,readTextFileSyncBounded}from"./chunk-7jkf3tvr.js";import{getCustomEngineIds,getDisabledEngineIds}from"./chunk-ejqs2ta9.js";import{errorMessage}from"./chunk-2brn8e1y.js";import{__require}from"./chunk-wqfp8d9w.js";var pluginEngines=new Map;function registerPluginEngine(id,spec){if(Object.hasOwn(CONTRIB_ENGINES,id))return!1;return pluginEngines.set(id,spec),!0}function clearPluginEngines(){pluginEngines.clear()}function pluginEngineIds(){return[...pluginEngines.keys()]}var GEMINI={rules:[{state:"blocked",any:["\u2502 apply this change","\u2502 allow execution","waiting for user confirmation"]},{state:"blocked",all:["do you want to proceed"],any:["yes"]},{state:"working",any:["esc to cancel"]}]},OPENCODE={rules:[{state:"blocked",any:["\u25B3 permission required"]},{state:"blocked",all:["esc dismiss"],any:["enter confirm","enter submit","enter toggle"]},{state:"working",any:["esc interrupt","esc to interrupt","ctrl+c to interrupt","esc again to interrupt"]},{state:"idle",any:["enter send"]}]},CURSOR={rules:[{state:"blocked",any:["press any key to log in"]},{state:"blocked",all:["proceed (y)"]},{state:"blocked",any:["run this command?","waiting for approval","skip (esc or n)","(y) (enter)"]},{state:"working",any:["esc to cancel","ctrl+c to stop"]}]},GROK={rules:[{state:"blocked",any:["\u26A0 action required","ctrl+o:yolo"]},{state:"blocked",all:["\u2503"],lineRegex:["^\\s*\u2503\\s+\\S+\\s+\\(\u25CB\\)"]},{state:"working",any:["[stop]"],lineRegex:["^\\s*[\\u2800-\\u28FF]"]}]},DROID={rules:[{state:"blocked",all:["enter to select","esc to cancel"],any:["> yes, allow","> no, cancel"]},{state:"blocked",all:["enter select","esc cancel"]},{state:"working",any:["esc to stop"]}]},AMP={rules:[{state:"blocked",any:["waiting for approval","run this command?","allow editing file:","allow creating file:","confirm tool call"]},{state:"working",lineRegex:["^\\s*\u2570\\s+\\S+\\s+(thinking|streaming|running tools|waiting)\\s+\u2500"]}]},CONTRIB_ENGINES={gemini:{displayName:"Gemini CLI",defaultCommand:["gemini"],screenManifest:GEMINI},opencode:{displayName:"OpenCode",defaultCommand:["opencode"],screenManifest:OPENCODE,firstMessageDelivery:"paste"},cursor:{displayName:"Cursor Agent",defaultCommand:["cursor-agent"],screenManifest:CURSOR},grok:{displayName:"Grok CLI",defaultCommand:["grok"],screenManifest:GROK},droid:{displayName:"Droid",defaultCommand:["droid"],screenManifest:DROID},amp:{displayName:"Amp",defaultCommand:["amp"],screenManifest:AMP}};function isContribEngine(id){return Object.hasOwn(CONTRIB_ENGINES,id)||pluginEngines.has(id)}var CONTRIB_ENGINE_IDS=Object.keys(CONTRIB_ENGINES);function contribEngineEntry(id,base){let spec=CONTRIB_ENGINES[id]??pluginEngines.get(id);if(!spec)return base;return{...base,displayName:spec.displayName,defaultCommand:spec.defaultCommand,...spec.processNames?{processNames:spec.processNames}:{},screenManifest:spec.screenManifest,...spec.identity?{identity:spec.identity}:{},...spec.firstMessageDelivery?{firstMessageDelivery:spec.firstMessageDelivery}:{}}}import{homedir as homedir2}from"os";import{spawnSync}from"child_process";import{existsSync,statSync}from"fs";import{homedir}from"os";var defaultBinaryDeps={fileExists(p){try{return statSync(p).isFile()}catch{return!1}},env(name){return process.env[name]},home(){return homedir()},which(name){let cmd=process.platform==="win32"?"where":"which",out=spawnSync(cmd,[name],{encoding:"utf8"});if(out.status!==0)return;let first=out.stdout.split(`
|
|
3
|
-
`).map((l)=>l.trim()).filter(Boolean)[0];if(!first)return;if(first.startsWith(`${name}:`)&&first.includes("aliased to")){let aliasTarget=first.split("aliased to")[1]?.trim();return aliasTarget&&existsSync(aliasTarget)?aliasTarget:void 0}return first},readdir(p){try{return __require("fs").readdirSync(p)}catch{return[]}}};class BinaryNotFoundError extends Error{checkedPaths;constructor(label,hint,checkedPaths){super(`${label} not found. Checked: ${checkedPaths.join(", ")}. ${hint}`);this.name="BinaryNotFoundError",this.checkedPaths=checkedPaths}}function createBinaryFinder(spec){return async function(deps=defaultBinaryDeps){let checked=[],whichResult=deps.which(spec.name);if(whichResult){if(checked.push(`which:${whichResult}`),deps.fileExists(whichResult))return whichResult}for(let candidate of spec.candidates({deps,home:deps.home()}))if(checked.push(candidate),deps.fileExists(candidate))return candidate;throw spec.notFound(checked)}}import path from"path";class ClaudeBinaryNotFoundError extends BinaryNotFoundError{constructor(checkedPaths){super("Claude Code binary","Ensure 'claude' is on PATH, or install at ~/.claude/local/claude.",checkedPaths);this.name="ClaudeBinaryNotFoundError"}}var findClaudeBinary=createBinaryFinder({name:"claude",candidates({deps,home}){let out=[path.join(home,".claude","local","claude")],nvmBin=deps.env("NVM_BIN");if(nvmBin)out.push(path.join(nvmBin,"claude"));let nvmRoot=path.join(home,".nvm","versions","node"),versions=(deps.readdir?.(nvmRoot)??[]).sort((a,b)=>b.localeCompare(a,void 0,{numeric:!0}));for(let v of versions)out.push(path.join(nvmRoot,v,"bin","claude"));out.push("/opt/homebrew/bin/claude","/usr/local/bin/claude","/usr/bin/claude","/bin/claude");for(let rel of[".local/bin",".npm-global/bin",".yarn/bin",".bun/bin","bin"])out.push(path.join(home,rel,"claude"));return out},notFound:(checked)=>new ClaudeBinaryNotFoundError(checked)});import path2 from"path";class CodexBinaryNotFoundError extends BinaryNotFoundError{constructor(checkedPaths){super("Codex CLI binary","Ensure 'codex' is on PATH (e.g. `brew install codex` or the official installer).",checkedPaths);this.name="CodexBinaryNotFoundError"}}var findCodexBinary=createBinaryFinder({name:"codex",candidates({deps,home}){let out=["/opt/homebrew/bin/codex","/usr/local/bin/codex","/usr/bin/codex","/bin/codex"],nvmBin=deps.env("NVM_BIN");if(nvmBin)out.push(path2.join(nvmBin,"codex"));for(let rel of[".local/bin",".bun/bin","bin"])out.push(path2.join(home,rel,"codex"));return out},notFound:(checked)=>new CodexBinaryNotFoundError(checked)});import path3 from"path";class CopilotBinaryNotFoundError extends BinaryNotFoundError{constructor(checkedPaths){super("GitHub Copilot CLI binary","Ensure 'copilot' is on PATH (for example `npm install -g @github/copilot` or `brew install copilot-cli`).",checkedPaths);this.name="CopilotBinaryNotFoundError"}}var findCopilotBinary=createBinaryFinder({name:"copilot",candidates({deps,home}){let win32=(deps.platform?.()??process.platform)==="win32",names=win32?["copilot.exe","copilot.cmd","copilot"]:["copilot"],dirs=["/opt/homebrew/bin","/usr/local/bin","/usr/bin","/bin"],nvmBin=deps.env("NVM_BIN");if(nvmBin)dirs.push(nvmBin);let homeDirs=[path3.join(home,".npm-global/bin"),path3.join(home,".local/bin"),path3.join(home,".bun/bin"),path3.join(home,"bin")];if(win32){let appData=deps.env("APPDATA"),localAppData=deps.env("LOCALAPPDATA");if(homeDirs.unshift(path3.join(home,"AppData/Roaming/npm")),appData)homeDirs.unshift(path3.join(appData,"npm"));if(localAppData)homeDirs.unshift(path3.join(localAppData,"npm"))}return[...dirs,...homeDirs].flatMap((dir)=>names.map((name)=>path3.join(dir,name)))},notFound:(checked)=>new CopilotBinaryNotFoundError(checked)});import path4 from"path";class KimiBinaryNotFoundError extends BinaryNotFoundError{constructor(checkedPaths){super("Kimi Code CLI binary","Ensure 'kimi' is on PATH or installed at ~/.kimi-code/bin/kimi.",checkedPaths);this.name="KimiBinaryNotFoundError"}}var findKimiBinary=createBinaryFinder({name:"kimi",candidates:({home})=>[path4.join(home,".kimi-code/bin"),path4.join(home,".local/bin"),path4.join(home,"bin"),"/opt/homebrew/bin","/usr/local/bin"].map((dir)=>path4.join(dir,"kimi")),notFound:(checked)=>new KimiBinaryNotFoundError(checked)});var defaultDeps={readFile(p){return readTextFileSyncBounded(p)},env(name){return process.env[name]},home(){return homedir2()},findClaudeBinary(){return findClaudeBinary()},findCodexBinary(){return findCodexBinary()},findCopilotBinary(){return findCopilotBinary()},findKimiBinary(){return findKimiBinary()}};function decodeJwtPayload(jwt){let parts=jwt.split(".");if(parts.length!==3)return null;let payload=parts[1];if(!payload)return null;let b64=payload.replace(/-/g,"+").replace(/_/g,"/"),padded=b64+"=".repeat((4-b64.length%4)%4);try{let json=Buffer.from(padded,"base64").toString("utf8"),obj=JSON.parse(json);return typeof obj==="object"&&obj!==null?obj:null}catch{return null}}async function probeBinary(probe){try{return{found:!0,path:await probe()}}catch(err){if(err instanceof BinaryNotFoundError)return{found:!1,error:"not found on PATH"};return{found:!1,error:errorMessage(err)}}}var cachedDefaultVendors=null;async function probeAvailableVendors(deps){return(await Promise.all([["claude",()=>deps.findClaudeBinary()],["codex",()=>deps.findCodexBinary()],["copilot",()=>deps.findCopilotBinary()],["kimi",()=>deps.findKimiBinary()]].map(async([vendor,probe])=>(await probeBinary(probe)).found?vendor:null))).filter((v)=>v!==null)}function detectAvailableVendors(deps=defaultDeps){if(deps!==defaultDeps)return probeAvailableVendors(deps);if(cachedDefaultVendors)return cachedDefaultVendors;let pending=probeAvailableVendors(deps).catch((err)=>{throw cachedDefaultVendors=null,err});return cachedDefaultVendors=pending,pending}function resetAvailableVendorsCache(){cachedDefaultVendors=null,cachedContribEngines=null}async function installedEngineIds(deps=defaultDeps){let builtins=await detectAvailableVendors(deps),contrib=await detectContribEngines();return[...new Set([...builtins,...getCustomEngineIds(),...contrib])]}async function availableEngineIds(deps=defaultDeps){let disabled=new Set(getDisabledEngineIds());return(await installedEngineIds(deps)).filter((id)=>!disabled.has(id))}var cachedContribEngines=null;function detectContribEngines(){if(cachedContribEngines)return cachedContribEngines;let which=globalThis.Bun?.which;return cachedContribEngines=Promise.resolve([...which?CONTRIB_ENGINE_IDS.filter((id)=>{let bin=CONTRIB_ENGINES[id]?.defaultCommand[0];return bin?which(bin)!==null:!1}):[],...pluginEngineIds()]),cachedContribEngines}async function detectClaudeAccount(deps=defaultDeps){let binary=await probeBinary(()=>deps.findClaudeBinary()),configPath=claudeGlobalConfigPath(deps.env,deps.home()),raw;try{raw=deps.readFile(configPath)}catch(err){return{binary,account:{kind:"none"},accountError:`read ${configPath}: ${errorMessage(err)}`}}if(raw===null)return{binary,account:{kind:"none"}};let parsed;try{parsed=JSON.parse(raw)}catch(err){return{binary,account:{kind:"none"},accountError:`parse ${configPath}: ${errorMessage(err)}`}}let oauth=parsed?.oauthAccount;if(!oauth||typeof oauth!=="object")return{binary,account:{kind:"none"}};let o=oauth,email=typeof o.emailAddress==="string"?o.emailAddress:void 0;if(!email)return{binary,account:{kind:"none"}};return{binary,account:{kind:"oauth",email,organization:typeof o.organizationName==="string"?o.organizationName:void 0,displayName:typeof o.displayName==="string"?o.displayName:void 0,billingType:typeof o.billingType==="string"?o.billingType:void 0}}}async function detectCodexAccount(deps=defaultDeps){let binary=await probeBinary(()=>deps.findCodexBinary()),authPath=codexAuthPath(deps.env,deps.home()),raw;try{raw=deps.readFile(authPath)}catch(err){return{binary,account:{kind:"none"},accountError:`read ${authPath}: ${errorMessage(err)}`}}if(raw===null)return{binary,account:{kind:"none"}};let parsed;try{parsed=JSON.parse(raw)}catch(err){return{binary,account:{kind:"none"},accountError:`parse ${authPath}: ${errorMessage(err)}`}}let obj=parsed??{},tokens=obj.tokens,idToken=typeof tokens?.id_token==="string"?tokens.id_token:void 0;if(idToken){let payload=decodeJwtPayload(idToken);if(!payload)return{binary,account:{kind:"none"},accountError:"codex id_token: malformed JWT"};let email=typeof payload.email==="string"?payload.email:void 0,authClaimRaw=payload["https://api.openai.com/auth"],authClaim=typeof authClaimRaw==="object"&&authClaimRaw!==null&&!Array.isArray(authClaimRaw)?authClaimRaw:void 0,plan=typeof authClaim?.chatgpt_plan_type==="string"?authClaim.chatgpt_plan_type:void 0;if(email)return{binary,account:{kind:"chatgpt",email,plan}};return{binary,account:{kind:"none"},accountError:"codex id_token: no email claim"}}let apiKey=obj.OPENAI_API_KEY;if(typeof apiKey==="string"&&apiKey.length>0)return{binary,account:{kind:"apikey"}};return{binary,account:{kind:"none"}}}async function detectCopilotAccount(deps=defaultDeps){let binary=await probeBinary(()=>deps.findCopilotBinary());for(let source of["COPILOT_GITHUB_TOKEN","GH_TOKEN","GITHUB_TOKEN"])if(deps.env(source)?.trim())return{binary,account:{kind:"token",source}};let configPath=copilotConfigPath(deps.env,deps.home()),raw;try{raw=deps.readFile(configPath)}catch(err){return{binary,account:{kind:"none"},accountError:`read ${configPath}: ${errorMessage(err)}`}}if(raw===null)return{binary,account:{kind:"none"}};let parsed;try{parsed=JSON.parse(raw)}catch(err){return{binary,account:{kind:"none"},accountError:`parse ${configPath}: ${errorMessage(err)}`}}if(!isRecord(parsed))return{binary,account:{kind:"none"}};if(hasStringDeep(parsed,["github_token","oauth_token","access_token","token","selectedUser","currentUser","user"]))return{binary,account:{kind:"oauth"}};return{binary,account:{kind:"none"}}}async function detectKimiAccount(deps=defaultDeps){let binary=await probeBinary(()=>deps.findKimiBinary()),credPath=kimiCredentialsPath(deps.env,deps.home()),raw;try{raw=deps.readFile(credPath)}catch(err){return{binary,account:{kind:"none"},accountError:`read ${credPath}: ${errorMessage(err)}`}}if(raw===null)return{binary,account:{kind:"none"}};let parsed;try{parsed=JSON.parse(raw)}catch(err){return{binary,account:{kind:"none"},accountError:`parse ${credPath}: ${errorMessage(err)}`}}if(!isRecord(parsed))return{binary,account:{kind:"none"}};let token=parsed.access_token;if(typeof token==="string"&&token.length>0)return{binary,account:{kind:"oauth"}};return{binary,account:{kind:"none"}}}function isRecord(v){return typeof v==="object"&&v!==null&&!Array.isArray(v)}function hasStringDeep(value,interestingKeys,depth=0){if(depth>4||!isRecord(value))return!1;for(let[key,entry]of Object.entries(value)){if(interestingKeys.includes(key)&&typeof entry==="string"&&entry.length>0)return!0;if(isRecord(entry)&&hasStringDeep(entry,interestingKeys,depth+1))return!0}return!1}
|
|
4
|
-
export{registerPluginEngine,clearPluginEngines,pluginEngineIds,isContribEngine,CONTRIB_ENGINE_IDS,contribEngineEntry,resetAvailableVendorsCache,installedEngineIds,availableEngineIds,detectClaudeAccount,detectCodexAccount,detectCopilotAccount,detectKimiAccount};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ensureGlobalKobeHooks,readTextWithTimeout,runHookSubcommand}from"./chunk-a0ytx1ab.js";import"./chunk-3e5n28t6.js";import"./chunk-r2pztgm6.js";import"./chunk-g2e1dmxh.js";import"./chunk-jvxh93nz.js";import"./chunk-te8g5azg.js";import"./chunk-y13681dw.js";import"./chunk-b5mbpv97.js";import"./chunk-re5ke4fz.js";import"./chunk-mnqxgvyb.js";import"./chunk-71k66b8f.js";import"./chunk-khj0apc7.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{runHookSubcommand,readTextWithTimeout,ensureGlobalKobeHooks};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{checkOnboardingEnv,noEngineAction}from"./chunk-mrszjfxd.js";import{LAST_RUN_VERSION_KEY}from"./chunk-18rdsr2j.js";import{isNpxMissing,markSkillHintSeen,npxSkillsArgv,npxSkillsCommand}from"./chunk-xqdhp9y5.js";import{t}from"./chunk-r85jw4qg.js";import{getPersistedBool,loadStateFile,setPersistedBool}from"./chunk-3jh78dmc.js";import{activeCliName}from"./chunk-00ehck55.js";import{__require}from"./chunk-wqfp8d9w.js";import{spawnSync}from"child_process";import{appendFileSync,existsSync,mkdirSync,readFileSync,writeFileSync}from"fs";import{homedir}from"os";import{basename,join}from"path";var ONBOARDED_KEY="onboarded",PRIMER_KEY="onboardedPrimer";function detectShell(env=process.env){let shell=basename(env.SHELL??"");return shell==="zsh"||shell==="bash"||shell==="fish"?shell:null}function installCompletions(shell,home=homedir(),cli=activeCliName()){let rcMarker=`${cli} completions`;if(shell==="fish"){let dir=join(home,".config","fish","completions"),path=join(dir,`${cli}.fish`);return mkdirSync(dir,{recursive:!0}),writeFileSync(path,`${cli} completions fish | source
|
|
3
|
-
`),path}let rc=join(home,shell==="zsh"?".zshrc":".bashrc");if(!(existsSync(rc)?readFileSync(rc,"utf8"):"").includes(rcMarker)){let line=`
|
|
4
|
-
# ${cli} completions
|
|
5
|
-
command -v ${cli} >/dev/null && source <(${cli} completions ${shell})
|
|
6
|
-
`;appendFileSync(rc,line)}return rc}function isOnboarded(){return getPersistedBool(ONBOARDED_KEY,!1)}function markOnboarded(){setPersistedBool(ONBOARDED_KEY,!0)}function isPrimerDone(){return getPersistedBool(PRIMER_KEY,!1)}function markPrimerDone(){setPersistedBool(PRIMER_KEY,!0)}function backfillPrimerForExistingUsers(){if(typeof loadStateFile()[LAST_RUN_VERSION_KEY]!=="string")return!1;return markPrimerDone(),!0}function envReadyForTasks(env){return env.engines.anyUsable&&env.git.found}function applyOnboardingChoices(choices,shell,env){let cli=activeCliName(),completionsHelp=`${cli} completions --help`,skillInstall=`${cli} skill install`,out=(line)=>process.stdout.write(`${line}
|
|
7
|
-
`);if(shell!==null)if(choices.completions)out(t("onboarding.appliedCompletions",{path:installCompletions(shell)}));else out(t("onboarding.skippedCompletions",{command:completionsHelp}));if(choices.skill){if(isNpxMissing())out(t("onboarding.skillNeedsNode",{command:skillInstall}));else if(out(t("onboarding.installingSkill",{command:npxSkillsCommand()})),spawnSync("npx",npxSkillsArgv(),{stdio:"inherit"}).status!==0)out(t("onboarding.skillFailed",{command:skillInstall}))}else out(t("onboarding.skippedSkill",{command:skillInstall})),markSkillHintSeen();out(""),out(env.git.line);for(let line of env.engines.lines)out(line);if(out(""),envReadyForTasks(env))out(t("onboarding.ready")),out(t("onboarding.readyHint",{command:cli}));else{if(out(t("onboarding.notReadyHeader")),!env.engines.anyUsable)out(` \u2192 ${noEngineAction(env.engines.signedOut)}`);if(!env.git.found)out(` \u2192 ${t("doctor.fix.gitAction")}`)}}async function maybeRunOnboarding(){if(!process.stdout.isTTY||!process.stdin.isTTY)return!1;let seen=isOnboarded();if(seen&&(isPrimerDone()||backfillPrimerForExistingUsers()))return!1;markOnboarded();let shell=detectShell(),env=await checkOnboardingEnv(),{runOnboardingWizard}=await import("./chunk-16rt509n.js"),choices=await runOnboardingWizard(shell,env,seen?"primer":"full");return markPrimerDone(),applyOnboardingChoices(choices,shell,env),!0}
|
|
8
|
-
export{detectShell,installCompletions,envReadyForTasks,applyOnboardingChoices,maybeRunOnboarding};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ensurePluginEnginesLoaded,loadPluginEngines,registeredEngineIds,reloadPluginEngines}from"./chunk-kyr0cyq1.js";import"./chunk-g2e1dmxh.js";import"./chunk-mnqxgvyb.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-7jkf3tvr.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{reloadPluginEngines,registeredEngineIds,loadPluginEngines,ensurePluginEnginesLoaded};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
var BUILTIN_VENDORS=["claude","codex","copilot","kimi"],DEFAULT_VENDOR=BUILTIN_VENDORS[0],ALL_VENDORS=[...BUILTIN_VENDORS];function isBuiltinVendor(id){return id!==void 0&&BUILTIN_VENDORS.includes(id)}function nextVendorWithin(list,current){if(list.length===0)return current;let i=list.indexOf(current);return list[(i+1)%list.length]??list[0]??current}function prevVendorWithin(list,current){if(list.length===0)return current;let i=list.indexOf(current);if(i<0)return list[list.length-1]??current;return list[(i-1+list.length)%list.length]??current}function coerceVendorId(value){let v=value?.trim();return v&&v.length>0?v:"claude"}
|
|
3
|
-
export{BUILTIN_VENDORS,DEFAULT_VENDOR,ALL_VENDORS,isBuiltinVendor,nextVendorWithin,prevVendorWithin,coerceVendorId};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{GitWorktreeManager}from"./chunk-2pv5vb5a.js";import"./chunk-vhq2dhx2.js";import"./chunk-63wmhbqs.js";import"./chunk-6xppe9bj.js";import"./chunk-rc0sqhdh.js";import"./chunk-2apszxn2.js";import"./chunk-g2advs8t.js";import"./chunk-7kysxgbq.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{GitWorktreeManager};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{applyOnboardingChoices,detectShell,envReadyForTasks,installCompletions,maybeRunOnboarding}from"./chunk-9nngww22.js";import"./chunk-mrszjfxd.js";import"./chunk-jj4x05y6.js";import"./chunk-18rdsr2j.js";import"./chunk-xqdhp9y5.js";import"./chunk-nk1d8t3a.js";import"./chunk-dc8hk7a7.js";import"./chunk-wdrgfezn.js";import"./chunk-r85jw4qg.js";import"./chunk-t6mq1dnw.js";import"./chunk-sdyzxayr.js";import"./chunk-jvxh93nz.js";import"./chunk-86938f2g.js";import"./chunk-71k66b8f.js";import"./chunk-khj0apc7.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-pxk2c2vj.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{maybeRunOnboarding,installCompletions,envReadyForTasks,detectShell,applyOnboardingChoices};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{discoverMachine}from"./chunk-z9hgw8hw.js";import{RemoteOrchestrator}from"./chunk-wm14aqwc.js";import"./chunk-xqw5d5rv.js";import"./chunk-h4n8ffqy.js";import{startTunnel}from"./chunk-k371m3p6.js";import{dedupeMachines,duplicateAliasOf,listMachines,readMachines,setMachineIdentity,updateMachine}from"./chunk-qjaqvn88.js";import"./chunk-6xppe9bj.js";import"./chunk-nk1d8t3a.js";import{createStateCell}from"./chunk-sdyzxayr.js";import"./chunk-te8g5azg.js";import"./chunk-y13681dw.js";import{KobeDaemonClient}from"./chunk-b5mbpv97.js";import"./chunk-re5ke4fz.js";import"./chunk-mnqxgvyb.js";import"./chunk-xy8be792.js";import{loadStateFile}from"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import{logClient,logClientError}from"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";class MachineHub{local;slots=new Map;machinesAcc=createStateCell([],"machines.status");mergedAcc=createStateCell([],"machines.tasks");localUnsubscribe=null;disposed=!1;constructor(local){this.local=local}machinesSignal(){return this.machinesAcc}tasksSignal(){if(this.slots.size===0)return this.local.tasksSignal();return this.mergedAcc}remoteTaskIds(){let ids=new Set;for(let slot of this.slots.values())for(let task of slot.tasks)ids.add(String(task.id));return ids}attach(){let entries=dedupeMachines(listMachines());if(entries.length===0)return;for(let entry of entries)this.slots.set(entry.alias,{entry,tasks:[]});this.publishStatuses(),this.localUnsubscribe=this.local.tasksSignal().subscribe(()=>this.republishTasks()),this.republishTasks();for(let entry of entries)this.connect(entry)}async connect(entry){let slot=this.slots.get(entry.alias);if(!slot||this.disposed)return;let found=await discoverMachine(entry.alias,entry);if(this.disposed)return;let sockets=found.ok?{daemon:found.status.socketPath,pty:found.status.ptySocketPath}:entry.sockets;if(!sockets){this.setStatus(entry.alias,{state:"offline",error:found.ok?void 0:found.message});return}if(found.ok)updateMachine(entry.alias,{sockets});let tunnel=startTunnel({alias:entry.alias,config:entry,remoteDaemonSocket:sockets.daemon,remotePtySocket:sockets.pty});if(slot.tunnel=tunnel,tunnel.state()==="unsupported"){this.setStatus(entry.alias,{state:"unsupported",error:"SSH unix-socket forwarding is not available on Windows"});return}if(tunnel.onState((state)=>{if(state==="online")this.openOrchestrator(entry,tunnel);else if(state==="offline")this.setStatus(entry.alias,{state:"offline"}),this.republishTasks()}),tunnel.state()==="online")await this.openOrchestrator(entry,tunnel)}async openOrchestrator(entry,tunnel){let slot=this.slots.get(entry.alias);if(!slot||this.disposed||slot.orchestrator)return;let client=new KobeDaemonClient(tunnel.daemonSocketPath),orchestrator=new RemoteOrchestrator(client,{role:"gui",expectForeignHome:!0,onPeerIdentity:(peer)=>this.onPeerIdentity(entry.alias,peer)});slot.orchestrator=orchestrator;try{await orchestrator.init()}catch(err){let message=err instanceof Error?err.message:String(err);this.setStatus(entry.alias,{state:classifyHandshakeFailure(message),error:message}),logClientError("machines",err);return}let stopTasks=orchestrator.tasksSignal().subscribe(()=>{slot.tasks=orchestrator.tasksSignal().get(),this.republishTasks()}),stopConnection=orchestrator.connectionStateSignal().subscribe(()=>{let connected=orchestrator.connectionStateSignal().get()==="online";if(this.slots.get(entry.alias)!==slot)return;this.setStatus(entry.alias,{state:connected?"online":"offline"}),this.republishTasks()});slot.unsubscribe=()=>{stopTasks(),stopConnection()},slot.tasks=orchestrator.tasksSignal().get(),this.setStatus(entry.alias,{state:"online",version:orchestrator.daemonVersionSignal().get()??void 0}),this.republishTasks(),logClient("machines",`${entry.alias} online (${slot.tasks.length} tasks)`)}onPeerIdentity(alias,peer){if(!peer.hostname&&!peer.homeDir)return;let identity={hostname:peer.hostname,homeDir:peer.homeDir,daemonPid:peer.daemonPid};setMachineIdentity(alias,identity);let duplicate=duplicateAliasOf(readMachines(loadStateFile()),alias,identity);this.setStatus(alias,{hostname:peer.hostname||void 0,version:peer.kobeVersion||void 0,...duplicate?{duplicateOf:duplicate}:{}})}setStatus(alias,patch){let next=this.machinesAcc.get().map((row)=>row.alias===alias?{...row,...patch}:row);this.machinesAcc.set(next)}publishStatuses(){this.machinesAcc.set([...this.slots.values()].map((slot)=>({alias:slot.entry.alias,hostLabel:slot.entry.alias,state:"connecting"})))}republishTasks(){let merged=this.local.tasksSignal().get().map((task)=>stampOrigin(task,"local","local"));for(let slot of this.slots.values()){let status=this.machinesAcc.get().find((row)=>row.alias===slot.entry.alias);if(status?.duplicateOf)continue;let hostLabel=status?.hostLabel||slot.entry.alias,stale=status?.state!=="online";for(let task of slot.tasks)merged.push(stampOrigin(task,slot.entry.alias,hostLabel,stale))}this.mergedAcc.set(merged)}dispose(){this.disposed=!0,this.localUnsubscribe?.();for(let slot of this.slots.values())slot.unsubscribe?.(),slot.orchestrator?.dispose(),slot.tunnel?.stop();this.slots.clear()}}function classifyHandshakeFailure(message){return/protocol v\d/i.test(message)?"mismatch":"offline"}function stampOrigin(task,machineId,hostLabel,stale=!1){return{...task,origin:{machineId,hostLabel,...stale?{stale:!0}:{}}}}export{stampOrigin,classifyHandshakeFailure,MachineHub};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{binaryAvailable,resolveEditorCommand}from"./chunk-zj8y4f4x.js";import"./chunk-6xppe9bj.js";import"./chunk-7kysxgbq.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-81p6mm0p.js";import{kvStatePath}from"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import{activeCliName}from"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";import{existsSync,mkdirSync,writeFileSync}from"fs";import{dirname}from"path";var CLI_NAME=activeCliName();function printUsage(out){out.write([`Usage: ${CLI_NAME} config [--path]`,"","Open Rove's user config (state.json \u2014 theme, locale, engine + editor prefs)","in your editor. The editor is your configured one (Settings \u2192 General \u2192","Editor); left on Auto it is $VISUAL / $EDITOR, else the first of","nvim / vim / emacs / nano.","Rove re-reads the file on its next launch.","","Options:"," --path Print the config file path and exit (don't open an editor)"," -h, --help Print this help",""].join(`
|
|
3
|
-
`))}async function runConfigSubcommand(argv=[]){if(argv.some((a)=>a==="-h"||a==="--help"||a==="help")){printUsage(process.stdout);return}let path=kvStatePath();if(argv.some((a)=>a==="--path"||a==="path")){console.log(path);return}let unknown=argv.find((a)=>a.length>0);if(unknown!==void 0)process.stderr.write(`${CLI_NAME} config: unexpected argument "${unknown}"
|
|
4
|
-
`),printUsage(process.stderr),process.exit(2);if(!existsSync(path))mkdirSync(dirname(path),{recursive:!0}),writeFileSync(path,`{}
|
|
5
|
-
`);let resolved=await resolveEditorCommand(path);if(!resolved||!await binaryAvailable(resolved.bin))process.stderr.write(`${CLI_NAME} config: no editor found \u2014 set $EDITOR (or Settings \u2192 General \u2192 Editor), or edit directly:
|
|
6
|
-
${path}
|
|
7
|
-
`),process.exit(1);let proc=Bun.spawn(["sh","-c",resolved.command],{stdin:"inherit",stdout:"inherit",stderr:"inherit"});process.exit(await proc.exited)}export{runConfigSubcommand};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{getPersistedBool,loadStateFile,patchStateFile,readSavedRepos,updateStateFile}from"./chunk-3jh78dmc.js";import{projectRejection}from"./chunk-81p6mm0p.js";import{kvStatePath}from"./chunk-q5jhy3t8.js";import{pathIdentity,samePath}from"./chunk-f10n6063.js";import{spawnSync}from"child_process";import{realpathSync}from"fs";function isRemoteRepoKey(key){return key.startsWith("ssh://")}function isRemoteProjectsEnabled(){return getPersistedBool("experimental.remoteProjects",!1)}function remoteRepoKey(host,user,port,basePath){let authority=port?`${user}@${host}:${port}`:`${user}@${host}`,base=(basePath??"").trim().replace(/\/+$/,"");if(!base)return`ssh://${authority}`;return`ssh://${authority}${base.startsWith("/")?base:`/${base}`}`}function readRemoteRepos(state){let raw=state.remoteRepos;if(!raw||typeof raw!=="object"||Array.isArray(raw))return{};return raw}function getRemoteRepoConfig(key){return readRemoteRepos(loadStateFile())[key]??null}function getRemoteRepos(){return readRemoteRepos(loadStateFile())}function addRemoteRepo(config){let key=remoteRepoKey(config.host,config.user,config.port,config.basePath),added=!1;return updateStateFile((state)=>{let repos={...readRemoteRepos(state)},legacyKey=remoteRepoKey(config.host,config.user,config.port);if(key!==legacyKey&&repos[legacyKey]?.basePath===config.basePath)key=legacyKey;repos[key]=config,state.remoteRepos=repos;let saved=readSavedRepos(state);if(added=!saved.includes(key),added)state.savedRepos=[...saved,key];return}),{key,added}}function resolveRepoRoot(absPath){if(isRemoteRepoKey(absPath))return absPath;let r=spawnSync("git",["rev-parse","--show-toplevel"],{cwd:absPath,encoding:"utf8",shell:!1});if(r.status!==0)return absPath;let top=(r.stdout??"").trim();if(!top)return absPath;try{if(realpathSync(absPath)===realpathSync(top))return absPath}catch{}return top}function isGitRepo(absPath){if(isRemoteRepoKey(absPath))return!1;let r=spawnSync("git",["rev-parse","--is-inside-work-tree"],{cwd:absPath,encoding:"utf8",shell:!1});return r.status===0&&(r.stdout??"").trim()==="true"}function isValidBranchName(branch){return spawnSync("git",["check-ref-format","--branch",branch],{encoding:"utf8",shell:!1}).status===0}function resolveMainRepoRoot(absPath){if(isRemoteRepoKey(absPath))return absPath;let r=spawnSync("git",["worktree","list","--porcelain"],{cwd:absPath,encoding:"utf8",shell:!1});if(r.status!==0)return resolveRepoRoot(absPath);return(r.stdout??"").split(/\r?\n/).find((line)=>line.startsWith("worktree "))?.slice(9).trim()||resolveRepoRoot(absPath)}function statePath(){return kvStatePath()}function getSavedRepos(){return readSavedRepos(loadStateFile())}function getPersistedString(key){let value=loadStateFile()[key];return typeof value==="string"?value:void 0}function setPersistedString(key,value){patchStateFile({[key]:value})}function getCustomEngineIds(){let raw=loadStateFile().customEngineIds;if(!Array.isArray(raw))return[];return raw.filter((s)=>typeof s==="string"&&s.trim().length>0)}function getDisabledEngineIds(){let raw=loadStateFile().disabledEngineIds;if(!Array.isArray(raw))return[];return raw.filter((s)=>typeof s==="string"&&s.trim().length>0)}function addSavedRepo(absPath,opts={}){let normalized=resolveMainRepoRoot(absPath),rejected=opts.skipGate?null:projectRejection(normalized,isGitRepo,opts.intent??"explicit");if(rejected)return{added:!1,path:normalized,total:getSavedRepos().length,rejected};let result={added:!1,path:normalized,total:0};return updateStateFile((state)=>{let cur=readSavedRepos(state);if(cur.some((repo)=>samePath(repo,normalized)))return result={added:!1,path:normalized,total:cur.length},!1;state.savedRepos=[...cur,normalized],result={added:!0,path:normalized,total:cur.length+1};return}),result}function backfillSavedReposFromProjects(mainRepos){let added=[];for(let repo of mainRepos)if(addSavedRepo(repo,{intent:"explicit"}).added)added.push(repo);return added}function normalizeSavedRepos(){let cur=getSavedRepos(),seen=new Set,next=[],changed=!1;for(let p of cur){let top=resolveMainRepoRoot(p);if(top!==p)changed=!0;if(seen.has(pathIdentity(top))){changed=!0;continue}seen.add(pathIdentity(top)),next.push(top)}if(!changed)return;patchStateFile({savedRepos:next})}function readRepoConfigs(state){let raw=state.repoConfigs;if(!raw||typeof raw!=="object"||Array.isArray(raw))return{};return raw}function coerceOverride(entry){if(!entry||typeof entry!=="object")return{};let e=entry;return{initScript:typeof e.initScript==="string"&&e.initScript.length>0?e.initScript:void 0,initPrompt:typeof e.initPrompt==="string"&&e.initPrompt.length>0?e.initPrompt:void 0}}function getRepoInitOverride(repoRoot){let configs=readRepoConfigs(loadStateFile()),normalized=resolveRepoRoot(repoRoot),key=Object.keys(configs).find((key2)=>samePath(key2,normalized))??normalized;return coerceOverride(configs[key])}function setRepoInitOverride(repoRoot,patch){let resolved=resolveRepoRoot(repoRoot),next={};return updateStateFile((state)=>{let configs={...readRepoConfigs(state)},normalized=Object.keys(configs).find((key)=>samePath(key,resolved))??resolved,cur=coerceOverride(configs[normalized]),nextScript=patch.initScript===void 0?cur.initScript:patch.initScript||void 0,nextPrompt=patch.initPrompt===void 0?cur.initPrompt:patch.initPrompt||void 0;if(next={...nextScript?{initScript:nextScript}:{},...nextPrompt?{initPrompt:nextPrompt}:{}},!next.initScript&&!next.initPrompt){let{[normalized]:_dropped,...rest}=configs;state.repoConfigs=rest}else configs[normalized]=next,state.repoConfigs=configs;return}),next}function removeSavedRepo(absPath){let result={removed:!1,path:absPath,total:0};return updateStateFile((state)=>{let cur=readSavedRepos(state);if(!cur.some((repo)=>samePath(repo,absPath)))return result={removed:!1,path:absPath,total:cur.length},!1;let remaining=cur.filter((p)=>!samePath(p,absPath));if(state.savedRepos=remaining,isRemoteRepoKey(absPath)){let remotes=readRemoteRepos(state);if(absPath in remotes){let next={...remotes};delete next[absPath],state.remoteRepos=next}}result={removed:!0,path:absPath,total:remaining.length};return}),result}
|
|
3
|
-
export{isRemoteRepoKey,isRemoteProjectsEnabled,remoteRepoKey,getRemoteRepoConfig,getRemoteRepos,addRemoteRepo,resolveRepoRoot,isGitRepo,isValidBranchName,resolveMainRepoRoot,statePath,getSavedRepos,getPersistedString,setPersistedString,getCustomEngineIds,getDisabledEngineIds,addSavedRepo,backfillSavedReposFromProjects,normalizeSavedRepos,getRepoInitOverride,setRepoInitOverride,removeSavedRepo};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ensureGlobalKobeHooks}from"./chunk-a0ytx1ab.js";import{publishKobeTerminalTitle}from"./chunk-dw853n4w.js";import{enforceResetGate}from"./chunk-18rdsr2j.js";import{maybeHintSkillInstall}from"./chunk-xqdhp9y5.js";import"./chunk-3e5n28t6.js";import"./chunk-r2pztgm6.js";import"./chunk-g2e1dmxh.js";import"./chunk-nk1d8t3a.js";import"./chunk-jvxh93nz.js";import"./chunk-te8g5azg.js";import"./chunk-y13681dw.js";import"./chunk-b5mbpv97.js";import"./chunk-re5ke4fz.js";import"./chunk-mnqxgvyb.js";import"./chunk-71k66b8f.js";import"./chunk-khj0apc7.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import{__require}from"./chunk-wqfp8d9w.js";async function startTui(){enforceResetGate(),publishKobeTerminalTitle(),await maybeHintSkillInstall(),await ensureGlobalKobeHooks();let{loadPluginEngines}=await import("./chunk-ba4c8qjw.js");loadPluginEngines();let{startWorkspaceHost}=await import("./chunk-61ak2y9n.js");await startWorkspaceHost()}export{startTui};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{PS_PROBE_TIMEOUT_MS,engineProcessIn,foregroundEngine,foregroundEngineIn,hasAncestor,parsePsSnapshot,psSnapshot,psSnapshotWith,vendorFromArgv}from"./chunk-86938f2g.js";import"./chunk-71k66b8f.js";import"./chunk-khj0apc7.js";import"./chunk-5zh5fcpe.js";import"./chunk-w7zv47mp.js";import"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import{PsProbeUnavailableError}from"./chunk-pxk2c2vj.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{vendorFromArgv,psSnapshotWith,psSnapshot,parsePsSnapshot,hasAncestor,foregroundEngineIn,foregroundEngine,engineProcessIn,PsProbeUnavailableError,PS_PROBE_TIMEOUT_MS};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{PLUGIN_EVENT_NAMES}from"./chunk-mnqxgvyb.js";import{parse}from"./chunk-w7zv47mp.js";import{OWNER_ONLY_FILE_MODE}from"./chunk-9prawccj.js";import{COMPAT_STATE_DIR_BASENAME,ROVE_STATE_DIR_BASENAME,readRoveHomeDirEnv}from"./chunk-hq4b3fca.js";import{existsSync,readFileSync}from"fs";import{basename,join}from"path";var PLUGIN_PLATFORMS=["macos","linux","windows"];class ManifestError extends Error{}function fail(message){throw new ManifestError(`rove-plugin.toml: ${message}`)}function asString(value,field){if(typeof value!=="string"||value.length===0)fail(`\`${field}\` must be a non-empty string`);return value}function asSettingDefault(value,field){if(value===void 0||value===!1)return;if(value===!0)return"1";if(typeof value==="number"&&Number.isFinite(value))return String(value);return asString(value,field)}var TIMEOUT_MIN_MS=100,TIMEOUT_MAX_MS=600000;function asTimeoutMs(value,field){if(value===void 0)return;if(typeof value!=="number"||!Number.isInteger(value)||value<TIMEOUT_MIN_MS||value>TIMEOUT_MAX_MS)fail(`\`${field}\` must be a whole number of milliseconds between ${TIMEOUT_MIN_MS} and ${TIMEOUT_MAX_MS}`);return value}function asCommand(value,field){if(!Array.isArray(value)||value.length===0||!value.every((v)=>typeof v==="string"&&v.length>0))fail(`\`${field}\` must be a non-empty array of strings (argv form)`);return value}function asPlatforms(value,field){if(value===void 0)return;if(!Array.isArray(value)||!value.every((v)=>PLUGIN_PLATFORMS.includes(v)))fail(`\`${field}\` must be an array drawn from ${PLUGIN_PLATFORMS.join(", ")}`);return value}function asTableArray(value,field){if(value===void 0)return[];if(!Array.isArray(value)||!value.every((v)=>typeof v==="object"&&v!==null&&!Array.isArray(v)))fail(`\`[[${field}]]\` must be an array of tables`);return value}function asStringArray(value,field){if(value===void 0)return;if(!Array.isArray(value)||!value.every((v)=>typeof v==="string"&&v.length>0))fail(`\`${field}\` must be a non-empty array of strings`);return value}var SETTING_KEY_RE=/^[A-Za-z_][A-Za-z0-9_]*$/,RESERVED_SETTING_KEYS=["PATH","HOME","SHELL","IFS","LD_PRELOAD","LD_LIBRARY_PATH","LD_AUDIT","DYLD_INSERT_LIBRARIES","DYLD_LIBRARY_PATH","DYLD_FRAMEWORK_PATH","NODE_OPTIONS","BUN_INSPECT","PYTHONPATH","PYTHONSTARTUP","PERL5OPT","PERL5LIB","RUBYOPT","BASH_ENV","ENV","GIT_SSH_COMMAND","GIT_SSH","GIT_EXTERNAL_DIFF","GIT_PAGER","PAGER","EDITOR","VISUAL"];function settingKeyRejection(key){if(!SETTING_KEY_RE.test(key))return`\`${key}\` is not a valid env var name (${SETTING_KEY_RE.source})`;if(RESERVED_SETTING_KEYS.includes(key))return`\`${key}\` is reserved; it steers how the plugin's own process runs`;return null}var PLUGIN_MANIFEST_FILENAME="rove-plugin.toml",LEGACY_PLUGIN_MANIFEST_FILENAME="kobe-plugin.toml",PLUGIN_MANIFEST_FILENAMES=[PLUGIN_MANIFEST_FILENAME,LEGACY_PLUGIN_MANIFEST_FILENAME],RESERVED_ENGINE_IDS=["claude","codex","copilot","kimi","gemini","opencode","cursor","grok","droid","amp"];function pluginManifestPath(root){for(let filename of PLUGIN_MANIFEST_FILENAMES){let path=join(root,filename);if(existsSync(path))return path}return null}function readPluginManifest(root){let path=pluginManifestPath(root);if(!path)throw new ManifestError(`no ${PLUGIN_MANIFEST_FILENAMES.join(" or ")} found at ${root}`);return parsePluginManifest(readFileSync(path,"utf8"),basename(path))}var PLUGIN_ID_RE=/^[A-Za-z0-9][A-Za-z0-9._:-]*$/,LOCAL_ID_RE=/^[A-Za-z0-9][A-Za-z0-9_:-]*$/;function qualifiedActionId(pluginId,actionId){return`${pluginId}.${actionId}`}function currentPluginPlatform(platform=process.platform){if(platform==="darwin")return"macos";if(platform==="linux")return"linux";if(platform==="win32")return"windows";return}function supportsPlatform(item,manifest,platform){let declared=item.platforms??manifest.platforms;if(!declared)return!0;return platform!==void 0&&declared.includes(platform)}function parsePluginManifest(text,filename=PLUGIN_MANIFEST_FILENAME){try{return parseCanonicalPluginManifest(text)}catch(err){if(filename!==PLUGIN_MANIFEST_FILENAME&&err instanceof ManifestError)throw new ManifestError(err.message.replace(/^rove-plugin\.toml:/,`${filename}:`));throw err}}function parseCanonicalPluginManifest(text){let raw;try{raw=parse(text)}catch(err){fail(`invalid TOML \u2014 ${err instanceof Error?err.message:String(err)}`)}let warnings=[],id=asString(raw.id,"id");if(!PLUGIN_ID_RE.test(id))fail(`plugin id \`${id}\` may use ASCII letters, digits, dot, colon, underscore, hyphen`);let name=asString(raw.name,"name"),version=asString(raw.version,"version"),rawMinVersion=raw.min_rove_version??raw.min_kobe_version,minKobeVersion=asString(rawMinVersion,"min_rove_version"),description=raw.description===void 0?void 0:asString(raw.description,"description"),platforms=asPlatforms(raw.platforms,"platforms");if(!platforms)warnings.push("no top-level `platforms` declared; assuming the plugin runs everywhere");if(raw.min_rove_version!==void 0&&raw.min_kobe_version!==void 0&&raw.min_rove_version!==raw.min_kobe_version)warnings.push("both `min_rove_version` and legacy `min_kobe_version` are set; using `min_rove_version`");let build=asTableArray(raw.build,"build").map((t,i)=>({command:asCommand(t.command,`build[${i}].command`),platforms:asPlatforms(t.platforms,`build[${i}].platforms`)})),startup=asTableArray(raw.startup,"startup").map((t,i)=>({command:asCommand(t.command,`startup[${i}].command`),platforms:asPlatforms(t.platforms,`startup[${i}].platforms`),timeoutMs:asTimeoutMs(t.timeout_ms,`startup[${i}].timeout_ms`)})),shutdown=asTableArray(raw.shutdown,"shutdown").map((t,i)=>({command:asCommand(t.command,`shutdown[${i}].command`),platforms:asPlatforms(t.platforms,`shutdown[${i}].platforms`),timeoutMs:asTimeoutMs(t.timeout_ms,`shutdown[${i}].timeout_ms`)})),actions=asTableArray(raw.actions,"actions").map((t,i)=>{let actionId=asString(t.id,`actions[${i}].id`);if(t.timeout_ms!==void 0)warnings.push(`actions[${i}] declares \`timeout_ms\`; actions are user-invoked and are never killed on a deadline`);if(!LOCAL_ID_RE.test(actionId))fail(`action id \`${actionId}\` may not contain dots`);return{id:actionId,title:asString(t.title,`actions[${i}].title`),command:asCommand(t.command,`actions[${i}].command`),platforms:asPlatforms(t.platforms,`actions[${i}].platforms`)}}),seen=new Set;for(let a of actions){if(seen.has(a.id))fail(`duplicate action id \`${a.id}\``);seen.add(a.id)}let panes=asTableArray(raw.panes,"panes").map((t,i)=>{let paneId=asString(t.id,`panes[${i}].id`);if(!LOCAL_ID_RE.test(paneId))fail(`pane id \`${paneId}\` may not contain dots`);if(t.timeout_ms!==void 0)warnings.push(`panes[${i}] declares \`timeout_ms\`; a pane is a terminal the user closes, not a bounded hook`);if(t.placement!==void 0&&t.placement!=="tab"&&t.placement!=="split")warnings.push(`pane \`${paneId}\` placement \`${String(t.placement)}\` is not supported yet; opening as a split`);return{id:paneId,title:asString(t.title,`panes[${i}].title`),placement:t.placement==="tab"?"tab":"split",command:asCommand(t.command,`panes[${i}].command`),platforms:asPlatforms(t.platforms,`panes[${i}].platforms`)}}),paneSeen=new Set;for(let p of panes){if(paneSeen.has(p.id))fail(`duplicate pane id \`${p.id}\``);paneSeen.add(p.id)}let events=asTableArray(raw.events,"events").flatMap((t,i)=>{let on=asString(t.on,`events[${i}].on`),hook={on,command:asCommand(t.command,`events[${i}].command`),platforms:asPlatforms(t.platforms,`events[${i}].platforms`),timeoutMs:asTimeoutMs(t.timeout_ms,`events[${i}].timeout_ms`)};if(!PLUGIN_EVENT_NAMES.includes(on))warnings.push(`unknown event \`${on}\`; this hook will never fire on this Rove version`);return[hook]}),settings=asTableArray(raw.settings,"settings").map((t,i)=>{let type=asString(t.type,`settings[${i}].type`);if(type!=="string"&&type!=="number"&&type!=="boolean"&&type!=="enum"&&type!=="secret")fail(`settings[${i}].type must be string | number | boolean | enum | secret`);let options=t.options===void 0?void 0:Array.isArray(t.options)&&t.options.every((o)=>typeof o==="string"&&o.length>0)?t.options:fail(`settings[${i}].options must be an array of strings`);if(type==="enum"&&(!options||options.length===0))fail(`settings[${i}] enum needs \`options\``);let settingDefault=asSettingDefault(t.default,`settings[${i}].default`),key=asString(t.key,`settings[${i}].key`),rejection=settingKeyRejection(key);if(rejection)fail(`settings[${i}].key ${rejection}`);return{key,label:asString(t.label,`settings[${i}].label`),type,...options?{options}:{},...settingDefault===void 0?{}:{default:settingDefault}}}),fileHandlers=asTableArray(raw.file_handlers,"file_handlers").map((t,i)=>{let pattern=asString(t.pattern,`file_handlers[${i}].pattern`);try{new RegExp(pattern)}catch{fail(`file_handlers[${i}].pattern is not a valid regex`)}let action=asString(t.action,`file_handlers[${i}].action`);if(!actions.some((a)=>a.id===action))fail(`file_handlers[${i}] names unknown action \`${action}\``);return{pattern,action}}),engines=asTableArray(raw.engines,"engines").map((t,i)=>{let engineId=asString(t.id,`engines[${i}].id`);if(!LOCAL_ID_RE.test(engineId))fail(`engine id \`${engineId}\` may not contain dots`);if(RESERVED_ENGINE_IDS.includes(engineId))fail(`engine id \`${engineId}\` shadows a built-in or shipped engine`);let rules=asTableArray(t.rules,`engines[${i}].rules`).map((r,j)=>{let state=asString(r.state,`engines[${i}].rules[${j}].state`);if(state!=="working"&&state!=="blocked"&&state!=="idle")fail(`engines[${i}].rules[${j}].state must be working | blocked | idle`);let lineRegex=asStringArray(r.line_regex,`engines[${i}].rules[${j}].line_regex`);for(let re of lineRegex??[])try{new RegExp(re)}catch{fail(`engines[${i}].rules[${j}].line_regex \`${re}\` is not a valid regex`)}let all=asStringArray(r.all,`engines[${i}].rules[${j}].all`),any=asStringArray(r.any,`engines[${i}].rules[${j}].any`);if(!all&&!any&&!lineRegex)fail(`engines[${i}].rules[${j}] needs at least one of all/any/line_regex`);return{state,...typeof r.bottom_lines==="number"?{bottomLines:r.bottom_lines}:{},...all?{all}:{},...any?{any}:{},...lineRegex?{lineRegex}:{}}}),identityRaw=t.identity,identity;if(identityRaw!==void 0){if(typeof identityRaw!=="object"||identityRaw===null||Array.isArray(identityRaw))fail(`engines[${i}].identity must be a table`);let idt=identityRaw,shortName=((key)=>idt[key]===void 0?void 0:asString(idt[key],`engines[${i}].identity.${key}`))("short_name");identity={...shortName!==void 0?{shortName}:{}}}let firstMessageDelivery;if(t.first_message_delivery!==void 0){let raw2=asString(t.first_message_delivery,`engines[${i}].first_message_delivery`);if(raw2!=="argv"&&raw2!=="paste")fail(`engines[${i}].first_message_delivery must be argv | paste`);firstMessageDelivery=raw2}return{id:engineId,name:asString(t.name,`engines[${i}].name`),command:asCommand(t.command,`engines[${i}].command`),...t.process_names===void 0?{}:{processNames:asCommand(t.process_names,`engines[${i}].process_names`)},rules,...identity?{identity}:{},...firstMessageDelivery?{firstMessageDelivery}:{}}}),engineSeen=new Set;for(let e of engines){if(engineSeen.has(e.id))fail(`duplicate engine id \`${e.id}\``);engineSeen.add(e.id)}return{manifest:{id,name,version,minKobeVersion,description,platforms,build,startup,shutdown,actions,events,panes,settings,fileHandlers,engines},warnings}}import{existsSync as existsSync2}from"fs";import{homedir}from"os";import{join as join2}from"path";function stateRoot(homeDir){let home=homeDir??readRoveHomeDirEnv()??homedir(),canonical=join2(home,ROVE_STATE_DIR_BASENAME);if(existsSync2(join2(canonical,"plugins.json")))return canonical;let legacy=join2(home,COMPAT_STATE_DIR_BASENAME);return existsSync2(join2(legacy,"plugins.json"))?legacy:canonical}function pluginRegistryPath(homeDir){return join2(stateRoot(homeDir),"plugins.json")}function pluginsRootDir(homeDir){return join2(stateRoot(homeDir),"plugins")}function legacyPluginsRootDir(homeDir){let home=homeDir??readRoveHomeDirEnv()??homedir();return join2(home,COMPAT_STATE_DIR_BASENAME,"plugins")}function pluginDataDir(id,homeDir){return join2(pluginsRootDir(homeDir),id)}function pluginCheckoutDir(id,homeDir){return join2(pluginDataDir(id,homeDir),"checkout")}function pluginConfigDir(id,homeDir){return join2(pluginDataDir(id,homeDir),"config")}function pluginStateDir(id,homeDir){return join2(pluginDataDir(id,homeDir),"state")}function pluginLogPath(id,homeDir){return join2(pluginDataDir(id,homeDir),"log.jsonl")}function pluginsOutdatedCachePath(homeDir){return join2(stateRoot(homeDir),"plugins-outdated.json")}import{mkdirSync,readFileSync as readFileSync2,writeFileSync}from"fs";import{dirname,join as join3,relative}from"path";var EMPTY={plugins:[]};function loadPluginRegistry(homeDir){let text;try{text=readFileSync2(pluginRegistryPath(homeDir),"utf8")}catch{return EMPTY}try{let raw=JSON.parse(text);if(!Array.isArray(raw.plugins))return EMPTY;return{plugins:raw.plugins.filter(isEntry).map((entry)=>withCanonicalRoot(entry,homeDir))}}catch{return EMPTY}}function withCanonicalRoot(entry,homeDir){if(entry.source.kind!=="github")return entry;let legacy=legacyPluginsRootDir(homeDir),canonical=pluginsRootDir(homeDir);if(legacy===canonical)return entry;let inside=relative(legacy,entry.root);if(inside===""||inside.startsWith("..")||inside.startsWith("/"))return entry;return{...entry,root:join3(canonical,inside)}}function isEntry(v){if(typeof v!=="object"||v===null)return!1;let e=v,source=e.source;return typeof e.id==="string"&&typeof e.root==="string"&&typeof e.enabled==="boolean"&&typeof e.version==="string"&&typeof e.installedAt==="number"&&typeof source==="object"&&source!==null&&(source.kind==="link"||source.kind==="github"&&typeof source.spec==="string")}function savePluginRegistry(registry,homeDir){let path=pluginRegistryPath(homeDir);mkdirSync(dirname(path),{recursive:!0}),writeFileSync(path,`${JSON.stringify(registry,null,2)}
|
|
3
|
-
`,{mode:OWNER_ONLY_FILE_MODE})}function upsertPluginEntry(registry,entry){return{plugins:[...registry.plugins.filter((p)=>p.id!==entry.id),entry]}}function removePluginEntry(registry,id){return{plugins:registry.plugins.filter((p)=>p.id!==id)}}
|
|
4
|
-
export{PLUGIN_MANIFEST_FILENAMES,pluginManifestPath,readPluginManifest,qualifiedActionId,currentPluginPlatform,supportsPlatform,parsePluginManifest,pluginRegistryPath,pluginsRootDir,pluginDataDir,pluginCheckoutDir,pluginConfigDir,pluginStateDir,pluginLogPath,pluginsOutdatedCachePath,loadPluginRegistry,savePluginRegistry,upsertPluginEntry,removePluginEntry};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Orchestrator}from"./chunk-f48pdjby.js";import"./chunk-9n3agxv0.js";import"./chunk-2pv5vb5a.js";import"./chunk-2kb4z64z.js";import"./chunk-bkm7vxr5.js";import{PLACEHOLDER_TASK_TITLE}from"./chunk-xb9b93ts.js";import"./chunk-vhq2dhx2.js";import"./chunk-63wmhbqs.js";import"./chunk-6xppe9bj.js";import"./chunk-rc0sqhdh.js";import"./chunk-2apszxn2.js";import"./chunk-g2advs8t.js";import"./chunk-hape5vwj.js";import"./chunk-sdyzxayr.js";import"./chunk-khj0apc7.js";import"./chunk-7kysxgbq.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-2brn8e1y.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{PLACEHOLDER_TASK_TITLE,Orchestrator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{TaskIndexStore}from"./chunk-xjnd1hwr.js";import"./chunk-qkehg2c1.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ddcxvbme.js";import"./chunk-bq3fyc0p.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{TaskIndexStore};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{installedSkillDirs}from"./chunk-xqdhp9y5.js";import{CLAUDE_HOOK_EVENT_MAP,claudeSettingsPath,hasKobeActivityHooks,isObject}from"./chunk-pdnq8dbm.js";import"./chunk-7jkf3tvr.js";import"./chunk-7kysxgbq.js";import"./chunk-r9gfh1zz.js";import"./chunk-xy8be792.js";import"./chunk-ejqs2ta9.js";import"./chunk-3jh78dmc.js";import"./chunk-ddcxvbme.js";import"./chunk-bq3fyc0p.js";import"./chunk-81p6mm0p.js";import"./chunk-q5jhy3t8.js";import"./chunk-t915by6w.js";import"./chunk-9prawccj.js";import"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-0q6h4vt4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-8cjr5ypt.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.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&&(hasKobeActivityHooks(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{parsePorcelain,pickPushedChanges,readWorktreeChanges,sameWorktreeChanges}from"./chunk-xqw5d5rv.js";import"./chunk-h4n8ffqy.js";import"./chunk-6xppe9bj.js";import"./chunk-wqfp8d9w.js";export{sameWorktreeChanges,readWorktreeChanges,pickPushedChanges,parsePorcelain};
|