@moberg_hr/work-tree 2.0.6 → 2.0.7

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 (81) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/{chunk-46UD4QBL.js → chunk-5RRKVAIZ.js} +3 -2
  3. package/dist/chunk-5RRKVAIZ.js.map +1 -0
  4. package/dist/{chunk-X5EMINGT.js → chunk-6HDVRMCX.js} +2 -2
  5. package/dist/{chunk-BSCAA322.js → chunk-7Z2USU3A.js} +22 -8
  6. package/dist/chunk-7Z2USU3A.js.map +1 -0
  7. package/dist/chunk-C4LRHXEB.js +9 -0
  8. package/dist/{chunk-FOG4WG3Y.js → chunk-CNFPZVNO.js} +2 -2
  9. package/dist/{chunk-ESPZRTUB.js → chunk-DH2PLKCW.js} +2 -2
  10. package/dist/{chunk-XHOQ7BWT.js → chunk-HB2I7GF7.js} +2 -2
  11. package/dist/{chunk-7OUBCJVJ.js → chunk-IOO2OAUC.js} +3 -3
  12. package/dist/{chunk-G2O7EIKX.js → chunk-J2ZJ2DIJ.js} +2 -2
  13. package/dist/{chunk-XBNLSKTX.js → chunk-K3ESY6OJ.js} +3 -3
  14. package/dist/{chunk-HIXC67MU.js → chunk-LDCY457K.js} +2 -2
  15. package/dist/{chunk-52IEEAYJ.js → chunk-M2QL43DS.js} +2 -2
  16. package/dist/{chunk-UNPEZODB.js → chunk-QDNCUUNQ.js} +3 -3
  17. package/dist/chunk-QWIGFAKZ.js +334 -0
  18. package/dist/chunk-QWIGFAKZ.js.map +1 -0
  19. package/dist/{chunk-5S3ORHTD.js → chunk-VICXQQ5X.js} +4 -4
  20. package/dist/{chunk-5653XPLJ.js → chunk-YXTJVPOI.js} +16 -16
  21. package/dist/{cleanup-QLN3C3H5.js → cleanup-YVQOAMSK.js} +6 -6
  22. package/dist/{cli-MIBNJRX6.js → cli-VSCHBZRS.js} +3 -3
  23. package/dist/{config-TPYNBTVM.js → config-4W5MMHLU.js} +5 -5
  24. package/dist/{fork-Y4PJNRUB.js → fork-ZBEMNEPA.js} +4 -4
  25. package/dist/{init-NGL64E3F.js → init-J2AB37DO.js} +5 -5
  26. package/dist/{move-FFQR5TEI.js → move-O7NEJZQV.js} +8 -12
  27. package/dist/move-O7NEJZQV.js.map +1 -0
  28. package/dist/{overlaps-3LZXSDYZ.js → overlaps-SKKGH6EG.js} +4 -4
  29. package/dist/{pr-JM4DRRIV.js → pr-AC44DGJY.js} +2 -2
  30. package/dist/{prune-63N3QNDR.js → prune-NQOVBIFT.js} +5 -5
  31. package/dist/{remove-ADWLTOFS.js → remove-JESX7RCN.js} +4 -4
  32. package/dist/{sessions-CAOAXKKG.js → sessions-T6UXM2OX.js} +4 -4
  33. package/dist/{sync-EVPQVVWT.js → sync-E4CU4IHG.js} +5 -5
  34. package/dist/{tree-O4VADOFG.js → tree-RAN6SQKW.js} +31 -1
  35. package/dist/tree-RAN6SQKW.js.map +1 -0
  36. package/dist/{update-K73WHYY3.js → update-5DM5V2E3.js} +3 -3
  37. package/dist/wd-bin.js +2 -2
  38. package/dist/web/assets/{PtyView-DBMOq3Ro.js → PtyView-Ci395OL2.js} +2 -2
  39. package/dist/web/assets/{PtyView-DBMOq3Ro.js.map → PtyView-Ci395OL2.js.map} +1 -1
  40. package/dist/web/assets/index-D-_oxT3O.css +1 -0
  41. package/dist/web/assets/index-DjdfILvB.js +118 -0
  42. package/dist/web/assets/index-DjdfILvB.js.map +1 -0
  43. package/dist/web/index.html +2 -2
  44. package/dist/{web-GN2ATEXW.js → web-EUI5U2H4.js} +165 -316
  45. package/dist/web-EUI5U2H4.js.map +1 -0
  46. package/npm-shrinkwrap.json +2 -2
  47. package/package.json +1 -1
  48. package/dist/chunk-46UD4QBL.js.map +0 -1
  49. package/dist/chunk-BSCAA322.js.map +0 -1
  50. package/dist/chunk-MNZOOANK.js +0 -9
  51. package/dist/move-FFQR5TEI.js.map +0 -1
  52. package/dist/tree-O4VADOFG.js.map +0 -1
  53. package/dist/web/assets/index-CV8NpZB8.css +0 -1
  54. package/dist/web/assets/index-DvFWtkAs.js +0 -117
  55. package/dist/web/assets/index-DvFWtkAs.js.map +0 -1
  56. package/dist/web-GN2ATEXW.js.map +0 -1
  57. /package/dist/{chunk-X5EMINGT.js.map → chunk-6HDVRMCX.js.map} +0 -0
  58. /package/dist/{chunk-MNZOOANK.js.map → chunk-C4LRHXEB.js.map} +0 -0
  59. /package/dist/{chunk-FOG4WG3Y.js.map → chunk-CNFPZVNO.js.map} +0 -0
  60. /package/dist/{chunk-ESPZRTUB.js.map → chunk-DH2PLKCW.js.map} +0 -0
  61. /package/dist/{chunk-XHOQ7BWT.js.map → chunk-HB2I7GF7.js.map} +0 -0
  62. /package/dist/{chunk-7OUBCJVJ.js.map → chunk-IOO2OAUC.js.map} +0 -0
  63. /package/dist/{chunk-G2O7EIKX.js.map → chunk-J2ZJ2DIJ.js.map} +0 -0
  64. /package/dist/{chunk-XBNLSKTX.js.map → chunk-K3ESY6OJ.js.map} +0 -0
  65. /package/dist/{chunk-HIXC67MU.js.map → chunk-LDCY457K.js.map} +0 -0
  66. /package/dist/{chunk-52IEEAYJ.js.map → chunk-M2QL43DS.js.map} +0 -0
  67. /package/dist/{chunk-UNPEZODB.js.map → chunk-QDNCUUNQ.js.map} +0 -0
  68. /package/dist/{chunk-5S3ORHTD.js.map → chunk-VICXQQ5X.js.map} +0 -0
  69. /package/dist/{chunk-5653XPLJ.js.map → chunk-YXTJVPOI.js.map} +0 -0
  70. /package/dist/{cleanup-QLN3C3H5.js.map → cleanup-YVQOAMSK.js.map} +0 -0
  71. /package/dist/{cli-MIBNJRX6.js.map → cli-VSCHBZRS.js.map} +0 -0
  72. /package/dist/{config-TPYNBTVM.js.map → config-4W5MMHLU.js.map} +0 -0
  73. /package/dist/{fork-Y4PJNRUB.js.map → fork-ZBEMNEPA.js.map} +0 -0
  74. /package/dist/{init-NGL64E3F.js.map → init-J2AB37DO.js.map} +0 -0
  75. /package/dist/{overlaps-3LZXSDYZ.js.map → overlaps-SKKGH6EG.js.map} +0 -0
  76. /package/dist/{pr-JM4DRRIV.js.map → pr-AC44DGJY.js.map} +0 -0
  77. /package/dist/{prune-63N3QNDR.js.map → prune-NQOVBIFT.js.map} +0 -0
  78. /package/dist/{remove-ADWLTOFS.js.map → remove-JESX7RCN.js.map} +0 -0
  79. /package/dist/{sessions-CAOAXKKG.js.map → sessions-T6UXM2OX.js.map} +0 -0
  80. /package/dist/{sync-EVPQVVWT.js.map → sync-E4CU4IHG.js.map} +0 -0
  81. /package/dist/{update-K73WHYY3.js.map → update-5DM5V2E3.js.map} +0 -0
