@sma1lboy/rove 0.9.151 → 0.9.152
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-15k6hqzx.js → chunk-04zz7j1j.js} +1 -1
- package/dist/cli/{chunk-rf2m6f3h.js → chunk-08yqc66n.js} +1 -1
- package/dist/cli/chunk-0dbz76mq.js +2 -0
- package/dist/cli/{chunk-4d5bph3p.js → chunk-12458wct.js} +1 -1
- package/dist/cli/chunk-1t0xygy1.js +2 -0
- package/dist/cli/{chunk-jwv06n3d.js → chunk-21eenkyj.js} +1 -1
- package/dist/cli/{chunk-xnr8dga2.js → chunk-3737ysrb.js} +1 -1
- package/dist/cli/{chunk-2cyzv75r.js → chunk-4ezfas24.js} +1 -1
- package/dist/cli/chunk-4gaqhq8t.js +2 -0
- package/dist/cli/{chunk-yfg503fr.js → chunk-4ppq1q86.js} +1 -1
- package/dist/cli/{chunk-tk8p54f7.js → chunk-51y7sjhe.js} +1 -1
- package/dist/cli/{chunk-rz8247zr.js → chunk-5hs3w3xy.js} +1 -1
- package/dist/cli/{chunk-7tfqaet5.js → chunk-5w9bxd45.js} +1 -1
- package/dist/cli/chunk-71tq5yn8.js +3 -0
- package/dist/cli/{chunk-fm4q306m.js → chunk-86aac2wh.js} +1 -1
- package/dist/cli/{chunk-g47vt3k5.js → chunk-8gsqypg8.js} +1 -1
- package/dist/cli/{chunk-y5hnrx8d.js → chunk-9ejxh7a6.js} +1 -1
- package/dist/cli/{chunk-x39pv7rx.js → chunk-9kyf6d1j.js} +1 -1
- package/dist/cli/{chunk-ktmvmskn.js → chunk-9twmp5m9.js} +1 -1
- package/dist/cli/{chunk-k1sjc72d.js → chunk-9yhr7fxf.js} +1 -1
- package/dist/cli/{chunk-gtkejmxx.js → chunk-a3zmjcbd.js} +1 -1
- package/dist/cli/{chunk-579zz8df.js → chunk-a6sxg2gx.js} +1 -1
- package/dist/cli/{chunk-t05pnk6y.js → chunk-adr88eqt.js} +1 -1
- package/dist/cli/{chunk-fpjcrjna.js → chunk-bjcjrh1v.js} +1 -1
- package/dist/cli/chunk-bkba9c4n.js +4 -0
- package/dist/cli/{chunk-x8m1vmyd.js → chunk-bkpsjg6y.js} +1 -1
- package/dist/cli/{chunk-q4ry13v3.js → chunk-bnxz5nha.js} +1 -1
- package/dist/cli/{chunk-jy6nd23p.js → chunk-bqhq43zx.js} +1 -1
- package/dist/cli/{chunk-wzyh3fgx.js → chunk-ch1jvgg1.js} +1 -1
- package/dist/cli/{chunk-m370e00b.js → chunk-ezty9a39.js} +1 -1
- package/dist/cli/{chunk-jq5vp0f7.js → chunk-frp2wp3m.js} +1 -1
- package/dist/cli/{chunk-m4my5wna.js → chunk-g226rgg2.js} +2 -2
- package/dist/cli/chunk-g2advs8t.js +3 -0
- package/dist/cli/{chunk-pmt3agbd.js → chunk-gbd5dyhh.js} +1 -1
- package/dist/cli/{chunk-gzf4dfg6.js → chunk-gfh0ws3y.js} +1 -1
- package/dist/cli/{chunk-j5r92gh9.js → chunk-gkskp5j9.js} +1 -1
- package/dist/cli/{chunk-6sp2ags8.js → chunk-gvhq08an.js} +1 -1
- package/dist/cli/{chunk-p9vkwnb8.js → chunk-h5a7necv.js} +2 -2
- package/dist/cli/{chunk-8rxg6hs2.js → chunk-he0st4f1.js} +1 -1
- package/dist/cli/{chunk-98thhbm5.js → chunk-hhvzpps8.js} +1 -1
- package/dist/cli/{chunk-k9skkhzs.js → chunk-j2j1kq3m.js} +1 -1
- package/dist/cli/{chunk-d89r6eqm.js → chunk-kp85rcmt.js} +1 -1
- package/dist/cli/{chunk-e7t4xpr9.js → chunk-m7zq502q.js} +1 -1
- package/dist/cli/{chunk-5mr9j201.js → chunk-mewacahf.js} +3 -3
- package/dist/cli/{chunk-3zf7mr7r.js → chunk-mff9s59g.js} +1 -1
- package/dist/cli/{chunk-m2xasved.js → chunk-mw20v2nd.js} +1 -1
- package/dist/cli/chunk-mwzyk91k.js +2 -0
- package/dist/cli/chunk-n5sssj80.js +3 -0
- package/dist/cli/chunk-nywh3yb9.js +3 -0
- package/dist/cli/chunk-pxtx1gcf.js +3 -0
- package/dist/cli/{chunk-wc1kk5c0.js → chunk-rhp5f301.js} +1 -1
- package/dist/cli/{chunk-x3gch5nw.js → chunk-rzvzcqvx.js} +1 -1
- package/dist/cli/{chunk-ayagydjk.js → chunk-s239r4nv.js} +1 -1
- package/dist/cli/chunk-s9a974w9.js +2 -0
- package/dist/cli/{chunk-emm50f4q.js → chunk-svtpb8v2.js} +1 -1
- package/dist/cli/chunk-t2es32fg.js +2 -0
- package/dist/cli/{chunk-jv5nqjnv.js → chunk-ty56f8fe.js} +1 -1
- package/dist/cli/{chunk-tgxe9ae1.js → chunk-w2denxak.js} +2 -2
- package/dist/cli/chunk-xkggb529.js +2 -0
- package/dist/cli/{chunk-tz9e598v.js → chunk-z7eavs6b.js} +1 -1
- package/dist/cli/{chunk-q0f6rhex.js → chunk-z8khnqxg.js} +3 -3
- package/dist/cli/index.js +8 -8
- package/dist/cli/kobe.js +1 -1
- package/dist/cli/rove.js +1 -1
- package/dist/web-ui/assets/{harness-CYGJ4uoR.js → harness-DvVhbIUb.js} +1 -1
- package/dist/web-ui/assets/{index-BTJ-X_4s.js → index-DrVCJr6C.js} +2 -2
- package/dist/web-ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/cli/chunk-1kktfmtg.js +0 -4
- package/dist/cli/chunk-1rkb0j1j.js +0 -3
- package/dist/cli/chunk-1vhbnf49.js +0 -2
- package/dist/cli/chunk-7zmrn4gn.js +0 -3
- package/dist/cli/chunk-95e0ks8n.js +0 -2
- package/dist/cli/chunk-akckb9kw.js +0 -3
- package/dist/cli/chunk-aynx3d2a.js +0 -2
- package/dist/cli/chunk-dmdqnet6.js +0 -3
- package/dist/cli/chunk-fyf7xgaa.js +0 -2
- package/dist/cli/chunk-jfkw009v.js +0 -2
- package/dist/cli/chunk-ssepbf68.js +0 -2
- /package/dist/cli/{chunk-h82kzdsn.js → chunk-bq3fyc0p.js} +0 -0
package/dist/web-ui/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta charset="UTF-8" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Rove</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DrVCJr6C.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Cs2vPLNB.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
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.152",
|
|
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,4 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{quoteShellArg,quoteShellArgv}from"./chunk-2fypr41w.js";import{spawn,spawnSync}from"child_process";import{existsSync}from"fs";import{mkdir,readFile as readFileAsync,readdir as readdirAsync}from"fs/promises";var shQuote=quoteShellArg,shJoin=quoteShellArgv;function shToken(s){return/^[A-Za-z0-9_@%+=:,./-]+$/.test(s)?s:quoteShellArg(s)}function remoteEnvPrefix(env){if(!env)return"";let pairs=Object.entries(env).filter(([key])=>/^[A-Za-z_][A-Za-z0-9_]*$/.test(key));if(pairs.length===0)return"";return`${pairs.map(([key,value])=>`${key}=${shQuote(value)}`).join(" ")} `}function sshConnectArgs(spec,opts={}){let argv=["ssh"];if(opts.tty)argv.push("-tt");if(opts.batch)argv.push("-o","BatchMode=yes");if(argv.push("-o","ControlMaster=auto","-o",`ControlPath=${spec.controlPath}`,"-o","ControlPersist=300"),argv.push("-o","StrictHostKeyChecking=accept-new"),spec.port)argv.push("-p",String(spec.port));if(spec.auth.kind==="key"&&spec.auth.keyPath)argv.push("-i",spec.auth.keyPath);return argv.push(`${spec.user}@${spec.host}`),argv}function spawnCollect(argv,opts={}){return new Promise((resolve)=>{let[cmd,...rest]=argv,stdout="",stderr="",settled=!1,finish=(exitCode)=>{if(settled)return;settled=!0,resolve({stdout,stderr,exitCode})},child;try{child=spawn(cmd??"",rest,{cwd:opts.cwd,env:opts.env,shell:!1,signal:opts.signal})}catch{finish(-1);return}child.stdout?.setEncoding("utf8"),child.stdout?.on("data",(d)=>{stdout+=d}),child.stderr?.setEncoding("utf8"),child.stderr?.on("data",(d)=>{stderr+=d}),child.on("error",()=>finish(-1)),child.on("close",(code)=>finish(code??-1))})}class LocalExecHost{isRemote=!1;run(argv,opts={}){return spawnCollect(argv,{cwd:opts.cwd,env:opts.env?{...process.env,...opts.env}:process.env,signal:opts.signal})}async exists(path){return existsSync(path)}async mkdirp(path){await mkdir(path,{recursive:!0})}async readFile(path){try{return await readFileAsync(path,"utf8")}catch{return null}}async readdir(path){try{return await readdirAsync(path)}catch{return[]}}wrapCommand(command){return command}ensureReady(){}}var defaultSpawner=(argv,env)=>{let[cmd,...rest]=argv,proc=spawnSync(cmd??"",rest,{env:env?{...process.env,...env}:process.env,encoding:"utf8",shell:!1});return{stdout:proc.stdout??"",stderr:proc.stderr??"",exitCode:proc.status??-1}},defaultAsyncSpawner=(argv,env,opts)=>spawnCollect(argv,{env:env?{...process.env,...env}:process.env,signal:opts?.signal});class RemoteExecHost{spec;spawn;isRemote=!0;masterUp=!1;spawnAsync;constructor(spec,spawn2=defaultSpawner,spawnAsync){this.spec=spec;this.spawn=spawn2;this.spawnAsync=spawnAsync??(this.spawn===defaultSpawner?defaultAsyncSpawner:async(argv,env)=>this.spawn(argv,env))}ensureReady(){if(this.masterUp)return;if(this.spawn([...sshConnectArgs(this.spec,{batch:!0}),"-O","check"]).exitCode===0){this.masterUp=!0;return}let base=[...sshConnectArgs(this.spec,{batch:this.spec.auth.kind!=="password"}),"-fN"];if(this.spec.auth.kind==="password"){let pw=this.spec.auth.getPassword();if(pw!=null){this.spawn(["sshpass","-e",...base],{SSHPASS:pw}),this.masterUp=!0;return}}this.spawn(base),this.masterUp=!0}async run(argv,opts={}){this.ensureReady();let command=`${remoteEnvPrefix(opts.env)}${shJoin(argv)}`,remote=opts.cwd?`cd ${shQuote(opts.cwd)} && ${command}`:command,result=await this.spawnAsync([...sshConnectArgs(this.spec,{batch:!0}),remote],void 0,{signal:opts.signal});if(result.exitCode===255)this.masterUp=!1;return result}async exists(path){return(await this.run(["test","-e",path])).exitCode===0}async mkdirp(path){await this.run(["mkdir","-p",path])}async readFile(path){let r=await this.run(["cat",path]);return r.exitCode===0?r.stdout:null}async readdir(path){let r=await this.run(["ls","-1A",path]);if(r.exitCode!==0)return[];return r.stdout.split(`
|
|
3
|
-
`).filter((s)=>s.length>0)}wrapCommand(command,opts={}){let remote=opts.cwd?`cd ${shQuote(opts.cwd)} && ${command}`:command;return`${sshConnectArgs(this.spec,{tty:opts.tty}).map(shToken).join(" ")} ${shQuote(remote)}`}}import{spawnSync as spawnSync2}from"child_process";import{platform}from"os";var defaultDeps={run(argv){let[cmd,...rest]=argv,proc=spawnSync2(cmd??"",rest,{encoding:"utf8",shell:!1});return{stdout:proc.stdout??"",exitCode:proc.status??-1}},platform(){return platform()}},KOBE_KEYCHAIN_SERVICE="kobe-remote-ssh";function remoteKeychainRef(host,user,port){return{service:KOBE_KEYCHAIN_SERVICE,account:port?`${user}@${host}:${port}`:`${user}@${host}`}}function isKeychainSupported(deps=defaultDeps){return deps.platform()==="darwin"}function setKeychainPassword(ref,password,deps=defaultDeps){if(deps.platform()!=="darwin")return!1;let{exitCode}=deps.run(["security","add-generic-password","-U","-s",ref.service,"-a",ref.account,"-w",password]);return exitCode===0}function getKeychainPassword(ref,deps=defaultDeps){if(deps.platform()!=="darwin")return null;let{stdout,exitCode}=deps.run(["security","find-generic-password","-s",ref.service,"-a",ref.account,"-w"]);if(exitCode!==0)return null;return stdout.replace(/\n$/,"")}
|
|
4
|
-
export{LocalExecHost,RemoteExecHost,remoteKeychainRef,isKeychainSupported,setKeychainPassword,getKeychainPassword};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{connectIfRunning,connectOrStartDaemon}from"./chunk-5bn91n19.js";async function openDaemonSession(opts={}){let client=opts.mode==="require-running"?await connectIfRunning():await connectOrStartDaemon();if(!client)return null;return{client,close:()=>client.close()}}async function withDaemonSession(work,opts={}){let session=await openDaemonSession(opts);try{return await work(session?.client??null)}finally{session?.close()}}async function resolveActiveTaskId(client){let activeId=null,off=client.onChannel("active-task",(payload)=>{activeId=payload.taskId});try{await client.subscribe()}finally{off()}return activeId}
|
|
3
|
-
export{openDaemonSession,withDaemonSession,resolveActiveTaskId};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{GitWorktreeManager}from"./chunk-98thhbm5.js";import"./chunk-2cyzv75r.js";import"./chunk-6xppe9bj.js";import"./chunk-7zmrn4gn.js";import"./chunk-1kktfmtg.js";import"./chunk-2fypr41w.js";import"./chunk-87y9qjcm.js";import"./chunk-m57cv76y.js";import"./chunk-a3a9gdc4.js";import"./chunk-9c1e5z6a.js";import"./chunk-6dn6h640.js";import"./chunk-cb2fpajx.js";import"./chunk-3bfm4hrs.js";import"./chunk-wqfp8d9w.js";export{GitWorktreeManager};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{LocalExecHost,RemoteExecHost,getKeychainPassword}from"./chunk-1kktfmtg.js";import{getRemoteRepoConfig,getRemoteRepos,isRemoteRepoKey}from"./chunk-87y9qjcm.js";import{remoteControlSocketPath}from"./chunk-6dn6h640.js";function remoteSpecFromConfig(config){let cfgAuth=config.auth,auth=cfgAuth.kind==="key"?{kind:"key",keyPath:cfgAuth.keyPath}:{kind:"password",getPassword:()=>getKeychainPassword(cfgAuth.keychainRef)};return{host:config.host,user:config.user,port:config.port,auth,controlPath:remoteControlSocketPath(config.host,config.user,config.port)}}var remoteHostCache=new Map;function cachedRemoteHost(config){let spec=remoteSpecFromConfig(config),cached=remoteHostCache.get(spec.controlPath);if(cached)return cached;let host=new RemoteExecHost(spec);return remoteHostCache.set(spec.controlPath,host),host}function execHostForRepo(repoKey){let config=getRemoteRepoConfig(repoKey);if(!config)return new LocalExecHost;return cachedRemoteHost(config)}function execHostForWorktreePath(worktreePath){for(let config of Object.values(getRemoteRepos()))if(worktreePath===config.basePath||worktreePath.startsWith(`${config.basePath}/`))return cachedRemoteHost(config);return new LocalExecHost}function remoteKeyForRepo(repo){return repo&&isRemoteRepoKey(repo)?repo:void 0}
|
|
3
|
-
export{execHostForRepo,execHostForWorktreePath,remoteKeyForRepo};
|
|
@@ -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-t05pnk6y.js";import"./chunk-y5hnrx8d.js";import"./chunk-xnr8dga2.js";import"./chunk-hape5vwj.js";import"./chunk-7zmrn4gn.js";import"./chunk-1kktfmtg.js";import"./chunk-e8493db0.js";import"./chunk-gzf4dfg6.js";import"./chunk-jvxh93nz.js";import"./chunk-7q67dz4c.js";import"./chunk-1cjd7h8p.js";import"./chunk-b99tf0jr.js";import"./chunk-s8xyh1bt.js";import"./chunk-zaxdx0wd.js";import"./chunk-sexavazm.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-x3gch5nw.js";import"./chunk-e7t4xpr9.js";import"./chunk-n4dmwkfa.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-m370e00b.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-87y9qjcm.js";import"./chunk-m57cv76y.js";import"./chunk-dmdqnet6.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.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};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{canonicalize}from"./chunk-2cyzv75r.js";import{applyJitter,exponentialBackoff}from"./chunk-gwcneg6c.js";import{getRemoteRepoConfig,isRemoteRepoKey,resolveRepoRoot}from"./chunk-87y9qjcm.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,headRefName,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,sawPassing=!1;for(let entry of rollup){let s=entryCheckState(entry);if(s==="failing")return"failing";if(s==="pending")sawPending=!0;else if(s==="passing")sawPassing=!0}if(sawPending)return"pending";if(sawPassing)return"passing";return"unknown"}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,headRef:view.headRefName,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.headRef===b.headRef&&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
|
-
export{GH_PR_VIEW_FIELDS,mapGhPrView,samePrStatus,classifyGhFailure,nextPrPoll,checkResolutionNotify,canonPath,randomDirTaskSuffix,titleFromRepo,normalizeMainRepo,repoWorkingDir};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{openDaemonSession,resolveActiveTaskId,withDaemonSession}from"./chunk-1rkb0j1j.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-grh6dvfv.js";import"./chunk-pw6yfj10.js";import"./chunk-x760j10f.js";import"./chunk-3bfm4hrs.js";import"./chunk-wqfp8d9w.js";export{withDaemonSession,resolveActiveTaskId,openDaemonSession};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{toTaskId}from"./chunk-xy8be792.js";import{LockfileError,acquire}from"./chunk-a3a9gdc4.js";import{coerceVendorId}from"./chunk-h82kzdsn.js";import{DAEMON_MIGRATION_MARKER}from"./chunk-8ddjfc2v.js";import{logClient}from"./chunk-grh6dvfv.js";import{defaultClientLogPath}from"./chunk-x760j10f.js";import{existsSync}from"fs";import{copyFile,readFile}from"fs/promises";import{dirname,join}from"path";function coerceTask(value){if(!value||typeof value!=="object")return null;let v=value;if(typeof v.id!=="string"||typeof v.title!=="string"||typeof v.repo!=="string"||typeof v.branch!=="string"||typeof v.worktreePath!=="string"||typeof v.status!=="string"||typeof v.createdAt!=="string"||typeof v.updatedAt!=="string")return null;if(!isTaskStatus(v.status))return null;let kind=v.kind==="main"?"main":v.kind==="dir"?"dir":"task",scratch=kind==="dir"&&v.scratch===!0,healedStatus=kind==="main"&&(v.status==="in_progress"||v.status==="done")?"backlog":v.status,deletion=coerceDeletion(v.deletion),quotaResume=coerceQuotaResume(v.quotaResume),linkedWorkItem=coerceLinkedWorkItem(v.linkedWorkItem),dispatcher=coerceDispatcher(v.dispatcher),routine=coerceRoutine(v.routine);return{id:toTaskId(v.id),title:v.title,repo:v.repo,branch:v.branch,worktreePath:v.worktreePath,status:healedStatus,pinned:typeof v.pinned==="boolean"?v.pinned:!1,kind,...scratch?{scratch:!0}:{},...routine?{routine}:{},vendor:coerceVendorId(typeof v.vendor==="string"?v.vendor:void 0),...typeof v.command==="string"&&v.command.trim().length>0?{command:v.command}:{},prStatus:coercePRStatus(v.prStatus),...typeof v.modelEffort==="string"&&v.modelEffort.length>0?{modelEffort:v.modelEffort}:{},...typeof v.groupId==="string"&&v.groupId.length>0?{groupId:v.groupId}:{},...v.observedLanguage==="zh"||v.observedLanguage==="en"?{observedLanguage:v.observedLanguage}:{},...deletion?{deletion}:{},...quotaResume?{quotaResume}:{},...linkedWorkItem?{linkedWorkItem}:{},...dispatcher?{dispatcher}:{},...typeof v.prompt==="string"&&v.prompt.length>0?{prompt:v.prompt}:{},...typeof v.baseRef==="string"&&v.baseRef.trim().length>0?{baseRef:v.baseRef}:{},createdAt:v.createdAt,updatedAt:v.updatedAt}}function coerceDispatcher(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let v=value;if(typeof v.taskId!=="string"||v.taskId.length===0)return;if(typeof v.tabId!=="string"||v.tabId.length===0)return;return{taskId:v.taskId,tabId:v.tabId}}function coerceRoutine(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let v=value;if(typeof v.automationId!=="string"||v.automationId.length===0)return;return{automationId:v.automationId}}function coerceQuotaResume(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let v=value;if(typeof v.resumeAt!=="string"||v.resumeAt.length===0)return;if(typeof v.requestedAt!=="string"||v.requestedAt.length===0)return;return{resumeAt:v.resumeAt,requestedAt:v.requestedAt}}function coerceLinkedWorkItem(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let v=value;if(v.provider!=="github")return;if(v.type!=="issue"&&v.type!=="pr")return;if(typeof v.number!=="number"||!Number.isFinite(v.number))return;if(typeof v.title!=="string"||typeof v.url!=="string"||v.url.length===0)return;return{provider:v.provider,type:v.type,number:v.number,title:v.title,url:v.url}}function coerceDeletion(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let v=value;if(v.phase!=="queued"&&v.phase!=="running"&&v.phase!=="error"||typeof v.force!=="boolean"||typeof v.requestedAt!=="string"||v.requestedAt.length===0||v.error!==void 0&&typeof v.error!=="string")return;return{phase:v.phase,force:v.force,...typeof v.deleteBranch==="boolean"?{deleteBranch:v.deleteBranch}:{},requestedAt:v.requestedAt,...typeof v.error==="string"?{error:v.error}:{}}}function coercePRStatus(value){if(!value||typeof value!=="object"||Array.isArray(value))return;let v=value;if(!isPRProviderId(v.provider)||!isPRLifecycleState(v.lifecycle)||!isPRCheckState(v.checkState))return;return{provider:v.provider,lifecycle:v.lifecycle,checkState:v.checkState,...typeof v.number==="number"&&Number.isFinite(v.number)?{number:v.number}:{},...typeof v.url==="string"?{url:v.url}:{},...typeof v.title==="string"?{title:v.title}:{},...typeof v.baseRef==="string"?{baseRef:v.baseRef}:{},...typeof v.headRef==="string"?{headRef:v.headRef}:{},...typeof v.reviewDecision==="string"?{reviewDecision:v.reviewDecision}:{},...typeof v.mergeable==="string"?{mergeable:v.mergeable}:{},...typeof v.lastCheckedAt==="string"?{lastCheckedAt:v.lastCheckedAt}:{},...typeof v.lastError==="string"?{lastError:v.lastError}:{}}}function isPRProviderId(v){return v==="github"||v==="gitlab"||v==="bitbucket"||v==="unknown"}function isPRLifecycleState(v){return v==="creating"||v==="open"||v==="ready_to_merge"||v==="merged"||v==="closed"||v==="unknown"}function isPRCheckState(v){return v==="none"||v==="pending"||v==="passing"||v==="failing"||v==="unknown"}function isTaskStatus(s){return s==="backlog"||s==="in_progress"||s==="in_review"||s==="done"||s==="canceled"||s==="error"}var sleep=(ms)=>new Promise((resolve)=>setTimeout(resolve,ms)),LOCK_RETRY_DELAY_MS=25,LOCK_MAX_WAIT_MS=5000;async function acquireWithRetry(lockPath){let deadline=Date.now()+LOCK_MAX_WAIT_MS;for(;;)try{return await acquire(lockPath)}catch(err){if(!(err instanceof LockfileError)||Date.now()>=deadline)throw err;await sleep(LOCK_RETRY_DELAY_MS)}}var CURRENT_VERSION=3;async function backupCorruptManifest(path,now=()=>new Date){let backupPath=`${path}.corrupt-${now().toISOString().replaceAll(":","-")}`;try{return await copyFile(path,backupPath),backupPath}catch{return null}}var SUPPORTED_VERSIONS=new Set([1,2,3]);function warnManifestRecovery(message,manifestPath){console.warn(message),logClient("tasks-index",message,manifestPath?defaultClientLogPath(dirname(dirname(manifestPath))):void 0)}async function recoverUnsupportedVersion(parsed,sourcePath){if(!parsed||typeof parsed!=="object"||Array.isArray(parsed))return!1;let version=parsed.version;if(version===void 0||SUPPORTED_VERSIONS.has(version))return!1;let backup=await backupCorruptManifest(sourcePath);return warnManifestRecovery(`[rove] tasks.json at ${sourcePath} has unsupported version=${String(version)}; recovering with empty index.${backup?` Original bytes backed up to ${backup}.`:" Backup copy failed; the stale file is left in place."}`,sourcePath),!0}function normalizeIndex(parsed,source){if(!parsed||typeof parsed!=="object"||Array.isArray(parsed))return warnManifestRecovery(`[rove] tasks.json at ${source} is not an object; recovering with empty index.`,source),{version:CURRENT_VERSION,tasks:[]};let obj=parsed,version=obj.version;if(version!==void 0&&!SUPPORTED_VERSIONS.has(version))return warnManifestRecovery(`[rove] tasks.json at ${source} has unsupported version=${String(version)}; recovering with empty index.`,source),{version:CURRENT_VERSION,tasks:[]};let rawTasks=Array.isArray(obj.tasks)?obj.tasks:[],tasks=[];for(let entry of rawTasks){let task=coerceTask(entry);if(task)tasks.push(task);else console.warn(`[rove] dropping malformed task entry from ${source}: ${JSON.stringify(entry)}`)}return{version:CURRENT_VERSION,tasks}}var TOMBSTONE_TTL_MS=2592000000;function readableLegacyIndexPath(canonicalPath,legacyPath){return existsSync(join(dirname(canonicalPath),DAEMON_MIGRATION_MARKER))?void 0:legacyPath}async function readDiskIndex(path,legacyPath){let raw,sourcePath=path;try{raw=await readFile(sourcePath,"utf8")}catch(err){if(err.code!=="ENOENT")throw err;let legacy=readableLegacyIndexPath(path,legacyPath);if(!legacy)return{tasks:[],removed:[]};sourcePath=legacy;try{raw=await readFile(sourcePath,"utf8")}catch(legacyErr){if(legacyErr.code==="ENOENT")return{tasks:[],removed:[]};throw legacyErr}}let parsed;try{parsed=JSON.parse(raw)}catch{return await backupCorruptManifest(sourcePath),{tasks:[],removed:[]}}if(await recoverUnsupportedVersion(parsed,sourcePath))return{tasks:[],removed:[]};return{tasks:normalizeIndex(parsed,sourcePath).tasks,removed:coerceTombstones(parsed)}}function coerceTombstones(parsed){if(!parsed||typeof parsed!=="object"||Array.isArray(parsed))return[];let raw=parsed.removed;if(!Array.isArray(raw))return[];let out=[];for(let entry of raw){if(!entry||typeof entry!=="object")continue;let v=entry;if(typeof v.id==="string"&&v.id.length>0&&typeof v.at==="string")out.push({id:v.id,at:v.at})}return out}function mergeTasksWithDisk(cacheTasks,diskTasks,dirty,removed,diskRemoved=[],now=Date.now()){let tombstones=new Map;for(let t of diskRemoved){let at=Date.parse(t.at);if(!Number.isFinite(at)||now-at>TOMBSTONE_TTL_MS)continue;tombstones.set(t.id,t.at)}for(let[id,at]of removed)tombstones.set(id,at);let diskById=new Map(diskTasks.map((t)=>[t.id,t])),result=[],included=new Set;for(let task of cacheTasks){if(tombstones.has(task.id))continue;if(dirty.has(task.id))result.push(task);else{let onDisk=diskById.get(task.id);if(onDisk===void 0)continue;result.push(onDisk)}included.add(task.id)}for(let task of diskTasks){if(included.has(task.id)||tombstones.has(task.id))continue;result.push(task),included.add(task.id)}return{tasks:result,removed:[...tombstones].map(([id,at])=>({id,at}))}}async function recoverIndexFromDisk(path,legacyPath){let raw,sourcePath=path;try{raw=await readFile(path,"utf8")}catch(err){if(err.code!=="ENOENT")throw err;let legacy=readableLegacyIndexPath(path,legacyPath),legacyRaw;if(legacy)try{legacyRaw=await readFile(legacy,"utf8"),sourcePath=legacy}catch(legacyErr){if(legacyErr.code!=="ENOENT")throw legacyErr}if(legacyRaw===void 0)return{version:CURRENT_VERSION,tasks:[]};raw=legacyRaw}let parsed;try{parsed=JSON.parse(raw)}catch(err){let backup=await backupCorruptManifest(sourcePath);return warnManifestRecovery(`[rove] tasks.json at ${sourcePath} is corrupted (${err.message}); recovering with empty index.${backup?` Original bytes backed up to ${backup}.`:" Backup copy failed; the stale file is left in place."}`,sourcePath),{version:CURRENT_VERSION,tasks:[]}}if(await recoverUnsupportedVersion(parsed,sourcePath))return{version:CURRENT_VERSION,tasks:[]};return normalizeIndex(parsed,sourcePath)}
|
|
3
|
-
export{acquireWithRetry,readableLegacyIndexPath,readDiskIndex,mergeTasksWithDisk,recoverIndexFromDisk};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{applyOnboardingChoices,detectShell,envReadyForTasks,installCompletions,maybeRunOnboarding}from"./chunk-p9vkwnb8.js";import"./chunk-yfg503fr.js";import"./chunk-x39pv7rx.js";import"./chunk-jy6nd23p.js";import"./chunk-579zz8df.js";import"./chunk-gtkejmxx.js";import"./chunk-gzf4dfg6.js";import"./chunk-jvxh93nz.js";import"./chunk-zaxdx0wd.js";import"./chunk-sexavazm.js";import"./chunk-sdyzxayr.js";import"./chunk-x3gch5nw.js";import"./chunk-e7t4xpr9.js";import"./chunk-n4dmwkfa.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-m370e00b.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-87y9qjcm.js";import"./chunk-m57cv76y.js";import"./chunk-dmdqnet6.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.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{maybeRunOnboarding,installCompletions,envReadyForTasks,detectShell,applyOnboardingChoices};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{Orchestrator}from"./chunk-rf2m6f3h.js";import"./chunk-akckb9kw.js";import"./chunk-s433recg.js";import"./chunk-98thhbm5.js";import"./chunk-2cyzv75r.js";import"./chunk-6sp2ags8.js";import"./chunk-6xppe9bj.js";import{PLACEHOLDER_TASK_TITLE}from"./chunk-aq912vvw.js";import"./chunk-hape5vwj.js";import"./chunk-7zmrn4gn.js";import"./chunk-1kktfmtg.js";import"./chunk-sdyzxayr.js";import"./chunk-gwcneg6c.js";import"./chunk-2fypr41w.js";import"./chunk-87y9qjcm.js";import"./chunk-m57cv76y.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.js";import"./chunk-2brn8e1y.js";import"./chunk-9c1e5z6a.js";import"./chunk-6dn6h640.js";import"./chunk-h82kzdsn.js";import"./chunk-cb2fpajx.js";import"./chunk-3bfm4hrs.js";import"./chunk-wqfp8d9w.js";export{PLACEHOLDER_TASK_TITLE,Orchestrator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{API_VERBS,RETIRED_VERBS,VERBS,VERB_ALIASES,VERB_GROUPS,findVerb}from"./chunk-5mr9j201.js";import"./chunk-9nbg0nzh.js";import"./chunk-1rkb0j1j.js";import"./chunk-aq912vvw.js";import"./chunk-d393z1mj.js";import"./chunk-d89r6eqm.js";import"./chunk-qkehg2c1.js";import"./chunk-0vmrteyg.js";import"./chunk-gtkejmxx.js";import"./chunk-t05pnk6y.js";import"./chunk-y5hnrx8d.js";import"./chunk-xnr8dga2.js";import"./chunk-hape5vwj.js";import"./chunk-7zmrn4gn.js";import"./chunk-1kktfmtg.js";import"./chunk-e8493db0.js";import"./chunk-gzf4dfg6.js";import"./chunk-jvxh93nz.js";import"./chunk-7q67dz4c.js";import"./chunk-1cjd7h8p.js";import"./chunk-b99tf0jr.js";import"./chunk-s8xyh1bt.js";import"./chunk-zaxdx0wd.js";import"./chunk-sexavazm.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-x3gch5nw.js";import"./chunk-e7t4xpr9.js";import"./chunk-n4dmwkfa.js";import"./chunk-w7zv47mp.js";import"./chunk-gwcneg6c.js";import"./chunk-m370e00b.js";import"./chunk-7jkf3tvr.js";import"./chunk-2fypr41w.js";import"./chunk-87y9qjcm.js";import"./chunk-m57cv76y.js";import"./chunk-dmdqnet6.js";import"./chunk-xy8be792.js";import"./chunk-a3a9gdc4.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-rxvbm4vt.js";import"./chunk-x760j10f.js";import"./chunk-3bfm4hrs.js";import"./chunk-wqfp8d9w.js";export{findVerb,VERB_GROUPS,VERB_ALIASES,VERBS,RETIRED_VERBS,API_VERBS};
|
|
File without changes
|