@staff0rd/assist 0.1213.3 → 0.1214.1

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 (86) hide show
  1. package/dist/.build-files +81 -81
  2. package/dist/{addActivity-WLEREK6S.js → addActivity-DY7S7I5F.js} +2 -2
  3. package/dist/{addPhase-QZJV42LT.js → addPhase-2XXJJRXL.js} +3 -3
  4. package/dist/{advise-5THTRMZU.js → advise-FS4GVSXP.js} +3 -3
  5. package/dist/{askCheck-5T4VYDAE.js → askCheck-IKW6PU3B.js} +7 -7
  6. package/dist/{askDesign-3CYL6V6S.js → askDesign-TS5AT5FP.js} +1 -1
  7. package/dist/{branch-E6NNTI5B.js → branch-UZXEDKQU.js} +3 -3
  8. package/dist/built-version +1 -1
  9. package/dist/{chunk-JKAJD2M6.js → chunk-2OKJ7YCH.js} +5 -5
  10. package/dist/{chunk-XBEUDQK7.js → chunk-2YZ3UJTQ.js} +2 -2
  11. package/dist/{chunk-EA3XAFFA.js → chunk-33H52QZU.js} +2 -2
  12. package/dist/{chunk-I34RLNRZ.js → chunk-5474S4TN.js} +3 -3
  13. package/dist/{chunk-STQJGU62.js → chunk-5P7K4AQE.js} +1 -1
  14. package/dist/{chunk-RDNUQGGA.js → chunk-5Y7KNNE5.js} +1 -1
  15. package/dist/{chunk-XA4T6AIZ.js → chunk-64HHCDHS.js} +2 -2
  16. package/dist/{chunk-C2TWNP4O.js → chunk-A7WO6EF6.js} +1 -1
  17. package/dist/{chunk-GPLGZH22.js → chunk-BPGCGA6K.js} +1 -1
  18. package/dist/{chunk-DU4L4EOJ.js → chunk-C6Z2IWVI.js} +19 -4
  19. package/dist/{chunk-J43DTOUI.js → chunk-CTY4AJIV.js} +1 -1
  20. package/dist/{chunk-AZPGWWRD.js → chunk-FSXMAIYV.js} +1 -1
  21. package/dist/{chunk-JFAGJ4OH.js → chunk-GBGG7HOT.js} +1 -1
  22. package/dist/{chunk-OI2TSNWI.js → chunk-HE7RXRWG.js} +1 -1
  23. package/dist/{chunk-CGRXKBLB.js → chunk-HIJ7BDJP.js} +6 -6
  24. package/dist/{chunk-WC6J2PBT.js → chunk-I3FJHKL7.js} +1 -1
  25. package/dist/{chunk-5YZRUE2O.js → chunk-JDWLCYR7.js} +1 -1
  26. package/dist/{chunk-N3FVHMLA.js → chunk-LOX4TNWP.js} +1 -1
  27. package/dist/{chunk-QJ3Q7SV7.js → chunk-LPY2WQTW.js} +1 -1
  28. package/dist/{chunk-S5G4EVHG.js → chunk-LVPIUSB6.js} +2 -2
  29. package/dist/{chunk-QPPBG6M7.js → chunk-M2UR3JHD.js} +2 -0
  30. package/dist/{chunk-RU3C3FRL.js → chunk-MVEIW5QZ.js} +2 -2
  31. package/dist/{chunk-YT265ZZN.js → chunk-N5M746ZC.js} +3 -3
  32. package/dist/{chunk-Q5L3GBM3.js → chunk-OL4GLE6S.js} +2 -2
  33. package/dist/{chunk-MVO3YZIE.js → chunk-PIU2MX64.js} +1 -1
  34. package/dist/{chunk-ZFFJBAKX.js → chunk-Q7IZYBKP.js} +1 -1
  35. package/dist/{chunk-IHHE5QX2.js → chunk-QGHBSRLY.js} +1 -1
  36. package/dist/{chunk-BLDYUHH5.js → chunk-QWCE5HUM.js} +1 -1
  37. package/dist/{chunk-ZYQSZ6FB.js → chunk-ROP5NQU7.js} +1 -1
  38. package/dist/{chunk-23OGIAPG.js → chunk-TP4K7PB2.js} +7 -7
  39. package/dist/{chunk-JRTINAVH.js → chunk-TS4DZXFR.js} +1 -1
  40. package/dist/{chunk-4RLR46O2.js → chunk-VGS5ZEQT.js} +1 -1
  41. package/dist/{chunk-HYMSYVT4.js → chunk-VRPFTMP6.js} +1 -1
  42. package/dist/{chunk-MCAP7SMF.js → chunk-VW44HB3H.js} +1 -1
  43. package/dist/{chunk-O6Q4JWN7.js → chunk-X5O7FDBB.js} +88 -34
  44. package/dist/{chunk-B64KPPKV.js → chunk-XKG5JNUN.js} +1 -1
  45. package/dist/{chunk-CT364X7G.js → chunk-YBW444MI.js} +1 -1
  46. package/dist/{chunk-EAMHKVRO.js → chunk-YT6CBKZ7.js} +1 -1
  47. package/dist/{cliHook-4D4LISRU.js → cliHook-ZH26VV66.js} +6 -6
  48. package/dist/{cliHookCheck-N7Y7LGBT.js → cliHookCheck-7SP43BCE.js} +2 -2
  49. package/dist/{codexHook-Y4COLYV6.js → codexHook-YNXCZZPE.js} +8 -8
  50. package/dist/commands/sessions/web/bundle.js +323 -323
  51. package/dist/{commit-O2KBD22J.js → commit-LHJTMN3C.js} +4 -4
  52. package/dist/{doctorNodes-S3ETLP5E.js → doctorNodes-P656ZODQ.js} +3 -3
  53. package/dist/{done-SPU5EUVS.js → done-MRMZFNXS.js} +4 -4
  54. package/dist/{editHook-M2B5PM72.js → editHook-3ZOOUXVV.js} +6 -6
  55. package/dist/{fixConflict-2GLJCN7U.js → fixConflict-2ACSK5C3.js} +4 -4
  56. package/dist/index.js +50 -50
  57. package/dist/{launchMode-BRJSCO2I.js → launchMode-34HUNGBB.js} +14 -14
  58. package/dist/{list-QPIQ7SBP.js → list-L5L7IDYR.js} +5 -5
  59. package/dist/{migrate-IYLDSCPZ.js → migrate-LAS3GAZH.js} +3 -3
  60. package/dist/{next-BDHKGIWA.js → next-FHJH4RNK.js} +13 -13
  61. package/dist/{phaseDone-IXGC6PEA.js → phaseDone-CLPYIRVD.js} +5 -5
  62. package/dist/{piHook-TP5BAMBD.js → piHook-KSGLBWGJ.js} +6 -6
  63. package/dist/{propose-YI6GRXLS.js → propose-XYTPZBC5.js} +4 -4
  64. package/dist/{refine-C5BXW2J3.js → refine-2FMOFB7C.js} +15 -15
  65. package/dist/{restartNode-4ZDU3PLZ.js → restartNode-2WN74YK4.js} +5 -5
  66. package/dist/{review-3DKFGPGK.js → review-2D36TUAO.js} +4 -4
  67. package/dist/{reviewPrComments-LCEVPQBL.js → reviewPrComments-JILBLWMX.js} +4 -4
  68. package/dist/{rewindPhase-2KIEXBDU.js → rewindPhase-QHHZFRUA.js} +8 -8
  69. package/dist/{run-VZWSXEAB.js → run-CBSRAMXF.js} +11 -11
  70. package/dist/{run-MWLHRVOF.js → run-PNWUU4NU.js} +11 -11
  71. package/dist/{runDaemon-5U25ZMIE.js → runDaemon-NR2PQHIW.js} +33 -20
  72. package/dist/{runParallelPhase-RSOTL3M3.js → runParallelPhase-XX5MRTOA.js} +7 -7
  73. package/dist/{runRefine-2XXWUSY7.js → runRefine-2RFOSI5R.js} +15 -15
  74. package/dist/{scan-5FILQLN6.js → scan-ZPPKNT7W.js} +2 -2
  75. package/dist/{schemaConfirm-YK5HAMPP.js → schemaConfirm-4JT4FBEJ.js} +2 -2
  76. package/dist/{schemaLock-TP2G7QZC.js → schemaLock-7MRLU5CS.js} +2 -2
  77. package/dist/{schemaUnlock-4UR4JREF.js → schemaUnlock-4CVDKWDY.js} +2 -2
  78. package/dist/{search-XBMTV42H.js → search-HEEUAALR.js} +5 -5
  79. package/dist/{show-ANI44V7N.js → show-HWHCYCPM.js} +3 -3
  80. package/dist/{show-QWC64PQO.js → show-U3FTUMWL.js} +3 -3
  81. package/dist/{signExtension-LR72WPEW.js → signExtension-BONJRXE2.js} +1 -1
  82. package/dist/{updateNode-HTFY2E6N.js → updateNode-MEBAXSIE.js} +5 -5
  83. package/dist/{updatePlan-CZII6UIC.js → updatePlan-U6FVT54O.js} +4 -4
  84. package/dist/{web-A33DE4XT.js → web-G5QTYYKL.js} +16 -16
  85. package/dist/{web-Z25O55QR.js → web-P4RNCC5F.js} +16 -16
  86. package/package.json +1 -1