@@ -0,0 +1,334 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ originUrl,
4
+ ownerRepo,
5
+ readGitConfig
6
+ } from "./chunk-7Z2USU3A.js";
7
+ import {
8
+ defaultRunner
9
+ } from "./chunk-5RRKVAIZ.js";
10
+
11
+ // src/core/pr/pr-ref.ts
12
+ function parsePrRef(input) {
13
+ const s = input.trim();
14
+ const url = /^(?:https?:\/\/)?(?:www\.)?github\.com\/([^/\s]+)\/([^/\s]+)\/pull\/(\d+)(?:[/?#].*)?$/i.exec(s);
15
+ if (url) return { repo: `${url[1]}/${url[2]}`.toLowerCase(), number: Number(url[3]) };
16
+ const n = /^#?(\d+)$/.exec(s);
17
+ return n && Number(n[1]) > 0 ? { number: Number(n[1]) } : null;
18
+ }
19
+ function workOnPrPrompt(pr, instruction) {
20
+ const who = pr.author ? `@${pr.author}` : "its author";
21
+ const todo = instruction?.trim();
22
+ const upToSpeed = `Get up to speed first (gh pr view ${pr.number}, gh pr diff ${pr.number})`;
23
+ return [
24
+ `Work on PR #${pr.number} by ${who}: ${pr.title}`,
25
+ pr.url,
26
+ "",
27
+ `This worktree is on ${who}'s branch: what you commit and push lands in their PR.`,
28
+ ...todo ? [`${upToSpeed}, then:`, "", todo, ""] : [`${upToSpeed}, tell me where it stands, and wait for what I want done.`],
29
+ "Don't post on GitHub (no comments, reviews or replies)."
30
+ ].join("\n");
31
+ }
32
+
33
+ // src/core/pr/pr.ts
34
+ import { execFile } from "child_process";
35
+ function execAsync(cmd, args, cwd, timeout) {
36
+ return new Promise((resolve, reject) => {
37
+ execFile(cmd, args, { cwd, encoding: "utf-8", timeout, windowsHide: true }, (err, stdout) => {
38
+ if (err) reject(err);
39
+ else resolve(stdout ?? "");
40
+ });
41
+ });
42
+ }
43
+ function parsePrJson(stdout, repoAlias, currentUser) {
44
+ const parsed = JSON.parse(stdout);
45
+ const prs = Array.isArray(parsed) ? parsed : [];
46
+ return prs.map((pr) => toPrInfo(pr, repoAlias, currentUser));
47
+ }
48
+ function toPrInfo(pr, repoAlias, currentUser) {
49
+ {
50
+ let checksStatus = "NONE";
51
+ const checks = pr.statusCheckRollup ?? [];
52
+ if (checks.length > 0) {
53
+ const hasFailure = checks.some((c) => c.conclusion === "FAILURE" || c.conclusion === "TIMED_OUT" || c.conclusion === "CANCELLED");
54
+ const hasPending = checks.some((c) => c.status === "IN_PROGRESS" || c.status === "QUEUED" || c.status === "PENDING");
55
+ if (hasFailure) checksStatus = "FAILURE";
56
+ else if (hasPending) checksStatus = "PENDING";
57
+ else checksStatus = "SUCCESS";
58
+ }
59
+ let reviewDecision = "NONE";
60
+ if (pr.reviewDecision === "APPROVED") reviewDecision = "APPROVED";
61
+ else if (pr.reviewDecision === "CHANGES_REQUESTED") reviewDecision = "CHANGES_REQUESTED";
62
+ else if (pr.reviewDecision === "REVIEW_REQUIRED") reviewDecision = "REVIEW_REQUIRED";
63
+ let myReview = "NONE";
64
+ if (currentUser) {
65
+ const reviews = pr.reviews ?? [];
66
+ for (let i = reviews.length - 1; i >= 0; i--) {
67
+ if (reviews[i].author?.login?.toLowerCase() === currentUser.toLowerCase()) {
68
+ const state = reviews[i].state;
69
+ if (state === "APPROVED") myReview = "APPROVED";
70
+ else if (state === "CHANGES_REQUESTED") myReview = "CHANGES_REQUESTED";
71
+ else if (state === "COMMENTED") myReview = "COMMENTED";
72
+ break;
73
+ }
74
+ }
75
+ }
76
+ return {
77
+ number: pr.number ?? 0,
78
+ title: pr.title ?? "",
79
+ branch: pr.headRefName ?? "",
80
+ url: pr.url ?? "",
81
+ isDraft: pr.isDraft ?? false,
82
+ checksStatus,
83
+ reviewDecision,
84
+ myReview,
85
+ isMine: currentUser ? pr.author?.login?.toLowerCase() === currentUser.toLowerCase() : false,
86
+ conflicting: pr.mergeable === "CONFLICTING",
87
+ reviewRequested: !!currentUser && (pr.reviewRequests ?? []).some((r) => r?.login?.toLowerCase() === currentUser.toLowerCase()),
88
+ repoAlias,
89
+ author: pr.author?.login ?? "",
90
+ fork: pr.isCrossRepository === true
91
+ };
92
+ }
93
+ }
94
+ var PR_SEARCH_QUERY = `query($mine: String!, $asked: String!) {
95
+ viewer { login }
96
+ mine: search(query: $mine, type: ISSUE, first: 100) { issueCount nodes { ...pr } }
97
+ asked: search(query: $asked, type: ISSUE, first: 100) { issueCount nodes { ...pr } }
98
+ }
99
+ fragment pr on PullRequest {
100
+ number title url isDraft headRefName mergeable reviewDecision isCrossRepository
101
+ author { login }
102
+ repository { nameWithOwner }
103
+ commits(last: 1) { nodes { commit { statusCheckRollup { state } } } }
104
+ reviewRequests(first: 20) { nodes { requestedReviewer { ... on User { login } } } }
105
+ latestReviews(first: 20) { nodes { author { login } state } }
106
+ }`;
107
+ var PR_SEARCH_VARS = {
108
+ mine: "is:pr is:open archived:false author:@me",
109
+ asked: "is:pr is:open archived:false review-requested:@me"
110
+ };
111
+ function rollupAsChecks(state) {
112
+ if (state === "FAILURE" || state === "ERROR") return [{ conclusion: "FAILURE", status: "COMPLETED" }];
113
+ if (state === "PENDING" || state === "EXPECTED") return [{ conclusion: null, status: "PENDING" }];
114
+ if (state === "SUCCESS") return [{ conclusion: "SUCCESS", status: "COMPLETED" }];
115
+ return [];
116
+ }
117
+ function parsePrSearch(stdout, aliasesOf) {
118
+ const data = JSON.parse(stdout)?.data ?? {};
119
+ const user = (data.viewer?.login ?? "").trim();
120
+ const seen = /* @__PURE__ */ new Set();
121
+ const prs = [];
122
+ let incomplete = false;
123
+ for (const key of ["mine", "asked"]) {
124
+ const result = data[key];
125
+ const nodes = (result?.nodes ?? []).filter((n) => !!n && typeof n.number === "number");
126
+ if ((result?.issueCount ?? 0) > nodes.length) incomplete = true;
127
+ for (const n of nodes) {
128
+ const pr = {
129
+ ...n,
130
+ statusCheckRollup: rollupAsChecks(n.commits?.nodes?.[0]?.commit?.statusCheckRollup?.state),
131
+ reviews: (n.latestReviews?.nodes ?? []).filter((r) => !!r),
132
+ reviewRequests: (n.reviewRequests?.nodes ?? []).map((r) => r?.requestedReviewer ?? null)
133
+ };
134
+ for (const alias of aliasesOf(n.repository?.nameWithOwner ?? "")) {
135
+ const id = `${alias}#${n.number}`;
136
+ if (seen.has(id)) continue;
137
+ seen.add(id);
138
+ prs.push(toPrInfo(pr, alias, user));
139
+ }
140
+ }
141
+ }
142
+ return { prs, incomplete };
143
+ }
144
+ function readSearch(stdout, aliasesOf) {
145
+ try {
146
+ return parsePrSearch(stdout, aliasesOf);
147
+ } catch {
148
+ return null;
149
+ }
150
+ }
151
+ function githubRepoOf(configText) {
152
+ const url = originUrl(configText);
153
+ if (!url || !/(^|[@/.])github\.com[:/]/i.test(url)) return null;
154
+ return ownerRepo(url)?.toLowerCase() ?? null;
155
+ }
156
+ var PR_LIST_LIMIT = 100;
157
+ async function fetchPullRequests(repoPath, repoAlias, currentUser) {
158
+ try {
159
+ const stdout = await execAsync(
160
+ "gh",
161
+ [
162
+ "pr",
163
+ "list",
164
+ "--state",
165
+ "open",
166
+ "--json",
167
+ "number,title,headRefName,url,isDraft,statusCheckRollup,reviewDecision,reviews,reviewRequests,mergeable,author,isCrossRepository",
168
+ "--limit",
169
+ String(PR_LIST_LIMIT)
170
+ ],
171
+ repoPath,
172
+ 15e3
173
+ );
174
+ if (!stdout) return [];
175
+ return parsePrJson(stdout, repoAlias, currentUser);
176
+ } catch {
177
+ return null;
178
+ }
179
+ }
180
+ async function getCurrentUser() {
181
+ try {
182
+ const stdout = await execAsync("gh", ["api", "user", "--jq", ".login"], process.cwd(), 5e3);
183
+ return stdout.trim();
184
+ } catch {
185
+ return "";
186
+ }
187
+ }
188
+ function defaultPrListDeps() {
189
+ let user = null;
190
+ return {
191
+ search: async () => {
192
+ try {
193
+ return await execAsync(
194
+ "gh",
195
+ ["api", "graphql", "-f", `query=${PR_SEARCH_QUERY}`, "-f", `mine=${PR_SEARCH_VARS.mine}`, "-f", `asked=${PR_SEARCH_VARS.asked}`],
196
+ process.cwd(),
197
+ 2e4
198
+ );
199
+ } catch {
200
+ return null;
201
+ }
202
+ },
203
+ listRepo: async (repoPath, alias) => fetchPullRequests(repoPath, alias, await (user ??= getCurrentUser())),
204
+ gitConfig: readGitConfig
205
+ };
206
+ }
207
+ async function fetchAllPullRequests(repos, deps = defaultPrListDeps()) {
208
+ const entries = Object.entries(repos);
209
+ const onGithub = /* @__PURE__ */ new Map();
210
+ const elsewhere = [];
211
+ for (const [alias, repoPath] of entries) {
212
+ const text = deps.gitConfig(repoPath);
213
+ const gh = text ? githubRepoOf(text) : null;
214
+ if (gh) onGithub.set(gh, [...onGithub.get(gh) ?? [], alias]);
215
+ else elsewhere.push([alias, repoPath]);
216
+ }
217
+ const results = [];
218
+ const incomplete = [];
219
+ if (onGithub.size) {
220
+ const out = await deps.search();
221
+ const parsed = out ? readSearch(out, (repo) => onGithub.get(repo.toLowerCase()) ?? []) : null;
222
+ if (parsed) {
223
+ results.push(parsed.prs);
224
+ if (parsed.incomplete) incomplete.push(...[...onGithub.values()].flat());
225
+ } else {
226
+ const asked = new Set(elsewhere.map(([a]) => a));
227
+ for (const [alias, repoPath] of entries) if (!asked.has(alias)) elsewhere.push([alias, repoPath]);
228
+ }
229
+ }
230
+ const listed = await Promise.all(elsewhere.map(([alias, repoPath]) => deps.listRepo(repoPath, alias)));
231
+ results.push(...listed);
232
+ incomplete.push(...elsewhere.filter((_, i) => listed[i] === null || listed[i].length >= PR_LIST_LIMIT).map(([alias]) => alias));
233
+ const map = /* @__PURE__ */ new Map();
234
+ for (const prList of results) {
235
+ for (const pr of prList ?? []) {
236
+ const existing = map.get(pr.branch);
237
+ if (existing) {
238
+ existing.push(pr);
239
+ } else {
240
+ map.set(pr.branch, [pr]);
241
+ }
242
+ }
243
+ }
244
+ return { map, incomplete };
245
+ }
246
+
247
+ // src/core/pr/pr-start.ts
248
+ async function resolvePrToStart(input, config, target, deps = {}) {
249
+ const run = deps.run ?? defaultRunner;
250
+ const gitConfig = deps.gitConfig ?? readGitConfig;
251
+ const ref = parsePrRef(input);
252
+ if (!ref) return { ok: false, error: "Give a pull request link (https://github.com/owner/repo/pull/123), or its number with a repo." };
253
+ const repoOf = (alias2) => githubRepoOf(gitConfig(config.repos[alias2]) ?? "");
254
+ let alias;
255
+ if (ref.repo) {
256
+ const matches = Object.keys(config.repos).filter((a) => repoOf(a) === ref.repo);
257
+ if (!matches.length) return { ok: false, error: `${ref.repo} isn't one of your repos: add it first (work config add <alias> <path>).` };
258
+ const within = target ? config.groups?.[target] ?? [target] : matches;
259
+ alias = matches.find((a) => within.includes(a));
260
+ if (!alias) return { ok: false, error: `PR #${ref.number} is in ${matches.join(" / ")} (${ref.repo}), not ${target}.` };
261
+ } else {
262
+ if (!target) return { ok: false, error: `PR #${ref.number}: which repo? Give its link, or pick the repo.` };
263
+ if (config.groups?.[target])
264
+ return { ok: false, error: `${target} is a group: a PR is one repo's. Give its link, or one of the group's repos.` };
265
+ if (!config.repos[target]) return { ok: false, error: `${target} isn't one of your repos.` };
266
+ alias = target;
267
+ }
268
+ const github = repoOf(alias);
269
+ if (!github) return { ok: false, error: `${alias} isn't on github.com: work can only look up GitHub PRs.` };
270
+ const view = await run(
271
+ "gh",
272
+ [
273
+ "pr",
274
+ "view",
275
+ String(ref.number),
276
+ "--repo",
277
+ github,
278
+ "--json",
279
+ "number,title,url,headRefName,headRefOid,baseRefName,state,isCrossRepository,author,headRepositoryOwner"
280
+ ],
281
+ config.repos[alias]
282
+ );
283
+ if (view.code === 127) return { ok: false, error: "GitHub CLI (gh) not found: install it to start from a PR." };
284
+ if (view.code !== 0)
285
+ return { ok: false, error: `PR #${ref.number} in ${github}: ${view.stderr.trim().split("\n")[0] || "gh pr view failed"}` };
286
+ let pr;
287
+ try {
288
+ pr = JSON.parse(view.stdout);
289
+ } catch {
290
+ return { ok: false, error: "Couldn't read what gh said about the PR." };
291
+ }
292
+ if (pr.state && pr.state !== "OPEN") return { ok: false, error: `PR #${ref.number} is ${pr.state.toLowerCase()}.` };
293
+ if (pr.isCrossRepository) {
294
+ const owner = pr.headRepositoryOwner?.login ?? "a fork";
295
+ return {
296
+ ok: false,
297
+ error: `PR #${ref.number} comes from a fork (${owner}): its branch isn't on origin, so a session couldn't push to it.`
298
+ };
299
+ }
300
+ if (!pr.headRefName) return { ok: false, error: `PR #${ref.number}: gh didn't say its branch.` };
301
+ const stale = await localGoneOtherWay(run, config.repos[alias], pr.headRefName, pr.headRefOid);
302
+ if (stale) return { ok: false, error: stale };
303
+ return {
304
+ ok: true,
305
+ pr: {
306
+ alias,
307
+ number: pr.number ?? ref.number,
308
+ title: pr.title ?? "",
309
+ url: pr.url ?? "",
310
+ branch: pr.headRefName,
311
+ base: pr.baseRefName ?? "",
312
+ author: pr.author?.login ?? ""
313
+ }
314
+ };
315
+ }
316
+ async function localGoneOtherWay(run, repoPath, branch, headOid) {
317
+ if (!headOid) return null;
318
+ const local = await run("git", ["rev-parse", "--verify", "--quiet", `refs/heads/${branch}`], repoPath);
319
+ if (local.code !== 0) return null;
320
+ await run("git", ["fetch", "--quiet", "origin", branch], repoPath);
321
+ const contains = await run("git", ["merge-base", "--is-ancestor", headOid, `refs/heads/${branch}`], repoPath);
322
+ if (contains.code === 0) return null;
323
+ const behind = await run("git", ["merge-base", "--is-ancestor", `refs/heads/${branch}`, headOid], repoPath);
324
+ if (behind.code !== 1 || contains.code !== 1) return null;
325
+ return `Your local branch ${branch} and the PR's have gone separate ways (a force-push, or another branch of that name): rename yours (git branch -m ${branch} ${branch}-old) and try again, or go into its session as it is (work tree <repo> ${branch}).`;
326
+ }
327
+
328
+ export {
329
+ fetchAllPullRequests,
330
+ parsePrRef,
331
+ workOnPrPrompt,
332
+ resolvePrToStart
333
+ };
334
+ //# sourceMappingURL=chunk-QWIGFAKZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/pr/pr-ref.ts","../src/core/pr/pr.ts","../src/core/pr/pr-start.ts"],"sourcesContent":["/**\n * Starting a session on someone else's pull request — on their branch, so\n * what you push lands in their PR. Pure (the SPA and the demo use it): how a\n * PR is named, and what its session's Claude is told first. The lookup\n * (`gh pr view`) is `pr-start.ts`.\n */\n\nimport type { PrToStart } from '../api-types.js';\n\nexport type { PrToStart };\n\n/** A PR as you'd name it: its link (repo known), or its number (in a repo you pick). */\nexport interface PrRef {\n /** `owner/name`, lowercase, from a link. */\n repo?: string;\n number: number;\n}\n\n/** A PR link (`https://github.com/owner/repo/pull/123`, any tail), `#123` or `123`; null for anything else. */\nexport function parsePrRef(input: string): PrRef | null {\n const s = input.trim();\n const url = /^(?:https?:\\/\\/)?(?:www\\.)?github\\.com\\/([^/\\s]+)\\/([^/\\s]+)\\/pull\\/(\\d+)(?:[/?#].*)?$/i.exec(s);\n if (url) return { repo: `${url[1]}/${url[2]}`.toLowerCase(), number: Number(url[3]) };\n const n = /^#?(\\d+)$/.exec(s);\n return n && Number(n[1]) > 0 ? { number: Number(n[1]) } : null;\n}\n\n/**\n * The first message to the session's Claude: whose PR this is, that what it\n * pushes lands there, and to get up to speed — then do `instruction`, or\n * with none, say where it stands and wait for what the user wants. Nothing\n * on GitHub (no comments, reviews or replies): that's the author's\n * conversation.\n */\nexport function workOnPrPrompt(pr: Pick<PrToStart, 'number' | 'title' | 'url'> & { author?: string }, instruction?: string): string {\n const who = pr.author ? `@${pr.author}` : 'its author';\n const todo = instruction?.trim();\n const upToSpeed = `Get up to speed first (gh pr view ${pr.number}, gh pr diff ${pr.number})`;\n return [\n `Work on PR #${pr.number} by ${who}: ${pr.title}`,\n pr.url,\n '',\n `This worktree is on ${who}'s branch: what you commit and push lands in their PR.`,\n ...(todo ? [`${upToSpeed}, then:`, '', todo, ''] : [`${upToSpeed}, tell me where it stands, and wait for what I want done.`]),\n \"Don't post on GitHub (no comments, reviews or replies).\",\n ].join('\\n');\n}\n","import { execFile } from 'node:child_process';\nimport { originUrl, ownerRepo, readGitConfig } from '../worktree/repo-scan.js';\n\nexport interface PullRequestInfo {\n number: number;\n title: string;\n branch: string;\n url: string;\n isDraft: boolean;\n checksStatus: 'SUCCESS' | 'FAILURE' | 'PENDING' | 'NONE';\n reviewDecision: 'APPROVED' | 'CHANGES_REQUESTED' | 'REVIEW_REQUIRED' | 'NONE';\n /** Current user's latest review state on this PR. */\n myReview: 'APPROVED' | 'CHANGES_REQUESTED' | 'COMMENTED' | 'NONE';\n /** Whether the current user is the PR author. */\n isMine: boolean;\n /** It can't merge as it is: a conflict with its base (checks say nothing about that). */\n conflicting: boolean;\n /** Your review was asked for, by name (a team's request isn't known here). */\n reviewRequested: boolean;\n /** Repo alias this PR belongs to (for distinguishing group PRs). */\n repoAlias: string;\n /** Its author's login (absent from a server before this). */\n author?: string;\n /** It comes from a fork: its branch isn't on origin (absent from a server before this). */\n fork?: boolean;\n}\n\n/**\n * Map from branch name to array of PRs (one per repo that has a PR for that branch).\n * Single-repo sessions will have at most 1 entry; groups can have multiple.\n */\nexport type BranchPrMap = Map<string, PullRequestInfo[]>;\n\nfunction execAsync(cmd: string, args: string[], cwd: string, timeout: number): Promise<string> {\n return new Promise((resolve, reject) => {\n // `windowsHide: true` prevents a console window from flashing on\n // Windows whenever the PRs pane refreshes. Without it, opening\n // the PRs pane in `work web` triggers a visible terminal popup\n // for every configured repo's `gh pr list` invocation.\n execFile(cmd, args, { cwd, encoding: 'utf-8', timeout, windowsHide: true }, (err, stdout) => {\n if (err) reject(err);\n else resolve(stdout ?? '');\n });\n });\n}\n\n/** The fields of `gh pr list --json …` this reads; all optional — it is someone else's output. */\ninterface GhPr {\n number?: number;\n title?: string;\n headRefName?: string;\n url?: string;\n isDraft?: boolean;\n mergeable?: string;\n reviewDecision?: string;\n author?: { login?: string } | null;\n isCrossRepository?: boolean;\n statusCheckRollup?: Array<{ conclusion?: string | null; status?: string | null }> | null;\n reviews?: Array<{ author?: { login?: string } | null; state?: string }> | null;\n reviewRequests?: Array<{ login?: string } | null> | null;\n}\n\n/** `gh pr list --json …` output as work's PR rows: checks, review, yours or not, conflicts, review asked of you. Pure. */\nexport function parsePrJson(stdout: string, repoAlias: string, currentUser: string): PullRequestInfo[] {\n const parsed = JSON.parse(stdout) as unknown;\n const prs: GhPr[] = Array.isArray(parsed) ? (parsed as GhPr[]) : [];\n return prs.map((pr) => toPrInfo(pr, repoAlias, currentUser));\n}\n\n/** One PR as work's row. */\nfunction toPrInfo(pr: GhPr, repoAlias: string, currentUser: string): PullRequestInfo {\n {\n let checksStatus: PullRequestInfo['checksStatus'] = 'NONE';\n const checks = pr.statusCheckRollup ?? [];\n if (checks.length > 0) {\n const hasFailure = checks.some((c) => c.conclusion === 'FAILURE' || c.conclusion === 'TIMED_OUT' || c.conclusion === 'CANCELLED');\n const hasPending = checks.some((c) => c.status === 'IN_PROGRESS' || c.status === 'QUEUED' || c.status === 'PENDING');\n if (hasFailure) checksStatus = 'FAILURE';\n else if (hasPending) checksStatus = 'PENDING';\n else checksStatus = 'SUCCESS';\n }\n\n let reviewDecision: PullRequestInfo['reviewDecision'] = 'NONE';\n if (pr.reviewDecision === 'APPROVED') reviewDecision = 'APPROVED';\n else if (pr.reviewDecision === 'CHANGES_REQUESTED') reviewDecision = 'CHANGES_REQUESTED';\n else if (pr.reviewDecision === 'REVIEW_REQUIRED') reviewDecision = 'REVIEW_REQUIRED';\n\n // Check current user's latest review state\n let myReview: PullRequestInfo['myReview'] = 'NONE';\n if (currentUser) {\n const reviews = pr.reviews ?? [];\n for (let i = reviews.length - 1; i >= 0; i--) {\n if (reviews[i].author?.login?.toLowerCase() === currentUser.toLowerCase()) {\n const state = reviews[i].state;\n if (state === 'APPROVED') myReview = 'APPROVED';\n else if (state === 'CHANGES_REQUESTED') myReview = 'CHANGES_REQUESTED';\n else if (state === 'COMMENTED') myReview = 'COMMENTED';\n break;\n }\n }\n }\n\n return {\n number: pr.number ?? 0,\n title: pr.title ?? '',\n branch: pr.headRefName ?? '',\n url: pr.url ?? '',\n isDraft: pr.isDraft ?? false,\n checksStatus,\n reviewDecision,\n myReview,\n isMine: currentUser ? pr.author?.login?.toLowerCase() === currentUser.toLowerCase() : false,\n conflicting: pr.mergeable === 'CONFLICTING',\n reviewRequested: !!currentUser && (pr.reviewRequests ?? []).some((r) => r?.login?.toLowerCase() === currentUser.toLowerCase()),\n repoAlias,\n author: pr.author?.login ?? '',\n fork: pr.isCrossRepository === true,\n };\n }\n}\n\n/**\n * Your open PRs and the ones asking for your review, across every GitHub\n * repo, in ONE GraphQL call (about one API point). The list used to be a\n * `gh pr list` per enrolled repo every two minutes: 27 calls for 27 repos.\n * Start shows only these two kinds anyway.\n */\nexport const PR_SEARCH_QUERY = `query($mine: String!, $asked: String!) {\n viewer { login }\n mine: search(query: $mine, type: ISSUE, first: 100) { issueCount nodes { ...pr } }\n asked: search(query: $asked, type: ISSUE, first: 100) { issueCount nodes { ...pr } }\n}\nfragment pr on PullRequest {\n number title url isDraft headRefName mergeable reviewDecision isCrossRepository\n author { login }\n repository { nameWithOwner }\n commits(last: 1) { nodes { commit { statusCheckRollup { state } } } }\n reviewRequests(first: 20) { nodes { requestedReviewer { ... on User { login } } } }\n latestReviews(first: 20) { nodes { author { login } state } }\n}`;\n\n/** The search's two queries: open PRs by you, and open PRs asking you by name. */\nexport const PR_SEARCH_VARS = {\n mine: 'is:pr is:open archived:false author:@me',\n asked: 'is:pr is:open archived:false review-requested:@me',\n};\n\ninterface SearchNode extends Omit<GhPr, 'statusCheckRollup' | 'reviews' | 'reviewRequests'> {\n repository?: { nameWithOwner?: string } | null;\n commits?: { nodes?: Array<{ commit?: { statusCheckRollup?: { state?: string } | null } | null } | null> | null } | null;\n reviewRequests?: { nodes?: Array<{ requestedReviewer?: { login?: string } | null } | null> | null } | null;\n latestReviews?: { nodes?: Array<{ author?: { login?: string } | null; state?: string } | null> | null } | null;\n}\n\n/** A check rollup's one word, in the shape `gh pr list` gives (so one conversion reads both). */\nfunction rollupAsChecks(state: string | undefined): GhPr['statusCheckRollup'] {\n if (state === 'FAILURE' || state === 'ERROR') return [{ conclusion: 'FAILURE', status: 'COMPLETED' }];\n if (state === 'PENDING' || state === 'EXPECTED') return [{ conclusion: null, status: 'PENDING' }];\n if (state === 'SUCCESS') return [{ conclusion: 'SUCCESS', status: 'COMPLETED' }];\n return [];\n}\n\n/**\n * The search's answer as work's PR rows, each under the alias (or aliases)\n * enrolled for its repository; PRs of repos you haven't enrolled are left\n * out, as before. `incomplete` when a search found more than it returned. Pure.\n */\nexport function parsePrSearch(\n stdout: string,\n aliasesOf: (nameWithOwner: string) => string[],\n): { prs: PullRequestInfo[]; incomplete: boolean } {\n const data = (JSON.parse(stdout) as { data?: Record<string, unknown> } | null)?.data ?? {};\n const user = ((data.viewer as { login?: string } | undefined)?.login ?? '').trim();\n const seen = new Set<string>();\n const prs: PullRequestInfo[] = [];\n let incomplete = false;\n for (const key of ['mine', 'asked']) {\n const result = data[key] as { issueCount?: number; nodes?: Array<SearchNode | null> } | undefined;\n const nodes = (result?.nodes ?? []).filter((n): n is SearchNode => !!n && typeof n.number === 'number');\n if ((result?.issueCount ?? 0) > nodes.length) incomplete = true;\n for (const n of nodes) {\n const pr: GhPr = {\n ...n,\n statusCheckRollup: rollupAsChecks(n.commits?.nodes?.[0]?.commit?.statusCheckRollup?.state),\n reviews: (n.latestReviews?.nodes ?? []).filter((r) => !!r),\n reviewRequests: (n.reviewRequests?.nodes ?? []).map((r) => r?.requestedReviewer ?? null),\n };\n for (const alias of aliasesOf(n.repository?.nameWithOwner ?? '')) {\n const id = `${alias}#${n.number}`;\n if (seen.has(id)) continue;\n seen.add(id);\n prs.push(toPrInfo(pr, alias, user));\n }\n }\n }\n return { prs, incomplete };\n}\n\n/** parsePrSearch, or null for an answer that isn't JSON. */\nfunction readSearch(stdout: string, aliasesOf: (nameWithOwner: string) => string[]): ReturnType<typeof parsePrSearch> | null {\n try {\n return parsePrSearch(stdout, aliasesOf);\n } catch {\n return null;\n }\n}\n\n/** `owner/name` (lowercase) of a repo's origin on github.com, from its `.git/config` text; null for another host or no origin. Pure. */\nexport function githubRepoOf(configText: string): string | null {\n const url = originUrl(configText);\n if (!url || !/(^|[@/.])github\\.com[:/]/i.test(url)) return null;\n return ownerRepo(url)?.toLowerCase() ?? null;\n}\n\n/**\n * Fetch open PRs for a repo using `gh` CLI (async, non-blocking).\n */\nconst PR_LIST_LIMIT = 100;\n\n/** Open PRs for a repo; null when gh couldn't say (missing, offline, not a GitHub repo). */\nasync function fetchPullRequests(repoPath: string, repoAlias: string, currentUser: string): Promise<PullRequestInfo[] | null> {\n try {\n const stdout = await execAsync(\n 'gh',\n [\n 'pr',\n 'list',\n '--state',\n 'open',\n '--json',\n 'number,title,headRefName,url,isDraft,statusCheckRollup,reviewDecision,reviews,reviewRequests,mergeable,author,isCrossRepository',\n '--limit',\n String(PR_LIST_LIMIT),\n ],\n repoPath,\n 15000,\n );\n if (!stdout) return [];\n return parsePrJson(stdout, repoAlias, currentUser);\n } catch {\n return null;\n }\n}\n\n/**\n * Fetch PRs for all configured repos (async, non-blocking).\n * Runs all repo fetches in parallel.\n * Returns a map from branch name → array of PRs across repos.\n */\nasync function getCurrentUser(): Promise<string> {\n try {\n const stdout = await execAsync('gh', ['api', 'user', '--jq', '.login'], process.cwd(), 5000);\n return stdout.trim();\n } catch {\n return '';\n }\n}\n\n/** What fetchAllPullRequests reaches outside (tests pass fakes). */\nexport interface PrListDeps {\n /** `gh api graphql` with the search: its stdout, or null when gh couldn't. */\n search: () => Promise<string | null>;\n /** One repo the old way (`gh pr list` there): not on github.com, or the search failed. */\n listRepo: (repoPath: string, alias: string) => Promise<PullRequestInfo[] | null>;\n /** A repo's `.git/config` text, or null. */\n gitConfig: (repoPath: string) => string | null;\n}\n\nfunction defaultPrListDeps(): PrListDeps {\n let user: Promise<string> | null = null;\n return {\n search: async () => {\n try {\n return await execAsync(\n 'gh',\n ['api', 'graphql', '-f', `query=${PR_SEARCH_QUERY}`, '-f', `mine=${PR_SEARCH_VARS.mine}`, '-f', `asked=${PR_SEARCH_VARS.asked}`],\n process.cwd(),\n 20000,\n );\n } catch {\n return null;\n }\n },\n listRepo: async (repoPath, alias) => fetchPullRequests(repoPath, alias, await (user ??= getCurrentUser())),\n gitConfig: readGitConfig,\n };\n}\n\n/**\n * The PRs for the dashboard: one search for every repo on github.com (yours,\n * and those asking your review), and the old per-repo list only for repos\n * elsewhere (GitHub Enterprise, no origin) — or for all of them when the\n * search fails. Returns a map from branch name → PRs across repos.\n */\nexport async function fetchAllPullRequests(\n repos: Record<string, string>,\n deps: PrListDeps = defaultPrListDeps(),\n): Promise<{ map: BranchPrMap; incomplete: string[] }> {\n const entries = Object.entries(repos);\n const onGithub = new Map<string, string[]>(); // owner/name → its aliases\n const elsewhere: Array<[string, string]> = [];\n for (const [alias, repoPath] of entries) {\n const text = deps.gitConfig(repoPath);\n const gh = text ? githubRepoOf(text) : null;\n if (gh) onGithub.set(gh, [...(onGithub.get(gh) ?? []), alias]);\n else elsewhere.push([alias, repoPath]);\n }\n\n const results: Array<PullRequestInfo[] | null> = [];\n const incomplete: string[] = [];\n if (onGithub.size) {\n const out = await deps.search();\n const parsed = out ? readSearch(out, (repo) => onGithub.get(repo.toLowerCase()) ?? []) : null;\n if (parsed) {\n results.push(parsed.prs);\n if (parsed.incomplete) incomplete.push(...[...onGithub.values()].flat());\n } else {\n // gh can't search (an old gh, no network): the old way, repo by repo.\n const asked = new Set(elsewhere.map(([a]) => a));\n for (const [alias, repoPath] of entries) if (!asked.has(alias)) elsewhere.push([alias, repoPath]);\n }\n }\n const listed = await Promise.all(elsewhere.map(([alias, repoPath]) => deps.listRepo(repoPath, alias)));\n results.push(...listed);\n // Repos whose list may be missing PRs: gh failed, or it hit the limit.\n incomplete.push(...elsewhere.filter((_, i) => listed[i] === null || listed[i]!.length >= PR_LIST_LIMIT).map(([alias]) => alias));\n\n const map: BranchPrMap = new Map();\n for (const prList of results) {\n for (const pr of prList ?? []) {\n const existing = map.get(pr.branch);\n if (existing) {\n existing.push(pr);\n } else {\n map.set(pr.branch, [pr]);\n }\n }\n }\n\n return { map, incomplete };\n}\n","import type { WorkConfig } from '../platform/config.js';\nimport { githubRepoOf } from './pr.js';\nimport { readGitConfig } from '../worktree/repo-scan.js';\nimport { parsePrRef, type PrToStart } from './pr-ref.js';\nimport { defaultRunner, type CommandRunner } from './ship.js';\n\nexport type PrStartResult = { ok: true; pr: PrToStart } | { ok: false; error: string };\n\nexport interface PrStartDeps {\n run?: CommandRunner;\n /** A repo's `.git/config` text (tests pass their own). */\n gitConfig?: (repoPath: string) => string | null;\n}\n\n/** The fields of `gh pr view --json …` this reads; all optional — it is someone else's output. */\ninterface GhPrView {\n number?: number;\n title?: string;\n url?: string;\n headRefName?: string;\n headRefOid?: string;\n baseRefName?: string;\n state?: string;\n isCrossRepository?: boolean;\n author?: { login?: string } | null;\n headRepositoryOwner?: { login?: string } | null;\n}\n\n/**\n * Which of your repos a PR is in, and its branch: from its link (the repo\n * matched by its origin) or its number (in `target`, a repo). Refused: a\n * repo you haven't enrolled, a group as the repo of a bare number, a PR\n * that isn't open, and one from a fork — its branch isn't on origin, so the\n * session couldn't push to it (and `work tree` would make a new, empty\n * branch of that name instead).\n */\nexport async function resolvePrToStart(\n input: string,\n config: Pick<WorkConfig, 'repos' | 'groups'>,\n target?: string,\n deps: PrStartDeps = {},\n): Promise<PrStartResult> {\n const run = deps.run ?? defaultRunner;\n const gitConfig = deps.gitConfig ?? readGitConfig;\n const ref = parsePrRef(input);\n if (!ref) return { ok: false, error: 'Give a pull request link (https://github.com/owner/repo/pull/123), or its number with a repo.' };\n\n const repoOf = (alias: string) => githubRepoOf(gitConfig(config.repos[alias]) ?? '');\n let alias: string | undefined;\n if (ref.repo) {\n const matches = Object.keys(config.repos).filter((a) => repoOf(a) === ref.repo);\n if (!matches.length) return { ok: false, error: `${ref.repo} isn't one of your repos: add it first (work config add <alias> <path>).` };\n // A target named beside a link must hold it: the repo itself, or a group with it among its repos.\n const within = target ? (config.groups?.[target] ?? [target]) : matches;\n alias = matches.find((a) => within.includes(a));\n if (!alias) return { ok: false, error: `PR #${ref.number} is in ${matches.join(' / ')} (${ref.repo}), not ${target}.` };\n } else {\n if (!target) return { ok: false, error: `PR #${ref.number}: which repo? Give its link, or pick the repo.` };\n if (config.groups?.[target])\n return { ok: false, error: `${target} is a group: a PR is one repo's. Give its link, or one of the group's repos.` };\n if (!config.repos[target]) return { ok: false, error: `${target} isn't one of your repos.` };\n alias = target;\n }\n const github = repoOf(alias);\n if (!github) return { ok: false, error: `${alias} isn't on github.com: work can only look up GitHub PRs.` };\n\n const view = await run(\n 'gh',\n [\n 'pr',\n 'view',\n String(ref.number),\n '--repo',\n github,\n '--json',\n 'number,title,url,headRefName,headRefOid,baseRefName,state,isCrossRepository,author,headRepositoryOwner',\n ],\n config.repos[alias],\n );\n if (view.code === 127) return { ok: false, error: 'GitHub CLI (gh) not found: install it to start from a PR.' };\n if (view.code !== 0)\n return { ok: false, error: `PR #${ref.number} in ${github}: ${view.stderr.trim().split('\\n')[0] || 'gh pr view failed'}` };\n let pr: GhPrView;\n try {\n pr = JSON.parse(view.stdout) as GhPrView;\n } catch {\n return { ok: false, error: \"Couldn't read what gh said about the PR.\" };\n }\n if (pr.state && pr.state !== 'OPEN') return { ok: false, error: `PR #${ref.number} is ${pr.state.toLowerCase()}.` };\n if (pr.isCrossRepository) {\n const owner = pr.headRepositoryOwner?.login ?? 'a fork';\n return {\n ok: false,\n error: `PR #${ref.number} comes from a fork (${owner}): its branch isn't on origin, so a session couldn't push to it.`,\n };\n }\n if (!pr.headRefName) return { ok: false, error: `PR #${ref.number}: gh didn't say its branch.` };\n const stale = await localGoneOtherWay(run, config.repos[alias], pr.headRefName, pr.headRefOid);\n if (stale) return { ok: false, error: stale };\n return {\n ok: true,\n pr: {\n alias,\n number: pr.number ?? ref.number,\n title: pr.title ?? '',\n url: pr.url ?? '',\n branch: pr.headRefName,\n base: pr.baseRefName ?? '',\n author: pr.author?.login ?? '',\n },\n };\n}\n\n/**\n * `work tree` takes a local branch of that name over origin's, moving it\n * forward when it can. One that has gone another way than the PR (the author\n * force-pushed, or an unrelated branch of the same name) would open on the\n * wrong commits, and what's pushed from it wouldn't go. Ahead (your commits\n * on top) or behind (it fast-forwards) is fine; when git can't tell (no\n * fetch), the usual warning on entering is left to say it.\n */\nasync function localGoneOtherWay(run: CommandRunner, repoPath: string, branch: string, headOid?: string): Promise<string | null> {\n if (!headOid) return null;\n const local = await run('git', ['rev-parse', '--verify', '--quiet', `refs/heads/${branch}`], repoPath);\n if (local.code !== 0) return null;\n await run('git', ['fetch', '--quiet', 'origin', branch], repoPath);\n const contains = await run('git', ['merge-base', '--is-ancestor', headOid, `refs/heads/${branch}`], repoPath);\n if (contains.code === 0) return null;\n const behind = await run('git', ['merge-base', '--is-ancestor', `refs/heads/${branch}`, headOid], repoPath);\n if (behind.code !== 1 || contains.code !== 1) return null; // 1 = not an ancestor; anything else: git couldn't say\n return `Your local branch ${branch} and the PR's have gone separate ways (a force-push, or another branch of that name): rename yours (git branch -m ${branch} ${branch}-old) and try again, or go into its session as it is (work tree <repo> ${branch}).`;\n}\n"],"mappings":";;;;;;;;;;;AAmBO,SAAS,WAAW,OAA6B;AACtD,QAAM,IAAI,MAAM,KAAK;AACrB,QAAM,MAAM,0FAA0F,KAAK,CAAC;AAC5G,MAAI,IAAK,QAAO,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,YAAY,GAAG,QAAQ,OAAO,IAAI,CAAC,CAAC,EAAE;AACpF,QAA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AS,WAAW,UAAU,MAAM,GAAG,QAAQ;AACjE,QAAM,WAAW,MAAM,IAAI,OAAO,CAAC,cAAc,iBAAiB,SAAS,cAAc,MAAM,EAAE,GAAG,QAAQ;AAC5G,MAAI,SAAS,SAAS,EAAG,QAAO;AAChC,QAAM,SAAS,MAAM,IAAI,OAAO,CAAC,cAAc,iBAAiB,cAAc,MAAM,IAAI,OAAO,GAAG,QAAQ;AAC1G,MAAI,OAAO,SAAS,KAAK,SAAS,SAAS,EAAG,QAAO;AACrD,SAAO,qBAAqB,MAAM,qHAAqH,MAAM,IAAI,MAAM,0EAA0E,MAAM;AACzP;","names":["alias"]}
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  defaultCleanupDeps
4
- } from "./chunk-7OUBCJVJ.js";
4
+ } from "./chunk-IOO2OAUC.js";
5
5
  import {
6
6
  normPath
7
7
  } from "./chunk-AKMPF72Y.js";
