@staff0rd/assist 0.1056.0 → 0.1058.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.1056.0",
9
+ version: "0.1058.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -866,6 +866,7 @@ var LEGACY_SESSIONS_KEYS = [
866
866
  "askQuestionAutoApprove"
867
867
  ];
868
868
  var LEGACY_WORKTREE_KEYS = ["watcher", "includeDrafts"];
869
+ var LEGACY_DEVLOG_KEYS = ["skip"];
869
870
  function withoutKeys(value, keys) {
870
871
  if (!value || typeof value !== "object") return value;
871
872
  const rest = { ...value };
@@ -896,6 +897,8 @@ function stripLegacyConfigKeys(config) {
896
897
  stripped.sessions = withoutKeys(stripped.sessions, LEGACY_SESSIONS_KEYS);
897
898
  if (stripped.worktree)
898
899
  stripped.worktree = withoutKeys(stripped.worktree, LEGACY_WORKTREE_KEYS);
900
+ if (stripped.devlog)
901
+ stripped.devlog = withoutKeys(stripped.devlog, LEGACY_DEVLOG_KEYS);
899
902
  return stripped;
900
903
  }
901
904
 
@@ -1224,8 +1227,9 @@ var assistConfigShape = {
1224
1227
  }).optional(),
1225
1228
  devlog: z6.strictObject({
1226
1229
  name: z6.string().optional(),
1230
+ dir: z6.string().optional(),
1227
1231
  ignore: z6.array(z6.string()).optional(),
1228
- skip: z6.record(z6.string(), z6.array(z6.string())).optional()
1232
+ skipWeeks: z6.array(z6.string().regex(/^\d{4}-W\d{2}$/, "Use YYYY-Www")).optional()
1229
1233
  }).optional(),
