@sma1lboy/rove 0.9.222 → 0.9.224

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 (131) hide show
  1. package/dist/cli/{chunk-gp72n435.js → chunk-07tyjf2a.js} +1 -1
  2. package/dist/cli/{chunk-0zcr89a6.js → chunk-0r46kk4s.js} +1 -1
  3. package/dist/cli/{chunk-w0tdbrpw.js → chunk-1dhbsn9f.js} +1 -1
  4. package/dist/cli/{chunk-fykzzj26.js → chunk-1f8c92xt.js} +1 -1
  5. package/dist/cli/{chunk-p5yb73tg.js → chunk-27w4qc51.js} +3 -3
  6. package/dist/cli/{chunk-ekdh3m31.js → chunk-2c47eey6.js} +1 -1
  7. package/dist/cli/{chunk-3skf3g0c.js → chunk-2c4x1xxq.js} +1 -1
  8. package/dist/cli/{chunk-vyr2ga59.js → chunk-2cwb64fj.js} +1 -1
  9. package/dist/cli/{chunk-s08dx83v.js → chunk-2gtgygnb.js} +1 -1
  10. package/dist/cli/{chunk-4pf41rdt.js → chunk-2xsem13q.js} +1 -1
  11. package/dist/cli/{chunk-58avfm7n.js → chunk-3atfaa4h.js} +1 -1
  12. package/dist/cli/chunk-3h73z1x9.js +12 -0
  13. package/dist/cli/{chunk-94jwnk5q.js → chunk-3htqngp4.js} +1 -1
  14. package/dist/cli/{chunk-hrrpfxpk.js → chunk-3necfxxg.js} +1 -1
  15. package/dist/cli/{chunk-59c04v65.js → chunk-3wb64q0p.js} +1 -1
  16. package/dist/cli/{chunk-psbfd19k.js → chunk-3yh71rdr.js} +1 -1
  17. package/dist/cli/chunk-4vsrjqz8.js +2 -0
  18. package/dist/cli/{chunk-jyghj39f.js → chunk-5505agdt.js} +1 -1
  19. package/dist/cli/chunk-57q6gykd.js +2 -0
  20. package/dist/cli/chunk-64bam14p.js +2 -0
  21. package/dist/cli/{chunk-7taqx3cm.js → chunk-6r478s75.js} +1 -1
  22. package/dist/cli/{chunk-7nndmapz.js → chunk-6x5vzzpx.js} +1 -1
  23. package/dist/cli/{chunk-smyp21f3.js → chunk-6yg9g2sj.js} +1 -1
  24. package/dist/cli/{chunk-rga7a5kk.js → chunk-74pc0km0.js} +1 -1
  25. package/dist/cli/{chunk-8rk6ecgf.js → chunk-7mfjczcz.js} +1 -1
  26. package/dist/cli/{chunk-y1pebzpv.js → chunk-7sd9m43a.js} +1 -1
  27. package/dist/cli/{chunk-5mweps5x.js → chunk-7txq91d9.js} +1 -1
  28. package/dist/cli/{chunk-63wmhbqs.js → chunk-85mk6j0s.js} +1 -1
  29. package/dist/cli/{chunk-q5jhy3t8.js → chunk-8hbtca1g.js} +2 -2
  30. package/dist/cli/chunk-8mfv0yh0.js +2 -0
  31. package/dist/cli/{chunk-d8a464tx.js → chunk-8zgf4mgd.js} +1 -1
  32. package/dist/cli/{chunk-ndtbxgyp.js → chunk-9mtxxsb3.js} +1 -1
  33. package/dist/cli/{chunk-92k1jste.js → chunk-b1kg21v2.js} +2 -2
  34. package/dist/cli/chunk-bm1z1zsp.js +2 -0
  35. package/dist/cli/{chunk-eswcq53q.js → chunk-bnhw5r9z.js} +2 -2
  36. package/dist/cli/{chunk-h30gy8x8.js → chunk-bs7v83x0.js} +1 -1
  37. package/dist/cli/{chunk-80jwjzn8.js → chunk-bw73t1zw.js} +1 -1
  38. package/dist/cli/chunk-bx2m48tf.js +2 -0
  39. package/dist/cli/chunk-c0ed8skv.js +9 -0
  40. package/dist/cli/chunk-c8ra9jn5.js +2 -0
  41. package/dist/cli/{chunk-mmdvkep0.js → chunk-chmhmxmc.js} +1 -1
  42. package/dist/cli/{chunk-35xdfn8a.js → chunk-d1a1kw0c.js} +1 -1
  43. package/dist/cli/{chunk-t5r0e11g.js → chunk-dk30ssmg.js} +1 -1
  44. package/dist/cli/{chunk-nxr2qg1f.js → chunk-dwvg33c2.js} +1 -1
  45. package/dist/cli/chunk-frrjz0dr.js +2 -0
  46. package/dist/cli/chunk-fwb72vzc.js +2 -0
  47. package/dist/cli/chunk-fxtxmhs6.js +2 -0
  48. package/dist/cli/{chunk-878cxvry.js → chunk-gfwxx6mh.js} +1 -1
  49. package/dist/cli/{chunk-ad6wj8y8.js → chunk-ggq4vsdv.js} +1 -1
  50. package/dist/cli/chunk-ghxhqkey.js +2 -0
  51. package/dist/cli/{chunk-b9xgyff6.js → chunk-gjtyxam6.js} +1 -1
  52. package/dist/cli/{chunk-t116w45w.js → chunk-gv9hnaj2.js} +1 -1
  53. package/dist/cli/{chunk-mz0khr9c.js → chunk-h9gh63kp.js} +1 -1
  54. package/dist/cli/chunk-hg87p5n8.js +3 -0
  55. package/dist/cli/chunk-hgx20x94.js +2 -0
  56. package/dist/cli/{chunk-j98bfbz1.js → chunk-hpqbbytk.js} +1 -1
  57. package/dist/cli/{chunk-9zf2wn5c.js → chunk-k7g060qr.js} +1 -1
  58. package/dist/cli/chunk-karm3jt1.js +3 -0
  59. package/dist/cli/{chunk-09g89dxy.js → chunk-kbsrbpbf.js} +1 -1
  60. package/dist/cli/{chunk-h0zssfds.js → chunk-meneya55.js} +9 -9
  61. package/dist/cli/chunk-mhck0qmf.js +2 -0
  62. package/dist/cli/{chunk-81p6mm0p.js → chunk-mkksdcsw.js} +1 -1
  63. package/dist/cli/{chunk-kf8whkc2.js → chunk-nnz4r6p4.js} +1 -1
  64. package/dist/cli/{chunk-pvwfah6e.js → chunk-ntr5zmav.js} +1 -1
  65. package/dist/cli/{chunk-fczqwtmq.js → chunk-nvqdmx7q.js} +1 -1
  66. package/dist/cli/{chunk-89vj273t.js → chunk-p26wssjj.js} +1 -1
  67. package/dist/cli/{chunk-k0ymxqbc.js → chunk-p6wcthd5.js} +1 -1
  68. package/dist/cli/{chunk-f6fws7v6.js → chunk-p7rwqs32.js} +1 -1
  69. package/dist/cli/chunk-ppwpjm39.js +3 -0
  70. package/dist/cli/{chunk-a9zyq3m8.js → chunk-qdfcdhy8.js} +2 -2
  71. package/dist/cli/{chunk-ed3r9mb4.js → chunk-qkmf7te0.js} +2 -2
  72. package/dist/cli/chunk-qqkw8v6p.js +2 -0
  73. package/dist/cli/{chunk-hmsqfmhg.js → chunk-r4vt4ej9.js} +1 -1
  74. package/dist/cli/{chunk-jtpcbk1y.js → chunk-r84kan7b.js} +1 -1
  75. package/dist/cli/{chunk-pq897z3n.js → chunk-rhczy26f.js} +1 -1
  76. package/dist/cli/{chunk-jbx6t00x.js → chunk-rv421ny3.js} +1 -1
  77. package/dist/cli/{chunk-53akb9x8.js → chunk-s1e0e9hc.js} +2 -2
  78. package/dist/cli/{chunk-x6c4jega.js → chunk-s278gjet.js} +1 -1
  79. package/dist/cli/{chunk-wm7gc75a.js → chunk-s8bypfx6.js} +2 -2
  80. package/dist/cli/chunk-smc5n94s.js +3 -0
  81. package/dist/cli/{chunk-3xs0hv9f.js → chunk-sn2r47e9.js} +1 -1
  82. package/dist/cli/{chunk-cs1k9d61.js → chunk-tnpepfcx.js} +1 -1
  83. package/dist/cli/{chunk-q6h7128y.js → chunk-vh5bkm9k.js} +2 -2
  84. package/dist/cli/chunk-vzqrj32e.js +2 -0
  85. package/dist/cli/{chunk-5qb8czj2.js → chunk-x3kqhb9p.js} +1 -1
  86. package/dist/cli/chunk-xmdbky9n.js +2 -0
  87. package/dist/cli/{chunk-nzshm6jy.js → chunk-y3k1accw.js} +1 -1
  88. package/dist/cli/{chunk-3gbfsmqf.js → chunk-y5y0sc9a.js} +1 -1
  89. package/dist/cli/chunk-yw0jzbwa.js +8 -0
  90. package/dist/cli/chunk-ywmw8pvp.js +2 -0
  91. package/dist/cli/{chunk-ebhc6q1y.js → chunk-yynhrtxx.js} +2 -2
  92. package/dist/cli/{chunk-bgnjt0pv.js → chunk-zja9chrd.js} +1 -1
  93. package/dist/cli/{chunk-k74rfmkd.js → chunk-zm2f0d23.js} +1 -1
  94. package/dist/cli/{chunk-dhfcgq6t.js → chunk-zqmp70dz.js} +1 -1
  95. package/dist/cli/{chunk-6cm9pb1f.js → chunk-zyd6k6ak.js} +1 -1
  96. package/dist/cli/index.js +7 -7
  97. package/dist/cli/kobe-run.js +1 -1
  98. package/dist/cli/kobe.js +6 -6
  99. package/dist/cli/rove-run.js +1 -1
  100. package/dist/cli/rove.js +6 -6
  101. package/dist/skills/rove/SKILL.md +1 -1
  102. package/dist/skills/rove/references/api-flags.md +1 -1
  103. package/dist/web-ui/assets/{harness-BP9XoO1F.js → harness-DiS1yHqA.js} +1 -1
  104. package/dist/web-ui/assets/{index-CgF_t_5x.css → index-D3usUDr4.css} +1 -1
  105. package/dist/web-ui/assets/{index-DnDOnFJk.js → index-DxszcdCE.js} +2 -2
  106. package/dist/web-ui/index.html +2 -2
  107. package/package.json +2 -1
  108. package/dist/cli/chunk-00ehck55.js +0 -3
  109. package/dist/cli/chunk-228be43v.js +0 -2
  110. package/dist/cli/chunk-2wxhkv4v.js +0 -3
  111. package/dist/cli/chunk-55xh5e1h.js +0 -2
  112. package/dist/cli/chunk-7eb6g8h1.js +0 -2
  113. package/dist/cli/chunk-87zgxa61.js +0 -2
  114. package/dist/cli/chunk-9213863e.js +0 -9
  115. package/dist/cli/chunk-ad8dbps8.js +0 -2
  116. package/dist/cli/chunk-ah9ky2f7.js +0 -2
  117. package/dist/cli/chunk-c8dbw8rz.js +0 -3
  118. package/dist/cli/chunk-d0f53cxh.js +0 -2
  119. package/dist/cli/chunk-eny3f446.js +0 -2
  120. package/dist/cli/chunk-gkxvcb9n.js +0 -8
  121. package/dist/cli/chunk-j5ye4gwh.js +0 -3
  122. package/dist/cli/chunk-md0fz63v.js +0 -2
  123. package/dist/cli/chunk-mvz2a6a1.js +0 -3
  124. package/dist/cli/chunk-nxht58t9.js +0 -2
  125. package/dist/cli/chunk-p92skpts.js +0 -2
  126. package/dist/cli/chunk-pvr86wd3.js +0 -2
  127. package/dist/cli/chunk-qsne628q.js +0 -2
  128. package/dist/cli/chunk-rgw6ddre.js +0 -2
  129. package/dist/cli/chunk-txevhry4.js +0 -2
  130. package/dist/cli/chunk-wmv1bjak.js +0 -2
  131. package/dist/cli/chunk-y4a23q6m.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{canonicalize}from"./chunk-y1pebzpv.js";import{applyJitter,exponentialBackoff}from"./chunk-khj0apc7.js";import{getRemoteRepoConfig,isRemoteRepoKey,resolveRepoRoot}from"./chunk-c8dbw8rz.js";var canonPath=canonicalize;function randomDirTaskSuffix(){return Math.random().toString(36).slice(2,6).padEnd(4,"0")}function titleFromRepo(repo){let segs=repo.split(/[/\\]/).filter(Boolean);return segs.length>0?segs[segs.length-1]??repo:repo}function normalizeMainRepo(repo){let normalized=resolveRepoRoot(repo);return{repo:normalized,key:isRemoteRepoKey(normalized)?normalized:canonPath(normalized)}}function repoWorkingDir(repo){return getRemoteRepoConfig(repo)?.basePath??repo}var GH_PR_VIEW_FIELDS="number,url,title,state,baseRefName,reviewDecision,mergeable,statusCheckRollup";function lifecycleFromState(state,reviewDecision){switch((state??"").toUpperCase()){case"MERGED":return"merged";case"CLOSED":return"closed";case"OPEN":return(reviewDecision??"").toUpperCase()==="APPROVED"?"ready_to_merge":"open";default:return"unknown"}}function entryCheckState(entry){let status=(entry.status??"").toUpperCase(),conclusion=(entry.conclusion??"").toUpperCase(),contextState=(entry.state??"").toUpperCase();if(status&&status!=="COMPLETED")return"pending";if(conclusion){if(conclusion==="SUCCESS"||conclusion==="NEUTRAL"||conclusion==="SKIPPED")return"passing";return"failing"}if(contextState==="SUCCESS")return"passing";if(contextState==="PENDING"||contextState==="EXPECTED")return"pending";if(contextState==="FAILURE"||contextState==="ERROR")return"failing";return"unknown"}function checkStateFromRollup(rollup){if(!rollup||rollup.length===0)return"none";let sawPending=!1,sawUnknown=!1;for(let entry of rollup){let s=entryCheckState(entry);if(s==="failing")return"failing";if(s==="pending")sawPending=!0;else if(s==="unknown")sawUnknown=!0}if(sawPending)return"pending";if(sawUnknown)return"unknown";return"passing"}function mapGhPrView(view,at){if(!view||typeof view.number!=="number")return null;return{provider:"github",lifecycle:lifecycleFromState(view.state,view.reviewDecision),checkState:checkStateFromRollup(view.statusCheckRollup),number:view.number,url:view.url,title:view.title,baseRef:view.baseRefName,reviewDecision:view.reviewDecision||void 0,mergeable:view.mergeable||void 0,lastCheckedAt:at}}function samePrStatus(a,b){if(a===b)return!0;if(!a||!b)return!1;return a.provider===b.provider&&a.lifecycle===b.lifecycle&&a.checkState===b.checkState&&a.number===b.number&&a.url===b.url&&a.title===b.title&&a.baseRef===b.baseRef&&a.reviewDecision===b.reviewDecision&&a.mergeable===b.mergeable}var NO_REMOTE_PATTERNS=["none of the git remotes","no git remote","to use github cli in a github repository","not a github repository"],AUTH_PATTERNS=["gh auth login","authentication required","not logged in","http 401","bad credentials","requires authentication"],NETWORK_PATTERNS=["could not resolve host","no such host","dial tcp","connection refused","connection reset","network is unreachable","i/o timeout","timeout","tls handshake","http 5","rate limit","try again"];function matchesAny(haystack,needles){return needles.some((n)=>haystack.includes(n))}function classifyGhFailure(s){if(s.parseError)return{kind:"error",error:"parse"};if(s.timedOut)return{kind:"error",error:"timeout"};if(s.spawnError)return{kind:"error",error:"missing-binary"};let err=(s.stderr??"").toLowerCase();if(matchesAny(err,NO_REMOTE_PATTERNS))return{kind:"error",error:"no-remote"};if(matchesAny(err,AUTH_PATTERNS))return{kind:"error",error:"auth"};if(matchesAny(err,NETWORK_PATTERNS))return{kind:"error",error:"network"};return{kind:"error",error:"unknown"}}function nextPrPoll(outcome,prevFailures,now,cfg,rand=Math.random){let at=(delay)=>now+applyJitter(delay,cfg.jitterRatio,rand);if(outcome.kind==="pr")return{nextAllowedAt:at(outcome.settled?cfg.settledMs:cfg.tickMs),failures:0};if(outcome.kind==="empty")return{nextAllowedAt:at(cfg.noPrMs),failures:0};if(outcome.error==="no-remote")return{nextAllowedAt:at(cfg.noRemoteMs),failures:0};let failures=prevFailures+1;return{nextAllowedAt:at(exponentialBackoff(cfg.failureBaseMs,failures-1,cfg.failureCapMs)),failures}}function checkResolutionNotify(prev,next){if(prev!=="pending")return null;if(next==="passing"||next==="failing")return next;return null}