@@ -11,10 +11,10 @@ import {
11
11
  import {
12
12
  buildFoldersOf,
13
13
  clearBuildFolders
14
- } from "./chunk-FOG4WG3Y.js";
14
+ } from "./chunk-CNFPZVNO.js";
15
15
  import {
16
16
  defaultRunner
17
- } from "./chunk-46UD4QBL.js";
17
+ } from "./chunk-5RRKVAIZ.js";
18
18
  import {
19
19
  loadHistory
20
20
  } from "./chunk-DUUH6FPH.js";
@@ -292,4 +292,4 @@ export {
292
292
  deleteMergedBranches,
293
293
  defaultBranchTidyDeps
294
294
  };
295
- //# sourceMappingURL=chunk-5S3ORHTD.js.map
295
+ //# sourceMappingURL=chunk-VICXQQ5X.js.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  VERSION
4
- } from "./chunk-MNZOOANK.js";
4
+ } from "./chunk-C4LRHXEB.js";
5
5
  import {
6
6
  resolveProjectTarget
7
7
  } from "./chunk-H5LKMR45.js";
@@ -162,12 +162,12 @@ function completeGroupBranches(groupName, repoAliases, current, config, done) {
162
162
 
163
163
  // src/cli.ts
164
164
  var COMMANDS = [
165
- { names: ["init"], load: async () => (await import("./init-NGL64E3F.js")).initCommand },
166
- { names: ["config"], load: async () => (await import("./config-TPYNBTVM.js")).configCommand },
167
- { names: ["tree", "t"], load: async () => (await import("./tree-O4VADOFG.js")).treeCommand },
168
- { names: ["remove"], load: async () => (await import("./remove-ADWLTOFS.js")).removeCommand },
169
- { names: ["fork"], load: async () => (await import("./fork-Y4PJNRUB.js")).forkCommand },
170
- { names: ["update"], load: async () => (await import("./update-K73WHYY3.js")).updateCommand },
165
+ { names: ["init"], load: async () => (await import("./init-J2AB37DO.js")).initCommand },
166
+ { names: ["config"], load: async () => (await import("./config-4W5MMHLU.js")).configCommand },
167
+ { names: ["tree", "t"], load: async () => (await import("./tree-RAN6SQKW.js")).treeCommand },
168
+ { names: ["remove"], load: async () => (await import("./remove-JESX7RCN.js")).removeCommand },
169
+ { names: ["fork"], load: async () => (await import("./fork-ZBEMNEPA.js")).forkCommand },
170
+ { names: ["update"], load: async () => (await import("./update-5DM5V2E3.js")).updateCommand },
171
171
  { names: ["catchup"], load: async () => (await import("./catchup-RUNKM6ZH.js")).catchupCommand },
172
172
  { names: ["snooze"], load: async () => (await import("./snooze-DBJJD6ZM.js")).snoozeCommand },
173
173
  { names: ["pin"], load: async () => (await import("./pin-TJBCJGPQ.js")).pinCommand },
@@ -186,25 +186,25 @@ var COMMANDS = [
186
186
  { names: ["status"], load: async () => (await import("./status-S3NZTRG3.js")).statusCommand },
187
187
  { names: ["recent"], load: async () => (await import("./recent-ZW4WDGCK.js")).recentCommand },
188
188
  { names: ["resume"], load: async () => (await import("./resume-SLNE75JO.js")).resumeCommand },
189
- { names: ["sessions"], load: async () => (await import("./sessions-CAOAXKKG.js")).sessionsCommand },
189
+ { names: ["sessions"], load: async () => (await import("./sessions-T6UXM2OX.js")).sessionsCommand },
190
190
  { names: ["digest"], load: async () => (await import("./digest-AXSMYBYS.js")).digestCommand },
191
- { names: ["cleanup"], load: async () => (await import("./cleanup-QLN3C3H5.js")).cleanupCommand },
192
- { names: ["overlaps"], load: async () => (await import("./overlaps-3LZXSDYZ.js")).overlapsCommand },
191
+ { names: ["cleanup"], load: async () => (await import("./cleanup-YVQOAMSK.js")).cleanupCommand },
192
+ { names: ["overlaps"], load: async () => (await import("./overlaps-SKKGH6EG.js")).overlapsCommand },
193
193
  { names: ["search"], load: async () => (await import("./search-5GK5HL4Y.js")).searchCommand },
194
- { names: ["pr"], load: async () => (await import("./pr-JM4DRRIV.js")).prCommand },
195
- { names: ["prune"], load: async () => (await import("./prune-63N3QNDR.js")).pruneCommand },
196
- { names: ["sync"], load: async () => (await import("./sync-EVPQVVWT.js")).syncCommand },
194
+ { names: ["pr"], load: async () => (await import("./pr-AC44DGJY.js")).prCommand },
195
+ { names: ["prune"], load: async () => (await import("./prune-NQOVBIFT.js")).pruneCommand },
196
+ { names: ["sync"], load: async () => (await import("./sync-E4CU4IHG.js")).syncCommand },
197
197
  { names: ["todo"], load: async () => (await import("./todo-Y2BZ65MS.js")).todoCommand },
198
198
  { names: ["hydrate"], load: async () => (await import("./hydrate-XMHHC5EG.js")).hydrateCommand },
199
199
  { names: ["diff"], load: async () => (await import("./diff-IDF3K74H.js")).diffCommand },
200
- { names: ["web"], load: async () => (await import("./web-GN2ATEXW.js")).webCommand },
200
+ { names: ["web"], load: async () => (await import("./web-EUI5U2H4.js")).webCommand },
201
201
  { names: ["hook"], load: async () => (await import("./hook-QMW5HHNP.js")).hookCommand },
202
202
  { names: ["run"], load: async () => (await import("./run-MD77Z2BV.js")).runCommand },
203
203
  { names: ["broadcast"], load: async () => (await import("./broadcast-JPVHPQ6Y.js")).broadcastCommand },
204
204
  { names: ["attach", "a"], load: async () => (await import("./attach-WLJVKXOJ.js")).attachCommand },
205
205
  { names: ["pty-host"], load: async () => (await import("./pty-host-MQSUN6EI.js")).ptyHostCommand },
206
206
  { names: ["state"], load: async () => (await import("./state-FGYNNSDP.js")).stateCommand },
207
- { names: ["move"], load: async () => (await import("./move-FFQR5TEI.js")).moveCommand },
207
+ { names: ["move"], load: async () => (await import("./move-O7NEJZQV.js")).moveCommand },
208
208
  { names: ["install-skills"], load: async () => (await import("./install-skills-2ZAHI73P.js")).installSkillsCommand },
209
209
  { names: ["completion"], load: async () => (await import("./completion-MXX5TRIV.js")).completionCommand }
210
210
  ];
@@ -305,4 +305,4 @@ export {
305
305
  commandsFor,
306
306
  run
307
307
  };
308
- //# sourceMappingURL=chunk-5653XPLJ.js.map
308
+ //# sourceMappingURL=chunk-YXTJVPOI.js.map
@@ -6,14 +6,14 @@ import {
6
6
  deleteMergedBranches,
7
7
  findMergedBranches,
8
8
  scanBuildFolders
9
- } from "./chunk-5S3ORHTD.js";
9
+ } from "./chunk-VICXQQ5X.js";
10
10
  import {
11
11
  defaultCleanupDeps
12
- } from "./chunk-7OUBCJVJ.js";
12
+ } from "./chunk-IOO2OAUC.js";
13
13
  import {
14
14
  timeAgo
15
15
  } from "./chunk-UQ35KLHH.js";
