@staff0rd/assist 0.931.0 → 0.932.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.931.0",
9
+ version: "0.932.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -4645,11 +4645,17 @@ async function readJsonBody(req) {
4645
4645
 
4646
4646
  // src/commands/sessions/web/browser/browserRelay.ts
4647
4647
  var RELAY_TIMEOUT_MS = 1e4;
4648
+ function optionalString(value) {
4649
+ return value === void 0 || typeof value === "string";
4650
+ }
4648
4651
  function parseBrowserRequest(body) {
4649
- const { op, url } = body ?? {};
4650
- if (op !== "status") return void 0;
4651
- if (url !== void 0 && typeof url !== "string") return void 0;
4652
- return { op, url };
4652
+ const { op, url, selector, text: text17 } = body ?? {};
4653
+ if (!optionalString(url)) return void 0;
4654
+ if (op === "status" || op === "snapshot") return { op, url };
4655
+ if (op !== "inspect") return void 0;
4656
+ if (typeof selector === "string" && selector) return { op, url, selector };
4657
+ if (typeof text17 === "string" && text17) return { op, url, text: text17 };
4658
+ return void 0;
4653
4659
  }
4654
4660
  async function browserRelay(req, res) {
4655
4661
  if (req.headers.origin) {
@@ -21269,7 +21275,7 @@ function registerCodeComment(parent) {
21269
21275
 
21270
21276
  // src/commands/codexHook/parseCodexHookInput.ts
21271
21277
  var SUPPORTED_TOOLS = /* @__PURE__ */ new Set(["Bash", "PowerShell"]);
21272
- function optionalString(value) {
21278
+ function optionalString2(value) {
21273
21279
  return typeof value === "string" ? value : void 0;
21274
21280
  }
21275
21281
  function parseCodexHookInput(raw) {
@@ -21277,9 +21283,9 @@ function parseCodexHookInput(raw) {
21277
21283
  const data = JSON.parse(raw);
21278
21284
  const base = {
21279
21285
  event: data.hook_event_name ?? "PreToolUse",
21280
- cwd: optionalString(data.cwd)
21286
+ cwd: optionalString2(data.cwd)
21281
21287
  };
21282
- const transcriptPath2 = optionalString(data.transcript_path);
21288
+ const transcriptPath2 = optionalString2(data.transcript_path);
21283
21289
  if (transcriptPath2) base.transcriptPath = transcriptPath2;
21284
21290
  const command = data.tool_input?.command;
21285
21291
  if (typeof command !== "string" || !command.trim()) return base;
@@ -22876,7 +22882,24 @@ function registerConfig(program) {
22876
22882
  ).action((filter) => configKeys(filter));
22877
22883
  }
22878
22884
 
22879
- // src/commands/browser/browserStatus.ts
22885
+ // src/commands/browser/browserInspect.ts
22886
+ import chalk139 from "chalk";
22887
+
22888
+ // src/commands/browser/formatInspectMatches.ts
22889
+ function formatInspectMatches({ matches, total: total2 }, query) {
22890
+ if (total2 === 0) return [`no elements match ${query}`];
22891
+ const lines2 = matches.flatMap((match, index2) => [
22892
+ `[${index2 + 1}/${total2}] ${match.width}\xD7${match.height} ${JSON.stringify(match.text)}`,
22893
+ ...match.chain.map((step3) => ` ${step3}`)
22894
+ ]);
22895
+ if (total2 > matches.length)
22896
+ lines2.push(
22897
+ `showing the first ${matches.length} of ${total2} matches; narrow the query to see the rest`
22898
+ );
22899
+ return lines2;
22900
+ }
22901
+
22902
+ // src/commands/browser/requestTab.ts
22880
22903
  import chalk138 from "chalk";
22881
22904
 
22882
22905
  // src/commands/browser/requestBrowser.ts
@@ -22905,24 +22928,75 @@ async function requestBrowser(server, request) {
22905
22928
  return data;
22906
22929
  }
22907
22930
 
22931
+ // src/commands/browser/requestTab.ts
22932
+ function fail6(message3) {
22933
+ console.error(chalk138.red(`Error: ${message3}`));
22934
+ process.exit(1);
22935
+ }
22936
+ async function requestTab(server, request) {
22937
+ const reply2 = await requestBrowser(server, request).catch(
22938
+ (error) => fail6(error.message)
22939
+ );
22940
+ if (!reply2.ok) {
22941
+ if (reply2.tabUrl) console.log(`tab: ${reply2.tabUrl}`);
22942
+ fail6(reply2.error);
22943
+ }
22944
+ console.log(`tab: ${reply2.result.tabUrl}`);
22945
+ return { ...reply2.result, version: reply2.version };
22946
+ }
22947
+
22948
+ // src/commands/browser/browserInspect.ts
22949
+ async function browserInspect(selector, options2) {
22950
+ if (!selector === !options2.text) {
22951
+ console.error(
22952
+ chalk139.red("Error: pass either a <selector> or --text <text>, not both")
22953
+ );
22954
+ process.exit(1);
22955
+ }
22956
+ const query = options2.text ? { text: options2.text } : { selector };
22957
+ const result = await requestTab(options2.server, {
22958
+ op: "inspect",
22959
+ url: options2.url,
22960
+ ...query
22961
+ });
22962
+ const label2 = options2.text ? `text ${JSON.stringify(options2.text)}` : `selector ${selector}`;
22963
+ for (const line of formatInspectMatches(result, label2)) console.log(line);
22964
+ }
22965
+
22966
+ // src/commands/browser/browserSnapshot.ts
22967
+ import { mkdirSync as mkdirSync17, writeFileSync as writeFileSync27 } from "fs";
22968
+ import { dirname as dirname28 } from "path";
22969
+
22970
+ // src/commands/browser/snapshotPath.ts
22971
+ import { homedir as homedir21 } from "os";
22972
+ import { join as join54 } from "path";
22973
+ function snapshotPath(tabUrl, now) {
22974
+ const host = new URL(tabUrl).host.replace(/[^\w.-]/g, "-");
22975
+ const timestamp6 = now.toISOString().replace(/[:.]/g, "-");
22976
+ return join54(homedir21(), ".assist", "browser", `${host}-${timestamp6}.html`);
22977
+ }
22978
+
22979
+ // src/commands/browser/browserSnapshot.ts
22980
+ async function browserSnapshot(options2) {
22981
+ const result = await requestTab(options2.server, {
22982
+ op: "snapshot",
22983
+ url: options2.url
22984
+ });
22985
+ const path108 = snapshotPath(result.tabUrl, /* @__PURE__ */ new Date());
22986
+ mkdirSync17(dirname28(path108), { recursive: true });
22987
+ writeFileSync27(path108, result.html);
22988
+ console.log(`snapshot: ${path108}`);
22989
+ }
22990
+
22908
22991
  // src/commands/browser/browserStatus.ts
22909
22992
  async function browserStatus(options2) {
22910
- const reply2 = await requestBrowser(options2.server, {
22993
+ const result = await requestTab(options2.server, {
22911
22994
  op: "status",
22912
22995
  url: options2.url
22913
- }).catch((error) => {
22914
- console.error(chalk138.red(`Error: ${error.message}`));
22915
- process.exit(1);
22916
22996
  });
22917
- console.log(`extension: connected (v${reply2.version})`);
22918
- if (!reply2.ok) {
22919
- if (reply2.tabUrl) console.log(`tab: ${reply2.tabUrl}`);
22920
- console.error(chalk138.red(`Error: ${reply2.error}`));
22921
- process.exit(1);
22922
- }
22923
- console.log(`tab: ${reply2.result.tabUrl}`);
22997
+ console.log(`extension: connected (v${result.version})`);
22924
22998
  console.log(
22925
- `content script: ${reply2.result.contentScript ? "running" : "not running (reload the tab, or update the extension)"}`
22999
+ `content script: ${result.contentScript ? "running" : "not running (reload the tab, or update the extension)"}`
22926
23000
  );
22927
23001
  }
22928
23002
 
@@ -22946,21 +23020,34 @@ function registerBrowser(program) {
22946
23020
  "Print the connected extension's version, the target tab's URL and whether the assist content script runs there"
22947
23021
  )
22948
23022
  ).action(browserStatus);
23023
+ withTargetOptions(
23024
+ browser.command("snapshot").description(
23025
+ "Write the target tab's DOM to ~/.assist/browser/<host>-<timestamp>.html and print its path"
23026
+ )
23027
+ ).action(browserSnapshot);
23028
+ withTargetOptions(
23029
+ browser.command("inspect [selector]").description(
23030
+ "Print the ancestor chain (tag#id.class), text and size of each element matching a CSS selector or --text, capped"
23031
+ ).option(
23032
+ "--text <text>",
23033
+ "Match elements whose own text contains this, instead of a selector"
23034
+ )
23035
+ ).action(browserInspect);
22949
23036
  }
22950
23037
 
22951
23038
  // src/commands/extension/extension.ts
22952
23039
  import { cp } from "fs/promises";
22953
- import chalk139 from "chalk";
23040
+ import chalk140 from "chalk";
22954
23041
 
22955
23042
  // src/commands/extension/extensionDir.ts
22956
23043
  import { existsSync as existsSync49 } from "fs";
22957
- import { dirname as dirname28, join as join54 } from "path";
23044
+ import { dirname as dirname29, join as join55 } from "path";
22958
23045
  import { fileURLToPath as fileURLToPath6 } from "url";
22959
- var moduleDir = dirname28(fileURLToPath6(import.meta.url));
23046
+ var moduleDir = dirname29(fileURLToPath6(import.meta.url));
22960
23047
  function extensionDir() {
22961
- const bundled = join54(moduleDir, "commands", "extension", "extension");
23048
+ const bundled = join55(moduleDir, "commands", "extension", "extension");
22962
23049
  if (existsSync49(bundled)) return bundled;
22963
- return join54(moduleDir, "..", "..", "..", "extension");
23050
+ return join55(moduleDir, "..", "..", "..", "extension");
22964
23051
  }
22965
23052
 
22966
23053
  // src/commands/extension/extension.ts
@@ -22973,21 +23060,21 @@ async function loadPath(source) {
22973
23060
  return WSL_WINDOWS_PATH;
22974
23061
  } catch {
22975
23062
  console.log(
22976
- chalk139.yellow(`could not copy extension to ${WSL_WINDOWS_PATH}`)
23063
+ chalk140.yellow(`could not copy extension to ${WSL_WINDOWS_PATH}`)
22977
23064
  );
22978
23065
  return source;
22979
23066
  }
22980
23067
  }
22981
23068
  async function extension() {
22982
23069
  const path108 = await loadPath(extensionDir());
22983
- console.log(chalk139.bold("assist \u2014 GitHub browser extension"));
22984
- console.log(chalk139.dim(`load the unpacked extension from ${path108}`));
23070
+ console.log(chalk140.bold("assist \u2014 GitHub browser extension"));
23071
+ console.log(chalk140.dim(`load the unpacked extension from ${path108}`));
22985
23072
  }
22986
23073
 
22987
23074
  // src/commands/extension/printExtensionUrl.ts
22988
23075
  import { readFile as readFile4 } from "fs/promises";
22989
- import { join as join55 } from "path";
22990
- import chalk140 from "chalk";
23076
+ import { join as join56 } from "path";
23077
+ import chalk141 from "chalk";
22991
23078
 
22992
23079
  // src/commands/extension/latestUpdate.ts
22993
23080
  function latestUpdate(manifest, updates2) {
@@ -23003,14 +23090,14 @@ function latestUpdateLink(manifest, updates2) {
23003
23090
  // src/commands/extension/printExtensionUrl.ts
23004
23091
  async function printExtensionUrl() {
23005
23092
  const manifest = await readFile4(
23006
- join55(extensionDir(), "manifest.json"),
23093
+ join56(extensionDir(), "manifest.json"),
23007
23094
  "utf8"
23008
23095
  );
23009
23096
  const { update_url } = JSON.parse(manifest).browser_specific_settings.gecko;
23010
23097
  const response = await fetch(update_url);
23011
23098
  const link3 = response.ok ? latestUpdateLink(manifest, await response.text()) : void 0;
23012
23099
  if (!link3) {
23013
- console.log(chalk140.red(`no signed build found in ${update_url}`));
23100
+ console.log(chalk141.red(`no signed build found in ${update_url}`));
23014
23101
  process.exitCode = 1;
23015
23102
  return;
23016
23103
  }
@@ -23019,16 +23106,16 @@ async function printExtensionUrl() {
23019
23106
 
23020
23107
  // src/commands/extension/signExtension.ts
23021
23108
  import { rm as rm2 } from "fs/promises";
23022
- import { homedir as homedir21, tmpdir as tmpdir3 } from "os";
23023
- import { join as join61 } from "path";
23024
- import chalk142 from "chalk";
23109
+ import { homedir as homedir22, tmpdir as tmpdir3 } from "os";
23110
+ import { join as join62 } from "path";
23111
+ import chalk143 from "chalk";
23025
23112
 
23026
23113
  // src/commands/extension/copySignedXpi.ts
23027
23114
  import { copyFile } from "fs/promises";
23028
- import { join as join56 } from "path";
23115
+ import { join as join57 } from "path";
23029
23116
  var SIGNED_XPI_NAME = "assist-extension.xpi";
23030
23117
  async function copySignedXpi(xpi, dir) {
23031
- const fixed2 = join56(dir, SIGNED_XPI_NAME);
23118
+ const fixed2 = join57(dir, SIGNED_XPI_NAME);
23032
23119
  if (fixed2 === xpi) return fixed2;
23033
23120
  await copyFile(xpi, fixed2);
23034
23121
  return fixed2;
@@ -23037,16 +23124,16 @@ async function copySignedXpi(xpi, dir) {
23037
23124
  // src/commands/extension/findSignedXpi.ts
23038
23125
  import { existsSync as existsSync50 } from "fs";
23039
23126
  import { readdir } from "fs/promises";
23040
- import { join as join57 } from "path";
23127
+ import { join as join58 } from "path";
23041
23128
  async function findSignedXpi(dir) {
23042
23129
  if (!existsSync50(dir)) return null;
23043
23130
  const name = (await readdir(dir)).find((entry) => entry.endsWith(".xpi"));
23044
- return name ? join57(dir, name) : null;
23131
+ return name ? join58(dir, name) : null;
23045
23132
  }
23046
23133
 
23047
23134
  // src/commands/extension/signedAddonInstallPath.ts
23048
23135
  import { cp as cp2 } from "fs/promises";
23049
- import chalk141 from "chalk";
23136
+ import chalk142 from "chalk";
23050
23137
  var WSL_WINDOWS_XPI = "/mnt/c/tools/assist-extension.xpi";
23051
23138
  var WSL_WINDOWS_PATH2 = String.raw`C:\tools\assist-extension.xpi`;
23052
23139
  async function signedAddonInstallPath(xpi) {
@@ -23056,7 +23143,7 @@ async function signedAddonInstallPath(xpi) {
23056
23143
  return WSL_WINDOWS_PATH2;
23057
23144
  } catch {
23058
23145
  console.log(
23059
- chalk141.yellow(`could not copy the add-on to ${WSL_WINDOWS_PATH2}`)
23146
+ chalk142.yellow(`could not copy the add-on to ${WSL_WINDOWS_PATH2}`)
23060
23147
  );
23061
23148
  return xpi;
23062
23149
  }
@@ -23064,10 +23151,10 @@ async function signedAddonInstallPath(xpi) {
23064
23151
 
23065
23152
  // src/commands/extension/signPreflightProblem.ts
23066
23153
  import { existsSync as existsSync51 } from "fs";
23067
- import { join as join58 } from "path";
23154
+ import { join as join59 } from "path";
23068
23155
  var KEY_URL = "https://addons.mozilla.org/en-US/developers/addon/api/key/";
23069
23156
  function signPreflightProblem(source) {
23070
- if (!existsSync51(join58(source, "content.js")))
23157
+ if (!existsSync51(join59(source, "content.js")))
23071
23158
  return {
23072
23159
  message: `no content.js in ${source}`,
23073
23160
  hint: "run npm run build to bundle the content script"
@@ -23082,7 +23169,7 @@ function signPreflightProblem(source) {
23082
23169
 
23083
23170
  // src/commands/extension/stageExtension.ts
23084
23171
  import { cp as cp3, mkdir as mkdir5, readFile as readFile5, rm, writeFile as writeFile4 } from "fs/promises";
23085
- import { basename as basename14, join as join59 } from "path";
23172
+ import { basename as basename14, join as join60 } from "path";
23086
23173
 
23087
23174
  // src/commands/extension/stampManifestVersion.ts
23088
23175
  function stampManifestVersion(manifest, version2) {
@@ -23099,7 +23186,7 @@ async function stageExtension(source, staging, version2) {
23099
23186
  recursive: true,
23100
23187
  filter: (path108) => basename14(path108) !== "updates.json"
23101
23188
  });
23102
- const manifest = join59(staging, "manifest.json");
23189
+ const manifest = join60(staging, "manifest.json");
23103
23190
  const stamped = stampManifestVersion(
23104
23191
  await readFile5(manifest, "utf8"),
23105
23192
  version2
@@ -23109,7 +23196,7 @@ async function stageExtension(source, staging, version2) {
23109
23196
 
23110
23197
  // src/commands/extension/writeUpdateManifest.ts
23111
23198
  import { readFile as readFile6, writeFile as writeFile5 } from "fs/promises";
23112
- import { join as join60 } from "path";
23199
+ import { join as join61 } from "path";
23113
23200
 
23114
23201
  // src/commands/extension/buildUpdateManifest.ts
23115
23202
  var RELEASE_DOWNLOAD_URL = "https://github.com/staff0rd/assist/releases/download";
@@ -23134,30 +23221,30 @@ function buildUpdateManifest(manifest, version2) {
23134
23221
  // src/commands/extension/writeUpdateManifest.ts
23135
23222
  async function writeUpdateManifest(source, dir, version2) {
23136
23223
  await writeFile5(
23137
- join60(dir, "updates.json"),
23224
+ join61(dir, "updates.json"),
23138
23225
  buildUpdateManifest(
23139
- await readFile6(join60(source, "manifest.json"), "utf8"),
23226
+ await readFile6(join61(source, "manifest.json"), "utf8"),
23140
23227
  version2
23141
23228
  )
23142
23229
  );
23143
23230
  }
23144
23231
 
23145
23232
  // src/commands/extension/signExtension.ts
23146
- var ARTIFACTS_DIR = join61(homedir21(), ".assist", "extension");
23147
- var STAGING_DIR = join61(tmpdir3(), "assist-extension");
23233
+ var ARTIFACTS_DIR = join62(homedir22(), ".assist", "extension");
23234
+ var STAGING_DIR = join62(tmpdir3(), "assist-extension");
23148
23235
  async function signExtension() {
23149
23236
  const source = extensionDir();
23150
23237
  const problem = signPreflightProblem(source);
23151
23238
  if (problem) {
23152
- console.log(chalk142.red(problem.message));
23153
- console.log(chalk142.dim(problem.hint));
23239
+ console.log(chalk143.red(problem.message));
23240
+ console.log(chalk143.dim(problem.hint));
23154
23241
  process.exitCode = 1;
23155
23242
  return;
23156
23243
  }
23157
23244
  const { version: version2 } = package_default;
23158
23245
  await stageExtension(source, STAGING_DIR, version2);
23159
23246
  await rm2(ARTIFACTS_DIR, { recursive: true, force: true });
23160
- console.log(chalk142.bold(`signing version ${version2} for self-distribution`));
23247
+ console.log(chalk143.bold(`signing version ${version2} for self-distribution`));
23161
23248
  const { done: done2 } = spawnInherit("npx", [
23162
23249
  "--yes",
23163
23250
  "web-ext",
@@ -23167,13 +23254,13 @@ async function signExtension() {
23167
23254
  "--channel=unlisted"
23168
23255
  ]);
23169
23256
  if (await done2 !== 0) {
23170
- console.log(chalk142.red("web-ext sign failed"));
23257
+ console.log(chalk143.red("web-ext sign failed"));
23171
23258
  process.exitCode = 1;
23172
23259
  return;
23173
23260
  }
23174
23261
  const xpi = await findSignedXpi(ARTIFACTS_DIR);
23175
23262
  if (!xpi) {
23176
- console.log(chalk142.red(`web-ext wrote no .xpi into ${ARTIFACTS_DIR}`));
23263
+ console.log(chalk143.red(`web-ext wrote no .xpi into ${ARTIFACTS_DIR}`));
23177
23264
  process.exitCode = 1;
23178
23265
  return;
23179
23266
  }
@@ -23181,7 +23268,7 @@ async function signExtension() {
23181
23268
  const path108 = await signedAddonInstallPath(
23182
23269
  await copySignedXpi(xpi, ARTIFACTS_DIR)
23183
23270
  );
23184
- console.log(chalk142.dim(`install the signed add-on from ${path108}`));
23271
+ console.log(chalk143.dim(`install the signed add-on from ${path108}`));
23185
23272
  }
23186
23273
 
23187
23274
  // src/commands/registerExtension.ts
@@ -23242,11 +23329,11 @@ async function dropRetiredTables(exec3) {
23242
23329
  }
23243
23330
 
23244
23331
  // src/commands/db/reportRetiredTables.ts
23245
- import chalk143 from "chalk";
23332
+ import chalk144 from "chalk";
23246
23333
  function reportRetiredTables(tables) {
23247
23334
  for (const table of tables) {
23248
23335
  console.error(
23249
- chalk143.yellow(
23336
+ chalk144.yellow(
23250
23337
  `Retired table ${table.name} still exists (${table.rows} rows). Run \`assist db drop-retired\` to drop it.`
23251
23338
  )
23252
23339
  );
@@ -23254,40 +23341,40 @@ function reportRetiredTables(tables) {
23254
23341
  }
23255
23342
 
23256
23343
  // src/commands/db/reportMigrationStatus.ts
23257
- import chalk144 from "chalk";
23344
+ import chalk145 from "chalk";
23258
23345
  function reportApplied(applied) {
23259
23346
  if (applied.length === 0) {
23260
- console.error(chalk144.green("Database is up to date; nothing to apply."));
23347
+ console.error(chalk145.green("Database is up to date; nothing to apply."));
23261
23348
  return;
23262
23349
  }
23263
23350
  for (const migration of applied) {
23264
23351
  console.error(
23265
- chalk144.green(`Applied migration ${migration.id} (${migration.name}).`)
23352
+ chalk145.green(`Applied migration ${migration.id} (${migration.name}).`)
23266
23353
  );
23267
23354
  }
23268
23355
  }
23269
23356
  function reportMigrationStatus(status2) {
23270
23357
  if (status2.state === "in-sync") {
23271
23358
  console.error(
23272
- chalk144.green(`In sync at migration ${status2.version} (latest).`)
23359
+ chalk145.green(`In sync at migration ${status2.version} (latest).`)
23273
23360
  );
23274
23361
  return;
23275
23362
  }
23276
23363
  if (status2.state === "behind") {
23277
23364
  console.error(
23278
- chalk144.yellow(
23365
+ chalk145.yellow(
23279
23366
  `Behind: applied ${status2.applied}, build expects ${status2.expected}.`
23280
23367
  )
23281
23368
  );
23282
23369
  console.error(
23283
- chalk144.yellow(
23370
+ chalk145.yellow(
23284
23371
  `Pending: ${status2.pending.join(", ")}. Run \`assist db migrate\`.`
23285
23372
  )
23286
23373
  );
23287
23374
  return;
23288
23375
  }
23289
23376
  console.error(
23290
- chalk144.red(
23377
+ chalk145.red(
23291
23378
  `Ahead: applied ${status2.applied}, build knows ${status2.expected}. Update assist.`
23292
23379
  )
23293
23380
  );
@@ -23328,16 +23415,16 @@ function registerDb(program) {
23328
23415
  }
23329
23416
 
23330
23417
  // src/commands/dbMigration/dbMigrationConfirm.ts
23331
- import { unlinkSync as unlinkSync9, writeFileSync as writeFileSync27 } from "fs";
23332
- import chalk145 from "chalk";
23418
+ import { unlinkSync as unlinkSync9, writeFileSync as writeFileSync28 } from "fs";
23419
+ import chalk146 from "chalk";
23333
23420
 
23334
23421
  // src/commands/dbMigration/getMigrationPinPath.ts
23335
- import { join as join62 } from "path";
23422
+ import { join as join63 } from "path";
23336
23423
  function getMigrationPinPath(pin2) {
23337
- return join62(getRestrictedDir(), `db-migration-pin-${pin2}.json`);
23424
+ return join63(getRestrictedDir(), `db-migration-pin-${pin2}.json`);
23338
23425
  }
23339
23426
  function getMigrationApprovalPath(migrationId) {
23340
- return join62(getRestrictedDir(), `db-migration-approval-${migrationId}.json`);
23427
+ return join63(getRestrictedDir(), `db-migration-approval-${migrationId}.json`);
23341
23428
  }
23342
23429
 
23343
23430
  // src/commands/dbMigration/readMigrationPinState.ts
@@ -23360,26 +23447,26 @@ function dbMigrationConfirm(pin2) {
23360
23447
  sweepRestrictedDir();
23361
23448
  const state = readMigrationPinState(pin2);
23362
23449
  if (!state) {
23363
- console.error(chalk145.red(`No pending migration unlock for pin: ${pin2}`));
23450
+ console.error(chalk146.red(`No pending migration unlock for pin: ${pin2}`));
23364
23451
  process.exitCode = 1;
23365
23452
  return;
23366
23453
  }
23367
- writeFileSync27(
23454
+ writeFileSync28(
23368
23455
  getMigrationApprovalPath(state.migrationId),
23369
23456
  JSON.stringify({ migrationId: state.migrationId })
23370
23457
  );
23371
23458
  unlinkSync9(getMigrationPinPath(pin2));
23372
23459
  console.log(
23373
- chalk145.green(
23460
+ chalk146.green(
23374
23461
  `Approved creation of migration ${state.migrationId}. The next write of that migration module will be allowed once.`
23375
23462
  )
23376
23463
  );
23377
23464
  }
23378
23465
 
23379
23466
  // src/commands/dbMigration/dbMigrationUnlock.ts
23380
- import { mkdirSync as mkdirSync17, writeFileSync as writeFileSync28 } from "fs";
23467
+ import { mkdirSync as mkdirSync18, writeFileSync as writeFileSync29 } from "fs";
23381
23468
  import { randomInt as randomInt2 } from "crypto";
23382
- import chalk146 from "chalk";
23469
+ import chalk147 from "chalk";
23383
23470
 
23384
23471
  // src/commands/dbMigration/nextMigrationId.ts
23385
23472
  function nextMigrationId() {
@@ -23390,11 +23477,11 @@ function nextMigrationId() {
23390
23477
  function dbMigrationUnlock() {
23391
23478
  const migrationId = nextMigrationId();
23392
23479
  const pin2 = randomInt2(0, 1e3).toString().padStart(3, "0");
23393
- mkdirSync17(getRestrictedDir(), { recursive: true });
23480
+ mkdirSync18(getRestrictedDir(), { recursive: true });
23394
23481
  sweepRestrictedDir();
23395
- writeFileSync28(getMigrationPinPath(pin2), JSON.stringify({ pin: pin2, migrationId }));
23482
+ writeFileSync29(getMigrationPinPath(pin2), JSON.stringify({ pin: pin2, migrationId }));
23396
23483
  console.error(
23397
- chalk146.yellow.bold(
23484
+ chalk147.yellow.bold(
23398
23485
  "THIS IS YOUR LAST CHANCE TO RECONSIDER BEFORE INVOLVING A HUMAN.\nRequesting this pin pages a real person to approve a new database migration.\nA schema change is hard to reverse once shipped. You had BETTER have confirmed\nthe change with the user and be certain this migration is genuinely necessary."
23399
23486
  )
23400
23487
  );
@@ -23404,7 +23491,7 @@ function dbMigrationUnlock() {
23404
23491
  });
23405
23492
  if (!delivered) {
23406
23493
  console.error(
23407
- chalk146.red(
23494
+ chalk147.red(
23408
23495
  "Could not deliver the confirmation pin via notification.\nThe migration cannot be approved until the notification channel works."
23409
23496
  )
23410
23497
  );
@@ -23414,7 +23501,7 @@ function dbMigrationUnlock() {
23414
23501
  console.log(
23415
23502
  `A confirmation pin was sent to your desktop notifications.
23416
23503
  To approve creating migration ${migrationId}, run:
23417
- ${chalk146.cyan(" assist db-migration confirm <PIN>")}
23504
+ ${chalk147.cyan(" assist db-migration confirm <PIN>")}
23418
23505
  using the pin from that notification.`
23419
23506
  );
23420
23507
  }
@@ -23440,8 +23527,8 @@ function registerDbMigration(parent) {
23440
23527
  }
23441
23528
 
23442
23529
  // src/commands/deploy/redirect.ts
23443
- import { existsSync as existsSync53, readFileSync as readFileSync34, writeFileSync as writeFileSync29 } from "fs";
23444
- import chalk147 from "chalk";
23530
+ import { existsSync as existsSync53, readFileSync as readFileSync34, writeFileSync as writeFileSync30 } from "fs";
23531
+ import chalk148 from "chalk";
23445
23532
  var TRAILING_SLASH_SCRIPT = ` <script>
23446
23533
  if (!window.location.pathname.endsWith('/')) {
23447
23534
  window.location.href = \`\${window.location.pathname}/\${window.location.search}\${window.location.hash}\`;
@@ -23450,23 +23537,23 @@ var TRAILING_SLASH_SCRIPT = ` <script>
23450
23537
  function redirect() {
23451
23538
  const indexPath = "index.html";
23452
23539
  if (!existsSync53(indexPath)) {
23453
- console.log(chalk147.yellow("No index.html found"));
23540
+ console.log(chalk148.yellow("No index.html found"));
23454
23541
  return;
23455
23542
  }
23456
23543
  const content = readFileSync34(indexPath, "utf8");
23457
23544
  if (content.includes("window.location.pathname.endsWith('/')")) {
23458
- console.log(chalk147.dim("Trailing slash script already present"));
23545
+ console.log(chalk148.dim("Trailing slash script already present"));
23459
23546
  return;
23460
23547
  }
23461
23548
  const headCloseIndex = content.indexOf("</head>");
23462
23549
  if (headCloseIndex === -1) {
23463
- console.log(chalk147.red("Could not find </head> tag in index.html"));
23550
+ console.log(chalk148.red("Could not find </head> tag in index.html"));
23464
23551
  return;
23465
23552
  }
23466
23553
  const newContent = `${content.slice(0, headCloseIndex) + TRAILING_SLASH_SCRIPT}
23467
23554
  ${content.slice(headCloseIndex)}`;
23468
- writeFileSync29(indexPath, newContent);
23469
- console.log(chalk147.green("Added trailing slash redirect to index.html"));
23555
+ writeFileSync30(indexPath, newContent);
23556
+ console.log(chalk148.green("Added trailing slash redirect to index.html"));
23470
23557
  }
23471
23558
 
23472
23559
  // src/commands/registerDeploy.ts
@@ -23481,11 +23568,11 @@ import { execFileSync as execFileSync7 } from "child_process";
23481
23568
  import { basename as basename16 } from "path";
23482
23569
 
23483
23570
  // src/commands/devlog/loadBlogSkipDays.ts
23484
- import { homedir as homedir22 } from "os";
23485
- import { join as join63 } from "path";
23486
- var BLOG_REPO_ROOT = join63(homedir22(), "git/blog");
23571
+ import { homedir as homedir23 } from "os";
23572
+ import { join as join64 } from "path";
23573
+ var BLOG_REPO_ROOT = join64(homedir23(), "git/blog");
23487
23574
  function loadBlogSkipDays(repoName) {
23488
- const config = loadRawYaml(join63(BLOG_REPO_ROOT, "assist.yml"));
23575
+ const config = loadRawYaml(join64(BLOG_REPO_ROOT, "assist.yml"));
23489
23576
  const devlog = config.devlog;
23490
23577
  const skip3 = devlog?.skip;
23491
23578
  return new Set(skip3?.[repoName]);
@@ -23493,17 +23580,17 @@ function loadBlogSkipDays(repoName) {
23493
23580
 
23494
23581
  // src/commands/devlog/shared.ts
23495
23582
  import { execSync as execSync31 } from "child_process";
23496
- import chalk148 from "chalk";
23583
+ import chalk149 from "chalk";
23497
23584
 
23498
23585
  // src/shared/getRepoName.ts
23499
23586
  import { existsSync as existsSync54, readFileSync as readFileSync35 } from "fs";
23500
- import { basename as basename15, join as join64 } from "path";
23587
+ import { basename as basename15, join as join65 } from "path";
23501
23588
  function getRepoName() {
23502
23589
  const config = loadConfig();
23503
23590
  if (config.devlog?.name) {
23504
23591
  return config.devlog.name;
23505
23592
  }
23506
- const packageJsonPath = join64(process.cwd(), "package.json");
23593
+ const packageJsonPath = join65(process.cwd(), "package.json");
23507
23594
  if (existsSync54(packageJsonPath)) {
23508
23595
  try {
23509
23596
  const content = readFileSync35(packageJsonPath, "utf8");
@@ -23519,8 +23606,8 @@ function getRepoName() {
23519
23606
 
23520
23607
  // src/commands/devlog/loadDevlogEntries.ts
23521
23608
  import { readdirSync as readdirSync8, readFileSync as readFileSync36 } from "fs";
23522
- import { join as join65 } from "path";
23523
- var DEVLOG_DIR = join65(BLOG_REPO_ROOT, "src/content/devlog");
23609
+ import { join as join66 } from "path";
23610
+ var DEVLOG_DIR = join66(BLOG_REPO_ROOT, "src/content/devlog");
23524
23611
  function extractFrontmatter(content) {
23525
23612
  const fm = content.match(/^---\n([\s\S]*?)\n---/);
23526
23613
  return fm?.[1] ?? null;
@@ -23548,7 +23635,7 @@ function readDevlogFiles(callback) {
23548
23635
  try {
23549
23636
  const files = readdirSync8(DEVLOG_DIR).filter((f) => f.endsWith(".md"));
23550
23637
  for (const file of files) {
23551
- const content = readFileSync36(join65(DEVLOG_DIR, file), "utf8");
23638
+ const content = readFileSync36(join66(DEVLOG_DIR, file), "utf8");
23552
23639
  const parsed = parseFrontmatter(content, file);
23553
23640
  if (parsed) callback(parsed);
23554
23641
  }
@@ -23602,13 +23689,13 @@ function shouldIgnoreCommit(files, ignorePaths) {
23602
23689
  }
23603
23690
  function printCommitsWithFiles(commits2, ignore3, verbose) {
23604
23691
  for (const commit2 of commits2) {
23605
- console.log(` ${chalk148.yellow(commit2.hash)} ${commit2.message}`);
23692
+ console.log(` ${chalk149.yellow(commit2.hash)} ${commit2.message}`);
23606
23693
  if (verbose) {
23607
23694
  const visibleFiles = commit2.files.filter(
23608
23695
  (file) => !ignore3.some((p) => file.startsWith(p))
23609
23696
  );
23610
23697
  for (const file of visibleFiles) {
23611
- console.log(` ${chalk148.dim(file)}`);
23698
+ console.log(` ${chalk149.dim(file)}`);
23612
23699
  }
23613
23700
  }
23614
23701
  }
@@ -23633,15 +23720,15 @@ function parseGitLogCommits(output, ignore3, afterDate) {
23633
23720
  }
23634
23721
 
23635
23722
  // src/commands/devlog/list/printDateHeader.ts
23636
- import chalk149 from "chalk";
23723
+ import chalk150 from "chalk";
23637
23724
  function printDateHeader(date, isSkipped, entries) {
23638
23725
  if (isSkipped) {
23639
- console.log(`${chalk149.bold.blue(date)} ${chalk149.dim("skipped")}`);
23726
+ console.log(`${chalk150.bold.blue(date)} ${chalk150.dim("skipped")}`);
23640
23727
  } else if (entries && entries.length > 0) {
23641
- const entryInfo = entries.map((e) => `${chalk149.green(e.version)} ${e.title}`).join(" | ");
23642
- console.log(`${chalk149.bold.blue(date)} ${entryInfo}`);
23728
+ const entryInfo = entries.map((e) => `${chalk150.green(e.version)} ${e.title}`).join(" | ");
23729
+ console.log(`${chalk150.bold.blue(date)} ${entryInfo}`);
23643
23730
  } else {
23644
- console.log(`${chalk149.bold.blue(date)} ${chalk149.red("\u26A0 devlog missing")}`);
23731
+ console.log(`${chalk150.bold.blue(date)} ${chalk150.red("\u26A0 devlog missing")}`);
23645
23732
  }
23646
23733
  }
23647
23734
 
@@ -23745,24 +23832,24 @@ function bumpVersion(version2, type) {
23745
23832
 
23746
23833
  // src/commands/devlog/next/displayNextEntry.ts
23747
23834
  import { execFileSync as execFileSync9 } from "child_process";
23748
- import chalk151 from "chalk";
23835
+ import chalk152 from "chalk";
23749
23836
 
23750
23837
  // src/commands/devlog/next/displayNextEntry/displayVersion.ts
23751
- import chalk150 from "chalk";
23838
+ import chalk151 from "chalk";
23752
23839
  function displayVersion(conventional, firstHash, patchVersion, minorVersion) {
23753
23840
  if (conventional && firstHash) {
23754
23841
  const version2 = getVersionAtCommit(firstHash);
23755
23842
  if (version2) {
23756
- console.log(`${chalk150.bold("version:")} ${stripToMinor(version2)}`);
23843
+ console.log(`${chalk151.bold("version:")} ${stripToMinor(version2)}`);
23757
23844
  } else {
23758
- console.log(`${chalk150.bold("version:")} ${chalk150.red("unknown")}`);
23845
+ console.log(`${chalk151.bold("version:")} ${chalk151.red("unknown")}`);
23759
23846
  }
23760
23847
  } else if (patchVersion && minorVersion) {
23761
23848
  console.log(
23762
- `${chalk150.bold("version:")} ${patchVersion} (patch) or ${minorVersion} (minor)`
23849
+ `${chalk151.bold("version:")} ${patchVersion} (patch) or ${minorVersion} (minor)`
23763
23850
  );
23764
23851
  } else {
23765
- console.log(`${chalk150.bold("version:")} v0.1 (initial)`);
23852
+ console.log(`${chalk151.bold("version:")} v0.1 (initial)`);
23766
23853
  }
23767
23854
  }
23768
23855
 
@@ -23810,16 +23897,16 @@ function noCommitsMessage(hasLastInfo) {
23810
23897
  return hasLastInfo ? "No commits after last versioned entry" : "No commits found";
23811
23898
  }
23812
23899
  function logName(repoName) {
23813
- console.log(`${chalk151.bold("name:")} ${repoName}`);
23900
+ console.log(`${chalk152.bold("name:")} ${repoName}`);
23814
23901
  }
23815
23902
  function displayNextEntry(ctx, targetDate, commits2) {
23816
23903
  logName(ctx.repoName);
23817
23904
  printVersionInfo(ctx.config, ctx.lastInfo, commits2[0]?.hash);
23818
- console.log(chalk151.bold.blue(targetDate));
23905
+ console.log(chalk152.bold.blue(targetDate));
23819
23906
  printCommitsWithFiles(commits2, ctx.ignore, ctx.verbose);
23820
23907
  }
23821
23908
  function logNoCommits(lastInfo) {
23822
- console.log(chalk151.dim(noCommitsMessage(!!lastInfo)));
23909
+ console.log(chalk152.dim(noCommitsMessage(!!lastInfo)));
23823
23910
  }
23824
23911
 
23825
23912
  // src/commands/devlog/next.ts
@@ -23860,11 +23947,11 @@ function next2(options2) {
23860
23947
  import { execSync as execSync33 } from "child_process";
23861
23948
 
23862
23949
  // src/commands/devlog/repos/printReposTable.ts
23863
- import chalk152 from "chalk";
23950
+ import chalk153 from "chalk";
23864
23951
  function colorStatus(status2) {
23865
- if (status2 === "missing") return chalk152.red(status2);
23866
- if (status2 === "outdated") return chalk152.yellow(status2);
23867
- return chalk152.green(status2);
23952
+ if (status2 === "missing") return chalk153.red(status2);
23953
+ if (status2 === "outdated") return chalk153.yellow(status2);
23954
+ return chalk153.green(status2);
23868
23955
  }
23869
23956
  function formatRow(row3, nameWidth) {
23870
23957
  const devlog = (row3.lastDevlog ?? "-").padEnd(11);
@@ -23878,8 +23965,8 @@ function printReposTable(rows) {
23878
23965
  "Last Devlog".padEnd(11),
23879
23966
  "Status"
23880
23967
  ].join(" ");
23881
- console.log(chalk152.dim(header));
23882
- console.log(chalk152.dim("-".repeat(header.length)));
23968
+ console.log(chalk153.dim(header));
23969
+ console.log(chalk153.dim("-".repeat(header.length)));
23883
23970
  for (const row3 of rows) {
23884
23971
  console.log(formatRow(row3, nameWidth));
23885
23972
  }
@@ -23935,16 +24022,16 @@ function repos(options2) {
23935
24022
  }
23936
24023
 
23937
24024
  // src/commands/devlog/skip.ts
23938
- import { writeFileSync as writeFileSync30 } from "fs";
23939
- import { join as join66 } from "path";
23940
- import chalk153 from "chalk";
24025
+ import { writeFileSync as writeFileSync31 } from "fs";
24026
+ import { join as join67 } from "path";
24027
+ import chalk154 from "chalk";
23941
24028
  import { stringify as stringifyYaml3 } from "yaml";
23942
24029
  function getBlogConfigPath() {
23943
- return join66(BLOG_REPO_ROOT, "assist.yml");
24030
+ return join67(BLOG_REPO_ROOT, "assist.yml");
23944
24031
  }
23945
24032
  function skip2(date) {
23946
24033
  if (!/^\d{4}-\d{2}-\d{2}$/.test(date)) {
23947
- console.log(chalk153.red("Invalid date format. Use YYYY-MM-DD"));
24034
+ console.log(chalk154.red("Invalid date format. Use YYYY-MM-DD"));
23948
24035
  process.exit(1);
23949
24036
  }
23950
24037
  const repoName = getRepoName();
@@ -23955,7 +24042,7 @@ function skip2(date) {
23955
24042
  const skipDays = skip3[repoName] ?? [];
23956
24043
  if (skipDays.includes(date)) {
23957
24044
  console.log(
23958
- chalk153.yellow(`${date} is already in skip list for ${repoName}`)
24045
+ chalk154.yellow(`${date} is already in skip list for ${repoName}`)
23959
24046
  );
23960
24047
  return;
23961
24048
  }
@@ -23964,21 +24051,21 @@ function skip2(date) {
23964
24051
  skip3[repoName] = skipDays;
23965
24052
  devlog.skip = skip3;
23966
24053
  config.devlog = devlog;
23967
- writeFileSync30(configPath, stringifyYaml3(config, { lineWidth: 0 }));
23968
- console.log(chalk153.green(`Added ${date} to skip list for ${repoName}`));
24054
+ writeFileSync31(configPath, stringifyYaml3(config, { lineWidth: 0 }));
24055
+ console.log(chalk154.green(`Added ${date} to skip list for ${repoName}`));
23969
24056
  }
23970
24057
 
23971
24058
  // src/commands/devlog/version.ts
23972
- import chalk154 from "chalk";
24059
+ import chalk155 from "chalk";
23973
24060
  function version() {
23974
24061
  const config = loadConfig();
23975
24062
  const name = getRepoName();
23976
24063
  const lastInfo = getLastVersionInfo(name, config);
23977
24064
  const lastVersion = lastInfo?.version ?? null;
23978
24065
  const nextVersion = lastVersion ? bumpVersion(lastVersion, "patch") : null;
23979
- console.log(`${chalk154.bold("name:")} ${name}`);
23980
- console.log(`${chalk154.bold("last:")} ${lastVersion ?? chalk154.dim("none")}`);
23981
- console.log(`${chalk154.bold("next:")} ${nextVersion ?? chalk154.dim("none")}`);
24066
+ console.log(`${chalk155.bold("name:")} ${name}`);
24067
+ console.log(`${chalk155.bold("last:")} ${lastVersion ?? chalk155.dim("none")}`);
24068
+ console.log(`${chalk155.bold("next:")} ${nextVersion ?? chalk155.dim("none")}`);
23982
24069
  }
23983
24070
 
23984
24071
  // src/commands/registerDevlog.ts
@@ -24002,8 +24089,8 @@ function registerDevlog(program) {
24002
24089
 
24003
24090
  // src/commands/dotnet/checkBuildLocks.ts
24004
24091
  import { closeSync as closeSync4, openSync as openSync5, readdirSync as readdirSync9 } from "fs";
24005
- import { join as join67 } from "path";
24006
- import chalk155 from "chalk";
24092
+ import { join as join68 } from "path";
24093
+ import chalk156 from "chalk";
24007
24094
  var SKIP_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "packages"]);
24008
24095
  function isLockedDll(debugDir) {
24009
24096
  let files;
@@ -24014,7 +24101,7 @@ function isLockedDll(debugDir) {
24014
24101
  }
24015
24102
  for (const file of files) {
24016
24103
  if (!file.toLowerCase().endsWith(".dll")) continue;
24017
- const dllPath = join67(debugDir, file);
24104
+ const dllPath = join68(debugDir, file);
24018
24105
  try {
24019
24106
  const fd = openSync5(dllPath, "r+");
24020
24107
  closeSync4(fd);
@@ -24032,13 +24119,13 @@ function findFirstLockedDll(dir) {
24032
24119
  return null;
24033
24120
  }
24034
24121
  if (entries.includes("bin")) {
24035
- const locked = isLockedDll(join67(dir, "bin", "Debug"));
24122
+ const locked = isLockedDll(join68(dir, "bin", "Debug"));
24036
24123
  if (locked) return locked;
24037
24124
  }
24038
24125
  for (const entry of entries) {
24039
24126
  if (SKIP_DIRS.has(entry) || entry === "bin" || entry.startsWith("."))
24040
24127
  continue;
24041
- const found = findFirstLockedDll(join67(dir, entry));
24128
+ const found = findFirstLockedDll(join68(dir, entry));
24042
24129
  if (found) return found;
24043
24130
  }
24044
24131
  return null;
@@ -24050,14 +24137,14 @@ function checkBuildLocks(startDir) {
24050
24137
  const locked = findFirstLockedDll(startDir ?? getSearchRoot());
24051
24138
  if (locked) {
24052
24139
  console.error(
24053
- chalk155.red("Build output locked (is VS debugging?): ") + locked
24140
+ chalk156.red("Build output locked (is VS debugging?): ") + locked
24054
24141
  );
24055
24142
  process.exit(1);
24056
24143
  }
24057
24144
  }
24058
24145
  async function checkBuildLocksCommand() {
24059
24146
  checkBuildLocks();
24060
- console.log(chalk155.green("No build locks detected"));
24147
+ console.log(chalk156.green("No build locks detected"));
24061
24148
  }
24062
24149
 
24063
24150
  // src/commands/dotnet/buildTree.ts
@@ -24156,30 +24243,30 @@ function escapeRegex(s) {
24156
24243
  }
24157
24244
 
24158
24245
  // src/commands/dotnet/printTree.ts
24159
- import chalk156 from "chalk";
24246
+ import chalk157 from "chalk";
24160
24247
  function printNodes(nodes, prefix2) {
24161
24248
  for (let i = 0; i < nodes.length; i++) {
24162
24249
  const isLast = i === nodes.length - 1;
24163
24250
  const connector = isLast ? "\u2514\u2500\u2500 " : "\u251C\u2500\u2500 ";
24164
24251
  const childPrefix = isLast ? " " : "\u2502 ";
24165
24252
  const isMissing = nodes[i].relativePath.startsWith("[MISSING]");
24166
- const label2 = isMissing ? chalk156.red(nodes[i].relativePath) : nodes[i].relativePath;
24253
+ const label2 = isMissing ? chalk157.red(nodes[i].relativePath) : nodes[i].relativePath;
24167
24254
  console.log(`${prefix2}${connector}${label2}`);
24168
24255
  printNodes(nodes[i].children, prefix2 + childPrefix);
24169
24256
  }
24170
24257
  }
24171
24258
  function printTree(tree, totalCount, solutions) {
24172
- console.log(chalk156.bold("\nProject Dependency Tree"));
24173
- console.log(chalk156.cyan(tree.relativePath));
24259
+ console.log(chalk157.bold("\nProject Dependency Tree"));
24260
+ console.log(chalk157.cyan(tree.relativePath));
24174
24261
  printNodes(tree.children, "");
24175
- console.log(chalk156.dim(`
24262
+ console.log(chalk157.dim(`
24176
24263
  ${totalCount} projects total (including root)`));
24177
- console.log(chalk156.bold("\nSolution Membership"));
24264
+ console.log(chalk157.bold("\nSolution Membership"));
24178
24265
  if (solutions.length === 0) {
24179
- console.log(chalk156.yellow(" Not found in any .sln"));
24266
+ console.log(chalk157.yellow(" Not found in any .sln"));
24180
24267
  } else {
24181
24268
  for (const sln of solutions) {
24182
- console.log(` ${chalk156.green(sln)}`);
24269
+ console.log(` ${chalk157.green(sln)}`);
24183
24270
  }
24184
24271
  }
24185
24272
  console.log();
@@ -24208,16 +24295,16 @@ function printJson(tree, totalCount, solutions) {
24208
24295
  // src/commands/dotnet/resolveCsproj.ts
24209
24296
  import { existsSync as existsSync55 } from "fs";
24210
24297
  import path37 from "path";
24211
- import chalk157 from "chalk";
24298
+ import chalk158 from "chalk";
24212
24299
  function resolveCsproj(csprojPath) {
24213
24300
  const resolved = path37.resolve(csprojPath);
24214
24301
  if (!existsSync55(resolved)) {
24215
- console.error(chalk157.red(`File not found: ${resolved}`));
24302
+ console.error(chalk158.red(`File not found: ${resolved}`));
24216
24303
  process.exit(1);
24217
24304
  }
24218
24305
  const repoRoot2 = findRepoRoot(path37.dirname(resolved));
24219
24306
  if (!repoRoot2) {
24220
- console.error(chalk157.red("Could not find git repository root"));
24307
+ console.error(chalk158.red("Could not find git repository root"));
24221
24308
  process.exit(1);
24222
24309
  }
24223
24310
  return { resolved, repoRoot: repoRoot2 };
@@ -24267,12 +24354,12 @@ function getChangedCsFiles(scope) {
24267
24354
  }
24268
24355
 
24269
24356
  // src/commands/dotnet/inSln.ts
24270
- import chalk158 from "chalk";
24357
+ import chalk159 from "chalk";
24271
24358
  async function inSln(csprojPath) {
24272
24359
  const { resolved, repoRoot: repoRoot2 } = resolveCsproj(csprojPath);
24273
24360
  const solutions = findContainingSolutions(resolved, repoRoot2);
24274
24361
  if (solutions.length === 0) {
24275
- console.log(chalk158.yellow("Not found in any .sln file"));
24362
+ console.log(chalk159.yellow("Not found in any .sln file"));
24276
24363
  process.exit(1);
24277
24364
  }
24278
24365
  for (const sln of solutions) {
@@ -24281,7 +24368,7 @@ async function inSln(csprojPath) {
24281
24368
  }
24282
24369
 
24283
24370
  // src/commands/dotnet/inspect.ts
24284
- import chalk164 from "chalk";
24371
+ import chalk165 from "chalk";
24285
24372
 
24286
24373
  // src/shared/formatElapsed.ts
24287
24374
  function formatElapsed(ms) {
@@ -24293,12 +24380,12 @@ function formatElapsed(ms) {
24293
24380
  }
24294
24381
 
24295
24382
  // src/commands/dotnet/displayIssues.ts
24296
- import chalk159 from "chalk";
24383
+ import chalk160 from "chalk";
24297
24384
  var SEVERITY_COLOR = {
24298
- ERROR: chalk159.red,
24299
- WARNING: chalk159.yellow,
24300
- SUGGESTION: chalk159.cyan,
24301
- HINT: chalk159.dim
24385
+ ERROR: chalk160.red,
24386
+ WARNING: chalk160.yellow,
24387
+ SUGGESTION: chalk160.cyan,
24388
+ HINT: chalk160.dim
24302
24389
  };
24303
24390
  function groupByFile(issues) {
24304
24391
  const byFile = /* @__PURE__ */ new Map();
@@ -24314,15 +24401,15 @@ function groupByFile(issues) {
24314
24401
  }
24315
24402
  function displayIssues(issues) {
24316
24403
  for (const [file, fileIssues] of groupByFile(issues)) {
24317
- console.log(chalk159.bold(file));
24404
+ console.log(chalk160.bold(file));
24318
24405
  for (const issue of fileIssues.sort((a, b) => a.line - b.line)) {
24319
- const color = SEVERITY_COLOR[issue.severity] ?? chalk159.white;
24406
+ const color = SEVERITY_COLOR[issue.severity] ?? chalk160.white;
24320
24407
  console.log(
24321
- ` ${chalk159.dim(`${issue.line}:`)} ${color(issue.severity)} [${issue.typeId}] ${issue.message}`
24408
+ ` ${chalk160.dim(`${issue.line}:`)} ${color(issue.severity)} [${issue.typeId}] ${issue.message}`
24322
24409
  );
24323
24410
  }
24324
24411
  }
24325
- console.log(chalk159.dim(`
24412
+ console.log(chalk160.dim(`
24326
24413
  ${issues.length} issue(s) found`));
24327
24414
  }
24328
24415
 
@@ -24381,15 +24468,15 @@ function filterIssues(issues, all, cliOnly, cliSuppress) {
24381
24468
  // src/commands/dotnet/resolveSolution.ts
24382
24469
  import { existsSync as existsSync56 } from "fs";
24383
24470
  import path38 from "path";
24384
- import chalk161 from "chalk";
24471
+ import chalk162 from "chalk";
24385
24472
 
24386
24473
  // src/commands/dotnet/findSolution.ts
24387
24474
  import { readdirSync as readdirSync11 } from "fs";
24388
- import { dirname as dirname29, join as join68 } from "path";
24389
- import chalk160 from "chalk";
24475
+ import { dirname as dirname30, join as join69 } from "path";
24476
+ import chalk161 from "chalk";
24390
24477
  function findSlnInDir(dir) {
24391
24478
  try {
24392
- return readdirSync11(dir).filter((f) => f.endsWith(".sln")).map((f) => join68(dir, f));
24479
+ return readdirSync11(dir).filter((f) => f.endsWith(".sln")).map((f) => join69(dir, f));
24393
24480
  } catch {
24394
24481
  return [];
24395
24482
  }
@@ -24402,17 +24489,17 @@ function findSolution() {
24402
24489
  const slnFiles = findSlnInDir(current);
24403
24490
  if (slnFiles.length === 1) return slnFiles[0];
24404
24491
  if (slnFiles.length > 1) {
24405
- console.error(chalk160.red(`Multiple .sln files found in ${current}:`));
24492
+ console.error(chalk161.red(`Multiple .sln files found in ${current}:`));
24406
24493
  for (const f of slnFiles) console.error(` ${f}`);
24407
24494
  console.error(
24408
- chalk160.yellow("Specify which one: assist dotnet inspect <sln>")
24495
+ chalk161.yellow("Specify which one: assist dotnet inspect <sln>")
24409
24496
  );
24410
24497
  process.exit(1);
24411
24498
  }
24412
24499
  if (current === ceiling) break;
24413
- current = dirname29(current);
24500
+ current = dirname30(current);
24414
24501
  }
24415
- console.error(chalk160.red("No .sln file found between cwd and repo root"));
24502
+ console.error(chalk161.red("No .sln file found between cwd and repo root"));
24416
24503
  process.exit(1);
24417
24504
  }
24418
24505
 
@@ -24421,7 +24508,7 @@ function resolveSolution(sln) {
24421
24508
  if (sln) {
24422
24509
  const resolved = path38.resolve(sln);
24423
24510
  if (!existsSync56(resolved)) {
24424
- console.error(chalk161.red(`Solution file not found: ${resolved}`));
24511
+ console.error(chalk162.red(`Solution file not found: ${resolved}`));
24425
24512
  process.exit(1);
24426
24513
  }
24427
24514
  return resolved;
@@ -24463,14 +24550,14 @@ import { execSync as execSync35 } from "child_process";
24463
24550
  import { existsSync as existsSync57, readFileSync as readFileSync39, unlinkSync as unlinkSync10 } from "fs";
24464
24551
  import { tmpdir as tmpdir4 } from "os";
24465
24552
  import path39 from "path";
24466
- import chalk162 from "chalk";
24553
+ import chalk163 from "chalk";
24467
24554
  function assertJbInstalled() {
24468
24555
  try {
24469
24556
  execSync35("jb inspectcode --version", { stdio: "pipe" });
24470
24557
  } catch {
24471
- console.error(chalk162.red("jb is not installed. Install with:"));
24558
+ console.error(chalk163.red("jb is not installed. Install with:"));
24472
24559
  console.error(
24473
- chalk162.yellow(" dotnet tool install -g JetBrains.ReSharper.GlobalTools")
24560
+ chalk163.yellow(" dotnet tool install -g JetBrains.ReSharper.GlobalTools")
24474
24561
  );
24475
24562
  process.exit(1);
24476
24563
  }
@@ -24488,11 +24575,11 @@ function runInspectCode(slnPath, include, swea) {
24488
24575
  if (error && typeof error === "object" && "stderr" in error) {
24489
24576
  process.stderr.write(error.stderr);
24490
24577
  }
24491
- console.error(chalk162.red("jb inspectcode failed"));
24578
+ console.error(chalk163.red("jb inspectcode failed"));
24492
24579
  process.exit(1);
24493
24580
  }
24494
24581
  if (!existsSync57(reportPath)) {
24495
- console.error(chalk162.red("Report file not generated"));
24582
+ console.error(chalk163.red("Report file not generated"));
24496
24583
  process.exit(1);
24497
24584
  }
24498
24585
  const xml = readFileSync39(reportPath, "utf8");
@@ -24502,7 +24589,7 @@ function runInspectCode(slnPath, include, swea) {
24502
24589
 
24503
24590
  // src/commands/dotnet/runRoslynInspect.ts
24504
24591
  import { execSync as execSync36 } from "child_process";
24505
- import chalk163 from "chalk";
24592
+ import chalk164 from "chalk";
24506
24593
  function resolveMsbuildPath() {
24507
24594
  const { run: run4 } = loadConfig();
24508
24595
  const configs = resolveRunConfigs(run4, runConfigBaseDir());
@@ -24514,9 +24601,9 @@ function assertMsbuildInstalled() {
24514
24601
  try {
24515
24602
  execSync36(`"${msbuild}" -version`, { stdio: "pipe" });
24516
24603
  } catch {
24517
- console.error(chalk163.red(`msbuild not found at: ${msbuild}`));
24604
+ console.error(chalk164.red(`msbuild not found at: ${msbuild}`));
24518
24605
  console.error(
24519
- chalk163.yellow(
24606
+ chalk164.yellow(
24520
24607
  "Configure it via a 'build' run entry in .claude/assist.yml or add msbuild to PATH."
24521
24608
  )
24522
24609
  );
@@ -24563,17 +24650,17 @@ function runEngine(resolved, changedFiles2, options2) {
24563
24650
  // src/commands/dotnet/inspect.ts
24564
24651
  function logScope(changedFiles2) {
24565
24652
  if (changedFiles2 === null) {
24566
- console.log(chalk164.dim("Inspecting full solution..."));
24653
+ console.log(chalk165.dim("Inspecting full solution..."));
24567
24654
  } else {
24568
24655
  console.log(
24569
- chalk164.dim(`Inspecting ${changedFiles2.length} changed file(s)...`)
24656
+ chalk165.dim(`Inspecting ${changedFiles2.length} changed file(s)...`)
24570
24657
  );
24571
24658
  }
24572
24659
  }
24573
24660
  function reportResults(issues, elapsed) {
24574
24661
  if (issues.length > 0) displayIssues(issues);
24575
- else console.log(chalk164.green("No issues found"));
24576
- console.log(chalk164.dim(`Completed in ${formatElapsed(elapsed)}`));
24662
+ else console.log(chalk165.green("No issues found"));
24663
+ console.log(chalk165.dim(`Completed in ${formatElapsed(elapsed)}`));
24577
24664
  if (issues.length > 0) process.exit(1);
24578
24665
  }
24579
24666
  async function inspect(sln, options2) {
@@ -24584,7 +24671,7 @@ async function inspect(sln, options2) {
24584
24671
  const scope = parseScope(options2.scope);
24585
24672
  const changedFiles2 = getChangedCsFiles(scope);
24586
24673
  if (changedFiles2 !== null && changedFiles2.length === 0) {
24587
- console.log(chalk164.green("No changed .cs files found"));
24674
+ console.log(chalk165.green("No changed .cs files found"));
24588
24675
  return;
24589
24676
  }
24590
24677
  logScope(changedFiles2);
@@ -25385,9 +25472,9 @@ function aggregateCommitters(authorLists) {
25385
25472
 
25386
25473
  // src/shared/runGhGraphql.ts
25387
25474
  import { spawnSync as spawnSync6 } from "child_process";
25388
- import { unlinkSync as unlinkSync12, writeFileSync as writeFileSync31 } from "fs";
25475
+ import { unlinkSync as unlinkSync12, writeFileSync as writeFileSync32 } from "fs";
25389
25476
  import { tmpdir as tmpdir5 } from "os";
25390
- import { join as join69 } from "path";
25477
+ import { join as join70 } from "path";
25391
25478
  function buildArgs2(queryFile, vars) {
25392
25479
  const args = ["api", "graphql", "-F", `query=@${queryFile}`];
25393
25480
  for (const [key, value] of Object.entries(vars)) {
@@ -25397,8 +25484,8 @@ function buildArgs2(queryFile, vars) {
25397
25484
  return args;
25398
25485
  }
25399
25486
  function runGhGraphql(mutation, vars) {
25400
- const queryFile = join69(tmpdir5(), `gh-query-${Date.now()}.graphql`);
25401
- writeFileSync31(queryFile, mutation);
25487
+ const queryFile = join70(tmpdir5(), `gh-query-${Date.now()}.graphql`);
25488
+ writeFileSync32(queryFile, mutation);
25402
25489
  try {
25403
25490
  const result = spawnSync6("gh", buildArgs2(queryFile, vars), {
25404
25491
  encoding: "utf8",
@@ -25462,25 +25549,25 @@ function fetchRepoCommitAuthors(org, repo, since) {
25462
25549
  }
25463
25550
 
25464
25551
  // src/commands/github/printCountTable.ts
25465
- import chalk165 from "chalk";
25552
+ import chalk166 from "chalk";
25466
25553
  function printCountTable(labelHeader, rows) {
25467
25554
  const labelWidth = Math.max(
25468
25555
  labelHeader.length,
25469
25556
  ...rows.map((row3) => row3.label.length)
25470
25557
  );
25471
25558
  const header = `${labelHeader.padEnd(labelWidth)} Commits`;
25472
- console.log(chalk165.dim(header));
25473
- console.log(chalk165.dim("-".repeat(header.length)));
25559
+ console.log(chalk166.dim(header));
25560
+ console.log(chalk166.dim("-".repeat(header.length)));
25474
25561
  for (const row3 of rows) {
25475
25562
  console.log(`${row3.label.padEnd(labelWidth)} ${row3.count}`);
25476
25563
  }
25477
25564
  }
25478
25565
 
25479
25566
  // src/commands/github/printRepoAuthorBreakdown.ts
25480
- import chalk166 from "chalk";
25567
+ import chalk167 from "chalk";
25481
25568
  function printRepoAuthorBreakdown(repos2) {
25482
25569
  for (const repo of repos2) {
25483
- console.log(chalk166.bold(repo.name));
25570
+ console.log(chalk167.bold(repo.name));
25484
25571
  const authorWidth = Math.max(
25485
25572
  0,
25486
25573
  ...repo.authors.map((a) => a.author.length)
@@ -25563,10 +25650,10 @@ function parseTopCount(value) {
25563
25650
  }
25564
25651
 
25565
25652
  // src/commands/github/issue/fixStructure/applyAndVerifySubtree.ts
25566
- import chalk168 from "chalk";
25653
+ import chalk169 from "chalk";
25567
25654
 
25568
25655
  // src/commands/github/issue/fixStructure/applyFixStructurePlan.ts
25569
- import chalk167 from "chalk";
25656
+ import chalk168 from "chalk";
25570
25657
 
25571
25658
  // src/commands/github/issue/fixStructure/removeIssueLabels.ts
25572
25659
  var MUTATION2 = `mutation($labelableId: ID!, $labelIds: [ID!]!) {
@@ -25603,7 +25690,7 @@ function writeLineNow(line) {
25603
25690
  // src/commands/github/issue/fixStructure/applyFixStructurePlan.ts
25604
25691
  function applyFixStructurePlan(plan2) {
25605
25692
  for (const entry of plan2.entries) {
25606
- const where = chalk167.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25693
+ const where = chalk168.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25607
25694
  const { typeChange, labelRemovals } = entry;
25608
25695
  if (typeChange) {
25609
25696
  writeLineNow(
@@ -25873,12 +25960,12 @@ function planSubtree(root2, context) {
25873
25960
  function applyAndVerifySubtree(target, plan2, context) {
25874
25961
  if (plan2.typeChangeCount === 0 && plan2.labelRemovalCount === 0) return;
25875
25962
  applyFixStructurePlan(plan2);
25876
- writeLineNow(chalk168.dim("Re-walking the subtree to confirm"));
25963
+ writeLineNow(chalk169.dim("Re-walking the subtree to confirm"));
25877
25964
  assertNoResidualDrift(
25878
25965
  planSubtree(fetchRootIssue(target), context),
25879
25966
  context.chain
25880
25967
  );
25881
- writeLineNow(chalk168.green("Subtree normalised"));
25968
+ writeLineNow(chalk169.green("Subtree normalised"));
25882
25969
  }
25883
25970
 
25884
25971
  // src/commands/github/issue/fixStructure/assertChainTypesExist.ts
@@ -25914,22 +26001,22 @@ function parseTypeChain(value) {
25914
26001
  }
25915
26002
 
25916
26003
  // src/commands/github/issue/fixStructure/printFixStructurePlan.ts
25917
- import chalk169 from "chalk";
26004
+ import chalk170 from "chalk";
25918
26005
  function annotate(entry) {
25919
26006
  const notes = [];
25920
26007
  if (entry.level === null) {
25921
- notes.push(chalk169.red("deeper than the leaf level"));
26008
+ notes.push(chalk170.red("deeper than the leaf level"));
25922
26009
  } else if (entry.typeChange) {
25923
26010
  notes.push(
25924
- chalk169.yellow(
26011
+ chalk170.yellow(
25925
26012
  `${entry.typeChange.from ?? "no type"} -> ${entry.typeChange.to}`
25926
26013
  )
25927
26014
  );
25928
26015
  } else {
25929
- notes.push(chalk169.dim(entry.issue.typeName ?? "no type"));
26016
+ notes.push(chalk170.dim(entry.issue.typeName ?? "no type"));
25930
26017
  }
25931
26018
  for (const label2 of entry.labelRemovals) {
25932
- notes.push(chalk169.yellow(`-${label2.name}`));
26019
+ notes.push(chalk170.yellow(`-${label2.name}`));
25933
26020
  }
25934
26021
  return notes;
25935
26022
  }
@@ -25937,22 +26024,22 @@ function formatCount(count10, noun) {
25937
26024
  return `${count10} ${noun}${count10 === 1 ? "" : "s"}`;
25938
26025
  }
25939
26026
  function printFixStructurePlan(plan2, chain2, apply) {
25940
- writeLineNow(chalk169.dim(`chain: ${chain2.join(" > ")}`));
26027
+ writeLineNow(chalk170.dim(`chain: ${chain2.join(" > ")}`));
25941
26028
  for (const entry of plan2.entries) {
25942
26029
  const indent3 = " ".repeat(entry.issue.depth);
25943
- const name = chalk169.cyan(`${entry.issue.repo}#${entry.issue.number}`);
26030
+ const name = chalk170.cyan(`${entry.issue.repo}#${entry.issue.number}`);
25944
26031
  writeLineNow(
25945
26032
  `${indent3}${name} ${entry.issue.title} [${annotate(entry).join(", ")}]`
25946
26033
  );
25947
26034
  }
25948
26035
  if (plan2.typeChangeCount === 0 && plan2.labelRemovalCount === 0) {
25949
- writeLineNow(chalk169.green("Nothing to change"));
26036
+ writeLineNow(chalk170.green("Nothing to change"));
25950
26037
  return;
25951
26038
  }
25952
26039
  writeLineNow(
25953
26040
  `${formatCount(plan2.typeChangeCount, "type change")}, ${formatCount(plan2.labelRemovalCount, "label removal")} planned`
25954
26041
  );
25955
- if (!apply) writeLineNow(chalk169.dim("Dry run \u2014 nothing written"));
26042
+ if (!apply) writeLineNow(chalk170.dim("Dry run \u2014 nothing written"));
25956
26043
  }
25957
26044
 
25958
26045
  // src/commands/github/issue/parseRepoSlug.ts
@@ -26688,10 +26775,10 @@ import { basename as basename17 } from "path";
26688
26775
 
26689
26776
  // src/shared/removeStagedAttachments.ts
26690
26777
  import { rmSync as rmSync5 } from "fs";
26691
- import { dirname as dirname30 } from "path";
26778
+ import { dirname as dirname31 } from "path";
26692
26779
  function removeStagedAttachments(attachments) {
26693
26780
  for (const { path: path108 } of attachments) {
26694
- const dir = dirname30(path108);
26781
+ const dir = dirname31(path108);
26695
26782
  if (!isStagedAttachmentPath(dir)) continue;
26696
26783
  rmSync5(dir, { recursive: true, force: true });
26697
26784
  }
@@ -26859,26 +26946,26 @@ function slugFromUrl(url) {
26859
26946
  }
26860
26947
 
26861
26948
  // src/commands/github/issue/writeIssueWorkingFile.ts
26862
- import { mkdirSync as mkdirSync18, writeFileSync as writeFileSync32 } from "fs";
26949
+ import { mkdirSync as mkdirSync19, writeFileSync as writeFileSync33 } from "fs";
26863
26950
 
26864
26951
  // src/commands/github/issue/issueWorkingFile.ts
26865
- import { join as join70 } from "path";
26952
+ import { join as join71 } from "path";
26866
26953
  function issueWorkingFile(slug2, number) {
26867
26954
  const [owner = "unknown", repo = "unknown"] = slug2.split("/");
26868
- const dir = join70(getStoreDir(), "github-issues", owner, repo);
26955
+ const dir = join71(getStoreDir(), "github-issues", owner, repo);
26869
26956
  return {
26870
26957
  dir,
26871
- bodyPath: join70(dir, `${number}.md`),
26872
- metaPath: join70(dir, `${number}.json`)
26958
+ bodyPath: join71(dir, `${number}.md`),
26959
+ metaPath: join71(dir, `${number}.json`)
26873
26960
  };
26874
26961
  }
26875
26962
 
26876
26963
  // src/commands/github/issue/writeIssueWorkingFile.ts
26877
26964
  function writeIssueWorkingFile(slug2, number, target, updatedAt, body) {
26878
26965
  const { dir, bodyPath, metaPath } = issueWorkingFile(slug2, number);
26879
- mkdirSync18(dir, { recursive: true });
26880
- writeFileSync32(bodyPath, body);
26881
- writeFileSync32(
26966
+ mkdirSync19(dir, { recursive: true });
26967
+ writeFileSync33(bodyPath, body);
26968
+ writeFileSync33(
26882
26969
  metaPath,
26883
26970
  `${JSON.stringify({ target, updatedAt }, null, 2)}
26884
26971
  `
@@ -27314,7 +27401,7 @@ function registerGithub(program) {
27314
27401
  }
27315
27402
 
27316
27403
  // src/commands/jira/acceptanceCriteria.ts
27317
- import chalk170 from "chalk";
27404
+ import chalk171 from "chalk";
27318
27405
 
27319
27406
  // src/commands/jira/adfToText.ts
27320
27407
  function renderInline(node) {
@@ -27381,7 +27468,7 @@ function acceptanceCriteria(issueKey) {
27381
27468
  const parsed = fetchIssue(issueKey, field);
27382
27469
  const acValue = parsed?.fields?.[field];
27383
27470
  if (!acValue) {
27384
- console.log(chalk170.yellow(`No acceptance criteria found on ${issueKey}.`));
27471
+ console.log(chalk171.yellow(`No acceptance criteria found on ${issueKey}.`));
27385
27472
  return;
27386
27473
  }
27387
27474
  if (typeof acValue === "string") {
@@ -27447,14 +27534,14 @@ async function jiraAuth() {
27447
27534
  }
27448
27535
 
27449
27536
  // src/commands/jira/viewIssue.ts
27450
- import chalk171 from "chalk";
27537
+ import chalk172 from "chalk";
27451
27538
  function viewIssue2(issueKey) {
27452
27539
  const parsed = fetchIssue(issueKey, "summary,description");
27453
27540
  const fields = parsed?.fields;
27454
27541
  const summary = fields?.summary;
27455
27542
  const description = fields?.description;
27456
27543
  if (summary) {
27457
- console.log(chalk171.bold(summary));
27544
+ console.log(chalk172.bold(summary));
27458
27545
  }
27459
27546
  if (description) {
27460
27547
  if (summary) console.log();
@@ -27468,7 +27555,7 @@ function viewIssue2(issueKey) {
27468
27555
  }
27469
27556
  if (!summary && !description) {
27470
27557
  console.log(
27471
- chalk171.yellow(`No summary or description found on ${issueKey}.`)
27558
+ chalk172.yellow(`No summary or description found on ${issueKey}.`)
27472
27559
  );
27473
27560
  }
27474
27561
  }
@@ -27559,7 +27646,7 @@ function recentDaemonLogLines(includeRelayed = true) {
27559
27646
 
27560
27647
  // src/commands/sessions/daemon/worktree/createWorktree.ts
27561
27648
  import { existsSync as existsSync60 } from "fs";
27562
- import { basename as basename19, dirname as dirname31 } from "path";
27649
+ import { basename as basename19, dirname as dirname32 } from "path";
27563
27650
 
27564
27651
  // src/commands/watch/fetchQuietly.ts
27565
27652
  import { execFileSync as execFileSync16 } from "child_process";
@@ -27578,11 +27665,11 @@ function fetchQuietly(cwd, intervalMs) {
27578
27665
  }
27579
27666
 
27580
27667
  // src/commands/sessions/daemon/worktree/nextWorktreePath.ts
27581
- import { basename as basename18, join as join71 } from "path";
27668
+ import { basename as basename18, join as join72 } from "path";
27582
27669
  function nextWorktreePath(clone, base, isTaken) {
27583
27670
  const name = basename18(clone);
27584
27671
  for (let n = 2; n < 1e3; n++) {
27585
- const candidate = join71(base, `${name}-${n}`);
27672
+ const candidate = join72(base, `${name}-${n}`);
27586
27673
  if (!isTaken(candidate)) return candidate;
27587
27674
  }
27588
27675
  throw new Error(`no free worktree suffix for ${clone}`);
@@ -27602,7 +27689,7 @@ function cloneTrunkBranch(clone) {
27602
27689
 
27603
27690
  // src/commands/sessions/daemon/worktree/createWorktree.ts
27604
27691
  function createWorktree(clone, strategy, boundTreeRoots2, preferredPath) {
27605
- const base = strategy.root ? expandTilde(strategy.root) : dirname31(clone);
27692
+ const base = strategy.root ? expandTilde(strategy.root) : dirname32(clone);
27606
27693
  const registered = new Set(listWorktreePaths(clone));
27607
27694
  const branches = new Set(listLocalBranches(clone));
27608
27695
  const isTaken = (candidate) => registered.has(candidate) || existsSync60(candidate) || boundTreeRoots2.has(candidate) || branches.has(basename19(candidate));
@@ -27834,21 +27921,21 @@ function persistedTreeRoots() {
27834
27921
  }
27835
27922
 
27836
27923
  // src/commands/sessions/daemon/worktree/seedWorktree.ts
27837
- import { copyFileSync, existsSync as existsSync62, mkdirSync as mkdirSync19 } from "fs";
27838
- import { dirname as dirname32, join as join73 } from "path";
27924
+ import { copyFileSync, existsSync as existsSync62, mkdirSync as mkdirSync20 } from "fs";
27925
+ import { dirname as dirname33, join as join74 } from "path";
27839
27926
 
27840
27927
  // src/commands/sessions/daemon/worktree/runInstall.ts
27841
27928
  import { resolve as resolve18 } from "path";
27842
27929
 
27843
27930
  // src/commands/sessions/daemon/worktree/detectInstallCommand.ts
27844
27931
  import { existsSync as existsSync61 } from "fs";
27845
- import { join as join72 } from "path";
27932
+ import { join as join73 } from "path";
27846
27933
  function detectInstallCommand(dir) {
27847
- if (!existsSync61(join72(dir, "package.json"))) return null;
27848
- if (existsSync61(join72(dir, "pnpm-lock.yaml"))) return "pnpm install";
27849
- if (existsSync61(join72(dir, "yarn.lock"))) return "yarn install";
27850
- if (existsSync61(join72(dir, "bun.lockb"))) return "bun install";
27851
- if (existsSync61(join72(dir, "package-lock.json"))) return "npm ci";
27934
+ if (!existsSync61(join73(dir, "package.json"))) return null;
27935
+ if (existsSync61(join73(dir, "pnpm-lock.yaml"))) return "pnpm install";
27936
+ if (existsSync61(join73(dir, "yarn.lock"))) return "yarn install";
27937
+ if (existsSync61(join73(dir, "bun.lockb"))) return "bun install";
27938
+ if (existsSync61(join73(dir, "package-lock.json"))) return "npm ci";
27852
27939
  return "npm install";
27853
27940
  }
27854
27941
 
@@ -28013,11 +28100,11 @@ function seedWorktree(worktreePath, clone, onSeeded = () => {
28013
28100
  }
28014
28101
  function copyConfigFiles(worktreePath, clone, copy) {
28015
28102
  for (const rel of copy) {
28016
- const src = join73(clone, rel);
28103
+ const src = join74(clone, rel);
28017
28104
  if (!existsSync62(src)) continue;
28018
- const dest = join73(worktreePath, rel);
28105
+ const dest = join74(worktreePath, rel);
28019
28106
  try {
28020
- mkdirSync19(dirname32(dest), { recursive: true });
28107
+ mkdirSync20(dirname33(dest), { recursive: true });
28021
28108
  copyFileSync(src, dest);
28022
28109
  daemonLog(`worktree ${worktreePath} seeded ${rel}`);
28023
28110
  } catch (error) {
@@ -28180,7 +28267,7 @@ function worktreeHoldingBranch(cwd, branch2) {
28180
28267
  }
28181
28268
 
28182
28269
  // src/commands/review/failCheckout.ts
28183
- import chalk172 from "chalk";
28270
+ import chalk173 from "chalk";
28184
28271
 
28185
28272
  // src/commands/review/azCliProblem.ts
28186
28273
  import { execFileSync as execFileSync18 } from "child_process";
@@ -28233,14 +28320,14 @@ function failCheckout(number, headRef, stale, from, checkout) {
28233
28320
  gitSyncOrNull(process.cwd(), ["checkout", "--quiet", from]);
28234
28321
  if (headRef && stale === "local-work")
28235
28322
  console.error(
28236
- chalk172.red(
28323
+ chalk173.red(
28237
28324
  `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.`
28238
28325
  )
28239
28326
  );
28240
28327
  const problem = checkout.file === "az" ? azCliProblem() : null;
28241
- if (problem) console.error(chalk172.red(problem));
28328
+ if (problem) console.error(chalk173.red(problem));
28242
28329
  console.error(
28243
- chalk172.red(`${checkout.file} ${checkout.args.join(" ")} failed; aborting.`)
28330
+ chalk173.red(`${checkout.file} ${checkout.args.join(" ")} failed; aborting.`)
28244
28331
  );
28245
28332
  process.exit(1);
28246
28333
  }
@@ -28433,18 +28520,18 @@ function registerList(program) {
28433
28520
  }
28434
28521
 
28435
28522
  // src/commands/litellm/listModels.ts
28436
- import chalk174 from "chalk";
28523
+ import chalk175 from "chalk";
28437
28524
 
28438
28525
  // src/commands/litellm/resolveLitellmConfig.ts
28439
- import chalk173 from "chalk";
28526
+ import chalk174 from "chalk";
28440
28527
  function resolveLitellmConfig() {
28441
28528
  const { config, missing } = readLitellmConfig();
28442
28529
  if (!config) {
28443
- console.error(chalk173.red("LiteLLM is not configured"));
28530
+ console.error(chalk174.red("LiteLLM is not configured"));
28444
28531
  for (const key of missing) {
28445
28532
  const entry = litellmConfigHelp.find((help) => help.key === key);
28446
28533
  console.error(
28447
- chalk173.red(` ${key} is not set. Set it with: ${entry?.setter}`)
28534
+ chalk174.red(` ${key} is not set. Set it with: ${entry?.setter}`)
28448
28535
  );
28449
28536
  }
28450
28537
  process.exit(1);
@@ -28470,13 +28557,13 @@ async function listModels(options2) {
28470
28557
  } catch (error) {
28471
28558
  const reason4 = error instanceof Error ? error.message : String(error);
28472
28559
  console.error(
28473
- chalk174.red(`Failed to reach LiteLLM at ${baseUrl}: ${reason4}`)
28560
+ chalk175.red(`Failed to reach LiteLLM at ${baseUrl}: ${reason4}`)
28474
28561
  );
28475
28562
  process.exit(1);
28476
28563
  }
28477
28564
  const body = await response.text();
28478
28565
  if (!response.ok) {
28479
- console.error(chalk174.red(`LiteLLM returned ${response.status}: ${body}`));
28566
+ console.error(chalk175.red(`LiteLLM returned ${response.status}: ${body}`));
28480
28567
  process.exit(1);
28481
28568
  }
28482
28569
  if (options2.json) {
@@ -28494,17 +28581,17 @@ function registerLitellm(program) {
28494
28581
  }
28495
28582
 
28496
28583
  // src/commands/mermaidExport.ts
28497
- import { mkdirSync as mkdirSync20, readdirSync as readdirSync12 } from "fs";
28584
+ import { mkdirSync as mkdirSync21, readdirSync as readdirSync12 } from "fs";
28498
28585
  import { resolve as resolve20 } from "path";
28499
- import chalk177 from "chalk";
28586
+ import chalk178 from "chalk";
28500
28587
 
28501
28588
  // src/commands/mermaid/exportFile.ts
28502
- import { readFileSync as readFileSync41, writeFileSync as writeFileSync33 } from "fs";
28589
+ import { readFileSync as readFileSync41, writeFileSync as writeFileSync34 } from "fs";
28503
28590
  import { basename as basename20, extname as extname4, resolve as resolve19 } from "path";
28504
- import chalk176 from "chalk";
28591
+ import chalk177 from "chalk";
28505
28592
 
28506
28593
  // src/commands/mermaid/renderBlock.ts
28507
- import chalk175 from "chalk";
28594
+ import chalk176 from "chalk";
28508
28595
  async function renderBlock(krokiUrl, source) {
28509
28596
  const response = await fetch(`${krokiUrl}/mermaid/svg`, {
28510
28597
  method: "POST",
@@ -28513,7 +28600,7 @@ async function renderBlock(krokiUrl, source) {
28513
28600
  });
28514
28601
  if (!response.ok) {
28515
28602
  console.error(
28516
- chalk175.red(
28603
+ chalk176.red(
28517
28604
  `Kroki request failed: ${response.status} ${response.statusText}`
28518
28605
  )
28519
28606
  );
@@ -28531,27 +28618,27 @@ async function exportFile(file, outDir, krokiUrl, onlyIndex) {
28531
28618
  if (onlyIndex !== void 0) {
28532
28619
  if (onlyIndex < 1 || onlyIndex > blocks.length) {
28533
28620
  console.error(
28534
- chalk176.red(
28621
+ chalk177.red(
28535
28622
  `${file}: --index ${onlyIndex} out of range (file has ${blocks.length} diagram(s))`
28536
28623
  )
28537
28624
  );
28538
28625
  process.exit(1);
28539
28626
  }
28540
28627
  console.log(
28541
- chalk176.gray(
28628
+ chalk177.gray(
28542
28629
  `${file} \u2014 rendering diagram ${onlyIndex} of ${blocks.length}`
28543
28630
  )
28544
28631
  );
28545
28632
  } else {
28546
- console.log(chalk176.gray(`${file} \u2014 ${blocks.length} diagram(s)`));
28633
+ console.log(chalk177.gray(`${file} \u2014 ${blocks.length} diagram(s)`));
28547
28634
  }
28548
28635
  for (const [i, source] of blocks.entries()) {
28549
28636
  const idx = i + 1;
28550
28637
  if (onlyIndex !== void 0 && idx !== onlyIndex) continue;
28551
28638
  const outPath = resolve19(outDir, `${stem}-${idx}.svg`);
28552
28639
  const svg = await renderBlock(krokiUrl, source);
28553
- writeFileSync33(outPath, svg, "utf8");
28554
- console.log(chalk176.green(` \u2192 ${outPath}`));
28640
+ writeFileSync34(outPath, svg, "utf8");
28641
+ console.log(chalk177.green(` \u2192 ${outPath}`));
28555
28642
  }
28556
28643
  }
28557
28644
  function extractMermaidBlocks(markdown) {
@@ -28563,22 +28650,22 @@ function extractMermaidBlocks(markdown) {
28563
28650
  async function mermaidExport(file, options2 = {}) {
28564
28651
  const { mermaid } = loadConfig();
28565
28652
  const outDir = resolve20(process.cwd(), options2.out ?? ".");
28566
- mkdirSync20(outDir, { recursive: true });
28653
+ mkdirSync21(outDir, { recursive: true });
28567
28654
  if (options2.index !== void 0) {
28568
28655
  if (!Number.isInteger(options2.index) || options2.index < 1) {
28569
28656
  console.error(
28570
- chalk177.red(`--index must be a positive integer (got ${options2.index})`)
28657
+ chalk178.red(`--index must be a positive integer (got ${options2.index})`)
28571
28658
  );
28572
28659
  process.exit(1);
28573
28660
  }
28574
28661
  if (!file) {
28575
- console.error(chalk177.red("--index requires a file argument"));
28662
+ console.error(chalk178.red("--index requires a file argument"));
28576
28663
  process.exit(1);
28577
28664
  }
28578
28665
  }
28579
28666
  const files = file ? [file] : readdirSync12(process.cwd()).filter((name) => name.toLowerCase().endsWith(".md")).sort();
28580
28667
  if (files.length === 0) {
28581
- console.log(chalk177.gray("No markdown files found in current directory."));
28668
+ console.log(chalk178.gray("No markdown files found in current directory."));
28582
28669
  return;
28583
28670
  }
28584
28671
  for (const f of files) {
@@ -28658,8 +28745,8 @@ function boardSource(raw, anchorId, options2) {
28658
28745
  import { stringify as stringify2 } from "yaml";
28659
28746
 
28660
28747
  // src/commands/miro/writeExtract.ts
28661
- import { mkdirSync as mkdirSync21, writeFileSync as writeFileSync34 } from "fs";
28662
- import { dirname as dirname33 } from "path";
28748
+ import { mkdirSync as mkdirSync22, writeFileSync as writeFileSync35 } from "fs";
28749
+ import { dirname as dirname34 } from "path";
28663
28750
  import { stringify } from "yaml";
28664
28751
  function headerLines(header) {
28665
28752
  const { rect } = header;
@@ -28672,8 +28759,8 @@ function headerLines(header) {
28672
28759
  ];
28673
28760
  }
28674
28761
  function writeExtract(file, header, texts) {
28675
- mkdirSync21(dirname33(file), { recursive: true });
28676
- writeFileSync34(file, `${headerLines(header).join("\n")}
28762
+ mkdirSync22(dirname34(file), { recursive: true });
28763
+ writeFileSync35(file, `${headerLines(header).join("\n")}
28677
28764
  ${stringify(texts)}`);
28678
28765
  }
28679
28766
 
@@ -28724,7 +28811,7 @@ function extractToSave(details, cwd = process.cwd()) {
28724
28811
  }
28725
28812
 
28726
28813
  // src/commands/miro/keptTexts.ts
28727
- import chalk178 from "chalk";
28814
+ import chalk179 from "chalk";
28728
28815
 
28729
28816
  // src/commands/miro/applyIgnore.ts
28730
28817
  function applyIgnore(texts, ignore3) {
@@ -28763,7 +28850,7 @@ function warnUnmatched(file, unmatched) {
28763
28850
  if (unmatched.length === 0) return;
28764
28851
  const entries = unmatched.map((entry) => ` - ${entry}`).join("\n");
28765
28852
  console.error(
28766
- chalk178.yellow(
28853
+ chalk179.yellow(
28767
28854
  `${unmatched.length} ${unmatched.length === 1 ? "entry" : "entries"} in ${file} matched no box text:
28768
28855
  ${entries}`
28769
28856
  )
@@ -28964,7 +29051,7 @@ function readMiroItems(file) {
28964
29051
  }
28965
29052
 
28966
29053
  // src/commands/miro/resolveExtractOptions.ts
28967
- import chalk179 from "chalk";
29054
+ import chalk180 from "chalk";
28968
29055
 
28969
29056
  // src/commands/miro/extractLayers.ts
28970
29057
  function extractsIn(layer) {
@@ -29042,7 +29129,7 @@ function resolveExtractOptions(name, options2, paths) {
29042
29129
  paths.cwd,
29043
29130
  paths.globalConfigPath
29044
29131
  );
29045
- console.error(chalk179.dim(`Extract "${name}" from ${resolved.from}`));
29132
+ console.error(chalk180.dim(`Extract "${name}" from ${resolved.from}`));
29046
29133
  return resolved.options;
29047
29134
  }
29048
29135
 
@@ -29143,8 +29230,8 @@ function registerMiro(program) {
29143
29230
  // src/commands/netcap/netcap.ts
29144
29231
  import { mkdir as mkdir6 } from "fs/promises";
29145
29232
  import { createServer as createServer2 } from "http";
29146
- import { dirname as dirname35 } from "path";
29147
- import chalk181 from "chalk";
29233
+ import { dirname as dirname36 } from "path";
29234
+ import chalk182 from "chalk";
29148
29235
 
29149
29236
  // src/commands/netcap/corsHeaders.ts
29150
29237
  var corsHeaders = {
@@ -29222,15 +29309,15 @@ function createNetcapHandler(options2) {
29222
29309
  // src/commands/netcap/prepareExtensionForLoad.ts
29223
29310
  import { cp as cp4, readFile as readFile7, writeFile as writeFile6 } from "fs/promises";
29224
29311
  import { networkInterfaces } from "os";
29225
- import { join as join75 } from "path";
29226
- import chalk180 from "chalk";
29312
+ import { join as join76 } from "path";
29313
+ import chalk181 from "chalk";
29227
29314
 
29228
29315
  // src/commands/netcap/netcapExtensionDir.ts
29229
- import { dirname as dirname34, join as join74 } from "path";
29316
+ import { dirname as dirname35, join as join75 } from "path";
29230
29317
  import { fileURLToPath as fileURLToPath7 } from "url";
29231
- var moduleDir2 = dirname34(fileURLToPath7(import.meta.url));
29318
+ var moduleDir2 = dirname35(fileURLToPath7(import.meta.url));
29232
29319
  function netcapExtensionDir() {
29233
- return join74(moduleDir2, "commands", "netcap", "netcap-extension");
29320
+ return join75(moduleDir2, "commands", "netcap", "netcap-extension");
29234
29321
  }
29235
29322
 
29236
29323
  // src/commands/netcap/prepareExtensionForLoad.ts
@@ -29245,7 +29332,7 @@ function lanIPv4() {
29245
29332
  return void 0;
29246
29333
  }
29247
29334
  async function configureBackground(dir, host, port, filter) {
29248
- const file = join75(dir, "background.js");
29335
+ const file = join76(dir, "background.js");
29249
29336
  const source = await readFile7(file, "utf8");
29250
29337
  await writeFile6(
29251
29338
  file,
@@ -29267,7 +29354,7 @@ async function prepareExtensionForLoad(port, filter = "") {
29267
29354
  const host = lanIPv4();
29268
29355
  if (!host) {
29269
29356
  console.log(
29270
- chalk180.yellow("could not determine the WSL IP for the extension")
29357
+ chalk181.yellow("could not determine the WSL IP for the extension")
29271
29358
  );
29272
29359
  await configureBackground(source, "127.0.0.1", port, filter);
29273
29360
  return source;
@@ -29278,27 +29365,27 @@ async function prepareExtensionForLoad(port, filter = "") {
29278
29365
  return WSL_WINDOWS_PATH3;
29279
29366
  } catch {
29280
29367
  console.log(
29281
- chalk180.yellow(`could not copy extension to ${WSL_WINDOWS_PATH3}`)
29368
+ chalk181.yellow(`could not copy extension to ${WSL_WINDOWS_PATH3}`)
29282
29369
  );
29283
29370
  return source;
29284
29371
  }
29285
29372
  }
29286
29373
 
29287
29374
  // src/commands/netcap/resolveNetcapOutPath.ts
29288
- import { isAbsolute as isAbsolute5, join as join77, resolve as resolve22 } from "path";
29375
+ import { isAbsolute as isAbsolute5, join as join78, resolve as resolve22 } from "path";
29289
29376
 
29290
29377
  // src/commands/netcap/defaultCapturePath.ts
29291
- import { homedir as homedir23 } from "os";
29292
- import { join as join76 } from "path";
29378
+ import { homedir as homedir24 } from "os";
29379
+ import { join as join77 } from "path";
29293
29380
  function defaultCapturePath() {
29294
- return join76(homedir23(), ".assist", "netcap", "capture.jsonl");
29381
+ return join77(homedir24(), ".assist", "netcap", "capture.jsonl");
29295
29382
  }
29296
29383
 
29297
29384
  // src/commands/netcap/resolveNetcapOutPath.ts
29298
29385
  function resolveNetcapOutPath(out) {
29299
29386
  if (!out) return defaultCapturePath();
29300
29387
  const dir = isAbsolute5(out) ? out : resolve22(process.cwd(), out);
29301
- return join77(dir, "capture.jsonl");
29388
+ return join78(dir, "capture.jsonl");
29302
29389
  }
29303
29390
 
29304
29391
  // src/commands/netcap/netcap.ts
@@ -29306,35 +29393,35 @@ async function netcap(options2) {
29306
29393
  const port = Number(options2.port);
29307
29394
  const outPath = resolveNetcapOutPath(options2.out);
29308
29395
  const filter = options2.filter ?? "";
29309
- await mkdir6(dirname35(outPath), { recursive: true });
29396
+ await mkdir6(dirname36(outPath), { recursive: true });
29310
29397
  const extensionPath = await prepareExtensionForLoad(port, filter);
29311
29398
  let count10 = 0;
29312
29399
  const handler = createNetcapHandler({
29313
29400
  outPath,
29314
- onPing: () => console.log(chalk181.dim("ping from extension")),
29401
+ onPing: () => console.log(chalk182.dim("ping from extension")),
29315
29402
  onCapture: (entry) => {
29316
29403
  count10 += 1;
29317
29404
  console.log(
29318
- chalk181.green(`captured #${count10}`),
29319
- chalk181.dim(`${entry.method ?? "?"} ${entry.url ?? "?"}`)
29405
+ chalk182.green(`captured #${count10}`),
29406
+ chalk182.dim(`${entry.method ?? "?"} ${entry.url ?? "?"}`)
29320
29407
  );
29321
29408
  }
29322
29409
  });
29323
29410
  const server = createServer2(handler);
29324
29411
  server.listen(port, () => {
29325
29412
  console.log(
29326
- chalk181.bold(`netcap receiver listening on http://127.0.0.1:${port}`)
29413
+ chalk182.bold(`netcap receiver listening on http://127.0.0.1:${port}`)
29327
29414
  );
29328
- console.log(chalk181.dim(`appending captures to ${outPath}`));
29415
+ console.log(chalk182.dim(`appending captures to ${outPath}`));
29329
29416
  if (filter)
29330
- console.log(chalk181.dim(`forwarding only URLs matching "${filter}"`));
29331
- console.log(chalk181.dim(`load the unpacked extension from ${extensionPath}`));
29332
- console.log(chalk181.dim("press Ctrl-C to stop"));
29417
+ console.log(chalk182.dim(`forwarding only URLs matching "${filter}"`));
29418
+ console.log(chalk182.dim(`load the unpacked extension from ${extensionPath}`));
29419
+ console.log(chalk182.dim("press Ctrl-C to stop"));
29333
29420
  });
29334
29421
  process.on("SIGINT", () => {
29335
29422
  server.close();
29336
29423
  console.log(
29337
- chalk181.bold(
29424
+ chalk182.bold(
29338
29425
  `
29339
29426
  netcap stopped \u2014 captured ${count10} ${count10 === 1 ? "entry" : "entries"} to ${outPath}`
29340
29427
  )
@@ -29344,9 +29431,9 @@ netcap stopped \u2014 captured ${count10} ${count10 === 1 ? "entry" : "entries"}
29344
29431
  }
29345
29432
 
29346
29433
  // src/commands/netcap/netcapExtract.ts
29347
- import { writeFileSync as writeFileSync35 } from "fs";
29348
- import { join as join78 } from "path";
29349
- import chalk182 from "chalk";
29434
+ import { writeFileSync as writeFileSync36 } from "fs";
29435
+ import { join as join79 } from "path";
29436
+ import chalk183 from "chalk";
29350
29437
 
29351
29438
  // src/commands/netcap/extractPostsFromCapture.ts
29352
29439
  import { readFileSync as readFileSync44 } from "fs";
@@ -29790,12 +29877,12 @@ function extractPostsFromCapture(captureFile) {
29790
29877
  function netcapExtract(file) {
29791
29878
  const captureFile = file ?? defaultCapturePath();
29792
29879
  const posts = extractPostsFromCapture(captureFile);
29793
- const outFile = join78(captureFile, "..", "posts.json");
29794
- writeFileSync35(outFile, `${JSON.stringify(posts, null, 2)}
29880
+ const outFile = join79(captureFile, "..", "posts.json");
29881
+ writeFileSync36(outFile, `${JSON.stringify(posts, null, 2)}
29795
29882
  `);
29796
29883
  console.log(
29797
- chalk182.green(`extracted ${posts.length} posts`),
29798
- chalk182.dim(`-> ${outFile}`)
29884
+ chalk183.green(`extracted ${posts.length} posts`),
29885
+ chalk183.dim(`-> ${outFile}`)
29799
29886
  );
29800
29887
  }
29801
29888
 
@@ -29816,7 +29903,7 @@ function registerNetcap(program) {
29816
29903
  }
29817
29904
 
29818
29905
  // src/commands/news/add.ts
29819
- import chalk183 from "chalk";
29906
+ import chalk184 from "chalk";
29820
29907
  import enquirer8 from "enquirer";
29821
29908
  async function add2(url) {
29822
29909
  if (!url) {
@@ -29837,25 +29924,25 @@ async function add2(url) {
29837
29924
  }
29838
29925
  const added = await addFeed(await getDb(), url);
29839
29926
  if (!added) {
29840
- console.log(chalk183.yellow("Feed already exists"));
29927
+ console.log(chalk184.yellow("Feed already exists"));
29841
29928
  return;
29842
29929
  }
29843
- console.log(chalk183.green(`Added feed: ${url}`));
29930
+ console.log(chalk184.green(`Added feed: ${url}`));
29844
29931
  }
29845
29932
 
29846
29933
  // src/commands/news/list.ts
29847
- import chalk184 from "chalk";
29934
+ import chalk185 from "chalk";
29848
29935
  async function list3() {
29849
29936
  const urls = await listFeeds(await getDb());
29850
29937
  if (urls.length === 0) {
29851
- console.log(chalk184.dim("No feeds; add one with assist news add <url>"));
29938
+ console.log(chalk185.dim("No feeds; add one with assist news add <url>"));
29852
29939
  return;
29853
29940
  }
29854
29941
  for (const url of urls) console.log(url);
29855
29942
  }
29856
29943
 
29857
29944
  // src/commands/news/remove.ts
29858
- import chalk185 from "chalk";
29945
+ import chalk186 from "chalk";
29859
29946
 
29860
29947
  // src/commands/backlog/removeFeed.ts
29861
29948
  import { eq as eq43 } from "drizzle-orm";
@@ -29868,10 +29955,10 @@ async function removeFeed(db, url) {
29868
29955
  async function remove(url) {
29869
29956
  const removed = await removeFeed(await getDb(), url);
29870
29957
  if (!removed) {
29871
- console.log(chalk185.yellow(`No feed matches ${url}`));
29958
+ console.log(chalk186.yellow(`No feed matches ${url}`));
29872
29959
  return;
29873
29960
  }
29874
- console.log(chalk185.green(`Removed feed: ${url}`));
29961
+ console.log(chalk186.green(`Removed feed: ${url}`));
29875
29962
  }
29876
29963
 
29877
29964
  // src/commands/registerNews.ts
@@ -29924,7 +30011,7 @@ function registerPiHook(program) {
29924
30011
  }
29925
30012
 
29926
30013
  // src/commands/prompts/printPromptsTable.ts
29927
- import chalk186 from "chalk";
30014
+ import chalk187 from "chalk";
29928
30015
  function truncate(str, max) {
29929
30016
  if (str.length <= max) return str;
29930
30017
  return `${str.slice(0, max - 1)}\u2026`;
@@ -29942,14 +30029,14 @@ function printPromptsTable(rows) {
29942
30029
  "Command".padEnd(commandWidth),
29943
30030
  "Repos"
29944
30031
  ].join(" ");
29945
- console.log(chalk186.dim(header));
29946
- console.log(chalk186.dim("-".repeat(header.length)));
30032
+ console.log(chalk187.dim(header));
30033
+ console.log(chalk187.dim("-".repeat(header.length)));
29947
30034
  for (const row3 of rows) {
29948
30035
  const count10 = String(row3.count).padStart(countWidth);
29949
30036
  const tool = row3.tool.padEnd(toolWidth);
29950
30037
  const command = truncate(row3.command, 60).padEnd(commandWidth);
29951
30038
  console.log(
29952
- `${chalk186.yellow(count10)} ${tool} ${command} ${chalk186.dim(row3.repos)}`
30039
+ `${chalk187.yellow(count10)} ${tool} ${command} ${chalk187.dim(row3.repos)}`
29953
30040
  );
29954
30041
  }
29955
30042
  }
@@ -29987,13 +30074,13 @@ import { execSync as execSync39 } from "child_process";
29987
30074
  import enquirer9 from "enquirer";
29988
30075
 
29989
30076
  // src/commands/prs/prs/displayPaginated/printPr.ts
29990
- import chalk187 from "chalk";
30077
+ import chalk188 from "chalk";
29991
30078
  var STATUS_MAP = {
29992
- MERGED: (pr) => pr.mergedAt ? { label: chalk187.magenta("merged"), date: pr.mergedAt } : null,
29993
- CLOSED: (pr) => pr.closedAt ? { label: chalk187.red("closed"), date: pr.closedAt } : null
30079
+ MERGED: (pr) => pr.mergedAt ? { label: chalk188.magenta("merged"), date: pr.mergedAt } : null,
30080
+ CLOSED: (pr) => pr.closedAt ? { label: chalk188.red("closed"), date: pr.closedAt } : null
29994
30081
  };
29995
30082
  function defaultStatus(pr) {
29996
- return { label: chalk187.green("opened"), date: pr.createdAt };
30083
+ return { label: chalk188.green("opened"), date: pr.createdAt };
29997
30084
  }
29998
30085
  function getStatus2(pr) {
29999
30086
  return STATUS_MAP[pr.state]?.(pr) ?? defaultStatus(pr);
@@ -30002,11 +30089,11 @@ function formatDate(dateStr) {
30002
30089
  return new Date(dateStr).toISOString().split("T")[0];
30003
30090
  }
30004
30091
  function formatPrHeader(pr, status2) {
30005
- return `${chalk187.cyan(`#${pr.number}`)} ${pr.title} ${chalk187.dim(`(${pr.author.login},`)} ${status2.label} ${chalk187.dim(`${formatDate(status2.date)})`)}`;
30092
+ return `${chalk188.cyan(`#${pr.number}`)} ${pr.title} ${chalk188.dim(`(${pr.author.login},`)} ${status2.label} ${chalk188.dim(`${formatDate(status2.date)})`)}`;
30006
30093
  }
30007
30094
  function logPrDetails(pr) {
30008
30095
  console.log(
30009
- chalk187.dim(` ${pr.changedFiles.toLocaleString()} files | ${pr.url}`)
30096
+ chalk188.dim(` ${pr.changedFiles.toLocaleString()} files | ${pr.url}`)
30010
30097
  );
30011
30098
  console.log();
30012
30099
  }
@@ -30185,11 +30272,11 @@ async function comment2(path108, line, body, options2 = {}) {
30185
30272
  }
30186
30273
 
30187
30274
  // src/commands/prs/commentsCachePath.ts
30188
- import { homedir as homedir24 } from "os";
30189
- import { join as join79 } from "path";
30275
+ import { homedir as homedir25 } from "os";
30276
+ import { join as join80 } from "path";
30190
30277
  function commentsCachePath(org, repo, prNumber) {
30191
- return join79(
30192
- homedir24(),
30278
+ return join80(
30279
+ homedir25(),
30193
30280
  ".assist",
30194
30281
  "pr-comments",
30195
30282
  org,
@@ -30199,8 +30286,8 @@ function commentsCachePath(org, repo, prNumber) {
30199
30286
  }
30200
30287
 
30201
30288
  // src/commands/prs/listComments/updateCommentsCache.ts
30202
- import { mkdirSync as mkdirSync22, writeFileSync as writeFileSync36 } from "fs";
30203
- import { dirname as dirname36 } from "path";
30289
+ import { mkdirSync as mkdirSync23, writeFileSync as writeFileSync37 } from "fs";
30290
+ import { dirname as dirname37 } from "path";
30204
30291
  import { stringify as stringify3 } from "yaml";
30205
30292
 
30206
30293
  // src/commands/prs/loadCommentsCache.ts
@@ -30224,10 +30311,10 @@ function deleteCommentsCache(org, repo, prNumber) {
30224
30311
 
30225
30312
  // src/commands/prs/removeStaleCommentsCaches.ts
30226
30313
  import { readdirSync as readdirSync13, unlinkSync as unlinkSync14 } from "fs";
30227
- import { join as join80 } from "path";
30314
+ import { join as join81 } from "path";
30228
30315
  var STALE_PATTERN = /^pr-\d+-comments\.yaml$/;
30229
30316
  function removeStaleCommentsCaches(cwd = process.cwd()) {
30230
- const dir = join80(cwd, ".assist");
30317
+ const dir = join81(cwd, ".assist");
30231
30318
  let entries;
30232
30319
  try {
30233
30320
  entries = readdirSync13(dir);
@@ -30235,20 +30322,20 @@ function removeStaleCommentsCaches(cwd = process.cwd()) {
30235
30322
  return;
30236
30323
  }
30237
30324
  for (const entry of entries.filter((e) => STALE_PATTERN.test(e))) {
30238
- unlinkSync14(join80(dir, entry));
30325
+ unlinkSync14(join81(dir, entry));
30239
30326
  }
30240
30327
  }
30241
30328
 
30242
30329
  // src/commands/prs/listComments/updateCommentsCache.ts
30243
30330
  function writeCommentsCache(org, repo, prNumber, comments3) {
30244
30331
  const cachePath = commentsCachePath(org, repo, prNumber);
30245
- mkdirSync22(dirname36(cachePath), { recursive: true });
30332
+ mkdirSync23(dirname37(cachePath), { recursive: true });
30246
30333
  const cacheData = {
30247
30334
  prNumber,
30248
30335
  fetchedAt: (/* @__PURE__ */ new Date()).toISOString(),
30249
30336
  comments: comments3
30250
30337
  };
30251
- writeFileSync36(cachePath, stringify3(cacheData));
30338
+ writeFileSync37(cachePath, stringify3(cacheData));
30252
30339
  }
30253
30340
  function updateCommentsCache(org, repo, prNumber, comments3) {
30254
30341
  removeStaleCommentsCaches();
@@ -30351,9 +30438,9 @@ function failAzureDevops(error) {
30351
30438
 
30352
30439
  // src/commands/prs/azureDevops/invokeAzDevops.ts
30353
30440
  import { execFileSync as execFileSync21 } from "child_process";
30354
- import { mkdtempSync as mkdtempSync2, rmSync as rmSync6, writeFileSync as writeFileSync37 } from "fs";
30441
+ import { mkdtempSync as mkdtempSync2, rmSync as rmSync6, writeFileSync as writeFileSync38 } from "fs";
30355
30442
  import { tmpdir as tmpdir6 } from "os";
30356
- import { join as join81 } from "path";
30443
+ import { join as join82 } from "path";
30357
30444
  function azDevopsInvokeArgs(request, inFile) {
30358
30445
  return [
30359
30446
  "devops",
@@ -30388,10 +30475,10 @@ function runAz2(args) {
30388
30475
  }
30389
30476
  function invokeAzDevops(request) {
30390
30477
  if (request.body === void 0) return runAz2(azDevopsInvokeArgs(request));
30391
- const dir = mkdtempSync2(join81(tmpdir6(), "assist-az-"));
30392
- const inFile = join81(dir, "body.json");
30478
+ const dir = mkdtempSync2(join82(tmpdir6(), "assist-az-"));
30479
+ const inFile = join82(dir, "body.json");
30393
30480
  try {
30394
- writeFileSync37(inFile, JSON.stringify(request.body));
30481
+ writeFileSync38(inFile, JSON.stringify(request.body));
30395
30482
  return runAz2(azDevopsInvokeArgs(request, inFile));
30396
30483
  } finally {
30397
30484
  rmSync6(dir, { recursive: true, force: true });
@@ -30575,13 +30662,13 @@ function agentFooter(unresolvedCount) {
30575
30662
  }
30576
30663
 
30577
30664
  // src/commands/prs/listComments/commentStyle.ts
30578
- import chalk188 from "chalk";
30665
+ import chalk189 from "chalk";
30579
30666
  var plain = (text17) => text17;
30580
30667
  function colouredState(state) {
30581
30668
  const label2 = `[${state}]`;
30582
- if (state === "APPROVED") return chalk188.green(label2);
30583
- if (state === "CHANGES_REQUESTED") return chalk188.red(label2);
30584
- return chalk188.yellow(label2);
30669
+ if (state === "APPROVED") return chalk189.green(label2);
30670
+ if (state === "CHANGES_REQUESTED") return chalk189.red(label2);
30671
+ return chalk189.yellow(label2);
30585
30672
  }
30586
30673
  function commentStyle() {
30587
30674
  if (isClaudeCode()) {
@@ -30595,9 +30682,9 @@ function commentStyle() {
30595
30682
  };
30596
30683
  }
30597
30684
  return {
30598
- cyan: chalk188.cyan,
30599
- bold: chalk188.bold,
30600
- dim: chalk188.dim,
30685
+ cyan: chalk189.cyan,
30686
+ bold: chalk189.bold,
30687
+ dim: chalk189.dim,
30601
30688
  state: colouredState,
30602
30689
  diffHunk: true,
30603
30690
  agent: false
@@ -32071,16 +32158,16 @@ function buildPrsStatusReport(repoArguments, now = Date.now()) {
32071
32158
  }
32072
32159
 
32073
32160
  // src/commands/prs/status/printPrsStatus.ts
32074
- import chalk190 from "chalk";
32161
+ import chalk191 from "chalk";
32075
32162
 
32076
32163
  // src/commands/prs/status/printPrStatus.ts
32077
- import chalk189 from "chalk";
32164
+ import chalk190 from "chalk";
32078
32165
  function flags(pr) {
32079
32166
  const markers = [];
32080
32167
  if (pr.isDraft) markers.push("draft");
32081
32168
  if (pr.isDoNotMerge) markers.push("do not merge");
32082
32169
  if (pr.isBot) markers.push("bot");
32083
- return markers.length ? ` ${chalk189.yellow(`[${markers.join(", ")}]`)}` : "";
32170
+ return markers.length ? ` ${chalk190.yellow(`[${markers.join(", ")}]`)}` : "";
32084
32171
  }
32085
32172
  function updated(pr) {
32086
32173
  return pr.ageHours === null ? "updated unknown" : `updated ${pr.age} ago`;
@@ -32094,35 +32181,35 @@ function reviewLine(pr) {
32094
32181
  function checkLines(pr) {
32095
32182
  const lines2 = [];
32096
32183
  if (pr.checks.failing.length) {
32097
- lines2.push(chalk189.red(`failing: ${pr.checks.failing.join(", ")}`));
32184
+ lines2.push(chalk190.red(`failing: ${pr.checks.failing.join(", ")}`));
32098
32185
  }
32099
32186
  if (pr.checks.pending.length) {
32100
- lines2.push(chalk189.yellow(`pending: ${pr.checks.pending.join(", ")}`));
32187
+ lines2.push(chalk190.yellow(`pending: ${pr.checks.pending.join(", ")}`));
32101
32188
  }
32102
32189
  return lines2;
32103
32190
  }
32104
32191
  function threadsLine(pr) {
32105
32192
  if (pr.unresolvedThreads === null) {
32106
- return chalk189.dim("unresolved comments: unknown");
32193
+ return chalk190.dim("unresolved comments: unknown");
32107
32194
  }
32108
32195
  if (pr.unresolvedThreads === 0) return null;
32109
- return chalk189.yellow(`unresolved comments: ${pr.unresolvedThreads}`);
32196
+ return chalk190.yellow(`unresolved comments: ${pr.unresolvedThreads}`);
32110
32197
  }
32111
32198
  function mergeableLine(pr) {
32112
- if (pr.mergeable === "CONFLICTING") return chalk189.red("conflicting");
32199
+ if (pr.mergeable === "CONFLICTING") return chalk190.red("conflicting");
32113
32200
  if (pr.mergeable === "MERGEABLE") return null;
32114
- return chalk189.dim(`mergeable: ${pr.mergeable.toLowerCase()}`);
32201
+ return chalk190.dim(`mergeable: ${pr.mergeable.toLowerCase()}`);
32115
32202
  }
32116
32203
  function printPrStatus(pr) {
32117
32204
  console.log(
32118
- ` ${chalk189.cyan(`#${pr.number}`)} ${pr.title} ${chalk189.dim(`(${pr.author}, ${updated(pr)})`)}${flags(pr)}`
32205
+ ` ${chalk190.cyan(`#${pr.number}`)} ${pr.title} ${chalk190.dim(`(${pr.author}, ${updated(pr)})`)}${flags(pr)}`
32119
32206
  );
32120
32207
  const details = [
32121
32208
  reviewLine(pr),
32122
32209
  ...checkLines(pr),
32123
32210
  threadsLine(pr),
32124
32211
  mergeableLine(pr),
32125
- chalk189.dim(pr.url)
32212
+ chalk190.dim(pr.url)
32126
32213
  ];
32127
32214
  for (const detail of details) {
32128
32215
  if (detail) console.log(` ${detail}`);
@@ -32133,17 +32220,17 @@ function printPrStatus(pr) {
32133
32220
  function printPrsStatus(report) {
32134
32221
  for (const repo of report.repos) {
32135
32222
  const count10 = repo.pullRequests.length;
32136
- console.log(`${chalk190.bold(repo.repo)} ${chalk190.dim(`(${count10} open)`)}`);
32223
+ console.log(`${chalk191.bold(repo.repo)} ${chalk191.dim(`(${count10} open)`)}`);
32137
32224
  for (const pr of repo.pullRequests) {
32138
32225
  printPrStatus(pr);
32139
32226
  }
32140
- if (count10 === 0) console.log(chalk190.dim(" no open pull requests"));
32227
+ if (count10 === 0) console.log(chalk191.dim(" no open pull requests"));
32141
32228
  console.log();
32142
32229
  }
32143
32230
  if (report.errors.length === 0) return;
32144
- console.log(chalk190.bold("Errors"));
32231
+ console.log(chalk191.bold("Errors"));
32145
32232
  for (const failure of report.errors) {
32146
- console.log(` ${chalk190.red(failure.repo)}: ${failure.error}`);
32233
+ console.log(` ${chalk191.red(failure.repo)}: ${failure.error}`);
32147
32234
  }
32148
32235
  console.log();
32149
32236
  }
@@ -32371,10 +32458,10 @@ function registerPrs(program) {
32371
32458
  }
32372
32459
 
32373
32460
  // src/commands/ravendb/ravendbAuth.ts
32374
- import chalk196 from "chalk";
32461
+ import chalk197 from "chalk";
32375
32462
 
32376
32463
  // src/shared/createConnectionAuth.ts
32377
- import chalk191 from "chalk";
32464
+ import chalk192 from "chalk";
32378
32465
  function listConnections(connections, format3) {
32379
32466
  if (connections.length === 0) {
32380
32467
  console.log("No connections configured.");
@@ -32387,7 +32474,7 @@ function listConnections(connections, format3) {
32387
32474
  function removeConnection(connections, name, save) {
32388
32475
  const filtered = connections.filter((c) => c.name !== name);
32389
32476
  if (filtered.length === connections.length) {
32390
- console.error(chalk191.red(`Connection "${name}" not found.`));
32477
+ console.error(chalk192.red(`Connection "${name}" not found.`));
32391
32478
  process.exit(1);
32392
32479
  }
32393
32480
  save(filtered);
@@ -32433,15 +32520,15 @@ function saveConnections(connections) {
32433
32520
  }
32434
32521
 
32435
32522
  // src/commands/ravendb/promptConnection.ts
32436
- import chalk194 from "chalk";
32523
+ import chalk195 from "chalk";
32437
32524
 
32438
32525
  // src/commands/ravendb/selectOpSecret.ts
32439
- import chalk193 from "chalk";
32526
+ import chalk194 from "chalk";
32440
32527
  import Enquirer2 from "enquirer";
32441
32528
 
32442
32529
  // src/commands/ravendb/searchItems.ts
32443
32530
  import { execSync as execSync46 } from "child_process";
32444
- import chalk192 from "chalk";
32531
+ import chalk193 from "chalk";
32445
32532
  function opExec(args) {
32446
32533
  return execSync46(`op ${args}`, {
32447
32534
  encoding: "utf8",
@@ -32454,7 +32541,7 @@ function searchItems(search2) {
32454
32541
  items2 = JSON.parse(opExec("item list --format=json"));
32455
32542
  } catch {
32456
32543
  console.error(
32457
- chalk192.red(
32544
+ chalk193.red(
32458
32545
  "Failed to search 1Password. Ensure the CLI is installed and you are signed in."
32459
32546
  )
32460
32547
  );
@@ -32468,7 +32555,7 @@ function getItemFields(itemId2) {
32468
32555
  const item = JSON.parse(opExec(`item get "${itemId2}" --format=json`));
32469
32556
  return item.fields.filter((f) => f.reference && f.label);
32470
32557
  } catch {
32471
- console.error(chalk192.red("Failed to get item details from 1Password."));
32558
+ console.error(chalk193.red("Failed to get item details from 1Password."));
32472
32559
  process.exit(1);
32473
32560
  }
32474
32561
  }
@@ -32487,7 +32574,7 @@ async function selectOpSecret(searchTerm) {
32487
32574
  }).run();
32488
32575
  const items2 = searchItems(search2);
32489
32576
  if (items2.length === 0) {
32490
- console.error(chalk193.red(`No items found matching "${search2}".`));
32577
+ console.error(chalk194.red(`No items found matching "${search2}".`));
32491
32578
  process.exit(1);
32492
32579
  }
32493
32580
  const itemId2 = await selectOne(
@@ -32496,7 +32583,7 @@ async function selectOpSecret(searchTerm) {
32496
32583
  );
32497
32584
  const fields = getItemFields(itemId2);
32498
32585
  if (fields.length === 0) {
32499
- console.error(chalk193.red("No fields with references found on this item."));
32586
+ console.error(chalk194.red("No fields with references found on this item."));
32500
32587
  process.exit(1);
32501
32588
  }
32502
32589
  const ref = await selectOne(
@@ -32510,7 +32597,7 @@ async function selectOpSecret(searchTerm) {
32510
32597
  async function promptConnection(existingNames) {
32511
32598
  const name = await promptInput("name", "Connection name:");
32512
32599
  if (existingNames.includes(name)) {
32513
- console.error(chalk194.red(`Connection "${name}" already exists.`));
32600
+ console.error(chalk195.red(`Connection "${name}" already exists.`));
32514
32601
  process.exit(1);
32515
32602
  }
32516
32603
  const url = await promptInput(
@@ -32519,22 +32606,22 @@ async function promptConnection(existingNames) {
32519
32606
  );
32520
32607
  const database = await promptInput("database", "Database name:");
32521
32608
  if (!name || !url || !database) {
32522
- console.error(chalk194.red("All fields are required."));
32609
+ console.error(chalk195.red("All fields are required."));
32523
32610
  process.exit(1);
32524
32611
  }
32525
32612
  const apiKeyRef = await selectOpSecret();
32526
- console.log(chalk194.dim(`Using: ${apiKeyRef}`));
32613
+ console.log(chalk195.dim(`Using: ${apiKeyRef}`));
32527
32614
  return { name, url, database, apiKeyRef };
32528
32615
  }
32529
32616
 
32530
32617
  // src/commands/ravendb/ravendbSetConnection.ts
32531
- import chalk195 from "chalk";
32618
+ import chalk196 from "chalk";
32532
32619
  function ravendbSetConnection(name) {
32533
32620
  const raw = loadGlobalConfigRaw();
32534
32621
  const ravendb = raw.ravendb ?? {};
32535
32622
  const connections = ravendb.connections ?? [];
32536
32623
  if (!connections.some((c) => c.name === name)) {
32537
- console.error(chalk195.red(`Connection "${name}" not found.`));
32624
+ console.error(chalk196.red(`Connection "${name}" not found.`));
32538
32625
  console.error(
32539
32626
  `Available: ${connections.map((c) => c.name).join(", ") || "(none)"}`
32540
32627
  );
@@ -32550,16 +32637,16 @@ function ravendbSetConnection(name) {
32550
32637
  var ravendbAuth = createConnectionAuth({
32551
32638
  load: loadConnections,
32552
32639
  save: saveConnections,
32553
- format: (c) => `${chalk196.bold(c.name)} ${c.url} db=${c.database} key=${c.apiKeyRef}`,
32640
+ format: (c) => `${chalk197.bold(c.name)} ${c.url} db=${c.database} key=${c.apiKeyRef}`,
32554
32641
  promptNew: promptConnection,
32555
32642
  onFirst: (c) => ravendbSetConnection(c.name)
32556
32643
  });
32557
32644
 
32558
32645
  // src/commands/ravendb/ravendbCollections.ts
32559
- import chalk200 from "chalk";
32646
+ import chalk201 from "chalk";
32560
32647
 
32561
32648
  // src/commands/ravendb/ravenFetch.ts
32562
- import chalk198 from "chalk";
32649
+ import chalk199 from "chalk";
32563
32650
 
32564
32651
  // src/commands/ravendb/getAccessToken.ts
32565
32652
  var OAUTH_URL = "https://amazon-useast-1-oauth.ravenhq.com/ApiKeys/OAuth/AccessToken";
@@ -32596,10 +32683,10 @@ ${errorText}`
32596
32683
 
32597
32684
  // src/commands/ravendb/resolveOpSecret.ts
32598
32685
  import { execSync as execSync47 } from "child_process";
32599
- import chalk197 from "chalk";
32686
+ import chalk198 from "chalk";
32600
32687
  function resolveOpSecret(reference) {
32601
32688
  if (!reference.startsWith("op://")) {
32602
- console.error(chalk197.red(`Invalid secret reference: must start with op://`));
32689
+ console.error(chalk198.red(`Invalid secret reference: must start with op://`));
32603
32690
  process.exit(1);
32604
32691
  }
32605
32692
  try {
@@ -32609,7 +32696,7 @@ function resolveOpSecret(reference) {
32609
32696
  }).trim();
32610
32697
  } catch {
32611
32698
  console.error(
32612
- chalk197.red(
32699
+ chalk198.red(
32613
32700
  "Failed to resolve secret reference. Ensure 1Password CLI is installed and you are signed in."
32614
32701
  )
32615
32702
  );
@@ -32636,7 +32723,7 @@ async function ravenFetch(connection, path108) {
32636
32723
  if (!response.ok) {
32637
32724
  const body = await response.text();
32638
32725
  console.error(
32639
- chalk198.red(`RavenDB error: ${response.status} ${response.statusText}`)
32726
+ chalk199.red(`RavenDB error: ${response.status} ${response.statusText}`)
32640
32727
  );
32641
32728
  console.error(body.substring(0, 500));
32642
32729
  process.exit(1);
@@ -32645,7 +32732,7 @@ async function ravenFetch(connection, path108) {
32645
32732
  }
32646
32733
 
32647
32734
  // src/commands/ravendb/resolveConnection.ts
32648
- import chalk199 from "chalk";
32735
+ import chalk200 from "chalk";
32649
32736
  function loadRavendb() {
32650
32737
  const raw = loadGlobalConfigRaw();
32651
32738
  const ravendb = raw.ravendb;
@@ -32659,7 +32746,7 @@ function resolveConnection(name) {
32659
32746
  const connectionName = name ?? defaultConnection;
32660
32747
  if (!connectionName) {
32661
32748
  console.error(
32662
- chalk199.red(
32749
+ chalk200.red(
32663
32750
  "No connection specified and no default set. Use assist ravendb set-connection <name> or pass a connection name."
32664
32751
  )
32665
32752
  );
@@ -32667,7 +32754,7 @@ function resolveConnection(name) {
32667
32754
  }
32668
32755
  const connection = connections.find((c) => c.name === connectionName);
32669
32756
  if (!connection) {
32670
- console.error(chalk199.red(`Connection "${connectionName}" not found.`));
32757
+ console.error(chalk200.red(`Connection "${connectionName}" not found.`));
32671
32758
  console.error(
32672
32759
  `Available: ${connections.map((c) => c.name).join(", ") || "(none)"}`
32673
32760
  );
@@ -32698,15 +32785,15 @@ async function ravendbCollections(connectionName) {
32698
32785
  return;
32699
32786
  }
32700
32787
  for (const c of collections) {
32701
- console.log(`${chalk200.bold(c.Name)} ${c.CountOfDocuments} docs`);
32788
+ console.log(`${chalk201.bold(c.Name)} ${c.CountOfDocuments} docs`);
32702
32789
  }
32703
32790
  }
32704
32791
 
32705
32792
  // src/commands/ravendb/ravendbQuery.ts
32706
- import chalk202 from "chalk";
32793
+ import chalk203 from "chalk";
32707
32794
 
32708
32795
  // src/commands/ravendb/fetchAllPages.ts
32709
- import chalk201 from "chalk";
32796
+ import chalk202 from "chalk";
32710
32797
 
32711
32798
  // src/commands/ravendb/buildQueryPath.ts
32712
32799
  function buildQueryPath(opts) {
@@ -32744,7 +32831,7 @@ async function fetchAllPages(connection, opts) {
32744
32831
  allResults.push(...results);
32745
32832
  start2 += results.length;
32746
32833
  process.stderr.write(
32747
- `\r${chalk201.dim(`Fetched ${allResults.length}/${totalResults}`)}`
32834
+ `\r${chalk202.dim(`Fetched ${allResults.length}/${totalResults}`)}`
32748
32835
  );
32749
32836
  if (start2 >= totalResults) break;
32750
32837
  if (opts.limit !== void 0 && allResults.length >= opts.limit) break;
@@ -32759,7 +32846,7 @@ async function fetchAllPages(connection, opts) {
32759
32846
  async function ravendbQuery(connectionName, collection, options2) {
32760
32847
  const resolved = resolveArgs(connectionName, collection);
32761
32848
  if (!resolved.collection && !options2.query) {
32762
- console.error(chalk202.red("Provide a collection name or --query filter."));
32849
+ console.error(chalk203.red("Provide a collection name or --query filter."));
32763
32850
  process.exit(1);
32764
32851
  }
32765
32852
  const { collection: col } = resolved;
@@ -32794,7 +32881,7 @@ function registerRavendb(program) {
32794
32881
  }
32795
32882
 
32796
32883
  // src/commands/releases/releasesConfigure.ts
32797
- import chalk204 from "chalk";
32884
+ import chalk205 from "chalk";
32798
32885
 
32799
32886
  // src/commands/releases/checkStreamGraph.ts
32800
32887
  function nodeIds(stream) {
@@ -32856,26 +32943,26 @@ function readStreamsInput(source) {
32856
32943
  }
32857
32944
 
32858
32945
  // src/commands/releases/reportDerivedStreams.ts
32859
- import chalk203 from "chalk";
32946
+ import chalk204 from "chalk";
32860
32947
  function printDerived(stream) {
32861
32948
  const environments = stream.nodes.flatMap((n) => n.environment ?? []);
32862
32949
  const steps = stream.nodes.filter((n) => !n.environment);
32863
32950
  console.log(
32864
- `${chalk203.bold(stream.name)} ${chalk203.dim(`${stream.repo} \xB7 ${stream.workflow}`)}`
32951
+ `${chalk204.bold(stream.name)} ${chalk204.dim(`${stream.repo} \xB7 ${stream.workflow}`)}`
32865
32952
  );
32866
32953
  console.log(
32867
- ` environments: ${environments.join(", ") || chalk203.dim("none")}`
32954
+ ` environments: ${environments.join(", ") || chalk204.dim("none")}`
32868
32955
  );
32869
32956
  if (steps.length > 0)
32870
32957
  console.log(
32871
32958
  ` steps: ${steps.map((n) => `${n.id} [${n.kind ?? "step"}]`).join(", ")}`
32872
32959
  );
32873
32960
  const edges = stream.edges.map(([from, to]) => `${from} \u2192 ${to}`);
32874
- console.log(` edges: ${edges.join(", ") || chalk203.dim("none")}`);
32961
+ console.log(` edges: ${edges.join(", ") || chalk204.dim("none")}`);
32875
32962
  }
32876
32963
  function reportDerivedStreams(streams, target) {
32877
32964
  for (const stream of streams) printDerived(stream);
32878
- console.log(chalk203.dim(`Written to ${target}`));
32965
+ console.log(chalk204.dim(`Written to ${target}`));
32879
32966
  }
32880
32967
 
32881
32968
  // src/commands/releases/withCurrentRepo.ts
@@ -32962,9 +33049,9 @@ async function writeReleaseStreams(incoming, scope) {
32962
33049
  }
32963
33050
 
32964
33051
  // src/commands/releases/releasesConfigure.ts
32965
- function fail6(message3, details = []) {
32966
- console.error(chalk204.red(message3));
32967
- for (const detail of details) console.error(chalk204.red(` ${detail}`));
33052
+ function fail7(message3, details = []) {
33053
+ console.error(chalk205.red(message3));
33054
+ for (const detail of details) console.error(chalk205.red(` ${detail}`));
32968
33055
  process.exitCode = 1;
32969
33056
  }
32970
33057
  function reportWritten(incoming, target) {
@@ -32978,17 +33065,17 @@ function reportWritten(incoming, target) {
32978
33065
  async function releasesConfigure(options2 = {}) {
32979
33066
  const scope = options2.scope === "repo" ? "repo" : "project";
32980
33067
  const input = readStreamsInput(options2.streams ?? "-");
32981
- if ("error" in input) return fail6(`Could not read --streams: ${input.error}`);
33068
+ if ("error" in input) return fail7(`Could not read --streams: ${input.error}`);
32982
33069
  const incoming = withCurrentRepo(input.streams);
32983
33070
  const broken = checkStreamGraph(incoming);
32984
33071
  if (broken.length > 0)
32985
- return fail6(
33072
+ return fail7(
32986
33073
  "The graph does not hold together, so nothing was written:",
32987
33074
  broken
32988
33075
  );
32989
33076
  const written = await writeReleaseStreams(incoming, scope);
32990
33077
  if (!written.ok)
32991
- return fail6(
33078
+ return fail7(
32992
33079
  "releases.streams does not validate, so nothing was written:",
32993
33080
  written.errors
32994
33081
  );
@@ -32996,23 +33083,23 @@ async function releasesConfigure(options2 = {}) {
32996
33083
  }
32997
33084
 
32998
33085
  // src/commands/releases/releasesList.ts
32999
- import chalk205 from "chalk";
33086
+ import chalk206 from "chalk";
33000
33087
  function describeNode(node) {
33001
33088
  if (node.environment) return `${node.id} \u2192 ${node.environment}`;
33002
33089
  return `${node.id} (${node.kind ?? "step"})`;
33003
33090
  }
33004
33091
  function printStream(stream) {
33005
- console.log(`${chalk205.bold(stream.name)} ${chalk205.dim(stream.repo)}`);
33006
- console.log(chalk205.dim(` workflow: ${stream.workflow}`));
33092
+ console.log(`${chalk206.bold(stream.name)} ${chalk206.dim(stream.repo)}`);
33093
+ console.log(chalk206.dim(` workflow: ${stream.workflow}`));
33007
33094
  for (const node of stream.nodes) console.log(` ${describeNode(node)}`);
33008
33095
  for (const [from, to] of stream.edges)
33009
- console.log(chalk205.dim(` ${from} \u2192 ${to}`));
33096
+ console.log(chalk206.dim(` ${from} \u2192 ${to}`));
33010
33097
  }
33011
33098
  function releasesList() {
33012
33099
  const streams = loadConfig().releases?.streams ?? [];
33013
33100
  if (streams.length === 0) {
33014
33101
  console.log(
33015
- chalk205.dim("No release streams configured under releases.streams.")
33102
+ chalk206.dim("No release streams configured under releases.streams.")
33016
33103
  );
33017
33104
  return;
33018
33105
  }
@@ -33060,7 +33147,7 @@ function coverage() {
33060
33147
 
33061
33148
  // src/commands/lint/lint/runFileNameCheck.ts
33062
33149
  import path45 from "path";
33063
- import chalk207 from "chalk";
33150
+ import chalk208 from "chalk";
33064
33151
 
33065
33152
  // src/commands/lint/lint/checkFileNames.ts
33066
33153
  import fs23 from "fs";
@@ -33140,7 +33227,7 @@ function checkFileNames() {
33140
33227
  }
33141
33228
 
33142
33229
  // src/commands/lint/lint/fixFileNameViolations.ts
33143
- import chalk206 from "chalk";
33230
+ import chalk207 from "chalk";
33144
33231
 
33145
33232
  // src/commands/lint/lint/applyMoves.ts
33146
33233
  import fs24 from "fs";
@@ -33225,25 +33312,25 @@ function fixFileNameViolations(moves) {
33225
33312
  const start2 = performance.now();
33226
33313
  const project = createLintProject();
33227
33314
  const cwd = process.cwd();
33228
- applyMoves(project, moves, cwd, (line) => console.log(chalk206.green(line)));
33315
+ applyMoves(project, moves, cwd, (line) => console.log(chalk207.green(line)));
33229
33316
  const ms = (performance.now() - start2).toFixed(0);
33230
- console.log(chalk206.dim(` Done in ${ms}ms`));
33317
+ console.log(chalk207.dim(` Done in ${ms}ms`));
33231
33318
  }
33232
33319
 
33233
33320
  // src/commands/lint/lint/runFileNameCheck.ts
33234
33321
  function reportViolations(violations) {
33235
- console.error(chalk207.red("\nFile name check failed:\n"));
33322
+ console.error(chalk208.red("\nFile name check failed:\n"));
33236
33323
  console.error(
33237
- chalk207.red(
33324
+ chalk208.red(
33238
33325
  " Files without classes or React components should not start with a capital letter.\n"
33239
33326
  )
33240
33327
  );
33241
33328
  for (const violation of violations) {
33242
- console.error(chalk207.red(` ${violation.filePath}`));
33243
- console.error(chalk207.gray(` Rename to: ${violation.suggestedName}
33329
+ console.error(chalk208.red(` ${violation.filePath}`));
33330
+ console.error(chalk208.gray(` Rename to: ${violation.suggestedName}
33244
33331
  `));
33245
33332
  }
33246
- console.error(chalk207.dim(" Run with -f to auto-fix.\n"));
33333
+ console.error(chalk208.dim(" Run with -f to auto-fix.\n"));
33247
33334
  }
33248
33335
  function runFileNameCheck(fix = false) {
33249
33336
  const violations = checkFileNames();
@@ -33272,17 +33359,17 @@ function runFileNameCheck(fix = false) {
33272
33359
  import fs26 from "fs";
33273
33360
 
33274
33361
  // src/commands/lint/shared.ts
33275
- import chalk208 from "chalk";
33362
+ import chalk209 from "chalk";
33276
33363
  function reportViolations2(violations, checkName2, errorMessage3, successMessage) {
33277
33364
  if (violations.length > 0) {
33278
- console.error(chalk208.red(`
33365
+ console.error(chalk209.red(`
33279
33366
  ${checkName2} failed:
33280
33367
  `));
33281
- console.error(chalk208.red(` ${errorMessage3}
33368
+ console.error(chalk209.red(` ${errorMessage3}
33282
33369
  `));
33283
33370
  for (const violation of violations) {
33284
- console.error(chalk208.red(` ${violation.filePath}:${violation.line}`));
33285
- console.error(chalk208.gray(` ${violation.content}
33371
+ console.error(chalk209.red(` ${violation.filePath}:${violation.line}`));
33372
+ console.error(chalk209.gray(` ${violation.content}
33286
33373
  `));
33287
33374
  }
33288
33375
  return false;
@@ -33410,10 +33497,10 @@ async function notify() {
33410
33497
 
33411
33498
  // src/commands/screenshot.ts
33412
33499
  import { execSync as execSync49 } from "child_process";
33413
- import { existsSync as existsSync65, mkdirSync as mkdirSync23, unlinkSync as unlinkSync15, writeFileSync as writeFileSync38 } from "fs";
33500
+ import { existsSync as existsSync65, mkdirSync as mkdirSync24, unlinkSync as unlinkSync15, writeFileSync as writeFileSync39 } from "fs";
33414
33501
  import { tmpdir as tmpdir7 } from "os";
33415
- import { join as join82, resolve as resolve24 } from "path";
33416
- import chalk209 from "chalk";
33502
+ import { join as join83, resolve as resolve24 } from "path";
33503
+ import chalk210 from "chalk";
33417
33504
 
33418
33505
  // src/commands/screenshot/captureWindowPs1.ts
33419
33506
  var captureWindowPs1 = `
@@ -33543,14 +33630,14 @@ Write-Output $OutputPath
33543
33630
  // src/commands/screenshot.ts
33544
33631
  function buildOutputPath(outputDir, processName) {
33545
33632
  if (!existsSync65(outputDir)) {
33546
- mkdirSync23(outputDir, { recursive: true });
33633
+ mkdirSync24(outputDir, { recursive: true });
33547
33634
  }
33548
33635
  const timestamp6 = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
33549
33636
  return resolve24(outputDir, `${processName}-${timestamp6}.png`);
33550
33637
  }
33551
33638
  function runPowerShellScript(processName, outputPath) {
33552
- const scriptPath = join82(tmpdir7(), `assist-screenshot-${Date.now()}.ps1`);
33553
- writeFileSync38(scriptPath, captureWindowPs1, "utf8");
33639
+ const scriptPath = join83(tmpdir7(), `assist-screenshot-${Date.now()}.ps1`);
33640
+ writeFileSync39(scriptPath, captureWindowPs1, "utf8");
33554
33641
  try {
33555
33642
  execSync49(
33556
33643
  `powershell -NoProfile -ExecutionPolicy Bypass -File "${scriptPath}" -ProcessName "${processName}" -OutputPath "${outputPath}"`,
@@ -33564,19 +33651,19 @@ function screenshot(processName) {
33564
33651
  const config = loadConfig();
33565
33652
  const outputDir = resolve24(config.screenshot.outputDir);
33566
33653
  const outputPath = buildOutputPath(outputDir, processName);
33567
- console.log(chalk209.gray(`Capturing window for process "${processName}" ...`));
33654
+ console.log(chalk210.gray(`Capturing window for process "${processName}" ...`));
33568
33655
  try {
33569
33656
  runPowerShellScript(processName, outputPath);
33570
- console.log(chalk209.green(`Screenshot saved: ${outputPath}`));
33657
+ console.log(chalk210.green(`Screenshot saved: ${outputPath}`));
33571
33658
  } catch (error) {
33572
33659
  const msg = error instanceof Error ? error.message : String(error);
33573
- console.error(chalk209.red(`Failed to capture screenshot: ${msg}`));
33660
+ console.error(chalk210.red(`Failed to capture screenshot: ${msg}`));
33574
33661
  process.exit(1);
33575
33662
  }
33576
33663
  }
33577
33664
 
33578
33665
  // src/commands/statusLine.ts
33579
- import chalk211 from "chalk";
33666
+ import chalk212 from "chalk";
33580
33667
 
33581
33668
  // src/shared/contextLevel.ts
33582
33669
  var THRESHOLDS = {
@@ -33592,7 +33679,7 @@ function contextLevel(pct, harness) {
33592
33679
  }
33593
33680
 
33594
33681
  // src/commands/buildLimitsSegment.ts
33595
- import chalk210 from "chalk";
33682
+ import chalk211 from "chalk";
33596
33683
 
33597
33684
  // src/shared/rateLimitLevel.ts
33598
33685
  var FIVE_HOUR_SECONDS = 5 * 3600;
@@ -33630,9 +33717,9 @@ function rateLimitLevel(pct, resetsAt, windowSeconds, now) {
33630
33717
 
33631
33718
  // src/commands/buildLimitsSegment.ts
33632
33719
  var LEVEL_COLOR = {
33633
- ok: chalk210.green,
33634
- warn: chalk210.yellow,
33635
- over: chalk210.red
33720
+ ok: chalk211.green,
33721
+ warn: chalk211.yellow,
33722
+ over: chalk211.red
33636
33723
  };
33637
33724
  function formatLimit(pct, resetsAt, windowSeconds, fallbackLabel, now) {
33638
33725
  const level = rateLimitLevel(pct, resetsAt, windowSeconds, now);
@@ -33664,9 +33751,9 @@ function buildLimitsSegment(rateLimits) {
33664
33751
 
33665
33752
  // src/commands/readGitBranch.ts
33666
33753
  import { readFileSync as readFileSync48, statSync as statSync10 } from "fs";
33667
- import { isAbsolute as isAbsolute6, join as join83, resolve as resolve25 } from "path";
33754
+ import { isAbsolute as isAbsolute6, join as join84, resolve as resolve25 } from "path";
33668
33755
  function resolveGitDir(cwd) {
33669
- const dotGit = join83(cwd, ".git");
33756
+ const dotGit = join84(cwd, ".git");
33670
33757
  let stat5;
33671
33758
  try {
33672
33759
  stat5 = statSync10(dotGit);
@@ -33696,7 +33783,7 @@ function readGitBranch(cwd) {
33696
33783
  }
33697
33784
  let head;
33698
33785
  try {
33699
- head = readFileSync48(join83(gitDir, "HEAD"), "utf8");
33786
+ head = readFileSync48(join84(gitDir, "HEAD"), "utf8");
33700
33787
  } catch {
33701
33788
  return null;
33702
33789
  }
@@ -33728,7 +33815,7 @@ async function relayUsage(claudeSessionId, transcriptPath2, usedPct) {
33728
33815
  }
33729
33816
 
33730
33817
  // src/commands/statusLine.ts
33731
- chalk211.level = 3;
33818
+ chalk212.level = 3;
33732
33819
  function formatNumber(num) {
33733
33820
  return num.toLocaleString("en-US");
33734
33821
  }
@@ -33736,9 +33823,9 @@ function colorizePercent(pct) {
33736
33823
  const label2 = `${Math.round(pct)}%`;
33737
33824
  switch (contextLevel(pct)) {
33738
33825
  case "red":
33739
- return chalk211.red(label2);
33826
+ return chalk212.red(label2);
33740
33827
  case "yellow":
33741
- return chalk211.yellow(label2);
33828
+ return chalk212.yellow(label2);
33742
33829
  default:
33743
33830
  return label2;
33744
33831
  }
@@ -33751,7 +33838,7 @@ async function statusLine() {
33751
33838
  const usedPct = data.context_window.used_percentage ?? 0;
33752
33839
  const dir = data.workspace?.current_dir ?? data.cwd;
33753
33840
  const branch2 = dir ? readGitBranch(dir) : null;
33754
- const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk211.cyan(branch2)} | ` : "";
33841
+ const branchSegment = branch2 ? `\u{1F33F}\uFE0F ${chalk212.cyan(branch2)} | ` : "";
33755
33842
  console.log(
33756
33843
  `${branchSegment}${model} | Tokens - ${formatNumber(totalIn)} \u2191 : ${formatNumber(totalOut)} \u2193 | Context - ${colorizePercent(usedPct)}${buildLimitsSegment(data.rate_limits)}`
33757
33844
  );
@@ -33858,7 +33945,7 @@ import { spawn as spawn7 } from "child_process";
33858
33945
  import * as path47 from "path";
33859
33946
 
33860
33947
  // src/commands/refactor/logViolations.ts
33861
- import chalk212 from "chalk";
33948
+ import chalk213 from "chalk";
33862
33949
  var DEFAULT_MAX_LINES2 = 100;
33863
33950
  function logViolations(violations, maxLines = DEFAULT_MAX_LINES2) {
33864
33951
  if (violations.length === 0) {
@@ -33867,43 +33954,43 @@ function logViolations(violations, maxLines = DEFAULT_MAX_LINES2) {
33867
33954
  }
33868
33955
  return;
33869
33956
  }
33870
- console.error(chalk212.red(`
33957
+ console.error(chalk213.red(`
33871
33958
  Refactor check failed:
33872
33959
  `));
33873
- console.error(chalk212.red(` The following files exceed ${maxLines} lines:
33960
+ console.error(chalk213.red(` The following files exceed ${maxLines} lines:
33874
33961
  `));
33875
33962
  for (const violation of violations) {
33876
- console.error(chalk212.red(` ${violation.file} (${violation.lines} lines)`));
33963
+ console.error(chalk213.red(` ${violation.file} (${violation.lines} lines)`));
33877
33964
  }
33878
33965
  console.error(
33879
- chalk212.yellow(
33966
+ chalk213.yellow(
33880
33967
  `
33881
33968
  Each file needs to be sensibly refactored, or if there is no sensible
33882
33969
  way to refactor it, ignore it with:
33883
33970
  `
33884
33971
  )
33885
33972
  );
33886
- console.error(chalk212.gray(` assist refactor ignore <file>
33973
+ console.error(chalk213.gray(` assist refactor ignore <file>
33887
33974
  `));
33888
33975
  if (process.env.CLAUDECODE) {
33889
- console.error(chalk212.cyan(`
33976
+ console.error(chalk213.cyan(`
33890
33977
  ## Extracting Code to New Files
33891
33978
  `));
33892
33979
  console.error(
33893
- chalk212.cyan(
33980
+ chalk213.cyan(
33894
33981
  ` When extracting logic from one file to another, consider where the extracted code belongs:
33895
33982
  `
33896
33983
  )
33897
33984
  );
33898
33985
  console.error(
33899
- chalk212.cyan(
33986
+ chalk213.cyan(
33900
33987
  ` 1. Keep related logic together: If the extracted code is tightly coupled to the
33901
33988
  original file's domain, create a new folder containing both the original and extracted files.
33902
33989
  `
33903
33990
  )
33904
33991
  );
33905
33992
  console.error(
33906
- chalk212.cyan(
33993
+ chalk213.cyan(
33907
33994
  ` 2. Share common utilities: If the extracted code can be reused across multiple
33908
33995
  domains, move it to a common/shared folder.
33909
33996
  `
@@ -34059,7 +34146,7 @@ async function check(pattern2, options2) {
34059
34146
 
34060
34147
  // src/commands/refactor/extract.ts
34061
34148
  import path55 from "path";
34062
- import chalk215 from "chalk";
34149
+ import chalk216 from "chalk";
34063
34150
 
34064
34151
  // src/commands/refactor/extract/applyExtraction.ts
34065
34152
  import { SyntaxKind as SyntaxKind4 } from "ts-morph";
@@ -34667,23 +34754,23 @@ function buildPlan2(functionName, sourceFile, sourcePath, destPath, project) {
34667
34754
 
34668
34755
  // src/commands/refactor/extract/displayPlan.ts
34669
34756
  import path51 from "path";
34670
- import chalk213 from "chalk";
34757
+ import chalk214 from "chalk";
34671
34758
  function section(title) {
34672
34759
  return `
34673
- ${chalk213.cyan(title)}`;
34760
+ ${chalk214.cyan(title)}`;
34674
34761
  }
34675
34762
  function displayImporters(plan2, cwd) {
34676
34763
  if (plan2.importersToUpdate.length === 0) return;
34677
34764
  console.log(section("Update importers:"));
34678
34765
  for (const imp of plan2.importersToUpdate) {
34679
34766
  const rel = path51.relative(cwd, imp.file.getFilePath());
34680
- console.log(` ${chalk213.dim(rel)}: \u2192 import from "${imp.relPath}"`);
34767
+ console.log(` ${chalk214.dim(rel)}: \u2192 import from "${imp.relPath}"`);
34681
34768
  }
34682
34769
  }
34683
34770
  function displayPlan(functionName, relDest, plan2, cwd) {
34684
- console.log(chalk213.bold(`Extract: ${functionName} \u2192 ${relDest}
34771
+ console.log(chalk214.bold(`Extract: ${functionName} \u2192 ${relDest}
34685
34772
  `));
34686
- console.log(` ${chalk213.cyan("Functions to move:")}`);
34773
+ console.log(` ${chalk214.cyan("Functions to move:")}`);
34687
34774
  for (const name of plan2.extractedNames) {
34688
34775
  console.log(` ${name}`);
34689
34776
  }
@@ -34717,7 +34804,7 @@ function displayPlan(functionName, relDest, plan2, cwd) {
34717
34804
 
34718
34805
  // src/commands/refactor/extract/loadProjectFile.ts
34719
34806
  import path54 from "path";
34720
- import chalk214 from "chalk";
34807
+ import chalk215 from "chalk";
34721
34808
  import { Project as Project3 } from "ts-morph";
34722
34809
 
34723
34810
  // src/commands/refactor/extract/findTsConfig.ts
@@ -34809,7 +34896,7 @@ function loadProjectFile(file) {
34809
34896
  });
34810
34897
  const sourceFile = project.getSourceFile(sourcePath);
34811
34898
  if (!sourceFile) {
34812
- console.log(chalk214.red(`File not found in project: ${file}`));
34899
+ console.log(chalk215.red(`File not found in project: ${file}`));
34813
34900
  process.exit(1);
34814
34901
  }
34815
34902
  return { project, sourceFile };
@@ -34832,19 +34919,19 @@ async function extract(file, functionName, destination, options2 = {}) {
34832
34919
  displayPlan(functionName, relDest, plan2, cwd);
34833
34920
  if (options2.apply) {
34834
34921
  await applyExtraction(functionName, sourceFile, destPath, plan2, project);
34835
- console.log(chalk215.green("\nExtraction complete"));
34922
+ console.log(chalk216.green("\nExtraction complete"));
34836
34923
  } else {
34837
- console.log(chalk215.dim("\nDry run. Use --apply to execute."));
34924
+ console.log(chalk216.dim("\nDry run. Use --apply to execute."));
34838
34925
  }
34839
34926
  }
34840
34927
 
34841
34928
  // src/commands/refactor/ignore.ts
34842
34929
  import fs32 from "fs";
34843
- import chalk216 from "chalk";
34930
+ import chalk217 from "chalk";
34844
34931
  var REFACTOR_YML_PATH2 = "refactor.yml";
34845
34932
  function ignore2(file) {
34846
34933
  if (!fs32.existsSync(file)) {
34847
- console.error(chalk216.red(`Error: File does not exist: ${file}`));
34934
+ console.error(chalk217.red(`Error: File does not exist: ${file}`));
34848
34935
  process.exit(1);
34849
34936
  }
34850
34937
  const content = fs32.readFileSync(file, "utf8");
@@ -34860,7 +34947,7 @@ function ignore2(file) {
34860
34947
  fs32.writeFileSync(REFACTOR_YML_PATH2, entry);
34861
34948
  }
34862
34949
  console.log(
34863
- chalk216.green(
34950
+ chalk217.green(
34864
34951
  `Added ${file} to refactor ignore list (max ${maxLines} lines)`
34865
34952
  )
34866
34953
  );
@@ -34869,12 +34956,12 @@ function ignore2(file) {
34869
34956
  // src/commands/refactor/rename.ts
34870
34957
  import fs35 from "fs";
34871
34958
  import path61 from "path";
34872
- import chalk219 from "chalk";
34959
+ import chalk220 from "chalk";
34873
34960
 
34874
34961
  // src/commands/refactor/rename/applyRename.ts
34875
34962
  import fs34 from "fs";
34876
34963
  import path57 from "path";
34877
- import chalk217 from "chalk";
34964
+ import chalk218 from "chalk";
34878
34965
 
34879
34966
  // src/commands/refactor/restructure/computeRewrites.ts
34880
34967
  import path56 from "path";
@@ -34980,13 +35067,13 @@ function applyRename(rewrites, sourcePath, destPath, cwd) {
34980
35067
  const updatedContents = applyRewrites(rewrites);
34981
35068
  for (const [file, content] of updatedContents) {
34982
35069
  fs34.writeFileSync(file, content, "utf8");
34983
- console.log(chalk217.cyan(` Updated imports in ${path57.relative(cwd, file)}`));
35070
+ console.log(chalk218.cyan(` Updated imports in ${path57.relative(cwd, file)}`));
34984
35071
  }
34985
35072
  const destDir = path57.dirname(destPath);
34986
35073
  if (!fs34.existsSync(destDir)) fs34.mkdirSync(destDir, { recursive: true });
34987
35074
  fs34.renameSync(sourcePath, destPath);
34988
35075
  console.log(
34989
- chalk217.white(
35076
+ chalk218.white(
34990
35077
  ` Moved ${path57.relative(cwd, sourcePath)} \u2192 ${path57.relative(cwd, destPath)}`
34991
35078
  )
34992
35079
  );
@@ -35136,16 +35223,16 @@ function computeRenameRewrites(sourcePath, destPath) {
35136
35223
 
35137
35224
  // src/commands/refactor/rename/printRenamePreview.ts
35138
35225
  import path60 from "path";
35139
- import chalk218 from "chalk";
35226
+ import chalk219 from "chalk";
35140
35227
  function printRenamePreview(rewrites, cwd) {
35141
35228
  for (const rewrite of rewrites) {
35142
35229
  console.log(
35143
- chalk218.dim(
35230
+ chalk219.dim(
35144
35231
  ` ${path60.relative(cwd, rewrite.file)}: ${rewrite.oldSpecifier} \u2192 ${rewrite.newSpecifier}`
35145
35232
  )
35146
35233
  );
35147
35234
  }
35148
- console.log(chalk218.dim("Dry run. Use --apply to execute."));
35235
+ console.log(chalk219.dim("Dry run. Use --apply to execute."));
35149
35236
  }
35150
35237
 
35151
35238
  // src/commands/refactor/rename.ts
@@ -35156,20 +35243,20 @@ async function rename(source, destination, options2 = {}) {
35156
35243
  const relSource = path61.relative(cwd, sourcePath);
35157
35244
  const relDest = path61.relative(cwd, destPath);
35158
35245
  if (!fs35.existsSync(sourcePath)) {
35159
- console.log(chalk219.red(`File not found: ${source}`));
35246
+ console.log(chalk220.red(`File not found: ${source}`));
35160
35247
  process.exit(1);
35161
35248
  }
35162
35249
  if (destPath !== sourcePath && fs35.existsSync(destPath)) {
35163
- console.log(chalk219.red(`Destination already exists: ${destination}`));
35250
+ console.log(chalk220.red(`Destination already exists: ${destination}`));
35164
35251
  process.exit(1);
35165
35252
  }
35166
- console.log(chalk219.bold(`Rename: ${relSource} \u2192 ${relDest}`));
35167
- console.log(chalk219.dim("Loading project..."));
35168
- console.log(chalk219.dim("Scanning imports across the project..."));
35253
+ console.log(chalk220.bold(`Rename: ${relSource} \u2192 ${relDest}`));
35254
+ console.log(chalk220.dim("Loading project..."));
35255
+ console.log(chalk220.dim("Scanning imports across the project..."));
35169
35256
  const rewrites = computeRenameRewrites(sourcePath, destPath);
35170
35257
  const affectedFiles = new Set(rewrites.map((r) => r.file)).size;
35171
35258
  console.log(
35172
- chalk219.dim(
35259
+ chalk220.dim(
35173
35260
  `${rewrites.length} import path(s) to update across ${affectedFiles} file(s)`
35174
35261
  )
35175
35262
  );
@@ -35178,11 +35265,11 @@ async function rename(source, destination, options2 = {}) {
35178
35265
  return;
35179
35266
  }
35180
35267
  applyRename(rewrites, sourcePath, destPath, cwd);
35181
- console.log(chalk219.green("Done"));
35268
+ console.log(chalk220.green("Done"));
35182
35269
  }
35183
35270
 
35184
35271
  // src/commands/refactor/renameSymbol.ts
35185
- import chalk220 from "chalk";
35272
+ import chalk221 from "chalk";
35186
35273
 
35187
35274
  // src/commands/refactor/renameSymbol/findSymbol.ts
35188
35275
  import { SyntaxKind as SyntaxKind15 } from "ts-morph";
@@ -35228,34 +35315,34 @@ async function renameSymbol(file, oldName, newName, options2 = {}) {
35228
35315
  const { project, sourceFile } = loadProjectFile(file);
35229
35316
  const symbol = findSymbol(sourceFile, oldName);
35230
35317
  if (!symbol) {
35231
- console.log(chalk220.red(`Symbol "${oldName}" not found in ${file}`));
35318
+ console.log(chalk221.red(`Symbol "${oldName}" not found in ${file}`));
35232
35319
  process.exit(1);
35233
35320
  }
35234
35321
  const grouped = groupReferences(symbol, cwd);
35235
35322
  const totalRefs = [...grouped.values()].reduce((s, l) => s + l.length, 0);
35236
35323
  console.log(
35237
- chalk220.bold(`Rename: ${oldName} \u2192 ${newName} (${totalRefs} references)
35324
+ chalk221.bold(`Rename: ${oldName} \u2192 ${newName} (${totalRefs} references)
35238
35325
  `)
35239
35326
  );
35240
35327
  for (const [refFile, lines2] of grouped) {
35241
35328
  console.log(
35242
- ` ${chalk220.dim(refFile)}: lines ${chalk220.cyan(lines2.join(", "))}`
35329
+ ` ${chalk221.dim(refFile)}: lines ${chalk221.cyan(lines2.join(", "))}`
35243
35330
  );
35244
35331
  }
35245
35332
  if (options2.apply) {
35246
35333
  symbol.rename(newName);
35247
35334
  await project.save();
35248
- console.log(chalk220.green(`
35335
+ console.log(chalk221.green(`
35249
35336
  Renamed ${oldName} \u2192 ${newName}`));
35250
35337
  } else {
35251
- console.log(chalk220.dim("\nDry run. Use --apply to execute."));
35338
+ console.log(chalk221.dim("\nDry run. Use --apply to execute."));
35252
35339
  }
35253
35340
  }
35254
35341
 
35255
35342
  // src/commands/refactor/restructure.ts
35256
35343
  import fs37 from "fs";
35257
35344
  import path82 from "path";
35258
- import chalk230 from "chalk";
35345
+ import chalk231 from "chalk";
35259
35346
 
35260
35347
  // src/commands/refactor/restructure/buildPlan.ts
35261
35348
  import path72 from "path";
@@ -35592,7 +35679,7 @@ function buildPlan3(scopeRoot, files, ignored = [], pinnedModules = []) {
35592
35679
  }
35593
35680
 
35594
35681
  // src/commands/refactor/restructure/checkPlan.ts
35595
- import chalk225 from "chalk";
35682
+ import chalk226 from "chalk";
35596
35683
 
35597
35684
  // src/commands/refactor/restructure/applyCommand.ts
35598
35685
  import path73 from "path";
@@ -35603,13 +35690,13 @@ function applyCommand(scopeRoot) {
35603
35690
 
35604
35691
  // src/commands/refactor/restructure/displayDrift.ts
35605
35692
  import path74 from "path";
35606
- import chalk221 from "chalk";
35693
+ import chalk222 from "chalk";
35607
35694
  var shownMoves = 20;
35608
35695
  function displayDrift(plan2, listMoves) {
35609
35696
  const rel = (file) => path74.relative(process.cwd(), file);
35610
35697
  if (plan2.moves.length > 0) {
35611
35698
  console.log(
35612
- chalk221.red(
35699
+ chalk222.red(
35613
35700
  `${plan2.moves.length} file(s) drift from the plan${listMoves ? ":" : "."}`
35614
35701
  )
35615
35702
  );
@@ -35617,17 +35704,17 @@ function displayDrift(plan2, listMoves) {
35617
35704
  for (const move2 of plan2.moves.slice(0, shownMoves))
35618
35705
  console.log(` ${rel(move2.from)} \u2192 ${rel(move2.to)}`);
35619
35706
  if (plan2.moves.length > shownMoves)
35620
- console.log(chalk221.dim(` \u2026and ${plan2.moves.length - shownMoves} more`));
35707
+ console.log(chalk222.dim(` \u2026and ${plan2.moves.length - shownMoves} more`));
35621
35708
  }
35622
35709
  }
35623
- for (const error of plan2.errors) console.log(chalk221.red(error));
35710
+ for (const error of plan2.errors) console.log(chalk222.red(error));
35624
35711
  }
35625
35712
 
35626
35713
  // src/commands/refactor/restructure/displayLayoutLimits.ts
35627
- import chalk224 from "chalk";
35714
+ import chalk225 from "chalk";
35628
35715
 
35629
35716
  // src/commands/refactor/restructure/displayDeepChains.ts
35630
- import chalk222 from "chalk";
35717
+ import chalk223 from "chalk";
35631
35718
  var shownChains = 10;
35632
35719
  function formatChain(chain2) {
35633
35720
  const folders = chain2.folders.map((f) => `${f.name} (${f.files})`).join(" > ");
@@ -35637,28 +35724,28 @@ function displayDeepChains(chains, maxDepth) {
35637
35724
  if (chains.length === 0) return;
35638
35725
  const tooDeep = chains.reduce((sum3, c) => sum3 + c.tooDeep, 0);
35639
35726
  console.log(
35640
- chalk222.red(
35727
+ chalk223.red(
35641
35728
  `
35642
35729
  Plan exceeds restructure.maxDepth ${maxDepth}: ${tooDeep} file(s) deeper.`
35643
35730
  )
35644
35731
  );
35645
35732
  console.log(
35646
- chalk222.bold(
35733
+ chalk223.bold(
35647
35734
  "Deep chains, as folder (files beneath), most files too deep first:"
35648
35735
  )
35649
35736
  );
35650
35737
  for (const chain2 of chains.slice(0, shownChains))
35651
35738
  console.log(formatChain(chain2));
35652
35739
  if (chains.length > shownChains)
35653
- console.log(chalk222.dim(` \u2026and ${chains.length - shownChains} more`));
35740
+ console.log(chalk223.dim(` \u2026and ${chains.length - shownChains} more`));
35654
35741
  }
35655
35742
 
35656
35743
  // src/commands/refactor/restructure/displayLongPaths.ts
35657
- import chalk223 from "chalk";
35744
+ import chalk224 from "chalk";
35658
35745
  function displayLongPaths(longPaths, maxPathLength) {
35659
35746
  if (longPaths.length === 0) return;
35660
35747
  console.log(
35661
- chalk223.red(
35748
+ chalk224.red(
35662
35749
  `
35663
35750
  Plan exceeds restructure.maxPathLength ${maxPathLength}: ${longPaths.length} repo-relative path(s) longer.`
35664
35751
  )
@@ -35686,7 +35773,7 @@ function displayLayoutLimits(limits, apply) {
35686
35773
  displayDeepChains(limits.chains, limits.maxDepth);
35687
35774
  displayLongPaths(limits.longPaths, limits.maxPathLength);
35688
35775
  console.log("");
35689
- for (const line of pinSteps(apply)) console.log(chalk224.yellow(line));
35776
+ for (const line of pinSteps(apply)) console.log(chalk225.yellow(line));
35690
35777
  }
35691
35778
 
35692
35779
  // src/commands/refactor/restructure/checkPlan.ts
@@ -35698,14 +35785,14 @@ function checkPlan(plan2, limits) {
35698
35785
  if (exceeds || plan2.errors.length > 0) process.exit(1);
35699
35786
  if (plan2.moves.length > 0) {
35700
35787
  console.log(
35701
- chalk225.yellow(
35788
+ chalk226.yellow(
35702
35789
  `
35703
35790
  Run \`${apply}\` to move the files and rewrite their imports.`
35704
35791
  )
35705
35792
  );
35706
35793
  process.exit(1);
35707
35794
  }
35708
- console.log(chalk225.green("Layout matches the restructure plan"));
35795
+ console.log(chalk226.green("Layout matches the restructure plan"));
35709
35796
  }
35710
35797
 
35711
35798
  // src/commands/refactor/restructure/findDeepChains.ts
@@ -35775,15 +35862,15 @@ function partitionIgnored(files) {
35775
35862
  }
35776
35863
 
35777
35864
  // src/commands/refactor/restructure/runPlan.ts
35778
- import chalk229 from "chalk";
35865
+ import chalk230 from "chalk";
35779
35866
 
35780
35867
  // src/commands/refactor/restructure/applyPlan.ts
35781
- import chalk227 from "chalk";
35868
+ import chalk228 from "chalk";
35782
35869
 
35783
35870
  // src/commands/refactor/restructure/executePlan.ts
35784
35871
  import fs36 from "fs";
35785
35872
  import path78 from "path";
35786
- import chalk226 from "chalk";
35873
+ import chalk227 from "chalk";
35787
35874
  function relPath(file) {
35788
35875
  return path78.relative(process.cwd(), file);
35789
35876
  }
@@ -35800,14 +35887,14 @@ function moveFiles(moves) {
35800
35887
  fs36.mkdirSync(path78.dirname(move2.to), { recursive: true });
35801
35888
  fs36.renameSync(staging, move2.to);
35802
35889
  console.log(
35803
- chalk226.white(` Moved ${relPath(move2.from)} \u2192 ${relPath(move2.to)}`)
35890
+ chalk227.white(` Moved ${relPath(move2.from)} \u2192 ${relPath(move2.to)}`)
35804
35891
  );
35805
35892
  }
35806
35893
  }
35807
35894
  function removeIfEmpty(dir) {
35808
35895
  if (!fs36.existsSync(dir) || fs36.readdirSync(dir).length > 0) return false;
35809
35896
  fs36.rmdirSync(dir);
35810
- console.log(chalk226.dim(` Removed empty directory ${relPath(dir)}`));
35897
+ console.log(chalk227.dim(` Removed empty directory ${relPath(dir)}`));
35811
35898
  return true;
35812
35899
  }
35813
35900
  function removeEmptyDirectories(dirs, scopeRoot) {
@@ -35820,7 +35907,7 @@ function removeEmptyDirectories(dirs, scopeRoot) {
35820
35907
  function executePlan(plan2) {
35821
35908
  for (const [file, content] of applyRewrites(plan2.rewrites)) {
35822
35909
  fs36.writeFileSync(file, content, "utf8");
35823
- console.log(chalk226.cyan(` Rewrote imports in ${relPath(file)}`));
35910
+ console.log(chalk227.cyan(` Rewrote imports in ${relPath(file)}`));
35824
35911
  }
35825
35912
  moveFiles(plan2.moves);
35826
35913
  removeEmptyDirectories(
@@ -35832,17 +35919,17 @@ function executePlan(plan2) {
35832
35919
  // src/commands/refactor/restructure/applyPlan.ts
35833
35920
  function applyPlan(plan2) {
35834
35921
  if (plan2.errors.length > 0) {
35835
- console.log(chalk227.red("\nResolve the errors above before applying."));
35922
+ console.log(chalk228.red("\nResolve the errors above before applying."));
35836
35923
  process.exit(1);
35837
35924
  }
35838
- console.log(chalk227.bold("\nApplying changes..."));
35925
+ console.log(chalk228.bold("\nApplying changes..."));
35839
35926
  executePlan(plan2);
35840
- console.log(chalk227.green("\nRestructuring complete"));
35927
+ console.log(chalk228.green("\nRestructuring complete"));
35841
35928
  }
35842
35929
 
35843
35930
  // src/commands/refactor/restructure/displayPlan.ts
35844
35931
  import path81 from "path";
35845
- import chalk228 from "chalk";
35932
+ import chalk229 from "chalk";
35846
35933
 
35847
35934
  // src/commands/refactor/restructure/computeDepthStats.ts
35848
35935
  import path79 from "path";
@@ -35893,17 +35980,17 @@ function relPath2(filePath) {
35893
35980
  }
35894
35981
  function displayMoves(plan2) {
35895
35982
  if (plan2.moves.length === 0) return;
35896
- console.log(chalk228.bold("\nFile moves:"));
35983
+ console.log(chalk229.bold("\nFile moves:"));
35897
35984
  for (const move2 of plan2.moves) {
35898
35985
  console.log(
35899
- ` ${chalk228.red(relPath2(move2.from))} \u2192 ${chalk228.green(relPath2(move2.to))}`
35986
+ ` ${chalk229.red(relPath2(move2.from))} \u2192 ${chalk229.green(relPath2(move2.to))}`
35900
35987
  );
35901
- console.log(chalk228.dim(` ${move2.reason}`));
35988
+ console.log(chalk229.dim(` ${move2.reason}`));
35902
35989
  }
35903
35990
  }
35904
35991
  function displayTree(plan2) {
35905
35992
  console.log(
35906
- chalk228.bold(`
35993
+ chalk229.bold(`
35907
35994
  Resulting tree (${relPath2(plan2.scopeRoot) || "."}/):`)
35908
35995
  );
35909
35996
  for (const line of formatTree(plan2.targets.values(), plan2.scopeRoot))
@@ -35914,15 +36001,15 @@ function displayDepthStats(plan2) {
35914
36001
  plan2.targets.values(),
35915
36002
  plan2.scopeRoot
35916
36003
  );
35917
- console.log(chalk228.bold(`
36004
+ console.log(chalk229.bold(`
35918
36005
  Depth (max ${max}):`));
35919
36006
  for (const depth of [...distribution.keys()].sort((a, b) => a - b))
35920
36007
  console.log(` ${depth}: ${distribution.get(depth)} file(s)`);
35921
36008
  }
35922
36009
  function displayErrors(errors) {
35923
36010
  if (errors.length === 0) return;
35924
- console.log(chalk228.red("\nErrors:"));
35925
- for (const error of errors) console.log(chalk228.red(` ${error}`));
36011
+ console.log(chalk229.red("\nErrors:"));
36012
+ for (const error of errors) console.log(chalk229.red(` ${error}`));
35926
36013
  }
35927
36014
  function displayPlan2(plan2) {
35928
36015
  displayMoves(plan2);
@@ -35931,7 +36018,7 @@ function displayPlan2(plan2) {
35931
36018
  displayErrors(plan2.errors);
35932
36019
  const rewrittenFiles = new Set(plan2.rewrites.map((r) => r.file)).size;
35933
36020
  console.log(
35934
- chalk228.dim(
36021
+ chalk229.dim(
35935
36022
  `
35936
36023
  Summary: ${plan2.moves.length} file(s) moved, ${plan2.rewrites.length} imports rewritten across ${rewrittenFiles} file(s), ${plan2.errors.length} error(s)`
35937
36024
  )
@@ -35943,11 +36030,11 @@ function runPlan(plan2, limits, apply) {
35943
36030
  displayPlan2(plan2);
35944
36031
  displayLayoutLimits(limits, applyCommand(plan2.scopeRoot));
35945
36032
  if (plan2.moves.length === 0 && plan2.errors.length === 0) {
35946
- console.log(chalk229.green("No restructuring needed"));
36033
+ console.log(chalk230.green("No restructuring needed"));
35947
36034
  return;
35948
36035
  }
35949
36036
  if (!apply) {
35950
- console.log(chalk229.dim("\nDry run. Use --apply to execute."));
36037
+ console.log(chalk230.dim("\nDry run. Use --apply to execute."));
35951
36038
  return;
35952
36039
  }
35953
36040
  applyPlan(plan2);
@@ -35957,14 +36044,14 @@ function runPlan(plan2, limits, apply) {
35957
36044
  async function restructure(root2, options2 = {}) {
35958
36045
  const scopeRoot = path82.resolve(root2 ?? "src");
35959
36046
  if (!fs37.existsSync(scopeRoot) || !fs37.statSync(scopeRoot).isDirectory()) {
35960
- console.log(chalk230.red(`Not a directory: ${root2 ?? "src"}`));
36047
+ console.log(chalk231.red(`Not a directory: ${root2 ?? "src"}`));
35961
36048
  process.exit(1);
35962
36049
  }
35963
36050
  const found = [];
35964
36051
  walkSourceFiles(scopeRoot, found);
35965
36052
  const { scoped, ignored } = partitionIgnored(found);
35966
36053
  if (scoped.length === 0) {
35967
- console.log(chalk230.yellow("No files found under root"));
36054
+ console.log(chalk231.yellow("No files found under root"));
35968
36055
  return;
35969
36056
  }
35970
36057
  const {
@@ -36035,7 +36122,7 @@ async function checkoutPrSession(number, prompt = "") {
36035
36122
  }
36036
36123
 
36037
36124
  // src/commands/review/highLevel/configureHighLevelReview.ts
36038
- import chalk234 from "chalk";
36125
+ import chalk235 from "chalk";
36039
36126
 
36040
36127
  // src/commands/config/promptConfigScope.ts
36041
36128
  import Enquirer3 from "enquirer";
@@ -36061,7 +36148,7 @@ async function promptConfigScope() {
36061
36148
  }
36062
36149
 
36063
36150
  // src/commands/config/resolveConfigKeyAnswer.ts
36064
- import chalk231 from "chalk";
36151
+ import chalk232 from "chalk";
36065
36152
  async function resolveConfigKeyAnswer(question, supplied) {
36066
36153
  if (supplied !== void 0) return coerceSupplied(question.key, supplied);
36067
36154
  for (; ; ) {
@@ -36069,7 +36156,7 @@ async function resolveConfigKeyAnswer(question, supplied) {
36069
36156
  if (answer === "") return void 0;
36070
36157
  const coercion = coerceCliConfigValue(question.key, answer);
36071
36158
  if (coercion.ok) return coercion.value;
36072
- console.error(chalk231.red(coercion.error));
36159
+ console.error(chalk232.red(coercion.error));
36073
36160
  }
36074
36161
  }
36075
36162
  function coerceSupplied(key, supplied) {
@@ -36149,7 +36236,7 @@ function suggestGlobs(current, proposed) {
36149
36236
  }
36150
36237
 
36151
36238
  // src/commands/review/highLevel/parseConfigureAnswers.ts
36152
- import chalk232 from "chalk";
36239
+ import chalk233 from "chalk";
36153
36240
  function parseConfigureAnswers(answers) {
36154
36241
  const known = Object.values(highLevelConfigKeys);
36155
36242
  const parsed = {};
@@ -36167,13 +36254,13 @@ function answersCoverEveryKey(answers) {
36167
36254
  return Object.values(highLevelConfigKeys).every((key) => key in answers);
36168
36255
  }
36169
36256
  function exitWith(message3) {
36170
- console.error(chalk232.red(`Error: ${message3}.`));
36257
+ console.error(chalk233.red(`Error: ${message3}.`));
36171
36258
  process.exit(1);
36172
36259
  }
36173
36260
 
36174
36261
  // src/commands/review/highLevel/proposeHighLevelGlobs.ts
36175
36262
  import { execFileSync as execFileSync28 } from "child_process";
36176
- import chalk233 from "chalk";
36263
+ import chalk234 from "chalk";
36177
36264
 
36178
36265
  // src/commands/review/highLevel/buildGlobProposalPrompt.ts
36179
36266
  function buildGlobProposalPrompt(tree) {
@@ -36222,7 +36309,7 @@ function readGlobs(value) {
36222
36309
 
36223
36310
  // src/commands/review/highLevel/summariseRepoTree.ts
36224
36311
  import { execFileSync as execFileSync27 } from "child_process";
36225
- import { dirname as dirname38, extname as extname6 } from "path";
36312
+ import { dirname as dirname39, extname as extname6 } from "path";
36226
36313
  var MAX_DIRECTORIES = 200;
36227
36314
  var MAX_EXTENSIONS_PER_DIRECTORY = 6;
36228
36315
  function summariseRepoTree(cwd = process.cwd()) {
@@ -36249,7 +36336,7 @@ function listTrackedFiles(cwd) {
36249
36336
  function countByDirectory(files) {
36250
36337
  const directories = /* @__PURE__ */ new Map();
36251
36338
  for (const file of files) {
36252
- const directory = dirname38(file) === "." ? "(repo root)" : dirname38(file);
36339
+ const directory = dirname39(file) === "." ? "(repo root)" : dirname39(file);
36253
36340
  const extensions = directories.get(directory) ?? /* @__PURE__ */ new Map();
36254
36341
  const extension2 = extname6(file) === "" ? "(no extension)" : extname6(file);
36255
36342
  extensions.set(extension2, (extensions.get(extension2) ?? 0) + 1);
@@ -36267,12 +36354,12 @@ function proposeHighLevelGlobs(cwd = process.cwd()) {
36267
36354
  const tree = summariseRepoTree(cwd);
36268
36355
  if (tree === "") return NOTHING_PROPOSED;
36269
36356
  console.log(
36270
- chalk233.dim("Asking Claude to propose globs from the repo's own tree...")
36357
+ chalk234.dim("Asking Claude to propose globs from the repo's own tree...")
36271
36358
  );
36272
36359
  const output = askClaude(buildGlobProposalPrompt(tree), cwd);
36273
36360
  if (output === void 0) {
36274
36361
  console.log(
36275
- chalk233.yellow(
36362
+ chalk234.yellow(
36276
36363
  "Claude proposed nothing; answer each key from its current value."
36277
36364
  )
36278
36365
  );
@@ -36336,14 +36423,14 @@ function asConfigKeyScope(value) {
36336
36423
  function reportConfigured(result) {
36337
36424
  for (const write of result.written)
36338
36425
  console.log(
36339
- chalk234.green(`Set ${write.key} = ${JSON.stringify(write.value)}`)
36426
+ chalk235.green(`Set ${write.key} = ${JSON.stringify(write.value)}`)
36340
36427
  );
36341
- for (const key of result.skipped) console.log(chalk234.dim(`Left ${key} unset`));
36342
- console.log(chalk234.dim(`Written to ${result.target}`));
36428
+ for (const key of result.skipped) console.log(chalk235.dim(`Left ${key} unset`));
36429
+ console.log(chalk235.dim(`Written to ${result.target}`));
36343
36430
  }
36344
36431
 
36345
36432
  // src/commands/review/highLevel/announceSavedReview.ts
36346
- import chalk235 from "chalk";
36433
+ import chalk236 from "chalk";
36347
36434
  function savedMessage(subject) {
36348
36435
  const head = subject.headSha.slice(0, 7);
36349
36436
  if (subject.draft)
@@ -36354,10 +36441,10 @@ function savedMessage(subject) {
36354
36441
  }
36355
36442
  function announceSavedReview(subject, force) {
36356
36443
  const message3 = savedMessage(subject);
36357
- if (message3) console.log(chalk235.dim(message3));
36444
+ if (message3) console.log(chalk236.dim(message3));
36358
36445
  else if (force)
36359
36446
  console.log(
36360
- chalk235.dim(
36447
+ chalk236.dim(
36361
36448
  `Discarding any review saved for ${subject.headSha.slice(0, 7)} and starting fresh (--force).`
36362
36449
  )
36363
36450
  );
@@ -36982,12 +37069,12 @@ function fetchHighLevelPr(prNumber, repo) {
36982
37069
  }
36983
37070
 
36984
37071
  // src/commands/review/highLevel/highLevelReviewPath.ts
36985
- import { join as join84 } from "path";
37072
+ import { join as join85 } from "path";
36986
37073
  function slug(value) {
36987
37074
  return value.replace(/[^\w.-]+/g, "-");
36988
37075
  }
36989
37076
  function highLevelReviewPath(repo, headRef, headSha) {
36990
- return join84(
37077
+ return join85(
36991
37078
  getStoreDir(),
36992
37079
  "high-level-reviews",
36993
37080
  slug(repo),
@@ -37159,11 +37246,11 @@ function clearHighLevelDraft(repo, headRef, headSha) {
37159
37246
  }
37160
37247
 
37161
37248
  // src/commands/review/highLevel/writeJsonFile.ts
37162
- import { mkdirSync as mkdirSync24, writeFileSync as writeFileSync39 } from "fs";
37163
- import { dirname as dirname39 } from "path";
37249
+ import { mkdirSync as mkdirSync25, writeFileSync as writeFileSync40 } from "fs";
37250
+ import { dirname as dirname40 } from "path";
37164
37251
  function writeJsonFile(path108, data) {
37165
- mkdirSync24(dirname39(path108), { recursive: true });
37166
- writeFileSync39(path108, `${JSON.stringify(data, null, 2)}
37252
+ mkdirSync25(dirname40(path108), { recursive: true });
37253
+ writeFileSync40(path108, `${JSON.stringify(data, null, 2)}
37167
37254
  `);
37168
37255
  return path108;
37169
37256
  }
@@ -37452,55 +37539,55 @@ async function openHighLevelOverlay(sessionId, subject) {
37452
37539
  }
37453
37540
 
37454
37541
  // src/commands/review/highLevel/printHighLevelChecklist.ts
37455
- import chalk240 from "chalk";
37542
+ import chalk241 from "chalk";
37456
37543
 
37457
37544
  // src/commands/review/highLevel/formatCriticalDiffs.ts
37458
- import chalk236 from "chalk";
37545
+ import chalk237 from "chalk";
37459
37546
  var PATCH_LINE_COLOURS = {
37460
- "+": chalk236.green,
37461
- "-": chalk236.red,
37462
- "@": chalk236.cyan
37547
+ "+": chalk237.green,
37548
+ "-": chalk237.red,
37549
+ "@": chalk237.cyan
37463
37550
  };
37464
37551
  function formatPatch(patch2) {
37465
37552
  return patch2.split("\n").map(
37466
- (line) => ` ${(PATCH_LINE_COLOURS[line[0] ?? ""] ?? chalk236.dim)(line)}`
37553
+ (line) => ` ${(PATCH_LINE_COLOURS[line[0] ?? ""] ?? chalk237.dim)(line)}`
37467
37554
  );
37468
37555
  }
37469
37556
  function formatDiff(diff3) {
37470
37557
  return [
37471
37558
  "",
37472
- ` ${chalk236.bold(diff3.path)} ${chalk236.dim(`(${diff3.status})`)} ${chalk236.green(`+${diff3.additions}`)} ${chalk236.red(`-${diff3.deletions}`)}`,
37473
- ...diff3.patch === null ? [` ${chalk236.dim(`no diff available; see ${diff3.diffUrl}`)}`] : formatPatch(diff3.patch)
37559
+ ` ${chalk237.bold(diff3.path)} ${chalk237.dim(`(${diff3.status})`)} ${chalk237.green(`+${diff3.additions}`)} ${chalk237.red(`-${diff3.deletions}`)}`,
37560
+ ...diff3.patch === null ? [` ${chalk237.dim(`no diff available; see ${diff3.diffUrl}`)}`] : formatPatch(diff3.patch)
37474
37561
  ];
37475
37562
  }
37476
37563
  function formatCriticalDiffs(diffs, criticalPaths) {
37477
37564
  if (criticalPaths.length === 0)
37478
- return `${chalk236.bold.underline("Critical diffs")}
37479
- ${chalk236.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
37565
+ return `${chalk237.bold.underline("Critical diffs")}
37566
+ ${chalk237.dim("review.highLevel.criticalPaths is empty, so no diffs are shown")}`;
37480
37567
  if (diffs.length === 0)
37481
- return `${chalk236.bold.underline("Critical diffs")}
37482
- ${chalk236.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
37568
+ return `${chalk237.bold.underline("Critical diffs")}
37569
+ ${chalk237.dim(`no changed file matches ${criticalPaths.join(", ")}`)}`;
37483
37570
  return [
37484
- chalk236.bold.underline("Critical diffs"),
37571
+ chalk237.bold.underline("Critical diffs"),
37485
37572
  ...diffs.flatMap(formatDiff)
37486
37573
  ].join("\n");
37487
37574
  }
37488
37575
 
37489
37576
  // src/commands/review/highLevel/formatHighLevelChecklist.ts
37490
- import chalk237 from "chalk";
37577
+ import chalk238 from "chalk";
37491
37578
  var MARKERS = {
37492
- pass: () => chalk237.green("\u2714"),
37493
- fail: () => chalk237.red("\u2718"),
37494
- manual: () => chalk237.yellow("\u25A1")
37579
+ pass: () => chalk238.green("\u2714"),
37580
+ fail: () => chalk238.red("\u2718"),
37581
+ manual: () => chalk238.yellow("\u25A1")
37495
37582
  };
37496
37583
  function formatCheck(check2) {
37497
- const title = check2.status === "fail" ? chalk237.red(check2.title) : chalk237.bold(check2.title);
37584
+ const title = check2.status === "fail" ? chalk238.red(check2.title) : chalk238.bold(check2.title);
37498
37585
  return ` ${MARKERS[check2.status]()} ${title}
37499
- ${chalk237.dim(check2.reason)}`;
37586
+ ${chalk238.dim(check2.reason)}`;
37500
37587
  }
37501
37588
  function formatGroup(heading2, checks2) {
37502
37589
  if (checks2.length === 0) return [];
37503
- return ["", chalk237.bold.underline(heading2), ...checks2.map(formatCheck)];
37590
+ return ["", chalk238.bold.underline(heading2), ...checks2.map(formatCheck)];
37504
37591
  }
37505
37592
  function formatHighLevelChecklist(checks2) {
37506
37593
  const deterministic = checks2.filter(
@@ -37509,7 +37596,7 @@ function formatHighLevelChecklist(checks2) {
37509
37596
  const failed3 = deterministic.filter(
37510
37597
  (check2) => check2.status === "fail"
37511
37598
  ).length;
37512
- const summary = failed3 === 0 ? chalk237.green(`All ${deterministic.length} deterministic checks pass`) : chalk237.red(
37599
+ const summary = failed3 === 0 ? chalk238.green(`All ${deterministic.length} deterministic checks pass`) : chalk238.red(
37513
37600
  `${failed3} of ${deterministic.length} deterministic checks fail`
37514
37601
  );
37515
37602
  return [
@@ -37524,37 +37611,37 @@ function formatHighLevelChecklist(checks2) {
37524
37611
  }
37525
37612
 
37526
37613
  // src/commands/review/highLevel/formatHighLevelStructure.ts
37527
- import chalk238 from "chalk";
37614
+ import chalk239 from "chalk";
37528
37615
  var STATUS_MARKERS = {
37529
- added: () => chalk238.green("A"),
37530
- removed: () => chalk238.red("D"),
37531
- modified: () => chalk238.yellow("M")
37616
+ added: () => chalk239.green("A"),
37617
+ removed: () => chalk239.red("D"),
37618
+ modified: () => chalk239.yellow("M")
37532
37619
  };
37533
37620
  function counts(additions, deletions) {
37534
- return `${chalk238.green(`+${additions}`)} ${chalk238.red(`-${deletions}`)}`;
37621
+ return `${chalk239.green(`+${additions}`)} ${chalk239.red(`-${deletions}`)}`;
37535
37622
  }
37536
37623
  function formatNode(node, indent3) {
37537
37624
  if (node.kind === "file")
37538
37625
  return [
37539
- `${indent3}${STATUS_MARKERS[node.status]()} ${node.name} ${chalk238.dim(counts(node.additions, node.deletions))}`
37626
+ `${indent3}${STATUS_MARKERS[node.status]()} ${node.name} ${chalk239.dim(counts(node.additions, node.deletions))}`
37540
37627
  ];
37541
37628
  const dir = node;
37542
37629
  return [
37543
- `${indent3}${chalk238.bold(`${dir.name}/`)} ${chalk238.dim(counts(dir.additions, dir.deletions))}`,
37630
+ `${indent3}${chalk239.bold(`${dir.name}/`)} ${chalk239.dim(counts(dir.additions, dir.deletions))}`,
37544
37631
  ...dir.children.flatMap((child) => formatNode(child, `${indent3} `))
37545
37632
  ];
37546
37633
  }
37547
37634
  function formatHighLevelStructure(structure) {
37548
37635
  const summary = `${structure.added} added \xB7 ${structure.removed} deleted \xB7 ${structure.modified} modified \xB7 ${counts(structure.additions, structure.deletions)}`;
37549
37636
  return [
37550
- chalk238.bold.underline("Structure"),
37637
+ chalk239.bold.underline("Structure"),
37551
37638
  ` ${summary}`,
37552
37639
  ...structure.tree.flatMap((node) => formatNode(node, " "))
37553
37640
  ].join("\n");
37554
37641
  }
37555
37642
 
37556
37643
  // src/commands/review/highLevel/formatHighLevelTests.ts
37557
- import chalk239 from "chalk";
37644
+ import chalk240 from "chalk";
37558
37645
  function changeMarker(change) {
37559
37646
  if (change === "added") return "A";
37560
37647
  if (change === "modified") return "M";
@@ -37563,22 +37650,22 @@ function changeMarker(change) {
37563
37650
  function formatNode2(node, depth) {
37564
37651
  const indent3 = " ".repeat(depth + 2);
37565
37652
  if (node.kind === "it")
37566
- return [`${indent3}${chalk239.dim(changeMarker(node.change))} ${node.name}`];
37653
+ return [`${indent3}${chalk240.dim(changeMarker(node.change))} ${node.name}`];
37567
37654
  return [
37568
- `${indent3}${chalk239.bold(node.name)}`,
37655
+ `${indent3}${chalk240.bold(node.name)}`,
37569
37656
  ...node.children.flatMap((child) => formatNode2(child, depth + 1))
37570
37657
  ];
37571
37658
  }
37572
37659
  function formatHighLevelTests(files, testPaths) {
37573
- const heading2 = chalk239.bold.underline("Changed tests");
37660
+ const heading2 = chalk240.bold.underline("Changed tests");
37574
37661
  if (files.length === 0)
37575
37662
  return `${heading2}
37576
- ${chalk239.dim(`no changed test in files matching ${testPaths.join(", ")}`)}`;
37663
+ ${chalk240.dim(`no changed test in files matching ${testPaths.join(", ")}`)}`;
37577
37664
  return [
37578
37665
  heading2,
37579
37666
  ...files.flatMap((file) => [
37580
37667
  "",
37581
- ` ${chalk239.bold(file.path)} ${chalk239.dim(`(${file.status})`)}`,
37668
+ ` ${chalk240.bold(file.path)} ${chalk240.dim(`(${file.status})`)}`,
37582
37669
  ...file.tests.flatMap((node) => formatNode2(node, 0))
37583
37670
  ])
37584
37671
  ].join("\n");
@@ -37592,10 +37679,10 @@ function highLevelChangedFileCount(structure) {
37592
37679
  // src/commands/review/highLevel/printHighLevelChecklist.ts
37593
37680
  function printHighLevelChecklist(subject) {
37594
37681
  console.log(
37595
- chalk240.bold(
37682
+ chalk241.bold(
37596
37683
  `High-level review of ${subject.repo}#${subject.prNumber} \u2014 ${subject.title}`
37597
37684
  ),
37598
- chalk240.dim(
37685
+ chalk241.dim(
37599
37686
  `\xB7 ${highLevelChangedFileCount(subject.structure)} changed files`
37600
37687
  )
37601
37688
  );
@@ -37609,12 +37696,12 @@ function printHighLevelChecklist(subject) {
37609
37696
  console.log("");
37610
37697
  console.log(formatHighLevelTests(subject.tests, subject.testPaths));
37611
37698
  console.log(
37612
- chalk240.dim(
37699
+ chalk241.dim(
37613
37700
  "\nManual items are for the reviewer to judge; see docs/high-level-review.md."
37614
37701
  )
37615
37702
  );
37616
37703
  console.log(
37617
- chalk240.dim(
37704
+ chalk241.dim(
37618
37705
  "Run this inside an assist session to step through the checklist in the web overlay."
37619
37706
  )
37620
37707
  );
@@ -37900,18 +37987,18 @@ function partitionFindingsByDiff(findings, index2) {
37900
37987
  }
37901
37988
 
37902
37989
  // src/commands/review/warnOutOfDiff.ts
37903
- import chalk241 from "chalk";
37990
+ import chalk242 from "chalk";
37904
37991
  function warnOutOfDiff(outOfDiff) {
37905
37992
  if (outOfDiff.length === 0) return;
37906
37993
  console.warn(
37907
- chalk241.yellow(
37994
+ chalk242.yellow(
37908
37995
  `Moved ${outOfDiff.length} finding(s) whose lines fall outside the PR diff into the review body (GitHub cannot anchor a comment on these):`
37909
37996
  )
37910
37997
  );
37911
37998
  for (const finding of outOfDiff) {
37912
37999
  const range = finding.startLine !== void 0 ? `${finding.startLine}-${finding.line}` : `${finding.line}`;
37913
38000
  console.warn(
37914
- ` ${chalk241.yellow("\xB7")} ${finding.title} ${chalk241.dim(
38001
+ ` ${chalk242.yellow("\xB7")} ${finding.title} ${chalk242.dim(
37915
38002
  `(${finding.file}:${range})`
37916
38003
  )}`
37917
38004
  );
@@ -37935,18 +38022,18 @@ function selectInDiffFindings(lineBound, prDiff) {
37935
38022
  }
37936
38023
 
37937
38024
  // src/commands/review/warnUnlocated.ts
37938
- import chalk242 from "chalk";
38025
+ import chalk243 from "chalk";
37939
38026
  function warnUnlocated(unlocated) {
37940
38027
  if (unlocated.length === 0) return;
37941
38028
  console.warn(
37942
- chalk242.yellow(
38029
+ chalk243.yellow(
37943
38030
  `Moved ${unlocated.length} finding(s) without a parseable file:line into the review body:`
37944
38031
  )
37945
38032
  );
37946
38033
  for (const finding of unlocated) {
37947
- const where = finding.location || chalk242.dim("missing");
38034
+ const where = finding.location || chalk243.dim("missing");
37948
38035
  console.warn(
37949
- ` ${chalk242.yellow("\xB7")} ${finding.title} ${chalk242.dim(`(${where})`)}`
38036
+ ` ${chalk243.yellow("\xB7")} ${finding.title} ${chalk243.dim(`(${where})`)}`
37950
38037
  );
37951
38038
  }
37952
38039
  }
@@ -38145,8 +38232,8 @@ function renderEntry(entry, frame) {
38145
38232
  import { format as format2 } from "util";
38146
38233
 
38147
38234
  // src/commands/review/createReviewLogSink.ts
38148
- import { appendFileSync as appendFileSync4, mkdirSync as mkdirSync25 } from "fs";
38149
- import { join as join85 } from "path";
38235
+ import { appendFileSync as appendFileSync4, mkdirSync as mkdirSync26 } from "fs";
38236
+ import { join as join86 } from "path";
38150
38237
  var LOG_FILE = "review.log";
38151
38238
  function createReviewLogSink() {
38152
38239
  let logPath2;
@@ -38162,8 +38249,8 @@ function createReviewLogSink() {
38162
38249
  `);
38163
38250
  },
38164
38251
  attach(reviewDir) {
38165
- mkdirSync25(reviewDir, { recursive: true });
38166
- logPath2 = join85(reviewDir, LOG_FILE);
38252
+ mkdirSync26(reviewDir, { recursive: true });
38253
+ logPath2 = join86(reviewDir, LOG_FILE);
38167
38254
  const lines2 = [
38168
38255
  "",
38169
38256
  `=== ${(/* @__PURE__ */ new Date()).toISOString()} ===`,
@@ -38413,7 +38500,7 @@ function buildCodexModelArgs() {
38413
38500
  }
38414
38501
 
38415
38502
  // src/commands/review/runClaudeReviewer.ts
38416
- import { writeFileSync as writeFileSync40 } from "fs";
38503
+ import { writeFileSync as writeFileSync41 } from "fs";
38417
38504
 
38418
38505
  // src/commands/review/formatToolSummary.ts
38419
38506
  function truncate2(value, max = 80) {
@@ -38852,7 +38939,7 @@ async function runClaudeReviewer(spec) {
38852
38939
  onLine
38853
38940
  });
38854
38941
  if (result.exitCode === 0 && state.finalText)
38855
- writeFileSync40(spec.outputPath, state.finalText);
38942
+ writeFileSync41(spec.outputPath, state.finalText);
38856
38943
  const finalised = finaliseReviewerRun(
38857
38944
  { ...spec, command, model: override?.model },
38858
38945
  spinner,
@@ -39377,11 +39464,11 @@ ${annotateDiffWithLineNumbers(context.diff.trimEnd())}
39377
39464
  }
39378
39465
 
39379
39466
  // src/commands/review/buildReviewPaths.ts
39380
- import { homedir as homedir25 } from "os";
39381
- import { basename as basename24, join as join86 } from "path";
39467
+ import { homedir as homedir26 } from "os";
39468
+ import { basename as basename24, join as join87 } from "path";
39382
39469
  function buildReviewPaths(repoRoot2, key) {
39383
- const reviewDir = join86(
39384
- homedir25(),
39470
+ const reviewDir = join87(
39471
+ homedir26(),
39385
39472
  ".assist",
39386
39473
  "reviews",
39387
39474
  basename24(repoRoot2),
@@ -39389,10 +39476,10 @@ function buildReviewPaths(repoRoot2, key) {
39389
39476
  );
39390
39477
  return {
39391
39478
  reviewDir,
39392
- requestPath: join86(reviewDir, "request.md"),
39393
- claudePath: join86(reviewDir, "claude.md"),
39394
- codexPath: join86(reviewDir, "codex.md"),
39395
- synthesisPath: join86(reviewDir, "synthesis.md")
39479
+ requestPath: join87(reviewDir, "request.md"),
39480
+ claudePath: join87(reviewDir, "claude.md"),
39481
+ codexPath: join87(reviewDir, "codex.md"),
39482
+ synthesisPath: join87(reviewDir, "synthesis.md")
39396
39483
  };
39397
39484
  }
39398
39485
 
@@ -39430,16 +39517,16 @@ function fetchExistingComments() {
39430
39517
  }
39431
39518
 
39432
39519
  // src/commands/review/prepareReviewDir.ts
39433
- import { existsSync as existsSync69, mkdirSync as mkdirSync26, unlinkSync as unlinkSync18, writeFileSync as writeFileSync41 } from "fs";
39520
+ import { existsSync as existsSync69, mkdirSync as mkdirSync27, unlinkSync as unlinkSync18, writeFileSync as writeFileSync42 } from "fs";
39434
39521
  function clearReviewFiles(paths) {
39435
39522
  for (const path108 of [paths.claudePath, paths.codexPath, paths.synthesisPath]) {
39436
39523
  if (existsSync69(path108)) unlinkSync18(path108);
39437
39524
  }
39438
39525
  }
39439
39526
  function prepareReviewDir(paths, requestBody, force) {
39440
- mkdirSync26(paths.reviewDir, { recursive: true });
39527
+ mkdirSync27(paths.reviewDir, { recursive: true });
39441
39528
  if (force) clearReviewFiles(paths);
39442
- writeFileSync41(paths.requestPath, requestBody);
39529
+ writeFileSync42(paths.requestPath, requestBody);
39443
39530
  }
39444
39531
 
39445
39532
  // src/commands/review/setupReviewDir.ts
@@ -40087,9 +40174,9 @@ function registerReview(program) {
40087
40174
  }
40088
40175
 
40089
40176
  // src/commands/rules/addRule.ts
40090
- import { existsSync as existsSync72, readFileSync as readFileSync56, writeFileSync as writeFileSync43 } from "fs";
40177
+ import { existsSync as existsSync72, readFileSync as readFileSync56, writeFileSync as writeFileSync44 } from "fs";
40091
40178
  import path87 from "path";
40092
- import chalk243 from "chalk";
40179
+ import chalk244 from "chalk";
40093
40180
 
40094
40181
  // src/commands/rules/insertRuleBullet.ts
40095
40182
  function ruleBullet({ code, title, text: text17 }) {
@@ -40162,7 +40249,7 @@ function resolveRuleScope(target) {
40162
40249
  }
40163
40250
 
40164
40251
  // src/commands/rules/updateScopedRulesIndex.ts
40165
- import { existsSync as existsSync71, readFileSync as readFileSync55, writeFileSync as writeFileSync42 } from "fs";
40252
+ import { existsSync as existsSync71, readFileSync as readFileSync55, writeFileSync as writeFileSync43 } from "fs";
40166
40253
  import path86 from "path";
40167
40254
 
40168
40255
  // src/commands/rules/scopedRuleDirectories.ts
@@ -40214,7 +40301,7 @@ function updateScopedRulesIndex(root2) {
40214
40301
  const rootFile = path86.join(root2, "CLAUDE.md");
40215
40302
  const before = existsSync71(rootFile) ? readFileSync55(rootFile, "utf8") : "";
40216
40303
  const after = upsertScopedRulesPointer(before, directories);
40217
- if (after !== before) writeFileSync42(rootFile, after);
40304
+ if (after !== before) writeFileSync43(rootFile, after);
40218
40305
  return directories;
40219
40306
  }
40220
40307
 
@@ -40225,7 +40312,7 @@ function read2(file) {
40225
40312
  function addRule(text17, options2) {
40226
40313
  const rule = text17.trim();
40227
40314
  if (rule === "") {
40228
- console.error(chalk243.red("Rule text is required"));
40315
+ console.error(chalk244.red("Rule text is required"));
40229
40316
  process.exitCode = 1;
40230
40317
  return;
40231
40318
  }
@@ -40233,7 +40320,7 @@ function addRule(text17, options2) {
40233
40320
  const targetDir = path87.dirname(target);
40234
40321
  const root2 = findRepoRoot(targetDir) ?? targetDir;
40235
40322
  const code = nextRuleCode(root2);
40236
- writeFileSync43(
40323
+ writeFileSync44(
40237
40324
  target,
40238
40325
  insertRuleBullet(read2(target), {
40239
40326
  code,
@@ -40243,13 +40330,13 @@ function addRule(text17, options2) {
40243
40330
  );
40244
40331
  updateScopedRulesIndex(root2);
40245
40332
  console.log(
40246
- `Added ${chalk243.cyan(code)} to ${path87.relative(process.cwd(), target) || target}`
40333
+ `Added ${chalk244.cyan(code)} to ${path87.relative(process.cwd(), target) || target}`
40247
40334
  );
40248
40335
  }
40249
40336
 
40250
40337
  // src/commands/rules/indexRules.ts
40251
40338
  import path88 from "path";
40252
- import chalk244 from "chalk";
40339
+ import chalk245 from "chalk";
40253
40340
  function indexRules() {
40254
40341
  const startDir = scopeDirectory(process.cwd());
40255
40342
  const root2 = findRepoRoot(startDir) ?? startDir;
@@ -40257,24 +40344,24 @@ function indexRules() {
40257
40344
  const rootFile = path88.relative(process.cwd(), path88.join(root2, "CLAUDE.md"));
40258
40345
  if (directories.length === 0) {
40259
40346
  console.log(
40260
- chalk244.gray(`No directories carry their own \`## Rules\` under ${root2}`)
40347
+ chalk245.gray(`No directories carry their own \`## Rules\` under ${root2}`)
40261
40348
  );
40262
40349
  return;
40263
40350
  }
40264
40351
  console.log(`Recorded in ${rootFile || "CLAUDE.md"}`);
40265
40352
  for (const directory of directories)
40266
- console.log(` ${chalk244.cyan(directory)}`);
40353
+ console.log(` ${chalk245.cyan(directory)}`);
40267
40354
  }
40268
40355
 
40269
40356
  // src/commands/rules/listRules.ts
40270
40357
  import path89 from "path";
40271
- import chalk245 from "chalk";
40358
+ import chalk246 from "chalk";
40272
40359
  function listRules(target, options2 = {}) {
40273
40360
  const resolved = path89.resolve(target ?? process.cwd());
40274
40361
  const rules2 = readScopedRules(resolved);
40275
40362
  if (rules2.length === 0) {
40276
40363
  const label2 = path89.relative(process.cwd(), resolved) || ".";
40277
- console.log(chalk245.gray(`No rules in scope for ${label2}`));
40364
+ console.log(chalk246.gray(`No rules in scope for ${label2}`));
40278
40365
  return;
40279
40366
  }
40280
40367
  const base = findRepoRoot(scopeDirectory(resolved));
@@ -40284,14 +40371,14 @@ function listRules(target, options2 = {}) {
40284
40371
  if (rule.source !== shown) {
40285
40372
  shown = rule.source;
40286
40373
  console.log(
40287
- chalk245.dim(base ? path89.relative(base, rule.source) : rule.source)
40374
+ chalk246.dim(base ? path89.relative(base, rule.source) : rule.source)
40288
40375
  );
40289
40376
  }
40290
40377
  console.log(
40291
- ` ${chalk245.cyan(rule.code.padEnd(width2))} ${rule.title ?? rule.text}`
40378
+ ` ${chalk246.cyan(rule.code.padEnd(width2))} ${rule.title ?? rule.text}`
40292
40379
  );
40293
40380
  if (options2.full && rule.title)
40294
- console.log(` ${" ".repeat(width2)} ${chalk245.dim(rule.text)}`);
40381
+ console.log(` ${" ".repeat(width2)} ${chalk246.dim(rule.text)}`);
40295
40382
  }
40296
40383
  }
40297
40384
 
@@ -40326,7 +40413,7 @@ function registerRules(program) {
40326
40413
  }
40327
40414
 
40328
40415
  // src/commands/seq/seqAuth.ts
40329
- import chalk247 from "chalk";
40416
+ import chalk248 from "chalk";
40330
40417
 
40331
40418
  // src/commands/seq/loadConnections.ts
40332
40419
  function loadConnections2() {
@@ -40355,10 +40442,10 @@ function setDefaultConnection(name) {
40355
40442
  }
40356
40443
 
40357
40444
  // src/shared/assertUniqueName.ts
40358
- import chalk246 from "chalk";
40445
+ import chalk247 from "chalk";
40359
40446
  function assertUniqueName(existingNames, name) {
40360
40447
  if (existingNames.includes(name)) {
40361
- console.error(chalk246.red(`Connection "${name}" already exists.`));
40448
+ console.error(chalk247.red(`Connection "${name}" already exists.`));
40362
40449
  process.exit(1);
40363
40450
  }
40364
40451
  }
@@ -40376,16 +40463,16 @@ async function promptConnection2(existingNames) {
40376
40463
  var seqAuth = createConnectionAuth({
40377
40464
  load: loadConnections2,
40378
40465
  save: saveConnections2,
40379
- format: (c) => `${chalk247.bold(c.name)} ${c.url}`,
40466
+ format: (c) => `${chalk248.bold(c.name)} ${c.url}`,
40380
40467
  promptNew: promptConnection2,
40381
40468
  onFirst: (c) => setDefaultConnection(c.name)
40382
40469
  });
40383
40470
 
40384
40471
  // src/commands/seq/seqQuery.ts
40385
- import chalk251 from "chalk";
40472
+ import chalk252 from "chalk";
40386
40473
 
40387
40474
  // src/commands/seq/fetchSeq.ts
40388
- import chalk248 from "chalk";
40475
+ import chalk249 from "chalk";
40389
40476
  async function fetchSeq(conn, path108, params) {
40390
40477
  const url = `${conn.url}${path108}?${params}`;
40391
40478
  const response = await fetch(url, {
@@ -40396,7 +40483,7 @@ async function fetchSeq(conn, path108, params) {
40396
40483
  });
40397
40484
  if (!response.ok) {
40398
40485
  const body = await response.text();
40399
- console.error(chalk248.red(`Seq returned ${response.status}: ${body}`));
40486
+ console.error(chalk249.red(`Seq returned ${response.status}: ${body}`));
40400
40487
  process.exit(1);
40401
40488
  }
40402
40489
  return response;
@@ -40455,23 +40542,23 @@ async function fetchSeqEvents(conn, params) {
40455
40542
  }
40456
40543
 
40457
40544
  // src/commands/seq/formatEvent.ts
40458
- import chalk249 from "chalk";
40545
+ import chalk250 from "chalk";
40459
40546
  function levelColor(level) {
40460
40547
  switch (level) {
40461
40548
  case "Fatal":
40462
- return chalk249.bgRed.white;
40549
+ return chalk250.bgRed.white;
40463
40550
  case "Error":
40464
- return chalk249.red;
40551
+ return chalk250.red;
40465
40552
  case "Warning":
40466
- return chalk249.yellow;
40553
+ return chalk250.yellow;
40467
40554
  case "Information":
40468
- return chalk249.cyan;
40555
+ return chalk250.cyan;
40469
40556
  case "Debug":
40470
- return chalk249.gray;
40557
+ return chalk250.gray;
40471
40558
  case "Verbose":
40472
- return chalk249.dim;
40559
+ return chalk250.dim;
40473
40560
  default:
40474
- return chalk249.white;
40561
+ return chalk250.white;
40475
40562
  }
40476
40563
  }
40477
40564
  function levelAbbrev(level) {
@@ -40512,12 +40599,12 @@ function formatTimestamp(iso) {
40512
40599
  function formatEvent(event) {
40513
40600
  const color = levelColor(event.Level);
40514
40601
  const abbrev = levelAbbrev(event.Level);
40515
- const ts10 = chalk249.dim(formatTimestamp(event.Timestamp));
40602
+ const ts10 = chalk250.dim(formatTimestamp(event.Timestamp));
40516
40603
  const msg = renderMessage(event);
40517
40604
  const lines2 = [`${ts10} ${color(`[${abbrev}]`)} ${msg}`];
40518
40605
  if (event.Exception) {
40519
40606
  for (const line of event.Exception.split("\n")) {
40520
- lines2.push(chalk249.red(` ${line}`));
40607
+ lines2.push(chalk250.red(` ${line}`));
40521
40608
  }
40522
40609
  }
40523
40610
  return lines2.join("\n");
@@ -40550,11 +40637,11 @@ function rejectTimestampFilter(filter) {
40550
40637
  }
40551
40638
 
40552
40639
  // src/shared/resolveNamedConnection.ts
40553
- import chalk250 from "chalk";
40640
+ import chalk251 from "chalk";
40554
40641
  function resolveNamedConnection(connections, requested, defaultName, kind, authCommand) {
40555
40642
  if (connections.length === 0) {
40556
40643
  console.error(
40557
- chalk250.red(
40644
+ chalk251.red(
40558
40645
  `No ${kind} connections configured. Run '${authCommand}' first.`
40559
40646
  )
40560
40647
  );
@@ -40563,7 +40650,7 @@ function resolveNamedConnection(connections, requested, defaultName, kind, authC
40563
40650
  const target = requested ?? defaultName ?? connections[0].name;
40564
40651
  const connection = connections.find((c) => c.name === target);
40565
40652
  if (!connection) {
40566
- console.error(chalk250.red(`${kind} connection "${target}" not found.`));
40653
+ console.error(chalk251.red(`${kind} connection "${target}" not found.`));
40567
40654
  process.exit(1);
40568
40655
  }
40569
40656
  return connection;
@@ -40592,7 +40679,7 @@ async function seqQuery(filter, options2) {
40592
40679
  new URLSearchParams({ filter, count: String(count10) })
40593
40680
  );
40594
40681
  if (events.length === 0) {
40595
- console.log(chalk251.yellow("No events found."));
40682
+ console.log(chalk252.yellow("No events found."));
40596
40683
  return;
40597
40684
  }
40598
40685
  if (options2.json) {
@@ -40603,11 +40690,11 @@ async function seqQuery(filter, options2) {
40603
40690
  for (const event of chronological) {
40604
40691
  console.log(formatEvent(event));
40605
40692
  }
40606
- console.log(chalk251.dim(`
40693
+ console.log(chalk252.dim(`
40607
40694
  ${events.length} events`));
40608
40695
  if (events.length >= count10) {
40609
40696
  console.log(
40610
- chalk251.yellow(
40697
+ chalk252.yellow(
40611
40698
  `Results limited to ${count10}. Use --count to retrieve more.`
40612
40699
  )
40613
40700
  );
@@ -40615,10 +40702,10 @@ ${events.length} events`));
40615
40702
  }
40616
40703
 
40617
40704
  // src/shared/setNamedDefaultConnection.ts
40618
- import chalk252 from "chalk";
40705
+ import chalk253 from "chalk";
40619
40706
  function setNamedDefaultConnection(connections, name, setDefault, kind) {
40620
40707
  if (!connections.find((c) => c.name === name)) {
40621
- console.error(chalk252.red(`Connection "${name}" not found.`));
40708
+ console.error(chalk253.red(`Connection "${name}" not found.`));
40622
40709
  process.exit(1);
40623
40710
  }
40624
40711
  setDefault(name);
@@ -40764,10 +40851,10 @@ function parseSlackThreadRef(value) {
40764
40851
  }
40765
40852
 
40766
40853
  // src/commands/slack/postSlackMessage.ts
40767
- import { mkdirSync as mkdirSync28, writeFileSync as writeFileSync45 } from "fs";
40854
+ import { mkdirSync as mkdirSync29, writeFileSync as writeFileSync46 } from "fs";
40768
40855
 
40769
40856
  // src/commands/slack/previewSlackThreadParts.ts
40770
- import { mkdirSync as mkdirSync27, writeFileSync as writeFileSync44 } from "fs";
40857
+ import { mkdirSync as mkdirSync28, writeFileSync as writeFileSync45 } from "fs";
40771
40858
 
40772
40859
  // src/commands/slack/readSlackParts.ts
40773
40860
  import { readFileSync as readFileSync57 } from "fs";
@@ -40813,12 +40900,12 @@ async function reviewProposedSlackMessage(target, body, workingPath) {
40813
40900
  }
40814
40901
 
40815
40902
  // src/commands/slack/slackWorkingFile.ts
40816
- import { join as join87 } from "path";
40903
+ import { join as join88 } from "path";
40817
40904
  function slackWorkingFile(channel, partIndex) {
40818
40905
  const slug2 = channel.replace(/^[#@]/, "").toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "channel";
40819
- const dir = join87(getStoreDir(), "slack");
40906
+ const dir = join88(getStoreDir(), "slack");
40820
40907
  const name = partIndex === void 0 ? slug2 : `${slug2}-${partIndex}`;
40821
- return { dir, bodyPath: join87(dir, `${name}.md`) };
40908
+ return { dir, bodyPath: join88(dir, `${name}.md`) };
40822
40909
  }
40823
40910
 
40824
40911
  // src/commands/slack/previewSlackThreadParts.ts
@@ -40830,10 +40917,10 @@ async function previewSlackThreadParts({
40830
40917
  }) {
40831
40918
  const bodies = readSlackParts(partFiles);
40832
40919
  const { dir } = slackWorkingFile(channel);
40833
- mkdirSync27(dir, { recursive: true });
40920
+ mkdirSync28(dir, { recursive: true });
40834
40921
  const paths = bodies.map((body, index2) => {
40835
40922
  const { bodyPath } = slackWorkingFile(channel, index2 + 1);
40836
- writeFileSync44(bodyPath, `${body}
40923
+ writeFileSync45(bodyPath, `${body}
40837
40924
  `);
40838
40925
  return bodyPath;
40839
40926
  });
@@ -40884,8 +40971,8 @@ async function postSlackMessage(channelArg, options2) {
40884
40971
  process.exit(1);
40885
40972
  }
40886
40973
  const { dir, bodyPath } = slackWorkingFile(channel);
40887
- mkdirSync28(dir, { recursive: true });
40888
- writeFileSync45(bodyPath, `${body}
40974
+ mkdirSync29(dir, { recursive: true });
40975
+ writeFileSync46(bodyPath, `${body}
40889
40976
  `);
40890
40977
  await reviewProposedSlackMessage({ channel, threadTs }, body, bodyPath);
40891
40978
  console.log(`Approved for ${target}. The body to post is at:`);
@@ -40920,7 +41007,7 @@ function registerSlack(program) {
40920
41007
  }
40921
41008
 
40922
41009
  // src/commands/sql/sqlAuth.ts
40923
- import chalk254 from "chalk";
41010
+ import chalk255 from "chalk";
40924
41011
 
40925
41012
  // src/commands/sql/loadConnections.ts
40926
41013
  function loadConnections3() {
@@ -40949,7 +41036,7 @@ function setDefaultConnection2(name) {
40949
41036
  }
40950
41037
 
40951
41038
  // src/commands/sql/promptConnection.ts
40952
- import chalk253 from "chalk";
41039
+ import chalk254 from "chalk";
40953
41040
  async function promptConnection3(existingNames) {
40954
41041
  const name = await promptInput("name", "Connection name:", "default");
40955
41042
  assertUniqueName(existingNames, name);
@@ -40957,7 +41044,7 @@ async function promptConnection3(existingNames) {
40957
41044
  const portStr = await promptInput("port", "Port:", "1433");
40958
41045
  const port = Number.parseInt(portStr, 10);
40959
41046
  if (!Number.isFinite(port)) {
40960
- console.error(chalk253.red(`Invalid port "${portStr}".`));
41047
+ console.error(chalk254.red(`Invalid port "${portStr}".`));
40961
41048
  process.exit(1);
40962
41049
  }
40963
41050
  const user = await promptInput("user", "User:");
@@ -40970,13 +41057,13 @@ async function promptConnection3(existingNames) {
40970
41057
  var sqlAuth = createConnectionAuth({
40971
41058
  load: loadConnections3,
40972
41059
  save: saveConnections3,
40973
- format: (c) => `${chalk254.bold(c.name)} ${c.server}:${c.port}/${c.database} (${c.user})`,
41060
+ format: (c) => `${chalk255.bold(c.name)} ${c.server}:${c.port}/${c.database} (${c.user})`,
40974
41061
  promptNew: promptConnection3,
40975
41062
  onFirst: (c) => setDefaultConnection2(c.name)
40976
41063
  });
40977
41064
 
40978
41065
  // src/commands/sql/printTable.ts
40979
- import chalk255 from "chalk";
41066
+ import chalk256 from "chalk";
40980
41067
  function formatCell(value) {
40981
41068
  if (value === null || value === void 0) return "";
40982
41069
  if (value instanceof Date) return value.toISOString();
@@ -40985,7 +41072,7 @@ function formatCell(value) {
40985
41072
  }
40986
41073
  function printTable(rows) {
40987
41074
  if (rows.length === 0) {
40988
- console.log(chalk255.yellow("(no rows)"));
41075
+ console.log(chalk256.yellow("(no rows)"));
40989
41076
  return;
40990
41077
  }
40991
41078
  const columns = Object.keys(rows[0]);
@@ -40993,13 +41080,13 @@ function printTable(rows) {
40993
41080
  (col) => Math.max(col.length, ...rows.map((r) => formatCell(r[col]).length))
40994
41081
  );
40995
41082
  const header = columns.map((c, i) => c.padEnd(widths[i])).join(" ");
40996
- console.log(chalk255.dim(header));
40997
- console.log(chalk255.dim("-".repeat(header.length)));
41083
+ console.log(chalk256.dim(header));
41084
+ console.log(chalk256.dim("-".repeat(header.length)));
40998
41085
  for (const row3 of rows) {
40999
41086
  const line = columns.map((c, i) => formatCell(row3[c]).padEnd(widths[i])).join(" ");
41000
41087
  console.log(line);
41001
41088
  }
41002
- console.log(chalk255.dim(`
41089
+ console.log(chalk256.dim(`
41003
41090
  ${rows.length} row${rows.length === 1 ? "" : "s"}`));
41004
41091
  }
41005
41092
 
@@ -41059,7 +41146,7 @@ async function sqlColumns(table, connectionName) {
41059
41146
  }
41060
41147
 
41061
41148
  // src/commands/sql/sqlMutate.ts
41062
- import chalk256 from "chalk";
41149
+ import chalk257 from "chalk";
41063
41150
 
41064
41151
  // src/commands/sql/isMutation.ts
41065
41152
  var MUTATION_KEYWORDS = [
@@ -41093,7 +41180,7 @@ function isMutation(sql27) {
41093
41180
  async function sqlMutate(query, connectionName) {
41094
41181
  if (!isMutation(query)) {
41095
41182
  console.error(
41096
- chalk256.red(
41183
+ chalk257.red(
41097
41184
  "assist sql mutate refuses non-mutating statements. Use `assist sql query` instead."
41098
41185
  )
41099
41186
  );
@@ -41103,18 +41190,18 @@ async function sqlMutate(query, connectionName) {
41103
41190
  const pool = await sqlConnect(conn);
41104
41191
  try {
41105
41192
  const result = await pool.request().query(query);
41106
- console.log(chalk256.dim(`${result.rowsAffected.join(", ")} row(s) affected`));
41193
+ console.log(chalk257.dim(`${result.rowsAffected.join(", ")} row(s) affected`));
41107
41194
  } finally {
41108
41195
  await pool.close();
41109
41196
  }
41110
41197
  }
41111
41198
 
41112
41199
  // src/commands/sql/sqlQuery.ts
41113
- import chalk257 from "chalk";
41200
+ import chalk258 from "chalk";
41114
41201
  async function sqlQuery(query, connectionName) {
41115
41202
  if (isMutation(query)) {
41116
41203
  console.error(
41117
- chalk257.red(
41204
+ chalk258.red(
41118
41205
  "assist sql query refuses mutating statements. Use `assist sql mutate` instead."
41119
41206
  )
41120
41207
  );
@@ -41129,7 +41216,7 @@ async function sqlQuery(query, connectionName) {
41129
41216
  printTable(rows);
41130
41217
  } else {
41131
41218
  console.log(
41132
- chalk257.dim(`${result.rowsAffected.join(", ")} row(s) affected`)
41219
+ chalk258.dim(`${result.rowsAffected.join(", ")} row(s) affected`)
41133
41220
  );
41134
41221
  }
41135
41222
  } finally {
@@ -41544,7 +41631,7 @@ function syncPi(claudeDir, options2) {
41544
41631
  // src/commands/sync/syncSettings.ts
41545
41632
  import * as fs46 from "fs";
41546
41633
  import * as path100 from "path";
41547
- import chalk258 from "chalk";
41634
+ import chalk259 from "chalk";
41548
41635
  async function syncSettings(claudeDir, targetBase, options2) {
41549
41636
  const source = path100.join(claudeDir, "settings.json");
41550
41637
  const target = path100.join(targetBase, "settings.json");
@@ -41563,7 +41650,7 @@ async function syncSettings(claudeDir, targetBase, options2) {
41563
41650
  if (mergedContent !== normalizedTarget) {
41564
41651
  if (!options2?.yes) {
41565
41652
  console.log(
41566
- chalk258.yellow(
41653
+ chalk259.yellow(
41567
41654
  "\n\u26A0\uFE0F Warning: settings.json differs from existing file"
41568
41655
  )
41569
41656
  );
@@ -41571,7 +41658,7 @@ async function syncSettings(claudeDir, targetBase, options2) {
41571
41658
  printDiff(targetContent, mergedContent);
41572
41659
  printAutoConfirmHint();
41573
41660
  const confirm = await promptConfirm(
41574
- chalk258.red("Overwrite existing settings.json?"),
41661
+ chalk259.red("Overwrite existing settings.json?"),
41575
41662
  false
41576
41663
  );
41577
41664
  if (!confirm) {
@@ -42001,20 +42088,20 @@ async function configure() {
42001
42088
 
42002
42089
  // src/commands/transcript/list.ts
42003
42090
  import { existsSync as existsSync78, readdirSync as readdirSync21, statSync as statSync12 } from "fs";
42004
- import { join as join99 } from "path";
42091
+ import { join as join100 } from "path";
42005
42092
  function list4() {
42006
42093
  const { vttDir } = getTranscriptConfig();
42007
42094
  if (!existsSync78(vttDir)) return;
42008
42095
  for (const entry of readdirSync21(vttDir)) {
42009
42096
  if (!entry.endsWith(".vtt")) continue;
42010
- if (statSync12(join99(vttDir, entry)).isDirectory()) continue;
42097
+ if (statSync12(join100(vttDir, entry)).isDirectory()) continue;
42011
42098
  console.log(entry);
42012
42099
  }
42013
42100
  }
42014
42101
 
42015
42102
  // src/commands/transcript/move.ts
42016
- import { existsSync as existsSync79, mkdirSync as mkdirSync34, renameSync as renameSync4, writeFileSync as writeFileSync50 } from "fs";
42017
- import { basename as basename27, join as join100 } from "path";
42103
+ import { existsSync as existsSync79, mkdirSync as mkdirSync35, renameSync as renameSync4, writeFileSync as writeFileSync51 } from "fs";
42104
+ import { basename as basename27, join as join101 } from "path";
42018
42105
 
42019
42106
  // src/commands/transcript/convertVttToMarkdown.ts
42020
42107
  function convertVttToMarkdown(inputPath) {
@@ -42024,9 +42111,9 @@ function convertVttToMarkdown(inputPath) {
42024
42111
  // src/commands/transcript/move.ts
42025
42112
  var DATE_REGEX = /^\d{4}-\d{2}-\d{2}$/;
42026
42113
  function archiveRawVtt(vttDir, sourcePath, filename) {
42027
- const processedDir = join100(vttDir, "processed");
42028
- mkdirSync34(processedDir, { recursive: true });
42029
- renameSync4(sourcePath, join100(processedDir, filename));
42114
+ const processedDir = join101(vttDir, "processed");
42115
+ mkdirSync35(processedDir, { recursive: true });
42116
+ renameSync4(sourcePath, join101(processedDir, filename));
42030
42117
  }
42031
42118
  function move(file, options2) {
42032
42119
  const { date, client } = options2;
@@ -42036,25 +42123,25 @@ function move(file, options2) {
42036
42123
  }
42037
42124
  const { vttDir, transcriptsDir, summaryDir } = getTranscriptConfig();
42038
42125
  const filename = basename27(file);
42039
- const sourcePath = join100(vttDir, filename);
42126
+ const sourcePath = join101(vttDir, filename);
42040
42127
  if (!existsSync79(sourcePath)) {
42041
42128
  console.error(`Error: VTT file not found: ${sourcePath}`);
42042
42129
  process.exit(1);
42043
42130
  }
42044
42131
  const base = basename27(filename, ".vtt").replace(/ Transcription$/, "");
42045
42132
  const outputName = `${date} ${base}.md`;
42046
- const formattedDir = join100(transcriptsDir, client);
42047
- mkdirSync34(formattedDir, { recursive: true });
42048
- const formattedPath = join100(formattedDir, outputName);
42049
- writeFileSync50(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
42133
+ const formattedDir = join101(transcriptsDir, client);
42134
+ mkdirSync35(formattedDir, { recursive: true });
42135
+ const formattedPath = join101(formattedDir, outputName);
42136
+ writeFileSync51(formattedPath, convertVttToMarkdown(sourcePath), "utf8");
42050
42137
  archiveRawVtt(vttDir, sourcePath, filename);
42051
- const summaryPath = join100(summaryDir, client, outputName);
42138
+ const summaryPath = join101(summaryDir, client, outputName);
42052
42139
  console.log(`Formatted transcript: ${formattedPath}`);
42053
42140
  console.log(`Summary target: ${summaryPath}`);
42054
42141
  }
42055
42142
 
42056
42143
  // src/commands/transcript/merge.ts
42057
- import { existsSync as existsSync80, writeFileSync as writeFileSync51 } from "fs";
42144
+ import { existsSync as existsSync80, writeFileSync as writeFileSync52 } from "fs";
42058
42145
  import { basename as basename28 } from "path";
42059
42146
 
42060
42147
  // src/commands/transcript/failTranscript.ts
@@ -42231,7 +42318,7 @@ async function merge(files, options2 = {}) {
42231
42318
  console.log(document);
42232
42319
  return;
42233
42320
  }
42234
- writeFileSync51(options2.out, `${document}
42321
+ writeFileSync52(options2.out, `${document}
42235
42322
  `, "utf8");
42236
42323
  console.log(`Merged transcript: ${options2.out}`);
42237
42324
  }
@@ -43714,10 +43801,10 @@ function registerWatchWait(watchCommand) {
43714
43801
  }
43715
43802
 
43716
43803
  // src/commands/watch/simulateDivergence.ts
43717
- import { writeFileSync as writeFileSync52 } from "fs";
43804
+ import { writeFileSync as writeFileSync53 } from "fs";
43718
43805
  function simulateDivergence() {
43719
43806
  try {
43720
- writeFileSync52(simulatedDivergencePath(), "");
43807
+ writeFileSync53(simulatedDivergencePath(), "");
43721
43808
  console.log(
43722
43809
  `the next assist watch wait poll in ${runGit3(["rev-parse", "--show-toplevel"])} will exit 3 as a simulated divergence`
43723
43810
  );
@@ -43811,7 +43898,7 @@ function registerWatch(program) {
43811
43898
 
43812
43899
  // src/commands/roam/auth.ts
43813
43900
  import { randomBytes } from "crypto";
43814
- import chalk259 from "chalk";
43901
+ import chalk260 from "chalk";
43815
43902
 
43816
43903
  // src/commands/roam/waitForCallback.ts
43817
43904
  import { createServer as createServer3 } from "http";
@@ -43942,13 +44029,13 @@ async function auth() {
43942
44029
  saveGlobalConfig(config);
43943
44030
  const state = randomBytes(16).toString("hex");
43944
44031
  console.log(
43945
- chalk259.yellow("\nEnsure this Redirect URI is set in your Roam OAuth app:")
44032
+ chalk260.yellow("\nEnsure this Redirect URI is set in your Roam OAuth app:")
43946
44033
  );
43947
- console.log(chalk259.white("http://localhost:14523/callback\n"));
43948
- console.log(chalk259.blue("Opening browser for authorization..."));
43949
- console.log(chalk259.dim("Waiting for authorization callback..."));
44034
+ console.log(chalk260.white("http://localhost:14523/callback\n"));
44035
+ console.log(chalk260.blue("Opening browser for authorization..."));
44036
+ console.log(chalk260.dim("Waiting for authorization callback..."));
43950
44037
  const { code, redirectUri } = await authorizeInBrowser(clientId, state);
43951
- console.log(chalk259.dim("Exchanging code for tokens..."));
44038
+ console.log(chalk260.dim("Exchanging code for tokens..."));
43952
44039
  const tokens = await exchangeToken({
43953
44040
  code,
43954
44041
  clientId,
@@ -43964,14 +44051,14 @@ async function auth() {
43964
44051
  };
43965
44052
  saveGlobalConfig(config);
43966
44053
  console.log(
43967
- chalk259.green("Roam credentials and tokens saved to ~/.assist.yml")
44054
+ chalk260.green("Roam credentials and tokens saved to ~/.assist.yml")
43968
44055
  );
43969
44056
  }
43970
44057
 
43971
44058
  // src/commands/roam/postRoamActivity.ts
43972
44059
  import { execFileSync as execFileSync32 } from "child_process";
43973
44060
  import { readdirSync as readdirSync23, readFileSync as readFileSync65, statSync as statSync13 } from "fs";
43974
- import { join as join101 } from "path";
44061
+ import { join as join102 } from "path";
43975
44062
  function findPortFile(roamDir) {
43976
44063
  let entries;
43977
44064
  try {
@@ -43980,7 +44067,7 @@ function findPortFile(roamDir) {
43980
44067
  return void 0;
43981
44068
  }
43982
44069
  const candidates = entries.filter((name) => /^roam-local-api(-[^.]+)?\.port$/.test(name)).map((name) => {
43983
- const path108 = join101(roamDir, name);
44070
+ const path108 = join102(roamDir, name);
43984
44071
  try {
43985
44072
  return { path: path108, mtimeMs: statSync13(path108).mtimeMs };
43986
44073
  } catch {
@@ -43997,7 +44084,7 @@ var PID_BY_APP = {
43997
44084
  function postRoamActivity(app, event) {
43998
44085
  const appData = process.env.APPDATA;
43999
44086
  if (!appData) return;
44000
- const portFile = findPortFile(join101(appData, "Roam"));
44087
+ const portFile = findPortFile(join102(appData, "Roam"));
44001
44088
  if (!portFile) return;
44002
44089
  let port;
44003
44090
  try {
@@ -44182,8 +44269,8 @@ function link2() {
44182
44269
  }
44183
44270
 
44184
44271
  // src/commands/run/add.ts
44185
- import { mkdirSync as mkdirSync35, writeFileSync as writeFileSync53 } from "fs";
44186
- import { join as join102 } from "path";
44272
+ import { mkdirSync as mkdirSync36, writeFileSync as writeFileSync54 } from "fs";
44273
+ import { join as join103 } from "path";
44187
44274
 
44188
44275
  // src/commands/run/editRepoRunList.ts
44189
44276
  async function editRepoRunList(repoName, cwd, edit2) {
@@ -44264,7 +44351,7 @@ function parseEnvPairs(pairs) {
44264
44351
  }
44265
44352
 
44266
44353
  // src/commands/run/parseParamSpecs.ts
44267
- function fail7(spec) {
44354
+ function fail8(spec) {
44268
44355
  console.error(
44269
44356
  `--param must be <name>, <name>! or <name>=<default>, got "${spec}"`
44270
44357
  );
@@ -44274,14 +44361,14 @@ function parseParamSpec(spec) {
44274
44361
  const eq46 = spec.indexOf("=");
44275
44362
  const name = eq46 === -1 ? spec : spec.slice(0, eq46);
44276
44363
  if (eq46 !== -1) {
44277
- if (eq46 === 0 || name.endsWith("!")) fail7(spec);
44364
+ if (eq46 === 0 || name.endsWith("!")) fail8(spec);
44278
44365
  return { name, default: spec.slice(eq46 + 1) };
44279
44366
  }
44280
44367
  if (name.endsWith("!")) {
44281
- if (name.length === 1) fail7(spec);
44368
+ if (name.length === 1) fail8(spec);
44282
44369
  return { name: name.slice(0, -1), required: true };
44283
44370
  }
44284
- if (name.length === 0) fail7(spec);
44371
+ if (name.length === 0) fail8(spec);
44285
44372
  return { name };
44286
44373
  }
44287
44374
  function parseParamSpecs(specs) {
@@ -44354,16 +44441,16 @@ function saveProjectRunConfig(entry) {
44354
44441
  saveConfig(config);
44355
44442
  }
44356
44443
  function createCommandFile(name) {
44357
- const dir = join102(".claude", "commands");
44358
- mkdirSync35(dir, { recursive: true });
44444
+ const dir = join103(".claude", "commands");
44445
+ mkdirSync36(dir, { recursive: true });
44359
44446
  const content = `---
44360
44447
  description: Run ${name}
44361
44448
  ---
44362
44449
 
44363
44450
  Run \`assist run ${name} $ARGUMENTS 2>&1\`.
44364
44451
  `;
44365
- const filePath = join102(dir, `${name}.md`);
44366
- writeFileSync53(filePath, content);
44452
+ const filePath = join103(dir, `${name}.md`);
44453
+ writeFileSync54(filePath, content);
44367
44454
  console.log(`Created command file: ${filePath}`);
44368
44455
  }
44369
44456
  async function add4() {
@@ -44468,7 +44555,7 @@ function registerRunAdd(runCommand) {
44468
44555
 
44469
44556
  // src/commands/run/remove.ts
44470
44557
  import { existsSync as existsSync84, unlinkSync as unlinkSync19 } from "fs";
44471
- import { join as join103 } from "path";
44558
+ import { join as join104 } from "path";
44472
44559
 
44473
44560
  // src/commands/run/removeRepoRunConfig.ts
44474
44561
  function isNamed(entry, name) {
@@ -44486,7 +44573,7 @@ function removeRepoRunConfig(name, repoName, cwd = process.cwd()) {
44486
44573
 
44487
44574
  // src/commands/run/remove.ts
44488
44575
  function deleteCommandFile(name) {
44489
- const filePath = join103(".claude", "commands", `${name}.md`);
44576
+ const filePath = join104(".claude", "commands", `${name}.md`);
44490
44577
  if (existsSync84(filePath)) {
44491
44578
  unlinkSync19(filePath);
44492
44579
  console.log(`Deleted command file: ${filePath}`);
@@ -44540,18 +44627,18 @@ function registerRun(program) {
44540
44627
  }
44541
44628
 
44542
44629
  // src/commands/sessions/nodes/formatLink.ts
44543
- import chalk260 from "chalk";
44630
+ import chalk261 from "chalk";
44544
44631
  var STATE_COLOURS = {
44545
- connected: chalk260.green,
44546
- connecting: chalk260.yellow,
44547
- disconnected: chalk260.red,
44548
- "version-blocked": chalk260.red
44632
+ connected: chalk261.green,
44633
+ connecting: chalk261.yellow,
44634
+ disconnected: chalk261.red,
44635
+ "version-blocked": chalk261.red
44549
44636
  };
44550
44637
  function formatLink(link3) {
44551
- const colour = STATE_COLOURS[link3.state] ?? chalk260.white;
44638
+ const colour = STATE_COLOURS[link3.state] ?? chalk261.white;
44552
44639
  const peer = link3.peerVersion ? ` peer ${link3.peerVersion}` : "";
44553
44640
  const error = link3.error ? `
44554
- ${chalk260.dim(`last error${link3.errorAt ? ` ${link3.errorAt}` : ""}: ${link3.error}`)}` : "";
44641
+ ${chalk261.dim(`last error${link3.errorAt ? ` ${link3.errorAt}` : ""}: ${link3.error}`)}` : "";
44555
44642
  return ` ${link3.name} ${colour(link3.state)} ${link3.url}${peer}${error}`;
44556
44643
  }
44557
44644
 
@@ -44767,7 +44854,7 @@ function requestDrain(socket, lines2) {
44767
44854
  }
44768
44855
 
44769
44856
  // src/commands/sessions/daemon/runDaemon.ts
44770
- import { mkdirSync as mkdirSync40 } from "fs";
44857
+ import { mkdirSync as mkdirSync41 } from "fs";
44771
44858
 
44772
44859
  // src/commands/sessions/daemon/createAutoExit.ts
44773
44860
  var DEFAULT_GRACE_MS = 6e4;
@@ -45022,7 +45109,7 @@ function broadcastSessions(sessions, clients, linkedSessions = [], active) {
45022
45109
 
45023
45110
  // src/commands/sessions/daemon/findServerParents.ts
45024
45111
  import { existsSync as existsSync86 } from "fs";
45025
- import { join as join104, resolve as resolve29 } from "path";
45112
+ import { join as join105, resolve as resolve29 } from "path";
45026
45113
  function isLive(session) {
45027
45114
  return !!session.pty && session.status !== "done" && session.status !== "error";
45028
45115
  }
@@ -45031,7 +45118,7 @@ function isLiveAgent(session) {
45031
45118
  }
45032
45119
  function serverRunDirs(sessions, file) {
45033
45120
  return new Set(
45034
- sessions.filter((s) => s.server && s.cwd && isLive(s)).map((s) => resolve29(s.cwd)).filter((dir) => existsSync86(join104(dir, file)))
45121
+ sessions.filter((s) => s.server && s.cwd && isLive(s)).map((s) => resolve29(s.cwd)).filter((dir) => existsSync86(join105(dir, file)))
45035
45122
  );
45036
45123
  }
45037
45124
  function findServerParents(sessions, file) {
@@ -45249,7 +45336,7 @@ function sendResizeSnapshot(s, send) {
45249
45336
  }
45250
45337
 
45251
45338
  // src/commands/sessions/daemon/viewerSize.ts
45252
- import { readFileSync as readFileSync67, writeFileSync as writeFileSync54 } from "fs";
45339
+ import { readFileSync as readFileSync67, writeFileSync as writeFileSync55 } from "fs";
45253
45340
  var DEFAULT_SIZE = { cols: 120, rows: 30 };
45254
45341
  var remembered;
45255
45342
  function rememberViewerSize(cols, rows) {
@@ -45257,7 +45344,7 @@ function rememberViewerSize(cols, rows) {
45257
45344
  if (remembered?.cols === cols && remembered.rows === rows) return;
45258
45345
  remembered = { cols, rows };
45259
45346
  try {
45260
- writeFileSync54(daemonPaths.viewerSize, JSON.stringify(remembered));
45347
+ writeFileSync55(daemonPaths.viewerSize, JSON.stringify(remembered));
45261
45348
  } catch (error) {
45262
45349
  daemonLog(
45263
45350
  `viewer size ${cols}x${rows} not saved: ${error instanceof Error ? error.message : String(error)}`
@@ -45892,12 +45979,12 @@ function createRunSession(id, { runName, runArgs, cwd, meta }) {
45892
45979
  }
45893
45980
 
45894
45981
  // src/commands/sessions/daemon/autoUpdate/autoUpdateControl.ts
45895
- import { existsSync as existsSync90, rmSync as rmSync12, writeFileSync as writeFileSync55 } from "fs";
45982
+ import { existsSync as existsSync90, rmSync as rmSync12, writeFileSync as writeFileSync56 } from "fs";
45896
45983
  var paused;
45897
45984
  var wake;
45898
45985
  function persist2(value) {
45899
45986
  try {
45900
- if (value) writeFileSync55(daemonPaths.autoUpdatePaused, "");
45987
+ if (value) writeFileSync56(daemonPaths.autoUpdatePaused, "");
45901
45988
  else rmSync12(daemonPaths.autoUpdatePaused, { force: true });
45902
45989
  } catch {
45903
45990
  }
@@ -46022,7 +46109,7 @@ async function runAutoUpdateLoop(deps2, maxLaps = Number.POSITIVE_INFINITY) {
46022
46109
  }
46023
46110
 
46024
46111
  // src/commands/sessions/daemon/autoUpdate/trimWatcherLog.ts
46025
- import { readFileSync as readFileSync69, writeFileSync as writeFileSync56 } from "fs";
46112
+ import { readFileSync as readFileSync69, writeFileSync as writeFileSync57 } from "fs";
46026
46113
  var KEEP_TAIL = 256 * 1024;
46027
46114
  var MAX_LOG_SIZE = 4 * 1024 * 1024;
46028
46115
  function trimWatcherLog(cwd) {
@@ -46034,17 +46121,17 @@ function trimWatcherLog(cwd) {
46034
46121
  return;
46035
46122
  }
46036
46123
  if (log2.length <= MAX_LOG_SIZE) return;
46037
- writeFileSync56(path108, log2.slice(-KEEP_TAIL));
46124
+ writeFileSync57(path108, log2.slice(-KEEP_TAIL));
46038
46125
  daemonLog(`auto-update: log ${path108} trimmed to its last ${KEEP_TAIL} chars`);
46039
46126
  }
46040
46127
 
46041
46128
  // src/commands/sessions/daemon/worktree/appendWatcherLog.ts
46042
- import { appendFileSync as appendFileSync5, mkdirSync as mkdirSync36 } from "fs";
46043
- import { dirname as dirname44 } from "path";
46129
+ import { appendFileSync as appendFileSync5, mkdirSync as mkdirSync37 } from "fs";
46130
+ import { dirname as dirname45 } from "path";
46044
46131
  function appendWatcherLog(cwd, data) {
46045
46132
  try {
46046
46133
  const path108 = watcherLogPath(cwd);
46047
- mkdirSync36(dirname44(path108), { recursive: true });
46134
+ mkdirSync37(dirname45(path108), { recursive: true });
46048
46135
  appendFileSync5(path108, data);
46049
46136
  } catch {
46050
46137
  }
@@ -46398,12 +46485,12 @@ import { basename as basename30 } from "path";
46398
46485
 
46399
46486
  // src/commands/sessions/daemon/worktree/deleteStrandedTree.ts
46400
46487
  import { existsSync as existsSync92 } from "fs";
46401
- import { join as join108 } from "path";
46488
+ import { join as join109 } from "path";
46402
46489
 
46403
46490
  // src/commands/sessions/daemon/worktree/deleteTreeDirectly.ts
46404
46491
  import { statSync as statSync15 } from "fs";
46405
46492
  import { rm as rm3 } from "fs/promises";
46406
- import { join as join107 } from "path";
46493
+ import { join as join108 } from "path";
46407
46494
  async function deleteTreeDirectly(clone, worktreePath, why) {
46408
46495
  if (holdsAGitDirectoryRatherThanALink(worktreePath)) {
46409
46496
  const refusal = "it is a clone of its own, not a linked worktree";
@@ -46431,7 +46518,7 @@ async function deleteTreeDirectly(clone, worktreePath, why) {
46431
46518
  return { removed: true };
46432
46519
  }
46433
46520
  function holdsAGitDirectoryRatherThanALink(worktreePath) {
46434
- return statSync15(join107(worktreePath, ".git"), {
46521
+ return statSync15(join108(worktreePath, ".git"), {
46435
46522
  throwIfNoEntry: false
46436
46523
  })?.isDirectory() === true;
46437
46524
  }
@@ -46467,7 +46554,7 @@ async function deleteStrandedTree(clone, worktreePath, cause) {
46467
46554
  );
46468
46555
  }
46469
46556
  function strandedReason(worktreePath, cause) {
46470
- if (!existsSync92(join108(worktreePath, ".git")))
46557
+ if (!existsSync92(join109(worktreePath, ".git")))
46471
46558
  return "its .git link is already gone";
46472
46559
  if (/not a working tree|not a git repository/i.test(reason2(cause)))
46473
46560
  return "git no longer recognises it as a working tree";
@@ -47515,8 +47602,8 @@ function handleRefusedRun(session, exitCode, onStatusChange) {
47515
47602
  }
47516
47603
 
47517
47604
  // src/commands/sessions/daemon/watchActivity.ts
47518
- import { existsSync as existsSync96, mkdirSync as mkdirSync37, watch as watch2 } from "fs";
47519
- import { dirname as dirname45 } from "path";
47605
+ import { existsSync as existsSync96, mkdirSync as mkdirSync38, watch as watch2 } from "fs";
47606
+ import { dirname as dirname46 } from "path";
47520
47607
 
47521
47608
  // src/commands/sessions/daemon/applyActivityToSession.ts
47522
47609
  function applyActivityToSession(session, activity2) {
@@ -47578,9 +47665,9 @@ var DEBOUNCE_MS2 = 50;
47578
47665
  function watchActivity(session, notify2, onClaudeSessionId) {
47579
47666
  if (session.commandType !== "assist" || !session.cwd) return;
47580
47667
  const path108 = activityPath(session.id);
47581
- const dir = dirname45(path108);
47668
+ const dir = dirname46(path108);
47582
47669
  try {
47583
- mkdirSync37(dir, { recursive: true });
47670
+ mkdirSync38(dir, { recursive: true });
47584
47671
  } catch {
47585
47672
  return;
47586
47673
  }
@@ -47745,10 +47832,10 @@ function bindCodexSession(session, notify2) {
47745
47832
  import { watch as watch3 } from "fs";
47746
47833
 
47747
47834
  // src/commands/sessions/daemon/ensureProjectDirExists.ts
47748
- import { mkdirSync as mkdirSync38 } from "fs";
47835
+ import { mkdirSync as mkdirSync39 } from "fs";
47749
47836
  function ensureProjectDirExists(dir, sessionId) {
47750
47837
  try {
47751
- mkdirSync38(dir, { recursive: true });
47838
+ mkdirSync39(dir, { recursive: true });
47752
47839
  return true;
47753
47840
  } catch (error) {
47754
47841
  daemonLog(
@@ -50856,8 +50943,8 @@ function resumeSession(id, sessionId, cwd, name, holdPty, harness) {
50856
50943
  import { existsSync as existsSync100 } from "fs";
50857
50944
 
50858
50945
  // src/commands/sessions/daemon/worktree/carryTranscriptToTree.ts
50859
- import { copyFileSync as copyFileSync4, existsSync as existsSync99, mkdirSync as mkdirSync39 } from "fs";
50860
- import { join as join109 } from "path";
50946
+ import { copyFileSync as copyFileSync4, existsSync as existsSync99, mkdirSync as mkdirSync40 } from "fs";
50947
+ import { join as join110 } from "path";
50861
50948
  function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
50862
50949
  const dir = projectDirForCwd(toCwd);
50863
50950
  if (dir === projectDirForCwd(fromCwd)) {
@@ -50866,7 +50953,7 @@ function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
50866
50953
  );
50867
50954
  return;
50868
50955
  }
50869
- const dest = join109(dir, `${claudeSessionId}.jsonl`);
50956
+ const dest = join110(dir, `${claudeSessionId}.jsonl`);
50870
50957
  if (existsSync99(dest)) {
50871
50958
  daemonLog(`transcript ${claudeSessionId} already present in ${dir}`);
50872
50959
  return;
@@ -50879,7 +50966,7 @@ function carryTranscriptToTree(claudeSessionId, fromCwd, toCwd) {
50879
50966
  return;
50880
50967
  }
50881
50968
  try {
50882
- mkdirSync39(dir, { recursive: true });
50969
+ mkdirSync40(dir, { recursive: true });
50883
50970
  copyFileSync4(source, dest);
50884
50971
  daemonLog(
50885
50972
  `transcript ${source} copied to ${dest} so ${toCwd} can resume it`
@@ -51180,10 +51267,10 @@ function autoUpdateReply() {
51180
51267
  }
51181
51268
 
51182
51269
  // src/commands/sessions/daemon/autoUpdate/applyAutoUpdateAction.ts
51183
- import { rmSync as rmSync14, writeFileSync as writeFileSync57 } from "fs";
51270
+ import { rmSync as rmSync14, writeFileSync as writeFileSync58 } from "fs";
51184
51271
  function signalLap(installDir, marker2) {
51185
51272
  const control = watchControlPaths(installDir);
51186
- if (control) writeFileSync57(control[marker2], "");
51273
+ if (control) writeFileSync58(control[marker2], "");
51187
51274
  }
51188
51275
  function applyAutoUpdateAction(action) {
51189
51276
  const installDir = getInstallDir();
@@ -52115,7 +52202,7 @@ function handleConnection(socket, manager) {
52115
52202
  }
52116
52203
 
52117
52204
  // src/commands/sessions/daemon/onListening.ts
52118
- import { unlinkSync as unlinkSync20, writeFileSync as writeFileSync58 } from "fs";
52205
+ import { unlinkSync as unlinkSync20, writeFileSync as writeFileSync59 } from "fs";
52119
52206
 
52120
52207
  // src/commands/sessions/daemon/startPidFileWatchdog.ts
52121
52208
  import { readFileSync as readFileSync70 } from "fs";
@@ -52137,7 +52224,7 @@ function ownsPidFile() {
52137
52224
 
52138
52225
  // src/commands/sessions/daemon/onListening.ts
52139
52226
  function onListening(manager, checkAutoExit) {
52140
- writeFileSync58(daemonPaths.pid, String(process.pid));
52227
+ writeFileSync59(daemonPaths.pid, String(process.pid));
52141
52228
  startPidFileWatchdog(() => {
52142
52229
  daemonLog("lost daemon.pid ownership; shutting down sessions and exiting");
52143
52230
  void manager.flushActiveMs().finally(() => {
@@ -52226,7 +52313,7 @@ async function recoverFromAddrInUse(server, manager, checkAutoExit) {
52226
52313
 
52227
52314
  // src/commands/sessions/daemon/runDaemon.ts
52228
52315
  async function runDaemon() {
52229
- mkdirSync40(daemonPaths.dir, { recursive: true });
52316
+ mkdirSync41(daemonPaths.dir, { recursive: true });
52230
52317
  daemonLog(
52231
52318
  `starting (reason: ${process.env.ASSIST_DAEMON_SPAWN_REASON ?? "manual"})`
52232
52319
  );
@@ -52285,7 +52372,7 @@ async function closeSession() {
52285
52372
  }
52286
52373
 
52287
52374
  // src/commands/sessions/nodes/listNodes.ts
52288
- import chalk261 from "chalk";
52375
+ import chalk262 from "chalk";
52289
52376
  async function nodesReport() {
52290
52377
  const live = await queryNodes();
52291
52378
  if (live)
@@ -52302,10 +52389,10 @@ async function listNodes(options2) {
52302
52389
  console.log(JSON.stringify(report, null, 2));
52303
52390
  return;
52304
52391
  }
52305
- console.log(`${report.local} ${chalk261.dim("(this node)")}`);
52392
+ console.log(`${report.local} ${chalk262.dim("(this node)")}`);
52306
52393
  if (!report.daemonRunning)
52307
- console.log(chalk261.dim(" daemon not running; showing configured links"));
52308
- if (report.links.length === 0) console.log(chalk261.dim(" no links"));
52394
+ console.log(chalk262.dim(" daemon not running; showing configured links"));
52395
+ if (report.links.length === 0) console.log(chalk262.dim(" no links"));
52309
52396
  for (const link3 of report.links) console.log(formatLink(link3));
52310
52397
  }
52311
52398
 
@@ -52327,7 +52414,7 @@ async function findUnlinkedWindowsNode(health2, platform = detectPlatform()) {
52327
52414
  }
52328
52415
 
52329
52416
  // src/commands/sessions/nodes/printReport.ts
52330
- import chalk262 from "chalk";
52417
+ import chalk263 from "chalk";
52331
52418
  function printReport(report) {
52332
52419
  if (report.links.length === 0) {
52333
52420
  console.log(`${report.local} has no links`);
@@ -52341,11 +52428,11 @@ function printReport(report) {
52341
52428
  for (const diagnosis of report.links) printDiagnosis(diagnosis);
52342
52429
  }
52343
52430
  function printDiagnosis(diagnosis) {
52344
- console.log(`${chalk262.bold(diagnosis.name)} ${chalk262.dim(diagnosis.url)}`);
52431
+ console.log(`${chalk263.bold(diagnosis.name)} ${chalk263.dim(diagnosis.url)}`);
52345
52432
  for (const hop of diagnosis.hops) {
52346
- const mark = hop.ok ? chalk262.green("\u2713") : chalk262.red("\u2717");
52433
+ const mark = hop.ok ? chalk263.green("\u2713") : chalk263.red("\u2717");
52347
52434
  console.log(` ${mark} ${hop.hop.padEnd(9)} ${hop.detail ?? hop.error}`);
52348
- if (hop.remediation) console.log(` ${chalk262.yellow(hop.remediation)}`);
52435
+ if (hop.remediation) console.log(` ${chalk263.yellow(hop.remediation)}`);
52349
52436
  }
52350
52437
  }
52351
52438
 
@@ -52417,14 +52504,14 @@ function registerDiagnoseCommands(nodes, calledBy4) {
52417
52504
  }
52418
52505
 
52419
52506
  // src/commands/sessions/nodes/linkNode.ts
52420
- import chalk265 from "chalk";
52507
+ import chalk266 from "chalk";
52421
52508
 
52422
52509
  // src/commands/sessions/nodes/notifyDaemonLinks.ts
52423
- import chalk263 from "chalk";
52510
+ import chalk264 from "chalk";
52424
52511
  async function notifyDaemonLinks() {
52425
52512
  if (!await isDaemonRunning()) {
52426
52513
  console.log(
52427
- chalk263.yellow(
52514
+ chalk264.yellow(
52428
52515
  "The sessions daemon is not running; it loads the links when it starts."
52429
52516
  )
52430
52517
  );
@@ -52432,11 +52519,11 @@ async function notifyDaemonLinks() {
52432
52519
  }
52433
52520
  try {
52434
52521
  await sendToDaemonAwaitAck({ type: "reload-links" });
52435
- console.log(chalk263.dim("The sessions daemon reloaded its links."));
52522
+ console.log(chalk264.dim("The sessions daemon reloaded its links."));
52436
52523
  } catch (error) {
52437
52524
  const message3 = error instanceof Error ? error.message : String(error);
52438
52525
  console.log(
52439
- chalk263.yellow(
52526
+ chalk264.yellow(
52440
52527
  `Could not notify the sessions daemon (${message3}); run \`assist daemon restart\` to apply the change.`
52441
52528
  )
52442
52529
  );
@@ -52444,7 +52531,7 @@ async function notifyDaemonLinks() {
52444
52531
  }
52445
52532
 
52446
52533
  // src/commands/sessions/nodes/readLinks.ts
52447
- import chalk264 from "chalk";
52534
+ import chalk265 from "chalk";
52448
52535
 
52449
52536
  // src/commands/sessions/nodes/writeLinks.ts
52450
52537
  async function writeLinks(links2) {
@@ -52467,7 +52554,7 @@ async function readLinks() {
52467
52554
  await writeLinks(links2);
52468
52555
  const dropped = stored.filter((link3) => !link3.url).map((link3) => link3.name);
52469
52556
  console.log(
52470
- chalk264.yellow(`Removed ${dropped.join(", ")}: ${SSH_LINK_RETIRED}`)
52557
+ chalk265.yellow(`Removed ${dropped.join(", ")}: ${SSH_LINK_RETIRED}`)
52471
52558
  );
52472
52559
  return links2;
52473
52560
  }
@@ -52523,7 +52610,7 @@ async function linkNode(name, url, options2) {
52523
52610
  throw new Error(`${name} is this node; link to a different node`);
52524
52611
  const link3 = await buildLink(name, url, options2);
52525
52612
  await writeLinks([...others, link3]);
52526
- console.log(chalk265.green(`Linked ${name} (${link3.url})`));
52613
+ console.log(chalk266.green(`Linked ${name} (${link3.url})`));
52527
52614
  await notifyDaemonLinks();
52528
52615
  }
52529
52616
 
@@ -52588,14 +52675,14 @@ function startPeerAction(name, action) {
52588
52675
  const line = `nodes ${action} ${name} trace=${traceId}`;
52589
52676
  console.log(line);
52590
52677
  appendDaemonLog(line);
52591
- const fail9 = async (summary, error) => new Error(await describeFailure(name, summary, error));
52678
+ const fail10 = async (summary, error) => new Error(await describeFailure(name, summary, error));
52592
52679
  return {
52593
52680
  spec,
52594
52681
  traceId,
52595
- fail: fail9,
52682
+ fail: fail10,
52596
52683
  async awaitReturn(sawDown, timeoutMs = RETURN_TIMEOUT_MS) {
52597
52684
  const link3 = await awaitLinkReturn(name, { sawDown, timeoutMs });
52598
- if (!link3) throw await fail9(`${name} did not come back`);
52685
+ if (!link3) throw await fail10(`${name} did not come back`);
52599
52686
  return link3;
52600
52687
  }
52601
52688
  };
@@ -52706,16 +52793,16 @@ function registerPeerActionCommands(nodes, calledBy4) {
52706
52793
  }
52707
52794
 
52708
52795
  // src/commands/sessions/nodes/unlinkNode.ts
52709
- import chalk266 from "chalk";
52796
+ import chalk267 from "chalk";
52710
52797
  async function unlinkNode(name) {
52711
52798
  const links2 = await readLinks();
52712
52799
  const remaining = links2.filter((link3) => link3.name !== name);
52713
52800
  if (remaining.length === links2.length) {
52714
- console.log(chalk266.yellow(`No link named ${name}`));
52801
+ console.log(chalk267.yellow(`No link named ${name}`));
52715
52802
  return;
52716
52803
  }
52717
52804
  await writeLinks(remaining);
52718
- console.log(chalk266.green(`Unlinked ${name}`));
52805
+ console.log(chalk267.green(`Unlinked ${name}`));
52719
52806
  await notifyDaemonLinks();
52720
52807
  }
52721
52808
 
@@ -52789,17 +52876,17 @@ function resolveTarget3(sessionId, server) {
52789
52876
  async function sessionOutput(sessionId, options2) {
52790
52877
  const count10 = Number.parseInt(options2.lines, 10);
52791
52878
  if (!Number.isInteger(count10) || count10 < 1)
52792
- return fail8(`-n must be a positive integer, got ${options2.lines}`);
52879
+ return fail9(`-n must be a positive integer, got ${options2.lines}`);
52793
52880
  const target = resolveTarget3(sessionId, options2.server);
52794
- if (typeof target === "string") return fail8(target);
52881
+ if (typeof target === "string") return fail9(target);
52795
52882
  try {
52796
52883
  const scrollback = await requestSessionOutput(target);
52797
52884
  for (const line of lastLines(scrollback, count10)) console.log(line);
52798
52885
  } catch (error) {
52799
- fail8(error instanceof Error ? error.message : String(error));
52886
+ fail9(error instanceof Error ? error.message : String(error));
52800
52887
  }
52801
52888
  }
52802
- function fail8(message3) {
52889
+ function fail9(message3) {
52803
52890
  console.error(message3);
52804
52891
  process.exitCode = 1;
52805
52892
  }
@@ -52950,10 +53037,10 @@ function createProgram() {
52950
53037
  }
52951
53038
 
52952
53039
  // src/reportCliError.ts
52953
- import chalk267 from "chalk";
53040
+ import chalk268 from "chalk";
52954
53041
  function reportCliError(error) {
52955
53042
  if (error instanceof InvalidItemIdError || error instanceof AmbiguousRepoConfigError || error instanceof UnknownRepoConfigError || error instanceof MissingRunCwdError || error instanceof MiroExtractError) {
52956
- console.error(chalk267.red(error.message));
53043
+ console.error(chalk268.red(error.message));
52957
53044
  } else {
52958
53045
  console.error(error);
52959
53046
  }