@sma1lboy/rove 0.9.276 → 0.9.277-next.2
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-mkfc9a09.js → chunk-0a65j1zj.js} +1 -1
- package/dist/cli/{chunk-xb3p11g0.js → chunk-0rvydb9q.js} +1 -1
- package/dist/cli/chunk-1g6vhgfe.js +14 -0
- package/dist/cli/{chunk-eq7vey2j.js → chunk-1vxtd8rh.js} +2 -2
- package/dist/cli/chunk-1wwqf6kx.js +3 -0
- package/dist/cli/{chunk-1jjqk7sq.js → chunk-2kbzb24j.js} +1 -1
- package/dist/cli/chunk-2kt0mfvf.js +2 -0
- package/dist/cli/{chunk-mz1ffkqb.js → chunk-2vph030z.js} +3 -3
- package/dist/cli/{chunk-nr7e3e82.js → chunk-2y70y8na.js} +1 -1
- package/dist/cli/{chunk-jckx79gk.js → chunk-36eyrv4r.js} +3 -3
- package/dist/cli/chunk-37fas9aj.js +2 -0
- package/dist/cli/chunk-3dhv5n19.js +2 -0
- package/dist/cli/{chunk-zkp6nty3.js → chunk-3x5g06mw.js} +1 -1
- package/dist/cli/{chunk-c6fy8xew.js → chunk-3y0z478f.js} +1 -1
- package/dist/cli/{chunk-91tcwxph.js → chunk-4w4tpsqx.js} +1 -1
- package/dist/cli/chunk-5apxck3d.js +97 -0
- package/dist/cli/chunk-5vrg6h71.js +3 -0
- package/dist/cli/{chunk-k1pwp155.js → chunk-5xpvd182.js} +1 -1
- package/dist/cli/{chunk-8dd60adw.js → chunk-5yh5trgy.js} +1 -1
- package/dist/cli/{chunk-r7ntkd6y.js → chunk-61cn88e7.js} +1 -1
- package/dist/cli/{chunk-e3cd4qd2.js → chunk-671ak750.js} +2 -2
- package/dist/cli/{chunk-82apkcrk.js → chunk-676f3tva.js} +1 -1
- package/dist/cli/chunk-6hcyvg0m.js +3 -0
- package/dist/cli/{chunk-h2gznz46.js → chunk-6mg5zp8y.js} +1 -1
- package/dist/cli/chunk-6q4br0pt.js +2 -0
- package/dist/cli/chunk-6wfhq8xd.js +4 -0
- package/dist/cli/{chunk-3xkhcfet.js → chunk-748656h7.js} +3 -3
- package/dist/cli/{chunk-2kqxz9a4.js → chunk-7bakcyes.js} +1 -1
- package/dist/cli/{chunk-yk9b8zgn.js → chunk-7kgcy89w.js} +1 -1
- package/dist/cli/{chunk-e3t1zbv1.js → chunk-8qkyd589.js} +1 -1
- package/dist/cli/chunk-9ckvdy0j.js +3 -0
- package/dist/cli/{chunk-5e9y8aw5.js → chunk-9fdy8vne.js} +1 -1
- package/dist/cli/chunk-9x2xd1rz.js +2 -0
- package/dist/cli/{chunk-je80r59s.js → chunk-9zswhjkv.js} +1 -1
- package/dist/cli/{chunk-c7mz2aq0.js → chunk-aq4j8ar4.js} +1 -1
- package/dist/cli/{chunk-dt676ks9.js → chunk-aqwckba5.js} +1 -1
- package/dist/cli/chunk-atg13xab.js +3 -0
- package/dist/cli/{chunk-wvqn1t55.js → chunk-bagwgxsg.js} +1 -1
- package/dist/cli/{chunk-syn0tfwy.js → chunk-bcyex84w.js} +1 -1
- package/dist/cli/chunk-bv050ssb.js +8 -0
- package/dist/cli/chunk-bykqhbvy.js +2 -0
- package/dist/cli/{chunk-81thm1eb.js → chunk-ca4x8s96.js} +3 -3
- package/dist/cli/{chunk-syfs63r2.js → chunk-cakyme4s.js} +1 -1
- package/dist/cli/{chunk-63cwjceg.js → chunk-ccmke5sx.js} +1 -1
- package/dist/cli/{chunk-5nvg3ek8.js → chunk-cf3vpsm5.js} +1 -1
- package/dist/cli/{chunk-zat16a83.js → chunk-d552cvb2.js} +1 -1
- package/dist/cli/{chunk-awh7np6x.js → chunk-dsdtq087.js} +1 -1
- package/dist/cli/{chunk-d0hpes59.js → chunk-e58kj4gm.js} +1 -1
- package/dist/cli/chunk-ee314raa.js +2 -0
- package/dist/cli/{chunk-f76gzvq3.js → chunk-fgtc1xq9.js} +1 -1
- package/dist/cli/{chunk-h7vwn62z.js → chunk-fq2pefc5.js} +1 -1
- package/dist/cli/{chunk-4117kgmx.js → chunk-g4p5znv1.js} +1 -1
- package/dist/cli/{chunk-1ca2j9w6.js → chunk-g9xknhjq.js} +1 -1
- package/dist/cli/chunk-gbd5j3dv.js +2 -0
- package/dist/cli/{chunk-4xvmrg86.js → chunk-ggjmcqpt.js} +1 -1
- package/dist/cli/chunk-hv79ys32.js +1 -1
- package/dist/cli/chunk-hz1x3hak.js +3 -0
- package/dist/cli/{chunk-h64rsbrx.js → chunk-hzz020xx.js} +1 -1
- package/dist/cli/{chunk-ma21srvx.js → chunk-j1qy79fd.js} +1 -1
- package/dist/cli/chunk-j9tsdn1d.js +2 -0
- package/dist/cli/chunk-jejmt4k0.js +140 -0
- package/dist/cli/chunk-jj5f4n51.js +1 -1
- package/dist/cli/{chunk-x3n4y5sp.js → chunk-k225696b.js} +1 -1
- package/dist/cli/{chunk-d7xbm9jp.js → chunk-kag7cfbr.js} +1 -1
- package/dist/cli/{chunk-283vd9h7.js → chunk-kdnk8m5j.js} +1 -1
- package/dist/cli/{chunk-xd93fm1k.js → chunk-kxp04jnp.js} +1 -1
- package/dist/cli/chunk-m4z6kepz.js +3 -0
- package/dist/cli/{chunk-372g44dg.js → chunk-mjyhy152.js} +1 -1
- package/dist/cli/chunk-mqvkd2g1.js +2 -0
- package/dist/cli/{chunk-t4qr9sv4.js → chunk-mvtqstte.js} +1 -1
- package/dist/cli/{chunk-m2a19yt4.js → chunk-mxx0y791.js} +1 -1
- package/dist/cli/{chunk-d9643dwf.js → chunk-n2zgej1a.js} +1 -1
- package/dist/cli/{chunk-xn2f56tg.js → chunk-n94vzkbe.js} +1 -1
- package/dist/cli/{chunk-9gh8kgjs.js → chunk-njncqdwf.js} +1 -1
- package/dist/cli/{chunk-t52gzaeb.js → chunk-nw092jak.js} +1 -1
- package/dist/cli/{chunk-gafkp74h.js → chunk-pfagrkt6.js} +1 -1
- package/dist/cli/{chunk-511103e8.js → chunk-pnrftncm.js} +1 -1
- package/dist/cli/{chunk-9c3brkb3.js → chunk-pqr6td4z.js} +1 -1
- package/dist/cli/{chunk-tvdrvgen.js → chunk-qcjkactr.js} +1 -1
- package/dist/cli/{chunk-v1r83m3n.js → chunk-qs359899.js} +1 -1
- package/dist/cli/{chunk-n6marmjn.js → chunk-qzzmd63x.js} +2 -3
- package/dist/cli/{chunk-fn7ffyam.js → chunk-r2bb8b11.js} +1 -1
- package/dist/cli/chunk-rjy900p4.js +4 -0
- package/dist/cli/{chunk-b035pej7.js → chunk-rmsdybs3.js} +1 -1
- package/dist/cli/{chunk-6mtfafaw.js → chunk-rztqccs3.js} +1 -1
- package/dist/cli/chunk-s1308b3d.js +63 -0
- package/dist/cli/{chunk-ne6x6g2c.js → chunk-se00fc8v.js} +1 -1
- package/dist/cli/{chunk-zcrs4sm2.js → chunk-shtm72c0.js} +1 -1
- package/dist/cli/{chunk-gq57he03.js → chunk-t9vjj8sy.js} +1 -1
- package/dist/cli/{chunk-0d7517kk.js → chunk-ta1p2nwa.js} +1 -1
- package/dist/cli/chunk-teh40faw.js +1 -1
- package/dist/cli/{chunk-eyvw70yb.js → chunk-tnatqcy7.js} +1 -1
- package/dist/cli/{chunk-mq88bvj6.js → chunk-tt58819p.js} +1 -1
- package/dist/cli/{chunk-pdq3ya2e.js → chunk-tw9tfs1d.js} +2 -2
- package/dist/cli/chunk-v6dz59gy.js +2 -0
- package/dist/cli/chunk-v6v272b3.js +3 -0
- package/dist/cli/{chunk-hhcmzs67.js → chunk-vkv1v3xn.js} +6 -28
- package/dist/cli/chunk-vkz6kkmm.js +24 -0
- package/dist/cli/chunk-vp29jgbt.js +4 -0
- package/dist/cli/chunk-vpsarakj.js +2 -0
- package/dist/cli/{chunk-745pg3xm.js → chunk-vr2r2ncm.js} +1 -1
- package/dist/cli/{chunk-3y9xzbqh.js → chunk-vvqwgcge.js} +1 -1
- package/dist/cli/{chunk-m73x5nry.js → chunk-vwpf55cr.js} +2 -2
- package/dist/cli/{chunk-vz0f8e8q.js → chunk-vytrhm50.js} +1 -1
- package/dist/cli/{chunk-c63vgbkw.js → chunk-w7v71t7e.js} +1 -1
- package/dist/cli/{chunk-hcvp84b3.js → chunk-wfgrn8p2.js} +1 -1
- package/dist/cli/chunk-wzss4pzh.js +3 -0
- package/dist/cli/chunk-x1ghdmp1.js +1 -1
- package/dist/cli/chunk-x1jxxmtc.js +3 -0
- package/dist/cli/{chunk-d7f022eb.js → chunk-x83xbzjd.js} +3 -3
- package/dist/cli/{chunk-22rgewg0.js → chunk-x85rcep5.js} +1 -1
- package/dist/cli/{chunk-j9b285x6.js → chunk-x89zw7br.js} +1 -1
- package/dist/cli/{chunk-ccwe9n56.js → chunk-xg42e2ff.js} +1 -1
- package/dist/cli/{chunk-jfcn77n9.js → chunk-xte4phd1.js} +1 -1
- package/dist/cli/chunk-y8b2p44q.js +1 -1
- package/dist/cli/chunk-ys6v36ph.js +2 -0
- package/dist/cli/{chunk-n8t4y0bj.js → chunk-yzdrhytj.js} +1 -1
- package/dist/cli/{chunk-qna1s1r4.js → chunk-z3qz6enf.js} +1 -1
- package/dist/cli/chunk-z3wrbtcq.js +22 -0
- package/dist/cli/{chunk-cfzg8q3e.js → chunk-z43e08kw.js} +1 -1
- package/dist/cli/{chunk-ehm9abge.js → chunk-zpwvjt14.js} +7 -5
- package/dist/cli/{chunk-k235z3ct.js → chunk-zrf93zrx.js} +1 -1
- package/dist/cli/index.js +9 -12
- package/dist/cli/pty-host-node.mjs +1 -3
- package/dist/cli/rove-run.js +1 -1
- package/dist/completions/rove.bash +1 -1
- package/dist/completions/rove.fish +1 -1
- package/dist/completions/rove.zsh +1 -1
- package/dist/skills/rove/SKILL.md +4 -3
- package/dist/skills/rove/references/api-flags.md +12 -5
- package/dist/web/assets/index-BVQbpUea.css +1 -0
- package/dist/web/assets/index-BakEtMcK.js +152 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff +0 -0
- package/dist/web/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- package/dist/web/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/dist/web/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- package/dist/web/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff +0 -0
- package/dist/web/index.html +2 -2
- package/dist/web/relay/index.html +34 -0
- package/dist/web-ui/assets/{harness-pEyVtWV4.js → harness-C7ciHx2w.js} +2 -2
- package/dist/web-ui/assets/{index-Dyg-qcgB.js → index-B1FLht5L.js} +2 -2
- package/dist/web-ui/assets/{index-Bsn8NuKa.css → index-BDIkPexK.css} +1 -1
- package/dist/web-ui/index.html +2 -2
- package/package.json +1 -1
- package/dist/cli/chunk-1eef3z5v.js +0 -3
- package/dist/cli/chunk-1n03wzx4.js +0 -3
- package/dist/cli/chunk-387w0db1.js +0 -2
- package/dist/cli/chunk-4a05fgdh.js +0 -2
- package/dist/cli/chunk-59p3h5e9.js +0 -2
- package/dist/cli/chunk-6xga1a2d.js +0 -3
- package/dist/cli/chunk-84pvn784.js +0 -2
- package/dist/cli/chunk-883fyezq.js +0 -3
- package/dist/cli/chunk-a4r45qdn.js +0 -3
- package/dist/cli/chunk-brgfsm5v.js +0 -2
- package/dist/cli/chunk-bw98jn7g.js +0 -18
- package/dist/cli/chunk-cbrt4s7m.js +0 -3
- package/dist/cli/chunk-d9e4ssy7.js +0 -12
- package/dist/cli/chunk-dgx02565.js +0 -3
- package/dist/cli/chunk-g4dtqbrj.js +0 -2
- package/dist/cli/chunk-gctqthxq.js +0 -97
- package/dist/cli/chunk-hmjg1qh3.js +0 -2
- package/dist/cli/chunk-jn10xeft.js +0 -2
- package/dist/cli/chunk-nbpq1tkx.js +0 -98
- package/dist/cli/chunk-ns35rdyk.js +0 -3
- package/dist/cli/chunk-pap7k3b4.js +0 -3
- package/dist/cli/chunk-r7kmn4js.js +0 -2
- package/dist/cli/chunk-tz373e5w.js +0 -3
- package/dist/cli/chunk-vp171as9.js +0 -65
- package/dist/cli/chunk-vtcr71fs.js +0 -8
- package/dist/cli/chunk-w7v4jzwy.js +0 -3
- package/dist/cli/chunk-xv3217yv.js +0 -2
- package/dist/cli/chunk-yhytkwpv.js +0 -2
- package/dist/web/assets/index-C5t3gibI.css +0 -1
- package/dist/web/assets/index-Djp7M6r8.js +0 -122
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{pathSyntax}from"./chunk-pn5ygqn6.js";function childrenOf(tasks,id){return tasks.filter((task)=>task.parentTaskId===id)}function workspaceOwnerId(task){return task.sharesWorkspaceOf??task.id}function isSharedChild(task){return task.sharesWorkspaceOf!==void 0}function lineageRootId(tasks,id){let byId=new Map(tasks.map((task)=>[task.id,task])),seen=new Set,current=id;for(;;){seen.add(current);let up=byId.get(current)?.parentTaskId;if(!up||seen.has(up)||!byId.has(up))return current;current=up}}function subtreeIds(tasks,id){let out=[],seen=new Set,visit=(current)=>{if(seen.has(current))return;seen.add(current);for(let child of childrenOf(tasks,current))visit(child.id);out.push(current)};return visit(id),out}function taskCwd(task){let root=task.worktreePath??"";if(!root||!task.cwdSubpath)return root;return pathSyntax(root).join(root,task.cwdSubpath)}var MULTI_REPO_CAP=8,REPO_NAME_RE=/^[A-Za-z0-9_][A-Za-z0-9._-]*$/;function repoNameOf(repoPath){return pathSyntax(repoPath).basename(repoPath).replace(/[^A-Za-z0-9._-]/g,"-").replace(/^[.-]+/,"")||"repo"}function uniqueRepoName(name,taken){if(!taken.has(name))return name;for(let n=2;;n++)if(!taken.has(`${name}-${n}`))return`${name}-${n}`}function taskRepos(task,tasks){let extras=(task.sharesWorkspaceOf&&tasks?.find((t)=>t.id===task.sharesWorkspaceOf)||task).extraRepos??[];return[{name:uniqueRepoName(repoNameOf(task.repo),new Set(extras.map((e)=>e.name))),repo:task.repo,branch:task.branch,worktreePath:task.worktreePath??"",...task.baseRef?{baseRef:task.baseRef}:{},...task.prStatus?{prStatus:task.prStatus}:{},primary:!0},...extras.map((e)=>({name:e.name,repo:e.repo,branch:e.branch,worktreePath:e.worktreePath,...e.baseRef?{baseRef:e.baseRef}:{},...e.prStatus?{prStatus:e.prStatus}:{},primary:!1}))]}function taskWorktreePaths(task,tasks){return taskRepos(task,tasks).map((r)=>r.worktreePath).filter((p)=>p.length>0)}function prRank(pr){if(pr.checkState==="failing")return 0;if(pr.checkState==="pending")return 1;return pr.lifecycle==="merged"?3:2}function rollupPr(task){let worst;for(let pr of[task.prStatus,...(task.extraRepos??[]).map((e)=>e.prStatus)])if(pr&&(!worst||prRank(pr)<prRank(worst)))worst=pr;return worst}function pickRepos(task,only){let all=taskRepos(task);if(!only)return all;let picked=all.filter((r)=>r.name===only);if(picked.length===0)throw Error(`UNKNOWN_REPO: no repo named '${only}' in this task (repos: ${all.map((r)=>r.name).join(", ")})`);return picked}var WORKSPACE_BACKEND_IDS=["git-worktree","borrowed","cow-clone","layerfs"];function isWorkspaceBackendId(value){return typeof value==="string"&&WORKSPACE_BACKEND_IDS.includes(value)}var GIT_WORKTREE={fork:"committed",checkpoint:!0,cheapClone:!1,ownsBranch:!0,ownsDirectory:!0,interactive:!0},WORKSPACE_CAPABILITIES={"git-worktree":GIT_WORKTREE,borrowed:{fork:"committed",checkpoint:!1,cheapClone:!1,ownsBranch:!1,ownsDirectory:!1,interactive:!0},"cow-clone":{...GIT_WORKTREE,fork:"with-uncommitted",cheapClone:!0},layerfs:{...GIT_WORKTREE,cheapClone:!0,ownsBranch:!1,interactive:!1}};function workspaceBackendId(task){if(task.workspace)return task.workspace.backend;return task.kind==="main"||task.kind==="dir"?"borrowed":"git-worktree"}function workspaceCapabilities(task){return WORKSPACE_CAPABILITIES[workspaceBackendId(task)]}var SESSION_PR_CAP=20,GITHUB_PR_URL=/^https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)(?:[/?#].*)?$/i;function canonicalPrUrl(input){let m=GITHUB_PR_URL.exec(input.trim());if(!m)return;let[,owner,repo,number]=m;return`https://github.com/${owner}/${repo}/pull/${Number(number)}`}
|
|
3
|
-
export{SESSION_PR_CAP,canonicalPrUrl,childrenOf,workspaceOwnerId,isSharedChild,lineageRootId,subtreeIds,taskCwd,MULTI_REPO_CAP,REPO_NAME_RE,repoNameOf,uniqueRepoName,taskRepos,taskWorktreePaths,rollupPr,pickRepos,isWorkspaceBackendId,WORKSPACE_CAPABILITIES,workspaceBackendId,workspaceCapabilities};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{lookup}from"dns/promises";import{isIP}from"net";import{connect}from"tls";var PROBE_TIMEOUT_MS=3000,MAX_HEAD_BYTES=65536;function isLoopbackHost(host){let h=host.toLowerCase().replace(/^\[|\]$/g,"");if(h==="localhost"||h.endsWith(".localhost"))return!0;let kind=isIP(h);if(kind===4)return h.startsWith("127.")||h==="0.0.0.0";return kind===6&&(parseV6(h)?.every((g,i)=>g===(i===7?1:0))??!1)}function parseV4(ip){let parts=ip.split(".");if(parts.length!==4)return null;let octets=parts.map((p)=>/^\d{1,3}$/.test(p)?Number(p):Number.NaN);return octets.every((o)=>o>=0&&o<=255)?octets:null}function parseV6(raw){let ip=raw.split("%")[0]??"";if(isIP(ip)!==6)return null;let text=ip,lastColon=text.lastIndexOf(":");if(text.slice(lastColon+1).includes(".")){let v4=parseV4(text.slice(lastColon+1));if(!v4)return null;let group=(hi,lo)=>((hi??0)<<8|(lo??0)).toString(16);text=`${text.slice(0,lastColon+1)}${group(v4[0],v4[1])}:${group(v4[2],v4[3])}`}let[head="",rest]=text.split("::"),left=head===""?[]:head.split(":"),right=rest===void 0||rest===""?[]:rest.split(":"),fill=rest===void 0?0:8-left.length-right.length;if(fill<0||rest===void 0&&left.length!==8)return null;let groups=[...left,...Array(fill).fill("0"),...right].map((g)=>Number.parseInt(g,16));return groups.length===8&&groups.every((g)=>g>=0&&g<=65535)?groups:null}function refusedV4(o){let[a=0,b=0,c=0]=o;if(a===0)return"this-network address";if(a===10)return"private address";if(a===100&&b>=64&&b<=127)return"carrier-grade NAT address";if(a===127)return"loopback address";if(a===169&&b===254)return"link-local address";if(a===172&&b>=16&&b<=31)return"private address";if(a===192&&b===0&&c===0)return"reserved address";if(a===192&&b===168)return"private address";if(a===198&&(b===18||b===19))return"benchmarking address";if(a>=224)return"multicast or reserved address";return null}function refusedAddress(ip){let addr=ip.replace(/^\[|\]$/g,""),v4=parseV4(addr);if(v4)return refusedV4(v4);let g=parseV6(addr);if(!g)return"not an IP address";let embedded=(hi,lo)=>refusedV4([hi>>8,hi&255,lo>>8,lo&255]);if(g.slice(0,5).every((x)=>x===0)&&(g[5]===65535||g[5]===0)){if(g.slice(5).every((x)=>x===0))return"unspecified address";if(g[5]===0&&g[6]===0&&g[7]===1)return"loopback address";return embedded(g[6]??0,g[7]??0)??null}let first=g[0]??0;if((first&65024)===64512)return"unique-local address";if((first&65472)===65152)return"link-local address";if((first&65280)===65280)return"multicast address";if(first===8194)return embedded(g[1]??0,g[2]??0);if(first===100&&g[1]===65435)return embedded(g[6]??0,g[7]??0);if(first===8193&&g[1]===3512)return"documentation address";return null}function ancestorsAllow(sources,origin){let page=null;try{page=origin?new URL(origin):null}catch{page=null}return sources.some((raw)=>{let source=raw.toLowerCase();if(source==="*")return!0;if(!page)return!1;if(source===`${page.protocol}`)return!0;if(source.endsWith(":")||source.startsWith("'"))return!1;let candidate;try{candidate=new URL(source.includes("://")?source.replace("*.","wildcard."):`${page.protocol}//${source.replace("*.","wildcard.")}`)}catch{return!1}let wildcard=candidate.hostname.startsWith("wildcard."),host=wildcard?candidate.hostname.slice(9):candidate.hostname,hostOk=wildcard?page.hostname.endsWith(`.${host}`):page.hostname===host,portOk=source.endsWith(":*")||(candidate.port||defaultPort(candidate.protocol))===(page.port||defaultPort(page.protocol));return hostOk&&portOk&&candidate.protocol===page.protocol})}var defaultPort=(protocol)=>protocol==="https:"?"443":protocol==="http:"?"80":"";function parseFrameHeaders(headers,origin){for(let value of headers.xFrameOptions??[])for(let part of value.split(",")){let v=part.trim().toLowerCase();if(v==="deny"||v==="sameorigin")return{frameable:!1,reason:`X-Frame-Options: ${v.toUpperCase()}`}}for(let value of headers.csp??[])for(let policy of value.split(","))for(let directive of policy.split(";")){let[name,...sources]=directive.trim().split(/\s+/);if(name?.toLowerCase()!=="frame-ancestors")continue;if(!ancestorsAllow(sources,origin))return{frameable:!1,reason:`Content-Security-Policy: frame-ancestors ${sources.join(" ")}`.trim()}}return{frameable:!0}}function parseHead(text){let[statusLine="",...lines]=text.split(`\r
|
|
3
|
-
`),status=Number(/^HTTP\/\d(?:\.\d)? (\d{3})/.exec(statusLine)?.[1]);if(!Number.isInteger(status))return null;let headers=new Map;for(let line of lines){let colon=line.indexOf(":");if(colon<=0)continue;let name=line.slice(0,colon).trim().toLowerCase();if(name!=="x-frame-options"&&name!=="content-security-policy"&&name!=="location")continue;headers.set(name,[...headers.get(name)??[],line.slice(colon+1).trim()])}return{status,headers}}var headOverTls=(target,signal)=>{let{promise,resolve,reject}=Promise.withResolvers(),socket=connect({host:target.ip,port:target.port,servername:target.host}),fail=(err)=>{socket.destroy(),reject(err)};signal.addEventListener("abort",()=>fail(Error("timed out")),{once:!0});let received="";return socket.on("secureConnect",()=>{socket.write(`HEAD ${target.path} HTTP/1.1\r
|
|
4
|
-
Host: ${target.host}\r
|
|
5
|
-
User-Agent: rove-frame-probe\r
|
|
6
|
-
Accept: */*\r
|
|
7
|
-
Connection: close\r
|
|
8
|
-
\r
|
|
9
|
-
`)}),socket.on("data",(chunk)=>{received+=chunk.toString("latin1");let end=received.indexOf(`\r
|
|
10
|
-
\r
|
|
11
|
-
`);if(end<0&&received.length<MAX_HEAD_BYTES)return;let parsed=parseHead(end<0?received:received.slice(0,end));if(socket.destroy(),parsed)resolve(parsed);else reject(Error("not an HTTP response"))}),socket.on("error",fail),socket.on("close",()=>fail(Error("closed before a response"))),promise},resolveAll=async(host)=>(await lookup(host,{all:!0})).map((a)=>a.address),unframeable=(reason,reachable,status)=>({reachable,frameable:!1,reason,...status!==void 0?{status}:{}});async function probeFrame(rawUrl,opts={}){let url;try{url=new URL(rawUrl)}catch{return unframeable("not a URL",!1)}if(url.protocol!=="https:")return unframeable("only https URLs are probed",!1);let host=url.hostname.replace(/^\[|\]$/g,""),deps={resolve:resolveAll,head:headOverTls,...opts.deps},abort=new AbortController,timer=setTimeout(()=>abort.abort(),PROBE_TIMEOUT_MS),deadline=Promise.withResolvers();deadline.promise.catch(()=>{}),abort.signal.addEventListener("abort",()=>deadline.reject(Error("timed out")),{once:!0});let timedOut=deadline.promise;try{let addresses=isIP(host)?[host]:await Promise.race([deps.resolve(host),timedOut]);if(addresses.length===0)return unframeable(`${host} did not resolve`,!1);for(let ip of addresses){let why=refusedAddress(ip);if(why)return unframeable(`refused: ${isIP(host)?host:`${host} resolves to ${ip}`} is a ${why}`,!1)}let port=url.port?Number(url.port):443,response=await Promise.race([deps.head({ip:addresses[0],host:url.host===url.hostname?host:url.host,port,path:`${url.pathname}${url.search}`||"/"},abort.signal),timedOut]),verdict=parseFrameHeaders({xFrameOptions:response.headers.get("x-frame-options")??[],csp:response.headers.get("content-security-policy")??[]},opts.origin),location=response.headers.get("location")?.[0],redirected=response.status>=300&&response.status<400&&location;return{reachable:!0,frameable:verdict.frameable,status:response.status,...verdict.reason?{reason:verdict.reason}:redirected?{reason:`redirects to ${location} (not followed)`}:{}}}catch(err){return unframeable(err instanceof Error?err.message:String(err),!1)}finally{clearTimeout(timer)}}async function checkFrame(rawUrl,opts={}){let url;try{url=new URL(rawUrl)}catch{return unframeable("not a URL",!1)}if(isLoopbackHost(url.hostname))return{reachable:!0,frameable:!0,reason:"localhost is not probed"};if(url.protocol==="http:")return{reachable:!0,frameable:!1,reason:"http is framed for localhost only; open the page in a tab"};return probeFrame(rawUrl,opts)}
|
|
12
|
-
export{isLoopbackHost,checkFrame};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{canonicalize}from"./chunk-eq7vey2j.js";import{applyJitter,exponentialBackoff}from"./chunk-2tfnscxk.js";import{getRemoteRepoConfig,isRemoteRepoKey,resolveRepoRoot}from"./chunk-rfp0ayra.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,additions,deletions";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,...typeof view.additions==="number"?{additions:view.additions}:{},...typeof view.deletions==="number"?{deletions:view.deletions}:{},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.additions===b.additions&&a.deletions===b.deletions&&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
|
-
export{GH_PR_VIEW_FIELDS,mapGhPrView,samePrStatus,classifyGhFailure,nextPrPoll,checkResolutionNotify,canonPath,randomDirTaskSuffix,titleFromRepo,normalizeMainRepo,repoWorkingDir};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import{MachineFeed,decodeMachines}from"./chunk-je80r59s.js";import"./chunk-v1r83m3n.js";import"./chunk-tz373e5w.js";import"./chunk-6xr1prk6.js";import"./chunk-atn06ncf.js";import"./chunk-vz0f8e8q.js";import"./chunk-sq6zj3fb.js";import"./chunk-y1xnjx8x.js";import"./chunk-0r1jf8m9.js";import"./chunk-t7j8g9f6.js";import"./chunk-dmzg9zdc.js";import"./chunk-40dgv828.js";import"./chunk-6xppe9bj.js";import"./chunk-a4r45qdn.js";import"./chunk-d0hpes59.js";import"./chunk-mkfc9a09.js";import"./chunk-syn0tfwy.js";import"./chunk-32j6y5d1.js";import"./chunk-cmp64q4j.js";import"./chunk-n6marmjn.js";import"./chunk-96kvwzj8.js";import"./chunk-7kysxgbq.js";import"./chunk-xy8be792.js";import"./chunk-bejhca6z.js";import"./chunk-z1nj22va.js";import"./chunk-br8r72bf.js";import"./chunk-zt7wfnva.js";import"./chunk-yt15y085.js";import"./chunk-0g4wc808.js";import"./chunk-pn5ygqn6.js";import"./chunk-eqdbfgq5.js";import"./chunk-f8gg8cqh.js";import"./chunk-nc46gddg.js";import"./chunk-91sykzqq.js";export{decodeMachines,MachineFeed};
|