16
- import "./chunk-UNPEZODB.js";
16
+ import "./chunk-QDNCUUNQ.js";
17
17
  import "./chunk-6GCF2XWP.js";
18
18
  import {
19
19
  applyCleanup,
@@ -33,8 +33,8 @@ import "./chunk-ZSHWP2VS.js";
33
33
  import "./chunk-JJRPLNLN.js";
34
34
  import "./chunk-HUXS3VAI.js";
35
35
  import "./chunk-7NAXFBFI.js";
36
- import "./chunk-FOG4WG3Y.js";
37
- import "./chunk-46UD4QBL.js";
36
+ import "./chunk-CNFPZVNO.js";
37
+ import "./chunk-5RRKVAIZ.js";
38
38
  import "./chunk-DUUH6FPH.js";
39
39
  import "./chunk-WF57CF7A.js";
40
40
  import "./chunk-TOQZODGI.js";
@@ -189,4 +189,4 @@ var cleanupCommand = {
189
189
  export {
190
190
  cleanupCommand
191
191
  };
192
- //# sourceMappingURL=cleanup-QLN3C3H5.js.map
192
+ //# sourceMappingURL=cleanup-YVQOAMSK.js.map
@@ -3,8 +3,8 @@ import {
3
3
  COMMANDS,
4
4
  commandsFor,
5
5
  run
6
- } from "./chunk-5653XPLJ.js";
7
- import "./chunk-MNZOOANK.js";
6
+ } from "./chunk-YXTJVPOI.js";
7
+ import "./chunk-C4LRHXEB.js";
8
8
  import "./chunk-H5LKMR45.js";
9
9
  import "./chunk-7NAXFBFI.js";
10
10
  import "./chunk-RCYI7SRA.js";
@@ -15,4 +15,4 @@ export {
15
15
  commandsFor,
16
16
  run
17
17
  };
18
- //# sourceMappingURL=cli-MIBNJRX6.js.map
18
+ //# sourceMappingURL=cli-VSCHBZRS.js.map
@@ -3,15 +3,15 @@ import {
3
3
  RepoAdminError,
4
4
  enrollRepo,
5
5
  repoInventory
6
- } from "./chunk-G2O7EIKX.js";
6
+ } from "./chunk-J2ZJ2DIJ.js";
7
7
  import {
8
8
  openInEditor
9
9
  } from "./chunk-5XMXZIJS.js";