@@ -4,8 +4,9 @@ import {
4
4
  prCliCommands,
5
5
  runInstall,
6
6
  seedWorktree,
7
+ tipSetFromRemote,
7
8
  worktreeWithBranch
8
- } from "./chunk-DU4L4EOJ.js";
9
+ } from "./chunk-C6Z2IWVI.js";
9
10
  import {
10
11
  loadPersistedSessions
11
12
  } from "./chunk-2GTVP7JI.js";
@@ -35,9 +36,8 @@ import {
35
36
  // src/commands/review/checkoutPr.ts
36
37
  import { execFileSync as execFileSync2 } from "child_process";
37
38
 
38
- // src/commands/review/clearStalePrBranch.ts
39
- var tipSetFromRemote = /^branch: (Created from|Reset to)|^fetch\b|: Fast-forward$/;
40
- function holdsLocalWork(cwd, ref) {
39
+ // src/commands/review/branchHoldsLocalWork.ts
40
+ function branchHoldsLocalWork(cwd, ref) {
41
41
  const unpushed = gitSyncOrNull(cwd, [
42
42
  "rev-list",
43
43
  "--count",
@@ -53,13 +53,16 @@ function holdsLocalWork(cwd, ref) {
53
53
  "--format=%gs",
54
54
  ref
55
55
  ]);
56
- return !lastMove || !tipSetFromRemote.test(lastMove);
56
+ const remotes = (gitSyncOrNull(cwd, ["remote"]) ?? "").split("\n");
57
+ return !lastMove || !tipSetFromRemote(lastMove, remotes);
57
58
  }
59
+
60
+ // src/commands/review/clearStalePrBranch.ts
58
61
  function clearStalePrBranch(cwd, branch) {
59
62
  const ref = `refs/heads/${branch}`;
60
63
  if (!gitSyncOrNull(cwd, ["rev-parse", "--verify", "--quiet", ref]))
61
64
  return "absent";
62
- if (holdsLocalWork(cwd, ref)) return "local-work";
65
+ if (branchHoldsLocalWork(cwd, ref)) return "local-work";
63
66
  if (!gitSyncResult(cwd, ["branch", "-D", branch]).ok) return "absent";
64
67
  appendDaemonLog(`cleared stale local pr branch ${branch} in ${cwd}`);
65
68
  return "cleared";
@@ -117,28 +120,6 @@ function prHeadBranch({
117
120
  }
118
121
  }
119
122
 
120
- // src/commands/review/reportCwdToDaemon.ts
121
- async function reportCwdToDaemon(cwd) {
122
- if (!inWebSession()) return;
123
- const sessionId = process.env.ASSIST_SESSION_ID;
124
- try {
125
- await sendToDaemon({ type: "set-cwd", sessionId, cwd });
126
- } catch (error) {
127
- appendDaemonLog(
128
- `set-cwd send failed: id=${sessionId}: ${error instanceof Error ? error.message : String(error)}`
129
- );
130
- }
131
- }
132
-
133
- // src/commands/review/worktreeHoldingBranch.ts
134
- function worktreeHoldingBranch(cwd, branch) {
135
- const listing = gitSyncOrNull(cwd, ["worktree", "list", "--porcelain"]);
136
- if (!listing) return null;
137
- const here = gitSyncOrNull(cwd, ["rev-parse", "--show-toplevel"]);
138
- const path = worktreeWithBranch(listing, branch);
139
- return path && path !== here ? path : null;
140
- }
141
-
142
123
  // src/commands/review/failCheckout.ts
143
124
  import chalk from "chalk";
144
125
  function failCheckout(number, headRef, stale, from, checkout) {
@@ -219,11 +200,75 @@ function reinstallChangedDeps(tree, before) {
219
200
  );
220
201
  }
221
202
 
222
- // src/commands/review/checkoutPr.ts
223
- function currentBranch2() {
224
- return gitSyncOrNull(process.cwd(), ["rev-parse", "--abbrev-ref", "HEAD"]);
203
+ // src/commands/review/reportCwdToDaemon.ts
204
+ async function reportCwdToDaemon(cwd) {
205
+ if (!inWebSession()) return;
206
+ const sessionId = process.env.ASSIST_SESSION_ID;
207
+ try {
208
+ await sendToDaemon({ type: "set-cwd", sessionId, cwd });
209
+ } catch (error) {
210
+ appendDaemonLog(
211
+ `set-cwd send failed: id=${sessionId}: ${error instanceof Error ? error.message : String(error)}`
212
+ );
213
+ }
214
+ }
215
+
216
+ // src/commands/review/worktreeHoldingBranch.ts
217
+ function worktreeHoldingBranch(cwd, branch) {
218
+ const listing = gitSyncOrNull(cwd, ["worktree", "list", "--porcelain"]);
219
+ if (!listing) return null;
220
+ const here = gitSyncOrNull(cwd, ["rev-parse", "--show-toplevel"]);
221
+ const path = worktreeWithBranch(listing, branch);
222
+ return path && path !== here ? path : null;
223
+ }
224
+
225
+ // src/commands/review/syncReusedCheckout.ts
226
+ import chalk2 from "chalk";
227
+ function warnDiffers(number, headRef, why) {
228
+ console.warn(
229
+ chalk2.yellow(
230
+ `${headRef} ${why}; reviewing it as it is, which may differ from PR #${number}'s head.`
231
+ )
232
+ );
233
+ appendDaemonLog(
234
+ `pr #${number} reused checkout ${process.cwd()} left as is: ${why}`
235
+ );
236
+ }
237
+ function blocker(cwd, ref) {
238
+ const status = gitSyncResult(cwd, ["status", "--porcelain"]);
239
+ if (!status.ok || status.out !== "") return "has uncommitted changes";
240
+ if (branchHoldsLocalWork(cwd, ref))
241
+ return "has local commits that are not on the remote";
242
+ return null;
243
+ }
244
+ async function syncReusedCheckout(number, headRef, source) {
245
+ const cwd = process.cwd();
246
+ const ref = `refs/heads/${headRef}`;
247
+ const why = blocker(cwd, ref);
248
+ if (why) return warnDiffers(number, headRef, why);
249
+ const before = gitSyncOrNull(cwd, ["rev-parse", "HEAD"]);
250
+ const fetch = ["fetch", "--quiet", "--update-head-ok", "origin"];
251
+ if (!gitSyncResult(cwd, [...fetch, `+${source}:${ref}`]).ok)
252
+ return warnDiffers(number, headRef, "could not be fetched");
253
+ if (!gitSyncResult(cwd, ["reset", "--quiet", "--hard"]).ok)
254
+ return warnDiffers(number, headRef, "could not be reset");
255
+ const after = gitSyncOrNull(cwd, ["rev-parse", "HEAD"]);
256
+ if (after === before) return;
257
+ console.log(`Moved ${headRef} to PR #${number}'s current head.`);
258
+ appendDaemonLog(
259
+ `pr #${number} reused checkout ${cwd} moved ${headRef} from ${before} to ${after}`
260
+ );
261
+ await reinstallChangedDeps(cwd, before);
262
+ }
263
+
264
+ // src/commands/review/moveToExistingCheckout.ts
265
+ async function moveToExistingCheckout(number, headRef, commands) {
266
+ if (!await enterExistingCheckout(number, headRef)) return false;
267
+ const source = commands.checkout.file === "az" ? `refs/heads/${headRef}` : `refs/pull/${number}/head`;
268
+ await syncReusedCheckout(number, headRef, source);
269
+ return true;
225
270
  }
226
- async function moveToExistingCheckout(number, headRef) {
271
+ async function enterExistingCheckout(number, headRef) {
227
272
  if (currentBranch2() === headRef) {
228
273
  console.log(`Already on ${headRef} for PR #${number}; reviewing here.`);
229
274
  return true;
@@ -236,12 +281,21 @@ async function moveToExistingCheckout(number, headRef) {
236
281
  await reportCwdToDaemon(holder);
237
282
  return true;
238
283
  }
284
+ function currentBranch2() {
285
+ return gitSyncOrNull(process.cwd(), ["rev-parse", "--abbrev-ref", "HEAD"]);
286
+ }
287
+
288
+ // src/commands/review/checkoutPr.ts
289
+ function currentBranch3() {
290
+ return gitSyncOrNull(process.cwd(), ["rev-parse", "--abbrev-ref", "HEAD"]);
291
+ }
239
292
  async function checkoutPr(number) {
240
293
  const commands = prCliCommands(number, process.cwd());
241
294
  const headRef = prHeadBranch(commands);
242
- if (headRef && await moveToExistingCheckout(number, headRef)) return;
295
+ if (headRef && await moveToExistingCheckout(number, headRef, commands))
296
+ return;
243
297
  await moveToPrCheckoutTree();
244
- const branch = currentBranch2();
298
+ const branch = currentBranch3();
245
299
  const from = branch === "HEAD" ? gitSyncOrNull(process.cwd(), ["rev-parse", "HEAD"]) : branch;
246
300
  const before = gitSyncOrNull(process.cwd(), ["rev-parse", "HEAD"]);
247
301
  const stale = headRef ? clearStalePrBranch(process.cwd(), headRef) : "absent";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  REVIEW_PHASE_NAME
3
- } from "./chunk-EAMHKVRO.js";
3
+ } from "./chunk-YT6CBKZ7.js";
4
4
  import {
5
5
  phaseSessions
6
6
  } from "./chunk-2R4VODAU.js";
@@ -19,7 +19,7 @@ import {
19
19
  emptyScanUsage,
20
20
  harnessAdapter,
21
21
  scanUsageTokens
22
- } from "./chunk-QPPBG6M7.js";
22
+ } from "./chunk-M2UR3JHD.js";
23
23
  import {
24
24
  inboxFeature
25
25
  } from "./chunk-LKZ7J5AK.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-N65VOEFI.js";
7
7
  import {
8
8
  previewAnswerWaitBlocker
9
- } from "./chunk-IHHE5QX2.js";
9
+ } from "./chunk-QGHBSRLY.js";
10
10
  import {
11
11
  askQuestionEnabled
12
12
  } from "./chunk-IBPSXDUB.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  decideToolOperations,
3
3
  logPolicyDeny
4
- } from "./chunk-YT265ZZN.js";
4
+ } from "./chunk-N5M746ZC.js";
5
5
  import "./chunk-CDU6M5IX.js";
6
- import "./chunk-5YZRUE2O.js";
7
- import "./chunk-ZFFJBAKX.js";
6
+ import "./chunk-JDWLCYR7.js";
7
+ import "./chunk-Q7IZYBKP.js";
8
8
  import "./chunk-ZN4PSZSA.js";
9
9
  import {
10
10
  currentExecutionIdentity
11
- } from "./chunk-HYMSYVT4.js";
11
+ } from "./chunk-VRPFTMP6.js";
12
12
  import "./chunk-ZMH7UZNP.js";
13
- import "./chunk-OI2TSNWI.js";
13
+ import "./chunk-HE7RXRWG.js";
14
14
  import "./chunk-VDXS55BC.js";
15
15
  import "./chunk-HKGCLAZ7.js";
16
16
  import "./chunk-FPWL4VRC.js";
@@ -28,7 +28,7 @@ import "./chunk-N3S5RZYX.js";
28
28
  import "./chunk-JMHNLOLN.js";
29
29
  import {
30
30
  claudeAdapter
31
- } from "./chunk-QPPBG6M7.js";
31
+ } from "./chunk-M2UR3JHD.js";
32
32
  import "./chunk-MRUIXQXS.js";
33
33
  import "./chunk-YLQAQHRT.js";
34
34
  import "./chunk-5AAHWTRQ.js";
@@ -5,9 +5,9 @@ import {
5
5
  findTruncatedReadDenyRaw,
6
6
  isApprovedRead,
7
7
  splitCompound
8
- } from "./chunk-OI2TSNWI.js";
8
+ } from "./chunk-HE7RXRWG.js";
9
9
  import "./chunk-VDXS55BC.js";
