@sma1lboy/rove 0.9.160 → 0.9.162
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-39x1ztey.js → chunk-044s3zc5.js} +1 -1
- package/dist/cli/{chunk-zmvsqfad.js → chunk-07m61r5j.js} +5 -5
- package/dist/cli/{chunk-qy855bd5.js → chunk-0e04wrvh.js} +1 -1
- package/dist/cli/{chunk-wdhcrcre.js → chunk-0f6hf3bv.js} +1 -1
- package/dist/cli/chunk-13mw2v47.js +2 -0
- package/dist/cli/{chunk-kt1ppyje.js → chunk-1kz2syvp.js} +1 -1
- package/dist/cli/{chunk-e85ttr8r.js → chunk-1x5wrm14.js} +1 -1
- package/dist/cli/chunk-2840nxj7.js +3 -0
- package/dist/cli/{chunk-y7szq7xb.js → chunk-29xgqs7n.js} +2 -2
- package/dist/cli/{chunk-144wtkqt.js → chunk-2pezpj5y.js} +1 -1
- package/dist/cli/{chunk-qpd817w4.js → chunk-2ra4990w.js} +1 -1
- package/dist/cli/chunk-3bcx9dyb.js +2 -0
- package/dist/cli/{chunk-ttnpek4s.js → chunk-3pwsrf4f.js} +3 -3
- package/dist/cli/chunk-3ye9er38.js +2 -0
- package/dist/cli/chunk-4wswdvzj.js +2 -0
- package/dist/cli/chunk-5h3bhg45.js +3 -0
- package/dist/cli/{chunk-39fjx5fq.js → chunk-5ks91n60.js} +5 -4
- package/dist/cli/{chunk-vj2vdx3w.js → chunk-632q2pg7.js} +1 -1
- package/dist/cli/chunk-6b8zqcpq.js +2 -0
- package/dist/cli/{chunk-t0y9ty67.js → chunk-6ndddtg5.js} +1 -1
- package/dist/cli/{chunk-a2xndedd.js → chunk-6tvrvekq.js} +1 -1
- package/dist/cli/{chunk-1aqmmea7.js → chunk-6zvw1wp6.js} +1 -1
- package/dist/cli/{chunk-ztx1pfqv.js → chunk-7027e3rb.js} +1 -1
- package/dist/cli/chunk-7fedb3me.js +2 -0
- package/dist/cli/chunk-8djkntnp.js +3 -0
- package/dist/cli/{chunk-zvfgzpw6.js → chunk-8g4xwg93.js} +1 -1
- package/dist/cli/{chunk-z49thwax.js → chunk-8z7gz4pp.js} +1 -1
- package/dist/cli/{chunk-caqpt09m.js → chunk-932ymm0m.js} +1 -1
- package/dist/cli/{chunk-sfv15era.js → chunk-9esrwvqc.js} +1 -1
- package/dist/cli/chunk-abpzjm1b.js +2 -0
- package/dist/cli/chunk-ayhhgfsz.js +3 -0
- package/dist/cli/{chunk-6pt23vas.js → chunk-b3pxf5xd.js} +1 -1
- package/dist/cli/{chunk-gkmpfpmn.js → chunk-bpkg51p5.js} +2 -2
- package/dist/cli/chunk-br3yby3b.js +9 -0
- package/dist/cli/{chunk-qr3e1m00.js → chunk-cjfc4hj1.js} +4 -4
- package/dist/cli/{chunk-ds9qf1w1.js → chunk-dx4xyegr.js} +1 -1
- package/dist/cli/{chunk-84s62bex.js → chunk-eezk0g2q.js} +1 -1
- package/dist/cli/{chunk-pas1rh6m.js → chunk-epjh74m5.js} +1 -1
- package/dist/cli/{chunk-wdq5p44p.js → chunk-ewj2egvk.js} +2 -2
- package/dist/cli/{chunk-56wver0a.js → chunk-ewp7xthp.js} +1 -1
- package/dist/cli/{chunk-hj08heah.js → chunk-ffj7jp3k.js} +1 -1
- package/dist/cli/{chunk-ny31s73y.js → chunk-ftpbjbg9.js} +1 -1
- package/dist/cli/{chunk-cz7qj1p8.js → chunk-g8725q49.js} +1 -1
- package/dist/cli/{chunk-ynknvkrw.js → chunk-gvm4ss24.js} +1 -1
- package/dist/cli/chunk-gyc4fj15.js +3 -0
- package/dist/cli/{chunk-5w26jqne.js → chunk-h7zbtt85.js} +1 -1
- package/dist/cli/{chunk-aak5ttgt.js → chunk-hfh1wgtr.js} +1 -1
- package/dist/cli/{chunk-5v893waj.js → chunk-j75axe29.js} +1 -1
- package/dist/cli/{chunk-w68k2kdb.js → chunk-k1qe5qqa.js} +1 -1
- package/dist/cli/{chunk-y8yyk9hq.js → chunk-k43kf7qa.js} +1 -1
- package/dist/cli/{chunk-ksqdd9zh.js → chunk-kadvep6x.js} +1 -1
- package/dist/cli/chunk-mqs1qvc6.js +2 -0
- package/dist/cli/chunk-mv7ptt5w.js +3 -0
- package/dist/cli/{chunk-yrawhw9y.js → chunk-n1r2qzvw.js} +2 -2
- package/dist/cli/chunk-n55jst34.js +7 -0
- package/dist/cli/{chunk-cfg0s90c.js → chunk-n5c3k1dg.js} +1 -1
- package/dist/cli/{chunk-g48s150x.js → chunk-n7rhhjta.js} +1 -1
- package/dist/cli/{chunk-9wn8m2rt.js → chunk-nwe9c7x6.js} +1 -1
- package/dist/cli/{chunk-0hn7ctj6.js → chunk-p2s4hv7y.js} +1 -1
- package/dist/cli/{chunk-myewzjst.js → chunk-pktxzp2v.js} +1 -1
- package/dist/cli/chunk-ptj9ng0t.js +2 -0
- package/dist/cli/{chunk-zz788rt4.js → chunk-q0s362r7.js} +2 -2
- package/dist/cli/{chunk-9h4kbsk5.js → chunk-q6c30g0b.js} +1 -1
- package/dist/cli/{chunk-47nevjck.js → chunk-qrry2qvw.js} +2 -2
- package/dist/cli/{chunk-cs50jnwn.js → chunk-qs80x1cd.js} +1 -1
- package/dist/cli/{chunk-ccjmtajy.js → chunk-qwsn05zz.js} +1 -1
- package/dist/cli/chunk-r79ht9kg.js +2 -0
- package/dist/cli/{chunk-1cjd7h8p.js → chunk-rcyasw34.js} +1 -1
- package/dist/cli/chunk-rqwx8wqx.js +2 -0
- package/dist/cli/chunk-s6mcrm5g.js +2 -0
- package/dist/cli/{chunk-wbt845s6.js → chunk-sx8fw2qd.js} +1 -1
- package/dist/cli/chunk-t2v3ad8y.js +3 -0
- package/dist/cli/{chunk-1ckc04zj.js → chunk-tj1tjdvd.js} +1 -1
- package/dist/cli/{chunk-t7xhb2jx.js → chunk-tqat428f.js} +1 -1
- package/dist/cli/{chunk-ntt7gy5a.js → chunk-ttd78mrr.js} +1 -1
- package/dist/cli/chunk-wc0g8kzq.js +2 -0
- package/dist/cli/{chunk-8vec42df.js → chunk-ww0rwg80.js} +1 -1
- package/dist/cli/chunk-wzdrq5es.js +2 -0
- package/dist/cli/{chunk-0bayctej.js → chunk-x5g5rjtn.js} +3 -3
- package/dist/cli/{chunk-t27t2x9b.js → chunk-xcgb5q15.js} +1 -1
- package/dist/cli/{chunk-j91yq51m.js → chunk-xwtqz55p.js} +3 -3
- package/dist/cli/{chunk-x6hevxs5.js → chunk-y9xr3c66.js} +1 -1
- package/dist/cli/chunk-ycdeav89.js +2 -0
- package/dist/cli/chunk-ykrvv6bc.js +4 -0
- package/dist/cli/chunk-ytkx5h87.js +2 -0
- package/dist/cli/{chunk-s59cymtd.js → chunk-zf45ap00.js} +1 -1
- package/dist/cli/index.js +7 -7
- package/dist/cli/kobe.js +1 -1
- package/dist/cli/pty-host-node.mjs +17 -18
- package/dist/cli/rove.js +1 -1
- package/package.json +1 -1
- package/dist/cli/chunk-0am6gj8j.js +0 -9
- package/dist/cli/chunk-0fhab4tq.js +0 -2
- package/dist/cli/chunk-1y37w7zq.js +0 -4
- package/dist/cli/chunk-22yhtgcy.js +0 -7
- package/dist/cli/chunk-4502n1bk.js +0 -3
- package/dist/cli/chunk-4jf0yq4v.js +0 -2
- package/dist/cli/chunk-6b474j5g.js +0 -2
- package/dist/cli/chunk-7x88845e.js +0 -2
- package/dist/cli/chunk-91f68r6e.js +0 -2
- package/dist/cli/chunk-959a71qj.js +0 -2
- package/dist/cli/chunk-a3a9gdc4.js +0 -3
- package/dist/cli/chunk-azsmk821.js +0 -2
- package/dist/cli/chunk-cdxme5y4.js +0 -2
- package/dist/cli/chunk-cfghdnev.js +0 -2
- package/dist/cli/chunk-dmdpsw2y.js +0 -2
- package/dist/cli/chunk-dzd1wy5a.js +0 -2
- package/dist/cli/chunk-kw0nnzdp.js +0 -2
- package/dist/cli/chunk-mhs6yywx.js +0 -2
- package/dist/cli/chunk-mp8v5gn8.js +0 -2
- package/dist/cli/chunk-mqqnk8w7.js +0 -3
- package/dist/cli/chunk-nm0pq5r6.js +0 -3
- package/dist/cli/chunk-rc668r26.js +0 -2
- package/dist/cli/chunk-w06vgba4.js +0 -3
- package/dist/cli/chunk-yzmvmt89.js +0 -2
- package/dist/cli/chunk-zftxrnwh.js +0 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{engineEntry}from"./chunk-
|
|
2
|
+
import{engineEntry}from"./chunk-07m61r5j.js";import{roveCliInvocation}from"./chunk-6tvrvekq.js";import{getPersistedString}from"./chunk-1kz2syvp.js";import{coerceVendorId}from"./chunk-bq3fyc0p.js";function engineCommandKey(vendor){return`engineCommand.${vendor}`}function engineNameKey(vendor){return`engineName.${vendor}`}function engineDisplayName(vendor){return getPersistedString(engineNameKey(vendor))?.trim()||engineEntry(vendor).displayName}function humanizeSlug(id){return id.split(/[-_]+/).filter((word)=>word.length>0).map((word)=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}function defaultEngineCommand(vendor){return engineEntry(coerceVendorId(vendor)).defaultCommand}function parseEngineCommand(command){let out=[],token="",hasToken=!1,quote=null;for(let ch of command){if(quote){if(ch===quote)quote=null;else token+=ch;continue}if(ch==='"'||ch==="'"){quote=ch,hasToken=!0;continue}if(/\s/.test(ch)){if(hasToken)out.push(token),token="",hasToken=!1;continue}token+=ch,hasToken=!0}if(hasToken)out.push(token);return out}function interactiveEngineCommand(vendor,effort){let v=coerceVendorId(vendor),override=getPersistedString(engineCommandKey(v))?.trim(),base=(()=>{if(override){let argv=parseEngineCommand(override);if(argv.length>0)return argv}return defaultEngineCommand(v)})();return withEngineTerminalTitle(withEngineEffort(base,v,effort),v)}function withEngineTerminalTitle(argv,vendor){let args=engineEntry(coerceVendorId(vendor)).terminalTitle?.launchArgs;return args&&args.length>0?[...argv,...args]:argv}function withEngineEffort(argv,vendor,effort){let trimmed=effort?.trim();if(!trimmed)return argv;let entry=engineEntry(coerceVendorId(vendor));if(!entry.effortLevels?.includes(trimmed))return argv;return entry.effortArgv?.(argv,trimmed)??argv}function kobeApiInvocation(){let quote=(a)=>/^[A-Za-z0-9_/.:=-]+$/.test(a)?a:`'${a.replace(/'/g,"'\\''")}'`;try{return[...roveCliInvocation(),"api"].map(quote).join(" ")}catch{return"rove api"}}
|
|
3
3
|
export{engineCommandKey,engineNameKey,engineDisplayName,humanizeSlug,defaultEngineCommand,parseEngineCommand,interactiveEngineCommand,withEngineTerminalTitle,withEngineEffort,kobeApiInvocation};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{Orchestrator}from"./chunk-sx8fw2qd.js";import"./chunk-632q2pg7.js";import"./chunk-tqat428f.js";import"./chunk-ffj7jp3k.js";import"./chunk-932ymm0m.js";import"./chunk-6xppe9bj.js";import{PLACEHOLDER_TASK_TITLE}from"./chunk-r05r01nv.js";import"./chunk-b3pxf5xd.js";import"./chunk-5f80ggc3.js";import"./chunk-dx4xyegr.js";import"./chunk-bkba9c4n.js";import"./chunk-g2advs8t.js";import"./chunk-hape5vwj.js";import"./chunk-sdyzxayr.js";import"./chunk-gwcneg6c.js";import"./chunk-2fypr41w.js";import"./chunk-1kz2syvp.js";import"./chunk-j75axe29.js";import"./chunk-xy8be792.js";import"./chunk-ayhhgfsz.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-mv7ptt5w.js";import"./chunk-g56kvet6.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{PLACEHOLDER_TASK_TITLE,Orchestrator};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{installedSkillDirs}from"./chunk-bpkg51p5.js";import{CLAUDE_HOOK_EVENT_MAP,claudeSettingsPath,hasKobeActivityHooks,isObject}from"./chunk-6tvrvekq.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-1kz2syvp.js";import"./chunk-j75axe29.js";import"./chunk-k1qe5qqa.js";import"./chunk-xy8be792.js";import"./chunk-ayhhgfsz.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-mv7ptt5w.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.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};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import{openDaemonSession,resolveActiveTaskId}from"./chunk-6zvw1wp6.js";import"./chunk-2840nxj7.js";import"./chunk-gyc4fj15.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-mv7ptt5w.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{resolveActiveTaskId,openDaemonSession};
|
|
@@ -4,4 +4,4 @@ import{SUBCOMMAND_VERBS}from"./chunk-s76r56rj.js";import{expandTilde}from"./chun
|
|
|
4
4
|
|
|
5
5
|
${REPO_USAGE}
|
|
6
6
|
`),process.exit(2)}function readArgFile(path){try{return readFileSync(resolve(process.cwd(),expandTilde(path)),"utf8")}catch(err){usageError(`cannot read ${path}: ${errorMessage(err)}`)}}function parseRepoArgs(args){let out={};for(let i=0;i<args.length;i++){let a=args[i],need=()=>{let v=args[++i];if(v===void 0)usageError(`${a} requires a value`);return v};if(a==="--init-script")out.initScript=need();else if(a==="--init-script-file")out.initScript=readArgFile(need());else if(a==="--init-prompt")out.initPrompt=need();else if(a==="--init-prompt-file")out.initPrompt=readArgFile(need());else if(a.startsWith("-"))usageError(`unknown flag "${a}"`);else if(out.path===void 0)out.path=a;else usageError(`unexpected argument "${a}"`)}return out}function parseUnsetArgs(args){let path,clearScript=!1,clearPrompt=!1;for(let a of args)if(a==="--init-script")clearScript=!0;else if(a==="--init-prompt")clearPrompt=!0;else if(a.startsWith("-"))usageError(`unknown flag "${a}"`);else if(path===void 0)path=a;else usageError(`unexpected argument "${a}"`);if(!clearScript&&!clearPrompt)clearScript=!0,clearPrompt=!0;return{path,clearScript,clearPrompt}}async function runRepoSubcommand(args){let[verb,...rest]=args;if(verb===void 0||verb==="--help"||verb==="-h"||verb==="help"){process.stdout.write(`${REPO_USAGE}
|
|
7
|
-
`);return}if(!SUBCOMMAND_VERBS.repo.includes(verb))usageError(`unknown verb "${verb}"`);let{getRepoInitOverride,setRepoInitOverride,resolveRepoRoot}=await import("./chunk-
|
|
7
|
+
`);return}if(!SUBCOMMAND_VERBS.repo.includes(verb))usageError(`unknown verb "${verb}"`);let{getRepoInitOverride,setRepoInitOverride,resolveRepoRoot}=await import("./chunk-s6mcrm5g.js");if(verb==="show"){let[pathArg]=rest.filter((a)=>!a.startsWith("-")),repo=resolveRepoRoot(resolve(process.cwd(),expandTilde(pathArg??"."))),override=getRepoInitOverride(repo),{describeRepoInitSources}=await import("./chunk-3bcx9dyb.js"),sources=describeRepoInitSources(repo);console.log(`repo: ${repo}`);for(let group of[sources.script,sources.prompt])group.forEach((source,index)=>{console.log(` ${`${source.rel}:`.padEnd(22)}${describeSource(group,index)}`)});console.log(` override initScript: ${override.initScript?quotePreview(override.initScript):"(unset)"}`),console.log(` override initPrompt: ${override.initPrompt?quotePreview(override.initPrompt):"(unset)"}`);return}if(verb==="set"){let flags=parseRepoArgs(rest);if(flags.initScript===void 0&&flags.initPrompt===void 0)usageError("set needs at least one of --init-script(-file) / --init-prompt(-file)");let repo=resolveRepoRoot(resolve(process.cwd(),expandTilde(flags.path??"."))),next=setRepoInitOverride(repo,{...flags.initScript!==void 0?{initScript:flags.initScript}:{},...flags.initPrompt!==void 0?{initPrompt:flags.initPrompt}:{}});console.log(`updated override for ${repo}`),console.log(` initScript: ${next.initScript?quotePreview(next.initScript):"(unset)"}`),console.log(` initPrompt: ${next.initPrompt?quotePreview(next.initPrompt):"(unset)"}`);return}if(verb==="unset"){let{path,clearScript,clearPrompt}=parseUnsetArgs(rest),repo=resolveRepoRoot(resolve(process.cwd(),expandTilde(path??"."))),next=setRepoInitOverride(repo,{...clearScript?{initScript:""}:{},...clearPrompt?{initPrompt:""}:{}});console.log(`cleared override for ${repo}`),console.log(` initScript: ${next.initScript?quotePreview(next.initScript):"(unset)"}`),console.log(` initPrompt: ${next.initPrompt?quotePreview(next.initPrompt):"(unset)"}`);return}usageError(`unknown verb "${verb}"`)}function describeSource(group,index){let source=group[index];if(!source)return"absent";if(source.effective)return"present (wins)";if(!source.present)return"absent";return group.slice(0,index).some((earlier)=>earlier.effective)?"present (shadowed)":"present but empty (ignored)"}function quotePreview(value){let oneLine=value.replace(/\s+/g," ").trim();return oneLine.length>60?`"${oneLine.slice(0,57)}\u2026"`:`"${oneLine}"`}export{runRepoSubcommand};
|
package/dist/cli/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
|
-
import{matchPathGlob}from"./chunk-kg11c1py.js";import{CURRENT_VERSION}from"./chunk-
|
|
4
|
-
`),process.exit(1);let projectRoot=await projectRootFor(dir);await withDaemonOrLocal({daemon:async(client)=>{let taskId;if(projectRoot)taskId=(await client.request("task.ensureMain",{repo:projectRoot})).task.id;else taskId=(await client.request("task.openDir",{dir})).taskId;await client.request("task.setActive",{taskId})},local:async(orch)=>{let task=projectRoot?await orch.ensureMainTask(projectRoot):await orch.openDirectoryTask({dir}),{writeLastActiveTaskId}=await import("./chunk-
|
|
3
|
+
import{matchPathGlob}from"./chunk-kg11c1py.js";import{CURRENT_VERSION}from"./chunk-1x5wrm14.js";import{expandTilde}from"./chunk-msr1xtay.js";import{argvHasFlag}from"./chunk-jvxh93nz.js";import{connectIfRunning}from"./chunk-2840nxj7.js";import"./chunk-gyc4fj15.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import{errorMessage}from"./chunk-2brn8e1y.js";import{rejectionReason}from"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import{BUILTIN_VENDORS,coerceVendorId,isBuiltinVendor}from"./chunk-bq3fyc0p.js";import"./chunk-mv7ptt5w.js";import{activeCliName,prepareCliEnvironment}from"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import{__require}from"./chunk-wqfp8d9w.js";import{resolve as resolve2}from"path";function debugEnabled(env){return env.KOBE_DEBUG==="1"||env.ROVE_DEBUG==="1"}function failureSubject(cliName,argv){let verb=argv[2];return verb&&!verb.startsWith("-")&&!verb.includes("/")?`${cliName} ${verb}`:cliName}function summarizeCliGitError(message,cwd){if(!/not a git repository/i.test(message))return null;return`${cwd} is not a git repository \u2014 run this inside one, or pass a repo path.`}function formatCliFailure(err,opts){let subject=failureSubject(opts.cliName,opts.argv);if(debugEnabled(opts.env))return`${subject}: ${String(err instanceof Error?err.stack??err:err)}`;let raw=errorMessage(err);return`${subject}: ${summarizeCliGitError(raw,opts.cwd)??raw}`}var DYNAMIC_COMMANDS=new Map([["completions",async(args)=>{let{runCompletionsSubcommand}=await import("./chunk-h7zbtt85.js");await runCompletionsSubcommand(args)}],["export",async(args)=>{let{runExportSubcommand}=await import("./chunk-n5c3k1dg.js");await runExportSubcommand(args)}],["repo",async(args)=>{let{runRepoSubcommand}=await import("./chunk-zf45ap00.js");await runRepoSubcommand(args)}],["api",async(args)=>{let{runApiSubcommand}=await import("./chunk-2pezpj5y.js");await runApiSubcommand(args)}],["update",async(args)=>{let{runUpdateSubcommand}=await import("./chunk-5ks91n60.js");await runUpdateSubcommand(args)}],["theme",async(args)=>{let{runThemeSubcommand}=await import("./chunk-51sbegpb.js");await runThemeSubcommand(args)}],["feedback",async(args)=>{let{runFeedbackSubcommand}=await import("./chunk-tj1tjdvd.js");await runFeedbackSubcommand(args)}],["daemon",async(args)=>{let{runDaemonSubcommand}=await import("./chunk-n1r2qzvw.js");await runDaemonSubcommand(args)}],["doctor",async(args)=>{let{runDoctorSubcommand}=await import("./chunk-3pwsrf4f.js");await runDoctorSubcommand(args)}],["config",async(args)=>{let{runConfigSubcommand}=await import("./chunk-n55jst34.js");await runConfigSubcommand(args)}],["reset",async(args)=>{let{runResetSubcommand}=await import("./chunk-br3yby3b.js");await runResetSubcommand(args)}],["pty-host",async(args)=>{let{runPtyHostSubcommand}=await import("./chunk-8djkntnp.js");await runPtyHostSubcommand(args)}],["skill",async(args)=>{let{runSkillSubcommand}=await import("./chunk-q0s362r7.js");await runSkillSubcommand(args)}],["plugin",async(args)=>{let{runPluginSubcommand}=await import("./chunk-x5g5rjtn.js");await runPluginSubcommand(args)}],["hook",async(args)=>{let{runHookSubcommand}=await import("./chunk-3ye9er38.js");await runHookSubcommand(args)}]]);import{statSync}from"fs";import{resolve}from"path";async function openLocalOrchestrator(){let{TaskIndexStore}=await import("./chunk-r79ht9kg.js"),{GitWorktreeManager}=await import("./chunk-wzdrq5es.js"),{Orchestrator}=await import("./chunk-ycdeav89.js"),store=new TaskIndexStore;return await store.load(),new Orchestrator({store,worktrees:new GitWorktreeManager})}async function withDaemonOrLocal(bridge){let client=await connectIfRunning();if(client)try{return await bridge.daemon(client)}finally{client.close()}let orch=await openLocalOrchestrator();return bridge.local(orch)}function isPathLikeArg(arg){return arg==="."||arg===".."||arg.startsWith("./")||arg.startsWith("../")||arg.startsWith("/")||arg==="~"||arg.startsWith("~/")}async function projectRootFor(dir){let{isGitRepo,resolveRepoRoot}=await import("./chunk-s6mcrm5g.js"),{projectRejection}=await import("./chunk-t3z4etp5.js"),top=resolveRepoRoot(dir);if(top!==dir)return null;return projectRejection(top,isGitRepo,"explicit")?null:top}async function runOpenDirectory(arg){let dir=resolve(process.cwd(),expandTilde(arg)),isDir=!1;try{isDir=statSync(dir).isDirectory()}catch{isDir=!1}if(!isDir)process.stderr.write(`${activeCliName()}: "${arg}" is not a directory (resolved to ${dir}).
|
|
4
|
+
`),process.exit(1);let projectRoot=await projectRootFor(dir);await withDaemonOrLocal({daemon:async(client)=>{let taskId;if(projectRoot)taskId=(await client.request("task.ensureMain",{repo:projectRoot})).task.id;else taskId=(await client.request("task.openDir",{dir})).taskId;await client.request("task.setActive",{taskId})},local:async(orch)=>{let task=projectRoot?await orch.ensureMainTask(projectRoot):await orch.openDirectoryTask({dir}),{writeLastActiveTaskId}=await import("./chunk-wc0g8kzq.js");writeLastActiveTaskId(String(task.id))}});let{publishKobeTerminalTitle}=await import("./chunk-1tx1s5v6.js");publishKobeTerminalTitle();let{startTui}=await import("./chunk-6b8zqcpq.js");await startTui()}function topLevelUsage(cliName=activeCliName()){return[`${cliName} ${CURRENT_VERSION}`,"",`Usage: ${cliName} [command] [options]`,"","Run with no command to launch PureTUI.",`Run \`${cliName} .\` (or \`${cliName} <path>\`) to open a directory as a standalone task.`,"","Commands:"," completions <shell> Generate shell completion script (bash/zsh/fish)"," add [path] Save a repo path for the new-task picker"," remove [path] Forget a saved project (inverse of add; non-destructive)"," adopt [glob] Import existing git worktrees as tasks"," export [--csv|--json] Print the task list (json/csv/table; daemon-free)"," repo <verb> Per-repo init script + first prompt (show|set|unset)",` api <verb> Scriptable RPC surface for agents (see \`${cliName} api --help\`)`," daemon <verb> Manage the daemon (start|stop|status|restart)"," doctor [--report|--fix] Diagnose daemon/PTY/engines/git; --fix walks the remedies",` config [--path] Open ${cliName}'s config file (state.json) in your editor`," reset [--hard] Stop runtimes; optionally wipe task/UI state"," theme <verb> Manage user themes (list|add|remove)",` skill <verb> Install the ${cliName} agent skill (install|status|command|print)`," plugin <verb> Install and run plugins (install|link|list|action|\u2026)"," feedback Send feedback to GitHub Discussions",` update [version|channel|list] Self-update ${cliName}, switch channel, or list versions`,"","Options:"," -v, --version Print version"," -h, --help Print this help"," --skill Print the agent skill file and exit"].join(`
|
|
5
5
|
`)}prepareCliEnvironment();var CLI_NAME=activeCliName(),ADD_USAGE=[`Usage: ${CLI_NAME} add [path]`,` ${CLI_NAME} add --remote --host <host> --user <user> --path <basePath> [--port N] [--key [path] | --password]`,"","Save a repo for the new-task picker. With --remote, register an SSH-backed","project whose worktrees live on <host>; engine launch over SSH is pending.",""].join(`
|
|
6
|
-
`);async function runAddSubcommand(rest){let arg=rest[0];if(arg==="--help"||arg==="-h"||arg==="help"){process.stdout.write(ADD_USAGE);return}if(arg==="--remote"){let{runAddRemote}=await import("./chunk-
|
|
6
|
+
`);async function runAddSubcommand(rest){let arg=rest[0];if(arg==="--help"||arg==="-h"||arg==="help"){process.stdout.write(ADD_USAGE);return}if(arg==="--remote"){let{runAddRemote}=await import("./chunk-6ndddtg5.js");await runAddRemote(rest.slice(1));return}if(arg?.startsWith("-"))process.stderr.write(`${CLI_NAME} add: unknown flag "${arg}"
|
|
7
7
|
|
|
8
|
-
${ADD_USAGE}`),process.exit(2);let target=resolve2(process.cwd(),expandTilde(arg&&arg.length>0?arg:".")),{addSavedRepo}=await import("./chunk-
|
|
8
|
+
${ADD_USAGE}`),process.exit(2);let target=resolve2(process.cwd(),expandTilde(arg&&arg.length>0?arg:".")),{addSavedRepo}=await import("./chunk-s6mcrm5g.js"),result=addSavedRepo(target);if(result.rejected)process.stderr.write(`${CLI_NAME} add: "${arg&&arg.length>0?arg:"."}" cannot be a project \u2014 ${rejectionReason(result.rejected)} (resolved to ${result.path}).
|
|
9
9
|
`),process.exit(1);if(result.added)console.log(`added ${result.path} (${result.total} saved repo${result.total===1?"":"s"} total)`);else console.log(`already saved: ${result.path}`);await ensureProjectMainTask(result.path),await adoptAllWorktrees(result.path)}async function ensureProjectMainTask(repo){try{await withDaemonOrLocal({daemon:(client)=>client.request("task.ensureMain",{repo}),local:(orch)=>orch.ensureMainTask(repo)})}catch(err){console.error(`(skipped project main-task setup: ${errorMessage(err)})`)}}var PURGE_FLAG="--purge-credentials",REMOVE_USAGE=[`Usage: ${CLI_NAME} remove [path] [--purge-credentials]`,"","Forget a saved project (drop it from the new-task picker). Non-destructive:","the repo's files, worktrees, branches and tasks all stay on disk. A remote","(ssh://) project also has its stored connection config dropped.",""," path defaults to the current directory. Pass an exact saved entry (e.g. a"," remote `ssh://user@host` key) to remove it verbatim. Run with no match to"," print the current saved projects.",""," --purge-credentials also delete the remote project's SSH password from"," the OS keychain. Off by default: forgetting a project"," should not silently destroy a stored secret.",""].join(`
|
|
10
10
|
`);async function runRemoveSubcommand(rest){let purgeCredentials=argvHasFlag(rest,PURGE_FLAG),arg=rest.filter((a)=>a!==PURGE_FLAG&&!a.startsWith(`${PURGE_FLAG}=`))[0];if(arg==="--help"||arg==="-h"||arg==="help"){process.stdout.write(REMOVE_USAGE);return}if(arg?.startsWith("-"))process.stderr.write(`${CLI_NAME} remove: unknown flag "${arg}"
|
|
11
11
|
|
|
12
|
-
${REMOVE_USAGE}`),process.exit(2);let{getRemoteRepoConfig,getSavedRepos,resolveRepoRoot}=await import("./chunk-
|
|
12
|
+
${REMOVE_USAGE}`),process.exit(2);let{getRemoteRepoConfig,getSavedRepos,resolveRepoRoot}=await import("./chunk-s6mcrm5g.js"),saved=getSavedRepos();if(saved.length===0){console.log("no saved projects to remove.");return}let raw=arg&&arg.length>0?arg:".",target=saved.includes(raw)?raw:(()=>{let abs=resolve2(process.cwd(),expandTilde(raw)),top=resolveRepoRoot(abs);if(saved.includes(top))return top;if(saved.includes(abs))return abs;return null})();if(target===null){process.stderr.write(`${CLI_NAME} remove: "${raw}" is not a saved project.
|
|
13
13
|
|
|
14
14
|
Saved projects:
|
|
15
15
|
`);for(let p of saved)process.stderr.write(` ${p}
|
|
@@ -18,8 +18,8 @@ Saved projects:
|
|
|
18
18
|
|
|
19
19
|
${ADOPT_USAGE}
|
|
20
20
|
`),process.exit(2)}async function runAdoptSubcommand(args){let glob,repoArg,vendorArg,yes=!1;for(let i=0;i<args.length;i++){let a=args[i];if(a==="--help"||a==="-h"||a==="help"){process.stdout.write(`${ADOPT_USAGE}
|
|
21
|
-
`);return}if(a==="--repo"){if(repoArg=args[++i],repoArg===void 0)adoptUsageError("--repo requires a value")}else if(a==="--vendor"){if(vendorArg=args[++i],vendorArg===void 0)adoptUsageError("--vendor requires a value")}else if(a==="--yes"||a==="-y")yes=!0;else if(a&&!a.startsWith("-")&&glob===void 0)glob=a;else adoptUsageError(`unexpected argument "${a}"`)}let{resolveRepoRoot}=await import("./chunk-
|
|
21
|
+
`);return}if(a==="--repo"){if(repoArg=args[++i],repoArg===void 0)adoptUsageError("--repo requires a value")}else if(a==="--vendor"){if(vendorArg=args[++i],vendorArg===void 0)adoptUsageError("--vendor requires a value")}else if(a==="--yes"||a==="-y")yes=!0;else if(a&&!a.startsWith("-")&&glob===void 0)glob=a;else adoptUsageError(`unexpected argument "${a}"`)}let{getCustomEngineIds,resolveRepoRoot}=await import("./chunk-s6mcrm5g.js"),repo=resolveRepoRoot(resolve2(process.cwd(),expandTilde(repoArg&&repoArg.length>0?repoArg:"."))),typed=vendorArg?.trim();if(typed&&!isBuiltinVendor(typed)&&!getCustomEngineIds().includes(typed)){let known=[...BUILTIN_VENDORS,...getCustomEngineIds()].join(", ");adoptUsageError(`unknown engine "${typed}" \u2014 no task was created. Known engines: ${known}`)}let vendor=coerceVendorId(vendorArg),orch=await openLocalOrchestrator(),worktrees=await orch.discoverAdoptableWorktrees(repo);if(worktrees.length===0){console.log(`no adoptable worktrees for ${repo} \u2014 every git worktree here is already a task`);return}let isMatch=(w)=>!glob||matchPathGlob(glob,w.path);console.log(`adoptable worktrees in ${repo}:`);for(let w of worktrees){let hit=glob?isMatch(w)?"*":" ":"-",tags=[w.dirty===!0?"dirty":w.dirty===null?"dirty?":"",w.kobeManaged?"":"external"].filter(Boolean).join(",");console.log(` ${hit} ${w.branch} ${w.path}${tags?` (${tags})`:""}`)}if(!glob){console.log(`
|
|
22
22
|
pass a path glob to adopt, e.g. ${CLI_NAME} adopt '${repo}/*' --yes`);return}let matched=worktrees.filter(isMatch);if(matched.length===0){console.log(`
|
|
23
23
|
no worktrees match glob ${JSON.stringify(glob)}`);return}if(!yes){console.log(`
|
|
24
24
|
${matched.length} worktree(s) match \u2014 re-run with --yes to adopt them`);return}await adoptWorktreesInto(orch,repo,matched,vendor),console.log(`done \u2014 adopted ${matched.length} worktree(s)`)}function printTopLevelUsage(out){out.write(`${topLevelUsage()}
|
|
25
|
-
`)}var COMMANDS=new Map([["add",runAddSubcommand],["remove",runRemoveSubcommand],["adopt",runAdoptSubcommand],...DYNAMIC_COMMANDS]);async function main(){let[,,...rawArgs]=process.argv,[subcommand,...rest]=rawArgs;if(subcommand==="--version"||subcommand==="-v"||subcommand==="version"){let{CURRENT_VERSION:CURRENT_VERSION2}=await import("./chunk-
|
|
25
|
+
`)}var COMMANDS=new Map([["add",runAddSubcommand],["remove",runRemoveSubcommand],["adopt",runAdoptSubcommand],...DYNAMIC_COMMANDS]);async function main(){let[,,...rawArgs]=process.argv,[subcommand,...rest]=rawArgs;if(subcommand==="--version"||subcommand==="-v"||subcommand==="version"){let{CURRENT_VERSION:CURRENT_VERSION2}=await import("./chunk-0e04wrvh.js");console.log(`${CLI_NAME} ${CURRENT_VERSION2}`);return}if(subcommand==="--help"||subcommand==="-h"||subcommand==="help"){printTopLevelUsage(process.stdout);return}if(subcommand==="--skill"){let{runSkillSubcommand}=await import("./chunk-q0s362r7.js");await runSkillSubcommand(["print"]);return}let handler=subcommand!==void 0?COMMANDS.get(subcommand):void 0;if(handler){await handler(rest);return}if(subcommand!==void 0&&isPathLikeArg(subcommand)){await runOpenDirectory(subcommand);return}if(subcommand!==void 0)console.error(`${CLI_NAME}: unknown command '${subcommand}'`),printTopLevelUsage(process.stderr),process.exit(2);let{publishKobeTerminalTitle}=await import("./chunk-1tx1s5v6.js");publishKobeTerminalTitle();let{maybeRunOnboarding}=await import("./chunk-ptj9ng0t.js");if(await maybeRunOnboarding())return;let{startTui}=await import("./chunk-6b8zqcpq.js");await startTui()}main().catch((err)=>{console.error(formatCliFailure(err,{cliName:CLI_NAME,argv:process.argv,cwd:process.cwd(),env:process.env})),process.exit(1)});
|
package/dist/cli/kobe.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 K}from"node:child_process";import{constants as m,accessSync as u}from"node:fs";import{homedir as l}from"node:os";import{basename as r,delimiter as t,dirname as o,join as Y}from"node:path";import{fileURLToPath as O}from"node:url";var U={$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 K}from"node:child_process";import{constants as m,accessSync as u}from"node:fs";import{homedir as l}from"node:os";import{basename as r,delimiter as t,dirname as o,join as Y}from"node:path";import{fileURLToPath as O}from"node:url";var U={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.162",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/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 test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","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 x(W=process.env){return W[d]===k?k:T}var F="ROVE_BUN",i="ROVE_NO_BUN_BOOTSTRAP",B="ROVE_SKIP_BUN_CHECK",G=U.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=K(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 j(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[F]?.trim();if(X)$.push(X);for(let w of(b.PATH??b.Path??"").split(t))if(w)$.push(Y(w,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(j(X))return{bun:$,stale:Q,unusable:J};Q??={path:$,version:L(X)??X}}return{bun:null,stale:Q,unusable:J}}function p(W){return o(O(W))}function I(W){return r(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=x(),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: ${F}=/path/to/bun`,""].join(`
|
|
4
4
|
`)}function g(W,b,z=x()){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: ${F}=/path/to/bun`,`Run on this one anyway (unsupported, terminals will be blank): ${B}=1`,""].join(`
|
|
5
5
|
`)}function y(W,b=x()){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: ${F}=/path/to/bun`,""].join(`
|
|
@@ -188,6 +188,11 @@ async function nodePtyDriver(spawn) {
|
|
|
188
188
|
};
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
// ../kobe-daemon/src/daemon/pty-host-log.ts
|
|
192
|
+
function formatPtyHostLine(event, message, now = new Date) {
|
|
193
|
+
return `[${now.toISOString()}] pty-host [${event}]: ${message}`;
|
|
194
|
+
}
|
|
195
|
+
|
|
191
196
|
// ../kobe-daemon/src/daemon/pty-server.ts
|
|
192
197
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
193
198
|
import { mkdir as mkdir2, unlink as unlink2, writeFile } from "node:fs/promises";
|
|
@@ -1443,13 +1448,6 @@ class PtyHost {
|
|
|
1443
1448
|
stats() {
|
|
1444
1449
|
return hostStats(this.sessions.values(), this.scrollbackCap, this.parkRestoreDeltas, this.parkRestoreFallbacks);
|
|
1445
1450
|
}
|
|
1446
|
-
sweepTasks(liveTaskIds) {
|
|
1447
|
-
for (const key of Array.from(this.sessions.keys())) {
|
|
1448
|
-
const taskId = key.split("::")[0] ?? key;
|
|
1449
|
-
if (!liveTaskIds.has(taskId))
|
|
1450
|
-
this.kill(key);
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
1451
|
async killAll() {
|
|
1454
1452
|
const sessions = Array.from(this.sessions.keys(), (key) => this.kill(key));
|
|
1455
1453
|
sessions.push(this.warmSpare.end());
|
|
@@ -1727,7 +1725,13 @@ async function startPtyHostServer(options = {}) {
|
|
|
1727
1725
|
}
|
|
1728
1726
|
return {};
|
|
1729
1727
|
case "pty.list":
|
|
1730
|
-
return {
|
|
1728
|
+
return {
|
|
1729
|
+
pid: process.pid,
|
|
1730
|
+
rssBytes: process.memoryUsage().rss,
|
|
1731
|
+
sessions: ptys.list(),
|
|
1732
|
+
stats: ptys.stats(),
|
|
1733
|
+
...options.version ? { version: options.version } : {}
|
|
1734
|
+
};
|
|
1731
1735
|
case "pty.peek": {
|
|
1732
1736
|
const payload = objectPayload(req.payload);
|
|
1733
1737
|
return ptys.peek(requireString(payload, "key"), typeof payload.sinceOffset === "number" ? payload.sinceOffset : undefined);
|
|
@@ -1737,12 +1741,6 @@ async function startPtyHostServer(options = {}) {
|
|
|
1737
1741
|
ptys.warm(requireString(payload, "cwd"), typeof payload.shell === "string" ? payload.shell : undefined, typeof payload.cols === "number" ? payload.cols : undefined, typeof payload.rows === "number" ? payload.rows : undefined);
|
|
1738
1742
|
return {};
|
|
1739
1743
|
}
|
|
1740
|
-
case "pty.sweep": {
|
|
1741
|
-
const payload = objectPayload(req.payload);
|
|
1742
|
-
const ids = Array.isArray(payload.liveTaskIds) ? payload.liveTaskIds.filter((id) => typeof id === "string") : [];
|
|
1743
|
-
ptys.sweepTasks(new Set(ids));
|
|
1744
|
-
return {};
|
|
1745
|
-
}
|
|
1746
1744
|
case "daemon.stop":
|
|
1747
1745
|
wipeFreezeOnStop = true;
|
|
1748
1746
|
setTimeout(() => void stop(), 0).unref();
|
|
@@ -1796,15 +1794,16 @@ function writeFrame(client, frame) {
|
|
|
1796
1794
|
// ../kobe-daemon/src/daemon/pty-host-node-entry.ts
|
|
1797
1795
|
async function main() {
|
|
1798
1796
|
rotateLogIfNeeded(defaultPtyHostLogPath());
|
|
1799
|
-
process.on("uncaughtException", (err) => console.error(
|
|
1800
|
-
process.on("unhandledRejection", (err) => console.error(
|
|
1797
|
+
process.on("uncaughtException", (err) => console.error(formatPtyHostLine("crash", err?.stack ?? String(err))));
|
|
1798
|
+
process.on("unhandledRejection", (err) => console.error(formatPtyHostLine("reject", String(err))));
|
|
1801
1799
|
const driver = await nodePtyDriver();
|
|
1802
1800
|
const server = await startPtyHostServer({
|
|
1803
1801
|
driver,
|
|
1804
|
-
log: (event, message) => console.log(
|
|
1802
|
+
log: (event, message) => console.log(formatPtyHostLine(event, message)),
|
|
1803
|
+
version: process.env.ROVE_PTY_HOST_VERSION,
|
|
1805
1804
|
onStop: () => process.exit(0)
|
|
1806
1805
|
});
|
|
1807
|
-
console.log(`
|
|
1806
|
+
console.log(formatPtyHostLine("listen", `node host listening on ${server.socketPath}`));
|
|
1808
1807
|
const shutdown = async () => {
|
|
1809
1808
|
await server.close();
|
|
1810
1809
|
process.exit(0);
|
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 K}from"node:child_process";import{constants as m,accessSync as u}from"node:fs";import{homedir as l}from"node:os";import{basename as r,delimiter as t,dirname as o,join as Y}from"node:path";import{fileURLToPath as O}from"node:url";var U={$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 K}from"node:child_process";import{constants as m,accessSync as u}from"node:fs";import{homedir as l}from"node:os";import{basename as r,delimiter as t,dirname as o,join as Y}from"node:path";import{fileURLToPath as O}from"node:url";var U={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.162",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/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 test test/render --coverage --coverage-reporter=text --coverage-reporter=lcov --coverage-dir=coverage-render",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","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 x(W=process.env){return W[d]===k?k:T}var F="ROVE_BUN",i="ROVE_NO_BUN_BOOTSTRAP",B="ROVE_SKIP_BUN_CHECK",G=U.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=K(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 j(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[F]?.trim();if(X)$.push(X);for(let w of(b.PATH??b.Path??"").split(t))if(w)$.push(Y(w,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(j(X))return{bun:$,stale:Q,unusable:J};Q??={path:$,version:L(X)??X}}return{bun:null,stale:Q,unusable:J}}function p(W){return o(O(W))}function I(W){return r(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=x(),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: ${F}=/path/to/bun`,""].join(`
|
|
4
4
|
`)}function g(W,b,z=x()){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: ${F}=/path/to/bun`,`Run on this one anyway (unsupported, terminals will be blank): ${B}=1`,""].join(`
|
|
5
5
|
`)}function y(W,b=x()){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: ${F}=/path/to/bun`,""].join(`
|
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.162",
|
|
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",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{stampResetGate}from"./chunk-cz7qj1p8.js";import{stopLegacyTmux}from"./chunk-dqndd97s.js";import"./chunk-e85ttr8r.js";import{stopDaemonProcess}from"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-5v893waj.js";import"./chunk-a3a9gdc4.js";import{errorMessage}from"./chunk-2brn8e1y.js";import{kvStatePath,legacyKobeKvStatePath,legacyKobeStateDir,roveStateDir}from"./chunk-ch9b1d5y.js";import{activeCliName}from"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import{defaultDaemonPidPath,defaultDaemonSocketPath,defaultPtyHostPidPath,defaultPtyHostSocketPath}from"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";import{readFileSync}from"fs";import{unlink}from"fs/promises";import{join}from"path";import{createInterface}from"readline";var CLI_NAME=activeCliName();function printUsage(out){out.write([`Usage: ${CLI_NAME} reset [--hard] [--yes]`,"","Recover a wedged install: stop the daemon, Hosted PTY host, and any pre-v0.8 tmux sessions.","This ends background terminal and engine sessions; the next launch starts fresh.","Never touches your git worktrees.","","Options:"," --hard Also wipe the task index + UI state"," -y, --yes Skip the interactive confirmation"," -h, --help Print this help",""].join(`
|
|
3
|
-
`))}function taskCount(path){try{let parsed=JSON.parse(readFileSync(path,"utf8"));return Array.isArray(parsed.tasks)?parsed.tasks.length:null}catch{return null}}async function confirmTty(prompt){let readline=createInterface({input:process.stdin,output:process.stdout});try{let answer=await new Promise((resolve)=>readline.question(prompt,resolve));return/^y(es)?$/i.test(answer.trim())}finally{readline.close()}}async function removeStateFile(path,label){try{await unlink(path),console.log(` removed ${label} (${path})`)}catch(err){if(err.code==="ENOENT")console.log(` ${label}: already absent`);else throw Error(`failed to remove ${label} (${path}): ${errorMessage(err)}`)}}async function runResetSubcommand(argv){if(argv.some((arg)=>arg==="--help"||arg==="-h"||arg==="help")){printUsage(process.stdout);return}let known=new Set(["--hard","--yes","-y"]),unknown=argv.find((arg)=>!known.has(arg));if(unknown!==void 0)process.stderr.write(`${CLI_NAME} reset: unknown argument "${unknown}"
|
|
4
|
-
|
|
5
|
-
`),printUsage(process.stderr),process.exit(2);let hard=argv.includes("--hard"),yes=argv.includes("--yes")||argv.includes("-y"),daemonSocket=defaultDaemonSocketPath(),tasksPath=join(roveStateDir(),"tasks.json"),legacyTasksPath=join(legacyKobeStateDir(),"tasks.json"),statePath=kvStatePath(),legacyStatePath=legacyKobeKvStatePath();if(console.log(`${CLI_NAME} reset will:`),console.log(" \u2022 stop the Rove daemon (graceful \u2192 SIGTERM \u2192 SIGKILL)"),console.log(` \u2022 remove its socket + pidfile (${daemonSocket})`),console.log(" \u2022 stop the standalone Hosted PTY host and all background terminal/engine sessions"),console.log(" \u2022 stop any pre-v0.8 tmux sessions after SIGTERM-ing their pane process groups"),hard){let count=taskCount(tasksPath)??taskCount(legacyTasksPath);console.log(` \u2022 DELETE the task index${count===null?"":` (${count} task(s))`} \u2014 ${tasksPath}`),console.log(` \u2022 DELETE the UI state \u2014 ${statePath}`),console.log(" \u2022 DELETE the pre-Rove task/UI indexes too, so migration cannot restore reset state")}if(console.log(" \u2022 NOT touch your git worktrees under ~/.rove/worktrees/, ~/.kobe/worktrees/, or repo-local roots"),!hard)console.log(" (your task list & worktrees are kept \u2014 add --hard to also wipe task and UI state)");if(!yes){if(!process.stdin.isTTY){console.log(`
|
|
6
|
-
re-run with --yes to proceed (no interactive terminal for a y/N prompt)`);return}if(!await confirmTty(hard?`
|
|
7
|
-
Stop runtimes and wipe task/UI state? [y/N] `:`
|
|
8
|
-
Stop runtimes? [y/N] `)){console.log("aborted \u2014 nothing changed");return}}console.log("");let daemon=await stopDaemonProcess(daemonSocket,defaultDaemonPidPath());console.log(daemon.method==="absent"?" daemon: was not running (cleared any stale socket/pidfile)":` daemon: stopped via ${daemon.method}${daemon.pid?` (pid ${daemon.pid})`:""}`);let ptyHost=await stopDaemonProcess(defaultPtyHostSocketPath(),defaultPtyHostPidPath());console.log(ptyHost.method==="absent"?" pty host: was not running (cleared any stale socket/pidfile)":` pty host: stopped via ${ptyHost.method}${ptyHost.pid?` (pid ${ptyHost.pid})`:""}`);let legacyTmux=await stopLegacyTmux();if(legacyTmux.status==="failed"){console.error(` legacy tmux: cleanup failed \u2014 ${legacyTmux.error??"unknown error"}`),process.exitCode=1;return}if(console.log(legacyTmux.status==="absent"?" legacy tmux: no pre-v0.8 sessions found":` legacy tmux: stopped ${legacyTmux.sessions} session(s) after signalling ${legacyTmux.signalledGroups} pane group(s)`),hard)await removeStateFile(tasksPath,"task index"),await removeStateFile(legacyTasksPath,"legacy task index"),await removeStateFile(statePath,"UI state"),await removeStateFile(legacyStatePath,"legacy UI state");else stampResetGate();console.log(`
|
|
9
|
-
${CLI_NAME}: reset complete. Relaunch Rove to start fresh.`)}export{runResetSubcommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{openDaemonSession,resolveActiveTaskId}from"./chunk-1aqmmea7.js";import"./chunk-4502n1bk.js";import"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{resolveActiveTaskId,openDaemonSession};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{installedSkillDirs}from"./chunk-gkmpfpmn.js";import{CLAUDE_HOOK_EVENT_MAP,claudeSettingsPath,hasKobeActivityHooks,isObject}from"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.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,7 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{binaryAvailable,resolveEditorCommand}from"./chunk-aak5ttgt.js";import"./chunk-6xppe9bj.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-a3a9gdc4.js";import"./chunk-3wj69b0a.js";import{kvStatePath}from"./chunk-ch9b1d5y.js";import{activeCliName}from"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.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{isProcessAlive,stopDaemonProcess}from"./chunk-nm0pq5r6.js";import{readPidFile}from"./chunk-mqqnk8w7.js";import{KobeDaemonClient}from"./chunk-0wnfq5sx.js";import{DAEMON_PROTOCOL_VERSION}from"./chunk-7j5372wb.js";import{defaultDaemonLogPath,defaultDaemonPidPath,defaultDaemonSocketPath}from"./chunk-mcdv19rs.js";import{LEGACY_KOBE_PRODUCT_NAME,ROVE_PRODUCT_NAME}from"./chunk-r3k9rbwm.js";import{spawn}from"child_process";import{closeSync,existsSync,mkdirSync,openSync,statSync,unlinkSync}from"fs";import{dirname,resolve}from"path";import{fileURLToPath}from"url";var DAEMON_START_ARGS=["daemon","start"],DAEMON_HELLO_TIMEOUT_MS=3000,BUSY_DAEMON_GRACE_MS=15000;function detachOptions(platform=process.platform){return platform==="win32"?{windowsHide:!0}:{detached:!0}}function spawnDetachedDaemon(command,args,env,logPath){let stdio="ignore",logFd;try{mkdirSync(dirname(logPath),{recursive:!0}),logFd=openSync(logPath,"a"),stdio=["ignore",logFd,logFd]}catch{stdio="ignore"}if(spawn(command,[...args],{...detachOptions(),stdio,env}).unref(),logFd!==void 0)try{closeSync(logFd)}catch{}}function insideEngineSession(env=process.env){return typeof env.KOBE_TASK_ID==="string"&&env.KOBE_TASK_ID!==""}function autospawnDaemonEnv(env=process.env){let{KOBE_TASK_ID:_task,KOBE_TAB_ID:_tab,KOBE_TUI:_tui,KOBE_TERMINAL_PTY:_pty,ROVE_TASK_ID:_roveTask,ROVE_TAB_ID:_roveTab,ROVE_TUI:_roveTui,ROVE_TERMINAL_PTY:_rovePty,...rest}=env;return{...rest,KOBE_DAEMON_AUTOSPAWNED:"1",ROVE_DAEMON_AUTOSPAWNED:"1"}}var SPAWN_LOCK_STALE_MS=40000,SPAWN_LOCK_WAIT_MS=30000;function tryAcquireSpawnLock(lockPath,staleMs=SPAWN_LOCK_STALE_MS){let create=()=>{return mkdirSync(dirname(lockPath),{recursive:!0}),closeSync(openSync(lockPath,"wx")),!0};try{return create()}catch{try{if(Date.now()-statSync(lockPath).mtimeMs<=staleMs)return!1;return unlinkSync(lockPath),create()}catch{return!1}}}async function ensureDaemonReachable(resolveSpawn=resolveKobeSpawn){let socketPath=defaultDaemonSocketPath(),state=await probeDaemonSocket(socketPath);if(state==="alive")return socketPath;if(state==="wedged"&&insideEngineSession())throw Error(`rove: daemon at ${socketPath} is not answering hello (busy or wedged); not restarting it from inside an engine session \u2014 retry, or run \`rove daemon restart\` from a regular shell`);let lockPath=`${defaultDaemonPidPath()}.spawn-lock`;if(!tryAcquireSpawnLock(lockPath)){let deadline=Date.now()+SPAWN_LOCK_WAIT_MS;while(Date.now()<deadline){if(await testDaemonResponds(socketPath))return socketPath;await new Promise((resolveTimer)=>setTimeout(resolveTimer,150))}throw Error(`rove: another process is starting the daemon but it never became reachable at ${socketPath}; check ${defaultDaemonLogPath()} or run \`rove doctor\``)}try{if(await probeDaemonSocket(socketPath)==="alive")return socketPath;let livePid=await readPidFile(defaultDaemonPidPath());if(livePid!==null&&livePid!==process.pid&&isProcessAlive(livePid)){let deadline2=Date.now()+BUSY_DAEMON_GRACE_MS;while(Date.now()<deadline2){if(await new Promise((resolveTimer)=>setTimeout(resolveTimer,250)),await testDaemonResponds(socketPath))return socketPath;if(!isProcessAlive(livePid))break}}let[command,...args]=resolveSpawn(DAEMON_START_ARGS);await stopDaemonProcess(socketPath,defaultDaemonPidPath()).catch(()=>{}),spawnDetachedDaemon(command,args,autospawnDaemonEnv(),defaultDaemonLogPath());let deadline=Date.now()+5000;while(Date.now()<deadline){if(await testDaemonResponds(socketPath))return socketPath;await new Promise((resolveTimer)=>setTimeout(resolveTimer,100))}throw Error(`rove: daemon did not start (or stayed wedged) at ${socketPath}; check ${defaultDaemonLogPath()} or run \`rove doctor\``)}finally{try{unlinkSync(lockPath)}catch{}}}async function connectOrStartDaemon(){let socketPath=await ensureDaemonReachable(),client=new KobeDaemonClient(socketPath);return await client.connect(),client}async function connectIfRunning(){let socketPath=defaultDaemonSocketPath();if(!await testDaemonResponds(socketPath))return null;let client=new KobeDaemonClient(socketPath);return await client.connect(),client}async function probeDaemonSocket(socketPath,timeoutMs=DAEMON_HELLO_TIMEOUT_MS){let probe=new KobeDaemonClient(socketPath);try{await probe.connect()}catch{return probe.close(),"absent"}let droppedByPeer=!1,offClose=probe.onLifecycle("close",()=>{droppedByPeer=!0}),replied=probe.request("hello",{protocolVersion:DAEMON_PROTOCOL_VERSION}).then(()=>!0).catch(()=>!0),timer,timedOut=new Promise((resolve2)=>{timer=setTimeout(()=>resolve2(!1),timeoutMs)}),settled=await Promise.race([replied,timedOut]);if(timer)clearTimeout(timer);if(offClose(),probe.close(),droppedByPeer)return"absent";return settled?"alive":"wedged"}async function testDaemonResponds(socketPath,timeoutMs=DAEMON_HELLO_TIMEOUT_MS){return await probeDaemonSocket(socketPath,timeoutMs)==="alive"}class StaleInstallError extends Error{candidates;constructor(cliName,dir,candidates){super(`${cliName}: this process is running from an install that no longer exists on disk \u2014 no ${cliName} entry near ${dir} (checked ${candidates.join(", ")}). Reinstall (\`npm install -g @sma1lboy/rove\`) and relaunch Rove.`);this.name="StaleInstallError",this.candidates=candidates}}function isStaleInstallError(err){return err instanceof Error&&err.name==="StaleInstallError"}function resolveKobeSpawn(subcommand,env=process.env,moduleFile=fileURLToPath(import.meta.url)){let here=moduleFile;if(here.startsWith("/$bunfs")||here.startsWith("B:\\~BUN"))return[process.execPath,...subcommand];let dir=dirname(here),cliName=env.ROVE_INVOKED_AS===ROVE_PRODUCT_NAME?ROVE_PRODUCT_NAME:LEGACY_KOBE_PRODUCT_NAME,candidates=[resolve(dir,`../cli/${cliName}.ts`),resolve(dir,`../../../kobe/src/cli/${cliName}.ts`),resolve(dir,`../cli/${cliName}.js`),resolve(dir,"../cli/index.ts"),resolve(dir,"../../../kobe/src/cli/index.ts"),resolve(dir,"../cli/index.js")],entry=candidates.find((candidate)=>existsSync(candidate));if(entry)return[process.execPath,entry,...subcommand];throw new StaleInstallError(cliName,dir,candidates)}
|
|
3
|
-
export{detachOptions,spawnDetachedDaemon,autospawnDaemonEnv,tryAcquireSpawnLock,ensureDaemonReachable,connectOrStartDaemon,connectIfRunning,probeDaemonSocket,testDaemonResponds,StaleInstallError,isStaleInstallError,resolveKobeSpawn};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ensureGlobalKobeHooks,readTextWithTimeout,runHookSubcommand}from"./chunk-0hn7ctj6.js";import"./chunk-3e5n28t6.js";import"./chunk-r2pztgm6.js";import"./chunk-38272eqv.js";import"./chunk-jvxh93nz.js";import"./chunk-4502n1bk.js";import"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-zmvsqfad.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{runHookSubcommand,readTextWithTimeout,ensureGlobalKobeHooks};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{API_VERBS,RETIRED_VERBS,VERBS,VERB_ALIASES,VERB_GROUPS,findVerb,unknownVerbError}from"./chunk-j91yq51m.js";import"./chunk-ntt7gy5a.js";import"./chunk-1aqmmea7.js";import"./chunk-myewzjst.js";import"./chunk-3e5n28t6.js";import"./chunk-r05r01nv.js";import"./chunk-6pt23vas.js";import"./chunk-r2pztgm6.js";import"./chunk-38272eqv.js";import"./chunk-5f80ggc3.js";import"./chunk-qkehg2c1.js";import"./chunk-e85ttr8r.js";import"./chunk-msr1xtay.js";import"./chunk-ccjmtajy.js";import"./chunk-9h4kbsk5.js";import"./chunk-pas1rh6m.js";import"./chunk-ds9qf1w1.js";import"./chunk-bkba9c4n.js";import"./chunk-g2advs8t.js";import"./chunk-wdhcrcre.js";import"./chunk-y8yyk9hq.js";import"./chunk-7q67dz4c.js";import"./chunk-1cjd7h8p.js";import"./chunk-b99tf0jr.js";import"./chunk-t27t2x9b.js";import"./chunk-hape5vwj.js";import"./chunk-x6hevxs5.js";import"./chunk-ynknvkrw.js";import"./chunk-9wn8m2rt.js";import"./chunk-w06vgba4.js";import"./chunk-sdyzxayr.js";import"./chunk-zqfbyq0a.js";import"./chunk-jvxh93nz.js";import"./chunk-4502n1bk.js";import"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-ztx1pfqv.js";import"./chunk-zmvsqfad.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-rxvbm4vt.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{unknownVerbError,findVerb,VERB_GROUPS,VERB_ALIASES,VERBS,RETIRED_VERBS,API_VERBS};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{GitWorktreeManager}from"./chunk-hj08heah.js";import"./chunk-6xppe9bj.js";import"./chunk-6pt23vas.js";import"./chunk-5f80ggc3.js";import"./chunk-ds9qf1w1.js";import"./chunk-bkba9c4n.js";import"./chunk-g2advs8t.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-a3a9gdc4.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{GitWorktreeManager};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{StaleInstallError,autospawnDaemonEnv,connectIfRunning,connectOrStartDaemon,detachOptions,ensureDaemonReachable,isStaleInstallError,probeDaemonSocket,resolveKobeSpawn,spawnDetachedDaemon,testDaemonResponds,tryAcquireSpawnLock}from"./chunk-4502n1bk.js";import"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{tryAcquireSpawnLock,testDaemonResponds,spawnDetachedDaemon,resolveKobeSpawn,probeDaemonSocket,isStaleInstallError,ensureDaemonReachable,detachOptions,connectOrStartDaemon,connectIfRunning,autospawnDaemonEnv,StaleInstallError};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{publishKobeTerminalTitle}from"./chunk-dw853n4w.js";import{ensureGlobalKobeHooks}from"./chunk-0hn7ctj6.js";import{maybeHintSkillInstall}from"./chunk-gkmpfpmn.js";import{enforceResetGate}from"./chunk-cz7qj1p8.js";import"./chunk-3e5n28t6.js";import"./chunk-r2pztgm6.js";import"./chunk-38272eqv.js";import"./chunk-e85ttr8r.js";import"./chunk-jvxh93nz.js";import"./chunk-4502n1bk.js";import"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-zmvsqfad.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import{__require}from"./chunk-wqfp8d9w.js";async function startTui(){enforceResetGate(),publishKobeTerminalTitle(),await maybeHintSkillInstall(),await ensureGlobalKobeHooks();let{loadPluginEngines}=await import("./chunk-dmdpsw2y.js");loadPluginEngines();let{startWorkspaceHost}=await import("./chunk-wdq5p44p.js");await startWorkspaceHost()}export{startTui};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{randomBytes}from"crypto";import{linkSync,mkdirSync,readFileSync,unlinkSync,writeFileSync}from"fs";import{link,mkdir,readFile,unlink,writeFile}from"fs/promises";import{dirname}from"path";function isProcessAlive(pid){if(!Number.isInteger(pid)||pid<=0)return!1;try{return process.kill(pid,0),!0}catch(err){if(err.code==="ESRCH")return!1;return!0}}class LockfileError extends Error{heldByPid;constructor(message,heldByPid){super(message);this.name="LockfileError",this.heldByPid=heldByPid}}async function acquire(lockPath,opts={}){await mkdir(dirname(lockPath),{recursive:!0});let token=`${process.pid}:${randomBytes(8).toString("hex")}`,sidecar=`${lockPath}.${token.replace(":","-")}`;for(;;){await writeFile(sidecar,token);try{return await link(sidecar,lockPath),token}catch(err){if(err.code!=="EEXIST")throw err}finally{await unlink(sidecar).catch(()=>{})}let holder;try{holder=(await readFile(lockPath,"utf8")).trim()}catch(err){if(err.code!=="ENOENT")throw err;continue}let holderPid=Number.parseInt(holder,10),alive=Number.isFinite(holderPid)&&holderPid>0&&isProcessAlive(holderPid);if(alive&&!opts.forceTakeover)throw new LockfileError(`task index is locked by another Rove instance (pid ${holderPid})`,holderPid);console.warn(`[rove] removing stale lockfile at ${lockPath} (was held by pid ${holderPid}${alive?", forced":", process gone"})`),releaseSync(lockPath,holder)}}async function release(lockPath,token){let current;try{current=(await readFile(lockPath,"utf8")).trim()}catch(err){if(err.code==="ENOENT")return;throw err}if(current!==token)return;try{await unlink(lockPath)}catch(err){if(err.code==="ENOENT")return;throw err}}function sleepSync(ms){Atomics.wait(new Int32Array(new SharedArrayBuffer(4)),0,0,ms)}function acquireSync(lockPath,timeoutMs=5000){mkdirSync(dirname(lockPath),{recursive:!0});let token=`${process.pid}:${randomBytes(8).toString("hex")}`,sidecar=`${lockPath}.${token.replace(":","-")}`,deadline=Date.now()+timeoutMs;for(;;){writeFileSync(sidecar,token);try{return linkSync(sidecar,lockPath),token}catch(err){if(err.code!=="EEXIST")throw err}finally{try{unlinkSync(sidecar)}catch{}}let holder;try{holder=readFileSync(lockPath,"utf8").trim()}catch(err){if(err.code!=="ENOENT")throw err;continue}let holderPid=Number.parseInt(holder,10);if(Number.isFinite(holderPid)&&holderPid>0&&isProcessAlive(holderPid)){if(Date.now()>=deadline)throw new LockfileError(`${lockPath} is locked by another Rove instance (pid ${holderPid})`,holderPid);sleepSync(25);continue}console.warn(`[rove] removing stale lockfile at ${lockPath} (was held by pid ${holderPid}, process gone)`),releaseSync(lockPath,holder)}}function releaseSync(lockPath,token){try{if(readFileSync(lockPath,"utf8").trim()!==token)return;unlinkSync(lockPath)}catch(err){if(err.code!=="ENOENT")throw err}}
|
|
3
|
-
export{isProcessAlive,LockfileError,acquire,release,acquireSync,releaseSync};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{PS_PROBE_TIMEOUT_MS,PsProbeUnavailableError,engineProcessIn,foregroundEngine,foregroundEngineIn,hasAncestor,parsePsSnapshot,psSnapshot,psSnapshotWith,vendorFromArgv}from"./chunk-ztx1pfqv.js";import"./chunk-zmvsqfad.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{vendorFromArgv,psSnapshotWith,psSnapshot,parsePsSnapshot,hasAncestor,foregroundEngineIn,foregroundEngine,engineProcessIn,PsProbeUnavailableError,PS_PROBE_TIMEOUT_MS};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{INIT_PROMPT_FILENAME,INIT_SCRIPT_FILENAME,describeRepoInitSources,missingDependenciesCoda,resolveEngineLaunchInit,resolveRepoInit}from"./chunk-t27t2x9b.js";import"./chunk-hape5vwj.js";import"./chunk-x6hevxs5.js";import"./chunk-jvxh93nz.js";import"./chunk-zmvsqfad.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{resolveRepoInit,resolveEngineLaunchInit,missingDependenciesCoda,describeRepoInitSources,INIT_SCRIPT_FILENAME,INIT_PROMPT_FILENAME};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ENGINE_NOT_OBSERVED_REASON,ENGINE_START_POLL_MS,ENGINE_START_PROBE_MS,deferOrThrow,deliverHostedPrompt,deliverToKey,ensurePtyHost,findEngineKey,isTaskKey,killTaskSessions,listSessions,listSessionsOrNull,openPtyHost,outcomeFields,resolveComposerManifest,taskKeys}from"./chunk-ccjmtajy.js";import"./chunk-9h4kbsk5.js";import"./chunk-pas1rh6m.js";import"./chunk-ds9qf1w1.js";import"./chunk-bkba9c4n.js";import"./chunk-g2advs8t.js";import"./chunk-wdhcrcre.js";import"./chunk-y8yyk9hq.js";import"./chunk-7q67dz4c.js";import"./chunk-1cjd7h8p.js";import"./chunk-b99tf0jr.js";import"./chunk-t27t2x9b.js";import"./chunk-hape5vwj.js";import"./chunk-x6hevxs5.js";import"./chunk-ynknvkrw.js";import"./chunk-9wn8m2rt.js";import"./chunk-w06vgba4.js";import"./chunk-sdyzxayr.js";import"./chunk-zqfbyq0a.js";import"./chunk-jvxh93nz.js";import"./chunk-4502n1bk.js";import"./chunk-nm0pq5r6.js";import"./chunk-mqqnk8w7.js";import"./chunk-0wnfq5sx.js";import"./chunk-7j5372wb.js";import"./chunk-mnqxgvyb.js";import"./chunk-ztx1pfqv.js";import"./chunk-zmvsqfad.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-a2xndedd.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-v0zxyqrq.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{taskKeys,resolveComposerManifest,outcomeFields,openPtyHost,listSessionsOrNull,listSessions,killTaskSessions,isTaskKey,findEngineKey,ensurePtyHost,deliverToKey,deliverHostedPrompt,deferOrThrow,ENGINE_START_PROBE_MS,ENGINE_START_POLL_MS,ENGINE_NOT_OBSERVED_REASON};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{ensurePluginEnginesLoaded,loadPluginEngines,registeredEngineIds,reloadPluginEngines}from"./chunk-ntt7gy5a.js";import"./chunk-38272eqv.js";import"./chunk-mnqxgvyb.js";import"./chunk-sfv15era.js";import"./chunk-w7zv47mp.js";import"./chunk-7jkf3tvr.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{reloadPluginEngines,registeredEngineIds,loadPluginEngines,ensurePluginEnginesLoaded};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Orchestrator}from"./chunk-wbt845s6.js";import"./chunk-vj2vdx3w.js";import"./chunk-t7xhb2jx.js";import"./chunk-hj08heah.js";import"./chunk-caqpt09m.js";import"./chunk-6xppe9bj.js";import{PLACEHOLDER_TASK_TITLE}from"./chunk-r05r01nv.js";import"./chunk-6pt23vas.js";import"./chunk-5f80ggc3.js";import"./chunk-ds9qf1w1.js";import"./chunk-bkba9c4n.js";import"./chunk-g2advs8t.js";import"./chunk-hape5vwj.js";import"./chunk-sdyzxayr.js";import"./chunk-gwcneg6c.js";import"./chunk-2fypr41w.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{PLACEHOLDER_TASK_TITLE,Orchestrator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{TaskIndexStore}from"./chunk-cs50jnwn.js";import"./chunk-qkehg2c1.js";import"./chunk-w68k2kdb.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-bq3fyc0p.js";import"./chunk-e29hx18x.js";import"./chunk-g56kvet6.js";import"./chunk-k2ckx8zw.js";import"./chunk-pw6yfj10.js";import"./chunk-mcdv19rs.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{TaskIndexStore};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{getGlobalDefaultVendor,getRepoLastActiveVendor,resolvePreferredVendor,setGlobalDefaultVendor,setRepoLastActiveVendor}from"./chunk-caqpt09m.js";import"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-bq3fyc0p.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{setRepoLastActiveVendor,setGlobalDefaultVendor,resolvePreferredVendor,getRepoLastActiveVendor,getGlobalDefaultVendor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{addRemoteRepo,addSavedRepo,backfillSavedReposFromProjects,getCustomEngineIds,getDisabledEngineIds,getPersistedString,getRemoteRepoConfig,getRemoteRepos,getRepoInitOverride,getSavedRepos,isGitRepo,isRemoteProjectsEnabled,isRemoteRepoKey,normalizeSavedRepos,remoteRepoKey,removeSavedRepo,resolveMainRepoRoot,resolveRepoRoot,setPersistedString,setRepoInitOverride,statePath}from"./chunk-kt1ppyje.js";import"./chunk-5v893waj.js";import"./chunk-a3a9gdc4.js";import"./chunk-3wj69b0a.js";import"./chunk-ch9b1d5y.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{statePath,setRepoInitOverride,setPersistedString,resolveRepoRoot,resolveMainRepoRoot,removeSavedRepo,remoteRepoKey,normalizeSavedRepos,isRemoteRepoKey,isRemoteProjectsEnabled,isGitRepo,getSavedRepos,getRepoInitOverride,getRemoteRepos,getRemoteRepoConfig,getPersistedString,getDisabledEngineIds,getCustomEngineIds,backfillSavedReposFromProjects,addSavedRepo,addRemoteRepo};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{isWindowsPipePath}from"./chunk-mcdv19rs.js";import{ROVE_STATE_DIR_BASENAME}from"./chunk-r3k9rbwm.js";import{readFile,stat,unlink}from"fs/promises";import{chmod,mkdir}from"fs/promises";import{join}from"path";var OWNER_ONLY_DIR_MODE=448,OWNER_ONLY_FILE_MODE=384;async function tighten(path,mode){try{await chmod(path,mode)}catch{}}function tightenDirPermissions(dir){return tighten(dir,OWNER_ONLY_DIR_MODE)}function tightenFilePermissions(file){return tighten(file,OWNER_ONLY_FILE_MODE)}async function ensureOwnerOnlyDir(dir){await mkdir(dir,{recursive:!0,mode:OWNER_ONLY_DIR_MODE}),await tightenDirPermissions(dir)}function ensureOwnerOnlyStateDir(homeDir){return ensureOwnerOnlyDir(join(homeDir,ROVE_STATE_DIR_BASENAME))}var DEFAULT_SOCKET_WATCH_MS=5000;async function listenOnUnixSocket(server,socketPath){if(await new Promise((resolve,reject)=>{let evented=server;evented.once("error",reject),server.listen(socketPath,()=>{evented.removeListener("error",reject),resolve()})}),!isWindowsPipePath(socketPath))await tightenFilePermissions(socketPath)}async function readPidFile(pidPath){try{let raw=await readFile(pidPath,"utf8"),pid=Number(raw.trim());return Number.isFinite(pid)?pid:null}catch{return null}}function createSocketOwnershipGuard(options){let watchMs=options.watchMs??DEFAULT_SOCKET_WATCH_MS,stamp=null,lost=!1,timer=null,currentStamp=async()=>{try{let s=await stat(options.socketPath);return{dev:s.dev,ino:s.ino}}catch(err){return err.code==="ENOENT"?null:"error"}},stopTimer=()=>{if(timer)clearInterval(timer);timer=null},verify=async()=>{if(stamp===null||lost)return;let now=await currentStamp();if(now==="error")return;if(now===null||now.dev!==stamp.dev||now.ino!==stamp.ino)lost=!0},check=async()=>{if(stamp===null||lost)return;if(await verify(),!lost)return;stopTimer(),options.onLost()};return{async arm(){let now=await currentStamp();if(now===null||now==="error")return;if(stamp=now,watchMs>0)timer=setInterval(()=>void check(),watchMs),timer.unref?.()},async release(server){if(stopTimer(),await verify(),stamp===null||lost){server.unref();return}await new Promise((resolve)=>server.close(()=>resolve())),await unlink(options.socketPath).catch(()=>{}),await unlink(options.pidPath).catch(()=>{})}}}
|
|
3
|
-
export{OWNER_ONLY_DIR_MODE,OWNER_ONLY_FILE_MODE,ensureOwnerOnlyStateDir,listenOnUnixSocket,readPidFile,createSocketOwnershipGuard};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{readPidFile}from"./chunk-mqqnk8w7.js";import{KobeDaemonClient}from"./chunk-0wnfq5sx.js";import{unlink}from"fs/promises";function isProcessAlive(pid){try{return process.kill(pid,0),!0}catch(err){return err.code==="EPERM"}}async function stopDaemonProcess(socketPath,pidPath){let oldPid=await readPidFile(pidPath),targetPid=oldPid!==null&&oldPid!==process.pid?oldPid:null,wasAlive=targetPid!==null&&isProcessAlive(targetPid),method=wasAlive?"graceful":"absent",client=new KobeDaemonClient(socketPath),stopRequest=client.request("daemon.stop").catch(()=>{return}),stopTimeout=new Promise((resolve)=>setTimeout(resolve,2000));if(await Promise.race([stopRequest,stopTimeout]),client.close(),wasAlive&&targetPid!==null){let deadline=Date.now()+5000,escalated=!1;while(Date.now()<deadline){try{process.kill(targetPid,0)}catch{break}if(!escalated&&Date.now()-(deadline-5000)>2000){try{process.kill(targetPid,"SIGTERM")}catch{}method="sigterm",escalated=!0}await new Promise((resolve)=>setTimeout(resolve,50))}try{process.kill(targetPid,0),process.kill(targetPid,"SIGKILL"),method="sigkill",await new Promise((resolve)=>setTimeout(resolve,100))}catch{}}let survivor=await readPidFile(pidPath);if(survivor!==null&&survivor!==process.pid&&isProcessAlive(survivor))return{pid:oldPid,method};return await unlink(socketPath).catch(()=>{}),await unlink(pidPath).catch(()=>{}),{pid:oldPid,method}}
|
|
3
|
-
export{isProcessAlive,stopDaemonProcess};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{readLastActiveTaskId,writeLastActiveTaskId}from"./chunk-t7xhb2jx.js";import"./chunk-5v893waj.js";import"./chunk-a3a9gdc4.js";import"./chunk-ch9b1d5y.js";import"./chunk-g56kvet6.js";import"./chunk-r3k9rbwm.js";import"./chunk-wqfp8d9w.js";export{writeLastActiveTaskId,readLastActiveTaskId};
|