10
10
  import {
11
11
  scanForRepos
12
- } from "./chunk-BSCAA322.js";
13
- import "./chunk-FOG4WG3Y.js";
14
- import "./chunk-46UD4QBL.js";
12
+ } from "./chunk-7Z2USU3A.js";
13
+ import "./chunk-CNFPZVNO.js";
14
+ import "./chunk-5RRKVAIZ.js";
15
15
  import {
16
16
  loadHistory
17
17
  } from "./chunk-DUUH6FPH.js";
@@ -407,4 +407,4 @@ function showGroupHelp() {
407
407
  export {
408
408
  configCommand
409
409
  };
410
- //# sourceMappingURL=config-TPYNBTVM.js.map
410
+ //# sourceMappingURL=config-4W5MMHLU.js.map
@@ -4,8 +4,8 @@ import {
4
4
  forkSession,
5
5
  startSessionWithPrompt,
6
6
  uncommittedFiles
7
- } from "./chunk-52IEEAYJ.js";
8
- import "./chunk-X5EMINGT.js";
7
+ } from "./chunk-M2QL43DS.js";
8
+ import "./chunk-6HDVRMCX.js";
9
9
  import {
10
10
  attachSession
11
11
  } from "./chunk-CK2QC2UF.js";
@@ -30,7 +30,7 @@ import "./chunk-ZSHWP2VS.js";
30
30
  import "./chunk-JJRPLNLN.js";