10
- import "./chunk-QPPBG6M7.js";
10
+ import "./chunk-M2UR3JHD.js";
11
11
  import "./chunk-MRUIXQXS.js";
12
12
  import "./chunk-YLQAQHRT.js";
13
13
  import "./chunk-5AAHWTRQ.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  decideToolOperations,
3
3
  logPolicyDeny
4
- } from "./chunk-YT265ZZN.js";
4
+ } from "./chunk-N5M746ZC.js";
5
5
  import "./chunk-CDU6M5IX.js";
6
- import "./chunk-5YZRUE2O.js";
7
- import "./chunk-ZFFJBAKX.js";
6
+ import "./chunk-JDWLCYR7.js";
7
+ import "./chunk-Q7IZYBKP.js";
8
8
  import "./chunk-ZN4PSZSA.js";
9
9
  import {
10
10
  currentExecutionIdentity
11
- } from "./chunk-HYMSYVT4.js";
11
+ } from "./chunk-VRPFTMP6.js";
12
12
  import "./chunk-ZMH7UZNP.js";
13
- import "./chunk-OI2TSNWI.js";
13
+ import "./chunk-HE7RXRWG.js";
14
14
  import "./chunk-VDXS55BC.js";
15
15
  import "./chunk-HKGCLAZ7.js";
16
16
  import {
@@ -20,7 +20,7 @@ import "./chunk-FPWL4VRC.js";
20
20
  import "./chunk-H63MI5HI.js";
21
21
  import {
22
22
  adviceHookPayload
23
- } from "./chunk-AZPGWWRD.js";
23
+ } from "./chunk-FSXMAIYV.js";
24
24
  import "./chunk-P7FVAGFQ.js";
25
25
  import "./chunk-XJTXAL22.js";
26
26
  import {
@@ -40,11 +40,11 @@ import "./chunk-2R4VODAU.js";
40
40
  import "./chunk-J6ULAU7G.js";
41
41
  import "./chunk-N3S5RZYX.js";
42
42
  import "./chunk-JMHNLOLN.js";
43
- import "./chunk-IHHE5QX2.js";
43
+ import "./chunk-QGHBSRLY.js";
44
44
  import "./chunk-QBDPUOLA.js";
45
45
  import {
46
46
  codexAdapter
47
- } from "./chunk-QPPBG6M7.js";
47
+ } from "./chunk-M2UR3JHD.js";
48
48
  import "./chunk-MRUIXQXS.js";
49
49
  import "./chunk-YLQAQHRT.js";
50
50
  import "./chunk-5AAHWTRQ.js";