1230
1234
  docs: z6.strictObject({
1231
1235
  refreshAfter: z6.number().int().positive().optional()
@@ -6389,6 +6393,11 @@ var denyConfigHelp = [
6389
6393
 
6390
6394
  // src/commands/devlog/devlogConfigHelp.ts
6391
6395
  var devlogConfigHelp = [
6396
+ {
6397
+ key: "devlog.dir",
6398
+ setter: "assist config set devlog.dir ~/git/blog/src/content/dev",
6399
+ note: "folder holding <repo>/<yyyy>-wNN.md dev entries"
6400
+ },
6392
6401
  {
6393
6402
  key: "devlog.name",
6394
6403
  setter: "assist config set devlog.name my-repo",
@@ -6400,9 +6409,9 @@ var devlogConfigHelp = [
6400
6409
  note: "globs excluded when grouping commits"
6401
6410
  },
6402
6411
  {
6403
- key: "devlog.skip",
6412
+ key: "devlog.skipWeeks",
6404
6413
  setter: "assist devlog skip 2026-W33",
6405
- note: "ISO weeks (YYYY-Www, per repo) that get no dev entry"
6414
+ note: "ISO weeks (YYYY-Www) that get no dev entry; skip writes repo (db)"
6406
6415
  }
6407
6416
  ];
6408
6417
 
@@ -26630,43 +26639,10 @@ function printWeekHeader(week, state) {
26630
26639
  );
26631
26640
  }
26632
26641
 
26633
- // src/commands/devlog/loadBlogSkipWeeks.ts
26634
- import { homedir as homedir24 } from "os";
26635
- import { join as join67 } from "path";
26636
- var BLOG_REPO_ROOT = join67(homedir24(), "git/blog");
26637
- function loadBlogSkipWeeks(repoName) {
26638
- const config = loadRawYaml(join67(BLOG_REPO_ROOT, "assist.yml"));
26639
- const devlog = config.devlog;
26640
- const skip3 = devlog?.skip;
26641
- return new Set(skip3?.[repoName]);
26642
- }
26643
-
26644
26642
  // src/commands/devlog/loadDevEntry.ts
26645
26643
  import { readFileSync as readFileSync37 } from "fs";
26646
- import { join as join69 } from "path";
26644
+ import { join as join67 } from "path";
26647
26645
  import { parse as parseYaml3 } from "yaml";
26648
-
26649
- // src/commands/devlog/loadDevWeeks.ts
26650
- import { readdirSync as readdirSync10 } from "fs";
26651
- import { join as join68 } from "path";
26652
- var DEV_DIR = join68(BLOG_REPO_ROOT, "src/content/dev");
26653
- var DEV_FILENAME_PATTERN = /^(\d{4})-w(\d{2})\.md$/;
26654
- function parseDevWeekFilename(filename) {
26655
- const match = filename.match(DEV_FILENAME_PATTERN);
26656
- return match ? `${match[1]}-W${match[2]}` : null;
26657
- }
26658
- function readFilenames(dir) {
26659
- try {
26660
- return readdirSync10(dir);
26661
- } catch {
26662
- return [];
26663
- }
26664
- }
26665
- function loadDevWeeks(repoName, devDir = DEV_DIR) {
26666
- return readFilenames(join68(devDir, repoName)).map(parseDevWeekFilename).filter((week) => week !== null).sort();
26667
- }
26668
-
26669
- // src/commands/devlog/loadDevEntry.ts
26670
26646
  function asString(value) {
26671
26647
  return value === void 0 || value === null ? null : String(value);
26672
26648
  }
@@ -26678,8 +26654,8 @@ function readFrontmatter(path109) {
26678
26654
  return null;
26679
26655
  }
26680
26656
  }
26681
- function loadDevEntry(repoName, week, devDir = DEV_DIR) {
26682
- const path109 = join69(devDir, repoName, `${week.toLowerCase()}.md`);
26657
+ function loadDevEntry(repoName, week, devDir) {
26658
+ const path109 = join67(devDir, repoName, `${week.toLowerCase()}.md`);
26683
26659
  const frontmatter2 = readFrontmatter(path109);
26684
26660
  if (!frontmatter2) return null;
26685
26661
  const versions = frontmatter2.versions;
@@ -26697,6 +26673,18 @@ function localToday() {
26697
26673
  return `${now.getFullYear()}-${pad3(now.getMonth() + 1)}-${pad3(now.getDate())}`;
26698
26674
  }
26699
26675
 
26676
+ // src/commands/devlog/resolveDevDir.ts
26677
+ import chalk159 from "chalk";
26678
+ function resolveDevDir() {
26679
+ const dir = loadConfig().devlog?.dir?.trim();
26680
+ if (!dir) {
26681
+ const setter = devlogConfigHelp.find((e) => e.key === "devlog.dir")?.setter;
26682
+ console.error(chalk159.red(`devlog.dir is not set. Set it with: ${setter}`));
26683
+ process.exit(1);
26684
+ }
26685
+ return expandTilde(dir);
26686
+ }
26687
+
26700
26688
  // src/commands/devlog/next/fetchCommitsAfter.ts
26701
26689
  import { execFileSync as execFileSync7 } from "child_process";
26702
26690
  var RECORD_SEPARATOR = "";
@@ -26760,17 +26748,17 @@ function findTargetWeek(weeks, { lastWeek, skip: skip3, today }) {
26760
26748
  }
26761
26749
 
26762
26750
  // src/commands/devlog/shared.ts
26763
- import chalk159 from "chalk";
26751
+ import chalk160 from "chalk";
26764
26752
 
26765
26753
  // src/shared/getRepoName.ts
26766
26754
  import { existsSync as existsSync57, readFileSync as readFileSync38 } from "fs";
26767
- import { basename as basename17, join as join70 } from "path";
26755
+ import { basename as basename17, join as join68 } from "path";
26768
26756
  function getRepoName() {
26769
26757
  const config = loadConfig();
26770
26758
  if (config.devlog?.name) {
26771
26759
  return config.devlog.name;
26772
26760
  }
26773
- const packageJsonPath = join70(process.cwd(), "package.json");
26761
+ const packageJsonPath = join68(process.cwd(), "package.json");
26774
26762
  if (existsSync57(packageJsonPath)) {
26775
26763
  try {
26776
26764
  const content = readFileSync38(packageJsonPath, "utf8");
@@ -26788,21 +26776,21 @@ function getRepoName() {
26788
26776
  function printCommitsWithFiles(commits2, ignore3, verbose) {
26789
26777
  for (const commit2 of commits2) {
26790
26778
  console.log(
26791
- ` ${chalk159.dim(commit2.date)} ${chalk159.yellow(commit2.hash)} ${commit2.message}`
26779
+ ` ${chalk160.dim(commit2.date)} ${chalk160.yellow(commit2.hash)} ${commit2.message}`
26792
26780
  );
26793
26781
  if (verbose) {
26794
26782
  const visibleFiles = commit2.files.filter(
26795
26783
  (file) => !ignore3.some((p) => file.startsWith(p))
26796
26784
  );
26797
26785
  for (const file of visibleFiles) {
26798
- console.log(` ${chalk159.dim(file)}`);
26786
+ console.log(` ${chalk160.dim(file)}`);
26799
26787
  }
26800
26788
  }
26801
26789
  }
26802
26790
  }
26803
26791
 
26804
26792
  // src/commands/devlog/list/resolveListAfterDate.ts
26805
- import chalk160 from "chalk";
26793
+ import chalk161 from "chalk";
26806
26794
  var DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
26807
26795
  function resolveListAfterDate(options2, today) {
26808
26796
  if (options2.since) return addDays(resolveSinceDate(options2.since), -1);
@@ -26814,7 +26802,7 @@ function resolveSinceDate(since) {
26814
26802
  if (isValidWeek(since)) return isoWeekRange(since).start;
26815
26803
  if (DATE_PATTERN.test(since)) return since;
26816
26804
  console.log(
26817
- chalk160.red("Invalid --since. Use YYYY-MM-DD or YYYY-Www (e.g. 2026-W33)")
26805
+ chalk161.red("Invalid --since. Use YYYY-MM-DD or YYYY-Www (e.g. 2026-W33)")
26818
26806
  );
26819
26807
  process.exit(1);
26820
26808
  }
@@ -26824,8 +26812,9 @@ function list2(options2) {
26824
26812
  const config = loadConfig();
26825
26813
  const ignore3 = options2.ignore ?? config.devlog?.ignore ?? [];
26826
26814
  const repoName = getRepoName();
26815
+ const devDir = resolveDevDir();
26827
26816
  const today = localToday();
26828
- const skip3 = loadBlogSkipWeeks(repoName);
26817
+ const skip3 = new Set(config.devlog?.skipWeeks);
26829
26818
  const byWeek = groupCommitsByWeek(
26830
26819
  fetchCommitsAfter(ignore3, resolveListAfterDate(options2, today))
26831
26820
  );
@@ -26836,7 +26825,7 @@ function list2(options2) {
26836
26825
  printWeekHeader(week, {
26837
26826
  skipped: skip3.has(week),
26838
26827
  inProgress: !isCompletedWeek(week, today),
26839
- entry: loadDevEntry(repoName, week)
26828
+ entry: loadDevEntry(repoName, week, devDir)
26840
26829
  });
26841
26830
  printCommitsWithFiles(
26842
26831
  byWeek.get(week) ?? [],
@@ -26846,8 +26835,27 @@ function list2(options2) {
26846
26835
  });
26847
26836
  }
26848
26837
 
26838
+ // src/commands/devlog/loadDevWeeks.ts
26839
+ import { readdirSync as readdirSync10 } from "fs";
26840
+ import { join as join69 } from "path";
26841
+ var DEV_FILENAME_PATTERN = /^(\d{4})-w(\d{2})\.md$/;
26842
+ function parseDevWeekFilename(filename) {
26843
+ const match = filename.match(DEV_FILENAME_PATTERN);
26844
+ return match ? `${match[1]}-W${match[2]}` : null;
26845
+ }
26846
+ function readFilenames(dir) {
26847
+ try {
26848
+ return readdirSync10(dir);
26849
+ } catch {
26850
+ return [];
26851
+ }
26852
+ }
26853
+ function loadDevWeeks(repoName, devDir) {
26854
+ return readFilenames(join69(devDir, repoName)).map(parseDevWeekFilename).filter((week) => week !== null).sort();
26855
+ }
26856
+
26849
26857
  // src/commands/devlog/next/displayNextEntry.ts
26850
- import chalk161 from "chalk";
26858
+ import chalk162 from "chalk";
26851
26859
 
26852
26860
  // src/commands/devlog/getVersionAtCommit.ts
26853
26861
  import { execSync as execSync37 } from "child_process";
@@ -26900,18 +26908,18 @@ function versionRange(commits2) {
26900
26908
  return first === last ? first : `${first} \u2013 ${last}`;
26901
26909
  }
26902
26910
  function printField(label, value) {
26903
- console.log(`${chalk161.bold(`${label}:`)} ${value}`);
26911
+ console.log(`${chalk162.bold(`${label}:`)} ${value}`);
26904
26912
  }
26905
26913
  function printCommits(commits2, ignore3, verbose) {
26906
26914
  for (const commit2 of commits2) {
26907
- const version2 = commit2.version ? ` ${chalk161.cyan(commit2.version)}` : "";
26915
+ const version2 = commit2.version ? ` ${chalk162.cyan(commit2.version)}` : "";
26908
26916
  console.log(
26909
- ` ${chalk161.dim(commit2.date)} ${chalk161.yellow(commit2.hash)}${version2} ${commit2.message}`
26917
+ ` ${chalk162.dim(commit2.date)} ${chalk162.yellow(commit2.hash)}${version2} ${commit2.message}`
26910
26918
  );
26911
26919
  if (!verbose) continue;
26912
26920
  for (const file of commit2.files) {
26913
26921
  if (!ignore3.some((p) => file.startsWith(p))) {
26914
- console.log(` ${chalk161.dim(file)}`);
26922
+ console.log(` ${chalk162.dim(file)}`);
26915
26923
  }
26916
26924
  }
26917
26925
  }
@@ -26920,7 +26928,7 @@ function displayNextEntry(ctx, week, commits2) {
26920
26928
  const versioned = withVersions(commits2, getVersionAtCommit, repoHasTags());
26921
26929
  const { start: start2, end } = isoWeekRange(week);
26922
26930
  printField("name", ctx.repoName);
26923
- printField("week", chalk161.bold.blue(week));
26931
+ printField("week", chalk162.bold.blue(week));
26924
26932
  printField("range", `${start2} \u2013 ${end}`);
26925
26933
  const dates = commits2.map((c) => c.date).sort();
26926
26934
  if (dates.length > 0) printField("dates", `${dates[0]} \u2013 ${dates.at(-1)}`);
@@ -26930,7 +26938,7 @@ function displayNextEntry(ctx, week, commits2) {
26930
26938
  }
26931
26939
  function logNoCommits(lastWeek) {
26932
26940
  console.log(
26933
- chalk161.dim(
26941
+ chalk162.dim(
26934
26942
  lastWeek ? `No completed weeks with commits after ${lastWeek}` : "No completed weeks with commits found"
26935
26943
  )
26936
26944
  );
@@ -26939,14 +26947,15 @@ function logNoCommits(lastWeek) {
26939
26947
  // src/commands/devlog/next.ts
26940
26948
  function next2(options2) {
26941
26949
  const config = loadConfig();
26950
+ const devDir = resolveDevDir();
26942
26951
  const repoName = getRepoName();
26943
26952
  const ignore3 = options2.ignore ?? config.devlog?.ignore ?? [];
26944
- const lastWeek = loadDevWeeks(repoName).at(-1) ?? null;
26953
+ const lastWeek = loadDevWeeks(repoName, devDir).at(-1) ?? null;
26945
26954
  const afterDate = lastWeek ? isoWeekRange(lastWeek).end : null;
26946
26955
  const byWeek = groupCommitsByWeek(fetchCommitsAfter(ignore3, afterDate));
26947
26956
  const week = findTargetWeek(byWeek.keys(), {
26948
26957
  lastWeek,
26949
- skip: loadBlogSkipWeeks(repoName),
26958
+ skip: new Set(config.devlog?.skipWeeks),
26950
26959
  today: localToday()
26951
26960
  });
26952
26961
  if (!week) {
@@ -26961,43 +26970,44 @@ function next2(options2) {
26961
26970
  }
26962
26971
 
26963
26972
  // src/commands/devlog/skip.ts
26964
- import { writeFileSync as writeFileSync30 } from "fs";
26965
- import { join as join71 } from "path";
26966
- import chalk162 from "chalk";
26967
- import { stringify as stringifyYaml3 } from "yaml";
26968
- function getBlogConfigPath() {
26969
- return join71(BLOG_REPO_ROOT, "assist.yml");
26973
+ import chalk163 from "chalk";
26974
+ var SKIP_WEEKS_KEY = "devlog.skipWeeks";
26975
+ async function loadRepoSkipWeeks(cwd) {
26976
+ const { block } = await resolveSharedRepoBlock(await getDb(), void 0, cwd);
26977
+ const devlog = block.devlog;
26978
+ return devlog?.skipWeeks ?? [];
26970
26979
  }
26971
- function skip2(week) {
26980
+ async function skip2(week, cwd = process.cwd()) {
26972
26981
  if (!isValidWeek(week)) {
26973
- console.log(chalk162.red("Invalid week. Use YYYY-Www (e.g. 2026-W33)"));
26982
+ console.log(chalk163.red("Invalid week. Use YYYY-Www (e.g. 2026-W33)"));
26974
26983
  process.exit(1);
26975
26984
  }
26976
- const repoName = getRepoName();
26977
- const configPath = getBlogConfigPath();
26978
- const config = loadRawYaml(configPath);
26979
- const devlog = config.devlog ?? {};
26980
- const skip3 = devlog.skip ?? {};
26981
- const skipWeeks = skip3[repoName] ?? [];
26982
- if (skipWeeks.includes(week)) {
26983
- console.log(
26984
- chalk162.yellow(`${week} is already in skip list for ${repoName}`)
26985
- );
26985
+ const existing = await loadRepoSkipWeeks(cwd);
26986
+ if (existing.includes(week)) {
26987
+ console.log(chalk163.yellow(`${week} is already in ${SKIP_WEEKS_KEY}`));
26986
26988
  return;
26987
26989
  }
26988
- skipWeeks.push(week);
26989
- skipWeeks.sort();
26990
- skip3[repoName] = skipWeeks;
26991
- devlog.skip = skip3;
26992
- config.devlog = devlog;
26993
- writeFileSync30(configPath, stringifyYaml3(config, { lineWidth: 0 }));
26994
- console.log(chalk162.green(`Added ${week} to skip list for ${repoName}`));
26990
+ const result = await applySharedRepoConfigSet(
26991
+ SKIP_WEEKS_KEY,
26992
+ [.../* @__PURE__ */ new Set([...existing, week])].sort(),
26993
+ void 0,
26994
+ cwd
26995
+ );
26996
+ if (!result.ok) {
26997
+ console.log(chalk163.red(result.errors.join("\n")));
26998
+ process.exit(1);
26999
+ }
27000
+ console.log(
27001
+ chalk163.green(
27002
+ `Added ${week} to ${SKIP_WEEKS_KEY} for repos.${result.label} (repo db)`
27003
+ )
27004
+ );
26995
27005
  }
26996
27006
 
26997
27007
  // src/commands/devlog/write.ts
26998
- import { mkdirSync as mkdirSync19, writeFileSync as writeFileSync31 } from "fs";
26999
- import { dirname as dirname31, join as join72 } from "path";
27000
- import chalk163 from "chalk";
27008
+ import { mkdirSync as mkdirSync19, writeFileSync as writeFileSync30 } from "fs";
27009
+ import { dirname as dirname31, join as join70 } from "path";
27010
+ import chalk164 from "chalk";
27001
27011
 
27002
27012
  // src/commands/devlog/write/devEntryInputSchema.ts
27003
27013
  import { z as z19 } from "zod";
@@ -27038,7 +27048,7 @@ var devEntryInputSchema = z19.object({
27038
27048
  );
27039
27049
 
27040
27050
  // src/commands/devlog/write/formatDevEntry.ts
27041
- import { parse as parseYaml4, stringify as stringifyYaml4 } from "yaml";
27051
+ import { parse as parseYaml4, stringify as stringifyYaml3 } from "yaml";
27042
27052
  function buildFrontmatter(project, entry) {
27043
27053
  const frontmatter2 = {
27044
27054
  project,
@@ -27055,7 +27065,7 @@ function buildFrontmatter(project, entry) {
27055
27065
  }
27056
27066
  function formatDevEntry(project, entry) {
27057
27067
  const frontmatter2 = buildFrontmatter(project, entry);
27058
- const yaml = stringifyYaml4(frontmatter2, {
27068
+ const yaml = stringifyYaml3(frontmatter2, {
27059
27069
  lineWidth: 0,
27060
27070
  defaultKeyType: "PLAIN",
27061
27071
  defaultStringType: "QUOTE_DOUBLE"
@@ -27075,7 +27085,7 @@ function parseInput(raw) {
27075
27085
  try {
27076
27086
  return JSON.parse(raw);
27077
27087
  } catch (error) {
27078
- console.error(chalk163.red(`Invalid JSON on stdin: ${String(error)}`));
27088
+ console.error(chalk164.red(`Invalid JSON on stdin: ${String(error)}`));
27079
27089
  process.exit(1);
27080
27090
  }
27081
27091
  }
@@ -27083,15 +27093,16 @@ async function write() {
27083
27093
  const result = devEntryInputSchema.safeParse(parseInput(await readStdin()));
27084
27094
  if (!result.success) {
27085
27095
  for (const issue of result.error.issues) {
27086
- console.error(chalk163.red(`${issue.path.join(".")}: ${issue.message}`));
27096
+ console.error(chalk164.red(`${issue.path.join(".")}: ${issue.message}`));
27087
27097
  }
27088
27098
  process.exit(1);
27089
27099
  }
27100
+ const devDir = resolveDevDir();
27090
27101
  const repoName = getRepoName();
27091
- const path109 = join72(DEV_DIR, repoName, `${result.data.week.toLowerCase()}.md`);
27102
+ const path109 = join70(devDir, repoName, `${result.data.week.toLowerCase()}.md`);
27092
27103
  mkdirSync19(dirname31(path109), { recursive: true });
27093
- writeFileSync31(path109, formatDevEntry(repoName, result.data));
27094
- console.log(chalk163.green(`Wrote ${path109}`));
27104
+ writeFileSync30(path109, formatDevEntry(repoName, result.data));
27105
+ console.log(chalk164.green(`Wrote ${path109}`));
27095
27106
  }
27096
27107
 
27097
27108
  // src/commands/devlog/registerDevlogEntryCommands.ts
@@ -27099,7 +27110,9 @@ function registerDevlogEntryCommands(devlogCommand) {
27099
27110
  devlogCommand.command("next").description(
27100
27111
  "Show commits for the next completed ISO week after the last dev entry"
27101
27112
  ).option("-v, --verbose", "Show file names for each commit").action(next2);
27102
- devlogCommand.command("skip <week>").description("Add an ISO week (YYYY-Www) to the skip list").action(skip2);
27113
+ devlogCommand.command("skip <week>").description(
27114
+ "Add an ISO week (YYYY-Www) to this repo's repo (db) devlog.skipWeeks"
27115
+ ).action((week) => skip2(week));
27103
27116
  internalCommand(
27104
27117
  devlogCommand.command("write").description(
27105
27118
  "Write a dev entry from JSON on stdin (week, title, versions, aiGenerated, added/changed/fixed, lede)"
@@ -27120,7 +27133,7 @@ function readRepoDirs(devDir) {
27120
27133
  return [];
27121
27134
  }
27122
27135
  }
27123
- function loadAllDevLatestWeeks(devDir = DEV_DIR) {
27136
+ function loadAllDevLatestWeeks(devDir) {
27124
27137
  const latest2 = /* @__PURE__ */ new Map();
27125
27138
  for (const repo of readRepoDirs(devDir)) {
27126
27139
  const week = loadDevWeeks(repo, devDir).at(-1);
@@ -27138,11 +27151,11 @@ function getRepoStatus(lastPush, lastWeek, today) {
27138
27151
  }
27139
27152
 
27140
27153
  // src/commands/devlog/repos/printReposTable.ts
27141
- import chalk164 from "chalk";
27154
+ import chalk165 from "chalk";
27142
27155
  function colorStatus(status2) {
27143
- if (status2 === "missing") return chalk164.red(status2);
27144
- if (status2 === "outdated") return chalk164.yellow(status2);
27145
- return chalk164.green(status2);
27156
+ if (status2 === "missing") return chalk165.red(status2);
27157
+ if (status2 === "outdated") return chalk165.yellow(status2);
27158
+ return chalk165.green(status2);
27146
27159
  }
27147
27160
  function formatRow(row3, nameWidth) {
27148
27161
  const week = (row3.lastWeek ?? "-").padEnd(9);
@@ -27156,8 +27169,8 @@ function printReposTable(rows) {
27156
27169
  "Last Week".padEnd(9),
27157
27170
  "Status"
27158
27171
  ].join(" ");
27159
- console.log(chalk164.dim(header));
27160
- console.log(chalk164.dim("-".repeat(header.length)));
27172
+ console.log(chalk165.dim(header));
27173
+ console.log(chalk165.dim("-".repeat(header.length)));
27161
27174
  for (const row3 of rows) {
27162
27175
  console.log(formatRow(row3, nameWidth));
27163
27176
  }
@@ -27198,26 +27211,28 @@ function sortRows(rows) {
27198
27211
  });
27199
27212
  }
27200
27213
  function repos(options2) {
27214
+ const devDir = resolveDevDir();
27201
27215
  const ghRepos = fetchRepos(options2.days ?? 30, options2.all ?? false);
27202
27216
  if (ghRepos.length === 0) {
27203
27217
  console.log("No repos with recent activity found.");
27204
27218
  return;
27205
27219
  }
27206
- const latestWeeks = loadAllDevLatestWeeks();
27220
+ const latestWeeks = loadAllDevLatestWeeks(devDir);
27207
27221
  const today = localToday();
27208
27222
  const rows = ghRepos.map((repo) => toRow(repo, latestWeeks, today));
27209
27223
  printReposTable(sortRows(rows));
27210
27224
  }
27211
27225
 
27212
27226
  // src/commands/devlog/version.ts
27213
- import chalk165 from "chalk";
27227
+ import chalk166 from "chalk";
27214
27228
  function printField2(label, value) {
27215
- console.log(`${chalk165.bold(`${label}:`)} ${value ?? chalk165.dim("none")}`);
27229
+ console.log(`${chalk166.bold(`${label}:`)} ${value ?? chalk166.dim("none")}`);
27216
27230
  }
27217
27231
  function version() {
27232
+ const devDir = resolveDevDir();
27218
27233
  const name = getRepoName();
27219
- const lastWeek = loadDevWeeks(name).at(-1) ?? null;
27220
- const entry = lastWeek ? loadDevEntry(name, lastWeek) : null;
27234
+ const lastWeek = loadDevWeeks(name, devDir).at(-1) ?? null;
27235
+ const entry = lastWeek ? loadDevEntry(name, lastWeek, devDir) : null;
27221
27236
  const current = getVersionAtCommit("HEAD");
27222
27237
  printField2("name", name);
27223
27238
  printField2("last week", lastWeek);
@@ -27248,10 +27263,10 @@ function registerDevlog(program) {
27248
27263
 
27249
27264
  // src/commands/docs/docsConfirm.ts
27250
27265
  import { unlinkSync as unlinkSync9 } from "fs";
27251
- import chalk167 from "chalk";
27266
+ import chalk168 from "chalk";
27252
27267
 
27253
27268
  // src/commands/backlog/findPhaseUnlockItem.ts
27254
- import chalk166 from "chalk";
27269
+ import chalk167 from "chalk";
27255
27270
  async function findPhaseUnlockItem(itemId2, phase) {
27256
27271
  const found = await findOneItem(String(itemId2));
27257
27272
  if (!found) {
@@ -27261,7 +27276,7 @@ async function findPhaseUnlockItem(itemId2, phase) {
27261
27276
  const label = `${formatItemId(itemId2)} ${found.item.name}`;
27262
27277
  if ((found.item.currentPhase ?? 1) !== phase) {
27263
27278
  console.error(
27264
- chalk166.red(
27279
+ chalk167.red(
27265
27280
  `${label} has moved on from phase ${phase} since the unlock was requested. Nothing was approved; request a new unlock from the current phase.`
27266
27281
  )
27267
27282
  );
@@ -27272,9 +27287,9 @@ async function findPhaseUnlockItem(itemId2, phase) {
27272
27287
  }
27273
27288
 
27274
27289
  // src/commands/docs/getDocsUnlockPinPath.ts
27275
- import { join as join73 } from "path";
27290
+ import { join as join71 } from "path";
27276
27291
  function getDocsUnlockPinPath(pin2) {
27277
- return join73(getRestrictedDir(), `docs-unlock-pin-${pin2}.json`);
27292
+ return join71(getRestrictedDir(), `docs-unlock-pin-${pin2}.json`);
27278
27293
  }
27279
27294
 
27280
27295
  // src/commands/docs/readDocsUnlockPinState.ts
@@ -27315,7 +27330,7 @@ async function docsConfirm(pin2) {
27315
27330
  sweepRestrictedDir();
27316
27331
  const state = readDocsUnlockPinState(pin2);
27317
27332
  if (!state) {
27318
- console.error(chalk167.red(`No pending docs unlock for pin: ${pin2}`));
27333
+ console.error(chalk168.red(`No pending docs unlock for pin: ${pin2}`));
27319
27334
  process.exitCode = 1;
27320
27335
  return;
27321
27336
  }
@@ -27324,18 +27339,18 @@ async function docsConfirm(pin2) {
27324
27339
  if (!found) return;
27325
27340
  await recordDocsUnlock(found.orm, state.itemId, state.phase);
27326
27341
  console.log(
27327
- chalk167.green(
27342
+ chalk168.green(
27328
27343
  `Approved docs changes for phase ${state.phase} of ${found.label}. Its sessions may edit and commit docs pages and screenshots until the item moves on from that phase or is done or won't-do.`
27329
27344
  )
27330
27345
  );
27331
27346
  }
27332
27347
 
27333
27348
  // src/commands/docs/docsUnlock.ts
27334
- import chalk168 from "chalk";
27349
+ import chalk169 from "chalk";
27335
27350
 
27336
27351
  // src/commands/notify/issueUnlockPin.ts
27337
27352
  import { randomInt as randomInt2 } from "crypto";
27338
- import { mkdirSync as mkdirSync20, unlinkSync as unlinkSync10, writeFileSync as writeFileSync32 } from "fs";
27353
+ import { mkdirSync as mkdirSync20, unlinkSync as unlinkSync10, writeFileSync as writeFileSync31 } from "fs";
27339
27354
  async function issueUnlockPin({
27340
27355
  area,
27341
27356
  label,
@@ -27346,7 +27361,7 @@ async function issueUnlockPin({
27346
27361
  mkdirSync20(getRestrictedDir(), { recursive: true });
27347
27362
  sweepRestrictedDir();
27348
27363
  const path109 = pinPath(pin2);
27349
- writeFileSync32(path109, JSON.stringify({ ...state, pin: pin2 }));
27364
+ writeFileSync31(path109, JSON.stringify({ ...state, pin: pin2 }));
27350
27365
  const delivery = await deliverPinNotification({
27351
27366
  area,
27352
27367
  pin: pin2,
@@ -27359,7 +27374,7 @@ async function issueUnlockPin({
27359
27374
 
27360
27375
  // src/commands/docs/docsUnlock.ts
27361
27376
  function fail7(message3) {
27362
- console.error(chalk168.red(message3));
27377
+ console.error(chalk169.red(message3));
27363
27378
  process.exitCode = 1;
27364
27379
  }
27365
27380
  async function docsUnlock() {
@@ -27392,7 +27407,7 @@ async function docsUnlock() {
27392
27407
  console.log(
27393
27408
  `A confirmation pin was sent to the user's desktop notifications${node ? ` on ${node}, the node controlling this session` : ""}.
27394
27409
  To let this phase of ${label} edit docs pages and screenshots, the user runs in this session:
27395
- ${chalk168.cyan(" assist docs confirm <PIN>")}
27410
+ ${chalk169.cyan(" assist docs confirm <PIN>")}
27396
27411
  Wait for the user to confirm before editing docs.`
27397
27412
  );
27398
27413
  }
@@ -27418,13 +27433,13 @@ function registerDocs(parent) {
27418
27433
  }
27419
27434
 
27420
27435
  // src/commands/schema/schemaConfirm.ts
27421
- import { mkdirSync as mkdirSync21, unlinkSync as unlinkSync11, writeFileSync as writeFileSync33 } from "fs";
27422
- import chalk169 from "chalk";
27436
+ import { mkdirSync as mkdirSync21, unlinkSync as unlinkSync11, writeFileSync as writeFileSync32 } from "fs";
27437
+ import chalk170 from "chalk";
27423
27438
 
27424
27439
  // src/commands/schema/getSchemaUnlockPinPath.ts
27425
- import { join as join74 } from "path";
27440
+ import { join as join72 } from "path";
27426
27441
  function getSchemaUnlockPinPath(pin2) {
27427
- return join74(getRestrictedDir(), `schema-unlock-pin-${pin2}.json`);
27442
+ return join72(getRestrictedDir(), `schema-unlock-pin-${pin2}.json`);
27428
27443
  }
27429
27444
 
27430
27445
  // src/commands/schema/readSchemaUnlockPinState.ts
@@ -27462,7 +27477,7 @@ async function approveItemPhase(itemId2, phase) {
27462
27477
  title: `Database schema files unlocked by PIN for phase ${phase}`
27463
27478
  });
27464
27479
  console.log(
27465
- chalk169.green(
27480
+ chalk170.green(
27466
27481
  `Approved schema changes for phase ${phase} of ${found.label}. Its sessions may edit and commit database schema files until the item moves on from that phase or is done or won't-do.`
27467
27482
  )
27468
27483
  );
@@ -27471,9 +27486,9 @@ function approveClaudeSession(claudeSessionId) {
27471
27486
  const path109 = getSchemaSessionApprovalPath(claudeSessionId);
27472
27487
  if (!path109) return;
27473
27488
  mkdirSync21(getSchemaSessionApprovalDir(), { recursive: true });
27474
- writeFileSync33(path109, JSON.stringify({ claudeSessionId }));
27489
+ writeFileSync32(path109, JSON.stringify({ claudeSessionId }));
27475
27490
  console.log(
27476
- chalk169.green(
27491
+ chalk170.green(
27477
27492
  `Approved schema changes for Claude session ${claudeSessionId}. It may edit and commit database schema files until the session ends.`
27478
27493
  )
27479
27494
  );
@@ -27482,7 +27497,7 @@ async function schemaConfirm(pin2) {
27482
27497
  sweepRestrictedDir();
27483
27498
  const state = readSchemaUnlockPinState(pin2);
27484
27499
  if (!state) {
27485
- console.error(chalk169.red(`No pending schema unlock for pin: ${pin2}`));
27500
+ console.error(chalk170.red(`No pending schema unlock for pin: ${pin2}`));
27486
27501
  process.exitCode = 1;
27487
27502
  return;
27488
27503
  }
@@ -27492,9 +27507,9 @@ async function schemaConfirm(pin2) {
27492
27507
  }
27493
27508
 
27494
27509
  // src/commands/schema/schemaUnlock.ts
27495
- import chalk170 from "chalk";
27510
+ import chalk171 from "chalk";
27496
27511
  function fail8(message3) {
27497
- console.error(chalk170.red(message3));
27512
+ console.error(chalk171.red(message3));
27498
27513
  process.exitCode = 1;
27499
27514
  }
27500
27515
  async function itemScope(itemId2) {
@@ -27540,7 +27555,7 @@ async function schemaUnlock() {
27540
27555
  console.log(
27541
27556
  `A confirmation pin was sent to the user's desktop notifications${node ? ` on ${node}, the node controlling this session` : ""}.
27542
27557
  To let ${scope.scope} change database schema files, the user runs in this session:
27543
- ${chalk170.cyan(" assist schema confirm <PIN>")}
27558
+ ${chalk171.cyan(" assist schema confirm <PIN>")}
27544
27559
  Wait for the user to confirm before changing the schema.`
27545
27560
  );
27546
27561
  }
@@ -27567,8 +27582,8 @@ function registerSchema(parent) {
27567
27582
 
27568
27583
  // src/commands/dotnet/checkBuildLocks.ts
27569
27584
  import { closeSync as closeSync5, openSync as openSync6, readdirSync as readdirSync12 } from "fs";
27570
- import { join as join75 } from "path";
27571
- import chalk171 from "chalk";
27585
+ import { join as join73 } from "path";
27586
+ import chalk172 from "chalk";
27572
27587
  var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "packages"]);
27573
27588
  function isLockedDll(debugDir) {
27574
27589
  let files;
@@ -27579,7 +27594,7 @@ function isLockedDll(debugDir) {
27579
27594
  }
27580
27595
  for (const file of files) {
27581
27596
  if (!file.toLowerCase().endsWith(".dll")) continue;
27582
- const dllPath = join75(debugDir, file);
27597
+ const dllPath = join73(debugDir, file);
27583
27598
  try {
27584
27599
  const fd = openSync6(dllPath, "r+");
27585
27600
  closeSync5(fd);
@@ -27597,13 +27612,13 @@ function findFirstLockedDll(dir) {
27597
27612
  return null;
27598
27613
  }
27599
27614
  if (entries.includes("bin")) {
27600
- const locked = isLockedDll(join75(dir, "bin", "Debug"));
27615
+ const locked = isLockedDll(join73(dir, "bin", "Debug"));
27601
27616
  if (locked) return locked;
27602
27617
  }
27603
27618
  for (const entry of entries) {
27604
27619
  if (SKIP_DIRS.has(entry) || entry === "bin" || entry.startsWith("."))
27605
27620
  continue;
27606
- const found = findFirstLockedDll(join75(dir, entry));
27621
+ const found = findFirstLockedDll(join73(dir, entry));
27607
27622
  if (found) return found;
27608
27623
  }
27609
27624
  return null;
@@ -27615,14 +27630,14 @@ function checkBuildLocks(startDir) {
27615
27630
  const locked = findFirstLockedDll(startDir ?? getSearchRoot());
27616
27631
  if (locked) {
27617
27632
  console.error(
27618
- chalk171.red("Build output locked (is VS debugging?): ") + locked
27633
+ chalk172.red("Build output locked (is VS debugging?): ") + locked
27619
27634
  );
27620
27635
  process.exit(1);
27621
27636
  }
27622
27637
  }
27623
27638
  async function checkBuildLocksCommand() {
27624
27639
  checkBuildLocks();
27625
- console.log(chalk171.green("No build locks detected"));
27640
+ console.log(chalk172.green("No build locks detected"));
27626
27641
  }
27627
27642
 
27628
27643
  // src/commands/dotnet/buildTree.ts
@@ -27721,30 +27736,30 @@ function escapeRegex(s) {
27721
27736
  }
27722
27737
 
27723
27738
  // src/commands/dotnet/printTree.ts
27724
- import chalk172 from "chalk";
27739
+ import chalk173 from "chalk";
27725
27740
  function printNodes(nodes, prefix2) {
27726
27741
  for (let i = 0; i < nodes.length; i++) {
27727
27742
  const isLast = i === nodes.length - 1;
27728
27743
  const connector = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
27729
27744
  const childPrefix = isLast ? " " : "\u2502 ";
27730
27745
  const isMissing = nodes[i].relativePath.startsWith("[MISSING]");
27731
- const label = isMissing ? chalk172.red(nodes[i].relativePath) : nodes[i].relativePath;
27746
+ const label = isMissing ? chalk173.red(nodes[i].relativePath) : nodes[i].relativePath;
27732
27747
  console.log(`${prefix2}${connector}${label}`);
27733
27748
  printNodes(nodes[i].children, prefix2 + childPrefix);
27734
27749
  }
27735
27750
  }
27736
27751
  function printTree(tree, totalCount, solutions) {
27737
- console.log(chalk172.bold("\nProject Dependency Tree"));
27738
- console.log(chalk172.cyan(tree.relativePath));
27752
+ console.log(chalk173.bold("\nProject Dependency Tree"));
27753
+ console.log(chalk173.cyan(tree.relativePath));
27739
27754
  printNodes(tree.children, "");
27740
- console.log(chalk172.dim(`
27755
+ console.log(chalk173.dim(`
27741
27756
  ${totalCount} projects total (including root)`));
27742
- console.log(chalk172.bold("\nSolution Membership"));
27757
+ console.log(chalk173.bold("\nSolution Membership"));
27743
27758
  if (solutions.length === 0) {
27744
- console.log(chalk172.yellow(" Not found in any .sln"));
27759
+ console.log(chalk173.yellow(" Not found in any .sln"));
27745
27760
  } else {
27746
27761
  for (const sln of solutions) {
27747
- console.log(` ${chalk172.green(sln)}`);
27762
+ console.log(` ${chalk173.green(sln)}`);
27748
27763
  }
27749
27764
  }
27750
27765
  console.log();
@@ -27773,16 +27788,16 @@ function printJson(tree, totalCount, solutions) {
27773
27788
  // src/commands/dotnet/resolveCsproj.ts
27774
27789
  import { existsSync as existsSync60 } from "fs";
27775
27790
  import path38 from "path";
27776
- import chalk173 from "chalk";
27791
+ import chalk174 from "chalk";
27777
27792
  function resolveCsproj(csprojPath) {
27778
27793
  const resolved = path38.resolve(csprojPath);
27779
27794
  if (!existsSync60(resolved)) {
27780
- console.error(chalk173.red(`File not found: ${resolved}`));
27795
+ console.error(chalk174.red(`File not found: ${resolved}`));
27781
27796
  process.exit(1);
27782
27797
  }
27783
27798
  const repoRoot2 = findRepoRoot(path38.dirname(resolved));
27784
27799
  if (!repoRoot2) {
27785
- console.error(chalk173.red("Could not find git repository root"));
27800
+ console.error(chalk174.red("Could not find git repository root"));
27786
27801
  process.exit(1);
27787
27802
  }
27788
27803
  return { resolved, repoRoot: repoRoot2 };
@@ -27832,12 +27847,12 @@ function getChangedCsFiles(scope) {
27832
27847
  }
27833
27848
 
27834
27849
  // src/commands/dotnet/inSln.ts
27835
- import chalk174 from "chalk";
27850
+ import chalk175 from "chalk";
27836
27851
  async function inSln(csprojPath) {
27837
27852
  const { resolved, repoRoot: repoRoot2 } = resolveCsproj(csprojPath);
27838
27853
  const solutions = findContainingSolutions(resolved, repoRoot2);
27839
27854
  if (solutions.length === 0) {
27840
- console.log(chalk174.yellow("Not found in any .sln file"));
27855
+ console.log(chalk175.yellow("Not found in any .sln file"));
27841
27856
  process.exit(1);
27842
27857
  }
27843
27858
  for (const sln of solutions) {
@@ -27846,7 +27861,7 @@ async function inSln(csprojPath) {
27846
27861
  }
27847
27862
 
27848
27863
  // src/commands/dotnet/inspect.ts
27849
- import chalk180 from "chalk";
27864
+ import chalk181 from "chalk";
27850
27865
 
27851
27866
  // src/shared/formatElapsed.ts
27852
27867
  function formatElapsed(ms) {
@@ -27858,12 +27873,12 @@ function formatElapsed(ms) {
27858
27873
  }
27859
27874
 
27860
27875
  // src/commands/dotnet/displayIssues.ts
27861
- import chalk175 from "chalk";
27876
+ import chalk176 from "chalk";
27862
27877
  var SEVERITY_COLOR = {
27863
- ERROR: chalk175.red,
27864
- WARNING: chalk175.yellow,
27865
- SUGGESTION: chalk175.cyan,
27866
- HINT: chalk175.dim
27878
+ ERROR: chalk176.red,
27879
+ WARNING: chalk176.yellow,
27880
+ SUGGESTION: chalk176.cyan,
27881
+ HINT: chalk176.dim
27867
27882
  };
27868
27883
  function groupByFile(issues) {
27869
27884
  const byFile = /* @__PURE__ */ new Map();
@@ -27879,15 +27894,15 @@ function groupByFile(issues) {
27879
27894
  }
27880
27895
  function displayIssues(issues) {
27881
27896
  for (const [file, fileIssues] of groupByFile(issues)) {
27882
- console.log(chalk175.bold(file));
27897
+ console.log(chalk176.bold(file));
27883
27898
  for (const issue of fileIssues.sort((a, b) => a.line - b.line)) {
27884
- const color = SEVERITY_COLOR[issue.severity] ?? chalk175.white;
27899
+ const color = SEVERITY_COLOR[issue.severity] ?? chalk176.white;
27885
27900
  console.log(
27886
- ` ${chalk175.dim(`${issue.line}:`)} ${color(issue.severity)} [${issue.typeId}] ${issue.message}`
27901
+ ` ${chalk176.dim(`${issue.line}:`)} ${color(issue.severity)} [${issue.typeId}] ${issue.message}`
27887
27902
  );
27888
27903
  }
27889
27904
  }
27890
- console.log(chalk175.dim(`
27905
+ console.log(chalk176.dim(`
27891
27906
  ${issues.length} issue(s) found`));
27892
27907
  }
27893
27908
 
@@ -27946,15 +27961,15 @@ function filterIssues(issues, all, cliOnly, cliSuppress) {
27946
27961
  // src/commands/dotnet/resolveSolution.ts
27947
27962
  import { existsSync as existsSync61 } from "fs";
27948
27963
  import path39 from "path";
27949
- import chalk177 from "chalk";
27964
+ import chalk178 from "chalk";
27950
27965
 
27951
27966
  // src/commands/dotnet/findSolution.ts
27952
27967
  import { readdirSync as readdirSync14 } from "fs";
27953
- import { dirname as dirname32, join as join76 } from "path";
27954
- import chalk176 from "chalk";
27968
+ import { dirname as dirname32, join as join74 } from "path";
27969
+ import chalk177 from "chalk";
27955
27970
  function findSlnInDir(dir) {
27956
27971
  try {
27957
- return readdirSync14(dir).filter((f) => f.endsWith(".sln")).map((f) => join76(dir, f));
27972
+ return readdirSync14(dir).filter((f) => f.endsWith(".sln")).map((f) => join74(dir, f));
27958
27973
  } catch {
27959
27974
  return [];
27960
27975
  }
@@ -27967,17 +27982,17 @@ function findSolution() {
27967
27982
  const slnFiles = findSlnInDir(current);
27968
27983
  if (slnFiles.length === 1) return slnFiles[0];
27969
27984
  if (slnFiles.length > 1) {
27970
- console.error(chalk176.red(`Multiple .sln files found in ${current}:`));
27985
+ console.error(chalk177.red(`Multiple .sln files found in ${current}:`));
27971
27986
  for (const f of slnFiles) console.error(` ${f}`);
27972
27987
  console.error(
27973
- chalk176.yellow("Specify which one: assist dotnet inspect <sln>")
27988
+ chalk177.yellow("Specify which one: assist dotnet inspect <sln>")
27974
27989
  );
27975
27990
  process.exit(1);
27976
27991
  }
27977
27992
  if (current === ceiling) break;
27978
27993
  current = dirname32(current);
27979
27994
  }
27980
- console.error(chalk176.red("No .sln file found between cwd and repo root"));
27995
+ console.error(chalk177.red("No .sln file found between cwd and repo root"));
27981
27996
  process.exit(1);
27982
27997
  }
27983
27998
 
@@ -27986,7 +28001,7 @@ function resolveSolution(sln) {
27986
28001
  if (sln) {
27987
28002
  const resolved = path39.resolve(sln);
27988
28003
  if (!existsSync61(resolved)) {
27989
- console.error(chalk177.red(`Solution file not found: ${resolved}`));
28004
+ console.error(chalk178.red(`Solution file not found: ${resolved}`));
27990
28005
  process.exit(1);
27991
28006
  }
27992
28007
  return resolved;
@@ -28028,14 +28043,14 @@ import { execSync as execSync40 } from "child_process";
28028
28043
  import { existsSync as existsSync62, readFileSync as readFileSync43, unlinkSync as unlinkSync12 } from "fs";
28029
28044
  import { tmpdir as tmpdir4 } from "os";
28030
28045
  import path40 from "path";
28031
- import chalk178 from "chalk";
28046
+ import chalk179 from "chalk";
28032
28047
  function assertJbInstalled() {
28033
28048
  try {
28034
28049
  execSync40("jb inspectcode --version", { stdio: "pipe" });
28035
28050
  } catch {
28036
- console.error(chalk178.red("jb is not installed. Install with:"));
28051
+ console.error(chalk179.red("jb is not installed. Install with:"));
28037
28052
  console.error(
28038
- chalk178.yellow(" dotnet tool install -g JetBrains.ReSharper.GlobalTools")
28053
+ chalk179.yellow(" dotnet tool install -g JetBrains.ReSharper.GlobalTools")
28039
28054
  );
28040
28055
  process.exit(1);
28041
28056
  }
@@ -28053,11 +28068,11 @@ function runInspectCode(slnPath, include, swea) {
28053
28068
  if (error && typeof error === "object" && "stderr" in error) {
28054
28069
  process.stderr.write(error.stderr);
28055
28070
  }
28056
- console.error(chalk178.red("jb inspectcode failed"));
28071
+ console.error(chalk179.red("jb inspectcode failed"));
28057
28072
  process.exit(1);
28058
28073
  }
28059
28074
  if (!existsSync62(reportPath)) {
28060
- console.error(chalk178.red("Report file not generated"));
28075
+ console.error(chalk179.red("Report file not generated"));
28061
28076
  process.exit(1);
28062
28077
  }
28063
28078
  const xml = readFileSync43(reportPath, "utf8");
@@ -28067,7 +28082,7 @@ function runInspectCode(slnPath, include, swea) {
28067
28082
 
28068
28083
  // src/commands/dotnet/runRoslynInspect.ts
28069
28084
  import { execSync as execSync41 } from "child_process";
28070
- import chalk179 from "chalk";
28085
+ import chalk180 from "chalk";
28071
28086
  function resolveMsbuildPath() {
28072
28087
  const { run: run4 } = loadConfig();
28073
28088
  const configs = resolveRunConfigs(run4, runConfigBaseDir());
@@ -28079,9 +28094,9 @@ function assertMsbuildInstalled() {
28079
28094
  try {
28080
28095
  execSync41(`"${msbuild}" -version`, { stdio: "pipe" });
28081
28096
  } catch {
28082
- console.error(chalk179.red(`msbuild not found at: ${msbuild}`));
28097
+ console.error(chalk180.red(`msbuild not found at: ${msbuild}`));
28083
28098
  console.error(
28084
- chalk179.yellow(
28099
+ chalk180.yellow(
28085
28100
  "Configure it via a 'build' run entry in .claude/assist.yml or add msbuild to PATH."
28086
28101
  )
28087
28102
  );
@@ -28128,17 +28143,17 @@ function runEngine(resolved, changedFiles2, options2) {
28128
28143
  // src/commands/dotnet/inspect.ts
28129
28144
  function logScope(changedFiles2) {
28130
28145
  if (changedFiles2 === null) {
28131
- console.log(chalk180.dim("Inspecting full solution..."));
28146
+ console.log(chalk181.dim("Inspecting full solution..."));
28132
28147
  } else {
28133
28148
  console.log(
28134
- chalk180.dim(`Inspecting ${changedFiles2.length} changed file(s)...`)
28149
+ chalk181.dim(`Inspecting ${changedFiles2.length} changed file(s)...`)
28135
28150
  );
28136
28151
  }
28137
28152
  }
28138
28153
  function reportResults(issues, elapsed) {
28139
28154
  if (issues.length > 0) displayIssues(issues);
28140
- else console.log(chalk180.green("No issues found"));
28141
- console.log(chalk180.dim(`Completed in ${formatElapsed(elapsed)}`));
28155
+ else console.log(chalk181.green("No issues found"));
28156
+ console.log(chalk181.dim(`Completed in ${formatElapsed(elapsed)}`));
28142
28157
  if (issues.length > 0) process.exit(1);
28143
28158
  }
28144
28159
  async function inspect(sln, options2) {
@@ -28149,7 +28164,7 @@ async function inspect(sln, options2) {
28149
28164
  const scope = parseScope(options2.scope);
28150
28165
  const changedFiles2 = getChangedCsFiles(scope);
28151
28166
  if (changedFiles2 !== null && changedFiles2.length === 0) {
28152
- console.log(chalk180.green("No changed .cs files found"));
28167
+ console.log(chalk181.green("No changed .cs files found"));
28153
28168
  return;
28154
28169
  }
28155
28170
  logScope(changedFiles2);
@@ -28940,9 +28955,9 @@ function aggregateCommitters(authorLists) {
28940
28955
 
28941
28956
  // src/shared/runGhGraphql.ts
28942
28957
  import { spawnSync as spawnSync6 } from "child_process";
28943
- import { unlinkSync as unlinkSync13, writeFileSync as writeFileSync34 } from "fs";
28958
+ import { unlinkSync as unlinkSync13, writeFileSync as writeFileSync33 } from "fs";
28944
28959
  import { tmpdir as tmpdir5 } from "os";
28945
- import { join as join77 } from "path";
28960
+ import { join as join75 } from "path";
28946
28961
  function buildArgs2(queryFile, vars) {
28947
28962
  const args = ["api", "graphql", "-F", `query=@${queryFile}`];
28948
28963
  for (const [key, value] of Object.entries(vars)) {
@@ -28952,8 +28967,8 @@ function buildArgs2(queryFile, vars) {
28952
28967
  return args;
28953
28968
  }
28954
28969
  function runGhGraphql(mutation, vars) {
28955
- const queryFile = join77(tmpdir5(), `gh-query-${Date.now()}.graphql`);
28956
- writeFileSync34(queryFile, mutation);
28970
+ const queryFile = join75(tmpdir5(), `gh-query-${Date.now()}.graphql`);
28971
+ writeFileSync33(queryFile, mutation);
28957
28972
  try {
28958
28973
  const result = spawnSync6("gh", buildArgs2(queryFile, vars), {
28959
28974
  encoding: "utf8",
@@ -29017,25 +29032,25 @@ function fetchRepoCommitAuthors(org, repo, since) {
29017
29032
  }
29018
29033
 
29019
29034
  // src/commands/github/printCountTable.ts
29020
- import chalk181 from "chalk";
29035
+ import chalk182 from "chalk";
29021
29036
  function printCountTable(labelHeader, rows) {
29022
29037
  const labelWidth = Math.max(
29023
29038
  labelHeader.length,
29024
29039
  ...rows.map((row3) => row3.label.length)
29025
29040
  );
29026
29041
  const header = `${labelHeader.padEnd(labelWidth)} Commits`;
29027
- console.log(chalk181.dim(header));
29028
- console.log(chalk181.dim("-".repeat(header.length)));
29042
+ console.log(chalk182.dim(header));
29043
+ console.log(chalk182.dim("-".repeat(header.length)));
29029
29044
  for (const row3 of rows) {
29030
29045
  console.log(`${row3.label.padEnd(labelWidth)} ${row3.count}`);
29031
29046
  }
29032
29047
  }
29033
29048
 
29034
29049
  // src/commands/github/printRepoAuthorBreakdown.ts
29035
- import chalk182 from "chalk";
29050
+ import chalk183 from "chalk";
29036
29051
  function printRepoAuthorBreakdown(repos2) {
29037
29052
  for (const repo of repos2) {
29038
- console.log(chalk182.bold(repo.name));
29053
+ console.log(chalk183.bold(repo.name));
29039
29054
  const authorWidth = Math.max(
29040
29055
  0,
29041
29056
  ...repo.authors.map((a) => a.author.length)
@@ -29109,10 +29124,10 @@ function parseSinceDate(value) {
29109
29124
  }
29110
29125
 
29111
29126
  // src/commands/github/issue/fixStructure/applyAndVerifySubtree.ts
29112
- import chalk184 from "chalk";
29127
+ import chalk185 from "chalk";
29113
29128
 
29114
29129
  // src/commands/github/issue/fixStructure/applyFixStructurePlan.ts
29115
- import chalk183 from "chalk";
29130
+ import chalk184 from "chalk";
29116
29131
 
29117
29132
  // src/commands/github/issue/fixStructure/removeIssueLabels.ts
29118
29133
  var MUTATION2 = `mutation($labelableId: ID!, $labelIds: [ID!]!) {
@@ -29149,7 +29164,7 @@ function writeLineNow(line) {
29149
29164
  // src/commands/github/issue/fixStructure/applyFixStructurePlan.ts
29150
29165
  function applyFixStructurePlan(plan2) {
29151
29166
  for (const entry of plan2.entries) {
29152
- const where = chalk183.cyan(`${entry.issue.repo}#${entry.issue.number}`);
29167
+ const where = chalk184.cyan(`${entry.issue.repo}#${entry.issue.number}`);
29153
29168
  const { typeChange, labelRemovals } = entry;
29154
29169
  if (typeChange) {
29155
29170
  writeLineNow(
@@ -29419,12 +29434,12 @@ function planSubtree(root2, context) {
29419
29434
  function applyAndVerifySubtree(target, plan2, context) {
29420
29435
  if (plan2.typeChangeCount === 0 && plan2.labelRemovalCount === 0) return;
29421
29436
  applyFixStructurePlan(plan2);
29422
- writeLineNow(chalk184.dim("Re-walking the subtree to confirm"));
29437
+ writeLineNow(chalk185.dim("Re-walking the subtree to confirm"));
29423
29438
  assertNoResidualDrift(
29424
29439
  planSubtree(fetchRootIssue(target), context),
29425
29440
  context.chain
29426
29441
  );
29427
- writeLineNow(chalk184.green("Subtree normalised"));
29442
+ writeLineNow(chalk185.green("Subtree normalised"));
29428
29443
  }
29429
29444
 
29430
29445
  // src/commands/github/issue/fixStructure/assertChainTypesExist.ts
@@ -29460,22 +29475,22 @@ function parseTypeChain(value) {
29460
29475
  }
29461
29476
 
29462
29477
  // src/commands/github/issue/fixStructure/printFixStructurePlan.ts
29463
- import chalk185 from "chalk";
29478
+ import chalk186 from "chalk";
29464
29479
  function annotate(entry) {
29465
29480
  const notes = [];
29466
29481
  if (entry.level === null) {
29467
- notes.push(chalk185.red("deeper than the leaf level"));
29482
+ notes.push(chalk186.red("deeper than the leaf level"));
29468
29483
  } else if (entry.typeChange) {
29469
29484
  notes.push(
29470
- chalk185.yellow(
29485
+ chalk186.yellow(
29471
29486
  `${entry.typeChange.from ?? "no type"} -> ${entry.typeChange.to}`
29472
29487
  )
29473
29488
  );
29474
29489
  } else {
29475
- notes.push(chalk185.dim(entry.issue.typeName ?? "no type"));
29490
+ notes.push(chalk186.dim(entry.issue.typeName ?? "no type"));
29476
29491
  }
29477
29492
  for (const label of entry.labelRemovals) {
29478
- notes.push(chalk185.yellow(`-${label.name}`));
29493
+ notes.push(chalk186.yellow(`-${label.name}`));
29479
29494
  }
29480
29495
  return notes;
29481
29496
  }
@@ -29483,22 +29498,22 @@ function formatCount(count10, noun) {
29483
29498
  return `${count10} ${noun}${count10 === 1 ? "" : "s"}`;
29484
29499
  }
29485
29500
  function printFixStructurePlan(plan2, chain2, apply) {
29486
- writeLineNow(chalk185.dim(`chain: ${chain2.join(" > ")}`));
29501
+ writeLineNow(chalk186.dim(`chain: ${chain2.join(" > ")}`));
29487
29502
  for (const entry of plan2.entries) {
29488
29503
  const indent4 = " ".repeat(entry.issue.depth);
29489
- const name = chalk185.cyan(`${entry.issue.repo}#${entry.issue.number}`);
29504
+ const name = chalk186.cyan(`${entry.issue.repo}#${entry.issue.number}`);
29490
29505
  writeLineNow(
29491
29506
  `${indent4}${name} ${entry.issue.title} [${annotate(entry).join(", ")}]`
29492
29507
  );
29493
29508
  }
29494
29509
  if (plan2.typeChangeCount === 0 && plan2.labelRemovalCount === 0) {
29495
- writeLineNow(chalk185.green("Nothing to change"));
29510
+ writeLineNow(chalk186.green("Nothing to change"));
29496
29511
  return;
29497
29512
  }
29498
29513
  writeLineNow(
29499
29514
  `${formatCount(plan2.typeChangeCount, "type change")}, ${formatCount(plan2.labelRemovalCount, "label removal")} planned`
29500
29515
  );
29501
- if (!apply) writeLineNow(chalk185.dim("Dry run \u2014 nothing written"));
29516
+ if (!apply) writeLineNow(chalk186.dim("Dry run \u2014 nothing written"));
29502
29517
  }
29503
29518
 
29504
29519
  // src/commands/github/issue/parseRepoSlug.ts
@@ -30400,17 +30415,17 @@ function slugFromUrl(url) {
30400
30415
  }
30401
30416
 
30402
30417
  // src/commands/github/issue/writeIssueWorkingFile.ts
30403
- import { mkdirSync as mkdirSync22, writeFileSync as writeFileSync35 } from "fs";
30418
+ import { mkdirSync as mkdirSync22, writeFileSync as writeFileSync34 } from "fs";
30404
30419
 
30405
30420
  // src/commands/github/issue/issueWorkingFile.ts
30406
- import { join as join78 } from "path";
30421
+ import { join as join76 } from "path";
30407
30422
  function issueWorkingFile(slug2, number) {
30408
30423
  const [owner = "unknown", repo = "unknown"] = slug2.split("/");
30409
- const dir = join78(getStoreDir(), "github-issues", owner, repo);
30424
+ const dir = join76(getStoreDir(), "github-issues", owner, repo);
30410
30425
  return {
30411
30426
  dir,
30412
- bodyPath: join78(dir, `${number}.md`),
30413
- metaPath: join78(dir, `${number}.json`)
30427
+ bodyPath: join76(dir, `${number}.md`),
30428
+ metaPath: join76(dir, `${number}.json`)
30414
30429
  };
30415
30430
  }
30416
30431
 
@@ -30418,8 +30433,8 @@ function issueWorkingFile(slug2, number) {
30418
30433
  function writeIssueWorkingFile(slug2, number, target, updatedAt, body) {
30419
30434
  const { dir, bodyPath, metaPath } = issueWorkingFile(slug2, number);
30420
30435
  mkdirSync22(dir, { recursive: true });
30421
- writeFileSync35(bodyPath, body);
30422
- writeFileSync35(
30436
+ writeFileSync34(bodyPath, body);
30437
+ writeFileSync34(
30423
30438
  metaPath,
30424
30439
  `${JSON.stringify({ target, updatedAt }, null, 2)}
30425
30440
  `
@@ -30905,25 +30920,25 @@ function registerGithub(program) {
30905
30920
  }
30906
30921
 
30907
30922
  // src/commands/inbox/list.ts
30908
- import chalk186 from "chalk";
30923
+ import chalk187 from "chalk";
30909
30924
  async function list3() {
30910
30925
  const messages = await listInboxMessages(await getDb());
30911
30926
  if (messages.length === 0) {
30912
- console.log(chalk186.dim("No flagged messages; run assist inbox scan"));
30927
+ console.log(chalk187.dim("No flagged messages; run assist inbox scan"));
30913
30928
  return;
30914
30929
  }
30915
30930
  for (const message3 of messages) {
30916
30931
  const when = (message3.receivedAt ?? message3.flaggedAt).toISOString();
30917
30932
  console.log(
30918
- `${chalk186.dim(when)} ${chalk186.cyan(message3.source)} ${chalk186.bold(message3.sender)}`
30933
+ `${chalk187.dim(when)} ${chalk187.cyan(message3.source)} ${chalk187.bold(message3.sender)}`
30919
30934
  );
30920
30935
  console.log(` ${message3.summary}`);
30921
- console.log(` ${chalk186.dim(message3.link)}`);
30936
+ console.log(` ${chalk187.dim(message3.link)}`);
30922
30937
  }
30923
30938
  }
30924
30939
 
30925
30940
  // src/commands/inbox/scan.ts
30926
- import chalk187 from "chalk";
30941
+ import chalk188 from "chalk";
30927
30942
 
30928
30943
  // src/shared/formatTokens.ts
30929
30944
  function formatTokens(n) {
@@ -31056,7 +31071,7 @@ async function scan() {
31056
31071
  )
31057
31072
  });
31058
31073
  console.log(
31059
- `Flagged ${flagged} message(s) needing a reply, ${chalk187.bold(added)} new. ${chalk187.dim(formatScanUsage(usage))}`
31074
+ `Flagged ${flagged} message(s) needing a reply, ${chalk188.bold(added)} new. ${chalk188.dim(formatScanUsage(usage))}`
31060
31075
  );
31061
31076
  }
31062
31077
 
@@ -31071,7 +31086,7 @@ function registerInbox(program) {
31071
31086
  }
31072
31087
 
31073
31088
  // src/commands/jira/acceptanceCriteria.ts
31074
- import chalk188 from "chalk";
31089
+ import chalk189 from "chalk";
31075
31090
 
31076
31091
  // src/commands/jira/adfToText.ts
31077
31092
  function renderInline(node) {
@@ -31138,7 +31153,7 @@ function acceptanceCriteria(issueKey) {
31138
31153
  const parsed = fetchIssue(issueKey, field);
31139
31154
  const acValue = parsed?.fields?.[field];
31140
31155
  if (!acValue) {
31141
- console.log(chalk188.yellow(`No acceptance criteria found on ${issueKey}.`));
31156
+ console.log(chalk189.yellow(`No acceptance criteria found on ${issueKey}.`));
31142
31157
  return;
31143
31158
  }
31144
31159
  if (typeof acValue === "string") {
@@ -31204,14 +31219,14 @@ async function jiraAuth() {
31204
31219
  }
31205
31220
 
31206
31221
  // src/commands/jira/viewIssue.ts
31207
- import chalk189 from "chalk";
31222
+ import chalk190 from "chalk";
31208
31223
  function viewIssue2(issueKey) {
31209
31224
  const parsed = fetchIssue(issueKey, "summary,description");
31210
31225
  const fields = parsed?.fields;
31211
31226
  const summary = fields?.summary;
31212
31227
  const description = fields?.description;
31213
31228
  if (summary) {
31214
- console.log(chalk189.bold(summary));
31229
+ console.log(chalk190.bold(summary));
31215
31230
  }
31216
31231
  if (description) {
31217
31232
  if (summary) console.log();
@@ -31225,7 +31240,7 @@ function viewIssue2(issueKey) {
31225
31240
  }
31226
31241
  if (!summary && !description) {
31227
31242
  console.log(
31228
- chalk189.yellow(`No summary or description found on ${issueKey}.`)
31243
+ chalk190.yellow(`No summary or description found on ${issueKey}.`)
31229
31244
  );
31230
31245
  }
31231
31246
  }
@@ -31319,11 +31334,11 @@ import { existsSync as existsSync64 } from "fs";
31319
31334
  import { basename as basename20, dirname as dirname34 } from "path";
31320
31335
 
31321
31336
  // src/commands/sessions/daemon/worktree/nextWorktreePath.ts
31322
- import { basename as basename19, join as join79 } from "path";
31337
+ import { basename as basename19, join as join77 } from "path";
31323
31338
  function nextWorktreePath(clone, base, isTaken) {
31324
31339
  const name = basename19(clone);
31325
31340
  for (let n = 2; n < 1e3; n++) {
31326
- const candidate = join79(base, `${name}-${n}`);
31341
+ const candidate = join77(base, `${name}-${n}`);
31327
31342
  if (!isTaken(candidate)) return candidate;
31328
31343
  }
31329
31344
  throw new Error(`no free worktree suffix for ${clone}`);
@@ -31586,20 +31601,20 @@ function persistedTreeRoots() {
31586
31601
 
31587
31602
  // src/commands/sessions/daemon/worktree/seedWorktree.ts
31588
31603
  import { copyFileSync, existsSync as existsSync66, mkdirSync as mkdirSync23 } from "fs";
31589
- import { dirname as dirname35, join as join81 } from "path";
31604
+ import { dirname as dirname35, join as join79 } from "path";
31590
31605
 
31591
31606
  // src/commands/sessions/daemon/worktree/runInstall.ts
31592
31607
  import { resolve as resolve21 } from "path";
31593
31608
 
31594
31609
  // src/commands/sessions/daemon/worktree/detectInstallCommand.ts
31595
31610
  import { existsSync as existsSync65 } from "fs";
31596
- import { join as join80 } from "path";
31611
+ import { join as join78 } from "path";
31597
31612
  function detectInstallCommand(dir) {
31598
- if (!existsSync65(join80(dir, "package.json"))) return null;
31599
- if (existsSync65(join80(dir, "pnpm-lock.yaml"))) return "pnpm install";
31600
- if (existsSync65(join80(dir, "yarn.lock"))) return "yarn install";
31601
- if (existsSync65(join80(dir, "bun.lockb"))) return "bun install";
31602
- if (existsSync65(join80(dir, "package-lock.json"))) return "npm ci";
31613
+ if (!existsSync65(join78(dir, "package.json"))) return null;
31614
+ if (existsSync65(join78(dir, "pnpm-lock.yaml"))) return "pnpm install";
31615
+ if (existsSync65(join78(dir, "yarn.lock"))) return "yarn install";
31616
+ if (existsSync65(join78(dir, "bun.lockb"))) return "bun install";
31617
+ if (existsSync65(join78(dir, "package-lock.json"))) return "npm ci";
31603
31618
  return "npm install";
31604
31619
  }
31605
31620
 
@@ -31764,9 +31779,9 @@ function seedWorktree(worktreePath, clone, onSeeded = () => {
31764
31779
  }
31765
31780
  function copyConfigFiles(worktreePath, clone, copy) {
31766
31781
  for (const rel of copy) {
31767
- const src = join81(clone, rel);
31782
+ const src = join79(clone, rel);
31768
31783
  if (!existsSync66(src)) continue;
31769
- const dest = join81(worktreePath, rel);
31784
+ const dest = join79(worktreePath, rel);
31770
31785
  try {
31771
31786
  mkdirSync23(dirname35(dest), { recursive: true });
31772
31787
  copyFileSync(src, dest);
@@ -31932,7 +31947,7 @@ function worktreeHoldingBranch(cwd, branch2) {
31932
31947
  }
31933
31948
 
31934
31949
  // src/commands/review/failCheckout.ts
31935
- import chalk190 from "chalk";
31950
+ import chalk191 from "chalk";
31936
31951
 
31937
31952
  // src/commands/review/azCliProblem.ts
31938
31953
  import { execFileSync as execFileSync16 } from "child_process";
@@ -31985,14 +32000,14 @@ function failCheckout(number, headRef, stale, from, checkout) {
31985
32000
  gitSyncOrNull(process.cwd(), ["checkout", "--quiet", from]);
31986
32001
  if (headRef && stale === "local-work")
31987
32002
  console.error(
31988
- chalk190.red(
32003
+ chalk191.red(
31989
32004
  `Local branch ${headRef} has commits that are not on the remote and cannot fast-forward to PR #${number}'s head; push or reset ${headRef}, then retry.`
31990
32005
  )
31991
32006
  );
31992
32007
  const problem = checkout.file === "az" ? azCliProblem() : null;
31993
- if (problem) console.error(chalk190.red(problem));
32008
+ if (problem) console.error(chalk191.red(problem));
31994
32009
  console.error(
31995
- chalk190.red(`${checkout.file} ${checkout.args.join(" ")} failed; aborting.`)
32010
+ chalk191.red(`${checkout.file} ${checkout.args.join(" ")} failed; aborting.`)
31996
32011
  );
31997
32012
  process.exit(1);
31998
32013
  }
@@ -32174,18 +32189,18 @@ function registerList(program) {
32174
32189
  }
32175
32190
 
32176
32191
  // src/commands/litellm/listModels.ts
32177
- import chalk192 from "chalk";
32192
+ import chalk193 from "chalk";
32178
32193
 
32179
32194
  // src/commands/litellm/resolveLitellmConfig.ts
32180
- import chalk191 from "chalk";
32195
+ import chalk192 from "chalk";
32181
32196
  function resolveLitellmConfig() {
32182
32197
  const { config, missing } = readLitellmConfig();
32183
32198
  if (!config) {
32184
- console.error(chalk191.red("LiteLLM is not configured"));
32199
+ console.error(chalk192.red("LiteLLM is not configured"));
32185
32200
  for (const key of missing) {
32186
32201
  const entry = litellmConfigHelp.find((help) => help.key === key);
32187
32202
  console.error(
32188
- chalk191.red(` ${key} is not set. Set it with: ${entry?.setter}`)
32203
+ chalk192.red(` ${key} is not set. Set it with: ${entry?.setter}`)
32189
32204
  );
32190
32205
  }
32191
32206
  process.exit(1);
@@ -32211,13 +32226,13 @@ async function listModels(options2) {
32211
32226
  } catch (error) {
32212
32227
  const reason4 = error instanceof Error ? error.message : String(error);
32213
32228
  console.error(
32214
- chalk192.red(`Failed to reach LiteLLM at ${baseUrl}: ${reason4}`)
32229
+ chalk193.red(`Failed to reach LiteLLM at ${baseUrl}: ${reason4}`)
32215
32230
  );
32216
32231
  process.exit(1);
32217
32232
  }
32218
32233
  const body = await response.text();
32219
32234
  if (!response.ok) {
32220
- console.error(chalk192.red(`LiteLLM returned ${response.status}: ${body}`));
32235
+ console.error(chalk193.red(`LiteLLM returned ${response.status}: ${body}`));
32221
32236
  process.exit(1);
32222
32237
  }
32223
32238
  if (options2.json) {
@@ -32237,15 +32252,15 @@ function registerLitellm(program) {
32237
32252
  // src/commands/mermaidExport.ts
32238
32253
  import { mkdirSync as mkdirSync24, readdirSync as readdirSync15 } from "fs";
32239
32254
  import { resolve as resolve23 } from "path";
32240
- import chalk195 from "chalk";
32255
+ import chalk196 from "chalk";
32241
32256
 
32242
32257
  // src/commands/mermaid/exportFile.ts
32243
- import { readFileSync as readFileSync45, writeFileSync as writeFileSync36 } from "fs";
32258
+ import { readFileSync as readFileSync45, writeFileSync as writeFileSync35 } from "fs";
32244
32259
  import { basename as basename21, extname as extname4, resolve as resolve22 } from "path";
32245
- import chalk194 from "chalk";
32260
+ import chalk195 from "chalk";
32246
32261
 
32247
32262
  // src/commands/mermaid/renderBlock.ts
32248
- import chalk193 from "chalk";
32263
+ import chalk194 from "chalk";
32249
32264
  async function renderBlock(krokiUrl, source) {
32250
32265
  const response = await fetch(`${krokiUrl}/mermaid/svg`, {
32251
32266
  method: "POST",
@@ -32254,7 +32269,7 @@ async function renderBlock(krokiUrl, source) {
32254
32269
  });
32255
32270
  if (!response.ok) {
32256
32271
  console.error(
32257
- chalk193.red(
32272
+ chalk194.red(
32258
32273
  `Kroki request failed: ${response.status} ${response.statusText}`
32259
32274
  )
32260
32275
  );
@@ -32272,27 +32287,27 @@ async function exportFile(file, outDir, krokiUrl, onlyIndex) {
32272
32287
  if (onlyIndex !== void 0) {
32273
32288
  if (onlyIndex < 1 || onlyIndex > blocks.length) {
32274
32289
  console.error(
32275
- chalk194.red(
32290
+ chalk195.red(
32276
32291
  `${file}: --index ${onlyIndex} out of range (file has ${blocks.length} diagram(s))`
32277
32292
  )
32278
32293
  );
32279
32294
  process.exit(1);
32280
32295
  }
32281
32296
  console.log(
32282
- chalk194.gray(
32297
+ chalk195.gray(
32283
32298
  `${file} \u2014 rendering diagram ${onlyIndex} of ${blocks.length}`
32284
32299
  )
32285
32300
  );
32286
32301
  } else {
32287
- console.log(chalk194.gray(`${file} \u2014 ${blocks.length} diagram(s)`));
32302
+ console.log(chalk195.gray(`${file} \u2014 ${blocks.length} diagram(s)`));
32288
32303
  }
32289
32304
  for (const [i, source] of blocks.entries()) {
32290
32305
  const idx = i + 1;
32291
32306
  if (onlyIndex !== void 0 && idx !== onlyIndex) continue;
32292
32307
  const outPath = resolve22(outDir, `${stem}-${idx}.svg`);
32293
32308
  const svg = await renderBlock(krokiUrl, source);
32294
- writeFileSync36(outPath, svg, "utf8");
32295
- console.log(chalk194.green(` \u2192 ${outPath}`));
32309
+ writeFileSync35(outPath, svg, "utf8");
32310
+ console.log(chalk195.green(` \u2192 ${outPath}`));
32296
32311
  }
32297
32312
  }
32298
32313
  function extractMermaidBlocks(markdown) {
@@ -32308,18 +32323,18 @@ async function mermaidExport(file, options2 = {}) {
32308
32323
  if (options2.index !== void 0) {
32309
32324
  if (!Number.isInteger(options2.index) || options2.index < 1) {
32310
32325
  console.error(
32311
- chalk195.red(`--index must be a positive integer (got ${options2.index})`)
32326
+ chalk196.red(`--index must be a positive integer (got ${options2.index})`)
32312
32327
  );
32313
32328
  process.exit(1);
32314
32329
  }
32315
32330
  if (!file) {
32316
- console.error(chalk195.red("--index requires a file argument"));
32331
+ console.error(chalk196.red("--index requires a file argument"));
32317
32332
  process.exit(1);
32318
32333
  }
32319
32334
  }
32320
32335
  const files = file ? [file] : readdirSync15(process.cwd()).filter((name) => name.toLowerCase().endsWith(".md")).sort();
32321
32336
  if (files.length === 0) {
32322
- console.log(chalk195.gray("No markdown files found in current directory."));
32337
+ console.log(chalk196.gray("No markdown files found in current directory."));
32323
32338
  return;
32324
32339
  }
32325
32340
  for (const f of files) {
@@ -32399,7 +32414,7 @@ function boardSource(raw, anchorId, options2) {
32399
32414
  import { stringify as stringify2 } from "yaml";
32400
32415
 
32401
32416
  // src/commands/miro/writeExtract.ts
32402
- import { mkdirSync as mkdirSync25, writeFileSync as writeFileSync37 } from "fs";
32417
+ import { mkdirSync as mkdirSync25, writeFileSync as writeFileSync36 } from "fs";
32403
32418
  import { dirname as dirname36 } from "path";
32404
32419
  import { stringify } from "yaml";
32405
32420
  function headerLines(header) {
@@ -32414,7 +32429,7 @@ function headerLines(header) {
32414
32429
  }
32415
32430
  function writeExtract(file, header, texts) {
32416
32431
  mkdirSync25(dirname36(file), { recursive: true });
32417
- writeFileSync37(file, `${headerLines(header).join("\n")}
32432
+ writeFileSync36(file, `${headerLines(header).join("\n")}
32418
32433
  ${stringify(texts)}`);
32419
32434
  }
32420
32435
 
@@ -32465,7 +32480,7 @@ function extractToSave(details, cwd = process.cwd()) {
32465
32480
  }
32466
32481
 
32467
32482
  // src/commands/miro/keptTexts.ts
32468
- import chalk196 from "chalk";
32483
+ import chalk197 from "chalk";
32469
32484
 
32470
32485
  // src/commands/miro/applyIgnore.ts
32471
32486
  function applyIgnore(texts, ignore3) {
@@ -32504,7 +32519,7 @@ function warnUnmatched(file, unmatched) {
32504
32519
  if (unmatched.length === 0) return;
32505
32520
  const entries = unmatched.map((entry) => ` - ${entry}`).join("\n");
32506
32521
  console.error(
32507
- chalk196.yellow(
32522
+ chalk197.yellow(
32508
32523
  `${unmatched.length} ${unmatched.length === 1 ? "entry" : "entries"} in ${file} matched no box text:
32509
32524
  ${entries}`
32510
32525
  )
@@ -32705,7 +32720,7 @@ function readMiroItems(file) {
32705
32720
  }
32706
32721
 
32707
32722
  // src/commands/miro/resolveExtractOptions.ts
32708
- import chalk197 from "chalk";
32723
+ import chalk198 from "chalk";
32709
32724
 
32710
32725
  // src/commands/miro/extractLayers.ts
32711
32726
  function extractsIn(layer) {
@@ -32783,7 +32798,7 @@ function resolveExtractOptions(name, options2, paths) {
32783
32798
  paths.cwd,
32784
32799
  paths.globalConfigPath
32785
32800
  );
32786
- console.error(chalk197.dim(`Extract "${name}" from ${resolved.from}`));
32801
+ console.error(chalk198.dim(`Extract "${name}" from ${resolved.from}`));
32787
32802
  return resolved.options;
32788
32803
  }
32789
32804
 
@@ -32888,7 +32903,7 @@ function registerMiro(program) {
32888
32903
  import { mkdir as mkdir6 } from "fs/promises";
32889
32904
  import { createServer as createServer2 } from "http";
32890
32905
  import { dirname as dirname38 } from "path";
32891
- import chalk199 from "chalk";
32906
+ import chalk200 from "chalk";
32892
32907
 
32893
32908
  // src/commands/netcap/corsHeaders.ts
32894
32909
  var corsHeaders = {
@@ -32966,15 +32981,15 @@ function createNetcapHandler(options2) {
32966
32981
  // src/commands/netcap/prepareExtensionForLoad.ts
32967
32982
  import { cp as cp4, readFile as readFile7, writeFile as writeFile6 } from "fs/promises";
32968
32983
  import { networkInterfaces } from "os";
32969
- import { join as join83 } from "path";
32970
- import chalk198 from "chalk";
32984
+ import { join as join81 } from "path";
32985
+ import chalk199 from "chalk";
32971
32986
 
32972
32987
  // src/commands/netcap/netcapExtensionDir.ts
32973
- import { dirname as dirname37, join as join82 } from "path";
32988
+ import { dirname as dirname37, join as join80 } from "path";
32974
32989
  import { fileURLToPath as fileURLToPath7 } from "url";
32975
32990
  var moduleDir2 = dirname37(fileURLToPath7(import.meta.url));
32976
32991
  function netcapExtensionDir() {
32977
- return join82(moduleDir2, "commands", "netcap", "netcap-extension");
32992
+ return join80(moduleDir2, "commands", "netcap", "netcap-extension");
32978
32993
  }
32979
32994
 
32980
32995
  // src/commands/netcap/prepareExtensionForLoad.ts
@@ -32989,7 +33004,7 @@ function lanIPv4() {
32989
33004
  return void 0;
32990
33005
  }
32991
33006
  async function configureBackground(dir, host, port, filter) {
32992
- const file = join83(dir, "background.js");
33007
+ const file = join81(dir, "background.js");
32993
33008
  const source = await readFile7(file, "utf8");
32994
33009
  await writeFile6(
32995
33010
  file,
@@ -33011,7 +33026,7 @@ async function prepareExtensionForLoad(port, filter = "") {
33011
33026
  const host = lanIPv4();
33012
33027
  if (!host) {
33013
33028
  console.log(
33014
- chalk198.yellow("could not determine the WSL IP for the extension")
33029
+ chalk199.yellow("could not determine the WSL IP for the extension")
33015
33030
  );
33016
33031
  await configureBackground(source, "127.0.0.1", port, filter);
33017
33032
  return source;
@@ -33022,27 +33037,27 @@ async function prepareExtensionForLoad(port, filter = "") {
33022
33037
  return WSL_WINDOWS_PATH3;
33023
33038
  } catch {
33024
33039
  console.log(
33025
- chalk198.yellow(`could not copy extension to ${WSL_WINDOWS_PATH3}`)
33040
+ chalk199.yellow(`could not copy extension to ${WSL_WINDOWS_PATH3}`)
33026
33041
  );
33027
33042
  return source;
33028
33043
  }
33029
33044
  }
33030
33045
 
33031
33046
  // src/commands/netcap/resolveNetcapOutPath.ts
33032
- import { isAbsolute as isAbsolute5, join as join85, resolve as resolve25 } from "path";
33047
+ import { isAbsolute as isAbsolute5, join as join83, resolve as resolve25 } from "path";
33033
33048
 
33034
33049
  // src/commands/netcap/defaultCapturePath.ts
33035
- import { homedir as homedir25 } from "os";
33036
- import { join as join84 } from "path";
33050
+ import { homedir as homedir24 } from "os";
33051
+ import { join as join82 } from "path";
33037
33052
  function defaultCapturePath() {
33038
- return join84(homedir25(), ".assist", "netcap", "capture.jsonl");
33053
+ return join82(homedir24(), ".assist", "netcap", "capture.jsonl");
33039
33054
  }
33040
33055
 
33041
33056
  // src/commands/netcap/resolveNetcapOutPath.ts
33042
33057
  function resolveNetcapOutPath(out) {
33043
33058
  if (!out) return defaultCapturePath();
33044
33059
  const dir = isAbsolute5(out) ? out : resolve25(process.cwd(), out);
33045
- return join85(dir, "capture.jsonl");
33060
+ return join83(dir, "capture.jsonl");
33046
33061
  }
33047
33062
 
33048
33063
  // src/commands/netcap/netcap.ts
@@ -33055,30 +33070,30 @@ async function netcap(options2) {
33055
33070
  let count10 = 0;
33056
33071
  const handler = createNetcapHandler({
33057
33072
  outPath,
33058
- onPing: () => console.log(chalk199.dim("ping from extension")),
33073
+ onPing: () => console.log(chalk200.dim("ping from extension")),
33059
33074
  onCapture: (entry) => {
33060
33075
  count10 += 1;
33061
33076
  console.log(
33062
- chalk199.green(`captured #${count10}`),
33063
- chalk199.dim(`${entry.method ?? "?"} ${entry.url ?? "?"}`)
33077
+ chalk200.green(`captured #${count10}`),
33078
+ chalk200.dim(`${entry.method ?? "?"} ${entry.url ?? "?"}`)
33064
33079
  );
33065
33080
  }
33066
33081
  });
33067
33082
  const server = createServer2(handler);
33068
33083
  server.listen(port, () => {
33069
33084
  console.log(
33070
- chalk199.bold(`netcap receiver listening on http://127.0.0.1:${port}`)
33085
+ chalk200.bold(`netcap receiver listening on http://127.0.0.1:${port}`)
33071
33086
  );
33072
- console.log(chalk199.dim(`appending captures to ${outPath}`));
33087
+ console.log(chalk200.dim(`appending captures to ${outPath}`));
33073
33088
  if (filter)
33074
- console.log(chalk199.dim(`forwarding only URLs matching "${filter}"`));
33075
- console.log(chalk199.dim(`load the unpacked extension from ${extensionPath}`));
33076
- console.log(chalk199.dim("press Ctrl-C to stop"));
33089
+ console.log(chalk200.dim(`forwarding only URLs matching "${filter}"`));
33090
+ console.log(chalk200.dim(`load the unpacked extension from ${extensionPath}`));
33091
+ console.log(chalk200.dim("press Ctrl-C to stop"));
33077
33092
  });
33078
33093
  process.on("SIGINT", () => {
33079
33094
  server.close();
33080
33095
  console.log(
33081
- chalk199.bold(
33096
+ chalk200.bold(
33082
33097
  `
33083
33098
  netcap stopped \u2014 captured ${count10} ${count10 === 1 ? "entry" : "entries"} to ${outPath}`
33084
33099
  )
@@ -33088,9 +33103,9 @@ netcap stopped \u2014 captured ${count10} ${count10 === 1 ? "entry" : "entries"}
33088
33103
  }
33089
33104
 
33090
33105
  // src/commands/netcap/netcapExtract.ts
33091
- import { writeFileSync as writeFileSync38 } from "fs";
33092
- import { join as join86 } from "path";
33093
- import chalk200 from "chalk";
33106
+ import { writeFileSync as writeFileSync37 } from "fs";
33107
+ import { join as join84 } from "path";
33108
+ import chalk201 from "chalk";
33094
33109
 
33095
33110
  // src/commands/netcap/extractPostsFromCapture.ts
33096
33111
  import { readFileSync as readFileSync48 } from "fs";
@@ -33534,12 +33549,12 @@ function extractPostsFromCapture(captureFile) {
33534
33549
  function netcapExtract(file) {
33535
33550
  const captureFile = file ?? defaultCapturePath();
33536
33551
  const posts = extractPostsFromCapture(captureFile);
33537
- const outFile = join86(captureFile, "..", "posts.json");
33538
- writeFileSync38(outFile, `${JSON.stringify(posts, null, 2)}
33552
+ const outFile = join84(captureFile, "..", "posts.json");
33553
+ writeFileSync37(outFile, `${JSON.stringify(posts, null, 2)}
33539
33554
  `);
33540
33555
  console.log(
33541
- chalk200.green(`extracted ${posts.length} posts`),
33542
- chalk200.dim(`-> ${outFile}`)
33556
+ chalk201.green(`extracted ${posts.length} posts`),
33557
+ chalk201.dim(`-> ${outFile}`)
33543
33558
  );
33544
33559
  }
33545
33560
 
@@ -33560,7 +33575,7 @@ function registerNetcap(program) {
33560
33575
  }
33561
33576
 
33562
33577
  // src/commands/news/add.ts
33563
- import chalk201 from "chalk";
33578
+ import chalk202 from "chalk";
33564
33579
  import enquirer8 from "enquirer";
33565
33580
  async function add2(url) {
33566
33581
  if (!url) {
@@ -33581,25 +33596,25 @@ async function add2(url) {
33581
33596
  }
33582
33597
  const added = await addFeed(await getDb(), url);
33583
33598
  if (!added) {
33584
- console.log(chalk201.yellow("Feed already exists"));
33599
+ console.log(chalk202.yellow("Feed already exists"));
33585
33600
  return;
33586
33601
  }
33587
- console.log(chalk201.green(`Added feed: ${url}`));
33602
+ console.log(chalk202.green(`Added feed: ${url}`));
33588
33603
  }
33589
33604
 
33590
33605
  // src/commands/news/list.ts
33591
- import chalk202 from "chalk";
33606
+ import chalk203 from "chalk";
33592
33607
  async function list4() {
33593
33608
  const urls = await listFeeds(await getDb());
33594
33609
  if (urls.length === 0) {
33595
- console.log(chalk202.dim("No feeds; add one with assist news add <url>"));
33610
+ console.log(chalk203.dim("No feeds; add one with assist news add <url>"));
33596
33611
  return;
33597
33612
  }
33598
33613
  for (const url of urls) console.log(url);
33599
33614
  }
33600
33615
 
33601
33616
  // src/commands/news/remove.ts
33602
- import chalk203 from "chalk";
33617
+ import chalk204 from "chalk";
33603
33618
 
33604
33619
  // src/commands/backlog/removeFeed.ts
33605
33620
  import { eq as eq56 } from "drizzle-orm";
@@ -33612,10 +33627,10 @@ async function removeFeed(db, url) {
33612
33627
  async function remove(url) {
33613
33628
  const removed = await removeFeed(await getDb(), url);
33614
33629
  if (!removed) {
33615
- console.log(chalk203.yellow(`No feed matches ${url}`));
33630
+ console.log(chalk204.yellow(`No feed matches ${url}`));
33616
33631
  return;
33617
33632
  }
33618
- console.log(chalk203.green(`Removed feed: ${url}`));
33633
+ console.log(chalk204.green(`Removed feed: ${url}`));
33619
33634
  }
33620
33635
 
33621
33636
  // src/commands/registerNews.ts
@@ -33668,7 +33683,7 @@ function registerPiHook(program) {
33668
33683
  }
33669
33684
 
33670
33685
  // src/commands/prompts/printPromptsTable.ts
33671
- import chalk204 from "chalk";
33686
+ import chalk205 from "chalk";
33672
33687
  function truncate2(str, max) {
33673
33688
  if (str.length <= max) return str;
33674
33689
  return `${str.slice(0, max - 1)}\u2026`;
@@ -33686,14 +33701,14 @@ function printPromptsTable(rows) {
33686
33701
  "Command".padEnd(commandWidth),
33687
33702
  "Repos"
33688
33703
  ].join(" ");
33689
- console.log(chalk204.dim(header));
33690
- console.log(chalk204.dim("-".repeat(header.length)));
33704
+ console.log(chalk205.dim(header));
33705
+ console.log(chalk205.dim("-".repeat(header.length)));
33691
33706
  for (const row3 of rows) {
33692
33707
  const count10 = String(row3.count).padStart(countWidth);
33693
33708
  const tool = row3.tool.padEnd(toolWidth);
33694
33709
  const command = truncate2(row3.command, 60).padEnd(commandWidth);
33695
33710
  console.log(
33696
- `${chalk204.yellow(count10)} ${tool} ${command} ${chalk204.dim(row3.repos)}`
33711
+ `${chalk205.yellow(count10)} ${tool} ${command} ${chalk205.dim(row3.repos)}`
33697
33712
  );
33698
33713
  }
33699
33714
  }
@@ -33731,13 +33746,13 @@ import { execSync as execSync44 } from "child_process";
33731
33746
  import enquirer9 from "enquirer";
33732
33747
 
33733
33748
  // src/commands/prs/prs/displayPaginated/printPr.ts
33734
- import chalk205 from "chalk";
33749
+ import chalk206 from "chalk";
33735
33750
  var STATUS_MAP = {
33736
- MERGED: (pr) => pr.mergedAt ? { label: chalk205.magenta("merged"), date: pr.mergedAt } : null,
33737
- CLOSED: (pr) => pr.closedAt ? { label: chalk205.red("closed"), date: pr.closedAt } : null
33751
+ MERGED: (pr) => pr.mergedAt ? { label: chalk206.magenta("merged"), date: pr.mergedAt } : null,
33752
+ CLOSED: (pr) => pr.closedAt ? { label: chalk206.red("closed"), date: pr.closedAt } : null
33738
33753
  };
33739
33754
  function defaultStatus(pr) {
33740
- return { label: chalk205.green("opened"), date: pr.createdAt };
33755
+ return { label: chalk206.green("opened"), date: pr.createdAt };
33741
33756
  }
33742
33757
  function getStatus(pr) {
33743
33758
  return STATUS_MAP[pr.state]?.(pr) ?? defaultStatus(pr);
@@ -33746,11 +33761,11 @@ function formatDate2(dateStr) {
33746
33761
  return new Date(dateStr).toISOString().split("T")[0];
33747
33762
  }
33748
33763
  function formatPrHeader(pr, status2) {
33749
- return `${chalk205.cyan(`#${pr.number}`)} ${pr.title} ${chalk205.dim(`(${pr.author.login},`)} ${status2.label} ${chalk205.dim(`${formatDate2(status2.date)})`)}`;
33764
+ return `${chalk206.cyan(`#${pr.number}`)} ${pr.title} ${chalk206.dim(`(${pr.author.login},`)} ${status2.label} ${chalk206.dim(`${formatDate2(status2.date)})`)}`;
33750
33765
  }
33751
33766
  function logPrDetails(pr) {
33752
33767
  console.log(
33753
- chalk205.dim(` ${pr.changedFiles.toLocaleString()} files | ${pr.url}`)
33768
+ chalk206.dim(` ${pr.changedFiles.toLocaleString()} files | ${pr.url}`)
33754
33769
  );
33755
33770
  console.log();
33756
33771
  }
@@ -33929,11 +33944,11 @@ async function comment2(path109, line, body, options2 = {}) {
33929
33944
  }
33930
33945
 
33931
33946
  // src/commands/prs/commentsCachePath.ts
33932
- import { homedir as homedir26 } from "os";
33933
- import { join as join87 } from "path";
33947
+ import { homedir as homedir25 } from "os";
33948
+ import { join as join85 } from "path";
33934
33949
  function commentsCachePath(org, repo, prNumber) {
33935
- return join87(
33936
- homedir26(),
33950
+ return join85(
33951
+ homedir25(),
33937
33952
  ".assist",
33938
33953
  "pr-comments",
33939
33954
  org,
@@ -33943,7 +33958,7 @@ function commentsCachePath(org, repo, prNumber) {
33943
33958
  }
33944
33959
 
33945
33960
  // src/commands/prs/listComments/updateCommentsCache.ts
33946
- import { mkdirSync as mkdirSync26, writeFileSync as writeFileSync39 } from "fs";
33961
+ import { mkdirSync as mkdirSync26, writeFileSync as writeFileSync38 } from "fs";
33947
33962
  import { dirname as dirname39 } from "path";
33948
33963
  import { stringify as stringify3 } from "yaml";
33949
33964
 
@@ -33968,10 +33983,10 @@ function deleteCommentsCache(org, repo, prNumber) {
33968
33983
 
33969
33984
  // src/commands/prs/removeStaleCommentsCaches.ts
33970
33985
  import { readdirSync as readdirSync16, unlinkSync as unlinkSync15 } from "fs";
33971
- import { join as join88 } from "path";
33986
+ import { join as join86 } from "path";
33972
33987
  var STALE_PATTERN = /^pr-\d+-comments\.yaml$/;
33973
33988
  function removeStaleCommentsCaches(cwd = process.cwd()) {
33974
- const dir = join88(cwd, ".assist");
33989
+ const dir = join86(cwd, ".assist");
33975
33990
  let entries;
33976
33991
  try {
33977
33992
  entries = readdirSync16(dir);
@@ -33979,7 +33994,7 @@ function removeStaleCommentsCaches(cwd = process.cwd()) {
33979
33994
  return;
33980
33995
  }
33981
33996
  for (const entry of entries.filter((e) => STALE_PATTERN.test(e))) {
33982
- unlinkSync15(join88(dir, entry));
33997
+ unlinkSync15(join86(dir, entry));
33983
33998
  }
33984
33999
  }
33985
34000
 
@@ -33992,7 +34007,7 @@ function writeCommentsCache(org, repo, prNumber, comments3) {
33992
34007
  fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
33993
34008
  comments: comments3
33994
34009
  };
33995
- writeFileSync39(cachePath, stringify3(cacheData));
34010
+ writeFileSync38(cachePath, stringify3(cacheData));
33996
34011
  }
33997
34012
  function updateCommentsCache(org, repo, prNumber, comments3) {
33998
34013
  removeStaleCommentsCaches();
@@ -34095,9 +34110,9 @@ function failAzureDevops(error) {
34095
34110
 
34096
34111
  // src/commands/prs/azureDevops/invokeAzDevops.ts
34097
34112
  import { execFileSync as execFileSync19 } from "child_process";
34098
- import { mkdtempSync as mkdtempSync2, rmSync as rmSync6, writeFileSync as writeFileSync40 } from "fs";
34113
+ import { mkdtempSync as mkdtempSync2, rmSync as rmSync6, writeFileSync as writeFileSync39 } from "fs";
34099
34114
  import { tmpdir as tmpdir6 } from "os";
34100
- import { join as join89 } from "path";
34115
+ import { join as join87 } from "path";
34101
34116
  function azDevopsInvokeArgs(request, inFile) {
34102
34117
  return [
34103
34118
  "devops",
@@ -34132,10 +34147,10 @@ function runAz2(args) {
34132
34147
  }
34133
34148
  function invokeAzDevops(request) {
34134
34149
  if (request.body === void 0) return runAz2(azDevopsInvokeArgs(request));
34135
- const dir = mkdtempSync2(join89(tmpdir6(), "assist-az-"));
34136
- const inFile = join89(dir, "body.json");
34150
+ const dir = mkdtempSync2(join87(tmpdir6(), "assist-az-"));
34151
+ const inFile = join87(dir, "body.json");
34137
34152
  try {
34138
- writeFileSync40(inFile, JSON.stringify(request.body));
34153
+ writeFileSync39(inFile, JSON.stringify(request.body));
34139
34154
  return runAz2(azDevopsInvokeArgs(request, inFile));
34140
34155
  } finally {
34141
34156
  rmSync6(dir, { recursive: true, force: true });
@@ -34319,13 +34334,13 @@ function agentFooter(unresolvedCount) {
34319
34334
  }
34320
34335
 
34321
34336
  // src/commands/prs/listComments/commentStyle.ts
34322
- import chalk206 from "chalk";
34337
+ import chalk207 from "chalk";
34323
34338
  var plain = (text20) => text20;
34324
34339
  function colouredState(state) {
34325
34340
  const label = `[${state}]`;
34326
- if (state === "APPROVED") return chalk206.green(label);
34327
- if (state === "CHANGES_REQUESTED") return chalk206.red(label);
34328
- return chalk206.yellow(label);
34341
+ if (state === "APPROVED") return chalk207.green(label);
34342
+ if (state === "CHANGES_REQUESTED") return chalk207.red(label);
34343
+ return chalk207.yellow(label);
34329
34344
  }
34330
34345
  function commentStyle() {
34331
34346
  if (isClaudeCode()) {
@@ -34339,9 +34354,9 @@ function commentStyle() {
34339
34354
  };
34340
34355
  }
34341
34356
  return {
34342
- cyan: chalk206.cyan,
34343
- bold: chalk206.bold,
34344
- dim: chalk206.dim,
34357
+ cyan: chalk207.cyan,
34358
+ bold: chalk207.bold,
34359
+ dim: chalk207.dim,
34345
34360
  state: colouredState,
34346
34361
  diffHunk: true,
34347
34362
  agent: false
@@ -35815,16 +35830,16 @@ function buildPrsStatusReport(repoArguments, now = Date.now()) {
35815
35830
  }
35816
35831
 
35817
35832
  // src/commands/prs/status/printPrsStatus.ts
35818
- import chalk208 from "chalk";
35833
+ import chalk209 from "chalk";
35819
35834
 
35820
35835
  // src/commands/prs/status/printPrStatus.ts
35821
- import chalk207 from "chalk";
35836
+ import chalk208 from "chalk";
35822
35837
  function flags(pr) {
35823
35838
  const markers = [];
35824
35839
  if (pr.isDraft) markers.push("draft");
35825
35840
  if (pr.isDoNotMerge) markers.push("do not merge");
35826
35841
  if (pr.isBot) markers.push("bot");
35827
- return markers.length ? ` ${chalk207.yellow(`[${markers.join(", ")}]`)}` : "";
35842
+ return markers.length ? ` ${chalk208.yellow(`[${markers.join(", ")}]`)}` : "";
35828
35843
  }
35829
35844
  function updated(pr) {
35830
35845
  return pr.ageHours === null ? "updated unknown" : `updated ${pr.age} ago`;
@@ -35838,35 +35853,35 @@ function reviewLine(pr) {
35838
35853
  function checkLines(pr) {
35839
35854
  const lines2 = [];
35840
35855
  if (pr.checks.failing.length) {
35841
- lines2.push(chalk207.red(`failing: ${pr.checks.failing.join(", ")}`));
35856
+ lines2.push(chalk208.red(`failing: ${pr.checks.failing.join(", ")}`));
35842
35857
  }
35843
35858
  if (pr.checks.pending.length) {
35844
- lines2.push(chalk207.yellow(`pending: ${pr.checks.pending.join(", ")}`));
35859
+ lines2.push(chalk208.yellow(`pending: ${pr.checks.pending.join(", ")}`));
35845
35860
  }
35846
35861
  return lines2;
35847
35862
  }
35848
35863
  function threadsLine(pr) {
35849
35864
  if (pr.unresolvedThreads === null) {
35850
- return chalk207.dim("unresolved comments: unknown");
35865
+ return chalk208.dim("unresolved comments: unknown");
35851
35866
  }
35852
35867
  if (pr.unresolvedThreads === 0) return null;
35853
- return chalk207.yellow(`unresolved comments: ${pr.unresolvedThreads}`);
35868
+ return chalk208.yellow(`unresolved comments: ${pr.unresolvedThreads}`);
35854
35869
  }
35855
35870
  function mergeableLine(pr) {
35856
- if (pr.mergeable === "CONFLICTING") return chalk207.red("conflicting");
35871
+ if (pr.mergeable === "CONFLICTING") return chalk208.red("conflicting");
35857
35872
  if (pr.mergeable === "MERGEABLE") return null;
35858
- return chalk207.dim(`mergeable: ${pr.mergeable.toLowerCase()}`);
35873
+ return chalk208.dim(`mergeable: ${pr.mergeable.toLowerCase()}`);
35859
35874
  }
35860
35875
  function printPrStatus(pr) {
35861
35876
  console.log(
35862
- ` ${chalk207.cyan(`#${pr.number}`)} ${pr.title} ${chalk207.dim(`(${pr.author}, ${updated(pr)})`)}${flags(pr)}`
35877
+ ` ${chalk208.cyan(`#${pr.number}`)} ${pr.title} ${chalk208.dim(`(${pr.author}, ${updated(pr)})`)}${flags(pr)}`
35863
35878
  );
35864
35879
  const details = [
35865
35880
  reviewLine(pr),
35866
35881
  ...checkLines(pr),
35867
35882
  threadsLine(pr),
35868
35883
  mergeableLine(pr),
35869
- chalk207.dim(pr.url)
35884
+ chalk208.dim(pr.url)
35870
35885
  ];
35871
35886
  for (const detail of details) {
35872
35887
  if (detail) console.log(` ${detail}`);
@@ -35877,17 +35892,17 @@ function printPrStatus(pr) {
35877
35892
  function printPrsStatus(report) {
35878
35893
  for (const repo of report.repos) {
35879
35894
  const count10 = repo.pullRequests.length;
35880
- console.log(`${chalk208.bold(repo.repo)} ${chalk208.dim(`(${count10} open)`)}`);
35895
+ console.log(`${chalk209.bold(repo.repo)} ${chalk209.dim(`(${count10} open)`)}`);
35881
35896
  for (const pr of repo.pullRequests) {
35882
35897
  printPrStatus(pr);
35883
35898
  }
35884
- if (count10 === 0) console.log(chalk208.dim(" no open pull requests"));
35899
+ if (count10 === 0) console.log(chalk209.dim(" no open pull requests"));
35885
35900
  console.log();
35886
35901
  }
35887
35902
  if (report.errors.length === 0) return;
35888
- console.log(chalk208.bold("Errors"));
35903
+ console.log(chalk209.bold("Errors"));
35889
35904
  for (const failure of report.errors) {
35890
- console.log(` ${chalk208.red(failure.repo)}: ${failure.error}`);
35905
+ console.log(` ${chalk209.red(failure.repo)}: ${failure.error}`);
35891
35906
  }
35892
35907
  console.log();
35893
35908
  }
@@ -36115,10 +36130,10 @@ function registerPrs(program) {
36115
36130
  }
36116
36131
 
36117
36132
  // src/commands/ravendb/ravendbAuth.ts
36118
- import chalk214 from "chalk";
36133
+ import chalk215 from "chalk";
36119
36134
 
36120
36135
  // src/shared/createConnectionAuth.ts
36121
- import chalk209 from "chalk";
36136
+ import chalk210 from "chalk";
36122
36137
  function listConnections(connections, format3) {
36123
36138
  if (connections.length === 0) {
36124
36139
  console.log("No connections configured.");
@@ -36131,7 +36146,7 @@ function listConnections(connections, format3) {
36131
36146
  function removeConnection(connections, name, save) {
36132
36147
  const filtered = connections.filter((c) => c.name !== name);
36133
36148
  if (filtered.length === connections.length) {
36134
- console.error(chalk209.red(`Connection "${name}" not found.`));
36149
+ console.error(chalk210.red(`Connection "${name}" not found.`));
36135
36150
  process.exit(1);
36136
36151
  }
36137
36152
  save(filtered);
@@ -36177,15 +36192,15 @@ function saveConnections(connections) {
36177
36192
  }
36178
36193
 
36179
36194
  // src/commands/ravendb/promptConnection.ts
36180
- import chalk212 from "chalk";
36195
+ import chalk213 from "chalk";
36181
36196
 
36182
36197
  // src/commands/ravendb/selectOpSecret.ts
36183
- import chalk211 from "chalk";
36198
+ import chalk212 from "chalk";
36184
36199
  import Enquirer2 from "enquirer";
36185
36200
 
36186
36201
  // src/commands/ravendb/searchItems.ts
36187
36202
  import { execSync as execSync51 } from "child_process";
36188
- import chalk210 from "chalk";
36203
+ import chalk211 from "chalk";
36189
36204
  function opExec(args) {
36190
36205
  return execSync51(`op ${args}`, {
36191
36206
  encoding: "utf8",
@@ -36198,7 +36213,7 @@ function searchItems(search2) {
36198
36213
  items2 = JSON.parse(opExec("item list --format=json"));
36199
36214
  } catch {
36200
36215
  console.error(
36201
- chalk210.red(
36216
+ chalk211.red(
36202
36217
  "Failed to search 1Password. Ensure the CLI is installed and you are signed in."
36203
36218
  )
36204
36219
  );
@@ -36212,7 +36227,7 @@ function getItemFields(itemId2) {
36212
36227
  const item = JSON.parse(opExec(`item get "${itemId2}" --format=json`));
36213
36228
  return item.fields.filter((f) => f.reference && f.label);
36214
36229
  } catch {
36215
- console.error(chalk210.red("Failed to get item details from 1Password."));
36230
+ console.error(chalk211.red("Failed to get item details from 1Password."));
36216
36231
  process.exit(1);
36217
36232
  }
36218
36233
  }
@@ -36231,7 +36246,7 @@ async function selectOpSecret(searchTerm) {
36231
36246
  }).run();
36232
36247
  const items2 = searchItems(search2);
36233
36248
  if (items2.length === 0) {
36234
- console.error(chalk211.red(`No items found matching "${search2}".`));
36249
+ console.error(chalk212.red(`No items found matching "${search2}".`));
36235
36250
  process.exit(1);
36236
36251
  }
36237
36252
  const itemId2 = await selectOne(
@@ -36240,7 +36255,7 @@ async function selectOpSecret(searchTerm) {
36240
36255
  );
36241
36256
  const fields = getItemFields(itemId2);
36242
36257
  if (fields.length === 0) {
36243
- console.error(chalk211.red("No fields with references found on this item."));
36258
+ console.error(chalk212.red("No fields with references found on this item."));
36244
36259
  process.exit(1);
36245
36260
  }
36246
36261
  const ref = await selectOne(
@@ -36254,7 +36269,7 @@ async function selectOpSecret(searchTerm) {
36254
36269
  async function promptConnection(existingNames) {
36255
36270
  const name = await promptInput("name", "Connection name:");
36256
36271
  if (existingNames.includes(name)) {
36257
- console.error(chalk212.red(`Connection "${name}" already exists.`));
36272
+ console.error(chalk213.red(`Connection "${name}" already exists.`));
36258
36273
  process.exit(1);
36259
36274
  }
36260
36275
  const url = await promptInput(
@@ -36263,22 +36278,22 @@ async function promptConnection(existingNames) {
36263
36278
  );
36264
36279
  const database = await promptInput("database", "Database name:");
36265
36280
  if (!name || !url || !database) {
36266
- console.error(chalk212.red("All fields are required."));
36281
+ console.error(chalk213.red("All fields are required."));
36267
36282
  process.exit(1);
36268
36283
  }
36269
36284
  const apiKeyRef = await selectOpSecret();
36270
- console.log(chalk212.dim(`Using: ${apiKeyRef}`));
36285
+ console.log(chalk213.dim(`Using: ${apiKeyRef}`));
36271
36286
  return { name, url, database, apiKeyRef };
36272
36287
  }
36273
36288
 
36274
36289
  // src/commands/ravendb/ravendbSetConnection.ts
36275
- import chalk213 from "chalk";
36290
+ import chalk214 from "chalk";
36276
36291
  function ravendbSetConnection(name) {
36277
36292
  const raw = loadGlobalConfigRaw();
36278
36293
  const ravendb = raw.ravendb ?? {};
36279
36294
  const connections = ravendb.connections ?? [];
36280
36295
  if (!connections.some((c) => c.name === name)) {
36281
- console.error(chalk213.red(`Connection "${name}" not found.`));
36296
+ console.error(chalk214.red(`Connection "${name}" not found.`));
36282
36297
  console.error(
36283
36298
  `Available: ${connections.map((c) => c.name).join(", ") || "(none)"}`
36284
36299
  );
@@ -36294,16 +36309,16 @@ function ravendbSetConnection(name) {
36294
36309
  var ravendbAuth = createConnectionAuth({
36295
36310
  load: loadConnections,
36296
36311
  save: saveConnections,
36297
- format: (c) => `${chalk214.bold(c.name)} ${c.url} db=${c.database} key=${c.apiKeyRef}`,
36312
+ format: (c) => `${chalk215.bold(c.name)} ${c.url} db=${c.database} key=${c.apiKeyRef}`,
36298
36313
  promptNew: promptConnection,
36299
36314
  onFirst: (c) => ravendbSetConnection(c.name)
36300
36315
  });
36301
36316
 
36302
36317
  // src/commands/ravendb/ravendbCollections.ts
36303
- import chalk218 from "chalk";
36318
+ import chalk219 from "chalk";
36304
36319
 
36305
36320
  // src/commands/ravendb/ravenFetch.ts
36306
- import chalk216 from "chalk";
36321
+ import chalk217 from "chalk";
36307
36322
 
36308
36323
  // src/commands/ravendb/getAccessToken.ts
36309
36324
  var OAUTH_URL = "https://amazon-useast-1-oauth.ravenhq.com/ApiKeys/OAuth/AccessToken";
@@ -36340,10 +36355,10 @@ ${errorText}`
36340
36355
 
36341
36356
  // src/commands/ravendb/resolveOpSecret.ts
36342
36357
  import { execSync as execSync52 } from "child_process";
36343
- import chalk215 from "chalk";
36358
+ import chalk216 from "chalk";
36344
36359
  function resolveOpSecret(reference) {
36345
36360
  if (!reference.startsWith("op://")) {
36346
- console.error(chalk215.red(`Invalid secret reference: must start with op://`));
36361
+ console.error(chalk216.red(`Invalid secret reference: must start with op://`));
36347
36362
  process.exit(1);
36348
36363
  }
36349
36364
  try {
@@ -36353,7 +36368,7 @@ function resolveOpSecret(reference) {
36353
36368
  }).trim();
36354
36369
  } catch {
36355
36370
  console.error(
36356
- chalk215.red(
36371
+ chalk216.red(
36357
36372
  "Failed to resolve secret reference. Ensure 1Password CLI is installed and you are signed in."
36358
36373
  )
36359
36374
  );
@@ -36380,7 +36395,7 @@ async function ravenFetch(connection, path109) {
36380
36395
  if (!response.ok) {
36381
36396
  const body = await response.text();
36382
36397
  console.error(
36383
- chalk216.red(`RavenDB error: ${response.status} ${response.statusText}`)
36398
+ chalk217.red(`RavenDB error: ${response.status} ${response.statusText}`)
36384
36399
  );
36385
36400
  console.error(body.substring(0, 500));
36386
36401
  process.exit(1);
@@ -36389,7 +36404,7 @@ async function ravenFetch(connection, path109) {
36389
36404
  }
36390
36405
 
36391
36406
  // src/commands/ravendb/resolveConnection.ts
36392
- import chalk217 from "chalk";
36407
+ import chalk218 from "chalk";
36393
36408
  function loadRavendb() {
36394
36409
  const raw = loadGlobalConfigRaw();
36395
36410
  const ravendb = raw.ravendb;
@@ -36403,7 +36418,7 @@ function resolveConnection(name) {
36403
36418
  const connectionName = name ?? defaultConnection;
36404
36419
  if (!connectionName) {
36405
36420
  console.error(
36406
- chalk217.red(
36421
+ chalk218.red(
36407
36422
  "No connection specified and no default set. Use assist ravendb set-connection <name> or pass a connection name."
36408
36423
  )
36409
36424
  );
@@ -36411,7 +36426,7 @@ function resolveConnection(name) {
36411
36426
  }
36412
36427
  const connection = connections.find((c) => c.name === connectionName);
36413
36428
  if (!connection) {
36414
- console.error(chalk217.red(`Connection "${connectionName}" not found.`));
36429
+ console.error(chalk218.red(`Connection "${connectionName}" not found.`));
36415
36430
  console.error(
36416
36431
  `Available: ${connections.map((c) => c.name).join(", ") || "(none)"}`
36417
36432
  );
@@ -36442,15 +36457,15 @@ async function ravendbCollections(connectionName) {
36442
36457
  return;
36443
36458
  }
36444
36459
  for (const c of collections) {
36445
- console.log(`${chalk218.bold(c.Name)} ${c.CountOfDocuments} docs`);
36460
+ console.log(`${chalk219.bold(c.Name)} ${c.CountOfDocuments} docs`);
36446
36461
  }
36447
36462
  }
36448
36463
 
36449
36464
  // src/commands/ravendb/ravendbQuery.ts
36450
- import chalk220 from "chalk";
36465
+ import chalk221 from "chalk";
36451
36466
 
36452
36467
  // src/commands/ravendb/fetchAllPages.ts
36453
- import chalk219 from "chalk";
36468
+ import chalk220 from "chalk";
36454
36469
 
36455
36470
  // src/commands/ravendb/buildQueryPath.ts
36456
36471
  function buildQueryPath(opts) {
@@ -36488,7 +36503,7 @@ async function fetchAllPages(connection, opts) {
36488
36503
  allResults.push(...results);
36489
36504
  start2 += results.length;
36490
36505
  process.stderr.write(
36491
- `\r${chalk219.dim(`Fetched ${allResults.length}/${totalResults}`)}`
36506
+ `\r${chalk220.dim(`Fetched ${allResults.length}/${totalResults}`)}`
36492
36507
  );
36493
36508
  if (start2 >= totalResults) break;
36494
36509
  if (opts.limit !== void 0 && allResults.length >= opts.limit) break;
@@ -36503,7 +36518,7 @@ async function fetchAllPages(connection, opts) {
36503
36518
  async function ravendbQuery(connectionName, collection, options2) {
36504
36519
  const resolved = resolveArgs(connectionName, collection);
36505
36520
  if (!resolved.collection && !options2.query) {
36506
- console.error(chalk220.red("Provide a collection name or --query filter."));
36521
+ console.error(chalk221.red("Provide a collection name or --query filter."));
36507
36522
  process.exit(1);
36508
36523
  }
36509
36524
  const { collection: col } = resolved;
@@ -36538,7 +36553,7 @@ function registerRavendb(program) {
36538
36553
  }
36539
36554
 
36540
36555
  // src/commands/releases/releasesConfigure.ts
36541
- import chalk222 from "chalk";
36556
+ import chalk223 from "chalk";
36542
36557
 
36543
36558
  // src/commands/config/parseRepoScopeFlag.ts
36544
36559
  var REPO_SCOPE_FLAGS = {
@@ -36609,26 +36624,26 @@ function readStreamsInput(source) {
36609
36624
  }
36610
36625
 
36611
36626
  // src/commands/releases/reportDerivedStreams.ts
36612
- import chalk221 from "chalk";
36627
+ import chalk222 from "chalk";
36613
36628
  function printDerived(stream) {
36614
36629
  const environments = stream.nodes.flatMap((n) => n.environment ?? []);
36615
36630
  const steps = stream.nodes.filter((n) => !n.environment);
36616
36631
  console.log(
36617
- `${chalk221.bold(stream.name)} ${chalk221.dim(`${stream.repo} \xB7 ${stream.workflow}`)}`
36632
+ `${chalk222.bold(stream.name)} ${chalk222.dim(`${stream.repo} \xB7 ${stream.workflow}`)}`
36618
36633
  );
36619
36634
  console.log(
36620
- ` environments: ${environments.join(", ") || chalk221.dim("none")}`
36635
+ ` environments: ${environments.join(", ") || chalk222.dim("none")}`
36621
36636
  );
36622
36637
  if (steps.length > 0)
36623
36638
  console.log(
36624
36639
  ` steps: ${steps.map((n) => `${n.id} [${n.kind ?? "step"}]`).join(", ")}`
36625
36640
  );
36626
36641
  const edges = stream.edges.map(([from, to]) => `${from} \u2192 ${to}`);
36627
- console.log(` edges: ${edges.join(", ") || chalk221.dim("none")}`);
36642
+ console.log(` edges: ${edges.join(", ") || chalk222.dim("none")}`);
36628
36643
  }
36629
36644
  function reportDerivedStreams(streams, target) {
36630
36645
  for (const stream of streams) printDerived(stream);
36631
- console.log(chalk221.dim(`Written to ${target}`));
36646
+ console.log(chalk222.dim(`Written to ${target}`));
36632
36647
  }
36633
36648
 
36634
36649
  // src/commands/releases/withCurrentRepo.ts
@@ -36719,8 +36734,8 @@ async function writeReleaseStreams(incoming, scope) {
36719
36734
 
36720
36735
  // src/commands/releases/releasesConfigure.ts
36721
36736
  function fail9(message3, details = []) {
36722
- console.error(chalk222.red(message3));
36723
- for (const detail of details) console.error(chalk222.red(` ${detail}`));
36737
+ console.error(chalk223.red(message3));
36738
+ for (const detail of details) console.error(chalk223.red(` ${detail}`));
36724
36739
  process.exitCode = 1;
36725
36740
  }
36726
36741
  function reportWritten(incoming, target) {
@@ -36753,23 +36768,23 @@ async function releasesConfigure(options2 = {}) {
36753
36768
  }
36754
36769
 
36755
36770
  // src/commands/releases/releasesList.ts
36756
- import chalk223 from "chalk";
36771
+ import chalk224 from "chalk";
36757
36772
  function describeNode(node) {
36758
36773
  if (node.environment) return `${node.id} \u2192 ${node.environment}`;
36759
36774
  return `${node.id} (${node.kind ?? "step"})`;
36760
36775
  }
36761
36776
  function printStream(stream) {
36762
- console.log(`${chalk223.bold(stream.name)} ${chalk223.dim(stream.repo)}`);
36763
- console.log(chalk223.dim(` workflow: ${stream.workflow}`));
36777
+ console.log(`${chalk224.bold(stream.name)} ${chalk224.dim(stream.repo)}`);
36778
+ console.log(chalk224.dim(` workflow: ${stream.workflow}`));
36764
36779
  for (const node of stream.nodes) console.log(` ${describeNode(node)}`);
36765
36780
  for (const [from, to] of stream.edges)
36766
- console.log(chalk223.dim(` ${from} \u2192 ${to}`));
36781
+ console.log(chalk224.dim(` ${from} \u2192 ${to}`));
36767
36782
  }
36768
36783
  function releasesList() {
36769
36784
  const streams = loadConfig().releases?.streams ?? [];
36770
36785
  if (streams.length === 0) {
36771
36786
  console.log(
36772
- chalk223.dim("No release streams configured under releases.streams.")
36787
+ chalk224.dim("No release streams configured under releases.streams.")
36773
36788
  );
36774
36789
  return;
36775
36790
  }
@@ -36817,7 +36832,7 @@ function coverage() {
36817
36832
 
36818
36833
  // src/commands/lint/lint/runFileNameCheck.ts
36819
36834
  import path46 from "path";
36820
- import chalk225 from "chalk";
36835
+ import chalk226 from "chalk";
36821
36836
 
36822
36837
  // src/commands/lint/lint/checkFileNames.ts
36823
36838
  import fs25 from "fs";
@@ -36897,7 +36912,7 @@ function checkFileNames() {
36897
36912
  }
36898
36913
 
36899
36914
  // src/commands/lint/lint/fixFileNameViolations.ts
36900
- import chalk224 from "chalk";
36915
+ import chalk225 from "chalk";
36901
36916
 
36902
36917
  // src/commands/lint/lint/applyMoves.ts
36903
36918
  import fs26 from "fs";
@@ -36982,25 +36997,25 @@ function fixFileNameViolations(moves) {
36982
36997
  const start2 = performance.now();
36983
36998
  const project = createLintProject();
36984
36999
  const cwd = process.cwd();
36985
- applyMoves(project, moves, cwd, (line) => console.log(chalk224.green(line)));
37000
+ applyMoves(project, moves, cwd, (line) => console.log(chalk225.green(line)));
36986
37001
  const ms = (performance.now() - start2).toFixed(0);
36987
- console.log(chalk224.dim(` Done in ${ms}ms`));
37002
+ console.log(chalk225.dim(` Done in ${ms}ms`));
36988
37003
  }
36989
37004
 
36990
37005
  // src/commands/lint/lint/runFileNameCheck.ts
36991
37006
  function reportViolations(violations) {
36992
- console.error(chalk225.red("\nFile name check failed:\n"));
37007
+ console.error(chalk226.red("\nFile name check failed:\n"));
36993
37008
  console.error(
36994
- chalk225.red(
37009
+ chalk226.red(
36995
37010
  " Files without classes or React components should not start with a capital letter.\n"
36996
37011
  )
36997
37012
  );
36998
37013
  for (const violation of violations) {
36999
- console.error(chalk225.red(` ${violation.filePath}`));
37000
- console.error(chalk225.gray(` Rename to: ${violation.suggestedName}
37014
+ console.error(chalk226.red(` ${violation.filePath}`));
37015
+ console.error(chalk226.gray(` Rename to: ${violation.suggestedName}
37001
37016
  `));
37002
37017
  }
37003
- console.error(chalk225.dim(" Run with -f to auto-fix.\n"));
37018
+ console.error(chalk226.dim(" Run with -f to auto-fix.\n"));
37004
37019
  }
37005
37020
  function runFileNameCheck(fix = false) {
37006
37021
  const violations = checkFileNames();
@@ -37029,17 +37044,17 @@ function runFileNameCheck(fix = false) {
37029
37044
  import fs28 from "fs";
37030
37045
 
37031
37046
  // src/commands/lint/shared.ts
37032
- import chalk226 from "chalk";
37047
+ import chalk227 from "chalk";
37033
37048
  function reportViolations2(violations, checkName2, errorMessage3, successMessage) {
37034
37049
  if (violations.length > 0) {
37035
- console.error(chalk226.red(`
37050
+ console.error(chalk227.red(`
37036
37051
  ${checkName2} failed:
37037
37052
  `));
37038
- console.error(chalk226.red(` ${errorMessage3}
37053
+ console.error(chalk227.red(` ${errorMessage3}
37039
37054
  `));
37040
37055
  for (const violation of violations) {
37041
- console.error(chalk226.red(` ${violation.filePath}:${violation.line}`));
37042
- console.error(chalk226.gray(` ${violation.content}
37056
+ console.error(chalk227.red(` ${violation.filePath}:${violation.line}`));
37057
+ console.error(chalk227.gray(` ${violation.content}
37043
37058
  `));
37044
37059
  }
37045
37060
  return false;
@@ -37261,10 +37276,10 @@ async function notify() {
37261
37276
 
37262
37277
  // src/commands/screenshot.ts
37263
37278
  import { execSync as execSync54 } from "child_process";
37264
- import { existsSync as existsSync69, mkdirSync as mkdirSync27, unlinkSync as unlinkSync16, writeFileSync as writeFileSync41 } from "fs";
37279
+ import { existsSync as existsSync69, mkdirSync as mkdirSync27, unlinkSync as unlinkSync16, writeFileSync as writeFileSync40 } from "fs";
37265
37280
  import { tmpdir as tmpdir7 } from "os";
37266
- import { join as join90, resolve as resolve27 } from "path";
37267
- import chalk227 from "chalk";
37281
+ import { join as join88, resolve as resolve27 } from "path";
37282
+ import chalk228 from "chalk";
37268
37283
 
37269
37284
  // src/commands/screenshot/captureWindowPs1.ts
37270
37285
  var captureWindowPs1 = `
@@ -37400,8 +37415,8 @@ function buildOutputPath(outputDir, processName) {
37400
37415
  return resolve27(outputDir, `${processName}-${timestamp9}.png`);
37401
37416
  }
37402
37417
  function runPowerShellScript(processName, outputPath) {
37403
- const scriptPath = join90(tmpdir7(), `assist-screenshot-${Date.now()}.ps1`);
37404
- writeFileSync41(scriptPath, captureWindowPs1, "utf8");
37418
+ const scriptPath = join88(tmpdir7(), `assist-screenshot-${Date.now()}.ps1`);
37419
+ writeFileSync40(scriptPath, captureWindowPs1, "utf8");
37405
37420
  try {
37406
37421
  execSync54(
37407
37422
  `powershell -NoProfile -ExecutionPolicy Bypass -File "${scriptPath}" -ProcessName "${processName}" -OutputPath "${outputPath}"`,
@@ -37415,22 +37430,22 @@ function screenshot(processName) {
37415
37430
  const config = loadConfig();
37416
37431
  const outputDir = resolve27(config.screenshot.outputDir);
37417
37432
  const outputPath = buildOutputPath(outputDir, processName);
37418
- console.log(chalk227.gray(`Capturing window for process "${processName}" ...`));
37433
+ console.log(chalk228.gray(`Capturing window for process "${processName}" ...`));
37419
37434
  try {
37420
37435
  runPowerShellScript(processName, outputPath);
37421
- console.log(chalk227.green(`Screenshot saved: ${outputPath}`));
37436
+ console.log(chalk228.green(`Screenshot saved: ${outputPath}`));
37422
37437
  } catch (error) {
37423
37438
  const msg = error instanceof Error ? error.message : String(error);
37424
- console.error(chalk227.red(`Failed to capture screenshot: ${msg}`));
37439
+ console.error(chalk228.red(`Failed to capture screenshot: ${msg}`));
37425
37440
  process.exit(1);
37426
37441
  }
37427
37442
  }
37428
37443
 
37429
37444
  // src/commands/statusLine.ts
37430
- import chalk230 from "chalk";
37445
+ import chalk231 from "chalk";
37431
37446
 
37432
37447
  // src/commands/buildLimitsSegment.ts
37433
- import chalk228 from "chalk";
37448
+ import chalk229 from "chalk";
37434
37449
 
37435
37450
  // src/shared/rateLimitLevel.ts
37436
37451
  var FIVE_HOUR_SECONDS = 5 * 3600;
@@ -37468,9 +37483,9 @@ function rateLimitLevel(pct, resetsAt, windowSeconds, now) {
37468
37483
 
37469
37484
  // src/commands/buildLimitsSegment.ts
37470
37485
  var LEVEL_COLOR = {
37471
- ok: chalk228.green,
37472
- warn: chalk228.yellow,
37473
- over: chalk228.red
37486
+ ok: chalk229.green,
37487
+ warn: chalk229.yellow,
37488
+ over: chalk229.red
37474
37489
  };
37475
37490
  function formatLimit(pct, resetsAt, windowSeconds, fallbackLabel, now) {
37476
37491
  const level = rateLimitLevel(pct, resetsAt, windowSeconds, now);
@@ -37502,9 +37517,9 @@ function buildLimitsSegment(rateLimits) {
37502
37517
 
37503
37518
  // src/commands/readGitBranch.ts
37504
37519
  import { readFileSync as readFileSync52, statSync as statSync11 } from "fs";
37505
- import { isAbsolute as isAbsolute6, join as join91, resolve as resolve28 } from "path";
37520
+ import { isAbsolute as isAbsolute6, join as join89, resolve as resolve28 } from "path";
37506
37521
  function resolveGitDir(cwd) {
37507
- const dotGit = join91(cwd, ".git");
37522
+ const dotGit = join89(cwd, ".git");
37508
37523
  let stat5;
37509
37524
  try {
37510
37525
  stat5 = statSync11(dotGit);
@@ -37534,7 +37549,7 @@ function readGitBranch(cwd) {
37534
37549
  }
37535
37550
  let head;
37536
37551
  try {
37537
- head = readFileSync52(join91(gitDir, "HEAD"), "utf8");
37552
+ head = readFileSync52(join89(gitDir, "HEAD"), "utf8");
37538
37553
  } catch {
37539
37554
  return null;
37540
37555
  }
@@ -37566,7 +37581,7 @@ async function relayUsage(claudeSessionId, transcriptPath2, usedPct) {
37566
37581
  }
37567
37582
 
37568
37583
  // src/commands/colorizePercent.ts
37569
- import chalk229 from "chalk";
37584
+ import chalk230 from "chalk";
37570
37585
 
37571
37586
  // src/shared/contextLevel.ts
37572
37587
  var THRESHOLDS = {
@@ -37586,16 +37601,16 @@ function colorizePercent(pct) {
37586
37601
  const label = `${Math.round(pct)}%`;
37587
37602
  switch (contextLevel(pct)) {
37588
37603
  case "red":
37589
- return chalk229.red(label);
37604
+ return chalk230.red(label);
37590
37605
  case "yellow":
37591
- return chalk229.yellow(label);
37606
+ return chalk230.yellow(label);
37592
37607
  default:
37593
37608
  return label;
37594
37609
  }
37595
37610
  }
37596
37611
 
37597
37612
  // src/commands/statusLine.ts
37598
- chalk230.level = 3;
37613
+ chalk231.level = 3;
37599
37614
  function formatNumber(num) {
37600
37615
  return num.toLocaleString("en-US");
37601
37616
  }
@@ -37607,7 +37622,7 @@ async function statusLine() {
37607
37622
  const usedPct = data.context_window.used_percentage ?? 0;
37608
37623
  const dir = data.workspace?.current_dir ?? data.cwd;
37609
37624
  const branch2 = dir ? readGitBranch(dir) : null;
37610
- const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk230.cyan(branch2)} | ` : "";
37625
+ const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk231.cyan(branch2)} | ` : "";
37611
37626
  const limitsSegment = process.env.ASSIST_SESSION === "1" ? "" : buildLimitsSegment(data.rate_limits);
37612
37627
  console.log(
37613
37628
  `${branchSegment}${model} | Tokens - ${formatNumber(totalIn)} \u2191 : ${formatNumber(totalOut)} \u2193 | Context - ${colorizePercent(usedPct)}${limitsSegment}`
@@ -37715,7 +37730,7 @@ import { spawn as spawn8 } from "child_process";
37715
37730
  import * as path49 from "path";
37716
37731
 
37717
37732
  // src/commands/refactor/logViolations.ts
37718
- import chalk231 from "chalk";
37733
+ import chalk232 from "chalk";
37719
37734
  var DEFAULT_MAX_LINES2 = 100;
37720
37735
  function logViolations(violations, maxLines = DEFAULT_MAX_LINES2) {
37721
37736
  if (violations.length === 0) {
@@ -37724,43 +37739,43 @@ function logViolations(violations, maxLines = DEFAULT_MAX_LINES2) {
37724
37739
  }
37725
37740
  return;
37726
37741
  }
37727
- console.error(chalk231.red(`
37742
+ console.error(chalk232.red(`
37728
37743
  Refactor check failed:
37729
37744
  `));
37730
- console.error(chalk231.red(` The following files exceed ${maxLines} lines:
37745
+ console.error(chalk232.red(` The following files exceed ${maxLines} lines:
37731
37746
  `));
37732
37747
  for (const violation of violations) {
37733
- console.error(chalk231.red(` ${violation.file} (${violation.lines} lines)`));
37748
+ console.error(chalk232.red(` ${violation.file} (${violation.lines} lines)`));
37734
37749
  }
37735
37750
  console.error(
37736
- chalk231.yellow(
37751
+ chalk232.yellow(
37737
37752
  `
37738
37753
  Each file needs to be sensibly refactored, or if there is no sensible
37739
37754
  way to refactor it, ignore it with:
37740
37755
  `
37741
37756
  )
37742
37757
  );
37743
- console.error(chalk231.gray(` assist refactor ignore <file>
37758
+ console.error(chalk232.gray(` assist refactor ignore <file>
37744
37759
  `));
37745
37760
  if (process.env.CLAUDECODE) {
37746
- console.error(chalk231.cyan(`
37761
+ console.error(chalk232.cyan(`
37747
37762
  ## Extracting Code to New Files
37748
37763
  `));
37749
37764
  console.error(
37750
- chalk231.cyan(
37765
+ chalk232.cyan(
37751
37766
  ` When extracting logic from one file to another, consider where the extracted code belongs:
37752
37767
  `
37753
37768
  )
37754
37769
  );
37755
37770
  console.error(
37756
- chalk231.cyan(
37771
+ chalk232.cyan(
37757
37772
  ` 1. Keep related logic together: If the extracted code is tightly coupled to the
37758
37773
  original file's domain, create a new folder containing both the original and extracted files.
37759
37774
  `
37760
37775
  )
37761
37776
  );
37762
37777
  console.error(
37763
- chalk231.cyan(
37778
+ chalk232.cyan(
37764
37779
  ` 2. Share common utilities: If the extracted code can be reused across multiple
37765
37780
  domains, move it to a common/shared folder.
37766
37781
  `
@@ -37916,7 +37931,7 @@ async function check(pattern2, options2) {
37916
37931
 
37917
37932
  // src/commands/refactor/extract.ts
37918
37933
  import path57 from "path";
37919
- import chalk234 from "chalk";
37934
+ import chalk235 from "chalk";
37920
37935
 
37921
37936
  // src/commands/refactor/extract/applyExtraction.ts
37922
37937
  import { SyntaxKind as SyntaxKind8 } from "ts-morph";
@@ -38524,23 +38539,23 @@ function buildPlan2(functionName, sourceFile, sourcePath, destPath, project) {
38524
38539
 
38525
38540
  // src/commands/refactor/extract/displayPlan.ts
38526
38541
  import path53 from "path";
38527
- import chalk232 from "chalk";
38542
+ import chalk233 from "chalk";
38528
38543
  function section(title) {
38529
38544
  return `
38530
- ${chalk232.cyan(title)}`;
38545
+ ${chalk233.cyan(title)}`;
38531
38546
  }
38532
38547
  function displayImporters(plan2, cwd) {
38533
38548
  if (plan2.importersToUpdate.length === 0) return;
38534
38549
  console.log(section("Update importers:"));
38535
38550
  for (const imp of plan2.importersToUpdate) {
38536
38551
  const rel = path53.relative(cwd, imp.file.getFilePath());
38537
- console.log(` ${chalk232.dim(rel)}: \u2192 import from "${imp.relPath}"`);
38552
+ console.log(` ${chalk233.dim(rel)}: \u2192 import from "${imp.relPath}"`);
38538
38553
  }
38539
38554
  }
38540
38555
  function displayPlan(functionName, relDest, plan2, cwd) {
38541
- console.log(chalk232.bold(`Extract: ${functionName} \u2192 ${relDest}
38556
+ console.log(chalk233.bold(`Extract: ${functionName} \u2192 ${relDest}
38542
38557
  `));
38543
- console.log(` ${chalk232.cyan("Functions to move:")}`);
38558
+ console.log(` ${chalk233.cyan("Functions to move:")}`);
38544
38559
  for (const name of plan2.extractedNames) {
38545
38560
  console.log(` ${name}`);
38546
38561
  }
@@ -38574,7 +38589,7 @@ function displayPlan(functionName, relDest, plan2, cwd) {
38574
38589
 
38575
38590
  // src/commands/refactor/extract/loadProjectFile.ts
38576
38591
  import path56 from "path";
38577
- import chalk233 from "chalk";
38592
+ import chalk234 from "chalk";
38578
38593
  import { Project as Project4 } from "ts-morph";
38579
38594
 
38580
38595
  // src/commands/refactor/extract/findTsConfig.ts
@@ -38666,7 +38681,7 @@ function loadProjectFile(file) {
38666
38681
  });
38667
38682
  const sourceFile = project.getSourceFile(sourcePath);
38668
38683
  if (!sourceFile) {
38669
- console.log(chalk233.red(`File not found in project: ${file}`));
38684
+ console.log(chalk234.red(`File not found in project: ${file}`));
38670
38685
  process.exit(1);
38671
38686
  }
38672
38687
  return { project, sourceFile };
@@ -38689,19 +38704,19 @@ async function extract(file, functionName, destination, options2 = {}) {
38689
38704
  displayPlan(functionName, relDest, plan2, cwd);
38690
38705
  if (options2.apply) {
38691
38706
  await applyExtraction(functionName, sourceFile, destPath, plan2, project);
38692
- console.log(chalk234.green("\nExtraction complete"));
38707
+ console.log(chalk235.green("\nExtraction complete"));
38693
38708
  } else {
38694
- console.log(chalk234.dim("\nDry run. Use --apply to execute."));
38709
+ console.log(chalk235.dim("\nDry run. Use --apply to execute."));
38695
38710
  }
38696
38711
  }
38697
38712
 
38698
38713
  // src/commands/refactor/ignore.ts
38699
38714
  import fs35 from "fs";
38700
- import chalk235 from "chalk";
38715
+ import chalk236 from "chalk";
38701
38716
  var REFACTOR_YML_PATH2 = "refactor.yml";
38702
38717
  function ignore2(file) {
38703
38718
  if (!fs35.existsSync(file)) {
38704
- console.error(chalk235.red(`Error: File does not exist: ${file}`));
38719
+ console.error(chalk236.red(`Error: File does not exist: ${file}`));
38705
38720
  process.exit(1);
38706
38721
  }
38707
38722
  const content = fs35.readFileSync(file, "utf8");
@@ -38717,7 +38732,7 @@ function ignore2(file) {
38717
38732
  fs35.writeFileSync(REFACTOR_YML_PATH2, entry);
38718
38733
  }
38719
38734
  console.log(
38720
- chalk235.green(
38735
+ chalk236.green(
38721
38736
  `Added ${file} to refactor ignore list (max ${maxLines} lines)`
38722
38737
  )
38723
38738
  );
@@ -38726,12 +38741,12 @@ function ignore2(file) {
38726
38741
  // src/commands/refactor/rename.ts
38727
38742
  import fs38 from "fs";
38728
38743
  import path63 from "path";
38729
- import chalk238 from "chalk";
38744
+ import chalk239 from "chalk";
38730
38745
 
38731
38746
  // src/commands/refactor/rename/applyRename.ts
38732
38747
  import fs37 from "fs";
38733
38748
  import path59 from "path";
38734
- import chalk236 from "chalk";
38749
+ import chalk237 from "chalk";
38735
38750
 
38736
38751
  // src/commands/refactor/restructure/computeRewrites.ts
38737
38752
  import path58 from "path";
@@ -38837,13 +38852,13 @@ function applyRename(rewrites, sourcePath, destPath, cwd) {
38837
38852
  const updatedContents = applyRewrites(rewrites);
38838
38853
  for (const [file, content] of updatedContents) {
38839
38854
  fs37.writeFileSync(file, content, "utf8");
38840
- console.log(chalk236.cyan(` Updated imports in ${path59.relative(cwd, file)}`));
38855
+ console.log(chalk237.cyan(` Updated imports in ${path59.relative(cwd, file)}`));
38841
38856
  }
38842
38857
  const destDir = path59.dirname(destPath);
38843
38858
  if (!fs37.existsSync(destDir)) fs37.mkdirSync(destDir, { recursive: true });
38844
38859
  fs37.renameSync(sourcePath, destPath);
38845
38860
  console.log(
38846
- chalk236.white(
38861
+ chalk237.white(
38847
38862
  ` Moved ${path59.relative(cwd, sourcePath)} \u2192 ${path59.relative(cwd, destPath)}`
38848
38863
  )
38849
38864
  );
@@ -38993,16 +39008,16 @@ function computeRenameRewrites(sourcePath, destPath) {
38993
39008
 
38994
39009
  // src/commands/refactor/rename/printRenamePreview.ts
38995
39010
  import path62 from "path";
38996
- import chalk237 from "chalk";
39011
+ import chalk238 from "chalk";
38997
39012
  function printRenamePreview(rewrites, cwd) {
38998
39013
  for (const rewrite of rewrites) {
38999
39014
  console.log(
39000
- chalk237.dim(
39015
+ chalk238.dim(
39001
39016
  ` ${path62.relative(cwd, rewrite.file)}: ${rewrite.oldSpecifier} \u2192 ${rewrite.newSpecifier}`
39002
39017
  )
39003
39018
  );
39004
39019
  }
39005
- console.log(chalk237.dim("Dry run. Use --apply to execute."));
39020
+ console.log(chalk238.dim("Dry run. Use --apply to execute."));
39006
39021
  }
39007
39022
 
39008
39023
  // src/commands/refactor/rename.ts
@@ -39013,20 +39028,20 @@ async function rename(source, destination, options2 = {}) {
39013
39028
  const relSource = path63.relative(cwd, sourcePath);
39014
39029
  const relDest = path63.relative(cwd, destPath);
39015
39030
  if (!fs38.existsSync(sourcePath)) {
39016
- console.log(chalk238.red(`File not found: ${source}`));
39031
+ console.log(chalk239.red(`File not found: ${source}`));
39017
39032
  process.exit(1);
39018
39033
  }
39019
39034
  if (destPath !== sourcePath && fs38.existsSync(destPath)) {
39020
- console.log(chalk238.red(`Destination already exists: ${destination}`));
39035
+ console.log(chalk239.red(`Destination already exists: ${destination}`));
39021
39036
  process.exit(1);
39022
39037
  }
39023
- console.log(chalk238.bold(`Rename: ${relSource} \u2192 ${relDest}`));
39024
- console.log(chalk238.dim("Loading project..."));
39025
- console.log(chalk238.dim("Scanning imports across the project..."));
39038
+ console.log(chalk239.bold(`Rename: ${relSource} \u2192 ${relDest}`));
39039
+ console.log(chalk239.dim("Loading project..."));
39040
+ console.log(chalk239.dim("Scanning imports across the project..."));
39026
39041
  const rewrites = computeRenameRewrites(sourcePath, destPath);
39027
39042
  const affectedFiles = new Set(rewrites.map((r) => r.file)).size;
39028
39043
  console.log(
39029
- chalk238.dim(
39044
+ chalk239.dim(
39030
39045
  `${rewrites.length} import path(s) to update across ${affectedFiles} file(s)`
39031
39046
  )
39032
39047
  );
@@ -39035,11 +39050,11 @@ async function rename(source, destination, options2 = {}) {
39035
39050
  return;
39036
39051
  }
39037
39052
  applyRename(rewrites, sourcePath, destPath, cwd);
39038
- console.log(chalk238.green("Done"));
39053
+ console.log(chalk239.green("Done"));
39039
39054
  }
39040
39055
 
39041
39056
  // src/commands/refactor/renameSymbol.ts
39042
- import chalk239 from "chalk";
39057
+ import chalk240 from "chalk";
39043
39058
 
39044
39059
  // src/commands/refactor/renameSymbol/findSymbol.ts
39045
39060
  import { SyntaxKind as SyntaxKind19 } from "ts-morph";
@@ -39085,34 +39100,34 @@ async function renameSymbol(file, oldName, newName, options2 = {}) {
39085
39100
  const { project, sourceFile } = loadProjectFile(file);
39086
39101
  const symbol = findSymbol(sourceFile, oldName);
39087
39102
  if (!symbol) {
39088
- console.log(chalk239.red(`Symbol "${oldName}" not found in ${file}`));
39103
+ console.log(chalk240.red(`Symbol "${oldName}" not found in ${file}`));
39089
39104
  process.exit(1);
39090
39105
  }
39091
39106
  const grouped = groupReferences(symbol, cwd);
39092
39107
  const totalRefs = [...grouped.values()].reduce((s, l) => s + l.length, 0);
39093
39108
  console.log(
39094
- chalk239.bold(`Rename: ${oldName} \u2192 ${newName} (${totalRefs} references)
39109
+ chalk240.bold(`Rename: ${oldName} \u2192 ${newName} (${totalRefs} references)
39095
39110
  `)
39096
39111
  );
39097
39112
  for (const [refFile, lines2] of grouped) {
39098
39113
  console.log(
39099
- ` ${chalk239.dim(refFile)}: lines ${chalk239.cyan(lines2.join(", "))}`
39114
+ ` ${chalk240.dim(refFile)}: lines ${chalk240.cyan(lines2.join(", "))}`
39100
39115
  );
39101
39116
  }
39102
39117
  if (options2.apply) {
39103
39118
  symbol.rename(newName);
39104
39119
  await project.save();
39105
- console.log(chalk239.green(`
39120
+ console.log(chalk240.green(`
39106
39121
  Renamed ${oldName} \u2192 ${newName}`));
39107
39122
  } else {
39108
- console.log(chalk239.dim("\nDry run. Use --apply to execute."));
39123
+ console.log(chalk240.dim("\nDry run. Use --apply to execute."));
39109
39124
  }
39110
39125
  }
39111
39126
 
39112
39127
  // src/commands/refactor/restructure.ts
39113
39128
  import fs40 from "fs";
39114
39129
  import path84 from "path";
39115
- import chalk249 from "chalk";
39130
+ import chalk250 from "chalk";
39116
39131
 
39117
39132
  // src/commands/refactor/restructure/buildPlan.ts
39118
39133
  import path74 from "path";
@@ -39449,7 +39464,7 @@ function buildPlan3(scopeRoot, files, ignored = [], pinnedModules = []) {
39449
39464
  }
39450
39465
 
39451
39466
  // src/commands/refactor/restructure/checkPlan.ts
39452
- import chalk244 from "chalk";
39467
+ import chalk245 from "chalk";
39453
39468
 
39454
39469
  // src/commands/refactor/restructure/applyCommand.ts
39455
39470
  import path75 from "path";
@@ -39460,13 +39475,13 @@ function applyCommand(scopeRoot) {
39460
39475
 
39461
39476
  // src/commands/refactor/restructure/displayDrift.ts
39462
39477
  import path76 from "path";
39463
- import chalk240 from "chalk";
39478
+ import chalk241 from "chalk";
39464
39479
  var shownMoves = 20;
39465
39480
  function displayDrift(plan2, listMoves) {
39466
39481
  const rel = (file) => path76.relative(process.cwd(), file);
39467
39482
  if (plan2.moves.length > 0) {
39468
39483
  console.log(
39469
- chalk240.red(
39484
+ chalk241.red(
39470
39485
  `${plan2.moves.length} file(s) drift from the plan${listMoves ? ":" : "."}`
39471
39486
  )
39472
39487
  );
@@ -39474,17 +39489,17 @@ function displayDrift(plan2, listMoves) {
39474
39489
  for (const move2 of plan2.moves.slice(0, shownMoves))
39475
39490
  console.log(` ${rel(move2.from)} \u2192 ${rel(move2.to)}`);
39476
39491
  if (plan2.moves.length > shownMoves)
39477
- console.log(chalk240.dim(` \u2026and ${plan2.moves.length - shownMoves} more`));
39492
+ console.log(chalk241.dim(` \u2026and ${plan2.moves.length - shownMoves} more`));
39478
39493
  }
39479
39494
  }
39480
- for (const error of plan2.errors) console.log(chalk240.red(error));
39495
+ for (const error of plan2.errors) console.log(chalk241.red(error));
39481
39496
  }
39482
39497
 
39483
39498
  // src/commands/refactor/restructure/displayLayoutLimits.ts
39484
- import chalk243 from "chalk";
39499
+ import chalk244 from "chalk";
39485
39500
 
39486
39501
  // src/commands/refactor/restructure/displayDeepChains.ts
39487
- import chalk241 from "chalk";
39502
+ import chalk242 from "chalk";
39488
39503
  var shownChains = 10;
39489
39504
  function formatChain(chain2) {
39490
39505
  const folders = chain2.folders.map((f) => `${f.name} (${f.files})`).join(" > ");
@@ -39494,28 +39509,28 @@ function displayDeepChains(chains, maxDepth) {
39494
39509
  if (chains.length === 0) return;
39495
39510
  const tooDeep = chains.reduce((sum3, c) => sum3 + c.tooDeep, 0);
39496
39511
  console.log(
39497
- chalk241.red(
39512
+ chalk242.red(
39498
39513
  `
39499
39514
  Plan exceeds restructure.maxDepth ${maxDepth}: ${tooDeep} file(s) deeper.`
39500
39515
  )
39501
39516
  );
39502
39517
  console.log(
39503
- chalk241.bold(
39518
+ chalk242.bold(
39504
39519
  "Deep chains, as folder (files beneath), most files too deep first:"
39505
39520
  )
39506
39521
  );
39507
39522
  for (const chain2 of chains.slice(0, shownChains))
39508
39523
  console.log(formatChain(chain2));
39509
39524
  if (chains.length > shownChains)
39510
- console.log(chalk241.dim(` \u2026and ${chains.length - shownChains} more`));
39525
+ console.log(chalk242.dim(` \u2026and ${chains.length - shownChains} more`));
39511
39526
  }
39512
39527
 
39513
39528
  // src/commands/refactor/restructure/displayLongPaths.ts
39514
- import chalk242 from "chalk";
39529
+ import chalk243 from "chalk";
39515
39530
  function displayLongPaths(longPaths, maxPathLength) {
39516
39531
  if (longPaths.length === 0) return;
39517
39532
  console.log(
39518
- chalk242.red(
39533
+ chalk243.red(
39519
39534
  `
39520
39535
  Plan exceeds restructure.maxPathLength ${maxPathLength}: ${longPaths.length} repo-relative path(s) longer.`
39521
39536
  )
@@ -39543,7 +39558,7 @@ function displayLayoutLimits(limits, apply) {
39543
39558
  displayDeepChains(limits.chains, limits.maxDepth);
39544
39559
  displayLongPaths(limits.longPaths, limits.maxPathLength);
39545
39560
  console.log("");
39546
- for (const line of pinSteps(apply)) console.log(chalk243.yellow(line));
39561
+ for (const line of pinSteps(apply)) console.log(chalk244.yellow(line));
39547
39562
  }
39548
39563
 
39549
39564
  // src/commands/refactor/restructure/checkPlan.ts
@@ -39555,14 +39570,14 @@ function checkPlan(plan2, limits) {
39555
39570
  if (exceeds || plan2.errors.length > 0) process.exit(1);
39556
39571
  if (plan2.moves.length > 0) {
39557
39572
  console.log(
39558
- chalk244.yellow(
39573
+ chalk245.yellow(
39559
39574
  `
39560
39575
  Run \`${apply}\` to move the files and rewrite their imports.`
39561
39576
  )
39562
39577
  );
39563
39578
  process.exit(1);
39564
39579
  }
39565
- console.log(chalk244.green("Layout matches the restructure plan"));
39580
+ console.log(chalk245.green("Layout matches the restructure plan"));
39566
39581
  }
39567
39582
 
39568
39583
  // src/commands/refactor/restructure/findDeepChains.ts
@@ -39632,15 +39647,15 @@ function partitionIgnored(files) {
39632
39647
  }
39633
39648
 
39634
39649
  // src/commands/refactor/restructure/runPlan.ts
39635
- import chalk248 from "chalk";
39650
+ import chalk249 from "chalk";
39636
39651
 
39637
39652
  // src/commands/refactor/restructure/applyPlan.ts
39638
- import chalk246 from "chalk";
39653
+ import chalk247 from "chalk";
39639
39654
 
39640
39655
  // src/commands/refactor/restructure/executePlan.ts
39641
39656
  import fs39 from "fs";
39642
39657
  import path80 from "path";
39643
- import chalk245 from "chalk";
39658
+ import chalk246 from "chalk";
39644
39659
  function relPath(file) {
39645
39660
  return path80.relative(process.cwd(), file);
39646
39661
  }
@@ -39657,14 +39672,14 @@ function moveFiles(moves) {
39657
39672
  fs39.mkdirSync(path80.dirname(move2.to), { recursive: true });
39658
39673
  fs39.renameSync(staging, move2.to);
39659
39674
  console.log(
39660
- chalk245.white(` Moved ${relPath(move2.from)} \u2192 ${relPath(move2.to)}`)
39675
+ chalk246.white(` Moved ${relPath(move2.from)} \u2192 ${relPath(move2.to)}`)
39661
39676
  );
39662
39677
  }
39663
39678
  }
39664
39679
  function removeIfEmpty(dir) {
39665
39680
  if (!fs39.existsSync(dir) || fs39.readdirSync(dir).length > 0) return false;
39666
39681
  fs39.rmdirSync(dir);
39667
- console.log(chalk245.dim(` Removed empty directory ${relPath(dir)}`));
39682
+ console.log(chalk246.dim(` Removed empty directory ${relPath(dir)}`));
39668
39683
  return true;
39669
39684
  }
39670
39685
  function removeEmptyDirectories(dirs, scopeRoot) {
@@ -39677,7 +39692,7 @@ function removeEmptyDirectories(dirs, scopeRoot) {
39677
39692
  function executePlan(plan2) {
39678
39693
  for (const [file, content] of applyRewrites(plan2.rewrites)) {
39679
39694
  fs39.writeFileSync(file, content, "utf8");
39680
- console.log(chalk245.cyan(` Rewrote imports in ${relPath(file)}`));
39695
+ console.log(chalk246.cyan(` Rewrote imports in ${relPath(file)}`));
39681
39696
  }
39682
39697
  moveFiles(plan2.moves);
39683
39698
  removeEmptyDirectories(
@@ -39689,17 +39704,17 @@ function executePlan(plan2) {
39689
39704
  // src/commands/refactor/restructure/applyPlan.ts
39690
39705
  function applyPlan(plan2) {
39691
39706
  if (plan2.errors.length > 0) {
39692
- console.log(chalk246.red("\nResolve the errors above before applying."));
39707
+ console.log(chalk247.red("\nResolve the errors above before applying."));
39693
39708
  process.exit(1);
39694
39709
  }
39695
- console.log(chalk246.bold("\nApplying changes..."));
39710
+ console.log(chalk247.bold("\nApplying changes..."));
39696
39711
  executePlan(plan2);
39697
- console.log(chalk246.green("\nRestructuring complete"));
39712
+ console.log(chalk247.green("\nRestructuring complete"));
39698
39713
  }
39699
39714
 
39700
39715
  // src/commands/refactor/restructure/displayPlan.ts
39701
39716
  import path83 from "path";
39702
- import chalk247 from "chalk";
39717
+ import chalk248 from "chalk";
39703
39718
 
39704
39719
  // src/commands/refactor/restructure/computeDepthStats.ts
39705
39720
  import path81 from "path";
@@ -39750,17 +39765,17 @@ function relPath2(filePath) {
39750
39765
  }
39751
39766
  function displayMoves(plan2) {
39752
39767
  if (plan2.moves.length === 0) return;
39753
- console.log(chalk247.bold("\nFile moves:"));
39768
+ console.log(chalk248.bold("\nFile moves:"));
39754
39769
  for (const move2 of plan2.moves) {
39755
39770
  console.log(
39756
- ` ${chalk247.red(relPath2(move2.from))} \u2192 ${chalk247.green(relPath2(move2.to))}`
39771
+ ` ${chalk248.red(relPath2(move2.from))} \u2192 ${chalk248.green(relPath2(move2.to))}`
39757
39772
  );
39758
- console.log(chalk247.dim(` ${move2.reason}`));
39773
+ console.log(chalk248.dim(` ${move2.reason}`));
39759
39774
  }
39760
39775
  }
39761
39776
  function displayTree(plan2) {
39762
39777
  console.log(
39763
- chalk247.bold(`
39778
+ chalk248.bold(`
39764
39779
  Resulting tree (${relPath2(plan2.scopeRoot) || "."}/):`)
39765
39780
  );
39766
39781
  for (const line of formatTree(plan2.targets.values(), plan2.scopeRoot))
@@ -39771,15 +39786,15 @@ function displayDepthStats(plan2) {
39771
39786
  plan2.targets.values(),
39772
39787
  plan2.scopeRoot
39773
39788
  );
39774
- console.log(chalk247.bold(`
39789
+ console.log(chalk248.bold(`
39775
39790
  Depth (max ${max}):`));
39776
39791
  for (const depth of [...distribution.keys()].sort((a, b) => a - b))
39777
39792
  console.log(` ${depth}: ${distribution.get(depth)} file(s)`);
39778
39793
  }
39779
39794
  function displayErrors(errors) {
39780
39795
  if (errors.length === 0) return;
39781
- console.log(chalk247.red("\nErrors:"));
39782
- for (const error of errors) console.log(chalk247.red(` ${error}`));
39796
+ console.log(chalk248.red("\nErrors:"));
39797
+ for (const error of errors) console.log(chalk248.red(` ${error}`));
39783
39798
  }
39784
39799
  function displayPlan2(plan2) {
39785
39800
  displayMoves(plan2);
@@ -39788,7 +39803,7 @@ function displayPlan2(plan2) {
39788
39803
  displayErrors(plan2.errors);
39789
39804
  const rewrittenFiles = new Set(plan2.rewrites.map((r) => r.file)).size;
39790
39805
  console.log(
39791
- chalk247.dim(
39806
+ chalk248.dim(
39792
39807
  `
39793
39808
  Summary: ${plan2.moves.length} file(s) moved, ${plan2.rewrites.length} imports rewritten across ${rewrittenFiles} file(s), ${plan2.errors.length} error(s)`
39794
39809
  )
@@ -39800,11 +39815,11 @@ function runPlan(plan2, limits, apply) {
39800
39815
  displayPlan2(plan2);
39801
39816
  displayLayoutLimits(limits, applyCommand(plan2.scopeRoot));
39802
39817
  if (plan2.moves.length === 0 && plan2.errors.length === 0) {
39803
- console.log(chalk248.green("No restructuring needed"));
39818
+ console.log(chalk249.green("No restructuring needed"));
39804
39819
  return;
39805
39820
  }
39806
39821
  if (!apply) {
39807
- console.log(chalk248.dim("\nDry run. Use --apply to execute."));
39822
+ console.log(chalk249.dim("\nDry run. Use --apply to execute."));
39808
39823
  return;
39809
39824
  }
39810
39825
  applyPlan(plan2);
@@ -39814,14 +39829,14 @@ function runPlan(plan2, limits, apply) {
39814
39829
  async function restructure(root2, options2 = {}) {
39815
39830
  const scopeRoot = path84.resolve(root2 ?? "src");
39816
39831
  if (!fs40.existsSync(scopeRoot) || !fs40.statSync(scopeRoot).isDirectory()) {
39817
- console.log(chalk249.red(`Not a directory: ${root2 ?? "src"}`));
39832
+ console.log(chalk250.red(`Not a directory: ${root2 ?? "src"}`));
39818
39833
  process.exit(1);
39819
39834
  }
39820
39835
  const found = [];
39821
39836
  walkSourceFiles(scopeRoot, found);
39822
39837
  const { scoped, ignored } = partitionIgnored(found);
39823
39838
  if (scoped.length === 0) {
39824
- console.log(chalk249.yellow("No files found under root"));
39839
+ console.log(chalk250.yellow("No files found under root"));
39825
39840
  return;
39826
39841
  }
39827
39842
  const {
@@ -39892,7 +39907,7 @@ async function checkoutPrSession(number, prompt = "") {
39892
39907
  }
39893
39908
 
39894
39909
  // src/commands/review/highLevel/configureHighLevelReview.ts
39895
- import chalk253 from "chalk";
39910
+ import chalk254 from "chalk";
39896
39911
 
39897
39912
  // src/commands/config/promptConfigScope.ts
39898
39913
  import Enquirer3 from "enquirer";
@@ -39918,7 +39933,7 @@ async function promptConfigScope() {
39918
39933
  }
39919
39934
 
39920
39935
  // src/commands/config/resolveConfigKeyAnswer.ts
39921
- import chalk250 from "chalk";
39936
+ import chalk251 from "chalk";
39922
39937
  async function resolveConfigKeyAnswer(question, supplied) {
39923
39938
  if (supplied !== void 0) return coerceSupplied(question.key, supplied);
39924
39939
  for (; ; ) {
@@ -39926,7 +39941,7 @@ async function resolveConfigKeyAnswer(question, supplied) {
39926
39941
  if (answer === "") return void 0;
39927
39942
  const coercion = coerceCliConfigValue(question.key, answer);
39928
39943
  if (coercion.ok) return coercion.value;
39929
- console.error(chalk250.red(coercion.error));
39944
+ console.error(chalk251.red(coercion.error));
39930
39945
  }
39931
39946
  }
39932
39947
  function coerceSupplied(key, supplied) {
@@ -40006,7 +40021,7 @@ function suggestGlobs(current, proposed) {
40006
40021
  }
40007
40022
 
40008
40023
  // src/commands/review/highLevel/parseConfigureAnswers.ts
40009
- import chalk251 from "chalk";
40024
+ import chalk252 from "chalk";
40010
40025
  function parseConfigureAnswers(answers) {
40011
40026
  const known = Object.values(highLevelConfigKeys);
40012
40027
  const parsed = {};
@@ -40024,13 +40039,13 @@ function answersCoverEveryKey(answers) {
40024
40039
  return Object.values(highLevelConfigKeys).every((key) => key in answers);
40025
40040
  }
40026
40041
  function exitWith(message3) {
40027
- console.error(chalk251.red(`Error: ${message3}.`));
40042
+ console.error(chalk252.red(`Error: ${message3}.`));
40028
40043
  process.exit(1);
40029
40044
  }
40030
40045
 
40031
40046
  // src/commands/review/highLevel/proposeHighLevelGlobs.ts
40032
40047
  import { execFileSync as execFileSync26 } from "child_process";
40033
- import chalk252 from "chalk";
40048
+ import chalk253 from "chalk";
40034
40049
 
40035
40050
  // src/commands/review/highLevel/buildGlobProposalPrompt.ts
40036
40051
  function buildGlobProposalPrompt(tree) {
@@ -40124,12 +40139,12 @@ function proposeHighLevelGlobs(cwd = process.cwd()) {
40124
40139
  const tree = summariseRepoTree(cwd);
40125
40140
  if (tree === "") return NOTHING_PROPOSED;
40126
40141
  console.log(
40127
- chalk252.dim("Asking Claude to propose globs from the repo's own tree...")
40142
+ chalk253.dim("Asking Claude to propose globs from the repo's own tree...")
40128
40143
  );
40129
40144
  const output = askClaude(buildGlobProposalPrompt(tree), cwd);
40130
40145
  if (output === void 0) {
40131
40146
  console.log(
40132
- chalk252.yellow(
40147
+ chalk253.yellow(
40133
40148
  "Claude proposed nothing; answer each key from its current value."
40134
40149
  )
40135
40150
  );
@@ -40190,14 +40205,14 @@ async function configureHighLevelReview(options2 = {}) {
40190
40205
  function reportConfigured(result) {
40191
40206
  for (const write2 of result.written)
40192
40207
  console.log(
40193
- chalk253.green(`Set ${write2.key} = ${JSON.stringify(write2.value)}`)
40208
+ chalk254.green(`Set ${write2.key} = ${JSON.stringify(write2.value)}`)
40194
40209
  );
40195
- for (const key of result.skipped) console.log(chalk253.dim(`Left ${key} unset`));
40196
- console.log(chalk253.dim(`Written to ${result.target}`));
40210
+ for (const key of result.skipped) console.log(chalk254.dim(`Left ${key} unset`));
40211
+ console.log(chalk254.dim(`Written to ${result.target}`));
40197
40212
  }
40198
40213
 
40199
40214
  // src/commands/review/highLevel/announceSavedReview.ts
40200
- import chalk254 from "chalk";
40215
+ import chalk255 from "chalk";
40201
40216
  function savedMessage(subject) {
40202
40217
  const head = subject.headSha.slice(0, 7);
40203
40218
  if (subject.draft)
@@ -40208,10 +40223,10 @@ function savedMessage(subject) {
40208
40223
  }
40209
40224
  function announceSavedReview(subject, force) {
40210
40225
  const message3 = savedMessage(subject);
40211
- if (message3) console.log(chalk254.dim(message3));
40226
+ if (message3) console.log(chalk255.dim(message3));
40212
40227
  else if (force)
40213
40228
  console.log(
40214
- chalk254.dim(
40229
+ chalk255.dim(
40215
40230
  `Discarding any review saved for ${subject.headSha.slice(0, 7)} and starting fresh (--force).`
40216
40231
  )
40217
40232
  );
@@ -40714,12 +40729,12 @@ function formatSlicingRequest(hunks) {
40714
40729
  }
40715
40730
 
40716
40731
  // src/commands/review/highLevel/highLevelReviewPath.ts
40717
- import { join as join92 } from "path";
40732
+ import { join as join90 } from "path";
40718
40733
  function slug(value) {
40719
40734
  return value.replace(/[^\w.-]+/g, "-");
40720
40735
  }
40721
40736
  function highLevelReviewPath(repo, headRef, headSha) {
40722
- return join92(
40737
+ return join90(
40723
40738
  getStoreDir(),
40724
40739
  "high-level-reviews",
40725
40740
  slug(repo),
@@ -40854,11 +40869,11 @@ function resolveHighLevelSlices(raw, hunks) {
40854
40869
  }
40855
40870
 
40856
40871
  // src/commands/review/highLevel/writeJsonFile.ts
40857
- import { mkdirSync as mkdirSync28, writeFileSync as writeFileSync42 } from "fs";
40872
+ import { mkdirSync as mkdirSync28, writeFileSync as writeFileSync41 } from "fs";
40858
40873
  import { dirname as dirname42 } from "path";
40859
40874
  function writeJsonFile(path109, data) {
40860
40875
  mkdirSync28(dirname42(path109), { recursive: true });
40861
- writeFileSync42(path109, `${JSON.stringify(data, null, 2)}
40876
+ writeFileSync41(path109, `${JSON.stringify(data, null, 2)}
40862
40877
  `);
40863
40878
  return path109;
40864
40879
  }
@@ -41541,55 +41556,55 @@ async function openHighLevelOverlay(sessionId2, subject) {
41541
41556
  }
41542
41557
 
41543
41558
  // src/commands/review/highLevel/printHighLevelChecklist.ts
41544
- import chalk259 from "chalk";
41559
+ import chalk260 from "chalk";
41545
41560
 
41546
41561
  // src/commands/review/highLevel/formatCriticalDiffs.ts
41547
- import chalk255 from "chalk";
41562
+ import chalk256 from "chalk";
41548
41563
  var PATCH_LINE_COLOURS = {
41549
- "+": chalk255.green,
41550
- "-": chalk255.red,
41551
- "@": chalk255.cyan
41564
+ "+": chalk256.green,
41565
+ "-": chalk256.red,
41566
+ "@": chalk256.cyan
41552
41567
  };
41553
41568
  function formatPatch(patch2) {
41554
41569
  return patch2.split("\n").map(
41555
- (line) => ` ${(PATCH_LINE_COLOURS[line[0] ?? ""] ?? chalk255.dim)(line)}`
41570
+ (line) => ` ${(PATCH_LINE_COLOURS[line[0] ?? ""] ?? chalk256.dim)(line)}`
41556
41571
  );
41557
41572
  }
41558
41573
  function formatDiff(diff3) {
41559
41574
  return [
41560
41575
  "",
41561
- ` ${chalk255.bold(diff3.path)} ${chalk255.dim(`(${diff3.status})`)} ${chalk255.green(`+${diff3.additions}`)} ${chalk255.red(`-${diff3.deletions}`)}`,
41562
- ...diff3.patch === null ? [` ${chalk255.dim(`no diff available; see ${diff3.diffUrl}`)}`] : formatPatch(diff3.patch)
41576
+ ` ${chalk256.bold(diff3.path)} ${chalk256.dim(`(${diff3.status})`)} ${chalk256.green(`+${diff3.additions}`)} ${chalk256.red(`-${diff3.deletions}`)}`,
41577
+ ...diff3.patch === null ? [` ${chalk256.dim(`no diff available; see ${diff3.diffUrl}`)}`] : formatPatch(diff3.patch)
41563
41578
  ];
41564
41579
  }
41565
41580
  function formatCriticalDiffs(diffs, criticalPaths) {
41566
41581
  if (criticalPaths.length === 0)
41567
- return `${chalk255.bold.underline("Critical diffs")}
41568
- ${chalk255.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
41582
+ return `${chalk256.bold.underline("Critical diffs")}
41583
+ ${chalk256.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
41569
41584
  if (diffs.length === 0)
41570
- return `${chalk255.bold.underline("Critical diffs")}
41571
- ${chalk255.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
41585
+ return `${chalk256.bold.underline("Critical diffs")}
41586
+ ${chalk256.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
41572
41587
  return [
41573
- chalk255.bold.underline("Critical diffs"),
41588
+ chalk256.bold.underline("Critical diffs"),
41574
41589
  ...diffs.flatMap(formatDiff)
41575
41590
  ].join("\n");
41576
41591
  }
41577
41592
 
41578
41593
  // src/commands/review/highLevel/formatHighLevelChecklist.ts
41579
- import chalk256 from "chalk";
41594
+ import chalk257 from "chalk";
41580
41595
  var MARKERS = {
41581
- pass: () => chalk256.green("\u2714"),
41582
- fail: () => chalk256.red("\u2718"),
41583
- manual: () => chalk256.yellow("\u25A1")
41596
+ pass: () => chalk257.green("\u2714"),
41597
+ fail: () => chalk257.red("\u2718"),
41598
+ manual: () => chalk257.yellow("\u25A1")
41584
41599
  };
41585
41600
  function formatCheck(check2) {
41586
- const title = check2.status === "fail" ? chalk256.red(check2.title) : chalk256.bold(check2.title);
41601
+ const title = check2.status === "fail" ? chalk257.red(check2.title) : chalk257.bold(check2.title);
41587
41602
  return ` ${MARKERS[check2.status]()} ${title}
41588
- ${chalk256.dim(check2.reason)}`;
41603
+ ${chalk257.dim(check2.reason)}`;
41589
41604
  }
41590
41605
  function formatGroup(heading2, checks2) {
41591
41606
  if (checks2.length === 0) return [];
41592
- return ["", chalk256.bold.underline(heading2), ...checks2.map(formatCheck)];
41607
+ return ["", chalk257.bold.underline(heading2), ...checks2.map(formatCheck)];
41593
41608
  }
41594
41609
  function formatHighLevelChecklist(checks2) {
41595
41610
  const deterministic = checks2.filter(
@@ -41598,7 +41613,7 @@ function formatHighLevelChecklist(checks2) {
41598
41613
  const failed3 = deterministic.filter(
41599
41614
  (check2) => check2.status === "fail"
41600
41615
  ).length;
41601
- const summary = failed3 === 0 ? chalk256.green(`All ${deterministic.length} deterministic checks pass`) : chalk256.red(
41616
+ const summary = failed3 === 0 ? chalk257.green(`All ${deterministic.length} deterministic checks pass`) : chalk257.red(
41602
41617
  `${failed3} of ${deterministic.length} deterministic checks fail`
41603
41618
  );
41604
41619
  return [
@@ -41613,37 +41628,37 @@ function formatHighLevelChecklist(checks2) {
41613
41628
  }
41614
41629
 
41615
41630
  // src/commands/review/highLevel/formatHighLevelStructure.ts
41616
- import chalk257 from "chalk";
41631
+ import chalk258 from "chalk";
41617
41632
  var STATUS_MARKERS = {
41618
- added: () => chalk257.green("A"),
41619
- removed: () => chalk257.red("D"),
41620
- modified: () => chalk257.yellow("M")
41633
+ added: () => chalk258.green("A"),
41634
+ removed: () => chalk258.red("D"),
41635
+ modified: () => chalk258.yellow("M")
41621
41636
  };
41622
41637
  function counts(additions, deletions) {
41623
- return `${chalk257.green(`+${additions}`)} ${chalk257.red(`-${deletions}`)}`;
41638
+ return `${chalk258.green(`+${additions}`)} ${chalk258.red(`-${deletions}`)}`;
41624
41639
  }
41625
41640
  function formatNode(node, indent4) {
41626
41641
  if (node.kind === "file")
41627
41642
  return [
41628
- `${indent4}${STATUS_MARKERS[node.status]()} ${node.name} ${chalk257.dim(counts(node.additions, node.deletions))}`
41643
+ `${indent4}${STATUS_MARKERS[node.status]()} ${node.name} ${chalk258.dim(counts(node.additions, node.deletions))}`
41629
41644
  ];
41630
41645
  const dir = node;
41631
41646
  return [
41632
- `${indent4}${chalk257.bold(`${dir.name}/`)} ${chalk257.dim(counts(dir.additions, dir.deletions))}`,
41647
+ `${indent4}${chalk258.bold(`${dir.name}/`)} ${chalk258.dim(counts(dir.additions, dir.deletions))}`,
41633
41648
  ...dir.children.flatMap((child) => formatNode(child, `${indent4} `))
41634
41649
  ];
41635
41650
  }
41636
41651
  function formatHighLevelStructure(structure) {
41637
41652
  const summary = `${structure.added} added \xB7 ${structure.removed} deleted \xB7 ${structure.modified} modified \xB7 ${counts(structure.additions, structure.deletions)}`;
41638
41653
  return [
41639
- chalk257.bold.underline("Structure"),
41654
+ chalk258.bold.underline("Structure"),
41640
41655
  ` ${summary}`,
41641
41656
  ...structure.tree.flatMap((node) => formatNode(node, " "))
41642
41657
  ].join("\n");
41643
41658
  }
41644
41659
 
41645
41660
  // src/commands/review/highLevel/formatHighLevelTests.ts
41646
- import chalk258 from "chalk";
41661
+ import chalk259 from "chalk";
41647
41662
  function changeMarker(change) {
41648
41663
  if (change === "added") return "A";
41649
41664
  if (change === "modified") return "M";
@@ -41652,22 +41667,22 @@ function changeMarker(change) {
41652
41667
  function formatNode2(node, depth) {
41653
41668
  const indent4 = " ".repeat(depth + 2);
41654
41669
  if (node.kind === "it")
41655
- return [`${indent4}${chalk258.dim(changeMarker(node.change))} ${node.name}`];
41670
+ return [`${indent4}${chalk259.dim(changeMarker(node.change))} ${node.name}`];
41656
41671
  return [
41657
- `${indent4}${chalk258.bold(node.name)}`,
41672
+ `${indent4}${chalk259.bold(node.name)}`,
41658
41673
  ...node.children.flatMap((child) => formatNode2(child, depth + 1))
41659
41674
  ];
41660
41675
  }
41661
41676
  function formatHighLevelTests(files, testPaths) {
41662
- const heading2 = chalk258.bold.underline("Changed tests");
41677
+ const heading2 = chalk259.bold.underline("Changed tests");
41663
41678
  if (files.length === 0)
41664
41679
  return `${heading2}
41665
- ${chalk258.dim(`no changed test in files matching ${testPaths.join(", ")}`)}`;
41680
+ ${chalk259.dim(`no changed test in files matching ${testPaths.join(", ")}`)}`;
41666
41681
  return [
41667
41682
  heading2,
41668
41683
  ...files.flatMap((file) => [
41669
41684
  "",
41670
- ` ${chalk258.bold(file.path)} ${chalk258.dim(`(${file.status})`)}`,
41685
+ ` ${chalk259.bold(file.path)} ${chalk259.dim(`(${file.status})`)}`,
41671
41686
  ...file.tests.flatMap((node) => formatNode2(node, 0))
41672
41687
  ])
41673
41688
  ].join("\n");
@@ -41681,10 +41696,10 @@ function highLevelChangedFileCount(structure) {
41681
41696
  // src/commands/review/highLevel/printHighLevelChecklist.ts
41682
41697
  function printHighLevelChecklist(subject) {
41683
41698
  console.log(
41684
- chalk259.bold(
41699
+ chalk260.bold(
41685
41700
  `High-level review of ${subject.repo}#${subject.prNumber} \u2014 ${subject.title}`
41686
41701
  ),
41687
- chalk259.dim(
41702
+ chalk260.dim(
41688
41703
  `\xB7 ${highLevelChangedFileCount(subject.structure)} changed files`
41689
41704
  )
41690
41705
  );
@@ -41698,12 +41713,12 @@ function printHighLevelChecklist(subject) {
41698
41713
  console.log("");
41699
41714
  console.log(formatHighLevelTests(subject.tests, subject.testPaths));
41700
41715
  console.log(
41701
- chalk259.dim(
41716
+ chalk260.dim(
41702
41717
  "\nManual items are for the reviewer to judge; see docs/high-level-review.md."
41703
41718
  )
41704
41719
  );
41705
41720
  console.log(
41706
- chalk259.dim(
41721
+ chalk260.dim(
41707
41722
  "Run this inside an assist session to step through the checklist in the web overlay."
41708
41723
  )
41709
41724
  );
@@ -41996,18 +42011,18 @@ function partitionFindingsByDiff(findings, index3) {
41996
42011
  }
41997
42012
 
41998
42013
  // src/commands/review/warnOutOfDiff.ts
41999
- import chalk260 from "chalk";
42014
+ import chalk261 from "chalk";
42000
42015
  function warnOutOfDiff(outOfDiff) {
42001
42016
  if (outOfDiff.length === 0) return;
42002
42017
  console.warn(
42003
- chalk260.yellow(
42018
+ chalk261.yellow(
42004
42019
  `Moved ${outOfDiff.length} finding(s) whose lines fall outside the PR diff into the review body (GitHub cannot anchor a comment on these):`
42005
42020
  )
42006
42021
  );
42007
42022
  for (const finding of outOfDiff) {
42008
42023
  const range = finding.startLine !== void 0 ? `${finding.startLine}-${finding.line}` : `${finding.line}`;
42009
42024
  console.warn(
42010
- ` ${chalk260.yellow("\xB7")} ${finding.title} ${chalk260.dim(
42025
+ ` ${chalk261.yellow("\xB7")} ${finding.title} ${chalk261.dim(
42011
42026
  `(${finding.file}:${range})`
42012
42027
  )}`
42013
42028
  );
@@ -42034,18 +42049,18 @@ function selectInDiffFindings(lineBound, prDiff) {
42034
42049
  }
42035
42050
 
42036
42051
  // src/commands/review/warnUnlocated.ts
42037
- import chalk261 from "chalk";
42052
+ import chalk262 from "chalk";
42038
42053
  function warnUnlocated(unlocated) {
42039
42054
  if (unlocated.length === 0) return;
42040
42055
  console.warn(
42041
- chalk261.yellow(
42056
+ chalk262.yellow(
42042
42057
  `Moved ${unlocated.length} finding(s) without a parseable file:line into the review body:`
42043
42058
  )
42044
42059
  );
42045
42060
  for (const finding of unlocated) {
42046
- const where = finding.location || chalk261.dim("missing");
42061
+ const where = finding.location || chalk262.dim("missing");
42047
42062
  console.warn(
42048
- ` ${chalk261.yellow("\xB7")} ${finding.title} ${chalk261.dim(`(${where})`)}`
42063
+ ` ${chalk262.yellow("\xB7")} ${finding.title} ${chalk262.dim(`(${where})`)}`
42049
42064
  );
42050
42065
  }
42051
42066
  }
@@ -42248,7 +42263,7 @@ import { format as format2 } from "util";
42248
42263
 
42249
42264
  // src/commands/review/createReviewLogSink.ts
42250
42265
  import { appendFileSync as appendFileSync4, mkdirSync as mkdirSync29 } from "fs";
42251
- import { join as join93 } from "path";
42266
+ import { join as join91 } from "path";
42252
42267
  var LOG_FILE = "review.log";
42253
42268
  function createReviewLogSink() {
42254
42269
  let logPath2;
@@ -42265,7 +42280,7 @@ function createReviewLogSink() {
42265
42280
  },
42266
42281
  attach(reviewDir) {
42267
42282
  mkdirSync29(reviewDir, { recursive: true });
42268
- logPath2 = join93(reviewDir, LOG_FILE);
42283
+ logPath2 = join91(reviewDir, LOG_FILE);
42269
42284
  const lines2 = [
42270
42285
  "",
42271
42286
  `=== ${(/* @__PURE__ */ new Date()).toISOString()} ===`,
@@ -42556,7 +42571,7 @@ function buildCodexModelArgs() {
42556
42571
  }
42557
42572
 
42558
42573
  // src/commands/review/runClaudeReviewer.ts
42559
- import { writeFileSync as writeFileSync43 } from "fs";
42574
+ import { writeFileSync as writeFileSync42 } from "fs";
42560
42575
 
42561
42576
  // src/commands/review/formatToolSummary.ts
42562
42577
  function truncate3(value, max = 80) {
@@ -42940,7 +42955,7 @@ async function runClaudeReviewer(spec) {
42940
42955
  onLine
42941
42956
  });
42942
42957
  if (result.exitCode === 0 && state.finalText)
42943
- writeFileSync43(spec.outputPath, state.finalText);
42958
+ writeFileSync42(spec.outputPath, state.finalText);
42944
42959
  const finalised = finaliseReviewerRun(
42945
42960
  { ...spec, command, model: override?.model },
42946
42961
  spinner,
@@ -43471,11 +43486,11 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
43471
43486
  }
43472
43487
 
43473
43488
  // src/commands/review/buildReviewPaths.ts
43474
- import { homedir as homedir27 } from "os";
43475
- import { basename as basename25, join as join94 } from "path";
43489
+ import { homedir as homedir26 } from "os";
43490
+ import { basename as basename25, join as join92 } from "path";
43476
43491
  function buildReviewPaths(repoRoot2, key) {
43477
- const reviewDir = join94(
43478
- homedir27(),
43492
+ const reviewDir = join92(
43493
+ homedir26(),
43479
43494
  ".assist",
43480
43495
  "reviews",
43481
43496
  basename25(repoRoot2),
@@ -43483,10 +43498,10 @@ function buildReviewPaths(repoRoot2, key) {
43483
43498
  );
43484
43499
  return {
43485
43500
  reviewDir,
43486
- requestPath: join94(reviewDir, "request.md"),
43487
- claudePath: join94(reviewDir, "claude.md"),
43488
- codexPath: join94(reviewDir, "codex.md"),
43489
- synthesisPath: join94(reviewDir, "synthesis.md")
43501
+ requestPath: join92(reviewDir, "request.md"),
43502
+ claudePath: join92(reviewDir, "claude.md"),
43503
+ codexPath: join92(reviewDir, "codex.md"),
43504
+ synthesisPath: join92(reviewDir, "synthesis.md")
43490
43505
  };
43491
43506
  }
43492
43507
 
@@ -43524,7 +43539,7 @@ function fetchExistingComments() {
43524
43539
  }
43525
43540
 
43526
43541
  // src/commands/review/prepareReviewDir.ts
43527
- import { existsSync as existsSync73, mkdirSync as mkdirSync30, unlinkSync as unlinkSync19, writeFileSync as writeFileSync44 } from "fs";
43542
+ import { existsSync as existsSync73, mkdirSync as mkdirSync30, unlinkSync as unlinkSync19, writeFileSync as writeFileSync43 } from "fs";
43528
43543
  function clearReviewFiles(paths) {
43529
43544
  for (const path109 of [paths.claudePath, paths.codexPath, paths.synthesisPath]) {
43530
43545
  if (existsSync73(path109)) unlinkSync19(path109);
@@ -43533,7 +43548,7 @@ function clearReviewFiles(paths) {
43533
43548
  function prepareReviewDir(paths, requestBody, force) {
43534
43549
  mkdirSync30(paths.reviewDir, { recursive: true });
43535
43550
  if (force) clearReviewFiles(paths);
43536
- writeFileSync44(paths.requestPath, requestBody);
43551
+ writeFileSync43(paths.requestPath, requestBody);
43537
43552
  }
43538
43553
 
43539
43554
  // src/commands/review/setupReviewDir.ts
@@ -44193,10 +44208,10 @@ function registerReview(program) {
44193
44208
 
44194
44209
  // src/commands/rules/indexRules.ts
44195
44210
  import path88 from "path";
44196
- import chalk262 from "chalk";
44211
+ import chalk263 from "chalk";
44197
44212
 
44198
44213
  // src/commands/rules/updateScopedRulesIndex.ts
44199
- import { existsSync as existsSync74, readFileSync as readFileSync59, writeFileSync as writeFileSync45 } from "fs";
44214
+ import { existsSync as existsSync74, readFileSync as readFileSync59, writeFileSync as writeFileSync44 } from "fs";
44200
44215
  import path87 from "path";
44201
44216
 
44202
44217
  // src/commands/rules/scopedRuleDirectories.ts
@@ -44268,7 +44283,7 @@ function updateScopedRulesIndex(root2) {
44268
44283
  const rootFile = path87.join(root2, "CLAUDE.md");
44269
44284
  const before = existsSync74(rootFile) ? readFileSync59(rootFile, "utf8") : "";
44270
44285
  const after = upsertScopedRulesPointer(before, directories);
44271
- if (after !== before) writeFileSync45(rootFile, after);
44286
+ if (after !== before) writeFileSync44(rootFile, after);
44272
44287
  return directories;
44273
44288
  }
44274
44289
 
@@ -44280,24 +44295,24 @@ function indexRules() {
44280
44295
  const rootFile = path88.relative(process.cwd(), path88.join(root2, "CLAUDE.md"));
44281
44296
  if (directories.length === 0) {
44282
44297
  console.log(
44283
- chalk262.gray(`No directories carry their own \`## Rules\` under ${root2}`)
44298
+ chalk263.gray(`No directories carry their own \`## Rules\` under ${root2}`)
44284
44299
  );
44285
44300
  return;
44286
44301
  }
44287
44302
  console.log(`Recorded in ${rootFile || "CLAUDE.md"}`);
44288
44303
  for (const directory of directories)
44289
- console.log(` ${chalk262.cyan(directory)}`);
44304
+ console.log(` ${chalk263.cyan(directory)}`);
44290
44305
  }
44291
44306
 
44292
44307
  // src/commands/rules/listRules.ts
44293
44308
  import path89 from "path";
44294
- import chalk263 from "chalk";
44309
+ import chalk264 from "chalk";
44295
44310
  function listRules(target, options2 = {}) {
44296
44311
  const resolved = path89.resolve(target ?? process.cwd());
44297
44312
  const rules2 = readScopedRules(resolved);
44298
44313
  if (rules2.length === 0) {
44299
44314
  const label = path89.relative(process.cwd(), resolved) || ".";
44300
- console.log(chalk263.gray(`No rules in scope for ${label}`));
44315
+ console.log(chalk264.gray(`No rules in scope for ${label}`));
44301
44316
  return;
44302
44317
  }
44303
44318
  const base = findRepoRoot(scopeDirectory(resolved));
@@ -44307,21 +44322,21 @@ function listRules(target, options2 = {}) {
44307
44322
  if (rule.source !== shown) {
44308
44323
  shown = rule.source;
44309
44324
  console.log(
44310
- chalk263.dim(base ? path89.relative(base, rule.source) : rule.source)
44325
+ chalk264.dim(base ? path89.relative(base, rule.source) : rule.source)
44311
44326
  );
44312
44327
  }
44313
44328
  console.log(
44314
- ` ${chalk263.cyan(rule.code.padEnd(width2))} ${rule.title ?? rule.text}`
44329
+ ` ${chalk264.cyan(rule.code.padEnd(width2))} ${rule.title ?? rule.text}`
44315
44330
  );
44316
44331
  if (options2.full && rule.title)
44317
- console.log(` ${" ".repeat(width2)} ${chalk263.dim(rule.text)}`);
44332
+ console.log(` ${" ".repeat(width2)} ${chalk264.dim(rule.text)}`);
44318
44333
  }
44319
44334
  }
44320
44335
 
44321
44336
  // src/commands/rules/addRule.ts
44322
- import { existsSync as existsSync76, readFileSync as readFileSync61, writeFileSync as writeFileSync46 } from "fs";
44337
+ import { existsSync as existsSync76, readFileSync as readFileSync61, writeFileSync as writeFileSync45 } from "fs";
44323
44338
  import path91 from "path";
44324
- import chalk264 from "chalk";
44339
+ import chalk265 from "chalk";
44325
44340
 
44326
44341
  // src/commands/rules/insertRuleBullet.ts
44327
44342
  function ruleBullet({ code, title, text: text20 }) {
@@ -44380,7 +44395,7 @@ function read2(file) {
44380
44395
  function addRule(text20, options2) {
44381
44396
  const rule = text20.trim();
44382
44397
  if (rule === "") {
44383
- console.error(chalk264.red("Rule text is required"));
44398
+ console.error(chalk265.red("Rule text is required"));
44384
44399
  process.exitCode = 1;
44385
44400
  return;
44386
44401
  }
@@ -44388,7 +44403,7 @@ function addRule(text20, options2) {
44388
44403
  const targetDir = path91.dirname(target);
44389
44404
  const root2 = findRepoRoot(targetDir) ?? targetDir;
44390
44405
  const code = nextRuleCode(root2);
44391
- writeFileSync46(
44406
+ writeFileSync45(
44392
44407
  target,
44393
44408
  insertRuleBullet(read2(target), {
44394
44409
  code,
@@ -44398,14 +44413,14 @@ function addRule(text20, options2) {
44398
44413
  );
44399
44414
  updateScopedRulesIndex(root2);
44400
44415
  console.log(
44401
- `Added ${chalk264.cyan(code)} to ${path91.relative(process.cwd(), target) || target}`
44416
+ `Added ${chalk265.cyan(code)} to ${path91.relative(process.cwd(), target) || target}`
44402
44417
  );
44403
44418
  }
44404
44419
 
44405
44420
  // src/commands/rules/addUserRule.ts
44406
- import chalk265 from "chalk";
44421
+ import chalk266 from "chalk";
44407
44422
  function fail10(message3) {
44408
- console.error(chalk265.red(message3));
44423
+ console.error(chalk266.red(message3));
44409
44424
  process.exitCode = 1;
44410
44425
  }
44411
44426
  function asRules(value) {
@@ -44424,7 +44439,7 @@ async function addToUserDb(rule) {
44424
44439
  rule
44425
44440
  ]);
44426
44441
  if (!result.ok) return fail10(result.errors.join("\n"));
44427
- console.log(`Added ${chalk265.cyan(rule.title)} to advice.rules in user (db)`);
44442
+ console.log(`Added ${chalk266.cyan(rule.title)} to advice.rules in user (db)`);
44428
44443
  }
44429
44444
  function addToUserNode(rule, globalConfigPath) {
44430
44445
  const advice = loadGlobalConfigRaw(globalConfigPath).advice;
@@ -44437,7 +44452,7 @@ function addToUserNode(rule, globalConfigPath) {
44437
44452
  );
44438
44453
  if (!result.ok) return fail10(result.errors.join("\n"));
44439
44454
  console.log(
44440
- `Added ${chalk265.cyan(rule.title)} to advice.rules in user (node) (${globalConfigFileLabel(globalConfigPath)})`
44455
+ `Added ${chalk266.cyan(rule.title)} to advice.rules in user (node) (${globalConfigFileLabel(globalConfigPath)})`
44441
44456
  );
44442
44457
  }
44443
44458
  async function addUserRule(text20, options2, globalConfigPath = getGlobalConfigPath()) {
@@ -44492,7 +44507,7 @@ function registerRules(program) {
44492
44507
  }
44493
44508
 
44494
44509
  // src/commands/seq/seqAuth.ts
44495
- import chalk267 from "chalk";
44510
+ import chalk268 from "chalk";
44496
44511
 
44497
44512
  // src/commands/seq/loadConnections.ts
44498
44513
  function loadConnections2() {
@@ -44521,10 +44536,10 @@ function setDefaultConnection(name) {
44521
44536
  }
44522
44537
 
44523
44538
  // src/shared/assertUniqueName.ts
44524
- import chalk266 from "chalk";
44539
+ import chalk267 from "chalk";
44525
44540
  function assertUniqueName(existingNames, name) {
44526
44541
  if (existingNames.includes(name)) {
44527
- console.error(chalk266.red(`Connection "${name}" already exists.`));
44542
+ console.error(chalk267.red(`Connection "${name}" already exists.`));
44528
44543
  process.exit(1);
44529
44544
  }
44530
44545
  }
@@ -44542,16 +44557,16 @@ async function promptConnection2(existingNames) {
44542
44557
  var seqAuth = createConnectionAuth({
44543
44558
  load: loadConnections2,
44544
44559
  save: saveConnections2,
44545
- format: (c) => `${chalk267.bold(c.name)} ${c.url}`,
44560
+ format: (c) => `${chalk268.bold(c.name)} ${c.url}`,
44546
44561
  promptNew: promptConnection2,
44547
44562
  onFirst: (c) => setDefaultConnection(c.name)
44548
44563
  });
44549
44564
 
44550
44565
  // src/commands/seq/seqQuery.ts
44551
- import chalk271 from "chalk";
44566
+ import chalk272 from "chalk";
44552
44567
 
44553
44568
  // src/commands/seq/fetchSeq.ts
44554
- import chalk268 from "chalk";
44569
+ import chalk269 from "chalk";
44555
44570
  async function fetchSeq(conn, path109, params) {
44556
44571
  const url = `${conn.url}${path109}?${params}`;
44557
44572
  const response = await fetch(url, {
@@ -44562,7 +44577,7 @@ async function fetchSeq(conn, path109, params) {
44562
44577
  });
44563
44578
  if (!response.ok) {
44564
44579
  const body = await response.text();
44565
- console.error(chalk268.red(`Seq returned ${response.status}: ${body}`));
44580
+ console.error(chalk269.red(`Seq returned ${response.status}: ${body}`));
44566
44581
  process.exit(1);
44567
44582
  }
44568
44583
  return response;
@@ -44621,23 +44636,23 @@ async function fetchSeqEvents(conn, params) {
44621
44636
  }
44622
44637
 
44623
44638
  // src/commands/seq/formatEvent.ts
44624
- import chalk269 from "chalk";
44639
+ import chalk270 from "chalk";
44625
44640
  function levelColor(level) {
44626
44641
  switch (level) {
44627
44642
  case "Fatal":
44628
- return chalk269.bgRed.white;
44643
+ return chalk270.bgRed.white;
44629
44644
  case "Error":
44630
- return chalk269.red;
44645
+ return chalk270.red;
44631
44646
  case "Warning":
44632
- return chalk269.yellow;
44647
+ return chalk270.yellow;
44633
44648
  case "Information":
44634
- return chalk269.cyan;
44649
+ return chalk270.cyan;
44635
44650
  case "Debug":
44636
- return chalk269.gray;
44651
+ return chalk270.gray;
44637
44652
  case "Verbose":
44638
- return chalk269.dim;
44653
+ return chalk270.dim;
44639
44654
  default:
44640
- return chalk269.white;
44655
+ return chalk270.white;
44641
44656
  }
44642
44657
  }
44643
44658
  function levelAbbrev(level) {
@@ -44678,12 +44693,12 @@ function formatTimestamp(iso) {
44678
44693
  function formatEvent(event) {
44679
44694
  const color = levelColor(event.Level);
44680
44695
  const abbrev = levelAbbrev(event.Level);
44681
- const ts10 = chalk269.dim(formatTimestamp(event.Timestamp));
44696
+ const ts10 = chalk270.dim(formatTimestamp(event.Timestamp));
44682
44697
  const msg = renderMessage(event);
44683
44698
  const lines2 = [`${ts10} ${color(`[${abbrev}]`)} ${msg}`];
44684
44699
  if (event.Exception) {
44685
44700
  for (const line of event.Exception.split("\n")) {
44686
- lines2.push(chalk269.red(` ${line}`));
44701
+ lines2.push(chalk270.red(` ${line}`));
44687
44702
  }
44688
44703
  }
44689
44704
  return lines2.join("\n");
@@ -44716,11 +44731,11 @@ function rejectTimestampFilter(filter) {
44716
44731
  }
44717
44732
 
44718
44733
  // src/shared/resolveNamedConnection.ts
44719
- import chalk270 from "chalk";
44734
+ import chalk271 from "chalk";
44720
44735
  function resolveNamedConnection(connections, requested, defaultName, kind, authCommand) {
44721
44736
  if (connections.length === 0) {
44722
44737
  console.error(
44723
- chalk270.red(
44738
+ chalk271.red(
44724
44739
  `No ${kind} connections configured. Run '${authCommand}' first.`
44725
44740
  )
44726
44741
  );
@@ -44729,7 +44744,7 @@ function resolveNamedConnection(connections, requested, defaultName, kind, authC
44729
44744
  const target = requested ?? defaultName ?? connections[0].name;
44730
44745
  const connection = connections.find((c) => c.name === target);
44731
44746
  if (!connection) {
44732
- console.error(chalk270.red(`${kind} connection "${target}" not found.`));
44747
+ console.error(chalk271.red(`${kind} connection "${target}" not found.`));
44733
44748
  process.exit(1);
44734
44749
  }
44735
44750
  return connection;
@@ -44758,7 +44773,7 @@ async function seqQuery(filter, options2) {
44758
44773
  new URLSearchParams({ filter, count: String(count10) })
44759
44774
  );
44760
44775
  if (events.length === 0) {
44761
- console.log(chalk271.yellow("No events found."));
44776
+ console.log(chalk272.yellow("No events found."));
44762
44777
  return;
44763
44778
  }
44764
44779
  if (options2.json) {
@@ -44769,11 +44784,11 @@ async function seqQuery(filter, options2) {
44769
44784
  for (const event of chronological) {
44770
44785
  console.log(formatEvent(event));
44771
44786
  }
44772
- console.log(chalk271.dim(`
44787
+ console.log(chalk272.dim(`
44773
44788
  ${events.length} events`));
44774
44789
  if (events.length >= count10) {
44775
44790
  console.log(
44776
- chalk271.yellow(
44791
+ chalk272.yellow(
44777
44792
  `Results limited to ${count10}. Use --count to retrieve more.`
44778
44793
  )
44779
44794
  );
@@ -44781,10 +44796,10 @@ ${events.length} events`));
44781
44796
  }
44782
44797
 
44783
44798
  // src/shared/setNamedDefaultConnection.ts
44784
- import chalk272 from "chalk";
44799
+ import chalk273 from "chalk";
44785
44800
  function setNamedDefaultConnection(connections, name, setDefault, kind) {
44786
44801
  if (!connections.find((c) => c.name === name)) {
44787
- console.error(chalk272.red(`Connection "${name}" not found.`));
44802
+ console.error(chalk273.red(`Connection "${name}" not found.`));
44788
44803
  process.exit(1);
44789
44804
  }
44790
44805
  setDefault(name);
@@ -44858,7 +44873,7 @@ function parseReply(line) {
44858
44873
  }
44859
44874
 
44860
44875
  // src/commands/show/refuseSessionFiles.ts
44861
- import { homedir as homedir28 } from "os";
44876
+ import { homedir as homedir27 } from "os";
44862
44877
 
44863
44878
  // src/commands/show/findShownSessionFiles.ts
44864
44879
  var NOT_AFTER = String.raw`(?![\w\-/]|\.\w)`;
@@ -44950,7 +44965,7 @@ function refuseSessionFiles(body) {
44950
44965
  const shown = findShownSessionFiles(
44951
44966
  body,
44952
44967
  sessionWrittenPaths(transcript.path),
44953
- { home: homedir28(), cwd: process.cwd() }
44968
+ { home: homedir27(), cwd: process.cwd() }
44954
44969
  );
44955
44970
  if (shown.length === 0) return;
44956
44971
  console.error(
@@ -45039,10 +45054,10 @@ function parseSlackThreadRef(value) {
45039
45054
  }
45040
45055
 
45041
45056
  // src/commands/slack/postSlackMessage.ts
45042
- import { mkdirSync as mkdirSync32, writeFileSync as writeFileSync48 } from "fs";
45057
+ import { mkdirSync as mkdirSync32, writeFileSync as writeFileSync47 } from "fs";
45043
45058
 
45044
45059
  // src/commands/slack/previewSlackThreadParts.ts
45045
- import { mkdirSync as mkdirSync31, writeFileSync as writeFileSync47 } from "fs";
45060
+ import { mkdirSync as mkdirSync31, writeFileSync as writeFileSync46 } from "fs";
45046
45061
 
45047
45062
  // src/commands/slack/readSlackParts.ts
45048
45063
  import { readFileSync as readFileSync63 } from "fs";
@@ -45088,12 +45103,12 @@ async function reviewProposedSlackMessage(target, body, workingPath) {
45088
45103
  }
45089
45104
 
45090
45105
  // src/commands/slack/slackWorkingFile.ts
45091
- import { join as join95 } from "path";
45106
+ import { join as join93 } from "path";
45092
45107
  function slackWorkingFile(channel, partIndex) {
45093
45108
  const slug2 = channel.replace(/^[#@]/, "").toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "channel";
45094
- const dir = join95(getStoreDir(), "slack");
45109
+ const dir = join93(getStoreDir(), "slack");
45095
45110
  const name = partIndex === void 0 ? slug2 : `${slug2}-${partIndex}`;
45096
- return { dir, bodyPath: join95(dir, `${name}.md`) };
45111
+ return { dir, bodyPath: join93(dir, `${name}.md`) };
45097
45112
  }
45098
45113
 
45099
45114
  // src/commands/slack/previewSlackThreadParts.ts
@@ -45108,7 +45123,7 @@ async function previewSlackThreadParts({
45108
45123
  mkdirSync31(dir, { recursive: true });
45109
45124
  const paths = bodies.map((body, index3) => {
45110
45125
  const { bodyPath } = slackWorkingFile(channel, index3 + 1);
45111
- writeFileSync47(bodyPath, `${body}
45126
+ writeFileSync46(bodyPath, `${body}
45112
45127
  `);
45113
45128
  return bodyPath;
45114
45129
  });
@@ -45160,7 +45175,7 @@ async function postSlackMessage(channelArg, options2) {
45160
45175
  }
45161
45176
  const { dir, bodyPath } = slackWorkingFile(channel);
45162
45177
  mkdirSync32(dir, { recursive: true });
45163
- writeFileSync48(bodyPath, `${body}
45178
+ writeFileSync47(bodyPath, `${body}
45164
45179
  `);
45165
45180
  await reviewProposedSlackMessage({ channel, threadTs }, body, bodyPath);
45166
45181
  console.log(`Approved for ${target}. The body to post is at:`);
@@ -45195,7 +45210,7 @@ function registerSlack(program) {
45195
45210
  }
45196
45211
 
45197
45212
  // src/commands/sql/sqlAuth.ts
45198
- import chalk274 from "chalk";
45213
+ import chalk275 from "chalk";
45199
45214
 
45200
45215
  // src/commands/sql/loadConnections.ts
45201
45216
  function loadConnections3() {
@@ -45224,7 +45239,7 @@ function setDefaultConnection2(name) {
45224
45239
  }
45225
45240
 
45226
45241
  // src/commands/sql/promptConnection.ts
45227
- import chalk273 from "chalk";
45242
+ import chalk274 from "chalk";
45228
45243
  async function promptConnection3(existingNames) {
45229
45244
  const name = await promptInput("name", "Connection name:", "default");
45230
45245
  assertUniqueName(existingNames, name);
@@ -45232,7 +45247,7 @@ async function promptConnection3(existingNames) {
45232
45247
  const portStr = await promptInput("port", "Port:", "1433");
45233
45248
  const port = Number.parseInt(portStr, 10);
45234
45249
  if (!Number.isFinite(port)) {
45235
- console.error(chalk273.red(`Invalid port "${portStr}".`));
45250
+ console.error(chalk274.red(`Invalid port "${portStr}".`));
45236
45251
  process.exit(1);
45237
45252
  }
45238
45253
  const user = await promptInput("user", "User:");
@@ -45245,13 +45260,13 @@ async function promptConnection3(existingNames) {
45245
45260
  var sqlAuth = createConnectionAuth({
45246
45261
  load: loadConnections3,
45247
45262
  save: saveConnections3,
45248
- format: (c) => `${chalk274.bold(c.name)} ${c.server}:${c.port}/${c.database} (${c.user})`,
45263
+ format: (c) => `${chalk275.bold(c.name)} ${c.server}:${c.port}/${c.database} (${c.user})`,
45249
45264
  promptNew: promptConnection3,
45250
45265
  onFirst: (c) => setDefaultConnection2(c.name)
45251
45266
  });
45252
45267
 
45253
45268
  // src/commands/sql/printTable.ts
45254
- import chalk275 from "chalk";
45269
+ import chalk276 from "chalk";
45255
45270
  function formatCell(value) {
45256
45271
  if (value === null || value === void 0) return "";
45257
45272
  if (value instanceof Date) return value.toISOString();
@@ -45260,7 +45275,7 @@ function formatCell(value) {
45260
45275
  }
45261
45276
  function printTable(rows) {
45262
45277
  if (rows.length === 0) {
45263
- console.log(chalk275.yellow("(no rows)"));
45278
+ console.log(chalk276.yellow("(no rows)"));
45264
45279
  return;
45265
45280
  }
45266
45281
  const columns = Object.keys(rows[0]);
@@ -45268,13 +45283,13 @@ function printTable(rows) {
45268
45283
  (col) => Math.max(col.length, ...rows.map((r) => formatCell(r[col]).length))
45269
45284
  );
45270
45285
  const header = columns.map((c, i) => c.padEnd(widths[i])).join(" ");
45271
- console.log(chalk275.dim(header));
45272
- console.log(chalk275.dim("-".repeat(header.length)));
45286
+ console.log(chalk276.dim(header));
45287
+ console.log(chalk276.dim("-".repeat(header.length)));
45273
45288
  for (const row3 of rows) {
45274
45289
  const line = columns.map((c, i) => formatCell(row3[c]).padEnd(widths[i])).join(" ");
45275
45290
  console.log(line);
45276
45291
  }
45277
- console.log(chalk275.dim(`
45292
+ console.log(chalk276.dim(`
45278
45293
  ${rows.length} row${rows.length === 1 ? "" : "s"}`));
45279
45294
  }
45280
45295
 
@@ -45334,7 +45349,7 @@ async function sqlColumns(table, connectionName) {
45334
45349
  }
45335
45350
 
45336
45351
  // src/commands/sql/sqlMutate.ts
45337
- import chalk276 from "chalk";
45352
+ import chalk277 from "chalk";
45338
45353
 
45339
45354
  // src/commands/sql/isMutation.ts
45340
45355
  var MUTATION_KEYWORDS = [
@@ -45368,7 +45383,7 @@ function isMutation(sql33) {
45368
45383
  async function sqlMutate(query, connectionName) {
45369
45384
  if (!isMutation(query)) {
45370
45385
  console.error(
45371
- chalk276.red(
45386
+ chalk277.red(
45372
45387
  "assist sql mutate refuses non-mutating statements. Use `assist sql query` instead."
45373
45388
  )
45374
45389
  );
@@ -45378,18 +45393,18 @@ async function sqlMutate(query, connectionName) {
45378
45393
  const pool = await sqlConnect(conn);
45379
45394
  try {
45380
45395
  const result = await pool.request().query(query);
45381
- console.log(chalk276.dim(`${result.rowsAffected.join(", ")} row(s) affected`));
45396
+ console.log(chalk277.dim(`${result.rowsAffected.join(", ")} row(s) affected`));
45382
45397
  } finally {
45383
45398
  await pool.close();
45384
45399
  }
45385
45400
  }
45386
45401
 
45387
45402
  // src/commands/sql/sqlQuery.ts
45388
- import chalk277 from "chalk";
45403
+ import chalk278 from "chalk";
45389
45404
  async function sqlQuery(query, connectionName) {
45390
45405
  if (isMutation(query)) {
45391
45406
  console.error(
45392
- chalk277.red(
45407
+ chalk278.red(
45393
45408
  "assist sql query refuses mutating statements. Use `assist sql mutate` instead."
45394
45409
  )
45395
45410
  );
@@ -45404,7 +45419,7 @@ async function sqlQuery(query, connectionName) {
45404
45419
  printTable(rows);
45405
45420
  } else {
45406
45421
  console.log(
45407
- chalk277.dim(`${result.rowsAffected.join(", ")} row(s) affected`)
45422
+ chalk278.dim(`${result.rowsAffected.join(", ")} row(s) affected`)
45408
45423
  );
45409
45424
  }
45410
45425
  } finally {
@@ -45819,7 +45834,7 @@ function syncPi(claudeDir, options2) {
45819
45834
  // src/commands/sync/syncSettings.ts
45820
45835
  import * as fs49 from "fs";
45821
45836
  import * as path102 from "path";
45822
- import chalk278 from "chalk";
45837
+ import chalk279 from "chalk";
45823
45838
  async function syncSettings(claudeDir, targetBase, options2) {
45824
45839
  const source = path102.join(claudeDir, "settings.json");
45825
45840
  const target = path102.join(targetBase, "settings.json");
@@ -45838,7 +45853,7 @@ async function syncSettings(claudeDir, targetBase, options2) {
45838
45853
  if (mergedContent !== normalizedTarget) {
45839
45854
  if (!options2?.yes) {
45840
45855
  console.log(
45841
- chalk278.yellow(
45856
+ chalk279.yellow(
45842
45857
  "\n\u26A0\uFE0F Warning: settings.json differs from existing file"
45843
45858
  )
45844
45859
  );
@@ -45846,7 +45861,7 @@ async function syncSettings(claudeDir, targetBase, options2) {
45846
45861
  printDiff(targetContent, mergedContent);
45847
45862
  printAutoConfirmHint();
45848
45863
  const confirm = await promptConfirm(
45849
- chalk278.red("Overwrite existing settings.json?"),
45864
+ chalk279.red("Overwrite existing settings.json?"),
45850
45865
  false
45851
45866
  );
45852
45867
  if (!confirm) {
@@ -46276,20 +46291,20 @@ async function configure() {
46276
46291
 
46277
46292
  // src/commands/transcript/list.ts
46278
46293
  import { existsSync as existsSync82, readdirSync as readdirSync24, statSync as statSync13 } from "fs";
46279
- import { join as join107 } from "path";
46294
+ import { join as join105 } from "path";
46280
46295
  function list5() {
46281
46296
  const { vttDir } = getTranscriptConfig();
46282
46297
  if (!existsSync82(vttDir)) return;
46283
46298
  for (const entry of readdirSync24(vttDir)) {
46284
46299
  if (!entry.endsWith(".vtt")) continue;
46285
- if (statSync13(join107(vttDir, entry)).isDirectory()) continue;
46300
+ if (statSync13(join105(vttDir, entry)).isDirectory()) continue;
46286
46301
  console.log(entry);
46287
46302
  }
46288
46303
  }
46289
46304
 
46290
46305
  // src/commands/transcript/move.ts
46291
- import { existsSync as existsSync83, mkdirSync as mkdirSync38, renameSync as renameSync5, writeFileSync as writeFileSync53 } from "fs";
46292
- import { basename as basename29, join as join108 } from "path";
46306
+ import { existsSync as existsSync83, mkdirSync as mkdirSync38, renameSync as renameSync5, writeFileSync as writeFileSync52 } from "fs";
46307
+ import { basename as basename29, join as join106 } from "path";
46293
46308
 
46294
46309
  // src/commands/transcript/convertVttToMarkdown.ts
46295
46310
  function convertVttToMarkdown(inputPath) {
@@ -46299,9 +46314,9 @@ function convertVttToMarkdown(inputPath) {
46299
46314
  // src/commands/transcript/move.ts
46300
46315
  var DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
46301
46316
  function archiveRawVtt(vttDir, sourcePath, filename) {
46302
- const processedDir = join108(vttDir, "processed");
46317
+ const processedDir = join106(vttDir, "processed");
46303
46318
  mkdirSync38(processedDir, { recursive: true });
46304
- renameSync5(sourcePath, join108(processedDir, filename));
46319
+ renameSync5(sourcePath, join106(processedDir, filename));
46305
46320
  }
46306
46321
  function move(file, options2) {
46307
46322
  const { date, client } = options2;
@@ -46311,25 +46326,25 @@ function move(file, options2) {
46311
46326
  }
46312
46327
  const { vttDir, transcriptsDir, summaryDir } = getTranscriptConfig();
46313
46328
  const filename = basename29(file);
46314
- const sourcePath = join108(vttDir, filename);
46329
+ const sourcePath = join106(vttDir, filename);
46315
46330
  if (!existsSync83(sourcePath)) {
46316
46331
  console.error(`Error: VTT file not found: ${sourcePath}`);
46317
46332
  process.exit(1);
46318
46333
  }
46319
46334
  const base = basename29(filename, ".vtt").replace(/ Transcription$/, "");
46320
46335
  const outputName = `${date} ${base}.md`;
46321
- const formattedDir = join108(transcriptsDir, client);
46336
+ const formattedDir = join106(transcriptsDir, client);
46322
46337
  mkdirSync38(formattedDir, { recursive: true });
46323
- const formattedPath = join108(formattedDir, outputName);
46324
- writeFileSync53(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
46338
+ const formattedPath = join106(formattedDir, outputName);
46339
+ writeFileSync52(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
46325
46340
  archiveRawVtt(vttDir, sourcePath, filename);
46326
- const summaryPath = join108(summaryDir, client, outputName);
46341
+ const summaryPath = join106(summaryDir, client, outputName);
46327
46342
  console.log(`Formatted transcript: ${formattedPath}`);
46328
46343
  console.log(`Summary target: ${summaryPath}`);
46329
46344
  }
46330
46345
 
46331
46346
  // src/commands/transcript/merge.ts
46332
- import { existsSync as existsSync84, writeFileSync as writeFileSync54 } from "fs";
46347
+ import { existsSync as existsSync84, writeFileSync as writeFileSync53 } from "fs";
46333
46348
  import { basename as basename30 } from "path";
46334
46349
 
46335
46350
  // src/commands/transcript/failTranscript.ts
@@ -46506,7 +46521,7 @@ async function merge(files, options2 = {}) {
46506
46521
  console.log(document);
46507
46522
  return;
46508
46523
  }
46509
- writeFileSync54(options2.out, `${document}
46524
+ writeFileSync53(options2.out, `${document}
46510
46525
  `, "utf8");
46511
46526
  console.log(`Merged transcript: ${options2.out}`);
46512
46527
  }
@@ -47534,7 +47549,7 @@ ${result.reason}`
47534
47549
  }
47535
47550
 
47536
47551
  // src/commands/watch/markSyncPending.ts
47537
- import { existsSync as existsSync86, writeFileSync as writeFileSync55 } from "fs";
47552
+ import { existsSync as existsSync86, writeFileSync as writeFileSync54 } from "fs";
47538
47553
 
47539
47554
  // src/commands/watch/gitMarkerPath.ts
47540
47555
  import { resolve as resolve30 } from "path";
@@ -47560,7 +47575,7 @@ function pendingFromEarlierLap() {
47560
47575
  }
47561
47576
  function writePendingMarker() {
47562
47577
  try {
47563
- writeFileSync55(syncPendingPath(), "");
47578
+ writeFileSync54(syncPendingPath(), "");
47564
47579
  } catch {
47565
47580
  }
47566
47581
  }
@@ -48054,10 +48069,10 @@ function registerWatchWait(watchCommand) {
48054
48069
  }
48055
48070
 
48056
48071
  // src/commands/watch/simulateDivergence.ts
48057
- import { writeFileSync as writeFileSync56 } from "fs";
48072
+ import { writeFileSync as writeFileSync55 } from "fs";
48058
48073
  function simulateDivergence() {
48059
48074
  try {
48060
- writeFileSync56(simulatedDivergencePath(), "");
48075
+ writeFileSync55(simulatedDivergencePath(), "");
48061
48076
  console.log(
48062
48077
  `the next assist watch wait poll in ${runGit3(["rev-parse", "--show-toplevel"])} will exit 3 as a simulated divergence`
48063
48078
  );
@@ -48152,7 +48167,7 @@ function registerWatch(program) {
48152
48167
  // src/commands/roam/postRoamActivity.ts
48153
48168
  import { execFileSync as execFileSync31 } from "child_process";
48154
48169
  import { readdirSync as readdirSync26, readFileSync as readFileSync71, statSync as statSync14 } from "fs";
48155
- import { join as join109 } from "path";
48170
+ import { join as join107 } from "path";
48156
48171
  function findPortFile(roamDir) {
48157
48172
  let entries;
48158
48173
  try {
@@ -48161,7 +48176,7 @@ function findPortFile(roamDir) {
48161
48176
  return void 0;
48162
48177
  }
48163
48178
  const candidates = entries.filter((name) => /^roam-local-api(-[^.]+)?\.port$/.test(name)).map((name) => {
48164
- const path109 = join109(roamDir, name);
48179
+ const path109 = join107(roamDir, name);
48165
48180
  try {
48166
48181
  return { path: path109, mtimeMs: statSync14(path109).mtimeMs };
48167
48182
  } catch {
@@ -48178,7 +48193,7 @@ var PID_BY_APP = {
48178
48193
  function postRoamActivity(app, event) {
48179
48194
  const appData = process.env.APPDATA;
48180
48195
  if (!appData) return;
48181
- const portFile = findPortFile(join109(appData, "Roam"));
48196
+ const portFile = findPortFile(join107(appData, "Roam"));
48182
48197
  if (!portFile) return;
48183
48198
  let port;
48184
48199
  try {
@@ -48361,7 +48376,7 @@ function link2() {
48361
48376
  }
48362
48377
 
48363
48378
  // src/commands/run/add.ts
48364
- import { mkdirSync as mkdirSync39, writeFileSync as writeFileSync57 } from "fs";
48379
+ import { mkdirSync as mkdirSync39, writeFileSync as writeFileSync56 } from "fs";
48365
48380
  import { dirname as dirname46 } from "path";
48366
48381
 
48367
48382
  // src/commands/run/editRepoRunList.ts
@@ -48521,11 +48536,11 @@ function requireParsedArgs() {
48521
48536
  }
48522
48537
 
48523
48538
  // src/commands/run/runCommandFilePath.ts
48524
- import { join as join110 } from "path";
48539
+ import { join as join108 } from "path";
48525
48540
  function runCommandFilePath(name) {
48526
48541
  const segments = name.split(":");
48527
48542
  const file = `${segments.pop()}.md`;
48528
- return join110(".claude", "commands", ...segments, file);
48543
+ return join108(".claude", "commands", ...segments, file);
48529
48544
  }
48530
48545
 
48531
48546
  // src/commands/run/add.ts
@@ -48549,7 +48564,7 @@ description: Run ${name}
48549
48564
 
48550
48565
  Run \`assist run ${name} $ARGUMENTS 2>&1\`.
48551
48566
  `;
48552
- writeFileSync57(filePath, content);
48567
+ writeFileSync56(filePath, content);
48553
48568
  console.log(`Created command file: ${filePath}`);
48554
48569
  }
48555
48570
  async function add4() {
@@ -48654,7 +48669,7 @@ function registerRunAdd(runCommand) {
48654
48669
 
48655
48670
  // src/commands/run/remove.ts
48656
48671
  import { existsSync as existsSync89, readdirSync as readdirSync27, rmdirSync, unlinkSync as unlinkSync20 } from "fs";
48657
- import { dirname as dirname47, join as join111 } from "path";
48672
+ import { dirname as dirname47, join as join109 } from "path";
48658
48673
 
48659
48674
  // src/commands/run/removeRepoRunConfig.ts
48660
48675
  function isNamed(entry, name) {
@@ -48672,7 +48687,7 @@ function removeRepoRunConfig(name, repoName, cwd = process.cwd()) {
48672
48687
 
48673
48688
  // src/commands/run/remove.ts
48674
48689
  function removeEmptyNamespaceDirs(filePath) {
48675
- const root2 = join111(".claude", "commands");
48690
+ const root2 = join109(".claude", "commands");
48676
48691
  for (let dir = dirname47(filePath); dir !== root2; dir = dirname47(dir)) {
48677
48692
  if (!existsSync89(dir) || readdirSync27(dir).length > 0) return;
48678
48693
  rmdirSync(dir);
@@ -48680,7 +48695,7 @@ function removeEmptyNamespaceDirs(filePath) {
48680
48695
  }
48681
48696
  function deleteCommandFile(name) {
48682
48697
  const filePath = runCommandFilePath(name);
48683
- const legacyPath = join111(".claude", "commands", `${name}.md`);
48698
+ const legacyPath = join109(".claude", "commands", `${name}.md`);
48684
48699
  for (const path109 of /* @__PURE__ */ new Set([filePath, legacyPath])) {
48685
48700
  if (existsSync89(path109)) {
48686
48701
  unlinkSync20(path109);
@@ -48737,18 +48752,18 @@ function registerRun(program) {
48737
48752
  }
48738
48753
 
48739
48754
  // src/commands/sessions/nodes/formatLink.ts
48740
- import chalk279 from "chalk";
48755
+ import chalk280 from "chalk";
48741
48756
  var STATE_COLOURS = {
48742
- connected: chalk279.green,
48743
- connecting: chalk279.yellow,
48744
- disconnected: chalk279.red,
48745
- "version-blocked": chalk279.red
48757
+ connected: chalk280.green,
48758
+ connecting: chalk280.yellow,
48759
+ disconnected: chalk280.red,
48760
+ "version-blocked": chalk280.red
48746
48761
  };
48747
48762
  function formatLink(link3) {
48748
- const colour = STATE_COLOURS[link3.state] ?? chalk279.white;
48763
+ const colour = STATE_COLOURS[link3.state] ?? chalk280.white;
48749
48764
  const peer = link3.peerVersion ? ` peer ${link3.peerVersion}` : "";
48750
48765
  const error = link3.error ? `
48751
- ${chalk279.dim(`last error${link3.errorAt ? ` ${link3.errorAt}` : ""}: ${link3.error}`)}` : "";
48766
+ ${chalk280.dim(`last error${link3.errorAt ? ` ${link3.errorAt}` : ""}: ${link3.error}`)}` : "";
48752
48767
  return ` ${link3.name} ${colour(link3.state)} ${link3.url}${peer}${error}`;
48753
48768
  }
48754
48769
 
@@ -49487,7 +49502,7 @@ function broadcastSessions(sessions, clients, linkedSessions = [], active) {
49487
49502
 
49488
49503
  // src/commands/sessions/daemon/findServerParents.ts
49489
49504
  import { existsSync as existsSync91 } from "fs";
49490
- import { join as join112, resolve as resolve32 } from "path";
49505
+ import { join as join110, resolve as resolve32 } from "path";
49491
49506
  function isLive(session) {
49492
49507
  return !!session.pty && session.status !== "done" && session.status !== "error";
49493
49508
  }
@@ -49496,7 +49511,7 @@ function isLiveAgent(session) {
49496
49511
  }
49497
49512
  function serverRunDirs(sessions, file) {
49498
49513
  return new Set(
49499
- sessions.filter((s) => s.server && s.cwd && isLive(s)).map((s) => resolve32(s.cwd)).filter((dir) => existsSync91(join112(dir, file)))
49514
+ sessions.filter((s) => s.server && s.cwd && isLive(s)).map((s) => resolve32(s.cwd)).filter((dir) => existsSync91(join110(dir, file)))
49500
49515
  );
49501
49516
  }
49502
49517
  function findServerParents(sessions, file) {
@@ -49650,7 +49665,7 @@ function sendResizeSnapshot(s, send) {
49650
49665
  }
49651
49666
 
49652
49667
  // src/commands/sessions/daemon/viewerSize.ts
49653
- import { readFileSync as readFileSync73, writeFileSync as writeFileSync58 } from "fs";
49668
+ import { readFileSync as readFileSync73, writeFileSync as writeFileSync57 } from "fs";
49654
49669
  var DEFAULT_SIZE = { cols: 120, rows: 30 };
49655
49670
  var remembered;
49656
49671
  function rememberViewerSize(cols, rows) {
@@ -49658,7 +49673,7 @@ function rememberViewerSize(cols, rows) {
49658
49673
  if (remembered?.cols === cols && remembered.rows === rows) return;
49659
49674
  remembered = { cols, rows };
49660
49675
  try {
49661
- writeFileSync58(daemonPaths.viewerSize, JSON.stringify(remembered));
49676
+ writeFileSync57(daemonPaths.viewerSize, JSON.stringify(remembered));
49662
49677
  } catch (error) {
49663
49678
  daemonLog(
49664
49679
  `viewer size ${cols}x${rows} not saved: ${error instanceof Error ? error.message : String(error)}`
@@ -50410,13 +50425,13 @@ function createRunSession(id, { runName, runArgs, cwd, meta }) {
50410
50425
  }
50411
50426
 
50412
50427
  // src/commands/sessions/daemon/autoUpdate/autoUpdateControl.ts
50413
- import { existsSync as existsSync94, rmSync as rmSync13, writeFileSync as writeFileSync59 } from "fs";
50428
+ import { existsSync as existsSync94, rmSync as rmSync13, writeFileSync as writeFileSync58 } from "fs";
50414
50429
  var paused;
50415
50430
  var wake;
50416
50431
  var holdReleased = false;
50417
50432
  function persist2(value) {
50418
50433
  try {
50419
- if (value) writeFileSync59(daemonPaths.autoUpdatePaused, "");
50434
+ if (value) writeFileSync58(daemonPaths.autoUpdatePaused, "");
50420
50435
  else rmSync13(daemonPaths.autoUpdatePaused, { force: true });
50421
50436
  } catch {
50422
50437
  }
@@ -50557,7 +50572,7 @@ async function runAutoUpdateLoop(deps2, maxLaps = Number.POSITIVE_INFINITY) {
50557
50572
  }
50558
50573
 
50559
50574
  // src/commands/sessions/daemon/autoUpdate/trimWatcherLog.ts
50560
- import { readFileSync as readFileSync75, writeFileSync as writeFileSync60 } from "fs";
50575
+ import { readFileSync as readFileSync75, writeFileSync as writeFileSync59 } from "fs";
50561
50576
  var KEEP_TAIL = 256 * 1024;
50562
50577
  var MAX_LOG_SIZE = 4 * 1024 * 1024;
50563
50578
  function trimWatcherLog(cwd) {
@@ -50569,7 +50584,7 @@ function trimWatcherLog(cwd) {
50569
50584
  return;
50570
50585
  }
50571
50586
  if (log2.length <= MAX_LOG_SIZE) return;
50572
- writeFileSync60(path109, log2.slice(-KEEP_TAIL));
50587
+ writeFileSync59(path109, log2.slice(-KEEP_TAIL));
50573
50588
  daemonLog(`auto-update: log ${path109} trimmed to its last ${KEEP_TAIL} chars`);
50574
50589
  }
50575
50590
 
@@ -50979,12 +50994,12 @@ import { basename as basename32 } from "path";
50979
50994
 
50980
50995
  // src/commands/sessions/daemon/worktree/deleteStrandedTree.ts
50981
50996
  import { existsSync as existsSync96 } from "fs";
50982
- import { join as join115 } from "path";
50997
+ import { join as join113 } from "path";
50983
50998
 
50984
50999
  // src/commands/sessions/daemon/worktree/deleteTreeDirectly.ts
50985
51000
  import { statSync as statSync16 } from "fs";
50986
51001
  import { rm as rm3 } from "fs/promises";
50987
- import { join as join114 } from "path";
51002
+ import { join as join112 } from "path";
50988
51003
  async function deleteTreeDirectly(clone, worktreePath, why) {
50989
51004
  if (holdsAGitDirectoryRatherThanALink(worktreePath)) {
50990
51005
  const refusal = "it is a clone of its own, not a linked worktree";
@@ -51012,7 +51027,7 @@ async function deleteTreeDirectly(clone, worktreePath, why) {
51012
51027
  return { removed: true };
51013
51028
  }
51014
51029
  function holdsAGitDirectoryRatherThanALink(worktreePath) {
51015
- return statSync16(join114(worktreePath, ".git"), {
51030
+ return statSync16(join112(worktreePath, ".git"), {
51016
51031
  throwIfNoEntry: false
51017
51032
  })?.isDirectory() === true;
51018
51033
  }
@@ -51048,7 +51063,7 @@ async function deleteStrandedTree(clone, worktreePath, cause) {
51048
51063
  );
51049
51064
  }
51050
51065
  function strandedReason(worktreePath, cause) {
51051
- if (!existsSync96(join115(worktreePath, ".git")))
51066
+ if (!existsSync96(join113(worktreePath, ".git")))
51052
51067
  return "its .git link is already gone";
51053
51068
  if (/not a working tree|not a git repository/i.test(reason2(cause)))
51054
51069
  return "git no longer recognises it as a working tree";
@@ -55992,7 +56007,7 @@ import { existsSync as existsSync104 } from "fs";
55992
56007
 
55993
56008
  // src/commands/sessions/daemon/worktree/carryTranscriptToTree.ts
55994
56009
  import { copyFileSync as copyFileSync4, existsSync as existsSync103, mkdirSync as mkdirSync43 } from "fs";
55995
- import { join as join116 } from "path";
56010
+ import { join as join114 } from "path";
55996
56011
  function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
55997
56012
  const dir = projectDirForCwd(toCwd);
55998
56013
  if (dir === projectDirForCwd(fromCwd)) {
@@ -56001,7 +56016,7 @@ function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
56001
56016
  );
56002
56017
  return;
56003
56018
  }
56004
- const dest = join116(dir, `${claudeSessionId}.jsonl`);
56019
+ const dest = join114(dir, `${claudeSessionId}.jsonl`);
56005
56020
  if (existsSync103(dest)) {
56006
56021
  daemonLog(`transcript ${claudeSessionId} already present in ${dir}`);
56007
56022
  return;
@@ -56319,10 +56334,10 @@ function autoUpdateReply() {
56319
56334
  }
56320
56335
 
56321
56336
  // src/commands/sessions/daemon/autoUpdate/applyAutoUpdateAction.ts
56322
- import { rmSync as rmSync15, writeFileSync as writeFileSync61 } from "fs";
56337
+ import { rmSync as rmSync15, writeFileSync as writeFileSync60 } from "fs";
56323
56338
  function signalLap(installDir, marker2) {
56324
56339
  const control = watchControlPaths(installDir);
56325
- if (control) writeFileSync61(control[marker2], "");
56340
+ if (control) writeFileSync60(control[marker2], "");
56326
56341
  }
56327
56342
  function applyAutoUpdateAction(action) {
56328
56343
  const installDir = getInstallDir();
@@ -57567,7 +57582,7 @@ function handleConnection(socket, manager) {
57567
57582
  }
57568
57583
 
57569
57584
  // src/commands/sessions/daemon/onListening.ts
57570
- import { unlinkSync as unlinkSync21, writeFileSync as writeFileSync62 } from "fs";
57585
+ import { unlinkSync as unlinkSync21, writeFileSync as writeFileSync61 } from "fs";
57571
57586
 
57572
57587
  // src/commands/sessions/daemon/startPidFileWatchdog.ts
57573
57588
  import { readFileSync as readFileSync77 } from "fs";
@@ -57589,7 +57604,7 @@ function ownsPidFile() {
57589
57604
 
57590
57605
  // src/commands/sessions/daemon/onListening.ts
57591
57606
  function onListening(manager, checkAutoExit) {
57592
- writeFileSync62(daemonPaths.pid, String(process.pid));
57607
+ writeFileSync61(daemonPaths.pid, String(process.pid));
57593
57608
  startPidFileWatchdog(() => {
57594
57609
  daemonLog("lost daemon.pid ownership; shutting down sessions and exiting");
57595
57610
  void manager.flushActiveMs().finally(() => {
@@ -57739,7 +57754,7 @@ async function closeSession2() {
57739
57754
  }
57740
57755
 
57741
57756
  // src/commands/sessions/nodes/listNodes.ts
57742
- import chalk280 from "chalk";
57757
+ import chalk281 from "chalk";
57743
57758
  async function nodesReport() {
57744
57759
  const live = await queryNodes();
57745
57760
  if (live)
@@ -57756,10 +57771,10 @@ async function listNodes(options2) {
57756
57771
  console.log(JSON.stringify(report, null, 2));
57757
57772
  return;
57758
57773
  }
57759
- console.log(`${report.local} ${chalk280.dim("(this node)")}`);
57774
+ console.log(`${report.local} ${chalk281.dim("(this node)")}`);
57760
57775
  if (!report.daemonRunning)
57761
- console.log(chalk280.dim(" daemon not running; showing configured links"));
57762
- if (report.links.length === 0) console.log(chalk280.dim(" no links"));
57776
+ console.log(chalk281.dim(" daemon not running; showing configured links"));
57777
+ if (report.links.length === 0) console.log(chalk281.dim(" no links"));
57763
57778
  for (const link3 of report.links) console.log(formatLink(link3));
57764
57779
  }
57765
57780
 
@@ -57781,7 +57796,7 @@ async function findUnlinkedWindowsNode(health2, platform = detectPlatform()) {
57781
57796
  }
57782
57797
 
57783
57798
  // src/commands/sessions/nodes/printReport.ts
57784
- import chalk281 from "chalk";
57799
+ import chalk282 from "chalk";
57785
57800
  function printReport(report) {
57786
57801
  if (report.links.length === 0) {
57787
57802
  console.log(`${report.local} has no links`);
@@ -57795,11 +57810,11 @@ function printReport(report) {
57795
57810
  for (const diagnosis of report.links) printDiagnosis(diagnosis);
57796
57811
  }
57797
57812
  function printDiagnosis(diagnosis) {
57798
- console.log(`${chalk281.bold(diagnosis.name)} ${chalk281.dim(diagnosis.url)}`);
57813
+ console.log(`${chalk282.bold(diagnosis.name)} ${chalk282.dim(diagnosis.url)}`);
57799
57814
  for (const hop of diagnosis.hops) {
57800
- const mark = hop.ok ? chalk281.green("\u2713") : chalk281.red("\u2717");
57815
+ const mark = hop.ok ? chalk282.green("\u2713") : chalk282.red("\u2717");
57801
57816
  console.log(` ${mark} ${hop.hop.padEnd(9)} ${hop.detail ?? hop.error}`);
57802
- if (hop.remediation) console.log(` ${chalk281.yellow(hop.remediation)}`);
57817
+ if (hop.remediation) console.log(` ${chalk282.yellow(hop.remediation)}`);
57803
57818
  }
57804
57819
  }
57805
57820
 
@@ -57871,14 +57886,14 @@ function registerDiagnoseCommands(nodes, calledBy5) {
57871
57886
  }
57872
57887
 
57873
57888
  // src/commands/sessions/nodes/linkNode.ts
57874
- import chalk284 from "chalk";
57889
+ import chalk285 from "chalk";
57875
57890
 
57876
57891
  // src/commands/sessions/nodes/notifyDaemonLinks.ts
57877
- import chalk282 from "chalk";
57892
+ import chalk283 from "chalk";
57878
57893
  async function notifyDaemonLinks() {
57879
57894
  if (!await isDaemonRunning()) {
57880
57895
  console.log(
57881
- chalk282.yellow(
57896
+ chalk283.yellow(
57882
57897
  "The sessions daemon is not running; it loads the links when it starts."
57883
57898
  )
57884
57899
  );
@@ -57886,11 +57901,11 @@ async function notifyDaemonLinks() {
57886
57901
  }
57887
57902
  try {
57888
57903
  await sendToDaemonAwaitAck({ type: "reload-links" });
57889
- console.log(chalk282.dim("The sessions daemon reloaded its links."));
57904
+ console.log(chalk283.dim("The sessions daemon reloaded its links."));
57890
57905
  } catch (error) {
57891
57906
  const message3 = error instanceof Error ? error.message : String(error);
57892
57907
  console.log(
57893
- chalk282.yellow(
57908
+ chalk283.yellow(
57894
57909
  `Could not notify the sessions daemon (${message3}); run \`assist daemon restart\` to apply the change.`
57895
57910
  )
57896
57911
  );
@@ -57898,7 +57913,7 @@ async function notifyDaemonLinks() {
57898
57913
  }
57899
57914
 
57900
57915
  // src/commands/sessions/nodes/readLinks.ts
57901
- import chalk283 from "chalk";
57916
+ import chalk284 from "chalk";
57902
57917
 
57903
57918
  // src/commands/sessions/nodes/writeLinks.ts
57904
57919
  async function writeLinks(links2) {
@@ -57921,7 +57936,7 @@ async function readLinks() {
57921
57936
  await writeLinks(links2);
57922
57937
  const dropped = stored.filter((link3) => !link3.url).map((link3) => link3.name);
57923
57938
  console.log(
57924
- chalk283.yellow(`Removed ${dropped.join(", ")}: ${SSH_LINK_RETIRED}`)
57939
+ chalk284.yellow(`Removed ${dropped.join(", ")}: ${SSH_LINK_RETIRED}`)
57925
57940
  );
57926
57941
  return links2;
57927
57942
  }
@@ -57977,7 +57992,7 @@ async function linkNode(name, url, options2) {
57977
57992
  throw new Error(`${name} is this node; link to a different node`);
57978
57993
  const link3 = await buildLink(name, url, options2);
57979
57994
  await writeLinks([...others, link3]);
57980
- console.log(chalk284.green(`Linked ${name} (${link3.url})`));
57995
+ console.log(chalk285.green(`Linked ${name} (${link3.url})`));
57981
57996
  await notifyDaemonLinks();
57982
57997
  }
57983
57998
 
@@ -58160,16 +58175,16 @@ function registerPeerActionCommands(nodes, calledBy5) {
58160
58175
  }
58161
58176
 
58162
58177
  // src/commands/sessions/nodes/unlinkNode.ts
58163
- import chalk285 from "chalk";
58178
+ import chalk286 from "chalk";
58164
58179
  async function unlinkNode(name) {
58165
58180
  const links2 = await readLinks();
58166
58181
  const remaining = links2.filter((link3) => link3.name !== name);
58167
58182
  if (remaining.length === links2.length) {
58168
- console.log(chalk285.yellow(`No link named ${name}`));
58183
+ console.log(chalk286.yellow(`No link named ${name}`));
58169
58184
  return;
58170
58185
  }
58171
58186
  await writeLinks(remaining);
58172
- console.log(chalk285.green(`Unlinked ${name}`));
58187
+ console.log(chalk286.green(`Unlinked ${name}`));
58173
58188
  await notifyDaemonLinks();
58174
58189
  }
58175
58190
 
@@ -58417,10 +58432,10 @@ function createProgram() {
58417
58432
  }
58418
58433
 
58419
58434
  // src/reportCliError.ts
58420
- import chalk286 from "chalk";
58435
+ import chalk287 from "chalk";
58421
58436
  function reportCliError(error) {
58422
58437
  if (error instanceof InvalidItemIdError || error instanceof AmbiguousRepoConfigError || error instanceof UnknownRepoConfigError || error instanceof MissingRunCwdError || error instanceof MiroExtractError || error instanceof MissingDatabaseUrlError) {
58423
- console.error(chalk286.red(error.message));
58438
+ console.error(chalk287.red(error.message));
58424
58439
  } else {
58425
58440
  console.error(error);
58426
58441
  }