31
31
  import "./chunk-HUXS3VAI.js";
32
32
  import "./chunk-7NAXFBFI.js";
33
- import "./chunk-46UD4QBL.js";
33
+ import "./chunk-5RRKVAIZ.js";
34
34
  import {
35
35
  findSession,
36
36
  loadHistory
@@ -117,4 +117,4 @@ var forkCommand = {
117
117
  export {
118
118
  forkCommand
119
119
  };
120
- //# sourceMappingURL=fork-Y4PJNRUB.js.map
120
+ //# sourceMappingURL=fork-ZBEMNEPA.js.map
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  DEFAULT_COPY_FILES,
9
9
  suggestFolders
10
- } from "./chunk-HIXC67MU.js";
10
+ } from "./chunk-LDCY457K.js";
11
11
  import {
12
12
  isGitRepo
13
13
  } from "./chunk-7NAXFBFI.js";
@@ -15,9 +15,9 @@ import {
15
15
  enrollProblem,
16
16
  scanForRepos,
17
17
  suggestAlias
18
- } from "./chunk-BSCAA322.js";
19
- import "./chunk-FOG4WG3Y.js";
20
- import "./chunk-46UD4QBL.js";
18
+ } from "./chunk-7Z2USU3A.js";
19
+ import "./chunk-CNFPZVNO.js";
20
+ import "./chunk-5RRKVAIZ.js";
21
21
  import "./chunk-DUUH6FPH.js";
22
22
  import "./chunk-WF57CF7A.js";
23
23
  import {
@@ -184,4 +184,4 @@ var initCommand = {
184
184
  export {
185
185
  initCommand
186
186
  };
187
- //# sourceMappingURL=init-NGL64E3F.js.map
187
+ //# sourceMappingURL=init-J2AB37DO.js.map