2
+ import{canonicalize}from"./chunk-7sd9m43a.js";import{applyJitter,exponentialBackoff}from"./chunk-khj0apc7.js";import{getRemoteRepoConfig,isRemoteRepoKey,resolveRepoRoot}from"./chunk-hg87p5n8.js";var canonPath=canonicalize;function randomDirTaskSuffix(){return Math.random().toString(36).slice(2,6).padEnd(4,"0")}function titleFromRepo(repo){let segs=repo.split(/[/\\]/).filter(Boolean);return segs.length>0?segs[segs.length-1]??repo:repo}function normalizeMainRepo(repo){let normalized=resolveRepoRoot(repo);return{repo:normalized,key:isRemoteRepoKey(normalized)?normalized:canonPath(normalized)}}function repoWorkingDir(repo){return getRemoteRepoConfig(repo)?.basePath??repo}var GH_PR_VIEW_FIELDS="number,url,title,state,baseRefName,reviewDecision,mergeable,statusCheckRollup";function lifecycleFromState(state,reviewDecision){switch((state??"").toUpperCase()){case"MERGED":return"merged";case"CLOSED":return"closed";case"OPEN":return(reviewDecision??"").toUpperCase()==="APPROVED"?"ready_to_merge":"open";default:return"unknown"}}function entryCheckState(entry){let status=(entry.status??"").toUpperCase(),conclusion=(entry.conclusion??"").toUpperCase(),contextState=(entry.state??"").toUpperCase();if(status&&status!=="COMPLETED")return"pending";if(conclusion){if(conclusion==="SUCCESS"||conclusion==="NEUTRAL"||conclusion==="SKIPPED")return"passing";return"failing"}if(contextState==="SUCCESS")return"passing";if(contextState==="PENDING"||contextState==="EXPECTED")return"pending";if(contextState==="FAILURE"||contextState==="ERROR")return"failing";return"unknown"}function checkStateFromRollup(rollup){if(!rollup||rollup.length===0)return"none";let sawPending=!1,sawUnknown=!1;for(let entry of rollup){let s=entryCheckState(entry);if(s==="failing")return"failing";if(s==="pending")sawPending=!0;else if(s==="unknown")sawUnknown=!0}if(sawPending)return"pending";if(sawUnknown)return"unknown";return"passing"}function mapGhPrView(view,at){if(!view||typeof view.number!=="number")return null;return{provider:"github",lifecycle:lifecycleFromState(view.state,view.reviewDecision),checkState:checkStateFromRollup(view.statusCheckRollup),number:view.number,url:view.url,title:view.title,baseRef:view.baseRefName,reviewDecision:view.reviewDecision||void 0,mergeable:view.mergeable||void 0,lastCheckedAt:at}}function samePrStatus(a,b){if(a===b)return!0;if(!a||!b)return!1;return a.provider===b.provider&&a.lifecycle===b.lifecycle&&a.checkState===b.checkState&&a.number===b.number&&a.url===b.url&&a.title===b.title&&a.baseRef===b.baseRef&&a.reviewDecision===b.reviewDecision&&a.mergeable===b.mergeable}var NO_REMOTE_PATTERNS=["none of the git remotes","no git remote","to use github cli in a github repository","not a github repository"],AUTH_PATTERNS=["gh auth login","authentication required","not logged in","http 401","bad credentials","requires authentication"],NETWORK_PATTERNS=["could not resolve host","no such host","dial tcp","connection refused","connection reset","network is unreachable","i/o timeout","timeout","tls handshake","http 5","rate limit","try again"];function matchesAny(haystack,needles){return needles.some((n)=>haystack.includes(n))}function classifyGhFailure(s){if(s.parseError)return{kind:"error",error:"parse"};if(s.timedOut)return{kind:"error",error:"timeout"};if(s.spawnError)return{kind:"error",error:"missing-binary"};let err=(s.stderr??"").toLowerCase();if(matchesAny(err,NO_REMOTE_PATTERNS))return{kind:"error",error:"no-remote"};if(matchesAny(err,AUTH_PATTERNS))return{kind:"error",error:"auth"};if(matchesAny(err,NETWORK_PATTERNS))return{kind:"error",error:"network"};return{kind:"error",error:"unknown"}}function nextPrPoll(outcome,prevFailures,now,cfg,rand=Math.random){let at=(delay)=>now+applyJitter(delay,cfg.jitterRatio,rand);if(outcome.kind==="pr")return{nextAllowedAt:at(outcome.settled?cfg.settledMs:cfg.tickMs),failures:0};if(outcome.kind==="empty")return{nextAllowedAt:at(cfg.noPrMs),failures:0};if(outcome.error==="no-remote")return{nextAllowedAt:at(cfg.noRemoteMs),failures:0};let failures=prevFailures+1;return{nextAllowedAt:at(exponentialBackoff(cfg.failureBaseMs,failures-1,cfg.failureCapMs)),failures}}function checkResolutionNotify(prev,next){if(prev!=="pending")return null;if(next==="passing"||next==="failing")return next;return null}
3
3
  export{GH_PR_VIEW_FIELDS,mapGhPrView,samePrStatus,classifyGhFailure,nextPrPoll,checkResolutionNotify,canonPath,randomDirTaskSuffix,titleFromRepo,normalizeMainRepo,repoWorkingDir};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{recordSpawn}from"./chunk-40dgv828.js";import{projectRejection}from"./chunk-mkksdcsw.js";import{getPersistedBool,loadStateFile,patchStateFile,readSavedRepos,updateStateFile}from"./chunk-zyd6k6ak.js";import{kvStatePath}from"./chunk-8hbtca1g.js";import{pathIdentity,samePath}from"./chunk-f10n6063.js";import{spawnSync}from"child_process";import{realpathSync}from"fs";function isRemoteRepoKey(key){return key.startsWith("ssh://")}function isRemoteProjectsEnabled(){return getPersistedBool("experimental.remoteProjects",!1)}function remoteRepoKey(host,user,port,basePath){let authority=port?`${user}@${host}:${port}`:`${user}@${host}`,base=(basePath??"").trim().replace(/\/+$/,"");if(!base)return`ssh://${authority}`;return`ssh://${authority}${base.startsWith("/")?base:`/${base}`}`}function readRemoteRepos(state){let raw=state.remoteRepos;if(!raw||typeof raw!=="object"||Array.isArray(raw))return{};return raw}function getRemoteRepoConfig(key){return readRemoteRepos(loadStateFile())[key]??null}function getRemoteRepos(){return readRemoteRepos(loadStateFile())}function addRemoteRepo(config){let key=remoteRepoKey(config.host,config.user,config.port,config.basePath),added=!1;return updateStateFile((state)=>{let repos={...readRemoteRepos(state)},legacyKey=remoteRepoKey(config.host,config.user,config.port);if(key!==legacyKey&&repos[legacyKey]?.basePath===config.basePath)key=legacyKey;repos[key]=config,state.remoteRepos=repos;let saved=readSavedRepos(state);if(added=!saved.includes(key),added)state.savedRepos=[...saved,key];return}),{key,added}}function resolveRepoRoot(absPath){if(isRemoteRepoKey(absPath))return absPath;recordSpawn("repos.resolveRepoRoot",["git","rev-parse","--show-toplevel"],absPath);let r=spawnSync("git",["rev-parse","--show-toplevel"],{cwd:absPath,encoding:"utf8",shell:!1});if(r.status!==0)return absPath;let top=(r.stdout??"").trim();if(!top)return absPath;try{if(realpathSync(absPath)===realpathSync(top))return absPath}catch{}return top}function isGitRepo(absPath){if(isRemoteRepoKey(absPath))return!1;recordSpawn("repos.isGitRepo",["git","rev-parse","--is-inside-work-tree"],absPath);let r=spawnSync("git",["rev-parse","--is-inside-work-tree"],{cwd:absPath,encoding:"utf8",shell:!1});return r.status===0&&(r.stdout??"").trim()==="true"}function isValidBranchName(branch){return spawnSync("git",["check-ref-format","--branch",branch],{encoding:"utf8",shell:!1}).status===0}function resolveMainRepoRoot(absPath){if(isRemoteRepoKey(absPath))return absPath;recordSpawn("repos.resolveMainRepoRoot",["git","worktree","list","--porcelain"],absPath);let r=spawnSync("git",["worktree","list","--porcelain"],{cwd:absPath,encoding:"utf8",shell:!1});if(r.status!==0)return resolveRepoRoot(absPath);return(r.stdout??"").split(/\r?\n/).find((line)=>line.startsWith("worktree "))?.slice(9).trim()||resolveRepoRoot(absPath)}function statePath(){return kvStatePath()}function getSavedRepos(){return readSavedRepos(loadStateFile())}function getPersistedString(key){let value=loadStateFile()[key];return typeof value==="string"?value:void 0}function getPersistedValue(key){return loadStateFile()[key]}function setPersistedString(key,value){patchStateFile({[key]:value})}function getCustomEngineIds(){let raw=loadStateFile().customEngineIds;if(!Array.isArray(raw))return[];return raw.filter((s)=>typeof s==="string"&&s.trim().length>0)}function getDisabledEngineIds(){let raw=loadStateFile().disabledEngineIds;if(!Array.isArray(raw))return[];return raw.filter((s)=>typeof s==="string"&&s.trim().length>0)}function addSavedRepo(absPath,opts={}){let normalized=resolveMainRepoRoot(absPath),rejected=opts.skipGate?null:projectRejection(normalized,isGitRepo,opts.intent??"explicit");if(rejected)return{added:!1,path:normalized,total:getSavedRepos().length,rejected};let result={added:!1,path:normalized,total:0};return updateStateFile((state)=>{let cur=readSavedRepos(state);if(cur.some((repo)=>samePath(repo,normalized)))return result={added:!1,path:normalized,total:cur.length},!1;state.savedRepos=[...cur,normalized],result={added:!0,path:normalized,total:cur.length+1};return}),result}function backfillSavedReposFromProjects(mainRepos){let added=[];for(let repo of mainRepos)if(addSavedRepo(repo,{intent:"explicit"}).added)added.push(repo);return added}function normalizeSavedRepos(){let cur=getSavedRepos(),seen=new Set,next=[],changed=!1;for(let p of cur){let top=resolveMainRepoRoot(p);if(top!==p)changed=!0;if(seen.has(pathIdentity(top))){changed=!0;continue}seen.add(pathIdentity(top)),next.push(top)}if(!changed)return;patchStateFile({savedRepos:next})}function readRepoConfigs(state){let raw=state.repoConfigs;if(!raw||typeof raw!=="object"||Array.isArray(raw))return{};return raw}function coerceOverride(entry){if(!entry||typeof entry!=="object")return{};let e=entry;return{initScript:typeof e.initScript==="string"&&e.initScript.length>0?e.initScript:void 0,initPrompt:typeof e.initPrompt==="string"&&e.initPrompt.length>0?e.initPrompt:void 0}}function getRepoInitOverride(repoRoot){let configs=readRepoConfigs(loadStateFile()),normalized=resolveRepoRoot(repoRoot),key=Object.keys(configs).find((key2)=>samePath(key2,normalized))??normalized;return coerceOverride(configs[key])}function setRepoInitOverride(repoRoot,patch){let resolved=resolveRepoRoot(repoRoot),next={};return updateStateFile((state)=>{let configs={...readRepoConfigs(state)},normalized=Object.keys(configs).find((key)=>samePath(key,resolved))??resolved,cur=coerceOverride(configs[normalized]),nextScript=patch.initScript===void 0?cur.initScript:patch.initScript||void 0,nextPrompt=patch.initPrompt===void 0?cur.initPrompt:patch.initPrompt||void 0;if(next={...nextScript?{initScript:nextScript}:{},...nextPrompt?{initPrompt:nextPrompt}:{}},!next.initScript&&!next.initPrompt){let{[normalized]:_dropped,...rest}=configs;state.repoConfigs=rest}else configs[normalized]=next,state.repoConfigs=configs;return}),next}function removeSavedRepo(absPath){let result={removed:!1,path:absPath,total:0};return updateStateFile((state)=>{let cur=readSavedRepos(state);if(!cur.some((repo)=>samePath(repo,absPath)))return result={removed:!1,path:absPath,total:cur.length},!1;let remaining=cur.filter((p)=>!samePath(p,absPath));if(state.savedRepos=remaining,isRemoteRepoKey(absPath)){let remotes=readRemoteRepos(state);if(absPath in remotes){let next={...remotes};delete next[absPath],state.remoteRepos=next}}result={removed:!0,path:absPath,total:remaining.length};return}),result}
