@staff0rd/assist 0.1209.8 → 0.1209.10

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.
@@ -9,10 +9,10 @@ import {
9
9
  import {
10
10
  buildDoctorProbes,
11
11
  diagnoseLink
12
- } from "./chunk-ITQOKBXS.js";
12
+ } from "./chunk-3OBPZZ6K.js";
13
13
  import "./chunk-VABNWHSE.js";
14
14
  import "./chunk-DS2YJZZY.js";
15
- import "./chunk-5FZEIJNQ.js";
15
+ import "./chunk-Y7N7LQ4X.js";
16
16
  import {
17
17
  loadLinkSpecs
18
18
  } from "./chunk-HPBO553P.js";
@@ -30,7 +30,7 @@ import {
30
30
  detectPlatform
31
31
  } from "./chunk-E36L7ASL.js";
32
32
  import "./chunk-GIHVMELY.js";
33
- import "./chunk-NBA3Z4TA.js";
33
+ import "./chunk-A4WGQPHE.js";
34
34
  import "./chunk-7VHJE327.js";
35
35
  import "./chunk-TL6KJYLM.js";
36
36
  import "./chunk-QCKZ4DFR.js";
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  } from "./chunk-TJGF3Z72.js";
18
18
  import {
19
19
  package_default
20
- } from "./chunk-NBA3Z4TA.js";
20
+ } from "./chunk-A4WGQPHE.js";
21
21
  import {
22
22
  adviceConfigHelp,
23
23
  askQuestionConfigHelp,
@@ -93,7 +93,7 @@ import { Command } from "commander";
93
93
  // src/commands/registerRootAction.ts
94
94
  function registerRootAction(program) {
95
95
  program.option("--no-open", "Do not open a browser on startup").action(
96
- async (options) => (await import("./web-EYVVF2JJ.js")).web({
96
+ async (options) => (await import("./web-677GLJFT.js")).web({
97
97
  port: "3100",
98
98
  open: options.open
99
99
  })
@@ -646,7 +646,7 @@ function registerShowCommands(cmd) {
646
646
 
647
647
  // src/commands/registerBacklog.ts
648
648
  function registerWebCommand(cmd) {
649
- cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-FQDB4QQA.js"), "web"));
649
+ cmd.command("web").description("Open the backlog tab in the web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(lazyAction(() => import("./web-4NPV4ZXK.js"), "web"));
650
650
  }
651
651
  var registrars = [
652
652
  registerItemCommands,
@@ -676,7 +676,7 @@ function registerBacklog(program) {
676
676
  const { setBacklogDir } = await import("./getBacklogDir-K3KGVRCK.js");
677
677
  setBacklogDir(thisCommand.opts().dir);
678
678
  }).action(
679
- async (options) => (await import("./web-FQDB4QQA.js")).web({ port: "3100", open: options.open })
679
+ async (options) => (await import("./web-4NPV4ZXK.js")).web({ port: "3100", open: options.open })
680
680
  );
681
681
  for (const register of registrars) {
682
682
  register(cmd);
@@ -989,7 +989,7 @@ function registerExtension(program) {
989
989
  ).action(async (options) => {
990
990
  const { extension } = await import("./extension-YYRD5EM6.js");
991
991
  const { printExtensionUrl } = await import("./printExtensionUrl-IW2WTSNS.js");
992
- const { signExtension } = await import("./signExtension-OD33BOCP.js");
992
+ const { signExtension } = await import("./signExtension-27KZO6ML.js");
993
993
  if (options.url) return printExtensionUrl();
994
994
  return options.sign ? signExtension() : extension();
995
995
  });
@@ -2115,7 +2115,7 @@ function registerReview(program) {
2115
2115
  addReviewModeOptions(addReviewRunOptions(reviewCommand)).action(
2116
2116
  async (number, options) => {
2117
2117
  const { resolveHarness } = await import("./resolveHarness-2XXVQD4D.js");
2118
- const { review } = await import("./review-63J2YROM.js");
2118
+ const { review } = await import("./review-LCT3ZUNR.js");
2119
2119
  return review({
2120
2120
  ...options,
2121
2121
  number,
@@ -2696,7 +2696,7 @@ function registerDaemon(program) {
2696
2696
  const cmd = program.command("daemon").description("Long-lived daemon that owns web session PTYs");
2697
2697
  cmd.command("run").description(
2698
2698
  "Run the sessions daemon in the foreground (auto-spawned by assist sessions)"
2699
- ).action(lazyAction(() => import("./runDaemon-5QC62HXQ.js"), "runDaemon"));
2699
+ ).action(lazyAction(() => import("./runDaemon-OM23ZXUY.js"), "runDaemon"));
2700
2700
  cmd.command("status").description(
2701
2701
  "Show sessions daemon status, live sessions, and any stray daemon processes"
2702
2702
  ).action(lazyAction(() => import("./daemonStatus-EAZHBC6O.js"), "daemonStatus"));
@@ -2720,7 +2720,7 @@ function registerDiagnoseCommands(nodes, calledBy5) {
2720
2720
  nodes.command("doctor [name]").description(
2721
2721
  "Probe each hop of every link (or one) in order and stop at the first failure with a remediation"
2722
2722
  ).option("--json", "Output as JSON").action(
2723
- async (name, _options, command) => (await import("./doctorNodes-KRVVGZ3H.js")).doctorNodes(
2723
+ async (name, _options, command) => (await import("./doctorNodes-GZARZJLX.js")).doctorNodes(
2724
2724
  name,
2725
2725
  command.optsWithGlobals()
2726
2726
  )
@@ -2750,14 +2750,14 @@ function registerPeerActionCommands(nodes, calledBy5) {
2750
2750
  internalCommand(
2751
2751
  nodes.command("restart <name>").description(
2752
2752
  "Restart a linked node's daemon and/or web server, wait for its link to reconnect and print its version"
2753
- ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-KLNVUHES.js"), "restartNode")),
2753
+ ).option("--target <target>", "daemon, webserver or both", "both").action(lazyAction(() => import("./restartNode-YV73FMYW.js"), "restartNode")),
2754
2754
  calledBy5
2755
2755
  );
2756
2756
  internalCommand(
2757
2757
  nodes.command("update <name>").description(
2758
2758
  "Run assist update on a linked node, restart it, wait for its link to reconnect and print its version"
2759
2759
  ).action(
2760
- async (name) => (await import("./updateNode-XBXWVBTG.js")).updateNode(name)
2760
+ async (name) => (await import("./updateNode-YTGHYMUF.js")).updateNode(name)
2761
2761
  ),
2762
2762
  calledBy5
2763
2763
  );
@@ -2820,7 +2820,7 @@ function registerSetStatusCommand(cmd) {
2820
2820
  // src/commands/sessions/registerSessionsWeb.ts
2821
2821
  function registerSessionsWeb(cmd) {
2822
2822
  const webCmd = cmd.command("web").description("Start the sessions web dashboard").option("-p, --port <number>", "Port to listen on", "3100").option("--no-open", "Do not open a browser on startup").action(
2823
- async (options, command) => (await import("./web-EYVVF2JJ.js")).web({
2823
+ async (options, command) => (await import("./web-677GLJFT.js")).web({
2824
2824
  ...options,
2825
2825
  open: command.optsWithGlobals().open
2826
2826
  })
@@ -2835,7 +2835,7 @@ function registerSessionsWeb(cmd) {
2835
2835
  // src/commands/sessions/registerSessions.ts
2836
2836
  function registerSessions(program) {
2837
2837
  const cmd = program.command("sessions").description("Web dashboard for coding agent sessions").option("--no-open", "Do not open a browser on startup").action(
2838
- async (_options, command) => (await import("./web-EYVVF2JJ.js")).web({
2838
+ async (_options, command) => (await import("./web-677GLJFT.js")).web({
2839
2839
  port: "3100",
2840
2840
  open: command.optsWithGlobals().open
2841
2841
  })
@@ -2,20 +2,20 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-3B3TZFFZ.js";
6
- import "./chunk-5XORAPRE.js";
7
- import "./chunk-ITQOKBXS.js";
5
+ } from "./chunk-SIZYUJM7.js";
6
+ import "./chunk-VJPVCXTO.js";
7
+ import "./chunk-3OBPZZ6K.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-5FZEIJNQ.js";
11
+ import "./chunk-Y7N7LQ4X.js";
12
12
  import "./chunk-HPBO553P.js";
13
13
  import "./chunk-ZSIEDJSS.js";
14
14
  import "./chunk-B7VOTF5Q.js";
15
15
  import "./chunk-E36L7ASL.js";
16
16
  import "./chunk-5H7EHZ3J.js";
17
17
  import "./chunk-GIHVMELY.js";
18
- import "./chunk-NBA3Z4TA.js";
18
+ import "./chunk-A4WGQPHE.js";
19
19
  import "./chunk-TL6KJYLM.js";
20
20
  import "./chunk-QCKZ4DFR.js";
21
21
  import "./chunk-GRXFWFGP.js";
@@ -87,8 +87,15 @@ import "./chunk-IXBA6TVF.js";
87
87
  import "./chunk-3VDV7VHX.js";
88
88
  import {
89
89
  configEntryLayers,
90
- ghFailure
91
- } from "./chunk-ZABRGL2F.js";
90
+ ghFailure,
91
+ highLevelProgressPath,
92
+ highLevelReviewPath,
93
+ loadHighLevelProgress,
94
+ readJsonFile,
95
+ readStoredHighLevelProgress,
96
+ saveHighLevelProgress,
97
+ writeJsonFile
98
+ } from "./chunk-FLYNSV6L.js";
92
99
  import {
93
100
  stripAnsi
94
101
  } from "./chunk-YJ72SXVD.js";
@@ -182,9 +189,7 @@ import {
182
189
  import "./chunk-QCKZ4DFR.js";
183
190
  import "./chunk-GRXFWFGP.js";
184
191
  import "./chunk-TVQY3HPZ.js";
185
- import {
186
- getStoreDir
187
- } from "./chunk-CGYVYHMM.js";
192
+ import "./chunk-CGYVYHMM.js";
188
193
  import {
189
194
  findRepoRoot
190
195
  } from "./chunk-WXQ3EA5H.js";
@@ -527,8 +532,8 @@ function reportConfigured(result) {
527
532
  import chalk5 from "chalk";
528
533
  function savedMessage(subject) {
529
534
  const head = subject.headSha.slice(0, 7);
530
- if (subject.draft)
531
- return `Reopening the review left open for ${head} at ${subject.draft.savedAt}; pass --force to start fresh.`;
535
+ if (subject.progress)
536
+ return `Reopening the review left open for #${subject.prNumber} at ${subject.progress.updatedAt}; Start fresh in the pane discards it.`;
532
537
  if (subject.saved)
533
538
  return `Reopening the review saved for ${head} at ${subject.saved.reviewedAt} (${subject.saved.verdict}); pass --force to start fresh.`;
534
539
  return void 0;
@@ -539,7 +544,7 @@ function announceSavedReview(subject, force) {
539
544
  else if (force)
540
545
  console.log(
541
546
  chalk5.dim(
542
- `Discarding any review saved for ${subject.headSha.slice(0, 7)} and starting fresh (--force).`
547
+ `Discarding any verdict saved for ${subject.headSha.slice(0, 7)} and starting fresh (--force).`
543
548
  )
544
549
  );
545
550
  }
@@ -997,7 +1002,7 @@ function fetchHighLevelPr(prNumber, repo) {
997
1002
  }
998
1003
 
999
1004
  // src/commands/review/highLevel/gatherHighLevelSlices.ts
1000
- import { readFileSync as readFileSync2 } from "fs";
1005
+ import { readFileSync } from "fs";
1001
1006
 
1002
1007
  // src/commands/review/highLevel/formatSlicingRequest.ts
1003
1008
  var RULES = [
@@ -1057,20 +1062,6 @@ function formatSlicingRequest(hunks) {
1057
1062
  ].join("\n");
1058
1063
  }
1059
1064
 
1060
- // src/commands/review/highLevel/highLevelReviewPath.ts
1061
- import { join } from "path";
1062
- function slug(value) {
1063
- return value.replace(/[^\w.-]+/g, "-");
1064
- }
1065
- function highLevelReviewPath(repo, headRef, headSha) {
1066
- return join(
1067
- getStoreDir(),
1068
- "high-level-reviews",
1069
- slug(repo),
1070
- `${slug(headRef)}-${headSha}.json`
1071
- );
1072
- }
1073
-
1074
1065
  // src/commands/review/highLevel/highLevelSlicesPath.ts
1075
1066
  function highLevelSlicesPath(repo, headRef, headSha) {
1076
1067
  return highLevelReviewPath(repo, headRef, headSha).replace(
@@ -1114,17 +1105,6 @@ function listHighLevelHunks(files) {
1114
1105
  return files.flatMap(hunksOfFile);
1115
1106
  }
1116
1107
 
1117
- // src/commands/review/highLevel/readJsonFile.ts
1118
- import { existsSync, readFileSync } from "fs";
1119
- function readJsonFile(path) {
1120
- if (!existsSync(path)) return void 0;
1121
- try {
1122
- return JSON.parse(readFileSync(path, "utf8"));
1123
- } catch {
1124
- return void 0;
1125
- }
1126
- }
1127
-
1128
1108
  // src/commands/review/highLevel/parseHighLevelSlicesInput.ts
1129
1109
  import { z } from "zod";
1130
1110
  var slicesSchema = z.array(
@@ -1197,20 +1177,10 @@ function resolveHighLevelSlices(raw, hunks) {
1197
1177
  return { slices, ...manualTesting ? { manualTesting } : {}, warnings };
1198
1178
  }
1199
1179
 
1200
- // src/commands/review/highLevel/writeJsonFile.ts
1201
- import { mkdirSync, writeFileSync } from "fs";
1202
- import { dirname as dirname2 } from "path";
1203
- function writeJsonFile(path, data) {
1204
- mkdirSync(dirname2(path), { recursive: true });
1205
- writeFileSync(path, `${JSON.stringify(data, null, 2)}
1206
- `);
1207
- return path;
1208
- }
1209
-
1210
1180
  // src/commands/review/highLevel/gatherHighLevelSlices.ts
1211
1181
  function readSlicesFile(file) {
1212
1182
  try {
1213
- return JSON.parse(readFileSync2(file, "utf8"));
1183
+ return JSON.parse(readFileSync(file, "utf8"));
1214
1184
  } catch (error) {
1215
1185
  throw new Error(
1216
1186
  `could not read slices from ${file}: ${error instanceof Error ? error.message : String(error)}`
@@ -1493,31 +1463,18 @@ function gatherHighLevelTests(files, testPaths, repo, headSha) {
1493
1463
  );
1494
1464
  }
1495
1465
 
1496
- // src/commands/review/highLevel/highLevelDraftPath.ts
1497
- function highLevelDraftPath(repo, headRef, headSha) {
1498
- return highLevelReviewPath(repo, headRef, headSha).replace(
1499
- /\.json$/,
1500
- ".draft.json"
1501
- );
1502
- }
1503
-
1504
- // src/commands/review/highLevel/loadHighLevelDraft.ts
1505
- function loadHighLevelDraft(repo, headRef, headSha) {
1506
- return readJsonFile(highLevelDraftPath(repo, headRef, headSha));
1507
- }
1508
-
1509
1466
  // src/commands/review/highLevel/loadHighLevelReview.ts
1510
1467
  function loadHighLevelReview(repo, headRef, headSha) {
1511
1468
  return readJsonFile(highLevelReviewPath(repo, headRef, headSha));
1512
1469
  }
1513
1470
 
1514
1471
  // src/commands/review/highLevel/loadReopenedReview.ts
1515
- function loadReopenedReview(repo, headRef, headSha) {
1516
- const saved = loadHighLevelReview(repo, headRef, headSha);
1517
- const draft = loadHighLevelDraft(repo, headRef, headSha);
1472
+ function loadReopenedReview({ repo, prNumber, headRef, headSha }, force) {
1473
+ const saved = force ? void 0 : loadHighLevelReview(repo, headRef, headSha);
1474
+ const progress = loadHighLevelProgress(repo, prNumber, headSha);
1518
1475
  return {
1519
1476
  ...saved ? { saved } : {},
1520
- ...draft ? { draft } : {}
1477
+ ...progress ? { progress } : {}
1521
1478
  };
1522
1479
  }
1523
1480
 
@@ -1541,12 +1498,12 @@ function selectCriticalDiffs(files, criticalPaths) {
1541
1498
  // src/commands/review/highLevel/gatherHighLevelSubject.ts
1542
1499
  function gatherHighLevelSubject(prNumber, force, slicing) {
1543
1500
  const { org, repo } = getRepoInfo();
1544
- const slug2 = `${org}/${repo}`;
1501
+ const slug = `${org}/${repo}`;
1545
1502
  const pr = fetchHighLevelPr(prNumber, { org, repo });
1546
1503
  const config = resolveHighLevelConfig(loadConfig());
1547
- const fetched = fetchHighLevelFiles(prNumber, slug2);
1504
+ const fetched = fetchHighLevelFiles(prNumber, slug);
1548
1505
  const files = capHighLevelPatches(fetched, config.criticalPaths);
1549
- const head = { repo: slug2, headRef: pr.headRef, headSha: pr.headSha };
1506
+ const head = { repo: slug, headRef: pr.headRef, headSha: pr.headSha };
1550
1507
  const sliced = slicing ? gatherHighLevelSlices({ ...head, prNumber }, files, slicing) : void 0;
1551
1508
  return {
1552
1509
  ...head,
@@ -1562,11 +1519,11 @@ function gatherHighLevelSubject(prNumber, force, slicing) {
1562
1519
  structure: buildHighLevelStructure(files),
1563
1520
  criticalDiffs: selectCriticalDiffs(files, config.criticalPaths),
1564
1521
  criticalPaths: config.criticalPaths,
1565
- tests: gatherHighLevelTests(fetched, config.testPaths, slug2, pr.headSha),
1522
+ tests: gatherHighLevelTests(fetched, config.testPaths, slug, pr.headSha),
1566
1523
  testPaths: config.testPaths,
1567
1524
  collapsedPaths: config.collapsedPaths,
1568
1525
  ...sliced,
1569
- ...force ? {} : loadReopenedReview(slug2, pr.headRef, pr.headSha)
1526
+ ...loadReopenedReview({ ...head, prNumber }, force)
1570
1527
  };
1571
1528
  }
1572
1529
 
@@ -1615,19 +1572,6 @@ function highLevelProgress(checks, decision, slices) {
1615
1572
  };
1616
1573
  }
1617
1574
 
1618
- // src/commands/review/highLevel/buildHighLevelDraft.ts
1619
- function buildHighLevelDraft(subject, decision) {
1620
- const { checks, repo, prNumber, headRef, headSha } = subject;
1621
- return {
1622
- repo,
1623
- prNumber,
1624
- headRef,
1625
- headSha,
1626
- savedAt: (/* @__PURE__ */ new Date()).toISOString(),
1627
- ...highLevelProgress(checks, decision, subject.slices)
1628
- };
1629
- }
1630
-
1631
1575
  // src/commands/review/highLevel/highLevelReviewEvent.ts
1632
1576
  function highLevelReviewEvent(decision) {
1633
1577
  if (decision.reviewEvent) return decision.reviewEvent;
@@ -1653,30 +1597,41 @@ function buildHighLevelRecord(subject, decision) {
1653
1597
  };
1654
1598
  }
1655
1599
 
1656
- // src/commands/review/highLevel/clearHighLevelDraft.ts
1600
+ // src/commands/review/highLevel/discardHighLevelProgress.ts
1657
1601
  import { rmSync } from "fs";
1658
- function clearHighLevelDraft(repo, headRef, headSha) {
1659
- rmSync(highLevelDraftPath(repo, headRef, headSha), { force: true });
1660
- }
1661
1602
 
1662
- // src/commands/review/highLevel/discardHighLevelProgress.ts
1663
- import { rmSync as rmSync2 } from "fs";
1664
- function discardHighLevelProgress(repo, headRef, headSha) {
1665
- clearHighLevelDraft(repo, headRef, headSha);
1666
- rmSync2(highLevelReviewPath(repo, headRef, headSha), { force: true });
1603
+ // src/commands/review/highLevel/progressStore/clearHighLevelProgress.ts
1604
+ var CLEAR_REASONS = /* @__PURE__ */ new Set(["verdict", "restart"]);
1605
+ var KEPT_CLOSED_REQUESTS = 20;
1606
+ function clearHighLevelProgress(repo, prNumber, reason, requestId) {
1607
+ if (!CLEAR_REASONS.has(reason))
1608
+ throw new Error(
1609
+ `High-level review progress is cleared only by a verdict or a restart, not \`${reason}\`.`
1610
+ );
1611
+ const previous = readStoredHighLevelProgress(repo, prNumber)?.closedRequests ?? [];
1612
+ writeJsonFile(highLevelProgressPath(repo, prNumber), {
1613
+ repo,
1614
+ prNumber,
1615
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString(),
1616
+ closedRequests: [...previous, ...requestId ? [requestId] : []].slice(
1617
+ -KEPT_CLOSED_REQUESTS
1618
+ ),
1619
+ items: [],
1620
+ reviewComments: []
1621
+ });
1667
1622
  }
1668
1623
 
1669
- // src/commands/review/highLevel/saveHighLevelDraft.ts
1670
- function saveHighLevelDraft(draft) {
1671
- return writeJsonFile(
1672
- highLevelDraftPath(draft.repo, draft.headRef, draft.headSha),
1673
- draft
1674
- );
1624
+ // src/commands/review/highLevel/discardHighLevelProgress.ts
1625
+ function discardHighLevelProgress(subject, requestId) {
1626
+ clearHighLevelProgress(subject.repo, subject.prNumber, "restart", requestId);
1627
+ rmSync(highLevelReviewPath(subject.repo, subject.headRef, subject.headSha), {
1628
+ force: true
1629
+ });
1675
1630
  }
1676
1631
 
1677
1632
  // src/commands/review/highLevel/highLevelPreviewMetadata.ts
1678
1633
  function reopenedFrom(subject) {
1679
- const at = subject.draft?.savedAt ?? subject.saved?.reviewedAt;
1634
+ const at = subject.progress?.updatedAt ?? subject.saved?.reviewedAt;
1680
1635
  return at ? [{ label: "Reopened from", value: at }] : [];
1681
1636
  }
1682
1637
  function highLevelPreviewMetadata(subject) {
@@ -1704,7 +1659,7 @@ function highLevelPreviewPayload(subject) {
1704
1659
  slices,
1705
1660
  manualTesting,
1706
1661
  saved,
1707
- draft
1662
+ progress
1708
1663
  } = subject;
1709
1664
  return {
1710
1665
  repo,
@@ -1721,7 +1676,7 @@ function highLevelPreviewPayload(subject) {
1721
1676
  ...slices ? { slices } : {},
1722
1677
  ...manualTesting ? { manualTesting } : {},
1723
1678
  ...saved ? { saved } : {},
1724
- ...draft ? { draft } : {}
1679
+ ...progress ? { progress } : {}
1725
1680
  };
1726
1681
  }
1727
1682
 
@@ -1910,11 +1865,12 @@ function submitHighLevelReview(record) {
1910
1865
  // src/commands/review/highLevel/openHighLevelOverlay.ts
1911
1866
  async function openHighLevelOverlay(sessionId2, subject, onRestart = async () => {
1912
1867
  }) {
1868
+ const requestId = randomUUID();
1913
1869
  const decision = await awaitPreviewApproval(
1914
1870
  "High-level review",
1915
1871
  {
1916
1872
  sessionId: sessionId2,
1917
- requestId: randomUUID(),
1873
+ requestId,
1918
1874
  title: `${subject.repo}#${subject.prNumber} \u2014 ${subject.title}`,
1919
1875
  body: JSON.stringify(highLevelPreviewPayload(subject)),
1920
1876
  prNumber: subject.prNumber,
@@ -1924,12 +1880,16 @@ async function openHighLevelOverlay(sessionId2, subject, onRestart = async () =>
1924
1880
  { rejectIsOutcome: true }
1925
1881
  );
1926
1882
  if (decision.restart) {
1927
- discardHighLevelProgress(subject.repo, subject.headRef, subject.headSha);
1883
+ discardHighLevelProgress(subject, requestId);
1928
1884
  await onRestart();
1929
1885
  return void 0;
1930
1886
  }
1931
1887
  if (decision.dismissed) {
1932
- saveHighLevelDraft(buildHighLevelDraft(subject, decision));
1888
+ if (decision.checklist)
1889
+ saveHighLevelProgress(
1890
+ subject,
1891
+ highLevelProgress(subject.checks, decision, subject.slices)
1892
+ );
1933
1893
  console.log(
1934
1894
  "Review closed without a verdict. Your progress is kept for when you reopen it; nothing was posted."
1935
1895
  );
@@ -1937,7 +1897,7 @@ async function openHighLevelOverlay(sessionId2, subject, onRestart = async () =>
1937
1897
  }
1938
1898
  const record = buildHighLevelRecord(subject, decision);
1939
1899
  saveHighLevelReview(record);
1940
- clearHighLevelDraft(record.repo, record.headRef, record.headSha);
1900
+ clearHighLevelProgress(record.repo, record.prNumber, "verdict", requestId);
1941
1901
  console.log(`Verdict: ${record.verdict}`);
1942
1902
  submitHighLevelReview(record);
1943
1903
  return record;
@@ -2236,8 +2196,8 @@ function renderEntry(entry, frame) {
2236
2196
  import { format } from "util";
2237
2197
 
2238
2198
  // src/commands/review/createReviewLogSink.ts
2239
- import { appendFileSync, mkdirSync as mkdirSync2 } from "fs";
2240
- import { join as join2 } from "path";
2199
+ import { appendFileSync, mkdirSync } from "fs";
2200
+ import { join } from "path";
2241
2201
  var LOG_FILE = "review.log";
2242
2202
  function createReviewLogSink() {
2243
2203
  let logPath;
@@ -2253,8 +2213,8 @@ function createReviewLogSink() {
2253
2213
  `);
2254
2214
  },
2255
2215
  attach(reviewDir) {
2256
- mkdirSync2(reviewDir, { recursive: true });
2257
- logPath = join2(reviewDir, LOG_FILE);
2216
+ mkdirSync(reviewDir, { recursive: true });
2217
+ logPath = join(reviewDir, LOG_FILE);
2258
2218
  const lines = [
2259
2219
  "",
2260
2220
  `=== ${(/* @__PURE__ */ new Date()).toISOString()} ===`,
@@ -2593,10 +2553,10 @@ async function runReviewers(reviewers, context) {
2593
2553
  }
2594
2554
 
2595
2555
  // src/commands/review/synthesiseAfterReviewers.ts
2596
- import { existsSync as existsSync2, unlinkSync } from "fs";
2556
+ import { existsSync, unlinkSync } from "fs";
2597
2557
 
2598
2558
  // src/commands/review/synthesise.ts
2599
- import { readFileSync as readFileSync3 } from "fs";
2559
+ import { readFileSync as readFileSync2 } from "fs";
2600
2560
 
2601
2561
  // src/commands/review/carriedUnanchoredFindings.ts
2602
2562
  function carriedUnanchoredFindings(unanchored) {
@@ -2798,7 +2758,7 @@ Files:
2798
2758
 
2799
2759
  // src/commands/review/synthesise.ts
2800
2760
  function printSummary(synthesisPath) {
2801
- const markdown = readFileSync3(synthesisPath, "utf8");
2761
+ const markdown = readFileSync2(synthesisPath, "utf8");
2802
2762
  console.log("");
2803
2763
  console.log(buildReviewSummary(markdown));
2804
2764
  console.log("");
@@ -2827,7 +2787,7 @@ async function synthesise(paths, options) {
2827
2787
  // src/commands/review/synthesiseAfterReviewers.ts
2828
2788
  async function synthesiseAfterReviewers(input) {
2829
2789
  const { paths, failures } = input;
2830
- if (input.anyFresh && existsSync2(paths.synthesisPath)) {
2790
+ if (input.anyFresh && existsSync(paths.synthesisPath)) {
2831
2791
  unlinkSync(paths.synthesisPath);
2832
2792
  }
2833
2793
  const synthesisResult = await synthesise(paths, { multi: input.multi });
@@ -3041,9 +3001,9 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
3041
3001
 
3042
3002
  // src/commands/review/buildReviewPaths.ts
3043
3003
  import { homedir } from "os";
3044
- import { basename as basename2, join as join3 } from "path";
3004
+ import { basename as basename2, join as join2 } from "path";
3045
3005
  function buildReviewPaths(repoRoot, key) {
3046
- const reviewDir = join3(
3006
+ const reviewDir = join2(
3047
3007
  homedir(),
3048
3008
  ".assist",
3049
3009
  "reviews",
@@ -3052,10 +3012,10 @@ function buildReviewPaths(repoRoot, key) {
3052
3012
  );
3053
3013
  return {
3054
3014
  reviewDir,
3055
- requestPath: join3(reviewDir, "request.md"),
3056
- claudePath: join3(reviewDir, "claude.md"),
3057
- codexPath: join3(reviewDir, "codex.md"),
3058
- synthesisPath: join3(reviewDir, "synthesis.md")
3015
+ requestPath: join2(reviewDir, "request.md"),
3016
+ claudePath: join2(reviewDir, "claude.md"),
3017
+ codexPath: join2(reviewDir, "codex.md"),
3018
+ synthesisPath: join2(reviewDir, "synthesis.md")
3059
3019
  };
3060
3020
  }
3061
3021
 
@@ -3094,16 +3054,16 @@ function fetchExistingComments() {
3094
3054
  }
3095
3055
 
3096
3056
  // src/commands/review/prepareReviewDir.ts
3097
- import { existsSync as existsSync3, mkdirSync as mkdirSync3, unlinkSync as unlinkSync2, writeFileSync as writeFileSync2 } from "fs";
3057
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, unlinkSync as unlinkSync2, writeFileSync } from "fs";
3098
3058
  function clearReviewFiles(paths) {
3099
3059
  for (const path of [paths.claudePath, paths.codexPath, paths.synthesisPath]) {
3100
- if (existsSync3(path)) unlinkSync2(path);
3060
+ if (existsSync2(path)) unlinkSync2(path);
3101
3061
  }
3102
3062
  }
3103
3063
  function prepareReviewDir(paths, requestBody, force) {
3104
- mkdirSync3(paths.reviewDir, { recursive: true });
3064
+ mkdirSync2(paths.reviewDir, { recursive: true });
3105
3065
  if (force) clearReviewFiles(paths);
3106
- writeFileSync2(paths.requestPath, requestBody);
3066
+ writeFileSync(paths.requestPath, requestBody);
3107
3067
  }
3108
3068
 
3109
3069
  // src/commands/review/setupReviewDir.ts
@@ -3371,7 +3331,7 @@ function postSynthesisSession(modes) {
3371
3331
  }
3372
3332
 
3373
3333
  // src/commands/review/postReviewToPr.ts
3374
- import { readFileSync as readFileSync4 } from "fs";
3334
+ import { readFileSync as readFileSync3 } from "fs";
3375
3335
 
3376
3336
  // src/commands/review/chainAddressComments.ts
3377
3337
  function chainAddressComments(prNumber, announce, harness) {
@@ -3726,7 +3686,7 @@ async function confirmPost(prNumber, work, options) {
3726
3686
  return promptConfirm(`Post ${work} to PR #${prNumber}?`, false);
3727
3687
  }
3728
3688
  async function postFindingsToPr(prInfo, synthesisPath, options) {
3729
- const markdown = readFileSync4(synthesisPath, "utf8");
3689
+ const markdown = readFileSync3(synthesisPath, "utf8");
3730
3690
  const { inDiff, unanchored } = selectPostableFindings(markdown, prInfo);
3731
3691
  const carried = carriedUnanchoredFindings(unanchored);
3732
3692
  if (inDiff.length === 0 && carried.length === 0) return NOTHING_POSTED;
@@ -127,7 +127,7 @@ import {
127
127
  isHello,
128
128
  linkVersionCheck,
129
129
  negotiateProtocol
130
- } from "./chunk-5FZEIJNQ.js";
130
+ } from "./chunk-Y7N7LQ4X.js";
131
131
  import {
132
132
  loadLinkSpecs
133
133
  } from "./chunk-HPBO553P.js";
@@ -268,7 +268,7 @@ import {
268
268
  import "./chunk-APZ6ZTDA.js";
269
269
  import "./chunk-DZBQRJLT.js";
270
270
  import "./chunk-D7UZLH36.js";
271
- import "./chunk-NBA3Z4TA.js";
271
+ import "./chunk-A4WGQPHE.js";
272
272
  import "./chunk-EW2ZM2PC.js";
273
273
  import "./chunk-MYH4MQX2.js";
274
274
  import {
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-W7TRZLEM.js";
10
10
  import {
11
11
  package_default
12
- } from "./chunk-NBA3Z4TA.js";
12
+ } from "./chunk-A4WGQPHE.js";
13
13
 
14
14
  // src/commands/extension/signExtension.ts
15
15
  import { rm as rm2 } from "fs/promises";
@@ -2,13 +2,13 @@ import {
2
2
  linkStatus,
3
3
  postToPeer,
4
4
  startPeerAction
5
- } from "./chunk-3B3TZFFZ.js";
6
- import "./chunk-5XORAPRE.js";
7
- import "./chunk-ITQOKBXS.js";
5
+ } from "./chunk-SIZYUJM7.js";
6
+ import "./chunk-VJPVCXTO.js";
7
+ import "./chunk-3OBPZZ6K.js";
8
8
  import "./chunk-VABNWHSE.js";
9
9
  import "./chunk-DS2YJZZY.js";
10
10
  import "./chunk-4HKB2TAG.js";
11
- import "./chunk-5FZEIJNQ.js";
11
+ import "./chunk-Y7N7LQ4X.js";
12
12
  import "./chunk-HPBO553P.js";
13
13
  import "./chunk-ZSIEDJSS.js";
14
14
  import "./chunk-B7VOTF5Q.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-A7ONLVZD.js";
20
20
  import "./chunk-GIHVMELY.js";
21
21
  import "./chunk-2EW62DM5.js";
22
- import "./chunk-NBA3Z4TA.js";
22
+ import "./chunk-A4WGQPHE.js";
23
23
  import "./chunk-TL6KJYLM.js";
24
24
  import "./chunk-QCKZ4DFR.js";
25
25
  import "./chunk-GRXFWFGP.js";