@sma1lboy/rove 0.9.110 → 0.9.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/README.md +0 -1
  2. package/dist/cli/chunk-003tvywc.js +3 -0
  3. package/dist/cli/chunk-0b48bpkd.js +2 -0
  4. package/dist/cli/chunk-0dv2xssg.js +19 -0
  5. package/dist/cli/chunk-0sm2k04y.js +3 -0
  6. package/dist/cli/chunk-0vmrteyg.js +3 -0
  7. package/dist/cli/chunk-13s8rnk5.js +3 -0
  8. package/dist/cli/chunk-1kktfmtg.js +4 -0
  9. package/dist/cli/chunk-1rkb0j1j.js +3 -0
  10. package/dist/cli/chunk-1tx1s5v6.js +2 -0
  11. package/dist/cli/chunk-1x0vahnn.js +2 -0
  12. package/dist/cli/chunk-20pt9yqh.js +4 -0
  13. package/dist/cli/chunk-2brn8e1y.js +3 -0
  14. package/dist/cli/chunk-2fypr41w.js +3 -0
  15. package/dist/cli/chunk-2jxdzw4r.js +3 -0
  16. package/dist/cli/chunk-2pqqvse3.js +2 -0
  17. package/dist/cli/chunk-39s1ndtm.js +106 -0
  18. package/dist/cli/chunk-3bfm4hrs.js +3 -0
  19. package/dist/cli/chunk-3rqa4pyt.js +28 -0
  20. package/dist/cli/chunk-3ry6prwn.js +3 -0
  21. package/dist/cli/chunk-3ztek08w.js +4 -0
  22. package/dist/cli/chunk-49s2zc0h.js +8 -0
  23. package/dist/cli/chunk-4wwx51m5.js +3 -0
  24. package/dist/cli/chunk-5ar3vspk.js +9 -0
  25. package/dist/cli/chunk-5bn91n19.js +3 -0
  26. package/dist/cli/chunk-5c3d1y0r.js +2 -0
  27. package/dist/cli/chunk-5hhvrvgm.js +8 -0
  28. package/dist/cli/chunk-6dn6h640.js +3 -0
  29. package/dist/cli/chunk-6frfschk.js +2 -0
  30. package/dist/cli/chunk-6xppe9bj.js +3 -0
  31. package/dist/cli/chunk-6zwg6me2.js +4 -0
  32. package/dist/cli/chunk-764bsyb0.js +1 -0
  33. package/dist/cli/chunk-79gqh5p2.js +5 -0
  34. package/dist/cli/chunk-7ngv7v9g.js +9 -0
  35. package/dist/cli/chunk-7nhdvr5v.js +4 -0
  36. package/dist/cli/chunk-7pfnda5z.js +12 -0
  37. package/dist/cli/chunk-7q67dz4c.js +3 -0
  38. package/dist/cli/chunk-8ddjfc2v.js +4 -0
  39. package/dist/cli/chunk-8g456mmt.js +3 -0
  40. package/dist/cli/chunk-8sbevss4.js +4 -0
  41. package/dist/cli/chunk-91j0an0j.js +2 -0
  42. package/dist/cli/chunk-99devyxr.js +2 -0
  43. package/dist/cli/chunk-9c1e5z6a.js +3 -0
  44. package/dist/cli/chunk-a4a4qaa2.js +3 -0
  45. package/dist/cli/chunk-adez6hq4.js +69 -0
  46. package/dist/cli/chunk-aq912vvw.js +3 -0
  47. package/dist/cli/chunk-arf294te.js +2 -0
  48. package/dist/cli/chunk-awsawfrm.js +2 -0
  49. package/dist/cli/chunk-aynx3d2a.js +2 -0
  50. package/dist/cli/chunk-b8d162tf.js +3 -0
  51. package/dist/cli/chunk-b99tf0jr.js +3 -0
  52. package/dist/cli/chunk-bj59a9mg.js +3 -0
  53. package/dist/cli/chunk-c6mthex1.js +5 -0
  54. package/dist/cli/chunk-cb2fpajx.js +3 -0
  55. package/dist/cli/chunk-cbkje3aw.js +2 -0
  56. package/dist/cli/chunk-df7qe9y7.js +4 -0
  57. package/dist/cli/chunk-dkxhmj9k.js +25 -0
  58. package/dist/cli/chunk-dqndd97s.js +7 -0
  59. package/dist/cli/chunk-dvabncrk.js +7 -0
  60. package/dist/cli/chunk-dvcb6mk4.js +3 -0
  61. package/dist/cli/chunk-dw853n4w.js +3 -0
  62. package/dist/cli/chunk-dx6b3dv8.js +7 -0
  63. package/dist/cli/chunk-e1g9mvww.js +11 -0
  64. package/dist/cli/chunk-ef11h2am.js +3 -0
  65. package/dist/cli/chunk-ef39ym8f.js +3 -0
  66. package/dist/cli/chunk-eq5f3z2f.js +3 -0
  67. package/dist/cli/chunk-ewdhz3dv.js +2 -0
  68. package/dist/cli/chunk-f6zsej8e.js +3 -0
  69. package/dist/cli/chunk-g1ybdgad.js +25 -0
  70. package/dist/cli/chunk-gbasmvsc.js +4 -0
  71. package/dist/cli/chunk-gjf604bb.js +3 -0
  72. package/dist/cli/chunk-gm3vj0fv.js +5 -0
  73. package/dist/cli/chunk-grh6dvfv.js +5 -0
  74. package/dist/cli/chunk-gwcneg6c.js +2 -0
  75. package/dist/cli/chunk-h5j8b87f.js +2 -0
  76. package/dist/cli/chunk-h79zfebh.js +7 -0
  77. package/dist/cli/chunk-h82kzdsn.js +3 -0
  78. package/dist/cli/chunk-hape5vwj.js +3 -0
  79. package/dist/cli/chunk-hg5x2wr0.js +3 -0
  80. package/dist/cli/chunk-j4xfsn9g.js +5 -0
  81. package/dist/cli/chunk-jfqbq12b.js +18 -0
  82. package/dist/cli/chunk-jsss3ze7.js +11 -0
  83. package/dist/cli/chunk-jvpzy378.js +3 -0
  84. package/dist/cli/chunk-jvxh93nz.js +3 -0
  85. package/dist/cli/chunk-jyv82gf0.js +258 -0
  86. package/dist/cli/chunk-k3ksts6g.js +3 -0
  87. package/dist/cli/chunk-kdrrw9tm.js +2 -0
  88. package/dist/cli/chunk-kg11c1py.js +3 -0
  89. package/dist/cli/chunk-kwe61yx7.js +3 -0
  90. package/dist/cli/chunk-m0fz6g32.js +16 -0
  91. package/dist/cli/chunk-mb5m7ex7.js +2 -0
  92. package/dist/cli/chunk-me77sx3d.js +3 -0
  93. package/dist/cli/chunk-mfqjdpd8.js +2 -0
  94. package/dist/cli/chunk-mggca3k4.js +4 -0
  95. package/dist/cli/chunk-mjvq39gf.js +4 -0
  96. package/dist/cli/chunk-mrwee8sj.js +3 -0
  97. package/dist/cli/chunk-my20q579.js +3 -0
  98. package/dist/cli/chunk-nceh1q3d.js +12 -0
  99. package/dist/cli/chunk-ncsgawg7.js +2 -0
  100. package/dist/cli/chunk-nm6adny4.js +4 -0
  101. package/dist/cli/chunk-np07kccr.js +4 -0
  102. package/dist/cli/chunk-nrnjt5b6.js +2 -0
  103. package/dist/cli/chunk-p7kztgsd.js +4 -0
  104. package/dist/cli/chunk-pbqwegjy.js +2 -0
  105. package/dist/cli/chunk-pcvk98rr.js +3 -0
  106. package/dist/cli/chunk-pdh5w4ht.js +3 -0
  107. package/dist/cli/chunk-pdj8kqa1.js +74 -0
  108. package/dist/cli/chunk-pw6yfj10.js +3 -0
  109. package/dist/cli/chunk-q6579rbz.js +3 -0
  110. package/dist/cli/chunk-q7dr9eh6.js +3 -0
  111. package/dist/cli/chunk-qkehg2c1.js +3 -0
  112. package/dist/cli/chunk-qtke4x42.js +3 -0
  113. package/dist/cli/chunk-rxvbm4vt.js +7 -0
  114. package/dist/cli/chunk-s66eh0pw.js +8 -0
  115. package/dist/cli/chunk-s76r56rj.js +3 -0
  116. package/dist/cli/chunk-sdyzxayr.js +3 -0
  117. package/dist/cli/chunk-svpn3av1.js +3 -0
  118. package/dist/cli/chunk-t0kta7rb.js +5 -0
  119. package/dist/cli/chunk-v5893dx3.js +2 -0
  120. package/dist/cli/chunk-vapjtyv9.js +7 -0
  121. package/dist/cli/chunk-vpzvcxc1.js +3 -0
  122. package/dist/cli/chunk-vqpa27cf.js +15 -0
  123. package/dist/cli/chunk-vws0j65e.js +4 -0
  124. package/dist/cli/chunk-vyb5a2rh.js +4 -0
  125. package/dist/cli/chunk-vzxbe80f.js +7 -0
  126. package/dist/cli/chunk-w5xy83ze.js +2 -0
  127. package/dist/cli/chunk-wqfp8d9w.js +3 -0
  128. package/dist/cli/chunk-wsvf9eka.js +33 -0
  129. package/dist/cli/chunk-x760j10f.js +3 -0
  130. package/dist/cli/chunk-x930m5fs.js +2 -0
  131. package/dist/cli/chunk-xbc3gcry.js +2 -0
  132. package/dist/cli/chunk-xy8be792.js +3 -0
  133. package/dist/cli/chunk-xzrqnpmh.js +4 -0
  134. package/dist/cli/chunk-y2yq6zca.js +3 -0
  135. package/dist/cli/chunk-yhcz2d2r.js +34 -0
  136. package/dist/cli/chunk-yk2ha5yj.js +3 -0
  137. package/dist/cli/chunk-ykvk2546.js +3 -0
  138. package/dist/cli/chunk-ympakh8w.js +6 -0
  139. package/dist/cli/chunk-yn5a7xcv.js +2 -0
  140. package/dist/cli/chunk-zb56ck5f.js +3 -0
  141. package/dist/cli/index.js +15 -850
  142. package/dist/cli/kobe-run.js +1 -858
  143. package/dist/cli/kobe.js +6 -6
  144. package/dist/cli/pty-host-node.mjs +167 -50
  145. package/dist/cli/rove-run.js +1 -858
  146. package/dist/cli/rove.js +6 -6
  147. package/dist/skills/rove/SKILL.md +29 -10
  148. package/dist/skills/rove/references/api-flags.md +35 -13
  149. package/dist/web-ui/assets/{ChatTerminal-BshL3M8G.js → harness-CYGJ4uoR.js} +19 -20
  150. package/dist/web-ui/assets/index-BTJ-X_4s.js +10 -0
  151. package/dist/web-ui/assets/index-Cs2vPLNB.css +1 -0
  152. package/dist/web-ui/index.html +2 -9
  153. package/dist/web-ui/pty-server.mjs +4 -5
  154. package/package.json +1 -1
  155. package/dist/web-ui/assets/AppShell-BGRIs5hW.js +0 -5
  156. package/dist/web-ui/assets/AppShell-HiyATJse.css +0 -1
  157. package/dist/web-ui/assets/Board-Bt3cwp25.js +0 -1
  158. package/dist/web-ui/assets/BoardPeek-BKR-tpS2.js +0 -2
  159. package/dist/web-ui/assets/ChatTranscript-B67_nnd6.js +0 -1
  160. package/dist/web-ui/assets/ConfirmDialog-kyA624OF.js +0 -1
  161. package/dist/web-ui/assets/IssueIntakePanel-BMP8Vc3E.js +0 -1
  162. package/dist/web-ui/assets/IssuePeek-C7afOYax.js +0 -1
  163. package/dist/web-ui/assets/IssuesPage-DwRaBB-m.js +0 -1
  164. package/dist/web-ui/assets/SettingsPage-CC1sDI8j.js +0 -2
  165. package/dist/web-ui/assets/SlideOver-B4sEOPyN.css +0 -1
  166. package/dist/web-ui/assets/SlideOver-Dq0ifiEm.js +0 -173
  167. package/dist/web-ui/assets/ViewToggle-mNsDLJp8.js +0 -1
  168. package/dist/web-ui/assets/WorkspaceTabs-DLzL-Tad.css +0 -1
  169. package/dist/web-ui/assets/WorkspaceTabs-ifAIZ5Fj.js +0 -3
  170. package/dist/web-ui/assets/active-task-gVYiAkLv.js +0 -1
  171. package/dist/web-ui/assets/arrow-left-CavMh90a.js +0 -1
  172. package/dist/web-ui/assets/board-DoArj55z.js +0 -1
  173. package/dist/web-ui/assets/chips-CS9PLtWy.js +0 -1
  174. package/dist/web-ui/assets/createLucideIcon-CuIQtyYV.js +0 -1
  175. package/dist/web-ui/assets/external-link-Du2dMe8S.js +0 -1
  176. package/dist/web-ui/assets/external-store-BCBJewGi.js +0 -1
  177. package/dist/web-ui/assets/harness-ClZMF1wx.js +0 -1
  178. package/dist/web-ui/assets/index-B4xJZEqf.js +0 -10
  179. package/dist/web-ui/assets/index-BnjD9Q-3.css +0 -1
  180. package/dist/web-ui/assets/issues-DwrKXp9c.js +0 -4
  181. package/dist/web-ui/assets/issues-ISAZBras.js +0 -1
  182. package/dist/web-ui/assets/lazy-issue-panels-DvXQJhKy.js +0 -6
  183. package/dist/web-ui/assets/rotate-cw-BXdpzm3v.js +0 -1
  184. package/dist/web-ui/assets/routes-DEEkL5gG.js +0 -1
  185. package/dist/web-ui/assets/store-BLM6nh6E.js +0 -2
  186. package/dist/web-ui/assets/tabs-CMZJhcSB.js +0 -1
  187. package/dist/web-ui/assets/task._taskId-BCIhg4IQ.js +0 -1
  188. package/dist/web-ui/assets/terminal-DOp1a9g6.js +0 -1
  189. package/dist/web-ui/assets/text-match-DW3sD-Rt.js +0 -1
  190. package/dist/web-ui/assets/time-kviT26Tm.js +0 -1
  191. package/dist/web-ui/assets/toast-C4yXq6hM.js +0 -1
  192. package/dist/web-ui/assets/web-transport-Beqz2mQ8.js +0 -1
  193. package/dist/web-ui/assets/worktrees-BGvJOG2b.js +0 -1
  194. /package/dist/web-ui/assets/{ChatTerminal-BrP-ENHg.css → harness-BrP-ENHg.css} +0 -0