3
+ export{isRemoteRepoKey,isRemoteProjectsEnabled,remoteRepoKey,getRemoteRepoConfig,getRemoteRepos,addRemoteRepo,resolveRepoRoot,isGitRepo,isValidBranchName,resolveMainRepoRoot,statePath,getSavedRepos,getPersistedString,getPersistedValue,setPersistedString,getCustomEngineIds,getDisabledEngineIds,addSavedRepo,backfillSavedReposFromProjects,normalizeSavedRepos,getRepoInitOverride,setRepoInitOverride,removeSavedRepo};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{readLastActiveTaskId,writeLastActiveTaskId}from"./chunk-2cwb64fj.js";import"./chunk-zyd6k6ak.js";import"./chunk-8hbtca1g.js";import"./chunk-hq2n27y1.js";import"./chunk-sb0ns0c7.js";import"./chunk-vnpqemb0.js";import"./chunk-9prawccj.js";import"./chunk-y8fqdnh3.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";export{writeLastActiveTaskId,readLastActiveTaskId};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{BREAKING_VERSIONS,CURRENT_VERSION,compareSemver}from"./chunk-2wxhkv4v.js";import{loadStateFile,patchStateFile}from"./chunk-6cm9pb1f.js";import{activeCliName}from"./chunk-00ehck55.js";var LAST_RUN_VERSION_KEY="app.lastRunVersion";function resetGateBlockers(lastRun,current=CURRENT_VERSION,breaking=BREAKING_VERSIONS){if(typeof lastRun!=="string"||lastRun.length===0)return[];let[lo,hi]=compareSemver(lastRun,current)<=0?[lastRun,current]:[current,lastRun];return breaking.filter((b)=>compareSemver(b,lo)>0&&compareSemver(b,hi)<=0)}function enforceResetGate(){let cliName=activeCliName(),lastRun=loadStateFile()[LAST_RUN_VERSION_KEY],blockers=resetGateBlockers(lastRun);if(blockers.length>0){let from=typeof lastRun==="string"?lastRun:"unknown";console.error([`${cliName} ${CURRENT_VERSION}: cannot start \u2014 version ${blockers.join(", ")} introduced breaking changes`,`(last run: ${from}). Your daemon/session state may be incompatible.`,"","Run:",` ${cliName} reset # stop daemon + PTY host + sessions (tasks kept)`,` ${cliName} reset --hard # additionally wipe the task index + UI state`,"","Then relaunch Rove. Worktrees are never touched."].join(`
2
+ import{BREAKING_VERSIONS,CURRENT_VERSION,compareSemver}from"./chunk-karm3jt1.js";import{activeCliName}from"./chunk-ppwpjm39.js";import{loadStateFile,patchStateFile}from"./chunk-zyd6k6ak.js";var LAST_RUN_VERSION_KEY="app.lastRunVersion";function resetGateBlockers(lastRun,current=CURRENT_VERSION,breaking=BREAKING_VERSIONS){if(typeof lastRun!=="string"||lastRun.length===0)return[];let[lo,hi]=compareSemver(lastRun,current)<=0?[lastRun,current]:[current,lastRun];return breaking.filter((b)=>compareSemver(b,lo)>0&&compareSemver(b,hi)<=0)}function enforceResetGate(){let cliName=activeCliName(),lastRun=loadStateFile()[LAST_RUN_VERSION_KEY],blockers=resetGateBlockers(lastRun);if(blockers.length>0){let from=typeof lastRun==="string"?lastRun:"unknown";console.error([`${cliName} ${CURRENT_VERSION}: cannot start \u2014 version ${blockers.join(", ")} introduced breaking changes`,`(last run: ${from}). Your daemon/session state may be incompatible.`,"","Run:",` ${cliName} reset # stop daemon + PTY host + sessions (tasks kept)`,` ${cliName} reset --hard # additionally wipe the task index + UI state`,"","Then relaunch Rove. Worktrees are never touched."].join(`
3
3
  `)),process.exit(1)}if(lastRun!==CURRENT_VERSION)stampResetGate()}function stampResetGate(){try{patchStateFile({[LAST_RUN_VERSION_KEY]:CURRENT_VERSION})}catch{}}
4
4
  export{LAST_RUN_VERSION_KEY,enforceResetGate,stampResetGate};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{BUNDLED_THEME_JSONS,userThemesDir,validateTheme}from"./chunk-x6c4jega.js";import{expandTilde}from"./chunk-fczqwtmq.js";import{errorMessage}from"./chunk-2brn8e1y.js";import{SUBCOMMAND_VERBS}from"./chunk-fhch0x0q.js";import"./chunk-q5jhy3t8.js";import{activeCliName}from"./chunk-00ehck55.js";import"./chunk-fxs82dsx.js";import"./chunk-sb0ns0c7.js";import"./chunk-f10n6063.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";import{existsSync,mkdirSync,readFileSync,readdirSync,unlinkSync,writeFileSync}from"fs";import{basename,join,resolve}from"path";var CLI_NAME=activeCliName(),THEME_VERB_ALIASES={ls:"list",rm:"remove"},BUNDLED_NAMES=Object.keys(BUNDLED_THEME_JSONS);function fail(message){process.stderr.write(`${CLI_NAME} theme: ${message}
2
+ import{BUNDLED_THEME_JSONS,userThemesDir,validateTheme}from"./chunk-s278gjet.js";import{expandTilde}from"./chunk-nvqdmx7q.js";import{errorMessage}from"./chunk-2brn8e1y.js";import{SUBCOMMAND_VERBS}from"./chunk-fhch0x0q.js";import{activeCliName}from"./chunk-ppwpjm39.js";import"./chunk-fxs82dsx.js";import"./chunk-zyd6k6ak.js";import"./chunk-8hbtca1g.js";import"./chunk-hq2n27y1.js";import"./chunk-sb0ns0c7.js";import"./chunk-vnpqemb0.js";import"./chunk-9prawccj.js";import"./chunk-f10n6063.js";import"./chunk-y8fqdnh3.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";import{existsSync,mkdirSync,readFileSync,readdirSync,unlinkSync,writeFileSync}from"fs";import{basename,join,resolve}from"path";var CLI_NAME=activeCliName(),THEME_VERB_ALIASES={ls:"list",rm:"remove"},BUNDLED_NAMES=Object.keys(BUNDLED_THEME_JSONS);function fail(message){process.stderr.write(`${CLI_NAME} theme: ${message}
3
3
  `),process.exit(1)}function failUsage(message){process.stderr.write(`${CLI_NAME} theme: ${message}
4
4
 
5
5
  `),printUsage(),process.exit(2)}function listThemes(){let lines=[];lines.push("bundled:");for(let name of[...BUNDLED_NAMES].sort())lines.push(` ${name} [built-in]`);let dir=userThemesDir(),userFiles=[];try{userFiles=readdirSync(dir).filter((f)=>f.endsWith(".json")).sort()}catch{}if(lines.push(""),lines.push(`user (${dir}):`),userFiles.length===0)lines.push(" (none)");else for(let f of userFiles){let name=f.slice(0,-5),path=join(dir,f),overridesBundled=BUNDLED_NAMES.includes(name)?" (overrides built-in)":"";lines.push(` ${name}${overridesBundled} ${path}`)}process.stdout.write(`${lines.join(`
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{isDev}from"./chunk-8hbtca1g.js";import{fileURLToPath}from"url";var package_default={$schema:"https://json.schemastore.org/package.json",name:"@sma1lboy/rove",version:"0.9.224",description:"Rove \u2014 the agent multiplexer for your terminal. Run coding agents on parallel tasks with isolated worktrees and persistent sessions.",keywords:["terminal","tui","cli","multiplexer","ai-agents","coding-agent","ai-coding-assistant","agentic-ai","parallel-agents","git-worktree","claude-code","codex","llm","developer-tools"],type:"module",packageManager:"bun@1.3.13",bin:{kobe:"dist/cli/kobe.js",rove:"dist/cli/rove.js"},files:["dist/cli","dist/completions","dist/web-ui","dist/skills","dist/*.wav","README.md","LICENSE"],publishConfig:{access:"public"},repository:{type:"git",url:"git+https://github.com/Sma1lboy/rove.git"},homepage:"https://rove.run",bugs:{url:"https://github.com/Sma1lboy/rove/issues"},engines:{bun:">=1.3.11"},scripts:{dev:"ROVE_DEV=1 bun --conditions=browser ./src/cli/rove.ts","dev:kobe":"KOBE_DEV=1 bun --conditions=browser ./src/cli/kobe.ts","dev:mock":"KOBE_DEV=1 bun ./src/tui-react/mock/host.tsx","dev:sandbox":"bun run scripts/dev-sandbox.ts run","dev:sandbox:reset":"bun run scripts/dev-sandbox.ts reset",build:"bun run scripts/build.ts","build:rubric":"bun run scripts/build-tier-rubric.ts",compile:"bun run scripts/compile.ts",typecheck:"tsc --noEmit","check-i18n":"bun run scripts/check-i18n.ts",test:"bun run test:fast && bun run test:socket","perf:golden":"bun scripts/perf-golden.ts","pty:soak":"bun scripts/pty-soak.ts","test:fast":"vitest run --passWithNoTests --minWorkers=1 --maxWorkers=8","test:socket":"KOBE_INCLUDE_SOCKET=1 vitest run test/daemon --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:socket:coverage":"KOBE_INCLUDE_SOCKET=1 KOBE_COVERAGE_DAEMON=1 vitest run test/daemon --coverage --pool forks --minWorkers=1 --maxWorkers=4 --passWithNoTests","test:behavior":"KOBE_INCLUDE_BEHAVIOR=1 vitest run test/behavior --pool forks --minWorkers=1 --maxWorkers=1 --retry=2 --passWithNoTests","test:render":"bun scripts/render-track.mjs",coverage:"vitest run --coverage --passWithNoTests",bench:"vitest bench --run",lint:"biome check .",knip:"knip-bun",postinstall:"bun run scripts/check-preview-deps.ts || true",prepublishOnly:"bun run typecheck && bun run build","plugin-sandbox":"bun run scripts/plugin-sandbox.ts"},"//":"biome.json + bunfig.toml live at the monorepo root since they apply repo-wide; bun.lock also lives at root (workspace-shared).",dependencies:{"@ansi-tools/parser":"^1.0.15","@opentui/core":"0.4.3","@opentui/react":"0.4.3","@xterm/addon-serialize":"^0.14.0","@xterm/addon-unicode11":"^0.9.0","@xterm/headless":"^6.0.0","node-pty":"^1.1.0",react:"^19.2.8","smol-toml":"^1.7.1",ws:"^8.18.0"},devDependencies:{"@biomejs/biome":"1.9.4","@sma1lboy/kobe-daemon":"0.7.19","@tsconfig/bun":"1.0.10","@types/bun":"1.3.14","@types/node":"25.6.2","@types/react":"^19.2.0","@vitest/coverage-v8":"2.1.9",knip:"^6.14.2","react-devtools-core":"^7.0.1",typescript:"5.8.2",vitest:"2.1.9"},trustedDependencies:[]};var CURRENT_VERSION=package_default.version,PACKAGE_NAME=package_default.name;function repoSlug(){let url=package_default.repository?.url;if(!url)return null;let m=url.match(/github\.com[:/]([^/]+)\/([^/.]+)/);if(!m||!m[1]||!m[2])return null;return`${m[1]}/${m[2]}`}var UPDATE_SCRIPT_URL="https://raw.githubusercontent.com/Sma1lboy/rove/main/scripts/update.sh",UPDATE_COMMAND=`curl -fsSL ${UPDATE_SCRIPT_URL} | sh`;function owningNpmPrefix(modulePath=fileURLToPath(import.meta.url)){let at=modulePath.indexOf("/lib/node_modules/");if(at<=0)return null;return modulePath.slice(0,at)}function recommendedGlobalInstallCommand(prefix=owningNpmPrefix()){let target=`${PACKAGE_NAME}@latest`;return prefix===null?`npm install -g ${target}`:`npm install -g --prefix ${prefix} ${target}`}var BREAKING_VERSIONS=[];function breakingVersionsCrossed(from,to,breaking=BREAKING_VERSIONS){let[lo,hi]=compareSemver(from,to)<=0?[from,to]:[to,from];return breaking.filter((b)=>compareSemver(b,lo)>0&&compareSemver(b,hi)<=0)}var FETCH_TIMEOUT_MS=3000,RELEASE_CHANNELS=["latest","nightly"],DEFAULT_RELEASE_CHANNEL="latest";function channelOf(version=CURRENT_VERSION){return prereleaseOf(version)?.split(".")[0]==="nightly"?"nightly":DEFAULT_RELEASE_CHANNEL}async function fetchLatestFromRegistry(packageName,channel){let ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let encoded=packageName.replace("/","%2F"),res=await fetch(`https://registry.npmjs.org/${encoded}/${channel}`,{signal:ctrl.signal,headers:{accept:"application/json"}});if(!res.ok)return null;let body=await res.json();if(typeof body.version!=="string")return null;return body.version}catch{return null}finally{clearTimeout(timer)}}function isNewerSemver(latest,current){let core=compareSemver(latest,current);if(core!==0)return core>0;return comparePrerelease(prereleaseOf(latest),prereleaseOf(current))>0}function prereleaseOf(version){let dash=version.indexOf("-");return dash===-1?void 0:version.slice(dash+1)||void 0}function comparePrerelease(a,b){if(a===b)return 0;if(a===void 0)return 1;if(b===void 0)return-1;let aParts=a.split("."),bParts=b.split(".");for(let i=0;i<Math.max(aParts.length,bParts.length);i++){let av=aParts[i],bv=bParts[i];if(av===void 0)return-1;if(bv===void 0)return 1;if(av===bv)continue;let an=/^\d+$/.test(av)?Number.parseInt(av,10):null,bn=/^\d+$/.test(bv)?Number.parseInt(bv,10):null;if(an!==null&&bn!==null)return an>bn?1:-1;if(an!==null)return-1;if(bn!==null)return 1;return av>bv?1:-1}return 0}function compareSemver(aVersion,bVersion){let norm=(v)=>v.split("-")[0]??v,a=norm(aVersion).split(".").map((s)=>Number.parseInt(s,10)),b=norm(bVersion).split(".").map((s)=>Number.parseInt(s,10));for(let i=0;i<3;i++){let av=a[i]??0,bv=b[i]??0;if(Number.isNaN(av)||Number.isNaN(bv))return 0;if(av>bv)return 1;if(av<bv)return-1}return 0}async function checkLatestVersion(opts={}){let channel=opts.channel??channelOf(),fake=process.env.KOBE_FAKE_UPDATE;if(fake)return{current:CURRENT_VERSION,latest:fake,hasUpdate:isNewerSemver(fake,CURRENT_VERSION),channel};if(isDev()&&!opts.force)return null;let latest=await fetchLatestFromRegistry(PACKAGE_NAME,channel);if(!latest)return null;return{current:CURRENT_VERSION,latest,hasUpdate:isNewerSemver(latest,CURRENT_VERSION),channel}}function versionFromTagName(tagName){if(typeof tagName!=="string")return null;return tagName.match(/^v(\d+\.\d+\.\d+)$/)?.[1]??null}async function fetchReleaseNotes(version){let slug=repoSlug();if(!slug)return null;let tag=`v${version}`,ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let res=await fetch(`https://api.github.com/repos/${slug}/releases/tags/${tag}`,{signal:ctrl.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!res.ok)return null;let body=await res.json();if(typeof body.body!=="string"||typeof body.html_url!=="string")return null;return{body:body.body,url:body.html_url,version}}catch{return null}finally{clearTimeout(timer)}}async function fetchReleaseNotesRange(args){let slug=repoSlug();if(!slug)return[];let limit=args.limit??100,ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let res=await fetch(`https://api.github.com/repos/${slug}/releases?per_page=${limit}`,{signal:ctrl.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!res.ok)return[];let body=await res.json();if(!Array.isArray(body))return[];return body.map((release)=>{let version=versionFromTagName(release.tag_name);if(!version||typeof release.html_url!=="string"||typeof release.body!=="string")return null;if(compareSemver(version,args.current)<=0)return null;if(compareSemver(version,args.latest)>0)return null;return{version,url:release.html_url,body:release.body}}).filter((release)=>release!==null)}catch{return[]}finally{clearTimeout(timer)}}async function fetchReleaseSummaries(limit=12){let slug=repoSlug();if(!slug)return[];let ctrl=new AbortController,timer=setTimeout(()=>ctrl.abort(),FETCH_TIMEOUT_MS);try{let res=await fetch(`https://api.github.com/repos/${slug}/releases?per_page=${limit}`,{signal:ctrl.signal,headers:{accept:"application/vnd.github+json","x-github-api-version":"2022-11-28"}});if(!res.ok)return[];let body=await res.json();if(!Array.isArray(body))return[];return body.map((release)=>{let version=versionFromTagName(release.tag_name);if(!version||typeof release.html_url!=="string")return null;return{version,url:release.html_url}}).filter((release)=>release!==null)}catch{return[]}finally{clearTimeout(timer)}}function releasePageUrl(version){let slug=repoSlug();if(!slug)return null;return`https://github.com/${slug}/releases/tag/v${version}`}
3
+ export{package_default,CURRENT_VERSION,PACKAGE_NAME,repoSlug,UPDATE_SCRIPT_URL,UPDATE_COMMAND,owningNpmPrefix,recommendedGlobalInstallCommand,BREAKING_VERSIONS,breakingVersionsCrossed,RELEASE_CHANNELS,DEFAULT_RELEASE_CHANNEL,channelOf,isNewerSemver,compareSemver,checkLatestVersion,fetchReleaseNotes,fetchReleaseNotesRange,fetchReleaseSummaries,releasePageUrl};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ensureForwards}from"./chunk-5mweps5x.js";import{dedupeMachines,listMachines,localDaemonSocketPath}from"./chunk-h30gy8x8.js";import{ApiError}from"./chunk-f7zjggfv.js";import"./chunk-6cm9pb1f.js";import"./chunk-hq2n27y1.js";import"./chunk-vnpqemb0.js";import"./chunk-q5jhy3t8.js";import"./chunk-9prawccj.js";import"./chunk-sb0ns0c7.js";import{KobeDaemonClient}from"./chunk-mjdt28x6.js";import"./chunk-p1zab1sy.js";import"./chunk-hqbmzz4t.js";import"./chunk-3es6spp4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-y8fqdnh3.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";function remoteTaskUnsupported(taskId,machineId){return new ApiError(`task ${taskId} lives on machine "${machineId}". Rove can list it, but acting on a remote task is not supported yet.`,"NOT_YET_SUPPORTED_REMOTE",{taskId,machineId,hint:`run the command on ${machineId} itself; remote writes arrive in a later release`,nextCommandArgs:["machine","list"]})}async function machineTasks(entry){let socketPath=localDaemonSocketPath(entry.alias),direct=await tasksOf(socketPath);if(direct)return direct;if(!entry.sockets)return null;return await ensureForwards({alias:entry.alias,config:entry,remoteDaemonSocket:entry.sockets.daemon,remotePtySocket:entry.sockets.pty})?await tasksOf(socketPath):null}async function tasksOf(socketPath){let client=new KobeDaemonClient(socketPath);try{return await client.request("hello",{}),(await client.request("task.list")).tasks??[]}catch{return null}finally{client.close()}}async function mergeTaskList(local){let machines=dedupeMachines(listMachines());if(machines.length===0)return local;let tasks=(local.tasks??[]).map((task)=>({...task,origin:{machineId:"local",hostLabel:"local"}}));for(let entry of machines){let remote=await machineTasks(entry);if(!remote)continue;let hostLabel=entry.alias;for(let task of remote)tasks.push({...task,origin:{machineId:entry.alias,hostLabel}})}return{tasks}}async function assertLocalTask(taskId){if(!taskId)return;let machines=dedupeMachines(listMachines());if(machines.length===0)return;for(let entry of machines){let remote=await machineTasks(entry);if(!remote)continue;if(remote.some((task)=>task.id===taskId))throw remoteTaskUnsupported(taskId,entry.alias)}}export{mergeTaskList,assertLocalTask};
2
+ import{ensureForwards}from"./chunk-7txq91d9.js";import{dedupeMachines,listMachines,localDaemonSocketPath}from"./chunk-bs7v83x0.js";import{ApiError}from"./chunk-f7zjggfv.js";import"./chunk-zyd6k6ak.js";import"./chunk-8hbtca1g.js";import"./chunk-hq2n27y1.js";import"./chunk-sb0ns0c7.js";import"./chunk-vnpqemb0.js";import"./chunk-9prawccj.js";import{KobeDaemonClient}from"./chunk-mjdt28x6.js";import"./chunk-p1zab1sy.js";import"./chunk-hqbmzz4t.js";import"./chunk-3es6spp4.js";import"./chunk-pw6yfj10.js";import"./chunk-f10n6063.js";import"./chunk-y8fqdnh3.js";import"./chunk-hq4b3fca.js";import"./chunk-wqfp8d9w.js";function remoteTaskUnsupported(taskId,machineId){return new ApiError(`task ${taskId} lives on machine "${machineId}". Rove can list it, but acting on a remote task is not supported yet.`,"NOT_YET_SUPPORTED_REMOTE",{taskId,machineId,hint:`run the command on ${machineId} itself; remote writes arrive in a later release`,nextCommandArgs:["machine","list"]})}async function machineTasks(entry){let socketPath=localDaemonSocketPath(entry.alias),direct=await tasksOf(socketPath);if(direct)return direct;if(!entry.sockets)return null;return await ensureForwards({alias:entry.alias,config:entry,remoteDaemonSocket:entry.sockets.daemon,remotePtySocket:entry.sockets.pty})?await tasksOf(socketPath):null}async function tasksOf(socketPath){let client=new KobeDaemonClient(socketPath);try{return await client.request("hello",{}),(await client.request("task.list")).tasks??[]}catch{return null}finally{client.close()}}async function mergeTaskList(local){let machines=dedupeMachines(listMachines());if(machines.length===0)return local;let tasks=(local.tasks??[]).map((task)=>({...task,origin:{machineId:"local",hostLabel:"local"}}));for(let entry of machines){let remote=await machineTasks(entry);if(!remote)continue;let hostLabel=entry.alias;for(let task of remote)tasks.push({...task,origin:{machineId:entry.alias,hostLabel}})}return{tasks}}async function assertLocalTask(taskId){if(!taskId)return;let machines=dedupeMachines(listMachines());if(machines.length===0)return;for(let entry of machines){let remote=await machineTasks(entry);if(!remote)continue;if(remote.some((task)=>task.id===taskId))throw remoteTaskUnsupported(taskId,entry.alias)}}export{mergeTaskList,assertLocalTask};