@@ -0,0 +1,12 @@
1
+ // @bun
2
+ import{RemoteExecHost,getKeychainPassword,isKeychainSupported,remoteKeychainRef,setKeychainPassword}from"./chunk-1kktfmtg.js";import"./chunk-2fypr41w.js";import{addRemoteRepo,isRemoteProjectsEnabled}from"./chunk-k3ksts6g.js";import"./chunk-gjf604bb.js";import{errorMessage}from"./chunk-2brn8e1y.js";import"./chunk-9c1e5z6a.js";import{remoteControlSocketPath}from"./chunk-6dn6h640.js";import{activeCliName}from"./chunk-ef11h2am.js";import"./chunk-8ddjfc2v.js";import"./chunk-cb2fpajx.js";import"./chunk-3bfm4hrs.js";import"./chunk-wqfp8d9w.js";import{createInterface}from"readline";var CLI_NAME=activeCliName(),USAGE=`Usage: ${CLI_NAME} add --remote --host <host> --user <user> --path <basePath>
3
+ [--port N] [--key [path] | --password]
4
+
5
+ Register an experimental SSH-backed project. Worktrees are created on <host>
6
+ under <basePath>; Hosted PTY engine launch over SSH is not implemented yet.
7
+ Choose ONE auth: --key [path] (ssh-agent when path omitted) or --password
8
+ (macOS only; prompted and stored in Keychain, never in state.json).
9
+ `;function parseRemoteFlags(args){let f={};for(let i=0;i<args.length;i++){let a=args[i];switch(a){case"--host":f.host=args[++i];break;case"--user":f.user=args[++i];break;case"--path":f.path=args[++i];break;case"--port":{let n=Number(args[++i]);if(!Number.isInteger(n)||n<=0)fail(`invalid --port "${args[i]}"`);f.port=n;break}case"--key":{let next=args[i+1];if(next&&!next.startsWith("-"))f.key={present:!0,path:next},i++;else f.key={present:!0};break}case"--password":f.password=!0;break;case"--help":case"-h":process.stdout.write(USAGE),process.exit(0);break;default:fail(`unknown flag "${a}"`)}}return f}function fail(msg){process.stderr.write(`${CLI_NAME} add --remote: ${msg}
10
+
11
+ ${USAGE}`),process.exit(2)}async function promptHidden(prompt){let rl=createInterface({input:process.stdin,output:process.stdout,terminal:!0}),out=process.stdout,muted=!1,original=out._writeToOutput?.bind(out);return out._writeToOutput=(s)=>{if(!muted||!original)process.stdout.write(s)},process.stdout.write(prompt),muted=!0,new Promise((res)=>{rl.question("",(answer)=>{if(muted=!1,original)out._writeToOutput=original;process.stdout.write(`
12
+ `),rl.close(),res(answer)})})}async function runAddRemote(args){if(!isRemoteProjectsEnabled())fail("remote projects are experimental and disabled \u2014 enable Settings \u2192 Dev \u2192 Experimental \u2192 Remote projects first");let f=parseRemoteFlags(args);if(!f.host)fail("--host is required");if(!f.user)fail("--user is required");if(!f.path)fail("--path (remote base path) is required");if(f.key&&f.password)fail("choose ONE of --key or --password, not both");if(!f.key&&!f.password)fail("an auth method is required: --key [path] or --password");let auth;if(f.password){if(!isKeychainSupported())fail("--password needs the macOS keychain (unsupported on this platform)");let ref=remoteKeychainRef(f.host,f.user,f.port),pw=await promptHidden(`Password for ${f.user}@${f.host}: `);if(pw.length===0)fail("empty password");if(!setKeychainPassword(ref,pw))fail("failed to store the password in the keychain");auth={kind:"password",keychainRef:ref}}else auth={kind:"key",keyPath:f.key?.path};let{key,added}=addRemoteRepo({host:f.host,user:f.user,port:f.port,basePath:f.path,auth});console.log(added?`added remote project ${key} (base ${f.path})`:`updated remote project ${key} (base ${f.path})`),await probe(f,auth)}async function probe(f,auth){if(auth.kind==="password"&&!isKeychainSupported())return;let runtimeAuth=auth.kind==="key"?{kind:"key",keyPath:auth.keyPath}:{kind:"password",getPassword:()=>getKeychainPassword(auth.keychainRef)},spec={host:f.host,user:f.user,port:f.port,auth:runtimeAuth,controlPath:remoteControlSocketPath(f.host,f.user,f.port)};process.stdout.write("checking connection\u2026 ");try{if((await new RemoteExecHost(spec).run(["test","-d",f.path])).exitCode===0)console.log("ok");else console.log(`reachable, but base path "${f.path}" is not a directory (you can create it later)`)}catch(err){console.log(`could not connect (${errorMessage(err)})`),console.log("the project is saved; fix the host/credentials and it will connect on first use.")}}export{runAddRemote,parseRemoteFlags};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{TaskIndexStore}from"./chunk-6zwg6me2.js";import"./chunk-qkehg2c1.js";import"./chunk-qtke4x42.js";import"./chunk-xy8be792.js";import"./chunk-h82kzdsn.js";import"./chunk-8ddjfc2v.js";import"./chunk-cb2fpajx.js";import"./chunk-grh6dvfv.js";import"./chunk-pw6yfj10.js";import"./chunk-x760j10f.js";import"./chunk-3bfm4hrs.js";import"./chunk-wqfp8d9w.js";export{TaskIndexStore};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{pluginsOutdatedCachePath}from"./chunk-jyv82gf0.js";import{readFileSync,writeFileSync}from"fs";var OUTDATED_CACHE_TTL_MS=86400000;function writeOutdatedCache(outdatedIds,homeDir){let cache={checkedAt:Date.now(),outdated:outdatedIds};try{writeFileSync(pluginsOutdatedCachePath(homeDir),`${JSON.stringify(cache,null,2)}
3
+ `)}catch{}}function readOutdatedCache(homeDir){try{let cache=JSON.parse(readFileSync(pluginsOutdatedCachePath(homeDir),"utf8"));if(typeof cache.checkedAt!=="number"||!Array.isArray(cache.outdated))return[];if(Date.now()-cache.checkedAt>OUTDATED_CACHE_TTL_MS)return[];return cache.outdated.filter((id)=>typeof id==="string")}catch{return[]}}
4
+ export{writeOutdatedCache,readOutdatedCache};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{interactiveEngineCommand,listPresetIds}from"./chunk-q7dr9eh6.js";import{engineEntry}from"./chunk-yhcz2d2r.js";import{installedEngineIds}from"./chunk-df7qe9y7.js";import{spawnSync}from"child_process";import{statSync}from"fs";import path from"path";function whichOnPath(bin){let bunWhich=globalThis.Bun?.which;if(bunWhich)return bunWhich(bin);let out=spawnSync(process.platform==="win32"?"where":"which",[bin],{encoding:"utf8"});if(out.status!==0)return null;return out.stdout.split(`
3
+ `).map((l)=>l.trim()).find(Boolean)??null}var defaultDeps={which:whichOnPath,command:(vendor)=>interactiveEngineCommand(vendor)};function probeLaunchBinary(argv,which){let bin=argv[0]?.trim();if(!bin)return{found:!1,error:"no launch command"};if(bin.includes(path.sep)||bin.startsWith(".")){try{if(statSync(bin).isFile())return{found:!0,path:bin}}catch{}return{found:!1,error:`not found at ${bin}`}}let found=which(bin);return found?{found:!0,path:found}:{found:!1,error:"not found on PATH"}}async function detectEngineStatus(vendor,over={}){let deps={...defaultDeps,...over},detector=engineEntry(vendor).detectAccount;if(!detector)return{vendor,binary:probeLaunchBinary(deps.command(vendor),deps.which),account:null};let status=await detector(deps.accountDeps),binary=status.binary.found?status.binary:probeLaunchBinary(deps.command(vendor),deps.which);return{vendor,binary,account:status.account,accountError:status.accountError}}function detectEngineStatuses(vendors,over={}){return Promise.all(vendors.map((v)=>detectEngineStatus(v,over)))}function describeAccount(account){if(account===null)return"login not detectable";switch(account.kind){case"oauth":return"email"in account?`logged in (${account.email}${account.organization?`, ${account.organization}`:""})`:"logged in";case"chatgpt":return`logged in (${account.email}${account.plan?`, ${account.plan}`:""})`;case"apikey":return"API key";case"token":return`token (${account.source})`;default:return"no account"}}function engineUsable(status){return status.binary.found&&status.account?.kind!=="none"}async function probeableEngineIds(){return[...new Set([...listPresetIds(),...await installedEngineIds()])]}function summarizeEngines(statuses){let usable=[],signedOut=[];for(let status of statuses)if(engineUsable(status))usable.push(status.vendor);else if(status.binary.found)signedOut.push(status.vendor);return{usable,signedOut}}
4
+ export{detectEngineStatuses,describeAccount,probeableEngineIds,summarizeEngines};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{publishKobeTerminalTitle}from"./chunk-dw853n4w.js";import{ensureGlobalKobeHooks}from"./chunk-49s2zc0h.js";import"./chunk-3ry6prwn.js";import"./chunk-hg5x2wr0.js";import{enforceResetGate}from"./chunk-mggca3k4.js";import{maybeHintSkillInstall}from"./chunk-g1ybdgad.js";import"./chunk-jyv82gf0.js";import"./chunk-eq5f3z2f.js";import"./chunk-jvxh93nz.js";import"./chunk-5bn91n19.js";import"./chunk-pdh5w4ht.js";import"./chunk-4wwx51m5.js";import"./chunk-79gqh5p2.js";import"./chunk-3ztek08w.js";import"./chunk-kwe61yx7.js";import"./chunk-yhcz2d2r.js";import"./chunk-df7qe9y7.js";import"./chunk-gwcneg6c.js";import"./chunk-7nhdvr5v.js";import"./chunk-2fypr41w.js";import"./chunk-k3ksts6g.js";import"./chunk-gjf604bb.js";import"./chunk-qtke4x42.js";import"./chunk-xy8be792.js";import"./chunk-2brn8e1y.js";import"./chunk-9c1e5z6a.js";import"./chunk-6dn6h640.js";import"./chunk-h82kzdsn.js";import"./chunk-ef11h2am.js";import"./chunk-8ddjfc2v.js";import"./chunk-cb2fpajx.js";import"./chunk-grh6dvfv.js";import"./chunk-pw6yfj10.js";import"./chunk-x760j10f.js";import"./chunk-3bfm4hrs.js";import{__require}from"./chunk-wqfp8d9w.js";async function startTui(){enforceResetGate(),publishKobeTerminalTitle(),await maybeHintSkillInstall(),await ensureGlobalKobeHooks();let{loadPluginEngines}=await import("./chunk-v5893dx3.js");loadPluginEngines();let{startWorkspaceHost}=await import("./chunk-39s1ndtm.js");await startWorkspaceHost()}export{startTui};
@@ -0,0 +1,4 @@
1
+ // @bun
2
+ import{readOnlyGitProcessEnv}from"./chunk-6xppe9bj.js";import{quoteShellArg}from"./chunk-2fypr41w.js";import{getPersistedString}from"./chunk-k3ksts6g.js";var EDITOR_KINDS=["auto","vim","nvim","nano","emacs","custom"],AUTO_EDITOR_CANDIDATES=["nvim","vim","emacs","nano"],EDITOR_KIND_KEY="editor.kind",EDITOR_CUSTOM_KEY="editor.customCommand",DEFAULT_EDITOR_KIND="auto";function normalizeEditorKind(value){return EDITOR_KINDS.includes(value)?value:"auto"}var FILE_PLACEHOLDER="{file}";function firstToken(cmd){return cmd.trim().split(/\s+/)[0]??""}function buildEditorCommand(kind,customCommand,absPath,envEditor){let file=quoteShellArg(absPath);if(kind==="vim")return{bin:"vim",command:`vim ${file}`};if(kind==="nvim")return{bin:"nvim",command:`nvim ${file}`};if(kind==="nano")return{bin:"nano",command:`nano ${file}`};if(kind==="emacs")return{bin:"emacs",command:`emacs ${file}`};let tmpl=(customCommand.trim()||(envEditor??"").trim()).trim();if(!tmpl)return null;let bin=firstToken(tmpl);if(!bin)return null;let command=tmpl.includes(FILE_PLACEHOLDER)?tmpl.split(FILE_PLACEHOLDER).join(file):`${tmpl} ${file}`;return{bin,command}}function buildNvimDiffCommand(bin,absPath,relPath){let file=quoteShellArg(absPath);return["f=$(mktemp 2>/dev/null)",`if [ -n "$f" ] && git show ${quoteShellArg(`HEAD:./${relPath}`)} > "$f" 2>/dev/null; then`,` ${bin} -d "$f" ${file} -c 'setlocal nomodifiable' -c 'wincmd l'; r=$?`,"else",` ${bin} ${file}; r=$?`,"fi",'rm -f "$f" 2>/dev/null; exit $r'].join(`
3
+ `)}function relativeToWorktree(worktree,absPath){let prefix=worktree.endsWith("/")?worktree:`${worktree}/`;return absPath.startsWith(prefix)?absPath.slice(prefix.length):null}async function resolveEditorCommand(absPath){let kind=normalizeEditorKind(getPersistedString(EDITOR_KIND_KEY)),custom=getPersistedString(EDITOR_CUSTOM_KEY)??"",env=(process.env.VISUAL??process.env.EDITOR??"").trim();if(kind!=="auto")return buildEditorCommand(kind,custom,absPath,env);if(env)return buildEditorCommand("custom","",absPath,env);let file=quoteShellArg(absPath);for(let bin of AUTO_EDITOR_CANDIDATES)if(await binaryAvailable(bin))return{bin,command:`${bin} ${file}`};return null}async function binaryAvailable(bin){try{return await Bun.spawn(["sh","-c",`command -v ${quoteShellArg(bin)} >/dev/null 2>&1`],{stdin:"ignore",stdout:"ignore",stderr:"ignore"}).exited===0}catch{return!1}}async function fileHasDiff(worktree,relPath){try{return await Bun.spawn(["git","diff","--quiet","HEAD","--",relPath],{cwd:worktree,stdin:"ignore",stdout:"ignore",stderr:"ignore",env:readOnlyGitProcessEnv()}).exited===1}catch{return!1}}async function resolveEditorLaunch(worktree,absPath){let resolved=await resolveEditorCommand(absPath);if(!resolved)return null;if(!await binaryAvailable(resolved.bin))return null;return{command:await maybeDiffCommand(resolved,worktree,absPath),label:editorWindowLabel(absPath)}}async function maybeDiffCommand(resolved,worktree,absPath){let{bin,command}=resolved;if(bin!=="nvim"&&bin!=="vim")return command;if(command!==`${bin} ${quoteShellArg(absPath)}`)return command;let rel=relativeToWorktree(worktree,absPath);if(!rel)return command;if(!await fileHasDiff(worktree,rel))return command;return buildNvimDiffCommand(bin,absPath,rel)}function editorWindowLabel(absPath){let base=absPath.slice(absPath.lastIndexOf("/")+1).trim();return base.length>0?base:"edit"}
4
+ export{EDITOR_KINDS,EDITOR_KIND_KEY,EDITOR_CUSTOM_KEY,DEFAULT_EDITOR_KIND,normalizeEditorKind,resolveEditorCommand,binaryAvailable,resolveEditorLaunch};
@@ -0,0 +1,2 @@
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-jvpzy378.js";import"./chunk-y2yq6zca.js";import"./chunk-adez6hq4.js";import"./chunk-hape5vwj.js";import"./chunk-20pt9yqh.js";import"./chunk-q7dr9eh6.js";import"./chunk-jvxh93nz.js";import"./chunk-7q67dz4c.js";import"./chunk-b99tf0jr.js";import"./chunk-a4a4qaa2.js";import"./chunk-b8d162tf.js";import"./chunk-8g456mmt.js";import"./chunk-sdyzxayr.js";import"./chunk-0sm2k04y.js";import"./chunk-5bn91n19.js";import"./chunk-pdh5w4ht.js";import"./chunk-4wwx51m5.js";import"./chunk-79gqh5p2.js";import"./chunk-3ztek08w.js";import"./chunk-kwe61yx7.js";import"./chunk-gbasmvsc.js";import"./chunk-yhcz2d2r.js";import"./chunk-df7qe9y7.js";import"./chunk-gwcneg6c.js";import"./chunk-7nhdvr5v.js";import"./chunk-2fypr41w.js";import"./chunk-k3ksts6g.js";import"./chunk-gjf604bb.js";import"./chunk-qtke4x42.js";import"./chunk-xy8be792.js";import"./chunk-2brn8e1y.js";import"./chunk-9c1e5z6a.js";import"./chunk-6dn6h640.js";import"./chunk-h82kzdsn.js";import"./chunk-ef11h2am.js";import"./chunk-8ddjfc2v.js";import"./chunk-cb2fpajx.js";import"./chunk-grh6dvfv.js";import"./chunk-pw6yfj10.js";import"./chunk-x760j10f.js";import"./chunk-3bfm4hrs.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};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{findBinding,formatChord}from"./chunk-3rqa4pyt.js";function capOf(row){return row.hint?.keys??row.keys[0]}function legendCap(id){let row=findBinding(id);if(!row)return null;let cap=capOf(row);return cap&&cap.length>0?cap:null}function directCap(row){if(row.keys.length>0)return row.hint?.keys??row.keys[0]??null;return row.prefixKeys?.length?null:row.hint?.keys??null}function availableOn(row,surface){if(row.scope==="global")return!0;if(surface===null)return!1;if(row.scope===surface)return!0;return surface==="terminal"&&row.scope==="workspace"}function grammarHelpSections(keymap,surface,prefixKey,reachability){let here=[],direct=[],prefix=[],other=new Map;for(let binding of keymap){let cap=directCap(binding),staticallyAvailable=availableOn(binding,surface),directAvailable=reachability?reachability.direct.has(binding.id):staticallyAvailable,prefixAvailable=reachability?reachability.prefix.has(binding.id):staticallyAvailable;if(cap){let row={binding,primary:cap,aliases:binding.keys.filter((key)=>key!==cap)};if(directAvailable&&(staticallyAvailable||binding.presentation==="onePress"))if(binding.presentation==="onePress")direct.push(row);else here.push(row);else if(!staticallyAvailable&&binding.scope!=="global"){let rows=other.get(binding.scope);if(rows)rows.push(row);else other.set(binding.scope,[row])}}if(prefixKey&&prefixAvailable&&binding.prefixKeys?.length)prefix.push({binding,primary:`${prefixKey} + ${binding.prefixKeys[0]}`,aliases:binding.prefixKeys.slice(1).map((key)=>`${prefixKey} + ${key}`)})}let sections=[];if(here.length)sections.push({kind:"here",scope:surface??void 0,rows:here});if(direct.length)sections.push({kind:"direct",rows:direct});if(prefix.length)sections.push({kind:"prefix",rows:prefix});for(let[scope,rows]of other)sections.push({kind:"other",scope,rows});return sections}var SCOPE_CATEGORY={global:"Global",sidebar:"Sidebar",workspace:"Workspace",files:"Files",inbox:"Inbox",terminal:"Terminal"};function scopeCategory(scope){return scope?SCOPE_CATEGORY[scope]:"Global"}function guideCategory(action){if(["kanban.open","automations.open","workItems.open"].includes(action))return"Views";if(action.startsWith("focus."))return"Navigation";if(action.startsWith("inbox.")||action.startsWith("attention."))return"Attention";if(action.startsWith("chat.tab.")||action.startsWith("chat.session."))return"Sessions";if(action.startsWith("chat.fork.")||action.startsWith("task."))return"Tasks";if(action.startsWith("settings.")||action==="workspace.zenToggle")return"Tools";return findBinding(action)?.category??"Global"}var KEY_HINTS_ENABLED_KEY="hints.keyboard.enabled",PANE_HINT_USED_KEYS={sidebar:"hints.sidebar.used",files:"hints.files.used"};function keyHintsEnabled(raw){return raw!==!1}function keyHintsToggleOn(kv){return keyHintsEnabled(kv.get(KEY_HINTS_ENABLED_KEY,!0))}function toggleKeyHints(kv){let next=!keyHintsToggleOn(kv);if(kv.set(KEY_HINTS_ENABLED_KEY,next),next)for(let key of Object.values(PANE_HINT_USED_KEYS))kv.set(key,!1)}function paneHintVisible(enabledRaw,usedRaw){return keyHintsEnabled(enabledRaw)&&usedRaw!==!0}function statusHintTokens(reach,prefixKey){let tokens=[];if(prefixKey!==null&&reach.prefix.size>0)tokens.push({chord:prefixKey,msg:"commands"});else if(reach.inputPassthrough){let cap=reach.direct.has("focus.sidebar")?legendCap("focus.sidebar"):null;if(cap)tokens.push({chord:cap,msg:"sidebar"})}if(reach.direct.has("help.open")){let cap=legendCap("help.open");if(cap)tokens.push({chord:cap,msg:"help"})}return tokens}var PANE_HINT_ROWS={sidebar:[{id:"sidebar.nav",msg:"move"},{id:"sidebar.select",msg:"open"}],files:[{id:"files.nav",msg:"move"},{id:"files.hierarchy",msg:"collapse"},{id:"files.open",msg:"open",always:!0},{id:"files.diff",msg:"diff",always:!0}]};function paneHintTokens(pane,mode){return PANE_HINT_ROWS[pane].flatMap((row)=>{if(mode==="always"&&row.always!==!0)return[];let cap=legendCap(row.id);return cap?[{cap,msg:row.msg}]:[]})}function wizardKeyLines(prefixKey){let lines=[],nav=legendCap("sidebar.nav"),open=legendCap("sidebar.select");if(nav&&open)lines.push({msg:"keysBare",params:{nav:formatChord(nav),open:formatChord(open)}});let newTab=legendCap("chat.tab.new"),focusNext=legendCap("focus.next");if(newTab&&focusNext)lines.push({msg:"keysOnePress",params:{newTab:formatChord(newTab),focusNext:formatChord(focusNext)}});if(prefixKey!==null)lines.push({msg:"keysPrefix",params:{prefix:formatChord(prefixKey)}});let help=legendCap("help.open");if(help)lines.push({msg:"keysHelp",params:{help:formatChord(help)}});return lines}
3
+ export{legendCap,grammarHelpSections,scopeCategory,guideCategory,KEY_HINTS_ENABLED_KEY,PANE_HINT_USED_KEYS,keyHintsEnabled,keyHintsToggleOn,toggleKeyHints,paneHintVisible,statusHintTokens,paneHintTokens,wizardKeyLines};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{readPidFile}from"./chunk-4wwx51m5.js";import{KobeDaemonClient}from"./chunk-79gqh5p2.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};